"use strict";var Tng=Object.defineProperty;var y6=t=>{throw TypeError(t)};var xng=(t,I,g)=>I in t?Tng(t,I,{enumerable:!0,configurable:!0,writable:!0,value:g}):t[I]=g;var CI=(t,I,g)=>xng(t,typeof I!="symbol"?I+"":I,g),wH=(t,I,g)=>I.has(t)||y6("Cannot "+g);var M=(t,I,g)=>(wH(t,I,"read from private field"),g?g.call(t):I.get(t)),ig=(t,I,g)=>I.has(t)?y6("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(t):I.set(t,g),$=(t,I,g,C)=>(wH(t,I,"write to private field"),C?C.call(t,g):I.set(t,g),g),eg=(t,I,g)=>(wH(t,I,"access private method"),g);var ui=(t,I,g,C)=>({set _(i){$(t,I,i,g)},get _(){return M(t,I,C)}});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const gg=require("vue");var gh=typeof document<"u"?document.currentScript:null,FI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ka(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pH={exports:{}};/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/var Y6;function jng(){return Y6||(Y6=1,function(t,I){(function(g){t.exports=g()})(function(){return function g(C,i,e){function A(n,a){if(!i[n]){if(!C[n]){var d=typeof Ka=="function"&&Ka;if(!a&&d)return d(n,!0);if(s)return s(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var c=i[n]={exports:{}};C[n][0].call(c.exports,function(r){var h=C[n][1][r];return A(h||r)},c,c.exports,g,C,i,e)}return i[n].exports}for(var s=typeof Ka=="function"&&Ka,l=0;l<e.length;l++)A(e[l]);return A}({1:[function(g,C,i){var e=g("./utils"),A=g("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var n,a,d,o,c,r,h,b=[],u=0,m=l.length,Z=m,p=e.getTypeOf(l)!=="string";u<l.length;)Z=m-u,d=p?(n=l[u++],a=u<m?l[u++]:0,u<m?l[u++]:0):(n=l.charCodeAt(u++),a=u<m?l.charCodeAt(u++):0,u<m?l.charCodeAt(u++):0),o=n>>2,c=(3&n)<<4|a>>4,r=1<Z?(15&a)<<2|d>>6:64,h=2<Z?63&d:64,b.push(s.charAt(o)+s.charAt(c)+s.charAt(r)+s.charAt(h));return b.join("")},i.decode=function(l){var n,a,d,o,c,r,h=0,b=0,u="data:";if(l.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var m,Z=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===s.charAt(64)&&Z--,l.charAt(l.length-2)===s.charAt(64)&&Z--,Z%1!=0)throw new Error("Invalid base64 input, bad content length.");for(m=A.uint8array?new Uint8Array(0|Z):new Array(0|Z);h<l.length;)n=s.indexOf(l.charAt(h++))<<2|(o=s.indexOf(l.charAt(h++)))>>4,a=(15&o)<<4|(c=s.indexOf(l.charAt(h++)))>>2,d=(3&c)<<6|(r=s.indexOf(l.charAt(h++))),m[b++]=n,c!==64&&(m[b++]=a),r!==64&&(m[b++]=d);return m}},{"./support":30,"./utils":32}],2:[function(g,C,i){var e=g("./external"),A=g("./stream/DataWorker"),s=g("./stream/Crc32Probe"),l=g("./stream/DataLengthProbe");function n(a,d,o,c,r){this.compressedSize=a,this.uncompressedSize=d,this.crc32=o,this.compression=c,this.compressedContent=r}n.prototype={getContentWorker:function(){var a=new A(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return a.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),a},getCompressedWorker:function(){return new A(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},n.createWorkerFrom=function(a,d,o){return a.pipe(new s).pipe(new l("uncompressedSize")).pipe(d.compressWorker(o)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},C.exports=n},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(g,C,i){var e=g("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new e("STORE compression")},uncompressWorker:function(){return new e("STORE decompression")}},i.DEFLATE=g("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(g,C,i){var e=g("./utils"),A=function(){for(var s,l=[],n=0;n<256;n++){s=n;for(var a=0;a<8;a++)s=1&s?3988292384^s>>>1:s>>>1;l[n]=s}return l}();C.exports=function(s,l){return s!==void 0&&s.length?e.getTypeOf(s)!=="string"?function(n,a,d,o){var c=A,r=o+d;n^=-1;for(var h=o;h<r;h++)n=n>>>8^c[255&(n^a[h])];return-1^n}(0|l,s,s.length,0):function(n,a,d,o){var c=A,r=o+d;n^=-1;for(var h=o;h<r;h++)n=n>>>8^c[255&(n^a.charCodeAt(h))];return-1^n}(0|l,s,s.length,0):0}},{"./utils":32}],5:[function(g,C,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(g,C,i){var e=null;e=typeof Promise<"u"?Promise:g("lie"),C.exports={Promise:e}},{lie:37}],7:[function(g,C,i){var e=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",A=g("pako"),s=g("./utils"),l=g("./stream/GenericWorker"),n=e?"uint8array":"array";function a(d,o){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=o,this.meta={}}i.magic="\b\0",s.inherits(a,l),a.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(n,d.data),!1)},a.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},a.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},a.prototype._createPako=function(){this._pako=new A[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(o){d.push({data:o,meta:d.meta})}},i.compressWorker=function(d){return new a("Deflate",d)},i.uncompressWorker=function(){return new a("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(g,C,i){function e(c,r){var h,b="";for(h=0;h<r;h++)b+=String.fromCharCode(255&c),c>>>=8;return b}function A(c,r,h,b,u,m){var Z,p,Y=c.file,R=c.compression,X=m!==n.utf8encode,H=s.transformTo("string",m(Y.name)),S=s.transformTo("string",n.utf8encode(Y.name)),z=Y.comment,v=s.transformTo("string",m(z)),K=s.transformTo("string",n.utf8encode(z)),V=S.length!==Y.name.length,N=K.length!==z.length,B="",G="",w="",W=Y.dir,y=Y.date,f={crc32:0,compressedSize:0,uncompressedSize:0};r&&!h||(f.crc32=c.crc32,f.compressedSize=c.compressedSize,f.uncompressedSize=c.uncompressedSize);var D=0;r&&(D|=8),X||!V&&!N||(D|=2048);var F=0,T=0;W&&(F|=16),u==="UNIX"?(T=798,F|=function(P,L){var E=P;return P||(E=L?16893:33204),(65535&E)<<16}(Y.unixPermissions,W)):(T=20,F|=function(P){return 63&(P||0)}(Y.dosPermissions)),Z=y.getUTCHours(),Z<<=6,Z|=y.getUTCMinutes(),Z<<=5,Z|=y.getUTCSeconds()/2,p=y.getUTCFullYear()-1980,p<<=4,p|=y.getUTCMonth()+1,p<<=5,p|=y.getUTCDate(),V&&(G=e(1,1)+e(a(H),4)+S,B+="up"+e(G.length,2)+G),N&&(w=e(1,1)+e(a(v),4)+K,B+="uc"+e(w.length,2)+w);var Q="";return Q+=`
\0`,Q+=e(D,2),Q+=R.magic,Q+=e(Z,2),Q+=e(p,2),Q+=e(f.crc32,4),Q+=e(f.compressedSize,4),Q+=e(f.uncompressedSize,4),Q+=e(H.length,2),Q+=e(B.length,2),{fileRecord:d.LOCAL_FILE_HEADER+Q+H+B,dirRecord:d.CENTRAL_FILE_HEADER+e(T,2)+Q+e(v.length,2)+"\0\0\0\0"+e(F,4)+e(b,4)+H+B+v}}var s=g("../utils"),l=g("../stream/GenericWorker"),n=g("../utf8"),a=g("../crc32"),d=g("../signature");function o(c,r,h,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=h,this.encodeFileName=b,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(o,l),o.prototype.push=function(c){var r=c.meta.percent||0,h=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,l.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:h?(r+100*(h-b-1))/h:100}}))},o.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var r=this.streamFiles&&!c.file.dir;if(r){var h=A(c,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},o.prototype.closedSource=function(c){this.accumulate=!1;var r=this.streamFiles&&!c.file.dir,h=A(c,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),r)this.push({data:function(b){return d.DATA_DESCRIPTOR+e(b.crc32,4)+e(b.compressedSize,4)+e(b.uncompressedSize,4)}(c),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},o.prototype.flush=function(){for(var c=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var h=this.bytesWritten-c,b=function(u,m,Z,p,Y){var R=s.transformTo("string",Y(p));return d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+e(u,2)+e(u,2)+e(m,4)+e(Z,4)+e(R.length,2)+R}(this.dirRecords.length,h,c,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},o.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},o.prototype.registerPrevious=function(c){this._sources.push(c);var r=this;return c.on("data",function(h){r.processChunk(h)}),c.on("end",function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()}),c.on("error",function(h){r.error(h)}),this},o.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},o.prototype.error=function(c){var r=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var h=0;h<r.length;h++)try{r[h].error(c)}catch{}return!0},o.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,r=0;r<c.length;r++)c[r].lock()},C.exports=o},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(g,C,i){var e=g("../compressions"),A=g("./ZipFileWorker");i.generateWorker=function(s,l,n){var a=new A(l.streamFiles,n,l.platform,l.encodeFileName),d=0;try{s.forEach(function(o,c){d++;var r=function(m,Z){var p=m||Z,Y=e[p];if(!Y)throw new Error(p+" is not a valid compression method !");return Y}(c.options.compression,l.compression),h=c.options.compressionOptions||l.compressionOptions||{},b=c.dir,u=c.date;c._compressWorker(r,h).withStreamInfo("file",{name:o,dir:b,date:u,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(a)}),a.entriesCount=d}catch(o){a.error(o)}return a}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(g,C,i){function e(){if(!(this instanceof e))return new e;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 A=new e;for(var s in this)typeof this[s]!="function"&&(A[s]=this[s]);return A}}(e.prototype=g("./object")).loadAsync=g("./load"),e.support=g("./support"),e.defaults=g("./defaults"),e.version="3.10.1",e.loadAsync=function(A,s){return new e().loadAsync(A,s)},e.external=g("./external"),C.exports=e},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(g,C,i){var e=g("./utils"),A=g("./external"),s=g("./utf8"),l=g("./zipEntries"),n=g("./stream/Crc32Probe"),a=g("./nodejsUtils");function d(o){return new A.Promise(function(c,r){var h=o.decompressed.getContentWorker().pipe(new n);h.on("error",function(b){r(b)}).on("end",function(){h.streamInfo.crc32!==o.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}C.exports=function(o,c){var r=this;return c=e.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),a.isNode&&a.isStream(o)?A.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):e.prepareContent("the loaded zip file",o,!0,c.optimizedBinaryString,c.base64).then(function(h){var b=new l(c);return b.load(h),b}).then(function(h){var b=[A.Promise.resolve(h)],u=h.files;if(c.checkCRC32)for(var m=0;m<u.length;m++)b.push(d(u[m]));return A.Promise.all(b)}).then(function(h){for(var b=h.shift(),u=b.files,m=0;m<u.length;m++){var Z=u[m],p=Z.fileNameStr,Y=e.resolve(Z.fileNameStr);r.file(Y,Z.decompressed,{binary:!0,optimizedBinaryString:!0,date:Z.date,dir:Z.dir,comment:Z.fileCommentStr.length?Z.fileCommentStr:null,unixPermissions:Z.unixPermissions,dosPermissions:Z.dosPermissions,createFolders:c.createFolders}),Z.dir||(r.file(Y).unsafeOriginalName=p)}return b.zipComment.length&&(r.comment=b.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(g,C,i){var e=g("../utils"),A=g("../stream/GenericWorker");function s(l,n){A.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(n)}e.inherits(s,A),s.prototype._bindStream=function(l){var n=this;(this._stream=l).pause(),l.on("data",function(a){n.push({data:a,meta:{percent:0}})}).on("error",function(a){n.isPaused?this.generatedError=a:n.error(a)}).on("end",function(){n.isPaused?n._upstreamEnded=!0:n.end()})},s.prototype.pause=function(){return!!A.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!A.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},C.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(g,C,i){var e=g("readable-stream").Readable;function A(s,l,n){e.call(this,l),this._helper=s;var a=this;s.on("data",function(d,o){a.push(d)||a._helper.pause(),n&&n(o)}).on("error",function(d){a.emit("error",d)}).on("end",function(){a.push(null)})}g("../utils").inherits(A,e),A.prototype._read=function(){this._helper.resume()},C.exports=A},{"../utils":32,"readable-stream":16}],14:[function(g,C,i){C.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,A){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,A);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,A)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var A=new Buffer(e);return A.fill(0),A},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}},{}],15:[function(g,C,i){function e(Y,R,X){var H,S=s.getTypeOf(R),z=s.extend(X||{},a);z.date=z.date||new Date,z.compression!==null&&(z.compression=z.compression.toUpperCase()),typeof z.unixPermissions=="string"&&(z.unixPermissions=parseInt(z.unixPermissions,8)),z.unixPermissions&&16384&z.unixPermissions&&(z.dir=!0),z.dosPermissions&&16&z.dosPermissions&&(z.dir=!0),z.dir&&(Y=u(Y)),z.createFolders&&(H=b(Y))&&m.call(this,H,!0);var v=S==="string"&&z.binary===!1&&z.base64===!1;X&&X.binary!==void 0||(z.binary=!v),(R instanceof d&&R.uncompressedSize===0||z.dir||!R||R.length===0)&&(z.base64=!1,z.binary=!0,R="",z.compression="STORE",S="string");var K=null;K=R instanceof d||R instanceof l?R:r.isNode&&r.isStream(R)?new h(Y,R):s.prepareContent(Y,R,z.binary,z.optimizedBinaryString,z.base64);var V=new o(Y,K,z);this.files[Y]=V}var A=g("./utf8"),s=g("./utils"),l=g("./stream/GenericWorker"),n=g("./stream/StreamHelper"),a=g("./defaults"),d=g("./compressedObject"),o=g("./zipObject"),c=g("./generate"),r=g("./nodejsUtils"),h=g("./nodejs/NodejsStreamInputAdapter"),b=function(Y){Y.slice(-1)==="/"&&(Y=Y.substring(0,Y.length-1));var R=Y.lastIndexOf("/");return 0<R?Y.substring(0,R):""},u=function(Y){return Y.slice(-1)!=="/"&&(Y+="/"),Y},m=function(Y,R){return R=R!==void 0?R:a.createFolders,Y=u(Y),this.files[Y]||e.call(this,Y,null,{dir:!0,createFolders:R}),this.files[Y]};function Z(Y){return Object.prototype.toString.call(Y)==="[object RegExp]"}var p={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(Y){var R,X,H;for(R in this.files)H=this.files[R],(X=R.slice(this.root.length,R.length))&&R.slice(0,this.root.length)===this.root&&Y(X,H)},filter:function(Y){var R=[];return this.forEach(function(X,H){Y(X,H)&&R.push(H)}),R},file:function(Y,R,X){if(arguments.length!==1)return Y=this.root+Y,e.call(this,Y,R,X),this;if(Z(Y)){var H=Y;return this.filter(function(z,v){return!v.dir&&H.test(z)})}var S=this.files[this.root+Y];return S&&!S.dir?S:null},folder:function(Y){if(!Y)return this;if(Z(Y))return this.filter(function(S,z){return z.dir&&Y.test(S)});var R=this.root+Y,X=m.call(this,R),H=this.clone();return H.root=X.name,H},remove:function(Y){Y=this.root+Y;var R=this.files[Y];if(R||(Y.slice(-1)!=="/"&&(Y+="/"),R=this.files[Y]),R&&!R.dir)delete this.files[Y];else for(var X=this.filter(function(S,z){return z.name.slice(0,Y.length)===Y}),H=0;H<X.length;H++)delete this.files[X[H].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(Y){var R,X={};try{if((X=s.extend(Y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:A.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");s.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var H=X.comment||this.comment||"";R=c.generateWorker(this,X,H)}catch(S){(R=new l("error")).error(S)}return new n(R,X.type||"string",X.mimeType)},generateAsync:function(Y,R){return this.generateInternalStream(Y).accumulate(R)},generateNodeStream:function(Y,R){return(Y=Y||{}).type||(Y.type="nodebuffer"),this.generateInternalStream(Y).toNodejsStream(R)}};C.exports=p},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(g,C,i){C.exports=g("stream")},{stream:void 0}],17:[function(g,C,i){var e=g("./DataReader");function A(s){e.call(this,s);for(var l=0;l<this.data.length;l++)s[l]=255&s[l]}g("../utils").inherits(A,e),A.prototype.byteAt=function(s){return this.data[this.zero+s]},A.prototype.lastIndexOfSignature=function(s){for(var l=s.charCodeAt(0),n=s.charCodeAt(1),a=s.charCodeAt(2),d=s.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===l&&this.data[o+1]===n&&this.data[o+2]===a&&this.data[o+3]===d)return o-this.zero;return-1},A.prototype.readAndCheckSignature=function(s){var l=s.charCodeAt(0),n=s.charCodeAt(1),a=s.charCodeAt(2),d=s.charCodeAt(3),o=this.readData(4);return l===o[0]&&n===o[1]&&a===o[2]&&d===o[3]},A.prototype.readData=function(s){if(this.checkOffset(s),s===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},C.exports=A},{"../utils":32,"./DataReader":18}],18:[function(g,C,i){var e=g("../utils");function A(s){this.data=s,this.length=s.length,this.index=0,this.zero=0}A.prototype={checkOffset:function(s){this.checkIndex(this.index+s)},checkIndex:function(s){if(this.length<this.zero+s||s<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s+"). Corrupted zip ?")},setIndex:function(s){this.checkIndex(s),this.index=s},skip:function(s){this.setIndex(this.index+s)},byteAt:function(){},readInt:function(s){var l,n=0;for(this.checkOffset(s),l=this.index+s-1;l>=this.index;l--)n=(n<<8)+this.byteAt(l);return this.index+=s,n},readString:function(s){return e.transformTo("string",this.readData(s))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s=this.readInt(4);return new Date(Date.UTC(1980+(s>>25&127),(s>>21&15)-1,s>>16&31,s>>11&31,s>>5&63,(31&s)<<1))}},C.exports=A},{"../utils":32}],19:[function(g,C,i){var e=g("./Uint8ArrayReader");function A(s){e.call(this,s)}g("../utils").inherits(A,e),A.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},C.exports=A},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(g,C,i){var e=g("./DataReader");function A(s){e.call(this,s)}g("../utils").inherits(A,e),A.prototype.byteAt=function(s){return this.data.charCodeAt(this.zero+s)},A.prototype.lastIndexOfSignature=function(s){return this.data.lastIndexOf(s)-this.zero},A.prototype.readAndCheckSignature=function(s){return s===this.readData(4)},A.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},C.exports=A},{"../utils":32,"./DataReader":18}],21:[function(g,C,i){var e=g("./ArrayReader");function A(s){e.call(this,s)}g("../utils").inherits(A,e),A.prototype.readData=function(s){if(this.checkOffset(s),s===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},C.exports=A},{"../utils":32,"./ArrayReader":17}],22:[function(g,C,i){var e=g("../utils"),A=g("../support"),s=g("./ArrayReader"),l=g("./StringReader"),n=g("./NodeBufferReader"),a=g("./Uint8ArrayReader");C.exports=function(d){var o=e.getTypeOf(d);return e.checkSupport(o),o!=="string"||A.uint8array?o==="nodebuffer"?new n(d):A.uint8array?new a(e.transformTo("uint8array",d)):new s(e.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(g,C,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(g,C,i){var e=g("./GenericWorker"),A=g("../utils");function s(l){e.call(this,"ConvertWorker to "+l),this.destType=l}A.inherits(s,e),s.prototype.processChunk=function(l){this.push({data:A.transformTo(this.destType,l.data),meta:l.meta})},C.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(g,C,i){var e=g("./GenericWorker"),A=g("../crc32");function s(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}g("../utils").inherits(s,e),s.prototype.processChunk=function(l){this.streamInfo.crc32=A(l.data,this.streamInfo.crc32||0),this.push(l)},C.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(g,C,i){var e=g("../utils"),A=g("./GenericWorker");function s(l){A.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}e.inherits(s,A),s.prototype.processChunk=function(l){if(l){var n=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=n+l.data.length}A.prototype.processChunk.call(this,l)},C.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(g,C,i){var e=g("../utils"),A=g("./GenericWorker");function s(l){A.call(this,"DataWorker");var n=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(a){n.dataIsReady=!0,n.data=a,n.max=a&&a.length||0,n.type=e.getTypeOf(a),n.isPaused||n._tickAndRepeat()},function(a){n.error(a)})}e.inherits(s,A),s.prototype.cleanUp=function(){A.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!A.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,n=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,n);break;case"uint8array":l=this.data.subarray(this.index,n);break;case"array":case"nodebuffer":l=this.data.slice(this.index,n)}return this.index=n,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},C.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(g,C,i){function e(A){this.name=A||"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}e.prototype={push:function(A){this.emit("data",A)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(A){this.emit("error",A)}return!0},error:function(A){return!this.isFinished&&(this.isPaused?this.generatedError=A:(this.isFinished=!0,this.emit("error",A),this.previous&&this.previous.error(A),this.cleanUp()),!0)},on:function(A,s){return this._listeners[A].push(s),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(A,s){if(this._listeners[A])for(var l=0;l<this._listeners[A].length;l++)this._listeners[A][l].call(this,s)},pipe:function(A){return A.registerPrevious(this)},registerPrevious:function(A){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=A.streamInfo,this.mergeStreamInfo(),this.previous=A;var s=this;return A.on("data",function(l){s.processChunk(l)}),A.on("end",function(){s.end()}),A.on("error",function(l){s.error(l)}),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 A=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),A=!0),this.previous&&this.previous.resume(),!A},flush:function(){},processChunk:function(A){this.push(A)},withStreamInfo:function(A,s){return this.extraStreamInfo[A]=s,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var A in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,A)&&(this.streamInfo[A]=this.extraStreamInfo[A])},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 A="Worker "+this.name;return this.previous?this.previous+" -> "+A:A}},C.exports=e},{}],29:[function(g,C,i){var e=g("../utils"),A=g("./ConvertWorker"),s=g("./GenericWorker"),l=g("../base64"),n=g("../support"),a=g("../external"),d=null;if(n.nodestream)try{d=g("../nodejs/NodejsStreamOutputAdapter")}catch{}function o(r,h){return new a.Promise(function(b,u){var m=[],Z=r._internalType,p=r._outputType,Y=r._mimeType;r.on("data",function(R,X){m.push(R),h&&h(X)}).on("error",function(R){m=[],u(R)}).on("end",function(){try{var R=function(X,H,S){switch(X){case"blob":return e.newBlob(e.transformTo("arraybuffer",H),S);case"base64":return l.encode(H);default:return e.transformTo(X,H)}}(p,function(X,H){var S,z=0,v=null,K=0;for(S=0;S<H.length;S++)K+=H[S].length;switch(X){case"string":return H.join("");case"array":return Array.prototype.concat.apply([],H);case"uint8array":for(v=new Uint8Array(K),S=0;S<H.length;S++)v.set(H[S],z),z+=H[S].length;return v;case"nodebuffer":return Buffer.concat(H);default:throw new Error("concat : unsupported type '"+X+"'")}}(Z,m),Y);b(R)}catch(X){u(X)}m=[]}).resume()})}function c(r,h,b){var u=h;switch(h){case"blob":case"arraybuffer":u="uint8array";break;case"base64":u="string"}try{this._internalType=u,this._outputType=h,this._mimeType=b,e.checkSupport(u),this._worker=r.pipe(new A(u)),r.lock()}catch(m){this._worker=new s("error"),this._worker.error(m)}}c.prototype={accumulate:function(r){return o(this,r)},on:function(r,h){var b=this;return r==="data"?this._worker.on(r,function(u){h.call(b,u.data,u.meta)}):this._worker.on(r,function(){e.delay(h,arguments,b)}),this},resume:function(){return e.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(r){if(e.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},r)}},C.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(g,C,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var e=new ArrayBuffer(0);try{i.blob=new Blob([e],{type:"application/zip"}).size===0}catch{try{var A=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);A.append(e),i.blob=A.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!g("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(g,C,i){for(var e=g("./utils"),A=g("./support"),s=g("./nodejsUtils"),l=g("./stream/GenericWorker"),n=new Array(256),a=0;a<256;a++)n[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;n[254]=n[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function o(){l.call(this,"utf-8 encode")}i.utf8encode=function(c){return A.nodebuffer?s.newBufferFrom(c,"utf-8"):function(r){var h,b,u,m,Z,p=r.length,Y=0;for(m=0;m<p;m++)(64512&(b=r.charCodeAt(m)))==55296&&m+1<p&&(64512&(u=r.charCodeAt(m+1)))==56320&&(b=65536+(b-55296<<10)+(u-56320),m++),Y+=b<128?1:b<2048?2:b<65536?3:4;for(h=A.uint8array?new Uint8Array(Y):new Array(Y),m=Z=0;Z<Y;m++)(64512&(b=r.charCodeAt(m)))==55296&&m+1<p&&(64512&(u=r.charCodeAt(m+1)))==56320&&(b=65536+(b-55296<<10)+(u-56320),m++),b<128?h[Z++]=b:(b<2048?h[Z++]=192|b>>>6:(b<65536?h[Z++]=224|b>>>12:(h[Z++]=240|b>>>18,h[Z++]=128|b>>>12&63),h[Z++]=128|b>>>6&63),h[Z++]=128|63&b);return h}(c)},i.utf8decode=function(c){return A.nodebuffer?e.transformTo("nodebuffer",c).toString("utf-8"):function(r){var h,b,u,m,Z=r.length,p=new Array(2*Z);for(h=b=0;h<Z;)if((u=r[h++])<128)p[b++]=u;else if(4<(m=n[u]))p[b++]=65533,h+=m-1;else{for(u&=m===2?31:m===3?15:7;1<m&&h<Z;)u=u<<6|63&r[h++],m--;1<m?p[b++]=65533:u<65536?p[b++]=u:(u-=65536,p[b++]=55296|u>>10&1023,p[b++]=56320|1023&u)}return p.length!==b&&(p.subarray?p=p.subarray(0,b):p.length=b),e.applyFromCharCode(p)}(c=e.transformTo(A.uint8array?"uint8array":"array",c))},e.inherits(d,l),d.prototype.processChunk=function(c){var r=e.transformTo(A.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(A.uint8array){var h=r;(r=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),r.set(h,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var b=function(m,Z){var p;for((Z=Z||m.length)>m.length&&(Z=m.length),p=Z-1;0<=p&&(192&m[p])==128;)p--;return p<0||p===0?Z:p+n[m[p]]>Z?p:Z}(r),u=r;b!==r.length&&(A.uint8array?(u=r.subarray(0,b),this.leftOver=r.subarray(b,r.length)):(u=r.slice(0,b),this.leftOver=r.slice(b,r.length))),this.push({data:i.utf8decode(u),meta:c.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=d,e.inherits(o,l),o.prototype.processChunk=function(c){this.push({data:i.utf8encode(c.data),meta:c.meta})},i.Utf8EncodeWorker=o},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(g,C,i){var e=g("./support"),A=g("./base64"),s=g("./nodejsUtils"),l=g("./external");function n(h){return h}function a(h,b){for(var u=0;u<h.length;++u)b[u]=255&h.charCodeAt(u);return b}g("setimmediate"),i.newBlob=function(h,b){i.checkSupport("blob");try{return new Blob([h],{type:b})}catch{try{var u=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return u.append(h),u.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(h,b,u){var m=[],Z=0,p=h.length;if(p<=u)return String.fromCharCode.apply(null,h);for(;Z<p;)b==="array"||b==="nodebuffer"?m.push(String.fromCharCode.apply(null,h.slice(Z,Math.min(Z+u,p)))):m.push(String.fromCharCode.apply(null,h.subarray(Z,Math.min(Z+u,p)))),Z+=u;return m.join("")},stringifyByChar:function(h){for(var b="",u=0;u<h.length;u++)b+=String.fromCharCode(h[u]);return b},applyCanBeUsed:{uint8array:function(){try{return e.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return e.nodebuffer&&String.fromCharCode.apply(null,s.allocBuffer(1)).length===1}catch{return!1}}()}};function o(h){var b=65536,u=i.getTypeOf(h),m=!0;if(u==="uint8array"?m=d.applyCanBeUsed.uint8array:u==="nodebuffer"&&(m=d.applyCanBeUsed.nodebuffer),m)for(;1<b;)try{return d.stringifyByChunk(h,u,b)}catch{b=Math.floor(b/2)}return d.stringifyByChar(h)}function c(h,b){for(var u=0;u<h.length;u++)b[u]=h[u];return b}i.applyFromCharCode=o;var r={};r.string={string:n,array:function(h){return a(h,new Array(h.length))},arraybuffer:function(h){return r.string.uint8array(h).buffer},uint8array:function(h){return a(h,new Uint8Array(h.length))},nodebuffer:function(h){return a(h,s.allocBuffer(h.length))}},r.array={string:o,array:n,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return s.newBufferFrom(h)}},r.arraybuffer={string:function(h){return o(new Uint8Array(h))},array:function(h){return c(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:n,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return s.newBufferFrom(new Uint8Array(h))}},r.uint8array={string:o,array:function(h){return c(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:n,nodebuffer:function(h){return s.newBufferFrom(h)}},r.nodebuffer={string:o,array:function(h){return c(h,new Array(h.length))},arraybuffer:function(h){return r.nodebuffer.uint8array(h).buffer},uint8array:function(h){return c(h,new Uint8Array(h.length))},nodebuffer:n},i.transformTo=function(h,b){if(b=b||"",!h)return b;i.checkSupport(h);var u=i.getTypeOf(b);return r[u][h](b)},i.resolve=function(h){for(var b=h.split("/"),u=[],m=0;m<b.length;m++){var Z=b[m];Z==="."||Z===""&&m!==0&&m!==b.length-1||(Z===".."?u.pop():u.push(Z))}return u.join("/")},i.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":e.nodebuffer&&s.isBuffer(h)?"nodebuffer":e.uint8array&&h instanceof Uint8Array?"uint8array":e.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(h){if(!e[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(h){var b,u,m="";for(u=0;u<(h||"").length;u++)m+="\\x"+((b=h.charCodeAt(u))<16?"0":"")+b.toString(16).toUpperCase();return m},i.delay=function(h,b,u){setImmediate(function(){h.apply(u||null,b||[])})},i.inherits=function(h,b){function u(){}u.prototype=b.prototype,h.prototype=new u},i.extend=function(){var h,b,u={};for(h=0;h<arguments.length;h++)for(b in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],b)&&u[b]===void 0&&(u[b]=arguments[h][b]);return u},i.prepareContent=function(h,b,u,m,Z){return l.Promise.resolve(b).then(function(p){return e.blob&&(p instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(p))!==-1)&&typeof FileReader<"u"?new l.Promise(function(Y,R){var X=new FileReader;X.onload=function(H){Y(H.target.result)},X.onerror=function(H){R(H.target.error)},X.readAsArrayBuffer(p)}):p}).then(function(p){var Y=i.getTypeOf(p);return Y?(Y==="arraybuffer"?p=i.transformTo("uint8array",p):Y==="string"&&(Z?p=A.decode(p):u&&m!==!0&&(p=function(R){return a(R,e.uint8array?new Uint8Array(R.length):new Array(R.length))}(p))),p):l.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(g,C,i){var e=g("./reader/readerFor"),A=g("./utils"),s=g("./signature"),l=g("./zipEntry"),n=g("./support");function a(d){this.files=[],this.loadOptions=d}a.prototype={checkSignature:function(d){if(!this.reader.readAndCheckSignature(d)){this.reader.index-=4;var o=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+A.pretty(o)+", expected "+A.pretty(d)+")")}},isSignature:function(d,o){var c=this.reader.index;this.reader.setIndex(d);var r=this.reader.readString(4)===o;return this.reader.setIndex(c),r},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 d=this.reader.readData(this.zipCommentLength),o=n.uint8array?"uint8array":"array",c=A.transformTo(o,d);this.zipComment=this.loadOptions.decodeFileName(c)},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 d,o,c,r=this.zip64EndOfCentralSize-44;0<r;)d=this.reader.readInt(2),o=this.reader.readInt(4),c=this.reader.readData(o),this.zip64ExtensibleData[d]={id:d,length:o,value:c}},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 d,o;for(d=0;d<this.files.length;d++)o=this.files[d],this.reader.setIndex(o.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),o.readLocalPart(this.reader),o.handleUTF8(),o.processAttributes()},readCentralDir:function(){var d;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(d=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(d);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 d=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(d<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(d);var o=d;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===A.MAX_VALUE_16BITS||this.diskWithCentralDirStart===A.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===A.MAX_VALUE_16BITS||this.centralDirRecords===A.MAX_VALUE_16BITS||this.centralDirSize===A.MAX_VALUE_32BITS||this.centralDirOffset===A.MAX_VALUE_32BITS){if(this.zip64=!0,(d=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(d),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var r=o-c;if(0<r)this.isSignature(o,s.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(d){this.reader=e(d)},load:function(d){this.prepareReader(d),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},C.exports=a},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(g,C,i){var e=g("./reader/readerFor"),A=g("./utils"),s=g("./compressedObject"),l=g("./crc32"),n=g("./utf8"),a=g("./compressions"),d=g("./support");function o(c,r){this.options=c,this.loadOptions=r}o.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var r,h;if(c.skip(22),this.fileNameLength=c.readInt(2),h=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(h),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((r=function(b){for(var u in a)if(Object.prototype.hasOwnProperty.call(a,u)&&a[u].magic===b)return a[u];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+A.pretty(this.compressionMethod)+" unknown (inner file : "+A.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,r,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var r=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(r),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=e(this.extraFields[1].value);this.uncompressedSize===A.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===A.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===A.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===A.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var r,h,b,u=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<u;)r=c.readInt(2),h=c.readInt(2),b=c.readData(h),this.extraFields[r]={id:r,length:h,value:b};c.setIndex(u)},handleUTF8:function(){var c=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=n.utf8decode(this.fileName),this.fileCommentStr=n.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(r!==null)this.fileNameStr=r;else{var h=A.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var u=A.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(u)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var r=e(c.value);return r.readInt(1)!==1||l(this.fileName)!==r.readInt(4)?null:n.utf8decode(r.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var r=e(c.value);return r.readInt(1)!==1||l(this.fileComment)!==r.readInt(4)?null:n.utf8decode(r.readData(c.length-5))}return null}},C.exports=o},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(g,C,i){function e(r,h,b){this.name=r,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=h,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var A=g("./stream/StreamHelper"),s=g("./stream/DataWorker"),l=g("./utf8"),n=g("./compressedObject"),a=g("./stream/GenericWorker");e.prototype={internalStream:function(r){var h=null,b="string";try{if(!r)throw new Error("No output type specified.");var u=(b=r.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),h=this._decompressWorker();var m=!this._dataBinary;m&&!u&&(h=h.pipe(new l.Utf8EncodeWorker)),!m&&u&&(h=h.pipe(new l.Utf8DecodeWorker))}catch(Z){(h=new a("error")).error(Z)}return new A(h,b,"")},async:function(r,h){return this.internalStream(r).accumulate(h)},nodeStream:function(r,h){return this.internalStream(r||"nodebuffer").toNodejsStream(h)},_compressWorker:function(r,h){if(this._data instanceof n&&this._data.compression.magic===r.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),n.createWorkerFrom(b,r,h)},_decompressWorker:function(){return this._data instanceof n?this._data.getContentWorker():this._data instanceof a?this._data:new s(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],o=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<d.length;c++)e.prototype[d[c]]=o;C.exports=e},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(g,C,i){(function(e){var A,s,l=e.MutationObserver||e.WebKitMutationObserver;if(l){var n=0,a=new l(r),d=e.document.createTextNode("");a.observe(d,{characterData:!0}),A=function(){d.data=n=++n%2}}else if(e.setImmediate||e.MessageChannel===void 0)A="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var h=e.document.createElement("script");h.onreadystatechange=function(){r(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},e.document.documentElement.appendChild(h)}:function(){setTimeout(r,0)};else{var o=new e.MessageChannel;o.port1.onmessage=r,A=function(){o.port2.postMessage(0)}}var c=[];function r(){var h,b;s=!0;for(var u=c.length;u;){for(b=c,c=[],h=-1;++h<u;)b[h]();u=c.length}s=!1}C.exports=function(h){c.push(h)!==1||s||A()}}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(g,C,i){var e=g("immediate");function A(){}var s={},l=["REJECTED"],n=["FULFILLED"],a=["PENDING"];function d(u){if(typeof u!="function")throw new TypeError("resolver must be a function");this.state=a,this.queue=[],this.outcome=void 0,u!==A&&h(this,u)}function o(u,m,Z){this.promise=u,typeof m=="function"&&(this.onFulfilled=m,this.callFulfilled=this.otherCallFulfilled),typeof Z=="function"&&(this.onRejected=Z,this.callRejected=this.otherCallRejected)}function c(u,m,Z){e(function(){var p;try{p=m(Z)}catch(Y){return s.reject(u,Y)}p===u?s.reject(u,new TypeError("Cannot resolve promise with itself")):s.resolve(u,p)})}function r(u){var m=u&&u.then;if(u&&(typeof u=="object"||typeof u=="function")&&typeof m=="function")return function(){m.apply(u,arguments)}}function h(u,m){var Z=!1;function p(X){Z||(Z=!0,s.reject(u,X))}function Y(X){Z||(Z=!0,s.resolve(u,X))}var R=b(function(){m(Y,p)});R.status==="error"&&p(R.value)}function b(u,m){var Z={};try{Z.value=u(m),Z.status="success"}catch(p){Z.status="error",Z.value=p}return Z}(C.exports=d).prototype.finally=function(u){if(typeof u!="function")return this;var m=this.constructor;return this.then(function(Z){return m.resolve(u()).then(function(){return Z})},function(Z){return m.resolve(u()).then(function(){throw Z})})},d.prototype.catch=function(u){return this.then(null,u)},d.prototype.then=function(u,m){if(typeof u!="function"&&this.state===n||typeof m!="function"&&this.state===l)return this;var Z=new this.constructor(A);return this.state!==a?c(Z,this.state===n?u:m,this.outcome):this.queue.push(new o(Z,u,m)),Z},o.prototype.callFulfilled=function(u){s.resolve(this.promise,u)},o.prototype.otherCallFulfilled=function(u){c(this.promise,this.onFulfilled,u)},o.prototype.callRejected=function(u){s.reject(this.promise,u)},o.prototype.otherCallRejected=function(u){c(this.promise,this.onRejected,u)},s.resolve=function(u,m){var Z=b(r,m);if(Z.status==="error")return s.reject(u,Z.value);var p=Z.value;if(p)h(u,p);else{u.state=n,u.outcome=m;for(var Y=-1,R=u.queue.length;++Y<R;)u.queue[Y].callFulfilled(m)}return u},s.reject=function(u,m){u.state=l,u.outcome=m;for(var Z=-1,p=u.queue.length;++Z<p;)u.queue[Z].callRejected(m);return u},d.resolve=function(u){return u instanceof this?u:s.resolve(new this(A),u)},d.reject=function(u){var m=new this(A);return s.reject(m,u)},d.all=function(u){var m=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Z=u.length,p=!1;if(!Z)return this.resolve([]);for(var Y=new Array(Z),R=0,X=-1,H=new this(A);++X<Z;)S(u[X],X);return H;function S(z,v){m.resolve(z).then(function(K){Y[v]=K,++R!==Z||p||(p=!0,s.resolve(H,Y))},function(K){p||(p=!0,s.reject(H,K))})}},d.race=function(u){var m=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Z=u.length,p=!1;if(!Z)return this.resolve([]);for(var Y=-1,R=new this(A);++Y<Z;)X=u[Y],m.resolve(X).then(function(H){p||(p=!0,s.resolve(R,H))},function(H){p||(p=!0,s.reject(R,H))});var X;return R}},{immediate:36}],38:[function(g,C,i){var e={};(0,g("./lib/utils/common").assign)(e,g("./lib/deflate"),g("./lib/inflate"),g("./lib/zlib/constants")),C.exports=e},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(g,C,i){var e=g("./zlib/deflate"),A=g("./utils/common"),s=g("./utils/strings"),l=g("./zlib/messages"),n=g("./zlib/zstream"),a=Object.prototype.toString,d=0,o=-1,c=0,r=8;function h(u){if(!(this instanceof h))return new h(u);this.options=A.assign({level:o,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},u||{});var m=this.options;m.raw&&0<m.windowBits?m.windowBits=-m.windowBits:m.gzip&&0<m.windowBits&&m.windowBits<16&&(m.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var Z=e.deflateInit2(this.strm,m.level,m.method,m.windowBits,m.memLevel,m.strategy);if(Z!==d)throw new Error(l[Z]);if(m.header&&e.deflateSetHeader(this.strm,m.header),m.dictionary){var p;if(p=typeof m.dictionary=="string"?s.string2buf(m.dictionary):a.call(m.dictionary)==="[object ArrayBuffer]"?new Uint8Array(m.dictionary):m.dictionary,(Z=e.deflateSetDictionary(this.strm,p))!==d)throw new Error(l[Z]);this._dict_set=!0}}function b(u,m){var Z=new h(m);if(Z.push(u,!0),Z.err)throw Z.msg||l[Z.err];return Z.result}h.prototype.push=function(u,m){var Z,p,Y=this.strm,R=this.options.chunkSize;if(this.ended)return!1;p=m===~~m?m:m===!0?4:0,typeof u=="string"?Y.input=s.string2buf(u):a.call(u)==="[object ArrayBuffer]"?Y.input=new Uint8Array(u):Y.input=u,Y.next_in=0,Y.avail_in=Y.input.length;do{if(Y.avail_out===0&&(Y.output=new A.Buf8(R),Y.next_out=0,Y.avail_out=R),(Z=e.deflate(Y,p))!==1&&Z!==d)return this.onEnd(Z),!(this.ended=!0);Y.avail_out!==0&&(Y.avail_in!==0||p!==4&&p!==2)||(this.options.to==="string"?this.onData(s.buf2binstring(A.shrinkBuf(Y.output,Y.next_out))):this.onData(A.shrinkBuf(Y.output,Y.next_out)))}while((0<Y.avail_in||Y.avail_out===0)&&Z!==1);return p===4?(Z=e.deflateEnd(this.strm),this.onEnd(Z),this.ended=!0,Z===d):p!==2||(this.onEnd(d),!(Y.avail_out=0))},h.prototype.onData=function(u){this.chunks.push(u)},h.prototype.onEnd=function(u){u===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=A.flattenChunks(this.chunks)),this.chunks=[],this.err=u,this.msg=this.strm.msg},i.Deflate=h,i.deflate=b,i.deflateRaw=function(u,m){return(m=m||{}).raw=!0,b(u,m)},i.gzip=function(u,m){return(m=m||{}).gzip=!0,b(u,m)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(g,C,i){var e=g("./zlib/inflate"),A=g("./utils/common"),s=g("./utils/strings"),l=g("./zlib/constants"),n=g("./zlib/messages"),a=g("./zlib/zstream"),d=g("./zlib/gzheader"),o=Object.prototype.toString;function c(h){if(!(this instanceof c))return new c(h);this.options=A.assign({chunkSize:16384,windowBits:0,to:""},h||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||h&&h.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var u=e.inflateInit2(this.strm,b.windowBits);if(u!==l.Z_OK)throw new Error(n[u]);this.header=new d,e.inflateGetHeader(this.strm,this.header)}function r(h,b){var u=new c(b);if(u.push(h,!0),u.err)throw u.msg||n[u.err];return u.result}c.prototype.push=function(h,b){var u,m,Z,p,Y,R,X=this.strm,H=this.options.chunkSize,S=this.options.dictionary,z=!1;if(this.ended)return!1;m=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof h=="string"?X.input=s.binstring2buf(h):o.call(h)==="[object ArrayBuffer]"?X.input=new Uint8Array(h):X.input=h,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new A.Buf8(H),X.next_out=0,X.avail_out=H),(u=e.inflate(X,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&S&&(R=typeof S=="string"?s.string2buf(S):o.call(S)==="[object ArrayBuffer]"?new Uint8Array(S):S,u=e.inflateSetDictionary(this.strm,R)),u===l.Z_BUF_ERROR&&z===!0&&(u=l.Z_OK,z=!1),u!==l.Z_STREAM_END&&u!==l.Z_OK)return this.onEnd(u),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&u!==l.Z_STREAM_END&&(X.avail_in!==0||m!==l.Z_FINISH&&m!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(Z=s.utf8border(X.output,X.next_out),p=X.next_out-Z,Y=s.buf2string(X.output,Z),X.next_out=p,X.avail_out=H-p,p&&A.arraySet(X.output,X.output,Z,p,0),this.onData(Y)):this.onData(A.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(z=!0)}while((0<X.avail_in||X.avail_out===0)&&u!==l.Z_STREAM_END);return u===l.Z_STREAM_END&&(m=l.Z_FINISH),m===l.Z_FINISH?(u=e.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===l.Z_OK):m!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(X.avail_out=0))},c.prototype.onData=function(h){this.chunks.push(h)},c.prototype.onEnd=function(h){h===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=A.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},i.Inflate=c,i.inflate=r,i.inflateRaw=function(h,b){return(b=b||{}).raw=!0,r(h,b)},i.ungzip=r},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(g,C,i){var e=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var n=Array.prototype.slice.call(arguments,1);n.length;){var a=n.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var d in a)a.hasOwnProperty(d)&&(l[d]=a[d])}}return l},i.shrinkBuf=function(l,n){return l.length===n?l:l.subarray?l.subarray(0,n):(l.length=n,l)};var A={arraySet:function(l,n,a,d,o){if(n.subarray&&l.subarray)l.set(n.subarray(a,a+d),o);else for(var c=0;c<d;c++)l[o+c]=n[a+c]},flattenChunks:function(l){var n,a,d,o,c,r;for(n=d=0,a=l.length;n<a;n++)d+=l[n].length;for(r=new Uint8Array(d),n=o=0,a=l.length;n<a;n++)c=l[n],r.set(c,o),o+=c.length;return r}},s={arraySet:function(l,n,a,d,o){for(var c=0;c<d;c++)l[o+c]=n[a+c]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,A)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(e)},{}],42:[function(g,C,i){var e=g("./common"),A=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch{A=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s=!1}for(var l=new e.Buf8(256),n=0;n<256;n++)l[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function a(d,o){if(o<65537&&(d.subarray&&s||!d.subarray&&A))return String.fromCharCode.apply(null,e.shrinkBuf(d,o));for(var c="",r=0;r<o;r++)c+=String.fromCharCode(d[r]);return c}l[254]=l[254]=1,i.string2buf=function(d){var o,c,r,h,b,u=d.length,m=0;for(h=0;h<u;h++)(64512&(c=d.charCodeAt(h)))==55296&&h+1<u&&(64512&(r=d.charCodeAt(h+1)))==56320&&(c=65536+(c-55296<<10)+(r-56320),h++),m+=c<128?1:c<2048?2:c<65536?3:4;for(o=new e.Buf8(m),h=b=0;b<m;h++)(64512&(c=d.charCodeAt(h)))==55296&&h+1<u&&(64512&(r=d.charCodeAt(h+1)))==56320&&(c=65536+(c-55296<<10)+(r-56320),h++),c<128?o[b++]=c:(c<2048?o[b++]=192|c>>>6:(c<65536?o[b++]=224|c>>>12:(o[b++]=240|c>>>18,o[b++]=128|c>>>12&63),o[b++]=128|c>>>6&63),o[b++]=128|63&c);return o},i.buf2binstring=function(d){return a(d,d.length)},i.binstring2buf=function(d){for(var o=new e.Buf8(d.length),c=0,r=o.length;c<r;c++)o[c]=d.charCodeAt(c);return o},i.buf2string=function(d,o){var c,r,h,b,u=o||d.length,m=new Array(2*u);for(c=r=0;c<u;)if((h=d[c++])<128)m[r++]=h;else if(4<(b=l[h]))m[r++]=65533,c+=b-1;else{for(h&=b===2?31:b===3?15:7;1<b&&c<u;)h=h<<6|63&d[c++],b--;1<b?m[r++]=65533:h<65536?m[r++]=h:(h-=65536,m[r++]=55296|h>>10&1023,m[r++]=56320|1023&h)}return a(m,r)},i.utf8border=function(d,o){var c;for((o=o||d.length)>d.length&&(o=d.length),c=o-1;0<=c&&(192&d[c])==128;)c--;return c<0||c===0?o:c+l[d[c]]>o?c:o}},{"./common":41}],43:[function(g,C,i){C.exports=function(e,A,s,l){for(var n=65535&e|0,a=e>>>16&65535|0,d=0;s!==0;){for(s-=d=2e3<s?2e3:s;a=a+(n=n+A[l++]|0)|0,--d;);n%=65521,a%=65521}return n|a<<16|0}},{}],44:[function(g,C,i){C.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(g,C,i){var e=function(){for(var A,s=[],l=0;l<256;l++){A=l;for(var n=0;n<8;n++)A=1&A?3988292384^A>>>1:A>>>1;s[l]=A}return s}();C.exports=function(A,s,l,n){var a=e,d=n+l;A^=-1;for(var o=n;o<d;o++)A=A>>>8^a[255&(A^s[o])];return-1^A}},{}],46:[function(g,C,i){var e,A=g("../utils/common"),s=g("./trees"),l=g("./adler32"),n=g("./crc32"),a=g("./messages"),d=0,o=4,c=0,r=-2,h=-1,b=4,u=2,m=8,Z=9,p=286,Y=30,R=19,X=2*p+1,H=15,S=3,z=258,v=z+S+1,K=42,V=113,N=1,B=2,G=3,w=4;function W(x,sg){return x.msg=a[sg],sg}function y(x){return(x<<1)-(4<x?9:0)}function f(x){for(var sg=x.length;0<=--sg;)x[sg]=0}function D(x){var sg=x.state,Ag=sg.pending;Ag>x.avail_out&&(Ag=x.avail_out),Ag!==0&&(A.arraySet(x.output,sg.pending_buf,sg.pending_out,Ag,x.next_out),x.next_out+=Ag,sg.pending_out+=Ag,x.total_out+=Ag,x.avail_out-=Ag,sg.pending-=Ag,sg.pending===0&&(sg.pending_out=0))}function F(x,sg){s._tr_flush_block(x,0<=x.block_start?x.block_start:-1,x.strstart-x.block_start,sg),x.block_start=x.strstart,D(x.strm)}function T(x,sg){x.pending_buf[x.pending++]=sg}function Q(x,sg){x.pending_buf[x.pending++]=sg>>>8&255,x.pending_buf[x.pending++]=255&sg}function P(x,sg){var Ag,O,_=x.max_chain_length,Ig=x.strstart,ng=x.prev_length,ag=x.nice_match,lg=x.strstart>x.w_size-v?x.strstart-(x.w_size-v):0,cg=x.window,dg=x.w_mask,hg=x.prev,rg=x.strstart+z,Wg=cg[Ig+ng-1],Gg=cg[Ig+ng];x.prev_length>=x.good_match&&(_>>=2),ag>x.lookahead&&(ag=x.lookahead);do if(cg[(Ag=sg)+ng]===Gg&&cg[Ag+ng-1]===Wg&&cg[Ag]===cg[Ig]&&cg[++Ag]===cg[Ig+1]){Ig+=2,Ag++;do;while(cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&cg[++Ig]===cg[++Ag]&&Ig<rg);if(O=z-(rg-Ig),Ig=rg-z,ng<O){if(x.match_start=sg,ag<=(ng=O))break;Wg=cg[Ig+ng-1],Gg=cg[Ig+ng]}}while((sg=hg[sg&dg])>lg&&--_!=0);return ng<=x.lookahead?ng:x.lookahead}function L(x){var sg,Ag,O,_,Ig,ng,ag,lg,cg,dg,hg=x.w_size;do{if(_=x.window_size-x.lookahead-x.strstart,x.strstart>=hg+(hg-v)){for(A.arraySet(x.window,x.window,hg,hg,0),x.match_start-=hg,x.strstart-=hg,x.block_start-=hg,sg=Ag=x.hash_size;O=x.head[--sg],x.head[sg]=hg<=O?O-hg:0,--Ag;);for(sg=Ag=hg;O=x.prev[--sg],x.prev[sg]=hg<=O?O-hg:0,--Ag;);_+=hg}if(x.strm.avail_in===0)break;if(ng=x.strm,ag=x.window,lg=x.strstart+x.lookahead,cg=_,dg=void 0,dg=ng.avail_in,cg<dg&&(dg=cg),Ag=dg===0?0:(ng.avail_in-=dg,A.arraySet(ag,ng.input,ng.next_in,dg,lg),ng.state.wrap===1?ng.adler=l(ng.adler,ag,dg,lg):ng.state.wrap===2&&(ng.adler=n(ng.adler,ag,dg,lg)),ng.next_in+=dg,ng.total_in+=dg,dg),x.lookahead+=Ag,x.lookahead+x.insert>=S)for(Ig=x.strstart-x.insert,x.ins_h=x.window[Ig],x.ins_h=(x.ins_h<<x.hash_shift^x.window[Ig+1])&x.hash_mask;x.insert&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[Ig+S-1])&x.hash_mask,x.prev[Ig&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=Ig,Ig++,x.insert--,!(x.lookahead+x.insert<S)););}while(x.lookahead<v&&x.strm.avail_in!==0)}function E(x,sg){for(var Ag,O;;){if(x.lookahead<v){if(L(x),x.lookahead<v&&sg===d)return N;if(x.lookahead===0)break}if(Ag=0,x.lookahead>=S&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+S-1])&x.hash_mask,Ag=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),Ag!==0&&x.strstart-Ag<=x.w_size-v&&(x.match_length=P(x,Ag)),x.match_length>=S)if(O=s._tr_tally(x,x.strstart-x.match_start,x.match_length-S),x.lookahead-=x.match_length,x.match_length<=x.max_lazy_match&&x.lookahead>=S){for(x.match_length--;x.strstart++,x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+S-1])&x.hash_mask,Ag=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart,--x.match_length!=0;);x.strstart++}else x.strstart+=x.match_length,x.match_length=0,x.ins_h=x.window[x.strstart],x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+1])&x.hash_mask;else O=s._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++;if(O&&(F(x,!1),x.strm.avail_out===0))return N}return x.insert=x.strstart<S-1?x.strstart:S-1,sg===o?(F(x,!0),x.strm.avail_out===0?G:w):x.last_lit&&(F(x,!1),x.strm.avail_out===0)?N:B}function J(x,sg){for(var Ag,O,_;;){if(x.lookahead<v){if(L(x),x.lookahead<v&&sg===d)return N;if(x.lookahead===0)break}if(Ag=0,x.lookahead>=S&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+S-1])&x.hash_mask,Ag=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),x.prev_length=x.match_length,x.prev_match=x.match_start,x.match_length=S-1,Ag!==0&&x.prev_length<x.max_lazy_match&&x.strstart-Ag<=x.w_size-v&&(x.match_length=P(x,Ag),x.match_length<=5&&(x.strategy===1||x.match_length===S&&4096<x.strstart-x.match_start)&&(x.match_length=S-1)),x.prev_length>=S&&x.match_length<=x.prev_length){for(_=x.strstart+x.lookahead-S,O=s._tr_tally(x,x.strstart-1-x.prev_match,x.prev_length-S),x.lookahead-=x.prev_length-1,x.prev_length-=2;++x.strstart<=_&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+S-1])&x.hash_mask,Ag=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),--x.prev_length!=0;);if(x.match_available=0,x.match_length=S-1,x.strstart++,O&&(F(x,!1),x.strm.avail_out===0))return N}else if(x.match_available){if((O=s._tr_tally(x,0,x.window[x.strstart-1]))&&F(x,!1),x.strstart++,x.lookahead--,x.strm.avail_out===0)return N}else x.match_available=1,x.strstart++,x.lookahead--}return x.match_available&&(O=s._tr_tally(x,0,x.window[x.strstart-1]),x.match_available=0),x.insert=x.strstart<S-1?x.strstart:S-1,sg===o?(F(x,!0),x.strm.avail_out===0?G:w):x.last_lit&&(F(x,!1),x.strm.avail_out===0)?N:B}function k(x,sg,Ag,O,_){this.good_length=x,this.max_lazy=sg,this.nice_length=Ag,this.max_chain=O,this.func=_}function j(){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=m,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 A.Buf16(2*X),this.dyn_dtree=new A.Buf16(2*(2*Y+1)),this.bl_tree=new A.Buf16(2*(2*R+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new A.Buf16(H+1),this.heap=new A.Buf16(2*p+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new A.Buf16(2*p+1),f(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 q(x){var sg;return x&&x.state?(x.total_in=x.total_out=0,x.data_type=u,(sg=x.state).pending=0,sg.pending_out=0,sg.wrap<0&&(sg.wrap=-sg.wrap),sg.status=sg.wrap?K:V,x.adler=sg.wrap===2?0:1,sg.last_flush=d,s._tr_init(sg),c):W(x,r)}function tg(x){var sg=q(x);return sg===c&&function(Ag){Ag.window_size=2*Ag.w_size,f(Ag.head),Ag.max_lazy_match=e[Ag.level].max_lazy,Ag.good_match=e[Ag.level].good_length,Ag.nice_match=e[Ag.level].nice_length,Ag.max_chain_length=e[Ag.level].max_chain,Ag.strstart=0,Ag.block_start=0,Ag.lookahead=0,Ag.insert=0,Ag.match_length=Ag.prev_length=S-1,Ag.match_available=0,Ag.ins_h=0}(x.state),sg}function Cg(x,sg,Ag,O,_,Ig){if(!x)return r;var ng=1;if(sg===h&&(sg=6),O<0?(ng=0,O=-O):15<O&&(ng=2,O-=16),_<1||Z<_||Ag!==m||O<8||15<O||sg<0||9<sg||Ig<0||b<Ig)return W(x,r);O===8&&(O=9);var ag=new j;return(x.state=ag).strm=x,ag.wrap=ng,ag.gzhead=null,ag.w_bits=O,ag.w_size=1<<ag.w_bits,ag.w_mask=ag.w_size-1,ag.hash_bits=_+7,ag.hash_size=1<<ag.hash_bits,ag.hash_mask=ag.hash_size-1,ag.hash_shift=~~((ag.hash_bits+S-1)/S),ag.window=new A.Buf8(2*ag.w_size),ag.head=new A.Buf16(ag.hash_size),ag.prev=new A.Buf16(ag.w_size),ag.lit_bufsize=1<<_+6,ag.pending_buf_size=4*ag.lit_bufsize,ag.pending_buf=new A.Buf8(ag.pending_buf_size),ag.d_buf=1*ag.lit_bufsize,ag.l_buf=3*ag.lit_bufsize,ag.level=sg,ag.strategy=Ig,ag.method=Ag,tg(x)}e=[new k(0,0,0,0,function(x,sg){var Ag=65535;for(Ag>x.pending_buf_size-5&&(Ag=x.pending_buf_size-5);;){if(x.lookahead<=1){if(L(x),x.lookahead===0&&sg===d)return N;if(x.lookahead===0)break}x.strstart+=x.lookahead,x.lookahead=0;var O=x.block_start+Ag;if((x.strstart===0||x.strstart>=O)&&(x.lookahead=x.strstart-O,x.strstart=O,F(x,!1),x.strm.avail_out===0)||x.strstart-x.block_start>=x.w_size-v&&(F(x,!1),x.strm.avail_out===0))return N}return x.insert=0,sg===o?(F(x,!0),x.strm.avail_out===0?G:w):(x.strstart>x.block_start&&(F(x,!1),x.strm.avail_out),N)}),new k(4,4,8,4,E),new k(4,5,16,8,E),new k(4,6,32,32,E),new k(4,4,16,16,J),new k(8,16,32,32,J),new k(8,16,128,128,J),new k(8,32,128,256,J),new k(32,128,258,1024,J),new k(32,258,258,4096,J)],i.deflateInit=function(x,sg){return Cg(x,sg,m,15,8,0)},i.deflateInit2=Cg,i.deflateReset=tg,i.deflateResetKeep=q,i.deflateSetHeader=function(x,sg){return x&&x.state?x.state.wrap!==2?r:(x.state.gzhead=sg,c):r},i.deflate=function(x,sg){var Ag,O,_,Ig;if(!x||!x.state||5<sg||sg<0)return x?W(x,r):r;if(O=x.state,!x.output||!x.input&&x.avail_in!==0||O.status===666&&sg!==o)return W(x,x.avail_out===0?-5:r);if(O.strm=x,Ag=O.last_flush,O.last_flush=sg,O.status===K)if(O.wrap===2)x.adler=0,T(O,31),T(O,139),T(O,8),O.gzhead?(T(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),T(O,255&O.gzhead.time),T(O,O.gzhead.time>>8&255),T(O,O.gzhead.time>>16&255),T(O,O.gzhead.time>>24&255),T(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),T(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(T(O,255&O.gzhead.extra.length),T(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(x.adler=n(x.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(T(O,0),T(O,0),T(O,0),T(O,0),T(O,0),T(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),T(O,3),O.status=V);else{var ng=m+(O.w_bits-8<<4)<<8;ng|=(2<=O.strategy||O.level<2?0:O.level<6?1:O.level===6?2:3)<<6,O.strstart!==0&&(ng|=32),ng+=31-ng%31,O.status=V,Q(O,ng),O.strstart!==0&&(Q(O,x.adler>>>16),Q(O,65535&x.adler)),x.adler=1}if(O.status===69)if(O.gzhead.extra){for(_=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>_&&(x.adler=n(x.adler,O.pending_buf,O.pending-_,_)),D(x),_=O.pending,O.pending!==O.pending_buf_size));)T(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>_&&(x.adler=n(x.adler,O.pending_buf,O.pending-_,_)),O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){_=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>_&&(x.adler=n(x.adler,O.pending_buf,O.pending-_,_)),D(x),_=O.pending,O.pending===O.pending_buf_size)){Ig=1;break}Ig=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,T(O,Ig)}while(Ig!==0);O.gzhead.hcrc&&O.pending>_&&(x.adler=n(x.adler,O.pending_buf,O.pending-_,_)),Ig===0&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){_=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>_&&(x.adler=n(x.adler,O.pending_buf,O.pending-_,_)),D(x),_=O.pending,O.pending===O.pending_buf_size)){Ig=1;break}Ig=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,T(O,Ig)}while(Ig!==0);O.gzhead.hcrc&&O.pending>_&&(x.adler=n(x.adler,O.pending_buf,O.pending-_,_)),Ig===0&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&D(x),O.pending+2<=O.pending_buf_size&&(T(O,255&x.adler),T(O,x.adler>>8&255),x.adler=0,O.status=V)):O.status=V),O.pending!==0){if(D(x),x.avail_out===0)return O.last_flush=-1,c}else if(x.avail_in===0&&y(sg)<=y(Ag)&&sg!==o)return W(x,-5);if(O.status===666&&x.avail_in!==0)return W(x,-5);if(x.avail_in!==0||O.lookahead!==0||sg!==d&&O.status!==666){var ag=O.strategy===2?function(lg,cg){for(var dg;;){if(lg.lookahead===0&&(L(lg),lg.lookahead===0)){if(cg===d)return N;break}if(lg.match_length=0,dg=s._tr_tally(lg,0,lg.window[lg.strstart]),lg.lookahead--,lg.strstart++,dg&&(F(lg,!1),lg.strm.avail_out===0))return N}return lg.insert=0,cg===o?(F(lg,!0),lg.strm.avail_out===0?G:w):lg.last_lit&&(F(lg,!1),lg.strm.avail_out===0)?N:B}(O,sg):O.strategy===3?function(lg,cg){for(var dg,hg,rg,Wg,Gg=lg.window;;){if(lg.lookahead<=z){if(L(lg),lg.lookahead<=z&&cg===d)return N;if(lg.lookahead===0)break}if(lg.match_length=0,lg.lookahead>=S&&0<lg.strstart&&(hg=Gg[rg=lg.strstart-1])===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]){Wg=lg.strstart+z;do;while(hg===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]&&hg===Gg[++rg]&&rg<Wg);lg.match_length=z-(Wg-rg),lg.match_length>lg.lookahead&&(lg.match_length=lg.lookahead)}if(lg.match_length>=S?(dg=s._tr_tally(lg,1,lg.match_length-S),lg.lookahead-=lg.match_length,lg.strstart+=lg.match_length,lg.match_length=0):(dg=s._tr_tally(lg,0,lg.window[lg.strstart]),lg.lookahead--,lg.strstart++),dg&&(F(lg,!1),lg.strm.avail_out===0))return N}return lg.insert=0,cg===o?(F(lg,!0),lg.strm.avail_out===0?G:w):lg.last_lit&&(F(lg,!1),lg.strm.avail_out===0)?N:B}(O,sg):e[O.level].func(O,sg);if(ag!==G&&ag!==w||(O.status=666),ag===N||ag===G)return x.avail_out===0&&(O.last_flush=-1),c;if(ag===B&&(sg===1?s._tr_align(O):sg!==5&&(s._tr_stored_block(O,0,0,!1),sg===3&&(f(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),D(x),x.avail_out===0))return O.last_flush=-1,c}return sg!==o?c:O.wrap<=0?1:(O.wrap===2?(T(O,255&x.adler),T(O,x.adler>>8&255),T(O,x.adler>>16&255),T(O,x.adler>>24&255),T(O,255&x.total_in),T(O,x.total_in>>8&255),T(O,x.total_in>>16&255),T(O,x.total_in>>24&255)):(Q(O,x.adler>>>16),Q(O,65535&x.adler)),D(x),0<O.wrap&&(O.wrap=-O.wrap),O.pending!==0?c:1)},i.deflateEnd=function(x){var sg;return x&&x.state?(sg=x.state.status)!==K&&sg!==69&&sg!==73&&sg!==91&&sg!==103&&sg!==V&&sg!==666?W(x,r):(x.state=null,sg===V?W(x,-3):c):r},i.deflateSetDictionary=function(x,sg){var Ag,O,_,Ig,ng,ag,lg,cg,dg=sg.length;if(!x||!x.state||(Ig=(Ag=x.state).wrap)===2||Ig===1&&Ag.status!==K||Ag.lookahead)return r;for(Ig===1&&(x.adler=l(x.adler,sg,dg,0)),Ag.wrap=0,dg>=Ag.w_size&&(Ig===0&&(f(Ag.head),Ag.strstart=0,Ag.block_start=0,Ag.insert=0),cg=new A.Buf8(Ag.w_size),A.arraySet(cg,sg,dg-Ag.w_size,Ag.w_size,0),sg=cg,dg=Ag.w_size),ng=x.avail_in,ag=x.next_in,lg=x.input,x.avail_in=dg,x.next_in=0,x.input=sg,L(Ag);Ag.lookahead>=S;){for(O=Ag.strstart,_=Ag.lookahead-(S-1);Ag.ins_h=(Ag.ins_h<<Ag.hash_shift^Ag.window[O+S-1])&Ag.hash_mask,Ag.prev[O&Ag.w_mask]=Ag.head[Ag.ins_h],Ag.head[Ag.ins_h]=O,O++,--_;);Ag.strstart=O,Ag.lookahead=S-1,L(Ag)}return Ag.strstart+=Ag.lookahead,Ag.block_start=Ag.strstart,Ag.insert=Ag.lookahead,Ag.lookahead=0,Ag.match_length=Ag.prev_length=S-1,Ag.match_available=0,x.next_in=ag,x.input=lg,x.avail_in=ng,Ag.wrap=Ig,c},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(g,C,i){C.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(g,C,i){C.exports=function(e,A){var s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B;s=e.state,l=e.next_in,N=e.input,n=l+(e.avail_in-5),a=e.next_out,B=e.output,d=a-(A-e.avail_out),o=a+(e.avail_out-257),c=s.dmax,r=s.wsize,h=s.whave,b=s.wnext,u=s.window,m=s.hold,Z=s.bits,p=s.lencode,Y=s.distcode,R=(1<<s.lenbits)-1,X=(1<<s.distbits)-1;g:do{Z<15&&(m+=N[l++]<<Z,Z+=8,m+=N[l++]<<Z,Z+=8),H=p[m&R];I:for(;;){if(m>>>=S=H>>>24,Z-=S,(S=H>>>16&255)===0)B[a++]=65535&H;else{if(!(16&S)){if((64&S)==0){H=p[(65535&H)+(m&(1<<S)-1)];continue I}if(32&S){s.mode=12;break g}e.msg="invalid literal/length code",s.mode=30;break g}z=65535&H,(S&=15)&&(Z<S&&(m+=N[l++]<<Z,Z+=8),z+=m&(1<<S)-1,m>>>=S,Z-=S),Z<15&&(m+=N[l++]<<Z,Z+=8,m+=N[l++]<<Z,Z+=8),H=Y[m&X];C:for(;;){if(m>>>=S=H>>>24,Z-=S,!(16&(S=H>>>16&255))){if((64&S)==0){H=Y[(65535&H)+(m&(1<<S)-1)];continue C}e.msg="invalid distance code",s.mode=30;break g}if(v=65535&H,Z<(S&=15)&&(m+=N[l++]<<Z,(Z+=8)<S&&(m+=N[l++]<<Z,Z+=8)),c<(v+=m&(1<<S)-1)){e.msg="invalid distance too far back",s.mode=30;break g}if(m>>>=S,Z-=S,(S=a-d)<v){if(h<(S=v-S)&&s.sane){e.msg="invalid distance too far back",s.mode=30;break g}if(V=u,(K=0)===b){if(K+=r-S,S<z){for(z-=S;B[a++]=u[K++],--S;);K=a-v,V=B}}else if(b<S){if(K+=r+b-S,(S-=b)<z){for(z-=S;B[a++]=u[K++],--S;);if(K=0,b<z){for(z-=S=b;B[a++]=u[K++],--S;);K=a-v,V=B}}}else if(K+=b-S,S<z){for(z-=S;B[a++]=u[K++],--S;);K=a-v,V=B}for(;2<z;)B[a++]=V[K++],B[a++]=V[K++],B[a++]=V[K++],z-=3;z&&(B[a++]=V[K++],1<z&&(B[a++]=V[K++]))}else{for(K=a-v;B[a++]=B[K++],B[a++]=B[K++],B[a++]=B[K++],2<(z-=3););z&&(B[a++]=B[K++],1<z&&(B[a++]=B[K++]))}break}}break}}while(l<n&&a<o);l-=z=Z>>3,m&=(1<<(Z-=z<<3))-1,e.next_in=l,e.next_out=a,e.avail_in=l<n?n-l+5:5-(l-n),e.avail_out=a<o?o-a+257:257-(a-o),s.hold=m,s.bits=Z}},{}],49:[function(g,C,i){var e=g("../utils/common"),A=g("./adler32"),s=g("./crc32"),l=g("./inffast"),n=g("./inftrees"),a=1,d=2,o=0,c=-2,r=1,h=852,b=592;function u(K){return(K>>>24&255)+(K>>>8&65280)+((65280&K)<<8)+((255&K)<<24)}function m(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Z(K){var V;return K&&K.state?(V=K.state,K.total_in=K.total_out=V.total=0,K.msg="",V.wrap&&(K.adler=1&V.wrap),V.mode=r,V.last=0,V.havedict=0,V.dmax=32768,V.head=null,V.hold=0,V.bits=0,V.lencode=V.lendyn=new e.Buf32(h),V.distcode=V.distdyn=new e.Buf32(b),V.sane=1,V.back=-1,o):c}function p(K){var V;return K&&K.state?((V=K.state).wsize=0,V.whave=0,V.wnext=0,Z(K)):c}function Y(K,V){var N,B;return K&&K.state?(B=K.state,V<0?(N=0,V=-V):(N=1+(V>>4),V<48&&(V&=15)),V&&(V<8||15<V)?c:(B.window!==null&&B.wbits!==V&&(B.window=null),B.wrap=N,B.wbits=V,p(K))):c}function R(K,V){var N,B;return K?(B=new m,(K.state=B).window=null,(N=Y(K,V))!==o&&(K.state=null),N):c}var X,H,S=!0;function z(K){if(S){var V;for(X=new e.Buf32(512),H=new e.Buf32(32),V=0;V<144;)K.lens[V++]=8;for(;V<256;)K.lens[V++]=9;for(;V<280;)K.lens[V++]=7;for(;V<288;)K.lens[V++]=8;for(n(a,K.lens,0,288,X,0,K.work,{bits:9}),V=0;V<32;)K.lens[V++]=5;n(d,K.lens,0,32,H,0,K.work,{bits:5}),S=!1}K.lencode=X,K.lenbits=9,K.distcode=H,K.distbits=5}function v(K,V,N,B){var G,w=K.state;return w.window===null&&(w.wsize=1<<w.wbits,w.wnext=0,w.whave=0,w.window=new e.Buf8(w.wsize)),B>=w.wsize?(e.arraySet(w.window,V,N-w.wsize,w.wsize,0),w.wnext=0,w.whave=w.wsize):(B<(G=w.wsize-w.wnext)&&(G=B),e.arraySet(w.window,V,N-B,G,w.wnext),(B-=G)?(e.arraySet(w.window,V,N-B,B,0),w.wnext=B,w.whave=w.wsize):(w.wnext+=G,w.wnext===w.wsize&&(w.wnext=0),w.whave<w.wsize&&(w.whave+=G))),0}i.inflateReset=p,i.inflateReset2=Y,i.inflateResetKeep=Z,i.inflateInit=function(K){return R(K,15)},i.inflateInit2=R,i.inflate=function(K,V){var N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_=0,Ig=new e.Buf8(4),ng=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!K||!K.state||!K.output||!K.input&&K.avail_in!==0)return c;(N=K.state).mode===12&&(N.mode=13),W=K.next_out,G=K.output,f=K.avail_out,w=K.next_in,B=K.input,y=K.avail_in,D=N.hold,F=N.bits,T=y,Q=f,sg=o;g:for(;;)switch(N.mode){case r:if(N.wrap===0){N.mode=13;break}for(;F<16;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(2&N.wrap&&D===35615){Ig[N.check=0]=255&D,Ig[1]=D>>>8&255,N.check=s(N.check,Ig,2,0),F=D=0,N.mode=2;break}if(N.flags=0,N.head&&(N.head.done=!1),!(1&N.wrap)||(((255&D)<<8)+(D>>8))%31){K.msg="incorrect header check",N.mode=30;break}if((15&D)!=8){K.msg="unknown compression method",N.mode=30;break}if(F-=4,x=8+(15&(D>>>=4)),N.wbits===0)N.wbits=x;else if(x>N.wbits){K.msg="invalid window size",N.mode=30;break}N.dmax=1<<x,K.adler=N.check=1,N.mode=512&D?10:12,F=D=0;break;case 2:for(;F<16;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(N.flags=D,(255&N.flags)!=8){K.msg="unknown compression method",N.mode=30;break}if(57344&N.flags){K.msg="unknown header flags set",N.mode=30;break}N.head&&(N.head.text=D>>8&1),512&N.flags&&(Ig[0]=255&D,Ig[1]=D>>>8&255,N.check=s(N.check,Ig,2,0)),F=D=0,N.mode=3;case 3:for(;F<32;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}N.head&&(N.head.time=D),512&N.flags&&(Ig[0]=255&D,Ig[1]=D>>>8&255,Ig[2]=D>>>16&255,Ig[3]=D>>>24&255,N.check=s(N.check,Ig,4,0)),F=D=0,N.mode=4;case 4:for(;F<16;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}N.head&&(N.head.xflags=255&D,N.head.os=D>>8),512&N.flags&&(Ig[0]=255&D,Ig[1]=D>>>8&255,N.check=s(N.check,Ig,2,0)),F=D=0,N.mode=5;case 5:if(1024&N.flags){for(;F<16;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}N.length=D,N.head&&(N.head.extra_len=D),512&N.flags&&(Ig[0]=255&D,Ig[1]=D>>>8&255,N.check=s(N.check,Ig,2,0)),F=D=0}else N.head&&(N.head.extra=null);N.mode=6;case 6:if(1024&N.flags&&(y<(P=N.length)&&(P=y),P&&(N.head&&(x=N.head.extra_len-N.length,N.head.extra||(N.head.extra=new Array(N.head.extra_len)),e.arraySet(N.head.extra,B,w,P,x)),512&N.flags&&(N.check=s(N.check,B,P,w)),y-=P,w+=P,N.length-=P),N.length))break g;N.length=0,N.mode=7;case 7:if(2048&N.flags){if(y===0)break g;for(P=0;x=B[w+P++],N.head&&x&&N.length<65536&&(N.head.name+=String.fromCharCode(x)),x&&P<y;);if(512&N.flags&&(N.check=s(N.check,B,P,w)),y-=P,w+=P,x)break g}else N.head&&(N.head.name=null);N.length=0,N.mode=8;case 8:if(4096&N.flags){if(y===0)break g;for(P=0;x=B[w+P++],N.head&&x&&N.length<65536&&(N.head.comment+=String.fromCharCode(x)),x&&P<y;);if(512&N.flags&&(N.check=s(N.check,B,P,w)),y-=P,w+=P,x)break g}else N.head&&(N.head.comment=null);N.mode=9;case 9:if(512&N.flags){for(;F<16;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(D!==(65535&N.check)){K.msg="header crc mismatch",N.mode=30;break}F=D=0}N.head&&(N.head.hcrc=N.flags>>9&1,N.head.done=!0),K.adler=N.check=0,N.mode=12;break;case 10:for(;F<32;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}K.adler=N.check=u(D),F=D=0,N.mode=11;case 11:if(N.havedict===0)return K.next_out=W,K.avail_out=f,K.next_in=w,K.avail_in=y,N.hold=D,N.bits=F,2;K.adler=N.check=1,N.mode=12;case 12:if(V===5||V===6)break g;case 13:if(N.last){D>>>=7&F,F-=7&F,N.mode=27;break}for(;F<3;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}switch(N.last=1&D,F-=1,3&(D>>>=1)){case 0:N.mode=14;break;case 1:if(z(N),N.mode=20,V!==6)break;D>>>=2,F-=2;break g;case 2:N.mode=17;break;case 3:K.msg="invalid block type",N.mode=30}D>>>=2,F-=2;break;case 14:for(D>>>=7&F,F-=7&F;F<32;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if((65535&D)!=(D>>>16^65535)){K.msg="invalid stored block lengths",N.mode=30;break}if(N.length=65535&D,F=D=0,N.mode=15,V===6)break g;case 15:N.mode=16;case 16:if(P=N.length){if(y<P&&(P=y),f<P&&(P=f),P===0)break g;e.arraySet(G,B,w,P,W),y-=P,w+=P,f-=P,W+=P,N.length-=P;break}N.mode=12;break;case 17:for(;F<14;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(N.nlen=257+(31&D),D>>>=5,F-=5,N.ndist=1+(31&D),D>>>=5,F-=5,N.ncode=4+(15&D),D>>>=4,F-=4,286<N.nlen||30<N.ndist){K.msg="too many length or distance symbols",N.mode=30;break}N.have=0,N.mode=18;case 18:for(;N.have<N.ncode;){for(;F<3;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}N.lens[ng[N.have++]]=7&D,D>>>=3,F-=3}for(;N.have<19;)N.lens[ng[N.have++]]=0;if(N.lencode=N.lendyn,N.lenbits=7,Ag={bits:N.lenbits},sg=n(0,N.lens,0,19,N.lencode,0,N.work,Ag),N.lenbits=Ag.bits,sg){K.msg="invalid code lengths set",N.mode=30;break}N.have=0,N.mode=19;case 19:for(;N.have<N.nlen+N.ndist;){for(;k=(_=N.lencode[D&(1<<N.lenbits)-1])>>>16&255,j=65535&_,!((J=_>>>24)<=F);){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(j<16)D>>>=J,F-=J,N.lens[N.have++]=j;else{if(j===16){for(O=J+2;F<O;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(D>>>=J,F-=J,N.have===0){K.msg="invalid bit length repeat",N.mode=30;break}x=N.lens[N.have-1],P=3+(3&D),D>>>=2,F-=2}else if(j===17){for(O=J+3;F<O;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}F-=J,x=0,P=3+(7&(D>>>=J)),D>>>=3,F-=3}else{for(O=J+7;F<O;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}F-=J,x=0,P=11+(127&(D>>>=J)),D>>>=7,F-=7}if(N.have+P>N.nlen+N.ndist){K.msg="invalid bit length repeat",N.mode=30;break}for(;P--;)N.lens[N.have++]=x}}if(N.mode===30)break;if(N.lens[256]===0){K.msg="invalid code -- missing end-of-block",N.mode=30;break}if(N.lenbits=9,Ag={bits:N.lenbits},sg=n(a,N.lens,0,N.nlen,N.lencode,0,N.work,Ag),N.lenbits=Ag.bits,sg){K.msg="invalid literal/lengths set",N.mode=30;break}if(N.distbits=6,N.distcode=N.distdyn,Ag={bits:N.distbits},sg=n(d,N.lens,N.nlen,N.ndist,N.distcode,0,N.work,Ag),N.distbits=Ag.bits,sg){K.msg="invalid distances set",N.mode=30;break}if(N.mode=20,V===6)break g;case 20:N.mode=21;case 21:if(6<=y&&258<=f){K.next_out=W,K.avail_out=f,K.next_in=w,K.avail_in=y,N.hold=D,N.bits=F,l(K,Q),W=K.next_out,G=K.output,f=K.avail_out,w=K.next_in,B=K.input,y=K.avail_in,D=N.hold,F=N.bits,N.mode===12&&(N.back=-1);break}for(N.back=0;k=(_=N.lencode[D&(1<<N.lenbits)-1])>>>16&255,j=65535&_,!((J=_>>>24)<=F);){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(k&&(240&k)==0){for(q=J,tg=k,Cg=j;k=(_=N.lencode[Cg+((D&(1<<q+tg)-1)>>q)])>>>16&255,j=65535&_,!(q+(J=_>>>24)<=F);){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}D>>>=q,F-=q,N.back+=q}if(D>>>=J,F-=J,N.back+=J,N.length=j,k===0){N.mode=26;break}if(32&k){N.back=-1,N.mode=12;break}if(64&k){K.msg="invalid literal/length code",N.mode=30;break}N.extra=15&k,N.mode=22;case 22:if(N.extra){for(O=N.extra;F<O;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}N.length+=D&(1<<N.extra)-1,D>>>=N.extra,F-=N.extra,N.back+=N.extra}N.was=N.length,N.mode=23;case 23:for(;k=(_=N.distcode[D&(1<<N.distbits)-1])>>>16&255,j=65535&_,!((J=_>>>24)<=F);){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if((240&k)==0){for(q=J,tg=k,Cg=j;k=(_=N.distcode[Cg+((D&(1<<q+tg)-1)>>q)])>>>16&255,j=65535&_,!(q+(J=_>>>24)<=F);){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}D>>>=q,F-=q,N.back+=q}if(D>>>=J,F-=J,N.back+=J,64&k){K.msg="invalid distance code",N.mode=30;break}N.offset=j,N.extra=15&k,N.mode=24;case 24:if(N.extra){for(O=N.extra;F<O;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}N.offset+=D&(1<<N.extra)-1,D>>>=N.extra,F-=N.extra,N.back+=N.extra}if(N.offset>N.dmax){K.msg="invalid distance too far back",N.mode=30;break}N.mode=25;case 25:if(f===0)break g;if(P=Q-f,N.offset>P){if((P=N.offset-P)>N.whave&&N.sane){K.msg="invalid distance too far back",N.mode=30;break}L=P>N.wnext?(P-=N.wnext,N.wsize-P):N.wnext-P,P>N.length&&(P=N.length),E=N.window}else E=G,L=W-N.offset,P=N.length;for(f<P&&(P=f),f-=P,N.length-=P;G[W++]=E[L++],--P;);N.length===0&&(N.mode=21);break;case 26:if(f===0)break g;G[W++]=N.length,f--,N.mode=21;break;case 27:if(N.wrap){for(;F<32;){if(y===0)break g;y--,D|=B[w++]<<F,F+=8}if(Q-=f,K.total_out+=Q,N.total+=Q,Q&&(K.adler=N.check=N.flags?s(N.check,G,Q,W-Q):A(N.check,G,Q,W-Q)),Q=f,(N.flags?D:u(D))!==N.check){K.msg="incorrect data check",N.mode=30;break}F=D=0}N.mode=28;case 28:if(N.wrap&&N.flags){for(;F<32;){if(y===0)break g;y--,D+=B[w++]<<F,F+=8}if(D!==(4294967295&N.total)){K.msg="incorrect length check",N.mode=30;break}F=D=0}N.mode=29;case 29:sg=1;break g;case 30:sg=-3;break g;case 31:return-4;case 32:default:return c}return K.next_out=W,K.avail_out=f,K.next_in=w,K.avail_in=y,N.hold=D,N.bits=F,(N.wsize||Q!==K.avail_out&&N.mode<30&&(N.mode<27||V!==4))&&v(K,K.output,K.next_out,Q-K.avail_out)?(N.mode=31,-4):(T-=K.avail_in,Q-=K.avail_out,K.total_in+=T,K.total_out+=Q,N.total+=Q,N.wrap&&Q&&(K.adler=N.check=N.flags?s(N.check,G,Q,K.next_out-Q):A(N.check,G,Q,K.next_out-Q)),K.data_type=N.bits+(N.last?64:0)+(N.mode===12?128:0)+(N.mode===20||N.mode===15?256:0),(T==0&&Q===0||V===4)&&sg===o&&(sg=-5),sg)},i.inflateEnd=function(K){if(!K||!K.state)return c;var V=K.state;return V.window&&(V.window=null),K.state=null,o},i.inflateGetHeader=function(K,V){var N;return K&&K.state?(2&(N=K.state).wrap)==0?c:((N.head=V).done=!1,o):c},i.inflateSetDictionary=function(K,V){var N,B=V.length;return K&&K.state?(N=K.state).wrap!==0&&N.mode!==11?c:N.mode===11&&A(1,V,B,0)!==N.check?-3:v(K,V,B,B)?(N.mode=31,-4):(N.havedict=1,o):c},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(g,C,i){var e=g("../utils/common"),A=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[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],n=[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];C.exports=function(a,d,o,c,r,h,b,u){var m,Z,p,Y,R,X,H,S,z,v=u.bits,K=0,V=0,N=0,B=0,G=0,w=0,W=0,y=0,f=0,D=0,F=null,T=0,Q=new e.Buf16(16),P=new e.Buf16(16),L=null,E=0;for(K=0;K<=15;K++)Q[K]=0;for(V=0;V<c;V++)Q[d[o+V]]++;for(G=v,B=15;1<=B&&Q[B]===0;B--);if(B<G&&(G=B),B===0)return r[h++]=20971520,r[h++]=20971520,u.bits=1,0;for(N=1;N<B&&Q[N]===0;N++);for(G<N&&(G=N),K=y=1;K<=15;K++)if(y<<=1,(y-=Q[K])<0)return-1;if(0<y&&(a===0||B!==1))return-1;for(P[1]=0,K=1;K<15;K++)P[K+1]=P[K]+Q[K];for(V=0;V<c;V++)d[o+V]!==0&&(b[P[d[o+V]]++]=V);if(X=a===0?(F=L=b,19):a===1?(F=A,T-=257,L=s,E-=257,256):(F=l,L=n,-1),K=N,R=h,W=V=D=0,p=-1,Y=(f=1<<(w=G))-1,a===1&&852<f||a===2&&592<f)return 1;for(;;){for(H=K-W,z=b[V]<X?(S=0,b[V]):b[V]>X?(S=L[E+b[V]],F[T+b[V]]):(S=96,0),m=1<<K-W,N=Z=1<<w;r[R+(D>>W)+(Z-=m)]=H<<24|S<<16|z|0,Z!==0;);for(m=1<<K-1;D&m;)m>>=1;if(m!==0?(D&=m-1,D+=m):D=0,V++,--Q[K]==0){if(K===B)break;K=d[o+b[V]]}if(G<K&&(D&Y)!==p){for(W===0&&(W=G),R+=N,y=1<<(w=K-W);w+W<B&&!((y-=Q[w+W])<=0);)w++,y<<=1;if(f+=1<<w,a===1&&852<f||a===2&&592<f)return 1;r[p=D&Y]=G<<24|w<<16|R-h|0}}return D!==0&&(r[R+D]=K-W<<24|64<<16|0),u.bits=G,0}},{"../utils/common":41}],51:[function(g,C,i){C.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(g,C,i){var e=g("../utils/common"),A=0,s=1;function l(_){for(var Ig=_.length;0<=--Ig;)_[Ig]=0}var n=0,a=29,d=256,o=d+1+a,c=30,r=19,h=2*o+1,b=15,u=16,m=7,Z=256,p=16,Y=17,R=18,X=[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],H=[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],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],v=new Array(2*(o+2));l(v);var K=new Array(2*c);l(K);var V=new Array(512);l(V);var N=new Array(256);l(N);var B=new Array(a);l(B);var G,w,W,y=new Array(c);function f(_,Ig,ng,ag,lg){this.static_tree=_,this.extra_bits=Ig,this.extra_base=ng,this.elems=ag,this.max_length=lg,this.has_stree=_&&_.length}function D(_,Ig){this.dyn_tree=_,this.max_code=0,this.stat_desc=Ig}function F(_){return _<256?V[_]:V[256+(_>>>7)]}function T(_,Ig){_.pending_buf[_.pending++]=255&Ig,_.pending_buf[_.pending++]=Ig>>>8&255}function Q(_,Ig,ng){_.bi_valid>u-ng?(_.bi_buf|=Ig<<_.bi_valid&65535,T(_,_.bi_buf),_.bi_buf=Ig>>u-_.bi_valid,_.bi_valid+=ng-u):(_.bi_buf|=Ig<<_.bi_valid&65535,_.bi_valid+=ng)}function P(_,Ig,ng){Q(_,ng[2*Ig],ng[2*Ig+1])}function L(_,Ig){for(var ng=0;ng|=1&_,_>>>=1,ng<<=1,0<--Ig;);return ng>>>1}function E(_,Ig,ng){var ag,lg,cg=new Array(b+1),dg=0;for(ag=1;ag<=b;ag++)cg[ag]=dg=dg+ng[ag-1]<<1;for(lg=0;lg<=Ig;lg++){var hg=_[2*lg+1];hg!==0&&(_[2*lg]=L(cg[hg]++,hg))}}function J(_){var Ig;for(Ig=0;Ig<o;Ig++)_.dyn_ltree[2*Ig]=0;for(Ig=0;Ig<c;Ig++)_.dyn_dtree[2*Ig]=0;for(Ig=0;Ig<r;Ig++)_.bl_tree[2*Ig]=0;_.dyn_ltree[2*Z]=1,_.opt_len=_.static_len=0,_.last_lit=_.matches=0}function k(_){8<_.bi_valid?T(_,_.bi_buf):0<_.bi_valid&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function j(_,Ig,ng,ag){var lg=2*Ig,cg=2*ng;return _[lg]<_[cg]||_[lg]===_[cg]&&ag[Ig]<=ag[ng]}function q(_,Ig,ng){for(var ag=_.heap[ng],lg=ng<<1;lg<=_.heap_len&&(lg<_.heap_len&&j(Ig,_.heap[lg+1],_.heap[lg],_.depth)&&lg++,!j(Ig,ag,_.heap[lg],_.depth));)_.heap[ng]=_.heap[lg],ng=lg,lg<<=1;_.heap[ng]=ag}function tg(_,Ig,ng){var ag,lg,cg,dg,hg=0;if(_.last_lit!==0)for(;ag=_.pending_buf[_.d_buf+2*hg]<<8|_.pending_buf[_.d_buf+2*hg+1],lg=_.pending_buf[_.l_buf+hg],hg++,ag===0?P(_,lg,Ig):(P(_,(cg=N[lg])+d+1,Ig),(dg=X[cg])!==0&&Q(_,lg-=B[cg],dg),P(_,cg=F(--ag),ng),(dg=H[cg])!==0&&Q(_,ag-=y[cg],dg)),hg<_.last_lit;);P(_,Z,Ig)}function Cg(_,Ig){var ng,ag,lg,cg=Ig.dyn_tree,dg=Ig.stat_desc.static_tree,hg=Ig.stat_desc.has_stree,rg=Ig.stat_desc.elems,Wg=-1;for(_.heap_len=0,_.heap_max=h,ng=0;ng<rg;ng++)cg[2*ng]!==0?(_.heap[++_.heap_len]=Wg=ng,_.depth[ng]=0):cg[2*ng+1]=0;for(;_.heap_len<2;)cg[2*(lg=_.heap[++_.heap_len]=Wg<2?++Wg:0)]=1,_.depth[lg]=0,_.opt_len--,hg&&(_.static_len-=dg[2*lg+1]);for(Ig.max_code=Wg,ng=_.heap_len>>1;1<=ng;ng--)q(_,cg,ng);for(lg=rg;ng=_.heap[1],_.heap[1]=_.heap[_.heap_len--],q(_,cg,1),ag=_.heap[1],_.heap[--_.heap_max]=ng,_.heap[--_.heap_max]=ag,cg[2*lg]=cg[2*ng]+cg[2*ag],_.depth[lg]=(_.depth[ng]>=_.depth[ag]?_.depth[ng]:_.depth[ag])+1,cg[2*ng+1]=cg[2*ag+1]=lg,_.heap[1]=lg++,q(_,cg,1),2<=_.heap_len;);_.heap[--_.heap_max]=_.heap[1],function(Gg,Sg){var Kg,kg,yg,Vg,pg,Hg,Jg=Sg.dyn_tree,zg=Sg.max_code,aI=Sg.stat_desc.static_tree,BI=Sg.stat_desc.has_stree,Ug=Sg.stat_desc.extra_bits,lI=Sg.stat_desc.extra_base,oI=Sg.stat_desc.max_length,Eg=0;for(Vg=0;Vg<=b;Vg++)Gg.bl_count[Vg]=0;for(Jg[2*Gg.heap[Gg.heap_max]+1]=0,Kg=Gg.heap_max+1;Kg<h;Kg++)oI<(Vg=Jg[2*Jg[2*(kg=Gg.heap[Kg])+1]+1]+1)&&(Vg=oI,Eg++),Jg[2*kg+1]=Vg,zg<kg||(Gg.bl_count[Vg]++,pg=0,lI<=kg&&(pg=Ug[kg-lI]),Hg=Jg[2*kg],Gg.opt_len+=Hg*(Vg+pg),BI&&(Gg.static_len+=Hg*(aI[2*kg+1]+pg)));if(Eg!==0){do{for(Vg=oI-1;Gg.bl_count[Vg]===0;)Vg--;Gg.bl_count[Vg]--,Gg.bl_count[Vg+1]+=2,Gg.bl_count[oI]--,Eg-=2}while(0<Eg);for(Vg=oI;Vg!==0;Vg--)for(kg=Gg.bl_count[Vg];kg!==0;)zg<(yg=Gg.heap[--Kg])||(Jg[2*yg+1]!==Vg&&(Gg.opt_len+=(Vg-Jg[2*yg+1])*Jg[2*yg],Jg[2*yg+1]=Vg),kg--)}}(_,Ig),E(cg,Wg,_.bl_count)}function x(_,Ig,ng){var ag,lg,cg=-1,dg=Ig[1],hg=0,rg=7,Wg=4;for(dg===0&&(rg=138,Wg=3),Ig[2*(ng+1)+1]=65535,ag=0;ag<=ng;ag++)lg=dg,dg=Ig[2*(ag+1)+1],++hg<rg&&lg===dg||(hg<Wg?_.bl_tree[2*lg]+=hg:lg!==0?(lg!==cg&&_.bl_tree[2*lg]++,_.bl_tree[2*p]++):hg<=10?_.bl_tree[2*Y]++:_.bl_tree[2*R]++,cg=lg,Wg=(hg=0)===dg?(rg=138,3):lg===dg?(rg=6,3):(rg=7,4))}function sg(_,Ig,ng){var ag,lg,cg=-1,dg=Ig[1],hg=0,rg=7,Wg=4;for(dg===0&&(rg=138,Wg=3),ag=0;ag<=ng;ag++)if(lg=dg,dg=Ig[2*(ag+1)+1],!(++hg<rg&&lg===dg)){if(hg<Wg)for(;P(_,lg,_.bl_tree),--hg!=0;);else lg!==0?(lg!==cg&&(P(_,lg,_.bl_tree),hg--),P(_,p,_.bl_tree),Q(_,hg-3,2)):hg<=10?(P(_,Y,_.bl_tree),Q(_,hg-3,3)):(P(_,R,_.bl_tree),Q(_,hg-11,7));cg=lg,Wg=(hg=0)===dg?(rg=138,3):lg===dg?(rg=6,3):(rg=7,4)}}l(y);var Ag=!1;function O(_,Ig,ng,ag){Q(_,(n<<1)+(ag?1:0),3),function(lg,cg,dg,hg){k(lg),T(lg,dg),T(lg,~dg),e.arraySet(lg.pending_buf,lg.window,cg,dg,lg.pending),lg.pending+=dg}(_,Ig,ng)}i._tr_init=function(_){Ag||(function(){var Ig,ng,ag,lg,cg,dg=new Array(b+1);for(lg=ag=0;lg<a-1;lg++)for(B[lg]=ag,Ig=0;Ig<1<<X[lg];Ig++)N[ag++]=lg;for(N[ag-1]=lg,lg=cg=0;lg<16;lg++)for(y[lg]=cg,Ig=0;Ig<1<<H[lg];Ig++)V[cg++]=lg;for(cg>>=7;lg<c;lg++)for(y[lg]=cg<<7,Ig=0;Ig<1<<H[lg]-7;Ig++)V[256+cg++]=lg;for(ng=0;ng<=b;ng++)dg[ng]=0;for(Ig=0;Ig<=143;)v[2*Ig+1]=8,Ig++,dg[8]++;for(;Ig<=255;)v[2*Ig+1]=9,Ig++,dg[9]++;for(;Ig<=279;)v[2*Ig+1]=7,Ig++,dg[7]++;for(;Ig<=287;)v[2*Ig+1]=8,Ig++,dg[8]++;for(E(v,o+1,dg),Ig=0;Ig<c;Ig++)K[2*Ig+1]=5,K[2*Ig]=L(Ig,5);G=new f(v,X,d+1,o,b),w=new f(K,H,0,c,b),W=new f(new Array(0),S,0,r,m)}(),Ag=!0),_.l_desc=new D(_.dyn_ltree,G),_.d_desc=new D(_.dyn_dtree,w),_.bl_desc=new D(_.bl_tree,W),_.bi_buf=0,_.bi_valid=0,J(_)},i._tr_stored_block=O,i._tr_flush_block=function(_,Ig,ng,ag){var lg,cg,dg=0;0<_.level?(_.strm.data_type===2&&(_.strm.data_type=function(hg){var rg,Wg=4093624447;for(rg=0;rg<=31;rg++,Wg>>>=1)if(1&Wg&&hg.dyn_ltree[2*rg]!==0)return A;if(hg.dyn_ltree[18]!==0||hg.dyn_ltree[20]!==0||hg.dyn_ltree[26]!==0)return s;for(rg=32;rg<d;rg++)if(hg.dyn_ltree[2*rg]!==0)return s;return A}(_)),Cg(_,_.l_desc),Cg(_,_.d_desc),dg=function(hg){var rg;for(x(hg,hg.dyn_ltree,hg.l_desc.max_code),x(hg,hg.dyn_dtree,hg.d_desc.max_code),Cg(hg,hg.bl_desc),rg=r-1;3<=rg&&hg.bl_tree[2*z[rg]+1]===0;rg--);return hg.opt_len+=3*(rg+1)+5+5+4,rg}(_),lg=_.opt_len+3+7>>>3,(cg=_.static_len+3+7>>>3)<=lg&&(lg=cg)):lg=cg=ng+5,ng+4<=lg&&Ig!==-1?O(_,Ig,ng,ag):_.strategy===4||cg===lg?(Q(_,2+(ag?1:0),3),tg(_,v,K)):(Q(_,4+(ag?1:0),3),function(hg,rg,Wg,Gg){var Sg;for(Q(hg,rg-257,5),Q(hg,Wg-1,5),Q(hg,Gg-4,4),Sg=0;Sg<Gg;Sg++)Q(hg,hg.bl_tree[2*z[Sg]+1],3);sg(hg,hg.dyn_ltree,rg-1),sg(hg,hg.dyn_dtree,Wg-1)}(_,_.l_desc.max_code+1,_.d_desc.max_code+1,dg+1),tg(_,_.dyn_ltree,_.dyn_dtree)),J(_),ag&&k(_)},i._tr_tally=function(_,Ig,ng){return _.pending_buf[_.d_buf+2*_.last_lit]=Ig>>>8&255,_.pending_buf[_.d_buf+2*_.last_lit+1]=255&Ig,_.pending_buf[_.l_buf+_.last_lit]=255&ng,_.last_lit++,Ig===0?_.dyn_ltree[2*ng]++:(_.matches++,Ig--,_.dyn_ltree[2*(N[ng]+d+1)]++,_.dyn_dtree[2*F(Ig)]++),_.last_lit===_.lit_bufsize-1},i._tr_align=function(_){Q(_,2,3),P(_,Z,v),function(Ig){Ig.bi_valid===16?(T(Ig,Ig.bi_buf),Ig.bi_buf=0,Ig.bi_valid=0):8<=Ig.bi_valid&&(Ig.pending_buf[Ig.pending++]=255&Ig.bi_buf,Ig.bi_buf>>=8,Ig.bi_valid-=8)}(_)}},{"../utils/common":41}],53:[function(g,C,i){C.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(g,C,i){(function(e){(function(A,s){if(!A.setImmediate){var l,n,a,d,o=1,c={},r=!1,h=A.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(A);b=b&&b.setTimeout?b:A,l={}.toString.call(A.process)==="[object process]"?function(p){process.nextTick(function(){m(p)})}:function(){if(A.postMessage&&!A.importScripts){var p=!0,Y=A.onmessage;return A.onmessage=function(){p=!1},A.postMessage("","*"),A.onmessage=Y,p}}()?(d="setImmediate$"+Math.random()+"$",A.addEventListener?A.addEventListener("message",Z,!1):A.attachEvent("onmessage",Z),function(p){A.postMessage(d+p,"*")}):A.MessageChannel?((a=new MessageChannel).port1.onmessage=function(p){m(p.data)},function(p){a.port2.postMessage(p)}):h&&"onreadystatechange"in h.createElement("script")?(n=h.documentElement,function(p){var Y=h.createElement("script");Y.onreadystatechange=function(){m(p),Y.onreadystatechange=null,n.removeChild(Y),Y=null},n.appendChild(Y)}):function(p){setTimeout(m,0,p)},b.setImmediate=function(p){typeof p!="function"&&(p=new Function(""+p));for(var Y=new Array(arguments.length-1),R=0;R<Y.length;R++)Y[R]=arguments[R+1];var X={callback:p,args:Y};return c[o]=X,l(o),o++},b.clearImmediate=u}function u(p){delete c[p]}function m(p){if(r)setTimeout(m,0,p);else{var Y=c[p];if(Y){r=!0;try{(function(R){var X=R.callback,H=R.args;switch(H.length){case 0:X();break;case 1:X(H[0]);break;case 2:X(H[0],H[1]);break;case 3:X(H[0],H[1],H[2]);break;default:X.apply(s,H)}})(Y)}finally{u(p),r=!1}}}}function Z(p){p.source===A&&typeof p.data=="string"&&p.data.indexOf(d)===0&&m(+p.data.slice(d.length))}})(typeof self>"u"?e===void 0?this:e:self)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(pH)),pH.exports}var Qng=jng();const Ong=qq(Qng);var Ct;(function(t){t.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",t.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",t.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",t.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",t.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",t.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",t.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",t.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",t.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",t.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",t.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",t.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",t.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",t.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",t.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",t.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",t.Comments="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",t.CommentsExtended="http://schemas.microsoft.com/office/2011/relationships/commentsExtended",t.AltChunk="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk"})(Ct||(Ct={}));function Ung(t,I){return I.elements(t).map(g=>({id:I.attr(g,"Id"),type:I.attr(g,"Type"),target:I.attr(g,"Target"),targetMode:I.attr(g,"TargetMode")}))}function Eng(t){return t==null?void 0:t.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function MX(t){return/^[^"'].*\s.*[^"']$/.test(t)?`'${t}'`:t}function OY(t){let I=t.lastIndexOf("/")+1,g=I==0?"":t.substring(0,I),C=I==0?t:t.substring(I);return[g,C]}function BH(t,I){try{const g="http://docx/";return new URL(t,g+I).toString().substring(g.length)}catch{return`${I}${t}`}}function En(t,I){return t.reduce((g,C)=>(g[I(C)]=C,g),{})}function Png(t){return new Promise((I,g)=>{const C=new FileReader;C.onloadend=()=>I(C.result),C.onerror=()=>g(),C.readAsDataURL(t)})}function WH(t){return t&&typeof t=="object"&&!Array.isArray(t)}function _ng(t){return typeof t=="string"||t instanceof String}function zN(t,...I){if(!I.length)return t;const g=I.shift();if(WH(t)&&WH(g))for(const C in g)if(WH(g[C])){const i=t[C]??(t[C]={});zN(i,g[C])}else t[C]=g[C];return zN(t,...I)}function Gu(t){return Array.isArray(t)?t:[t]}function qng(t,I,g){return I>t?I:g<t?g:t}const $q={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},tt={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt",min:.25,max:12},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"}};function g$(t,I=tt.Dxa){if(t==null||/.+(p[xt]|[%])$/.test(t))return t;var g=parseInt(t)*I.mul;return I.min&&I.max&&(g=qng(g,I.min,I.max)),`${g.toFixed(2)}${I.unit}`}function $ng(t,I=!1){switch(t){case"1":return!0;case"0":return!1;case"on":return!0;case"off":return!1;case"true":return!0;case"false":return!1;default:return I}}function I$(t,I,g){if(t.namespaceURI!=$q.wordml)return!1;switch(t.localName){case"color":I.color=g.attr(t,"val");break;case"sz":I.fontSize=g.lengthAttr(t,"val",tt.FontSize);break;default:return!1}return!0}function gag(t,I=!1){I&&(t=t.replace(/<[?].*[?]>/,"")),t=Cag(t);const g=new DOMParser().parseFromString(t,"application/xml"),C=Iag(g);if(C)throw new Error(C);return g}function Iag(t){var I;return(I=t.getElementsByTagName("parsererror")[0])==null?void 0:I.textContent}function Cag(t){return t.charCodeAt(0)===65279?t.substring(1):t}function tag(t){return new XMLSerializer().serializeToString(t)}class C${elements(I,g=null){const C=[];for(let i=0,e=I.childNodes.length;i<e;i++){let A=I.childNodes.item(i);A.nodeType==1&&(g==null||A.localName==g)&&C.push(A)}return C}element(I,g){for(let C=0,i=I.childNodes.length;C<i;C++){let e=I.childNodes.item(C);if(e.nodeType==1&&e.localName==g)return e}return null}elementAttr(I,g,C){var i=this.element(I,g);return i?this.attr(i,C):void 0}attrs(I){return Array.from(I.attributes)}attr(I,g){for(let C=0,i=I.attributes.length;C<i;C++){let e=I.attributes.item(C);if(e.localName==g)return e.value}return null}intAttr(I,g,C=null){var i=this.attr(I,g);return i?parseInt(i):C}hexAttr(I,g,C=null){var i=this.attr(I,g);return i?parseInt(i,16):C}floatAttr(I,g,C=null){var i=this.attr(I,g);return i?parseFloat(i):C}boolAttr(I,g,C=null){return $ng(this.attr(I,g),C)}lengthAttr(I,g,C=tt.Dxa){return g$(this.attr(I,g),C)}}const mg=new C$;class we{constructor(I,g){this._package=I,this.path=g}async load(){this.rels=await this._package.loadRelationships(this.path);const I=await this._package.load(this.path),g=this._package.parseXmlDocument(I);this._package.options.keepOrigin&&(this._xmlDocument=g),this.parseXml(g.firstElementChild)}save(){this._package.update(this.path,tag(this._xmlDocument))}parseXml(I){}}const iag={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function eag(t,I){return I.elements(t).map(g=>Aag(g,I))}function Aag(t,I){let g={name:I.attr(t,"name"),embedFontRefs:[]};for(let C of I.elements(t))switch(C.localName){case"family":g.family=I.attr(C,"val");break;case"altName":g.altName=I.attr(C,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":g.embedFontRefs.push(sag(C,I));break}return g}function sag(t,I){return{id:I.attr(t,"id"),key:I.attr(t,"fontKey"),type:iag[t.localName]}}class lag extends we{parseXml(I){this.fonts=eag(I,this._package.xmlParser)}}class QD{constructor(I,g){this._zip=I,this.options=g,this.xmlParser=new C$}get(I){const g=nag(I);return this._zip.files[g]??this._zip.files[g.replace(/\//g,"\\")]}update(I,g){this._zip.file(I,g)}static async load(I,g){const C=await Ong.loadAsync(I);return new QD(C,g)}save(I="blob"){return this._zip.generateAsync({type:I})}load(I,g="string"){var C;return((C=this.get(I))==null?void 0:C.async(g))??Promise.resolve(null)}async loadRelationships(I=null){let g="_rels/.rels";if(I!=null){const[i,e]=OY(I);g=`${i}_rels/${e}.rels`}const C=await this.load(g);return C?Ung(this.parseXmlDocument(C).firstElementChild,this.xmlParser):null}parseXmlDocument(I){return gag(I,this.options.trimXmlDeclaration)}}function nag(t){return t.startsWith("/")?t.substr(1):t}class aag extends we{constructor(I,g,C){super(I,g),this._documentParser=C}parseXml(I){this.body=this._documentParser.parseDocumentFile(I)}}function wY(t,I){return{type:I.attr(t,"val"),color:I.attr(t,"color"),size:I.lengthAttr(t,"sz",tt.Border),offset:I.lengthAttr(t,"space",tt.Point),frame:I.boolAttr(t,"frame"),shadow:I.boolAttr(t,"shadow")}}function oag(t,I){var g={};for(let C of I.elements(t))switch(C.localName){case"left":g.left=wY(C,I);break;case"top":g.top=wY(C,I);break;case"right":g.right=wY(C,I);break;case"bottom":g.bottom=wY(C,I);break}return g}var N6;(function(t){t.Continuous="continuous",t.NextPage="nextPage",t.NextColumn="nextColumn",t.EvenPage="evenPage",t.OddPage="oddPage"})(N6||(N6={}));function t$(t,I=mg){var g={};for(let C of I.elements(t))switch(C.localName){case"pgSz":g.pageSize={width:I.lengthAttr(C,"w"),height:I.lengthAttr(C,"h"),orientation:I.attr(C,"orient")};break;case"type":g.type=I.attr(C,"val");break;case"pgMar":g.pageMargins={left:I.lengthAttr(C,"left"),right:I.lengthAttr(C,"right"),top:I.lengthAttr(C,"top"),bottom:I.lengthAttr(C,"bottom"),header:I.lengthAttr(C,"header"),footer:I.lengthAttr(C,"footer"),gutter:I.lengthAttr(C,"gutter")};break;case"cols":g.columns=cag(C,I);break;case"headerReference":(g.headerRefs??(g.headerRefs=[])).push(V6(C,I));break;case"footerReference":(g.footerRefs??(g.footerRefs=[])).push(V6(C,I));break;case"titlePg":g.titlePage=I.boolAttr(C,"val",!0);break;case"pgBorders":g.pageBorders=oag(C,I);break;case"pgNumType":g.pageNumber=dag(C,I);break}return g}function cag(t,I){return{numberOfColumns:I.intAttr(t,"num"),space:I.lengthAttr(t,"space"),separator:I.boolAttr(t,"sep"),equalWidth:I.boolAttr(t,"equalWidth",!0),columns:I.elements(t,"col").map(g=>({width:I.lengthAttr(g,"w"),space:I.lengthAttr(g,"space")}))}}function dag(t,I){return{chapSep:I.attr(t,"chapSep"),chapStyle:I.attr(t,"chapStyle"),format:I.attr(t,"fmt"),start:I.intAttr(t,"start")}}function V6(t,I){return{id:I.attr(t,"id"),type:I.attr(t,"type")}}function rag(t,I){return{before:I.lengthAttr(t,"before"),after:I.lengthAttr(t,"after"),line:I.intAttr(t,"line"),lineRule:I.attr(t,"lineRule")}}function OD(t,I){let g={};for(let C of I.elements(t))hag(C,g,I);return g}function hag(t,I,g){return!!I$(t,I,g)}function i$(t,I){let g={};for(let C of I.elements(t))e$(C,g,I);return g}function e$(t,I,g){if(t.namespaceURI!=$q.wordml)return!1;if(I$(t,I,g))return!0;switch(t.localName){case"tabs":I.tabs=bag(t,g);break;case"sectPr":I.sectionProps=t$(t,g);break;case"numPr":I.numbering=uag(t,g);break;case"spacing":return I.lineSpacing=rag(t,g),!1;case"textAlignment":return I.textAlignment=g.attr(t,"val"),!1;case"keepLines":I.keepLines=g.boolAttr(t,"val",!0);break;case"keepNext":I.keepNext=g.boolAttr(t,"val",!0);break;case"pageBreakBefore":I.pageBreakBefore=g.boolAttr(t,"val",!0);break;case"outlineLvl":I.outlineLevel=g.intAttr(t,"val");break;case"pStyle":I.styleName=g.attr(t,"val");break;case"rPr":I.runProps=OD(t,g);break;default:return!1}return!0}function bag(t,I){return I.elements(t,"tab").map(g=>({position:I.lengthAttr(g,"pos"),leader:I.attr(g,"leader"),style:I.attr(g,"val")}))}function uag(t,I){var g={};for(let C of I.elements(t))switch(C.localName){case"numId":g.id=I.attr(C,"val");break;case"ilvl":g.level=I.intAttr(C,"val");break}return g}function mag(t,I){let g={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let C of I.elements(t))switch(C.localName){case"num":g.numberings.push(Zag(C,I));break;case"abstractNum":g.abstractNumberings.push(Gag(C,I));break;case"numPicBullet":g.bulletPictures.push(pag(C,I));break}return g}function Zag(t,I){let g={id:I.attr(t,"numId"),overrides:[]};for(let C of I.elements(t))switch(C.localName){case"abstractNumId":g.abstractId=I.attr(C,"val");break;case"lvlOverride":g.overrides.push(wag(C,I));break}return g}function Gag(t,I){let g={id:I.attr(t,"abstractNumId"),levels:[]};for(let C of I.elements(t))switch(C.localName){case"name":g.name=I.attr(C,"val");break;case"multiLevelType":g.multiLevelType=I.attr(C,"val");break;case"numStyleLink":g.numberingStyleLink=I.attr(C,"val");break;case"styleLink":g.styleLink=I.attr(C,"val");break;case"lvl":g.levels.push(A$(C,I));break}return g}function A$(t,I){let g={level:I.intAttr(t,"ilvl")};for(let C of I.elements(t))switch(C.localName){case"start":g.start=I.attr(C,"val");break;case"lvlRestart":g.restart=I.intAttr(C,"val");break;case"numFmt":g.format=I.attr(C,"val");break;case"lvlText":g.text=I.attr(C,"val");break;case"lvlJc":g.justification=I.attr(C,"val");break;case"lvlPicBulletId":g.bulletPictureId=I.attr(C,"val");break;case"pStyle":g.paragraphStyle=I.attr(C,"val");break;case"pPr":g.paragraphProps=i$(C,I);break;case"rPr":g.runProps=OD(C,I);break}return g}function wag(t,I){let g={level:I.intAttr(t,"ilvl")};for(let C of I.elements(t))switch(C.localName){case"startOverride":g.start=I.intAttr(C,"val");break;case"lvl":g.numberingLevel=A$(C,I);break}return g}function pag(t,I){var g=I.element(t,"pict"),C=g&&I.element(g,"shape"),i=C&&I.element(C,"imagedata");return i?{id:I.attr(t,"numPicBulletId"),referenceId:I.attr(i,"id"),style:I.attr(C,"style")}:null}class Bag extends we{constructor(I,g,C){super(I,g),this._documentParser=C}parseXml(I){Object.assign(this,mag(I,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(I)}}class Wag extends we{constructor(I,g,C){super(I,g),this._documentParser=C}parseXml(I){this.styles=this._documentParser.parseStylesFile(I)}}var Ng;(function(t){t.Document="document",t.Paragraph="paragraph",t.Run="run",t.Break="break",t.NoBreakHyphen="noBreakHyphen",t.Table="table",t.Row="row",t.Cell="cell",t.Hyperlink="hyperlink",t.SmartTag="smartTag",t.Drawing="drawing",t.Image="image",t.Text="text",t.Tab="tab",t.Symbol="symbol",t.BookmarkStart="bookmarkStart",t.BookmarkEnd="bookmarkEnd",t.Footer="footer",t.Header="header",t.FootnoteReference="footnoteReference",t.EndnoteReference="endnoteReference",t.Footnote="footnote",t.Endnote="endnote",t.SimpleField="simpleField",t.ComplexField="complexField",t.Instruction="instruction",t.VmlPicture="vmlPicture",t.MmlMath="mmlMath",t.MmlMathParagraph="mmlMathParagraph",t.MmlFraction="mmlFraction",t.MmlFunction="mmlFunction",t.MmlFunctionName="mmlFunctionName",t.MmlNumerator="mmlNumerator",t.MmlDenominator="mmlDenominator",t.MmlRadical="mmlRadical",t.MmlBase="mmlBase",t.MmlDegree="mmlDegree",t.MmlSuperscript="mmlSuperscript",t.MmlSubscript="mmlSubscript",t.MmlPreSubSuper="mmlPreSubSuper",t.MmlSubArgument="mmlSubArgument",t.MmlSuperArgument="mmlSuperArgument",t.MmlNary="mmlNary",t.MmlDelimiter="mmlDelimiter",t.MmlRun="mmlRun",t.MmlEquationArray="mmlEquationArray",t.MmlLimit="mmlLimit",t.MmlLimitLower="mmlLimitLower",t.MmlMatrix="mmlMatrix",t.MmlMatrixRow="mmlMatrixRow",t.MmlBox="mmlBox",t.MmlBar="mmlBar",t.MmlGroupChar="mmlGroupChar",t.VmlElement="vmlElement",t.Inserted="inserted",t.Deleted="deleted",t.DeletedText="deletedText",t.Comment="comment",t.CommentReference="commentReference",t.CommentRangeStart="commentRangeStart",t.CommentRangeEnd="commentRangeEnd",t.AltChunk="altChunk"})(Ng||(Ng={}));class Ad{constructor(){this.children=[],this.cssStyle={}}}class yag extends Ad{constructor(){super(...arguments),this.type=Ng.Header}}class Yag extends Ad{constructor(){super(...arguments),this.type=Ng.Footer}}class s$ extends we{constructor(I,g,C){super(I,g),this._documentParser=C}parseXml(I){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(I)}}class Nag extends s${createRootElement(){return new yag}}class Vag extends s${createRootElement(){return new Yag}}function Mag(t,I){const g={};for(let C of I.elements(t))switch(C.localName){case"Template":g.template=C.textContent;break;case"Pages":g.pages=wu(C.textContent);break;case"Words":g.words=wu(C.textContent);break;case"Characters":g.characters=wu(C.textContent);break;case"Application":g.application=C.textContent;break;case"Lines":g.lines=wu(C.textContent);break;case"Paragraphs":g.paragraphs=wu(C.textContent);break;case"Company":g.company=C.textContent;break;case"AppVersion":g.appVersion=C.textContent;break}return g}function wu(t){if(!(typeof t>"u"))return parseInt(t)}class Rag extends we{parseXml(I){this.props=Mag(I,this._package.xmlParser)}}function fag(t,I){const g={};for(let C of I.elements(t))switch(C.localName){case"title":g.title=C.textContent;break;case"description":g.description=C.textContent;break;case"subject":g.subject=C.textContent;break;case"creator":g.creator=C.textContent;break;case"keywords":g.keywords=C.textContent;break;case"language":g.language=C.textContent;break;case"lastModifiedBy":g.lastModifiedBy=C.textContent;break;case"revision":C.textContent&&(g.revision=parseInt(C.textContent));break}return g}class Hag extends we{parseXml(I){this.props=fag(I,this._package.xmlParser)}}class Xag{}function Sag(t,I){var g=new Xag,C=I.element(t,"themeElements");for(let i of I.elements(C))switch(i.localName){case"clrScheme":g.colorScheme=Dag(i,I);break;case"fontScheme":g.fontScheme=Kag(i,I);break}return g}function Dag(t,I){var g={name:I.attr(t,"name"),colors:{}};for(let e of I.elements(t)){var C=I.element(e,"srgbClr"),i=I.element(e,"sysClr");C?g.colors[e.localName]=I.attr(C,"val"):i&&(g.colors[e.localName]=I.attr(i,"lastClr"))}return g}function Kag(t,I){var g={name:I.attr(t,"name")};for(let C of I.elements(t))switch(C.localName){case"majorFont":g.majorFont=M6(C,I);break;case"minorFont":g.minorFont=M6(C,I);break}return g}function M6(t,I){return{latinTypeface:I.elementAttr(t,"latin","typeface"),eaTypeface:I.elementAttr(t,"ea","typeface"),csTypeface:I.elementAttr(t,"cs","typeface")}}class Fag extends we{constructor(I,g){super(I,g)}parseXml(I){this.theme=Sag(I,this._package.xmlParser)}}class l${}class kag extends l${constructor(){super(...arguments),this.type=Ng.Footnote}}class zag extends l${constructor(){super(...arguments),this.type=Ng.Endnote}}class n$ extends we{constructor(I,g,C){super(I,g),this._documentParser=C}}class Jag extends n${constructor(I,g,C){super(I,g,C)}parseXml(I){this.notes=this._documentParser.parseNotes(I,"footnote",kag)}}class Lag extends n${constructor(I,g,C){super(I,g,C)}parseXml(I){this.notes=this._documentParser.parseNotes(I,"endnote",zag)}}function vag(t,I){var g={};for(let C of I.elements(t))switch(C.localName){case"defaultTabStop":g.defaultTabStop=I.lengthAttr(C,"val");break;case"footnotePr":g.footnoteProps=R6(C,I);break;case"endnotePr":g.endnoteProps=R6(C,I);break;case"autoHyphenation":g.autoHyphenation=I.boolAttr(C,"val");break}return g}function R6(t,I){var g={defaultNoteIds:[]};for(let C of I.elements(t))switch(C.localName){case"numFmt":g.nummeringFormat=I.attr(C,"val");break;case"footnote":case"endnote":g.defaultNoteIds.push(I.attr(C,"id"));break}return g}class Tag extends we{constructor(I,g){super(I,g)}parseXml(I){this.settings=vag(I,this._package.xmlParser)}}function xag(t,I){return I.elements(t,"property").map(g=>{const C=g.firstChild;return{formatId:I.attr(g,"fmtid"),name:I.attr(g,"name"),type:C.nodeName,value:C.textContent}})}class jag extends we{parseXml(I){this.props=xag(I,this._package.xmlParser)}}class Qag extends we{constructor(I,g,C){super(I,g),this._documentParser=C}parseXml(I){this.comments=this._documentParser.parseComments(I),this.commentMap=En(this.comments,g=>g.id)}}class Oag extends we{constructor(I,g){super(I,g),this.comments=[]}parseXml(I){const g=this._package.xmlParser;for(let C of g.elements(I,"commentEx"))this.comments.push({paraId:g.attr(C,"paraId"),paraIdParent:g.attr(C,"paraIdParent"),done:g.boolAttr(C,"done")});this.commentMap=En(this.comments,C=>C.paraId)}}const Uag=[{type:Ct.OfficeDocument,target:"word/document.xml"},{type:Ct.ExtendedProperties,target:"docProps/app.xml"},{type:Ct.CoreProperties,target:"docProps/core.xml"},{type:Ct.CustomProperties,target:"docProps/custom.xml"}];class UD{constructor(){this.parts=[],this.partsMap={}}static async load(I,g,C){var i=new UD;return i._options=C,i._parser=g,i._package=await QD.load(I,C),i.rels=await i._package.loadRelationships(),await Promise.all(Uag.map(e=>{const A=i.rels.find(s=>s.type===e.type)??e;return i.loadRelationshipPart(A.target,A.type)})),i}save(I="blob"){return this._package.save(I)}async loadRelationshipPart(I,g){var i;if(this.partsMap[I])return this.partsMap[I];if(!this._package.get(I))return null;let C=null;switch(g){case Ct.OfficeDocument:this.documentPart=C=new aag(this._package,I,this._parser);break;case Ct.FontTable:this.fontTablePart=C=new lag(this._package,I);break;case Ct.Numbering:this.numberingPart=C=new Bag(this._package,I,this._parser);break;case Ct.Styles:this.stylesPart=C=new Wag(this._package,I,this._parser);break;case Ct.Theme:this.themePart=C=new Fag(this._package,I);break;case Ct.Footnotes:this.footnotesPart=C=new Jag(this._package,I,this._parser);break;case Ct.Endnotes:this.endnotesPart=C=new Lag(this._package,I,this._parser);break;case Ct.Footer:C=new Vag(this._package,I,this._parser);break;case Ct.Header:C=new Nag(this._package,I,this._parser);break;case Ct.CoreProperties:this.corePropsPart=C=new Hag(this._package,I);break;case Ct.ExtendedProperties:this.extendedPropsPart=C=new Rag(this._package,I);break;case Ct.CustomProperties:C=new jag(this._package,I);break;case Ct.Settings:this.settingsPart=C=new Tag(this._package,I);break;case Ct.Comments:this.commentsPart=C=new Qag(this._package,I,this._parser);break;case Ct.CommentsExtended:this.commentsExtendedPart=C=new Oag(this._package,I);break}if(C==null)return Promise.resolve(null);if(this.partsMap[I]=C,this.parts.push(C),await C.load(),((i=C.rels)==null?void 0:i.length)>0){const[e]=OY(C.path);await Promise.all(C.rels.map(A=>this.loadRelationshipPart(BH(A.target,e),A.type)))}return C}async loadDocumentImage(I,g){const C=await this.loadResource(g??this.documentPart,I,"blob");return this.blobToURL(C)}async loadNumberingImage(I){const g=await this.loadResource(this.numberingPart,I,"blob");return this.blobToURL(g)}async loadFont(I,g){const C=await this.loadResource(this.fontTablePart,I,"uint8array");return C&&this.blobToURL(new Blob([Eag(C,g)]))}async loadAltChunk(I,g){return await this.loadResource(g??this.documentPart,I,"string")}blobToURL(I){return I?this._options.useBase64URL?Png(I):URL.createObjectURL(I):null}findPartByRelId(I,g=null){var C=(g.rels??this.rels).find(e=>e.id==I);const i=g?OY(g.path)[0]:"";return C?this.partsMap[BH(C.target,i)]:null}getPathById(I,g){const C=I.rels.find(e=>e.id==g),[i]=OY(I.path);return C?BH(C.target,i):null}loadResource(I,g,C){const i=this.getPathById(I,g);return i?this._package.load(i,C):Promise.resolve(null)}}function Eag(t,I){const C=I.replace(/{|}|-/g,""),i=new Array(16);for(let e=0;e<16;e++)i[16-e-1]=parseInt(C.substr(e*2,2),16);for(let e=0;e<32;e++)t[e]=t[e]^i[e%16];return t}function Pag(t,I){return{type:Ng.BookmarkStart,id:I.attr(t,"id"),name:I.attr(t,"name"),colFirst:I.intAttr(t,"colFirst"),colLast:I.intAttr(t,"colLast")}}function _ag(t,I){return{type:Ng.BookmarkEnd,id:I.attr(t,"id")}}class qag extends Ad{constructor(){super(...arguments),this.type=Ng.VmlElement,this.attrs={}}}function a$(t,I){var g=new qag;switch(t.localName){case"rect":g.tagName="rect",Object.assign(g.attrs,{width:"100%",height:"100%"});break;case"oval":g.tagName="ellipse",Object.assign(g.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":g.tagName="line";break;case"shape":g.tagName="g";break;case"textbox":g.tagName="foreignObject",Object.assign(g.attrs,{width:"100%",height:"100%"});break;default:return null}for(const C of mg.attrs(t))switch(C.localName){case"style":g.cssStyleText=C.value;break;case"fillcolor":g.attrs.fill=C.value;break;case"from":const[i,e]=f6(C.value);Object.assign(g.attrs,{x1:i,y1:e});break;case"to":const[A,s]=f6(C.value);Object.assign(g.attrs,{x2:A,y2:s});break}for(const C of mg.elements(t))switch(C.localName){case"stroke":Object.assign(g.attrs,$ag(C));break;case"fill":Object.assign(g.attrs,gog());break;case"imagedata":g.tagName="image",Object.assign(g.attrs,{width:"100%",height:"100%"}),g.imageHref={id:mg.attr(C,"id"),title:mg.attr(C,"title")};break;case"txbxContent":g.children.push(...I.parseBodyElements(C));break;default:const i=a$(C,I);i&&g.children.push(i);break}return g}function $ag(t){return{stroke:mg.attr(t,"color"),"stroke-width":mg.lengthAttr(t,"weight",tt.Emu)??"1px"}}function gog(t){return{}}function f6(t){return t.split(",")}class Iog extends Ad{constructor(){super(...arguments),this.type=Ng.Comment}}class Cog extends Ad{constructor(I){super(),this.id=I,this.type=Ng.CommentReference}}class tog extends Ad{constructor(I){super(),this.id=I,this.type=Ng.CommentRangeStart}}class iog extends Ad{constructor(I){super(),this.id=I,this.type=Ng.CommentRangeEnd}}var UY={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"};const eog=[],H6={oMath:Ng.MmlMath,oMathPara:Ng.MmlMathParagraph,f:Ng.MmlFraction,func:Ng.MmlFunction,fName:Ng.MmlFunctionName,num:Ng.MmlNumerator,den:Ng.MmlDenominator,rad:Ng.MmlRadical,deg:Ng.MmlDegree,e:Ng.MmlBase,sSup:Ng.MmlSuperscript,sSub:Ng.MmlSubscript,sPre:Ng.MmlPreSubSuper,sup:Ng.MmlSuperArgument,sub:Ng.MmlSubArgument,d:Ng.MmlDelimiter,nary:Ng.MmlNary,eqArr:Ng.MmlEquationArray,lim:Ng.MmlLimit,limLow:Ng.MmlLimitLower,m:Ng.MmlMatrix,mr:Ng.MmlMatrixRow,box:Ng.MmlBox,bar:Ng.MmlBar,groupChr:Ng.MmlGroupChar};class Aog{constructor(I){this.options={ignoreWidth:!1,debug:!1,...I}}parseNotes(I,g,C){var i=[];for(let e of mg.elements(I,g)){const A=new C;A.id=mg.attr(e,"id"),A.noteType=mg.attr(e,"type"),A.children=this.parseBodyElements(e),i.push(A)}return i}parseComments(I){var g=[];for(let C of mg.elements(I,"comment")){const i=new Iog;i.id=mg.attr(C,"id"),i.author=mg.attr(C,"author"),i.initials=mg.attr(C,"initials"),i.date=mg.attr(C,"date"),i.children=this.parseBodyElements(C),g.push(i)}return g}parseDocumentFile(I){var g=mg.element(I,"body"),C=mg.element(I,"background"),i=mg.element(g,"sectPr");return{type:Ng.Document,children:this.parseBodyElements(g),props:i?t$(i,mg):{},cssStyle:C?this.parseBackground(C):{}}}parseBackground(I){var g={},C=NC.colorAttr(I,"color");return C&&(g["background-color"]=C),g}parseBodyElements(I){var g=[];for(let C of mg.elements(I))switch(C.localName){case"p":g.push(this.parseParagraph(C));break;case"altChunk":g.push(this.parseAltChunk(C));break;case"tbl":g.push(this.parseTable(C));break;case"sdt":g.push(...this.parseSdt(C,i=>this.parseBodyElements(i)));break}return g}parseStylesFile(I){var g=[];return NC.foreach(I,C=>{switch(C.localName){case"style":g.push(this.parseStyle(C));break;case"docDefaults":g.push(this.parseDefaultStyles(C));break}}),g}parseDefaultStyles(I){var g={id:null,name:null,target:null,basedOn:null,styles:[]};return NC.foreach(I,C=>{switch(C.localName){case"rPrDefault":var i=mg.element(C,"rPr");i&&g.styles.push({target:"span",values:this.parseDefaultProperties(i,{})});break;case"pPrDefault":var e=mg.element(C,"pPr");e&&g.styles.push({target:"p",values:this.parseDefaultProperties(e,{})});break}}),g}parseStyle(I){var g={id:mg.attr(I,"styleId"),isDefault:mg.boolAttr(I,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(mg.attr(I,"type")){case"paragraph":g.target="p";break;case"table":g.target="table";break;case"character":g.target="span";break}return NC.foreach(I,C=>{switch(C.localName){case"basedOn":g.basedOn=mg.attr(C,"val");break;case"name":g.name=mg.attr(C,"val");break;case"link":g.linked=mg.attr(C,"val");break;case"next":g.next=mg.attr(C,"val");break;case"aliases":g.aliases=mg.attr(C,"val").split(",");break;case"pPr":g.styles.push({target:"p",values:this.parseDefaultProperties(C,{})}),g.paragraphProps=i$(C,mg);break;case"rPr":g.styles.push({target:"span",values:this.parseDefaultProperties(C,{})}),g.runProps=OD(C,mg);break;case"tblPr":case"tcPr":g.styles.push({target:"td",values:this.parseDefaultProperties(C,{})});break;case"tblStylePr":for(let i of this.parseTableStyle(C))g.styles.push(i);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${C.localName}`)}}),g}parseTableStyle(I){var g=[],C=mg.attr(I,"type"),i="",e="";switch(C){case"firstRow":e=".first-row",i="tr.first-row td";break;case"lastRow":e=".last-row",i="tr.last-row td";break;case"firstCol":e=".first-col",i="td.first-col";break;case"lastCol":e=".last-col",i="td.last-col";break;case"band1Vert":e=":not(.no-vband)",i="td.odd-col";break;case"band2Vert":e=":not(.no-vband)",i="td.even-col";break;case"band1Horz":e=":not(.no-hband)",i="tr.odd-row";break;case"band2Horz":e=":not(.no-hband)",i="tr.even-row";break;default:return[]}return NC.foreach(I,A=>{switch(A.localName){case"pPr":g.push({target:`${i} p`,mod:e,values:this.parseDefaultProperties(A,{})});break;case"rPr":g.push({target:`${i} span`,mod:e,values:this.parseDefaultProperties(A,{})});break;case"tblPr":case"tcPr":g.push({target:i,mod:e,values:this.parseDefaultProperties(A,{})});break}}),g}parseNumberingFile(I){var g=[],C={},i=[];return NC.foreach(I,e=>{switch(e.localName){case"abstractNum":this.parseAbstractNumbering(e,i).forEach(l=>g.push(l));break;case"numPicBullet":i.push(this.parseNumberingPicBullet(e));break;case"num":var A=mg.attr(e,"numId"),s=mg.elementAttr(e,"abstractNumId","val");C[s]=A;break}}),g.forEach(e=>e.id=C[e.id]),g}parseNumberingPicBullet(I){var g=mg.element(I,"pict"),C=g&&mg.element(g,"shape"),i=C&&mg.element(C,"imagedata");return i?{id:mg.intAttr(I,"numPicBulletId"),src:mg.attr(i,"id"),style:mg.attr(C,"style")}:null}parseAbstractNumbering(I,g){var C=[],i=mg.attr(I,"abstractNumId");return NC.foreach(I,e=>{switch(e.localName){case"lvl":C.push(this.parseNumberingLevel(i,e,g));break}}),C}parseNumberingLevel(I,g,C){var i={id:I,level:mg.intAttr(g,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return NC.foreach(g,e=>{switch(e.localName){case"start":i.start=mg.intAttr(e,"val");break;case"pPr":this.parseDefaultProperties(e,i.pStyle);break;case"rPr":this.parseDefaultProperties(e,i.rStyle);break;case"lvlPicBulletId":var A=mg.intAttr(e,"val");i.bullet=C.find(s=>(s==null?void 0:s.id)==A);break;case"lvlText":i.levelText=mg.attr(e,"val");break;case"pStyle":i.pStyleName=mg.attr(e,"val");break;case"numFmt":i.format=mg.attr(e,"val");break;case"suff":i.suff=mg.attr(e,"val");break}}),i}parseSdt(I,g){const C=mg.element(I,"sdtContent");return C?g(C):[]}parseInserted(I,g){var C;return{type:Ng.Inserted,children:((C=g(I))==null?void 0:C.children)??[]}}parseDeleted(I,g){var C;return{type:Ng.Deleted,children:((C=g(I))==null?void 0:C.children)??[]}}parseAltChunk(I){return{type:Ng.AltChunk,children:[],id:mg.attr(I,"id")}}parseParagraph(I){var g={type:Ng.Paragraph,children:[]};for(let C of mg.elements(I))switch(C.localName){case"pPr":this.parseParagraphProperties(C,g);break;case"r":g.children.push(this.parseRun(C,g));break;case"hyperlink":g.children.push(this.parseHyperlink(C,g));break;case"smartTag":g.children.push(this.parseSmartTag(C,g));break;case"bookmarkStart":g.children.push(Pag(C,mg));break;case"bookmarkEnd":g.children.push(_ag(C,mg));break;case"commentRangeStart":g.children.push(new tog(mg.attr(C,"id")));break;case"commentRangeEnd":g.children.push(new iog(mg.attr(C,"id")));break;case"oMath":case"oMathPara":g.children.push(this.parseMathElement(C));break;case"sdt":g.children.push(...this.parseSdt(C,i=>this.parseParagraph(i).children));break;case"ins":g.children.push(this.parseInserted(C,i=>this.parseParagraph(i)));break;case"del":g.children.push(this.parseDeleted(C,i=>this.parseParagraph(i)));break}return g}parseParagraphProperties(I,g){this.parseDefaultProperties(I,g.cssStyle={},null,C=>{if(e$(C,g,mg))return!0;switch(C.localName){case"pStyle":g.styleName=mg.attr(C,"val");break;case"cnfStyle":g.className=YC.classNameOfCnfStyle(C);break;case"framePr":this.parseFrame(C,g);break;case"rPr":break;default:return!1}return!0})}parseFrame(I,g){var C=mg.attr(I,"dropCap");C=="drop"&&(g.cssStyle.float="left")}parseHyperlink(I,g){var C={type:Ng.Hyperlink,parent:g,children:[]};return C.anchor=mg.attr(I,"anchor"),C.id=mg.attr(I,"id"),NC.foreach(I,i=>{switch(i.localName){case"r":C.children.push(this.parseRun(i,C));break}}),C}parseSmartTag(I,g){var C={type:Ng.SmartTag,parent:g,children:[]},i=mg.attr(I,"uri"),e=mg.attr(I,"element");return i&&(C.uri=i),e&&(C.element=e),NC.foreach(I,A=>{switch(A.localName){case"r":C.children.push(this.parseRun(A,C));break}}),C}parseRun(I,g){var C={type:Ng.Run,parent:g,children:[]};return NC.foreach(I,i=>{switch(i=this.checkAlternateContent(i),i.localName){case"t":C.children.push({type:Ng.Text,text:i.textContent});break;case"delText":C.children.push({type:Ng.DeletedText,text:i.textContent});break;case"commentReference":C.children.push(new Cog(mg.attr(i,"id")));break;case"fldSimple":C.children.push({type:Ng.SimpleField,instruction:mg.attr(i,"instr"),lock:mg.boolAttr(i,"lock",!1),dirty:mg.boolAttr(i,"dirty",!1)});break;case"instrText":C.fieldRun=!0,C.children.push({type:Ng.Instruction,text:i.textContent});break;case"fldChar":C.fieldRun=!0,C.children.push({type:Ng.ComplexField,charType:mg.attr(i,"fldCharType"),lock:mg.boolAttr(i,"lock",!1),dirty:mg.boolAttr(i,"dirty",!1)});break;case"noBreakHyphen":C.children.push({type:Ng.NoBreakHyphen});break;case"br":C.children.push({type:Ng.Break,break:mg.attr(i,"type")||"textWrapping"});break;case"lastRenderedPageBreak":C.children.push({type:Ng.Break,break:"lastRenderedPageBreak"});break;case"sym":C.children.push({type:Ng.Symbol,font:MX(mg.attr(i,"font")),char:mg.attr(i,"char")});break;case"tab":C.children.push({type:Ng.Tab});break;case"footnoteReference":C.children.push({type:Ng.FootnoteReference,id:mg.attr(i,"id")});break;case"endnoteReference":C.children.push({type:Ng.EndnoteReference,id:mg.attr(i,"id")});break;case"drawing":let e=this.parseDrawing(i);e&&(C.children=[e]);break;case"pict":C.children.push(this.parseVmlPicture(i));break;case"rPr":this.parseRunProperties(i,C);break}}),C}parseMathElement(I){const g=`${I.localName}Pr`,C={type:H6[I.localName],children:[]};for(const e of mg.elements(I))if(H6[e.localName])C.children.push(this.parseMathElement(e));else if(e.localName=="r"){var i=this.parseRun(e);i.type=Ng.MmlRun,C.children.push(i)}else e.localName==g&&(C.props=this.parseMathProperies(e));return C}parseMathProperies(I){const g={};for(const C of mg.elements(I))switch(C.localName){case"chr":g.char=mg.attr(C,"val");break;case"vertJc":g.verticalJustification=mg.attr(C,"val");break;case"pos":g.position=mg.attr(C,"val");break;case"degHide":g.hideDegree=mg.boolAttr(C,"val");break;case"begChr":g.beginChar=mg.attr(C,"val");break;case"endChr":g.endChar=mg.attr(C,"val");break}return g}parseRunProperties(I,g){this.parseDefaultProperties(I,g.cssStyle={},null,C=>{switch(C.localName){case"rStyle":g.styleName=mg.attr(C,"val");break;case"vertAlign":g.verticalAlign=YC.valueOfVertAlign(C,!0);break;default:return!1}return!0})}parseVmlPicture(I){const g={type:Ng.VmlPicture,children:[]};for(const C of mg.elements(I)){const i=a$(C,this);i&&g.children.push(i)}return g}checkAlternateContent(I){var e;if(I.localName!="AlternateContent")return I;var g=mg.element(I,"Choice");if(g){var C=mg.attr(g,"Requires"),i=I.lookupNamespaceURI(C);if(eog.includes(i))return g.firstElementChild}return(e=mg.element(I,"Fallback"))==null?void 0:e.firstElementChild}parseDrawing(I){for(var g of mg.elements(I))switch(g.localName){case"inline":case"anchor":return this.parseDrawingWrapper(g)}}parseDrawingWrapper(I){var g={type:Ng.Drawing,children:[],cssStyle:{}},C=I.localName=="anchor";let i=null,e=mg.boolAttr(I,"simplePos");mg.boolAttr(I,"behindDoc");let A={relative:"page",align:"left",offset:"0"},s={relative:"page",align:"top",offset:"0"};for(var l of mg.elements(I))switch(l.localName){case"simplePos":e&&(A.offset=mg.lengthAttr(l,"x",tt.Emu),s.offset=mg.lengthAttr(l,"y",tt.Emu));break;case"extent":g.cssStyle.width=mg.lengthAttr(l,"cx",tt.Emu),g.cssStyle.height=mg.lengthAttr(l,"cy",tt.Emu);break;case"positionH":case"positionV":if(!e){let o=l.localName=="positionH"?A:s;var n=mg.element(l,"align"),a=mg.element(l,"posOffset");o.relative=mg.attr(l,"relativeFrom")??o.relative,n&&(o.align=n.textContent),a&&(o.offset=NC.sizeValue(a,tt.Emu))}break;case"wrapTopAndBottom":i="wrapTopAndBottom";break;case"wrapNone":i="wrapNone";break;case"graphic":var d=this.parseGraphic(l);d&&g.children.push(d);break}return i=="wrapTopAndBottom"?(g.cssStyle.display="block",A.align&&(g.cssStyle["text-align"]=A.align,g.cssStyle.width="100%")):i=="wrapNone"?(g.cssStyle.display="block",g.cssStyle.position="relative",g.cssStyle.width="0px",g.cssStyle.height="0px",A.offset&&(g.cssStyle.left=A.offset),s.offset&&(g.cssStyle.top=s.offset)):C&&(A.align=="left"||A.align=="right")&&(g.cssStyle.float=A.align),g}parseGraphic(I){var g=mg.element(I,"graphicData");for(let C of mg.elements(g))switch(C.localName){case"pic":return this.parsePicture(C)}return null}parsePicture(I){var g={type:Ng.Image,src:"",cssStyle:{}},C=mg.element(I,"blipFill"),i=mg.element(C,"blip");g.src=mg.attr(i,"embed");var e=mg.element(I,"spPr"),A=mg.element(e,"xfrm");g.cssStyle.position="relative";for(var s of mg.elements(A))switch(s.localName){case"ext":g.cssStyle.width=mg.lengthAttr(s,"cx",tt.Emu),g.cssStyle.height=mg.lengthAttr(s,"cy",tt.Emu);break;case"off":g.cssStyle.left=mg.lengthAttr(s,"x",tt.Emu),g.cssStyle.top=mg.lengthAttr(s,"y",tt.Emu);break}return g}parseTable(I){var g={type:Ng.Table,children:[]};return NC.foreach(I,C=>{switch(C.localName){case"tr":g.children.push(this.parseTableRow(C));break;case"tblGrid":g.columns=this.parseTableColumns(C);break;case"tblPr":this.parseTableProperties(C,g);break}}),g}parseTableColumns(I){var g=[];return NC.foreach(I,C=>{switch(C.localName){case"gridCol":g.push({width:mg.lengthAttr(C,"w")});break}}),g}parseTableProperties(I,g){switch(g.cssStyle={},g.cellStyle={},this.parseDefaultProperties(I,g.cssStyle,g.cellStyle,C=>{switch(C.localName){case"tblStyle":g.styleName=mg.attr(C,"val");break;case"tblLook":g.className=YC.classNameOftblLook(C);break;case"tblpPr":this.parseTablePosition(C,g);break;case"tblStyleColBandSize":g.colBandSize=mg.intAttr(C,"val");break;case"tblStyleRowBandSize":g.rowBandSize=mg.intAttr(C,"val");break;default:return!1}return!0}),g.cssStyle["text-align"]){case"center":delete g.cssStyle["text-align"],g.cssStyle["margin-left"]="auto",g.cssStyle["margin-right"]="auto";break;case"right":delete g.cssStyle["text-align"],g.cssStyle["margin-left"]="auto";break}}parseTablePosition(I,g){var C=mg.lengthAttr(I,"topFromText"),i=mg.lengthAttr(I,"bottomFromText"),e=mg.lengthAttr(I,"rightFromText"),A=mg.lengthAttr(I,"leftFromText");g.cssStyle.float="left",g.cssStyle["margin-bottom"]=YC.addSize(g.cssStyle["margin-bottom"],i),g.cssStyle["margin-left"]=YC.addSize(g.cssStyle["margin-left"],A),g.cssStyle["margin-right"]=YC.addSize(g.cssStyle["margin-right"],e),g.cssStyle["margin-top"]=YC.addSize(g.cssStyle["margin-top"],C)}parseTableRow(I){var g={type:Ng.Row,children:[]};return NC.foreach(I,C=>{switch(C.localName){case"tc":g.children.push(this.parseTableCell(C));break;case"trPr":this.parseTableRowProperties(C,g);break}}),g}parseTableRowProperties(I,g){g.cssStyle=this.parseDefaultProperties(I,{},null,C=>{switch(C.localName){case"cnfStyle":g.className=YC.classNameOfCnfStyle(C);break;case"tblHeader":g.isHeader=mg.boolAttr(C,"val");break;default:return!1}return!0})}parseTableCell(I){var g={type:Ng.Cell,children:[]};return NC.foreach(I,C=>{switch(C.localName){case"tbl":g.children.push(this.parseTable(C));break;case"p":g.children.push(this.parseParagraph(C));break;case"tcPr":this.parseTableCellProperties(C,g);break}}),g}parseTableCellProperties(I,g){g.cssStyle=this.parseDefaultProperties(I,{},null,C=>{switch(C.localName){case"gridSpan":g.span=mg.intAttr(C,"val",null);break;case"vMerge":g.verticalMerge=mg.attr(C,"val")??"continue";break;case"cnfStyle":g.className=YC.classNameOfCnfStyle(C);break;default:return!1}return!0}),this.parseTableCellVerticalText(I,g)}parseTableCellVerticalText(I,g){const C={btLr:{writingMode:"vertical-rl",transform:"rotate(180deg)"},lrTb:{writingMode:"vertical-lr",transform:"none"},tbRl:{writingMode:"vertical-rl",transform:"none"}};NC.foreach(I,i=>{if(i.localName==="textDirection"){const e=mg.attr(i,"val"),A=C[e]||{writingMode:"horizontal-tb"};g.cssStyle["writing-mode"]=A.writingMode,g.cssStyle.transform=A.transform}})}parseDefaultProperties(I,g=null,C=null,i=null){return g=g||{},NC.foreach(I,e=>{if(!(i!=null&&i(e)))switch(e.localName){case"jc":g["text-align"]=YC.valueOfJc(e);break;case"textAlignment":g["vertical-align"]=YC.valueOfTextAlignment(e);break;case"color":g.color=NC.colorAttr(e,"val",null,UY.color);break;case"sz":g["font-size"]=g["min-height"]=mg.lengthAttr(e,"val",tt.FontSize);break;case"shd":g["background-color"]=NC.colorAttr(e,"fill",null,UY.shd);break;case"highlight":g["background-color"]=NC.colorAttr(e,"val",null,UY.highlight);break;case"vertAlign":break;case"position":g.verticalAlign=mg.lengthAttr(e,"val",tt.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":g.width=YC.valueOfSize(e,"w");break;case"trHeight":this.parseTrHeight(e,g);break;case"strike":g["text-decoration"]=mg.boolAttr(e,"val",!0)?"line-through":"none";break;case"b":g["font-weight"]=mg.boolAttr(e,"val",!0)?"bold":"normal";break;case"i":g["font-style"]=mg.boolAttr(e,"val",!0)?"italic":"normal";break;case"caps":g["text-transform"]=mg.boolAttr(e,"val",!0)?"uppercase":"none";break;case"smallCaps":g["font-variant"]=mg.boolAttr(e,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(e,g);break;case"ind":case"tblInd":this.parseIndentation(e,g);break;case"rFonts":this.parseFont(e,g);break;case"tblBorders":this.parseBorderProperties(e,C||g);break;case"tblCellSpacing":g["border-spacing"]=YC.valueOfMargin(e),g["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(e,g);break;case"bdr":g.border=YC.valueOfBorder(e);break;case"tcBorders":this.parseBorderProperties(e,g);break;case"vanish":mg.boolAttr(e,"val",!0)&&(g.display="none");break;case"kern":break;case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(e,C||g);break;case"tblLayout":g["table-layout"]=YC.valueOfTblLayout(e);break;case"vAlign":g["vertical-align"]=YC.valueOfTextAlignment(e);break;case"spacing":I.localName=="pPr"&&this.parseSpacing(e,g);break;case"wordWrap":mg.boolAttr(e,"val")&&(g["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":g.hyphens=mg.boolAttr(e,"val",!0)?"none":"auto";break;case"lang":g.$lang=mg.attr(e,"val");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${I.localName}.${e.localName}`);break}}),g}parseUnderline(I,g){var C=mg.attr(I,"val");if(C!=null){switch(C){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":g["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":g["text-decoration"]="underline dotted";break;case"double":g["text-decoration"]="underline double";break;case"single":case"thick":g["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":g["text-decoration"]="underline wavy";break;case"words":g["text-decoration"]="underline";break;case"none":g["text-decoration"]="none";break}var i=NC.colorAttr(I,"color");i&&(g["text-decoration-color"]=i)}}parseFont(I,g){var C=mg.attr(I,"ascii"),i=YC.themeValue(I,"asciiTheme"),e=mg.attr(I,"eastAsia"),A=[C,i,e].filter(s=>s).map(s=>MX(s));A.length>0&&(g["font-family"]=[...new Set(A)].join(", "))}parseIndentation(I,g){var C=mg.lengthAttr(I,"firstLine"),i=mg.lengthAttr(I,"hanging"),e=mg.lengthAttr(I,"left"),A=mg.lengthAttr(I,"start"),s=mg.lengthAttr(I,"right"),l=mg.lengthAttr(I,"end");C&&(g["text-indent"]=C),i&&(g["text-indent"]=`-${i}`),(e||A)&&(g["margin-left"]=e||A),(s||l)&&(g["margin-right"]=s||l)}parseSpacing(I,g){var C=mg.lengthAttr(I,"before"),i=mg.lengthAttr(I,"after"),e=mg.intAttr(I,"line",null),A=mg.attr(I,"lineRule");if(C&&(g["margin-top"]=C),i&&(g["margin-bottom"]=i),e!==null)switch(A){case"auto":g["line-height"]=`${(e/240).toFixed(2)}`;break;case"atLeast":g["line-height"]=`calc(100% + ${e/20}pt)`;break;default:g["line-height"]=g["min-height"]=`${e/20}pt`;break}}parseMarginProperties(I,g){NC.foreach(I,C=>{switch(C.localName){case"left":g["padding-left"]=YC.valueOfMargin(C);break;case"right":g["padding-right"]=YC.valueOfMargin(C);break;case"top":g["padding-top"]=YC.valueOfMargin(C);break;case"bottom":g["padding-bottom"]=YC.valueOfMargin(C);break}})}parseTrHeight(I,g){switch(mg.attr(I,"hRule")){case"exact":g.height=mg.lengthAttr(I,"val");break;case"atLeast":default:g.height=mg.lengthAttr(I,"val");break}}parseBorderProperties(I,g){NC.foreach(I,C=>{switch(C.localName){case"start":case"left":g["border-left"]=YC.valueOfBorder(C);break;case"end":case"right":g["border-right"]=YC.valueOfBorder(C);break;case"top":g["border-top"]=YC.valueOfBorder(C);break;case"bottom":g["border-bottom"]=YC.valueOfBorder(C);break}})}}const sog=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class NC{static foreach(I,g){for(var C=0;C<I.childNodes.length;C++){let i=I.childNodes[C];i.nodeType==Node.ELEMENT_NODE&&g(i)}}static colorAttr(I,g,C=null,i="black"){var e=mg.attr(I,g);if(e)return e=="auto"?i:sog.includes(e)?e:`#${e}`;var A=mg.attr(I,"themeColor");return A?`var(--docx-${A}-color)`:C}static sizeValue(I,g=tt.Dxa){return g$(I.textContent,g)}}class YC{static themeValue(I,g){var C=mg.attr(I,g);return C?`var(--docx-${C}-font)`:null}static valueOfSize(I,g){var C=tt.Dxa;switch(mg.attr(I,"type")){case"dxa":break;case"pct":C=tt.Percent;break;case"auto":return"auto"}return mg.lengthAttr(I,g,C)}static valueOfMargin(I){return mg.lengthAttr(I,"w")}static valueOfBorder(I){var g=mg.attr(I,"val");if(g=="nil")return"none";var C=NC.colorAttr(I,"color"),i=mg.lengthAttr(I,"sz",tt.Border);return`${i} solid ${C=="auto"?UY.borderColor:C}`}static valueOfTblLayout(I){var g=mg.attr(I,"val");return g=="fixed"?"fixed":"auto"}static classNameOfCnfStyle(I){const g=mg.attr(I,"val");return["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"].filter((i,e)=>g[e]=="1").join(" ")}static valueOfJc(I){var g=mg.attr(I,"val");switch(g){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return g}static valueOfVertAlign(I,g=!1){var C=mg.attr(I,"val");switch(C){case"subscript":return"sub";case"superscript":return g?"sup":"super"}return g?null:C}static valueOfTextAlignment(I){var g=mg.attr(I,"val");switch(g){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return g}static addSize(I,g){return I==null?g:g==null?I:`calc(${I} + ${g})`}static classNameOftblLook(I){const g=mg.hexAttr(I,"val",0);let C="";return(mg.boolAttr(I,"firstRow")||g&32)&&(C+=" first-row"),(mg.boolAttr(I,"lastRow")||g&64)&&(C+=" last-row"),(mg.boolAttr(I,"firstColumn")||g&128)&&(C+=" first-col"),(mg.boolAttr(I,"lastColumn")||g&256)&&(C+=" last-col"),(mg.boolAttr(I,"noHBand")||g&512)&&(C+=" no-hband"),(mg.boolAttr(I,"noVBand")||g&1024)&&(C+=" no-vband"),C.trim()}}const X6={pos:0,leader:"none",style:"left"},log=50;function nog(t=document.body){const I=document.createElement("div");I.style.width="100pt",t.appendChild(I);const g=100/I.offsetWidth;return t.removeChild(I),g}function aog(t,I,g,C=72/96){const i=t.closest("p"),e=t.getBoundingClientRect(),A=i.getBoundingClientRect(),s=getComputedStyle(i),l=(I==null?void 0:I.length)>0?I.map(m=>({pos:S6(m.position),leader:m.leader,style:m.style})).sort((m,Z)=>m.pos-Z.pos):[X6],n=l[l.length-1],a=A.width*C,d=S6(g);let o=n.pos+d;if(o<a)for(;o<a&&l.length<log;o+=d)l.push({...X6,pos:o});const c=parseFloat(s.marginLeft),r=A.left+c,h=(e.left-r)*C,b=l.find(m=>m.style!="clear"&&m.pos>h);if(b==null)return;let u=1;if(b.style=="right"||b.style=="center"){const m=Array.from(i.querySelectorAll(`.${t.className}`)),Z=m.indexOf(t)+1,p=document.createRange();p.setStart(t,1),Z<m.length?p.setEndBefore(m[Z]):p.setEndAfter(i);const Y=b.style=="center"?.5:1,R=p.getBoundingClientRect(),X=R.left+Y*R.width-(A.left-c);u=b.pos-X*C}else u=b.pos-h;switch(t.innerHTML="&nbsp;",t.style.textDecoration="inherit",t.style.wordSpacing=`${u.toFixed(0)}pt`,b.leader){case"dot":case"middleDot":t.style.textDecoration="underline",t.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":t.style.textDecoration="underline";break}}function S6(t){return parseFloat(t)}const xI={svg:"http://www.w3.org/2000/svg",mathML:"http://www.w3.org/1998/Math/MathML"};class oog{constructor(I){this.htmlDocument=I,this.className="docx",this.styleMap={},this.currentPart=null,this.tableVerticalMerges=[],this.currentVerticalMerge=null,this.tableCellPositions=[],this.currentCellPosition=null,this.footnoteMap={},this.endnoteMap={},this.currentEndnoteIds=[],this.usedHederFooterParts=[],this.currentTabs=[],this.commentMap={},this.tasks=[],this.postRenderTasks=[]}async render(I,g,C=null,i){var A;this.document=I,this.options=i,this.className=i.className,this.rootSelector=i.inWrapper?`.${this.className}-wrapper`:":root",this.styleMap=null,this.tasks=[],this.options.renderComments&&globalThis.Highlight&&(this.commentHighlight=new Highlight),C=C||g,D6(C),D6(g),C.appendChild(this.createComment("docxjs library predefined styles")),C.appendChild(this.renderDefaultStyle()),I.themePart&&(C.appendChild(this.createComment("docxjs document theme values")),this.renderTheme(I.themePart,C)),I.stylesPart!=null&&(this.styleMap=this.processStyles(I.stylesPart.styles),C.appendChild(this.createComment("docxjs document styles")),C.appendChild(this.renderStyles(I.stylesPart.styles))),I.numberingPart&&(this.prodessNumberings(I.numberingPart.domNumberings),C.appendChild(this.createComment("docxjs document numbering styles")),C.appendChild(this.renderNumbering(I.numberingPart.domNumberings,C))),I.footnotesPart&&(this.footnoteMap=En(I.footnotesPart.notes,s=>s.id)),I.endnotesPart&&(this.endnoteMap=En(I.endnotesPart.notes,s=>s.id)),I.settingsPart&&(this.defaultTabSize=(A=I.settingsPart.settings)==null?void 0:A.defaultTabStop),!i.ignoreFonts&&I.fontTablePart&&this.renderFontTable(I.fontTablePart,C);var e=this.renderSections(I.documentPart.body);this.options.inWrapper?g.appendChild(this.renderWrapper(e)):yH(g,e),this.commentHighlight&&i.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.postRenderTasks.forEach(s=>s()),await Promise.allSettled(this.tasks),this.refreshTabStops()}renderTheme(I,g){var s,l;const C={},i=(s=I.theme)==null?void 0:s.fontScheme;i&&(i.majorFont&&(C["--docx-majorHAnsi-font"]=i.majorFont.latinTypeface),i.minorFont&&(C["--docx-minorHAnsi-font"]=i.minorFont.latinTypeface));const e=(l=I.theme)==null?void 0:l.colorScheme;if(e)for(let[n,a]of Object.entries(e.colors))C[`--docx-${n}-color`]=`#${a}`;const A=this.styleToString(`.${this.className}`,C);g.appendChild(this.createStyleElement(A))}renderFontTable(I,g){for(let C of I.fonts)for(let i of C.embedFontRefs)this.tasks.push(this.document.loadFont(i.id,i.key).then(e=>{const A={"font-family":MX(C.name),src:`url(${e})`};(i.type=="bold"||i.type=="boldItalic")&&(A["font-weight"]="bold"),(i.type=="italic"||i.type=="boldItalic")&&(A["font-style"]="italic");const s=this.styleToString("@font-face",A);g.appendChild(this.createComment(`docxjs ${C.name} font`)),g.appendChild(this.createStyleElement(s))}))}processStyleName(I){return I?`${this.className}_${Eng(I)}`:this.className}processStyles(I){const g=En(I.filter(i=>i.id!=null),i=>i.id);for(const i of I.filter(e=>e.basedOn)){var C=g[i.basedOn];if(C){i.paragraphProps=zN(i.paragraphProps,C.paragraphProps),i.runProps=zN(i.runProps,C.runProps);for(const e of C.styles){const A=i.styles.find(s=>s.target==e.target);A?this.copyStyleProperties(e.values,A.values):i.styles.push({...e,values:{...e.values}})}}else this.options.debug&&console.warn(`Can't find base style ${i.basedOn}`)}for(let i of I)i.cssName=this.processStyleName(i.id);return g}prodessNumberings(I){var g;for(let C of I.filter(i=>i.pStyleName)){const i=this.findStyle(C.pStyleName);(g=i==null?void 0:i.paragraphProps)!=null&&g.numbering&&(i.paragraphProps.numbering.level=C.level)}}processElement(I){if(I.children)for(var g of I.children)g.parent=I,g.type==Ng.Table?this.processTable(g):this.processElement(g)}processTable(I){for(var g of I.children)for(var C of g.children)C.cssStyle=this.copyStyleProperties(I.cellStyle,C.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(C)}copyStyleProperties(I,g,C=null){if(!I)return g;g==null&&(g={}),C==null&&(C=Object.getOwnPropertyNames(I));for(var i of C)I.hasOwnProperty(i)&&!g.hasOwnProperty(i)&&(g[i]=I[i]);return g}createPageElement(I,g){var C=this.createElement("section",{className:I});return g&&(g.pageMargins&&(C.style.paddingLeft=g.pageMargins.left,C.style.paddingRight=g.pageMargins.right,C.style.paddingTop=g.pageMargins.top,C.style.paddingBottom=g.pageMargins.bottom),g.pageSize&&(this.options.ignoreWidth||(C.style.width=g.pageSize.width),this.options.ignoreHeight||(C.style.minHeight=g.pageSize.height))),C}createSectionContent(I){var g=this.createElement("article");return I.columns&&I.columns.numberOfColumns&&(g.style.columnCount=`${I.columns.numberOfColumns}`,g.style.columnGap=I.columns.space,I.columns.separator&&(g.style.columnRule="1px solid black")),g}renderSections(I){const g=[];this.processElement(I);const C=this.splitBySection(I.children,I.props),i=this.groupByPageBreaks(C);let e=null;for(let s=0,l=i.length;s<l;s++){this.currentFootnoteIds=[];let a=i[s][0].sectProps;const d=this.createPageElement(this.className,a);this.renderStyleValues(I.cssStyle,d),this.options.renderHeaders&&this.renderHeaderFooter(a.headerRefs,a,g.length,e!=a,d);for(const o of i[s]){var A=this.createSectionContent(o.sectProps);this.renderElements(o.elements,A),d.appendChild(A),a=o.sectProps}this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,d),this.options.renderEndnotes&&s==l-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,d),this.options.renderFooters&&this.renderHeaderFooter(a.footerRefs,a,g.length,e!=a,d),g.push(d),e=a}return g}renderHeaderFooter(I,g,C,i,e){if(I){var A=(g.titlePage&&i?I.find(l=>l.type=="first"):null)??(C%2==1?I.find(l=>l.type=="even"):null)??I.find(l=>l.type=="default"),s=A&&this.document.findPartByRelId(A.id,this.document.documentPart);if(s){this.currentPart=s,this.usedHederFooterParts.includes(s.path)||(this.processElement(s.rootElement),this.usedHederFooterParts.push(s.path));const[l]=this.renderElements([s.rootElement],e);g!=null&&g.pageMargins&&(s.rootElement.type===Ng.Header?(l.style.marginTop=`calc(${g.pageMargins.header} - ${g.pageMargins.top})`,l.style.minHeight=`calc(${g.pageMargins.top} - ${g.pageMargins.header})`):s.rootElement.type===Ng.Footer&&(l.style.marginBottom=`calc(${g.pageMargins.footer} - ${g.pageMargins.bottom})`,l.style.minHeight=`calc(${g.pageMargins.bottom} - ${g.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(I){return I.type!=Ng.Break?!1:I.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:I.break=="page"}isPageBreakSection(I,g){var C,i,e,A,s,l;return!I||!g?!1:((C=I.pageSize)==null?void 0:C.orientation)!=((i=g.pageSize)==null?void 0:i.orientation)||((e=I.pageSize)==null?void 0:e.width)!=((A=g.pageSize)==null?void 0:A.width)||((s=I.pageSize)==null?void 0:s.height)!=((l=g.pageSize)==null?void 0:l.height)}splitBySection(I,g){var d;var C={sectProps:null,elements:[],pageBreak:!1},i=[C];for(let o of I){if(o.type==Ng.Paragraph){const c=this.findStyle(o.styleName);(d=c==null?void 0:c.paragraphProps)!=null&&d.pageBreakBefore&&(C.sectProps=e,C.pageBreak=!0,C={sectProps:null,elements:[],pageBreak:!1},i.push(C))}if(C.elements.push(o),o.type==Ng.Paragraph){const c=o;var e=c.sectionProps,A=-1,s=-1;if(this.options.breakPages&&c.children&&(A=c.children.findIndex(r=>{var h;return s=((h=r.children)==null?void 0:h.findIndex(this.isPageBreakElement.bind(this)))??-1,s!=-1})),(e||A!=-1)&&(C.sectProps=e,C.pageBreak=A!=-1,C={sectProps:null,elements:[],pageBreak:!1},i.push(C)),A!=-1){let r=c.children[A],h=s<r.children.length-1;if(A<c.children.length-1||h){var l=o.children,n={...o,children:l.slice(A)};if(o.children=l.slice(0,A),C.elements.push(n),h){let b=r.children,u={...r,children:b.slice(0,s)};o.children.push(u),r.children=b.slice(s)}}}}}let a=null;for(let o=i.length-1;o>=0;o--)i[o].sectProps==null?i[o].sectProps=a??g:a=i[o].sectProps;return i}groupByPageBreaks(I){let g=[],C;const i=[g];for(let e of I)g.push(e),(this.options.ignoreLastRenderedPageBreak||e.pageBreak||this.isPageBreakSection(C,e.sectProps))&&i.push(g=[]),C=e.sectProps;return i.filter(e=>e.length>0)}renderWrapper(I){return this.createElement("div",{className:`${this.className}-wrapper`},I)}renderDefaultStyle(){var I=this.className,g=`
.${I}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } 
.${I}-wrapper>section.${I} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }`;this.options.hideWrapperOnPrint&&(g=`@media not print { ${g} }`);var C=`${g}
.${I} { color: black; hyphens: auto; text-underline-position: from-font; }
section.${I} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
section.${I}>article { margin-bottom: auto; z-index: 1; }
section.${I}>footer { z-index: 1; }
.${I} table { border-collapse: collapse; }
.${I} table td, .${I} table th { vertical-align: top; }
.${I} p { margin: 0pt; min-height: 1em; }
.${I} span { white-space: pre-wrap; overflow-wrap: break-word; }
.${I} a { color: inherit; text-decoration: inherit; }
.${I} svg { fill: transparent; }
`;return this.options.renderComments&&(C+=`
.${I}-comment-ref { cursor: default; }
.${I}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; }
.${I}-comment-ref:hover~.${I}-comment-popover { display: block; }
.${I}-comment-author,.${I}-comment-date { font-size: 0.875rem; color: #888; }
`),this.createStyleElement(C)}renderNumbering(I,g){var C="",i=[];for(var e of I){var A=`p.${this.numberingClass(e.id,e.level)}`,s="none";if(e.bullet){let l=`--${this.className}-${e.bullet.src}`.toLowerCase();C+=this.styleToString(`${A}:before`,{content:"' '",display:"inline-block",background:`var(${l})`},e.bullet.style),this.tasks.push(this.document.loadNumberingImage(e.bullet.src).then(n=>{var a=`${this.rootSelector} { ${l}: url(${n}) }`;g.appendChild(this.createStyleElement(a))}))}else if(e.levelText){let l=this.numberingCounter(e.id,e.level);const n=l+" "+(e.start-1);e.level>0&&(C+=this.styleToString(`p.${this.numberingClass(e.id,e.level-1)}`,{"counter-set":n})),i.push(n),C+=this.styleToString(`${A}:before`,{content:this.levelTextToContent(e.levelText,e.suff,e.id,this.numFormatToCssValue(e.format)),"counter-increment":l,...e.rStyle})}else s=this.numFormatToCssValue(e.format);C+=this.styleToString(A,{display:"list-item","list-style-position":"inside","list-style-type":s,...e.pStyle})}return i.length>0&&(C+=this.styleToString(this.rootSelector,{"counter-reset":i.join(" ")})),this.createStyleElement(C)}renderStyles(I){var g="";const C=this.styleMap,i=En(I.filter(l=>l.isDefault),l=>l.target);for(const l of I){var e=l.styles;if(l.linked){var A=l.linked&&C[l.linked];A?e=e.concat(A.styles):this.options.debug&&console.warn(`Can't find linked style ${l.linked}`)}for(const n of e){var s=`${l.target??""}.${l.cssName}`;l.target!=n.target&&(s+=` ${n.target}`),i[l.target]==l&&(s=`.${this.className} ${l.target}, `+s),g+=this.styleToString(s,n.values)}}return this.createStyleElement(g)}renderNotes(I,g,C){var i=I.map(A=>g[A]).filter(A=>A);if(i.length>0){var e=this.createElement("ol",null,this.renderElements(i));C.appendChild(e)}}renderElement(I){switch(I.type){case Ng.Paragraph:return this.renderParagraph(I);case Ng.BookmarkStart:return this.renderBookmarkStart(I);case Ng.BookmarkEnd:return null;case Ng.Run:return this.renderRun(I);case Ng.Table:return this.renderTable(I);case Ng.Row:return this.renderTableRow(I);case Ng.Cell:return this.renderTableCell(I);case Ng.Hyperlink:return this.renderHyperlink(I);case Ng.SmartTag:return this.renderSmartTag(I);case Ng.Drawing:return this.renderDrawing(I);case Ng.Image:return this.renderImage(I);case Ng.Text:return this.renderText(I);case Ng.Text:return this.renderText(I);case Ng.DeletedText:return this.renderDeletedText(I);case Ng.Tab:return this.renderTab(I);case Ng.Symbol:return this.renderSymbol(I);case Ng.Break:return this.renderBreak(I);case Ng.Footer:return this.renderContainer(I,"footer");case Ng.Header:return this.renderContainer(I,"header");case Ng.Footnote:case Ng.Endnote:return this.renderContainer(I,"li");case Ng.FootnoteReference:return this.renderFootnoteReference(I);case Ng.EndnoteReference:return this.renderEndnoteReference(I);case Ng.NoBreakHyphen:return this.createElement("wbr");case Ng.VmlPicture:return this.renderVmlPicture(I);case Ng.VmlElement:return this.renderVmlElement(I);case Ng.MmlMath:return this.renderContainerNS(I,xI.mathML,"math",{xmlns:xI.mathML});case Ng.MmlMathParagraph:return this.renderContainer(I,"span");case Ng.MmlFraction:return this.renderContainerNS(I,xI.mathML,"mfrac");case Ng.MmlBase:return this.renderContainerNS(I,xI.mathML,I.parent.type==Ng.MmlMatrixRow?"mtd":"mrow");case Ng.MmlNumerator:case Ng.MmlDenominator:case Ng.MmlFunction:case Ng.MmlLimit:case Ng.MmlBox:return this.renderContainerNS(I,xI.mathML,"mrow");case Ng.MmlGroupChar:return this.renderMmlGroupChar(I);case Ng.MmlLimitLower:return this.renderContainerNS(I,xI.mathML,"munder");case Ng.MmlMatrix:return this.renderContainerNS(I,xI.mathML,"mtable");case Ng.MmlMatrixRow:return this.renderContainerNS(I,xI.mathML,"mtr");case Ng.MmlRadical:return this.renderMmlRadical(I);case Ng.MmlSuperscript:return this.renderContainerNS(I,xI.mathML,"msup");case Ng.MmlSubscript:return this.renderContainerNS(I,xI.mathML,"msub");case Ng.MmlDegree:case Ng.MmlSuperArgument:case Ng.MmlSubArgument:return this.renderContainerNS(I,xI.mathML,"mn");case Ng.MmlFunctionName:return this.renderContainerNS(I,xI.mathML,"ms");case Ng.MmlDelimiter:return this.renderMmlDelimiter(I);case Ng.MmlRun:return this.renderMmlRun(I);case Ng.MmlNary:return this.renderMmlNary(I);case Ng.MmlPreSubSuper:return this.renderMmlPreSubSuper(I);case Ng.MmlBar:return this.renderMmlBar(I);case Ng.MmlEquationArray:return this.renderMllList(I);case Ng.Inserted:return this.renderInserted(I);case Ng.Deleted:return this.renderDeleted(I);case Ng.CommentRangeStart:return this.renderCommentRangeStart(I);case Ng.CommentRangeEnd:return this.renderCommentRangeEnd(I);case Ng.CommentReference:return this.renderCommentReference(I);case Ng.AltChunk:return this.renderAltChunk(I)}return null}renderElements(I,g){if(I==null)return null;var C=I.flatMap(i=>this.renderElement(i)).filter(i=>i!=null);return g&&yH(g,C),C}renderContainer(I,g,C){return this.createElement(g,C,this.renderElements(I.children))}renderContainerNS(I,g,C,i){return this.createElementNS(g,C,i,this.renderElements(I.children))}renderParagraph(I){var e,A;var g=this.renderContainer(I,"p");const C=this.findStyle(I.styleName);I.tabs??(I.tabs=(e=C==null?void 0:C.paragraphProps)==null?void 0:e.tabs),this.renderClass(I,g),this.renderStyleValues(I.cssStyle,g),this.renderCommonProperties(g.style,I);const i=I.numbering??((A=C==null?void 0:C.paragraphProps)==null?void 0:A.numbering);return i&&g.classList.add(this.numberingClass(i.id,i.level)),g}renderRunProperties(I,g){this.renderCommonProperties(I,g)}renderCommonProperties(I,g){g!=null&&(g.color&&(I.color=g.color),g.fontSize&&(I["font-size"]=g.fontSize))}renderHyperlink(I){var g=this.renderContainer(I,"a");this.renderStyleValues(I.cssStyle,g);let C="";if(I.id){const i=this.document.documentPart.rels.find(e=>e.id==I.id&&e.targetMode==="External");C=(i==null?void 0:i.target)??C}return I.anchor&&(C+=`#${I.anchor}`),g.href=C,g}renderSmartTag(I){return this.renderContainer(I,"span")}renderCommentRangeStart(I){var i;if(!this.options.renderComments)return null;const g=new Range;(i=this.commentHighlight)==null||i.add(g);const C=this.htmlDocument.createComment(`start of comment #${I.id}`);return this.later(()=>g.setStart(C,0)),this.commentMap[I.id]=g,C}renderCommentRangeEnd(I){if(!this.options.renderComments)return null;const g=this.commentMap[I.id],C=this.htmlDocument.createComment(`end of comment #${I.id}`);return this.later(()=>g==null?void 0:g.setEnd(C,0)),C}renderCommentReference(I){var A;if(!this.options.renderComments)return null;var g=(A=this.document.commentsPart)==null?void 0:A.commentMap[I.id];if(!g)return null;const C=new DocumentFragment,i=this.createElement("span",{className:`${this.className}-comment-ref`},["💬"]),e=this.createElement("div",{className:`${this.className}-comment-popover`});return this.renderCommentContent(g,e),C.appendChild(this.htmlDocument.createComment(`comment #${g.id} by ${g.author} on ${g.date}`)),C.appendChild(i),C.appendChild(e),C}renderAltChunk(I){if(!this.options.renderAltChunks)return null;var g=this.createElement("iframe");return this.tasks.push(this.document.loadAltChunk(I.id,this.currentPart).then(C=>{g.srcdoc=C})),g}renderCommentContent(I,g){g.appendChild(this.createElement("div",{className:`${this.className}-comment-author`},[I.author])),g.appendChild(this.createElement("div",{className:`${this.className}-comment-date`},[new Date(I.date).toLocaleString()])),this.renderElements(I.children,g)}renderDrawing(I){var g=this.renderContainer(I,"div");return g.style.display="inline-block",g.style.position="relative",g.style.textIndent="0px",this.renderStyleValues(I.cssStyle,g),g}renderImage(I){let g=this.createElement("img");return this.renderStyleValues(I.cssStyle,g),this.document&&this.tasks.push(this.document.loadDocumentImage(I.src,this.currentPart).then(C=>{g.src=C})),g}renderText(I){return this.htmlDocument.createTextNode(I.text)}renderDeletedText(I){return this.options.renderEndnotes?this.htmlDocument.createTextNode(I.text):null}renderBreak(I){return I.break=="textWrapping"?this.createElement("br"):null}renderInserted(I){return this.options.renderChanges?this.renderContainer(I,"ins"):this.renderElements(I.children)}renderDeleted(I){return this.options.renderChanges?this.renderContainer(I,"del"):null}renderSymbol(I){var g=this.createElement("span");return g.style.fontFamily=I.font,g.innerHTML=`&#x${I.char};`,g}renderFootnoteReference(I){var g=this.createElement("sup");return this.currentFootnoteIds.push(I.id),g.textContent=`${this.currentFootnoteIds.length}`,g}renderEndnoteReference(I){var g=this.createElement("sup");return this.currentEndnoteIds.push(I.id),g.textContent=`${this.currentEndnoteIds.length}`,g}renderTab(I){var i;var g=this.createElement("span");if(g.innerHTML="&emsp;",this.options.experimental){g.className=this.tabStopClass();var C=(i=cog(I,Ng.Paragraph))==null?void 0:i.tabs;this.currentTabs.push({stops:C,span:g})}return g}renderBookmarkStart(I){return this.createElement("span",{id:I.name})}renderRun(I){if(I.fieldRun)return null;const g=this.createElement("span");if(I.id&&(g.id=I.id),this.renderClass(I,g),this.renderStyleValues(I.cssStyle,g),I.verticalAlign){const C=this.createElement(I.verticalAlign);this.renderElements(I.children,C),g.appendChild(C)}else this.renderElements(I.children,g);return g}renderTable(I){let g=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},I.columns&&g.appendChild(this.renderTableColumns(I.columns)),this.renderClass(I,g),this.renderElements(I.children,g),this.renderStyleValues(I.cssStyle,g),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),g}renderTableColumns(I){let g=this.createElement("colgroup");for(let C of I){let i=this.createElement("col");C.width&&(i.style.width=C.width),g.appendChild(i)}return g}renderTableRow(I){let g=this.renderContainer(I,"tr");return this.currentCellPosition.col=0,this.renderClass(I,g),this.renderStyleValues(I.cssStyle,g),this.currentCellPosition.row++,g}renderTableCell(I){let g=this.renderContainer(I,"td");const C=this.currentCellPosition.col;return I.verticalMerge?I.verticalMerge=="restart"?(this.currentVerticalMerge[C]=g,g.rowSpan=1):this.currentVerticalMerge[C]&&(this.currentVerticalMerge[C].rowSpan+=1,g.style.display="none"):this.currentVerticalMerge[C]=null,this.renderClass(I,g),this.renderStyleValues(I.cssStyle,g),I.span&&(g.colSpan=I.span),this.currentCellPosition.col+=g.colSpan,g}renderVmlPicture(I){return this.renderContainer(I,"div")}renderVmlElement(I){var i,e;var g=this.createSvgElement("svg");g.setAttribute("style",I.cssStyleText);const C=this.renderVmlChildElement(I);return(i=I.imageHref)!=null&&i.id&&this.tasks.push((e=this.document)==null?void 0:e.loadDocumentImage(I.imageHref.id,this.currentPart).then(A=>C.setAttribute("href",A))),g.appendChild(C),requestAnimationFrame(()=>{const A=g.firstElementChild.getBBox();g.setAttribute("width",`${Math.ceil(A.x+A.width)}`),g.setAttribute("height",`${Math.ceil(A.y+A.height)}`)}),g}renderVmlChildElement(I){const g=this.createSvgElement(I.tagName);Object.entries(I.attrs).forEach(([C,i])=>g.setAttribute(C,i));for(let C of I.children)C.type==Ng.VmlElement?g.appendChild(this.renderVmlChildElement(C)):g.appendChild(...Gu(this.renderElement(C)));return g}renderMmlRadical(I){var i;const g=I.children.find(e=>e.type==Ng.MmlBase);if((i=I.props)!=null&&i.hideDegree)return this.createElementNS(xI.mathML,"msqrt",null,this.renderElements([g]));const C=I.children.find(e=>e.type==Ng.MmlDegree);return this.createElementNS(xI.mathML,"mroot",null,this.renderElements([g,C]))}renderMmlDelimiter(I){const g=[];return g.push(this.createElementNS(xI.mathML,"mo",null,[I.props.beginChar??"("])),g.push(...this.renderElements(I.children)),g.push(this.createElementNS(xI.mathML,"mo",null,[I.props.endChar??")"])),this.createElementNS(xI.mathML,"mrow",null,g)}renderMmlNary(I){var n;const g=[],C=En(I.children,a=>a.type),i=C[Ng.MmlSuperArgument],e=C[Ng.MmlSubArgument],A=i?this.createElementNS(xI.mathML,"mo",null,Gu(this.renderElement(i))):null,s=e?this.createElementNS(xI.mathML,"mo",null,Gu(this.renderElement(e))):null,l=this.createElementNS(xI.mathML,"mo",null,[((n=I.props)==null?void 0:n.char)??"∫"]);return A||s?g.push(this.createElementNS(xI.mathML,"munderover",null,[l,s,A])):A?g.push(this.createElementNS(xI.mathML,"mover",null,[l,A])):s?g.push(this.createElementNS(xI.mathML,"munder",null,[l,s])):g.push(l),g.push(...this.renderElements(C[Ng.MmlBase].children)),this.createElementNS(xI.mathML,"mrow",null,g)}renderMmlPreSubSuper(I){const g=[],C=En(I.children,n=>n.type),i=C[Ng.MmlSuperArgument],e=C[Ng.MmlSubArgument],A=i?this.createElementNS(xI.mathML,"mo",null,Gu(this.renderElement(i))):null,s=e?this.createElementNS(xI.mathML,"mo",null,Gu(this.renderElement(e))):null,l=this.createElementNS(xI.mathML,"mo",null);return g.push(this.createElementNS(xI.mathML,"msubsup",null,[l,s,A])),g.push(...this.renderElements(C[Ng.MmlBase].children)),this.createElementNS(xI.mathML,"mrow",null,g)}renderMmlGroupChar(I){const g=I.props.verticalJustification==="bot"?"mover":"munder",C=this.renderContainerNS(I,xI.mathML,g);return I.props.char&&C.appendChild(this.createElementNS(xI.mathML,"mo",null,[I.props.char])),C}renderMmlBar(I){const g=this.renderContainerNS(I,xI.mathML,"mrow");switch(I.props.position){case"top":g.style.textDecoration="overline";break;case"bottom":g.style.textDecoration="underline";break}return g}renderMmlRun(I){const g=this.createElementNS(xI.mathML,"ms",null,this.renderElements(I.children));return this.renderClass(I,g),this.renderStyleValues(I.cssStyle,g),g}renderMllList(I){const g=this.createElementNS(xI.mathML,"mtable");this.renderClass(I,g),this.renderStyleValues(I.cssStyle,g);for(let C of this.renderElements(I.children))g.appendChild(this.createElementNS(xI.mathML,"mtr",null,[this.createElementNS(xI.mathML,"mtd",null,[C])]));return g}renderStyleValues(I,g){for(let C in I)C.startsWith("$")?g.setAttribute(C.slice(1),I[C]):g.style[C]=I[C]}renderClass(I,g){I.className&&(g.className=I.className),I.styleName&&g.classList.add(this.processStyleName(I.styleName))}findStyle(I){var g;return I&&((g=this.styleMap)==null?void 0:g[I])}numberingClass(I,g){return`${this.className}-num-${I}-${g}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(I,g,C=null){let i=`${I} {\r
`;for(const e in g)e.startsWith("$")||(i+=`  ${e}: ${g[e]};\r
`);return C&&(i+=C),i+`}\r
`}numberingCounter(I,g){return`${this.className}-num-${I}-${g}`}levelTextToContent(I,g,C,i){const e={tab:"\\9",space:"\\a0"};var A=I.replace(/%\d*/g,s=>{let l=parseInt(s.substring(1),10)-1;return`"counter(${this.numberingCounter(C,l)}, ${i})"`});return`"${A}${e[g]??""}"`}numFormatToCssValue(I){var g={none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"};return g[I]??I}refreshTabStops(){this.options.experimental&&setTimeout(()=>{const I=nog();for(let g of this.currentTabs)aog(g.span,g.stops,this.defaultTabSize,I)},500)}createElementNS(I,g,C,i){var e=I?this.htmlDocument.createElementNS(I,g):this.htmlDocument.createElement(g);return Object.assign(e,C),i&&yH(e,i),e}createElement(I,g,C){return this.createElementNS(void 0,I,g,C)}createSvgElement(I,g,C){return this.createElementNS(xI.svg,I,g,C)}createStyleElement(I){return this.createElement("style",{innerHTML:I})}createComment(I){return this.htmlDocument.createComment(I)}later(I){this.postRenderTasks.push(I)}}function D6(t){t.innerHTML=""}function yH(t,I){I.forEach(g=>t.appendChild(_ng(g)?document.createTextNode(g):g))}function cog(t,I){for(var g=t.parent;g!=null&&g.type!=I;)g=g.parent;return g}const ED={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,hideWrapperOnPrint:!1,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1,renderAltChunks:!0};function dog(t,I){const g={...ED,...I};return UD.load(t,new Aog(g),g)}async function rog(t,I,g,C){const i={...ED,...C};return await new oog(window.document).render(t,I,g,i)}async function hog(t,I,g,C){const i=await dog(t,C);return await rog(i,I,g,C),i}var sm={};sm.d=(t,I)=>{for(var g in I)sm.o(I,g)&&!sm.o(t,g)&&Object.defineProperty(t,g,{enumerable:!0,get:I[g]})};sm.o=(t,I)=>Object.prototype.hasOwnProperty.call(t,I);var GI=globalThis.pdfjsLib={};sm.d(GI,{AbortException:()=>za,AnnotationEditorLayer:()=>vS,AnnotationEditorParamsType:()=>gC,AnnotationEditorType:()=>RI,AnnotationEditorUIManager:()=>td,AnnotationLayer:()=>uS,AnnotationMode:()=>qn,AnnotationType:()=>lt,ColorPicker:()=>QN,DOMSVGFactory:()=>xN,DrawLayer:()=>jS,FeatureTest:()=>gi,GlobalWorkerOptions:()=>Kl,ImageKind:()=>EY,InvalidPDFException:()=>fX,MathClamp:()=>Wi,OPS:()=>JN,OutputScale:()=>jl,PDFDataRangeTransport:()=>dgg,PDFDateString:()=>g9,PDFWorker:()=>Ch,PasswordResponses:()=>mog,PermissionFlag:()=>uog,PixelsPerInch:()=>Ja,RenderingCancelledException:()=>qD,ResponseException:()=>LN,SignatureExtractor:()=>Fl,SupportedImageMimeTypes:()=>XX,TextLayer:()=>mm,TouchManager:()=>TN,Util:()=>iI,VerbosityLevel:()=>DV,XfaLayer:()=>hgg,build:()=>Jcg,createValidAbsoluteUrl:()=>pog,fetchData:()=>OZ,getDocument:()=>Mcg,getFilenameFromUrl:()=>fog,getPdfFilenameFromUrl:()=>Hog,getUuid:()=>d$,getXfaPageViewport:()=>Xog,isDataScheme:()=>kV,isPdfFile:()=>$D,isValidExplicitDest:()=>Xcg,noContextMenu:()=>MA,normalizeUnicode:()=>Vog,setLayerDimensions:()=>Cd,shadow:()=>jI,stopEvent:()=>at,version:()=>zcg});const Ot=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),o$=[1,0,0,1,0,0],RX=[.001,0,0,.001,0,0],YH=1.35,be={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},qn={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},bog="pdfjs_internal_editor_",RI={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,SIGNATURE:101},gC={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},uog={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},ni={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},EY={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},lt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},Kr={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},DV={ERRORS:0,WARNINGS:1,INFOS:5},JN={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},pY={moveTo:0,lineTo:1,curveTo:2,closePath:3},mog={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let KV=DV.WARNINGS;function Zog(t){Number.isInteger(t)&&(KV=t)}function Gog(){return KV}function FV(t){KV>=DV.INFOS&&console.log(`Info: ${t}`)}function HI(t){KV>=DV.WARNINGS&&console.log(`Warning: ${t}`)}function ZC(t){throw new Error(t)}function ct(t,I){t||ZC(I)}function wog(t){switch(t==null?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function pog(t,I=null,g=null){if(!t)return null;if(g&&typeof t=="string"){if(g.addDefaultProtocol&&t.startsWith("www.")){const i=t.match(/\./g);(i==null?void 0:i.length)>=2&&(t=`http://${t}`)}if(g.tryConvertEncoding)try{t=Nog(t)}catch{}}const C=I?URL.parse(t,I):URL.parse(t);return wog(C)?C:null}function jI(t,I,g,C=!1){return Object.defineProperty(t,I,{value:g,enumerable:!C,configurable:!0,writable:!1}),g}const sd=function(){function I(g,C){this.message=g,this.name=C}return I.prototype=new Error,I.constructor=I,I}();class K6 extends sd{constructor(I,g){super(I,"PasswordException"),this.code=g}}class NH extends sd{constructor(I,g){super(I,"UnknownErrorException"),this.details=g}}class fX extends sd{constructor(I){super(I,"InvalidPDFException")}}class LN extends sd{constructor(I,g,C){super(I,"ResponseException"),this.status=g,this.missing=C}}class Bog extends sd{constructor(I){super(I,"FormatError")}}class za extends sd{constructor(I){super(I,"AbortException")}}function c$(t){(typeof t!="object"||(t==null?void 0:t.length)===void 0)&&ZC("Invalid argument for bytesToString");const I=t.length,g=8192;if(I<g)return String.fromCharCode.apply(null,t);const C=[];for(let i=0;i<I;i+=g){const e=Math.min(i+g,I),A=t.subarray(i,e);C.push(String.fromCharCode.apply(null,A))}return C.join("")}function QZ(t){typeof t!="string"&&ZC("Invalid argument for stringToBytes");const I=t.length,g=new Uint8Array(I);for(let C=0;C<I;++C)g[C]=t.charCodeAt(C)&255;return g}function Wog(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255)}function PD(t){const I=Object.create(null);for(const[g,C]of t)I[g]=C;return I}function yog(){const t=new Uint8Array(4);return t[0]=1,new Uint32Array(t.buffer,0,1)[0]===1}function Yog(){try{return new Function(""),!0}catch{return!1}}class gi{static get isLittleEndian(){return jI(this,"isLittleEndian",yog())}static get isEvalSupported(){return jI(this,"isEvalSupported",Yog())}static get isOffscreenCanvasSupported(){return jI(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return jI(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){if(typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"){const{platform:I,userAgent:g}=navigator;return jI(this,"platform",{isAndroid:g.includes("Android"),isLinux:I.includes("Linux"),isMac:I.includes("Mac"),isWindows:I.includes("Win"),isFirefox:g.includes("Firefox")})}return jI(this,"platform",{isAndroid:!1,isLinux:!1,isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var I,g;return jI(this,"isCSSRoundSupported",(g=(I=globalThis.CSS)==null?void 0:I.supports)==null?void 0:g.call(I,"width: round(1.5px, 1px)"))}}const VH=Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0"));var Tl,PY,HX;class iI{static makeHexColor(I,g,C){return`#${VH[I]}${VH[g]}${VH[C]}`}static transform(I,g){return[I[0]*g[0]+I[2]*g[1],I[1]*g[0]+I[3]*g[1],I[0]*g[2]+I[2]*g[3],I[1]*g[2]+I[3]*g[3],I[0]*g[4]+I[2]*g[5]+I[4],I[1]*g[4]+I[3]*g[5]+I[5]]}static applyTransform(I,g){const C=I[0]*g[0]+I[1]*g[2]+g[4],i=I[0]*g[1]+I[1]*g[3]+g[5];return[C,i]}static applyInverseTransform(I,g){const C=g[0]*g[3]-g[1]*g[2],i=(I[0]*g[3]-I[1]*g[2]+g[2]*g[5]-g[4]*g[3])/C,e=(-I[0]*g[1]+I[1]*g[0]+g[4]*g[1]-g[5]*g[0])/C;return[i,e]}static getAxialAlignedBoundingBox(I,g){const C=this.applyTransform(I,g),i=this.applyTransform(I.slice(2,4),g),e=this.applyTransform([I[0],I[3]],g),A=this.applyTransform([I[2],I[1]],g);return[Math.min(C[0],i[0],e[0],A[0]),Math.min(C[1],i[1],e[1],A[1]),Math.max(C[0],i[0],e[0],A[0]),Math.max(C[1],i[1],e[1],A[1])]}static inverseTransform(I){const g=I[0]*I[3]-I[1]*I[2];return[I[3]/g,-I[1]/g,-I[2]/g,I[0]/g,(I[2]*I[5]-I[4]*I[3])/g,(I[4]*I[1]-I[5]*I[0])/g]}static singularValueDecompose2dScale(I){const g=[I[0],I[2],I[1],I[3]],C=I[0]*g[0]+I[1]*g[2],i=I[0]*g[1]+I[1]*g[3],e=I[2]*g[0]+I[3]*g[2],A=I[2]*g[1]+I[3]*g[3],s=(C+A)/2,l=Math.sqrt((C+A)**2-4*(C*A-e*i))/2,n=s+l||1,a=s-l||1;return[Math.sqrt(n),Math.sqrt(a)]}static normalizeRect(I){const g=I.slice(0);return I[0]>I[2]&&(g[0]=I[2],g[2]=I[0]),I[1]>I[3]&&(g[1]=I[3],g[3]=I[1]),g}static intersect(I,g){const C=Math.max(Math.min(I[0],I[2]),Math.min(g[0],g[2])),i=Math.min(Math.max(I[0],I[2]),Math.max(g[0],g[2]));if(C>i)return null;const e=Math.max(Math.min(I[1],I[3]),Math.min(g[1],g[3])),A=Math.min(Math.max(I[1],I[3]),Math.max(g[1],g[3]));return e>A?null:[C,e,i,A]}static pointBoundingBox(I,g,C){C[0]=Math.min(C[0],I),C[1]=Math.min(C[1],g),C[2]=Math.max(C[2],I),C[3]=Math.max(C[3],g)}static rectBoundingBox(I,g,C,i,e){e[0]=Math.min(e[0],I,C),e[1]=Math.min(e[1],g,i),e[2]=Math.max(e[2],I,C),e[3]=Math.max(e[3],g,i)}static bezierBoundingBox(I,g,C,i,e,A,s,l,n){n[0]=Math.min(n[0],I,s),n[1]=Math.min(n[1],g,l),n[2]=Math.max(n[2],I,s),n[3]=Math.max(n[3],g,l),eg(this,Tl,HX).call(this,I,C,e,s,g,i,A,l,3*(-I+3*(C-e)+s),6*(I-2*C+e),3*(C-I),n),eg(this,Tl,HX).call(this,I,C,e,s,g,i,A,l,3*(-g+3*(i-A)+l),6*(g-2*i+A),3*(i-g),n)}}Tl=new WeakSet,PY=function(I,g,C,i,e,A,s,l,n,a){if(n<=0||n>=1)return;const d=1-n,o=n*n,c=o*n,r=d*(d*(d*I+3*n*g)+3*o*C)+c*i,h=d*(d*(d*e+3*n*A)+3*o*s)+c*l;a[0]=Math.min(a[0],r),a[1]=Math.min(a[1],h),a[2]=Math.max(a[2],r),a[3]=Math.max(a[3],h)},HX=function(I,g,C,i,e,A,s,l,n,a,d,o){if(Math.abs(n)<1e-12){Math.abs(a)>=1e-12&&eg(this,Tl,PY).call(this,I,g,C,i,e,A,s,l,-d/a,o);return}const c=a**2-4*d*n;if(c<0)return;const r=Math.sqrt(c),h=2*n;eg(this,Tl,PY).call(this,I,g,C,i,e,A,s,l,(-a+r)/h,o),eg(this,Tl,PY).call(this,I,g,C,i,e,A,s,l,(-a-r)/h,o)},ig(iI,Tl);function Nog(t){return decodeURIComponent(escape(t))}let MH=null,F6=null;function Vog(t){return MH||(MH=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,F6=new Map([["ﬅ","ſt"]])),t.replaceAll(MH,(I,g,C)=>g?g.normalize("NFKC"):F6.get(C))}function d$(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const t=new Uint8Array(32);return crypto.getRandomValues(t),c$(t)}const _D="pdfjs_internal_id_";function Mog(t,I,g){if(!Array.isArray(g)||g.length<2)return!1;const[C,i,...e]=g;if(!t(C)&&!Number.isInteger(C)||!I(i))return!1;const A=e.length;let s=!0;switch(i.name){case"XYZ":if(A<2||A>3)return!1;break;case"Fit":case"FitB":return A===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(A>1)return!1;break;case"FitR":if(A!==4)return!1;s=!1;break;default:return!1}for(const l of e)if(!(typeof l=="number"||s&&l===null))return!1;return!0}function Wi(t,I,g){return Math.min(Math.max(t,I),g)}function r$(t){return Uint8Array.prototype.toBase64?t.toBase64():btoa(c$(t))}function Rog(t){return Uint8Array.fromBase64?Uint8Array.fromBase64(t):QZ(atob(t))}typeof Promise.try!="function"&&(Promise.try=function(t,...I){return new Promise(g=>{g(t(...I))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(t){return t.reduce((I,g)=>I+g,0)});const tl="http://www.w3.org/2000/svg",Lo=class Lo{};CI(Lo,"CSS",96),CI(Lo,"PDF",72),CI(Lo,"PDF_TO_CSS_UNITS",Lo.CSS/Lo.PDF);let Ja=Lo;async function OZ(t,I="text"){if(Fr(t,document.baseURI)){const g=await fetch(t);if(!g.ok)throw new Error(g.statusText);switch(I){case"arraybuffer":return g.arrayBuffer();case"blob":return g.blob();case"json":return g.json()}return g.text()}return new Promise((g,C)=>{const i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType=I,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(I){case"arraybuffer":case"blob":case"json":g(i.response);return}g(i.responseText);return}C(new Error(i.statusText))}},i.send(null)})}class UZ{constructor({viewBox:I,userUnit:g,scale:C,rotation:i,offsetX:e=0,offsetY:A=0,dontFlip:s=!1}){this.viewBox=I,this.userUnit=g,this.scale=C,this.rotation=i,this.offsetX=e,this.offsetY=A,C*=g;const l=(I[2]+I[0])/2,n=(I[3]+I[1])/2;let a,d,o,c;switch(i%=360,i<0&&(i+=360),i){case 180:a=-1,d=0,o=0,c=1;break;case 90:a=0,d=1,o=1,c=0;break;case 270:a=0,d=-1,o=-1,c=0;break;case 0:a=1,d=0,o=0,c=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(o=-o,c=-c);let r,h,b,u;a===0?(r=Math.abs(n-I[1])*C+e,h=Math.abs(l-I[0])*C+A,b=(I[3]-I[1])*C,u=(I[2]-I[0])*C):(r=Math.abs(l-I[0])*C+e,h=Math.abs(n-I[1])*C+A,b=(I[2]-I[0])*C,u=(I[3]-I[1])*C),this.transform=[a*C,d*C,o*C,c*C,r-a*C*l-o*C*n,h-d*C*l-c*C*n],this.width=b,this.height=u}get rawDims(){const I=this.viewBox;return jI(this,"rawDims",{pageWidth:I[2]-I[0],pageHeight:I[3]-I[1],pageX:I[0],pageY:I[1]})}clone({scale:I=this.scale,rotation:g=this.rotation,offsetX:C=this.offsetX,offsetY:i=this.offsetY,dontFlip:e=!1}={}){return new UZ({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:I,rotation:g,offsetX:C,offsetY:i,dontFlip:e})}convertToViewportPoint(I,g){return iI.applyTransform([I,g],this.transform)}convertToViewportRectangle(I){const g=iI.applyTransform([I[0],I[1]],this.transform),C=iI.applyTransform([I[2],I[3]],this.transform);return[g[0],g[1],C[0],C[1]]}convertToPdfPoint(I,g){return iI.applyInverseTransform([I,g],this.transform)}}class qD extends sd{constructor(I,g=0){super(I,"RenderingCancelledException"),this.extraDelay=g}}function kV(t){const I=t.length;let g=0;for(;g<I&&t[g].trim()==="";)g++;return t.substring(g,g+5).toLowerCase()==="data:"}function $D(t){return typeof t=="string"&&/\.pdf$/i.test(t)}function fog(t){return[t]=t.split(/[#?]/,1),t.substring(t.lastIndexOf("/")+1)}function Hog(t,I="document.pdf"){if(typeof t!="string")return I;if(kV(t))return HI('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),I;const g=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,C=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=g.exec(t);let e=C.exec(i[1])||C.exec(i[2])||C.exec(i[3]);if(e&&(e=e[0],e.includes("%")))try{e=C.exec(decodeURIComponent(e))[0]}catch{}return e||I}class k6{constructor(){CI(this,"started",Object.create(null));CI(this,"times",[])}time(I){I in this.started&&HI(`Timer is already running for ${I}`),this.started[I]=Date.now()}timeEnd(I){I in this.started||HI(`Timer has not been started for ${I}`),this.times.push({name:I,start:this.started[I],end:Date.now()}),delete this.started[I]}toString(){const I=[];let g=0;for(const{name:C}of this.times)g=Math.max(C.length,g);for(const{name:C,start:i,end:e}of this.times)I.push(`${C.padEnd(g)} ${e-i}ms
`);return I.join("")}}function Fr(t,I){const g=I?URL.parse(t,I):URL.parse(t);return(g==null?void 0:g.protocol)==="http:"||(g==null?void 0:g.protocol)==="https:"}function MA(t){t.preventDefault()}function at(t){t.preventDefault(),t.stopPropagation()}var Bm;class g9{static toDateObject(I){if(!I||typeof I!="string")return null;M(this,Bm)||$(this,Bm,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const g=M(this,Bm).exec(I);if(!g)return null;const C=parseInt(g[1],10);let i=parseInt(g[2],10);i=i>=1&&i<=12?i-1:0;let e=parseInt(g[3],10);e=e>=1&&e<=31?e:1;let A=parseInt(g[4],10);A=A>=0&&A<=23?A:0;let s=parseInt(g[5],10);s=s>=0&&s<=59?s:0;let l=parseInt(g[6],10);l=l>=0&&l<=59?l:0;const n=g[7]||"Z";let a=parseInt(g[8],10);a=a>=0&&a<=23?a:0;let d=parseInt(g[9],10)||0;return d=d>=0&&d<=59?d:0,n==="-"?(A+=a,s+=d):n==="+"&&(A-=a,s-=d),new Date(Date.UTC(C,i,e,A,s,l))}}Bm=new WeakMap,ig(g9,Bm);function Xog(t,{scale:I=1,rotation:g=0}){const{width:C,height:i}=t.attributes.style,e=[0,0,parseInt(C),parseInt(i)];return new UZ({viewBox:e,userUnit:1,scale:I,rotation:g})}function I9(t){if(t.startsWith("#")){const I=parseInt(t.slice(1),16);return[(I&16711680)>>16,(I&65280)>>8,I&255]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map(I=>parseInt(I)):t.startsWith("rgba(")?t.slice(5,-1).split(",").map(I=>parseInt(I)).slice(0,3):(HI(`Not a valid color format: "${t}"`),[0,0,0])}function Sog(t){const I=document.createElement("span");I.style.visibility="hidden",document.body.append(I);for(const g of t.keys()){I.style.color=g;const C=window.getComputedStyle(I).color;t.set(g,I9(C))}I.remove()}function DC(t){const{a:I,b:g,c:C,d:i,e,f:A}=t.getTransform();return[I,g,C,i,e,A]}function _A(t){const{a:I,b:g,c:C,d:i,e,f:A}=t.getTransform().invertSelf();return[I,g,C,i,e,A]}function Cd(t,I,g=!1,C=!0){if(I instanceof UZ){const{pageWidth:i,pageHeight:e}=I.rawDims,{style:A}=t,s=gi.isCSSRoundSupported,l=`var(--total-scale-factor) * ${i}px`,n=`var(--total-scale-factor) * ${e}px`,a=s?`round(down, ${l}, var(--scale-round-x))`:`calc(${l})`,d=s?`round(down, ${n}, var(--scale-round-y))`:`calc(${n})`;!g||I.rotation%180===0?(A.width=a,A.height=d):(A.width=d,A.height=a)}C&&t.setAttribute("data-main-rotation",I.rotation)}class jl{constructor(){const{pixelRatio:I}=jl;this.sx=I,this.sy=I}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(I,g,C,i){let e=1/0,A=1/0,s=1/0;C>0&&(e=Math.sqrt(C/(I*g))),i!==-1&&(A=i/I,s=i/g);const l=Math.min(e,A,s);return this.sx>l||this.sy>l?(this.sx=l,this.sy=l,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}}const XX=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];var ga,Qo,Ke,Ia,Wm,lh,ym,bV,h$,$t,b$,u$,Hu,m$,_Y;const sl=class sl{constructor(I){ig(this,$t);ig(this,ga,null);ig(this,Qo,null);ig(this,Ke);ig(this,Ia,null);ig(this,Wm,null);ig(this,lh,null);$(this,Ke,I),M(sl,ym)||$(sl,ym,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const I=$(this,ga,document.createElement("div"));I.classList.add("editToolbar","hidden"),I.setAttribute("role","toolbar");const g=M(this,Ke)._uiManager._signal;I.addEventListener("contextmenu",MA,{signal:g}),I.addEventListener("pointerdown",eg(sl,bV,h$),{signal:g});const C=$(this,Ia,document.createElement("div"));C.className="buttons",I.append(C);const i=M(this,Ke).toolbarPosition;if(i){const{style:e}=I,A=M(this,Ke)._uiManager.direction==="ltr"?1-i[0]:i[0];e.insetInlineEnd=`${100*A}%`,e.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return eg(this,$t,m$).call(this),I}get div(){return M(this,ga)}hide(){var I;M(this,ga).classList.add("hidden"),(I=M(this,Qo))==null||I.hideDropdown()}show(){var I;M(this,ga).classList.remove("hidden"),(I=M(this,Wm))==null||I.shown()}async addAltText(I){const g=await I.render();eg(this,$t,Hu).call(this,g),M(this,Ia).prepend(g,M(this,$t,_Y)),$(this,Wm,I)}addColorPicker(I){$(this,Qo,I);const g=I.renderButton();eg(this,$t,Hu).call(this,g),M(this,Ia).prepend(g,M(this,$t,_Y))}async addEditSignatureButton(I){const g=$(this,lh,await I.renderEditButton(M(this,Ke)));eg(this,$t,Hu).call(this,g),M(this,Ia).prepend(g,M(this,$t,_Y))}updateEditSignatureButton(I){M(this,lh)&&(M(this,lh).title=I)}remove(){var I;M(this,ga).remove(),(I=M(this,Qo))==null||I.destroy(),$(this,Qo,null)}};ga=new WeakMap,Qo=new WeakMap,Ke=new WeakMap,Ia=new WeakMap,Wm=new WeakMap,lh=new WeakMap,ym=new WeakMap,bV=new WeakSet,h$=function(I){I.stopPropagation()},$t=new WeakSet,b$=function(I){M(this,Ke)._focusEventsAllowed=!1,at(I)},u$=function(I){M(this,Ke)._focusEventsAllowed=!0,at(I)},Hu=function(I){const g=M(this,Ke)._uiManager._signal;I.addEventListener("focusin",eg(this,$t,b$).bind(this),{capture:!0,signal:g}),I.addEventListener("focusout",eg(this,$t,u$).bind(this),{capture:!0,signal:g}),I.addEventListener("contextmenu",MA,{signal:g})},m$=function(){const{editorType:I,_uiManager:g}=M(this,Ke),C=document.createElement("button");C.className="delete",C.tabIndex=0,C.setAttribute("data-l10n-id",M(sl,ym)[I]),eg(this,$t,Hu).call(this,C),C.addEventListener("click",i=>{g.delete()},{signal:g._signal}),M(this,Ia).append(C)},_Y=function(){const I=document.createElement("div");return I.className="divider",I},ig(sl,bV),ig(sl,ym,null);let SX=sl;var Ym,Oo,Uo,va,Z$,G$,w$;class Dog{constructor(I){ig(this,va);ig(this,Ym,null);ig(this,Oo,null);ig(this,Uo);$(this,Uo,I)}show(I,g,C){const[i,e]=eg(this,va,G$).call(this,g,C),{style:A}=M(this,Oo)||$(this,Oo,eg(this,va,Z$).call(this));I.append(M(this,Oo)),A.insetInlineEnd=`${100*i}%`,A.top=`calc(${100*e}% + var(--editor-toolbar-vert-offset))`}hide(){M(this,Oo).remove()}}Ym=new WeakMap,Oo=new WeakMap,Uo=new WeakMap,va=new WeakSet,Z$=function(){const I=$(this,Oo,document.createElement("div"));I.className="editToolbar",I.setAttribute("role","toolbar"),I.addEventListener("contextmenu",MA,{signal:M(this,Uo)._signal});const g=$(this,Ym,document.createElement("div"));return g.className="buttons",I.append(g),eg(this,va,w$).call(this),I},G$=function(I,g){let C=0,i=0;for(const e of I){const A=e.y+e.height;if(A<C)continue;const s=e.x+(g?e.width:0);if(A>C){i=s,C=A;continue}g?s>i&&(i=s):s<i&&(i=s)}return[g?1-i:i,C]},w$=function(){const I=document.createElement("button");I.className="highlightButton",I.tabIndex=0,I.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const g=document.createElement("span");I.append(g),g.className="visuallyHidden",g.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const C=M(this,Uo)._signal;I.addEventListener("contextmenu",MA,{signal:C}),I.addEventListener("click",()=>{M(this,Uo).highlightSelection("floating_button")},{signal:C}),M(this,Ym).append(I)};function C9(t,I,g){for(const C of g)I.addEventListener(C,t[C].bind(t))}var uV;class Kog{constructor(){ig(this,uV,0)}get id(){return`${bog}${ui(this,uV)._++}`}}uV=new WeakMap;var nh,Nm,oi,ah,qY;const L9=class L9{constructor(){ig(this,ah);ig(this,nh,d$());ig(this,Nm,0);ig(this,oi,null)}static get _isSVGFittingCanvas(){const I='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',C=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=I;const e=i.decode().then(()=>(C.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(C.getImageData(0,0,1,1).data.buffer)[0]===0));return jI(this,"_isSVGFittingCanvas",e)}async getFromFile(I){const{lastModified:g,name:C,size:i,type:e}=I;return eg(this,ah,qY).call(this,`${g}_${C}_${i}_${e}`,I)}async getFromUrl(I){return eg(this,ah,qY).call(this,I,I)}async getFromBlob(I,g){const C=await g;return eg(this,ah,qY).call(this,I,C)}async getFromId(I){M(this,oi)||$(this,oi,new Map);const g=M(this,oi).get(I);if(!g)return null;if(g.bitmap)return g.refCounter+=1,g;if(g.file)return this.getFromFile(g.file);if(g.blobPromise){const{blobPromise:C}=g;return delete g.blobPromise,this.getFromBlob(g.id,C)}return this.getFromUrl(g.url)}getFromCanvas(I,g){M(this,oi)||$(this,oi,new Map);let C=M(this,oi).get(I);if(C!=null&&C.bitmap)return C.refCounter+=1,C;const i=new OffscreenCanvas(g.width,g.height);return i.getContext("2d").drawImage(g,0,0),C={bitmap:i.transferToImageBitmap(),id:`image_${M(this,nh)}_${ui(this,Nm)._++}`,refCounter:1,isSvg:!1},M(this,oi).set(I,C),M(this,oi).set(C.id,C),C}getSvgUrl(I){const g=M(this,oi).get(I);return g!=null&&g.isSvg?g.svgUrl:null}deleteId(I){var i;M(this,oi)||$(this,oi,new Map);const g=M(this,oi).get(I);if(!g||(g.refCounter-=1,g.refCounter!==0))return;const{bitmap:C}=g;if(!g.url&&!g.file){const e=new OffscreenCanvas(C.width,C.height);e.getContext("bitmaprenderer").transferFromImageBitmap(C),g.blobPromise=e.convertToBlob()}(i=C.close)==null||i.call(C),g.bitmap=null}isValidId(I){return I.startsWith(`image_${M(this,nh)}_`)}};nh=new WeakMap,Nm=new WeakMap,oi=new WeakMap,ah=new WeakSet,qY=async function(I,g){M(this,oi)||$(this,oi,new Map);let C=M(this,oi).get(I);if(C===null)return null;if(C!=null&&C.bitmap)return C.refCounter+=1,C;try{C||(C={bitmap:null,id:`image_${M(this,nh)}_${ui(this,Nm)._++}`,refCounter:0,isSvg:!1});let i;if(typeof g=="string"?(C.url=g,i=await OZ(g,"blob")):g instanceof File?i=C.file=g:g instanceof Blob&&(i=g),i.type==="image/svg+xml"){const e=L9._isSVGFittingCanvas,A=new FileReader,s=new Image,l=new Promise((n,a)=>{s.onload=()=>{C.bitmap=s,C.isSvg=!0,n()},A.onload=async()=>{const d=C.svgUrl=A.result;s.src=await e?`${d}#svgView(preserveAspectRatio(none))`:d},s.onerror=A.onerror=a});A.readAsDataURL(i),await l}else C.bitmap=await createImageBitmap(i);C.refCounter=1}catch(i){HI(i),C=null}return M(this,oi).set(I,C),C&&M(this,oi).set(C.id,C),C};let DX=L9;var gt,Ca,Vm,jC;class Fog{constructor(I=128){ig(this,gt,[]);ig(this,Ca,!1);ig(this,Vm);ig(this,jC,-1);$(this,Vm,I)}add({cmd:I,undo:g,post:C,mustExec:i,type:e=NaN,overwriteIfSameType:A=!1,keepUndo:s=!1}){if(i&&I(),M(this,Ca))return;const l={cmd:I,undo:g,post:C,type:e};if(M(this,jC)===-1){M(this,gt).length>0&&(M(this,gt).length=0),$(this,jC,0),M(this,gt).push(l);return}if(A&&M(this,gt)[M(this,jC)].type===e){s&&(l.undo=M(this,gt)[M(this,jC)].undo),M(this,gt)[M(this,jC)]=l;return}const n=M(this,jC)+1;n===M(this,Vm)?M(this,gt).splice(0,1):($(this,jC,n),n<M(this,gt).length&&M(this,gt).splice(n)),M(this,gt).push(l)}undo(){if(M(this,jC)===-1)return;$(this,Ca,!0);const{undo:I,post:g}=M(this,gt)[M(this,jC)];I(),g==null||g(),$(this,Ca,!1),$(this,jC,M(this,jC)-1)}redo(){if(M(this,jC)<M(this,gt).length-1){$(this,jC,M(this,jC)+1),$(this,Ca,!0);const{cmd:I,post:g}=M(this,gt)[M(this,jC)];I(),g==null||g(),$(this,Ca,!1)}}hasSomethingToUndo(){return M(this,jC)!==-1}hasSomethingToRedo(){return M(this,jC)<M(this,gt).length-1}cleanType(I){if(M(this,jC)!==-1){for(let g=M(this,jC);g>=0;g--)if(M(this,gt)[g].type!==I){M(this,gt).splice(g+1,M(this,jC)-g),$(this,jC,g);return}M(this,gt).length=0,$(this,jC,-1)}}destroy(){$(this,gt,null)}}gt=new WeakMap,Ca=new WeakMap,Vm=new WeakMap,jC=new WeakMap;var mV,p$;class EZ{constructor(I){ig(this,mV);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:g}=gi.platform;for(const[C,i,e={}]of I)for(const A of C){const s=A.startsWith("mac+");g&&s?(this.callbacks.set(A.slice(4),{callback:i,options:e}),this.allKeys.add(A.split("+").at(-1))):!g&&!s&&(this.callbacks.set(A,{callback:i,options:e}),this.allKeys.add(A.split("+").at(-1)))}}exec(I,g){if(!this.allKeys.has(g.key))return;const C=this.callbacks.get(eg(this,mV,p$).call(this,g));if(!C)return;const{callback:i,options:{bubbles:e=!1,args:A=[],checker:s=null}}=C;s&&!s(I,g)||(i.bind(I,...A,g)(),e||at(g))}}mV=new WeakSet,p$=function(I){I.altKey&&this.buffer.push("alt"),I.ctrlKey&&this.buffer.push("ctrl"),I.metaKey&&this.buffer.push("meta"),I.shiftKey&&this.buffer.push("shift"),this.buffer.push(I.key);const g=this.buffer.join("+");return this.buffer.length=0,g};const ZV=class ZV{get _colors(){const I=new Map([["CanvasText",null],["Canvas",null]]);return Sog(I),jI(this,"_colors",I)}convert(I){const g=I9(I);if(!window.matchMedia("(forced-colors: active)").matches)return g;for(const[C,i]of this._colors)if(i.every((e,A)=>e===g[A]))return ZV._colorsMapping.get(C);return g}getHexCode(I){const g=this._colors.get(I);return g?iI.makeHexColor(...g):I}};CI(ZV,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let KX=ZV;var oh,te,mt,Tt,ch,nl,dh,Fe,ta,Eo,rh,Po,As,dA,_o,Mm,Rm,hh,fm,ss,ia,bh,ea,ls,GV,Aa,Hm,sa,qo,$o,la,Xm,Vt,oC,al,na,gc,Sm,Dm,aa,ns,ol,Km,ke,Og,$Y,FX,B$,W$,gN,y$,Y$,N$,kX,V$,zX,JX,M$,Zi,il,R$,f$,LX,H$,Xu,vX;const qr=class qr{constructor(I,g,C,i,e,A,s,l,n,a,d,o,c,r){ig(this,Og);ig(this,oh,new AbortController);ig(this,te,null);ig(this,mt,new Map);ig(this,Tt,new Map);ig(this,ch,null);ig(this,nl,null);ig(this,dh,null);ig(this,Fe,new Fog);ig(this,ta,null);ig(this,Eo,null);ig(this,rh,0);ig(this,Po,new Set);ig(this,As,null);ig(this,dA,null);ig(this,_o,new Set);CI(this,"_editorUndoBar",null);ig(this,Mm,!1);ig(this,Rm,!1);ig(this,hh,!1);ig(this,fm,null);ig(this,ss,null);ig(this,ia,null);ig(this,bh,null);ig(this,ea,!1);ig(this,ls,null);ig(this,GV,new Kog);ig(this,Aa,!1);ig(this,Hm,!1);ig(this,sa,null);ig(this,qo,null);ig(this,$o,null);ig(this,la,null);ig(this,Xm,null);ig(this,Vt,RI.NONE);ig(this,oC,new Set);ig(this,al,null);ig(this,na,null);ig(this,gc,null);ig(this,Sm,null);ig(this,Dm,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});ig(this,aa,[0,0]);ig(this,ns,null);ig(this,ol,null);ig(this,Km,null);ig(this,ke,null);const h=this._signal=M(this,oh).signal;$(this,ol,I),$(this,Km,g),$(this,ch,C),$(this,na,i),this._eventBus=e,e._on("editingaction",this.onEditingAction.bind(this),{signal:h}),e._on("pagechanging",this.onPageChanging.bind(this),{signal:h}),e._on("scalechanging",this.onScaleChanging.bind(this),{signal:h}),e._on("rotationchanging",this.onRotationChanging.bind(this),{signal:h}),e._on("setpreference",this.onSetPreference.bind(this),{signal:h}),e._on("switchannotationeditorparams",b=>this.updateParams(b.type,b.value),{signal:h}),eg(this,Og,y$).call(this),eg(this,Og,M$).call(this),eg(this,Og,kX).call(this),$(this,nl,A.annotationStorage),$(this,fm,A.filterFactory),$(this,gc,s),$(this,bh,l||null),$(this,Mm,n),$(this,Rm,a),$(this,hh,d),$(this,Xm,o||null),this.viewParameters={realScale:Ja.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=c||null,this._supportsPinchToZoom=r!==!1}static get _keyboardManager(){const I=qr.prototype,g=A=>M(A,ol).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&A.hasSomethingToControl(),C=(A,{target:s})=>{if(s instanceof HTMLInputElement){const{type:l}=s;return l!=="text"&&l!=="number"}return!0},i=this.TRANSLATE_SMALL,e=this.TRANSLATE_BIG;return jI(this,"_keyboardManager",new EZ([[["ctrl+a","mac+meta+a"],I.selectAll,{checker:C}],[["ctrl+z","mac+meta+z"],I.undo,{checker:C}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],I.redo,{checker:C}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],I.delete,{checker:C}],[["Enter","mac+Enter"],I.addNewEditorFromKeyboard,{checker:(A,{target:s})=>!(s instanceof HTMLButtonElement)&&M(A,ol).contains(s)&&!A.isEnterHandled}],[[" ","mac+ "],I.addNewEditorFromKeyboard,{checker:(A,{target:s})=>!(s instanceof HTMLButtonElement)&&M(A,ol).contains(document.activeElement)}],[["Escape","mac+Escape"],I.unselectAll],[["ArrowLeft","mac+ArrowLeft"],I.translateSelectedEditors,{args:[-i,0],checker:g}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],I.translateSelectedEditors,{args:[-e,0],checker:g}],[["ArrowRight","mac+ArrowRight"],I.translateSelectedEditors,{args:[i,0],checker:g}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],I.translateSelectedEditors,{args:[e,0],checker:g}],[["ArrowUp","mac+ArrowUp"],I.translateSelectedEditors,{args:[0,-i],checker:g}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],I.translateSelectedEditors,{args:[0,-e],checker:g}],[["ArrowDown","mac+ArrowDown"],I.translateSelectedEditors,{args:[0,i],checker:g}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],I.translateSelectedEditors,{args:[0,e],checker:g}]]))}destroy(){var I,g,C,i,e,A,s,l;(I=M(this,ke))==null||I.resolve(),$(this,ke,null),(g=M(this,oh))==null||g.abort(),$(this,oh,null),this._signal=null;for(const n of M(this,Tt).values())n.destroy();M(this,Tt).clear(),M(this,mt).clear(),M(this,_o).clear(),(C=M(this,la))==null||C.clear(),$(this,te,null),M(this,oC).clear(),M(this,Fe).destroy(),(i=M(this,ch))==null||i.destroy(),(e=M(this,na))==null||e.destroy(),(A=M(this,ls))==null||A.hide(),$(this,ls,null),(s=M(this,$o))==null||s.destroy(),$(this,$o,null),M(this,ss)&&(clearTimeout(M(this,ss)),$(this,ss,null)),M(this,ns)&&(clearTimeout(M(this,ns)),$(this,ns,null)),(l=this._editorUndoBar)==null||l.destroy()}combinedSignal(I){return AbortSignal.any([this._signal,I.signal])}get mlManager(){return M(this,Xm)}get useNewAltTextFlow(){return M(this,Rm)}get useNewAltTextWhenAddingImage(){return M(this,hh)}get hcmFilter(){return jI(this,"hcmFilter",M(this,gc)?M(this,fm).addHCMFilter(M(this,gc).foreground,M(this,gc).background):"none")}get direction(){return jI(this,"direction",getComputedStyle(M(this,ol)).direction)}get highlightColors(){return jI(this,"highlightColors",M(this,bh)?new Map(M(this,bh).split(",").map(I=>I.split("=").map(g=>g.trim()))):null)}get highlightColorNames(){return jI(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,I=>I.reverse())):null)}setCurrentDrawingSession(I){I?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),$(this,Eo,I)}setMainHighlightColorPicker(I){$(this,$o,I)}editAltText(I,g=!1){var C;(C=M(this,ch))==null||C.editAltText(this,I,g)}getSignature(I){var g;(g=M(this,na))==null||g.getSignature({uiManager:this,editor:I})}get signatureManager(){return M(this,na)}switchToMode(I,g){this._eventBus.on("annotationeditormodechanged",g,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:I})}setPreference(I,g){this._eventBus.dispatch("setpreference",{source:this,name:I,value:g})}onSetPreference({name:I,value:g}){switch(I){case"enableNewAltTextWhenAddingImage":$(this,hh,g);break}}onPageChanging({pageNumber:I}){$(this,rh,I-1)}focusMainContainer(){M(this,ol).focus()}findParent(I,g){for(const C of M(this,Tt).values()){const{x:i,y:e,width:A,height:s}=C.div.getBoundingClientRect();if(I>=i&&I<=i+A&&g>=e&&g<=e+s)return C}return null}disableUserSelect(I=!1){M(this,Km).classList.toggle("noUserSelect",I)}addShouldRescale(I){M(this,_o).add(I)}removeShouldRescale(I){M(this,_o).delete(I)}onScaleChanging({scale:I}){var g;this.commitOrRemove(),this.viewParameters.realScale=I*Ja.PDF_TO_CSS_UNITS;for(const C of M(this,_o))C.onScaleChanging();(g=M(this,Eo))==null||g.onScaleChanging()}onRotationChanging({pagesRotation:I}){this.commitOrRemove(),this.viewParameters.rotation=I}highlightSelection(I=""){const g=document.getSelection();if(!g||g.isCollapsed)return;const{anchorNode:C,anchorOffset:i,focusNode:e,focusOffset:A}=g,s=g.toString(),n=eg(this,Og,$Y).call(this,g).closest(".textLayer"),a=this.getSelectionBoxes(n);if(!a)return;g.empty();const d=eg(this,Og,FX).call(this,n),o=M(this,Vt)===RI.NONE,c=()=>{d==null||d.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:I,boxes:a,anchorNode:C,anchorOffset:i,focusNode:e,focusOffset:A,text:s}),o&&this.showAllEditors("highlight",!0,!0)};if(o){this.switchToMode(RI.HIGHLIGHT,c);return}c()}addToAnnotationStorage(I){!I.isEmpty()&&M(this,nl)&&!M(this,nl).has(I.id)&&M(this,nl).setValue(I.id,I)}blur(){if(this.isShiftKeyDown=!1,M(this,ea)&&($(this,ea,!1),eg(this,Og,gN).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:I}=document;for(const g of M(this,oC))if(g.div.contains(I)){$(this,qo,[g,I]),g._focusEventsAllowed=!1;break}}focus(){if(!M(this,qo))return;const[I,g]=M(this,qo);$(this,qo,null),g.addEventListener("focusin",()=>{I._focusEventsAllowed=!0},{once:!0,signal:this._signal}),g.focus()}addEditListeners(){eg(this,Og,kX).call(this),eg(this,Og,zX).call(this)}removeEditListeners(){eg(this,Og,V$).call(this),eg(this,Og,JX).call(this)}dragOver(I){for(const{type:g}of I.dataTransfer.items)for(const C of M(this,dA))if(C.isHandlingMimeForPasting(g)){I.dataTransfer.dropEffect="copy",I.preventDefault();return}}drop(I){for(const g of I.dataTransfer.items)for(const C of M(this,dA))if(C.isHandlingMimeForPasting(g.type)){C.paste(g,this.currentLayer),I.preventDefault();return}}copy(I){var C;if(I.preventDefault(),(C=M(this,te))==null||C.commitOrRemove(),!this.hasSelection)return;const g=[];for(const i of M(this,oC)){const e=i.serialize(!0);e&&g.push(e)}g.length!==0&&I.clipboardData.setData("application/pdfjs",JSON.stringify(g))}cut(I){this.copy(I),this.delete()}async paste(I){I.preventDefault();const{clipboardData:g}=I;for(const e of g.items)for(const A of M(this,dA))if(A.isHandlingMimeForPasting(e.type)){A.paste(e,this.currentLayer);return}let C=g.getData("application/pdfjs");if(!C)return;try{C=JSON.parse(C)}catch(e){HI(`paste: "${e.message}".`);return}if(!Array.isArray(C))return;this.unselectAll();const i=this.currentLayer;try{const e=[];for(const l of C){const n=await i.deserialize(l);if(!n)return;e.push(n)}const A=()=>{for(const l of e)eg(this,Og,LX).call(this,l);eg(this,Og,vX).call(this,e)},s=()=>{for(const l of e)l.remove()};this.addCommands({cmd:A,undo:s,mustExec:!0})}catch(e){HI(`paste: "${e.message}".`)}}keydown(I){!this.isShiftKeyDown&&I.key==="Shift"&&(this.isShiftKeyDown=!0),M(this,Vt)!==RI.NONE&&!this.isEditorHandlingKeyboard&&qr._keyboardManager.exec(this,I)}keyup(I){this.isShiftKeyDown&&I.key==="Shift"&&(this.isShiftKeyDown=!1,M(this,ea)&&($(this,ea,!1),eg(this,Og,gN).call(this,"main_toolbar")))}onEditingAction({name:I}){switch(I){case"undo":case"redo":case"delete":case"selectAll":this[I]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(I){I?(eg(this,Og,Y$).call(this),eg(this,Og,zX).call(this),eg(this,Og,Zi).call(this,{isEditing:M(this,Vt)!==RI.NONE,isEmpty:eg(this,Og,Xu).call(this),hasSomethingToUndo:M(this,Fe).hasSomethingToUndo(),hasSomethingToRedo:M(this,Fe).hasSomethingToRedo(),hasSelectedEditor:!1})):(eg(this,Og,N$).call(this),eg(this,Og,JX).call(this),eg(this,Og,Zi).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(I){if(!M(this,dA)){$(this,dA,I);for(const g of M(this,dA))eg(this,Og,il).call(this,g.defaultPropertiesToUpdate)}}getId(){return M(this,GV).id}get currentLayer(){return M(this,Tt).get(M(this,rh))}getLayer(I){return M(this,Tt).get(I)}get currentPageIndex(){return M(this,rh)}addLayer(I){M(this,Tt).set(I.pageIndex,I),M(this,Aa)?I.enable():I.disable()}removeLayer(I){M(this,Tt).delete(I.pageIndex)}async updateMode(I,g=null,C=!1){var i,e;if(M(this,Vt)!==I&&!(M(this,ke)&&(await M(this,ke).promise,!M(this,ke)))){if($(this,ke,Promise.withResolvers()),$(this,Vt,I),I===RI.NONE){this.setEditingState(!1),eg(this,Og,f$).call(this),(i=this._editorUndoBar)==null||i.hide(),M(this,ke).resolve();return}I===RI.SIGNATURE&&await((e=M(this,na))==null?void 0:e.loadSignatures()),this.setEditingState(!0),await eg(this,Og,R$).call(this),this.unselectAll();for(const A of M(this,Tt).values())A.updateMode(I);if(!g){C&&this.addNewEditorFromKeyboard(),M(this,ke).resolve();return}for(const A of M(this,mt).values())A.annotationElementId===g?(this.setSelected(A),A.enterInEditMode()):A.unselect();M(this,ke).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(I){I!==M(this,Vt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:I})}updateParams(I,g){var C;if(M(this,dA)){switch(I){case gC.CREATE:this.currentLayer.addNewEditor(g);return;case gC.HIGHLIGHT_DEFAULT_COLOR:(C=M(this,$o))==null||C.updateColor(g);break;case gC.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(M(this,Sm)||$(this,Sm,new Map)).set(I,g),this.showAllEditors("highlight",g);break}for(const i of M(this,oC))i.updateParams(I,g);for(const i of M(this,dA))i.updateDefaultParams(I,g)}}showAllEditors(I,g,C=!1){var e;for(const A of M(this,mt).values())A.editorType===I&&A.show(g);(((e=M(this,Sm))==null?void 0:e.get(gC.HIGHLIGHT_SHOW_ALL))??!0)!==g&&eg(this,Og,il).call(this,[[gC.HIGHLIGHT_SHOW_ALL,g]])}enableWaiting(I=!1){if(M(this,Hm)!==I){$(this,Hm,I);for(const g of M(this,Tt).values())I?g.disableClick():g.enableClick(),g.div.classList.toggle("waiting",I)}}getEditors(I){const g=[];for(const C of M(this,mt).values())C.pageIndex===I&&g.push(C);return g}getEditor(I){return M(this,mt).get(I)}addEditor(I){M(this,mt).set(I.id,I)}removeEditor(I){var g,C;I.div.contains(document.activeElement)&&(M(this,ss)&&clearTimeout(M(this,ss)),$(this,ss,setTimeout(()=>{this.focusMainContainer(),$(this,ss,null)},0))),M(this,mt).delete(I.id),I.annotationElementId&&((g=M(this,la))==null||g.delete(I.annotationElementId)),this.unselect(I),(!I.annotationElementId||!M(this,Po).has(I.annotationElementId))&&((C=M(this,nl))==null||C.remove(I.id))}addDeletedAnnotationElement(I){M(this,Po).add(I.annotationElementId),this.addChangedExistingAnnotation(I),I.deleted=!0}isDeletedAnnotationElement(I){return M(this,Po).has(I)}removeDeletedAnnotationElement(I){M(this,Po).delete(I.annotationElementId),this.removeChangedExistingAnnotation(I),I.deleted=!1}setActiveEditor(I){M(this,te)!==I&&($(this,te,I),I&&eg(this,Og,il).call(this,I.propertiesToUpdate))}updateUI(I){M(this,Og,H$)===I&&eg(this,Og,il).call(this,I.propertiesToUpdate)}updateUIForDefaultProperties(I){eg(this,Og,il).call(this,I.defaultPropertiesToUpdate)}toggleSelected(I){if(M(this,oC).has(I)){M(this,oC).delete(I),I.unselect(),eg(this,Og,Zi).call(this,{hasSelectedEditor:this.hasSelection});return}M(this,oC).add(I),I.select(),eg(this,Og,il).call(this,I.propertiesToUpdate),eg(this,Og,Zi).call(this,{hasSelectedEditor:!0})}setSelected(I){var g;(g=M(this,Eo))==null||g.commitOrRemove();for(const C of M(this,oC))C!==I&&C.unselect();M(this,oC).clear(),M(this,oC).add(I),I.select(),eg(this,Og,il).call(this,I.propertiesToUpdate),eg(this,Og,Zi).call(this,{hasSelectedEditor:!0})}isSelected(I){return M(this,oC).has(I)}get firstSelectedEditor(){return M(this,oC).values().next().value}unselect(I){I.unselect(),M(this,oC).delete(I),eg(this,Og,Zi).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return M(this,oC).size!==0}get isEnterHandled(){return M(this,oC).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var I;M(this,Fe).undo(),eg(this,Og,Zi).call(this,{hasSomethingToUndo:M(this,Fe).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:eg(this,Og,Xu).call(this)}),(I=this._editorUndoBar)==null||I.hide()}redo(){M(this,Fe).redo(),eg(this,Og,Zi).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:M(this,Fe).hasSomethingToRedo(),isEmpty:eg(this,Og,Xu).call(this)})}addCommands(I){M(this,Fe).add(I),eg(this,Og,Zi).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:eg(this,Og,Xu).call(this)})}cleanUndoStack(I){M(this,Fe).cleanType(I)}delete(){var e;this.commitOrRemove();const I=(e=this.currentLayer)==null?void 0:e.endDrawingSession(!0);if(!this.hasSelection&&!I)return;const g=I?[I]:[...M(this,oC)],C=()=>{var A;(A=this._editorUndoBar)==null||A.show(i,g.length===1?g[0].editorType:g.length);for(const s of g)s.remove()},i=()=>{for(const A of g)eg(this,Og,LX).call(this,A)};this.addCommands({cmd:C,undo:i,mustExec:!0})}commitOrRemove(){var I;(I=M(this,te))==null||I.commitOrRemove()}hasSomethingToControl(){return M(this,te)||this.hasSelection}selectAll(){for(const I of M(this,oC))I.commit();eg(this,Og,vX).call(this,M(this,mt).values())}unselectAll(){var I;if(!(M(this,te)&&(M(this,te).commitOrRemove(),M(this,Vt)!==RI.NONE))&&!((I=M(this,Eo))!=null&&I.commitOrRemove())&&this.hasSelection){for(const g of M(this,oC))g.unselect();M(this,oC).clear(),eg(this,Og,Zi).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(I,g,C=!1){if(C||this.commitOrRemove(),!this.hasSelection)return;M(this,aa)[0]+=I,M(this,aa)[1]+=g;const[i,e]=M(this,aa),A=[...M(this,oC)],s=1e3;M(this,ns)&&clearTimeout(M(this,ns)),$(this,ns,setTimeout(()=>{$(this,ns,null),M(this,aa)[0]=M(this,aa)[1]=0,this.addCommands({cmd:()=>{for(const l of A)M(this,mt).has(l.id)&&(l.translateInPage(i,e),l.translationDone())},undo:()=>{for(const l of A)M(this,mt).has(l.id)&&(l.translateInPage(-i,-e),l.translationDone())},mustExec:!1})},s));for(const l of A)l.translateInPage(I,g),l.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),$(this,As,new Map);for(const I of M(this,oC))M(this,As).set(I,{savedX:I.x,savedY:I.y,savedPageIndex:I.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!M(this,As))return!1;this.disableUserSelect(!1);const I=M(this,As);$(this,As,null);let g=!1;for(const[{x:i,y:e,pageIndex:A},s]of I)s.newX=i,s.newY=e,s.newPageIndex=A,g||(g=i!==s.savedX||e!==s.savedY||A!==s.savedPageIndex);if(!g)return!1;const C=(i,e,A,s)=>{if(M(this,mt).has(i.id)){const l=M(this,Tt).get(s);l?i._setParentAndPosition(l,e,A):(i.pageIndex=s,i.x=e,i.y=A)}};return this.addCommands({cmd:()=>{for(const[i,{newX:e,newY:A,newPageIndex:s}]of I)C(i,e,A,s)},undo:()=>{for(const[i,{savedX:e,savedY:A,savedPageIndex:s}]of I)C(i,e,A,s)},mustExec:!0}),!0}dragSelectedEditors(I,g){if(M(this,As))for(const C of M(this,As).keys())C.drag(I,g)}rebuild(I){if(I.parent===null){const g=this.getLayer(I.pageIndex);g?(g.changeParent(I),g.addOrRebuild(I)):(this.addEditor(I),this.addToAnnotationStorage(I),I.rebuild())}else I.parent.addOrRebuild(I)}get isEditorHandlingKeyboard(){var I;return((I=this.getActive())==null?void 0:I.shouldGetKeyboardEvents())||M(this,oC).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(I){return M(this,te)===I}getActive(){return M(this,te)}getMode(){return M(this,Vt)}get imageManager(){return jI(this,"imageManager",new DX)}getSelectionBoxes(I){if(!I)return null;const g=document.getSelection();for(let n=0,a=g.rangeCount;n<a;n++)if(!I.contains(g.getRangeAt(n).commonAncestorContainer))return null;const{x:C,y:i,width:e,height:A}=I.getBoundingClientRect();let s;switch(I.getAttribute("data-main-rotation")){case"90":s=(n,a,d,o)=>({x:(a-i)/A,y:1-(n+d-C)/e,width:o/A,height:d/e});break;case"180":s=(n,a,d,o)=>({x:1-(n+d-C)/e,y:1-(a+o-i)/A,width:d/e,height:o/A});break;case"270":s=(n,a,d,o)=>({x:1-(a+o-i)/A,y:(n-C)/e,width:o/A,height:d/e});break;default:s=(n,a,d,o)=>({x:(n-C)/e,y:(a-i)/A,width:d/e,height:o/A});break}const l=[];for(let n=0,a=g.rangeCount;n<a;n++){const d=g.getRangeAt(n);if(!d.collapsed)for(const{x:o,y:c,width:r,height:h}of d.getClientRects())r===0||h===0||l.push(s(o,c,r,h))}return l.length===0?null:l}addChangedExistingAnnotation({annotationElementId:I,id:g}){(M(this,dh)||$(this,dh,new Map)).set(I,g)}removeChangedExistingAnnotation({annotationElementId:I}){var g;(g=M(this,dh))==null||g.delete(I)}renderAnnotationElement(I){var i;const g=(i=M(this,dh))==null?void 0:i.get(I.data.id);if(!g)return;const C=M(this,nl).getRawValue(g);C&&(M(this,Vt)===RI.NONE&&!C.hasBeenModified||C.renderAnnotationElement(I))}setMissingCanvas(I,g,C){var e;const i=(e=M(this,la))==null?void 0:e.get(I);i&&(i.setCanvas(g,C),M(this,la).delete(I))}addMissingCanvas(I,g){(M(this,la)||$(this,la,new Map)).set(I,g)}};oh=new WeakMap,te=new WeakMap,mt=new WeakMap,Tt=new WeakMap,ch=new WeakMap,nl=new WeakMap,dh=new WeakMap,Fe=new WeakMap,ta=new WeakMap,Eo=new WeakMap,rh=new WeakMap,Po=new WeakMap,As=new WeakMap,dA=new WeakMap,_o=new WeakMap,Mm=new WeakMap,Rm=new WeakMap,hh=new WeakMap,fm=new WeakMap,ss=new WeakMap,ia=new WeakMap,bh=new WeakMap,ea=new WeakMap,ls=new WeakMap,GV=new WeakMap,Aa=new WeakMap,Hm=new WeakMap,sa=new WeakMap,qo=new WeakMap,$o=new WeakMap,la=new WeakMap,Xm=new WeakMap,Vt=new WeakMap,oC=new WeakMap,al=new WeakMap,na=new WeakMap,gc=new WeakMap,Sm=new WeakMap,Dm=new WeakMap,aa=new WeakMap,ns=new WeakMap,ol=new WeakMap,Km=new WeakMap,ke=new WeakMap,Og=new WeakSet,$Y=function({anchorNode:I}){return I.nodeType===Node.TEXT_NODE?I.parentElement:I},FX=function(I){const{currentLayer:g}=this;if(g.hasTextLayer(I))return g;for(const C of M(this,Tt).values())if(C.hasTextLayer(I))return C;return null},B$=function(){const I=document.getSelection();if(!I||I.isCollapsed)return;const C=eg(this,Og,$Y).call(this,I).closest(".textLayer"),i=this.getSelectionBoxes(C);i&&(M(this,ls)||$(this,ls,new Dog(this)),M(this,ls).show(C,i,this.direction==="ltr"))},W$=function(){var e,A,s;const I=document.getSelection();if(!I||I.isCollapsed){M(this,al)&&((e=M(this,ls))==null||e.hide(),$(this,al,null),eg(this,Og,Zi).call(this,{hasSelectedText:!1}));return}const{anchorNode:g}=I;if(g===M(this,al))return;const i=eg(this,Og,$Y).call(this,I).closest(".textLayer");if(!i){M(this,al)&&((A=M(this,ls))==null||A.hide(),$(this,al,null),eg(this,Og,Zi).call(this,{hasSelectedText:!1}));return}if((s=M(this,ls))==null||s.hide(),$(this,al,g),eg(this,Og,Zi).call(this,{hasSelectedText:!0}),!(M(this,Vt)!==RI.HIGHLIGHT&&M(this,Vt)!==RI.NONE)&&(M(this,Vt)===RI.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),$(this,ea,this.isShiftKeyDown),!this.isShiftKeyDown)){const l=M(this,Vt)===RI.HIGHLIGHT?eg(this,Og,FX).call(this,i):null;l==null||l.toggleDrawing();const n=new AbortController,a=this.combinedSignal(n),d=o=>{o.type==="pointerup"&&o.button!==0||(n.abort(),l==null||l.toggleDrawing(!0),o.type==="pointerup"&&eg(this,Og,gN).call(this,"main_toolbar"))};window.addEventListener("pointerup",d,{signal:a}),window.addEventListener("blur",d,{signal:a})}},gN=function(I=""){M(this,Vt)===RI.HIGHLIGHT?this.highlightSelection(I):M(this,Mm)&&eg(this,Og,B$).call(this)},y$=function(){document.addEventListener("selectionchange",eg(this,Og,W$).bind(this),{signal:this._signal})},Y$=function(){if(M(this,ia))return;$(this,ia,new AbortController);const I=this.combinedSignal(M(this,ia));window.addEventListener("focus",this.focus.bind(this),{signal:I}),window.addEventListener("blur",this.blur.bind(this),{signal:I})},N$=function(){var I;(I=M(this,ia))==null||I.abort(),$(this,ia,null)},kX=function(){if(M(this,sa))return;$(this,sa,new AbortController);const I=this.combinedSignal(M(this,sa));window.addEventListener("keydown",this.keydown.bind(this),{signal:I}),window.addEventListener("keyup",this.keyup.bind(this),{signal:I})},V$=function(){var I;(I=M(this,sa))==null||I.abort(),$(this,sa,null)},zX=function(){if(M(this,ta))return;$(this,ta,new AbortController);const I=this.combinedSignal(M(this,ta));document.addEventListener("copy",this.copy.bind(this),{signal:I}),document.addEventListener("cut",this.cut.bind(this),{signal:I}),document.addEventListener("paste",this.paste.bind(this),{signal:I})},JX=function(){var I;(I=M(this,ta))==null||I.abort(),$(this,ta,null)},M$=function(){const I=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:I}),document.addEventListener("drop",this.drop.bind(this),{signal:I})},Zi=function(I){Object.entries(I).some(([C,i])=>M(this,Dm)[C]!==i)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(M(this,Dm),I)}),M(this,Vt)===RI.HIGHLIGHT&&I.hasSelectedEditor===!1&&eg(this,Og,il).call(this,[[gC.HIGHLIGHT_FREE,!0]]))},il=function(I){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:I})},R$=async function(){if(!M(this,Aa)){$(this,Aa,!0);const I=[];for(const g of M(this,Tt).values())I.push(g.enable());await Promise.all(I);for(const g of M(this,mt).values())g.enable()}},f$=function(){if(this.unselectAll(),M(this,Aa)){$(this,Aa,!1);for(const I of M(this,Tt).values())I.disable();for(const I of M(this,mt).values())I.disable()}},LX=function(I){const g=M(this,Tt).get(I.pageIndex);g?g.addOrRebuild(I):(this.addEditor(I),this.addToAnnotationStorage(I))},H$=function(){let I=null;for(I of M(this,oC));return I},Xu=function(){if(M(this,mt).size===0)return!0;if(M(this,mt).size===1)for(const I of M(this,mt).values())return I.isEmpty();return!1},vX=function(I){for(const g of M(this,oC))g.unselect();M(this,oC).clear();for(const g of I)g.isEmpty()||(M(this,oC).add(g),g.select());eg(this,Og,Zi).call(this,{hasSelectedEditor:this.hasSelection})},CI(qr,"TRANSLATE_SMALL",1),CI(qr,"TRANSLATE_BIG",10);let td=qr;var Mt,as,rA,uh,os,ie,mh,cs,ki,cl,Ic,ds,oa,VA,Su,IN;const Gi=class Gi{constructor(I){ig(this,VA);ig(this,Mt,null);ig(this,as,!1);ig(this,rA,null);ig(this,uh,null);ig(this,os,null);ig(this,ie,null);ig(this,mh,!1);ig(this,cs,null);ig(this,ki,null);ig(this,cl,null);ig(this,Ic,null);ig(this,ds,!1);$(this,ki,I),$(this,ds,I._uiManager.useNewAltTextFlow),M(Gi,oa)||$(Gi,oa,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(I){Gi._l10n??(Gi._l10n=I)}async render(){const I=$(this,rA,document.createElement("button"));I.className="altText",I.tabIndex="0";const g=$(this,uh,document.createElement("span"));I.append(g),M(this,ds)?(I.classList.add("new"),I.setAttribute("data-l10n-id",M(Gi,oa).missing),g.setAttribute("data-l10n-id",M(Gi,oa)["missing-label"])):(I.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),g.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const C=M(this,ki)._uiManager._signal;I.addEventListener("contextmenu",MA,{signal:C}),I.addEventListener("pointerdown",e=>e.stopPropagation(),{signal:C});const i=e=>{e.preventDefault(),M(this,ki)._uiManager.editAltText(M(this,ki)),M(this,ds)&&M(this,ki)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:M(this,VA,Su)}})};return I.addEventListener("click",i,{capture:!0,signal:C}),I.addEventListener("keydown",e=>{e.target===I&&e.key==="Enter"&&($(this,mh,!0),i(e))},{signal:C}),await eg(this,VA,IN).call(this),I}finish(){M(this,rA)&&(M(this,rA).focus({focusVisible:M(this,mh)}),$(this,mh,!1))}isEmpty(){return M(this,ds)?M(this,Mt)===null:!M(this,Mt)&&!M(this,as)}hasData(){return M(this,ds)?M(this,Mt)!==null||!!M(this,cl):this.isEmpty()}get guessedText(){return M(this,cl)}async setGuessedText(I){M(this,Mt)===null&&($(this,cl,I),$(this,Ic,await Gi._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:I})),eg(this,VA,IN).call(this))}toggleAltTextBadge(I=!1){var g;if(!M(this,ds)||M(this,Mt)){(g=M(this,cs))==null||g.remove(),$(this,cs,null);return}if(!M(this,cs)){const C=$(this,cs,document.createElement("div"));C.className="noAltTextBadge",M(this,ki).div.append(C)}M(this,cs).classList.toggle("hidden",!I)}serialize(I){let g=M(this,Mt);return!I&&M(this,cl)===g&&(g=M(this,Ic)),{altText:g,decorative:M(this,as),guessedText:M(this,cl),textWithDisclaimer:M(this,Ic)}}get data(){return{altText:M(this,Mt),decorative:M(this,as)}}set data({altText:I,decorative:g,guessedText:C,textWithDisclaimer:i,cancel:e=!1}){C&&($(this,cl,C),$(this,Ic,i)),!(M(this,Mt)===I&&M(this,as)===g)&&(e||($(this,Mt,I),$(this,as,g)),eg(this,VA,IN).call(this))}toggle(I=!1){M(this,rA)&&(!I&&M(this,ie)&&(clearTimeout(M(this,ie)),$(this,ie,null)),M(this,rA).disabled=!I)}shown(){M(this,ki)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:M(this,VA,Su)}})}destroy(){var I,g;(I=M(this,rA))==null||I.remove(),$(this,rA,null),$(this,uh,null),$(this,os,null),(g=M(this,cs))==null||g.remove(),$(this,cs,null)}};Mt=new WeakMap,as=new WeakMap,rA=new WeakMap,uh=new WeakMap,os=new WeakMap,ie=new WeakMap,mh=new WeakMap,cs=new WeakMap,ki=new WeakMap,cl=new WeakMap,Ic=new WeakMap,ds=new WeakMap,oa=new WeakMap,VA=new WeakSet,Su=function(){return M(this,Mt)&&"added"||M(this,Mt)===null&&this.guessedText&&"review"||"missing"},IN=async function(){var i,e,A;const I=M(this,rA);if(!I)return;if(M(this,ds)){if(I.classList.toggle("done",!!M(this,Mt)),I.setAttribute("data-l10n-id",M(Gi,oa)[M(this,VA,Su)]),(i=M(this,uh))==null||i.setAttribute("data-l10n-id",M(Gi,oa)[`${M(this,VA,Su)}-label`]),!M(this,Mt)){(e=M(this,os))==null||e.remove();return}}else{if(!M(this,Mt)&&!M(this,as)){I.classList.remove("done"),(A=M(this,os))==null||A.remove();return}I.classList.add("done"),I.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let g=M(this,os);if(!g){$(this,os,g=document.createElement("span")),g.className="tooltip",g.setAttribute("role","tooltip"),g.id=`alt-text-tooltip-${M(this,ki).id}`;const s=100,l=M(this,ki)._uiManager._signal;l.addEventListener("abort",()=>{clearTimeout(M(this,ie)),$(this,ie,null)},{once:!0}),I.addEventListener("mouseenter",()=>{$(this,ie,setTimeout(()=>{$(this,ie,null),M(this,os).classList.add("show"),M(this,ki)._reportTelemetry({action:"alt_text_tooltip"})},s))},{signal:l}),I.addEventListener("mouseleave",()=>{var n;M(this,ie)&&(clearTimeout(M(this,ie)),$(this,ie,null)),(n=M(this,os))==null||n.classList.remove("show")},{signal:l})}M(this,as)?g.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(g.removeAttribute("data-l10n-id"),g.textContent=M(this,Mt)),g.parentNode||I.append(g);const C=M(this,ki).getElementForAltText();C==null||C.setAttribute("aria-describedby",g.id)},ig(Gi,oa,null),CI(Gi,"_l10n",null);let vN=Gi;var Zh,Cc,Fm,km,zm,Jm,Lm,dl,tc,rl,ic,ca,Ta,X$,S$,D$;const v9=class v9{constructor({container:I,isPinchingDisabled:g=null,isPinchingStopped:C=null,onPinchStart:i=null,onPinching:e=null,onPinchEnd:A=null,signal:s}){ig(this,Ta);ig(this,Zh);ig(this,Cc,!1);ig(this,Fm,null);ig(this,km);ig(this,zm);ig(this,Jm);ig(this,Lm);ig(this,dl,null);ig(this,tc);ig(this,rl,null);ig(this,ic);ig(this,ca,null);$(this,Zh,I),$(this,Fm,C),$(this,km,g),$(this,zm,i),$(this,Jm,e),$(this,Lm,A),$(this,ic,new AbortController),$(this,tc,AbortSignal.any([s,M(this,ic).signal])),I.addEventListener("touchstart",eg(this,Ta,X$).bind(this),{passive:!1,signal:M(this,tc)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/jl.pixelRatio}destroy(){var I,g;(I=M(this,ic))==null||I.abort(),$(this,ic,null),(g=M(this,dl))==null||g.abort(),$(this,dl,null)}};Zh=new WeakMap,Cc=new WeakMap,Fm=new WeakMap,km=new WeakMap,zm=new WeakMap,Jm=new WeakMap,Lm=new WeakMap,dl=new WeakMap,tc=new WeakMap,rl=new WeakMap,ic=new WeakMap,ca=new WeakMap,Ta=new WeakSet,X$=function(I){var i,e,A;if((i=M(this,km))!=null&&i.call(this))return;if(I.touches.length===1){if(M(this,dl))return;const s=$(this,dl,new AbortController),l=AbortSignal.any([M(this,tc),s.signal]),n=M(this,Zh),a={capture:!0,signal:l,passive:!1},d=o=>{var c;o.pointerType==="touch"&&((c=M(this,dl))==null||c.abort(),$(this,dl,null))};n.addEventListener("pointerdown",o=>{o.pointerType==="touch"&&(at(o),d(o))},a),n.addEventListener("pointerup",d,a),n.addEventListener("pointercancel",d,a);return}if(!M(this,ca)){$(this,ca,new AbortController);const s=AbortSignal.any([M(this,tc),M(this,ca).signal]),l=M(this,Zh),n={signal:s,capture:!1,passive:!1};l.addEventListener("touchmove",eg(this,Ta,S$).bind(this),n);const a=eg(this,Ta,D$).bind(this);l.addEventListener("touchend",a,n),l.addEventListener("touchcancel",a,n),n.capture=!0,l.addEventListener("pointerdown",at,n),l.addEventListener("pointermove",at,n),l.addEventListener("pointercancel",at,n),l.addEventListener("pointerup",at,n),(e=M(this,zm))==null||e.call(this)}if(at(I),I.touches.length!==2||(A=M(this,Fm))!=null&&A.call(this)){$(this,rl,null);return}let[g,C]=I.touches;g.identifier>C.identifier&&([g,C]=[C,g]),$(this,rl,{touch0X:g.screenX,touch0Y:g.screenY,touch1X:C.screenX,touch1Y:C.screenY})},S$=function(I){var p;if(!M(this,rl)||I.touches.length!==2)return;at(I);let[g,C]=I.touches;g.identifier>C.identifier&&([g,C]=[C,g]);const{screenX:i,screenY:e}=g,{screenX:A,screenY:s}=C,l=M(this,rl),{touch0X:n,touch0Y:a,touch1X:d,touch1Y:o}=l,c=d-n,r=o-a,h=A-i,b=s-e,u=Math.hypot(h,b)||1,m=Math.hypot(c,r)||1;if(!M(this,Cc)&&Math.abs(m-u)<=v9.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=i,l.touch0Y=e,l.touch1X=A,l.touch1Y=s,!M(this,Cc)){$(this,Cc,!0);return}const Z=[(i+A)/2,(e+s)/2];(p=M(this,Jm))==null||p.call(this,Z,m,u)},D$=function(I){var g;I.touches.length>=2||(M(this,ca).abort(),$(this,ca,null),(g=M(this,Lm))==null||g.call(this),M(this,rl)&&(at(I),$(this,rl,null),$(this,Cc,!1)))};let TN=v9;var ec,hA,MC,Gh,da,vm,Ac,xt,sc,hl,ra,Tm,lc,ee,xm,nc,bl,rs,wh,ph,ze,ac,jm,wV,ZI,TX,Qm,xX,CN,K$,F$,jX,tN,QX,k$,z$,J$,OX,L$,UX,v$,T$,x$,EX,Du;const KI=class KI{constructor(I){ig(this,ZI);ig(this,ec,null);ig(this,hA,null);ig(this,MC,null);ig(this,Gh,!1);ig(this,da,null);ig(this,vm,"");ig(this,Ac,!1);ig(this,xt,null);ig(this,sc,null);ig(this,hl,null);ig(this,ra,null);ig(this,Tm,"");ig(this,lc,!1);ig(this,ee,null);ig(this,xm,!1);ig(this,nc,!1);ig(this,bl,!1);ig(this,rs,null);ig(this,wh,0);ig(this,ph,0);ig(this,ze,null);ig(this,ac,null);CI(this,"_isCopy",!1);CI(this,"_editToolbar",null);CI(this,"_initialOptions",Object.create(null));CI(this,"_initialData",null);CI(this,"_isVisible",!0);CI(this,"_uiManager",null);CI(this,"_focusEventsAllowed",!0);ig(this,jm,!1);ig(this,wV,KI._zIndex++);this.parent=I.parent,this.id=I.id,this.width=this.height=null,this.pageIndex=I.parent.pageIndex,this.name=I.name,this.div=null,this._uiManager=I.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=I.isCentered,this._structTreeParentId=null;const{rotation:g,rawDims:{pageWidth:C,pageHeight:i,pageX:e,pageY:A}}=this.parent.viewport;this.rotation=g,this.pageRotation=(360+g-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[C,i],this.pageTranslation=[e,A];const[s,l]=this.parentDimensions;this.x=I.x/s,this.y=I.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const I=KI.prototype._resizeWithKeyboard,g=td.TRANSLATE_SMALL,C=td.TRANSLATE_BIG;return jI(this,"_resizerKeyboardManager",new EZ([[["ArrowLeft","mac+ArrowLeft"],I,{args:[-g,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],I,{args:[-C,0]}],[["ArrowRight","mac+ArrowRight"],I,{args:[g,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],I,{args:[C,0]}],[["ArrowUp","mac+ArrowUp"],I,{args:[0,-g]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],I,{args:[0,-C]}],[["ArrowDown","mac+ArrowDown"],I,{args:[0,g]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],I,{args:[0,C]}],[["Escape","mac+Escape"],KI.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get isDrawer(){return!1}static get _defaultLineColor(){return jI(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(I){const g=new kog({id:I.parent.getNextId(),parent:I.parent,uiManager:I._uiManager});g.annotationElementId=I.annotationElementId,g.deleted=!0,g._uiManager.addToAnnotationStorage(g)}static initialize(I,g){if(KI._l10n??(KI._l10n=I),KI._l10nResizer||(KI._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),KI._borderLineWidth!==-1)return;const C=getComputedStyle(document.documentElement);KI._borderLineWidth=parseFloat(C.getPropertyValue("--outline-width"))||0}static updateDefaultParams(I,g){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(I){return!1}static paste(I,g){ZC("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return M(this,jm)}set _isDraggable(I){var g;$(this,jm,I),(g=this.div)==null||g.classList.toggle("draggable",I)}get isEnterHandled(){return!0}center(){const[I,g]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*g/(I*2),this.y+=this.width*I/(g*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*g/(I*2),this.y-=this.width*I/(g*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(I){this._uiManager.addCommands(I)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=M(this,wV)}setParent(I){I!==null?(this.pageIndex=I.pageIndex,this.pageDimensions=I.pageDimensions):eg(this,ZI,Du).call(this),this.parent=I}focusin(I){this._focusEventsAllowed&&(M(this,lc)?$(this,lc,!1):this.parent.setSelected(this))}focusout(I){var C;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const g=I.relatedTarget;g!=null&&g.closest(`#${this.id}`)||(I.preventDefault(),(C=this.parent)!=null&&C.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(I,g,C,i){const[e,A]=this.parentDimensions;[C,i]=this.screenToPageTranslation(C,i),this.x=(I+C)/e,this.y=(g+i)/A,this.fixAndSetPosition()}_moveAfterPaste(I,g){const[C,i]=this.parentDimensions;this.setAt(I*C,g*i,this.width*C,this.height*i),this._onTranslated()}translate(I,g){eg(this,ZI,TX).call(this,this.parentDimensions,I,g)}translateInPage(I,g){M(this,ee)||$(this,ee,[this.x,this.y,this.width,this.height]),eg(this,ZI,TX).call(this,this.pageDimensions,I,g),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(I,g){M(this,ee)||$(this,ee,[this.x,this.y,this.width,this.height]);const{div:C,parentDimensions:[i,e]}=this;if(this.x+=I/i,this.y+=g/e,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:d,y:o}=this.div.getBoundingClientRect();this.parent.findNewParent(this,d,o)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:A,y:s}=this;const[l,n]=this.getBaseTranslation();A+=l,s+=n;const{style:a}=C;a.left=`${(100*A).toFixed(2)}%`,a.top=`${(100*s).toFixed(2)}%`,this._onTranslating(A,s),C.scrollIntoView({block:"nearest"})}_onTranslating(I,g){}_onTranslated(I,g){}get _hasBeenMoved(){return!!M(this,ee)&&(M(this,ee)[0]!==this.x||M(this,ee)[1]!==this.y)}get _hasBeenResized(){return!!M(this,ee)&&(M(this,ee)[2]!==this.width||M(this,ee)[3]!==this.height)}getBaseTranslation(){const[I,g]=this.parentDimensions,{_borderLineWidth:C}=KI,i=C/I,e=C/g;switch(this.rotation){case 90:return[-i,e];case 180:return[i,e];case 270:return[i,-e];default:return[-i,-e]}}get _mustFixPosition(){return!0}fixAndSetPosition(I=this.rotation){const{div:{style:g},pageDimensions:[C,i]}=this;let{x:e,y:A,width:s,height:l}=this;if(s*=C,l*=i,e*=C,A*=i,this._mustFixPosition)switch(I){case 0:e=Wi(e,0,C-s),A=Wi(A,0,i-l);break;case 90:e=Wi(e,0,C-l),A=Wi(A,s,i);break;case 180:e=Wi(e,s,C),A=Wi(A,l,i);break;case 270:e=Wi(e,l,C),A=Wi(A,0,i-s);break}this.x=e/=C,this.y=A/=i;const[n,a]=this.getBaseTranslation();e+=n,A+=a,g.left=`${(100*e).toFixed(2)}%`,g.top=`${(100*A).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(I,g){var C;return eg(C=KI,Qm,xX).call(C,I,g,this.parentRotation)}pageTranslationToScreen(I,g){var C;return eg(C=KI,Qm,xX).call(C,I,g,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:I,pageDimensions:[g,C]}=this;return[g*I,C*I]}setDims(I,g){const[C,i]=this.parentDimensions,{style:e}=this.div;e.width=`${(100*I/C).toFixed(2)}%`,M(this,Ac)||(e.height=`${(100*g/i).toFixed(2)}%`)}fixDims(){const{style:I}=this.div,{height:g,width:C}=I,i=C.endsWith("%"),e=!M(this,Ac)&&g.endsWith("%");if(i&&e)return;const[A,s]=this.parentDimensions;i||(I.width=`${(100*parseFloat(C)/A).toFixed(2)}%`),!M(this,Ac)&&!e&&(I.height=`${(100*parseFloat(g)/s).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}_onResized(){}static _round(I){return Math.round(I*1e4)/1e4}_onResizing(){}altTextFinish(){var I;(I=M(this,MC))==null||I.finish()}async addEditToolbar(){return this._editToolbar||M(this,nc)?this._editToolbar:(this._editToolbar=new SX(this),this.div.append(this._editToolbar.render()),M(this,MC)&&await this._editToolbar.addAltText(M(this,MC)),this._editToolbar)}removeEditToolbar(){var I;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(I=M(this,MC))==null||I.destroy())}addContainer(I){var C;const g=(C=this._editToolbar)==null?void 0:C.div;g?g.before(I):this.div.append(I)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){M(this,MC)||(vN.initialize(KI._l10n),$(this,MC,new vN(this)),M(this,ec)&&(M(this,MC).data=M(this,ec),$(this,ec,null)),await this.addEditToolbar())}get altTextData(){var I;return(I=M(this,MC))==null?void 0:I.data}set altTextData(I){M(this,MC)&&(M(this,MC).data=I)}get guessedAltText(){var I;return(I=M(this,MC))==null?void 0:I.guessedText}async setGuessedAltText(I){var g;await((g=M(this,MC))==null?void 0:g.setGuessedText(I))}serializeAltText(I){var g;return(g=M(this,MC))==null?void 0:g.serialize(I)}hasAltText(){return!!M(this,MC)&&!M(this,MC).isEmpty()}hasAltTextData(){var I;return((I=M(this,MC))==null?void 0:I.hasData())??!1}render(){var A;const I=this.div=document.createElement("div");I.setAttribute("data-editor-rotation",(360-this.rotation)%360),I.className=this.name,I.setAttribute("id",this.id),I.tabIndex=M(this,Gh)?-1:0,I.setAttribute("role","application"),this.defaultL10nId&&I.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||I.classList.add("hidden"),this.setInForeground(),eg(this,ZI,UX).call(this);const[g,C]=this.parentDimensions;this.parentRotation%180!==0&&(I.style.maxWidth=`${(100*C/g).toFixed(2)}%`,I.style.maxHeight=`${(100*g/C).toFixed(2)}%`);const[i,e]=this.getInitialTranslation();return this.translate(i,e),C9(this,I,["keydown","pointerdown"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(M(this,ac)||$(this,ac,new TN({container:I,isPinchingDisabled:()=>!this.isSelected,onPinchStart:eg(this,ZI,k$).bind(this),onPinching:eg(this,ZI,z$).bind(this),onPinchEnd:eg(this,ZI,J$).bind(this),signal:this._uiManager._signal}))),(A=this._uiManager._editorUndoBar)==null||A.hide(),I}pointerdown(I){const{isMac:g}=gi.platform;if(I.button!==0||I.ctrlKey&&g){I.preventDefault();return}if($(this,lc,!0),this._isDraggable){eg(this,ZI,L$).call(this,I);return}eg(this,ZI,OX).call(this,I)}get isSelected(){return this._uiManager.isSelected(this)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){M(this,rs)&&clearTimeout(M(this,rs)),$(this,rs,setTimeout(()=>{var I;$(this,rs,null),(I=this.parent)==null||I.moveEditorInDOM(this)},0))}_setParentAndPosition(I,g,C){I.changeParent(this),this.x=g,this.y=C,this.fixAndSetPosition(),this._onTranslated()}getRect(I,g,C=this.rotation){const i=this.parentScale,[e,A]=this.pageDimensions,[s,l]=this.pageTranslation,n=I/i,a=g/i,d=this.x*e,o=this.y*A,c=this.width*e,r=this.height*A;switch(C){case 0:return[d+n+s,A-o-a-r+l,d+n+c+s,A-o-a+l];case 90:return[d+a+s,A-o+n+l,d+a+r+s,A-o+n+c+l];case 180:return[d-n-c+s,A-o+a+l,d-n+s,A-o+a+r+l];case 270:return[d-a-r+s,A-o-n-c+l,d-a+s,A-o-n+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(I,g){const[C,i,e,A]=I,s=e-C,l=A-i;switch(this.rotation){case 0:return[C,g-A,s,l];case 90:return[C,g-i,l,s];case 180:return[e,g-i,s,l];case 270:return[e,g-A,l,s];default:throw new Error("Invalid rotation")}}onceAdded(I){}isEmpty(){return!1}enableEditMode(){$(this,nc,!0)}disableEditMode(){$(this,nc,!1)}isInEditMode(){return M(this,nc)}shouldGetKeyboardEvents(){return M(this,bl)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:I,left:g,bottom:C,right:i}=this.getClientDimensions(),{innerHeight:e,innerWidth:A}=window;return g<A&&i>0&&I<e&&C>0}rebuild(){eg(this,ZI,UX).call(this)}rotate(I){}resize(){}serializeDeleted(){var I;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((I=this._initialData)==null?void 0:I.popupRef)||""}}serialize(I=!1,g=null){ZC("An editor must be serializable")}static async deserialize(I,g,C){const i=new this.prototype.constructor({parent:g,id:g.getNextId(),uiManager:C});i.rotation=I.rotation,$(i,ec,I.accessibilityData),i._isCopy=I.isCopy||!1;const[e,A]=i.pageDimensions,[s,l,n,a]=i.getRectInCurrentCoords(I.rect,A);return i.x=s/e,i.y=l/A,i.width=n/e,i.height=a/A,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var I,g;if((I=M(this,ra))==null||I.abort(),$(this,ra,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),M(this,rs)&&(clearTimeout(M(this,rs)),$(this,rs,null)),eg(this,ZI,Du).call(this),this.removeEditToolbar(),M(this,ze)){for(const C of M(this,ze).values())clearTimeout(C);$(this,ze,null)}this.parent=null,(g=M(this,ac))==null||g.destroy(),$(this,ac,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(eg(this,ZI,K$).call(this),M(this,xt).classList.remove("hidden"))}get toolbarPosition(){return null}keydown(I){if(!this.isResizable||I.target!==this.div||I.key!=="Enter")return;this._uiManager.setSelected(this),$(this,hl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const g=M(this,xt).children;if(!M(this,hA)){$(this,hA,Array.from(g));const A=eg(this,ZI,v$).bind(this),s=eg(this,ZI,T$).bind(this),l=this._uiManager._signal;for(const n of M(this,hA)){const a=n.getAttribute("data-resizer-name");n.setAttribute("role","spinbutton"),n.addEventListener("keydown",A,{signal:l}),n.addEventListener("blur",s,{signal:l}),n.addEventListener("focus",eg(this,ZI,x$).bind(this,a),{signal:l}),n.setAttribute("data-l10n-id",KI._l10nResizer[a])}}const C=M(this,hA)[0];let i=0;for(const A of g){if(A===C)break;i++}const e=(360-this.rotation+this.parentRotation)%360/90*(M(this,hA).length/4);if(e!==i){if(e<i)for(let s=0;s<i-e;s++)M(this,xt).append(M(this,xt).firstChild);else if(e>i)for(let s=0;s<e-i;s++)M(this,xt).firstChild.before(M(this,xt).lastChild);let A=0;for(const s of g){const n=M(this,hA)[A++].getAttribute("data-resizer-name");s.setAttribute("data-l10n-id",KI._l10nResizer[n])}}eg(this,ZI,EX).call(this,0),$(this,bl,!0),M(this,xt).firstChild.focus({focusVisible:!0}),I.preventDefault(),I.stopImmediatePropagation()}_resizeWithKeyboard(I,g){M(this,bl)&&eg(this,ZI,QX).call(this,M(this,Tm),{deltaX:I,deltaY:g,fromKeyboard:!0})}_stopResizingWithKeyboard(){eg(this,ZI,Du).call(this),this.div.focus()}select(){var I,g,C;if(this.makeResizable(),(I=this.div)==null||I.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var i,e;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((e=this._editToolbar)==null||e.show())});return}(g=this._editToolbar)==null||g.show(),(C=M(this,MC))==null||C.toggleAltTextBadge(!1)}unselect(){var I,g,C,i,e;(I=M(this,xt))==null||I.classList.add("hidden"),(g=this.div)==null||g.classList.remove("selectedEditor"),(C=this.div)!=null&&C.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(e=M(this,MC))==null||e.toggleAltTextBadge(!0)}updateParams(I,g){}disableEditing(){}enableEditing(){}enterInEditMode(){}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return M(this,xm)}set isEditing(I){$(this,xm,I),this.parent&&(I?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(I,g){$(this,Ac,!0);const C=I/g,{style:i}=this.div;i.aspectRatio=C,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(I,g=!1){if(g){M(this,ze)||$(this,ze,new Map);const{action:C}=I;let i=M(this,ze).get(C);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(I),M(this,ze).delete(C),M(this,ze).size===0&&$(this,ze,null)},KI._telemetryTimeout),M(this,ze).set(C,i);return}I.type||(I.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:I}})}show(I=this._isVisible){this.div.classList.toggle("hidden",!I),this._isVisible=I}enable(){this.div&&(this.div.tabIndex=0),$(this,Gh,!1)}disable(){this.div&&(this.div.tabIndex=-1),$(this,Gh,!0)}renderAnnotationElement(I){let g=I.container.querySelector(".annotationContent");if(!g)g=document.createElement("div"),g.classList.add("annotationContent",this.editorType),I.container.prepend(g);else if(g.nodeName==="CANVAS"){const C=g;g=document.createElement("div"),g.classList.add("annotationContent",this.editorType),C.before(g)}return g}resetAnnotationElement(I){const{firstChild:g}=I.container;(g==null?void 0:g.nodeName)==="DIV"&&g.classList.contains("annotationContent")&&g.remove()}};ec=new WeakMap,hA=new WeakMap,MC=new WeakMap,Gh=new WeakMap,da=new WeakMap,vm=new WeakMap,Ac=new WeakMap,xt=new WeakMap,sc=new WeakMap,hl=new WeakMap,ra=new WeakMap,Tm=new WeakMap,lc=new WeakMap,ee=new WeakMap,xm=new WeakMap,nc=new WeakMap,bl=new WeakMap,rs=new WeakMap,wh=new WeakMap,ph=new WeakMap,ze=new WeakMap,ac=new WeakMap,jm=new WeakMap,wV=new WeakMap,ZI=new WeakSet,TX=function([I,g],C,i){[C,i]=this.screenToPageTranslation(C,i),this.x+=C/I,this.y+=i/g,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},Qm=new WeakSet,xX=function(I,g,C){switch(C){case 90:return[g,-I];case 180:return[-I,-g];case 270:return[-g,I];default:return[I,g]}},CN=function(I){switch(I){case 90:{const[g,C]=this.pageDimensions;return[0,-g/C,C/g,0]}case 180:return[-1,0,0,-1];case 270:{const[g,C]=this.pageDimensions;return[0,g/C,-C/g,0]}default:return[1,0,0,1]}},K$=function(){if(M(this,xt))return;$(this,xt,document.createElement("div")),M(this,xt).classList.add("resizers");const I=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],g=this._uiManager._signal;for(const C of I){const i=document.createElement("div");M(this,xt).append(i),i.classList.add("resizer",C),i.setAttribute("data-resizer-name",C),i.addEventListener("pointerdown",eg(this,ZI,F$).bind(this,C),{signal:g}),i.addEventListener("contextmenu",MA,{signal:g}),i.tabIndex=-1}this.div.prepend(M(this,xt))},F$=function(I,g){var a;g.preventDefault();const{isMac:C}=gi.platform;if(g.button!==0||g.ctrlKey&&C)return;(a=M(this,MC))==null||a.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,$(this,sc,[g.screenX,g.screenY]);const e=new AbortController,A=this._uiManager.combinedSignal(e);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",eg(this,ZI,QX).bind(this,I),{passive:!0,capture:!0,signal:A}),window.addEventListener("touchmove",at,{passive:!1,signal:A}),window.addEventListener("contextmenu",MA,{signal:A}),$(this,hl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const s=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(g.target).cursor;const n=()=>{var d;e.abort(),this.parent.togglePointerEvents(!0),(d=M(this,MC))==null||d.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=s,this.div.style.cursor=l,eg(this,ZI,tN).call(this)};window.addEventListener("pointerup",n,{signal:A}),window.addEventListener("blur",n,{signal:A})},jX=function(I,g,C,i){this.width=C,this.height=i,this.x=I,this.y=g;const[e,A]=this.parentDimensions;this.setDims(e*C,A*i),this.fixAndSetPosition(),this._onResized()},tN=function(){if(!M(this,hl))return;const{savedX:I,savedY:g,savedWidth:C,savedHeight:i}=M(this,hl);$(this,hl,null);const e=this.x,A=this.y,s=this.width,l=this.height;e===I&&A===g&&s===C&&l===i||this.addCommands({cmd:eg(this,ZI,jX).bind(this,e,A,s,l),undo:eg(this,ZI,jX).bind(this,I,g,C,i),mustExec:!0})},QX=function(I,g){const[C,i]=this.parentDimensions,e=this.x,A=this.y,s=this.width,l=this.height,n=KI.MIN_SIZE/C,a=KI.MIN_SIZE/i,d=eg(this,ZI,CN).call(this,this.rotation),o=(G,w)=>[d[0]*G+d[2]*w,d[1]*G+d[3]*w],c=eg(this,ZI,CN).call(this,360-this.rotation),r=(G,w)=>[c[0]*G+c[2]*w,c[1]*G+c[3]*w];let h,b,u=!1,m=!1;switch(I){case"topLeft":u=!0,h=(G,w)=>[0,0],b=(G,w)=>[G,w];break;case"topMiddle":h=(G,w)=>[G/2,0],b=(G,w)=>[G/2,w];break;case"topRight":u=!0,h=(G,w)=>[G,0],b=(G,w)=>[0,w];break;case"middleRight":m=!0,h=(G,w)=>[G,w/2],b=(G,w)=>[0,w/2];break;case"bottomRight":u=!0,h=(G,w)=>[G,w],b=(G,w)=>[0,0];break;case"bottomMiddle":h=(G,w)=>[G/2,w],b=(G,w)=>[G/2,0];break;case"bottomLeft":u=!0,h=(G,w)=>[0,w],b=(G,w)=>[G,0];break;case"middleLeft":m=!0,h=(G,w)=>[0,w/2],b=(G,w)=>[G,w/2];break}const Z=h(s,l),p=b(s,l);let Y=o(...p);const R=KI._round(e+Y[0]),X=KI._round(A+Y[1]);let H=1,S=1,z,v;if(g.fromKeyboard)({deltaX:z,deltaY:v}=g);else{const{screenX:G,screenY:w}=g,[W,y]=M(this,sc);[z,v]=this.screenToPageTranslation(G-W,w-y),M(this,sc)[0]=G,M(this,sc)[1]=w}if([z,v]=r(z/C,v/i),u){const G=Math.hypot(s,l);H=S=Math.max(Math.min(Math.hypot(p[0]-Z[0]-z,p[1]-Z[1]-v)/G,1/s,1/l),n/s,a/l)}else m?H=Wi(Math.abs(p[0]-Z[0]-z),n,1)/s:S=Wi(Math.abs(p[1]-Z[1]-v),a,1)/l;const K=KI._round(s*H),V=KI._round(l*S);Y=o(...b(K,V));const N=R-Y[0],B=X-Y[1];M(this,ee)||$(this,ee,[this.x,this.y,this.width,this.height]),this.width=K,this.height=V,this.x=N,this.y=B,this.setDims(C*K,i*V),this.fixAndSetPosition(),this._onResizing()},k$=function(){var I;$(this,hl,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(I=M(this,MC))==null||I.toggle(!1),this.parent.togglePointerEvents(!1)},z$=function(I,g,C){let e=.7*(C/g)+1-.7;if(e===1)return;const A=eg(this,ZI,CN).call(this,this.rotation),s=(R,X)=>[A[0]*R+A[2]*X,A[1]*R+A[3]*X],[l,n]=this.parentDimensions,a=this.x,d=this.y,o=this.width,c=this.height,r=KI.MIN_SIZE/l,h=KI.MIN_SIZE/n;e=Math.max(Math.min(e,1/o,1/c),r/o,h/c);const b=KI._round(o*e),u=KI._round(c*e);if(b===o&&u===c)return;M(this,ee)||$(this,ee,[a,d,o,c]);const m=s(o/2,c/2),Z=KI._round(a+m[0]),p=KI._round(d+m[1]),Y=s(b/2,u/2);this.x=Z-Y[0],this.y=p-Y[1],this.width=b,this.height=u,this.setDims(l*b,n*u),this.fixAndSetPosition(),this._onResizing()},J$=function(){var I;(I=M(this,MC))==null||I.toggle(!0),this.parent.togglePointerEvents(!0),eg(this,ZI,tN).call(this)},OX=function(I){const{isMac:g}=gi.platform;I.ctrlKey&&!g||I.shiftKey||I.metaKey&&g?this.parent.toggleSelected(this):this.parent.setSelected(this)},L$=function(I){const{isSelected:g}=this;this._uiManager.setUpDragSession();let C=!1;const i=new AbortController,e=this._uiManager.combinedSignal(i),A={capture:!0,passive:!1,signal:e},s=n=>{i.abort(),$(this,da,null),$(this,lc,!1),this._uiManager.endDragSession()||eg(this,ZI,OX).call(this,n),C&&this._onStopDragging()};g&&($(this,wh,I.clientX),$(this,ph,I.clientY),$(this,da,I.pointerId),$(this,vm,I.pointerType),window.addEventListener("pointermove",n=>{C||(C=!0,this._onStartDragging());const{clientX:a,clientY:d,pointerId:o}=n;if(o!==M(this,da)){at(n);return}const[c,r]=this.screenToPageTranslation(a-M(this,wh),d-M(this,ph));$(this,wh,a),$(this,ph,d),this._uiManager.dragSelectedEditors(c,r)},A),window.addEventListener("touchmove",at,A),window.addEventListener("pointerdown",n=>{n.pointerType===M(this,vm)&&(M(this,ac)||n.isPrimary)&&s(n),at(n)},A));const l=n=>{if(!M(this,da)||M(this,da)===n.pointerId){s(n);return}at(n)};window.addEventListener("pointerup",l,{signal:e}),window.addEventListener("blur",l,{signal:e})},UX=function(){if(M(this,ra)||!this.div)return;$(this,ra,new AbortController);const I=this._uiManager.combinedSignal(M(this,ra));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:I}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:I})},v$=function(I){KI._resizerKeyboardManager.exec(this,I)},T$=function(I){var g;M(this,bl)&&((g=I.relatedTarget)==null?void 0:g.parentNode)!==M(this,xt)&&eg(this,ZI,Du).call(this)},x$=function(I){$(this,Tm,M(this,bl)?I:"")},EX=function(I){if(M(this,hA))for(const g of M(this,hA))g.tabIndex=I},Du=function(){$(this,bl,!1),eg(this,ZI,EX).call(this,-1),eg(this,ZI,tN).call(this)},ig(KI,Qm),CI(KI,"_l10n",null),CI(KI,"_l10nResizer",null),CI(KI,"_borderLineWidth",-1),CI(KI,"_colorManager",new KX),CI(KI,"_zIndex",1),CI(KI,"_telemetryTimeout",1e3);let zC=KI;class kog extends zC{constructor(I){super(I),this.annotationElementId=I.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const z6=3285377520,Se=4294901760,qA=65535;class j${constructor(I){this.h1=I?I&4294967295:z6,this.h2=I?I&4294967295:z6}update(I){let g,C;if(typeof I=="string"){g=new Uint8Array(I.length*2),C=0;for(let h=0,b=I.length;h<b;h++){const u=I.charCodeAt(h);u<=255?g[C++]=u:(g[C++]=u>>>8,g[C++]=u&255)}}else if(ArrayBuffer.isView(I))g=I.slice(),C=g.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=C>>2,e=C-i*4,A=new Uint32Array(g.buffer,0,i);let s=0,l=0,n=this.h1,a=this.h2;const d=3432918353,o=461845907,c=d&qA,r=o&qA;for(let h=0;h<i;h++)h&1?(s=A[h],s=s*d&Se|s*c&qA,s=s<<15|s>>>17,s=s*o&Se|s*r&qA,n^=s,n=n<<13|n>>>19,n=n*5+3864292196):(l=A[h],l=l*d&Se|l*c&qA,l=l<<15|l>>>17,l=l*o&Se|l*r&qA,a^=l,a=a<<13|a>>>19,a=a*5+3864292196);switch(s=0,e){case 3:s^=g[i*4+2]<<16;case 2:s^=g[i*4+1]<<8;case 1:s^=g[i*4],s=s*d&Se|s*c&qA,s=s<<15|s>>>17,s=s*o&Se|s*r&qA,i&1?n^=s:a^=s}this.h1=n,this.h2=a}hexdigest(){let I=this.h1,g=this.h2;return I^=g>>>1,I=I*3981806797&Se|I*36045&qA,g=g*4283543511&Se|((g<<16|I>>>16)*2950163797&Se)>>>16,I^=g>>>1,I=I*444984403&Se|I*60499&qA,g=g*3301882366&Se|((g<<16|I>>>16)*3120437893&Se)>>>16,I^=g>>>1,(I>>>0).toString(16).padStart(8,"0")+(g>>>0).toString(16).padStart(8,"0")}}const PX=Object.freeze({map:null,hash:"",transfer:void 0});var oc,cc,Rt,pV,Q$;class t9{constructor(){ig(this,pV);ig(this,oc,!1);ig(this,cc,null);ig(this,Rt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(I,g){const C=M(this,Rt).get(I);return C===void 0?g:Object.assign(g,C)}getRawValue(I){return M(this,Rt).get(I)}remove(I){if(M(this,Rt).delete(I),M(this,Rt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const g of M(this,Rt).values())if(g instanceof zC)return;this.onAnnotationEditor(null)}}setValue(I,g){const C=M(this,Rt).get(I);let i=!1;if(C!==void 0)for(const[e,A]of Object.entries(g))C[e]!==A&&(i=!0,C[e]=A);else i=!0,M(this,Rt).set(I,g);i&&eg(this,pV,Q$).call(this),g instanceof zC&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(g.constructor._type)}has(I){return M(this,Rt).has(I)}getAll(){return M(this,Rt).size>0?PD(M(this,Rt)):null}setAll(I){for(const[g,C]of Object.entries(I))this.setValue(g,C)}get size(){return M(this,Rt).size}resetModified(){M(this,oc)&&($(this,oc,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new O$(this)}get serializable(){if(M(this,Rt).size===0)return PX;const I=new Map,g=new j$,C=[],i=Object.create(null);let e=!1;for(const[A,s]of M(this,Rt)){const l=s instanceof zC?s.serialize(!1,i):s;l&&(I.set(A,l),g.update(`${A}:${JSON.stringify(l)}`),e||(e=!!l.bitmap))}if(e)for(const A of I.values())A.bitmap&&C.push(A.bitmap);return I.size>0?{map:I,hash:g.hexdigest(),transfer:C}:PX}get editorStats(){let I=null;const g=new Map;for(const C of M(this,Rt).values()){if(!(C instanceof zC))continue;const i=C.telemetryFinalData;if(!i)continue;const{type:e}=i;g.has(e)||g.set(e,Object.getPrototypeOf(C).constructor),I||(I=Object.create(null));const A=I[e]||(I[e]=new Map);for(const[s,l]of Object.entries(i)){if(s==="type")continue;let n=A.get(s);n||(n=new Map,A.set(s,n));const a=n.get(l)??0;n.set(l,a+1)}}for(const[C,i]of g)I[C]=i.computeTelemetryFinalData(I[C]);return I}resetModifiedIds(){$(this,cc,null)}get modifiedIds(){if(M(this,cc))return M(this,cc);const I=[];for(const g of M(this,Rt).values())!(g instanceof zC)||!g.annotationElementId||!g.serialize()||I.push(g.annotationElementId);return $(this,cc,{ids:new Set(I),hash:I.join(",")})}}oc=new WeakMap,cc=new WeakMap,Rt=new WeakMap,pV=new WeakSet,Q$=function(){M(this,oc)||($(this,oc,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var Om;class O$ extends t9{constructor(g){super();ig(this,Om);const{map:C,hash:i,transfer:e}=g.serializable,A=structuredClone(C,e?{transfer:e}:null);$(this,Om,{map:A,hash:i,transfer:e})}get print(){ZC("Should not call PrintAnnotationStorage.print")}get serializable(){return M(this,Om)}get modifiedIds(){return jI(this,"modifiedIds",{ids:new Set,hash:""})}}Om=new WeakMap;var Bh;class zog{constructor({ownerDocument:I=globalThis.document,styleElement:g=null}){ig(this,Bh,new Set);this._document=I,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(I){this.nativeFontFaces.add(I),this._document.fonts.add(I)}removeNativeFontFace(I){this.nativeFontFaces.delete(I),this._document.fonts.delete(I)}insertRule(I){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const g=this.styleElement.sheet;g.insertRule(I,g.cssRules.length)}clear(){for(const I of this.nativeFontFaces)this._document.fonts.delete(I);this.nativeFontFaces.clear(),M(this,Bh).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:I,disableFontFace:g,_inspectFont:C}){if(!(!I||M(this,Bh).has(I.loadedName))){if(ct(!g,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:e,style:A}=I,s=new FontFace(i,e,A);this.addNativeFontFace(s);try{await s.load(),M(this,Bh).add(i),C==null||C(I)}catch{HI(`Cannot load system font: ${I.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}return}ZC("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(I){if(I.attached||I.missingFile&&!I.systemFontInfo)return;if(I.attached=!0,I.systemFontInfo){await this.loadSystemFont(I);return}if(this.isFontLoadingAPISupported){const C=I.createNativeFontFace();if(C){this.addNativeFontFace(C);try{await C.loaded}catch(i){throw HI(`Failed to load font '${C.family}': '${i}'.`),I.disableFontFace=!0,i}}return}const g=I.createFontFaceRule();if(g){if(this.insertRule(g),this.isSyncFontLoadingSupported)return;await new Promise(C=>{const i=this._queueLoadingCallback(C);this._prepareFontLoadEvent(I,i)})}}get isFontLoadingAPISupported(){var g;const I=!!((g=this._document)!=null&&g.fonts);return jI(this,"isFontLoadingAPISupported",I)}get isSyncFontLoadingSupported(){return jI(this,"isSyncFontLoadingSupported",Ot||gi.platform.isFirefox)}_queueLoadingCallback(I){function g(){for(ct(!i.done,"completeRequest() cannot be called twice."),i.done=!0;C.length>0&&C[0].done;){const e=C.shift();setTimeout(e.callback,0)}}const{loadingRequests:C}=this,i={done:!1,complete:g,callback:I};return C.push(i),i}get _loadTestFont(){const I=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return jI(this,"_loadTestFont",I)}_prepareFontLoadEvent(I,g){function C(p,Y){return p.charCodeAt(Y)<<24|p.charCodeAt(Y+1)<<16|p.charCodeAt(Y+2)<<8|p.charCodeAt(Y+3)&255}function i(p,Y,R,X){const H=p.substring(0,Y),S=p.substring(Y+R);return H+X+S}let e,A;const s=this._document.createElement("canvas");s.width=1,s.height=1;const l=s.getContext("2d");let n=0;function a(p,Y){if(++n>30){HI("Load test font never loaded."),Y();return}if(l.font="30px "+p,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){Y();return}setTimeout(a.bind(null,p,Y))}const d=`lt${Date.now()}${this.loadTestFontId++}`;let o=this._loadTestFont;o=i(o,976,d.length,d);const r=16,h=1482184792;let b=C(o,r);for(e=0,A=d.length-3;e<A;e+=4)b=b-h+C(d,e)|0;e<d.length&&(b=b-h+C(d+"XXX",e)|0),o=i(o,r,4,Wog(b));const u=`url(data:font/opentype;base64,${btoa(o)});`,m=`@font-face {font-family:"${d}";src:${u}}`;this.insertRule(m);const Z=this._document.createElement("div");Z.style.visibility="hidden",Z.style.width=Z.style.height="10px",Z.style.position="absolute",Z.style.top=Z.style.left="0px";for(const p of[I.loadedName,d]){const Y=this._document.createElement("span");Y.textContent="Hi",Y.style.fontFamily=p,Z.append(Y)}this._document.body.append(Z),a(d,()=>{Z.remove(),g.complete()})}}Bh=new WeakMap;class Jog{constructor(I,g=null){this.compiledGlyphs=Object.create(null);for(const C in I)this[C]=I[C];this._inspectFont=g}createNativeFontFace(){var g;if(!this.data||this.disableFontFace)return null;let I;if(!this.cssFontInfo)I=new FontFace(this.loadedName,this.data,{});else{const C={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(C.style=`oblique ${this.cssFontInfo.italicAngle}deg`),I=new FontFace(this.cssFontInfo.fontFamily,this.data,C)}return(g=this._inspectFont)==null||g.call(this,this),I}createFontFaceRule(){var C;if(!this.data||this.disableFontFace)return null;const I=`url(data:${this.mimetype};base64,${r$(this.data)});`;let g;if(!this.cssFontInfo)g=`@font-face {font-family:"${this.loadedName}";src:${I}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),g=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${I}}`}return(C=this._inspectFont)==null||C.call(this,this,I),g}getPathGenerator(I,g){if(this.compiledGlyphs[g]!==void 0)return this.compiledGlyphs[g];const C=this.loadedName+"_path_"+g;let i;try{i=I.get(C)}catch(A){HI(`getPathGenerator - ignoring character: "${A}".`)}const e=new Path2D(i||"");return this.fontExtraProperties||I.delete(C),this.compiledGlyphs[g]=e}}const BY={DATA:1,ERROR:2},st={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function J6(){}function Ki(t){if(t instanceof za||t instanceof fX||t instanceof K6||t instanceof LN||t instanceof NH)return t;switch(t instanceof Error||typeof t=="object"&&t!==null||ZC('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new za(t.message);case"InvalidPDFException":return new fX(t.message);case"PasswordException":return new K6(t.message,t.code);case"ResponseException":return new LN(t.message,t.status,t.missing);case"UnknownErrorException":return new NH(t.message,t.details)}return new NH(t.message,t.toString())}var Wh,Ee,U$,E$,P$,iN;class Ku{constructor(I,g,C){ig(this,Ee);ig(this,Wh,new AbortController);this.sourceName=I,this.targetName=g,this.comObj=C,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),C.addEventListener("message",eg(this,Ee,U$).bind(this),{signal:M(this,Wh).signal})}on(I,g){const C=this.actionHandler;if(C[I])throw new Error(`There is already an actionName called "${I}"`);C[I]=g}send(I,g,C){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:I,data:g},C)}sendWithPromise(I,g,C){const i=this.callbackId++,e=Promise.withResolvers();this.callbackCapabilities[i]=e;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:I,callbackId:i,data:g},C)}catch(A){e.reject(A)}return e.promise}sendWithStream(I,g,C,i){const e=this.streamId++,A=this.sourceName,s=this.targetName,l=this.comObj;return new ReadableStream({start:n=>{const a=Promise.withResolvers();return this.streamControllers[e]={controller:n,startCall:a,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:A,targetName:s,action:I,streamId:e,data:g,desiredSize:n.desiredSize},i),a.promise},pull:n=>{const a=Promise.withResolvers();return this.streamControllers[e].pullCall=a,l.postMessage({sourceName:A,targetName:s,stream:st.PULL,streamId:e,desiredSize:n.desiredSize}),a.promise},cancel:n=>{ct(n instanceof Error,"cancel must have a valid reason");const a=Promise.withResolvers();return this.streamControllers[e].cancelCall=a,this.streamControllers[e].isClosed=!0,l.postMessage({sourceName:A,targetName:s,stream:st.CANCEL,streamId:e,reason:Ki(n)}),a.promise}},C)}destroy(){var I;(I=M(this,Wh))==null||I.abort(),$(this,Wh,null)}}Wh=new WeakMap,Ee=new WeakSet,U$=function({data:I}){if(I.targetName!==this.sourceName)return;if(I.stream){eg(this,Ee,P$).call(this,I);return}if(I.callback){const C=I.callbackId,i=this.callbackCapabilities[C];if(!i)throw new Error(`Cannot resolve callback ${C}`);if(delete this.callbackCapabilities[C],I.callback===BY.DATA)i.resolve(I.data);else if(I.callback===BY.ERROR)i.reject(Ki(I.reason));else throw new Error("Unexpected callback case");return}const g=this.actionHandler[I.action];if(!g)throw new Error(`Unknown action from worker: ${I.action}`);if(I.callbackId){const C=this.sourceName,i=I.sourceName,e=this.comObj;Promise.try(g,I.data).then(function(A){e.postMessage({sourceName:C,targetName:i,callback:BY.DATA,callbackId:I.callbackId,data:A})},function(A){e.postMessage({sourceName:C,targetName:i,callback:BY.ERROR,callbackId:I.callbackId,reason:Ki(A)})});return}if(I.streamId){eg(this,Ee,E$).call(this,I);return}g(I.data)},E$=function(I){const g=I.streamId,C=this.sourceName,i=I.sourceName,e=this.comObj,A=this,s=this.actionHandler[I.action],l={enqueue(n,a=1,d){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=a,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),e.postMessage({sourceName:C,targetName:i,stream:st.ENQUEUE,streamId:g,chunk:n},d)},close(){this.isCancelled||(this.isCancelled=!0,e.postMessage({sourceName:C,targetName:i,stream:st.CLOSE,streamId:g}),delete A.streamSinks[g])},error(n){ct(n instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,e.postMessage({sourceName:C,targetName:i,stream:st.ERROR,streamId:g,reason:Ki(n)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:I.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[g]=l,Promise.try(s,I.data,l).then(function(){e.postMessage({sourceName:C,targetName:i,stream:st.START_COMPLETE,streamId:g,success:!0})},function(n){e.postMessage({sourceName:C,targetName:i,stream:st.START_COMPLETE,streamId:g,reason:Ki(n)})})},P$=function(I){const g=I.streamId,C=this.sourceName,i=I.sourceName,e=this.comObj,A=this.streamControllers[g],s=this.streamSinks[g];switch(I.stream){case st.START_COMPLETE:I.success?A.startCall.resolve():A.startCall.reject(Ki(I.reason));break;case st.PULL_COMPLETE:I.success?A.pullCall.resolve():A.pullCall.reject(Ki(I.reason));break;case st.PULL:if(!s){e.postMessage({sourceName:C,targetName:i,stream:st.PULL_COMPLETE,streamId:g,success:!0});break}s.desiredSize<=0&&I.desiredSize>0&&s.sinkCapability.resolve(),s.desiredSize=I.desiredSize,Promise.try(s.onPull||J6).then(function(){e.postMessage({sourceName:C,targetName:i,stream:st.PULL_COMPLETE,streamId:g,success:!0})},function(n){e.postMessage({sourceName:C,targetName:i,stream:st.PULL_COMPLETE,streamId:g,reason:Ki(n)})});break;case st.ENQUEUE:if(ct(A,"enqueue should have stream controller"),A.isClosed)break;A.controller.enqueue(I.chunk);break;case st.CLOSE:if(ct(A,"close should have stream controller"),A.isClosed)break;A.isClosed=!0,A.controller.close(),eg(this,Ee,iN).call(this,A,g);break;case st.ERROR:ct(A,"error should have stream controller"),A.controller.error(Ki(I.reason)),eg(this,Ee,iN).call(this,A,g);break;case st.CANCEL_COMPLETE:I.success?A.cancelCall.resolve():A.cancelCall.reject(Ki(I.reason)),eg(this,Ee,iN).call(this,A,g);break;case st.CANCEL:if(!s)break;const l=Ki(I.reason);Promise.try(s.onCancel||J6,l).then(function(){e.postMessage({sourceName:C,targetName:i,stream:st.CANCEL_COMPLETE,streamId:g,success:!0})},function(n){e.postMessage({sourceName:C,targetName:i,stream:st.CANCEL_COMPLETE,streamId:g,reason:Ki(n)})}),s.sinkCapability.reject(l),s.isCancelled=!0,delete this.streamSinks[g];break;default:throw new Error("Unexpected stream case")}},iN=async function(I,g){var C,i,e;await Promise.allSettled([(C=I.startCall)==null?void 0:C.promise,(i=I.pullCall)==null?void 0:i.promise,(e=I.cancelCall)==null?void 0:e.promise]),delete this.streamControllers[g]};var Um;class _${constructor({enableHWA:I=!1}){ig(this,Um,!1);$(this,Um,I)}create(I,g){if(I<=0||g<=0)throw new Error("Invalid canvas size");const C=this._createCanvas(I,g);return{canvas:C,context:C.getContext("2d",{willReadFrequently:!M(this,Um)})}}reset(I,g,C){if(!I.canvas)throw new Error("Canvas is not specified");if(g<=0||C<=0)throw new Error("Invalid canvas size");I.canvas.width=g,I.canvas.height=C}destroy(I){if(!I.canvas)throw new Error("Canvas is not specified");I.canvas.width=0,I.canvas.height=0,I.canvas=null,I.context=null}_createCanvas(I,g){ZC("Abstract method `_createCanvas` called.")}}Um=new WeakMap;class Log extends _${constructor({ownerDocument:I=globalThis.document,enableHWA:g=!1}){super({enableHWA:g}),this._document=I}_createCanvas(I,g){const C=this._document.createElement("canvas");return C.width=I,C.height=g,C}}class q${constructor({baseUrl:I=null,isCompressed:g=!0}){this.baseUrl=I,this.isCompressed=g}async fetch({name:I}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!I)throw new Error("CMap name must be specified.");const g=this.baseUrl+I+(this.isCompressed?".bcmap":"");return this._fetch(g).then(C=>({cMapData:C,isCompressed:this.isCompressed})).catch(C=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${g}`)})}async _fetch(I){ZC("Abstract method `_fetch` called.")}}class L6 extends q${async _fetch(I){const g=await OZ(I,this.isCompressed?"arraybuffer":"text");return g instanceof ArrayBuffer?new Uint8Array(g):QZ(g)}}class $${addFilter(I){return"none"}addHCMFilter(I,g){return"none"}addAlphaFilter(I){return"none"}addLuminosityFilter(I){return"none"}addHighlightHCMFilter(I,g,C,i,e){return"none"}destroy(I=!1){}}var dc,yh,ul,ml,ci,rc,hc,Pg,ai,Fu,kr,eN,zr,ggg,_X,Jr,ku,zu,qX,Ju;class vog extends $${constructor({docId:g,ownerDocument:C=globalThis.document}){super();ig(this,Pg);ig(this,dc);ig(this,yh);ig(this,ul);ig(this,ml);ig(this,ci);ig(this,rc);ig(this,hc,0);$(this,ml,g),$(this,ci,C)}addFilter(g){if(!g)return"none";let C=M(this,Pg,ai).get(g);if(C)return C;const[i,e,A]=eg(this,Pg,eN).call(this,g),s=g.length===1?i:`${i}${e}${A}`;if(C=M(this,Pg,ai).get(s),C)return M(this,Pg,ai).set(g,C),C;const l=`g_${M(this,ml)}_transfer_map_${ui(this,hc)._++}`,n=eg(this,Pg,zr).call(this,l);M(this,Pg,ai).set(g,n),M(this,Pg,ai).set(s,n);const a=eg(this,Pg,Jr).call(this,l);return eg(this,Pg,zu).call(this,i,e,A,a),n}addHCMFilter(g,C){var r;const i=`${g}-${C}`,e="base";let A=M(this,Pg,Fu).get(e);if((A==null?void 0:A.key)===i||(A?((r=A.filter)==null||r.remove(),A.key=i,A.url="none",A.filter=null):(A={key:i,url:"none",filter:null},M(this,Pg,Fu).set(e,A)),!g||!C))return A.url;const s=eg(this,Pg,Ju).call(this,g);g=iI.makeHexColor(...s);const l=eg(this,Pg,Ju).call(this,C);if(C=iI.makeHexColor(...l),M(this,Pg,kr).style.color="",g==="#000000"&&C==="#ffffff"||g===C)return A.url;const n=new Array(256);for(let h=0;h<=255;h++){const b=h/255;n[h]=b<=.03928?b/12.92:((b+.055)/1.055)**2.4}const a=n.join(","),d=`g_${M(this,ml)}_hcm_filter`,o=A.filter=eg(this,Pg,Jr).call(this,d);eg(this,Pg,zu).call(this,a,a,a,o),eg(this,Pg,_X).call(this,o);const c=(h,b)=>{const u=s[h]/255,m=l[h]/255,Z=new Array(b+1);for(let p=0;p<=b;p++)Z[p]=u+p/b*(m-u);return Z.join(",")};return eg(this,Pg,zu).call(this,c(0,5),c(1,5),c(2,5),o),A.url=eg(this,Pg,zr).call(this,d),A.url}addAlphaFilter(g){let C=M(this,Pg,ai).get(g);if(C)return C;const[i]=eg(this,Pg,eN).call(this,[g]),e=`alpha_${i}`;if(C=M(this,Pg,ai).get(e),C)return M(this,Pg,ai).set(g,C),C;const A=`g_${M(this,ml)}_alpha_map_${ui(this,hc)._++}`,s=eg(this,Pg,zr).call(this,A);M(this,Pg,ai).set(g,s),M(this,Pg,ai).set(e,s);const l=eg(this,Pg,Jr).call(this,A);return eg(this,Pg,qX).call(this,i,l),s}addLuminosityFilter(g){let C=M(this,Pg,ai).get(g||"luminosity");if(C)return C;let i,e;if(g?([i]=eg(this,Pg,eN).call(this,[g]),e=`luminosity_${i}`):e="luminosity",C=M(this,Pg,ai).get(e),C)return M(this,Pg,ai).set(g,C),C;const A=`g_${M(this,ml)}_luminosity_map_${ui(this,hc)._++}`,s=eg(this,Pg,zr).call(this,A);M(this,Pg,ai).set(g,s),M(this,Pg,ai).set(e,s);const l=eg(this,Pg,Jr).call(this,A);return eg(this,Pg,ggg).call(this,l),g&&eg(this,Pg,qX).call(this,i,l),s}addHighlightHCMFilter(g,C,i,e,A){var m;const s=`${C}-${i}-${e}-${A}`;let l=M(this,Pg,Fu).get(g);if((l==null?void 0:l.key)===s||(l?((m=l.filter)==null||m.remove(),l.key=s,l.url="none",l.filter=null):(l={key:s,url:"none",filter:null},M(this,Pg,Fu).set(g,l)),!C||!i))return l.url;const[n,a]=[C,i].map(eg(this,Pg,Ju).bind(this));let d=Math.round(.2126*n[0]+.7152*n[1]+.0722*n[2]),o=Math.round(.2126*a[0]+.7152*a[1]+.0722*a[2]),[c,r]=[e,A].map(eg(this,Pg,Ju).bind(this));o<d&&([d,o,c,r]=[o,d,r,c]),M(this,Pg,kr).style.color="";const h=(Z,p,Y)=>{const R=new Array(256),X=(o-d)/Y,H=Z/255,S=(p-Z)/(255*Y);let z=0;for(let v=0;v<=Y;v++){const K=Math.round(d+v*X),V=H+v*S;for(let N=z;N<=K;N++)R[N]=V;z=K+1}for(let v=z;v<256;v++)R[v]=R[z-1];return R.join(",")},b=`g_${M(this,ml)}_hcm_${g}_filter`,u=l.filter=eg(this,Pg,Jr).call(this,b);return eg(this,Pg,_X).call(this,u),eg(this,Pg,zu).call(this,h(c[0],r[0],5),h(c[1],r[1],5),h(c[2],r[2],5),u),l.url=eg(this,Pg,zr).call(this,b),l.url}destroy(g=!1){var C,i,e,A;g&&((C=M(this,rc))!=null&&C.size)||((i=M(this,ul))==null||i.parentNode.parentNode.remove(),$(this,ul,null),(e=M(this,yh))==null||e.clear(),$(this,yh,null),(A=M(this,rc))==null||A.clear(),$(this,rc,null),$(this,hc,0))}}dc=new WeakMap,yh=new WeakMap,ul=new WeakMap,ml=new WeakMap,ci=new WeakMap,rc=new WeakMap,hc=new WeakMap,Pg=new WeakSet,ai=function(){return M(this,yh)||$(this,yh,new Map)},Fu=function(){return M(this,rc)||$(this,rc,new Map)},kr=function(){if(!M(this,ul)){const g=M(this,ci).createElement("div"),{style:C}=g;C.visibility="hidden",C.contain="strict",C.width=C.height=0,C.position="absolute",C.top=C.left=0,C.zIndex=-1;const i=M(this,ci).createElementNS(tl,"svg");i.setAttribute("width",0),i.setAttribute("height",0),$(this,ul,M(this,ci).createElementNS(tl,"defs")),g.append(i),i.append(M(this,ul)),M(this,ci).body.append(g)}return M(this,ul)},eN=function(g){if(g.length===1){const n=g[0],a=new Array(256);for(let o=0;o<256;o++)a[o]=n[o]/255;const d=a.join(",");return[d,d,d]}const[C,i,e]=g,A=new Array(256),s=new Array(256),l=new Array(256);for(let n=0;n<256;n++)A[n]=C[n]/255,s[n]=i[n]/255,l[n]=e[n]/255;return[A.join(","),s.join(","),l.join(",")]},zr=function(g){if(M(this,dc)===void 0){$(this,dc,"");const C=M(this,ci).URL;C!==M(this,ci).baseURI&&(kV(C)?HI('#createUrl: ignore "data:"-URL for performance reasons.'):$(this,dc,C.split("#",1)[0]))}return`url(${M(this,dc)}#${g})`},ggg=function(g){const C=M(this,ci).createElementNS(tl,"feColorMatrix");C.setAttribute("type","matrix"),C.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),g.append(C)},_X=function(g){const C=M(this,ci).createElementNS(tl,"feColorMatrix");C.setAttribute("type","matrix"),C.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),g.append(C)},Jr=function(g){const C=M(this,ci).createElementNS(tl,"filter");return C.setAttribute("color-interpolation-filters","sRGB"),C.setAttribute("id",g),M(this,Pg,kr).append(C),C},ku=function(g,C,i){const e=M(this,ci).createElementNS(tl,C);e.setAttribute("type","discrete"),e.setAttribute("tableValues",i),g.append(e)},zu=function(g,C,i,e){const A=M(this,ci).createElementNS(tl,"feComponentTransfer");e.append(A),eg(this,Pg,ku).call(this,A,"feFuncR",g),eg(this,Pg,ku).call(this,A,"feFuncG",C),eg(this,Pg,ku).call(this,A,"feFuncB",i)},qX=function(g,C){const i=M(this,ci).createElementNS(tl,"feComponentTransfer");C.append(i),eg(this,Pg,ku).call(this,i,"feFuncA",g)},Ju=function(g){return M(this,Pg,kr).style.color=g,I9(getComputedStyle(M(this,Pg,kr)).getPropertyValue("color"))};class Igg{constructor({baseUrl:I=null}){this.baseUrl=I}async fetch({filename:I}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!I)throw new Error("Font filename must be specified.");const g=`${this.baseUrl}${I}`;return this._fetch(g).catch(C=>{throw new Error(`Unable to load font data at: ${g}`)})}async _fetch(I){ZC("Abstract method `_fetch` called.")}}class v6 extends Igg{async _fetch(I){const g=await OZ(I,"arraybuffer");return new Uint8Array(g)}}class Cgg{constructor({baseUrl:I=null}){this.baseUrl=I}async fetch({filename:I}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!I)throw new Error("Wasm filename must be specified.");const g=`${this.baseUrl}${I}`;return this._fetch(g).catch(C=>{throw new Error(`Unable to load wasm data at: ${g}`)})}async _fetch(I){ZC("Abstract method `_fetch` called.")}}class T6 extends Cgg{async _fetch(I){const g=await OZ(I,"arraybuffer");return new Uint8Array(g)}}Ot&&HI("Please use the `legacy` build in Node.js environments.");async function i9(t){const g=await process.getBuiltinModule("fs").promises.readFile(t);return new Uint8Array(g)}class Tog extends $${}class xog extends _${_createCanvas(I,g){return process.getBuiltinModule("module").createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:gh&&gh.tagName.toUpperCase()==="SCRIPT"&&gh.src||new URL("index.cjs",document.baseURI).href)("@napi-rs/canvas").createCanvas(I,g)}}class jog extends q${async _fetch(I){return i9(I)}}class Qog extends Igg{async _fetch(I){return i9(I)}}class Oog extends Cgg{async _fetch(I){return i9(I)}}const Pt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function $X(t,I){if(!I)return;const g=I[2]-I[0],C=I[3]-I[1],i=new Path2D;i.rect(I[0],I[1],g,C),t.clip(i)}class e9{isModifyingCurrentTransform(){return!1}getPattern(){ZC("Abstract method `getPattern` called.")}}class Uog extends e9{constructor(I){super(),this._type=I[1],this._bbox=I[2],this._colorStops=I[3],this._p0=I[4],this._p1=I[5],this._r0=I[6],this._r1=I[7],this.matrix=null}_createGradient(I){let g;this._type==="axial"?g=I.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(g=I.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const C of this._colorStops)g.addColorStop(C[0],C[1]);return g}getPattern(I,g,C,i){let e;if(i===Pt.STROKE||i===Pt.FILL){const A=g.current.getClippedPathBoundingBox(i,DC(I))||[0,0,0,0],s=Math.ceil(A[2]-A[0])||1,l=Math.ceil(A[3]-A[1])||1,n=g.cachedCanvases.getCanvas("pattern",s,l),a=n.context;a.clearRect(0,0,a.canvas.width,a.canvas.height),a.beginPath(),a.rect(0,0,a.canvas.width,a.canvas.height),a.translate(-A[0],-A[1]),C=iI.transform(C,[1,0,0,1,A[0],A[1]]),a.transform(...g.baseTransform),this.matrix&&a.transform(...this.matrix),$X(a,this._bbox),a.fillStyle=this._createGradient(a),a.fill(),e=I.createPattern(n.canvas,"no-repeat");const d=new DOMMatrix(C);e.setTransform(d)}else $X(I,this._bbox),e=this._createGradient(I);return e}}function RH(t,I,g,C,i,e,A,s){const l=I.coords,n=I.colors,a=t.data,d=t.width*4;let o;l[g+1]>l[C+1]&&(o=g,g=C,C=o,o=e,e=A,A=o),l[C+1]>l[i+1]&&(o=C,C=i,i=o,o=A,A=s,s=o),l[g+1]>l[C+1]&&(o=g,g=C,C=o,o=e,e=A,A=o);const c=(l[g]+I.offsetX)*I.scaleX,r=(l[g+1]+I.offsetY)*I.scaleY,h=(l[C]+I.offsetX)*I.scaleX,b=(l[C+1]+I.offsetY)*I.scaleY,u=(l[i]+I.offsetX)*I.scaleX,m=(l[i+1]+I.offsetY)*I.scaleY;if(r>=m)return;const Z=n[e],p=n[e+1],Y=n[e+2],R=n[A],X=n[A+1],H=n[A+2],S=n[s],z=n[s+1],v=n[s+2],K=Math.round(r),V=Math.round(m);let N,B,G,w,W,y,f,D;for(let F=K;F<=V;F++){if(F<b){const E=F<r?0:(r-F)/(r-b);N=c-(c-h)*E,B=Z-(Z-R)*E,G=p-(p-X)*E,w=Y-(Y-H)*E}else{let E;F>m?E=1:b===m?E=0:E=(b-F)/(b-m),N=h-(h-u)*E,B=R-(R-S)*E,G=X-(X-z)*E,w=H-(H-v)*E}let T;F<r?T=0:F>m?T=1:T=(r-F)/(r-m),W=c-(c-u)*T,y=Z-(Z-S)*T,f=p-(p-z)*T,D=Y-(Y-v)*T;const Q=Math.round(Math.min(N,W)),P=Math.round(Math.max(N,W));let L=d*F+Q*4;for(let E=Q;E<=P;E++)T=(N-E)/(N-W),T<0?T=0:T>1&&(T=1),a[L++]=B-(B-y)*T|0,a[L++]=G-(G-f)*T|0,a[L++]=w-(w-D)*T|0,a[L++]=255}}function Eog(t,I,g){const C=I.coords,i=I.colors;let e,A;switch(I.type){case"lattice":const s=I.verticesPerRow,l=Math.floor(C.length/s)-1,n=s-1;for(e=0;e<l;e++){let a=e*s;for(let d=0;d<n;d++,a++)RH(t,g,C[a],C[a+1],C[a+s],i[a],i[a+1],i[a+s]),RH(t,g,C[a+s+1],C[a+1],C[a+s],i[a+s+1],i[a+1],i[a+s])}break;case"triangles":for(e=0,A=C.length;e<A;e+=3)RH(t,g,C[e],C[e+1],C[e+2],i[e],i[e+1],i[e+2]);break;default:throw new Error("illegal figure")}}class Pog extends e9{constructor(I){super(),this._coords=I[2],this._colors=I[3],this._figures=I[4],this._bounds=I[5],this._bbox=I[6],this._background=I[7],this.matrix=null}_createMeshCanvas(I,g,C){const s=Math.floor(this._bounds[0]),l=Math.floor(this._bounds[1]),n=Math.ceil(this._bounds[2])-s,a=Math.ceil(this._bounds[3])-l,d=Math.min(Math.ceil(Math.abs(n*I[0]*1.1)),3e3),o=Math.min(Math.ceil(Math.abs(a*I[1]*1.1)),3e3),c=n/d,r=a/o,h={coords:this._coords,colors:this._colors,offsetX:-s,offsetY:-l,scaleX:1/c,scaleY:1/r},b=d+2*2,u=o+2*2,m=C.getCanvas("mesh",b,u),Z=m.context,p=Z.createImageData(d,o);if(g){const R=p.data;for(let X=0,H=R.length;X<H;X+=4)R[X]=g[0],R[X+1]=g[1],R[X+2]=g[2],R[X+3]=255}for(const R of this._figures)Eog(p,R,h);return Z.putImageData(p,2,2),{canvas:m.canvas,offsetX:s-2*c,offsetY:l-2*r,scaleX:c,scaleY:r}}isModifyingCurrentTransform(){return!0}getPattern(I,g,C,i){$X(I,this._bbox);let e;if(i===Pt.SHADING)e=iI.singularValueDecompose2dScale(DC(I));else if(e=iI.singularValueDecompose2dScale(g.baseTransform),this.matrix){const s=iI.singularValueDecompose2dScale(this.matrix);e=[e[0]*s[0],e[1]*s[1]]}const A=this._createMeshCanvas(e,i===Pt.SHADING?null:this._background,g.cachedCanvases);return i!==Pt.SHADING&&(I.setTransform(...g.baseTransform),this.matrix&&I.transform(...this.matrix)),I.translate(A.offsetX,A.offsetY),I.scale(A.scaleX,A.scaleY),I.createPattern(A.canvas,"no-repeat")}}class _og extends e9{getPattern(){return"hotpink"}}function qog(t){switch(t[0]){case"RadialAxial":return new Uog(t);case"Mesh":return new Pog(t);case"Dummy":return new _og}throw new Error(`Unknown IR type: ${t[0]}`)}const x6={COLORED:1,UNCOLORED:2},BV=class BV{constructor(I,g,C,i){this.color=I[1],this.operatorList=I[2],this.matrix=I[3],this.bbox=I[4],this.xstep=I[5],this.ystep=I[6],this.paintType=I[7],this.tilingType=I[8],this.ctx=g,this.canvasGraphicsFactory=C,this.baseTransform=i}createPatternCanvas(I){const{bbox:g,operatorList:C,paintType:i,tilingType:e,color:A,canvasGraphicsFactory:s}=this;let{xstep:l,ystep:n}=this;l=Math.abs(l),n=Math.abs(n),FV("TilingType: "+e);const a=g[0],d=g[1],o=g[2],c=g[3],r=o-a,h=c-d,b=iI.singularValueDecompose2dScale(this.matrix),u=iI.singularValueDecompose2dScale(this.baseTransform),m=b[0]*u[0],Z=b[1]*u[1];let p=r,Y=h,R=!1,X=!1;const H=Math.ceil(l*m),S=Math.ceil(n*Z),z=Math.ceil(r*m),v=Math.ceil(h*Z);H>=z?p=l:R=!0,S>=v?Y=n:X=!0;const K=this.getSizeAndScale(p,this.ctx.canvas.width,m),V=this.getSizeAndScale(Y,this.ctx.canvas.height,Z),N=I.cachedCanvases.getCanvas("pattern",K.size,V.size),B=N.context,G=s.createCanvasGraphics(B);if(G.groupLevel=I.groupLevel,this.setFillAndStrokeStyleToContext(G,i,A),B.translate(-K.scale*a,-V.scale*d),G.transform(K.scale,0,0,V.scale,0,0),B.save(),this.clipBbox(G,a,d,o,c),G.baseTransform=DC(G.ctx),G.executeOperatorList(C),G.endDrawing(),B.restore(),R||X){const w=N.canvas;R&&(p=l),X&&(Y=n);const W=this.getSizeAndScale(p,this.ctx.canvas.width,m),y=this.getSizeAndScale(Y,this.ctx.canvas.height,Z),f=W.size,D=y.size,F=I.cachedCanvases.getCanvas("pattern-workaround",f,D),T=F.context,Q=R?Math.floor(r/l):0,P=X?Math.floor(h/n):0;for(let L=0;L<=Q;L++)for(let E=0;E<=P;E++)T.drawImage(w,f*L,D*E,f,D,0,0,f,D);return{canvas:F.canvas,scaleX:W.scale,scaleY:y.scale,offsetX:a,offsetY:d}}return{canvas:N.canvas,scaleX:K.scale,scaleY:V.scale,offsetX:a,offsetY:d}}getSizeAndScale(I,g,C){const i=Math.max(BV.MAX_PATTERN_SIZE,g);let e=Math.ceil(I*C);return e>=i?e=i:C=e/I,{scale:C,size:e}}clipBbox(I,g,C,i,e){const A=i-g,s=e-C;I.ctx.rect(g,C,A,s),I.current.updateRectMinMax(DC(I.ctx),[g,C,i,e]),I.clip(),I.endPath()}setFillAndStrokeStyleToContext(I,g,C){const i=I.ctx,e=I.current;switch(g){case x6.COLORED:const A=this.ctx;i.fillStyle=A.fillStyle,i.strokeStyle=A.strokeStyle,e.fillColor=A.fillStyle,e.strokeColor=A.strokeStyle;break;case x6.UNCOLORED:const s=iI.makeHexColor(C[0],C[1],C[2]);i.fillStyle=s,i.strokeStyle=s,e.fillColor=s,e.strokeColor=s;break;default:throw new Bog(`Unsupported paint type: ${g}`)}}isModifyingCurrentTransform(){return!1}getPattern(I,g,C,i){let e=C;i!==Pt.SHADING&&(e=iI.transform(e,g.baseTransform),this.matrix&&(e=iI.transform(e,this.matrix)));const A=this.createPatternCanvas(g);let s=new DOMMatrix(e);s=s.translate(A.offsetX,A.offsetY),s=s.scale(1/A.scaleX,1/A.scaleY);const l=I.createPattern(A.canvas,"repeat");return l.setTransform(s),l}};CI(BV,"MAX_PATTERN_SIZE",3e3);let gS=BV;function $og({src:t,srcPos:I=0,dest:g,width:C,height:i,nonBlackColor:e=4294967295,inverseDecode:A=!1}){const s=gi.isLittleEndian?4278190080:255,[l,n]=A?[e,s]:[s,e],a=C>>3,d=C&7,o=t.length;g=new Uint32Array(g.buffer);let c=0;for(let r=0;r<i;r++){for(const b=I+a;I<b;I++){const u=I<o?t[I]:255;g[c++]=u&128?n:l,g[c++]=u&64?n:l,g[c++]=u&32?n:l,g[c++]=u&16?n:l,g[c++]=u&8?n:l,g[c++]=u&4?n:l,g[c++]=u&2?n:l,g[c++]=u&1?n:l}if(d===0)continue;const h=I<o?t[I++]:255;for(let b=0;b<d;b++)g[c++]=h&1<<7-b?n:l}return{srcPos:I,destPos:c}}const j6=16,Q6=100,gcg=15,O6=10,U6=1e3,Li=16,fH=new DOMMatrix;function Icg(t,I){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){I.save(),this.__originalSave()},t.restore=function(){I.restore(),this.__originalRestore()},t.translate=function(C,i){I.translate(C,i),this.__originalTranslate(C,i)},t.scale=function(C,i){I.scale(C,i),this.__originalScale(C,i)},t.transform=function(C,i,e,A,s,l){I.transform(C,i,e,A,s,l),this.__originalTransform(C,i,e,A,s,l)},t.setTransform=function(C,i,e,A,s,l){I.setTransform(C,i,e,A,s,l),this.__originalSetTransform(C,i,e,A,s,l)},t.resetTransform=function(){I.resetTransform(),this.__originalResetTransform()},t.rotate=function(C){I.rotate(C),this.__originalRotate(C)},t.clip=function(C){I.clip(C),this.__originalClip(C)},t.moveTo=function(g,C){I.moveTo(g,C),this.__originalMoveTo(g,C)},t.lineTo=function(g,C){I.lineTo(g,C),this.__originalLineTo(g,C)},t.bezierCurveTo=function(g,C,i,e,A,s){I.bezierCurveTo(g,C,i,e,A,s),this.__originalBezierCurveTo(g,C,i,e,A,s)},t.rect=function(g,C,i,e){I.rect(g,C,i,e),this.__originalRect(g,C,i,e)},t.closePath=function(){I.closePath(),this.__originalClosePath()},t.beginPath=function(){I.beginPath(),this.__originalBeginPath()}}class Ccg{constructor(I){this.canvasFactory=I,this.cache=Object.create(null)}getCanvas(I,g,C){let i;return this.cache[I]!==void 0?(i=this.cache[I],this.canvasFactory.reset(i,g,C)):(i=this.canvasFactory.create(g,C),this.cache[I]=i),i}delete(I){delete this.cache[I]}clear(){for(const I in this.cache){const g=this.cache[I];this.canvasFactory.destroy(g),delete this.cache[I]}}}function WY(t,I,g,C,i,e,A,s,l,n){const[a,d,o,c,r,h]=DC(t);if(d===0&&o===0){const m=A*a+r,Z=Math.round(m),p=s*c+h,Y=Math.round(p),R=(A+l)*a+r,X=Math.abs(Math.round(R)-Z)||1,H=(s+n)*c+h,S=Math.abs(Math.round(H)-Y)||1;return t.setTransform(Math.sign(a),0,0,Math.sign(c),Z,Y),t.drawImage(I,g,C,i,e,0,0,X,S),t.setTransform(a,d,o,c,r,h),[X,S]}if(a===0&&c===0){const m=s*o+r,Z=Math.round(m),p=A*d+h,Y=Math.round(p),R=(s+n)*o+r,X=Math.abs(Math.round(R)-Z)||1,H=(A+l)*d+h,S=Math.abs(Math.round(H)-Y)||1;return t.setTransform(0,Math.sign(d),Math.sign(o),0,Z,Y),t.drawImage(I,g,C,i,e,0,0,S,X),t.setTransform(a,d,o,c,r,h),[S,X]}t.drawImage(I,g,C,i,e,A,s,l,n);const b=Math.hypot(a,d),u=Math.hypot(o,c);return[b*l,u*n]}function tcg(t){const{width:I,height:g}=t;if(I>U6||g>U6)return null;const C=1e3,i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),e=I+1,A=new Uint8Array(e*(g+1));let s,l,n;const a=I+7&-8,d=new Uint8Array(a*g);let o=0;for(const R of t.data){let X=128;for(;X>0;)d[o++]=R&X?0:255,X>>=1}let c=0;for(o=0,d[o]!==0&&(A[0]=1,++c),l=1;l<I;l++)d[o]!==d[o+1]&&(A[l]=d[o]?2:1,++c),o++;for(d[o]!==0&&(A[l]=2,++c),s=1;s<g;s++){o=s*a,n=s*e,d[o-a]!==d[o]&&(A[n]=d[o]?1:8,++c);let R=(d[o]?4:0)+(d[o-a]?8:0);for(l=1;l<I;l++)R=(R>>2)+(d[o+1]?4:0)+(d[o-a+1]?8:0),i[R]&&(A[n+l]=i[R],++c),o++;if(d[o-a]!==d[o]&&(A[n+l]=d[o]?2:4,++c),c>C)return null}for(o=a*(g-1),n=s*e,d[o]!==0&&(A[n]=8,++c),l=1;l<I;l++)d[o]!==d[o+1]&&(A[n+l]=d[o]?4:8,++c),o++;if(d[o]!==0&&(A[n+l]=4,++c),c>C)return null;const r=new Int32Array([0,e,-1,0,-e,0,0,0,1]),h=new Path2D,{a:b,b:u,c:m,d:Z,e:p,f:Y}=new DOMMatrix().scaleSelf(1/I,-1/g).translateSelf(0,-g);for(s=0;c&&s<=g;s++){let R=s*e;const X=R+I;for(;R<X&&!A[R];)R++;if(R===X)continue;let H=R%e,S=s;h.moveTo(b*H+m*S+p,u*H+Z*S+Y);const z=R;let v=A[R];do{const K=r[v];do R+=K;while(!A[R]);const V=A[R];V!==5&&V!==10?(v=V,A[R]=0):(v=V&51*v>>4,A[R]&=v>>2|v<<2),H=R%e,S=R/e|0,h.lineTo(b*H+m*S+p,u*H+Z*S+Y),A[R]||--c}while(z!==R);--s}return h}class E6{constructor(I,g){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=o$,this.textMatrixScale=1,this.fontMatrix=RX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=ni.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,I,g])}clone(){const I=Object.create(this);return I.clipBox=this.clipBox.slice(),I}updateRectMinMax(I,g){const C=iI.applyTransform(g,I),i=iI.applyTransform(g.slice(2),I),e=iI.applyTransform([g[0],g[3]],I),A=iI.applyTransform([g[2],g[1]],I);this.minX=Math.min(this.minX,C[0],i[0],e[0],A[0]),this.minY=Math.min(this.minY,C[1],i[1],e[1],A[1]),this.maxX=Math.max(this.maxX,C[0],i[0],e[0],A[0]),this.maxY=Math.max(this.maxY,C[1],i[1],e[1],A[1])}getPathBoundingBox(I=Pt.FILL,g=null){const C=[this.minX,this.minY,this.maxX,this.maxY];if(I===Pt.STROKE){g||ZC("Stroke bounding box must include transform.");const i=iI.singularValueDecompose2dScale(g),e=i[0]*this.lineWidth/2,A=i[1]*this.lineWidth/2;C[0]-=e,C[1]-=A,C[2]+=e,C[3]+=A}return C}updateClipFromPath(){const I=iI.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(I||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(I){this.clipBox=I,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(I=Pt.FILL,g=null){return iI.intersect(this.clipBox,this.getPathBoundingBox(I,g))}}function P6(t,I){if(I instanceof ImageData){t.putImageData(I,0,0);return}const g=I.height,C=I.width,i=g%Li,e=(g-i)/Li,A=i===0?e:e+1,s=t.createImageData(C,Li);let l=0,n;const a=I.data,d=s.data;let o,c,r,h;if(I.kind===EY.GRAYSCALE_1BPP){const b=a.byteLength,u=new Uint32Array(d.buffer,0,d.byteLength>>2),m=u.length,Z=C+7>>3,p=4294967295,Y=gi.isLittleEndian?4278190080:255;for(o=0;o<A;o++){for(r=o<e?Li:i,n=0,c=0;c<r;c++){const R=b-l;let X=0;const H=R>Z?C:R*8-7,S=H&-8;let z=0,v=0;for(;X<S;X+=8)v=a[l++],u[n++]=v&128?p:Y,u[n++]=v&64?p:Y,u[n++]=v&32?p:Y,u[n++]=v&16?p:Y,u[n++]=v&8?p:Y,u[n++]=v&4?p:Y,u[n++]=v&2?p:Y,u[n++]=v&1?p:Y;for(;X<H;X++)z===0&&(v=a[l++],z=128),u[n++]=v&z?p:Y,z>>=1}for(;n<m;)u[n++]=0;t.putImageData(s,0,o*Li)}}else if(I.kind===EY.RGBA_32BPP){for(c=0,h=C*Li*4,o=0;o<e;o++)d.set(a.subarray(l,l+h)),l+=h,t.putImageData(s,0,c),c+=Li;o<A&&(h=C*i*4,d.set(a.subarray(l,l+h)),t.putImageData(s,0,c))}else if(I.kind===EY.RGB_24BPP)for(r=Li,h=C*r,o=0;o<A;o++){for(o>=e&&(r=i,h=C*r),n=0,c=h;c--;)d[n++]=a[l++],d[n++]=a[l++],d[n++]=a[l++],d[n++]=255;t.putImageData(s,0,o*Li)}else throw new Error(`bad image kind: ${I.kind}`)}function _6(t,I){if(I.bitmap){t.drawImage(I.bitmap,0,0);return}const g=I.height,C=I.width,i=g%Li,e=(g-i)/Li,A=i===0?e:e+1,s=t.createImageData(C,Li);let l=0;const n=I.data,a=s.data;for(let d=0;d<A;d++){const o=d<e?Li:i;({srcPos:l}=$og({src:n,srcPos:l,dest:a,width:C,height:o,nonBlackColor:0})),t.putImageData(s,0,d*Li)}}function pu(t,I){const g=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const C of g)t[C]!==void 0&&(I[C]=t[C]);t.setLineDash!==void 0&&(I.setLineDash(t.getLineDash()),I.lineDashOffset=t.lineDashOffset)}function yY(t){if(t.strokeStyle=t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",t.setLineDash!==void 0&&(t.setLineDash([]),t.lineDashOffset=0),!Ot){const{filter:I}=t;I!=="none"&&I!==""&&(t.filter="none")}}function q6(t,I){if(I)return!0;const g=iI.singularValueDecompose2dScale(t);g[0]=Math.fround(g[0]),g[1]=Math.fround(g[1]);const C=Math.fround(jl.pixelRatio*Ja.PDF_TO_CSS_UNITS);return g[0]<=C&&g[1]<=C}const icg=["butt","round","square"],ecg=["miter","round","bevel"],Acg={},$6={};var RA,IS,CS,tS;const T9=class T9{constructor(I,g,C,i,e,{optionalContentConfig:A,markedContentStack:s=null},l,n){ig(this,RA);this.ctx=I,this.current=new E6(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=g,this.objs=C,this.canvasFactory=i,this.filterFactory=e,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=s||[],this.optionalContentConfig=A,this.cachedCanvases=new Ccg(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=l,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=n,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(I,g=null){return typeof I=="string"?I.startsWith("g_")?this.commonObjs.get(I):this.objs.get(I):g}beginDrawing({transform:I,viewport:g,transparency:C=!1,background:i=null}){const e=this.ctx.canvas.width,A=this.ctx.canvas.height,s=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,e,A),this.ctx.fillStyle=s,C){const l=this.cachedCanvases.getCanvas("transparent",e,A);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform(...DC(this.compositeCtx))}this.ctx.save(),yY(this.ctx),I&&(this.ctx.transform(...I),this.outputScaleX=I[0],this.outputScaleY=I[0]),this.ctx.transform(...g.transform),this.viewportScale=g.scale,this.baseTransform=DC(this.ctx)}executeOperatorList(I,g,C,i){const e=I.argsArray,A=I.fnArray;let s=g||0;const l=e.length;if(l===s)return s;const n=l-s>O6&&typeof C=="function",a=n?Date.now()+gcg:0;let d=0;const o=this.commonObjs,c=this.objs;let r;for(;;){if(i!==void 0&&s===i.nextBreakPoint)return i.breakIt(s,C),s;if(r=A[s],r!==JN.dependency)this[r].apply(this,e[s]);else for(const h of e[s]){const b=h.startsWith("g_")?o:c;if(!b.has(h))return b.get(h,C),s}if(s++,s===l)return s;if(n&&++d>O6){if(Date.now()>a)return C(),s;d=0}}}endDrawing(){eg(this,RA,IS).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const I of this._cachedBitmapsMap.values()){for(const g of I.values())typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement&&(g.width=g.height=0);I.clear()}this._cachedBitmapsMap.clear(),eg(this,RA,CS).call(this)}_scaleImage(I,g){const C=I.width??I.displayWidth,i=I.height??I.displayHeight;let e=Math.max(Math.hypot(g[0],g[1]),1),A=Math.max(Math.hypot(g[2],g[3]),1),s=C,l=i,n="prescale1",a,d;for(;e>2&&s>1||A>2&&l>1;){let o=s,c=l;e>2&&s>1&&(o=s>=16384?Math.floor(s/2)-1||1:Math.ceil(s/2),e/=s/o),A>2&&l>1&&(c=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,A/=l/c),a=this.cachedCanvases.getCanvas(n,o,c),d=a.context,d.clearRect(0,0,o,c),d.drawImage(I,0,0,s,l,0,0,o,c),I=a.canvas,s=o,l=c,n=n==="prescale1"?"prescale2":"prescale1"}return{img:I,paintWidth:s,paintHeight:l}}_createMaskCanvas(I){const g=this.ctx,{width:C,height:i}=I,e=this.current.fillColor,A=this.current.patternFill,s=DC(g);let l,n,a,d;if((I.bitmap||I.data)&&I.count>1){const H=I.bitmap||I.data.buffer;n=JSON.stringify(A?s:[s.slice(0,4),e]),l=this._cachedBitmapsMap.get(H),l||(l=new Map,this._cachedBitmapsMap.set(H,l));const S=l.get(n);if(S&&!A){const z=Math.round(Math.min(s[0],s[2])+s[4]),v=Math.round(Math.min(s[1],s[3])+s[5]);return{canvas:S,offsetX:z,offsetY:v}}a=S}a||(d=this.cachedCanvases.getCanvas("maskCanvas",C,i),_6(d.context,I));let o=iI.transform(s,[1/C,0,0,-1/i,0,0]);o=iI.transform(o,[1,0,0,1,0,-i]);const[c,r,h,b]=iI.getAxialAlignedBoundingBox([0,0,C,i],o),u=Math.round(h-c)||1,m=Math.round(b-r)||1,Z=this.cachedCanvases.getCanvas("fillCanvas",u,m),p=Z.context,Y=c,R=r;p.translate(-Y,-R),p.transform(...o),a||(a=this._scaleImage(d.canvas,_A(p)),a=a.img,l&&A&&l.set(n,a)),p.imageSmoothingEnabled=q6(DC(p),I.interpolate),WY(p,a,0,0,a.width,a.height,0,0,C,i),p.globalCompositeOperation="source-in";const X=iI.transform(_A(p),[1,0,0,1,-Y,-R]);return p.fillStyle=A?e.getPattern(g,this,X,Pt.FILL):e,p.fillRect(0,0,C,i),l&&!A&&(this.cachedCanvases.delete("fillCanvas"),l.set(n,Z.canvas)),{canvas:Z.canvas,offsetX:Math.round(Y),offsetY:Math.round(R)}}setLineWidth(I){I!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=I,this.ctx.lineWidth=I}setLineCap(I){this.ctx.lineCap=icg[I]}setLineJoin(I){this.ctx.lineJoin=ecg[I]}setMiterLimit(I){this.ctx.miterLimit=I}setDash(I,g){const C=this.ctx;C.setLineDash!==void 0&&(C.setLineDash(I),C.lineDashOffset=g)}setRenderingIntent(I){}setFlatness(I){}setGState(I){for(const[g,C]of I)switch(g){case"LW":this.setLineWidth(C);break;case"LC":this.setLineCap(C);break;case"LJ":this.setLineJoin(C);break;case"ML":this.setMiterLimit(C);break;case"D":this.setDash(C[0],C[1]);break;case"RI":this.setRenderingIntent(C);break;case"FL":this.setFlatness(C);break;case"Font":this.setFont(C[0],C[1]);break;case"CA":this.current.strokeAlpha=C;break;case"ca":this.ctx.globalAlpha=this.current.fillAlpha=C;break;case"BM":this.ctx.globalCompositeOperation=C;break;case"SMask":this.current.activeSMask=C?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(C);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const I=this.inSMaskMode;this.current.activeSMask&&!I?this.beginSMaskMode():!this.current.activeSMask&&I&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const I=this.ctx.canvas.width,g=this.ctx.canvas.height,C="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(C,I,g);this.suspendedCtx=this.ctx;const e=this.ctx=i.context;e.setTransform(this.suspendedCtx.getTransform()),pu(this.suspendedCtx,e),Icg(e,this.suspendedCtx),this.setGState([["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),pu(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(I){if(!this.current.activeSMask)return;I?(I[0]=Math.floor(I[0]),I[1]=Math.floor(I[1]),I[2]=Math.ceil(I[2]),I[3]=Math.ceil(I[3])):I=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const g=this.current.activeSMask,C=this.suspendedCtx;this.composeSMask(C,g,this.ctx,I),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(I,g,C,i){const e=i[0],A=i[1],s=i[2]-e,l=i[3]-A;s===0||l===0||(this.genericComposeSMask(g.context,C,s,l,g.subtype,g.backdrop,g.transferMap,e,A,g.offsetX,g.offsetY),I.save(),I.globalAlpha=1,I.globalCompositeOperation="source-over",I.setTransform(1,0,0,1,0,0),I.drawImage(C.canvas,0,0),I.restore())}genericComposeSMask(I,g,C,i,e,A,s,l,n,a,d){let o=I.canvas,c=l-a,r=n-d;if(A){const b=iI.makeHexColor(...A);if(c<0||r<0||c+C>o.width||r+i>o.height){const u=this.cachedCanvases.getCanvas("maskExtension",C,i),m=u.context;m.drawImage(o,-c,-r),m.globalCompositeOperation="destination-atop",m.fillStyle=b,m.fillRect(0,0,C,i),m.globalCompositeOperation="source-over",o=u.canvas,c=r=0}else{I.save(),I.globalAlpha=1,I.setTransform(1,0,0,1,0,0);const u=new Path2D;u.rect(c,r,C,i),I.clip(u),I.globalCompositeOperation="destination-atop",I.fillStyle=b,I.fillRect(c,r,C,i),I.restore()}}g.save(),g.globalAlpha=1,g.setTransform(1,0,0,1,0,0),e==="Alpha"&&s?g.filter=this.filterFactory.addAlphaFilter(s):e==="Luminosity"&&(g.filter=this.filterFactory.addLuminosityFilter(s));const h=new Path2D;h.rect(l,n,C,i),g.clip(h),g.globalCompositeOperation="destination-in",g.drawImage(o,c,r,C,i,l,n,C,i),g.restore()}save(){this.inSMaskMode&&pu(this.ctx,this.suspendedCtx),this.ctx.save();const I=this.current;this.stateStack.push(I),this.current=I.clone()}restore(){if(this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&pu(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(I,g,C,i,e,A){this.ctx.transform(I,g,C,i,e,A),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(I,g,C){let[i]=g;if(!C){i||(i=g[0]=new Path2D),this[I](i);return}if(!(i instanceof Path2D)){const e=g[0]=new Path2D;for(let A=0,s=i.length;A<s;)switch(i[A++]){case pY.moveTo:e.moveTo(i[A++],i[A++]);break;case pY.lineTo:e.lineTo(i[A++],i[A++]);break;case pY.curveTo:e.bezierCurveTo(i[A++],i[A++],i[A++],i[A++],i[A++],i[A++]);break;case pY.closePath:e.closePath();break;default:HI(`Unrecognized drawing path operator: ${i[A-1]}`);break}i=e}this.current.updateRectMinMax(DC(this.ctx),C),this[I](i)}closePath(){this.ctx.closePath()}stroke(I,g=!0){const C=this.ctx,i=this.current.strokeColor;if(C.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof i=="object"&&(i!=null&&i.getPattern)){const e=i.isModifyingCurrentTransform()?C.getTransform():null;if(C.save(),C.strokeStyle=i.getPattern(C,this,_A(C),Pt.STROKE),e){const A=new Path2D;A.addPath(I,C.getTransform().invertSelf().multiplySelf(e)),I=A}this.rescaleAndStroke(I,!1),C.restore()}else this.rescaleAndStroke(I,!0);g&&this.consumePath(I,this.current.getClippedPathBoundingBox(Pt.STROKE,DC(this.ctx))),C.globalAlpha=this.current.fillAlpha}closeStroke(I){this.stroke(I)}fill(I,g=!0){const C=this.ctx,i=this.current.fillColor,e=this.current.patternFill;let A=!1;if(e){const l=i.isModifyingCurrentTransform()?C.getTransform():null;if(C.save(),C.fillStyle=i.getPattern(C,this,_A(C),Pt.FILL),l){const n=new Path2D;n.addPath(I,C.getTransform().invertSelf().multiplySelf(l)),I=n}A=!0}const s=this.current.getClippedPathBoundingBox();this.contentVisible&&s!==null&&(this.pendingEOFill?(C.fill(I,"evenodd"),this.pendingEOFill=!1):C.fill(I)),A&&C.restore(),g&&this.consumePath(I,s)}eoFill(I){this.pendingEOFill=!0,this.fill(I)}fillStroke(I){this.fill(I,!1),this.stroke(I,!1),this.consumePath(I)}eoFillStroke(I){this.pendingEOFill=!0,this.fillStroke(I)}closeFillStroke(I){this.fillStroke(I)}closeEOFillStroke(I){this.pendingEOFill=!0,this.fillStroke(I)}endPath(I){this.consumePath(I)}clip(){this.pendingClip=Acg}eoClip(){this.pendingClip=$6}beginText(){this.current.textMatrix=o$,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const I=this.pendingTextPaths,g=this.ctx;if(I===void 0){g.beginPath();return}const C=new Path2D,i=g.getTransform().invertSelf();for(const{transform:e,x:A,y:s,fontSize:l,path:n}of I)C.addPath(n,new DOMMatrix(e).preMultiplySelf(i).translate(A,s).scale(l,-l));g.clip(C),g.beginPath(),delete this.pendingTextPaths}setCharSpacing(I){this.current.charSpacing=I}setWordSpacing(I){this.current.wordSpacing=I}setHScale(I){this.current.textHScale=I/100}setLeading(I){this.current.leading=-I}setFont(I,g){var a;const C=this.commonObjs.get(I),i=this.current;if(!C)throw new Error(`Can't find font for ${I}`);if(i.fontMatrix=C.fontMatrix||RX,(i.fontMatrix[0]===0||i.fontMatrix[3]===0)&&HI("Invalid font matrix for font "+I),g<0?(g=-g,i.fontDirection=-1):i.fontDirection=1,this.current.font=C,this.current.fontSize=g,C.isType3Font)return;const e=C.loadedName||"sans-serif",A=((a=C.systemFontInfo)==null?void 0:a.css)||`"${e}", ${C.fallbackName}`;let s="normal";C.black?s="900":C.bold&&(s="bold");const l=C.italic?"italic":"normal";let n=g;g<j6?n=j6:g>Q6&&(n=Q6),this.current.fontSizeScale=g/n,this.ctx.font=`${l} ${s} ${n}px ${A}`}setTextRenderingMode(I){this.current.textRenderingMode=I}setTextRise(I){this.current.textRise=I}moveText(I,g){this.current.x=this.current.lineX+=I,this.current.y=this.current.lineY+=g}setLeadingMoveText(I,g){this.setLeading(-g),this.moveText(I,g)}setTextMatrix(I,g,C,i,e,A){this.current.textMatrix=[I,g,C,i,e,A],this.current.textMatrixScale=Math.hypot(I,g),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(I,g,C,i,e){const A=this.ctx,s=this.current,l=s.font,n=s.textRenderingMode,a=s.fontSize/s.fontSizeScale,d=n&ni.FILL_STROKE_MASK,o=!!(n&ni.ADD_TO_PATH_FLAG),c=s.patternFill&&!l.missingFile,r=s.patternStroke&&!l.missingFile;let h;if((l.disableFontFace||o||c||r)&&(h=l.getPathGenerator(this.commonObjs,I)),l.disableFontFace||c||r){A.save(),A.translate(g,C),A.scale(a,-a);let b;if((d===ni.FILL||d===ni.FILL_STROKE)&&(i?(b=A.getTransform(),A.setTransform(...i),A.fill(eg(this,RA,tS).call(this,h,b,i))):A.fill(h)),d===ni.STROKE||d===ni.FILL_STROKE)if(e){b||(b=A.getTransform()),A.setTransform(...e);const{a:u,b:m,c:Z,d:p}=b,Y=iI.inverseTransform(e),R=iI.transform([u,m,Z,p,0,0],Y),[X,H]=iI.singularValueDecompose2dScale(R);A.lineWidth*=Math.max(X,H)/a,A.stroke(eg(this,RA,tS).call(this,h,b,e))}else A.lineWidth/=a,A.stroke(h);A.restore()}else(d===ni.FILL||d===ni.FILL_STROKE)&&A.fillText(I,g,C),(d===ni.STROKE||d===ni.FILL_STROKE)&&A.strokeText(I,g,C);o&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:DC(A),x:g,y:C,fontSize:a,path:h})}get isFontSubpixelAAEnabled(){const{context:I}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);I.scale(1.5,1),I.fillText("I",0,10);const g=I.getImageData(0,0,10,10).data;let C=!1;for(let i=3;i<g.length;i+=4)if(g[i]>0&&g[i]<255){C=!0;break}return jI(this,"isFontSubpixelAAEnabled",C)}showText(I){const g=this.current,C=g.font;if(C.isType3Font)return this.showType3Text(I);const i=g.fontSize;if(i===0)return;const e=this.ctx,A=g.fontSizeScale,s=g.charSpacing,l=g.wordSpacing,n=g.fontDirection,a=g.textHScale*n,d=I.length,o=C.vertical,c=o?1:-1,r=C.defaultVMetrics,h=i*g.fontMatrix[0],b=g.textRenderingMode===ni.FILL&&!C.disableFontFace&&!g.patternFill;e.save(),e.transform(...g.textMatrix),e.translate(g.x,g.y+g.textRise),n>0?e.scale(a,-1):e.scale(a,1);let u,m;if(g.patternFill){e.save();const X=g.fillColor.getPattern(e,this,_A(e),Pt.FILL);u=DC(e),e.restore(),e.fillStyle=X}if(g.patternStroke){e.save();const X=g.strokeColor.getPattern(e,this,_A(e),Pt.STROKE);m=DC(e),e.restore(),e.strokeStyle=X}let Z=g.lineWidth;const p=g.textMatrixScale;if(p===0||Z===0){const X=g.textRenderingMode&ni.FILL_STROKE_MASK;(X===ni.STROKE||X===ni.FILL_STROKE)&&(Z=this.getSinglePixelWidth())}else Z/=p;if(A!==1&&(e.scale(A,A),Z/=A),e.lineWidth=Z,C.isInvalidPDFjsFont){const X=[];let H=0;for(const S of I)X.push(S.unicode),H+=S.width;e.fillText(X.join(""),0,0),g.x+=H*h*a,e.restore(),this.compose();return}let Y=0,R;for(R=0;R<d;++R){const X=I[R];if(typeof X=="number"){Y+=c*X*i/1e3;continue}let H=!1;const S=(X.isSpace?l:0)+s,z=X.fontChar,v=X.accent;let K,V,N=X.width;if(o){const G=X.vmetric||r,w=-(X.vmetric?G[1]:N*.5)*h,W=G[2]*h;N=G?-G[0]:N,K=w/A,V=(Y+W)/A}else K=Y/A,V=0;if(C.remeasure&&N>0){const G=e.measureText(z).width*1e3/i*A;if(N<G&&this.isFontSubpixelAAEnabled){const w=N/G;H=!0,e.save(),e.scale(w,1),K/=w}else N!==G&&(K+=(N-G)/2e3*i/A)}if(this.contentVisible&&(X.isInFont||C.missingFile)){if(b&&!v)e.fillText(z,K,V);else if(this.paintChar(z,K,V,u,m),v){const G=K+i*v.offset.x/A,w=V-i*v.offset.y/A;this.paintChar(v.fontChar,G,w,u,m)}}const B=o?N*h-S*n:N*h+S*n;Y+=B,H&&e.restore()}o?g.y-=Y:g.x+=Y*a,e.restore(),this.compose()}showType3Text(I){const g=this.ctx,C=this.current,i=C.font,e=C.fontSize,A=C.fontDirection,s=i.vertical?1:-1,l=C.charSpacing,n=C.wordSpacing,a=C.textHScale*A,d=C.fontMatrix||RX,o=I.length,c=C.textRenderingMode===ni.INVISIBLE;let r,h,b,u;if(!(c||e===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,g.save(),g.transform(...C.textMatrix),g.translate(C.x,C.y+C.textRise),g.scale(a,A),r=0;r<o;++r){if(h=I[r],typeof h=="number"){u=s*h*e/1e3,this.ctx.translate(u,0),C.x+=u*a;continue}const m=(h.isSpace?n:0)+l,Z=i.charProcOperatorList[h.operatorListId];Z?this.contentVisible&&(this.processingType3=h,this.save(),g.scale(e,e),g.transform(...d),this.executeOperatorList(Z),this.restore()):HI(`Type3 character "${h.operatorListId}" is not available.`),b=iI.applyTransform([h.width,0],d)[0]*e+m,g.translate(b,0),C.x+=b*a}g.restore(),this.processingType3=null}}setCharWidth(I,g){}setCharWidthAndBounds(I,g,C,i,e,A){this.ctx.rect(C,i,e-C,A-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(I){let g;if(I[0]==="TilingPattern"){const C=this.baseTransform||DC(this.ctx),i={createCanvasGraphics:e=>new T9(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};g=new gS(I,this.ctx,i,C)}else g=this._getPattern(I[1],I[2]);return g}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(I,g,C){this.ctx.strokeStyle=this.current.strokeColor=iI.makeHexColor(I,g,C),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(I,g,C){this.ctx.fillStyle=this.current.fillColor=iI.makeHexColor(I,g,C),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(I,g=null){let C;return this.cachedPatterns.has(I)?C=this.cachedPatterns.get(I):(C=qog(this.getObject(I)),this.cachedPatterns.set(I,C)),g&&(C.matrix=g),C}shadingFill(I){if(!this.contentVisible)return;const g=this.ctx;this.save();const C=this._getPattern(I);g.fillStyle=C.getPattern(g,this,_A(g),Pt.SHADING);const i=_A(g);if(i){const{width:e,height:A}=g.canvas,[s,l,n,a]=iI.getAxialAlignedBoundingBox([0,0,e,A],i);this.ctx.fillRect(s,l,n-s,a-l)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){ZC("Should not call beginInlineImage")}beginImageData(){ZC("Should not call beginImageData")}paintFormXObjectBegin(I,g){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),I&&this.transform(...I),this.baseTransform=DC(this.ctx),g)){const C=g[2]-g[0],i=g[3]-g[1];this.ctx.rect(g[0],g[1],C,i),this.current.updateRectMinMax(DC(this.ctx),g),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(I){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const g=this.ctx;I.isolated||FV("TODO: Support non-isolated groups."),I.knockout&&HI("Knockout groups not supported.");const C=DC(g);if(I.matrix&&g.transform(...I.matrix),!I.bbox)throw new Error("Bounding box is required.");let i=iI.getAxialAlignedBoundingBox(I.bbox,DC(g));const e=[0,0,g.canvas.width,g.canvas.height];i=iI.intersect(i,e)||[0,0,0,0];const A=Math.floor(i[0]),s=Math.floor(i[1]),l=Math.max(Math.ceil(i[2])-A,1),n=Math.max(Math.ceil(i[3])-s,1);this.current.startNewPathAndClipBox([0,0,l,n]);let a="groupAt"+this.groupLevel;I.smask&&(a+="_smask_"+this.smaskCounter++%2);const d=this.cachedCanvases.getCanvas(a,l,n),o=d.context;o.translate(-A,-s),o.transform(...C);let c=new Path2D;const[r,h,b,u]=I.bbox;if(c.rect(r,h,b-r,u-h),I.matrix){const m=new Path2D;m.addPath(c,new DOMMatrix(I.matrix)),c=m}o.clip(c),I.smask?this.smaskStack.push({canvas:d.canvas,context:o,offsetX:A,offsetY:s,subtype:I.smask.subtype,backdrop:I.smask.backdrop,transferMap:I.smask.transferMap||null,startTransformInverse:null}):(g.setTransform(1,0,0,1,0,0),g.translate(A,s),g.save()),pu(g,o),this.ctx=o,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(g),this.groupLevel++}endGroup(I){if(!this.contentVisible)return;this.groupLevel--;const g=this.ctx,C=this.groupStack.pop();if(this.ctx=C,this.ctx.imageSmoothingEnabled=!1,I.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i=DC(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i);const e=iI.getAxialAlignedBoundingBox([0,0,g.canvas.width,g.canvas.height],i);this.ctx.drawImage(g.canvas,0,0),this.ctx.restore(),this.compose(e)}}beginAnnotation(I,g,C,i,e){if(eg(this,RA,IS).call(this),yY(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),g){const A=g[2]-g[0],s=g[3]-g[1];if(e&&this.annotationCanvasMap){C=C.slice(),C[4]-=g[0],C[5]-=g[1],g=g.slice(),g[0]=g[1]=0,g[2]=A,g[3]=s;const[l,n]=iI.singularValueDecompose2dScale(DC(this.ctx)),{viewportScale:a}=this,d=Math.ceil(A*this.outputScaleX*a),o=Math.ceil(s*this.outputScaleY*a);this.annotationCanvas=this.canvasFactory.create(d,o);const{canvas:c,context:r}=this.annotationCanvas;this.annotationCanvasMap.set(I,c),this.annotationCanvas.savedCtx=this.ctx,this.ctx=r,this.ctx.save(),this.ctx.setTransform(l,0,0,-n,0,s*n),yY(this.ctx)}else yY(this.ctx),this.endPath(),this.ctx.rect(g[0],g[1],A,s),this.ctx.clip(),this.ctx.beginPath()}this.current=new E6(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...C),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),eg(this,RA,CS).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(I){if(!this.contentVisible)return;const g=I.count;I=this.getObject(I.data,I),I.count=g;const C=this.ctx,i=this.processingType3;if(i&&(i.compiled===void 0&&(i.compiled=tcg(I)),i.compiled)){C.fill(i.compiled);return}const e=this._createMaskCanvas(I),A=e.canvas;C.save(),C.setTransform(1,0,0,1,0,0),C.drawImage(A,e.offsetX,e.offsetY),C.restore(),this.compose()}paintImageMaskXObjectRepeat(I,g,C=0,i=0,e,A){if(!this.contentVisible)return;I=this.getObject(I.data,I);const s=this.ctx;s.save();const l=DC(s);s.transform(g,C,i,e,0,0);const n=this._createMaskCanvas(I);s.setTransform(1,0,0,1,n.offsetX-l[4],n.offsetY-l[5]);for(let a=0,d=A.length;a<d;a+=2){const o=iI.transform(l,[g,C,i,e,A[a],A[a+1]]),[c,r]=iI.applyTransform([0,0],o);s.drawImage(n.canvas,c,r)}s.restore(),this.compose()}paintImageMaskXObjectGroup(I){if(!this.contentVisible)return;const g=this.ctx,C=this.current.fillColor,i=this.current.patternFill;for(const e of I){const{data:A,width:s,height:l,transform:n}=e,a=this.cachedCanvases.getCanvas("maskCanvas",s,l),d=a.context;d.save();const o=this.getObject(A,e);_6(d,o),d.globalCompositeOperation="source-in",d.fillStyle=i?C.getPattern(d,this,_A(g),Pt.FILL):C,d.fillRect(0,0,s,l),d.restore(),g.save(),g.transform(...n),g.scale(1,-1),WY(g,a.canvas,0,0,s,l,0,-1,1,1),g.restore()}this.compose()}paintImageXObject(I){if(!this.contentVisible)return;const g=this.getObject(I);if(!g){HI("Dependent image isn't ready yet");return}this.paintInlineImageXObject(g)}paintImageXObjectRepeat(I,g,C,i){if(!this.contentVisible)return;const e=this.getObject(I);if(!e){HI("Dependent image isn't ready yet");return}const A=e.width,s=e.height,l=[];for(let n=0,a=i.length;n<a;n+=2)l.push({transform:[g,0,0,C,i[n],i[n+1]],x:0,y:0,w:A,h:s});this.paintInlineImageXObjectGroup(e,l)}applyTransferMapsToCanvas(I){return this.current.transferMaps!=="none"&&(I.filter=this.current.transferMaps,I.drawImage(I.canvas,0,0),I.filter="none"),I.canvas}applyTransferMapsToBitmap(I){if(this.current.transferMaps==="none")return I.bitmap;const{bitmap:g,width:C,height:i}=I,e=this.cachedCanvases.getCanvas("inlineImage",C,i),A=e.context;return A.filter=this.current.transferMaps,A.drawImage(g,0,0),A.filter="none",e.canvas}paintInlineImageXObject(I){if(!this.contentVisible)return;const g=I.width,C=I.height,i=this.ctx;if(this.save(),!Ot){const{filter:s}=i;s!=="none"&&s!==""&&(i.filter="none")}i.scale(1/g,-1/C);let e;if(I.bitmap)e=this.applyTransferMapsToBitmap(I);else if(typeof HTMLElement=="function"&&I instanceof HTMLElement||!I.data)e=I;else{const l=this.cachedCanvases.getCanvas("inlineImage",g,C).context;P6(l,I),e=this.applyTransferMapsToCanvas(l)}const A=this._scaleImage(e,_A(i));i.imageSmoothingEnabled=q6(DC(i),I.interpolate),WY(i,A.img,0,0,A.paintWidth,A.paintHeight,0,-C,g,C),this.compose(),this.restore()}paintInlineImageXObjectGroup(I,g){if(!this.contentVisible)return;const C=this.ctx;let i;if(I.bitmap)i=I.bitmap;else{const e=I.width,A=I.height,l=this.cachedCanvases.getCanvas("inlineImage",e,A).context;P6(l,I),i=this.applyTransferMapsToCanvas(l)}for(const e of g)C.save(),C.transform(...e.transform),C.scale(1,-1),WY(C,i,e.x,e.y,e.w,e.h,0,-1,1,1),C.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(I){}markPointProps(I,g){}beginMarkedContent(I){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(I,g){I==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(g)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(I,g){const C=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(g);const i=this.ctx;this.pendingClip&&(C||(this.pendingClip===$6?i.clip(I,"evenodd"):i.clip(I)),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),i.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const I=DC(this.ctx);if(I[1]===0&&I[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(I[0]),Math.abs(I[3]));else{const g=Math.abs(I[0]*I[3]-I[2]*I[1]),C=Math.hypot(I[0],I[2]),i=Math.hypot(I[1],I[3]);this._cachedGetSinglePixelWidth=Math.max(C,i)/g}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:I}=this.current,{a:g,b:C,c:i,d:e}=this.ctx.getTransform();let A,s;if(C===0&&i===0){const l=Math.abs(g),n=Math.abs(e);if(l===n)if(I===0)A=s=1/l;else{const a=l*I;A=s=a<1?1/a:1}else if(I===0)A=1/l,s=1/n;else{const a=l*I,d=n*I;A=a<1?1/a:1,s=d<1?1/d:1}}else{const l=Math.abs(g*e-C*i),n=Math.hypot(g,C),a=Math.hypot(i,e);if(I===0)A=a/l,s=n/l;else{const d=I*l;A=a>d?a/d:1,s=n>d?n/d:1}}this._cachedScaleForStroking[0]=A,this._cachedScaleForStroking[1]=s}return this._cachedScaleForStroking}rescaleAndStroke(I,g){const{ctx:C,current:{lineWidth:i}}=this,[e,A]=this.getScaleForStroking();if(e===A){C.lineWidth=(i||1)*e,C.stroke(I);return}const s=C.getLineDash();g&&C.save(),C.scale(e,A),fH.a=1/e,fH.d=1/A;const l=new Path2D;if(l.addPath(I,fH),s.length>0){const n=Math.max(e,A);C.setLineDash(s.map(a=>a/n)),C.lineDashOffset/=n}C.lineWidth=i||1,C.stroke(l),g&&C.restore()}isContentVisible(){for(let I=this.markedContentStack.length-1;I>=0;I--)if(!this.markedContentStack[I].visible)return!1;return!0}};RA=new WeakSet,IS=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},CS=function(){if(this.pageColors){const I=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(I!=="none"){const g=this.ctx.filter;this.ctx.filter=I,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=g}}},tS=function(I,g,C){const i=new Path2D;return i.addPath(I,new DOMMatrix(C).invertSelf().multiplySelf(g)),i};let Ih=T9;for(const t in JN)Ih.prototype[t]!==void 0&&(Ih.prototype[JN[t]]=Ih.prototype[t]);var Em,Pm;class Kl{static get workerPort(){return M(this,Em)}static set workerPort(I){if(!(typeof Worker<"u"&&I instanceof Worker)&&I!==null)throw new Error("Invalid `workerPort` type.");$(this,Em,I)}static get workerSrc(){return M(this,Pm)}static set workerSrc(I){if(typeof I!="string")throw new Error("Invalid `workerSrc` type.");$(this,Pm,I)}}Em=new WeakMap,Pm=new WeakMap,ig(Kl,Em,null),ig(Kl,Pm,"");var bc,_m;class scg{constructor({parsedData:I,rawData:g}){ig(this,bc);ig(this,_m);$(this,bc,I),$(this,_m,g)}getRaw(){return M(this,_m)}get(I){return M(this,bc).get(I)??null}getAll(){return PD(M(this,bc))}has(I){return M(this,bc).has(I)}}bc=new WeakMap,_m=new WeakMap;const Lr=Symbol("INTERNAL");var qm,$m,gZ,Yh;class lcg{constructor(I,{name:g,intent:C,usage:i,rbGroups:e}){ig(this,qm,!1);ig(this,$m,!1);ig(this,gZ,!1);ig(this,Yh,!0);$(this,qm,!!(I&be.DISPLAY)),$(this,$m,!!(I&be.PRINT)),this.name=g,this.intent=C,this.usage=i,this.rbGroups=e}get visible(){if(M(this,gZ))return M(this,Yh);if(!M(this,Yh))return!1;const{print:I,view:g}=this.usage;return M(this,qm)?(g==null?void 0:g.viewState)!=="OFF":M(this,$m)?(I==null?void 0:I.printState)!=="OFF":!0}_setVisible(I,g,C=!1){I!==Lr&&ZC("Internal method `_setVisible` called."),$(this,gZ,C),$(this,Yh,g)}}qm=new WeakMap,$m=new WeakMap,gZ=new WeakMap,Yh=new WeakMap;var ha,cC,Nh,Vh,IZ,iS;class ncg{constructor(I,g=be.DISPLAY){ig(this,IZ);ig(this,ha,null);ig(this,cC,new Map);ig(this,Nh,null);ig(this,Vh,null);if(this.renderingIntent=g,this.name=null,this.creator=null,I!==null){this.name=I.name,this.creator=I.creator,$(this,Vh,I.order);for(const C of I.groups)M(this,cC).set(C.id,new lcg(g,C));if(I.baseState==="OFF")for(const C of M(this,cC).values())C._setVisible(Lr,!1);for(const C of I.on)M(this,cC).get(C)._setVisible(Lr,!0);for(const C of I.off)M(this,cC).get(C)._setVisible(Lr,!1);$(this,Nh,this.getHash())}}isVisible(I){if(M(this,cC).size===0)return!0;if(!I)return FV("Optional content group not defined."),!0;if(I.type==="OCG")return M(this,cC).has(I.id)?M(this,cC).get(I.id).visible:(HI(`Optional content group not found: ${I.id}`),!0);if(I.type==="OCMD"){if(I.expression)return eg(this,IZ,iS).call(this,I.expression);if(!I.policy||I.policy==="AnyOn"){for(const g of I.ids){if(!M(this,cC).has(g))return HI(`Optional content group not found: ${g}`),!0;if(M(this,cC).get(g).visible)return!0}return!1}else if(I.policy==="AllOn"){for(const g of I.ids){if(!M(this,cC).has(g))return HI(`Optional content group not found: ${g}`),!0;if(!M(this,cC).get(g).visible)return!1}return!0}else if(I.policy==="AnyOff"){for(const g of I.ids){if(!M(this,cC).has(g))return HI(`Optional content group not found: ${g}`),!0;if(!M(this,cC).get(g).visible)return!0}return!1}else if(I.policy==="AllOff"){for(const g of I.ids){if(!M(this,cC).has(g))return HI(`Optional content group not found: ${g}`),!0;if(M(this,cC).get(g).visible)return!1}return!0}return HI(`Unknown optional content policy ${I.policy}.`),!0}return HI(`Unknown group type ${I.type}.`),!0}setVisibility(I,g=!0,C=!0){var e;const i=M(this,cC).get(I);if(!i){HI(`Optional content group not found: ${I}`);return}if(C&&g&&i.rbGroups.length)for(const A of i.rbGroups)for(const s of A)s!==I&&((e=M(this,cC).get(s))==null||e._setVisible(Lr,!1,!0));i._setVisible(Lr,!!g,!0),$(this,ha,null)}setOCGState({state:I,preserveRB:g}){let C;for(const i of I){switch(i){case"ON":case"OFF":case"Toggle":C=i;continue}const e=M(this,cC).get(i);if(e)switch(C){case"ON":this.setVisibility(i,!0,g);break;case"OFF":this.setVisibility(i,!1,g);break;case"Toggle":this.setVisibility(i,!e.visible,g);break}}$(this,ha,null)}get hasInitialVisibility(){return M(this,Nh)===null||this.getHash()===M(this,Nh)}getOrder(){return M(this,cC).size?M(this,Vh)?M(this,Vh).slice():[...M(this,cC).keys()]:null}getGroups(){return M(this,cC).size>0?PD(M(this,cC)):null}getGroup(I){return M(this,cC).get(I)||null}getHash(){if(M(this,ha)!==null)return M(this,ha);const I=new j$;for(const[g,C]of M(this,cC))I.update(`${g}:${C.visible}`);return $(this,ha,I.hexdigest())}}ha=new WeakMap,cC=new WeakMap,Nh=new WeakMap,Vh=new WeakMap,IZ=new WeakSet,iS=function(I){const g=I.length;if(g<2)return!0;const C=I[0];for(let i=1;i<g;i++){const e=I[i];let A;if(Array.isArray(e))A=eg(this,IZ,iS).call(this,e);else if(M(this,cC).has(e))A=M(this,cC).get(e).visible;else return HI(`Optional content group not found: ${e}`),!0;switch(C){case"And":if(!A)return!1;break;case"Or":if(A)return!0;break;case"Not":return!A;default:return!0}}return C==="And"};class acg{constructor(I,{disableRange:g=!1,disableStream:C=!1}){ct(I,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i,initialData:e,progressiveDone:A,contentDispositionFilename:s}=I;if(this._queuedChunks=[],this._progressiveDone=A,this._contentDispositionFilename=s,(e==null?void 0:e.length)>0){const l=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=I,this._isStreamingSupported=!C,this._isRangeSupported=!g,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],I.addRangeListener((l,n)=>{this._onReceiveData({begin:l,chunk:n})}),I.addProgressListener((l,n)=>{this._onProgress({loaded:l,total:n})}),I.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),I.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),I.transportReady()}_onReceiveData({begin:I,chunk:g}){const C=g instanceof Uint8Array&&g.byteLength===g.buffer.byteLength?g.buffer:new Uint8Array(g).buffer;if(I===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(C):this._queuedChunks.push(C);else{const i=this._rangeReaders.some(function(e){return e._begin!==I?!1:(e._enqueue(C),!0)});ct(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var I;return((I=this._fullRequestReader)==null?void 0:I._loaded)??0}_onProgress(I){var g,C,i,e;I.total===void 0?(C=(g=this._rangeReaders[0])==null?void 0:g.onProgress)==null||C.call(g,{loaded:I.loaded}):(e=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||e.call(i,{loaded:I.loaded,total:I.total})}_onProgressiveDone(){var I;(I=this._fullRequestReader)==null||I.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(I){const g=this._rangeReaders.indexOf(I);g>=0&&this._rangeReaders.splice(g,1)}getFullReader(){ct(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const I=this._queuedChunks;return this._queuedChunks=null,new ocg(this,I,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(I,g){if(g<=this._progressiveDataLength)return null;const C=new ccg(this,I,g);return this._pdfDataRangeTransport.requestDataRange(I,g),this._rangeReaders.push(C),C}cancelAllRequests(I){var g;(g=this._fullRequestReader)==null||g.cancel(I);for(const C of this._rangeReaders.slice(0))C.cancel(I);this._pdfDataRangeTransport.abort()}}class ocg{constructor(I,g,C=!1,i=null){this._stream=I,this._done=C||!1,this._filename=$D(i)?i:null,this._queuedChunks=g||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),I._fullRequestReader=this,this.onProgress=null}_enqueue(I){this._done||(this._requests.length>0?this._requests.shift().resolve({value:I,done:!1}):this._queuedChunks.push(I),this._loaded+=I.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const I=Promise.withResolvers();return this._requests.push(I),I.promise}cancel(I){this._done=!0;for(const g of this._requests)g.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class ccg{constructor(I,g,C){this._stream=I,this._begin=g,this._end=C,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(I){if(!this._done){if(this._requests.length===0)this._queuedChunk=I;else{this._requests.shift().resolve({value:I,done:!1});for(const C of this._requests)C.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const g=this._queuedChunk;return this._queuedChunk=null,{value:g,done:!1}}if(this._done)return{value:void 0,done:!0};const I=Promise.withResolvers();return this._requests.push(I),I.promise}cancel(I){this._done=!0;for(const g of this._requests)g.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function dcg(t){let I=!0,g=C("filename\\*","i").exec(t);if(g){g=g[1];let a=s(g);return a=unescape(a),a=l(a),a=n(a),e(a)}if(g=A(t),g){const a=n(g);return e(a)}if(g=C("filename","i").exec(t),g){g=g[1];let a=s(g);return a=n(a),e(a)}function C(a,d){return new RegExp("(?:^|;)\\s*"+a+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',d)}function i(a,d){if(a){if(!/^[\x00-\xFF]+$/.test(d))return d;try{const o=new TextDecoder(a,{fatal:!0}),c=QZ(d);d=o.decode(c),I=!1}catch{}}return d}function e(a){return I&&/[\x80-\xff]/.test(a)&&(a=i("utf-8",a),I&&(a=i("iso-8859-1",a))),a}function A(a){const d=[];let o;const c=C("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(o=c.exec(a))!==null;){let[,h,b,u]=o;if(h=parseInt(h,10),h in d){if(h===0)break;continue}d[h]=[b,u]}const r=[];for(let h=0;h<d.length&&h in d;++h){let[b,u]=d[h];u=s(u),b&&(u=unescape(u),h===0&&(u=l(u))),r.push(u)}return r.join("")}function s(a){if(a.startsWith('"')){const d=a.slice(1).split('\\"');for(let o=0;o<d.length;++o){const c=d[o].indexOf('"');c!==-1&&(d[o]=d[o].slice(0,c),d.length=o+1),d[o]=d[o].replaceAll(/\\(.)/g,"$1")}a=d.join('"')}return a}function l(a){const d=a.indexOf("'");if(d===-1)return a;const o=a.slice(0,d),r=a.slice(d+1).replace(/^[^']*'/,"");return i(o,r)}function n(a){return!a.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(a)?a:a.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(d,o,c,r){if(c==="q"||c==="Q")return r=r.replaceAll("_"," "),r=r.replaceAll(/=([0-9a-fA-F]{2})/g,function(h,b){return String.fromCharCode(parseInt(b,16))}),i(o,r);try{r=atob(r)}catch{}return i(o,r)})}return""}function tgg(t,I){const g=new Headers;if(!t||!I||typeof I!="object")return g;for(const C in I){const i=I[C];i!==void 0&&g.append(C,i)}return g}function zV(t){var I;return((I=URL.parse(t))==null?void 0:I.origin)??null}function igg({responseHeaders:t,isHttp:I,rangeChunkSize:g,disableRange:C}){const i={allowRangeRequests:!1,suggestedLength:void 0},e=parseInt(t.get("Content-Length"),10);return!Number.isInteger(e)||(i.suggestedLength=e,e<=2*g)||C||!I||t.get("Accept-Ranges")!=="bytes"||(t.get("Content-Encoding")||"identity")!=="identity"||(i.allowRangeRequests=!0),i}function egg(t){const I=t.get("Content-Disposition");if(I){let g=dcg(I);if(g.includes("%"))try{g=decodeURIComponent(g)}catch{}if($D(g))return g}return null}function PZ(t,I){return new LN(`Unexpected server response (${t}) while retrieving PDF "${I}".`,t,t===404||t===0&&I.startsWith("file:"))}function Agg(t){return t===200||t===206}function sgg(t,I,g){return{method:"GET",headers:t,signal:g.signal,mode:"cors",credentials:I?"include":"same-origin",redirect:"follow"}}function lgg(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:(HI(`getArrayBuffer - unexpected data format: ${t}`),new Uint8Array(t).buffer)}class g8{constructor(I){CI(this,"_responseOrigin",null);this.source=I,this.isHttp=/^https?:/i.test(I.url),this.headers=tgg(this.isHttp,I.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var I;return((I=this._fullRequestReader)==null?void 0:I._loaded)??0}getFullReader(){return ct(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new rcg(this),this._fullRequestReader}getRangeReader(I,g){if(g<=this._progressiveDataLength)return null;const C=new hcg(this,I,g);return this._rangeRequestReaders.push(C),C}cancelAllRequests(I){var g;(g=this._fullRequestReader)==null||g.cancel(I);for(const C of this._rangeRequestReaders.slice(0))C.cancel(I)}}class rcg{constructor(I){this._stream=I,this._reader=null,this._loaded=0,this._filename=null;const g=I.source;this._withCredentials=g.withCredentials||!1,this._contentLength=g.length,this._headersCapability=Promise.withResolvers(),this._disableRange=g.disableRange||!1,this._rangeChunkSize=g.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!g.disableStream,this._isRangeSupported=!g.disableRange;const C=new Headers(I.headers),i=g.url;fetch(i,sgg(C,this._withCredentials,this._abortController)).then(e=>{if(I._responseOrigin=zV(e.url),!Agg(e.status))throw PZ(e.status,i);this._reader=e.body.getReader(),this._headersCapability.resolve();const A=e.headers,{allowRangeRequests:s,suggestedLength:l}=igg({responseHeaders:A,isHttp:I.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=l||this._contentLength,this._filename=egg(A),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new za("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var C;await this._headersCapability.promise;const{value:I,done:g}=await this._reader.read();return g?{value:I,done:g}:(this._loaded+=I.byteLength,(C=this.onProgress)==null||C.call(this,{loaded:this._loaded,total:this._contentLength}),{value:lgg(I),done:!1})}cancel(I){var g;(g=this._reader)==null||g.cancel(I),this._abortController.abort()}}class hcg{constructor(I,g,C){this._stream=I,this._reader=null,this._loaded=0;const i=I.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController;const e=new Headers(I.headers);e.append("Range",`bytes=${g}-${C-1}`);const A=i.url;fetch(A,sgg(e,this._withCredentials,this._abortController)).then(s=>{const l=zV(s.url);if(l!==I._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${I._responseOrigin}".`);if(!Agg(s.status))throw PZ(s.status,A);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var C;await this._readCapability.promise;const{value:I,done:g}=await this._reader.read();return g?{value:I,done:g}:(this._loaded+=I.byteLength,(C=this.onProgress)==null||C.call(this,{loaded:this._loaded}),{value:lgg(I),done:!1})}cancel(I){var g;(g=this._reader)==null||g.cancel(I),this._abortController.abort()}}const HH=200,XH=206;function bcg(t){const I=t.response;return typeof I!="string"?I:QZ(I).buffer}class ucg{constructor({url:I,httpHeaders:g,withCredentials:C}){CI(this,"_responseOrigin",null);this.url=I,this.isHttp=/^https?:/i.test(I),this.headers=tgg(this.isHttp,g),this.withCredentials=C||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(I){const g=new XMLHttpRequest,C=this.currXhrId++,i=this.pendingRequests[C]={xhr:g};g.open("GET",this.url),g.withCredentials=this.withCredentials;for(const[e,A]of this.headers)g.setRequestHeader(e,A);return this.isHttp&&"begin"in I&&"end"in I?(g.setRequestHeader("Range",`bytes=${I.begin}-${I.end-1}`),i.expectedStatus=XH):i.expectedStatus=HH,g.responseType="arraybuffer",ct(I.onError,"Expected `onError` callback to be provided."),g.onerror=()=>{I.onError(g.status)},g.onreadystatechange=this.onStateChange.bind(this,C),g.onprogress=this.onProgress.bind(this,C),i.onHeadersReceived=I.onHeadersReceived,i.onDone=I.onDone,i.onError=I.onError,i.onProgress=I.onProgress,g.send(null),C}onProgress(I,g){var i;const C=this.pendingRequests[I];C&&((i=C.onProgress)==null||i.call(C,g))}onStateChange(I,g){const C=this.pendingRequests[I];if(!C)return;const i=C.xhr;if(i.readyState>=2&&C.onHeadersReceived&&(C.onHeadersReceived(),delete C.onHeadersReceived),i.readyState!==4||!(I in this.pendingRequests))return;if(delete this.pendingRequests[I],i.status===0&&this.isHttp){C.onError(i.status);return}const e=i.status||HH;if(!(e===HH&&C.expectedStatus===XH)&&e!==C.expectedStatus){C.onError(i.status);return}const s=bcg(i);if(e===XH){const l=i.getResponseHeader("Content-Range"),n=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);n?C.onDone({begin:parseInt(n[1],10),chunk:s}):(HI('Missing or invalid "Content-Range" header.'),C.onError(0))}else s?C.onDone({begin:0,chunk:s}):C.onError(i.status)}getRequestXhr(I){return this.pendingRequests[I].xhr}isPendingRequest(I){return I in this.pendingRequests}abortRequest(I){const g=this.pendingRequests[I].xhr;delete this.pendingRequests[I],g.abort()}}class mcg{constructor(I){this._source=I,this._manager=new ucg(I),this._rangeChunkSize=I.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(I){const g=this._rangeRequestReaders.indexOf(I);g>=0&&this._rangeRequestReaders.splice(g,1)}getFullReader(){return ct(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Zcg(this._manager,this._source),this._fullRequestReader}getRangeReader(I,g){const C=new Gcg(this._manager,I,g);return C.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(C),C}cancelAllRequests(I){var g;(g=this._fullRequestReader)==null||g.cancel(I);for(const C of this._rangeRequestReaders.slice(0))C.cancel(I)}}class Zcg{constructor(I,g){this._manager=I,this._url=g.url,this._fullRequestId=I.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=g.disableRange||!1,this._contentLength=g.length,this._rangeChunkSize=g.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const I=this._fullRequestId,g=this._manager.getRequestXhr(I);this._manager._responseOrigin=zV(g.responseURL);const C=g.getAllResponseHeaders(),i=new Headers(C?C.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(s=>{const[l,...n]=s.split(": ");return[l,n.join(": ")]}):[]),{allowRangeRequests:e,suggestedLength:A}=igg({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});e&&(this._isRangeSupported=!0),this._contentLength=A||this._contentLength,this._filename=egg(i),this._isRangeSupported&&this._manager.abortRequest(I),this._headersCapability.resolve()}_onDone(I){if(I&&(this._requests.length>0?this._requests.shift().resolve({value:I.chunk,done:!1}):this._cachedChunks.push(I.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const g of this._requests)g.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(I){this._storedError=PZ(I,this._url),this._headersCapability.reject(this._storedError);for(const g of this._requests)g.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(I){var g;(g=this.onProgress)==null||g.call(this,{loaded:I.loaded,total:I.lengthComputable?I.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const I=Promise.withResolvers();return this._requests.push(I),I.promise}cancel(I){this._done=!0,this._headersCapability.reject(I);for(const g of this._requests)g.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class Gcg{constructor(I,g,C){this._manager=I,this._url=I.url,this._requestId=I.request({begin:g,end:C,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){var g;const I=zV((g=this._manager.getRequestXhr(this._requestId))==null?void 0:g.responseURL);I!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${I}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){var I;(I=this.onClosed)==null||I.call(this,this)}_onDone(I){const g=I.chunk;this._requests.length>0?this._requests.shift().resolve({value:g,done:!1}):this._queuedChunk=g,this._done=!0;for(const C of this._requests)C.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(I){this._storedError??(this._storedError=PZ(I,this._url));for(const g of this._requests)g.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(I){var g;this.isStreamingSupported||(g=this.onProgress)==null||g.call(this,{loaded:I.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const g=this._queuedChunk;return this._queuedChunk=null,{value:g,done:!1}}if(this._done)return{value:void 0,done:!0};const I=Promise.withResolvers();return this._requests.push(I),I.promise}cancel(I){this._done=!0;for(const g of this._requests)g.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const wcg=/^[a-z][a-z0-9\-+.]+:/i;function pcg(t){if(wcg.test(t))return new URL(t);const I=process.getBuiltinModule("url");return new URL(I.pathToFileURL(t))}class Bcg{constructor(I){this.source=I,this.url=pcg(I.url),ct(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var I;return((I=this._fullRequestReader)==null?void 0:I._loaded)??0}getFullReader(){return ct(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new Wcg(this),this._fullRequestReader}getRangeReader(I,g){if(g<=this._progressiveDataLength)return null;const C=new ycg(this,I,g);return this._rangeRequestReaders.push(C),C}cancelAllRequests(I){var g;(g=this._fullRequestReader)==null||g.cancel(I);for(const C of this._rangeRequestReaders.slice(0))C.cancel(I)}}class Wcg{constructor(I){this._url=I.url,this._done=!1,this._storedError=null,this.onProgress=null;const g=I.source;this._contentLength=g.length,this._loaded=0,this._filename=null,this._disableRange=g.disableRange||!1,this._rangeChunkSize=g.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!g.disableStream,this._isRangeSupported=!g.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const C=process.getBuiltinModule("fs");C.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(C.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=PZ(0,this._url.href)),this._storedError=i,this._headersCapability.reject(i)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var C;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const I=this._readableStream.read();return I===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=I.length,(C=this.onProgress)==null||C.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(I).buffer,done:!1})}cancel(I){if(!this._readableStream){this._error(I);return}this._readableStream.destroy(I)}_error(I){this._storedError=I,this._readCapability.resolve()}_setReadableStream(I){this._readableStream=I,I.on("readable",()=>{this._readCapability.resolve()}),I.on("end",()=>{I.destroy(),this._done=!0,this._readCapability.resolve()}),I.on("error",g=>{this._error(g)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new za("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class ycg{constructor(I,g,C){this._url=I.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=I.source;this._isStreamingSupported=!i.disableStream;const e=process.getBuiltinModule("fs");this._setReadableStream(e.createReadStream(this._url,{start:g,end:C-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){var C;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const I=this._readableStream.read();return I===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=I.length,(C=this.onProgress)==null||C.call(this,{loaded:this._loaded}),{value:new Uint8Array(I).buffer,done:!1})}cancel(I){if(!this._readableStream){this._error(I);return}this._readableStream.destroy(I)}_error(I){this._storedError=I,this._readCapability.resolve()}_setReadableStream(I){this._readableStream=I,I.on("readable",()=>{this._readCapability.resolve()}),I.on("end",()=>{I.destroy(),this._done=!0,this._readCapability.resolve()}),I.on("error",g=>{this._error(g)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const Ycg=1e5,I8=30;var _q,ba,zi,CZ,tZ,uc,Zl,iZ,eZ,mc,Mh,Rh,ua,fh,AZ,Hh,Zc,sZ,lZ,Xh,Gc,nZ,ma,Sh,Ql,ngg,agg,eS,Ge,AN,AS,ogg,cgg;const bt=class bt{constructor({textContentSource:I,container:g,viewport:C}){ig(this,Ql);ig(this,ba,Promise.withResolvers());ig(this,zi,null);ig(this,CZ,!1);ig(this,tZ,!!((_q=globalThis.FontInspector)!=null&&_q.enabled));ig(this,uc,null);ig(this,Zl,null);ig(this,iZ,0);ig(this,eZ,0);ig(this,mc,null);ig(this,Mh,null);ig(this,Rh,0);ig(this,ua,0);ig(this,fh,Object.create(null));ig(this,AZ,[]);ig(this,Hh,null);ig(this,Zc,[]);ig(this,sZ,new WeakMap);ig(this,lZ,null);var l;if(I instanceof ReadableStream)$(this,Hh,I);else if(typeof I=="object")$(this,Hh,new ReadableStream({start(n){n.enqueue(I),n.close()}}));else throw new Error('No "textContentSource" parameter specified.');$(this,zi,$(this,Mh,g)),$(this,ua,C.scale*jl.pixelRatio),$(this,Rh,C.rotation),$(this,Zl,{div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:e,pageX:A,pageY:s}=C.rawDims;$(this,lZ,[1,0,0,-1,-A,s+e]),$(this,eZ,i),$(this,iZ,e),eg(l=bt,Ge,ogg).call(l),Cd(g,C),M(this,ba).promise.finally(()=>{M(bt,Sh).delete(this),$(this,Zl,null),$(this,fh,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:I,isFirefox:g}=gi.platform;return jI(this,"fontFamilyMap",new Map([["sans-serif",`${I&&g?"Calibri, ":""}sans-serif`],["monospace",`${I&&g?"Lucida Console, ":""}monospace`]]))}render(){const I=()=>{M(this,mc).read().then(({value:g,done:C})=>{if(C){M(this,ba).resolve();return}M(this,uc)??$(this,uc,g.lang),Object.assign(M(this,fh),g.styles),eg(this,Ql,ngg).call(this,g.items),I()},M(this,ba).reject)};return $(this,mc,M(this,Hh).getReader()),M(bt,Sh).add(this),I(),M(this,ba).promise}update({viewport:I,onBefore:g=null}){var e;const C=I.scale*jl.pixelRatio,i=I.rotation;if(i!==M(this,Rh)&&(g==null||g(),$(this,Rh,i),Cd(M(this,Mh),{rotation:i})),C!==M(this,ua)){g==null||g(),$(this,ua,C);const A={div:null,properties:null,ctx:eg(e=bt,Ge,AN).call(e,M(this,uc))};for(const s of M(this,Zc))A.properties=M(this,sZ).get(s),A.div=s,eg(this,Ql,eS).call(this,A)}}cancel(){var g;const I=new za("TextLayer task cancelled.");(g=M(this,mc))==null||g.cancel(I).catch(()=>{}),$(this,mc,null),M(this,ba).reject(I)}get textDivs(){return M(this,Zc)}get textContentItemsStr(){return M(this,AZ)}static cleanup(){if(!(M(this,Sh).size>0)){M(this,Xh).clear();for(const{canvas:I}of M(this,Gc).values())I.remove();M(this,Gc).clear()}}};ba=new WeakMap,zi=new WeakMap,CZ=new WeakMap,tZ=new WeakMap,uc=new WeakMap,Zl=new WeakMap,iZ=new WeakMap,eZ=new WeakMap,mc=new WeakMap,Mh=new WeakMap,Rh=new WeakMap,ua=new WeakMap,fh=new WeakMap,AZ=new WeakMap,Hh=new WeakMap,Zc=new WeakMap,sZ=new WeakMap,lZ=new WeakMap,Xh=new WeakMap,Gc=new WeakMap,nZ=new WeakMap,ma=new WeakMap,Sh=new WeakMap,Ql=new WeakSet,ngg=function(I){var i,e;if(M(this,CZ))return;(e=M(this,Zl)).ctx??(e.ctx=eg(i=bt,Ge,AN).call(i,M(this,uc)));const g=M(this,Zc),C=M(this,AZ);for(const A of I){if(g.length>Ycg){HI("Ignoring additional textDivs for performance reasons."),$(this,CZ,!0);return}if(A.str===void 0){if(A.type==="beginMarkedContentProps"||A.type==="beginMarkedContent"){const s=M(this,zi);$(this,zi,document.createElement("span")),M(this,zi).classList.add("markedContent"),A.id!==null&&M(this,zi).setAttribute("id",`${A.id}`),s.append(M(this,zi))}else A.type==="endMarkedContent"&&$(this,zi,M(this,zi).parentNode);continue}C.push(A.str),eg(this,Ql,agg).call(this,A)}},agg=function(I){var h;const g=document.createElement("span"),C={angle:0,canvasWidth:0,hasText:I.str!=="",hasEOL:I.hasEOL,fontSize:0};M(this,Zc).push(g);const i=iI.transform(M(this,lZ),I.transform);let e=Math.atan2(i[1],i[0]);const A=M(this,fh)[I.fontName];A.vertical&&(e+=Math.PI/2);let s=M(this,tZ)&&A.fontSubstitution||A.fontFamily;s=bt.fontFamilyMap.get(s)||s;const l=Math.hypot(i[2],i[3]),n=l*eg(h=bt,Ge,cgg).call(h,s,A,M(this,uc));let a,d;e===0?(a=i[4],d=i[5]-n):(a=i[4]+n*Math.sin(e),d=i[5]-n*Math.cos(e));const o="calc(var(--total-scale-factor) *",c=g.style;M(this,zi)===M(this,Mh)?(c.left=`${(100*a/M(this,eZ)).toFixed(2)}%`,c.top=`${(100*d/M(this,iZ)).toFixed(2)}%`):(c.left=`${o}${a.toFixed(2)}px)`,c.top=`${o}${d.toFixed(2)}px)`),c.fontSize=`${o}${(M(bt,ma)*l).toFixed(2)}px)`,c.fontFamily=s,C.fontSize=l,g.setAttribute("role","presentation"),g.textContent=I.str,g.dir=I.dir,M(this,tZ)&&(g.dataset.fontName=A.fontSubstitutionLoadedName||I.fontName),e!==0&&(C.angle=e*(180/Math.PI));let r=!1;if(I.str.length>1)r=!0;else if(I.str!==" "&&I.transform[0]!==I.transform[3]){const b=Math.abs(I.transform[0]),u=Math.abs(I.transform[3]);b!==u&&Math.max(b,u)/Math.min(b,u)>1.5&&(r=!0)}if(r&&(C.canvasWidth=A.vertical?I.height:I.width),M(this,sZ).set(g,C),M(this,Zl).div=g,M(this,Zl).properties=C,eg(this,Ql,eS).call(this,M(this,Zl)),C.hasText&&M(this,zi).append(g),C.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),M(this,zi).append(b)}},eS=function(I){var s;const{div:g,properties:C,ctx:i}=I,{style:e}=g;let A="";if(M(bt,ma)>1&&(A=`scale(${1/M(bt,ma)})`),C.canvasWidth!==0&&C.hasText){const{fontFamily:l}=e,{canvasWidth:n,fontSize:a}=C;eg(s=bt,Ge,AS).call(s,i,a*M(this,ua),l);const{width:d}=i.measureText(g.textContent);d>0&&(A=`scaleX(${n*M(this,ua)/d}) ${A}`)}C.angle!==0&&(A=`rotate(${C.angle}deg) ${A}`),A.length>0&&(e.transform=A)},Ge=new WeakSet,AN=function(I=null){let g=M(this,Gc).get(I||(I=""));if(!g){const C=document.createElement("canvas");C.className="hiddenCanvasElement",C.lang=I,document.body.append(C),g=C.getContext("2d",{alpha:!1,willReadFrequently:!0}),M(this,Gc).set(I,g),M(this,nZ).set(g,{size:0,family:""})}return g},AS=function(I,g,C){const i=M(this,nZ).get(I);g===i.size&&C===i.family||(I.font=`${g}px ${C}`,i.size=g,i.family=C)},ogg=function(){if(M(this,ma)!==null)return;const I=document.createElement("div");I.style.opacity=0,I.style.lineHeight=1,I.style.fontSize="1px",I.style.position="absolute",I.textContent="X",document.body.append(I),$(this,ma,I.getBoundingClientRect().height),I.remove()},cgg=function(I,g,C){const i=M(this,Xh).get(I);if(i)return i;const e=eg(this,Ge,AN).call(this,C);e.canvas.width=e.canvas.height=I8,eg(this,Ge,AS).call(this,e,I8,I);const A=e.measureText(""),s=A.fontBoundingBoxAscent,l=Math.abs(A.fontBoundingBoxDescent);e.canvas.width=e.canvas.height=0;let n=.8;return s?n=s/(s+l):(gi.platform.isFirefox&&HI("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),g.ascent?n=g.ascent:g.descent&&(n=1+g.descent)),M(this,Xh).set(I,n),n},ig(bt,Ge),ig(bt,Xh,new Map),ig(bt,Gc,new Map),ig(bt,nZ,new WeakMap),ig(bt,ma,null),ig(bt,Sh,new Set);let mm=bt;class Zm{static textContent(I){const g=[],C={items:g,styles:Object.create(null)};function i(e){var l;if(!e)return;let A=null;const s=e.name;if(s==="#text")A=e.value;else if(Zm.shouldBuildText(s))(l=e==null?void 0:e.attributes)!=null&&l.textContent?A=e.attributes.textContent:e.value&&(A=e.value);else return;if(A!==null&&g.push({str:A}),!!e.children)for(const n of e.children)i(n)}return i(I),C}static shouldBuildText(I){return!(I==="textarea"||I==="input"||I==="option"||I==="select")}}const Ncg=65536,Vcg=100;function Mcg(t={}){typeof t=="string"||t instanceof URL?t={url:t}:(t instanceof ArrayBuffer||ArrayBuffer.isView(t))&&(t={data:t});const I=new lS,{docId:g}=I,C=t.url?Rcg(t.url):null,i=t.data?fcg(t.data):null,e=t.httpHeaders||null,A=t.withCredentials===!0,s=t.password??null,l=t.range instanceof dgg?t.range:null,n=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:Ncg;let a=t.worker instanceof Ch?t.worker:null;const d=t.verbosity,o=typeof t.docBaseUrl=="string"&&!kV(t.docBaseUrl)?t.docBaseUrl:null,c=YY(t.cMapUrl),r=t.cMapPacked!==!1,h=t.CMapReaderFactory||(Ot?jog:L6),b=YY(t.iccUrl),u=YY(t.standardFontDataUrl),m=t.StandardFontDataFactory||(Ot?Qog:v6),Z=YY(t.wasmUrl),p=t.WasmFactory||(Ot?Oog:T6),Y=t.stopAtErrors!==!0,R=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,X=t.isEvalSupported!==!1,H=typeof t.isOffscreenCanvasSupported=="boolean"?t.isOffscreenCanvasSupported:!Ot,S=typeof t.isImageDecoderSupported=="boolean"?t.isImageDecoderSupported:!Ot&&(gi.platform.isFirefox||!globalThis.chrome),z=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,v=typeof t.disableFontFace=="boolean"?t.disableFontFace:Ot,K=t.fontExtraProperties===!0,V=t.enableXfa===!0,N=t.ownerDocument||globalThis.document,B=t.disableRange===!0,G=t.disableStream===!0,w=t.disableAutoFetch===!0,W=t.pdfBug===!0,y=t.CanvasFactory||(Ot?xog:Log),f=t.FilterFactory||(Ot?Tog:vog),D=t.enableHWA===!0,F=t.useWasm!==!1,T=l?l.length:t.length??NaN,Q=typeof t.useSystemFonts=="boolean"?t.useSystemFonts:!Ot&&!v,P=typeof t.useWorkerFetch=="boolean"?t.useWorkerFetch:!!(h===L6&&m===v6&&p===T6&&c&&u&&Z&&Fr(c,document.baseURI)&&Fr(u,document.baseURI)&&Fr(Z,document.baseURI)),L=null;Zog(d);const E={canvasFactory:new y({ownerDocument:N,enableHWA:D}),filterFactory:new f({docId:g,ownerDocument:N}),cMapReaderFactory:P?null:new h({baseUrl:c,isCompressed:r}),standardFontDataFactory:P?null:new m({baseUrl:u}),wasmFactory:P?null:new p({baseUrl:Z})};if(!a){const j={verbosity:d,port:Kl.workerPort};a=j.port?Ch.fromPort(j):new Ch(j),I._worker=a}const J={docId:g,apiVersion:"5.1.91",data:i,password:s,disableAutoFetch:w,rangeChunkSize:n,length:T,docBaseUrl:o,enableXfa:V,evaluatorOptions:{maxImageSize:R,disableFontFace:v,ignoreErrors:Y,isEvalSupported:X,isOffscreenCanvasSupported:H,isImageDecoderSupported:S,canvasMaxAreaInBytes:z,fontExtraProperties:K,useSystemFonts:Q,useWasm:F,useWorkerFetch:P,cMapUrl:c,iccUrl:b,standardFontDataUrl:u,wasmUrl:Z}},k={ownerDocument:N,pdfBug:W,styleElement:L,loadingParams:{disableAutoFetch:w,enableXfa:V}};return a.promise.then(function(){if(I.destroyed)throw new Error("Loading aborted");if(a.destroyed)throw new Error("Worker was destroyed");const j=a.messageHandler.sendWithPromise("GetDocRequest",J,i?[i.buffer]:null);let q;if(l)q=new acg(l,{disableRange:B,disableStream:G});else if(!i){if(!C)throw new Error("getDocument - no `url` parameter provided.");let tg;if(Ot)if(Fr(C)){if(typeof fetch>"u"||typeof Response>"u"||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");tg=g8}else tg=Bcg;else tg=Fr(C)?g8:mcg;q=new tg({url:C,length:T,httpHeaders:e,withCredentials:A,rangeChunkSize:n,disableRange:B,disableStream:G})}return j.then(tg=>{if(I.destroyed)throw new Error("Loading aborted");if(a.destroyed)throw new Error("Worker was destroyed");const Cg=new Ku(g,tg,a.port),x=new Fcg(Cg,I,q,k,E);I._transport=x,Cg.send("Ready",null)})}).catch(I._capability.reject),I}function Rcg(t){if(t instanceof URL)return t.href;if(typeof t=="string"){if(Ot)return t;const I=URL.parse(t,window.location);if(I)return I.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function fcg(t){if(Ot&&typeof Buffer<"u"&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if(typeof t=="string")return QZ(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||typeof t=="object"&&!isNaN(t==null?void 0:t.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function YY(t){if(typeof t!="string")return null;if(t.endsWith("/"))return t;throw new Error(`Invalid factory url: "${t}" must include trailing slash.`)}const sS=t=>typeof t=="object"&&Number.isInteger(t==null?void 0:t.num)&&t.num>=0&&Number.isInteger(t==null?void 0:t.gen)&&t.gen>=0,Hcg=t=>typeof t=="object"&&typeof(t==null?void 0:t.name)=="string",Xcg=Mog.bind(null,sS,Hcg);var WV;const yV=class yV{constructor(){CI(this,"_capability",Promise.withResolvers());CI(this,"_transport",null);CI(this,"_worker",null);CI(this,"docId",`d${ui(yV,WV)._++}`);CI(this,"destroyed",!1);CI(this,"onPassword",null);CI(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var I,g,C,i;this.destroyed=!0;try{(I=this._worker)!=null&&I.port&&(this._worker._pendingDestroy=!0),await((g=this._transport)==null?void 0:g.destroy())}catch(e){throw(C=this._worker)!=null&&C.port&&delete this._worker._pendingDestroy,e}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null}async getData(){return this._transport.getData()}};WV=new WeakMap,ig(yV,WV,0);let lS=yV;class dgg{constructor(I,g,C=!1,i=null){this.length=I,this.initialData=g,this.progressiveDone=C,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(I){this._rangeListeners.push(I)}addProgressListener(I){this._progressListeners.push(I)}addProgressiveReadListener(I){this._progressiveReadListeners.push(I)}addProgressiveDoneListener(I){this._progressiveDoneListeners.push(I)}onDataRange(I,g){for(const C of this._rangeListeners)C(I,g)}onDataProgress(I,g){this._readyCapability.promise.then(()=>{for(const C of this._progressListeners)C(I,g)})}onDataProgressiveRead(I){this._readyCapability.promise.then(()=>{for(const g of this._progressiveReadListeners)g(I)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const I of this._progressiveDoneListeners)I()})}transportReady(){this._readyCapability.resolve()}requestDataRange(I,g){ZC("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class Scg{constructor(I,g){this._pdfInfo=I,this._transport=g}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return jI(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(I){return this._transport.getPage(I)}getPageIndex(I){return this._transport.getPageIndex(I)}getDestinations(){return this._transport.getDestinations()}getDestination(I){return this._transport.getDestination(I)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:I="display"}={}){const{renderingIntent:g}=this._transport.getRenderingIntent(I);return this._transport.getOptionalContentConfig(g)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(I=!1){return this._transport.startCleanup(I||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(I){return this._transport.cachedPageNumber(I)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Gl,wc,Lu;class Dcg{constructor(I,g,C,i=!1){ig(this,wc);ig(this,Gl,!1);this._pageIndex=I,this._pageInfo=g,this._transport=C,this._stats=i?new k6:null,this._pdfBug=i,this.commonObjs=C.commonObjs,this.objs=new rgg,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:I,rotation:g=this.rotate,offsetX:C=0,offsetY:i=0,dontFlip:e=!1}={}){return new UZ({viewBox:this.view,userUnit:this.userUnit,scale:I,rotation:g,offsetX:C,offsetY:i,dontFlip:e})}getAnnotations({intent:I="display"}={}){const{renderingIntent:g}=this._transport.getRenderingIntent(I);return this._transport.getAnnotations(this._pageIndex,g)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return jI(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var I;return((I=this._transport._htmlForXfa)==null?void 0:I.children[this._pageIndex])||null}render({canvasContext:I,viewport:g,intent:C="display",annotationMode:i=qn.ENABLE,transform:e=null,background:A=null,optionalContentConfigPromise:s=null,annotationCanvasMap:l=null,pageColors:n=null,printAnnotationStorage:a=null,isEditing:d=!1}){var p,Y;(p=this._stats)==null||p.time("Overall");const o=this._transport.getRenderingIntent(C,i,a,d),{renderingIntent:c,cacheKey:r}=o;$(this,Gl,!1),s||(s=this._transport.getOptionalContentConfig(c));let h=this._intentStates.get(r);h||(h=Object.create(null),this._intentStates.set(r,h)),h.streamReaderCancelTimeout&&(clearTimeout(h.streamReaderCancelTimeout),h.streamReaderCancelTimeout=null);const b=!!(c&be.PRINT);h.displayReadyCapability||(h.displayReadyCapability=Promise.withResolvers(),h.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Y=this._stats)==null||Y.time("Page Request"),this._pumpOperatorList(o));const u=R=>{var X;h.renderTasks.delete(m),b&&$(this,Gl,!0),eg(this,wc,Lu).call(this),R?(m.capability.reject(R),this._abortOperatorList({intentState:h,reason:R instanceof Error?R:new Error(R)})):m.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(X=globalThis.Stats)!=null&&X.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},m=new aS({callback:u,params:{canvasContext:I,viewport:g,transform:e,background:A},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:h.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!b,pdfBug:this._pdfBug,pageColors:n});(h.renderTasks||(h.renderTasks=new Set)).add(m);const Z=m.task;return Promise.all([h.displayReadyCapability.promise,s]).then(([R,X])=>{var H;if(this.destroyed){u();return}if((H=this._stats)==null||H.time("Rendering"),!(X.renderingIntent&c))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");m.initializeGraphics({transparency:R,optionalContentConfig:X}),m.operatorListChanged()}).catch(u),Z}getOperatorList({intent:I="display",annotationMode:g=qn.ENABLE,printAnnotationStorage:C=null,isEditing:i=!1}={}){var n;function e(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(l))}const A=this._transport.getRenderingIntent(I,g,C,i,!0);let s=this._intentStates.get(A.cacheKey);s||(s=Object.create(null),this._intentStates.set(A.cacheKey,s));let l;return s.opListReadCapability||(l=Object.create(null),l.operatorListChanged=e,s.opListReadCapability=Promise.withResolvers(),(s.renderTasks||(s.renderTasks=new Set)).add(l),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(n=this._stats)==null||n.time("Page Request"),this._pumpOperatorList(A)),s.opListReadCapability.promise}streamTextContent({includeMarkedContent:I=!1,disableNormalization:g=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:I===!0,disableNormalization:g===!0},{highWaterMark:100,size(i){return i.items.length}})}getTextContent(I={}){if(this._transport._htmlForXfa)return this.getXfa().then(C=>Zm.textContent(C));const g=this.streamTextContent(I);return new Promise(function(C,i){function e(){A.read().then(function({value:l,done:n}){if(n){C(s);return}s.lang??(s.lang=l.lang),Object.assign(s.styles,l.styles),s.items.push(...l.items),e()},i)}const A=g.getReader(),s={items:[],styles:Object.create(null),lang:null};e()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const I=[];for(const g of this._intentStates.values())if(this._abortOperatorList({intentState:g,reason:new Error("Page was destroyed."),force:!0}),!g.opListReadCapability)for(const C of g.renderTasks)I.push(C.completed),C.cancel();return this.objs.clear(),$(this,Gl,!1),Promise.all(I)}cleanup(I=!1){$(this,Gl,!0);const g=eg(this,wc,Lu).call(this);return I&&g&&this._stats&&(this._stats=new k6),g}_startRenderPage(I,g){var i,e;const C=this._intentStates.get(g);C&&((i=this._stats)==null||i.timeEnd("Page Request"),(e=C.displayReadyCapability)==null||e.resolve(I))}_renderPageChunk(I,g){for(let C=0,i=I.length;C<i;C++)g.operatorList.fnArray.push(I.fnArray[C]),g.operatorList.argsArray.push(I.argsArray[C]);g.operatorList.lastChunk=I.lastChunk,g.operatorList.separateAnnots=I.separateAnnots;for(const C of g.renderTasks)C.operatorListChanged();I.lastChunk&&eg(this,wc,Lu).call(this)}_pumpOperatorList({renderingIntent:I,cacheKey:g,annotationStorageSerializable:C,modifiedIds:i}){const{map:e,transfer:A}=C,l=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:I,cacheKey:g,annotationStorage:e,modifiedIds:i},A).getReader(),n=this._intentStates.get(g);n.streamReader=l;const a=()=>{l.read().then(({value:d,done:o})=>{if(o){n.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(d,n),a())},d=>{if(n.streamReader=null,!this._transport.destroyed){if(n.operatorList){n.operatorList.lastChunk=!0;for(const o of n.renderTasks)o.operatorListChanged();eg(this,wc,Lu).call(this)}if(n.displayReadyCapability)n.displayReadyCapability.reject(d);else if(n.opListReadCapability)n.opListReadCapability.reject(d);else throw d}})};a()}_abortOperatorList({intentState:I,reason:g,force:C=!1}){if(I.streamReader){if(I.streamReaderCancelTimeout&&(clearTimeout(I.streamReaderCancelTimeout),I.streamReaderCancelTimeout=null),!C){if(I.renderTasks.size>0)return;if(g instanceof qD){let i=Vcg;g.extraDelay>0&&g.extraDelay<1e3&&(i+=g.extraDelay),I.streamReaderCancelTimeout=setTimeout(()=>{I.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:I,reason:g,force:!0})},i);return}}if(I.streamReader.cancel(new za(g.message)).catch(()=>{}),I.streamReader=null,!this._transport.destroyed){for(const[i,e]of this._intentStates)if(e===I){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}Gl=new WeakMap,wc=new WeakSet,Lu=function(){if(!M(this,Gl)||this.destroyed)return!1;for(const{renderTasks:I,operatorList:g}of this._intentStates.values())if(I.size>0||!g.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),$(this,Gl,!1),!0};var wl,YV;class Kcg{constructor(){ig(this,wl,new Map);ig(this,YV,Promise.resolve())}postMessage(I,g){const C={data:structuredClone(I,g?{transfer:g}:null)};M(this,YV).then(()=>{for(const[i]of M(this,wl))i.call(this,C)})}addEventListener(I,g,C=null){let i=null;if((C==null?void 0:C.signal)instanceof AbortSignal){const{signal:e}=C;if(e.aborted){HI("LoopbackPort - cannot use an `aborted` signal.");return}const A=()=>this.removeEventListener(I,g);i=()=>e.removeEventListener("abort",A),e.addEventListener("abort",A)}M(this,wl).set(g,i)}removeEventListener(I,g){const C=M(this,wl).get(g);C==null||C(),M(this,wl).delete(g)}terminate(){for(const[,I]of M(this,wl))I==null||I();M(this,wl).clear()}}wl=new WeakMap,YV=new WeakMap;var NV,pc,Bc,Dh,sN,Kh,lN;const XC=class XC{constructor({name:I=null,port:g=null,verbosity:C=Gog()}={}){ig(this,Dh);var i;if(this.name=I,this.destroyed=!1,this.verbosity=C,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,g){if((i=M(XC,Bc))!=null&&i.has(g))throw new Error("Cannot use more than one PDFWorker per port.");(M(XC,Bc)||$(XC,Bc,new WeakMap)).set(g,this),this._initializeFromPort(g);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(I){this._port=I,this._messageHandler=new Ku("main","worker",I),this._messageHandler.on("ready",function(){}),eg(this,Dh,sN).call(this)}_initialize(){if(M(XC,pc)||M(XC,Kh,lN)){this._setupFakeWorker();return}let{workerSrc:I}=XC;try{XC._isSameOrigin(window.location,I)||(I=XC._createCDNWrapper(new URL(I,window.location).href));const g=new Worker(I,{type:"module"}),C=new Ku("main","worker",g),i=()=>{e.abort(),C.destroy(),g.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},e=new AbortController;g.addEventListener("error",()=>{this._webWorker||i()},{signal:e.signal}),C.on("test",s=>{if(e.abort(),this.destroyed||!s){i();return}this._messageHandler=C,this._port=g,this._webWorker=g,eg(this,Dh,sN).call(this)}),C.on("ready",s=>{if(e.abort(),this.destroyed){i();return}try{A()}catch{this._setupFakeWorker()}});const A=()=>{const s=new Uint8Array;C.send("test",s,[s.buffer])};A();return}catch{FV("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){M(XC,pc)||(HI("Setting up fake worker."),$(XC,pc,!0)),XC._setupFakeWorkerGlobal.then(I=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const g=new Kcg;this._port=g;const C=`fake${ui(XC,NV)._++}`,i=new Ku(C+"_worker",C,g);I.setup(i,g),this._messageHandler=new Ku(C,C+"_worker",g),eg(this,Dh,sN).call(this)}).catch(I=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${I.message}".`))})}destroy(){var I,g,C;this.destroyed=!0,(I=this._webWorker)==null||I.terminate(),this._webWorker=null,(g=M(XC,Bc))==null||g.delete(this._port),this._port=null,(C=this._messageHandler)==null||C.destroy(),this._messageHandler=null}static fromPort(I){var C;if(!(I!=null&&I.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const g=(C=M(this,Bc))==null?void 0:C.get(I.port);if(g){if(g._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return g}return new XC(I)}static get workerSrc(){if(Kl.workerSrc)return Kl.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return jI(this,"_setupFakeWorkerGlobal",(async()=>M(this,Kh,lN)?M(this,Kh,lN):(await import(this.workerSrc)).WorkerMessageHandler)())}};NV=new WeakMap,pc=new WeakMap,Bc=new WeakMap,Dh=new WeakSet,sN=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Kh=new WeakSet,lN=function(){var I;try{return((I=globalThis.pdfjsWorker)==null?void 0:I.WorkerMessageHandler)||null}catch{return null}},ig(XC,Kh),ig(XC,NV,0),ig(XC,pc,!1),ig(XC,Bc),Ot&&($(XC,pc,!0),Kl.workerSrc||(Kl.workerSrc="./pdf.worker.mjs")),XC._isSameOrigin=(I,g)=>{const C=URL.parse(I);if(!(C!=null&&C.origin)||C.origin==="null")return!1;const i=new URL(g,C);return C.origin===i.origin},XC._createCDNWrapper=I=>{const g=`await import("${I}");`;return URL.createObjectURL(new Blob([g],{type:"text/javascript"}))};let Ch=XC;var pl,hs,Fh,kh,Bl,Wc,vu;class Fcg{constructor(I,g,C,i,e){ig(this,Wc);ig(this,pl,new Map);ig(this,hs,new Map);ig(this,Fh,new Map);ig(this,kh,new Map);ig(this,Bl,null);this.messageHandler=I,this.loadingTask=g,this.commonObjs=new rgg,this.fontLoader=new zog({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=e.canvasFactory,this.filterFactory=e.filterFactory,this.cMapReaderFactory=e.cMapReaderFactory,this.standardFontDataFactory=e.standardFontDataFactory,this.wasmFactory=e.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=C,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return jI(this,"annotationStorage",new t9)}getRenderingIntent(I,g=qn.ENABLE,C=null,i=!1,e=!1){let A=be.DISPLAY,s=PX;switch(I){case"any":A=be.ANY;break;case"display":break;case"print":A=be.PRINT;break;default:HI(`getRenderingIntent - invalid intent: ${I}`)}const l=A&be.PRINT&&C instanceof O$?C:this.annotationStorage;switch(g){case qn.DISABLE:A+=be.ANNOTATIONS_DISABLE;break;case qn.ENABLE:break;case qn.ENABLE_FORMS:A+=be.ANNOTATIONS_FORMS;break;case qn.ENABLE_STORAGE:A+=be.ANNOTATIONS_STORAGE,s=l.serializable;break;default:HI(`getRenderingIntent - invalid annotationMode: ${g}`)}i&&(A+=be.IS_EDITING),e&&(A+=be.OPLIST);const{ids:n,hash:a}=l.modifiedIds,d=[A,s.hash,a];return{renderingIntent:A,cacheKey:d.join("_"),annotationStorageSerializable:s,modifiedIds:n}}destroy(){var C;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(C=M(this,Bl))==null||C.reject(new Error("Worker was destroyed during onPassword callback"));const I=[];for(const i of M(this,hs).values())I.push(i._destroy());M(this,hs).clear(),M(this,Fh).clear(),M(this,kh).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const g=this.messageHandler.sendWithPromise("Terminate",null);return I.push(g),Promise.all(I).then(()=>{var i,e;this.commonObjs.clear(),this.fontLoader.clear(),M(this,pl).clear(),this.filterFactory.destroy(),mm.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new za("Worker was terminated.")),(e=this.messageHandler)==null||e.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:I,loadingTask:g}=this;I.on("GetReader",(C,i)=>{ct(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},i.onPull=()=>{this._fullReader.read().then(function({value:e,done:A}){if(A){i.close();return}ct(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{i.error(e)})},i.onCancel=e=>{this._fullReader.cancel(e),i.ready.catch(A=>{if(!this.destroyed)throw A})}}),I.on("ReaderHeadersReady",async C=>{var s;await this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:e,contentLength:A}=this._fullReader;return(!i||!e)&&(this._lastProgress&&((s=g.onProgress)==null||s.call(g,this._lastProgress)),this._fullReader.onProgress=l=>{var n;(n=g.onProgress)==null||n.call(g,{loaded:l.loaded,total:l.total})}),{isStreamingSupported:i,isRangeSupported:e,contentLength:A}}),I.on("GetRangeReader",(C,i)=>{ct(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const e=this._networkStream.getRangeReader(C.begin,C.end);if(!e){i.close();return}i.onPull=()=>{e.read().then(function({value:A,done:s}){if(s){i.close();return}ct(A instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(A),1,[A])}).catch(A=>{i.error(A)})},i.onCancel=A=>{e.cancel(A),i.ready.catch(s=>{if(!this.destroyed)throw s})}}),I.on("GetDoc",({pdfInfo:C})=>{this._numPages=C.numPages,this._htmlForXfa=C.htmlForXfa,delete C.htmlForXfa,g._capability.resolve(new Scg(C,this))}),I.on("DocException",C=>{g._capability.reject(Ki(C))}),I.on("PasswordRequest",C=>{$(this,Bl,Promise.withResolvers());try{if(!g.onPassword)throw Ki(C);const i=e=>{e instanceof Error?M(this,Bl).reject(e):M(this,Bl).resolve({password:e})};g.onPassword(i,C.code)}catch(i){M(this,Bl).reject(i)}return M(this,Bl).promise}),I.on("DataLoaded",C=>{var i;(i=g.onProgress)==null||i.call(g,{loaded:C.length,total:C.length}),this.downloadInfoCapability.resolve(C)}),I.on("StartRenderPage",C=>{if(this.destroyed)return;M(this,hs).get(C.pageIndex)._startRenderPage(C.transparency,C.cacheKey)}),I.on("commonobj",([C,i,e])=>{var A;if(this.destroyed||this.commonObjs.has(C))return null;switch(i){case"Font":if("error"in e){const a=e.error;HI(`Error during font loading: ${a}`),this.commonObjs.resolve(C,a);break}const s=this._params.pdfBug&&((A=globalThis.FontInspector)!=null&&A.enabled)?(a,d)=>globalThis.FontInspector.fontAdded(a,d):null,l=new Jog(e,s);this.fontLoader.bind(l).catch(()=>I.sendWithPromise("FontFallback",{id:C})).finally(()=>{!l.fontExtraProperties&&l.data&&(l.data=null),this.commonObjs.resolve(C,l)});break;case"CopyLocalImage":const{imageRef:n}=e;ct(n,"The imageRef must be defined.");for(const a of M(this,hs).values())for(const[,d]of a.objs)if((d==null?void 0:d.ref)===n)return d.dataLen?(this.commonObjs.resolve(C,structuredClone(d)),d.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(C,e);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),I.on("obj",([C,i,e,A])=>{var l;if(this.destroyed)return;const s=M(this,hs).get(i);if(!s.objs.has(C)){if(s._intentStates.size===0){(l=A==null?void 0:A.bitmap)==null||l.close();return}switch(e){case"Image":case"Pattern":s.objs.resolve(C,A);break;default:throw new Error(`Got unknown object type ${e}`)}}}),I.on("DocProgress",C=>{var i;this.destroyed||(i=g.onProgress)==null||i.call(g,{loaded:C.loaded,total:C.total})}),I.on("FetchBinaryData",async C=>{if(this.destroyed)throw new Error("Worker was destroyed.");const i=this[C.type];if(!i)throw new Error(`${C.type} not initialized, see the \`useWorkerFetch\` parameter.`);return i.fetch(C)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var C;this.annotationStorage.size<=0&&HI("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:I,transfer:g}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:I,filename:((C=this._fullReader)==null?void 0:C.filename)??null},g).finally(()=>{this.annotationStorage.resetModified()})}getPage(I){if(!Number.isInteger(I)||I<=0||I>this._numPages)return Promise.reject(new Error("Invalid page request."));const g=I-1,C=M(this,Fh).get(g);if(C)return C;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:g}).then(e=>{if(this.destroyed)throw new Error("Transport destroyed");e.refStr&&M(this,kh).set(e.refStr,I);const A=new Dcg(g,e,this,this._params.pdfBug);return M(this,hs).set(g,A),A});return M(this,Fh).set(g,i),i}getPageIndex(I){return sS(I)?this.messageHandler.sendWithPromise("GetPageIndex",{num:I.num,gen:I.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(I,g){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:I,intent:g})}getFieldObjects(){return eg(this,Wc,vu).call(this,"GetFieldObjects")}hasJSActions(){return eg(this,Wc,vu).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(I){return typeof I!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:I})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return eg(this,Wc,vu).call(this,"GetDocJSActions")}getPageJSActions(I){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:I})}getStructTree(I){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:I})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(I){return eg(this,Wc,vu).call(this,"GetOptionalContentConfig").then(g=>new ncg(g,I))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const I="GetMetadata",g=M(this,pl).get(I);if(g)return g;const C=this.messageHandler.sendWithPromise(I,null).then(i=>{var e,A;return{info:i[0],metadata:i[1]?new scg(i[1]):null,contentDispositionFilename:((e=this._fullReader)==null?void 0:e.filename)??null,contentLength:((A=this._fullReader)==null?void 0:A.contentLength)??null}});return M(this,pl).set(I,C),C}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(I=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const g of M(this,hs).values())if(!g.cleanup())throw new Error(`startCleanup: Page ${g.pageNumber} is currently rendering.`);this.commonObjs.clear(),I||this.fontLoader.clear(),M(this,pl).clear(),this.filterFactory.destroy(!0),mm.cleanup()}}cachedPageNumber(I){if(!sS(I))return null;const g=I.gen===0?`${I.num}R`:`${I.num}R${I.gen}`;return M(this,kh).get(g)??null}}pl=new WeakMap,hs=new WeakMap,Fh=new WeakMap,kh=new WeakMap,Bl=new WeakMap,Wc=new WeakSet,vu=function(I,g=null){const C=M(this,pl).get(I);if(C)return C;const i=this.messageHandler.sendWithPromise(I,g);return M(this,pl).set(I,i),i};const Bu=Symbol("INITIAL_DATA");var Ae,aZ,nS;class rgg{constructor(){ig(this,aZ);ig(this,Ae,Object.create(null))}get(I,g=null){if(g){const i=eg(this,aZ,nS).call(this,I);return i.promise.then(()=>g(i.data)),null}const C=M(this,Ae)[I];if(!C||C.data===Bu)throw new Error(`Requesting object that isn't resolved yet ${I}.`);return C.data}has(I){const g=M(this,Ae)[I];return!!g&&g.data!==Bu}delete(I){const g=M(this,Ae)[I];return!g||g.data===Bu?!1:(delete M(this,Ae)[I],!0)}resolve(I,g=null){const C=eg(this,aZ,nS).call(this,I);C.data=g,C.resolve()}clear(){var I;for(const g in M(this,Ae)){const{data:C}=M(this,Ae)[g];(I=C==null?void 0:C.bitmap)==null||I.close()}$(this,Ae,Object.create(null))}*[Symbol.iterator](){for(const I in M(this,Ae)){const{data:g}=M(this,Ae)[I];g!==Bu&&(yield[I,g])}}}Ae=new WeakMap,aZ=new WeakSet,nS=function(I){var g;return(g=M(this,Ae))[I]||(g[I]={...Promise.withResolvers(),data:Bu})};var Za;class kcg{constructor(I){ig(this,Za,null);CI(this,"onContinue",null);CI(this,"onError",null);$(this,Za,I)}get promise(){return M(this,Za).capability.promise}cancel(I=0){M(this,Za).cancel(null,I)}get separateAnnots(){const{separateAnnots:I}=M(this,Za).operatorList;if(!I)return!1;const{annotationCanvasMap:g}=M(this,Za);return I.form||I.canvas&&(g==null?void 0:g.size)>0}}Za=new WeakMap;var Ga,yc;const vo=class vo{constructor({callback:I,params:g,objs:C,commonObjs:i,annotationCanvasMap:e,operatorList:A,pageIndex:s,canvasFactory:l,filterFactory:n,useRequestAnimationFrame:a=!1,pdfBug:d=!1,pageColors:o=null}){ig(this,Ga,null);this.callback=I,this.params=g,this.objs=C,this.commonObjs=i,this.annotationCanvasMap=e,this.operatorListIdx=null,this.operatorList=A,this._pageIndex=s,this.canvasFactory=l,this.filterFactory=n,this._pdfBug=d,this.pageColors=o,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=a===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new kcg(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=g.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:I=!1,optionalContentConfig:g}){var s,l;if(this.cancelled)return;if(this._canvas){if(M(vo,yc).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");M(vo,yc).add(this._canvas)}this._pdfBug&&((s=globalThis.StepperManager)!=null&&s.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:C,viewport:i,transform:e,background:A}=this.params;this.gfx=new Ih(C,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:g},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:e,viewport:i,transparency:I,background:A}),this.operatorListIdx=0,this.graphicsReady=!0,(l=this.graphicsReadyCallback)==null||l.call(this)}cancel(I=null,g=0){var C,i,e;this.running=!1,this.cancelled=!0,(C=this.gfx)==null||C.endDrawing(),M(this,Ga)&&(window.cancelAnimationFrame(M(this,Ga)),$(this,Ga,null)),M(vo,yc).delete(this._canvas),I||(I=new qD(`Rendering cancelled, page ${this._pageIndex+1}`,g)),this.callback(I),(e=(i=this.task).onError)==null||e.call(i,I)}operatorListChanged(){var I;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(I=this.stepper)==null||I.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?$(this,Ga,window.requestAnimationFrame(()=>{$(this,Ga,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),M(vo,yc).delete(this._canvas),this.callback())))}};Ga=new WeakMap,yc=new WeakMap,ig(vo,yc,new WeakSet);let aS=vo;const zcg="5.1.91",Jcg="45cbe8bb0";function C8(t){return Math.floor(Math.max(0,Math.min(1,t))*255).toString(16).padStart(2,"0")}function Wu(t){return Math.max(0,Math.min(255,255*t))}class t8{static CMYK_G([I,g,C,i]){return["G",1-Math.min(1,.3*I+.59*C+.11*g+i)]}static G_CMYK([I]){return["CMYK",0,0,0,1-I]}static G_RGB([I]){return["RGB",I,I,I]}static G_rgb([I]){return I=Wu(I),[I,I,I]}static G_HTML([I]){const g=C8(I);return`#${g}${g}${g}`}static RGB_G([I,g,C]){return["G",.3*I+.59*g+.11*C]}static RGB_rgb(I){return I.map(Wu)}static RGB_HTML(I){return`#${I.map(C8).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([I,g,C,i]){return["RGB",1-Math.min(1,I+i),1-Math.min(1,C+i),1-Math.min(1,g+i)]}static CMYK_rgb([I,g,C,i]){return[Wu(1-Math.min(1,I+i)),Wu(1-Math.min(1,C+i)),Wu(1-Math.min(1,g+i))]}static CMYK_HTML(I){const g=this.CMYK_RGB(I).slice(1);return this.RGB_HTML(g)}static RGB_CMYK([I,g,C]){const i=1-I,e=1-g,A=1-C,s=Math.min(i,e,A);return["CMYK",i,e,A,s]}}class Lcg{create(I,g,C=!1){if(I<=0||g<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),C||(i.setAttribute("width",`${I}px`),i.setAttribute("height",`${g}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${I} ${g}`),i}createElement(I){if(typeof I!="string")throw new Error("Invalid SVG element type");return this._createSVG(I)}_createSVG(I){ZC("Abstract method `_createSVG` called.")}}class xN extends Lcg{_createSVG(I){return document.createElementNS(tl,I)}}class hgg{static setupStorage(I,g,C,i,e){const A=i.getValue(g,{value:null});switch(C.name){case"textarea":if(A.value!==null&&(I.textContent=A.value),e==="print")break;I.addEventListener("input",s=>{i.setValue(g,{value:s.target.value})});break;case"input":if(C.attributes.type==="radio"||C.attributes.type==="checkbox"){if(A.value===C.attributes.xfaOn?I.setAttribute("checked",!0):A.value===C.attributes.xfaOff&&I.removeAttribute("checked"),e==="print")break;I.addEventListener("change",s=>{i.setValue(g,{value:s.target.checked?s.target.getAttribute("xfaOn"):s.target.getAttribute("xfaOff")})})}else{if(A.value!==null&&I.setAttribute("value",A.value),e==="print")break;I.addEventListener("input",s=>{i.setValue(g,{value:s.target.value})})}break;case"select":if(A.value!==null){I.setAttribute("value",A.value);for(const s of C.children)s.attributes.value===A.value?s.attributes.selected=!0:s.attributes.hasOwnProperty("selected")&&delete s.attributes.selected}I.addEventListener("input",s=>{const l=s.target.options,n=l.selectedIndex===-1?"":l[l.selectedIndex].value;i.setValue(g,{value:n})});break}}static setAttributes({html:I,element:g,storage:C=null,intent:i,linkService:e}){const{attributes:A}=g,s=I instanceof HTMLAnchorElement;A.type==="radio"&&(A.name=`${A.name}-${i}`);for(const[l,n]of Object.entries(A))if(n!=null)switch(l){case"class":n.length&&I.setAttribute(l,n.join(" "));break;case"dataId":break;case"id":I.setAttribute("data-element-id",n);break;case"style":Object.assign(I.style,n);break;case"textContent":I.textContent=n;break;default:(!s||l!=="href"&&l!=="newWindow")&&I.setAttribute(l,n)}s&&e.addLinkAttributes(I,A.href,A.newWindow),C&&A.dataId&&this.setupStorage(I,A.dataId,g,C)}static render(I){var d,o;const g=I.annotationStorage,C=I.linkService,i=I.xfaHtml,e=I.intent||"display",A=document.createElement(i.name);i.attributes&&this.setAttributes({html:A,element:i,intent:e,linkService:C});const s=e!=="richText",l=I.div;if(l.append(A),I.viewport){const c=`matrix(${I.viewport.transform.join(",")})`;l.style.transform=c}s&&l.setAttribute("class","xfaLayer xfaFont");const n=[];if(i.children.length===0){if(i.value){const c=document.createTextNode(i.value);A.append(c),s&&Zm.shouldBuildText(i.name)&&n.push(c)}return{textDivs:n}}const a=[[i,-1,A]];for(;a.length>0;){const[c,r,h]=a.at(-1);if(r+1===c.children.length){a.pop();continue}const b=c.children[++a.at(-1)[1]];if(b===null)continue;const{name:u}=b;if(u==="#text"){const Z=document.createTextNode(b.value);n.push(Z),h.append(Z);continue}const m=(d=b==null?void 0:b.attributes)!=null&&d.xmlns?document.createElementNS(b.attributes.xmlns,u):document.createElement(u);if(h.append(m),b.attributes&&this.setAttributes({html:m,element:b,storage:g,intent:e,linkService:C}),((o=b.children)==null?void 0:o.length)>0)a.push([b,-1,m]);else if(b.value){const Z=document.createTextNode(b.value);s&&Zm.shouldBuildText(u)&&n.push(Z),m.append(Z)}}for(const c of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))c.setAttribute("readOnly",!0);return{textDivs:n}}static update(I){const g=`matrix(${I.viewport.transform.join(",")})`;I.div.style.transform=g,I.div.hidden=!1}}const _Z=1e3,vcg=9,id=new WeakSet;class i8{static create(I){switch(I.data.annotationType){case lt.LINK:return new bgg(I);case lt.TEXT:return new Tcg(I);case lt.WIDGET:switch(I.data.fieldType){case"Tx":return new xcg(I);case"Btn":return I.data.radioButton?new Zgg(I):I.data.checkBox?new Qcg(I):new Ocg(I);case"Ch":return new Ucg(I);case"Sig":return new jcg(I)}return new ld(I);case lt.POPUP:return new cS(I);case lt.FREETEXT:return new Wgg(I);case lt.LINE:return new Pcg(I);case lt.SQUARE:return new _cg(I);case lt.CIRCLE:return new qcg(I);case lt.POLYLINE:return new ygg(I);case lt.CARET:return new gdg(I);case lt.INK:return new A9(I);case lt.POLYGON:return new $cg(I);case lt.HIGHLIGHT:return new Ygg(I);case lt.UNDERLINE:return new Idg(I);case lt.SQUIGGLY:return new Cdg(I);case lt.STRIKEOUT:return new tdg(I);case lt.STAMP:return new Ngg(I);case lt.FILEATTACHMENT:return new idg(I);default:return new et(I)}}}var Yc,zh,Jh,oZ,oS;const x9=class x9{constructor(I,{isRenderable:g=!1,ignoreBorder:C=!1,createQuadrilaterals:i=!1}={}){ig(this,oZ);ig(this,Yc,null);ig(this,zh,!1);ig(this,Jh,null);this.isRenderable=g,this.data=I.data,this.layer=I.layer,this.linkService=I.linkService,this.downloadManager=I.downloadManager,this.imageResourcesPath=I.imageResourcesPath,this.renderForms=I.renderForms,this.svgFactory=I.svgFactory,this.annotationStorage=I.annotationStorage,this.enableScripting=I.enableScripting,this.hasJSActions=I.hasJSActions,this._fieldObjects=I.fieldObjects,this.parent=I.parent,g&&(this.container=this._createContainer(C)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:I,contentsObj:g,richText:C}){return!!(I!=null&&I.str||g!=null&&g.str||C!=null&&C.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return x9._hasPopupData(this.data)}updateEdited(I){var C;if(!this.container)return;M(this,Yc)||$(this,Yc,{rect:this.data.rect.slice(0)});const{rect:g}=I;g&&eg(this,oZ,oS).call(this,g),(C=M(this,Jh))==null||C.popup.updateEdited(I)}resetEdited(){var I;M(this,Yc)&&(eg(this,oZ,oS).call(this,M(this,Yc).rect),(I=M(this,Jh))==null||I.popup.resetEdited(),$(this,Yc,null))}_createContainer(I){const{data:g,parent:{page:C,viewport:i}}=this,e=document.createElement("section");e.setAttribute("data-annotation-id",g.id),this instanceof ld||(e.tabIndex=_Z);const{style:A}=e;if(A.zIndex=this.parent.zIndex++,g.alternativeText&&(e.title=g.alternativeText),g.noRotate&&e.classList.add("norotate"),!g.rect||this instanceof cS){const{rotation:h}=g;return!g.hasOwnCanvas&&h!==0&&this.setRotation(h,e),e}const{width:s,height:l}=this;if(!I&&g.borderStyle.width>0){A.borderWidth=`${g.borderStyle.width}px`;const h=g.borderStyle.horizontalCornerRadius,b=g.borderStyle.verticalCornerRadius;if(h>0||b>0){const m=`calc(${h}px * var(--total-scale-factor)) / calc(${b}px * var(--total-scale-factor))`;A.borderRadius=m}else if(this instanceof Zgg){const m=`calc(${s}px * var(--total-scale-factor)) / calc(${l}px * var(--total-scale-factor))`;A.borderRadius=m}switch(g.borderStyle.style){case Kr.SOLID:A.borderStyle="solid";break;case Kr.DASHED:A.borderStyle="dashed";break;case Kr.BEVELED:HI("Unimplemented border style: beveled");break;case Kr.INSET:HI("Unimplemented border style: inset");break;case Kr.UNDERLINE:A.borderBottomStyle="solid";break}const u=g.borderColor||null;u?($(this,zh,!0),A.borderColor=iI.makeHexColor(u[0]|0,u[1]|0,u[2]|0)):A.borderWidth=0}const n=iI.normalizeRect([g.rect[0],C.view[3]-g.rect[1]+C.view[1],g.rect[2],C.view[3]-g.rect[3]+C.view[1]]),{pageWidth:a,pageHeight:d,pageX:o,pageY:c}=i.rawDims;A.left=`${100*(n[0]-o)/a}%`,A.top=`${100*(n[1]-c)/d}%`;const{rotation:r}=g;return g.hasOwnCanvas||r===0?(A.width=`${100*s/a}%`,A.height=`${100*l/d}%`):this.setRotation(r,e),e}setRotation(I,g=this.container){if(!this.data.rect)return;const{pageWidth:C,pageHeight:i}=this.parent.viewport.rawDims;let{width:e,height:A}=this;I%180!==0&&([e,A]=[A,e]),g.style.width=`${100*e/C}%`,g.style.height=`${100*A/i}%`,g.setAttribute("data-main-rotation",(360-I)%360)}get _commonActions(){const I=(g,C,i)=>{const e=i.detail[g],A=e[0],s=e.slice(1);i.target.style[C]=t8[`${A}_HTML`](s),this.annotationStorage.setValue(this.data.id,{[C]:t8[`${A}_rgb`](s)})};return jI(this,"_commonActions",{display:g=>{const{display:C}=g.detail,i=C%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:C===1||C===2})},print:g=>{this.annotationStorage.setValue(this.data.id,{noPrint:!g.detail.print})},hidden:g=>{const{hidden:C}=g.detail;this.container.style.visibility=C?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:C,noView:C})},focus:g=>{setTimeout(()=>g.target.focus({preventScroll:!1}),0)},userName:g=>{g.target.title=g.detail.userName},readonly:g=>{g.target.disabled=g.detail.readonly},required:g=>{this._setRequired(g.target,g.detail.required)},bgColor:g=>{I("bgColor","backgroundColor",g)},fillColor:g=>{I("fillColor","backgroundColor",g)},fgColor:g=>{I("fgColor","color",g)},textColor:g=>{I("textColor","color",g)},borderColor:g=>{I("borderColor","borderColor",g)},strokeColor:g=>{I("strokeColor","borderColor",g)},rotation:g=>{const C=g.detail.rotation;this.setRotation(C),this.annotationStorage.setValue(this.data.id,{rotation:C})}})}_dispatchEventFromSandbox(I,g){const C=this._commonActions;for(const i of Object.keys(g.detail)){const e=I[i]||C[i];e==null||e(g)}}_setDefaultPropertiesFromJS(I){if(!this.enableScripting)return;const g=this.annotationStorage.getRawValue(this.data.id);if(!g)return;const C=this._commonActions;for(const[i,e]of Object.entries(g)){const A=C[i];if(A){const s={detail:{[i]:e},target:I};A(s),delete g[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:I}=this.data;if(!I)return;const[g,C,i,e]=this.data.rect.map(h=>Math.fround(h));if(I.length===8){const[h,b,u,m]=I.subarray(2,6);if(i===h&&e===b&&g===u&&C===m)return}const{style:A}=this.container;let s;if(M(this,zh)){const{borderColor:h,borderWidth:b}=A;A.borderWidth=0,s=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${h}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const l=i-g,n=e-C,{svgFactory:a}=this,d=a.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0);const o=a.createElement("defs");d.append(o);const c=a.createElement("clipPath"),r=`clippath_${this.data.id}`;c.setAttribute("id",r),c.setAttribute("clipPathUnits","objectBoundingBox"),o.append(c);for(let h=2,b=I.length;h<b;h+=8){const u=I[h],m=I[h+1],Z=I[h+2],p=I[h+3],Y=a.createElement("rect"),R=(Z-g)/l,X=(e-m)/n,H=(u-Z)/l,S=(m-p)/n;Y.setAttribute("x",R),Y.setAttribute("y",X),Y.setAttribute("width",H),Y.setAttribute("height",S),c.append(Y),s==null||s.push(`<rect vector-effect="non-scaling-stroke" x="${R}" y="${X}" width="${H}" height="${S}"/>`)}M(this,zh)&&(s.push("</g></svg>')"),A.backgroundImage=s.join("")),this.container.append(d),this.container.style.clipPath=`url(#${r})`}_createPopup(){const{data:I}=this,g=$(this,Jh,new cS({data:{color:I.color,titleObj:I.titleObj,modificationDate:I.modificationDate,contentsObj:I.contentsObj,richText:I.richText,parentRect:I.rect,borderStyle:0,id:`popup_${I.id}`,rotation:I.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(g.render())}render(){ZC("Abstract method `AnnotationElement.render` called")}_getElementsByName(I,g=null){const C=[];if(this._fieldObjects){const i=this._fieldObjects[I];if(i)for(const{page:e,id:A,exportValues:s}of i){if(e===-1||A===g)continue;const l=typeof s=="string"?s:null,n=document.querySelector(`[data-element-id="${A}"]`);if(n&&!id.has(n)){HI(`_getElementsByName - element not allowed: ${A}`);continue}C.push({id:A,exportValue:l,domElement:n})}return C}for(const i of document.getElementsByName(I)){const{exportValue:e}=i,A=i.getAttribute("data-element-id");A!==g&&id.has(i)&&C.push({id:A,exportValue:e,domElement:i})}return C}show(){var I;this.container&&(this.container.hidden=!1),(I=this.popup)==null||I.maybeShow()}hide(){var I;this.container&&(this.container.hidden=!0),(I=this.popup)==null||I.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const I=this.getElementsToTriggerPopup();if(Array.isArray(I))for(const g of I)g.classList.add("highlightArea");else I.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:I,data:{id:g}}=this;this.container.addEventListener("dblclick",()=>{var C;(C=this.linkService.eventBus)==null||C.dispatch("switchannotationeditormode",{source:this,mode:I,editId:g})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Yc=new WeakMap,zh=new WeakMap,Jh=new WeakMap,oZ=new WeakSet,oS=function(I){const{container:{style:g},data:{rect:C,rotation:i},parent:{viewport:{rawDims:{pageWidth:e,pageHeight:A,pageX:s,pageY:l}}}}=this;C==null||C.splice(0,4,...I),g.left=`${100*(I[0]-s)/e}%`,g.top=`${100*(A-I[3]+l)/A}%`,i===0?(g.width=`${100*(I[2]-I[0])/e}%`,g.height=`${100*(I[3]-I[1])/A}%`):this.setRotation(i)};let et=x9;var ue,Xo,ugg,mgg;class bgg extends et{constructor(g,C=null){super(g,{isRenderable:!0,ignoreBorder:!!(C!=null&&C.ignoreBorder),createQuadrilaterals:!0});ig(this,ue);this.isTooltipOnly=g.data.isTooltipOnly}render(){const{data:g,linkService:C}=this,i=document.createElement("a");i.setAttribute("data-element-id",g.id);let e=!1;return g.url?(C.addLinkAttributes(i,g.url,g.newWindow),e=!0):g.action?(this._bindNamedAction(i,g.action),e=!0):g.attachment?(eg(this,ue,ugg).call(this,i,g.attachment,g.attachmentDest),e=!0):g.setOCGState?(eg(this,ue,mgg).call(this,i,g.setOCGState),e=!0):g.dest?(this._bindLink(i,g.dest),e=!0):(g.actions&&(g.actions.Action||g.actions["Mouse Up"]||g.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,g),e=!0),g.resetForm?(this._bindResetFormAction(i,g.resetForm),e=!0):this.isTooltipOnly&&!e&&(this._bindLink(i,""),e=!0)),this.container.classList.add("linkAnnotation"),e&&this.container.append(i),this.container}_bindLink(g,C){g.href=this.linkService.getDestinationHash(C),g.onclick=()=>(C&&this.linkService.goToDestination(C),!1),(C||C==="")&&eg(this,ue,Xo).call(this)}_bindNamedAction(g,C){g.href=this.linkService.getAnchorUrl(""),g.onclick=()=>(this.linkService.executeNamedAction(C),!1),eg(this,ue,Xo).call(this)}_bindJSAction(g,C){g.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const e of Object.keys(C.actions)){const A=i.get(e);A&&(g[A]=()=>{var s;return(s=this.linkService.eventBus)==null||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C.id,name:e}}),!1})}g.onclick||(g.onclick=()=>!1),eg(this,ue,Xo).call(this)}_bindResetFormAction(g,C){const i=g.onclick;if(i||(g.href=this.linkService.getAnchorUrl("")),eg(this,ue,Xo).call(this),!this._fieldObjects){HI('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(g.onclick=()=>!1);return}g.onclick=()=>{var d;i==null||i();const{fields:e,refs:A,include:s}=C,l=[];if(e.length!==0||A.length!==0){const o=new Set(A);for(const c of e){const r=this._fieldObjects[c]||[];for(const{id:h}of r)o.add(h)}for(const c of Object.values(this._fieldObjects))for(const r of c)o.has(r.id)===s&&l.push(r)}else for(const o of Object.values(this._fieldObjects))l.push(...o);const n=this.annotationStorage,a=[];for(const o of l){const{id:c}=o;switch(a.push(c),o.type){case"text":{const h=o.defaultValue||"";n.setValue(c,{value:h});break}case"checkbox":case"radiobutton":{const h=o.defaultValue===o.exportValues;n.setValue(c,{value:h});break}case"combobox":case"listbox":{const h=o.defaultValue||"";n.setValue(c,{value:h});break}default:continue}const r=document.querySelector(`[data-element-id="${c}"]`);if(r){if(!id.has(r)){HI(`_bindResetFormAction - element not allowed: ${c}`);continue}}else continue;r.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((d=this.linkService.eventBus)==null||d.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:a,name:"ResetForm"}})),!1}}}ue=new WeakSet,Xo=function(){this.container.setAttribute("data-internal-link","")},ugg=function(g,C,i=null){g.href=this.linkService.getAnchorUrl(""),C.description&&(g.title=C.description),g.onclick=()=>{var e;return(e=this.downloadManager)==null||e.openOrDownloadData(C.content,C.filename,i),!1},eg(this,ue,Xo).call(this)},mgg=function(g,C){g.href=this.linkService.getAnchorUrl(""),g.onclick=()=>(this.linkService.executeSetOCGState(C),!1),eg(this,ue,Xo).call(this)};class Tcg extends et{constructor(I){super(I,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const I=document.createElement("img");return I.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",I.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),I.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(I),this.container}}class ld extends et{render(){return this.container}showElementAndHideCanvas(I){var g;this.data.hasOwnCanvas&&(((g=I.previousSibling)==null?void 0:g.nodeName)==="CANVAS"&&(I.previousSibling.hidden=!0),I.hidden=!1)}_getKeyModifier(I){return gi.platform.isMac?I.metaKey:I.ctrlKey}_setEventListener(I,g,C,i,e){C.includes("mouse")?I.addEventListener(C,A=>{var s;(s=this.linkService.eventBus)==null||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:e(A),shift:A.shiftKey,modifier:this._getKeyModifier(A)}})}):I.addEventListener(C,A=>{var s;if(C==="blur"){if(!g.focused||!A.relatedTarget)return;g.focused=!1}else if(C==="focus"){if(g.focused)return;g.focused=!0}e&&((s=this.linkService.eventBus)==null||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:e(A)}}))})}_setEventListeners(I,g,C,i){var e,A,s;for(const[l,n]of C)(n==="Action"||(e=this.data.actions)!=null&&e[n])&&((n==="Focus"||n==="Blur")&&(g||(g={focused:!1})),this._setEventListener(I,g,l,n,i),n==="Focus"&&!((A=this.data.actions)!=null&&A.Blur)?this._setEventListener(I,g,"blur","Blur",null):n==="Blur"&&!((s=this.data.actions)!=null&&s.Focus)&&this._setEventListener(I,g,"focus","Focus",null))}_setBackgroundColor(I){const g=this.data.backgroundColor||null;I.style.backgroundColor=g===null?"transparent":iI.makeHexColor(g[0],g[1],g[2])}_setTextStyle(I){const g=["left","center","right"],{fontColor:C}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||vcg,e=I.style;let A;const s=2,l=n=>Math.round(10*n)/10;if(this.data.multiLine){const n=Math.abs(this.data.rect[3]-this.data.rect[1]-s),a=Math.round(n/(YH*i))||1,d=n/a;A=Math.min(i,l(d/YH))}else{const n=Math.abs(this.data.rect[3]-this.data.rect[1]-s);A=Math.min(i,l(n/YH))}e.fontSize=`calc(${A}px * var(--total-scale-factor))`,e.color=iI.makeHexColor(C[0],C[1],C[2]),this.data.textAlignment!==null&&(e.textAlign=g[this.data.textAlignment])}_setRequired(I,g){g?I.setAttribute("required",!0):I.removeAttribute("required"),I.setAttribute("aria-required",g)}}class xcg extends ld{constructor(I){const g=I.renderForms||I.data.hasOwnCanvas||!I.data.hasAppearance&&!!I.data.fieldValue;super(I,{isRenderable:g})}setPropertyOnSiblings(I,g,C,i){const e=this.annotationStorage;for(const A of this._getElementsByName(I.name,I.id))A.domElement&&(A.domElement[g]=C),e.setValue(A.id,{[i]:C})}render(){var i,e;const I=this.annotationStorage,g=this.data.id;this.container.classList.add("textWidgetAnnotation");let C=null;if(this.renderForms){const A=I.getValue(g,{value:this.data.fieldValue});let s=A.value||"";const l=I.getValue(g,{charLimit:this.data.maxLen}).charLimit;l&&s.length>l&&(s=s.slice(0,l));let n=A.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
`))||null;n&&this.data.comb&&(n=n.replaceAll(/\s+/g,""));const a={userValue:s,formattedValue:n,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(C=document.createElement("textarea"),C.textContent=n??s,this.data.doNotScroll&&(C.style.overflowY="hidden")):(C=document.createElement("input"),C.type=this.data.password?"password":"text",C.setAttribute("value",n??s),this.data.doNotScroll&&(C.style.overflowX="hidden")),this.data.hasOwnCanvas&&(C.hidden=!0),id.add(C),C.setAttribute("data-element-id",g),C.disabled=this.data.readOnly,C.name=this.data.fieldName,C.tabIndex=_Z,this._setRequired(C,this.data.required),l&&(C.maxLength=l),C.addEventListener("input",o=>{I.setValue(g,{value:o.target.value}),this.setPropertyOnSiblings(C,"value",o.target.value,"value"),a.formattedValue=null}),C.addEventListener("resetform",o=>{const c=this.data.defaultFieldValue??"";C.value=a.userValue=c,a.formattedValue=null});let d=o=>{const{formattedValue:c}=a;c!=null&&(o.target.value=c),o.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){C.addEventListener("focus",c=>{var h;if(a.focused)return;const{target:r}=c;a.userValue&&(r.value=a.userValue),a.lastCommittedValue=r.value,a.commitKey=1,(h=this.data.actions)!=null&&h.Focus||(a.focused=!0)}),C.addEventListener("updatefromsandbox",c=>{this.showElementAndHideCanvas(c.target);const r={value(h){a.userValue=h.detail.value??"",I.setValue(g,{value:a.userValue.toString()}),h.target.value=a.userValue},formattedValue(h){const{formattedValue:b}=h.detail;a.formattedValue=b,b!=null&&h.target!==document.activeElement&&(h.target.value=b),I.setValue(g,{formattedValue:b})},selRange(h){h.target.setSelectionRange(...h.detail.selRange)},charLimit:h=>{var Z;const{charLimit:b}=h.detail,{target:u}=h;if(b===0){u.removeAttribute("maxLength");return}u.setAttribute("maxLength",b);let m=a.userValue;!m||m.length<=b||(m=m.slice(0,b),u.value=a.userValue=m,I.setValue(g,{value:m}),(Z=this.linkService.eventBus)==null||Z.dispatch("dispatcheventinsandbox",{source:this,detail:{id:g,name:"Keystroke",value:m,willCommit:!0,commitKey:1,selStart:u.selectionStart,selEnd:u.selectionEnd}}))}};this._dispatchEventFromSandbox(r,c)}),C.addEventListener("keydown",c=>{var b;a.commitKey=1;let r=-1;if(c.key==="Escape"?r=0:c.key==="Enter"&&!this.data.multiLine?r=2:c.key==="Tab"&&(a.commitKey=3),r===-1)return;const{value:h}=c.target;a.lastCommittedValue!==h&&(a.lastCommittedValue=h,a.userValue=h,(b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:g,name:"Keystroke",value:h,willCommit:!0,commitKey:r,selStart:c.target.selectionStart,selEnd:c.target.selectionEnd}}))});const o=d;d=null,C.addEventListener("blur",c=>{var h,b;if(!a.focused||!c.relatedTarget)return;(h=this.data.actions)!=null&&h.Blur||(a.focused=!1);const{value:r}=c.target;a.userValue=r,a.lastCommittedValue!==r&&((b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:g,name:"Keystroke",value:r,willCommit:!0,commitKey:a.commitKey,selStart:c.target.selectionStart,selEnd:c.target.selectionEnd}})),o(c)}),(e=this.data.actions)!=null&&e.Keystroke&&C.addEventListener("beforeinput",c=>{var Y;a.lastCommittedValue=null;const{data:r,target:h}=c,{value:b,selectionStart:u,selectionEnd:m}=h;let Z=u,p=m;switch(c.inputType){case"deleteWordBackward":{const R=b.substring(0,u).match(/\w*[^\w]*$/);R&&(Z-=R[0].length);break}case"deleteWordForward":{const R=b.substring(u).match(/^[^\w]*\w*/);R&&(p+=R[0].length);break}case"deleteContentBackward":u===m&&(Z-=1);break;case"deleteContentForward":u===m&&(p+=1);break}c.preventDefault(),(Y=this.linkService.eventBus)==null||Y.dispatch("dispatcheventinsandbox",{source:this,detail:{id:g,name:"Keystroke",value:b,change:r||"",willCommit:!1,selStart:Z,selEnd:p}})}),this._setEventListeners(C,a,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],c=>c.target.value)}if(d&&C.addEventListener("blur",d),this.data.comb){const c=(this.data.rect[2]-this.data.rect[0])/l;C.classList.add("comb"),C.style.letterSpacing=`calc(${c}px * var(--total-scale-factor) - 1ch)`}}else C=document.createElement("div"),C.textContent=this.data.fieldValue,C.style.verticalAlign="middle",C.style.display="table-cell",this.data.hasOwnCanvas&&(C.hidden=!0);return this._setTextStyle(C),this._setBackgroundColor(C),this._setDefaultPropertiesFromJS(C),this.container.append(C),this.container}}class jcg extends ld{constructor(I){super(I,{isRenderable:!!I.data.hasOwnCanvas})}}class Qcg extends ld{constructor(I){super(I,{isRenderable:I.renderForms})}render(){const I=this.annotationStorage,g=this.data,C=g.id;let i=I.getValue(C,{value:g.exportValue===g.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",I.setValue(C,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const e=document.createElement("input");return id.add(e),e.setAttribute("data-element-id",C),e.disabled=g.readOnly,this._setRequired(e,this.data.required),e.type="checkbox",e.name=g.fieldName,i&&e.setAttribute("checked",!0),e.setAttribute("exportValue",g.exportValue),e.tabIndex=_Z,e.addEventListener("change",A=>{const{name:s,checked:l}=A.target;for(const n of this._getElementsByName(s,C)){const a=l&&n.exportValue===g.exportValue;n.domElement&&(n.domElement.checked=a),I.setValue(n.id,{value:a})}I.setValue(C,{value:l})}),e.addEventListener("resetform",A=>{const s=g.defaultFieldValue||"Off";A.target.checked=s===g.exportValue}),this.enableScripting&&this.hasJSActions&&(e.addEventListener("updatefromsandbox",A=>{const s={value(l){l.target.checked=l.detail.value!=="Off",I.setValue(C,{value:l.target.checked})}};this._dispatchEventFromSandbox(s,A)}),this._setEventListeners(e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],A=>A.target.checked)),this._setBackgroundColor(e),this._setDefaultPropertiesFromJS(e),this.container.append(e),this.container}}class Zgg extends ld{constructor(I){super(I,{isRenderable:I.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const I=this.annotationStorage,g=this.data,C=g.id;let i=I.getValue(C,{value:g.fieldValue===g.buttonValue}).value;if(typeof i=="string"&&(i=i!==g.buttonValue,I.setValue(C,{value:i})),i)for(const A of this._getElementsByName(g.fieldName,C))I.setValue(A.id,{value:!1});const e=document.createElement("input");if(id.add(e),e.setAttribute("data-element-id",C),e.disabled=g.readOnly,this._setRequired(e,this.data.required),e.type="radio",e.name=g.fieldName,i&&e.setAttribute("checked",!0),e.tabIndex=_Z,e.addEventListener("change",A=>{const{name:s,checked:l}=A.target;for(const n of this._getElementsByName(s,C))I.setValue(n.id,{value:!1});I.setValue(C,{value:l})}),e.addEventListener("resetform",A=>{const s=g.defaultFieldValue;A.target.checked=s!=null&&s===g.buttonValue}),this.enableScripting&&this.hasJSActions){const A=g.buttonValue;e.addEventListener("updatefromsandbox",s=>{const l={value:n=>{const a=A===n.detail.value;for(const d of this._getElementsByName(n.target.name)){const o=a&&d.id===C;d.domElement&&(d.domElement.checked=o),I.setValue(d.id,{value:o})}}};this._dispatchEventFromSandbox(l,s)}),this._setEventListeners(e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],s=>s.target.checked)}return this._setBackgroundColor(e),this._setDefaultPropertiesFromJS(e),this.container.append(e),this.container}}class Ocg extends bgg{constructor(I){super(I,{ignoreBorder:I.data.hasAppearance})}render(){const I=super.render();I.classList.add("buttonWidgetAnnotation","pushButton");const g=I.lastChild;return this.enableScripting&&this.hasJSActions&&g&&(this._setDefaultPropertiesFromJS(g),g.addEventListener("updatefromsandbox",C=>{this._dispatchEventFromSandbox({},C)})),I}}class Ucg extends ld{constructor(I){super(I,{isRenderable:I.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const I=this.annotationStorage,g=this.data.id,C=I.getValue(g,{value:this.data.fieldValue}),i=document.createElement("select");id.add(i),i.setAttribute("data-element-id",g),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=_Z;let e=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",a=>{const d=this.data.defaultFieldValue;for(const o of i.options)o.selected=o.value===d});for(const a of this.data.options){const d=document.createElement("option");d.textContent=a.displayValue,d.value=a.exportValue,C.value.includes(a.exportValue)&&(d.setAttribute("selected",!0),e=!1),i.append(d)}let A=null;if(e){const a=document.createElement("option");a.value=" ",a.setAttribute("hidden",!0),a.setAttribute("selected",!0),i.prepend(a),A=()=>{a.remove(),i.removeEventListener("input",A),A=null},i.addEventListener("input",A)}const s=a=>{const d=a?"value":"textContent",{options:o,multiple:c}=i;return c?Array.prototype.filter.call(o,r=>r.selected).map(r=>r[d]):o.selectedIndex===-1?null:o[o.selectedIndex][d]};let l=s(!1);const n=a=>{const d=a.target.options;return Array.prototype.map.call(d,o=>({displayValue:o.textContent,exportValue:o.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",a=>{const d={value(o){A==null||A();const c=o.detail.value,r=new Set(Array.isArray(c)?c:[c]);for(const h of i.options)h.selected=r.has(h.value);I.setValue(g,{value:s(!0)}),l=s(!1)},multipleSelection(o){i.multiple=!0},remove(o){const c=i.options,r=o.detail.remove;c[r].selected=!1,i.remove(r),c.length>0&&Array.prototype.findIndex.call(c,b=>b.selected)===-1&&(c[0].selected=!0),I.setValue(g,{value:s(!0),items:n(o)}),l=s(!1)},clear(o){for(;i.length!==0;)i.remove(0);I.setValue(g,{value:null,items:[]}),l=s(!1)},insert(o){const{index:c,displayValue:r,exportValue:h}=o.detail.insert,b=i.children[c],u=document.createElement("option");u.textContent=r,u.value=h,b?b.before(u):i.append(u),I.setValue(g,{value:s(!0),items:n(o)}),l=s(!1)},items(o){const{items:c}=o.detail;for(;i.length!==0;)i.remove(0);for(const r of c){const{displayValue:h,exportValue:b}=r,u=document.createElement("option");u.textContent=h,u.value=b,i.append(u)}i.options.length>0&&(i.options[0].selected=!0),I.setValue(g,{value:s(!0),items:n(o)}),l=s(!1)},indices(o){const c=new Set(o.detail.indices);for(const r of o.target.options)r.selected=c.has(r.index);I.setValue(g,{value:s(!0)}),l=s(!1)},editable(o){o.target.disabled=!o.detail.editable}};this._dispatchEventFromSandbox(d,a)}),i.addEventListener("input",a=>{var c;const d=s(!0),o=s(!1);I.setValue(g,{value:d}),a.preventDefault(),(c=this.linkService.eventBus)==null||c.dispatch("dispatcheventinsandbox",{source:this,detail:{id:g,name:"Keystroke",value:l,change:o,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],a=>a.target.value)):i.addEventListener("input",function(a){I.setValue(g,{value:s(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class cS extends et{constructor(I){const{data:g,elements:C}=I;super(I,{isRenderable:et._hasPopupData(g)}),this.elements=C,this.popup=null}render(){this.container.classList.add("popupAnnotation");const I=this.popup=new Ecg({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),g=[];for(const C of this.elements)C.popup=I,C.container.ariaHasPopup="dialog",g.push(C.data.id),C.addHighlightArea();return this.container.setAttribute("aria-controls",g.map(C=>`${_D}${C}`).join(",")),this.container}}var Lh,VV,MV,vh,Th,EC,Wl,xh,cZ,dZ,jh,yl,bA,Yl,rZ,Nl,hZ,Nc,Vc,GC,nN,dS,Ggg,wgg,pgg,Bgg,aN,oN,rS;class Ecg{constructor({container:I,color:g,elements:C,titleObj:i,modificationDate:e,contentsObj:A,richText:s,parent:l,rect:n,parentRect:a,open:d}){ig(this,GC);ig(this,Lh,eg(this,GC,pgg).bind(this));ig(this,VV,eg(this,GC,rS).bind(this));ig(this,MV,eg(this,GC,oN).bind(this));ig(this,vh,eg(this,GC,aN).bind(this));ig(this,Th,null);ig(this,EC,null);ig(this,Wl,null);ig(this,xh,null);ig(this,cZ,null);ig(this,dZ,null);ig(this,jh,null);ig(this,yl,!1);ig(this,bA,null);ig(this,Yl,null);ig(this,rZ,null);ig(this,Nl,null);ig(this,hZ,null);ig(this,Nc,null);ig(this,Vc,!1);var o;$(this,EC,I),$(this,hZ,i),$(this,Wl,A),$(this,Nl,s),$(this,dZ,l),$(this,Th,g),$(this,rZ,n),$(this,jh,a),$(this,cZ,C),$(this,xh,g9.toDateObject(e)),this.trigger=C.flatMap(c=>c.getElementsToTriggerPopup());for(const c of this.trigger)c.addEventListener("click",M(this,vh)),c.addEventListener("mouseenter",M(this,MV)),c.addEventListener("mouseleave",M(this,VV)),c.classList.add("popupTriggerArea");for(const c of C)(o=c.container)==null||o.addEventListener("keydown",M(this,Lh));M(this,EC).hidden=!0,d&&eg(this,GC,aN).call(this)}render(){if(M(this,bA))return;const I=$(this,bA,document.createElement("div"));if(I.className="popup",M(this,Th)){const e=I.style.outlineColor=iI.makeHexColor(...M(this,Th));I.style.backgroundColor=`color-mix(in srgb, ${e} 30%, white)`}const g=document.createElement("span");g.className="header";const C=document.createElement("h1");if(g.append(C),{dir:C.dir,str:C.textContent}=M(this,hZ),I.append(g),M(this,xh)){const e=document.createElement("span");e.classList.add("popupDate"),e.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),e.setAttribute("data-l10n-args",JSON.stringify({dateObj:M(this,xh).valueOf()})),g.append(e)}const i=M(this,GC,nN);if(i)hgg.render({xfaHtml:i,intent:"richText",div:I}),I.lastChild.classList.add("richText","popupContent");else{const e=this._formatContents(M(this,Wl));I.append(e)}M(this,EC).append(I)}_formatContents({str:I,dir:g}){const C=document.createElement("p");C.classList.add("popupContent"),C.dir=g;const i=I.split(/(?:\r\n?|\n)/);for(let e=0,A=i.length;e<A;++e){const s=i[e];C.append(document.createTextNode(s)),e<A-1&&C.append(document.createElement("br"))}return C}updateEdited({rect:I,popupContent:g}){var C;M(this,Nc)||$(this,Nc,{contentsObj:M(this,Wl),richText:M(this,Nl)}),I&&$(this,Yl,null),g&&($(this,Nl,eg(this,GC,wgg).call(this,g)),$(this,Wl,null)),(C=M(this,bA))==null||C.remove(),$(this,bA,null)}resetEdited(){var I;M(this,Nc)&&({contentsObj:ui(this,Wl)._,richText:ui(this,Nl)._}=M(this,Nc),$(this,Nc,null),(I=M(this,bA))==null||I.remove(),$(this,bA,null),$(this,Yl,null))}forceHide(){$(this,Vc,this.isVisible),M(this,Vc)&&(M(this,EC).hidden=!0)}maybeShow(){M(this,Vc)&&(M(this,bA)||eg(this,GC,oN).call(this),$(this,Vc,!1),M(this,EC).hidden=!1)}get isVisible(){return M(this,EC).hidden===!1}}Lh=new WeakMap,VV=new WeakMap,MV=new WeakMap,vh=new WeakMap,Th=new WeakMap,EC=new WeakMap,Wl=new WeakMap,xh=new WeakMap,cZ=new WeakMap,dZ=new WeakMap,jh=new WeakMap,yl=new WeakMap,bA=new WeakMap,Yl=new WeakMap,rZ=new WeakMap,Nl=new WeakMap,hZ=new WeakMap,Nc=new WeakMap,Vc=new WeakMap,GC=new WeakSet,nN=function(){const I=M(this,Nl),g=M(this,Wl);return I!=null&&I.str&&(!(g!=null&&g.str)||g.str===I.str)&&M(this,Nl).html||null},dS=function(){var I,g,C;return((C=(g=(I=M(this,GC,nN))==null?void 0:I.attributes)==null?void 0:g.style)==null?void 0:C.fontSize)||0},Ggg=function(){var I,g,C;return((C=(g=(I=M(this,GC,nN))==null?void 0:I.attributes)==null?void 0:g.style)==null?void 0:C.color)||null},wgg=function(I){const g=[],C={str:I,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:g}]}},i={style:{color:M(this,GC,Ggg),fontSize:M(this,GC,dS)?`calc(${M(this,GC,dS)}px * var(--total-scale-factor))`:""}};for(const e of I.split(`
`))g.push({name:"span",value:e,attributes:i});return C},pgg=function(I){I.altKey||I.shiftKey||I.ctrlKey||I.metaKey||(I.key==="Enter"||I.key==="Escape"&&M(this,yl))&&eg(this,GC,aN).call(this)},Bgg=function(){if(M(this,Yl)!==null)return;const{page:{view:I},viewport:{rawDims:{pageWidth:g,pageHeight:C,pageX:i,pageY:e}}}=M(this,dZ);let A=!!M(this,jh),s=A?M(this,jh):M(this,rZ);for(const r of M(this,cZ))if(!s||iI.intersect(r.data.rect,s)!==null){s=r.data.rect,A=!0;break}const l=iI.normalizeRect([s[0],I[3]-s[1]+I[1],s[2],I[3]-s[3]+I[1]]),a=A?s[2]-s[0]+5:0,d=l[0]+a,o=l[1];$(this,Yl,[100*(d-i)/g,100*(o-e)/C]);const{style:c}=M(this,EC);c.left=`${M(this,Yl)[0]}%`,c.top=`${M(this,Yl)[1]}%`},aN=function(){$(this,yl,!M(this,yl)),M(this,yl)?(eg(this,GC,oN).call(this),M(this,EC).addEventListener("click",M(this,vh)),M(this,EC).addEventListener("keydown",M(this,Lh))):(eg(this,GC,rS).call(this),M(this,EC).removeEventListener("click",M(this,vh)),M(this,EC).removeEventListener("keydown",M(this,Lh)))},oN=function(){M(this,bA)||this.render(),this.isVisible?M(this,yl)&&M(this,EC).classList.add("focused"):(eg(this,GC,Bgg).call(this),M(this,EC).hidden=!1,M(this,EC).style.zIndex=parseInt(M(this,EC).style.zIndex)+1e3)},rS=function(){M(this,EC).classList.remove("focused"),!(M(this,yl)||!this.isVisible)&&(M(this,EC).hidden=!0,M(this,EC).style.zIndex=parseInt(M(this,EC).style.zIndex)-1e3)};class Wgg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0}),this.textContent=I.data.textContent,this.textPosition=I.data.textPosition,this.annotationEditorType=RI.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const I=document.createElement("div");I.classList.add("annotationTextContent"),I.setAttribute("role","comment");for(const g of this.textContent){const C=document.createElement("span");C.textContent=g,I.append(C)}this.container.append(I)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var bZ;class Pcg extends et{constructor(g){super(g,{isRenderable:!0,ignoreBorder:!0});ig(this,bZ,null)}render(){this.container.classList.add("lineAnnotation");const{data:g,width:C,height:i}=this,e=this.svgFactory.create(C,i,!0),A=$(this,bZ,this.svgFactory.createElement("svg:line"));return A.setAttribute("x1",g.rect[2]-g.lineCoordinates[0]),A.setAttribute("y1",g.rect[3]-g.lineCoordinates[1]),A.setAttribute("x2",g.rect[2]-g.lineCoordinates[2]),A.setAttribute("y2",g.rect[3]-g.lineCoordinates[3]),A.setAttribute("stroke-width",g.borderStyle.width||1),A.setAttribute("stroke","transparent"),A.setAttribute("fill","transparent"),e.append(A),this.container.append(e),!g.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return M(this,bZ)}addHighlightArea(){this.container.classList.add("highlightArea")}}bZ=new WeakMap;var uZ;class _cg extends et{constructor(g){super(g,{isRenderable:!0,ignoreBorder:!0});ig(this,uZ,null)}render(){this.container.classList.add("squareAnnotation");const{data:g,width:C,height:i}=this,e=this.svgFactory.create(C,i,!0),A=g.borderStyle.width,s=$(this,uZ,this.svgFactory.createElement("svg:rect"));return s.setAttribute("x",A/2),s.setAttribute("y",A/2),s.setAttribute("width",C-A),s.setAttribute("height",i-A),s.setAttribute("stroke-width",A||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),e.append(s),this.container.append(e),!g.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return M(this,uZ)}addHighlightArea(){this.container.classList.add("highlightArea")}}uZ=new WeakMap;var mZ;class qcg extends et{constructor(g){super(g,{isRenderable:!0,ignoreBorder:!0});ig(this,mZ,null)}render(){this.container.classList.add("circleAnnotation");const{data:g,width:C,height:i}=this,e=this.svgFactory.create(C,i,!0),A=g.borderStyle.width,s=$(this,mZ,this.svgFactory.createElement("svg:ellipse"));return s.setAttribute("cx",C/2),s.setAttribute("cy",i/2),s.setAttribute("rx",C/2-A/2),s.setAttribute("ry",i/2-A/2),s.setAttribute("stroke-width",A||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),e.append(s),this.container.append(e),!g.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return M(this,mZ)}addHighlightArea(){this.container.classList.add("highlightArea")}}mZ=new WeakMap;var ZZ;class ygg extends et{constructor(g){super(g,{isRenderable:!0,ignoreBorder:!0});ig(this,ZZ,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:g,vertices:C,borderStyle:i,popupRef:e},width:A,height:s}=this;if(!C)return this.container;const l=this.svgFactory.create(A,s,!0);let n=[];for(let d=0,o=C.length;d<o;d+=2){const c=C[d]-g[0],r=g[3]-C[d+1];n.push(`${c},${r}`)}n=n.join(" ");const a=$(this,ZZ,this.svgFactory.createElement(this.svgElementName));return a.setAttribute("points",n),a.setAttribute("stroke-width",i.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),l.append(a),this.container.append(l),!e&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return M(this,ZZ)}addHighlightArea(){this.container.classList.add("highlightArea")}}ZZ=new WeakMap;class $cg extends ygg{constructor(I){super(I),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class gdg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}var GZ,Mc,wZ,hS;class A9 extends et{constructor(g){super(g,{isRenderable:!0,ignoreBorder:!0});ig(this,wZ);ig(this,GZ,null);ig(this,Mc,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?RI.HIGHLIGHT:RI.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:g,rotation:C,inkLists:i,borderStyle:e,popupRef:A}}=this,{transform:s,width:l,height:n}=eg(this,wZ,hS).call(this,C,g),a=this.svgFactory.create(l,n,!0),d=$(this,GZ,this.svgFactory.createElement("svg:g"));a.append(d),d.setAttribute("stroke-width",e.width||1),d.setAttribute("stroke-linecap","round"),d.setAttribute("stroke-linejoin","round"),d.setAttribute("stroke-miterlimit",10),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),d.setAttribute("transform",s);for(let o=0,c=i.length;o<c;o++){const r=this.svgFactory.createElement(this.svgElementName);M(this,Mc).push(r),r.setAttribute("points",i[o].join(",")),d.append(r)}return!A&&this.hasPopupData&&this._createPopup(),this.container.append(a),this._editOnDoubleClick(),this.container}updateEdited(g){super.updateEdited(g);const{thickness:C,points:i,rect:e}=g,A=M(this,GZ);if(C>=0&&A.setAttribute("stroke-width",C||1),i)for(let s=0,l=M(this,Mc).length;s<l;s++)M(this,Mc)[s].setAttribute("points",i[s].join(","));if(e){const{transform:s,width:l,height:n}=eg(this,wZ,hS).call(this,this.data.rotation,e);A.parentElement.setAttribute("viewBox",`0 0 ${l} ${n}`),A.setAttribute("transform",s)}}getElementsToTriggerPopup(){return M(this,Mc)}addHighlightArea(){this.container.classList.add("highlightArea")}}GZ=new WeakMap,Mc=new WeakMap,wZ=new WeakSet,hS=function(g,C){switch(g){case 90:return{transform:`rotate(90) translate(${-C[0]},${C[1]}) scale(1,-1)`,width:C[3]-C[1],height:C[2]-C[0]};case 180:return{transform:`rotate(180) translate(${-C[2]},${C[1]}) scale(1,-1)`,width:C[2]-C[0],height:C[3]-C[1]};case 270:return{transform:`rotate(270) translate(${-C[2]},${C[3]}) scale(1,-1)`,width:C[3]-C[1],height:C[2]-C[0]};default:return{transform:`translate(${-C[0]},${C[3]}) scale(1,-1)`,width:C[2]-C[0],height:C[3]-C[1]}}};class Ygg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=RI.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class Idg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class Cdg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class tdg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class Ngg extends et{constructor(I){super(I,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=RI.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var pZ,BZ,bS;class idg extends et{constructor(g){var i;super(g,{isRenderable:!0});ig(this,BZ);ig(this,pZ,null);const{file:C}=this.data;this.filename=C.filename,this.content=C.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...C})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:g,data:C}=this;let i;C.hasAppearance||C.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(C.name)?"paperclip":"pushpin"}.svg`,C.fillAlpha&&C.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(C.fillAlpha*100)}%);`)),i.addEventListener("dblclick",eg(this,BZ,bS).bind(this)),$(this,pZ,i);const{isMac:e}=gi.platform;return g.addEventListener("keydown",A=>{A.key==="Enter"&&(e?A.metaKey:A.ctrlKey)&&eg(this,BZ,bS).call(this)}),!C.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),g.append(i),g}getElementsToTriggerPopup(){return M(this,pZ)}addHighlightArea(){this.container.classList.add("highlightArea")}}pZ=new WeakMap,BZ=new WeakSet,bS=function(){var g;(g=this.downloadManager)==null||g.openOrDownloadData(this.content,this.filename)};var WZ,Rc,wa,yZ,xa,mS,ZS;const j9=class j9{constructor({div:I,accessibilityManager:g,annotationCanvasMap:C,annotationEditorUIManager:i,page:e,viewport:A,structTreeLayer:s}){ig(this,xa);ig(this,WZ,null);ig(this,Rc,null);ig(this,wa,new Map);ig(this,yZ,null);this.div=I,$(this,WZ,g),$(this,Rc,C),$(this,yZ,s||null),this.page=e,this.viewport=A,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return M(this,wa).size>0}async render(I){var A;const{annotations:g}=I,C=this.div;Cd(C,this.viewport);const i=new Map,e={data:null,layer:C,linkService:I.linkService,downloadManager:I.downloadManager,imageResourcesPath:I.imageResourcesPath||"",renderForms:I.renderForms!==!1,svgFactory:new xN,annotationStorage:I.annotationStorage||new t9,enableScripting:I.enableScripting===!0,hasJSActions:I.hasJSActions,fieldObjects:I.fieldObjects,parent:this,elements:null};for(const s of g){if(s.noHTML)continue;const l=s.annotationType===lt.POPUP;if(l){const d=i.get(s.id);if(!d)continue;e.elements=d}else if(s.rect[2]===s.rect[0]||s.rect[3]===s.rect[1])continue;e.data=s;const n=i8.create(e);if(!n.isRenderable)continue;if(!l&&s.popupRef){const d=i.get(s.popupRef);d?d.push(n):i.set(s.popupRef,[n])}const a=n.render();s.hidden&&(a.style.visibility="hidden"),await eg(this,xa,mS).call(this,a,s.id),n._isEditable&&(M(this,wa).set(n.data.id,n),(A=this._annotationEditorUIManager)==null||A.renderAnnotationElement(n))}eg(this,xa,ZS).call(this)}async addLinkAnnotations(I,g){const C={data:null,layer:this.div,linkService:g,svgFactory:new xN,parent:this};for(const i of I){i.borderStyle||(i.borderStyle=j9._defaultBorderStyle),C.data=i;const e=i8.create(C);if(!e.isRenderable)continue;const A=e.render();await eg(this,xa,mS).call(this,A,i.id)}}update({viewport:I}){const g=this.div;this.viewport=I,Cd(g,{rotation:I.rotation}),eg(this,xa,ZS).call(this),g.hidden=!1}getEditableAnnotations(){return Array.from(M(this,wa).values())}getEditableAnnotation(I){return M(this,wa).get(I)}static get _defaultBorderStyle(){return jI(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:Kr.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};WZ=new WeakMap,Rc=new WeakMap,wa=new WeakMap,yZ=new WeakMap,xa=new WeakSet,mS=async function(I,g){var A,s;const C=I.firstChild||I,i=C.id=`${_D}${g}`,e=await((A=M(this,yZ))==null?void 0:A.getAriaAttributes(i));if(e)for(const[l,n]of e)C.setAttribute(l,n);this.div.append(I),(s=M(this,WZ))==null||s.moveElementInDOM(this.div,I,C,!1)},ZS=function(){var g;if(!M(this,Rc))return;const I=this.div;for(const[C,i]of M(this,Rc)){const e=I.querySelector(`[data-annotation-id="${C}"]`);if(!e)continue;i.className="annotationContent";const{firstChild:A}=e;A?A.nodeName==="CANVAS"?A.replaceWith(i):A.classList.contains("annotationContent")?A.after(i):A.before(i):e.append(i);const s=M(this,wa).get(C);s&&(s._hasNoCanvas?((g=this._annotationEditorUIManager)==null||g.setMissingCanvas(C,e.id,i),s._hasNoCanvas=!1):s.canvas=i)}M(this,Rc).clear()};let uS=j9;const NY=/\r\n?|\n/g;var uA,se,YZ,fc,le,dt,Vgg,Mgg,Rgg,cN,xl,dN,rN,fgg,wS,Hgg;const BC=class BC extends zC{constructor(g){super({...g,name:"freeTextEditor"});ig(this,dt);ig(this,uA);ig(this,se,"");ig(this,YZ,`${this.id}-editor`);ig(this,fc,null);ig(this,le);$(this,uA,g.color||BC._defaultColor||zC._defaultLineColor),$(this,le,g.fontSize||BC._defaultFontSize)}static get _keyboardManager(){const g=BC.prototype,C=A=>A.isEmpty(),i=td.TRANSLATE_SMALL,e=td.TRANSLATE_BIG;return jI(this,"_keyboardManager",new EZ([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],g.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],g.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],g._translateEmpty,{args:[-i,0],checker:C}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],g._translateEmpty,{args:[-e,0],checker:C}],[["ArrowRight","mac+ArrowRight"],g._translateEmpty,{args:[i,0],checker:C}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],g._translateEmpty,{args:[e,0],checker:C}],[["ArrowUp","mac+ArrowUp"],g._translateEmpty,{args:[0,-i],checker:C}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],g._translateEmpty,{args:[0,-e],checker:C}],[["ArrowDown","mac+ArrowDown"],g._translateEmpty,{args:[0,i],checker:C}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],g._translateEmpty,{args:[0,e],checker:C}]]))}static initialize(g,C){zC.initialize(g,C);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(g,C){switch(g){case gC.FREETEXT_SIZE:BC._defaultFontSize=C;break;case gC.FREETEXT_COLOR:BC._defaultColor=C;break}}updateParams(g,C){switch(g){case gC.FREETEXT_SIZE:eg(this,dt,Vgg).call(this,C);break;case gC.FREETEXT_COLOR:eg(this,dt,Mgg).call(this,C);break}}static get defaultPropertiesToUpdate(){return[[gC.FREETEXT_SIZE,BC._defaultFontSize],[gC.FREETEXT_COLOR,BC._defaultColor||zC._defaultLineColor]]}get propertiesToUpdate(){return[[gC.FREETEXT_SIZE,M(this,le)],[gC.FREETEXT_COLOR,M(this,uA)]]}_translateEmpty(g,C){this._uiManager.translateSelectedEditors(g,C,!0)}getInitialTranslation(){const g=this.parentScale;return[-BC._internalPadding*g,-(BC._internalPadding+M(this,le))*g]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(RI.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),$(this,fc,new AbortController);const g=this._uiManager.combinedSignal(M(this,fc));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:g}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:g}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:g}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:g}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:g})}disableEditMode(){var g;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",M(this,YZ)),this._isDraggable=!0,(g=M(this,fc))==null||g.abort(),$(this,fc,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(g){this._focusEventsAllowed&&(super.focusin(g),g.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(g){var C;this.width||(this.enableEditMode(),g&&this.editorDiv.focus(),(C=this._initialOptions)!=null&&C.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const g=M(this,se),C=$(this,se,eg(this,dt,Rgg).call(this).trimEnd());if(g===C)return;const i=e=>{if($(this,se,e),!e){this.remove();return}eg(this,dt,rN).call(this),this._uiManager.rebuild(this),eg(this,dt,cN).call(this)};this.addCommands({cmd:()=>{i(C)},undo:()=>{i(g)},mustExec:!1}),eg(this,dt,cN).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(g){this.enterInEditMode()}keydown(g){g.target===this.div&&g.key==="Enter"&&(this.enterInEditMode(),g.preventDefault())}editorDivKeydown(g){BC._keyboardManager.exec(this,g)}editorDivFocus(g){this.isEditing=!0}editorDivBlur(g){this.isEditing=!1}editorDivInput(g){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let g,C;(this._isCopy||this.annotationElementId)&&(g=this.x,C=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",M(this,YZ)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${M(this,le)}px * var(--total-scale-factor))`,i.color=M(this,uA),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),C9(this,this.div,["dblclick","keydown"]),this._isCopy||this.annotationElementId){const[e,A]=this.parentDimensions;if(this.annotationElementId){const{position:s}=this._initialData;let[l,n]=this.getInitialTranslation();[l,n]=this.pageTranslationToScreen(l,n);const[a,d]=this.pageDimensions,[o,c]=this.pageTranslation;let r,h;switch(this.rotation){case 0:r=g+(s[0]-o)/a,h=C+this.height-(s[1]-c)/d;break;case 90:r=g+(s[0]-o)/a,h=C-(s[1]-c)/d,[l,n]=[n,-l];break;case 180:r=g-this.width+(s[0]-o)/a,h=C-(s[1]-c)/d,[l,n]=[-l,-n];break;case 270:r=g+(s[0]-o-this.height*d)/a,h=C+(s[1]-c-this.width*a)/d,[l,n]=[-n,l];break}this.setAt(r*e,h*A,l,n)}else this._moveAfterPaste(g,C);eg(this,dt,rN).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(g){var r,h,b;const C=g.clipboardData||window.clipboardData,{types:i}=C;if(i.length===1&&i[0]==="text/plain")return;g.preventDefault();const e=eg(r=BC,xl,wS).call(r,C.getData("text")||"").replaceAll(NY,`
`);if(!e)return;const A=window.getSelection();if(!A.rangeCount)return;this.editorDiv.normalize(),A.deleteFromDocument();const s=A.getRangeAt(0);if(!e.includes(`
`)){s.insertNode(document.createTextNode(e)),this.editorDiv.normalize(),A.collapseToStart();return}const{startContainer:l,startOffset:n}=s,a=[],d=[];if(l.nodeType===Node.TEXT_NODE){const u=l.parentElement;if(d.push(l.nodeValue.slice(n).replaceAll(NY,"")),u!==this.editorDiv){let m=a;for(const Z of this.editorDiv.childNodes){if(Z===u){m=d;continue}m.push(eg(h=BC,xl,dN).call(h,Z))}}a.push(l.nodeValue.slice(0,n).replaceAll(NY,""))}else if(l===this.editorDiv){let u=a,m=0;for(const Z of this.editorDiv.childNodes)m++===n&&(u=d),u.push(eg(b=BC,xl,dN).call(b,Z))}$(this,se,`${a.join(`
`)}${e}${d.join(`
`)}`),eg(this,dt,rN).call(this);const o=new Range;let c=Math.sumPrecise(a.map(u=>u.length));for(const{firstChild:u}of this.editorDiv.childNodes)if(u.nodeType===Node.TEXT_NODE){const m=u.nodeValue.length;if(c<=m){o.setStart(u,c),o.setEnd(u,c);break}c-=m}A.removeAllRanges(),A.addRange(o)}get contentDiv(){return this.editorDiv}static async deserialize(g,C,i){var s;let e=null;if(g instanceof Wgg){const{data:{defaultAppearanceData:{fontSize:l,fontColor:n},rect:a,rotation:d,id:o,popupRef:c},textContent:r,textPosition:h,parent:{page:{pageNumber:b}}}=g;if(!r||r.length===0)return null;e=g={annotationType:RI.FREETEXT,color:Array.from(n),fontSize:l,value:r.join(`
`),position:h,pageIndex:b-1,rect:a.slice(0),rotation:d,id:o,deleted:!1,popupRef:c}}const A=await super.deserialize(g,C,i);return $(A,le,g.fontSize),$(A,uA,iI.makeHexColor(...g.color)),$(A,se,eg(s=BC,xl,wS).call(s,g.value)),A.annotationElementId=g.id||null,A._initialData=e,A}serialize(g=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const C=BC._internalPadding*this.parentScale,i=this.getRect(C,C),e=zC._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:M(this,uA)),A={annotationType:RI.FREETEXT,color:e,fontSize:M(this,le),value:eg(this,dt,fgg).call(this),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return g?(A.isCopy=!0,A):this.annotationElementId&&!eg(this,dt,Hgg).call(this,A)?null:(A.id=this.annotationElementId,A)}renderAnnotationElement(g){const C=super.renderAnnotationElement(g);if(this.deleted)return C;const{style:i}=C;i.fontSize=`calc(${M(this,le)}px * var(--total-scale-factor))`,i.color=M(this,uA),C.replaceChildren();for(const A of M(this,se).split(`
`)){const s=document.createElement("div");s.append(A?document.createTextNode(A):document.createElement("br")),C.append(s)}const e=BC._internalPadding*this.parentScale;return g.updateEdited({rect:this.getRect(e,e),popupContent:M(this,se)}),C}resetAnnotationElement(g){super.resetAnnotationElement(g),g.resetEdited()}};uA=new WeakMap,se=new WeakMap,YZ=new WeakMap,fc=new WeakMap,le=new WeakMap,dt=new WeakSet,Vgg=function(g){const C=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--total-scale-factor))`,this.translate(0,-(e-M(this,le))*this.parentScale),$(this,le,e),eg(this,dt,cN).call(this)},i=M(this,le);this.addCommands({cmd:C.bind(this,g),undo:C.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gC.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},Mgg=function(g){const C=e=>{$(this,uA,this.editorDiv.style.color=e)},i=M(this,uA);this.addCommands({cmd:C.bind(this,g),undo:C.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gC.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Rgg=function(){var i;const g=[];this.editorDiv.normalize();let C=null;for(const e of this.editorDiv.childNodes)(C==null?void 0:C.nodeType)===Node.TEXT_NODE&&e.nodeName==="BR"||(g.push(eg(i=BC,xl,dN).call(i,e)),C=e);return g.join(`
`)},cN=function(){const[g,C]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:e,div:A}=this,s=A.style.display,l=A.classList.contains("hidden");A.classList.remove("hidden"),A.style.display="hidden",e.div.append(this.div),i=A.getBoundingClientRect(),A.remove(),A.style.display=s,A.classList.toggle("hidden",l)}this.rotation%180===this.parentRotation%180?(this.width=i.width/g,this.height=i.height/C):(this.width=i.height/g,this.height=i.width/C),this.fixAndSetPosition()},xl=new WeakSet,dN=function(g){return(g.nodeType===Node.TEXT_NODE?g.nodeValue:g.innerText).replaceAll(NY,"")},rN=function(){if(this.editorDiv.replaceChildren(),!!M(this,se))for(const g of M(this,se).split(`
`)){const C=document.createElement("div");C.append(g?document.createTextNode(g):document.createElement("br")),this.editorDiv.append(C)}},fgg=function(){return M(this,se).replaceAll(" "," ")},wS=function(g){return g.replaceAll(" "," ")},Hgg=function(g){const{value:C,fontSize:i,color:e,pageIndex:A}=this._initialData;return this._hasBeenMoved||g.value!==C||g.fontSize!==i||g.color.some((s,l)=>s!==e[l])||g.pageIndex!==A},ig(BC,xl),CI(BC,"_freeTextDefaultContent",""),CI(BC,"_internalPadding",0),CI(BC,"_defaultColor",null),CI(BC,"_defaultFontSize",10),CI(BC,"_type","freetext"),CI(BC,"_editorType",RI.FREETEXT);let GS=BC;class _g{toSVGPath(){ZC("Abstract method `toSVGPath` must be implemented.")}get box(){ZC("Abstract getter `box` must be implemented.")}serialize(I,g){ZC("Abstract method `serialize` must be implemented.")}static _rescale(I,g,C,i,e,A){A||(A=new Float32Array(I.length));for(let s=0,l=I.length;s<l;s+=2)A[s]=g+I[s]*i,A[s+1]=C+I[s+1]*e;return A}static _rescaleAndSwap(I,g,C,i,e,A){A||(A=new Float32Array(I.length));for(let s=0,l=I.length;s<l;s+=2)A[s]=g+I[s+1]*i,A[s+1]=C+I[s]*e;return A}static _translate(I,g,C,i){i||(i=new Float32Array(I.length));for(let e=0,A=I.length;e<A;e+=2)i[e]=g+I[e],i[e+1]=C+I[e+1];return i}static svgRound(I){return Math.round(I*1e4)}static _normalizePoint(I,g,C,i,e){switch(e){case 90:return[1-g/C,I/i];case 180:return[1-I/C,1-g/i];case 270:return[g/C,1-I/i];default:return[I/C,g/i]}}static _normalizePagePoint(I,g,C){switch(C){case 90:return[1-g,I];case 180:return[1-I,1-g];case 270:return[g,1-I];default:return[I,g]}}static createBezierPoints(I,g,C,i,e,A){return[(I+5*C)/6,(g+5*i)/6,(5*C+e)/6,(5*i+A)/6,(C+e)/2,(i+A)/2]}}CI(_g,"PRECISION",1e-4);var ne,mA,Qh,Oh,bs,JI,Hc,Xc,NZ,VZ,Uh,Eh,pa,MZ,RV,fV,wt,Tu,Xgg,Sgg,Dgg,Kgg,Fgg,kgg;const ll=class ll{constructor({x:I,y:g},C,i,e,A,s=0){ig(this,wt);ig(this,ne);ig(this,mA,[]);ig(this,Qh);ig(this,Oh);ig(this,bs,[]);ig(this,JI,new Float32Array(18));ig(this,Hc);ig(this,Xc);ig(this,NZ);ig(this,VZ);ig(this,Uh);ig(this,Eh);ig(this,pa,[]);$(this,ne,C),$(this,Eh,e*i),$(this,Oh,A),M(this,JI).set([NaN,NaN,NaN,NaN,I,g],6),$(this,Qh,s),$(this,VZ,M(ll,MZ)*i),$(this,NZ,M(ll,fV)*i),$(this,Uh,i),M(this,pa).push(I,g)}isEmpty(){return isNaN(M(this,JI)[8])}add({x:I,y:g}){var S;$(this,Hc,I),$(this,Xc,g);const[C,i,e,A]=M(this,ne);let[s,l,n,a]=M(this,JI).subarray(8,12);const d=I-n,o=g-a,c=Math.hypot(d,o);if(c<M(this,NZ))return!1;const r=c-M(this,VZ),h=r/c,b=h*d,u=h*o;let m=s,Z=l;s=n,l=a,n+=b,a+=u,(S=M(this,pa))==null||S.push(I,g);const p=-u/r,Y=b/r,R=p*M(this,Eh),X=Y*M(this,Eh);return M(this,JI).set(M(this,JI).subarray(2,8),0),M(this,JI).set([n+R,a+X],4),M(this,JI).set(M(this,JI).subarray(14,18),12),M(this,JI).set([n-R,a-X],16),isNaN(M(this,JI)[6])?(M(this,bs).length===0&&(M(this,JI).set([s+R,l+X],2),M(this,bs).push(NaN,NaN,NaN,NaN,(s+R-C)/e,(l+X-i)/A),M(this,JI).set([s-R,l-X],14),M(this,mA).push(NaN,NaN,NaN,NaN,(s-R-C)/e,(l-X-i)/A)),M(this,JI).set([m,Z,s,l,n,a],6),!this.isEmpty()):(M(this,JI).set([m,Z,s,l,n,a],6),Math.abs(Math.atan2(Z-l,m-s)-Math.atan2(u,b))<Math.PI/2?([s,l,n,a]=M(this,JI).subarray(2,6),M(this,bs).push(NaN,NaN,NaN,NaN,((s+n)/2-C)/e,((l+a)/2-i)/A),[s,l,m,Z]=M(this,JI).subarray(14,18),M(this,mA).push(NaN,NaN,NaN,NaN,((m+s)/2-C)/e,((Z+l)/2-i)/A),!0):([m,Z,s,l,n,a]=M(this,JI).subarray(0,6),M(this,bs).push(((m+5*s)/6-C)/e,((Z+5*l)/6-i)/A,((5*s+n)/6-C)/e,((5*l+a)/6-i)/A,((s+n)/2-C)/e,((l+a)/2-i)/A),[n,a,s,l,m,Z]=M(this,JI).subarray(12,18),M(this,mA).push(((m+5*s)/6-C)/e,((Z+5*l)/6-i)/A,((5*s+n)/6-C)/e,((5*l+a)/6-i)/A,((s+n)/2-C)/e,((l+a)/2-i)/A),!0))}toSVGPath(){if(this.isEmpty())return"";const I=M(this,bs),g=M(this,mA);if(isNaN(M(this,JI)[6])&&!this.isEmpty())return eg(this,wt,Xgg).call(this);const C=[];C.push(`M${I[4]} ${I[5]}`);for(let i=6;i<I.length;i+=6)isNaN(I[i])?C.push(`L${I[i+4]} ${I[i+5]}`):C.push(`C${I[i]} ${I[i+1]} ${I[i+2]} ${I[i+3]} ${I[i+4]} ${I[i+5]}`);eg(this,wt,Dgg).call(this,C);for(let i=g.length-6;i>=6;i-=6)isNaN(g[i])?C.push(`L${g[i+4]} ${g[i+5]}`):C.push(`C${g[i]} ${g[i+1]} ${g[i+2]} ${g[i+3]} ${g[i+4]} ${g[i+5]}`);return eg(this,wt,Sgg).call(this,C),C.join(" ")}newFreeDrawOutline(I,g,C,i,e,A){return new zgg(I,g,C,i,e,A)}getOutlines(){var d;const I=M(this,bs),g=M(this,mA),C=M(this,JI),[i,e,A,s]=M(this,ne),l=new Float32Array((((d=M(this,pa))==null?void 0:d.length)??0)+2);for(let o=0,c=l.length-2;o<c;o+=2)l[o]=(M(this,pa)[o]-i)/A,l[o+1]=(M(this,pa)[o+1]-e)/s;if(l[l.length-2]=(M(this,Hc)-i)/A,l[l.length-1]=(M(this,Xc)-e)/s,isNaN(C[6])&&!this.isEmpty())return eg(this,wt,Kgg).call(this,l);const n=new Float32Array(M(this,bs).length+24+M(this,mA).length);let a=I.length;for(let o=0;o<a;o+=2){if(isNaN(I[o])){n[o]=n[o+1]=NaN;continue}n[o]=I[o],n[o+1]=I[o+1]}a=eg(this,wt,kgg).call(this,n,a);for(let o=g.length-6;o>=6;o-=6)for(let c=0;c<6;c+=2){if(isNaN(g[o+c])){n[a]=n[a+1]=NaN,a+=2;continue}n[a]=g[o+c],n[a+1]=g[o+c+1],a+=2}return eg(this,wt,Fgg).call(this,n,a),this.newFreeDrawOutline(n,l,M(this,ne),M(this,Uh),M(this,Qh),M(this,Oh))}};ne=new WeakMap,mA=new WeakMap,Qh=new WeakMap,Oh=new WeakMap,bs=new WeakMap,JI=new WeakMap,Hc=new WeakMap,Xc=new WeakMap,NZ=new WeakMap,VZ=new WeakMap,Uh=new WeakMap,Eh=new WeakMap,pa=new WeakMap,MZ=new WeakMap,RV=new WeakMap,fV=new WeakMap,wt=new WeakSet,Tu=function(){const I=M(this,JI).subarray(4,6),g=M(this,JI).subarray(16,18),[C,i,e,A]=M(this,ne);return[(M(this,Hc)+(I[0]-g[0])/2-C)/e,(M(this,Xc)+(I[1]-g[1])/2-i)/A,(M(this,Hc)+(g[0]-I[0])/2-C)/e,(M(this,Xc)+(g[1]-I[1])/2-i)/A]},Xgg=function(){const[I,g,C,i]=M(this,ne),[e,A,s,l]=eg(this,wt,Tu).call(this);return`M${(M(this,JI)[2]-I)/C} ${(M(this,JI)[3]-g)/i} L${(M(this,JI)[4]-I)/C} ${(M(this,JI)[5]-g)/i} L${e} ${A} L${s} ${l} L${(M(this,JI)[16]-I)/C} ${(M(this,JI)[17]-g)/i} L${(M(this,JI)[14]-I)/C} ${(M(this,JI)[15]-g)/i} Z`},Sgg=function(I){const g=M(this,mA);I.push(`L${g[4]} ${g[5]} Z`)},Dgg=function(I){const[g,C,i,e]=M(this,ne),A=M(this,JI).subarray(4,6),s=M(this,JI).subarray(16,18),[l,n,a,d]=eg(this,wt,Tu).call(this);I.push(`L${(A[0]-g)/i} ${(A[1]-C)/e} L${l} ${n} L${a} ${d} L${(s[0]-g)/i} ${(s[1]-C)/e}`)},Kgg=function(I){const g=M(this,JI),[C,i,e,A]=M(this,ne),[s,l,n,a]=eg(this,wt,Tu).call(this),d=new Float32Array(36);return d.set([NaN,NaN,NaN,NaN,(g[2]-C)/e,(g[3]-i)/A,NaN,NaN,NaN,NaN,(g[4]-C)/e,(g[5]-i)/A,NaN,NaN,NaN,NaN,s,l,NaN,NaN,NaN,NaN,n,a,NaN,NaN,NaN,NaN,(g[16]-C)/e,(g[17]-i)/A,NaN,NaN,NaN,NaN,(g[14]-C)/e,(g[15]-i)/A],0),this.newFreeDrawOutline(d,I,M(this,ne),M(this,Uh),M(this,Qh),M(this,Oh))},Fgg=function(I,g){const C=M(this,mA);return I.set([NaN,NaN,NaN,NaN,C[4],C[5]],g),g+=6},kgg=function(I,g){const C=M(this,JI).subarray(4,6),i=M(this,JI).subarray(16,18),[e,A,s,l]=M(this,ne),[n,a,d,o]=eg(this,wt,Tu).call(this);return I.set([NaN,NaN,NaN,NaN,(C[0]-e)/s,(C[1]-A)/l,NaN,NaN,NaN,NaN,n,a,NaN,NaN,NaN,NaN,d,o,NaN,NaN,NaN,NaN,(i[0]-e)/s,(i[1]-A)/l],g),g+=24},ig(ll,MZ,8),ig(ll,RV,2),ig(ll,fV,M(ll,MZ)+M(ll,RV));let jN=ll;var Ph,Sc,Vl,RZ,ae,fZ,It,HV,Jgg;class zgg extends _g{constructor(g,C,i,e,A,s){super();ig(this,HV);ig(this,Ph);ig(this,Sc,new Float32Array(4));ig(this,Vl);ig(this,RZ);ig(this,ae);ig(this,fZ);ig(this,It);$(this,It,g),$(this,ae,C),$(this,Ph,i),$(this,fZ,e),$(this,Vl,A),$(this,RZ,s),this.lastPoint=[NaN,NaN],eg(this,HV,Jgg).call(this,s);const[l,n,a,d]=M(this,Sc);for(let o=0,c=g.length;o<c;o+=2)g[o]=(g[o]-l)/a,g[o+1]=(g[o+1]-n)/d;for(let o=0,c=C.length;o<c;o+=2)C[o]=(C[o]-l)/a,C[o+1]=(C[o+1]-n)/d}toSVGPath(){const g=[`M${M(this,It)[4]} ${M(this,It)[5]}`];for(let C=6,i=M(this,It).length;C<i;C+=6){if(isNaN(M(this,It)[C])){g.push(`L${M(this,It)[C+4]} ${M(this,It)[C+5]}`);continue}g.push(`C${M(this,It)[C]} ${M(this,It)[C+1]} ${M(this,It)[C+2]} ${M(this,It)[C+3]} ${M(this,It)[C+4]} ${M(this,It)[C+5]}`)}return g.push("Z"),g.join(" ")}serialize([g,C,i,e],A){const s=i-g,l=e-C;let n,a;switch(A){case 0:n=_g._rescale(M(this,It),g,e,s,-l),a=_g._rescale(M(this,ae),g,e,s,-l);break;case 90:n=_g._rescaleAndSwap(M(this,It),g,C,s,l),a=_g._rescaleAndSwap(M(this,ae),g,C,s,l);break;case 180:n=_g._rescale(M(this,It),i,C,-s,l),a=_g._rescale(M(this,ae),i,C,-s,l);break;case 270:n=_g._rescaleAndSwap(M(this,It),i,e,-s,-l),a=_g._rescaleAndSwap(M(this,ae),i,e,-s,-l);break}return{outline:Array.from(n),points:[Array.from(a)]}}get box(){return M(this,Sc)}newOutliner(g,C,i,e,A,s=0){return new jN(g,C,i,e,A,s)}getNewOutline(g,C){const[i,e,A,s]=M(this,Sc),[l,n,a,d]=M(this,Ph),o=A*a,c=s*d,r=i*a+l,h=e*d+n,b=this.newOutliner({x:M(this,ae)[0]*o+r,y:M(this,ae)[1]*c+h},M(this,Ph),M(this,fZ),g,M(this,RZ),C??M(this,Vl));for(let u=2;u<M(this,ae).length;u+=2)b.add({x:M(this,ae)[u]*o+r,y:M(this,ae)[u+1]*c+h});return b.getOutlines()}}Ph=new WeakMap,Sc=new WeakMap,Vl=new WeakMap,RZ=new WeakMap,ae=new WeakMap,fZ=new WeakMap,It=new WeakMap,HV=new WeakSet,Jgg=function(g){const C=M(this,It);let i=C[4],e=C[5];const A=[i,e,i,e];let s=i,l=e;const n=g?Math.max:Math.min;for(let d=6,o=C.length;d<o;d+=6){const c=C[d+4],r=C[d+5];if(isNaN(C[d]))iI.pointBoundingBox(c,r,A),l<r?(s=c,l=r):l===r&&(s=n(s,c));else{const h=[1/0,1/0,-1/0,-1/0];iI.bezierBoundingBox(i,e,...C.slice(d,d+6),h),iI.rectBoundingBox(...h,A),l<h[3]?(s=h[2],l=h[3]):l===h[3]&&(s=n(s,h[2]))}i=c,e=r}const a=M(this,Sc);a[0]=A[0]-M(this,Vl),a[1]=A[1]-M(this,Vl),a[2]=A[2]-A[0]+2*M(this,Vl),a[3]=A[3]-A[1]+2*M(this,Vl),this.lastPoint=[s,l]};var HZ,XZ,Ba,ZA,Yi,Lgg,hN,vgg,Tgg,BS;class pS{constructor(I,g=0,C=0,i=!0){ig(this,Yi);ig(this,HZ);ig(this,XZ);ig(this,Ba,[]);ig(this,ZA,[]);const e=[1/0,1/0,-1/0,-1/0],A=10**-4;for(const{x:c,y:r,width:h,height:b}of I){const u=Math.floor((c-g)/A)*A,m=Math.ceil((c+h+g)/A)*A,Z=Math.floor((r-g)/A)*A,p=Math.ceil((r+b+g)/A)*A,Y=[u,Z,p,!0],R=[m,Z,p,!1];M(this,Ba).push(Y,R),iI.rectBoundingBox(u,Z,m,p,e)}const s=e[2]-e[0]+2*C,l=e[3]-e[1]+2*C,n=e[0]-C,a=e[1]-C,d=M(this,Ba).at(i?-1:-2),o=[d[0],d[2]];for(const c of M(this,Ba)){const[r,h,b]=c;c[0]=(r-n)/s,c[1]=(h-a)/l,c[2]=(b-a)/l}$(this,HZ,new Float32Array([n,a,s,l])),$(this,XZ,o)}getOutlines(){M(this,Ba).sort((g,C)=>g[0]-C[0]||g[1]-C[1]||g[2]-C[2]);const I=[];for(const g of M(this,Ba))g[3]?(I.push(...eg(this,Yi,BS).call(this,g)),eg(this,Yi,vgg).call(this,g)):(eg(this,Yi,Tgg).call(this,g),I.push(...eg(this,Yi,BS).call(this,g)));return eg(this,Yi,Lgg).call(this,I)}}HZ=new WeakMap,XZ=new WeakMap,Ba=new WeakMap,ZA=new WeakMap,Yi=new WeakSet,Lgg=function(I){const g=[],C=new Set;for(const A of I){const[s,l,n]=A;g.push([s,l,A],[s,n,A])}g.sort((A,s)=>A[1]-s[1]||A[0]-s[0]);for(let A=0,s=g.length;A<s;A+=2){const l=g[A][2],n=g[A+1][2];l.push(n),n.push(l),C.add(l),C.add(n)}const i=[];let e;for(;C.size>0;){const A=C.values().next().value;let[s,l,n,a,d]=A;C.delete(A);let o=s,c=l;for(e=[s,n],i.push(e);;){let r;if(C.has(a))r=a;else if(C.has(d))r=d;else break;C.delete(r),[s,l,n,a,d]=r,o!==s&&(e.push(o,c,s,c===l?l:n),o=s),c=c===l?n:l}e.push(o,c)}return new edg(i,M(this,HZ),M(this,XZ))},hN=function(I){const g=M(this,ZA);let C=0,i=g.length-1;for(;C<=i;){const e=C+i>>1,A=g[e][0];if(A===I)return e;A<I?C=e+1:i=e-1}return i+1},vgg=function([,I,g]){const C=eg(this,Yi,hN).call(this,I);M(this,ZA).splice(C,0,[I,g])},Tgg=function([,I,g]){const C=eg(this,Yi,hN).call(this,I);for(let i=C;i<M(this,ZA).length;i++){const[e,A]=M(this,ZA)[i];if(e!==I)break;if(e===I&&A===g){M(this,ZA).splice(i,1);return}}for(let i=C-1;i>=0;i--){const[e,A]=M(this,ZA)[i];if(e!==I)break;if(e===I&&A===g){M(this,ZA).splice(i,1);return}}},BS=function(I){const[g,C,i]=I,e=[[g,C,i]],A=eg(this,Yi,hN).call(this,i);for(let s=0;s<A;s++){const[l,n]=M(this,ZA)[s];for(let a=0,d=e.length;a<d;a++){const[,o,c]=e[a];if(!(n<=o||c<=l)){if(o>=l){if(c>n)e[a][1]=n;else{if(d===1)return[];e.splice(a,1),a--,d--}continue}e[a][2]=l,c>n&&e.push([g,n,c])}}}return e};var SZ,_h;class edg extends _g{constructor(g,C,i){super();ig(this,SZ);ig(this,_h);$(this,_h,g),$(this,SZ,C),this.lastPoint=i}toSVGPath(){const g=[];for(const C of M(this,_h)){let[i,e]=C;g.push(`M${i} ${e}`);for(let A=2;A<C.length;A+=2){const s=C[A],l=C[A+1];s===i?(g.push(`V${l}`),e=l):l===e&&(g.push(`H${s}`),i=s)}g.push("Z")}return g.join(" ")}serialize([g,C,i,e],A){const s=[],l=i-g,n=e-C;for(const a of M(this,_h)){const d=new Array(a.length);for(let o=0;o<a.length;o+=2)d[o]=g+a[o]*l,d[o+1]=e-a[o+1]*n;s.push(d)}return s}get box(){return M(this,SZ)}get classNamesForOutlining(){return["highlightOutline"]}}SZ=new WeakMap,_h=new WeakMap;class WS extends jN{newFreeDrawOutline(I,g,C,i,e,A){return new Adg(I,g,C,i,e,A)}}class Adg extends zgg{newOutliner(I,g,C,i,e,A=0){return new WS(I,g,C,i,e,A)}}var GA,Dc,qh,Zt,DZ,$h,KZ,FZ,Wa,wA,g0,kZ,mC,yS,YS,NS,So,xgg,Tn;const Fi=class Fi{constructor({editor:I=null,uiManager:g=null}){ig(this,mC);ig(this,GA,null);ig(this,Dc,null);ig(this,qh);ig(this,Zt,null);ig(this,DZ,!1);ig(this,$h,!1);ig(this,KZ,null);ig(this,FZ);ig(this,Wa,null);ig(this,wA,null);ig(this,g0);var C;I?($(this,$h,!1),$(this,g0,gC.HIGHLIGHT_COLOR),$(this,KZ,I)):($(this,$h,!0),$(this,g0,gC.HIGHLIGHT_DEFAULT_COLOR)),$(this,wA,(I==null?void 0:I._uiManager)||g),$(this,FZ,M(this,wA)._eventBus),$(this,qh,(I==null?void 0:I.color)||((C=M(this,wA))==null?void 0:C.highlightColors.values().next().value)||"#FFFF98"),M(Fi,kZ)||$(Fi,kZ,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return jI(this,"_keyboardManager",new EZ([[["Escape","mac+Escape"],Fi.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Fi.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Fi.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Fi.prototype._moveToPrevious],[["Home","mac+Home"],Fi.prototype._moveToBeginning],[["End","mac+End"],Fi.prototype._moveToEnd]]))}renderButton(){const I=$(this,GA,document.createElement("button"));I.className="colorPicker",I.tabIndex="0",I.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),I.setAttribute("aria-haspopup",!0);const g=M(this,wA)._signal;I.addEventListener("click",eg(this,mC,So).bind(this),{signal:g}),I.addEventListener("keydown",eg(this,mC,NS).bind(this),{signal:g});const C=$(this,Dc,document.createElement("span"));return C.className="swatch",C.setAttribute("aria-hidden",!0),C.style.backgroundColor=M(this,qh),I.append(C),I}renderMainDropdown(){const I=$(this,Zt,eg(this,mC,yS).call(this));return I.setAttribute("aria-orientation","horizontal"),I.setAttribute("aria-labelledby","highlightColorPickerLabel"),I}_colorSelectFromKeyboard(I){if(I.target===M(this,GA)){eg(this,mC,So).call(this,I);return}const g=I.target.getAttribute("data-color");g&&eg(this,mC,YS).call(this,g,I)}_moveToNext(I){var g,C;if(!M(this,mC,Tn)){eg(this,mC,So).call(this,I);return}if(I.target===M(this,GA)){(g=M(this,Zt).firstChild)==null||g.focus();return}(C=I.target.nextSibling)==null||C.focus()}_moveToPrevious(I){var g,C;if(I.target===((g=M(this,Zt))==null?void 0:g.firstChild)||I.target===M(this,GA)){M(this,mC,Tn)&&this._hideDropdownFromKeyboard();return}M(this,mC,Tn)||eg(this,mC,So).call(this,I),(C=I.target.previousSibling)==null||C.focus()}_moveToBeginning(I){var g;if(!M(this,mC,Tn)){eg(this,mC,So).call(this,I);return}(g=M(this,Zt).firstChild)==null||g.focus()}_moveToEnd(I){var g;if(!M(this,mC,Tn)){eg(this,mC,So).call(this,I);return}(g=M(this,Zt).lastChild)==null||g.focus()}hideDropdown(){var I,g;(I=M(this,Zt))==null||I.classList.add("hidden"),(g=M(this,Wa))==null||g.abort(),$(this,Wa,null)}_hideDropdownFromKeyboard(){var I;if(!M(this,$h)){if(!M(this,mC,Tn)){(I=M(this,KZ))==null||I.unselect();return}this.hideDropdown(),M(this,GA).focus({preventScroll:!0,focusVisible:M(this,DZ)})}}updateColor(I){if(M(this,Dc)&&(M(this,Dc).style.backgroundColor=I),!M(this,Zt))return;const g=M(this,wA).highlightColors.values();for(const C of M(this,Zt).children)C.setAttribute("aria-selected",g.next().value===I)}destroy(){var I,g;(I=M(this,GA))==null||I.remove(),$(this,GA,null),$(this,Dc,null),(g=M(this,Zt))==null||g.remove(),$(this,Zt,null)}};GA=new WeakMap,Dc=new WeakMap,qh=new WeakMap,Zt=new WeakMap,DZ=new WeakMap,$h=new WeakMap,KZ=new WeakMap,FZ=new WeakMap,Wa=new WeakMap,wA=new WeakMap,g0=new WeakMap,kZ=new WeakMap,mC=new WeakSet,yS=function(){const I=document.createElement("div"),g=M(this,wA)._signal;I.addEventListener("contextmenu",MA,{signal:g}),I.className="dropdown",I.role="listbox",I.setAttribute("aria-multiselectable",!1),I.setAttribute("aria-orientation","vertical"),I.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[C,i]of M(this,wA).highlightColors){const e=document.createElement("button");e.tabIndex="0",e.role="option",e.setAttribute("data-color",i),e.title=C,e.setAttribute("data-l10n-id",M(Fi,kZ)[C]);const A=document.createElement("span");e.append(A),A.className="swatch",A.style.backgroundColor=i,e.setAttribute("aria-selected",i===M(this,qh)),e.addEventListener("click",eg(this,mC,YS).bind(this,i),{signal:g}),I.append(e)}return I.addEventListener("keydown",eg(this,mC,NS).bind(this),{signal:g}),I},YS=function(I,g){g.stopPropagation(),M(this,FZ).dispatch("switchannotationeditorparams",{source:this,type:M(this,g0),value:I})},NS=function(I){Fi._keyboardManager.exec(this,I)},So=function(I){if(M(this,mC,Tn)){this.hideDropdown();return}if($(this,DZ,I.detail===0),M(this,Wa)||($(this,Wa,new AbortController),window.addEventListener("pointerdown",eg(this,mC,xgg).bind(this),{signal:M(this,wA).combinedSignal(M(this,Wa))})),M(this,Zt)){M(this,Zt).classList.remove("hidden");return}const g=$(this,Zt,eg(this,mC,yS).call(this));M(this,GA).append(g)},xgg=function(I){var g;(g=M(this,Zt))!=null&&g.contains(I.target)||this.hideDropdown()},Tn=function(){return M(this,Zt)&&!M(this,Zt).classList.contains("hidden")},ig(Fi,kZ,null);let QN=Fi;var I0,zZ,Ml,Kc,C0,Ji,JZ,LZ,Fc,Je,oe,jt,t0,Rl,di,i0,Le,vZ,DI,VS,bN,jgg,Qgg,Ogg,MS,Do,Oe,vr,Ugg,uN,xu,Egg,Pgg,_gg,qgg,$gg;const lC=class lC extends zC{constructor(g){super({...g,name:"highlightEditor"});ig(this,DI);ig(this,I0,null);ig(this,zZ,0);ig(this,Ml);ig(this,Kc,null);ig(this,C0,null);ig(this,Ji,null);ig(this,JZ,null);ig(this,LZ,0);ig(this,Fc,null);ig(this,Je,null);ig(this,oe,null);ig(this,jt,!1);ig(this,t0,null);ig(this,Rl);ig(this,di,null);ig(this,i0,"");ig(this,Le);ig(this,vZ,"");this.color=g.color||lC._defaultColor,$(this,Le,g.thickness||lC._defaultThickness),$(this,Rl,g.opacity||lC._defaultOpacity),$(this,Ml,g.boxes||null),$(this,vZ,g.methodOfCreation||""),$(this,i0,g.text||""),this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",g.highlightId>-1?($(this,jt,!0),eg(this,DI,bN).call(this,g),eg(this,DI,Do).call(this)):M(this,Ml)&&($(this,I0,g.anchorNode),$(this,zZ,g.anchorOffset),$(this,JZ,g.focusNode),$(this,LZ,g.focusOffset),eg(this,DI,VS).call(this),eg(this,DI,Do).call(this),this.rotate(this.rotation))}static get _keyboardManager(){const g=lC.prototype;return jI(this,"_keyboardManager",new EZ([[["ArrowLeft","mac+ArrowLeft"],g._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],g._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],g._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],g._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:M(this,jt)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:M(this,Le),methodOfCreation:M(this,vZ)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(g){return{numberOfColors:g.get("color").size}}static initialize(g,C){var i;zC.initialize(g,C),lC._defaultColor||(lC._defaultColor=((i=C.highlightColors)==null?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(g,C){switch(g){case gC.HIGHLIGHT_DEFAULT_COLOR:lC._defaultColor=C;break;case gC.HIGHLIGHT_THICKNESS:lC._defaultThickness=C;break}}translateInPage(g,C){}get toolbarPosition(){return M(this,t0)}updateParams(g,C){switch(g){case gC.HIGHLIGHT_COLOR:eg(this,DI,jgg).call(this,C);break;case gC.HIGHLIGHT_THICKNESS:eg(this,DI,Qgg).call(this,C);break}}static get defaultPropertiesToUpdate(){return[[gC.HIGHLIGHT_DEFAULT_COLOR,lC._defaultColor],[gC.HIGHLIGHT_THICKNESS,lC._defaultThickness]]}get propertiesToUpdate(){return[[gC.HIGHLIGHT_COLOR,this.color||lC._defaultColor],[gC.HIGHLIGHT_THICKNESS,M(this,Le)||lC._defaultThickness],[gC.HIGHLIGHT_FREE,M(this,jt)]]}async addEditToolbar(){const g=await super.addEditToolbar();return g?(this._uiManager.highlightColors&&($(this,C0,new QN({editor:this})),g.addColorPicker(M(this,C0))),g):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(eg(this,DI,xu).call(this))}getBaseTranslation(){return[0,0]}getRect(g,C){return super.getRect(g,C,eg(this,DI,xu).call(this))}onceAdded(g){this.annotationElementId||this.parent.addUndoableEditor(this),g&&this.div.focus()}remove(){eg(this,DI,MS).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(eg(this,DI,Do).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(g){var i;let C=!1;this.parent&&!g?eg(this,DI,MS).call(this):g&&(eg(this,DI,Do).call(this,g),C=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(g),this.show(this._isVisible),C&&this.select()}rotate(g){var e,A,s;const{drawLayer:C}=this.parent;let i;M(this,jt)?(g=(g-this.rotation+360)%360,i=eg(e=lC,Oe,vr).call(e,M(this,Je).box,g)):i=eg(A=lC,Oe,vr).call(A,[this.x,this.y,this.width,this.height],g),C.updateProperties(M(this,oe),{bbox:i,root:{"data-main-rotation":g}}),C.updateProperties(M(this,di),{bbox:eg(s=lC,Oe,vr).call(s,M(this,Ji).box,g),root:{"data-main-rotation":g}})}render(){if(this.div)return this.div;const g=super.render();M(this,i0)&&(g.setAttribute("aria-label",M(this,i0)),g.setAttribute("role","mark")),M(this,jt)?g.classList.add("free"):this.div.addEventListener("keydown",eg(this,DI,Ugg).bind(this),{signal:this._uiManager._signal});const C=$(this,Fc,document.createElement("div"));g.append(C),C.setAttribute("aria-hidden","true"),C.className="internal",C.style.clipPath=M(this,Kc);const[i,e]=this.parentDimensions;return this.setDims(this.width*i,this.height*e),C9(this,M(this,Fc),["pointerover","pointerleave"]),this.enableEditing(),g}pointerover(){var g;this.isSelected||(g=this.parent)==null||g.drawLayer.updateProperties(M(this,di),{rootClass:{hovered:!0}})}pointerleave(){var g;this.isSelected||(g=this.parent)==null||g.drawLayer.updateProperties(M(this,di),{rootClass:{hovered:!1}})}_moveCaret(g){switch(this.parent.unselect(this),g){case 0:case 2:eg(this,DI,uN).call(this,!0);break;case 1:case 3:eg(this,DI,uN).call(this,!1);break}}select(){var g;super.select(),M(this,di)&&((g=this.parent)==null||g.drawLayer.updateProperties(M(this,di),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var g;super.unselect(),M(this,di)&&((g=this.parent)==null||g.drawLayer.updateProperties(M(this,di),{rootClass:{selected:!1}}),M(this,jt)||eg(this,DI,uN).call(this,!1))}get _mustFixPosition(){return!M(this,jt)}show(g=this._isVisible){super.show(g),this.parent&&(this.parent.drawLayer.updateProperties(M(this,oe),{rootClass:{hidden:!g}}),this.parent.drawLayer.updateProperties(M(this,di),{rootClass:{hidden:!g}}))}static startHighlighting(g,C,{target:i,x:e,y:A}){const{x:s,y:l,width:n,height:a}=i.getBoundingClientRect(),d=new AbortController,o=g.combinedSignal(d),c=r=>{d.abort(),eg(this,Oe,qgg).call(this,g,r)};window.addEventListener("blur",c,{signal:o}),window.addEventListener("pointerup",c,{signal:o}),window.addEventListener("pointerdown",at,{capture:!0,passive:!1,signal:o}),window.addEventListener("contextmenu",MA,{signal:o}),i.addEventListener("pointermove",eg(this,Oe,_gg).bind(this,g),{signal:o}),this._freeHighlight=new WS({x:e,y:A},[s,l,n,a],g.scale,this._defaultThickness/2,C,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=g.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static async deserialize(g,C,i){var h,b,u,m;let e=null;if(g instanceof Ygg){const{data:{quadPoints:Z,rect:p,rotation:Y,id:R,color:X,opacity:H,popupRef:S},parent:{page:{pageNumber:z}}}=g;e=g={annotationType:RI.HIGHLIGHT,color:Array.from(X),opacity:H,quadPoints:Z,boxes:null,pageIndex:z-1,rect:p.slice(0),rotation:Y,id:R,deleted:!1,popupRef:S}}else if(g instanceof A9){const{data:{inkLists:Z,rect:p,rotation:Y,id:R,color:X,borderStyle:{rawWidth:H},popupRef:S},parent:{page:{pageNumber:z}}}=g;e=g={annotationType:RI.HIGHLIGHT,color:Array.from(X),thickness:H,inkLists:Z,boxes:null,pageIndex:z-1,rect:p.slice(0),rotation:Y,id:R,deleted:!1,popupRef:S}}const{color:A,quadPoints:s,inkLists:l,opacity:n}=g,a=await super.deserialize(g,C,i);a.color=iI.makeHexColor(...A),$(a,Rl,n||1),l&&$(a,Le,g.thickness),a.annotationElementId=g.id||null,a._initialData=e;const[d,o]=a.pageDimensions,[c,r]=a.pageTranslation;if(s){const Z=$(a,Ml,[]);for(let p=0;p<s.length;p+=8)Z.push({x:(s[p]-c)/d,y:1-(s[p+1]-r)/o,width:(s[p+2]-s[p])/d,height:(s[p+1]-s[p+5])/o});eg(h=a,DI,VS).call(h),eg(b=a,DI,Do).call(b),a.rotate(a.rotation)}else if(l){$(a,jt,!0);const Z=l[0],p={x:Z[0]-c,y:o-(Z[1]-r)},Y=new WS(p,[0,0,d,o],1,M(a,Le)/2,!0,.001);for(let H=0,S=Z.length;H<S;H+=2)p.x=Z[H]-c,p.y=o-(Z[H+1]-r),Y.add(p);const{id:R,clipPathId:X}=C.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:a.color,"fill-opacity":a._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:Y.toSVGPath()}},!0,!0);eg(u=a,DI,bN).call(u,{highlightOutlines:Y.getOutlines(),highlightId:R,clipPathId:X}),eg(m=a,DI,Do).call(m),a.rotate(a.parentRotation)}return a}serialize(g=!1){if(this.isEmpty()||g)return null;if(this.deleted)return this.serializeDeleted();const C=this.getRect(0,0),i=zC._colorManager.convert(this.color),e={annotationType:RI.HIGHLIGHT,color:i,opacity:M(this,Rl),thickness:M(this,Le),quadPoints:eg(this,DI,Egg).call(this),outlines:eg(this,DI,Pgg).call(this,C),pageIndex:this.pageIndex,rect:C,rotation:eg(this,DI,xu).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!eg(this,DI,$gg).call(this,e)?null:(e.id=this.annotationElementId,e)}renderAnnotationElement(g){return g.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};I0=new WeakMap,zZ=new WeakMap,Ml=new WeakMap,Kc=new WeakMap,C0=new WeakMap,Ji=new WeakMap,JZ=new WeakMap,LZ=new WeakMap,Fc=new WeakMap,Je=new WeakMap,oe=new WeakMap,jt=new WeakMap,t0=new WeakMap,Rl=new WeakMap,di=new WeakMap,i0=new WeakMap,Le=new WeakMap,vZ=new WeakMap,DI=new WeakSet,VS=function(){const g=new pS(M(this,Ml),.001);$(this,Je,g.getOutlines()),[this.x,this.y,this.width,this.height]=M(this,Je).box;const C=new pS(M(this,Ml),.0025,.001,this._uiManager.direction==="ltr");$(this,Ji,C.getOutlines());const{lastPoint:i}=M(this,Ji);$(this,t0,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height])},bN=function({highlightOutlines:g,highlightId:C,clipPathId:i}){var d,o;if($(this,Je,g),$(this,Ji,g.getNewOutline(M(this,Le)/2+1.5,.0025)),C>=0)$(this,oe,C),$(this,Kc,i),this.parent.drawLayer.finalizeDraw(C,{bbox:g.box,path:{d:g.toSVGPath()}}),$(this,di,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:M(this,Ji).box,path:{d:M(this,Ji).toSVGPath()}},!0));else if(this.parent){const c=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(M(this,oe),{bbox:eg(d=lC,Oe,vr).call(d,M(this,Je).box,(c-this.rotation+360)%360),path:{d:g.toSVGPath()}}),this.parent.drawLayer.updateProperties(M(this,di),{bbox:eg(o=lC,Oe,vr).call(o,M(this,Ji).box,c),path:{d:M(this,Ji).toSVGPath()}})}const[A,s,l,n]=g.box;switch(this.rotation){case 0:this.x=A,this.y=s,this.width=l,this.height=n;break;case 90:{const[c,r]=this.parentDimensions;this.x=s,this.y=1-A,this.width=l*r/c,this.height=n*c/r;break}case 180:this.x=1-A,this.y=1-s,this.width=l,this.height=n;break;case 270:{const[c,r]=this.parentDimensions;this.x=1-s,this.y=A,this.width=l*r/c,this.height=n*c/r;break}}const{lastPoint:a}=M(this,Ji);$(this,t0,[(a[0]-A)/l,(a[1]-s)/n])},jgg=function(g){const C=(A,s)=>{var l,n;this.color=A,$(this,Rl,s),(l=this.parent)==null||l.drawLayer.updateProperties(M(this,oe),{root:{fill:A,"fill-opacity":s}}),(n=M(this,C0))==null||n.updateColor(A)},i=this.color,e=M(this,Rl);this.addCommands({cmd:C.bind(this,g,lC._defaultOpacity),undo:C.bind(this,i,e),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gC.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(g)},!0)},Qgg=function(g){const C=M(this,Le),i=e=>{$(this,Le,e),eg(this,DI,Ogg).call(this,e)};this.addCommands({cmd:i.bind(this,g),undo:i.bind(this,C),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gC.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:g},!0)},Ogg=function(g){if(!M(this,jt))return;eg(this,DI,bN).call(this,{highlightOutlines:M(this,Je).getNewOutline(g/2)}),this.fixAndSetPosition();const[C,i]=this.parentDimensions;this.setDims(this.width*C,this.height*i)},MS=function(){M(this,oe)===null||!this.parent||(this.parent.drawLayer.remove(M(this,oe)),$(this,oe,null),this.parent.drawLayer.remove(M(this,di)),$(this,di,null))},Do=function(g=this.parent){M(this,oe)===null&&({id:ui(this,oe)._,clipPathId:ui(this,Kc)._}=g.drawLayer.draw({bbox:M(this,Je).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":M(this,Rl)},rootClass:{highlight:!0,free:M(this,jt)},path:{d:M(this,Je).toSVGPath()}},!1,!0),$(this,di,g.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:M(this,jt)},bbox:M(this,Ji).box,path:{d:M(this,Ji).toSVGPath()}},M(this,jt))),M(this,Fc)&&(M(this,Fc).style.clipPath=M(this,Kc)))},Oe=new WeakSet,vr=function([g,C,i,e],A){switch(A){case 90:return[1-C-e,g,e,i];case 180:return[1-g-i,1-C-e,i,e];case 270:return[C,1-g-i,e,i]}return[g,C,i,e]},Ugg=function(g){lC._keyboardManager.exec(this,g)},uN=function(g){if(!M(this,I0))return;const C=window.getSelection();g?C.setPosition(M(this,I0),M(this,zZ)):C.setPosition(M(this,JZ),M(this,LZ))},xu=function(){return M(this,jt)?this.rotation:0},Egg=function(){if(M(this,jt))return null;const[g,C]=this.pageDimensions,[i,e]=this.pageTranslation,A=M(this,Ml),s=new Float32Array(A.length*8);let l=0;for(const{x:n,y:a,width:d,height:o}of A){const c=n*g+i,r=(1-a)*C+e;s[l]=s[l+4]=c,s[l+1]=s[l+3]=r,s[l+2]=s[l+6]=c+d*g,s[l+5]=s[l+7]=r-o*C,l+=8}return s},Pgg=function(g){return M(this,Je).serialize(g,eg(this,DI,xu).call(this))},_gg=function(g,C){this._freeHighlight.add(C)&&g.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},qgg=function(g,C){this._freeHighlight.isEmpty()?g.drawLayer.remove(this._freeHighlightId):g.createAndAddNewEditor(C,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},$gg=function(g){const{color:C}=this._initialData;return g.color.some((i,e)=>i!==C[e])},ig(lC,Oe),CI(lC,"_defaultColor",null),CI(lC,"_defaultOpacity",1),CI(lC,"_defaultThickness",12),CI(lC,"_type","highlight"),CI(lC,"_editorType",RI.HIGHLIGHT),CI(lC,"_freeHighlightId",-1),CI(lC,"_freeHighlight",null),CI(lC,"_freeHighlightClipId","");let ON=lC;var kc;class gIg{constructor(){ig(this,kc,Object.create(null))}updateProperty(I,g){this[I]=g,this.updateSVGProperty(I,g)}updateProperties(I){if(I)for(const[g,C]of Object.entries(I))g.startsWith("_")||this.updateProperty(g,C)}updateSVGProperty(I,g){M(this,kc)[I]=g}toSVGProperties(){const I=M(this,kc);return $(this,kc,Object.create(null)),{root:I}}reset(){$(this,kc,Object.create(null))}updateAll(I=this){this.updateProperties(I)}clone(){ZC("Not implemented")}}kc=new WeakMap;var ce,e0,ft,zc,Jc,ya,Ya,Na,Lc,tC,RS,fS,HS,ju,IIg,mN,Qu,Tr;const $g=class $g extends zC{constructor(g){super(g);ig(this,tC);ig(this,ce,null);ig(this,e0);CI(this,"_drawId",null);$(this,e0,g.mustBeCommitted||!1),this._addOutlines(g)}_addOutlines(g){g.drawOutlines&&(eg(this,tC,RS).call(this,g),eg(this,tC,ju).call(this))}static _mergeSVGProperties(g,C){const i=new Set(Object.keys(g));for(const[e,A]of Object.entries(C))i.has(e)?Object.assign(g[e],A):g[e]=A;return g}static getDefaultDrawingOptions(g){ZC("Not implemented")}static get typesMap(){ZC("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(g,C){const i=this.typesMap.get(g);i&&this._defaultDrawingOptions.updateProperty(i,C),this._currentParent&&(M($g,ft).updateProperty(i,C),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(g,C){const i=this.constructor.typesMap.get(g);i&&this._updateProperty(g,i,C)}static get defaultPropertiesToUpdate(){const g=[],C=this._defaultDrawingOptions;for(const[i,e]of this.typesMap)g.push([i,C[e]]);return g}get propertiesToUpdate(){const g=[],{_drawingOptions:C}=this;for(const[i,e]of this.constructor.typesMap)g.push([i,C[e]]);return g}_updateProperty(g,C,i){const e=this._drawingOptions,A=e[C],s=l=>{var a;e.updateProperty(C,l);const n=M(this,ce).updateProperty(C,l);n&&eg(this,tC,Qu).call(this,n),(a=this.parent)==null||a.drawLayer.updateProperties(this._drawId,e.toSVGProperties())};this.addCommands({cmd:s.bind(this,i),undo:s.bind(this,A),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:g,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var g;(g=this.parent)==null||g.drawLayer.updateProperties(this._drawId,$g._mergeSVGProperties(M(this,ce).getPathResizingSVGProperties(eg(this,tC,mN).call(this)),{bbox:eg(this,tC,Tr).call(this)}))}_onResized(){var g;(g=this.parent)==null||g.drawLayer.updateProperties(this._drawId,$g._mergeSVGProperties(M(this,ce).getPathResizedSVGProperties(eg(this,tC,mN).call(this)),{bbox:eg(this,tC,Tr).call(this)}))}_onTranslating(g,C){var i;(i=this.parent)==null||i.drawLayer.updateProperties(this._drawId,{bbox:eg(this,tC,Tr).call(this)})}_onTranslated(){var g;(g=this.parent)==null||g.drawLayer.updateProperties(this._drawId,$g._mergeSVGProperties(M(this,ce).getPathTranslatedSVGProperties(eg(this,tC,mN).call(this),this.parentDimensions),{bbox:eg(this,tC,Tr).call(this)}))}_onStartDragging(){var g;(g=this.parent)==null||g.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var g;(g=this.parent)==null||g.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(g){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,M(this,e0)&&($(this,e0,!1),this.commit(),this.parent.setSelected(this),g&&this.isOnScreen&&this.div.focus())}remove(){eg(this,tC,HS).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(eg(this,tC,ju).call(this),eg(this,tC,Qu).call(this,M(this,ce).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(g){var i;let C=!1;this.parent&&!g?(this._uiManager.removeShouldRescale(this),eg(this,tC,HS).call(this)):g&&(this._uiManager.addShouldRescale(this),eg(this,tC,ju).call(this,g),C=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(g),C&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,$g._mergeSVGProperties({bbox:eg(this,tC,Tr).call(this)},M(this,ce).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&eg(this,tC,Qu).call(this,M(this,ce).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let g,C;this._isCopy&&(g=this.x,C=this.y);const i=super.render();i.classList.add("draw");const e=document.createElement("div");i.append(e),e.setAttribute("aria-hidden","true"),e.className="internal";const[A,s]=this.parentDimensions;return this.setDims(this.width*A,this.height*s),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(g,C),i}static createDrawerInstance(g,C,i,e,A){ZC("Not implemented")}static startDrawing(g,C,i,e){var b;const{target:A,offsetX:s,offsetY:l,pointerId:n,pointerType:a}=e;if(M($g,Ya)&&M($g,Ya)!==a)return;const{viewport:{rotation:d}}=g,{width:o,height:c}=A.getBoundingClientRect(),r=$($g,zc,new AbortController),h=g.combinedSignal(r);if(M($g,ya)||$($g,ya,n),M($g,Ya)??$($g,Ya,a),window.addEventListener("pointerup",u=>{var m;M($g,ya)===u.pointerId?this._endDraw(u):(m=M($g,Na))==null||m.delete(u.pointerId)},{signal:h}),window.addEventListener("pointercancel",u=>{var m;M($g,ya)===u.pointerId?this._currentParent.endDrawingSession():(m=M($g,Na))==null||m.delete(u.pointerId)},{signal:h}),window.addEventListener("pointerdown",u=>{M($g,Ya)===u.pointerType&&((M($g,Na)||$($g,Na,new Set)).add(u.pointerId),M($g,ft).isCancellable()&&(M($g,ft).removeLastElement(),M($g,ft).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:h}),window.addEventListener("contextmenu",MA,{signal:h}),A.addEventListener("pointermove",this._drawMove.bind(this),{signal:h}),A.addEventListener("touchmove",u=>{u.timeStamp===M($g,Lc)&&at(u)},{signal:h}),g.toggleDrawing(),(b=C._editorUndoBar)==null||b.hide(),M($g,ft)){g.drawLayer.updateProperties(this._currentDrawId,M($g,ft).startNew(s,l,o,c,d));return}C.updateUIForDefaultProperties(this),$($g,ft,this.createDrawerInstance(s,l,o,c,d)),$($g,Jc,this.getDefaultDrawingOptions()),this._currentParent=g,{id:this._currentDrawId}=g.drawLayer.draw(this._mergeSVGProperties(M($g,Jc).toSVGProperties(),M($g,ft).defaultSVGProperties),!0,!1)}static _drawMove(g){var A;if($($g,Lc,-1),!M($g,ft))return;const{offsetX:C,offsetY:i,pointerId:e}=g;if(M($g,ya)===e){if(((A=M($g,Na))==null?void 0:A.size)>=1){this._endDraw(g);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,M($g,ft).add(C,i)),$($g,Lc,g.timeStamp),at(g)}}static _cleanup(g){g&&(this._currentDrawId=-1,this._currentParent=null,$($g,ft,null),$($g,Jc,null),$($g,Ya,null),$($g,Lc,NaN)),M($g,zc)&&(M($g,zc).abort(),$($g,zc,null),$($g,ya,NaN),$($g,Na,null))}static _endDraw(g){const C=this._currentParent;if(C){if(C.toggleDrawing(!0),this._cleanup(!1),(g==null?void 0:g.target)===C.div&&C.drawLayer.updateProperties(this._currentDrawId,M($g,ft).end(g.offsetX,g.offsetY)),this.supportMultipleDrawings){const i=M($g,ft),e=this._currentDrawId,A=i.getLastElement();C.addCommands({cmd:()=>{C.drawLayer.updateProperties(e,i.setLastElement(A))},undo:()=>{C.drawLayer.updateProperties(e,i.removeLastElement())},mustExec:!1,type:gC.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(g){const C=this._currentParent;if(!C)return null;if(C.toggleDrawing(!0),C.cleanUndoStack(gC.DRAW_STEP),!M($g,ft).isEmpty()){const{pageDimensions:[i,e],scale:A}=C,s=C.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:M($g,ft).getOutlines(i*A,e*A,A,this._INNER_MARGIN),drawingOptions:M($g,Jc),mustBeCommitted:!g});return this._cleanup(!0),s}return C.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(g){}static deserializeDraw(g,C,i,e,A,s){ZC("Not implemented")}static async deserialize(g,C,i){var d,o;const{rawDims:{pageWidth:e,pageHeight:A,pageX:s,pageY:l}}=C.viewport,n=this.deserializeDraw(s,l,e,A,this._INNER_MARGIN,g),a=await super.deserialize(g,C,i);return a.createDrawingOptions(g),eg(d=a,tC,RS).call(d,{drawOutlines:n}),eg(o=a,tC,ju).call(o),a.onScaleChanging(),a.rotate(),a}serializeDraw(g){const[C,i]=this.pageTranslation,[e,A]=this.pageDimensions;return M(this,ce).serialize([C,i,e,A],g)}renderAnnotationElement(g){return g.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};ce=new WeakMap,e0=new WeakMap,ft=new WeakMap,zc=new WeakMap,Jc=new WeakMap,ya=new WeakMap,Ya=new WeakMap,Na=new WeakMap,Lc=new WeakMap,tC=new WeakSet,RS=function({drawOutlines:g,drawId:C,drawingOptions:i}){$(this,ce,g),this._drawingOptions||(this._drawingOptions=i),C>=0?(this._drawId=C,this.parent.drawLayer.finalizeDraw(C,g.defaultProperties)):this._drawId=eg(this,tC,fS).call(this,g,this.parent),eg(this,tC,Qu).call(this,g.box)},fS=function(g,C){const{id:i}=C.drawLayer.draw($g._mergeSVGProperties(this._drawingOptions.toSVGProperties(),g.defaultSVGProperties),!1,!1);return i},HS=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},ju=function(g=this.parent){if(!(this._drawId!==null&&this.parent===g)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,g.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=eg(this,tC,fS).call(this,M(this,ce),g)}},IIg=function([g,C,i,e]){const{parentDimensions:[A,s],rotation:l}=this;switch(l){case 90:return[C,1-g,i*(s/A),e*(A/s)];case 180:return[1-g,1-C,i,e];case 270:return[1-C,g,i*(s/A),e*(A/s)];default:return[g,C,i,e]}},mN=function(){const{x:g,y:C,width:i,height:e,parentDimensions:[A,s],rotation:l}=this;switch(l){case 90:return[1-C,g,i*(A/s),e*(s/A)];case 180:return[1-g,1-C,i,e];case 270:return[C,1-g,i*(A/s),e*(s/A)];default:return[g,C,i,e]}},Qu=function(g){if([this.x,this.y,this.width,this.height]=eg(this,tC,IIg).call(this,g),this.div){this.fixAndSetPosition();const[C,i]=this.parentDimensions;this.setDims(this.width*C,this.height*i)}this._onResized()},Tr=function(){const{x:g,y:C,width:i,height:e,rotation:A,parentRotation:s,parentDimensions:[l,n]}=this;switch((A*4+s)/90){case 1:return[1-C-e,g,e,i];case 2:return[1-g-i,1-C-e,i,e];case 3:return[C,1-g-i,e,i];case 4:return[g,C-i*(l/n),e*(n/l),i*(l/n)];case 5:return[1-C,g,i*(l/n),e*(n/l)];case 6:return[1-g-e*(n/l),1-C,e*(n/l),i*(l/n)];case 7:return[C-i*(l/n),1-g-e*(n/l),i*(l/n),e*(n/l)];case 8:return[g-i,C-e,i,e];case 9:return[1-C,g-i,e,i];case 10:return[1-g,1-C,i,e];case 11:return[C-e,1-g,e,i];case 12:return[g-e*(n/l),C,e*(n/l),i*(l/n)];case 13:return[1-C-i*(l/n),g-e*(n/l),i*(l/n),e*(n/l)];case 14:return[1-g,1-C-i*(l/n),e*(n/l),i*(l/n)];case 15:return[C,1-g,i*(l/n),e*(n/l)];default:return[g,C,i,e]}},CI($g,"_currentDrawId",-1),CI($g,"_currentParent",null),ig($g,ft,null),ig($g,zc,null),ig($g,Jc,null),ig($g,ya,NaN),ig($g,Ya,null),ig($g,Na,null),ig($g,Lc,NaN),CI($g,"_INNER_MARGIN",3);let UN=$g;var us,Ht,Xt,vc,A0,wi,Qt,ve,Tc,xc,jc,s0,ZN;class sdg{constructor(I,g,C,i,e,A){ig(this,s0);ig(this,us,new Float64Array(6));ig(this,Ht);ig(this,Xt);ig(this,vc);ig(this,A0);ig(this,wi);ig(this,Qt,"");ig(this,ve,0);ig(this,Tc,new qZ);ig(this,xc);ig(this,jc);$(this,xc,C),$(this,jc,i),$(this,vc,e),$(this,A0,A),[I,g]=eg(this,s0,ZN).call(this,I,g);const s=$(this,Ht,[NaN,NaN,NaN,NaN,I,g]);$(this,wi,[I,g]),$(this,Xt,[{line:s,points:M(this,wi)}]),M(this,us).set(s,0)}updateProperty(I,g){I==="stroke-width"&&$(this,A0,g)}isEmpty(){return!M(this,Xt)||M(this,Xt).length===0}isCancellable(){return M(this,wi).length<=10}add(I,g){[I,g]=eg(this,s0,ZN).call(this,I,g);const[C,i,e,A]=M(this,us).subarray(2,6),s=I-e,l=g-A;return Math.hypot(M(this,xc)*s,M(this,jc)*l)<=2?null:(M(this,wi).push(I,g),isNaN(C)?(M(this,us).set([e,A,I,g],2),M(this,Ht).push(NaN,NaN,NaN,NaN,I,g),{path:{d:this.toSVGPath()}}):(isNaN(M(this,us)[0])&&M(this,Ht).splice(6,6),M(this,us).set([C,i,e,A,I,g],0),M(this,Ht).push(..._g.createBezierPoints(C,i,e,A,I,g)),{path:{d:this.toSVGPath()}}))}end(I,g){const C=this.add(I,g);return C||(M(this,wi).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(I,g,C,i,e){$(this,xc,C),$(this,jc,i),$(this,vc,e),[I,g]=eg(this,s0,ZN).call(this,I,g);const A=$(this,Ht,[NaN,NaN,NaN,NaN,I,g]);$(this,wi,[I,g]);const s=M(this,Xt).at(-1);return s&&(s.line=new Float32Array(s.line),s.points=new Float32Array(s.points)),M(this,Xt).push({line:A,points:M(this,wi)}),M(this,us).set(A,0),$(this,ve,0),this.toSVGPath(),null}getLastElement(){return M(this,Xt).at(-1)}setLastElement(I){return M(this,Xt)?(M(this,Xt).push(I),$(this,Ht,I.line),$(this,wi,I.points),$(this,ve,0),{path:{d:this.toSVGPath()}}):M(this,Tc).setLastElement(I)}removeLastElement(){if(!M(this,Xt))return M(this,Tc).removeLastElement();M(this,Xt).pop(),$(this,Qt,"");for(let I=0,g=M(this,Xt).length;I<g;I++){const{line:C,points:i}=M(this,Xt)[I];$(this,Ht,C),$(this,wi,i),$(this,ve,0),this.toSVGPath()}return{path:{d:M(this,Qt)}}}toSVGPath(){const I=_g.svgRound(M(this,Ht)[4]),g=_g.svgRound(M(this,Ht)[5]);if(M(this,wi).length===2)return $(this,Qt,`${M(this,Qt)} M ${I} ${g} Z`),M(this,Qt);if(M(this,wi).length<=6){const i=M(this,Qt).lastIndexOf("M");$(this,Qt,`${M(this,Qt).slice(0,i)} M ${I} ${g}`),$(this,ve,6)}if(M(this,wi).length===4){const i=_g.svgRound(M(this,Ht)[10]),e=_g.svgRound(M(this,Ht)[11]);return $(this,Qt,`${M(this,Qt)} L ${i} ${e}`),$(this,ve,12),M(this,Qt)}const C=[];M(this,ve)===0&&(C.push(`M ${I} ${g}`),$(this,ve,6));for(let i=M(this,ve),e=M(this,Ht).length;i<e;i+=6){const[A,s,l,n,a,d]=M(this,Ht).slice(i,i+6).map(_g.svgRound);C.push(`C${A} ${s} ${l} ${n} ${a} ${d}`)}return $(this,Qt,M(this,Qt)+C.join(" ")),$(this,ve,M(this,Ht).length),M(this,Qt)}getOutlines(I,g,C,i){const e=M(this,Xt).at(-1);return e.line=new Float32Array(e.line),e.points=new Float32Array(e.points),M(this,Tc).build(M(this,Xt),I,g,C,M(this,vc),M(this,A0),i),$(this,us,null),$(this,Ht,null),$(this,Xt,null),$(this,Qt,null),M(this,Tc)}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}us=new WeakMap,Ht=new WeakMap,Xt=new WeakMap,vc=new WeakMap,A0=new WeakMap,wi=new WeakMap,Qt=new WeakMap,ve=new WeakMap,Tc=new WeakMap,xc=new WeakMap,jc=new WeakMap,s0=new WeakSet,ZN=function(I,g){return _g._normalizePoint(I,g,M(this,xc),M(this,jc),M(this,vc))};var pi,TZ,xZ,de,ms,Zs,l0,n0,Qc,qt,el,CIg,tIg,iIg;class qZ extends _g{constructor(){super(...arguments);ig(this,qt);ig(this,pi);ig(this,TZ,0);ig(this,xZ);ig(this,de);ig(this,ms);ig(this,Zs);ig(this,l0);ig(this,n0);ig(this,Qc)}build(g,C,i,e,A,s,l){$(this,ms,C),$(this,Zs,i),$(this,l0,e),$(this,n0,A),$(this,Qc,s),$(this,xZ,l??0),$(this,de,g),eg(this,qt,tIg).call(this)}get thickness(){return M(this,Qc)}setLastElement(g){return M(this,de).push(g),{path:{d:this.toSVGPath()}}}removeLastElement(){return M(this,de).pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const g=[];for(const{line:C}of M(this,de)){if(g.push(`M${_g.svgRound(C[4])} ${_g.svgRound(C[5])}`),C.length===6){g.push("Z");continue}if(C.length===12&&isNaN(C[6])){g.push(`L${_g.svgRound(C[10])} ${_g.svgRound(C[11])}`);continue}for(let i=6,e=C.length;i<e;i+=6){const[A,s,l,n,a,d]=C.subarray(i,i+6).map(_g.svgRound);g.push(`C${A} ${s} ${l} ${n} ${a} ${d}`)}}return g.join("")}serialize([g,C,i,e],A){const s=[],l=[],[n,a,d,o]=eg(this,qt,CIg).call(this);let c,r,h,b,u,m,Z,p,Y;switch(M(this,n0)){case 0:Y=_g._rescale,c=g,r=C+e,h=i,b=-e,u=g+n*i,m=C+(1-a-o)*e,Z=g+(n+d)*i,p=C+(1-a)*e;break;case 90:Y=_g._rescaleAndSwap,c=g,r=C,h=i,b=e,u=g+a*i,m=C+n*e,Z=g+(a+o)*i,p=C+(n+d)*e;break;case 180:Y=_g._rescale,c=g+i,r=C,h=-i,b=e,u=g+(1-n-d)*i,m=C+a*e,Z=g+(1-n)*i,p=C+(a+o)*e;break;case 270:Y=_g._rescaleAndSwap,c=g+i,r=C+e,h=-i,b=-e,u=g+(1-a-o)*i,m=C+(1-n-d)*e,Z=g+(1-a)*i,p=C+(1-n)*e;break}for(const{line:R,points:X}of M(this,de))s.push(Y(R,c,r,h,b,A?new Array(R.length):null)),l.push(Y(X,c,r,h,b,A?new Array(X.length):null));return{lines:s,points:l,rect:[u,m,Z,p]}}static deserialize(g,C,i,e,A,{paths:{lines:s,points:l},rotation:n,thickness:a}){const d=[];let o,c,r,h,b;switch(n){case 0:b=_g._rescale,o=-g/i,c=C/e+1,r=1/i,h=-1/e;break;case 90:b=_g._rescaleAndSwap,o=-C/e,c=-g/i,r=1/e,h=1/i;break;case 180:b=_g._rescale,o=g/i+1,c=-C/e,r=-1/i,h=1/e;break;case 270:b=_g._rescaleAndSwap,o=C/e+1,c=g/i+1,r=-1/e,h=-1/i;break}if(!s){s=[];for(const m of l){const Z=m.length;if(Z===2){s.push(new Float32Array([NaN,NaN,NaN,NaN,m[0],m[1]]));continue}if(Z===4){s.push(new Float32Array([NaN,NaN,NaN,NaN,m[0],m[1],NaN,NaN,NaN,NaN,m[2],m[3]]));continue}const p=new Float32Array(3*(Z-2));s.push(p);let[Y,R,X,H]=m.subarray(0,4);p.set([NaN,NaN,NaN,NaN,Y,R],0);for(let S=4;S<Z;S+=2){const z=m[S],v=m[S+1];p.set(_g.createBezierPoints(Y,R,X,H,z,v),(S-2)*3),[Y,R,X,H]=[X,H,z,v]}}}for(let m=0,Z=s.length;m<Z;m++)d.push({line:b(s[m].map(p=>p??NaN),o,c,r,h),points:b(l[m].map(p=>p??NaN),o,c,r,h)});const u=new this.prototype.constructor;return u.build(d,i,e,1,n,a,A),u}get box(){return M(this,pi)}updateProperty(g,C){return g==="stroke-width"?eg(this,qt,iIg).call(this,C):null}updateParentDimensions([g,C],i){const[e,A]=eg(this,qt,el).call(this);$(this,ms,g),$(this,Zs,C),$(this,l0,i);const[s,l]=eg(this,qt,el).call(this),n=s-e,a=l-A,d=M(this,pi);return d[0]-=n,d[1]-=a,d[2]+=2*n,d[3]+=2*a,d}updateRotation(g){return $(this,TZ,g),{path:{transform:this.rotationTransform}}}get viewBox(){return M(this,pi).map(_g.svgRound).join(" ")}get defaultProperties(){const[g,C]=M(this,pi);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${_g.svgRound(g)} ${_g.svgRound(C)}`}}}get rotationTransform(){const[,,g,C]=M(this,pi);let i=0,e=0,A=0,s=0,l=0,n=0;switch(M(this,TZ)){case 90:e=C/g,A=-g/C,l=g;break;case 180:i=-1,s=-1,l=g,n=C;break;case 270:e=-C/g,A=g/C,n=C;break;default:return""}return`matrix(${i} ${e} ${A} ${s} ${_g.svgRound(l)} ${_g.svgRound(n)})`}getPathResizingSVGProperties([g,C,i,e]){const[A,s]=eg(this,qt,el).call(this),[l,n,a,d]=M(this,pi);if(Math.abs(a-A)<=_g.PRECISION||Math.abs(d-s)<=_g.PRECISION){const b=g+i/2-(l+a/2),u=C+e/2-(n+d/2);return{path:{"transform-origin":`${_g.svgRound(g)} ${_g.svgRound(C)}`,transform:`${this.rotationTransform} translate(${b} ${u})`}}}const o=(i-2*A)/(a-2*A),c=(e-2*s)/(d-2*s),r=a/i,h=d/e;return{path:{"transform-origin":`${_g.svgRound(l)} ${_g.svgRound(n)}`,transform:`${this.rotationTransform} scale(${r} ${h}) translate(${_g.svgRound(A)} ${_g.svgRound(s)}) scale(${o} ${c}) translate(${_g.svgRound(-A)} ${_g.svgRound(-s)})`}}}getPathResizedSVGProperties([g,C,i,e]){const[A,s]=eg(this,qt,el).call(this),l=M(this,pi),[n,a,d,o]=l;if(l[0]=g,l[1]=C,l[2]=i,l[3]=e,Math.abs(d-A)<=_g.PRECISION||Math.abs(o-s)<=_g.PRECISION){const u=g+i/2-(n+d/2),m=C+e/2-(a+o/2);for(const{line:Z,points:p}of M(this,de))_g._translate(Z,u,m,Z),_g._translate(p,u,m,p);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${_g.svgRound(g)} ${_g.svgRound(C)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const c=(i-2*A)/(d-2*A),r=(e-2*s)/(o-2*s),h=-c*(n+A)+g+A,b=-r*(a+s)+C+s;if(c!==1||r!==1||h!==0||b!==0)for(const{line:u,points:m}of M(this,de))_g._rescale(u,h,b,c,r,u),_g._rescale(m,h,b,c,r,m);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${_g.svgRound(g)} ${_g.svgRound(C)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([g,C],i){const[e,A]=i,s=M(this,pi),l=g-s[0],n=C-s[1];if(M(this,ms)===e&&M(this,Zs)===A)for(const{line:a,points:d}of M(this,de))_g._translate(a,l,n,a),_g._translate(d,l,n,d);else{const a=M(this,ms)/e,d=M(this,Zs)/A;$(this,ms,e),$(this,Zs,A);for(const{line:o,points:c}of M(this,de))_g._rescale(o,l,n,a,d,o),_g._rescale(c,l,n,a,d,c);s[2]*=a,s[3]*=d}return s[0]=g,s[1]=C,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${_g.svgRound(g)} ${_g.svgRound(C)}`}}}get defaultSVGProperties(){const g=M(this,pi);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${_g.svgRound(g[0])} ${_g.svgRound(g[1])}`,transform:this.rotationTransform||null},bbox:g}}}pi=new WeakMap,TZ=new WeakMap,xZ=new WeakMap,de=new WeakMap,ms=new WeakMap,Zs=new WeakMap,l0=new WeakMap,n0=new WeakMap,Qc=new WeakMap,qt=new WeakSet,el=function(g=M(this,Qc)){const C=M(this,xZ)+g/2*M(this,l0);return M(this,n0)%180===0?[C/M(this,ms),C/M(this,Zs)]:[C/M(this,Zs),C/M(this,ms)]},CIg=function(){const[g,C,i,e]=M(this,pi),[A,s]=eg(this,qt,el).call(this,0);return[g+A,C+s,i-2*A,e-2*s]},tIg=function(){const g=$(this,pi,new Float32Array([1/0,1/0,-1/0,-1/0]));for(const{line:e}of M(this,de)){if(e.length<=12){for(let l=4,n=e.length;l<n;l+=6)iI.pointBoundingBox(e[l],e[l+1],g);continue}let A=e[4],s=e[5];for(let l=6,n=e.length;l<n;l+=6){const[a,d,o,c,r,h]=e.subarray(l,l+6);iI.bezierBoundingBox(A,s,a,d,o,c,r,h,g),A=r,s=h}}const[C,i]=eg(this,qt,el).call(this);g[0]=Wi(g[0]-C,0,1),g[1]=Wi(g[1]-i,0,1),g[2]=Wi(g[2]+C,0,1),g[3]=Wi(g[3]+i,0,1),g[2]-=g[0],g[3]-=g[1]},iIg=function(g){const[C,i]=eg(this,qt,el).call(this);$(this,Qc,g);const[e,A]=eg(this,qt,el).call(this),[s,l]=[e-C,A-i],n=M(this,pi);return n[0]-=s,n[1]-=l,n[2]+=2*s,n[3]+=2*l,n};class JV extends gIg{constructor(I){super(),this._viewParameters=I,super.updateProperties({fill:"none",stroke:zC._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(I,g){I==="stroke-width"&&(g??(g=this["stroke-width"]),g*=this._viewParameters.realScale),super.updateSVGProperty(I,g)}clone(){const I=new JV(this._viewParameters);return I.updateAll(this),I}}var XV,eIg;const $r=class $r extends UN{constructor(g){super({...g,name:"inkEditor"});ig(this,XV);this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(g,C){zC.initialize(g,C),this._defaultDrawingOptions=new JV(C.viewParameters)}static getDefaultDrawingOptions(g){const C=this._defaultDrawingOptions.clone();return C.updateProperties(g),C}static get supportMultipleDrawings(){return!0}static get typesMap(){return jI(this,"typesMap",new Map([[gC.INK_THICKNESS,"stroke-width"],[gC.INK_COLOR,"stroke"],[gC.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(g,C,i,e,A){return new sdg(g,C,i,e,A,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(g,C,i,e,A,s){return qZ.deserialize(g,C,i,e,A,s)}static async deserialize(g,C,i){let e=null;if(g instanceof A9){const{data:{inkLists:s,rect:l,rotation:n,id:a,color:d,opacity:o,borderStyle:{rawWidth:c},popupRef:r},parent:{page:{pageNumber:h}}}=g;e=g={annotationType:RI.INK,color:Array.from(d),thickness:c,opacity:o,paths:{points:s},boxes:null,pageIndex:h-1,rect:l.slice(0),rotation:n,id:a,deleted:!1,popupRef:r}}const A=await super.deserialize(g,C,i);return A.annotationElementId=g.id||null,A._initialData=e,A}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:g,_drawingOptions:C,parent:i}=this;C.updateSVGProperty("stroke-width"),i.drawLayer.updateProperties(g,C.toSVGProperties())}static onScaleChangingWhenDrawing(){const g=this._currentParent;g&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),g.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:g,thickness:C,opacity:i}){this._drawingOptions=$r.getDefaultDrawingOptions({stroke:iI.makeHexColor(...g),"stroke-width":C,"stroke-opacity":i})}serialize(g=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:C,points:i,rect:e}=this.serializeDraw(g),{_drawingOptions:{stroke:A,"stroke-opacity":s,"stroke-width":l}}=this,n={annotationType:RI.INK,color:zC._colorManager.convert(A),opacity:s,thickness:l,paths:{lines:C,points:i},pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return g?(n.isCopy=!0,n):this.annotationElementId&&!eg(this,XV,eIg).call(this,n)?null:(n.id=this.annotationElementId,n)}renderAnnotationElement(g){const{points:C,rect:i}=this.serializeDraw(!1);return g.updateEdited({rect:i,thickness:this._drawingOptions["stroke-width"],points:C}),null}};XV=new WeakSet,eIg=function(g){const{color:C,thickness:i,opacity:e,pageIndex:A}=this._initialData;return this._hasBeenMoved||this._hasBeenResized||g.color.some((s,l)=>s!==C[l])||g.thickness!==i||g.opacity!==e||g.pageIndex!==A},CI($r,"_type","ink"),CI($r,"_editorType",RI.INK),CI($r,"_defaultDrawingOptions",null);let XS=$r;class SS extends qZ{toSVGPath(){let I=super.toSVGPath();return I.endsWith("Z")||(I+="Z"),I}}const VY=8,yu=3;var Oc,aC,DS,pA,AIg,sIg,KS,GN,lIg,nIg,aIg,FS,kS,oIg;class Fl{static extractContoursFromText(I,{fontFamily:g,fontStyle:C,fontWeight:i},e,A,s,l){let n=new OffscreenCanvas(1,1),a=n.getContext("2d",{alpha:!1});const d=200,o=a.font=`${C} ${i} ${d}px ${g}`,{actualBoundingBoxLeft:c,actualBoundingBoxRight:r,actualBoundingBoxAscent:h,actualBoundingBoxDescent:b,fontBoundingBoxAscent:u,fontBoundingBoxDescent:m,width:Z}=a.measureText(I),p=1.5,Y=Math.ceil(Math.max(Math.abs(c)+Math.abs(r)||0,Z)*p),R=Math.ceil(Math.max(Math.abs(h)+Math.abs(b)||d,Math.abs(u)+Math.abs(m)||d)*p);n=new OffscreenCanvas(Y,R),a=n.getContext("2d",{alpha:!0,willReadFrequently:!0}),a.font=o,a.filter="grayscale(1)",a.fillStyle="white",a.fillRect(0,0,Y,R),a.fillStyle="black",a.fillText(I,Y*(p-1)/2,R*(3-p)/2);const X=eg(this,aC,FS).call(this,a.getImageData(0,0,Y,R).data),H=eg(this,aC,aIg).call(this,X),S=eg(this,aC,kS).call(this,H),z=eg(this,aC,KS).call(this,X,Y,R,S);return this.processDrawnLines({lines:{curves:z,width:Y,height:R},pageWidth:e,pageHeight:A,rotation:s,innerMargin:l,mustSmooth:!0,areContours:!0})}static process(I,g,C,i,e){const[A,s,l]=eg(this,aC,oIg).call(this,I),[n,a]=eg(this,aC,nIg).call(this,A,s,l,Math.hypot(s,l)*M(this,Oc).sigmaSFactor,M(this,Oc).sigmaR,M(this,Oc).kernelSize),d=eg(this,aC,kS).call(this,a),o=eg(this,aC,KS).call(this,n,s,l,d);return this.processDrawnLines({lines:{curves:o,width:s,height:l},pageWidth:g,pageHeight:C,rotation:i,innerMargin:e,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:I,pageWidth:g,pageHeight:C,rotation:i,innerMargin:e,mustSmooth:A,areContours:s}){i%180!==0&&([g,C]=[C,g]);const{curves:l,width:n,height:a}=I,d=I.thickness??0,o=[],c=Math.min(g/n,C/a),r=c/g,h=c/C,b=[];for(const{points:m}of l){const Z=A?eg(this,aC,lIg).call(this,m):m;if(!Z)continue;b.push(Z);const p=Z.length,Y=new Float32Array(p),R=new Float32Array(3*(p===2?2:p-2));if(o.push({line:R,points:Y}),p===2){Y[0]=Z[0]*r,Y[1]=Z[1]*h,R.set([NaN,NaN,NaN,NaN,Y[0],Y[1]],0);continue}let[X,H,S,z]=Z;X*=r,H*=h,S*=r,z*=h,Y.set([X,H,S,z],0),R.set([NaN,NaN,NaN,NaN,X,H],0);for(let v=4;v<p;v+=2){const K=Y[v]=Z[v]*r,V=Y[v+1]=Z[v+1]*h;R.set(_g.createBezierPoints(X,H,S,z,K,V),(v-2)*3),[X,H,S,z]=[S,z,K,V]}}if(o.length===0)return null;const u=s?new SS:new qZ;return u.build(o,g,C,1,i,s?0:d,e),{outline:u,newCurves:b,areContours:s,thickness:d,width:n,height:a}}static async compressSignature({outlines:I,areContours:g,thickness:C,width:i,height:e}){let A=1/0,s=-1/0,l=0;for(const Z of I){l+=Z.length;for(let p=2,Y=Z.length;p<Y;p++){const R=Z[p]-Z[p-2];A=Math.min(A,R),s=Math.max(s,R)}}let n;A>=-128&&s<=127?n=Int8Array:A>=-32768&&s<=32767?n=Int16Array:n=Int32Array;const a=I.length,d=VY+yu*a,o=new Uint32Array(d);let c=0;o[c++]=d*Uint32Array.BYTES_PER_ELEMENT+(l-2*a)*n.BYTES_PER_ELEMENT,o[c++]=0,o[c++]=i,o[c++]=e,o[c++]=g?0:1,o[c++]=Math.max(0,Math.floor(C??0)),o[c++]=a,o[c++]=n.BYTES_PER_ELEMENT;for(const Z of I)o[c++]=Z.length-2,o[c++]=Z[0],o[c++]=Z[1];const r=new CompressionStream("deflate-raw"),h=r.writable.getWriter();await h.ready,h.write(o);const b=n.prototype.constructor;for(const Z of I){const p=new b(Z.length-2);for(let Y=2,R=Z.length;Y<R;Y++)p[Y-2]=Z[Y]-Z[Y-2];h.write(p)}h.close();const u=await new Response(r.readable).arrayBuffer(),m=new Uint8Array(u);return r$(m)}static async decompressSignature(I){try{const g=Rog(I),{readable:C,writable:i}=new DecompressionStream("deflate-raw"),e=i.getWriter();await e.ready,e.write(g).then(async()=>{await e.ready,await e.close()}).catch(()=>{});let A=null,s=0;for await(const Z of C)A||(A=new Uint8Array(new Uint32Array(Z.buffer,0,4)[0])),A.set(Z,s),s+=Z.length;const l=new Uint32Array(A.buffer,0,A.length>>2),n=l[1];if(n!==0)throw new Error(`Invalid version: ${n}`);const a=l[2],d=l[3],o=l[4]===0,c=l[5],r=l[6],h=l[7],b=[],u=(VY+yu*r)*Uint32Array.BYTES_PER_ELEMENT;let m;switch(h){case Int8Array.BYTES_PER_ELEMENT:m=new Int8Array(A.buffer,u);break;case Int16Array.BYTES_PER_ELEMENT:m=new Int16Array(A.buffer,u);break;case Int32Array.BYTES_PER_ELEMENT:m=new Int32Array(A.buffer,u);break}s=0;for(let Z=0;Z<r;Z++){const p=l[yu*Z+VY],Y=new Float32Array(p+2);b.push(Y);for(let R=0;R<yu-1;R++)Y[R]=l[yu*Z+VY+R+1];for(let R=0;R<p;R++)Y[R+2]=Y[R]+m[s++]}return{areContours:o,thickness:c,outlines:b,width:a,height:d}}catch(g){return HI(`decompressSignature: ${g}`),null}}}Oc=new WeakMap,aC=new WeakSet,DS=function(I,g,C,i){return C-=I,i-=g,C===0?i>0?0:4:C===1?i+6:2-i},pA=new WeakMap,AIg=function(I,g,C,i,e,A,s){const l=eg(this,aC,DS).call(this,C,i,e,A);for(let n=0;n<8;n++){const a=(-n+l-s+16)%8,d=M(this,pA)[2*a],o=M(this,pA)[2*a+1];if(I[(C+d)*g+(i+o)]!==0)return a}return-1},sIg=function(I,g,C,i,e,A,s){const l=eg(this,aC,DS).call(this,C,i,e,A);for(let n=0;n<8;n++){const a=(n+l+s+16)%8,d=M(this,pA)[2*a],o=M(this,pA)[2*a+1];if(I[(C+d)*g+(i+o)]!==0)return a}return-1},KS=function(I,g,C,i){const e=I.length,A=new Int32Array(e);for(let a=0;a<e;a++)A[a]=I[a]<=i?1:0;for(let a=1;a<C-1;a++)A[a*g]=A[a*g+g-1]=0;for(let a=0;a<g;a++)A[a]=A[g*C-1-a]=0;let s=1,l;const n=[];for(let a=1;a<C-1;a++){l=1;for(let d=1;d<g-1;d++){const o=a*g+d,c=A[o];if(c===0)continue;let r=a,h=d;if(c===1&&A[o-1]===0)s+=1,h-=1;else if(c>=1&&A[o+1]===0)s+=1,h+=1,c>1&&(l=c);else{c!==1&&(l=Math.abs(c));continue}const b=[d,a],u=h===d+1,m={isHole:u,points:b,id:s,parent:0};n.push(m);let Z;for(const v of n)if(v.id===l){Z=v;break}Z?Z.isHole?m.parent=u?Z.parent:l:m.parent=u?l:Z.parent:m.parent=u?l:0;const p=eg(this,aC,AIg).call(this,A,g,a,d,r,h,0);if(p===-1){A[o]=-s,A[o]!==1&&(l=Math.abs(A[o]));continue}let Y=M(this,pA)[2*p],R=M(this,pA)[2*p+1];const X=a+Y,H=d+R;r=X,h=H;let S=a,z=d;for(;;){const v=eg(this,aC,sIg).call(this,A,g,S,z,r,h,1);Y=M(this,pA)[2*v],R=M(this,pA)[2*v+1];const K=S+Y,V=z+R;b.push(V,K);const N=S*g+z;if(A[N+1]===0?A[N]=-s:A[N]===1&&(A[N]=s),K===a&&V===d&&S===X&&z===H){A[o]!==1&&(l=Math.abs(A[o]));break}else r=S,h=z,S=K,z=V}}}return n},GN=function(I,g,C,i){if(C-g<=4){for(let X=g;X<C-2;X+=2)i.push(I[X],I[X+1]);return}const e=I[g],A=I[g+1],s=I[C-4]-e,l=I[C-3]-A,n=Math.hypot(s,l),a=s/n,d=l/n,o=a*A-d*e,c=l/s,r=1/n,h=Math.atan(c),b=Math.cos(h),u=Math.sin(h),m=r*(Math.abs(b)+Math.abs(u)),Z=r*(1-m+m**2),p=Math.max(Math.atan(Math.abs(u+b)*Z),Math.atan(Math.abs(u-b)*Z));let Y=0,R=g;for(let X=g+2;X<C-2;X+=2){const H=Math.abs(o-a*I[X+1]+d*I[X]);H>Y&&(R=X,Y=H)}Y>(n*p)**2?(eg(this,aC,GN).call(this,I,g,R+2,i),eg(this,aC,GN).call(this,I,R,C,i)):i.push(e,A)},lIg=function(I){const g=[],C=I.length;return eg(this,aC,GN).call(this,I,0,C,g),g.push(I[C-2],I[C-1]),g.length<=4?null:g},nIg=function(I,g,C,i,e,A){const s=new Float32Array(A**2),l=-2*i**2,n=A>>1;for(let h=0;h<A;h++){const b=(h-n)**2;for(let u=0;u<A;u++)s[h*A+u]=Math.exp((b+(u-n)**2)/l)}const a=new Float32Array(256),d=-2*e**2;for(let h=0;h<256;h++)a[h]=Math.exp(h**2/d);const o=I.length,c=new Uint8Array(o),r=new Uint32Array(256);for(let h=0;h<C;h++)for(let b=0;b<g;b++){const u=h*g+b,m=I[u];let Z=0,p=0;for(let R=0;R<A;R++){const X=h+R-n;if(!(X<0||X>=C))for(let H=0;H<A;H++){const S=b+H-n;if(S<0||S>=g)continue;const z=I[X*g+S],v=s[R*A+H]*a[Math.abs(z-m)];Z+=z*v,p+=v}}const Y=c[u]=Math.round(Z/p);r[Y]++}return[c,r]},aIg=function(I){const g=new Uint32Array(256);for(const C of I)g[C]++;return g},FS=function(I){const g=I.length,C=new Uint8ClampedArray(g>>2);let i=-1/0,e=1/0;for(let s=0,l=C.length;s<l;s++){if(I[(s<<2)+3]===0){i=C[s]=255;continue}const a=C[s]=I[s<<2];a>i&&(i=a),a<e&&(e=a)}const A=255/(i-e);for(let s=0;s<g;s++)C[s]=(C[s]-e)*A;return C},kS=function(I){let g,C=-1/0,i=-1/0;const e=I.findIndex(l=>l!==0);let A=e,s=e;for(g=e;g<256;g++){const l=I[g];l>C&&(g-A>i&&(i=g-A,s=g-1),C=l,A=g)}for(g=s-1;g>=0&&!(I[g]>I[g+1]);g--);return g},oIg=function(I){const g=I,{width:C,height:i}=I,{maxDim:e}=M(this,Oc);let A=C,s=i;if(C>e||i>e){let o=C,c=i,r=Math.log2(Math.max(C,i)/e);const h=Math.floor(r);r=r===h?h-1:h;for(let u=0;u<r;u++){A=o,s=c,A>e&&(A=Math.ceil(A/2)),s>e&&(s=Math.ceil(s/2));const m=new OffscreenCanvas(A,s);m.getContext("2d").drawImage(I,0,0,o,c,0,0,A,s),o=A,c=s,I!==g&&I.close(),I=m.transferToImageBitmap()}const b=Math.min(e/A,e/s);A=Math.round(A*b),s=Math.round(s*b)}const n=new OffscreenCanvas(A,s).getContext("2d",{willReadFrequently:!0});n.filter="grayscale(1)",n.drawImage(I,0,0,I.width,I.height,0,0,A,s);const a=n.getImageData(0,0,A,s).data;return[eg(this,aC,FS).call(this,a),A,s]},ig(Fl,aC),ig(Fl,Oc,{maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16}),ig(Fl,pA,new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]));class s9 extends gIg{constructor(){super(),super.updateProperties({fill:"CanvasText","stroke-width":0})}clone(){const I=new s9;return I.updateAll(this),I}}class l9 extends JV{constructor(I){super(I),super.updateProperties({stroke:"CanvasText","stroke-width":1})}clone(){const I=new l9(this._viewParameters);return I.updateAll(this),I}}var Va,re,Ma,Ra;const ge=class ge extends UN{constructor(g){super({...g,mustBeCommitted:!0,name:"signatureEditor"});ig(this,Va,!1);ig(this,re,null);ig(this,Ma,null);ig(this,Ra,null);this._willKeepAspectRatio=!0,$(this,Ma,g.signatureData||null),$(this,re,null),this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(g,C){zC.initialize(g,C),this._defaultDrawingOptions=new s9,this._defaultDrawnSignatureOptions=new l9(C.viewParameters)}static getDefaultDrawingOptions(g){const C=this._defaultDrawingOptions.clone();return C.updateProperties(g),C}static get supportMultipleDrawings(){return!1}static get typesMap(){return jI(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!M(this,re)}}static computeTelemetryFinalData(g){const C=g.get("hasDescription");return{hasAltText:C.get(!0)??0,hasNoAltText:C.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let g,C;const{_isCopy:i}=this;if(i&&(this._isCopy=!1,g=this.x,C=this.y),super.render(),this._drawId===null)if(M(this,Ma)){const{lines:e,mustSmooth:A,areContours:s,description:l,uuid:n,heightInPage:a}=M(this,Ma),{rawDims:{pageWidth:d,pageHeight:o},rotation:c}=this.parent.viewport,r=Fl.processDrawnLines({lines:e,pageWidth:d,pageHeight:o,rotation:c,innerMargin:ge._INNER_MARGIN,mustSmooth:A,areContours:s});this.addSignature(r,a,l,n)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);return i&&(this._isCopy=!0,this._moveAfterPaste(g,C)),this.div}setUuid(g){$(this,Ra,g),this.addEditToolbar()}getUuid(){return M(this,Ra)}get description(){return M(this,re)}set description(g){$(this,re,g),super.addEditToolbar().then(C=>{C==null||C.updateEditSignatureButton(g)})}getSignaturePreview(){const{newCurves:g,areContours:C,thickness:i,width:e,height:A}=M(this,Ma),s=Math.max(e,A),l=Fl.processDrawnLines({lines:{curves:g.map(n=>({points:n})),thickness:i,width:e,height:A},pageWidth:s,pageHeight:s,rotation:0,innerMargin:0,mustSmooth:!1,areContours:C});return{areContours:C,outline:l.outline}}async addEditToolbar(){const g=await super.addEditToolbar();return g?(this._uiManager.signatureManager&&M(this,re)!==null&&(await g.addEditSignatureButton(this._uiManager.signatureManager,M(this,Ra),M(this,re)),g.show()),g):null}addSignature(g,C,i,e){const{x:A,y:s}=this,{outline:l}=$(this,Ma,g);$(this,Va,l instanceof SS),$(this,re,i),this.div.setAttribute("data-l10n-args",JSON.stringify({description:i}));let n;M(this,Va)?n=ge.getDefaultDrawingOptions():(n=ge._defaultDrawnSignatureOptions.clone(),n.updateProperties({"stroke-width":l.thickness})),this._addOutlines({drawOutlines:l,drawingOptions:n});const[a,d]=this.parentDimensions,[,o]=this.pageDimensions;let c=C/o;c=c>=1?.5:c,this.width*=c/this.height,this.width>=1&&(c*=.9/this.width,this.width=.9),this.height=c,this.setDims(a*this.width,d*this.height),this.x=A,this.y=s,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(e),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!e,hasDescription:!!i}}),this.div.hidden=!1}getFromImage(g){const{rawDims:{pageWidth:C,pageHeight:i},rotation:e}=this.parent.viewport;return Fl.process(g,C,i,e,ge._INNER_MARGIN)}getFromText(g,C){const{rawDims:{pageWidth:i,pageHeight:e},rotation:A}=this.parent.viewport;return Fl.extractContoursFromText(g,C,i,e,A,ge._INNER_MARGIN)}getDrawnSignature(g){const{rawDims:{pageWidth:C,pageHeight:i},rotation:e}=this.parent.viewport;return Fl.processDrawnLines({lines:g,pageWidth:C,pageHeight:i,rotation:e,innerMargin:ge._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:g,thickness:C}){g?this._drawingOptions=ge.getDefaultDrawingOptions():(this._drawingOptions=ge._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":C}))}serialize(g=!1){if(this.isEmpty())return null;const{lines:C,points:i,rect:e}=this.serializeDraw(g),{_drawingOptions:{"stroke-width":A}}=this,s={annotationType:RI.SIGNATURE,isSignature:!0,areContours:M(this,Va),color:[0,0,0],thickness:M(this,Va)?0:A,pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return g?(s.paths={lines:C,points:i},s.uuid=M(this,Ra),s.isCopy=!0):s.lines=C,M(this,re)&&(s.accessibilityData={type:"Figure",alt:M(this,re)}),s}static deserializeDraw(g,C,i,e,A,s){return s.areContours?SS.deserialize(g,C,i,e,A,s):qZ.deserialize(g,C,i,e,A,s)}static async deserialize(g,C,i){var A;const e=await super.deserialize(g,C,i);return $(e,Va,g.areContours),$(e,re,((A=g.accessibilityData)==null?void 0:A.alt)||""),$(e,Ra,g.uuid),e}};Va=new WeakMap,re=new WeakMap,Ma=new WeakMap,Ra=new WeakMap,CI(ge,"_type","signature"),CI(ge,"_editorType",RI.SIGNATURE),CI(ge,"_defaultDrawingOptions",null);let zS=ge;var SC,St,fa,fl,Ha,a0,Hl,Uc,Gs,he,o0,iC,Ou,Uu,wN,pN,BN,LS,WN,cIg;class JS extends zC{constructor(g){super({...g,name:"stampEditor"});ig(this,iC);ig(this,SC,null);ig(this,St,null);ig(this,fa,null);ig(this,fl,null);ig(this,Ha,null);ig(this,a0,"");ig(this,Hl,null);ig(this,Uc,!1);ig(this,Gs,null);ig(this,he,!1);ig(this,o0,!1);$(this,fl,g.bitmapUrl),$(this,Ha,g.bitmapFile),this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(g,C){zC.initialize(g,C)}static isHandlingMimeForPasting(g){return XX.includes(g)}static paste(g,C){C.pasteEditor(RI.STAMP,{bitmapFile:g.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var g;return{type:"stamp",hasAltText:!!((g=this.altTextData)!=null&&g.altText)}}static computeTelemetryFinalData(g){const C=g.get("hasAltText");return{hasAltText:C.get(!0)??0,hasNoAltText:C.get(!1)??0}}async mlGuessAltText(g=null,C=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!await i.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:e,width:A,height:s}=g||this.copyCanvas(null,null,!0).imageData,l=await i.guess({name:"altText",request:{data:e,width:A,height:s,channels:e.length/(A*s)}});if(!l)throw new Error("No response from the AI service.");if(l.error)throw new Error("Error from the AI service.");if(l.cancel)return null;if(!l.output)throw new Error("No valid response from the AI service.");const n=l.output;return await this.setGuessedAltText(n),C&&!this.hasAltTextData()&&(this.altTextData={alt:n,decorative:!1}),n}remove(){var g;M(this,St)&&($(this,SC,null),this._uiManager.imageManager.deleteId(M(this,St)),(g=M(this,Hl))==null||g.remove(),$(this,Hl,null),M(this,Gs)&&(clearTimeout(M(this,Gs)),$(this,Gs,null))),super.remove()}rebuild(){if(!this.parent){M(this,St)&&eg(this,iC,wN).call(this);return}super.rebuild(),this.div!==null&&(M(this,St)&&M(this,Hl)===null&&eg(this,iC,wN).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(g){this._isDraggable=!0,g&&this.div.focus()}isEmpty(){return!(M(this,fa)||M(this,SC)||M(this,fl)||M(this,Ha)||M(this,St)||M(this,Uc))}get isResizable(){return!0}render(){if(this.div)return this.div;let g,C;return this._isCopy&&(g=this.x,C=this.y),super.render(),this.div.hidden=!0,this.addAltTextButton(),M(this,Uc)||(M(this,SC)?eg(this,iC,pN).call(this):eg(this,iC,wN).call(this)),this._isCopy&&this._moveAfterPaste(g,C),this._uiManager.addShouldRescale(this),this.div}setCanvas(g,C){const{id:i,bitmap:e}=this._uiManager.imageManager.getFromCanvas(g,C);C.remove(),i&&this._uiManager.imageManager.isValidId(i)&&($(this,St,i),e&&$(this,SC,e),$(this,Uc,!1),eg(this,iC,pN).call(this))}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;M(this,Gs)!==null&&clearTimeout(M(this,Gs)),$(this,Gs,setTimeout(()=>{$(this,Gs,null),eg(this,iC,LS).call(this)},200))}copyCanvas(g,C,i=!1){var c;g||(g=224);const{width:e,height:A}=M(this,SC),s=new jl;let l=M(this,SC),n=e,a=A,d=null;if(C){if(e>C||A>C){const H=Math.min(C/e,C/A);n=Math.floor(e*H),a=Math.floor(A*H)}d=document.createElement("canvas");const r=d.width=Math.ceil(n*s.sx),h=d.height=Math.ceil(a*s.sy);M(this,he)||(l=eg(this,iC,BN).call(this,r,h));const b=d.getContext("2d");b.filter=this._uiManager.hcmFilter;let u="white",m="#cfcfd8";this._uiManager.hcmFilter!=="none"?m="black":(c=window.matchMedia)!=null&&c.call(window,"(prefers-color-scheme: dark)").matches&&(u="#8f8f9d",m="#42414d");const Z=15,p=Z*s.sx,Y=Z*s.sy,R=new OffscreenCanvas(p*2,Y*2),X=R.getContext("2d");X.fillStyle=u,X.fillRect(0,0,p*2,Y*2),X.fillStyle=m,X.fillRect(0,0,p,Y),X.fillRect(p,Y,p,Y),b.fillStyle=b.createPattern(R,"repeat"),b.fillRect(0,0,r,h),b.drawImage(l,0,0,l.width,l.height,0,0,r,h)}let o=null;if(i){let r,h;if(s.symmetric&&l.width<g&&l.height<g)r=l.width,h=l.height;else if(l=M(this,SC),e>g||A>g){const m=Math.min(g/e,g/A);r=Math.floor(e*m),h=Math.floor(A*m),M(this,he)||(l=eg(this,iC,BN).call(this,r,h))}const u=new OffscreenCanvas(r,h).getContext("2d",{willReadFrequently:!0});u.drawImage(l,0,0,l.width,l.height,0,0,r,h),o={width:r,height:h,data:u.getImageData(0,0,r,h).data}}return{canvas:d,width:n,height:a,imageData:o}}static async deserialize(g,C,i){var b;let e=null,A=!1;if(g instanceof Ngg){const{data:{rect:u,rotation:m,id:Z,structParent:p,popupRef:Y},container:R,parent:{page:{pageNumber:X}},canvas:H}=g;let S,z;H?(delete g.canvas,{id:S,bitmap:z}=i.imageManager.getFromCanvas(R.id,H),H.remove()):(A=!0,g._hasNoCanvas=!0);const v=((b=await C._structTree.getAriaAttributes(`${_D}${Z}`))==null?void 0:b.get("aria-label"))||"";e=g={annotationType:RI.STAMP,bitmapId:S,bitmap:z,pageIndex:X-1,rect:u.slice(0),rotation:m,id:Z,deleted:!1,accessibilityData:{decorative:!1,altText:v},isSvg:!1,structParent:p,popupRef:Y}}const s=await super.deserialize(g,C,i),{rect:l,bitmap:n,bitmapUrl:a,bitmapId:d,isSvg:o,accessibilityData:c}=g;A?(i.addMissingCanvas(g.id,s),$(s,Uc,!0)):d&&i.imageManager.isValidId(d)?($(s,St,d),n&&$(s,SC,n)):$(s,fl,a),$(s,he,o);const[r,h]=s.pageDimensions;return s.width=(l[2]-l[0])/r,s.height=(l[3]-l[1])/h,s.annotationElementId=g.id||null,c&&(s.altTextData=c),s._initialData=e,$(s,o0,!!e),s}serialize(g=!1,C=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i={annotationType:RI.STAMP,bitmapId:M(this,St),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:M(this,he),structTreeParentId:this._structTreeParentId};if(g)return i.bitmapUrl=eg(this,iC,WN).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i.isCopy=!0,i;const{decorative:e,altText:A}=this.serializeAltText(!1);if(!e&&A&&(i.accessibilityData={type:"Figure",alt:A}),this.annotationElementId){const l=eg(this,iC,cIg).call(this,i);if(l.isSame)return null;l.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1}if(i.id=this.annotationElementId,C===null)return i;C.stamps||(C.stamps=new Map);const s=M(this,he)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(!C.stamps.has(M(this,St)))C.stamps.set(M(this,St),{area:s,serialized:i}),i.bitmap=eg(this,iC,WN).call(this,!1);else if(M(this,he)){const l=C.stamps.get(M(this,St));s>l.area&&(l.area=s,l.serialized.bitmap.close(),l.serialized.bitmap=eg(this,iC,WN).call(this,!1))}return i}renderAnnotationElement(g){return g.updateEdited({rect:this.getRect(0,0)}),null}}SC=new WeakMap,St=new WeakMap,fa=new WeakMap,fl=new WeakMap,Ha=new WeakMap,a0=new WeakMap,Hl=new WeakMap,Uc=new WeakMap,Gs=new WeakMap,he=new WeakMap,o0=new WeakMap,iC=new WeakSet,Ou=function(g,C=!1){if(!g){this.remove();return}$(this,SC,g.bitmap),C||($(this,St,g.id),$(this,he,g.isSvg)),g.file&&$(this,a0,g.file.name),eg(this,iC,pN).call(this)},Uu=function(){if($(this,fa,null),this._uiManager.enableWaiting(!1),!!M(this,Hl)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&M(this,SC)){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&M(this,SC)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},wN=function(){if(M(this,St)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(M(this,St)).then(i=>eg(this,iC,Ou).call(this,i,!0)).finally(()=>eg(this,iC,Uu).call(this));return}if(M(this,fl)){const i=M(this,fl);$(this,fl,null),this._uiManager.enableWaiting(!0),$(this,fa,this._uiManager.imageManager.getFromUrl(i).then(e=>eg(this,iC,Ou).call(this,e)).finally(()=>eg(this,iC,Uu).call(this)));return}if(M(this,Ha)){const i=M(this,Ha);$(this,Ha,null),this._uiManager.enableWaiting(!0),$(this,fa,this._uiManager.imageManager.getFromFile(i).then(e=>eg(this,iC,Ou).call(this,e)).finally(()=>eg(this,iC,Uu).call(this)));return}const g=document.createElement("input");g.type="file",g.accept=XX.join(",");const C=this._uiManager._signal;$(this,fa,new Promise(i=>{g.addEventListener("change",async()=>{if(!g.files||g.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(g.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),eg(this,iC,Ou).call(this,e)}i()},{signal:C}),g.addEventListener("cancel",()=>{this.remove(),i()},{signal:C})}).finally(()=>eg(this,iC,Uu).call(this))),g.click()},pN=function(){var d;const{div:g}=this;let{width:C,height:i}=M(this,SC);const[e,A]=this.pageDimensions,s=.75;if(this.width)C=this.width*e,i=this.height*A;else if(C>s*e||i>s*A){const o=Math.min(s*e/C,s*A/i);C*=o,i*=o}const[l,n]=this.parentDimensions;this.setDims(C*l/e,i*n/A),this._uiManager.enableWaiting(!1);const a=$(this,Hl,document.createElement("canvas"));a.setAttribute("role","img"),this.addContainer(a),this.width=C/e,this.height=i/A,(d=this._initialOptions)!=null&&d.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(g.hidden=!1),eg(this,iC,LS).call(this),M(this,o0)||(this.parent.addUndoableEditor(this),$(this,o0,!0)),this._reportTelemetry({action:"inserted_image"}),M(this,a0)&&this.div.setAttribute("aria-description",M(this,a0))},BN=function(g,C){const{width:i,height:e}=M(this,SC);let A=i,s=e,l=M(this,SC);for(;A>2*g||s>2*C;){const n=A,a=s;A>2*g&&(A=A>=16384?Math.floor(A/2)-1:Math.ceil(A/2)),s>2*C&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const d=new OffscreenCanvas(A,s);d.getContext("2d").drawImage(l,0,0,n,a,0,0,A,s),l=d.transferToImageBitmap()}return l},LS=function(){const[g,C]=this.parentDimensions,{width:i,height:e}=this,A=new jl,s=Math.ceil(i*g*A.sx),l=Math.ceil(e*C*A.sy),n=M(this,Hl);if(!n||n.width===s&&n.height===l)return;n.width=s,n.height=l;const a=M(this,he)?M(this,SC):eg(this,iC,BN).call(this,s,l),d=n.getContext("2d");d.filter=this._uiManager.hcmFilter,d.drawImage(a,0,0,a.width,a.height,0,0,s,l)},WN=function(g){if(g){if(M(this,he)){const e=this._uiManager.imageManager.getSvgUrl(M(this,St));if(e)return e}const C=document.createElement("canvas");return{width:C.width,height:C.height}=M(this,SC),C.getContext("2d").drawImage(M(this,SC),0,0),C.toDataURL()}if(M(this,he)){const[C,i]=this.pageDimensions,e=Math.round(this.width*C*Ja.PDF_TO_CSS_UNITS),A=Math.round(this.height*i*Ja.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(e,A);return s.getContext("2d").drawImage(M(this,SC),0,0,M(this,SC).width,M(this,SC).height,0,0,e,A),s.transferToImageBitmap()}return structuredClone(M(this,SC))},cIg=function(g){var s;const{pageIndex:C,accessibilityData:{altText:i}}=this._initialData,e=g.pageIndex===C,A=(((s=g.accessibilityData)==null?void 0:s.alt)||"")===i;return{isSame:!this._hasBeenMoved&&!this._hasBeenResized&&e&&A,isSameAltText:A}},CI(JS,"_type","stamp"),CI(JS,"_editorType",RI.STAMP);var Ec,c0,ws,Xa,Xl,Te,Sa,d0,Pc,BA,Sl,ri,Dl,eI,Da,kC,dIg,ts,TS,xS,yN;const cA=class cA{constructor({uiManager:I,pageIndex:g,div:C,structTreeLayer:i,accessibilityManager:e,annotationLayer:A,drawLayer:s,textLayer:l,viewport:n,l10n:a}){ig(this,kC);ig(this,Ec);ig(this,c0,!1);ig(this,ws,null);ig(this,Xa,null);ig(this,Xl,null);ig(this,Te,new Map);ig(this,Sa,!1);ig(this,d0,!1);ig(this,Pc,!1);ig(this,BA,null);ig(this,Sl,null);ig(this,ri,null);ig(this,Dl,null);ig(this,eI);const d=[...M(cA,Da).values()];if(!cA._initialized){cA._initialized=!0;for(const o of d)o.initialize(a,I)}I.registerEditorTypes(d),$(this,eI,I),this.pageIndex=g,this.div=C,$(this,Ec,e),$(this,ws,A),this.viewport=n,$(this,ri,l),this.drawLayer=s,this._structTree=i,M(this,eI).addLayer(this)}get isEmpty(){return M(this,Te).size===0}get isInvisible(){return this.isEmpty&&M(this,eI).getMode()===RI.NONE}updateToolbar(I){M(this,eI).updateToolbar(I)}updateMode(I=M(this,eI).getMode()){switch(eg(this,kC,yN).call(this),I){case RI.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case RI.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case RI.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:g}=this.div;for(const C of M(cA,Da).values())g.toggle(`${C._type}Editing`,I===C._editorType);this.div.hidden=!1}hasTextLayer(I){var g;return I===((g=M(this,ri))==null?void 0:g.div)}setEditingState(I){M(this,eI).setEditingState(I)}addCommands(I){M(this,eI).addCommands(I)}cleanUndoStack(I){M(this,eI).cleanUndoStack(I)}toggleDrawing(I=!1){this.div.classList.toggle("drawing",!I)}togglePointerEvents(I=!1){this.div.classList.toggle("disabled",!I)}toggleAnnotationLayerPointerEvents(I=!1){var g;(g=M(this,ws))==null||g.div.classList.toggle("disabled",!I)}async enable(){$(this,Pc,!0),this.div.tabIndex=0,this.togglePointerEvents(!0);const I=new Set;for(const C of M(this,Te).values())C.enableEditing(),C.show(!0),C.annotationElementId&&(M(this,eI).removeChangedExistingAnnotation(C),I.add(C.annotationElementId));if(!M(this,ws)){$(this,Pc,!1);return}const g=M(this,ws).getEditableAnnotations();for(const C of g){if(C.hide(),M(this,eI).isDeletedAnnotationElement(C.data.id)||I.has(C.data.id))continue;const i=await this.deserialize(C);i&&(this.addOrRebuild(i),i.enableEditing())}$(this,Pc,!1)}disable(){var i;$(this,d0,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const I=new Map,g=new Map;for(const e of M(this,Te).values())if(e.disableEditing(),!!e.annotationElementId){if(e.serialize()!==null){I.set(e.annotationElementId,e);continue}else g.set(e.annotationElementId,e);(i=this.getEditableAnnotation(e.annotationElementId))==null||i.show(),e.remove()}if(M(this,ws)){const e=M(this,ws).getEditableAnnotations();for(const A of e){const{id:s}=A.data;if(M(this,eI).isDeletedAnnotationElement(s))continue;let l=g.get(s);if(l){l.resetAnnotationElement(A),l.show(!1),A.show();continue}l=I.get(s),l&&(M(this,eI).addChangedExistingAnnotation(l),l.renderAnnotationElement(A)&&l.show(!1)),A.show()}}eg(this,kC,yN).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:C}=this.div;for(const e of M(cA,Da).values())C.remove(`${e._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),$(this,d0,!1)}getEditableAnnotation(I){var g;return((g=M(this,ws))==null?void 0:g.getEditableAnnotation(I))||null}setActiveEditor(I){M(this,eI).getActive()!==I&&M(this,eI).setActiveEditor(I)}enableTextSelection(){var I;if(this.div.tabIndex=-1,(I=M(this,ri))!=null&&I.div&&!M(this,Dl)){$(this,Dl,new AbortController);const g=M(this,eI).combinedSignal(M(this,Dl));M(this,ri).div.addEventListener("pointerdown",eg(this,kC,dIg).bind(this),{signal:g}),M(this,ri).div.classList.add("highlighting")}}disableTextSelection(){var I;this.div.tabIndex=0,(I=M(this,ri))!=null&&I.div&&M(this,Dl)&&(M(this,Dl).abort(),$(this,Dl,null),M(this,ri).div.classList.remove("highlighting"))}enableClick(){if(M(this,Xa))return;$(this,Xa,new AbortController);const I=M(this,eI).combinedSignal(M(this,Xa));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:I});const g=this.pointerup.bind(this);this.div.addEventListener("pointerup",g,{signal:I}),this.div.addEventListener("pointercancel",g,{signal:I})}disableClick(){var I;(I=M(this,Xa))==null||I.abort(),$(this,Xa,null)}attach(I){M(this,Te).set(I.id,I);const{annotationElementId:g}=I;g&&M(this,eI).isDeletedAnnotationElement(g)&&M(this,eI).removeDeletedAnnotationElement(I)}detach(I){var g;M(this,Te).delete(I.id),(g=M(this,Ec))==null||g.removePointerInTextLayer(I.contentDiv),!M(this,d0)&&I.annotationElementId&&M(this,eI).addDeletedAnnotationElement(I)}remove(I){this.detach(I),M(this,eI).removeEditor(I),I.div.remove(),I.isAttachedToDOM=!1}changeParent(I){var g;I.parent!==this&&(I.parent&&I.annotationElementId&&(M(this,eI).addDeletedAnnotationElement(I.annotationElementId),zC.deleteAnnotationElement(I),I.annotationElementId=null),this.attach(I),(g=I.parent)==null||g.detach(I),I.setParent(this),I.div&&I.isAttachedToDOM&&(I.div.remove(),this.div.append(I.div)))}add(I){if(!(I.parent===this&&I.isAttachedToDOM)){if(this.changeParent(I),M(this,eI).addEditor(I),this.attach(I),!I.isAttachedToDOM){const g=I.render();this.div.append(g),I.isAttachedToDOM=!0}I.fixAndSetPosition(),I.onceAdded(!M(this,Pc)),M(this,eI).addToAnnotationStorage(I),I._reportTelemetry(I.telemetryInitialData)}}moveEditorInDOM(I){var C;if(!I.isAttachedToDOM)return;const{activeElement:g}=document;I.div.contains(g)&&!M(this,Xl)&&(I._focusEventsAllowed=!1,$(this,Xl,setTimeout(()=>{$(this,Xl,null),I.div.contains(document.activeElement)?I._focusEventsAllowed=!0:(I.div.addEventListener("focusin",()=>{I._focusEventsAllowed=!0},{once:!0,signal:M(this,eI)._signal}),g.focus())},0))),I._structTreeParentId=(C=M(this,Ec))==null?void 0:C.moveElementInDOM(this.div,I.div,I.contentDiv,!0)}addOrRebuild(I){I.needsToBeRebuilt()?(I.parent||(I.parent=this),I.rebuild(),I.show()):this.add(I)}addUndoableEditor(I){const g=()=>I._uiManager.rebuild(I),C=()=>{I.remove()};this.addCommands({cmd:g,undo:C,mustExec:!1})}getNextId(){return M(this,eI).getId()}combinedSignal(I){return M(this,eI).combinedSignal(I)}canCreateNewEmptyEditor(){var I;return(I=M(this,kC,ts))==null?void 0:I.canCreateNewEmptyEditor()}async pasteEditor(I,g){M(this,eI).updateToolbar(I),await M(this,eI).updateMode(I);const{offsetX:C,offsetY:i}=eg(this,kC,xS).call(this),e=this.getNextId(),A=eg(this,kC,TS).call(this,{parent:this,id:e,x:C,y:i,uiManager:M(this,eI),isCentered:!0,...g});A&&this.add(A)}async deserialize(I){var g;return await((g=M(cA,Da).get(I.annotationType??I.annotationEditorType))==null?void 0:g.deserialize(I,this,M(this,eI)))||null}createAndAddNewEditor(I,g,C={}){const i=this.getNextId(),e=eg(this,kC,TS).call(this,{parent:this,id:i,x:I.offsetX,y:I.offsetY,uiManager:M(this,eI),isCentered:g,...C});return e&&this.add(e),e}addNewEditor(I={}){this.createAndAddNewEditor(eg(this,kC,xS).call(this),!0,I)}setSelected(I){M(this,eI).setSelected(I)}toggleSelected(I){M(this,eI).toggleSelected(I)}unselect(I){M(this,eI).unselect(I)}pointerup(I){var i;const{isMac:g}=gi.platform;if(I.button!==0||I.ctrlKey&&g||I.target!==this.div||!M(this,Sa)||($(this,Sa,!1),(i=M(this,kC,ts))!=null&&i.isDrawer&&M(this,kC,ts).supportMultipleDrawings))return;if(!M(this,c0)){$(this,c0,!0);return}const C=M(this,eI).getMode();if(C===RI.STAMP||C===RI.SIGNATURE){M(this,eI).unselectAll();return}this.createAndAddNewEditor(I,!1)}pointerdown(I){var i;if(M(this,eI).getMode()===RI.HIGHLIGHT&&this.enableTextSelection(),M(this,Sa)){$(this,Sa,!1);return}const{isMac:g}=gi.platform;if(I.button!==0||I.ctrlKey&&g||I.target!==this.div)return;if($(this,Sa,!0),(i=M(this,kC,ts))!=null&&i.isDrawer){this.startDrawingSession(I);return}const C=M(this,eI).getActive();$(this,c0,!C||C.isEmpty())}startDrawingSession(I){if(this.div.focus({preventScroll:!0}),M(this,BA)){M(this,kC,ts).startDrawing(this,M(this,eI),!1,I);return}M(this,eI).setCurrentDrawingSession(this),$(this,BA,new AbortController);const g=M(this,eI).combinedSignal(M(this,BA));this.div.addEventListener("blur",({relatedTarget:C})=>{C&&!this.div.contains(C)&&($(this,Sl,null),this.commitOrRemove())},{signal:g}),M(this,kC,ts).startDrawing(this,M(this,eI),!1,I)}pause(I){if(I){const{activeElement:g}=document;this.div.contains(g)&&$(this,Sl,g);return}M(this,Sl)&&setTimeout(()=>{var g;(g=M(this,Sl))==null||g.focus(),$(this,Sl,null)},0)}endDrawingSession(I=!1){return M(this,BA)?(M(this,eI).setCurrentDrawingSession(null),M(this,BA).abort(),$(this,BA,null),$(this,Sl,null),M(this,kC,ts).endDrawing(I)):null}findNewParent(I,g,C){const i=M(this,eI).findParent(g,C);return i===null||i===this?!1:(i.changeParent(I),!0)}commitOrRemove(){return M(this,BA)?(this.endDrawingSession(),!0):!1}onScaleChanging(){M(this,BA)&&M(this,kC,ts).onScaleChangingWhenDrawing(this)}destroy(){var I,g;this.commitOrRemove(),((I=M(this,eI).getActive())==null?void 0:I.parent)===this&&(M(this,eI).commitOrRemove(),M(this,eI).setActiveEditor(null)),M(this,Xl)&&(clearTimeout(M(this,Xl)),$(this,Xl,null));for(const C of M(this,Te).values())(g=M(this,Ec))==null||g.removePointerInTextLayer(C.contentDiv),C.setParent(null),C.isAttachedToDOM=!1,C.div.remove();this.div=null,M(this,Te).clear(),M(this,eI).removeLayer(this)}render({viewport:I}){this.viewport=I,Cd(this.div,I);for(const g of M(this,eI).getEditors(this.pageIndex))this.add(g),g.rebuild();this.updateMode()}update({viewport:I}){M(this,eI).commitOrRemove(),eg(this,kC,yN).call(this);const g=this.viewport.rotation,C=I.rotation;if(this.viewport=I,Cd(this.div,{rotation:C}),g!==C)for(const i of M(this,Te).values())i.rotate(C)}get pageDimensions(){const{pageWidth:I,pageHeight:g}=this.viewport.rawDims;return[I,g]}get scale(){return M(this,eI).viewParameters.realScale}};Ec=new WeakMap,c0=new WeakMap,ws=new WeakMap,Xa=new WeakMap,Xl=new WeakMap,Te=new WeakMap,Sa=new WeakMap,d0=new WeakMap,Pc=new WeakMap,BA=new WeakMap,Sl=new WeakMap,ri=new WeakMap,Dl=new WeakMap,eI=new WeakMap,Da=new WeakMap,kC=new WeakSet,dIg=function(I){M(this,eI).unselectAll();const{target:g}=I;if(g===M(this,ri).div||(g.getAttribute("role")==="img"||g.classList.contains("endOfContent"))&&M(this,ri).div.contains(g)){const{isMac:C}=gi.platform;if(I.button!==0||I.ctrlKey&&C)return;M(this,eI).showAllEditors("highlight",!0,!0),M(this,ri).div.classList.add("free"),this.toggleDrawing(),ON.startHighlighting(this,M(this,eI).direction==="ltr",{target:M(this,ri).div,x:I.x,y:I.y}),M(this,ri).div.addEventListener("pointerup",()=>{M(this,ri).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:M(this,eI)._signal}),I.preventDefault()}},ts=function(){return M(cA,Da).get(M(this,eI).getMode())},TS=function(I){const g=M(this,kC,ts);return g?new g.prototype.constructor(I):null},xS=function(){const{x:I,y:g,width:C,height:i}=this.div.getBoundingClientRect(),e=Math.max(0,I),A=Math.max(0,g),s=Math.min(window.innerWidth,I+C),l=Math.min(window.innerHeight,g+i),n=(e+s)/2-I,a=(A+l)/2-g,[d,o]=this.viewport.rotation%180===0?[n,a]:[a,n];return{offsetX:d,offsetY:o}},yN=function(){for(const I of M(this,Te).values())I.isEmpty()&&I.remove()},CI(cA,"_initialized",!1),ig(cA,Da,new Map([GS,XS,JS,ON,zS].map(I=>[I._editorType,I])));let vS=cA;var WA,Bi,_c,jZ,SV,rIg,Ms,QS,hIg,OS;const ut=class ut{constructor({pageIndex:I}){ig(this,Ms);ig(this,WA,null);ig(this,Bi,new Map);ig(this,_c,new Map);this.pageIndex=I}setParent(I){if(!M(this,WA)){$(this,WA,I);return}if(M(this,WA)!==I){if(M(this,Bi).size>0)for(const g of M(this,Bi).values())g.remove(),I.append(g);$(this,WA,I)}}static get _svgFactory(){return jI(this,"_svgFactory",new xN)}draw(I,g=!1,C=!1){const i=ui(ut,jZ)._++,e=eg(this,Ms,QS).call(this),A=ut._svgFactory.createElement("defs");e.append(A);const s=ut._svgFactory.createElement("path");A.append(s);const l=`path_p${this.pageIndex}_${i}`;s.setAttribute("id",l),s.setAttribute("vector-effect","non-scaling-stroke"),g&&M(this,_c).set(i,s);const n=C?eg(this,Ms,hIg).call(this,A,l):null,a=ut._svgFactory.createElement("use");return e.append(a),a.setAttribute("href",`#${l}`),this.updateProperties(e,I),M(this,Bi).set(i,e),{id:i,clipPathId:`url(#${n})`}}drawOutline(I,g){const C=ui(ut,jZ)._++,i=eg(this,Ms,QS).call(this),e=ut._svgFactory.createElement("defs");i.append(e);const A=ut._svgFactory.createElement("path");e.append(A);const s=`path_p${this.pageIndex}_${C}`;A.setAttribute("id",s),A.setAttribute("vector-effect","non-scaling-stroke");let l;if(g){const d=ut._svgFactory.createElement("mask");e.append(d),l=`mask_p${this.pageIndex}_${C}`,d.setAttribute("id",l),d.setAttribute("maskUnits","objectBoundingBox");const o=ut._svgFactory.createElement("rect");d.append(o),o.setAttribute("width","1"),o.setAttribute("height","1"),o.setAttribute("fill","white");const c=ut._svgFactory.createElement("use");d.append(c),c.setAttribute("href",`#${s}`),c.setAttribute("stroke","none"),c.setAttribute("fill","black"),c.setAttribute("fill-rule","nonzero"),c.classList.add("mask")}const n=ut._svgFactory.createElement("use");i.append(n),n.setAttribute("href",`#${s}`),l&&n.setAttribute("mask",`url(#${l})`);const a=n.cloneNode();return i.append(a),n.classList.add("mainOutline"),a.classList.add("secondaryOutline"),this.updateProperties(i,I),M(this,Bi).set(C,i),C}finalizeDraw(I,g){M(this,_c).delete(I),this.updateProperties(I,g)}updateProperties(I,g){var l;if(!g)return;const{root:C,bbox:i,rootClass:e,path:A}=g,s=typeof I=="number"?M(this,Bi).get(I):I;if(s){if(C&&eg(this,Ms,OS).call(this,s,C),i&&eg(l=ut,SV,rIg).call(l,s,i),e){const{classList:n}=s;for(const[a,d]of Object.entries(e))n.toggle(a,d)}if(A){const a=s.firstChild.firstChild;eg(this,Ms,OS).call(this,a,A)}}}updateParent(I,g){if(g===this)return;const C=M(this,Bi).get(I);C&&(M(g,WA).append(C),M(this,Bi).delete(I),M(g,Bi).set(I,C))}remove(I){M(this,_c).delete(I),M(this,WA)!==null&&(M(this,Bi).get(I).remove(),M(this,Bi).delete(I))}destroy(){$(this,WA,null);for(const I of M(this,Bi).values())I.remove();M(this,Bi).clear(),M(this,_c).clear()}};WA=new WeakMap,Bi=new WeakMap,_c=new WeakMap,jZ=new WeakMap,SV=new WeakSet,rIg=function(I,[g,C,i,e]){const{style:A}=I;A.top=`${100*C}%`,A.left=`${100*g}%`,A.width=`${100*i}%`,A.height=`${100*e}%`},Ms=new WeakSet,QS=function(){const I=ut._svgFactory.create(1,1,!0);return M(this,WA).append(I),I.setAttribute("aria-hidden",!0),I},hIg=function(I,g){const C=ut._svgFactory.createElement("clipPath");I.append(C);const i=`clip_${g}`;C.setAttribute("id",i),C.setAttribute("clipPathUnits","objectBoundingBox");const e=ut._svgFactory.createElement("use");return C.append(e),e.setAttribute("href",`#${g}`),e.classList.add("clip"),i},OS=function(I,g){for(const[C,i]of Object.entries(g))i===null?I.removeAttribute(C):I.setAttribute(C,i)},ig(ut,SV),ig(ut,jZ,0);let jS=ut;globalThis.pdfjsTestingUtils={HighlightOutliner:pS};GI.AbortException;GI.AnnotationEditorLayer;GI.AnnotationEditorParamsType;GI.AnnotationEditorType;GI.AnnotationEditorUIManager;GI.AnnotationLayer;GI.AnnotationMode;GI.AnnotationType;GI.ColorPicker;GI.DOMSVGFactory;GI.DrawLayer;GI.FeatureTest;var ldg=GI.GlobalWorkerOptions;GI.ImageKind;GI.InvalidPDFException;GI.MathClamp;GI.OPS;GI.OutputScale;GI.PDFDataRangeTransport;GI.PDFDateString;GI.PDFWorker;GI.PasswordResponses;GI.PermissionFlag;GI.PixelsPerInch;GI.RenderingCancelledException;GI.ResponseException;GI.SignatureExtractor;GI.SupportedImageMimeTypes;GI.TextLayer;GI.TouchManager;GI.Util;GI.VerbosityLevel;GI.XfaLayer;GI.build;GI.createValidAbsoluteUrl;GI.fetchData;var ndg=GI.getDocument;GI.getFilenameFromUrl;GI.getPdfFilenameFromUrl;GI.getUuid;GI.getXfaPageViewport;GI.isDataScheme;GI.isPdfFile;GI.isValidExplicitDest;GI.noContextMenu;GI.normalizeUnicode;GI.setLayerDimensions;GI.shadow;GI.stopEvent;GI.version;const m0=(t,I)=>{const g=t.__vccOpts||t;for(const[C,i]of I)g[C]=i;return g},adg={class:"home_wrap"},odg=["id"],cdg={__name:"PdfView",props:{data:Array},setup(t){ldg.workerSrc=new URL("data:text/javascript;base64,[encoded data, 2494060 characters]",typeof document>"u"?require("url").pathToFileURL(__filename).href:gh&&gh.tagName.toUpperCase()==="SCRIPT"&&gh.src||new URL("index.cjs",document.baseURI).href).toString();const I=t,g=gg.ref(1),C=gg.ref([]),i=gg.ref(""),e=gg.ref(1);let A=null;const s=()=>{let d=0;window.screen.width>1440?d=1.4:d=1.2,!(g.value>=d)&&(g.value=g.value+.1,n())},l=()=>{g.value<=1||(g.value=g.value-.1,n())},n=async()=>{A=await ndg(I.data).promise,C.value=A.numPages,a()},a=async(d=1)=>{e.value=d;const o=await A.getPage(d),c=document.getElementById("the_canvas"+d),r=c.getContext("2d"),h=window.devicePixelRatio||1,b=r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1,u=h/b,m=o.getViewport({scale:g.value});c.width=m.width*u,c.height=m.height*u,c.style.width=m.width+"px",i.value=m.width+"px",c.style.height=m.height+"px",r.setTransform(u,0,0,u,0,0);const Z={canvasContext:r,viewport:m};o.render(Z),C.value>d&&setTimeout(()=>a(d+1))};return gg.onMounted(()=>{n()}),(d,o)=>(gg.openBlock(),gg.createElementBlock("div",adg,[gg.createElementVNode("div",{class:"pdf_down"},[gg.createElementVNode("div",{class:"pdf_set_left",onClick:s},"➕"),gg.createElementVNode("div",{class:"pdf_set_middle",onClick:l},"➖")]),gg.createElementVNode("div",{style:gg.normalizeStyle({width:i.value,margin:"0 auto"})},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(C.value,c=>(gg.openBlock(),gg.createElementBlock("canvas",{id:"the_canvas"+c,key:c},null,8,odg))),128))],4)]))}},ddg=m0(cdg,[["__scopeId","data-v-58fcf604"]]);async function rdg(t,I){const g=gg.createApp(ddg,{data:t});return g.mount(I),{$el:I,$destroy(){g.unmount()}}}const hdg=["src"],bdg=["src"],udg={__name:"ImageViewer",props:{image:String,srcList:Array},setup(t){const I=t,g=gg.ref(!1),C=gg.ref(0),i=gg.computed(()=>{const d=Array.isArray(I.srcList)?I.srcList:[];if(d.length)return d.map(c=>String(c||"")).filter(Boolean);const o=String(I.image||"");return o?[o]:[]}),e=gg.computed(()=>({visible:g.value,open:A,close:s,next:l,prev:n}));function A(d=0){i.value.length&&(C.value=Math.max(0,Math.min(i.value.length-1,Number(d)||0)),g.value=!0)}function s(){g.value=!1}function l(){i.value.length<=1||(C.value=(C.value+1)%i.value.length)}function n(){i.value.length<=1||(C.value=(C.value-1+i.value.length)%i.value.length)}function a(d){g.value&&(d.key==="Escape"&&s(),d.key==="ArrowRight"&&l(),d.key==="ArrowLeft"&&n())}return gg.onMounted(()=>{window.addEventListener("keydown",a)}),gg.onBeforeUnmount(()=>{window.removeEventListener("keydown",a)}),(d,o)=>(gg.openBlock(),gg.createElementBlock("div",null,[gg.renderSlot(d.$slots,"image",{src:i.value[0],srcList:i.value,index:C.value,preview:e.value},()=>[i.value[0]?(gg.openBlock(),gg.createElementBlock("img",{key:0,class:"image",src:i.value[0],alt:"",onClick:o[0]||(o[0]=c=>A(0))},null,8,hdg)):gg.createCommentVNode("",!0)],!0),g.value?(gg.openBlock(),gg.createElementBlock("div",{key:0,class:"viewfile-image-preview",onClick:gg.withModifiers(s,["self"])},[gg.createElementVNode("button",{class:"viewfile-image-preview-close",type:"button",onClick:s},"×"),i.value.length>1?(gg.openBlock(),gg.createElementBlock("button",{key:0,class:"viewfile-image-preview-prev",type:"button",onClick:gg.withModifiers(n,["stop"])},"‹")):gg.createCommentVNode("",!0),gg.createElementVNode("img",{class:"viewfile-image-preview-img",src:i.value[C.value],alt:""},null,8,bdg),i.value.length>1?(gg.openBlock(),gg.createElementBlock("button",{key:1,class:"viewfile-image-preview-next",type:"button",onClick:gg.withModifiers(l,["stop"])},"›")):gg.createCommentVNode("",!0)])):gg.createCommentVNode("",!0)]))}},mdg=m0(udg,[["__scopeId","data-v-00723940"]]);async function Zdg(t,I){const g=await J9(t),C=gg.createApp(mdg,{image:g});return C.mount(I),{$el:I,$destroy(){C.unmount()}}}const Gdg={class:"code-area"},wdg={__name:"CodeViewer",props:{value:{type:String,description:"值"}},setup(t){return(I,g)=>(gg.openBlock(),gg.createElementBlock("pre",Gdg,"    "+gg.toDisplayString(t.value)+`
  `,1))}},pdg=m0(wdg,[["__scopeId","data-v-215846b2"]]);async function Bdg(t,I){const g=await lig(t),C=gg.createApp(pdg,{value:g});return C.mount(I),{$el:I,$destroy(){C.unmount()}}}function qg(t){const I=Number(t);return Number.isFinite(I)?I:0}function e8(t){const I=Number.parseFloat(String(t??""));return Number.isFinite(I)?I:0}function $Z(t,I){return`${t}-${I}`}function th(t){if(!t)return"";try{const g=new DOMParser().parseFromString(t,"text/html");return["script","style","iframe","object","embed","link","meta"].forEach(i=>{g.querySelectorAll(i).forEach(e=>e.remove())}),g.querySelectorAll("*").forEach(i=>{Array.from(i.attributes).forEach(A=>{const s=A.name.toLowerCase(),l=String(A.value||"").trim().toLowerCase();s.startsWith("on")&&i.removeAttribute(A.name),(s==="href"||s==="src")&&l.startsWith("javascript:")&&i.removeAttribute(A.name)});const e=i.getAttribute("style");if(e){let A=e.replace(/font-size\s*:\s*([\d.]+)pt/gi,(s,l)=>{const n=Number(l);return Number.isFinite(n)?`font-size: ${(n*96/72).toFixed(3).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}px`:s});/text-align\s*:\s*justify/i.test(A)&&(/text-align-last/i.test(A)||(A+=";text-align-last:justify"),/text-justify/i.test(A)||(A+=";text-justify:inter-character")),A!==e&&i.setAttribute("style",A)}}),g.body.innerHTML}catch{return t}}function Wdg(t,I){const g=qg(t.order)||I;return`${t.type||"el"}-${g}`}function XI(t,I,g){const C=qg(t.order)||I,e=`${String(t.type||"el")}-${C}`;return g?`${g}/${e}`:e}function bIg(t){const g=[t.radius,t.cornerRadius,t.rx].map(qg).find(C=>C>0)||0;return g?`${g}px`:void 0}function LV(t){const I=String(t.borderColor??t.stroke??t.lineColor??""),g=qg(t.borderWidth??t.strokeWidth??t.lineWidth),C=String(t.borderStrokeDasharray??t.strokeDasharray??t.dasharray??""),i=t.border&&typeof t.border=="object"?t.border:null,e=t.line&&typeof t.line=="object"?t.line:null,A=String((i==null?void 0:i.color)??(e==null?void 0:e.color)??""),s=qg((i==null?void 0:i.width)??(e==null?void 0:e.width)),l=String((i==null?void 0:i.dasharray)??(e==null?void 0:e.dasharray)??""),n=I||A,a=g||s,d=(C&&C!=="0"?C:"")||(l&&l!=="0"?l:"");return{color:n||"transparent",width:Math.max(0,a),dasharray:d||void 0}}function ydg(t){const I=(t==null?void 0:t.ph)??(t==null?void 0:t.placeholder)??(t==null?void 0:t.placeHolder)??null,g=String((I==null?void 0:I.type)??(I==null?void 0:I.phType)??(t==null?void 0:t.phType)??(t==null?void 0:t.placeholderType)??"").trim().toLowerCase(),C=qg((I==null?void 0:I.idx)??(I==null?void 0:I.phIdx)??(t==null?void 0:t.phIdx)??(t==null?void 0:t.idx)??(t==null?void 0:t.placeholderIdx)??(t==null?void 0:t.phIndex)),i=String((I==null?void 0:I.id)??(t==null?void 0:t.phId)??(t==null?void 0:t.placeholderId)??"").trim();return!g&&!C&&!i?null:{type:g,idx:C,id:i}}function A8(t){const I=ydg(t);if(!I)return"";const g=I.id||(I.idx?String(I.idx):"");return g?`${I.type||"ph"}:${g}`:`${I.type||"ph"}`}function Ydg(t){const I=String(t||"").trim();return I?/click to add/i.test(I)||/单击.*添加/.test(I)||/点击.*添加/.test(I)||/添加(标题|文本|内容)/.test(I):!1}function MY(t){const I=qg(t);return I?I>1?Math.max(0,Math.min(1,I/100)):Math.max(0,Math.min(1,I)):0}function uIg(t){const I=t==null?void 0:t.rect,g=t==null?void 0:t.crop,C=I&&typeof I=="object"?I:g&&typeof g=="object"?g:null;if(!C)return null;const i=MY(C.t),e=MY(C.b),A=MY(C.l),s=MY(C.r);if(!i&&!e&&!A&&!s)return null;const l=Math.max(0,Math.min(.9,A)),n=Math.max(0,Math.min(.9,s)),a=Math.max(0,Math.min(.9,i)),d=Math.max(0,Math.min(.9,e));return l+n>=.98||a+d>=.98?null:{t:a,b:d,l,r:n}}function Ndg(t){return String((t==null?void 0:t.geom)||(t==null?void 0:t.shapeType)||"").toLowerCase()}function mIg(t){const I=Ndg(t);return{width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:I==="ellipse"||I==="circle"?"50%":bIg(t)}}function SH(t,I=1){if(t==null)return I;const g=qg(t);if(!g)return I;const C=g>10?g/100:g;return Math.max(0,Math.min(3,C))}function Vdg(t){const I=t==null?void 0:t.filters;if(!I||typeof I!="object")return;const g=SH(I.brightness,1),C=SH(I.contrast,1),i=SH(I.saturation,1),e=qg(I.colorTemperature),A=[];if(g!==1&&A.push(`brightness(${g})`),C!==1&&A.push(`contrast(${C})`),i!==1&&A.push(`saturate(${i})`),e){const s=Math.max(-100,Math.min(100,e)),l=s*.6,n=Math.min(1,Math.abs(s)/200);A.push(`hue-rotate(${l}deg)`),s>0&&n&&A.push(`sepia(${n})`)}return A.length?A.join(" "):void 0}function ZIg(t){const I=uIg(t),g=Vdg(t);if(!I)return{width:"100%",height:"100%",objectFit:"fill",filter:g,display:"block"};const C=1/(1-I.l-I.r),i=1/(1-I.t-I.b),e=-I.l*100,A=-I.t*100;return{width:"100%",height:"100%",objectFit:"fill",display:"block",transformOrigin:"top left",transform:`translate(${e}%, ${A}%) scale(${C}, ${i})`,filter:g}}function Ue(t){var i,e,A,s;const I=typeof t.fill=="object"&&t.fill?t.fill:null,C=[t.src,t.url,t.picBase64,t.mediaBase64,t.base64,t.blob,t.blobUrl,(i=t.value)==null?void 0:i.picBase64,(e=t.value)==null?void 0:e.src,(A=I==null?void 0:I.value)==null?void 0:A.picBase64,(s=I==null?void 0:I.value)==null?void 0:s.src].find(l=>typeof l=="string"&&l.trim());return C?String(C):""}function vV(t){const I=String(t.type||"").toLowerCase();return I==="shape"||I==="rect"||I==="line"}function n9(t){var g,C;if(typeof t.fill=="object"&&((g=t.fill)==null?void 0:g.type)==="image")return!0;if(typeof t.fill=="object"&&t.fill){const i=(C=t.fill)==null?void 0:C.value;if(i&&(typeof i.picBase64=="string"||typeof i.src=="string")||typeof t.fill.picBase64=="string"||typeof t.fill.src=="string")return!0}const I=String(t.type||"").toLowerCase();return I==="pic"||I==="picture"}function a9(t){const I=String(t.type||"").toLowerCase();if(n9(t))return!1;if(I==="image"||I==="pic"||I==="picture")return!0;const g=Ue(t);return!!g&&/^data:image\//i.test(g)}function o9(t){if(String(t.type||"").toLowerCase()==="video")return!0;const g=Ue(t);return!!g&&/^data:video\//i.test(g)}function c9(t){if(String(t.type||"").toLowerCase()==="audio")return!0;const g=Ue(t);return!!g&&/^data:audio\//i.test(g)}function GIg(t){return String(t.type||"").toLowerCase()==="table"}function wIg(t){const I=String(t.type||"").toLowerCase();return I==="chart"||I==="charts"}function pIg(t){const I=String(t.type||"").toLowerCase();return I==="group"||I==="groupshape"||I==="grpsp"||I==="grp"||[t==null?void 0:t.elements,t==null?void 0:t.children,t==null?void 0:t.childrens,t==null?void 0:t.items,t==null?void 0:t.spTree].some(i=>Array.isArray(i)&&i.length)?!0:I.includes("group")}function BIg(t){const I=String(t.type||"").toLowerCase();return I==="math"||I==="equation"}function WIg(t){const I=String(t.type||"").toLowerCase();return I==="diagram"||I==="smartart"||I==="smart_art"}function Mdg(t){var I,g,C,i,e;if(!t||!t.type)return"#fff";if(t.type==="color")return String(t.value||"#fff");if(t.type==="gradient"){const A=Array.isArray((I=t.value)==null?void 0:I.colors)?t.value.colors:[],s=qg((g=t.value)==null?void 0:g.rot),l=String(((C=t.value)==null?void 0:C.path)||"rect"),n=A.map(a=>{const d=String((a==null?void 0:a.pos)??""),o=String((a==null?void 0:a.color)??"");return o?d?`${o} ${d}`:o:""}).filter(Boolean).join(", ");return n?l==="rect"?`linear-gradient(${(90-s+360)%360}deg, ${n})`:`radial-gradient(circle, ${n})`:"#fff"}if(t.type==="image"){const A=String(((i=t.value)==null?void 0:i.picBase64)||((e=t.value)==null?void 0:e.src)||"");return A?`center / cover no-repeat url(${A})`:"#fff"}return"#fff"}function Rdg(t,I){const g=qg(t.order)||I,i=(t==null?void 0:t.__source)==="slide"?1e5:0;return g+i}function yIg(t){const I=t==null?void 0:t.shadow;if(!I||typeof I!="object")return;const g=qg(I.h),C=qg(I.v),i=Math.max(0,qg(I.blur)),e=String(I.color||"").trim();if(!(!e||!g&&!C&&!i))return`drop-shadow(${g}px ${C}px ${i}px ${e})`}function YIg(t){if(vV(t))return;const I=LV(t);if(I.width)return`${I.width}px solid ${I.color}`}function NIg(t){var g,C,i;if(vV(t)||n9(t)||a9(t)||o9(t)||c9(t))return;if(typeof t.fill=="string"){const e=t.fill.trim();return e||void 0}const I=typeof t.fill=="object"&&t.fill?t.fill:null;if(!(!I||!I.type)){if(I.type==="color")return String(I.value||"")||void 0;if(I.type==="gradient"){const e=Array.isArray((g=I.value)==null?void 0:g.colors)?I.value.colors:[],A=qg((C=I.value)==null?void 0:C.rot),s=String(((i=I.value)==null?void 0:i.path)||"rect"),l=e.map(n=>{const a=String((n==null?void 0:n.pos)??""),d=String((n==null?void 0:n.color)??"");return d?a?`${d} ${a}`:d:""}).filter(Boolean).join(", ");return l?s==="rect"?`linear-gradient(${(90-A+360)%360}deg, ${l})`:`radial-gradient(circle, ${l})`:void 0}}}function fdg(t,I){const g=qg(t.left),C=qg(t.top),i=Math.max(0,qg(t.width)),e=Math.max(0,qg(t.height)),A=qg(t.rotate),s=!!t.isFlipH,l=!!t.isFlipV,n=Rdg(t,I),a=t.opacity==null?1:Math.max(0,Math.min(1,qg(t.opacity))),d=[];A&&d.push(`rotate(${A}deg)`),s&&d.push("scaleX(-1)"),l&&d.push("scaleY(-1)");const o=NIg(t),c=YIg(t),r=bIg(t),h=yIg(t);return{position:"absolute",left:`${g}px`,top:`${C}px`,width:`${i}px`,height:`${e}px`,zIndex:n,opacity:a,background:o,border:c,borderRadius:r,filter:h,transformOrigin:"center center",transform:d.length?d.join(" "):void 0}}function EN(t){return{position:"absolute",left:0,top:0,width:"100%",height:"100%",display:"table"}}function PN(t){const I=t==null?void 0:t.autoFit,g=I&&typeof I=="object"?qg(I.fontScale):1,C=g&&g!==1?Math.max(.1,Math.min(5,g)):1,i=!!(t!=null&&t.isVertical),e=i?"vertical-rl":void 0,A=i?"mixed":void 0,s=String(t.vAlign||"up"),l=s==="down"?"bottom":s==="mid"?"middle":"top";return C===1?{display:"table-cell",width:"100%",height:"100%",verticalAlign:l,writingMode:e,textOrientation:A}:{display:"table-cell",width:"100%",height:"100%",position:"absolute",left:0,top:0,verticalAlign:l,writingMode:e,textOrientation:A}}const Yu=new Map;function Di(t,I,g){var w;const C=`c-${$Z(I,g)}`,i=Yu.get(C);if(i)return i;const e=Math.max(1,qg(t.width)),A=Math.max(1,qg(t.height)),s=String((t==null?void 0:t.chartType)||"").toLowerCase(),l=Array.isArray(t==null?void 0:t.colors)?t.colors:[],n=l.length?l.map(W=>String(W||"").trim()).filter(Boolean):[],a=W=>n[W%Math.max(1,n.length)]||"#4e79a7",d=t.opacity==null?1:Math.max(0,Math.min(1,qg(t.opacity))),o=Math.max(4,Math.min(24,Math.round(Math.min(e,A)*.08))),c=s.includes("pie")||s.includes("doughnut"),r=s.includes("bar")||s.includes("col");if(s.includes("scatter")||s.includes("bubble")){const W=t==null?void 0:t.data,y=Array.isArray(W==null?void 0:W[0])?W[0]:[],f=Array.isArray(W==null?void 0:W[1])?W[1]:[],D=Math.min(y.length,f.length),F=D?Math.min(...y.slice(0,D)):0,T=D?Math.max(...y.slice(0,D)):1,Q=D?Math.min(...f.slice(0,D)):0,P=D?Math.max(...f.slice(0,D)):1,L=T-F||1,E=P-Q||1,J=Math.max(1,e-o*2),k=Math.max(1,A-o*2),j=[];for(let tg=0;tg<D;tg++){const Cg=o+(y[tg]-F)/L*J,x=o+(1-(f[tg]-Q)/E)*k;j.push({cx:Cg,cy:x,r:3,fill:a(0),opacity:d})}const q={kind:"scatter",bars:[],paths:[],points:j,slices:[],cx:0,cy:0,holeR:0};return Yu.set(C,q),q}const b=t==null?void 0:t.data;if(c){const W=Array.isArray(b)?b:[],f=(Array.isArray((w=W==null?void 0:W[0])==null?void 0:w.values)?W[0].values:[]).map(k=>({y:qg(k==null?void 0:k.y),x:String((k==null?void 0:k.x)??"")})).filter(k=>Number.isFinite(k.y)&&k.y>0),D=f.reduce((k,j)=>k+j.y,0)||1,F=e/2,T=A/2,Q=Math.max(2,Math.min(e,A)/2-o),P=s.includes("doughnut")?Q*.55:0;let L=-Math.PI/2;const E=[];f.forEach((k,j)=>{const q=k.y/D*Math.PI*2,tg=L+q,Cg=F+Q*Math.cos(L),x=T+Q*Math.sin(L),sg=F+Q*Math.cos(tg),Ag=T+Q*Math.sin(tg),O=q>Math.PI?1:0,_=`M ${F} ${T} L ${Cg} ${x} A ${Q} ${Q} 0 ${O} 1 ${sg} ${Ag} Z`;E.push({d:_,fill:a(j),opacity:d}),L=tg});const J={kind:"pie",bars:[],paths:[],points:[],slices:E,cx:F,cy:T,holeR:P};return Yu.set(C,J),J}const m=(Array.isArray(b)?b:[]).map(W=>{const f=(Array.isArray(W==null?void 0:W.values)?W.values:[]).map(D=>({y:qg(D==null?void 0:D.y),x:String((D==null?void 0:D.x)??"")})).filter(D=>Number.isFinite(D.y));return{name:String((W==null?void 0:W.name)??""),values:f}}).filter(W=>W.values.length),Z=Array.from(new Set(m.flatMap(W=>W.values.map(y=>y.x)).filter(W=>W!=null).map(W=>String(W)))),p=Math.max(1,Z.length),Y=Math.max(1,m.length),R=Math.max(1,...m.flatMap(W=>W.values.map(y=>y.y)).filter(W=>Number.isFinite(W))),X=Math.max(1,e-o*2),H=Math.max(1,A-o*2),S=String((t==null?void 0:t.barDir)||"col").toLowerCase();if(r){const W=[];if(S==="bar"){const f=H/p,D=f*.8,F=(f-D)/2,T=D/Y;for(let Q=0;Q<p;Q++)for(let P=0;P<m.length;P++){const L=m[P].values.find(q=>q.x===Z[Q]),J=(L?L.y:0)/R*X,k=o,j=o+Q*f+F+P*T;W.push({x:k,y:j,w:Math.max(0,J),h:Math.max(0,T*.9),fill:a(P),opacity:d})}}else{const f=X/p,D=f*.8,F=(f-D)/2,T=D/Y;for(let Q=0;Q<p;Q++)for(let P=0;P<m.length;P++){const L=m[P].values.find(q=>q.x===Z[Q]),J=(L?L.y:0)/R*H,k=o+Q*f+F+P*T,j=o+(H-J);W.push({x:k,y:j,w:Math.max(0,T*.9),h:Math.max(0,J),fill:a(P),opacity:d})}}const y={kind:"bar",bars:W,paths:[],points:[],slices:[],cx:0,cy:0,holeR:0};return Yu.set(C,y),y}const z=[],v=[],K=Math.max(1,Math.round(Math.min(e,A)*.01)),V=!!(t!=null&&t.marker),N=W=>o+(p===1?X/2:W/(p-1)*X),B=W=>o+(1-W/R)*H;m.forEach((W,y)=>{let f="";Z.forEach((D,F)=>{const T=W.values.find(E=>E.x===D),Q=T?T.y:0,P=N(F),L=B(Q);f+=F===0?`M ${P} ${L}`:` L ${P} ${L}`,V&&v.push({cx:P,cy:L,r:K*.9+1,fill:a(y),opacity:d})}),z.push({d:f,stroke:a(y),strokeWidth:K})});const G={kind:"line",bars:[],paths:z,points:v,slices:[],cx:0,cy:0,holeR:0};return Yu.set(C,G),G}const s8=new Map;function lm(t,I,g){const C=`t-${$Z(I,g)}`,i=s8.get(C);if(i)return i;const e=t==null?void 0:t.data,A=Array.isArray(e)?e:[],s=t==null?void 0:t.colWidths,l=t==null?void 0:t.rowHeights,n=Array.isArray(s)?s.map(qg):[],a=Array.isArray(l)?l.map(qg):[],d=A.map(c=>(Array.isArray(c)?c:[]).map(h=>Xdg(t,h))),o={colWidths:n,rowHeights:a,rows:d};return s8.set(C,o),o}function VIg(t,I,g,C){const e=lm(t,I,g).rowHeights[C];if(e)return{height:`${e}px`}}function Hdg(t){const I=t.match(/text-align\s*:\s*(left|right|center|justify)/i);return I?I[1].toLowerCase():"left"}function RY(t){if(!t)return"";const I=String(t.borderColor||""),g=Math.max(0,qg(t.borderWidth)),C=String(t.borderType||"solid");return!I||!g?"":`${g}px ${C==="dashed"||C==="dash"?"dashed":"solid"} ${I}`}function Xdg(t,I){const g=I&&typeof I=="object"?I:{},C=String(g.text??g.content??g.html??""),i=Math.max(1,qg(g.colSpan??g.colspan??g.gridSpan)||1),e=Math.max(1,qg(g.rowSpan??g.rowspan)||1),A=qg(g.hMerge)===1||qg(g.vMerge)===1,s=String(g.fillColor||"")||void 0,l=String(g.fontColor||"")||void 0,n=g.fontBold?700:void 0,a=g.fontItalic?"italic":void 0,d=C?Hdg(C):void 0,o=g.borders||(t==null?void 0:t.borders)||void 0,c=RY(o==null?void 0:o.top),r=RY(o==null?void 0:o.right),h=RY(o==null?void 0:o.bottom),b=RY(o==null?void 0:o.left);return{html:C,colspan:i,rowspan:e,skip:A,style:{padding:"2px 4px",verticalAlign:"middle",background:s,color:l,fontWeight:n,fontStyle:a,textAlign:d,borderTop:c||void 0,borderRight:r||void 0,borderBottom:h||void 0,borderLeft:b||void 0,overflow:"hidden"}}}function d9(t){return t.replace(/[^a-zA-Z0-9_-]/g,"_")}function es(t,I,g){var l,n,a;const C=typeof t.fill=="object"?t.fill:null;if(!C||C.type!=="pattern"||!C.value)return null;const i=String(((l=C.value)==null?void 0:l.type)||""),e=String(((n=C.value)==null?void 0:n.foregroundColor)||"#000"),A=String(((a=C.value)==null?void 0:a.backgroundColor)||"#fff"),s=`pptx-pattern-${I}-${d9(g)}`;return i==="pct5"?{id:s,width:10,height:10,background:A,shapes:[{kind:"circle",cx:5,cy:5,r:1.2,fill:e}]}:i==="solidDmnd"?{id:s,width:12,height:12,background:A,shapes:[{kind:"polygon",points:"6,0 12,6 6,12 0,6",fill:e}]}:{id:s,width:10,height:10,background:A,shapes:[{kind:"circle",cx:5,cy:5,r:1,fill:e}]}}function nm(t,I,g){const C=typeof t.fill=="object"?t.fill:null;if(!C)return null;const i=C==null?void 0:C.value;if(!(C.type==="image"||!!i&&(typeof i.picBase64=="string"||typeof i.src=="string")||typeof C.picBase64=="string"||typeof C.src=="string"))return null;const A=Ue(t);return A?{id:`pptx-shape-img-${I}-${d9(g)}`,href:A}:null}const je={pattern:new Map,image:new Map,gradient:new Map};function MIg(t,I,g){const C=`p-${$Z(I,g)}`;if(je.pattern.has(C))return je.pattern.get(C);const i=es(t,I,g);return je.pattern.set(C,i),i}function YN(t,I,g){const C=`i-${$Z(I,g)}`;if(je.image.has(C))return je.image.get(C);const i=nm(t,I,g);return je.image.set(C,i),i}function Sdg(t){const I=String(t??"").trim();if(!I)return"";if(I.endsWith("%"))return I;const g=Number(I);return Number.isFinite(g)?`${g}%`:I}function Ie(t,I,g){var m,Z,p;const C=`g-${$Z(I,g)}`;if(je.gradient.has(C))return je.gradient.get(C);const i=typeof t.fill=="object"?t.fill:null;if(!i||i.type!=="gradient"||!i.value)return je.gradient.set(C,null),null;const e=Array.isArray((m=i.value)==null?void 0:m.colors)?i.value.colors:[],A=qg((Z=i.value)==null?void 0:Z.rot),s=String(((p=i.value)==null?void 0:p.path)||"rect"),l=e.map(Y=>{const R=Sdg(Y==null?void 0:Y.pos),X=String((Y==null?void 0:Y.color)??"").trim(),H=(Y==null?void 0:Y.alpha)??(Y==null?void 0:Y.opacity),S=H==null?void 0:Math.max(0,Math.min(1,qg(H)));return X?{offset:R||void 0,color:X,opacity:S}:null}).filter(Boolean),n=`pptx-grad-${I}-${d9(g)}`;if(!l.length)return je.gradient.set(C,null),null;if(s!=="rect"){const Y={id:n,kind:"radial",stops:l.map(R=>({...R,offset:R.offset||"0%"}))};return je.gradient.set(C,Y),Y}const a=(90-A+360)%360*(Math.PI/180),d=Math.cos(a),o=Math.sin(a),c=.5-d/2,r=.5+o/2,h=.5+d/2,b=.5-o/2,u={id:n,kind:"linear",x1:`${Math.max(0,Math.min(1,c))*100}%`,y1:`${Math.max(0,Math.min(1,r))*100}%`,x2:`${Math.max(0,Math.min(1,h))*100}%`,y2:`${Math.max(0,Math.min(1,b))*100}%`,stops:l.map(Y=>({...Y,offset:Y.offset||"0%"}))};return je.gradient.set(C,u),u}function RIg(t,I,g){return!!(Ie(t,I,g)||MIg(t,I,g)||YN(t,I,g))}function fIg(t,I,g){var e;const C=typeof t.fill=="object"?t.fill:null,i=String(t.type||"").toLowerCase().includes("pic");if((!C||!C.type)&&i){const A=YN(t,I,g);return A?`url(#${A.id})`:"transparent"}if(!C||!C.type)return"transparent";if(C.type==="color")return String(C.value||"transparent");if(C.type==="gradient"){const A=Ie(t,I,g);return A?`url(#${A.id})`:"transparent"}if(C.type==="pattern"){const A=MIg(t,I,g);return A?`url(#${A.id})`:String(((e=C.value)==null?void 0:e.foregroundColor)||"transparent")}if(C.type==="image"||i||C.type==null&&YN(t,I,g)){const A=YN(t,I,g);return A?`url(#${A.id})`:"transparent"}return"transparent"}function HIg(t){return LV(t).color||"transparent"}function XIg(t){const I=LV(t);return Math.max(0,I.width)}function SIg(t){return LV(t).dasharray}function DIg(t){const I=typeof t.path=="string"?String(t.path).trim():"";if(I)return I;const g=Math.max(0,qg(t.width)),C=Math.max(0,qg(t.height)),i=String(t.shapType||t.shapeType||t.geom||"").toLowerCase(),e=!!t.isFlipH,A=!!t.isFlipV;if(i==="line"||i==="connector"||i==="straightconnector1")return A&&e?`M ${g} ${C} L 0 0`:A?`M 0 ${C} L ${g} 0`:e?`M ${g} 0 L 0 ${C}`:`M 0 0 L ${g} ${C}`;if(g<=0||C<=0)return g>0?`M 0 0 L ${g} 0`:C>0?`M 0 0 L 0 ${C}`:"";if(i==="ellipse"||i==="circle"){const l=g/2,n=C/2,a=g/2,d=C/2;return`M ${l-a} ${n} A ${a} ${d} 0 1 0 ${l+a} ${n} A ${a} ${d} 0 1 0 ${l-a} ${n} Z`}if(i==="triangle"||i==="tri")return`M ${g/2} 0 L ${g} ${C} L 0 ${C} Z`;if(i==="diamond"||i==="rhombus")return`M ${g/2} 0 L ${g} ${C/2} L ${g/2} ${C} L 0 ${C/2} Z`;const s=Math.max(0,Math.min(Math.min(g,C)/2,qg(t.radius||t.cornerRadius||t.rx)));if(s){const l=Math.min(s,g/2,C/2);return`M ${l} 0 H ${g-l} A ${l} ${l} 0 0 1 ${g} ${l} V ${C-l} A ${l} ${l} 0 0 1 ${g-l} ${C} H ${l} A ${l} ${l} 0 0 1 0 ${C-l} V ${l} A ${l} ${l} 0 0 1 ${l} 0 Z`}return`M 0 0 H ${g} V ${C} H 0 Z`}function Ddg(t){var C;const I=[t==null?void 0:t.elements,t==null?void 0:t.children,t==null?void 0:t.childrens,t==null?void 0:t.items,t==null?void 0:t.spTree,(C=t==null?void 0:t.spTree)==null?void 0:C.elements],g=[];return I.forEach(i=>{Array.isArray(i)&&i.forEach(e=>{e&&typeof e=="object"&&g.push(e)})}),g}function Kdg(t){const I=String(t||"").match(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi);if(!I||I.length<2)return null;let g=0,C=0;for(let i=0;i+1<I.length;i+=2){const e=Number(I[i]),A=Number(I[i+1]);Number.isFinite(e)&&(g=Math.max(g,Math.abs(e))),Number.isFinite(A)&&(C=Math.max(C,Math.abs(A)))}return!g||!C?null:{vbW:g,vbH:C}}function KIg(t){const I=(t==null?void 0:t.chOff)??(t==null?void 0:t.childOff)??(t==null?void 0:t.childOffset)??null,g=(t==null?void 0:t.chExt)??(t==null?void 0:t.childExt)??(t==null?void 0:t.childExtent)??null,C=qg((I==null?void 0:I.x)??(I==null?void 0:I.left)??(I==null?void 0:I.l)??(t==null?void 0:t.chOffX)??(t==null?void 0:t.childOffX)),i=qg((I==null?void 0:I.y)??(I==null?void 0:I.top)??(I==null?void 0:I.t)??(t==null?void 0:t.chOffY)??(t==null?void 0:t.childOffY)),e=qg((g==null?void 0:g.cx)??(g==null?void 0:g.w)??(g==null?void 0:g.width)??(t==null?void 0:t.chExtW)??(t==null?void 0:t.childExtW)),A=qg((g==null?void 0:g.cy)??(g==null?void 0:g.h)??(g==null?void 0:g.height)??(t==null?void 0:t.chExtH)??(t==null?void 0:t.childExtH));return!e||!A?null:{offX:C,offY:i,extW:e,extH:A}}function Fdg(t,I,g,C,i){const e=Math.max(0,qg(t.width)),A=Math.max(0,qg(t.height)),s=qg(I.left),l=qg(I.top),n=Math.max(0,qg(I.width)),a=Math.max(0,qg(I.height)),d=s>=-.5&&l>=-.5&&s+n<=e+.5&&l+a<=A+.5,o=KIg(t),c=o&&e?e/o.extW:1,r=o&&A?A/o.extH:1,h=d?s:o?(s-o.offX)*c:s-C,b=d?l:o?(l-o.offY)*r:l-i,u=o&&!d?n*c:n,m=o&&!d?a*r:a,Z=qg(I.rotate),p=!!I.isFlipH,Y=!!I.isFlipV,R=qg(I.order)||g,X=I.opacity==null?1:Math.max(0,Math.min(1,qg(I.opacity))),H=[];Z&&H.push(`rotate(${Z}deg)`),p&&H.push("scaleX(-1)"),Y&&H.push("scaleY(-1)");const S=NIg(I),z=YIg(I),v=yIg(I);return{position:"absolute",left:`${h}px`,top:`${b}px`,width:`${u}px`,height:`${m}px`,zIndex:R,opacity:X,background:S,border:z,filter:v,transformOrigin:"center center",transform:H.length?H.join(" "):void 0}}const FIg=gg.defineComponent({name:"PptxGroup",props:{el:{type:Object,required:!0},slideIndex:{type:Number,required:!0},cacheId:{type:String,required:!0},absLeft:{type:Number,required:!0},absTop:{type:Number,required:!0}},setup(t){const I=(C,i,e,A,s)=>{if(!RIg(C,i,e))return null;const l=Ie(C,i,e),n=es(C,i,e),a=nm(C,i,e),d=[];if((l==null?void 0:l.kind)==="linear"?d.push(gg.h("linearGradient",{id:l.id,x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2},l.stops.map((o,c)=>gg.h("stop",{key:c,offset:o.offset,"stop-color":o.color,"stop-opacity":o.opacity})))):(l==null?void 0:l.kind)==="radial"&&d.push(gg.h("radialGradient",{id:l.id,cx:"50%",cy:"50%",r:"50%"},l.stops.map((o,c)=>gg.h("stop",{key:c,offset:o.offset,"stop-color":o.color,"stop-opacity":o.opacity})))),n&&d.push(gg.h("pattern",{id:n.id,patternUnits:"userSpaceOnUse",width:n.width,height:n.height},[gg.h("rect",{x:0,y:0,width:n.width,height:n.height,fill:n.background}),...n.shapes.map((o,c)=>o.kind==="circle"?gg.h("circle",{key:c,cx:o.cx,cy:o.cy,r:o.r,fill:o.fill}):o.kind==="polygon"?gg.h("polygon",{key:c,points:o.points,fill:o.fill}):gg.h("rect",{key:c,x:o.x,y:o.y,width:o.width,height:o.height,fill:o.fill,transform:o.transform}))])),a){const o=uIg(C),c=o?1/(1-o.l-o.r):1,r=o?1/(1-o.t-o.b):1,h=o?-o.l*c:0,b=o?-o.t*r:0;d.push(gg.h("pattern",{id:a.id,patternUnits:"userSpaceOnUse",patternContentUnits:"userSpaceOnUse",x:0,y:0,width:A,height:s},[gg.h("image",{x:h*A,y:b*s,width:c*A,height:r*s,href:a.href,"xlink:href":a.href,preserveAspectRatio:"none"})]))}return d.length?gg.h("defs",null,d):null},g=(C,i,e,A,s,l)=>{const n=Fdg(e,C,i,A,s),a=XI(C,i,l),d=e8(n==null?void 0:n.left),o=e8(n==null?void 0:n.top),c=A+d,r=s+o,h=KIg(e),b=Math.max(0,qg(e.width)),u=Math.max(0,qg(e.height)),m=h&&b?b/h.extW:1,Z=h&&u?u/h.extH:1;if(a9(C))return gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h("div",{class:"pptx-img-wrap",style:mIg(C)},[gg.h("img",{class:"pptx-img",src:Ue(C),style:ZIg(C),alt:"",draggable:!1})])]);if(o9(C))return gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h("video",{class:"pptx-media",src:Ue(C),controls:!0,preload:"metadata"})]);if(c9(C))return gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h("audio",{class:"pptx-media",src:Ue(C),controls:!0,preload:"metadata"})]);if(BIg(C))return gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h("img",{class:"pptx-img",src:Ue(C),alt:"",draggable:!1})]);if(wIg(C)){const Y=Di(C,t.slideIndex,a),R=[];return Y.kind==="bar"?R.push(...Y.bars.map((X,H)=>gg.h("rect",{key:H,x:X.x,y:X.y,width:X.w,height:X.h,fill:X.fill,"fill-opacity":X.opacity}))):Y.kind==="line"?(R.push(...Y.paths.map((X,H)=>gg.h("path",{key:H,d:X.d,fill:"none",stroke:X.stroke,"stroke-width":X.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"}))),R.push(...Y.points.map((X,H)=>gg.h("circle",{key:H,cx:X.cx,cy:X.cy,r:X.r,fill:X.fill,"fill-opacity":X.opacity})))):Y.kind==="pie"?(R.push(...Y.slices.map((X,H)=>gg.h("path",{key:H,d:X.d,fill:X.fill,"fill-opacity":X.opacity}))),Y.holeR&&R.push(gg.h("circle",{cx:Y.cx,cy:Y.cy,r:Y.holeR,fill:"#fff"}))):Y.kind==="scatter"&&R.push(...Y.points.map((X,H)=>gg.h("circle",{key:H,cx:X.cx,cy:X.cy,r:X.r,fill:X.fill,"fill-opacity":X.opacity}))),gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h("svg",{class:"pptx-chart",viewBox:`0 0 ${qg(C.width)} ${qg(C.height)}`,preserveAspectRatio:"none"},R)])}if(GIg(C)){const Y=lm(C,t.slideIndex,a);return gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h("div",{class:"pptx-table-wrap"},[gg.h("table",{class:"pptx-table"},[Y.colWidths.length?gg.h("colgroup",null,Y.colWidths.map((R,X)=>gg.h("col",{key:X,style:{width:R?`${R}px`:void 0}}))):null,gg.h("tbody",null,Y.rows.map((R,X)=>gg.h("tr",{key:X,style:VIg(C,t.slideIndex,a,X)},R.map((H,S)=>H.skip?null:gg.h("td",{key:`${X}-${S}`,colspan:H.colspan,rowspan:H.rowspan,style:H.style},[gg.h("div",{class:"pptx-table-html",innerHTML:th(H.html)})])).filter(Boolean))))].filter(Boolean))])])}if(vV(C)||n9(C)){const Y=Math.max(0,qg(C.width)),R=Math.max(0,qg(C.height)),X=DIg(C),H=(!Y||!R)&&X?Kdg(X):null,S=Y||(H==null?void 0:H.vbW)||1,z=R||(H==null?void 0:H.vbH)||1,v=I(C,t.slideIndex,a,S,z),K=gg.h("svg",{class:"pptx-shape-svg",viewBox:`0 0 ${S} ${z}`,preserveAspectRatio:"none",style:{overflow:"visible",width:"100%",height:"100%",display:"block"}},[v,gg.h("path",{d:X,fill:fIg(C,t.slideIndex,a),stroke:HIg(C),"stroke-width":XIg(C),"stroke-dasharray":SIg(C),style:{vectorEffect:"non-scaling-stroke"}})].filter(Boolean)),N=typeof C.content=="string"&&C.content.trim()?gg.h("div",{class:"pptx-html",style:{...EN(),overflow:"visible",width:`${Y}px`,height:`${R}px`,transform:m!==1||Z!==1?`scale(${m}, ${Z})`:void 0,transformOrigin:"top left",position:"absolute",left:0,top:0}},[gg.h("div",{class:"pptx-html-inner",style:PN(C),innerHTML:th(C.content)})]):null;return gg.h("div",{key:a,class:"pptx-element",style:{...n,overflow:"visible"}},[K,N].filter(Boolean))}if(pIg(C)||WIg(C))return gg.h("div",{key:a,class:"pptx-element",style:n},[gg.h(FIg,{el:C,slideIndex:t.slideIndex,cacheId:a,absLeft:c,absTop:r})]);const p=typeof C.content=="string"&&C.content.trim();return gg.h("div",{key:a,class:"pptx-element",style:n},p?[gg.h("div",{class:"pptx-html",style:EN()},[gg.h("div",{class:"pptx-html-inner",style:PN(C),innerHTML:th(C.content)})])]:[])};return()=>{const C=Ddg(t.el);return gg.h("div",{class:"pptx-group-inner"},C.map((i,e)=>g(i,e,t.el,t.absLeft,t.absTop,t.cacheId)))}}}),kdg={key:0,class:"pptx-empty"},zdg={key:1,class:"pptx-slides"},Jdg=["src"],Ldg=["src"],vdg=["src"],Tdg=["src"],xdg=["viewBox"],jdg=["x","y","width","height","fill","fill-opacity"],Qdg=["d","stroke","stroke-width"],Odg=["cx","cy","r","fill","fill-opacity"],Udg=["d","fill","fill-opacity"],Edg=["cx","cy","r"],Pdg=["cx","cy","r","fill","fill-opacity"],_dg={key:6,class:"pptx-table-wrap"},qdg={class:"pptx-table"},$dg={key:0},grg=["colspan","rowspan"],Irg=["innerHTML"],Crg=["viewBox"],trg={key:0},irg=["id","x1","y1","x2","y2"],erg=["offset","stop-color","stop-opacity"],Arg=["id"],srg=["offset","stop-color","stop-opacity"],lrg=["id","width","height"],nrg=["width","height","fill"],arg=["cx","cy","r","fill"],org=["points","fill"],crg=["x","y","width","height","fill","transform"],drg=["id"],rrg=["href"],hrg=["d","fill","stroke","stroke-width","stroke-dasharray"],brg=["innerHTML"],urg=["innerHTML"],mrg=gg.defineComponent({__name:"PPT",props:{pptxJson:{}},setup(t){const I=t,g=gg.ref(null),C=gg.ref(0);let i=null;const e=gg.computed(()=>{var o,c,r,h;const a=((c=(o=I.pptxJson)==null?void 0:o.size)==null?void 0:c.width)??960,d=((h=(r=I.pptxJson)==null?void 0:r.size)==null?void 0:h.height)??540;return{width:Number.isFinite(a)?a:960,height:Number.isFinite(d)?d:540}}),A=gg.computed(()=>{const a=C.value;if(!a)return 1;const d=a/e.value.width;return Math.min(1,Math.max(.1,d))}),s=gg.computed(()=>{var d;return(Array.isArray((d=I.pptxJson)==null?void 0:d.slides)?I.pptxJson.slides:[]).map(o=>{const c=(Array.isArray(o.elements)?o.elements:[]).map(m=>({...m,__source:"slide"})),r=new Set(c.map(A8).filter(Boolean)),u=[...(Array.isArray(o.layoutElements)?o.layoutElements:[]).map(m=>{const Z={...m,__source:"layout"},p=A8(Z);return p&&r.has(p)?null:p&&typeof Z.content=="string"&&Ydg(Z.content)?{...Z,content:""}:Z}).filter(Boolean),...c].filter(m=>m&&typeof m=="object").map((m,Z)=>({el:m,idx:Z})).sort((m,Z)=>{const p=qg(m.el.order),Y=qg(Z.el.order);return p!==Y?p-Y:m.idx-Z.idx}).map(m=>m.el);return{...o,elements:u}})});gg.onMounted(()=>{if(!g.value)return;console.log(I.pptxJson);const a=()=>{g.value&&(C.value=g.value.clientWidth)};a(),i=new ResizeObserver(()=>a()),i.observe(g.value)}),gg.onBeforeUnmount(()=>{i==null||i.disconnect(),i=null});function l(){return{width:`${Math.round(e.value.width*A.value)}px`,height:`${Math.round(e.value.height*A.value)}px`}}function n(a){var o;const d=Mdg((a==null?void 0:a.fill)??(a==null?void 0:a.backgroundFill)??(a==null?void 0:a.layoutFill)??((o=a==null?void 0:a.layout)==null?void 0:o.fill)??(a==null?void 0:a.masterFill));return{width:`${e.value.width}px`,height:`${e.value.height}px`,transform:`scale(${A.value})`,background:d}}return(a,d)=>(gg.openBlock(),gg.createElementBlock("div",{ref_key:"rootRef",ref:g,class:"pptx-preview"},[s.value.length?(gg.openBlock(),gg.createElementBlock("div",zdg,[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(s.value,(o,c)=>(gg.openBlock(),gg.createElementBlock("div",{key:c,class:"pptx-slide-shell",style:gg.normalizeStyle(l())},[gg.createElementVNode("div",{class:"pptx-slide",style:gg.normalizeStyle(n(o))},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(o.elements,(r,h)=>{var b,u;return gg.openBlock(),gg.createElementBlock("div",{key:gg.unref(Wdg)(r,h),class:"pptx-element",style:gg.normalizeStyle(gg.unref(fdg)(r,h))},[gg.unref(a9)(r)?(gg.openBlock(),gg.createElementBlock("div",{key:0,class:"pptx-img-wrap",style:gg.normalizeStyle(gg.unref(mIg)(r))},[gg.createElementVNode("img",{class:"pptx-img",src:gg.unref(Ue)(r),style:gg.normalizeStyle(gg.unref(ZIg)(r)),alt:"",draggable:"false"},null,12,Jdg)],4)):gg.unref(o9)(r)?(gg.openBlock(),gg.createElementBlock("video",{key:1,class:"pptx-media",src:gg.unref(Ue)(r),controls:"",preload:"metadata"},null,8,Ldg)):gg.unref(c9)(r)?(gg.openBlock(),gg.createElementBlock("audio",{key:2,class:"pptx-media",src:gg.unref(Ue)(r),controls:"",preload:"metadata"},null,8,vdg)):gg.unref(BIg)(r)?(gg.openBlock(),gg.createElementBlock("img",{key:3,class:"pptx-img",src:gg.unref(Ue)(r),alt:"",draggable:"false"},null,8,Tdg)):gg.unref(wIg)(r)?(gg.openBlock(),gg.createElementBlock("svg",{key:4,class:"pptx-chart",viewBox:`0 0 ${gg.unref(qg)(r.width)} ${gg.unref(qg)(r.height)}`,preserveAspectRatio:"none"},[gg.unref(Di)(r,c,gg.unref(XI)(r,h)).kind==="bar"?(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,{key:0},gg.renderList(gg.unref(Di)(r,c,gg.unref(XI)(r,h)).bars,(m,Z)=>(gg.openBlock(),gg.createElementBlock("rect",{key:Z,x:m.x,y:m.y,width:m.w,height:m.h,fill:m.fill,"fill-opacity":m.opacity},null,8,jdg))),128)):gg.unref(Di)(r,c,gg.unref(XI)(r,h)).kind==="line"?(gg.openBlock(),gg.createElementBlock(gg.Fragment,{key:1},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(Di)(r,c,gg.unref(XI)(r,h)).paths,(m,Z)=>(gg.openBlock(),gg.createElementBlock("path",{key:Z,d:m.d,fill:"none",stroke:m.stroke,"stroke-width":m.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Qdg))),128)),(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(Di)(r,c,gg.unref(XI)(r,h)).points,(m,Z)=>(gg.openBlock(),gg.createElementBlock("circle",{key:Z,cx:m.cx,cy:m.cy,r:m.r,fill:m.fill,"fill-opacity":m.opacity},null,8,Odg))),128))],64)):gg.unref(Di)(r,c,gg.unref(XI)(r,h)).kind==="pie"?(gg.openBlock(),gg.createElementBlock(gg.Fragment,{key:2},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(Di)(r,c,gg.unref(XI)(r,h)).slices,(m,Z)=>(gg.openBlock(),gg.createElementBlock("path",{key:Z,d:m.d,fill:m.fill,"fill-opacity":m.opacity},null,8,Udg))),128)),gg.unref(Di)(r,c,gg.unref(XI)(r,h)).holeR?(gg.openBlock(),gg.createElementBlock("circle",{key:0,cx:gg.unref(Di)(r,c,gg.unref(XI)(r,h)).cx,cy:gg.unref(Di)(r,c,gg.unref(XI)(r,h)).cy,r:gg.unref(Di)(r,c,gg.unref(XI)(r,h)).holeR,fill:"#fff"},null,8,Edg)):gg.createCommentVNode("",!0)],64)):gg.unref(Di)(r,c,gg.unref(XI)(r,h)).kind==="scatter"?(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,{key:3},gg.renderList(gg.unref(Di)(r,c,gg.unref(XI)(r,h)).points,(m,Z)=>(gg.openBlock(),gg.createElementBlock("circle",{key:Z,cx:m.cx,cy:m.cy,r:m.r,fill:m.fill,"fill-opacity":m.opacity},null,8,Pdg))),128)):gg.createCommentVNode("",!0)],8,xdg)):gg.unref(pIg)(r)||gg.unref(WIg)(r)?(gg.openBlock(),gg.createBlock(gg.unref(FIg),{key:5,el:r,"slide-index":c,"cache-id":gg.unref(XI)(r,h),"abs-left":gg.unref(qg)(r.left),"abs-top":gg.unref(qg)(r.top)},null,8,["el","slide-index","cache-id","abs-left","abs-top"])):gg.unref(GIg)(r)?(gg.openBlock(),gg.createElementBlock("div",_dg,[gg.createElementVNode("table",qdg,[gg.unref(lm)(r,c,gg.unref(XI)(r,h)).colWidths.length?(gg.openBlock(),gg.createElementBlock("colgroup",$dg,[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(lm)(r,c,gg.unref(XI)(r,h)).colWidths,(m,Z)=>(gg.openBlock(),gg.createElementBlock("col",{key:Z,style:gg.normalizeStyle({width:m?`${m}px`:void 0})},null,4))),128))])):gg.createCommentVNode("",!0),gg.createElementVNode("tbody",null,[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(lm)(r,c,gg.unref(XI)(r,h)).rows,(m,Z)=>(gg.openBlock(),gg.createElementBlock("tr",{key:Z,style:gg.normalizeStyle(gg.unref(VIg)(r,c,gg.unref(XI)(r,h),Z))},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(m,(p,Y)=>(gg.openBlock(),gg.createElementBlock(gg.Fragment,{key:`${Z}-${Y}`},[p.skip?gg.createCommentVNode("",!0):(gg.openBlock(),gg.createElementBlock("td",{key:0,colspan:p.colspan,rowspan:p.rowspan,style:gg.normalizeStyle(p.style)},[gg.createElementVNode("div",{class:"pptx-table-html",innerHTML:gg.unref(th)(p.html)},null,8,Irg)],12,grg))],64))),128))],4))),128))])])])):gg.unref(vV)(r)?(gg.openBlock(),gg.createElementBlock(gg.Fragment,{key:7},[(gg.openBlock(),gg.createElementBlock("svg",{class:"pptx-shape-svg",viewBox:`0 0 ${gg.unref(qg)(r.width)} ${gg.unref(qg)(r.height)}`,preserveAspectRatio:"none"},[gg.unref(RIg)(r,c,gg.unref(XI)(r,h))?(gg.openBlock(),gg.createElementBlock("defs",trg,[((b=gg.unref(Ie)(r,c,gg.unref(XI)(r,h)))==null?void 0:b.kind)==="linear"?(gg.openBlock(),gg.createElementBlock("linearGradient",{key:0,id:gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).id,x1:gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).x1,y1:gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).y1,x2:gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).x2,y2:gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).y2},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).stops,(m,Z)=>(gg.openBlock(),gg.createElementBlock("stop",{key:Z,offset:m.offset,"stop-color":m.color,"stop-opacity":m.opacity},null,8,erg))),128))],8,irg)):((u=gg.unref(Ie)(r,c,gg.unref(XI)(r,h)))==null?void 0:u.kind)==="radial"?(gg.openBlock(),gg.createElementBlock("radialGradient",{key:1,id:gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).id,cx:"50%",cy:"50%",r:"50%"},[(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(Ie)(r,c,gg.unref(XI)(r,h)).stops,(m,Z)=>(gg.openBlock(),gg.createElementBlock("stop",{key:Z,offset:m.offset,"stop-color":m.color,"stop-opacity":m.opacity},null,8,srg))),128))],8,Arg)):gg.createCommentVNode("",!0),gg.unref(es)(r,c,gg.unref(XI)(r,h))?(gg.openBlock(),gg.createElementBlock("pattern",{key:2,id:gg.unref(es)(r,c,gg.unref(XI)(r,h)).id,patternUnits:"userSpaceOnUse",width:gg.unref(es)(r,c,gg.unref(XI)(r,h)).width,height:gg.unref(es)(r,c,gg.unref(XI)(r,h)).height},[gg.createElementVNode("rect",{x:"0",y:"0",width:gg.unref(es)(r,c,gg.unref(XI)(r,h)).width,height:gg.unref(es)(r,c,gg.unref(XI)(r,h)).height,fill:gg.unref(es)(r,c,gg.unref(XI)(r,h)).background},null,8,nrg),(gg.openBlock(!0),gg.createElementBlock(gg.Fragment,null,gg.renderList(gg.unref(es)(r,c,gg.unref(XI)(r,h)).shapes,(m,Z)=>(gg.openBlock(),gg.createElementBlock(gg.Fragment,{key:Z},[m.kind==="circle"?(gg.openBlock(),gg.createElementBlock("circle",{key:0,cx:m.cx,cy:m.cy,r:m.r,fill:m.fill},null,8,arg)):m.kind==="polygon"?(gg.openBlock(),gg.createElementBlock("polygon",{key:1,points:m.points,fill:m.fill},null,8,org)):m.kind==="rect"?(gg.openBlock(),gg.createElementBlock("rect",{key:2,x:m.x,y:m.y,width:m.width,height:m.height,fill:m.fill,transform:m.transform},null,8,crg)):gg.createCommentVNode("",!0)],64))),128))],8,lrg)):gg.createCommentVNode("",!0),gg.unref(nm)(r,c,gg.unref(XI)(r,h))?(gg.openBlock(),gg.createElementBlock("pattern",{key:3,id:gg.unref(nm)(r,c,gg.unref(XI)(r,h)).id,patternUnits:"objectBoundingBox",width:"1",height:"1"},[gg.createElementVNode("image",{x:"0",y:"0",width:"100%",height:"100%",preserveAspectRatio:"none",href:gg.unref(nm)(r,c,gg.unref(XI)(r,h)).href},null,8,rrg)],8,drg)):gg.createCommentVNode("",!0)])):gg.createCommentVNode("",!0),gg.createElementVNode("path",{d:gg.unref(DIg)(r),fill:gg.unref(fIg)(r,c,gg.unref(XI)(r,h)),stroke:gg.unref(HIg)(r),"stroke-width":gg.unref(XIg)(r),"stroke-dasharray":gg.unref(SIg)(r)},null,8,hrg)],8,Crg)),typeof r.content=="string"&&r.content.trim()?(gg.openBlock(),gg.createElementBlock("div",{key:0,class:"pptx-html",style:gg.normalizeStyle(gg.unref(EN)(r))},[gg.createElementVNode("div",{class:"pptx-html-inner",style:gg.normalizeStyle(gg.unref(PN)(r)),innerHTML:gg.unref(th)(r.content)},null,12,brg)],4)):gg.createCommentVNode("",!0)],64)):(gg.openBlock(),gg.createElementBlock(gg.Fragment,{key:8},[typeof r.content=="string"&&r.content.trim()?(gg.openBlock(),gg.createElementBlock("div",{key:0,class:"pptx-html",style:gg.normalizeStyle(gg.unref(EN)(r))},[gg.createElementVNode("div",{class:"pptx-html-inner",style:gg.normalizeStyle(gg.unref(PN)(r)),innerHTML:gg.unref(th)(r.content)},null,12,urg)],4)):gg.createCommentVNode("",!0)],64))],4)}),128))],4)],4))),128))])):(gg.openBlock(),gg.createElementBlock("div",kdg,"暂无可渲染的幻灯片"))],512))}}),Zrg=m0(mrg,[["__scopeId","data-v-5765ec3e"]]);function US(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function kIg(t,I){if(t){if(typeof t=="string")return US(t,I);var g=Object.prototype.toString.call(t).slice(8,-1);return g==="Object"&&t.constructor&&(g=t.constructor.name),g==="Map"||g==="Set"?Array.from(t):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?US(t,I):void 0}}function r9(t){return function(I){if(Array.isArray(I))return US(I)}(t)||function(I){if(typeof Symbol<"u"&&I[Symbol.iterator]!=null||I["@@iterator"]!=null)return Array.from(I)}(t)||kIg(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function l8(t,I,g,C,i,e,A){try{var s=t[e](A),l=s.value}catch(n){return void g(n)}s.done?I(l):Promise.resolve(l).then(C,i)}function RC(t){return function(){var I=this,g=arguments;return new Promise(function(C,i){var e=t.apply(I,g);function A(l){l8(e,C,i,A,s,"next",l)}function s(l){l8(e,C,i,A,s,"throw",l)}A(void 0)})}}function La(t){return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},La(t)}function h9(t,I,g){return I in t?Object.defineProperty(t,I,{value:g,enumerable:!0,configurable:!0,writable:!0}):t[I]=g,t}var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function TV(t){var I=t.default;if(typeof I=="function"){var g=function(){return I.apply(this,arguments)};g.prototype=I.prototype}else g={};return Object.defineProperty(g,"__esModule",{value:!0}),Object.keys(t).forEach(function(C){var i=Object.getOwnPropertyDescriptor(t,C);Object.defineProperty(g,C,i.get?i:{enumerable:!0,get:function(){return t[C]}})}),g}var zIg={exports:{}},n8={exports:{}};(function(t){function I(g){return t.exports=I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},t.exports.__esModule=!0,t.exports.default=t.exports,I(g)}t.exports=I,t.exports.__esModule=!0,t.exports.default=t.exports})(n8),function(t){var I=n8.exports.default;function g(){t.exports=g=function(){return C},t.exports.__esModule=!0,t.exports.default=t.exports;var C={},i=Object.prototype,e=i.hasOwnProperty,A=Object.defineProperty||function(B,G,w){B[G]=w.value},s=typeof Symbol=="function"?Symbol:{},l=s.iterator||"@@iterator",n=s.asyncIterator||"@@asyncIterator",a=s.toStringTag||"@@toStringTag";function d(B,G,w){return Object.defineProperty(B,G,{value:w,enumerable:!0,configurable:!0,writable:!0}),B[G]}try{d({},"")}catch{d=function(G,w,W){return G[w]=W}}function o(B,G,w,W){var y=G&&G.prototype instanceof h?G:h,f=Object.create(y.prototype),D=new K(W||[]);return A(f,"_invoke",{value:H(B,w,D)}),f}function c(B,G,w){try{return{type:"normal",arg:B.call(G,w)}}catch(W){return{type:"throw",arg:W}}}C.wrap=o;var r={};function h(){}function b(){}function u(){}var m={};d(m,l,function(){return this});var Z=Object.getPrototypeOf,p=Z&&Z(Z(V([])));p&&p!==i&&e.call(p,l)&&(m=p);var Y=u.prototype=h.prototype=Object.create(m);function R(B){["next","throw","return"].forEach(function(G){d(B,G,function(w){return this._invoke(G,w)})})}function X(B,G){function w(y,f,D,F){var T=c(B[y],B,f);if(T.type!=="throw"){var Q=T.arg,P=Q.value;return P&&I(P)=="object"&&e.call(P,"__await")?G.resolve(P.__await).then(function(L){w("next",L,D,F)},function(L){w("throw",L,D,F)}):G.resolve(P).then(function(L){Q.value=L,D(Q)},function(L){return w("throw",L,D,F)})}F(T.arg)}var W;A(this,"_invoke",{value:function(y,f){function D(){return new G(function(F,T){w(y,f,F,T)})}return W=W?W.then(D,D):D()}})}function H(B,G,w){var W="suspendedStart";return function(y,f){if(W==="executing")throw new Error("Generator is already running");if(W==="completed"){if(y==="throw")throw f;return N()}for(w.method=y,w.arg=f;;){var D=w.delegate;if(D){var F=S(D,w);if(F){if(F===r)continue;return F}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(W==="suspendedStart")throw W="completed",w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);W="executing";var T=c(B,G,w);if(T.type==="normal"){if(W=w.done?"completed":"suspendedYield",T.arg===r)continue;return{value:T.arg,done:w.done}}T.type==="throw"&&(W="completed",w.method="throw",w.arg=T.arg)}}}function S(B,G){var w=B.iterator[G.method];if(w===void 0){if(G.delegate=null,G.method==="throw"){if(B.iterator.return&&(G.method="return",G.arg=void 0,S(B,G),G.method==="throw"))return r;G.method="throw",G.arg=new TypeError("The iterator does not provide a 'throw' method")}return r}var W=c(w,B.iterator,G.arg);if(W.type==="throw")return G.method="throw",G.arg=W.arg,G.delegate=null,r;var y=W.arg;return y?y.done?(G[B.resultName]=y.value,G.next=B.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,r):y:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,r)}function z(B){var G={tryLoc:B[0]};1 in B&&(G.catchLoc=B[1]),2 in B&&(G.finallyLoc=B[2],G.afterLoc=B[3]),this.tryEntries.push(G)}function v(B){var G=B.completion||{};G.type="normal",delete G.arg,B.completion=G}function K(B){this.tryEntries=[{tryLoc:"root"}],B.forEach(z,this),this.reset(!0)}function V(B){if(B){var G=B[l];if(G)return G.call(B);if(typeof B.next=="function")return B;if(!isNaN(B.length)){var w=-1,W=function y(){for(;++w<B.length;)if(e.call(B,w))return y.value=B[w],y.done=!1,y;return y.value=void 0,y.done=!0,y};return W.next=W}}return{next:N}}function N(){return{value:void 0,done:!0}}return b.prototype=u,A(Y,"constructor",{value:u,configurable:!0}),A(u,"constructor",{value:b,configurable:!0}),b.displayName=d(u,a,"GeneratorFunction"),C.isGeneratorFunction=function(B){var G=typeof B=="function"&&B.constructor;return!!G&&(G===b||(G.displayName||G.name)==="GeneratorFunction")},C.mark=function(B){return Object.setPrototypeOf?Object.setPrototypeOf(B,u):(B.__proto__=u,d(B,a,"GeneratorFunction")),B.prototype=Object.create(Y),B},C.awrap=function(B){return{__await:B}},R(X.prototype),d(X.prototype,n,function(){return this}),C.AsyncIterator=X,C.async=function(B,G,w,W,y){y===void 0&&(y=Promise);var f=new X(o(B,G,w,W),y);return C.isGeneratorFunction(G)?f:f.next().then(function(D){return D.done?D.value:f.next()})},R(Y),d(Y,a,"Generator"),d(Y,l,function(){return this}),d(Y,"toString",function(){return"[object Generator]"}),C.keys=function(B){var G=Object(B),w=[];for(var W in G)w.push(W);return w.reverse(),function y(){for(;w.length;){var f=w.pop();if(f in G)return y.value=f,y.done=!1,y}return y.done=!0,y}},C.values=V,K.prototype={constructor:K,reset:function(B){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!B)for(var G in this)G.charAt(0)==="t"&&e.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var B=this.tryEntries[0].completion;if(B.type==="throw")throw B.arg;return this.rval},dispatchException:function(B){if(this.done)throw B;var G=this;function w(T,Q){return f.type="throw",f.arg=B,G.next=T,Q&&(G.method="next",G.arg=void 0),!!Q}for(var W=this.tryEntries.length-1;W>=0;--W){var y=this.tryEntries[W],f=y.completion;if(y.tryLoc==="root")return w("end");if(y.tryLoc<=this.prev){var D=e.call(y,"catchLoc"),F=e.call(y,"finallyLoc");if(D&&F){if(this.prev<y.catchLoc)return w(y.catchLoc,!0);if(this.prev<y.finallyLoc)return w(y.finallyLoc)}else if(D){if(this.prev<y.catchLoc)return w(y.catchLoc,!0)}else{if(!F)throw new Error("try statement without catch or finally");if(this.prev<y.finallyLoc)return w(y.finallyLoc)}}}},abrupt:function(B,G){for(var w=this.tryEntries.length-1;w>=0;--w){var W=this.tryEntries[w];if(W.tryLoc<=this.prev&&e.call(W,"finallyLoc")&&this.prev<W.finallyLoc){var y=W;break}}y&&(B==="break"||B==="continue")&&y.tryLoc<=G&&G<=y.finallyLoc&&(y=null);var f=y?y.completion:{};return f.type=B,f.arg=G,y?(this.method="next",this.next=y.finallyLoc,r):this.complete(f)},complete:function(B,G){if(B.type==="throw")throw B.arg;return B.type==="break"||B.type==="continue"?this.next=B.arg:B.type==="return"?(this.rval=this.arg=B.arg,this.method="return",this.next="end"):B.type==="normal"&&G&&(this.next=G),r},finish:function(B){for(var G=this.tryEntries.length-1;G>=0;--G){var w=this.tryEntries[G];if(w.finallyLoc===B)return this.complete(w.completion,w.afterLoc),v(w),r}},catch:function(B){for(var G=this.tryEntries.length-1;G>=0;--G){var w=this.tryEntries[G];if(w.tryLoc===B){var W=w.completion;if(W.type==="throw"){var y=W.arg;v(w)}return y}}throw new Error("illegal catch attempt")},delegateYield:function(B,G,w){return this.delegate={iterator:V(B),resultName:G,nextLoc:w},this.method==="next"&&(this.arg=void 0),r}},C}t.exports=g,t.exports.__esModule=!0,t.exports.default=t.exports}(zIg);var NN=zIg.exports(),rI=NN;try{regeneratorRuntime=NN}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=NN:Function("r","regeneratorRuntime = r")(NN)}var Z0={},a8={},r0=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},Bs=[],De=[],Grg=typeof Uint8Array<"u"?Uint8Array:Array,b9=!1;function JIg(){b9=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=0,g=t.length;I<g;++I)Bs[I]=t[I],De[t.charCodeAt(I)]=I;De[45]=62,De[95]=63}function wrg(t,I,g){for(var C,i,e=[],A=I;A<g;A+=3)C=(t[A]<<16)+(t[A+1]<<8)+t[A+2],e.push(Bs[(i=C)>>18&63]+Bs[i>>12&63]+Bs[i>>6&63]+Bs[63&i]);return e.join("")}function o8(t){var I;b9||JIg();for(var g=t.length,C=g%3,i="",e=[],A=16383,s=0,l=g-C;s<l;s+=A)e.push(wrg(t,s,s+A>l?l:s+A));return C===1?(I=t[g-1],i+=Bs[I>>2],i+=Bs[I<<4&63],i+="=="):C===2&&(I=(t[g-2]<<8)+t[g-1],i+=Bs[I>>10],i+=Bs[I>>4&63],i+=Bs[I<<2&63],i+="="),e.push(i),e.join("")}function fY(t,I,g,C,i){var e,A,s=8*i-C-1,l=(1<<s)-1,n=l>>1,a=-7,d=g?i-1:0,o=g?-1:1,c=t[I+d];for(d+=o,e=c&(1<<-a)-1,c>>=-a,a+=s;a>0;e=256*e+t[I+d],d+=o,a-=8);for(A=e&(1<<-a)-1,e>>=-a,a+=C;a>0;A=256*A+t[I+d],d+=o,a-=8);if(e===0)e=1-n;else{if(e===l)return A?NaN:1/0*(c?-1:1);A+=Math.pow(2,C),e-=n}return(c?-1:1)*A*Math.pow(2,e-C)}function LIg(t,I,g,C,i,e){var A,s,l,n=8*e-i-1,a=(1<<n)-1,d=a>>1,o=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=C?0:e-1,r=C?1:-1,h=I<0||I===0&&1/I<0?1:0;for(I=Math.abs(I),isNaN(I)||I===1/0?(s=isNaN(I)?1:0,A=a):(A=Math.floor(Math.log(I)/Math.LN2),I*(l=Math.pow(2,-A))<1&&(A--,l*=2),(I+=A+d>=1?o/l:o*Math.pow(2,1-d))*l>=2&&(A++,l/=2),A+d>=a?(s=0,A=a):A+d>=1?(s=(I*l-1)*Math.pow(2,i),A+=d):(s=I*Math.pow(2,d-1)*Math.pow(2,i),A=0));i>=8;t[g+c]=255&s,c+=r,s/=256,i-=8);for(A=A<<i|s,n+=i;n>0;t[g+c]=255&A,c+=r,A/=256,n-=8);t[g+c-r]|=128*h}var prg={}.toString,vIg=Array.isArray||function(t){return prg.call(t)=="[object Array]"};Xg.TYPED_ARRAY_SUPPORT=r0.TYPED_ARRAY_SUPPORT===void 0||r0.TYPED_ARRAY_SUPPORT;var Brg=_N();function _N(){return Xg.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Jl(t,I){if(_N()<I)throw new RangeError("Invalid typed array length");return Xg.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(I)).__proto__=Xg.prototype:(t===null&&(t=new Xg(I)),t.length=I),t}function Xg(t,I,g){if(!(Xg.TYPED_ARRAY_SUPPORT||this instanceof Xg))return new Xg(t,I,g);if(typeof t=="number"){if(typeof I=="string")throw new Error("If encoding is specified then the first argument must be a string");return ES(this,t)}return TIg(this,t,I,g)}function TIg(t,I,g,C){if(typeof I=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&I instanceof ArrayBuffer?function(i,e,A,s){if(e.byteLength,A<0||e.byteLength<A)throw new RangeError("'offset' is out of bounds");if(e.byteLength<A+(s||0))throw new RangeError("'length' is out of bounds");return e=A===void 0&&s===void 0?new Uint8Array(e):s===void 0?new Uint8Array(e,A):new Uint8Array(e,A,s),Xg.TYPED_ARRAY_SUPPORT?(i=e).__proto__=Xg.prototype:i=DH(i,e),i}(t,I,g,C):typeof I=="string"?function(i,e,A){if(typeof A=="string"&&A!==""||(A="utf8"),!Xg.isEncoding(A))throw new TypeError('"encoding" must be a valid string encoding');var s=0|jIg(e,A),l=(i=Jl(i,s)).write(e,A);return l!==s&&(i=i.slice(0,l)),i}(t,I,g):function(i,e){if(Ws(e)){var A=0|u9(e.length);return(i=Jl(i,A)).length===0||e.copy(i,0,0,A),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||(s=e.length)!=s?Jl(i,0):DH(i,e);if(e.type==="Buffer"&&vIg(e.data))return DH(i,e.data)}var s;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,I)}function xIg(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function ES(t,I){if(xIg(I),t=Jl(t,I<0?0:0|u9(I)),!Xg.TYPED_ARRAY_SUPPORT)for(var g=0;g<I;++g)t[g]=0;return t}function DH(t,I){var g=I.length<0?0:0|u9(I.length);t=Jl(t,g);for(var C=0;C<g;C+=1)t[C]=255&I[C];return t}function u9(t){if(t>=_N())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_N().toString(16)+" bytes");return 0|t}function Ws(t){return!(t==null||!t._isBuffer)}function jIg(t,I){if(Ws(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var g=t.length;if(g===0)return 0;for(var C=!1;;)switch(I){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":case void 0:return qN(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*g;case"hex":return g>>>1;case"base64":return EIg(t).length;default:if(C)return qN(t).length;I=(""+I).toLowerCase(),C=!0}}function Wrg(t,I,g){var C=!1;if((I===void 0||I<0)&&(I=0),I>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0)<=(I>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Xrg(this,I,g);case"utf8":case"utf-8":return OIg(this,I,g);case"ascii":return frg(this,I,g);case"latin1":case"binary":return Hrg(this,I,g);case"base64":return Rrg(this,I,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Srg(this,I,g);default:if(C)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),C=!0}}function fo(t,I,g){var C=t[I];t[I]=t[g],t[g]=C}function c8(t,I,g,C,i){if(t.length===0)return-1;if(typeof g=="string"?(C=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,isNaN(g)&&(g=i?0:t.length-1),g<0&&(g=t.length+g),g>=t.length){if(i)return-1;g=t.length-1}else if(g<0){if(!i)return-1;g=0}if(typeof I=="string"&&(I=Xg.from(I,C)),Ws(I))return I.length===0?-1:d8(t,I,g,C,i);if(typeof I=="number")return I&=255,Xg.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,I,g):Uint8Array.prototype.lastIndexOf.call(t,I,g):d8(t,[I],g,C,i);throw new TypeError("val must be string, number or Buffer")}function d8(t,I,g,C,i){var e,A=1,s=t.length,l=I.length;if(C!==void 0&&((C=String(C).toLowerCase())==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(t.length<2||I.length<2)return-1;A=2,s/=2,l/=2,g/=2}function n(c,r){return A===1?c[r]:c.readUInt16BE(r*A)}if(i){var a=-1;for(e=g;e<s;e++)if(n(t,e)===n(I,a===-1?0:e-a)){if(a===-1&&(a=e),e-a+1===l)return a*A}else a!==-1&&(e-=e-a),a=-1}else for(g+l>s&&(g=s-l),e=g;e>=0;e--){for(var d=!0,o=0;o<l;o++)if(n(t,e+o)!==n(I,o)){d=!1;break}if(d)return e}return-1}function yrg(t,I,g,C){g=Number(g)||0;var i=t.length-g;C?(C=Number(C))>i&&(C=i):C=i;var e=I.length;if(e%2!=0)throw new TypeError("Invalid hex string");C>e/2&&(C=e/2);for(var A=0;A<C;++A){var s=parseInt(I.substr(2*A,2),16);if(isNaN(s))return A;t[g+A]=s}return A}function Yrg(t,I,g,C){return xV(qN(I,t.length-g),t,g,C)}function QIg(t,I,g,C){return xV(function(i){for(var e=[],A=0;A<i.length;++A)e.push(255&i.charCodeAt(A));return e}(I),t,g,C)}function Nrg(t,I,g,C){return QIg(t,I,g,C)}function Vrg(t,I,g,C){return xV(EIg(I),t,g,C)}function Mrg(t,I,g,C){return xV(function(i,e){for(var A,s,l,n=[],a=0;a<i.length&&!((e-=2)<0);++a)s=(A=i.charCodeAt(a))>>8,l=A%256,n.push(l),n.push(s);return n}(I,t.length-g),t,g,C)}function Rrg(t,I,g){return I===0&&g===t.length?o8(t):o8(t.slice(I,g))}function OIg(t,I,g){g=Math.min(t.length,g);for(var C=[],i=I;i<g;){var e,A,s,l,n=t[i],a=null,d=n>239?4:n>223?3:n>191?2:1;if(i+d<=g)switch(d){case 1:n<128&&(a=n);break;case 2:(192&(e=t[i+1]))==128&&(l=(31&n)<<6|63&e)>127&&(a=l);break;case 3:e=t[i+1],A=t[i+2],(192&e)==128&&(192&A)==128&&(l=(15&n)<<12|(63&e)<<6|63&A)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:e=t[i+1],A=t[i+2],s=t[i+3],(192&e)==128&&(192&A)==128&&(192&s)==128&&(l=(15&n)<<18|(63&e)<<12|(63&A)<<6|63&s)>65535&&l<1114112&&(a=l)}a===null?(a=65533,d=1):a>65535&&(a-=65536,C.push(a>>>10&1023|55296),a=56320|1023&a),C.push(a),i+=d}return function(o){var c=o.length;if(c<=4096)return String.fromCharCode.apply(String,o);for(var r="",h=0;h<c;)r+=String.fromCharCode.apply(String,o.slice(h,h+=4096));return r}(C)}Xg.poolSize=8192,Xg._augment=function(t){return t.__proto__=Xg.prototype,t},Xg.from=function(t,I,g){return TIg(null,t,I,g)},Xg.TYPED_ARRAY_SUPPORT&&(Xg.prototype.__proto__=Uint8Array.prototype,Xg.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Xg[Symbol.species]),Xg.alloc=function(t,I,g){return function(C,i,e,A){return xIg(i),i<=0?Jl(C,i):e!==void 0?typeof A=="string"?Jl(C,i).fill(e,A):Jl(C,i).fill(e):Jl(C,i)}(null,t,I,g)},Xg.allocUnsafe=function(t){return ES(null,t)},Xg.allocUnsafeSlow=function(t){return ES(null,t)},Xg.isBuffer=gG,Xg.compare=function(t,I){if(!Ws(t)||!Ws(I))throw new TypeError("Arguments must be Buffers");if(t===I)return 0;for(var g=t.length,C=I.length,i=0,e=Math.min(g,C);i<e;++i)if(t[i]!==I[i]){g=t[i],C=I[i];break}return g<C?-1:C<g?1:0},Xg.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Xg.concat=function(t,I){if(!vIg(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Xg.alloc(0);var g;if(I===void 0)for(I=0,g=0;g<t.length;++g)I+=t[g].length;var C=Xg.allocUnsafe(I),i=0;for(g=0;g<t.length;++g){var e=t[g];if(!Ws(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(C,i),i+=e.length}return C},Xg.byteLength=jIg,Xg.prototype._isBuffer=!0,Xg.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var I=0;I<t;I+=2)fo(this,I,I+1);return this},Xg.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var I=0;I<t;I+=4)fo(this,I,I+3),fo(this,I+1,I+2);return this},Xg.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var I=0;I<t;I+=8)fo(this,I,I+7),fo(this,I+1,I+6),fo(this,I+2,I+5),fo(this,I+3,I+4);return this},Xg.prototype.toString=function(){var t=0|this.length;return t===0?"":arguments.length===0?OIg(this,0,t):Wrg.apply(this,arguments)},Xg.prototype.equals=function(t){if(!Ws(t))throw new TypeError("Argument must be a Buffer");return this===t||Xg.compare(this,t)===0},Xg.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},Xg.prototype.compare=function(t,I,g,C,i){if(!Ws(t))throw new TypeError("Argument must be a Buffer");if(I===void 0&&(I=0),g===void 0&&(g=t?t.length:0),C===void 0&&(C=0),i===void 0&&(i=this.length),I<0||g>t.length||C<0||i>this.length)throw new RangeError("out of range index");if(C>=i&&I>=g)return 0;if(C>=i)return-1;if(I>=g)return 1;if(this===t)return 0;for(var e=(i>>>=0)-(C>>>=0),A=(g>>>=0)-(I>>>=0),s=Math.min(e,A),l=this.slice(C,i),n=t.slice(I,g),a=0;a<s;++a)if(l[a]!==n[a]){e=l[a],A=n[a];break}return e<A?-1:A<e?1:0},Xg.prototype.includes=function(t,I,g){return this.indexOf(t,I,g)!==-1},Xg.prototype.indexOf=function(t,I,g){return c8(this,t,I,g,!0)},Xg.prototype.lastIndexOf=function(t,I,g){return c8(this,t,I,g,!1)},Xg.prototype.write=function(t,I,g,C){if(I===void 0)C="utf8",g=this.length,I=0;else if(g===void 0&&typeof I=="string")C=I,g=this.length,I=0;else{if(!isFinite(I))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");I|=0,isFinite(g)?(g|=0,C===void 0&&(C="utf8")):(C=g,g=void 0)}var i=this.length-I;if((g===void 0||g>i)&&(g=i),t.length>0&&(g<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");for(var e=!1;;)switch(C){case"hex":return yrg(this,t,I,g);case"utf8":case"utf-8":return Yrg(this,t,I,g);case"ascii":return QIg(this,t,I,g);case"latin1":case"binary":return Nrg(this,t,I,g);case"base64":return Vrg(this,t,I,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mrg(this,t,I,g);default:if(e)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),e=!0}},Xg.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function frg(t,I,g){var C="";g=Math.min(t.length,g);for(var i=I;i<g;++i)C+=String.fromCharCode(127&t[i]);return C}function Hrg(t,I,g){var C="";g=Math.min(t.length,g);for(var i=I;i<g;++i)C+=String.fromCharCode(t[i]);return C}function Xrg(t,I,g){var C=t.length;(!I||I<0)&&(I=0),(!g||g<0||g>C)&&(g=C);for(var i="",e=I;e<g;++e)i+=Krg(t[e]);return i}function Srg(t,I,g){for(var C=t.slice(I,g),i="",e=0;e<C.length;e+=2)i+=String.fromCharCode(C[e]+256*C[e+1]);return i}function Nt(t,I,g){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+I>g)throw new RangeError("Trying to access beyond buffer length")}function Xi(t,I,g,C,i,e){if(!Ws(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(I>i||I<e)throw new RangeError('"value" argument is out of bounds');if(g+C>t.length)throw new RangeError("Index out of range")}function HY(t,I,g,C){I<0&&(I=65535+I+1);for(var i=0,e=Math.min(t.length-g,2);i<e;++i)t[g+i]=(I&255<<8*(C?i:1-i))>>>8*(C?i:1-i)}function XY(t,I,g,C){I<0&&(I=4294967295+I+1);for(var i=0,e=Math.min(t.length-g,4);i<e;++i)t[g+i]=I>>>8*(C?i:3-i)&255}function UIg(t,I,g,C,i,e){if(g+C>t.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function r8(t,I,g,C,i){return i||UIg(t,0,g,4),LIg(t,I,g,C,23,4),g+4}function h8(t,I,g,C,i){return i||UIg(t,0,g,8),LIg(t,I,g,C,52,8),g+8}Xg.prototype.slice=function(t,I){var g,C=this.length;if((t=~~t)<0?(t+=C)<0&&(t=0):t>C&&(t=C),(I=I===void 0?C:~~I)<0?(I+=C)<0&&(I=0):I>C&&(I=C),I<t&&(I=t),Xg.TYPED_ARRAY_SUPPORT)(g=this.subarray(t,I)).__proto__=Xg.prototype;else{var i=I-t;g=new Xg(i,void 0);for(var e=0;e<i;++e)g[e]=this[e+t]}return g},Xg.prototype.readUIntLE=function(t,I,g){t|=0,I|=0,g||Nt(t,I,this.length);for(var C=this[t],i=1,e=0;++e<I&&(i*=256);)C+=this[t+e]*i;return C},Xg.prototype.readUIntBE=function(t,I,g){t|=0,I|=0,g||Nt(t,I,this.length);for(var C=this[t+--I],i=1;I>0&&(i*=256);)C+=this[t+--I]*i;return C},Xg.prototype.readUInt8=function(t,I){return I||Nt(t,1,this.length),this[t]},Xg.prototype.readUInt16LE=function(t,I){return I||Nt(t,2,this.length),this[t]|this[t+1]<<8},Xg.prototype.readUInt16BE=function(t,I){return I||Nt(t,2,this.length),this[t]<<8|this[t+1]},Xg.prototype.readUInt32LE=function(t,I){return I||Nt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Xg.prototype.readUInt32BE=function(t,I){return I||Nt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Xg.prototype.readIntLE=function(t,I,g){t|=0,I|=0,g||Nt(t,I,this.length);for(var C=this[t],i=1,e=0;++e<I&&(i*=256);)C+=this[t+e]*i;return C>=(i*=128)&&(C-=Math.pow(2,8*I)),C},Xg.prototype.readIntBE=function(t,I,g){t|=0,I|=0,g||Nt(t,I,this.length);for(var C=I,i=1,e=this[t+--C];C>0&&(i*=256);)e+=this[t+--C]*i;return e>=(i*=128)&&(e-=Math.pow(2,8*I)),e},Xg.prototype.readInt8=function(t,I){return I||Nt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Xg.prototype.readInt16LE=function(t,I){I||Nt(t,2,this.length);var g=this[t]|this[t+1]<<8;return 32768&g?4294901760|g:g},Xg.prototype.readInt16BE=function(t,I){I||Nt(t,2,this.length);var g=this[t+1]|this[t]<<8;return 32768&g?4294901760|g:g},Xg.prototype.readInt32LE=function(t,I){return I||Nt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Xg.prototype.readInt32BE=function(t,I){return I||Nt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Xg.prototype.readFloatLE=function(t,I){return I||Nt(t,4,this.length),fY(this,t,!0,23,4)},Xg.prototype.readFloatBE=function(t,I){return I||Nt(t,4,this.length),fY(this,t,!1,23,4)},Xg.prototype.readDoubleLE=function(t,I){return I||Nt(t,8,this.length),fY(this,t,!0,52,8)},Xg.prototype.readDoubleBE=function(t,I){return I||Nt(t,8,this.length),fY(this,t,!1,52,8)},Xg.prototype.writeUIntLE=function(t,I,g,C){t=+t,I|=0,g|=0,C||Xi(this,t,I,g,Math.pow(2,8*g)-1,0);var i=1,e=0;for(this[I]=255&t;++e<g&&(i*=256);)this[I+e]=t/i&255;return I+g},Xg.prototype.writeUIntBE=function(t,I,g,C){t=+t,I|=0,g|=0,C||Xi(this,t,I,g,Math.pow(2,8*g)-1,0);var i=g-1,e=1;for(this[I+i]=255&t;--i>=0&&(e*=256);)this[I+i]=t/e&255;return I+g},Xg.prototype.writeUInt8=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,1,255,0),Xg.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[I]=255&t,I+1},Xg.prototype.writeUInt16LE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,2,65535,0),Xg.TYPED_ARRAY_SUPPORT?(this[I]=255&t,this[I+1]=t>>>8):HY(this,t,I,!0),I+2},Xg.prototype.writeUInt16BE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,2,65535,0),Xg.TYPED_ARRAY_SUPPORT?(this[I]=t>>>8,this[I+1]=255&t):HY(this,t,I,!1),I+2},Xg.prototype.writeUInt32LE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,4,4294967295,0),Xg.TYPED_ARRAY_SUPPORT?(this[I+3]=t>>>24,this[I+2]=t>>>16,this[I+1]=t>>>8,this[I]=255&t):XY(this,t,I,!0),I+4},Xg.prototype.writeUInt32BE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,4,4294967295,0),Xg.TYPED_ARRAY_SUPPORT?(this[I]=t>>>24,this[I+1]=t>>>16,this[I+2]=t>>>8,this[I+3]=255&t):XY(this,t,I,!1),I+4},Xg.prototype.writeIntLE=function(t,I,g,C){if(t=+t,I|=0,!C){var i=Math.pow(2,8*g-1);Xi(this,t,I,g,i-1,-i)}var e=0,A=1,s=0;for(this[I]=255&t;++e<g&&(A*=256);)t<0&&s===0&&this[I+e-1]!==0&&(s=1),this[I+e]=(t/A>>0)-s&255;return I+g},Xg.prototype.writeIntBE=function(t,I,g,C){if(t=+t,I|=0,!C){var i=Math.pow(2,8*g-1);Xi(this,t,I,g,i-1,-i)}var e=g-1,A=1,s=0;for(this[I+e]=255&t;--e>=0&&(A*=256);)t<0&&s===0&&this[I+e+1]!==0&&(s=1),this[I+e]=(t/A>>0)-s&255;return I+g},Xg.prototype.writeInt8=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,1,127,-128),Xg.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[I]=255&t,I+1},Xg.prototype.writeInt16LE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,2,32767,-32768),Xg.TYPED_ARRAY_SUPPORT?(this[I]=255&t,this[I+1]=t>>>8):HY(this,t,I,!0),I+2},Xg.prototype.writeInt16BE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,2,32767,-32768),Xg.TYPED_ARRAY_SUPPORT?(this[I]=t>>>8,this[I+1]=255&t):HY(this,t,I,!1),I+2},Xg.prototype.writeInt32LE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,4,2147483647,-2147483648),Xg.TYPED_ARRAY_SUPPORT?(this[I]=255&t,this[I+1]=t>>>8,this[I+2]=t>>>16,this[I+3]=t>>>24):XY(this,t,I,!0),I+4},Xg.prototype.writeInt32BE=function(t,I,g){return t=+t,I|=0,g||Xi(this,t,I,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Xg.TYPED_ARRAY_SUPPORT?(this[I]=t>>>24,this[I+1]=t>>>16,this[I+2]=t>>>8,this[I+3]=255&t):XY(this,t,I,!1),I+4},Xg.prototype.writeFloatLE=function(t,I,g){return r8(this,t,I,!0,g)},Xg.prototype.writeFloatBE=function(t,I,g){return r8(this,t,I,!1,g)},Xg.prototype.writeDoubleLE=function(t,I,g){return h8(this,t,I,!0,g)},Xg.prototype.writeDoubleBE=function(t,I,g){return h8(this,t,I,!1,g)},Xg.prototype.copy=function(t,I,g,C){if(g||(g=0),C||C===0||(C=this.length),I>=t.length&&(I=t.length),I||(I=0),C>0&&C<g&&(C=g),C===g||t.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("sourceStart out of bounds");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),t.length-I<C-g&&(C=t.length-I+g);var i,e=C-g;if(this===t&&g<I&&I<C)for(i=e-1;i>=0;--i)t[i+I]=this[i+g];else if(e<1e3||!Xg.TYPED_ARRAY_SUPPORT)for(i=0;i<e;++i)t[i+I]=this[i+g];else Uint8Array.prototype.set.call(t,this.subarray(g,g+e),I);return e},Xg.prototype.fill=function(t,I,g,C){if(typeof t=="string"){if(typeof I=="string"?(C=I,I=0,g=this.length):typeof g=="string"&&(C=g,g=this.length),t.length===1){var i=t.charCodeAt(0);i<256&&(t=i)}if(C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!Xg.isEncoding(C))throw new TypeError("Unknown encoding: "+C)}else typeof t=="number"&&(t&=255);if(I<0||this.length<I||this.length<g)throw new RangeError("Out of range index");if(g<=I)return this;var e;if(I>>>=0,g=g===void 0?this.length:g>>>0,t||(t=0),typeof t=="number")for(e=I;e<g;++e)this[e]=t;else{var A=Ws(t)?t:qN(new Xg(t,C).toString()),s=A.length;for(e=0;e<g-I;++e)this[e+I]=A[e%s]}return this};var Drg=/[^+\/0-9A-Za-z-_]/g;function Krg(t){return t<16?"0"+t.toString(16):t.toString(16)}function qN(t,I){var g;I=I||1/0;for(var C=t.length,i=null,e=[],A=0;A<C;++A){if((g=t.charCodeAt(A))>55295&&g<57344){if(!i){if(g>56319){(I-=3)>-1&&e.push(239,191,189);continue}if(A+1===C){(I-=3)>-1&&e.push(239,191,189);continue}i=g;continue}if(g<56320){(I-=3)>-1&&e.push(239,191,189),i=g;continue}g=65536+(i-55296<<10|g-56320)}else i&&(I-=3)>-1&&e.push(239,191,189);if(i=null,g<128){if((I-=1)<0)break;e.push(g)}else if(g<2048){if((I-=2)<0)break;e.push(g>>6|192,63&g|128)}else if(g<65536){if((I-=3)<0)break;e.push(g>>12|224,g>>6&63|128,63&g|128)}else{if(!(g<1114112))throw new Error("Invalid code point");if((I-=4)<0)break;e.push(g>>18|240,g>>12&63|128,g>>6&63|128,63&g|128)}}return e}function EIg(t){return function(I){var g,C,i,e,A,s;b9||JIg();var l=I.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");A=I[l-2]==="="?2:I[l-1]==="="?1:0,s=new Grg(3*l/4-A),i=A>0?l-4:l;var n=0;for(g=0,C=0;g<i;g+=4,C+=3)e=De[I.charCodeAt(g)]<<18|De[I.charCodeAt(g+1)]<<12|De[I.charCodeAt(g+2)]<<6|De[I.charCodeAt(g+3)],s[n++]=e>>16&255,s[n++]=e>>8&255,s[n++]=255&e;return A===2?(e=De[I.charCodeAt(g)]<<2|De[I.charCodeAt(g+1)]>>4,s[n++]=255&e):A===1&&(e=De[I.charCodeAt(g)]<<10|De[I.charCodeAt(g+1)]<<4|De[I.charCodeAt(g+2)]>>2,s[n++]=e>>8&255,s[n++]=255&e),s}(function(I){if((I=function(g){return g.trim?g.trim():g.replace(/^\s+|\s+$/g,"")}(I).replace(Drg,"")).length<2)return"";for(;I.length%4!=0;)I+="=";return I}(t))}function xV(t,I,g,C){for(var i=0;i<C&&!(i+g>=I.length||i>=t.length);++i)I[i+g]=t[i];return i}function gG(t){return t!=null&&(!!t._isBuffer||b8(t)||function(I){return typeof I.readFloatLE=="function"&&typeof I.slice=="function"&&b8(I.slice(0,0))}(t))}function b8(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var Frg=Object.freeze({__proto__:null,INSPECT_MAX_BYTES:50,kMaxLength:Brg,Buffer:Xg,SlowBuffer:function(t){return+t!=t&&(t=0),Xg.alloc(+t)},isBuffer:gG}),nt={};function PIg(){throw new Error("setTimeout has not been defined")}function _Ig(){throw new Error("clearTimeout has not been defined")}var xn=PIg,jn=_Ig;function qIg(t){if(xn===setTimeout)return setTimeout(t,0);if((xn===PIg||!xn)&&setTimeout)return xn=setTimeout,setTimeout(t,0);try{return xn(t,0)}catch{try{return xn.call(null,t,0)}catch{return xn.call(this,t,0)}}}typeof r0.setTimeout=="function"&&(xn=setTimeout),typeof r0.clearTimeout=="function"&&(jn=clearTimeout);var To,Ll=[],ih=!1,VN=-1;function krg(){ih&&To&&(ih=!1,To.length?Ll=To.concat(Ll):VN=-1,Ll.length&&$Ig())}function $Ig(){if(!ih){var t=qIg(krg);ih=!0;for(var I=Ll.length;I;){for(To=Ll,Ll=[];++VN<I;)To&&To[VN].run();VN=-1,I=Ll.length}To=null,ih=!1,function(g){if(jn===clearTimeout)return clearTimeout(g);if((jn===_Ig||!jn)&&clearTimeout)return jn=clearTimeout,clearTimeout(g);try{jn(g)}catch{try{return jn.call(null,g)}catch{return jn.call(this,g)}}}(t)}}function Kt(t){var I=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)I[g-1]=arguments[g];Ll.push(new gCg(t,I)),Ll.length!==1||ih||qIg($Ig)}function gCg(t,I){this.fun=t,this.array=I}gCg.prototype.run=function(){this.fun.apply(null,this.array)};var Nu=r0.performance||{};Nu.now||Nu.mozNow||Nu.msNow||Nu.oNow||Nu.webkitNow;var qc={env:{}},KH={exports:{}};function Qn(){}function EI(){EI.init.call(this)}function ICg(t){return t._maxListeners===void 0?EI.defaultMaxListeners:t._maxListeners}function zrg(t,I,g){if(I)t.call(g);else for(var C=t.length,i=IG(t,C),e=0;e<C;++e)i[e].call(g)}function Jrg(t,I,g,C){if(I)t.call(g,C);else for(var i=t.length,e=IG(t,i),A=0;A<i;++A)e[A].call(g,C)}function Lrg(t,I,g,C,i){if(I)t.call(g,C,i);else for(var e=t.length,A=IG(t,e),s=0;s<e;++s)A[s].call(g,C,i)}function vrg(t,I,g,C,i,e){if(I)t.call(g,C,i,e);else for(var A=t.length,s=IG(t,A),l=0;l<A;++l)s[l].call(g,C,i,e)}function Trg(t,I,g,C){if(I)t.apply(g,C);else for(var i=t.length,e=IG(t,i),A=0;A<i;++A)e[A].apply(g,C)}function u8(t,I,g,C){var i,e,A,s;if(typeof g!="function")throw new TypeError('"listener" argument must be a function');if((e=t._events)?(e.newListener&&(t.emit("newListener",I,g.listener?g.listener:g),e=t._events),A=e[I]):(e=t._events=new Qn,t._eventsCount=0),A){if(typeof A=="function"?A=e[I]=C?[g,A]:[A,g]:C?A.unshift(g):A.push(g),!A.warned&&(i=ICg(t))&&i>0&&A.length>i){A.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+I+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=I,l.count=A.length,s=l,typeof console.warn=="function"?console.warn(s):console.log(s)}}else A=e[I]=g,++t._eventsCount;return t}function m8(t,I,g){var C=!1;function i(){t.removeListener(I,i),C||(C=!0,g.apply(t,arguments))}return i.listener=g,i}function Z8(t){var I=this._events;if(I){var g=I[t];if(typeof g=="function")return 1;if(g)return g.length}return 0}function IG(t,I){for(var g=new Array(I);I--;)g[I]=t[I];return g}Qn.prototype=Object.create(null),EI.EventEmitter=EI,EI.usingDomains=!1,EI.prototype.domain=void 0,EI.prototype._events=void 0,EI.prototype._maxListeners=void 0,EI.defaultMaxListeners=10,EI.init=function(){this.domain=null,EI.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Qn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EI.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},EI.prototype.getMaxListeners=function(){return ICg(this)},EI.prototype.emit=function(t){var I,g,C,i,e,A,s,l=t==="error";if(A=this._events)l=l&&A.error==null;else if(!l)return!1;if(s=this.domain,l){if(I=arguments[1],!s){if(I instanceof Error)throw I;var n=new Error('Uncaught, unspecified "error" event. ('+I+")");throw n.context=I,n}return I||(I=new Error('Uncaught, unspecified "error" event')),I.domainEmitter=this,I.domain=s,I.domainThrown=!1,s.emit("error",I),!1}if(!(g=A[t]))return!1;var a=typeof g=="function";switch(C=arguments.length){case 1:zrg(g,a,this);break;case 2:Jrg(g,a,this,arguments[1]);break;case 3:Lrg(g,a,this,arguments[1],arguments[2]);break;case 4:vrg(g,a,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(C-1),e=1;e<C;e++)i[e-1]=arguments[e];Trg(g,a,this,i)}return!0},EI.prototype.addListener=function(t,I){return u8(this,t,I,!1)},EI.prototype.on=EI.prototype.addListener,EI.prototype.prependListener=function(t,I){return u8(this,t,I,!0)},EI.prototype.once=function(t,I){if(typeof I!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,m8(this,t,I)),this},EI.prototype.prependOnceListener=function(t,I){if(typeof I!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,m8(this,t,I)),this},EI.prototype.removeListener=function(t,I){var g,C,i,e,A;if(typeof I!="function")throw new TypeError('"listener" argument must be a function');if(!(C=this._events))return this;if(!(g=C[t]))return this;if(g===I||g.listener&&g.listener===I)--this._eventsCount==0?this._events=new Qn:(delete C[t],C.removeListener&&this.emit("removeListener",t,g.listener||I));else if(typeof g!="function"){for(i=-1,e=g.length;e-- >0;)if(g[e]===I||g[e].listener&&g[e].listener===I){A=g[e].listener,i=e;break}if(i<0)return this;if(g.length===1){if(g[0]=void 0,--this._eventsCount==0)return this._events=new Qn,this;delete C[t]}else(function(s,l){for(var n=l,a=n+1,d=s.length;a<d;n+=1,a+=1)s[n]=s[a];s.pop()})(g,i);C.removeListener&&this.emit("removeListener",t,A||I)}return this},EI.prototype.removeAllListeners=function(t){var I,g;if(!(g=this._events))return this;if(!g.removeListener)return arguments.length===0?(this._events=new Qn,this._eventsCount=0):g[t]&&(--this._eventsCount==0?this._events=new Qn:delete g[t]),this;if(arguments.length===0){for(var C,i=Object.keys(g),e=0;e<i.length;++e)(C=i[e])!=="removeListener"&&this.removeAllListeners(C);return this.removeAllListeners("removeListener"),this._events=new Qn,this._eventsCount=0,this}if(typeof(I=g[t])=="function")this.removeListener(t,I);else if(I)do this.removeListener(t,I[I.length-1]);while(I[0]);return this},EI.prototype.listeners=function(t){var I,g,C=this._events;return g=C&&(I=C[t])?typeof I=="function"?[I.listener||I]:function(i){for(var e=new Array(i.length),A=0;A<e.length;++A)e[A]=i[A].listener||i[A];return e}(I):[],g},EI.listenerCount=function(t,I){return typeof t.listenerCount=="function"?t.listenerCount(I):Z8.call(t,I)},EI.prototype.listenerCount=Z8,EI.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var xrg=Object.freeze({__proto__:null,default:EI,EventEmitter:EI}),Fa=typeof Object.create=="function"?function(t,I){t.super_=I,t.prototype=Object.create(I.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,I){t.super_=I;var g=function(){};g.prototype=I.prototype,t.prototype=new g,t.prototype.constructor=t},jrg=/%[sdj%]/g;function jV(t){if(!Gm(t)){for(var I=[],g=0;g<arguments.length;g++)I.push(Vs(arguments[g]));return I.join(" ")}g=1;for(var C=arguments,i=C.length,e=String(t).replace(jrg,function(s){if(s==="%%")return"%";if(g>=i)return s;switch(s){case"%s":return String(C[g++]);case"%d":return Number(C[g++]);case"%j":try{return JSON.stringify(C[g++])}catch{return"[Circular]"}default:return s}}),A=C[g];g<i;A=C[++g])CG(A)||!nd(A)?e+=" "+A:e+=" "+Vs(A);return e}function QV(t,I){if(Ys(r0.process))return function(){return QV(t,I).apply(this,arguments)};if(qc.noDeprecation===!0)return t;var g=!1;return function(){if(!g){if(qc.throwDeprecation)throw new Error(I);qc.traceDeprecation?console.trace(I):console.error(I),g=!0}return t.apply(this,arguments)}}var FH,SY={};function m9(t){return Ys(FH)&&(FH=qc.env.NODE_DEBUG||""),t=t.toUpperCase(),!SY[t]&&(new RegExp("\\b"+t+"\\b","i").test(FH)?SY[t]=function(){var I=jV.apply(null,arguments);console.error("%s %d: %s",t,0,I)}:SY[t]=function(){}),SY[t]}function Vs(t,I){var g={seen:[],stylize:Org};return arguments.length>=3&&(g.depth=arguments[2]),arguments.length>=4&&(g.colors=arguments[3]),OV(I)?g.showHidden=I:I&&p9(g,I),Ys(g.showHidden)&&(g.showHidden=!1),Ys(g.depth)&&(g.depth=2),Ys(g.colors)&&(g.colors=!1),Ys(g.customInspect)&&(g.customInspect=!0),g.colors&&(g.stylize=Qrg),$N(g,t,g.depth)}function Qrg(t,I){var g=Vs.styles[I];return g?"\x1B["+Vs.colors[g][0]+"m"+t+"\x1B["+Vs.colors[g][1]+"m":t}function Org(t,I){return t}function $N(t,I,g){if(t.customInspect&&I&&cm(I.inspect)&&I.inspect!==Vs&&(!I.constructor||I.constructor.prototype!==I)){var C=I.inspect(g,t);return Gm(C)||(C=$N(t,C,g)),C}var i=function(o,c){if(Ys(c))return o.stylize("undefined","undefined");if(Gm(c)){var r="'"+JSON.stringify(c).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return o.stylize(r,"string")}if(G9(c))return o.stylize(""+c,"number");if(OV(c))return o.stylize(""+c,"boolean");if(CG(c))return o.stylize("null","null")}(t,I);if(i)return i;var e=Object.keys(I),A=function(o){var c={};return o.forEach(function(r,h){c[r]=!0}),c}(e);if(t.showHidden&&(e=Object.getOwnPropertyNames(I)),om(I)&&(e.indexOf("message")>=0||e.indexOf("description")>=0))return kH(I);if(e.length===0){if(cm(I)){var s=I.name?": "+I.name:"";return t.stylize("[Function"+s+"]","special")}if(am(I))return t.stylize(RegExp.prototype.toString.call(I),"regexp");if(gV(I))return t.stylize(Date.prototype.toString.call(I),"date");if(om(I))return kH(I)}var l,n="",a=!1,d=["{","}"];return Z9(I)&&(a=!0,d=["[","]"]),cm(I)&&(n=" [Function"+(I.name?": "+I.name:"")+"]"),am(I)&&(n=" "+RegExp.prototype.toString.call(I)),gV(I)&&(n=" "+Date.prototype.toUTCString.call(I)),om(I)&&(n=" "+kH(I)),e.length!==0||a&&I.length!=0?g<0?am(I)?t.stylize(RegExp.prototype.toString.call(I),"regexp"):t.stylize("[Object]","special"):(t.seen.push(I),l=a?function(o,c,r,h,b){for(var u=[],m=0,Z=c.length;m<Z;++m)sCg(c,String(m))?u.push(zH(o,c,r,h,String(m),!0)):u.push("");return b.forEach(function(p){p.match(/^\d+$/)||u.push(zH(o,c,r,h,p,!0))}),u}(t,I,g,A,e):e.map(function(o){return zH(t,I,g,A,o,a)}),t.seen.pop(),function(o,c,r){return o.reduce(function(h,b){return b.indexOf(`
`),h+b.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(c===""?"":c+`
 `)+" "+o.join(`,
  `)+" "+r[1]:r[0]+c+" "+o.join(", ")+" "+r[1]}(l,n,d)):d[0]+n+d[1]}function kH(t){return"["+Error.prototype.toString.call(t)+"]"}function zH(t,I,g,C,i,e){var A,s,l;if((l=Object.getOwnPropertyDescriptor(I,i)||{value:I[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),sCg(C,i)||(A="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=CG(g)?$N(t,l.value,null):$N(t,l.value,g-1)).indexOf(`
`)>-1&&(s=e?s.split(`
`).map(function(n){return"  "+n}).join(`
`).substr(2):`
`+s.split(`
`).map(function(n){return"   "+n}).join(`
`)):s=t.stylize("[Circular]","special")),Ys(A)){if(e&&i.match(/^\d+$/))return s;(A=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=t.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=t.stylize(A,"string"))}return A+": "+s}function Z9(t){return Array.isArray(t)}function OV(t){return typeof t=="boolean"}function CG(t){return t===null}function CCg(t){return t==null}function G9(t){return typeof t=="number"}function Gm(t){return typeof t=="string"}function tCg(t){return typeof t=="symbol"}function Ys(t){return t===void 0}function am(t){return nd(t)&&w9(t)==="[object RegExp]"}function nd(t){return typeof t=="object"&&t!==null}function gV(t){return nd(t)&&w9(t)==="[object Date]"}function om(t){return nd(t)&&(w9(t)==="[object Error]"||t instanceof Error)}function cm(t){return typeof t=="function"}function iCg(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||t===void 0}function eCg(t){return gG(t)}function w9(t){return Object.prototype.toString.call(t)}function JH(t){return t<10?"0"+t.toString(10):t.toString(10)}Vs.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Vs.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Urg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Erg(){var t=new Date,I=[JH(t.getHours()),JH(t.getMinutes()),JH(t.getSeconds())].join(":");return[t.getDate(),Urg[t.getMonth()],I].join(" ")}function ACg(){console.log("%s - %s",Erg(),jV.apply(null,arguments))}function p9(t,I){if(!I||!nd(I))return t;for(var g=Object.keys(I),C=g.length;C--;)t[g[C]]=I[g[C]];return t}function sCg(t,I){return Object.prototype.hasOwnProperty.call(t,I)}var Prg={inherits:Fa,_extend:p9,log:ACg,isBuffer:eCg,isPrimitive:iCg,isFunction:cm,isError:om,isDate:gV,isObject:nd,isRegExp:am,isUndefined:Ys,isSymbol:tCg,isString:Gm,isNumber:G9,isNullOrUndefined:CCg,isNull:CG,isBoolean:OV,isArray:Z9,inspect:Vs,deprecate:QV,format:jV,debuglog:m9},_rg=Object.freeze({__proto__:null,format:jV,deprecate:QV,debuglog:m9,inspect:Vs,isArray:Z9,isBoolean:OV,isNull:CG,isNullOrUndefined:CCg,isNumber:G9,isString:Gm,isSymbol:tCg,isUndefined:Ys,isRegExp:am,isObject:nd,isDate:gV,isError:om,isFunction:cm,isPrimitive:iCg,isBuffer:eCg,log:ACg,inherits:Fa,_extend:p9,default:Prg});function Ko(){this.head=null,this.tail=null,this.length=0}Ko.prototype.push=function(t){var I={data:t,next:null};this.length>0?this.tail.next=I:this.head=I,this.tail=I,++this.length},Ko.prototype.unshift=function(t){var I={data:t,next:this.head};this.length===0&&(this.tail=I),this.head=I,++this.length},Ko.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},Ko.prototype.clear=function(){this.head=this.tail=null,this.length=0},Ko.prototype.join=function(t){if(this.length===0)return"";for(var I=this.head,g=""+I.data;I=I.next;)g+=t+I.data;return g},Ko.prototype.concat=function(t){if(this.length===0)return Xg.alloc(0);if(this.length===1)return this.head.data;for(var I=Xg.allocUnsafe(t>>>0),g=this.head,C=0;g;)g.data.copy(I,C),C+=g.data.length,g=g.next;return I};var qrg=Xg.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function dm(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(I){if(I&&!qrg(I))throw new Error("Unknown encoding: "+I)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ghg;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Ihg;break;default:return void(this.write=$rg)}this.charBuffer=new Xg(6),this.charReceived=0,this.charLength=0}function $rg(t){return t.toString(this.encoding)}function ghg(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Ihg(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}dm.prototype.write=function(t){for(var I="";this.charLength;){var g=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,g),this.charReceived+=g,this.charReceived<this.charLength)return"";if(t=t.slice(g,t.length),!((i=(I=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(I.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,t.length===0)return I;break}this.charLength+=this.surrogateSize,I=""}this.detectIncompleteChar(t);var C=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,C),C-=this.charReceived);var i;if(C=(I+=t.toString(this.encoding,0,C)).length-1,(i=I.charCodeAt(C))>=55296&&i<=56319){var e=this.surrogateSize;return this.charLength+=e,this.charReceived+=e,this.charBuffer.copy(this.charBuffer,e,0,e),t.copy(this.charBuffer,0,0,e),I.substring(0,C)}return I},dm.prototype.detectIncompleteChar=function(t){for(var I=t.length>=3?3:t.length;I>0;I--){var g=t[t.length-I];if(I==1&&g>>5==6){this.charLength=2;break}if(I<=2&&g>>4==14){this.charLength=3;break}if(I<=3&&g>>3==30){this.charLength=4;break}}this.charReceived=I},dm.prototype.end=function(t){var I="";if(t&&t.length&&(I=this.write(t)),this.charReceived){var g=this.charReceived,C=this.charBuffer,i=this.encoding;I+=C.slice(0,g).toString(i)}return I},QC.ReadableState=lCg;var dC=m9("stream");function lCg(t,I){t=t||{},this.objectMode=!!t.objectMode,I instanceof Ze&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var g=t.highWaterMark,C=this.objectMode?16:16384;this.highWaterMark=g||g===0?g:C,this.highWaterMark=~~this.highWaterMark,this.buffer=new Ko,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new dm(t.encoding),this.encoding=t.encoding)}function QC(t){if(!(this instanceof QC))return new QC(t);this._readableState=new lCg(t,this),this.readable=!0,t&&typeof t.read=="function"&&(this._read=t.read),EI.call(this)}function G8(t,I,g,C,i){var e=function(n,a){var d=null;return gG(a)||typeof a=="string"||a==null||n.objectMode||(d=new TypeError("Invalid non-string/buffer chunk")),d}(I,g);if(e)t.emit("error",e);else if(g===null)I.reading=!1,function(n,a){if(!a.ended){if(a.decoder){var d=a.decoder.end();d&&d.length&&(a.buffer.push(d),a.length+=a.objectMode?1:d.length)}a.ended=!0,IV(n)}}(t,I);else if(I.objectMode||g&&g.length>0)if(I.ended&&!i){var A=new Error("stream.push() after EOF");t.emit("error",A)}else if(I.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else{var l;!I.decoder||i||C||(g=I.decoder.write(g),l=!I.objectMode&&g.length===0),i||(I.reading=!1),l||(I.flowing&&I.length===0&&!I.sync?(t.emit("data",g),t.read(0)):(I.length+=I.objectMode?1:g.length,i?I.buffer.unshift(g):I.buffer.push(g),I.needReadable&&IV(t))),function(n,a){a.readingMore||(a.readingMore=!0,Kt(Chg,n,a))}(t,I)}else i||(I.reading=!1);return function(n){return!n.ended&&(n.needReadable||n.length<n.highWaterMark||n.length===0)}(I)}Fa(QC,EI),QC.prototype.push=function(t,I){var g=this._readableState;return g.objectMode||typeof t!="string"||(I=I||g.defaultEncoding)!==g.encoding&&(t=Xg.from(t,I),I=""),G8(this,g,t,I,!1)},QC.prototype.unshift=function(t){return G8(this,this._readableState,t,"",!0)},QC.prototype.isPaused=function(){return this._readableState.flowing===!1},QC.prototype.setEncoding=function(t){return this._readableState.decoder=new dm(t),this._readableState.encoding=t,this};function w8(t,I){return t<=0||I.length===0&&I.ended?0:I.objectMode?1:t!=t?I.flowing&&I.length?I.buffer.head.data.length:I.length:(t>I.highWaterMark&&(I.highWaterMark=function(g){return g>=8388608?g=8388608:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}(t)),t<=I.length?t:I.ended?I.length:(I.needReadable=!0,0))}function IV(t){var I=t._readableState;I.needReadable=!1,I.emittedReadable||(dC("emitReadable",I.flowing),I.emittedReadable=!0,I.sync?Kt(p8,t):p8(t))}function p8(t){dC("emit readable"),t.emit("readable"),B9(t)}function Chg(t,I){for(var g=I.length;!I.reading&&!I.flowing&&!I.ended&&I.length<I.highWaterMark&&(dC("maybeReadMore read 0"),t.read(0),g!==I.length);)g=I.length;I.readingMore=!1}function thg(t){dC("readable nexttick read 0"),t.read(0)}function ihg(t,I){I.reading||(dC("resume read 0"),t.read(0)),I.resumeScheduled=!1,I.awaitDrain=0,t.emit("resume"),B9(t),I.flowing&&!I.reading&&t.read(0)}function B9(t){var I=t._readableState;for(dC("flow",I.flowing);I.flowing&&t.read()!==null;);}function B8(t,I){return I.length===0?null:(I.objectMode?g=I.buffer.shift():!t||t>=I.length?(g=I.decoder?I.buffer.join(""):I.buffer.length===1?I.buffer.head.data:I.buffer.concat(I.length),I.buffer.clear()):g=function(C,i,e){var A;return C<i.head.data.length?(A=i.head.data.slice(0,C),i.head.data=i.head.data.slice(C)):A=C===i.head.data.length?i.shift():e?function(s,l){var n=l.head,a=1,d=n.data;for(s-=d.length;n=n.next;){var o=n.data,c=s>o.length?o.length:s;if(c===o.length?d+=o:d+=o.slice(0,s),(s-=c)===0){c===o.length?(++a,n.next?l.head=n.next:l.head=l.tail=null):(l.head=n,n.data=o.slice(c));break}++a}return l.length-=a,d}(C,i):function(s,l){var n=Xg.allocUnsafe(s),a=l.head,d=1;for(a.data.copy(n),s-=a.data.length;a=a.next;){var o=a.data,c=s>o.length?o.length:s;if(o.copy(n,n.length-s,0,c),(s-=c)===0){c===o.length?(++d,a.next?l.head=a.next:l.head=l.tail=null):(l.head=a,a.data=o.slice(c));break}++d}return l.length-=d,n}(C,i),A}(t,I.buffer,I.decoder),g);var g}function LH(t){var I=t._readableState;if(I.length>0)throw new Error('"endReadable()" called on non-empty stream');I.endEmitted||(I.ended=!0,Kt(ehg,I,t))}function ehg(t,I){t.endEmitted||t.length!==0||(t.endEmitted=!0,I.readable=!1,I.emit("end"))}function W8(t,I){for(var g=0,C=t.length;g<C;g++)if(t[g]===I)return g;return-1}function Ahg(){}function shg(t,I,g){this.chunk=t,this.encoding=I,this.callback=g,this.next=null}function PS(t,I){Object.defineProperty(this,"buffer",{get:QV(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,I instanceof Ze&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var g=t.highWaterMark,C=this.objectMode?16:16384;this.highWaterMark=g||g===0?g:C,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(A,s){var l=A._writableState,n=l.sync,a=l.writecb;if(function(o){o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0}(l),s)(function(o,c,r,h,b){--c.pendingcb,r?Kt(b,h):b(h),o._writableState.errorEmitted=!0,o.emit("error",h)})(A,l,n,s,a);else{var d=aCg(l);d||l.corked||l.bufferProcessing||!l.bufferedRequest||nCg(A,l),n?Kt(y8,A,l,d,a):y8(A,l,d,a)}})(I,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new cCg(this)}function Ut(t){if(!(this instanceof Ut||this instanceof Ze))return new Ut(t);this._writableState=new PS(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev)),EI.call(this)}function _S(t,I,g,C,i,e,A){I.writelen=C,I.writecb=A,I.writing=!0,I.sync=!0,g?t._writev(i,I.onwrite):t._write(i,e,I.onwrite),I.sync=!1}function y8(t,I,g,C){g||function(i,e){e.length===0&&e.needDrain&&(e.needDrain=!1,i.emit("drain"))}(t,I),I.pendingcb--,C(),oCg(t,I)}function nCg(t,I){I.bufferProcessing=!0;var g=I.bufferedRequest;if(t._writev&&g&&g.next){var C=I.bufferedRequestCount,i=new Array(C),e=I.corkedRequestsFree;e.entry=g;for(var A=0;g;)i[A]=g,g=g.next,A+=1;_S(t,I,!0,I.length,i,"",e.finish),I.pendingcb++,I.lastBufferedRequest=null,e.next?(I.corkedRequestsFree=e.next,e.next=null):I.corkedRequestsFree=new cCg(I)}else{for(;g;){var s=g.chunk,l=g.encoding,n=g.callback;if(_S(t,I,!1,I.objectMode?1:s.length,s,l,n),g=g.next,I.writing)break}g===null&&(I.lastBufferedRequest=null)}I.bufferedRequestCount=0,I.bufferedRequest=g,I.bufferProcessing=!1}function aCg(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Y8(t,I){I.prefinished||(I.prefinished=!0,t.emit("prefinish"))}function oCg(t,I){var g=aCg(I);return g&&(I.pendingcb===0?(Y8(t,I),I.finished=!0,t.emit("finish")):Y8(t,I)),g}function cCg(t){var I=this;this.next=null,this.entry=null,this.finish=function(g){var C=I.entry;for(I.entry=null;C;){var i=C.callback;t.pendingcb--,i(g),C=C.next}t.corkedRequestsFree?t.corkedRequestsFree.next=I:t.corkedRequestsFree=I}}QC.prototype.read=function(t){dC("read",t),t=parseInt(t,10);var I=this._readableState,g=t;if(t!==0&&(I.emittedReadable=!1),t===0&&I.needReadable&&(I.length>=I.highWaterMark||I.ended))return dC("read: emitReadable",I.length,I.ended),I.length===0&&I.ended?LH(this):IV(this),null;if((t=w8(t,I))===0&&I.ended)return I.length===0&&LH(this),null;var C,i=I.needReadable;return dC("need readable",i),(I.length===0||I.length-t<I.highWaterMark)&&dC("length less than watermark",i=!0),I.ended||I.reading?dC("reading or ended",i=!1):i&&(dC("do read"),I.reading=!0,I.sync=!0,I.length===0&&(I.needReadable=!0),this._read(I.highWaterMark),I.sync=!1,I.reading||(t=w8(g,I))),(C=t>0?B8(t,I):null)===null?(I.needReadable=!0,t=0):I.length-=t,I.length===0&&(I.ended||(I.needReadable=!0),g!==t&&I.ended&&LH(this)),C!==null&&this.emit("data",C),C},QC.prototype._read=function(t){this.emit("error",new Error("not implemented"))},QC.prototype.pipe=function(t,I){var g=this,C=this._readableState;switch(C.pipesCount){case 0:C.pipes=t;break;case 1:C.pipes=[C.pipes,t];break;default:C.pipes.push(t)}C.pipesCount+=1,dC("pipe count=%d opts=%j",C.pipesCount,I);var i=!I||I.end!==!1?A:n;function e(b){dC("onunpipe"),b===g&&n()}function A(){dC("onend"),t.end()}C.endEmitted?Kt(i):g.once("end",i),t.on("unpipe",e);var s=function(b){return function(){var u=b._readableState;dC("pipeOnDrain",u.awaitDrain),u.awaitDrain&&u.awaitDrain--,u.awaitDrain===0&&b.listeners("data").length&&(u.flowing=!0,B9(b))}}(g);t.on("drain",s);var l=!1;function n(){dC("cleanup"),t.removeListener("close",c),t.removeListener("finish",r),t.removeListener("drain",s),t.removeListener("error",o),t.removeListener("unpipe",e),g.removeListener("end",A),g.removeListener("end",n),g.removeListener("data",d),l=!0,!C.awaitDrain||t._writableState&&!t._writableState.needDrain||s()}var a=!1;function d(b){dC("ondata"),a=!1,t.write(b)!==!1||a||((C.pipesCount===1&&C.pipes===t||C.pipesCount>1&&W8(C.pipes,t)!==-1)&&!l&&(dC("false write response, pause",g._readableState.awaitDrain),g._readableState.awaitDrain++,a=!0),g.pause())}function o(b){var u;dC("onerror",b),h(),t.removeListener("error",o),u="error",t.listeners(u).length===0&&t.emit("error",b)}function c(){t.removeListener("finish",r),h()}function r(){dC("onfinish"),t.removeListener("close",c),h()}function h(){dC("unpipe"),g.unpipe(t)}return g.on("data",d),function(b,u,m){if(typeof b.prependListener=="function")return b.prependListener(u,m);b._events&&b._events[u]?Array.isArray(b._events[u])?b._events[u].unshift(m):b._events[u]=[m,b._events[u]]:b.on(u,m)}(t,"error",o),t.once("close",c),t.once("finish",r),t.emit("pipe",g),C.flowing||(dC("pipe resume"),g.resume()),t},QC.prototype.unpipe=function(t){var I=this._readableState;if(I.pipesCount===0)return this;if(I.pipesCount===1)return t&&t!==I.pipes||(t||(t=I.pipes),I.pipes=null,I.pipesCount=0,I.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var g=I.pipes,C=I.pipesCount;I.pipes=null,I.pipesCount=0,I.flowing=!1;for(var i=0;i<C;i++)g[i].emit("unpipe",this);return this}var e=W8(I.pipes,t);return e===-1||(I.pipes.splice(e,1),I.pipesCount-=1,I.pipesCount===1&&(I.pipes=I.pipes[0]),t.emit("unpipe",this)),this},QC.prototype.on=function(t,I){var g=EI.prototype.on.call(this,t,I);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var C=this._readableState;C.endEmitted||C.readableListening||(C.readableListening=C.needReadable=!0,C.emittedReadable=!1,C.reading?C.length&&IV(this):Kt(thg,this))}return g},QC.prototype.addListener=QC.prototype.on,QC.prototype.resume=function(){var t=this._readableState;return t.flowing||(dC("resume"),t.flowing=!0,function(I,g){g.resumeScheduled||(g.resumeScheduled=!0,Kt(ihg,I,g))}(this,t)),this},QC.prototype.pause=function(){return dC("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(dC("pause"),this._readableState.flowing=!1,this.emit("pause")),this},QC.prototype.wrap=function(t){var I=this._readableState,g=!1,C=this;for(var i in t.on("end",function(){if(dC("wrapped end"),I.decoder&&!I.ended){var e=I.decoder.end();e&&e.length&&C.push(e)}C.push(null)}),t.on("data",function(e){dC("wrapped data"),I.decoder&&(e=I.decoder.write(e)),I.objectMode&&e==null||(I.objectMode||e&&e.length)&&(C.push(e)||(g=!0,t.pause()))}),t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return function(e,A){for(var s=0,l=e.length;s<l;s++)A(e[s],s)}(["error","close","destroy","pause","resume"],function(e){t.on(e,C.emit.bind(C,e))}),C._read=function(e){dC("wrapped _read",e),g&&(g=!1,t.resume())},C},QC._fromList=B8,Ut.WritableState=PS,Fa(Ut,EI),PS.prototype.getBuffer=function(){for(var t=this.bufferedRequest,I=[];t;)I.push(t),t=t.next;return I},Ut.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Ut.prototype.write=function(t,I,g){var C=this._writableState,i=!1;return typeof I=="function"&&(g=I,I=null),Xg.isBuffer(t)?I="buffer":I||(I=C.defaultEncoding),typeof g!="function"&&(g=Ahg),C.ended?function(e,A){var s=new Error("write after end");e.emit("error",s),Kt(A,s)}(this,g):function(e,A,s,l){var n=!0,a=!1;return s===null?a=new TypeError("May not write null values to stream"):Xg.isBuffer(s)||typeof s=="string"||s===void 0||A.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Kt(l,a),n=!1),n}(this,C,t,g)&&(C.pendingcb++,i=function(e,A,s,l,n){s=function(c,r,h){return c.objectMode||c.decodeStrings===!1||typeof r!="string"||(r=Xg.from(r,h)),r}(A,s,l),Xg.isBuffer(s)&&(l="buffer");var a=A.objectMode?1:s.length;A.length+=a;var d=A.length<A.highWaterMark;if(d||(A.needDrain=!0),A.writing||A.corked){var o=A.lastBufferedRequest;A.lastBufferedRequest=new shg(s,l,n),o?o.next=A.lastBufferedRequest:A.bufferedRequest=A.lastBufferedRequest,A.bufferedRequestCount+=1}else _S(e,A,!1,a,s,l,n);return d}(this,C,t,I,g)),i},Ut.prototype.cork=function(){this._writableState.corked++},Ut.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||nCg(this,t))},Ut.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Ut.prototype._write=function(t,I,g){g(new Error("not implemented"))},Ut.prototype._writev=null,Ut.prototype.end=function(t,I,g){var C=this._writableState;typeof t=="function"?(g=t,t=null,I=null):typeof I=="function"&&(g=I,I=null),t!=null&&this.write(t,I),C.corked&&(C.corked=1,this.uncork()),C.ending||C.finished||function(i,e,A){e.ending=!0,oCg(i,e),A&&(e.finished?Kt(A):i.once("finish",A)),e.ended=!0,i.writable=!1}(this,C,g)},Fa(Ze,QC);for(var N8=Object.keys(Ut.prototype),vH=0;vH<N8.length;vH++){var TH=N8[vH];Ze.prototype[TH]||(Ze.prototype[TH]=Ut.prototype[TH])}function Ze(t){if(!(this instanceof Ze))return new Ze(t);QC.call(this,t),Ut.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",lhg)}function lhg(){this.allowHalfOpen||this._writableState.ended||Kt(nhg,this)}function nhg(t){t.end()}function ahg(t){this.afterTransform=function(I,g){return function(C,i,e){var A=C._transformState;A.transforming=!1;var s=A.writecb;if(!s)return C.emit("error",new Error("no writecb in Transform class"));A.writechunk=null,A.writecb=null,e!=null&&C.push(e),s(i);var l=C._readableState;l.reading=!1,(l.needReadable||l.length<l.highWaterMark)&&C._read(l.highWaterMark)}(t,I,g)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function yA(t){if(!(this instanceof yA))return new yA(t);Ze.call(this,t),this._transformState=new ahg(this);var I=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(g){V8(I,g)}):V8(I)})}function V8(t,I){if(I)return t.emit("error",I);var g=t._writableState,C=t._transformState;if(g.length)throw new Error("Calling transform done when ws.length != 0");if(C.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function eh(t){if(!(this instanceof eh))return new eh(t);yA.call(this,t)}function oA(){EI.call(this)}Fa(yA,Ze),yA.prototype.push=function(t,I){return this._transformState.needTransform=!1,Ze.prototype.push.call(this,t,I)},yA.prototype._transform=function(t,I,g){throw new Error("Not implemented")},yA.prototype._write=function(t,I,g){var C=this._transformState;if(C.writecb=g,C.writechunk=t,C.writeencoding=I,!C.transforming){var i=this._readableState;(C.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},yA.prototype._read=function(t){var I=this._transformState;I.writechunk!==null&&I.writecb&&!I.transforming?(I.transforming=!0,this._transform(I.writechunk,I.writeencoding,I.afterTransform)):I.needTransform=!0},Fa(eh,yA),eh.prototype._transform=function(t,I,g){g(null,t)},Fa(oA,EI),oA.Readable=QC,oA.Writable=Ut,oA.Duplex=Ze,oA.Transform=yA,oA.PassThrough=eh,oA.Stream=oA,oA.prototype.pipe=function(t,I){var g=this;function C(a){t.writable&&t.write(a)===!1&&g.pause&&g.pause()}function i(){g.readable&&g.resume&&g.resume()}g.on("data",C),t.on("drain",i),t._isStdio||I&&I.end===!1||(g.on("end",A),g.on("close",s));var e=!1;function A(){e||(e=!0,t.end())}function s(){e||(e=!0,typeof t.destroy=="function"&&t.destroy())}function l(a){if(n(),EI.listenerCount(this,"error")===0)throw a}function n(){g.removeListener("data",C),t.removeListener("drain",i),g.removeListener("end",A),g.removeListener("close",s),g.removeListener("error",l),t.removeListener("error",l),g.removeListener("end",n),g.removeListener("close",n),t.removeListener("close",n)}return g.on("error",l),t.on("error",l),g.on("end",n),g.on("close",n),t.on("close",n),t.emit("pipe",g),t};var M8,R8,f8,dCg=TV(Object.freeze({__proto__:null,default:oA,Readable:QC,Writable:Ut,Duplex:Ze,Transform:yA,PassThrough:eh,Stream:oA})),xH={exports:{}};function UV(){return M8||(M8=1,xH.exports={nextTick:function(t,I,g,C){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i,e,A=arguments.length;switch(A){case 0:case 1:return Kt(t);case 2:return Kt(function(){t.call(null,I)});case 3:return Kt(function(){t.call(null,I,g)});case 4:return Kt(function(){t.call(null,I,g,C)});default:for(i=new Array(A-1),e=0;e<i.length;)i[e++]=arguments[e];return Kt(function(){t.apply(null,i)})}}}),xH.exports}var H8,ohg=TV(xrg),X8={exports:{}};function rCg(){return H8?X8.exports:(H8=1,X8.exports=dCg)}var S8,jH={exports:{}},hCg=TV(Frg);function EV(){return S8||(S8=1,function(t,I){var g=hCg,C=g.Buffer;function i(A,s){for(var l in A)s[l]=A[l]}function e(A,s,l){return C(A,s,l)}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?t.exports=g:(i(g,I),I.Buffer=e),i(C,e),e.from=function(A,s,l){if(typeof A=="number")throw new TypeError("Argument must not be a number");return C(A,s,l)},e.alloc=function(A,s,l){if(typeof A!="number")throw new TypeError("Argument must be a number");var n=C(A);return s!==void 0?typeof l=="string"?n.fill(s,l):n.fill(s):n.fill(0),n},e.allocUnsafe=function(A){if(typeof A!="number")throw new TypeError("Argument must be a number");return C(A)},e.allocUnsafeSlow=function(A){if(typeof A!="number")throw new TypeError("Argument must be a number");return g.SlowBuffer(A)}}(jH,jH.exports)),jH.exports}var D8,vt={};function tG(){if(D8)return vt;function t(I){return Object.prototype.toString.call(I)}return D8=1,vt.isArray=function(I){return Array.isArray?Array.isArray(I):t(I)==="[object Array]"},vt.isBoolean=function(I){return typeof I=="boolean"},vt.isNull=function(I){return I===null},vt.isNullOrUndefined=function(I){return I==null},vt.isNumber=function(I){return typeof I=="number"},vt.isString=function(I){return typeof I=="string"},vt.isSymbol=function(I){return typeof I=="symbol"},vt.isUndefined=function(I){return I===void 0},vt.isRegExp=function(I){return t(I)==="[object RegExp]"},vt.isObject=function(I){return typeof I=="object"&&I!==null},vt.isDate=function(I){return t(I)==="[object Date]"},vt.isError=function(I){return t(I)==="[object Error]"||I instanceof Error},vt.isFunction=function(I){return typeof I=="function"},vt.isPrimitive=function(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||typeof I=="symbol"||I===void 0},vt.isBuffer=hCg.Buffer.isBuffer,vt}var K8,F8,k8={exports:{}},PV=TV(_rg),QH={exports:{}};function iG(){return F8||(F8=1,function(t){try{var I=PV;if(typeof I.inherits!="function")throw"";t.exports=I.inherits}catch{t.exports=(K8||(K8=1,typeof Object.create=="function"?QH.exports=function(C,i){i&&(C.super_=i,C.prototype=Object.create(i.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}))}:QH.exports=function(C,i){if(i){C.super_=i;var e=function(){};e.prototype=i.prototype,C.prototype=new e,C.prototype.constructor=C}}),QH.exports)}}(k8)),k8.exports}var z8,OH,J8,L8,v8,UH,T8,EH,x8,j8={exports:{}};function chg(){return z8||(z8=1,function(t){var I=EV().Buffer,g=PV;t.exports=function(){function C(){(function(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")})(this,C),this.head=null,this.tail=null,this.length=0}return C.prototype.push=function(i){var e={data:i,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},C.prototype.unshift=function(i){var e={data:i,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length},C.prototype.shift=function(){if(this.length!==0){var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i}},C.prototype.clear=function(){this.head=this.tail=null,this.length=0},C.prototype.join=function(i){if(this.length===0)return"";for(var e=this.head,A=""+e.data;e=e.next;)A+=i+e.data;return A},C.prototype.concat=function(i){if(this.length===0)return I.alloc(0);if(this.length===1)return this.head.data;for(var e,A,s,l=I.allocUnsafe(i>>>0),n=this.head,a=0;n;)e=n.data,A=l,s=a,e.copy(A,s),a+=n.data.length,n=n.next;return l},C}(),g&&g.inspect&&g.inspect.custom&&(t.exports.prototype[g.inspect.custom]=function(){var C=g.inspect({length:this.length});return this.constructor.name+" "+C})}(j8)),j8.exports}function bCg(){if(J8)return OH;J8=1;var t=UV();function I(g,C){g.emit("error",C)}return OH={destroy:function(g,C){var i=this,e=this._readableState&&this._readableState.destroyed,A=this._writableState&&this._writableState.destroyed;return e||A?(C?C(g):!g||this._writableState&&this._writableState.errorEmitted||t.nextTick(I,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(s){!C&&s?(t.nextTick(I,i,s),i._writableState&&(i._writableState.errorEmitted=!0)):C&&C(s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}},OH}function uCg(){if(T8)return UH;T8=1;var t=UV();function I(p){var Y=this;this.next=null,this.entry=null,this.finish=function(){(function(R,X,H){var S=R.entry;for(R.entry=null;S;){var z=S.callback;X.pendingcb--,z(H),S=S.next}X.corkedRequestsFree?X.corkedRequestsFree.next=R:X.corkedRequestsFree=R})(Y,p)}}UH=c;var g,C=t.nextTick;c.WritableState=o;var i=Object.create(tG());i.inherits=iG();var e={deprecate:v8?L8:(v8=1,L8=PV.deprecate)},A=rCg(),s=EV().Buffer,l=Ce.Uint8Array||function(){},n,a=bCg();function d(){}function o(p,Y){g=g||h0(),p=p||{};var R=Y instanceof g;this.objectMode=!!p.objectMode,R&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var X=p.highWaterMark,H=p.writableHighWaterMark,S=this.objectMode?16:16384;this.highWaterMark=X||X===0?X:R&&(H||H===0)?H:S,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var z=p.decodeStrings===!1;this.decodeStrings=!z,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(v){(function(K,V){var N=K._writableState,B=N.sync,G=N.writecb;if(function(W){W.writing=!1,W.writecb=null,W.length-=W.writelen,W.writelen=0}(N),V)(function(W,y,f,D,F){--y.pendingcb,f?(t.nextTick(F,D),t.nextTick(Z,W,y),W._writableState.errorEmitted=!0,W.emit("error",D)):(F(D),W._writableState.errorEmitted=!0,W.emit("error",D),Z(W,y))})(K,N,B,V,G);else{var w=u(N);w||N.corked||N.bufferProcessing||!N.bufferedRequest||b(K,N),B?C(h,K,N,w,G):h(K,N,w,G)}})(Y,v)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new I(this)}function c(p){if(g=g||h0(),!(n.call(c,this)||this instanceof g))return new c(p);this._writableState=new o(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),A.call(this)}function r(p,Y,R,X,H,S,z){Y.writelen=X,Y.writecb=z,Y.writing=!0,Y.sync=!0,R?p._writev(H,Y.onwrite):p._write(H,S,Y.onwrite),Y.sync=!1}function h(p,Y,R,X){R||function(H,S){S.length===0&&S.needDrain&&(S.needDrain=!1,H.emit("drain"))}(p,Y),Y.pendingcb--,X(),Z(p,Y)}function b(p,Y){Y.bufferProcessing=!0;var R=Y.bufferedRequest;if(p._writev&&R&&R.next){var X=Y.bufferedRequestCount,H=new Array(X),S=Y.corkedRequestsFree;S.entry=R;for(var z=0,v=!0;R;)H[z]=R,R.isBuf||(v=!1),R=R.next,z+=1;H.allBuffers=v,r(p,Y,!0,Y.length,H,"",S.finish),Y.pendingcb++,Y.lastBufferedRequest=null,S.next?(Y.corkedRequestsFree=S.next,S.next=null):Y.corkedRequestsFree=new I(Y),Y.bufferedRequestCount=0}else{for(;R;){var K=R.chunk,V=R.encoding,N=R.callback;if(r(p,Y,!1,Y.objectMode?1:K.length,K,V,N),R=R.next,Y.bufferedRequestCount--,Y.writing)break}R===null&&(Y.lastBufferedRequest=null)}Y.bufferedRequest=R,Y.bufferProcessing=!1}function u(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function m(p,Y){p._final(function(R){Y.pendingcb--,R&&p.emit("error",R),Y.prefinished=!0,p.emit("prefinish"),Z(p,Y)})}function Z(p,Y){var R=u(Y);return R&&(function(X,H){H.prefinished||H.finalCalled||(typeof X._final=="function"?(H.pendingcb++,H.finalCalled=!0,t.nextTick(m,X,H)):(H.prefinished=!0,X.emit("prefinish")))}(p,Y),Y.pendingcb===0&&(Y.finished=!0,p.emit("finish"))),R}return i.inherits(c,A),o.prototype.getBuffer=function(){for(var p=this.bufferedRequest,Y=[];p;)Y.push(p),p=p.next;return Y},function(){try{Object.defineProperty(o.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(p){return!!n.call(this,p)||this===c&&p&&p._writableState instanceof o}})):n=function(p){return p instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(p,Y,R){var X,H=this._writableState,S=!1,z=!H.objectMode&&(X=p,s.isBuffer(X)||X instanceof l);return z&&!s.isBuffer(p)&&(p=function(v){return s.from(v)}(p)),typeof Y=="function"&&(R=Y,Y=null),z?Y="buffer":Y||(Y=H.defaultEncoding),typeof R!="function"&&(R=d),H.ended?function(v,K){var V=new Error("write after end");v.emit("error",V),t.nextTick(K,V)}(this,R):(z||function(v,K,V,N){var B=!0,G=!1;return V===null?G=new TypeError("May not write null values to stream"):typeof V=="string"||V===void 0||K.objectMode||(G=new TypeError("Invalid non-string/buffer chunk")),G&&(v.emit("error",G),t.nextTick(N,G),B=!1),B}(this,H,p,R))&&(H.pendingcb++,S=function(v,K,V,N,B,G){if(!V){var w=function(D,F,T){return D.objectMode||D.decodeStrings===!1||typeof F!="string"||(F=s.from(F,T)),F}(K,N,B);N!==w&&(V=!0,B="buffer",N=w)}var W=K.objectMode?1:N.length;K.length+=W;var y=K.length<K.highWaterMark;if(y||(K.needDrain=!0),K.writing||K.corked){var f=K.lastBufferedRequest;K.lastBufferedRequest={chunk:N,encoding:B,isBuf:V,callback:G,next:null},f?f.next=K.lastBufferedRequest:K.bufferedRequest=K.lastBufferedRequest,K.bufferedRequestCount+=1}else r(v,K,!1,W,N,B,G);return y}(this,H,z,p,Y,R)),S},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||b(this,p))},c.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),c.prototype._write=function(p,Y,R){R(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(p,Y,R){var X=this._writableState;typeof p=="function"?(R=p,p=null,Y=null):typeof Y=="function"&&(R=Y,Y=null),p!=null&&this.write(p,Y),X.corked&&(X.corked=1,this.uncork()),X.ending||X.finished||function(H,S,z){S.ending=!0,Z(H,S),z&&(S.finished?t.nextTick(z):H.once("finish",z)),S.ended=!0,H.writable=!1}(this,X,R)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),c.prototype.destroy=a.destroy,c.prototype._undestroy=a.undestroy,c.prototype._destroy=function(p,Y){this.end(),Y(p)},UH}function h0(){if(x8)return EH;x8=1;var t=UV(),I=Object.keys||function(d){var o=[];for(var c in d)o.push(c);return o};EH=l;var g=Object.create(tG());g.inherits=iG();var C=mCg(),i=uCg();g.inherits(l,C);for(var e=I(i.prototype),A=0;A<e.length;A++){var s=e[A];l.prototype[s]||(l.prototype[s]=i.prototype[s])}function l(d){if(!(this instanceof l))return new l(d);C.call(this,d),i.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",n)}function n(){this.allowHalfOpen||this._writableState.ended||t.nextTick(a,this)}function a(d){d.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),l.prototype._destroy=function(d,o){this.push(null),this.end(),t.nextTick(o,d)},EH}var Q8,PH,O8,_H,U8,qH,E8,P8,$H={};function _8(){if(Q8)return $H;Q8=1;var t=EV().Buffer,I=t.isEncoding||function(d){switch((d=""+d)&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(d){var o;switch(this.encoding=function(c){var r=function(h){if(!h)return"utf8";for(var b;;)switch(h){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return h;default:if(b)return;h=(""+h).toLowerCase(),b=!0}}(c);if(typeof r!="string"&&(t.isEncoding===I||!I(c)))throw new Error("Unknown encoding: "+c);return r||c}(d),this.encoding){case"utf16le":this.text=e,this.end=A,o=4;break;case"utf8":this.fillLast=i,o=4;break;case"base64":this.text=s,this.end=l,o=3;break;default:return this.write=n,void(this.end=a)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(o)}function C(d){return d<=127?0:d>>5==6?2:d>>4==14?3:d>>3==30?4:d>>6==2?-1:-2}function i(d){var o=this.lastTotal-this.lastNeed,c=function(r,h,b){if((192&h[0])!=128)return r.lastNeed=0,"�";if(r.lastNeed>1&&h.length>1){if((192&h[1])!=128)return r.lastNeed=1,"�";if(r.lastNeed>2&&h.length>2&&(192&h[2])!=128)return r.lastNeed=2,"�"}}(this,d);return c!==void 0?c:this.lastNeed<=d.length?(d.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(d.copy(this.lastChar,o,0,d.length),void(this.lastNeed-=d.length))}function e(d,o){if((d.length-o)%2==0){var c=d.toString("utf16le",o);if(c){var r=c.charCodeAt(c.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",o,d.length-1)}function A(d){var o=d&&d.length?this.write(d):"";if(this.lastNeed){var c=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,c)}return o}function s(d,o){var c=(d.length-o)%3;return c===0?d.toString("base64",o):(this.lastNeed=3-c,this.lastTotal=3,c===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",o,d.length-c))}function l(d){var o=d&&d.length?this.write(d):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function n(d){return d.toString(this.encoding)}function a(d){return d&&d.length?this.write(d):""}return $H.StringDecoder=g,g.prototype.write=function(d){if(d.length===0)return"";var o,c;if(this.lastNeed){if((o=this.fillLast(d))===void 0)return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c<d.length?o?o+this.text(d,c):this.text(d,c):o||""},g.prototype.end=function(d){var o=d&&d.length?this.write(d):"";return this.lastNeed?o+"�":o},g.prototype.text=function(d,o){var c=function(h,b,u){var m=b.length-1;if(m<u)return 0;var Z=C(b[m]);return Z>=0?(Z>0&&(h.lastNeed=Z-1),Z):--m<u||Z===-2?0:(Z=C(b[m]))>=0?(Z>0&&(h.lastNeed=Z-2),Z):--m<u||Z===-2?0:(Z=C(b[m]))>=0?(Z>0&&(Z===2?Z=0:h.lastNeed=Z-3),Z):0}(this,d,o);if(!this.lastNeed)return d.toString("utf8",o);this.lastTotal=c;var r=d.length-(c-this.lastNeed);return d.copy(this.lastChar,0,r),d.toString("utf8",o,r)},g.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length},$H}function mCg(){if(O8)return PH;O8=1;var t=UV();PH=h;var I,g=function(){if(f8)return R8;f8=1;var B={}.toString;return R8=Array.isArray||function(G){return B.call(G)=="[object Array]"}}();h.ReadableState=r,ohg.EventEmitter;var C=function(B,G){return B.listeners(G).length},i=rCg(),e=EV().Buffer,A=Ce.Uint8Array||function(){},s=Object.create(tG());s.inherits=iG();var l=PV,n=void 0;n=l&&l.debuglog?l.debuglog("stream"):function(){};var a,d=chg(),o=bCg();s.inherits(h,i);var c=["error","close","destroy","pause","resume"];function r(B,G){B=B||{};var w=G instanceof(I=I||h0());this.objectMode=!!B.objectMode,w&&(this.objectMode=this.objectMode||!!B.readableObjectMode);var W=B.highWaterMark,y=B.readableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=W||W===0?W:w&&(y||y===0)?y:f,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=B.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,B.encoding&&(a||(a=_8().StringDecoder),this.decoder=new a(B.encoding),this.encoding=B.encoding)}function h(B){if(I=I||h0(),!(this instanceof h))return new h(B);this._readableState=new r(B,this),this.readable=!0,B&&(typeof B.read=="function"&&(this._read=B.read),typeof B.destroy=="function"&&(this._destroy=B.destroy)),i.call(this)}function b(B,G,w,W,y){var f,D=B._readableState;return G===null?(D.reading=!1,function(F,T){if(!T.ended){if(T.decoder){var Q=T.decoder.end();Q&&Q.length&&(T.buffer.push(Q),T.length+=T.objectMode?1:Q.length)}T.ended=!0,p(F)}}(B,D)):(y||(f=function(F,T){var Q;P=T,e.isBuffer(P)||P instanceof A||typeof T=="string"||T===void 0||F.objectMode||(Q=new TypeError("Invalid non-string/buffer chunk"));var P;return Q}(D,G)),f?B.emit("error",f):D.objectMode||G&&G.length>0?(typeof G=="string"||D.objectMode||Object.getPrototypeOf(G)===e.prototype||(G=function(F){return e.from(F)}(G)),W?D.endEmitted?B.emit("error",new Error("stream.unshift() after end event")):u(B,D,G,!0):D.ended?B.emit("error",new Error("stream.push() after EOF")):(D.reading=!1,D.decoder&&!w?(G=D.decoder.write(G),D.objectMode||G.length!==0?u(B,D,G,!1):R(B,D)):u(B,D,G,!1))):W||(D.reading=!1)),function(F){return!F.ended&&(F.needReadable||F.length<F.highWaterMark||F.length===0)}(D)}function u(B,G,w,W){G.flowing&&G.length===0&&!G.sync?(B.emit("data",w),B.read(0)):(G.length+=G.objectMode?1:w.length,W?G.buffer.unshift(w):G.buffer.push(w),G.needReadable&&p(B)),R(B,G)}Object.defineProperty(h.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(B){this._readableState&&(this._readableState.destroyed=B)}}),h.prototype.destroy=o.destroy,h.prototype._undestroy=o.undestroy,h.prototype._destroy=function(B,G){this.push(null),G(B)},h.prototype.push=function(B,G){var w,W=this._readableState;return W.objectMode?w=!0:typeof B=="string"&&((G=G||W.defaultEncoding)!==W.encoding&&(B=e.from(B,G),G=""),w=!0),b(this,B,G,!1,w)},h.prototype.unshift=function(B){return b(this,B,null,!0,!1)},h.prototype.isPaused=function(){return this._readableState.flowing===!1},h.prototype.setEncoding=function(B){return a||(a=_8().StringDecoder),this._readableState.decoder=new a(B),this._readableState.encoding=B,this};var m=8388608;function Z(B,G){return B<=0||G.length===0&&G.ended?0:G.objectMode?1:B!=B?G.flowing&&G.length?G.buffer.head.data.length:G.length:(B>G.highWaterMark&&(G.highWaterMark=function(w){return w>=m?w=m:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}(B)),B<=G.length?B:G.ended?G.length:(G.needReadable=!0,0))}function p(B){var G=B._readableState;G.needReadable=!1,G.emittedReadable||(n("emitReadable",G.flowing),G.emittedReadable=!0,G.sync?t.nextTick(Y,B):Y(B))}function Y(B){n("emit readable"),B.emit("readable"),z(B)}function R(B,G){G.readingMore||(G.readingMore=!0,t.nextTick(X,B,G))}function X(B,G){for(var w=G.length;!G.reading&&!G.flowing&&!G.ended&&G.length<G.highWaterMark&&(n("maybeReadMore read 0"),B.read(0),w!==G.length);)w=G.length;G.readingMore=!1}function H(B){n("readable nexttick read 0"),B.read(0)}function S(B,G){G.reading||(n("resume read 0"),B.read(0)),G.resumeScheduled=!1,G.awaitDrain=0,B.emit("resume"),z(B),G.flowing&&!G.reading&&B.read(0)}function z(B){var G=B._readableState;for(n("flow",G.flowing);G.flowing&&B.read()!==null;);}function v(B,G){return G.length===0?null:(G.objectMode?w=G.buffer.shift():!B||B>=G.length?(w=G.decoder?G.buffer.join(""):G.buffer.length===1?G.buffer.head.data:G.buffer.concat(G.length),G.buffer.clear()):w=function(W,y,f){var D;return W<y.head.data.length?(D=y.head.data.slice(0,W),y.head.data=y.head.data.slice(W)):D=W===y.head.data.length?y.shift():f?function(F,T){var Q=T.head,P=1,L=Q.data;for(F-=L.length;Q=Q.next;){var E=Q.data,J=F>E.length?E.length:F;if(J===E.length?L+=E:L+=E.slice(0,F),(F-=J)===0){J===E.length?(++P,Q.next?T.head=Q.next:T.head=T.tail=null):(T.head=Q,Q.data=E.slice(J));break}++P}return T.length-=P,L}(W,y):function(F,T){var Q=e.allocUnsafe(F),P=T.head,L=1;for(P.data.copy(Q),F-=P.data.length;P=P.next;){var E=P.data,J=F>E.length?E.length:F;if(E.copy(Q,Q.length-F,0,J),(F-=J)===0){J===E.length?(++L,P.next?T.head=P.next:T.head=T.tail=null):(T.head=P,P.data=E.slice(J));break}++L}return T.length-=L,Q}(W,y),D}(B,G.buffer,G.decoder),w);var w}function K(B){var G=B._readableState;if(G.length>0)throw new Error('"endReadable()" called on non-empty stream');G.endEmitted||(G.ended=!0,t.nextTick(V,G,B))}function V(B,G){B.endEmitted||B.length!==0||(B.endEmitted=!0,G.readable=!1,G.emit("end"))}function N(B,G){for(var w=0,W=B.length;w<W;w++)if(B[w]===G)return w;return-1}return h.prototype.read=function(B){n("read",B),B=parseInt(B,10);var G=this._readableState,w=B;if(B!==0&&(G.emittedReadable=!1),B===0&&G.needReadable&&(G.length>=G.highWaterMark||G.ended))return n("read: emitReadable",G.length,G.ended),G.length===0&&G.ended?K(this):p(this),null;if((B=Z(B,G))===0&&G.ended)return G.length===0&&K(this),null;var W,y=G.needReadable;return n("need readable",y),(G.length===0||G.length-B<G.highWaterMark)&&n("length less than watermark",y=!0),G.ended||G.reading?n("reading or ended",y=!1):y&&(n("do read"),G.reading=!0,G.sync=!0,G.length===0&&(G.needReadable=!0),this._read(G.highWaterMark),G.sync=!1,G.reading||(B=Z(w,G))),(W=B>0?v(B,G):null)===null?(G.needReadable=!0,B=0):G.length-=B,G.length===0&&(G.ended||(G.needReadable=!0),w!==B&&G.ended&&K(this)),W!==null&&this.emit("data",W),W},h.prototype._read=function(B){this.emit("error",new Error("_read() is not implemented"))},h.prototype.pipe=function(B,G){var w=this,W=this._readableState;switch(W.pipesCount){case 0:W.pipes=B;break;case 1:W.pipes=[W.pipes,B];break;default:W.pipes.push(B)}W.pipesCount+=1,n("pipe count=%d opts=%j",W.pipesCount,G);var y=(!G||G.end!==!1)&&B!==qc.stdout&&B!==qc.stderr?D:k;function f(j,q){n("onunpipe"),j===w&&q&&q.hasUnpiped===!1&&(q.hasUnpiped=!0,n("cleanup"),B.removeListener("close",E),B.removeListener("finish",J),B.removeListener("drain",F),B.removeListener("error",L),B.removeListener("unpipe",f),w.removeListener("end",D),w.removeListener("end",k),w.removeListener("data",P),T=!0,!W.awaitDrain||B._writableState&&!B._writableState.needDrain||F())}function D(){n("onend"),B.end()}W.endEmitted?t.nextTick(y):w.once("end",y),B.on("unpipe",f);var F=function(j){return function(){var q=j._readableState;n("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&C(j,"data")&&(q.flowing=!0,z(j))}}(w);B.on("drain",F);var T=!1,Q=!1;function P(j){n("ondata"),Q=!1,B.write(j)!==!1||Q||((W.pipesCount===1&&W.pipes===B||W.pipesCount>1&&N(W.pipes,B)!==-1)&&!T&&(n("false write response, pause",w._readableState.awaitDrain),w._readableState.awaitDrain++,Q=!0),w.pause())}function L(j){n("onerror",j),k(),B.removeListener("error",L),C(B,"error")===0&&B.emit("error",j)}function E(){B.removeListener("finish",J),k()}function J(){n("onfinish"),B.removeListener("close",E),k()}function k(){n("unpipe"),w.unpipe(B)}return w.on("data",P),function(j,q,tg){if(typeof j.prependListener=="function")return j.prependListener(q,tg);j._events&&j._events[q]?g(j._events[q])?j._events[q].unshift(tg):j._events[q]=[tg,j._events[q]]:j.on(q,tg)}(B,"error",L),B.once("close",E),B.once("finish",J),B.emit("pipe",w),W.flowing||(n("pipe resume"),w.resume()),B},h.prototype.unpipe=function(B){var G=this._readableState,w={hasUnpiped:!1};if(G.pipesCount===0)return this;if(G.pipesCount===1)return B&&B!==G.pipes||(B||(B=G.pipes),G.pipes=null,G.pipesCount=0,G.flowing=!1,B&&B.emit("unpipe",this,w)),this;if(!B){var W=G.pipes,y=G.pipesCount;G.pipes=null,G.pipesCount=0,G.flowing=!1;for(var f=0;f<y;f++)W[f].emit("unpipe",this,w);return this}var D=N(G.pipes,B);return D===-1||(G.pipes.splice(D,1),G.pipesCount-=1,G.pipesCount===1&&(G.pipes=G.pipes[0]),B.emit("unpipe",this,w)),this},h.prototype.on=function(B,G){var w=i.prototype.on.call(this,B,G);if(B==="data")this._readableState.flowing!==!1&&this.resume();else if(B==="readable"){var W=this._readableState;W.endEmitted||W.readableListening||(W.readableListening=W.needReadable=!0,W.emittedReadable=!1,W.reading?W.length&&p(this):t.nextTick(H,this))}return w},h.prototype.addListener=h.prototype.on,h.prototype.resume=function(){var B=this._readableState;return B.flowing||(n("resume"),B.flowing=!0,function(G,w){w.resumeScheduled||(w.resumeScheduled=!0,t.nextTick(S,G,w))}(this,B)),this},h.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this},h.prototype.wrap=function(B){var G=this,w=this._readableState,W=!1;for(var y in B.on("end",function(){if(n("wrapped end"),w.decoder&&!w.ended){var D=w.decoder.end();D&&D.length&&G.push(D)}G.push(null)}),B.on("data",function(D){n("wrapped data"),w.decoder&&(D=w.decoder.write(D)),w.objectMode&&D==null||(w.objectMode||D&&D.length)&&(G.push(D)||(W=!0,B.pause()))}),B)this[y]===void 0&&typeof B[y]=="function"&&(this[y]=function(D){return function(){return B[D].apply(B,arguments)}}(y));for(var f=0;f<c.length;f++)B.on(c[f],this.emit.bind(this,c[f]));return this._read=function(D){n("wrapped _read",D),W&&(W=!1,B.resume())},this},Object.defineProperty(h.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),h._fromList=v,PH}function q8(){if(U8)return _H;U8=1,_H=C;var t=h0(),I=Object.create(tG());function g(A,s){var l=this._transformState;l.transforming=!1;var n=l.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));l.writechunk=null,l.writecb=null,s!=null&&this.push(s),n(A);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function C(A){if(!(this instanceof C))return new C(A);t.call(this,A),this._transformState={afterTransform:g.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,A&&(typeof A.transform=="function"&&(this._transform=A.transform),typeof A.flush=="function"&&(this._flush=A.flush)),this.on("prefinish",i)}function i(){var A=this;typeof this._flush=="function"?this._flush(function(s,l){e(A,s,l)}):e(this,null,null)}function e(A,s,l){if(s)return A.emit("error",s);if(l!=null&&A.push(l),A._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(A._transformState.transforming)throw new Error("Calling transform done when still transforming");return A.push(null)}return I.inherits=iG(),I.inherits(C,t),C.prototype.push=function(A,s){return this._transformState.needTransform=!1,t.prototype.push.call(this,A,s)},C.prototype._transform=function(A,s,l){throw new Error("_transform() is not implemented")},C.prototype._write=function(A,s,l){var n=this._transformState;if(n.writecb=l,n.writechunk=A,n.writeencoding=s,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},C.prototype._read=function(A){var s=this._transformState;s.writechunk!==null&&s.writecb&&!s.transforming?(s.transforming=!0,this._transform(s.writechunk,s.writeencoding,s.afterTransform)):s.needTransform=!0},C.prototype._destroy=function(A,s){var l=this;t.prototype._destroy.call(this,A,function(n){s(n),l.emit("close")})},_H}function ZCg(){return P8||(P8=1,function(t,I){var g=dCg;qc.env.READABLE_STREAM==="disable"&&g?(t.exports=g,(I=t.exports=g.Readable).Readable=g.Readable,I.Writable=g.Writable,I.Duplex=g.Duplex,I.Transform=g.Transform,I.PassThrough=g.PassThrough,I.Stream=g):((I=t.exports=mCg()).Stream=g||I,I.Readable=I,I.Writable=uCg(),I.Duplex=h0(),I.Transform=q8(),I.PassThrough=function(){if(E8)return qH;E8=1,qH=e;var C=q8(),i=Object.create(tG());function e(A){if(!(this instanceof e))return new e(A);C.call(this,A)}return i.inherits=iG(),i.inherits(e,C),e.prototype._transform=function(A,s,l){l(null,A)},qH}())}(KH,KH.exports)),KH.exports}if(nt.base64=!0,nt.array=!0,nt.string=!0,nt.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",nt.nodebuffer=!0,nt.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")nt.blob=!1;else{var $8=new ArrayBuffer(0);try{nt.blob=new Blob([$8],{type:"application/zip"}).size===0}catch{try{var g_=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);g_.append($8),nt.blob=g_.getBlob("application/zip").size===0}catch{nt.blob=!1}}}try{nt.nodestream=!!ZCg().Readable}catch{nt.nodestream=!1}var I_,DY={};function GCg(){if(I_)return DY;I_=1;var t=PC(),I=nt,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return DY.encode=function(C){for(var i,e,A,s,l,n,a,d=[],o=0,c=C.length,r=c,h=t.getTypeOf(C)!=="string";o<C.length;)r=c-o,h?(i=C[o++],e=o<c?C[o++]:0,A=o<c?C[o++]:0):(i=C.charCodeAt(o++),e=o<c?C.charCodeAt(o++):0,A=o<c?C.charCodeAt(o++):0),s=i>>2,l=(3&i)<<4|e>>4,n=r>1?(15&e)<<2|A>>6:64,a=r>2?63&A:64,d.push(g.charAt(s)+g.charAt(l)+g.charAt(n)+g.charAt(a));return d.join("")},DY.decode=function(C){var i,e,A,s,l,n,a=0,d=0,o="data:";if(C.substr(0,o.length)===o)throw new Error("Invalid base64 input, it looks like a data url.");var c,r=3*(C=C.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(C.charAt(C.length-1)===g.charAt(64)&&r--,C.charAt(C.length-2)===g.charAt(64)&&r--,r%1!=0)throw new Error("Invalid base64 input, bad content length.");for(c=I.uint8array?new Uint8Array(0|r):new Array(0|r);a<C.length;)i=g.indexOf(C.charAt(a++))<<2|(s=g.indexOf(C.charAt(a++)))>>4,e=(15&s)<<4|(l=g.indexOf(C.charAt(a++)))>>2,A=(3&l)<<6|(n=g.indexOf(C.charAt(a++))),c[d++]=i,l!==64&&(c[d++]=e),n!==64&&(c[d++]=A);return c},DY}var C_,t_,gX,i_,_V={isNode:!0,newBufferFrom:function(t,I){if(Xg.from&&Xg.from!==Uint8Array.from)return Xg.from(t,I);if(typeof t=="number")throw new Error('The "data" argument must not be a number');return new Xg(t,I)},allocBuffer:function(t){if(Xg.alloc)return Xg.alloc(t);var I=new Xg(t);return I.fill(0),I},isBuffer:function(t){return gG(t)},isStream:function(t){return t&&typeof t.on=="function"&&typeof t.pause=="function"&&typeof t.resume=="function"}},wCg=null;wCg=typeof Promise<"u"?Promise:function(){if(i_)return gX;i_=1;var t=function(){if(t_)return C_;t_=1;var o,c,r=Ce.MutationObserver||Ce.WebKitMutationObserver;if(r){var h=0,b=new r(p),u=Ce.document.createTextNode("");b.observe(u,{characterData:!0}),o=function(){u.data=h=++h%2}}else if(Ce.setImmediate||Ce.MessageChannel===void 0)o="document"in Ce&&"onreadystatechange"in Ce.document.createElement("script")?function(){var Y=Ce.document.createElement("script");Y.onreadystatechange=function(){p(),Y.onreadystatechange=null,Y.parentNode.removeChild(Y),Y=null},Ce.document.documentElement.appendChild(Y)}:function(){setTimeout(p,0)};else{var m=new Ce.MessageChannel;m.port1.onmessage=p,o=function(){m.port2.postMessage(0)}}var Z=[];function p(){var Y,R;c=!0;for(var X=Z.length;X;){for(R=Z,Z=[],Y=-1;++Y<X;)R[Y]();X=Z.length}c=!1}return C_=function(Y){Z.push(Y)!==1||c||o()}}();function I(){}var g={},C=["REJECTED"],i=["FULFILLED"],e=["PENDING"];function A(o){if(typeof o!="function")throw new TypeError("resolver must be a function");this.state=e,this.queue=[],this.outcome=void 0,o!==I&&a(this,o)}function s(o,c,r){this.promise=o,typeof c=="function"&&(this.onFulfilled=c,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function l(o,c,r){t(function(){var h;try{h=c(r)}catch(b){return g.reject(o,b)}h===o?g.reject(o,new TypeError("Cannot resolve promise with itself")):g.resolve(o,h)})}function n(o){var c=o&&o.then;if(o&&(typeof o=="object"||typeof o=="function")&&typeof c=="function")return function(){c.apply(o,arguments)}}function a(o,c){var r=!1;function h(m){r||(r=!0,g.reject(o,m))}function b(m){r||(r=!0,g.resolve(o,m))}var u=d(function(){c(b,h)});u.status==="error"&&h(u.value)}function d(o,c){var r={};try{r.value=o(c),r.status="success"}catch(h){r.status="error",r.value=h}return r}return gX=A,A.prototype.finally=function(o){if(typeof o!="function")return this;var c=this.constructor;return this.then(function(r){return c.resolve(o()).then(function(){return r})},function(r){return c.resolve(o()).then(function(){throw r})})},A.prototype.catch=function(o){return this.then(null,o)},A.prototype.then=function(o,c){if(typeof o!="function"&&this.state===i||typeof c!="function"&&this.state===C)return this;var r=new this.constructor(I);return this.state!==e?l(r,this.state===i?o:c,this.outcome):this.queue.push(new s(r,o,c)),r},s.prototype.callFulfilled=function(o){g.resolve(this.promise,o)},s.prototype.otherCallFulfilled=function(o){l(this.promise,this.onFulfilled,o)},s.prototype.callRejected=function(o){g.reject(this.promise,o)},s.prototype.otherCallRejected=function(o){l(this.promise,this.onRejected,o)},g.resolve=function(o,c){var r=d(n,c);if(r.status==="error")return g.reject(o,r.value);var h=r.value;if(h)a(o,h);else{o.state=i,o.outcome=c;for(var b=-1,u=o.queue.length;++b<u;)o.queue[b].callFulfilled(c)}return o},g.reject=function(o,c){o.state=C,o.outcome=c;for(var r=-1,h=o.queue.length;++r<h;)o.queue[r].callRejected(c);return o},A.resolve=function(o){return o instanceof this?o:g.resolve(new this(I),o)},A.reject=function(o){var c=new this(I);return g.reject(c,o)},A.all=function(o){var c=this;if(Object.prototype.toString.call(o)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=o.length,h=!1;if(!r)return this.resolve([]);for(var b=new Array(r),u=0,m=-1,Z=new this(I);++m<r;)p(o[m],m);return Z;function p(Y,R){c.resolve(Y).then(function(X){b[R]=X,++u!==r||h||(h=!0,g.resolve(Z,b))},function(X){h||(h=!0,g.reject(Z,X))})}},A.race=function(o){var c=this;if(Object.prototype.toString.call(o)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=o.length,h=!1;if(!r)return this.resolve([]);for(var b,u=-1,m=new this(I);++u<r;)b=o[u],c.resolve(b).then(function(Z){h||(h=!0,g.resolve(m,Z))},function(Z){h||(h=!0,g.reject(m,Z))});return m},gX}();var e_,eG={Promise:wCg};function PC(){return e_||(e_=1,function(t){var I=nt,g=GCg(),C=_V,i=eG;function e(d){return d}function A(d,o){for(var c=0;c<d.length;++c)o[c]=255&d.charCodeAt(c);return o}t.newBlob=function(d,o){t.checkSupport("blob");try{return new Blob([d],{type:o})}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return c.append(d),c.getBlob(o)}catch{throw new Error("Bug : can't construct the Blob.")}}};var s={stringifyByChunk:function(d,o,c){var r=[],h=0,b=d.length;if(b<=c)return String.fromCharCode.apply(null,d);for(;h<b;)o==="array"||o==="nodebuffer"?r.push(String.fromCharCode.apply(null,d.slice(h,Math.min(h+c,b)))):r.push(String.fromCharCode.apply(null,d.subarray(h,Math.min(h+c,b)))),h+=c;return r.join("")},stringifyByChar:function(d){for(var o="",c=0;c<d.length;c++)o+=String.fromCharCode(d[c]);return o},applyCanBeUsed:{uint8array:function(){try{return I.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return I.nodebuffer&&String.fromCharCode.apply(null,C.allocBuffer(1)).length===1}catch{return!1}}()}};function l(d){var o=65536,c=t.getTypeOf(d),r=!0;if(c==="uint8array"?r=s.applyCanBeUsed.uint8array:c==="nodebuffer"&&(r=s.applyCanBeUsed.nodebuffer),r)for(;o>1;)try{return s.stringifyByChunk(d,c,o)}catch{o=Math.floor(o/2)}return s.stringifyByChar(d)}function n(d,o){for(var c=0;c<d.length;c++)o[c]=d[c];return o}t.applyFromCharCode=l;var a={};a.string={string:e,array:function(d){return A(d,new Array(d.length))},arraybuffer:function(d){return a.string.uint8array(d).buffer},uint8array:function(d){return A(d,new Uint8Array(d.length))},nodebuffer:function(d){return A(d,C.allocBuffer(d.length))}},a.array={string:l,array:e,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return C.newBufferFrom(d)}},a.arraybuffer={string:function(d){return l(new Uint8Array(d))},array:function(d){return n(new Uint8Array(d),new Array(d.byteLength))},arraybuffer:e,uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return C.newBufferFrom(new Uint8Array(d))}},a.uint8array={string:l,array:function(d){return n(d,new Array(d.length))},arraybuffer:function(d){return d.buffer},uint8array:e,nodebuffer:function(d){return C.newBufferFrom(d)}},a.nodebuffer={string:l,array:function(d){return n(d,new Array(d.length))},arraybuffer:function(d){return a.nodebuffer.uint8array(d).buffer},uint8array:function(d){return n(d,new Uint8Array(d.length))},nodebuffer:e},t.transformTo=function(d,o){if(o||(o=""),!d)return o;t.checkSupport(d);var c=t.getTypeOf(o);return a[c][d](o)},t.resolve=function(d){for(var o=d.split("/"),c=[],r=0;r<o.length;r++){var h=o[r];h==="."||h===""&&r!==0&&r!==o.length-1||(h===".."?c.pop():c.push(h))}return c.join("/")},t.getTypeOf=function(d){return typeof d=="string"?"string":Object.prototype.toString.call(d)==="[object Array]"?"array":I.nodebuffer&&C.isBuffer(d)?"nodebuffer":I.uint8array&&d instanceof Uint8Array?"uint8array":I.arraybuffer&&d instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(d){if(!I[d.toLowerCase()])throw new Error(d+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(d){var o,c,r="";for(c=0;c<(d||"").length;c++)r+="\\x"+((o=d.charCodeAt(c))<16?"0":"")+o.toString(16).toUpperCase();return r},t.delay=function(d,o,c){setImmediate(function(){d.apply(c||null,o||[])})},t.inherits=function(d,o){var c=function(){};c.prototype=o.prototype,d.prototype=new c},t.extend=function(){var d,o,c={};for(d=0;d<arguments.length;d++)for(o in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],o)&&c[o]===void 0&&(c[o]=arguments[d][o]);return c},t.prepareContent=function(d,o,c,r,h){return i.Promise.resolve(o).then(function(b){return I.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new i.Promise(function(u,m){var Z=new FileReader;Z.onload=function(p){u(p.target.result)},Z.onerror=function(p){m(p.target.error)},Z.readAsArrayBuffer(b)}):b}).then(function(b){var u,m=t.getTypeOf(b);return m?(m==="arraybuffer"?b=t.transformTo("uint8array",b):m==="string"&&(h?b=g.decode(b):c&&r!==!0&&(b=A(u=b,I.uint8array?new Uint8Array(u.length):new Array(u.length)))),b):i.Promise.reject(new Error("Can't read the data of '"+d+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}}(a8)),a8}function pCg(t){this.name=t||"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}(function(t,I){if(!t.setImmediate){var g,C,i,e,A,s=1,l={},n=!1,a=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,{}.toString.call(t.process)==="[object process]"?g=function(r){Kt(function(){c(r)})}:function(){if(t.postMessage&&!t.importScripts){var r=!0,h=t.onmessage;return t.onmessage=function(){r=!1},t.postMessage("","*"),t.onmessage=h,r}}()?(e="setImmediate$"+Math.random()+"$",A=function(r){r.source===t&&typeof r.data=="string"&&r.data.indexOf(e)===0&&c(+r.data.slice(e.length))},t.addEventListener?t.addEventListener("message",A,!1):t.attachEvent("onmessage",A),g=function(r){t.postMessage(e+r,"*")}):t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(r){c(r.data)},g=function(r){i.port2.postMessage(r)}):a&&"onreadystatechange"in a.createElement("script")?(C=a.documentElement,g=function(r){var h=a.createElement("script");h.onreadystatechange=function(){c(r),h.onreadystatechange=null,C.removeChild(h),h=null},C.appendChild(h)}):g=function(r){setTimeout(c,0,r)},d.setImmediate=function(r){typeof r!="function"&&(r=new Function(""+r));for(var h=new Array(arguments.length-1),b=0;b<h.length;b++)h[b]=arguments[b+1];var u={callback:r,args:h};return l[s]=u,g(s),s++},d.clearImmediate=o}function o(r){delete l[r]}function c(r){if(n)setTimeout(c,0,r);else{var h=l[r];if(h){n=!0;try{(function(b){var u=b.callback,m=b.args;switch(m.length){case 0:u();break;case 1:u(m[0]);break;case 2:u(m[0],m[1]);break;case 3:u(m[0],m[1],m[2]);break;default:u.apply(void 0,m)}})(h)}finally{o(r),n=!1}}}}})(typeof self>"u"?Ce:self),pCg.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,I){return this._listeners[t].push(I),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,I){if(this._listeners[t])for(var g=0;g<this._listeners[t].length;g++)this._listeners[t][g].call(this,I)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var I=this;return t.on("data",function(g){I.processChunk(g)}),t.on("end",function(){I.end()}),t.on("error",function(g){I.error(g)}),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;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,I){return this.extraStreamInfo[t]=I,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},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 t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}};var Pe=pCg;(function(t){for(var I=PC(),g=nt,C=_V,i=Pe,e=new Array(256),A=0;A<256;A++)e[A]=A>=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;e[254]=e[254]=1;function s(){i.call(this,"utf-8 decode"),this.leftOver=null}function l(){i.call(this,"utf-8 encode")}t.utf8encode=function(n){return g.nodebuffer?C.newBufferFrom(n,"utf-8"):function(a){var d,o,c,r,h,b=a.length,u=0;for(r=0;r<b;r++)(64512&(o=a.charCodeAt(r)))==55296&&r+1<b&&(64512&(c=a.charCodeAt(r+1)))==56320&&(o=65536+(o-55296<<10)+(c-56320),r++),u+=o<128?1:o<2048?2:o<65536?3:4;for(d=g.uint8array?new Uint8Array(u):new Array(u),h=0,r=0;h<u;r++)(64512&(o=a.charCodeAt(r)))==55296&&r+1<b&&(64512&(c=a.charCodeAt(r+1)))==56320&&(o=65536+(o-55296<<10)+(c-56320),r++),o<128?d[h++]=o:o<2048?(d[h++]=192|o>>>6,d[h++]=128|63&o):o<65536?(d[h++]=224|o>>>12,d[h++]=128|o>>>6&63,d[h++]=128|63&o):(d[h++]=240|o>>>18,d[h++]=128|o>>>12&63,d[h++]=128|o>>>6&63,d[h++]=128|63&o);return d}(n)},t.utf8decode=function(n){return g.nodebuffer?I.transformTo("nodebuffer",n).toString("utf-8"):function(a){var d,o,c,r,h=a.length,b=new Array(2*h);for(o=0,d=0;d<h;)if((c=a[d++])<128)b[o++]=c;else if((r=e[c])>4)b[o++]=65533,d+=r-1;else{for(c&=r===2?31:r===3?15:7;r>1&&d<h;)c=c<<6|63&a[d++],r--;r>1?b[o++]=65533:c<65536?b[o++]=c:(c-=65536,b[o++]=55296|c>>10&1023,b[o++]=56320|1023&c)}return b.length!==o&&(b.subarray?b=b.subarray(0,o):b.length=o),I.applyFromCharCode(b)}(n=I.transformTo(g.uint8array?"uint8array":"array",n))},I.inherits(s,i),s.prototype.processChunk=function(n){var a=I.transformTo(g.uint8array?"uint8array":"array",n.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var d=a;(a=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),a.set(d,this.leftOver.length)}else a=this.leftOver.concat(a);this.leftOver=null}var o=function(r,h){var b;for((h=h||r.length)>r.length&&(h=r.length),b=h-1;b>=0&&(192&r[b])==128;)b--;return b<0||b===0?h:b+e[r[b]]>h?b:h}(a),c=a;o!==a.length&&(g.uint8array?(c=a.subarray(0,o),this.leftOver=a.subarray(o,a.length)):(c=a.slice(0,o),this.leftOver=a.slice(o,a.length))),this.push({data:t.utf8decode(c),meta:n.meta})},s.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=s,I.inherits(l,i),l.prototype.processChunk=function(n){this.push({data:t.utf8encode(n.data),meta:n.meta})},t.Utf8EncodeWorker=l})(Z0);var BCg=Pe,A_=PC();function qS(t){BCg.call(this,"ConvertWorker to "+t),this.destType=t}A_.inherits(qS,BCg),qS.prototype.processChunk=function(t){this.push({data:A_.transformTo(this.destType,t.data),meta:t.meta})};var s_,l_,dhg=qS,$c=PC(),rhg=dhg,hhg=Pe,bhg=GCg(),uhg=eG,WCg=null;if(nt.nodestream)try{WCg=function(){if(l_)return s_;l_=1;var t=ZCg().Readable;function I(g,C,i){t.call(this,C),this._helper=g;var e=this;g.on("data",function(A,s){e.push(A)||e._helper.pause(),i&&i(s)}).on("error",function(A){e.emit("error",A)}).on("end",function(){e.push(null)})}return PC().inherits(I,t),I.prototype._read=function(){this._helper.resume()},s_=I}()}catch{}function mhg(t,I){return new uhg.Promise(function(g,C){var i=[],e=t._internalType,A=t._outputType,s=t._mimeType;t.on("data",function(l,n){i.push(l),I&&I(n)}).on("error",function(l){i=[],C(l)}).on("end",function(){try{var l=function(n,a,d){switch(n){case"blob":return $c.newBlob($c.transformTo("arraybuffer",a),d);case"base64":return bhg.encode(a);default:return $c.transformTo(n,a)}}(A,function(n,a){var d,o=0,c=null,r=0;for(d=0;d<a.length;d++)r+=a[d].length;switch(n){case"string":return a.join("");case"array":return Array.prototype.concat.apply([],a);case"uint8array":for(c=new Uint8Array(r),d=0;d<a.length;d++)c.set(a[d],o),o+=a[d].length;return c;case"nodebuffer":return Xg.concat(a);default:throw new Error("concat : unsupported type '"+n+"'")}}(e,i),s);g(l)}catch(n){C(n)}i=[]}).resume()})}function yCg(t,I,g){var C=I;switch(I){case"blob":case"arraybuffer":C="uint8array";break;case"base64":C="string"}try{this._internalType=C,this._outputType=I,this._mimeType=g,$c.checkSupport(C),this._worker=t.pipe(new rhg(C)),t.lock()}catch(i){this._worker=new hhg("error"),this._worker.error(i)}}yCg.prototype={accumulate:function(t){return mhg(this,t)},on:function(t,I){var g=this;return t==="data"?this._worker.on(t,function(C){I.call(g,C.data,C.meta)}):this._worker.on(t,function(){$c.delay(I,arguments,g)}),this},resume:function(){return $c.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if($c.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new WCg(this,{objectMode:this._outputType!=="nodebuffer"},t)}};var YCg=yCg,NCg={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},MN=PC(),RN=Pe;function xr(t){RN.call(this,"DataWorker");var I=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(g){I.dataIsReady=!0,I.data=g,I.max=g&&g.length||0,I.type=MN.getTypeOf(g),I.isPaused||I._tickAndRepeat()},function(g){I.error(g)})}MN.inherits(xr,RN),xr.prototype.cleanUp=function(){RN.prototype.cleanUp.call(this),this.data=null},xr.prototype.resume=function(){return!!RN.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,MN.delay(this._tickAndRepeat,[],this)),!0)},xr.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(MN.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},xr.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,I=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,I);break;case"uint8array":t=this.data.subarray(this.index,I);break;case"array":case"nodebuffer":t=this.data.slice(this.index,I)}return this.index=I,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};var VCg=xr,Zhg=PC(),n_=function(){for(var t,I=[],g=0;g<256;g++){t=g;for(var C=0;C<8;C++)t=1&t?3988292384^t>>>1:t>>>1;I[g]=t}return I}(),W9=function(t,I){return t!==void 0&&t.length?Zhg.getTypeOf(t)!=="string"?function(g,C,i,e){var A=n_,s=e+i;g^=-1;for(var l=e;l<s;l++)g=g>>>8^A[255&(g^C[l])];return-1^g}(0|I,t,t.length,0):function(g,C,i,e){var A=n_,s=e+i;g^=-1;for(var l=e;l<s;l++)g=g>>>8^A[255&(g^C.charCodeAt(l))];return-1^g}(0|I,t,t.length,0):0},MCg=Pe,Ghg=W9;function $S(){MCg.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}PC().inherits($S,MCg),$S.prototype.processChunk=function(t){this.streamInfo.crc32=Ghg(t.data,this.streamInfo.crc32||0),this.push(t)};var RCg=$S,whg=PC(),gD=Pe;function ID(t){gD.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}whg.inherits(ID,gD),ID.prototype.processChunk=function(t){if(t){var I=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=I+t.data.length}gD.prototype.processChunk.call(this,t)};var a_=eG,o_=VCg,phg=RCg,IX=ID;function CD(t,I,g,C,i){this.compressedSize=t,this.uncompressedSize=I,this.crc32=g,this.compression=C,this.compressedContent=i}CD.prototype={getContentWorker:function(){var t=new o_(a_.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new IX("data_length")),I=this;return t.on("end",function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new o_(a_.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},CD.createWorkerFrom=function(t,I,g){return t.pipe(new phg).pipe(new IX("uncompressedSize")).pipe(I.compressWorker(g)).pipe(new IX("compressedSize")).withStreamInfo("compression",I)};var y9=CD,Bhg=YCg,Whg=VCg,CX=Z0,tX=y9,c_=Pe,Y9=function(t,I,g){this.name=t,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=I,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}};Y9.prototype={internalStream:function(t){var I=null,g="string";try{if(!t)throw new Error("No output type specified.");var C=(g=t.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),I=this._decompressWorker();var i=!this._dataBinary;i&&!C&&(I=I.pipe(new CX.Utf8EncodeWorker)),!i&&C&&(I=I.pipe(new CX.Utf8DecodeWorker))}catch(e){(I=new c_("error")).error(e)}return new Bhg(I,g,"")},async:function(t,I){return this.internalStream(t).accumulate(I)},nodeStream:function(t,I){return this.internalStream(t||"nodebuffer").toNodejsStream(I)},_compressWorker:function(t,I){if(this._data instanceof tX&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new CX.Utf8EncodeWorker)),tX.createWorkerFrom(g,t,I)},_decompressWorker:function(){return this._data instanceof tX?this._data.getContentWorker():this._data instanceof c_?this._data:new Whg(this._data)}};for(var d_=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],yhg=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},iX=0;iX<d_.length;iX++)Y9.prototype[d_[iX]]=yhg;var Yhg=Y9,fCg={},CV={},fN={},Ol={};(function(t){var I=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function g(e,A){return Object.prototype.hasOwnProperty.call(e,A)}t.assign=function(e){for(var A=Array.prototype.slice.call(arguments,1);A.length;){var s=A.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var l in s)g(s,l)&&(e[l]=s[l])}}return e},t.shrinkBuf=function(e,A){return e.length===A?e:e.subarray?e.subarray(0,A):(e.length=A,e)};var C={arraySet:function(e,A,s,l,n){if(A.subarray&&e.subarray)e.set(A.subarray(s,s+l),n);else for(var a=0;a<l;a++)e[n+a]=A[s+a]},flattenChunks:function(e){var A,s,l,n,a,d;for(l=0,A=0,s=e.length;A<s;A++)l+=e[A].length;for(d=new Uint8Array(l),n=0,A=0,s=e.length;A<s;A++)a=e[A],d.set(a,n),n+=a.length;return d}},i={arraySet:function(e,A,s,l,n){for(var a=0;a<l;a++)e[n+a]=A[s+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,C)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(I)})(Ol);var Eu={},is={},jr={},Nhg=Ol;function G0(t){for(var I=t.length;--I>=0;)t[I]=0}var tD=[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],HN=[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],Vhg=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],r_=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Al=new Array(576);G0(Al);var Pu=new Array(60);G0(Pu);var wm=new Array(512);G0(wm);var rm=new Array(256);G0(rm);var N9=new Array(29);G0(N9);var h_,b_,u_,tV=new Array(30);function eX(t,I,g,C,i){this.static_tree=t,this.extra_bits=I,this.extra_base=g,this.elems=C,this.max_length=i,this.has_stree=t&&t.length}function AX(t,I){this.dyn_tree=t,this.max_code=0,this.stat_desc=I}function HCg(t){return t<256?wm[t]:wm[256+(t>>>7)]}function pm(t,I){t.pending_buf[t.pending++]=255&I,t.pending_buf[t.pending++]=I>>>8&255}function vi(t,I,g){t.bi_valid>16-g?(t.bi_buf|=I<<t.bi_valid&65535,pm(t,t.bi_buf),t.bi_buf=I>>16-t.bi_valid,t.bi_valid+=g-16):(t.bi_buf|=I<<t.bi_valid&65535,t.bi_valid+=g)}function ys(t,I,g){vi(t,g[2*I],g[2*I+1])}function XCg(t,I){var g=0;do g|=1&t,t>>>=1,g<<=1;while(--I>0);return g>>>1}function SCg(t,I,g){var C,i,e=new Array(16),A=0;for(C=1;C<=15;C++)e[C]=A=A+g[C-1]<<1;for(i=0;i<=I;i++){var s=t[2*i+1];s!==0&&(t[2*i]=XCg(e[s]++,s))}}function m_(t){var I;for(I=0;I<286;I++)t.dyn_ltree[2*I]=0;for(I=0;I<30;I++)t.dyn_dtree[2*I]=0;for(I=0;I<19;I++)t.bl_tree[2*I]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function DCg(t){t.bi_valid>8?pm(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Z_(t,I,g,C){var i=2*I,e=2*g;return t[i]<t[e]||t[i]===t[e]&&C[I]<=C[g]}function sX(t,I,g){for(var C=t.heap[g],i=g<<1;i<=t.heap_len&&(i<t.heap_len&&Z_(I,t.heap[i+1],t.heap[i],t.depth)&&i++,!Z_(I,C,t.heap[i],t.depth));)t.heap[g]=t.heap[i],g=i,i<<=1;t.heap[g]=C}function G_(t,I,g){var C,i,e,A,s=0;if(t.last_lit!==0)do C=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],i=t.pending_buf[t.l_buf+s],s++,C===0?ys(t,i,I):(ys(t,(e=rm[i])+256+1,I),(A=tD[e])!==0&&vi(t,i-=N9[e],A),ys(t,e=HCg(--C),g),(A=HN[e])!==0&&vi(t,C-=tV[e],A));while(s<t.last_lit);ys(t,256,I)}function lX(t,I){var g,C,i,e=I.dyn_tree,A=I.stat_desc.static_tree,s=I.stat_desc.has_stree,l=I.stat_desc.elems,n=-1;for(t.heap_len=0,t.heap_max=573,g=0;g<l;g++)e[2*g]!==0?(t.heap[++t.heap_len]=n=g,t.depth[g]=0):e[2*g+1]=0;for(;t.heap_len<2;)e[2*(i=t.heap[++t.heap_len]=n<2?++n:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=A[2*i+1]);for(I.max_code=n,g=t.heap_len>>1;g>=1;g--)sX(t,e,g);i=l;do g=t.heap[1],t.heap[1]=t.heap[t.heap_len--],sX(t,e,1),C=t.heap[1],t.heap[--t.heap_max]=g,t.heap[--t.heap_max]=C,e[2*i]=e[2*g]+e[2*C],t.depth[i]=(t.depth[g]>=t.depth[C]?t.depth[g]:t.depth[C])+1,e[2*g+1]=e[2*C+1]=i,t.heap[1]=i++,sX(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(a,d){var o,c,r,h,b,u,m=d.dyn_tree,Z=d.max_code,p=d.stat_desc.static_tree,Y=d.stat_desc.has_stree,R=d.stat_desc.extra_bits,X=d.stat_desc.extra_base,H=d.stat_desc.max_length,S=0;for(h=0;h<=15;h++)a.bl_count[h]=0;for(m[2*a.heap[a.heap_max]+1]=0,o=a.heap_max+1;o<573;o++)(h=m[2*m[2*(c=a.heap[o])+1]+1]+1)>H&&(h=H,S++),m[2*c+1]=h,c>Z||(a.bl_count[h]++,b=0,c>=X&&(b=R[c-X]),u=m[2*c],a.opt_len+=u*(h+b),Y&&(a.static_len+=u*(p[2*c+1]+b)));if(S!==0){do{for(h=H-1;a.bl_count[h]===0;)h--;a.bl_count[h]--,a.bl_count[h+1]+=2,a.bl_count[H]--,S-=2}while(S>0);for(h=H;h!==0;h--)for(c=a.bl_count[h];c!==0;)(r=a.heap[--o])>Z||(m[2*r+1]!==h&&(a.opt_len+=(h-m[2*r+1])*m[2*r],m[2*r+1]=h),c--)}}(t,I),SCg(e,n,t.bl_count)}function w_(t,I,g){var C,i,e=-1,A=I[1],s=0,l=7,n=4;for(A===0&&(l=138,n=3),I[2*(g+1)+1]=65535,C=0;C<=g;C++)i=A,A=I[2*(C+1)+1],++s<l&&i===A||(s<n?t.bl_tree[2*i]+=s:i!==0?(i!==e&&t.bl_tree[2*i]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,e=i,A===0?(l=138,n=3):i===A?(l=6,n=3):(l=7,n=4))}function p_(t,I,g){var C,i,e=-1,A=I[1],s=0,l=7,n=4;for(A===0&&(l=138,n=3),C=0;C<=g;C++)if(i=A,A=I[2*(C+1)+1],!(++s<l&&i===A)){if(s<n)do ys(t,i,t.bl_tree);while(--s!=0);else i!==0?(i!==e&&(ys(t,i,t.bl_tree),s--),ys(t,16,t.bl_tree),vi(t,s-3,2)):s<=10?(ys(t,17,t.bl_tree),vi(t,s-3,3)):(ys(t,18,t.bl_tree),vi(t,s-11,7));s=0,e=i,A===0?(l=138,n=3):i===A?(l=6,n=3):(l=7,n=4)}}G0(tV);var B_=!1;function W_(t,I,g,C){vi(t,0+(C?1:0),3),function(i,e,A,s){DCg(i),pm(i,A),pm(i,~A),Nhg.arraySet(i.pending_buf,i.window,e,A,i.pending),i.pending+=A}(t,I,g)}jr._tr_init=function(t){B_||(function(){var I,g,C,i,e,A=new Array(16);for(C=0,i=0;i<28;i++)for(N9[i]=C,I=0;I<1<<tD[i];I++)rm[C++]=i;for(rm[C-1]=i,e=0,i=0;i<16;i++)for(tV[i]=e,I=0;I<1<<HN[i];I++)wm[e++]=i;for(e>>=7;i<30;i++)for(tV[i]=e<<7,I=0;I<1<<HN[i]-7;I++)wm[256+e++]=i;for(g=0;g<=15;g++)A[g]=0;for(I=0;I<=143;)Al[2*I+1]=8,I++,A[8]++;for(;I<=255;)Al[2*I+1]=9,I++,A[9]++;for(;I<=279;)Al[2*I+1]=7,I++,A[7]++;for(;I<=287;)Al[2*I+1]=8,I++,A[8]++;for(SCg(Al,287,A),I=0;I<30;I++)Pu[2*I+1]=5,Pu[2*I]=XCg(I,5);h_=new eX(Al,tD,257,286,15),b_=new eX(Pu,HN,0,30,15),u_=new eX(new Array(0),Vhg,0,19,7)}(),B_=!0),t.l_desc=new AX(t.dyn_ltree,h_),t.d_desc=new AX(t.dyn_dtree,b_),t.bl_desc=new AX(t.bl_tree,u_),t.bi_buf=0,t.bi_valid=0,m_(t)},jr._tr_stored_block=W_,jr._tr_flush_block=function(t,I,g,C){var i,e,A=0;t.level>0?(t.strm.data_type===2&&(t.strm.data_type=function(s){var l,n=4093624447;for(l=0;l<=31;l++,n>>>=1)if(1&n&&s.dyn_ltree[2*l]!==0)return 0;if(s.dyn_ltree[18]!==0||s.dyn_ltree[20]!==0||s.dyn_ltree[26]!==0)return 1;for(l=32;l<256;l++)if(s.dyn_ltree[2*l]!==0)return 1;return 0}(t)),lX(t,t.l_desc),lX(t,t.d_desc),A=function(s){var l;for(w_(s,s.dyn_ltree,s.l_desc.max_code),w_(s,s.dyn_dtree,s.d_desc.max_code),lX(s,s.bl_desc),l=18;l>=3&&s.bl_tree[2*r_[l]+1]===0;l--);return s.opt_len+=3*(l+1)+5+5+4,l}(t),i=t.opt_len+3+7>>>3,(e=t.static_len+3+7>>>3)<=i&&(i=e)):i=e=g+5,g+4<=i&&I!==-1?W_(t,I,g,C):t.strategy===4||e===i?(vi(t,2+(C?1:0),3),G_(t,Al,Pu)):(vi(t,4+(C?1:0),3),function(s,l,n,a){var d;for(vi(s,l-257,5),vi(s,n-1,5),vi(s,a-4,4),d=0;d<a;d++)vi(s,s.bl_tree[2*r_[d]+1],3);p_(s,s.dyn_ltree,l-1),p_(s,s.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,A+1),G_(t,t.dyn_ltree,t.dyn_dtree)),m_(t),C&&DCg(t)},jr._tr_tally=function(t,I,g){return t.pending_buf[t.d_buf+2*t.last_lit]=I>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&I,t.pending_buf[t.l_buf+t.last_lit]=255&g,t.last_lit++,I===0?t.dyn_ltree[2*g]++:(t.matches++,I--,t.dyn_ltree[2*(rm[g]+256+1)]++,t.dyn_dtree[2*HCg(I)]++),t.last_lit===t.lit_bufsize-1},jr._tr_align=function(t){vi(t,2,3),ys(t,256,Al),function(I){I.bi_valid===16?(pm(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):I.bi_valid>=8&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)}(t)};var KCg=function(t,I,g,C){for(var i=65535&t|0,e=t>>>16&65535|0,A=0;g!==0;){g-=A=g>2e3?2e3:g;do e=e+(i=i+I[C++]|0)|0;while(--A);i%=65521,e%=65521}return i|e<<16|0},Mhg=function(){for(var t,I=[],g=0;g<256;g++){t=g;for(var C=0;C<8;C++)t=1&t?3988292384^t>>>1:t>>>1;I[g]=t}return I}(),Pr,FCg=function(t,I,g,C){var i=Mhg,e=C+g;t^=-1;for(var A=C;A<e;A++)t=t>>>8^i[255&(t^I[A])];return-1^t},V9={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"},yi=Ol,Qe=jr,kCg=KCg,On=FCg,Rhg=V9;function Pn(t,I){return t.msg=Rhg[I],I}function y_(t){return(t<<1)-(t>4?9:0)}function $n(t){for(var I=t.length;--I>=0;)t[I]=0}function Un(t){var I=t.state,g=I.pending;g>t.avail_out&&(g=t.avail_out),g!==0&&(yi.arraySet(t.output,I.pending_buf,I.pending_out,g,t.next_out),t.next_out+=g,I.pending_out+=g,t.total_out+=g,t.avail_out-=g,I.pending-=g,I.pending===0&&(I.pending_out=0))}function Et(t,I){Qe._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,I),t.block_start=t.strstart,Un(t.strm)}function sC(t,I){t.pending_buf[t.pending++]=I}function Vu(t,I){t.pending_buf[t.pending++]=I>>>8&255,t.pending_buf[t.pending++]=255&I}function zCg(t,I){var g,C,i=t.max_chain_length,e=t.strstart,A=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,n=t.window,a=t.w_mask,d=t.prev,o=t.strstart+258,c=n[e+A-1],r=n[e+A];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do if(n[(g=I)+A]===r&&n[g+A-1]===c&&n[g]===n[e]&&n[++g]===n[e+1]){e+=2,g++;do;while(n[++e]===n[++g]&&n[++e]===n[++g]&&n[++e]===n[++g]&&n[++e]===n[++g]&&n[++e]===n[++g]&&n[++e]===n[++g]&&n[++e]===n[++g]&&n[++e]===n[++g]&&e<o);if(C=258-(o-e),e=o-258,C>A){if(t.match_start=I,A=C,C>=s)break;c=n[e+A-1],r=n[e+A]}}while((I=d[I&a])>l&&--i!=0);return A<=t.lookahead?A:t.lookahead}function Fo(t){var I,g,C,i,e,A,s,l,n,a,d=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-262)){yi.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,I=g=t.hash_size;do C=t.head[--I],t.head[I]=C>=d?C-d:0;while(--g);I=g=d;do C=t.prev[--I],t.prev[I]=C>=d?C-d:0;while(--g);i+=d}if(t.strm.avail_in===0)break;if(A=t.strm,s=t.window,l=t.strstart+t.lookahead,n=i,a=void 0,(a=A.avail_in)>n&&(a=n),g=a===0?0:(A.avail_in-=a,yi.arraySet(s,A.input,A.next_in,a,l),A.state.wrap===1?A.adler=kCg(A.adler,s,a,l):A.state.wrap===2&&(A.adler=On(A.adler,s,a,l)),A.next_in+=a,A.total_in+=a,a),t.lookahead+=g,t.lookahead+t.insert>=3)for(e=t.strstart-t.insert,t.ins_h=t.window[e],t.ins_h=(t.ins_h<<t.hash_shift^t.window[e+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[e+3-1])&t.hash_mask,t.prev[e&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=e,e++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&t.strm.avail_in!==0)}function nX(t,I){for(var g,C;;){if(t.lookahead<262){if(Fo(t),t.lookahead<262&&I===0)return 1;if(t.lookahead===0)break}if(g=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,g=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),g!==0&&t.strstart-g<=t.w_size-262&&(t.match_length=zCg(t,g)),t.match_length>=3)if(C=Qe._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,g=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!=0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else C=Qe._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(C&&(Et(t,!1),t.strm.avail_out===0))return 1}return t.insert=t.strstart<2?t.strstart:2,I===4?(Et(t,!0),t.strm.avail_out===0?3:4):t.last_lit&&(Et(t,!1),t.strm.avail_out===0)?1:2}function Vr(t,I){for(var g,C,i;;){if(t.lookahead<262){if(Fo(t),t.lookahead<262&&I===0)return 1;if(t.lookahead===0)break}if(g=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,g=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,g!==0&&t.prev_length<t.max_lazy_match&&t.strstart-g<=t.w_size-262&&(t.match_length=zCg(t,g),t.match_length<=5&&(t.strategy===1||t.match_length===3&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,C=Qe._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,g=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!=0);if(t.match_available=0,t.match_length=2,t.strstart++,C&&(Et(t,!1),t.strm.avail_out===0))return 1}else if(t.match_available){if((C=Qe._tr_tally(t,0,t.window[t.strstart-1]))&&Et(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(C=Qe._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,I===4?(Et(t,!0),t.strm.avail_out===0?3:4):t.last_lit&&(Et(t,!1),t.strm.avail_out===0)?1:2}function $A(t,I,g,C,i){this.good_length=t,this.max_lazy=I,this.nice_length=g,this.max_chain=C,this.func=i}function fhg(){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=8,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 yi.Buf16(1146),this.dyn_dtree=new yi.Buf16(122),this.bl_tree=new yi.Buf16(78),$n(this.dyn_ltree),$n(this.dyn_dtree),$n(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new yi.Buf16(16),this.heap=new yi.Buf16(573),$n(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new yi.Buf16(573),$n(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 JCg(t){var I;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(I=t.state).pending=0,I.pending_out=0,I.wrap<0&&(I.wrap=-I.wrap),I.status=I.wrap?42:113,t.adler=I.wrap===2?0:1,I.last_flush=0,Qe._tr_init(I),0):Pn(t,-2)}function LCg(t){var I,g=JCg(t);return g===0&&((I=t.state).window_size=2*I.w_size,$n(I.head),I.max_lazy_match=Pr[I.level].max_lazy,I.good_match=Pr[I.level].good_length,I.nice_match=Pr[I.level].nice_length,I.max_chain_length=Pr[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=2,I.match_available=0,I.ins_h=0),g}function Y_(t,I,g,C,i,e){if(!t)return-2;var A=1;if(I===-1&&(I=6),C<0?(A=0,C=-C):C>15&&(A=2,C-=16),i<1||i>9||g!==8||C<8||C>15||I<0||I>9||e<0||e>4)return Pn(t,-2);C===8&&(C=9);var s=new fhg;return t.state=s,s.strm=t,s.wrap=A,s.gzhead=null,s.w_bits=C,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new yi.Buf8(2*s.w_size),s.head=new yi.Buf16(s.hash_size),s.prev=new yi.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new yi.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=I,s.strategy=e,s.method=g,LCg(t)}Pr=[new $A(0,0,0,0,function(t,I){var g=65535;for(g>t.pending_buf_size-5&&(g=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Fo(t),t.lookahead===0&&I===0)return 1;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var C=t.block_start+g;if((t.strstart===0||t.strstart>=C)&&(t.lookahead=t.strstart-C,t.strstart=C,Et(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-262&&(Et(t,!1),t.strm.avail_out===0))return 1}return t.insert=0,I===4?(Et(t,!0),t.strm.avail_out===0?3:4):(t.strstart>t.block_start&&(Et(t,!1),t.strm.avail_out),1)}),new $A(4,4,8,4,nX),new $A(4,5,16,8,nX),new $A(4,6,32,32,nX),new $A(4,4,16,16,Vr),new $A(8,16,32,32,Vr),new $A(8,16,128,128,Vr),new $A(8,32,128,256,Vr),new $A(32,128,258,1024,Vr),new $A(32,258,258,4096,Vr)],is.deflateInit=function(t,I){return Y_(t,I,8,15,8,0)},is.deflateInit2=Y_,is.deflateReset=LCg,is.deflateResetKeep=JCg,is.deflateSetHeader=function(t,I){return t&&t.state?t.state.wrap!==2?-2:(t.state.gzhead=I,0):-2},is.deflate=function(t,I){var g,C,i,e;if(!t||!t.state||I>5||I<0)return t?Pn(t,-2):-2;if(C=t.state,!t.output||!t.input&&t.avail_in!==0||C.status===666&&I!==4)return Pn(t,t.avail_out===0?-5:-2);if(C.strm=t,g=C.last_flush,C.last_flush=I,C.status===42)if(C.wrap===2)t.adler=0,sC(C,31),sC(C,139),sC(C,8),C.gzhead?(sC(C,(C.gzhead.text?1:0)+(C.gzhead.hcrc?2:0)+(C.gzhead.extra?4:0)+(C.gzhead.name?8:0)+(C.gzhead.comment?16:0)),sC(C,255&C.gzhead.time),sC(C,C.gzhead.time>>8&255),sC(C,C.gzhead.time>>16&255),sC(C,C.gzhead.time>>24&255),sC(C,C.level===9?2:C.strategy>=2||C.level<2?4:0),sC(C,255&C.gzhead.os),C.gzhead.extra&&C.gzhead.extra.length&&(sC(C,255&C.gzhead.extra.length),sC(C,C.gzhead.extra.length>>8&255)),C.gzhead.hcrc&&(t.adler=On(t.adler,C.pending_buf,C.pending,0)),C.gzindex=0,C.status=69):(sC(C,0),sC(C,0),sC(C,0),sC(C,0),sC(C,0),sC(C,C.level===9?2:C.strategy>=2||C.level<2?4:0),sC(C,3),C.status=113);else{var A=8+(C.w_bits-8<<4)<<8;A|=(C.strategy>=2||C.level<2?0:C.level<6?1:C.level===6?2:3)<<6,C.strstart!==0&&(A|=32),A+=31-A%31,C.status=113,Vu(C,A),C.strstart!==0&&(Vu(C,t.adler>>>16),Vu(C,65535&t.adler)),t.adler=1}if(C.status===69)if(C.gzhead.extra){for(i=C.pending;C.gzindex<(65535&C.gzhead.extra.length)&&(C.pending!==C.pending_buf_size||(C.gzhead.hcrc&&C.pending>i&&(t.adler=On(t.adler,C.pending_buf,C.pending-i,i)),Un(t),i=C.pending,C.pending!==C.pending_buf_size));)sC(C,255&C.gzhead.extra[C.gzindex]),C.gzindex++;C.gzhead.hcrc&&C.pending>i&&(t.adler=On(t.adler,C.pending_buf,C.pending-i,i)),C.gzindex===C.gzhead.extra.length&&(C.gzindex=0,C.status=73)}else C.status=73;if(C.status===73)if(C.gzhead.name){i=C.pending;do{if(C.pending===C.pending_buf_size&&(C.gzhead.hcrc&&C.pending>i&&(t.adler=On(t.adler,C.pending_buf,C.pending-i,i)),Un(t),i=C.pending,C.pending===C.pending_buf_size)){e=1;break}e=C.gzindex<C.gzhead.name.length?255&C.gzhead.name.charCodeAt(C.gzindex++):0,sC(C,e)}while(e!==0);C.gzhead.hcrc&&C.pending>i&&(t.adler=On(t.adler,C.pending_buf,C.pending-i,i)),e===0&&(C.gzindex=0,C.status=91)}else C.status=91;if(C.status===91)if(C.gzhead.comment){i=C.pending;do{if(C.pending===C.pending_buf_size&&(C.gzhead.hcrc&&C.pending>i&&(t.adler=On(t.adler,C.pending_buf,C.pending-i,i)),Un(t),i=C.pending,C.pending===C.pending_buf_size)){e=1;break}e=C.gzindex<C.gzhead.comment.length?255&C.gzhead.comment.charCodeAt(C.gzindex++):0,sC(C,e)}while(e!==0);C.gzhead.hcrc&&C.pending>i&&(t.adler=On(t.adler,C.pending_buf,C.pending-i,i)),e===0&&(C.status=103)}else C.status=103;if(C.status===103&&(C.gzhead.hcrc?(C.pending+2>C.pending_buf_size&&Un(t),C.pending+2<=C.pending_buf_size&&(sC(C,255&t.adler),sC(C,t.adler>>8&255),t.adler=0,C.status=113)):C.status=113),C.pending!==0){if(Un(t),t.avail_out===0)return C.last_flush=-1,0}else if(t.avail_in===0&&y_(I)<=y_(g)&&I!==4)return Pn(t,-5);if(C.status===666&&t.avail_in!==0)return Pn(t,-5);if(t.avail_in!==0||C.lookahead!==0||I!==0&&C.status!==666){var s=C.strategy===2?function(l,n){for(var a;;){if(l.lookahead===0&&(Fo(l),l.lookahead===0)){if(n===0)return 1;break}if(l.match_length=0,a=Qe._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++,a&&(Et(l,!1),l.strm.avail_out===0))return 1}return l.insert=0,n===4?(Et(l,!0),l.strm.avail_out===0?3:4):l.last_lit&&(Et(l,!1),l.strm.avail_out===0)?1:2}(C,I):C.strategy===3?function(l,n){for(var a,d,o,c,r=l.window;;){if(l.lookahead<=258){if(Fo(l),l.lookahead<=258&&n===0)return 1;if(l.lookahead===0)break}if(l.match_length=0,l.lookahead>=3&&l.strstart>0&&(d=r[o=l.strstart-1])===r[++o]&&d===r[++o]&&d===r[++o]){c=l.strstart+258;do;while(d===r[++o]&&d===r[++o]&&d===r[++o]&&d===r[++o]&&d===r[++o]&&d===r[++o]&&d===r[++o]&&d===r[++o]&&o<c);l.match_length=258-(c-o),l.match_length>l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>=3?(a=Qe._tr_tally(l,1,l.match_length-3),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(a=Qe._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),a&&(Et(l,!1),l.strm.avail_out===0))return 1}return l.insert=0,n===4?(Et(l,!0),l.strm.avail_out===0?3:4):l.last_lit&&(Et(l,!1),l.strm.avail_out===0)?1:2}(C,I):Pr[C.level].func(C,I);if(s!==3&&s!==4||(C.status=666),s===1||s===3)return t.avail_out===0&&(C.last_flush=-1),0;if(s===2&&(I===1?Qe._tr_align(C):I!==5&&(Qe._tr_stored_block(C,0,0,!1),I===3&&($n(C.head),C.lookahead===0&&(C.strstart=0,C.block_start=0,C.insert=0))),Un(t),t.avail_out===0))return C.last_flush=-1,0}return I!==4?0:C.wrap<=0?1:(C.wrap===2?(sC(C,255&t.adler),sC(C,t.adler>>8&255),sC(C,t.adler>>16&255),sC(C,t.adler>>24&255),sC(C,255&t.total_in),sC(C,t.total_in>>8&255),sC(C,t.total_in>>16&255),sC(C,t.total_in>>24&255)):(Vu(C,t.adler>>>16),Vu(C,65535&t.adler)),Un(t),C.wrap>0&&(C.wrap=-C.wrap),C.pending!==0?0:1)},is.deflateEnd=function(t){var I;return t&&t.state?(I=t.state.status)!==42&&I!==69&&I!==73&&I!==91&&I!==103&&I!==113&&I!==666?Pn(t,-2):(t.state=null,I===113?Pn(t,-3):0):-2},is.deflateSetDictionary=function(t,I){var g,C,i,e,A,s,l,n,a=I.length;if(!t||!t.state||(e=(g=t.state).wrap)===2||e===1&&g.status!==42||g.lookahead)return-2;for(e===1&&(t.adler=kCg(t.adler,I,a,0)),g.wrap=0,a>=g.w_size&&(e===0&&($n(g.head),g.strstart=0,g.block_start=0,g.insert=0),n=new yi.Buf8(g.w_size),yi.arraySet(n,I,a-g.w_size,g.w_size,0),I=n,a=g.w_size),A=t.avail_in,s=t.next_in,l=t.input,t.avail_in=a,t.next_in=0,t.input=I,Fo(g);g.lookahead>=3;){C=g.strstart,i=g.lookahead-2;do g.ins_h=(g.ins_h<<g.hash_shift^g.window[C+3-1])&g.hash_mask,g.prev[C&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=C,C++;while(--i);g.strstart=C,g.lookahead=2,Fo(g)}return g.strstart+=g.lookahead,g.block_start=g.strstart,g.insert=g.lookahead,g.lookahead=0,g.match_length=g.prev_length=2,g.match_available=0,t.next_in=s,t.input=l,t.avail_in=A,g.wrap=e,0},is.deflateInfo="pako deflate (from Nodeca project)";var ko={},iV=Ol,vCg=!0,TCg=!0;try{String.fromCharCode.apply(null,[0])}catch{vCg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{TCg=!1}for(var _u=new iV.Buf8(256),zn=0;zn<256;zn++)_u[zn]=zn>=252?6:zn>=248?5:zn>=240?4:zn>=224?3:zn>=192?2:1;function N_(t,I){if(I<65534&&(t.subarray&&TCg||!t.subarray&&vCg))return String.fromCharCode.apply(null,iV.shrinkBuf(t,I));for(var g="",C=0;C<I;C++)g+=String.fromCharCode(t[C]);return g}_u[254]=_u[254]=1,ko.string2buf=function(t){var I,g,C,i,e,A=t.length,s=0;for(i=0;i<A;i++)(64512&(g=t.charCodeAt(i)))==55296&&i+1<A&&(64512&(C=t.charCodeAt(i+1)))==56320&&(g=65536+(g-55296<<10)+(C-56320),i++),s+=g<128?1:g<2048?2:g<65536?3:4;for(I=new iV.Buf8(s),e=0,i=0;e<s;i++)(64512&(g=t.charCodeAt(i)))==55296&&i+1<A&&(64512&(C=t.charCodeAt(i+1)))==56320&&(g=65536+(g-55296<<10)+(C-56320),i++),g<128?I[e++]=g:g<2048?(I[e++]=192|g>>>6,I[e++]=128|63&g):g<65536?(I[e++]=224|g>>>12,I[e++]=128|g>>>6&63,I[e++]=128|63&g):(I[e++]=240|g>>>18,I[e++]=128|g>>>12&63,I[e++]=128|g>>>6&63,I[e++]=128|63&g);return I},ko.buf2binstring=function(t){return N_(t,t.length)},ko.binstring2buf=function(t){for(var I=new iV.Buf8(t.length),g=0,C=I.length;g<C;g++)I[g]=t.charCodeAt(g);return I},ko.buf2string=function(t,I){var g,C,i,e,A=I||t.length,s=new Array(2*A);for(C=0,g=0;g<A;)if((i=t[g++])<128)s[C++]=i;else if((e=_u[i])>4)s[C++]=65533,g+=e-1;else{for(i&=e===2?31:e===3?15:7;e>1&&g<A;)i=i<<6|63&t[g++],e--;e>1?s[C++]=65533:i<65536?s[C++]=i:(i-=65536,s[C++]=55296|i>>10&1023,s[C++]=56320|1023&i)}return N_(s,C)},ko.utf8border=function(t,I){var g;for((I=I||t.length)>t.length&&(I=t.length),g=I-1;g>=0&&(192&t[g])==128;)g--;return g<0||g===0?I:g+_u[t[g]]>I?g:I};var xCg=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},hm=is,qu=Ol,iD=ko,eD=V9,Hhg=xCg,jCg=Object.prototype.toString;function xo(t){if(!(this instanceof xo))return new xo(t);this.options=qu.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var I=this.options;I.raw&&I.windowBits>0?I.windowBits=-I.windowBits:I.gzip&&I.windowBits>0&&I.windowBits<16&&(I.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hhg,this.strm.avail_out=0;var g=hm.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(g!==0)throw new Error(eD[g]);if(I.header&&hm.deflateSetHeader(this.strm,I.header),I.dictionary){var C;if(C=typeof I.dictionary=="string"?iD.string2buf(I.dictionary):jCg.call(I.dictionary)==="[object ArrayBuffer]"?new Uint8Array(I.dictionary):I.dictionary,(g=hm.deflateSetDictionary(this.strm,C))!==0)throw new Error(eD[g]);this._dict_set=!0}}function aX(t,I){var g=new xo(I);if(g.push(t,!0),g.err)throw g.msg||eD[g.err];return g.result}xo.prototype.push=function(t,I){var g,C,i=this.strm,e=this.options.chunkSize;if(this.ended)return!1;C=I===~~I?I:I===!0?4:0,typeof t=="string"?i.input=iD.string2buf(t):jCg.call(t)==="[object ArrayBuffer]"?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new qu.Buf8(e),i.next_out=0,i.avail_out=e),(g=hm.deflate(i,C))!==1&&g!==0)return this.onEnd(g),this.ended=!0,!1;i.avail_out!==0&&(i.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(iD.buf2binstring(qu.shrinkBuf(i.output,i.next_out))):this.onData(qu.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||i.avail_out===0)&&g!==1);return C===4?(g=hm.deflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===0):C!==2||(this.onEnd(0),i.avail_out=0,!0)},xo.prototype.onData=function(t){this.chunks.push(t)},xo.prototype.onEnd=function(t){t===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=qu.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},Eu.Deflate=xo,Eu.deflate=aX,Eu.deflateRaw=function(t,I){return(I=I||{}).raw=!0,aX(t,I)},Eu.gzip=function(t,I){return(I=I||{}).gzip=!0,aX(t,I)};var $u={},sA={},V_=Ol,Xhg=[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],Shg=[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],Dhg=[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],Khg=[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],me=Ol,oX=KCg,gs=FCg,Fhg=function(t,I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z;g=t.state,C=t.next_in,S=t.input,i=C+(t.avail_in-5),e=t.next_out,z=t.output,A=e-(I-t.avail_out),s=e+(t.avail_out-257),l=g.dmax,n=g.wsize,a=g.whave,d=g.wnext,o=g.window,c=g.hold,r=g.bits,h=g.lencode,b=g.distcode,u=(1<<g.lenbits)-1,m=(1<<g.distbits)-1;g:do{r<15&&(c+=S[C++]<<r,r+=8,c+=S[C++]<<r,r+=8),Z=h[c&u];I:for(;;){if(c>>>=p=Z>>>24,r-=p,(p=Z>>>16&255)===0)z[e++]=65535&Z;else{if(!(16&p)){if((64&p)==0){Z=h[(65535&Z)+(c&(1<<p)-1)];continue I}if(32&p){g.mode=12;break g}t.msg="invalid literal/length code",g.mode=30;break g}Y=65535&Z,(p&=15)&&(r<p&&(c+=S[C++]<<r,r+=8),Y+=c&(1<<p)-1,c>>>=p,r-=p),r<15&&(c+=S[C++]<<r,r+=8,c+=S[C++]<<r,r+=8),Z=b[c&m];C:for(;;){if(c>>>=p=Z>>>24,r-=p,!(16&(p=Z>>>16&255))){if((64&p)==0){Z=b[(65535&Z)+(c&(1<<p)-1)];continue C}t.msg="invalid distance code",g.mode=30;break g}if(R=65535&Z,r<(p&=15)&&(c+=S[C++]<<r,(r+=8)<p&&(c+=S[C++]<<r,r+=8)),(R+=c&(1<<p)-1)>l){t.msg="invalid distance too far back",g.mode=30;break g}if(c>>>=p,r-=p,R>(p=e-A)){if((p=R-p)>a&&g.sane){t.msg="invalid distance too far back",g.mode=30;break g}if(X=0,H=o,d===0){if(X+=n-p,p<Y){Y-=p;do z[e++]=o[X++];while(--p);X=e-R,H=z}}else if(d<p){if(X+=n+d-p,(p-=d)<Y){Y-=p;do z[e++]=o[X++];while(--p);if(X=0,d<Y){Y-=p=d;do z[e++]=o[X++];while(--p);X=e-R,H=z}}}else if(X+=d-p,p<Y){Y-=p;do z[e++]=o[X++];while(--p);X=e-R,H=z}for(;Y>2;)z[e++]=H[X++],z[e++]=H[X++],z[e++]=H[X++],Y-=3;Y&&(z[e++]=H[X++],Y>1&&(z[e++]=H[X++]))}else{X=e-R;do z[e++]=z[X++],z[e++]=z[X++],z[e++]=z[X++],Y-=3;while(Y>2);Y&&(z[e++]=z[X++],Y>1&&(z[e++]=z[X++]))}break}}break}}while(C<i&&e<s);C-=Y=r>>3,c&=(1<<(r-=Y<<3))-1,t.next_in=C,t.next_out=e,t.avail_in=C<i?i-C+5:5-(C-i),t.avail_out=e<s?s-e+257:257-(e-s),g.hold=c,g.bits=r},bm=function(t,I,g,C,i,e,A,s){var l,n,a,d,o,c,r,h,b,u=s.bits,m=0,Z=0,p=0,Y=0,R=0,X=0,H=0,S=0,z=0,v=0,K=null,V=0,N=new V_.Buf16(16),B=new V_.Buf16(16),G=null,w=0;for(m=0;m<=15;m++)N[m]=0;for(Z=0;Z<C;Z++)N[I[g+Z]]++;for(R=u,Y=15;Y>=1&&N[Y]===0;Y--);if(R>Y&&(R=Y),Y===0)return i[e++]=20971520,i[e++]=20971520,s.bits=1,0;for(p=1;p<Y&&N[p]===0;p++);for(R<p&&(R=p),S=1,m=1;m<=15;m++)if(S<<=1,(S-=N[m])<0)return-1;if(S>0&&(t===0||Y!==1))return-1;for(B[1]=0,m=1;m<15;m++)B[m+1]=B[m]+N[m];for(Z=0;Z<C;Z++)I[g+Z]!==0&&(A[B[I[g+Z]]++]=Z);if(t===0?(K=G=A,c=19):t===1?(K=Xhg,V-=257,G=Shg,w-=257,c=256):(K=Dhg,G=Khg,c=-1),v=0,Z=0,m=p,o=e,X=R,H=0,a=-1,d=(z=1<<R)-1,t===1&&z>852||t===2&&z>592)return 1;for(;;){r=m-H,A[Z]<c?(h=0,b=A[Z]):A[Z]>c?(h=G[w+A[Z]],b=K[V+A[Z]]):(h=96,b=0),l=1<<m-H,p=n=1<<X;do i[o+(v>>H)+(n-=l)]=r<<24|h<<16|b|0;while(n!==0);for(l=1<<m-1;v&l;)l>>=1;if(l!==0?(v&=l-1,v+=l):v=0,Z++,--N[m]==0){if(m===Y)break;m=I[g+A[Z]]}if(m>R&&(v&d)!==a){for(H===0&&(H=R),o+=p,S=1<<(X=m-H);X+H<Y&&!((S-=N[X+H])<=0);)X++,S<<=1;if(z+=1<<X,t===1&&z>852||t===2&&z>592)return 1;i[a=v&d]=R<<24|X<<16|o-e|0}}return v!==0&&(i[o+v]=m-H<<24|64<<16|0),s.bits=R,0};function M_(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function khg(){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 me.Buf16(320),this.work=new me.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function QCg(t){var I;return t&&t.state?(I=t.state,t.total_in=t.total_out=I.total=0,t.msg="",I.wrap&&(t.adler=1&I.wrap),I.mode=1,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new me.Buf32(852),I.distcode=I.distdyn=new me.Buf32(592),I.sane=1,I.back=-1,0):-2}function OCg(t){var I;return t&&t.state?((I=t.state).wsize=0,I.whave=0,I.wnext=0,QCg(t)):-2}function UCg(t,I){var g,C;return t&&t.state?(C=t.state,I<0?(g=0,I=-I):(g=1+(I>>4),I<48&&(I&=15)),I&&(I<8||I>15)?-2:(C.window!==null&&C.wbits!==I&&(C.window=null),C.wrap=g,C.wbits=I,OCg(t))):-2}function R_(t,I){var g,C;return t?(C=new khg,t.state=C,C.window=null,(g=UCg(t,I))!==0&&(t.state=null),g):-2}var cX,dX,f_=!0;function zhg(t){if(f_){var I;for(cX=new me.Buf32(512),dX=new me.Buf32(32),I=0;I<144;)t.lens[I++]=8;for(;I<256;)t.lens[I++]=9;for(;I<280;)t.lens[I++]=7;for(;I<288;)t.lens[I++]=8;for(bm(1,t.lens,0,288,cX,0,t.work,{bits:9}),I=0;I<32;)t.lens[I++]=5;bm(2,t.lens,0,32,dX,0,t.work,{bits:5}),f_=!1}t.lencode=cX,t.lenbits=9,t.distcode=dX,t.distbits=5}function H_(t,I,g,C){var i,e=t.state;return e.window===null&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new me.Buf8(e.wsize)),C>=e.wsize?(me.arraySet(e.window,I,g-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>C&&(i=C),me.arraySet(e.window,I,g-C,i,e.wnext),(C-=i)?(me.arraySet(e.window,I,g-C,C,0),e.wnext=C,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0}sA.inflateReset=OCg,sA.inflateReset2=UCg,sA.inflateResetKeep=QCg,sA.inflateInit=function(t){return R_(t,15)},sA.inflateInit2=R_,sA.inflate=function(t,I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z=0,v=new me.Buf8(4),K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return-2;(g=t.state).mode===12&&(g.mode=13),A=t.next_out,i=t.output,l=t.avail_out,e=t.next_in,C=t.input,s=t.avail_in,n=g.hold,a=g.bits,d=s,o=l,X=0;g:for(;;)switch(g.mode){case 1:if(g.wrap===0){g.mode=13;break}for(;a<16;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(2&g.wrap&&n===35615){g.check=0,v[0]=255&n,v[1]=n>>>8&255,g.check=gs(g.check,v,2,0),n=0,a=0,g.mode=2;break}if(g.flags=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&n)<<8)+(n>>8))%31){t.msg="incorrect header check",g.mode=30;break}if((15&n)!=8){t.msg="unknown compression method",g.mode=30;break}if(a-=4,R=8+(15&(n>>>=4)),g.wbits===0)g.wbits=R;else if(R>g.wbits){t.msg="invalid window size",g.mode=30;break}g.dmax=1<<R,t.adler=g.check=1,g.mode=512&n?10:12,n=0,a=0;break;case 2:for(;a<16;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(g.flags=n,(255&g.flags)!=8){t.msg="unknown compression method",g.mode=30;break}if(57344&g.flags){t.msg="unknown header flags set",g.mode=30;break}g.head&&(g.head.text=n>>8&1),512&g.flags&&(v[0]=255&n,v[1]=n>>>8&255,g.check=gs(g.check,v,2,0)),n=0,a=0,g.mode=3;case 3:for(;a<32;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}g.head&&(g.head.time=n),512&g.flags&&(v[0]=255&n,v[1]=n>>>8&255,v[2]=n>>>16&255,v[3]=n>>>24&255,g.check=gs(g.check,v,4,0)),n=0,a=0,g.mode=4;case 4:for(;a<16;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}g.head&&(g.head.xflags=255&n,g.head.os=n>>8),512&g.flags&&(v[0]=255&n,v[1]=n>>>8&255,g.check=gs(g.check,v,2,0)),n=0,a=0,g.mode=5;case 5:if(1024&g.flags){for(;a<16;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}g.length=n,g.head&&(g.head.extra_len=n),512&g.flags&&(v[0]=255&n,v[1]=n>>>8&255,g.check=gs(g.check,v,2,0)),n=0,a=0}else g.head&&(g.head.extra=null);g.mode=6;case 6:if(1024&g.flags&&((c=g.length)>s&&(c=s),c&&(g.head&&(R=g.head.extra_len-g.length,g.head.extra||(g.head.extra=new Array(g.head.extra_len)),me.arraySet(g.head.extra,C,e,c,R)),512&g.flags&&(g.check=gs(g.check,C,c,e)),s-=c,e+=c,g.length-=c),g.length))break g;g.length=0,g.mode=7;case 7:if(2048&g.flags){if(s===0)break g;c=0;do R=C[e+c++],g.head&&R&&g.length<65536&&(g.head.name+=String.fromCharCode(R));while(R&&c<s);if(512&g.flags&&(g.check=gs(g.check,C,c,e)),s-=c,e+=c,R)break g}else g.head&&(g.head.name=null);g.length=0,g.mode=8;case 8:if(4096&g.flags){if(s===0)break g;c=0;do R=C[e+c++],g.head&&R&&g.length<65536&&(g.head.comment+=String.fromCharCode(R));while(R&&c<s);if(512&g.flags&&(g.check=gs(g.check,C,c,e)),s-=c,e+=c,R)break g}else g.head&&(g.head.comment=null);g.mode=9;case 9:if(512&g.flags){for(;a<16;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(n!==(65535&g.check)){t.msg="header crc mismatch",g.mode=30;break}n=0,a=0}g.head&&(g.head.hcrc=g.flags>>9&1,g.head.done=!0),t.adler=g.check=0,g.mode=12;break;case 10:for(;a<32;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}t.adler=g.check=M_(n),n=0,a=0,g.mode=11;case 11:if(g.havedict===0)return t.next_out=A,t.avail_out=l,t.next_in=e,t.avail_in=s,g.hold=n,g.bits=a,2;t.adler=g.check=1,g.mode=12;case 12:if(I===5||I===6)break g;case 13:if(g.last){n>>>=7&a,a-=7&a,g.mode=27;break}for(;a<3;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}switch(g.last=1&n,a-=1,3&(n>>>=1)){case 0:g.mode=14;break;case 1:if(zhg(g),g.mode=20,I===6){n>>>=2,a-=2;break g}break;case 2:g.mode=17;break;case 3:t.msg="invalid block type",g.mode=30}n>>>=2,a-=2;break;case 14:for(n>>>=7&a,a-=7&a;a<32;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if((65535&n)!=(n>>>16^65535)){t.msg="invalid stored block lengths",g.mode=30;break}if(g.length=65535&n,n=0,a=0,g.mode=15,I===6)break g;case 15:g.mode=16;case 16:if(c=g.length){if(c>s&&(c=s),c>l&&(c=l),c===0)break g;me.arraySet(i,C,e,c,A),s-=c,e+=c,l-=c,A+=c,g.length-=c;break}g.mode=12;break;case 17:for(;a<14;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(g.nlen=257+(31&n),n>>>=5,a-=5,g.ndist=1+(31&n),n>>>=5,a-=5,g.ncode=4+(15&n),n>>>=4,a-=4,g.nlen>286||g.ndist>30){t.msg="too many length or distance symbols",g.mode=30;break}g.have=0,g.mode=18;case 18:for(;g.have<g.ncode;){for(;a<3;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}g.lens[K[g.have++]]=7&n,n>>>=3,a-=3}for(;g.have<19;)g.lens[K[g.have++]]=0;if(g.lencode=g.lendyn,g.lenbits=7,H={bits:g.lenbits},X=bm(0,g.lens,0,19,g.lencode,0,g.work,H),g.lenbits=H.bits,X){t.msg="invalid code lengths set",g.mode=30;break}g.have=0,g.mode=19;case 19:for(;g.have<g.nlen+g.ndist;){for(;u=(z=g.lencode[n&(1<<g.lenbits)-1])>>>16&255,m=65535&z,!((b=z>>>24)<=a);){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(m<16)n>>>=b,a-=b,g.lens[g.have++]=m;else{if(m===16){for(S=b+2;a<S;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(n>>>=b,a-=b,g.have===0){t.msg="invalid bit length repeat",g.mode=30;break}R=g.lens[g.have-1],c=3+(3&n),n>>>=2,a-=2}else if(m===17){for(S=b+3;a<S;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}a-=b,R=0,c=3+(7&(n>>>=b)),n>>>=3,a-=3}else{for(S=b+7;a<S;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}a-=b,R=0,c=11+(127&(n>>>=b)),n>>>=7,a-=7}if(g.have+c>g.nlen+g.ndist){t.msg="invalid bit length repeat",g.mode=30;break}for(;c--;)g.lens[g.have++]=R}}if(g.mode===30)break;if(g.lens[256]===0){t.msg="invalid code -- missing end-of-block",g.mode=30;break}if(g.lenbits=9,H={bits:g.lenbits},X=bm(1,g.lens,0,g.nlen,g.lencode,0,g.work,H),g.lenbits=H.bits,X){t.msg="invalid literal/lengths set",g.mode=30;break}if(g.distbits=6,g.distcode=g.distdyn,H={bits:g.distbits},X=bm(2,g.lens,g.nlen,g.ndist,g.distcode,0,g.work,H),g.distbits=H.bits,X){t.msg="invalid distances set",g.mode=30;break}if(g.mode=20,I===6)break g;case 20:g.mode=21;case 21:if(s>=6&&l>=258){t.next_out=A,t.avail_out=l,t.next_in=e,t.avail_in=s,g.hold=n,g.bits=a,Fhg(t,o),A=t.next_out,i=t.output,l=t.avail_out,e=t.next_in,C=t.input,s=t.avail_in,n=g.hold,a=g.bits,g.mode===12&&(g.back=-1);break}for(g.back=0;u=(z=g.lencode[n&(1<<g.lenbits)-1])>>>16&255,m=65535&z,!((b=z>>>24)<=a);){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(u&&(240&u)==0){for(Z=b,p=u,Y=m;u=(z=g.lencode[Y+((n&(1<<Z+p)-1)>>Z)])>>>16&255,m=65535&z,!(Z+(b=z>>>24)<=a);){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}n>>>=Z,a-=Z,g.back+=Z}if(n>>>=b,a-=b,g.back+=b,g.length=m,u===0){g.mode=26;break}if(32&u){g.back=-1,g.mode=12;break}if(64&u){t.msg="invalid literal/length code",g.mode=30;break}g.extra=15&u,g.mode=22;case 22:if(g.extra){for(S=g.extra;a<S;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}g.length+=n&(1<<g.extra)-1,n>>>=g.extra,a-=g.extra,g.back+=g.extra}g.was=g.length,g.mode=23;case 23:for(;u=(z=g.distcode[n&(1<<g.distbits)-1])>>>16&255,m=65535&z,!((b=z>>>24)<=a);){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if((240&u)==0){for(Z=b,p=u,Y=m;u=(z=g.distcode[Y+((n&(1<<Z+p)-1)>>Z)])>>>16&255,m=65535&z,!(Z+(b=z>>>24)<=a);){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}n>>>=Z,a-=Z,g.back+=Z}if(n>>>=b,a-=b,g.back+=b,64&u){t.msg="invalid distance code",g.mode=30;break}g.offset=m,g.extra=15&u,g.mode=24;case 24:if(g.extra){for(S=g.extra;a<S;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}g.offset+=n&(1<<g.extra)-1,n>>>=g.extra,a-=g.extra,g.back+=g.extra}if(g.offset>g.dmax){t.msg="invalid distance too far back",g.mode=30;break}g.mode=25;case 25:if(l===0)break g;if(c=o-l,g.offset>c){if((c=g.offset-c)>g.whave&&g.sane){t.msg="invalid distance too far back",g.mode=30;break}c>g.wnext?(c-=g.wnext,r=g.wsize-c):r=g.wnext-c,c>g.length&&(c=g.length),h=g.window}else h=i,r=A-g.offset,c=g.length;c>l&&(c=l),l-=c,g.length-=c;do i[A++]=h[r++];while(--c);g.length===0&&(g.mode=21);break;case 26:if(l===0)break g;i[A++]=g.length,l--,g.mode=21;break;case 27:if(g.wrap){for(;a<32;){if(s===0)break g;s--,n|=C[e++]<<a,a+=8}if(o-=l,t.total_out+=o,g.total+=o,o&&(t.adler=g.check=g.flags?gs(g.check,i,o,A-o):oX(g.check,i,o,A-o)),o=l,(g.flags?n:M_(n))!==g.check){t.msg="incorrect data check",g.mode=30;break}n=0,a=0}g.mode=28;case 28:if(g.wrap&&g.flags){for(;a<32;){if(s===0)break g;s--,n+=C[e++]<<a,a+=8}if(n!==(4294967295&g.total)){t.msg="incorrect length check",g.mode=30;break}n=0,a=0}g.mode=29;case 29:X=1;break g;case 30:X=-3;break g;case 31:return-4;default:return-2}return t.next_out=A,t.avail_out=l,t.next_in=e,t.avail_in=s,g.hold=n,g.bits=a,(g.wsize||o!==t.avail_out&&g.mode<30&&(g.mode<27||I!==4))&&H_(t,t.output,t.next_out,o-t.avail_out),d-=t.avail_in,o-=t.avail_out,t.total_in+=d,t.total_out+=o,g.total+=o,g.wrap&&o&&(t.adler=g.check=g.flags?gs(g.check,i,o,t.next_out-o):oX(g.check,i,o,t.next_out-o)),t.data_type=g.bits+(g.last?64:0)+(g.mode===12?128:0)+(g.mode===20||g.mode===15?256:0),(d===0&&o===0||I===4)&&X===0&&(X=-5),X},sA.inflateEnd=function(t){if(!t||!t.state)return-2;var I=t.state;return I.window&&(I.window=null),t.state=null,0},sA.inflateGetHeader=function(t,I){var g;return t&&t.state?(2&(g=t.state).wrap)==0?-2:(g.head=I,I.done=!1,0):-2},sA.inflateSetDictionary=function(t,I){var g,C=I.length;return t&&t.state?(g=t.state).wrap!==0&&g.mode!==11?-2:g.mode===11&&oX(1,I,C,0)!==g.check?-3:H_(t,I,C,C)?(g.mode=31,-4):(g.havedict=1,0):-2},sA.inflateInfo="pako inflate (from Nodeca project)";var ECg={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},Ah=sA,gm=Ol,XN=ko,$C=ECg,AD=V9,Jhg=xCg,Lhg=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},PCg=Object.prototype.toString;function jo(t){if(!(this instanceof jo))return new jo(t);this.options=gm.assign({chunkSize:16384,windowBits:0,to:""},t||{});var I=this.options;I.raw&&I.windowBits>=0&&I.windowBits<16&&(I.windowBits=-I.windowBits,I.windowBits===0&&(I.windowBits=-15)),!(I.windowBits>=0&&I.windowBits<16)||t&&t.windowBits||(I.windowBits+=32),I.windowBits>15&&I.windowBits<48&&(15&I.windowBits)==0&&(I.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jhg,this.strm.avail_out=0;var g=Ah.inflateInit2(this.strm,I.windowBits);if(g!==$C.Z_OK)throw new Error(AD[g]);if(this.header=new Lhg,Ah.inflateGetHeader(this.strm,this.header),I.dictionary&&(typeof I.dictionary=="string"?I.dictionary=XN.string2buf(I.dictionary):PCg.call(I.dictionary)==="[object ArrayBuffer]"&&(I.dictionary=new Uint8Array(I.dictionary)),I.raw&&(g=Ah.inflateSetDictionary(this.strm,I.dictionary))!==$C.Z_OK))throw new Error(AD[g])}function rX(t,I){var g=new jo(I);if(g.push(t,!0),g.err)throw g.msg||AD[g.err];return g.result}jo.prototype.push=function(t,I){var g,C,i,e,A,s=this.strm,l=this.options.chunkSize,n=this.options.dictionary,a=!1;if(this.ended)return!1;C=I===~~I?I:I===!0?$C.Z_FINISH:$C.Z_NO_FLUSH,typeof t=="string"?s.input=XN.binstring2buf(t):PCg.call(t)==="[object ArrayBuffer]"?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new gm.Buf8(l),s.next_out=0,s.avail_out=l),(g=Ah.inflate(s,$C.Z_NO_FLUSH))===$C.Z_NEED_DICT&&n&&(g=Ah.inflateSetDictionary(this.strm,n)),g===$C.Z_BUF_ERROR&&a===!0&&(g=$C.Z_OK,a=!1),g!==$C.Z_STREAM_END&&g!==$C.Z_OK)return this.onEnd(g),this.ended=!0,!1;s.next_out&&(s.avail_out!==0&&g!==$C.Z_STREAM_END&&(s.avail_in!==0||C!==$C.Z_FINISH&&C!==$C.Z_SYNC_FLUSH)||(this.options.to==="string"?(i=XN.utf8border(s.output,s.next_out),e=s.next_out-i,A=XN.buf2string(s.output,i),s.next_out=e,s.avail_out=l-e,e&&gm.arraySet(s.output,s.output,i,e,0),this.onData(A)):this.onData(gm.shrinkBuf(s.output,s.next_out)))),s.avail_in===0&&s.avail_out===0&&(a=!0)}while((s.avail_in>0||s.avail_out===0)&&g!==$C.Z_STREAM_END);return g===$C.Z_STREAM_END&&(C=$C.Z_FINISH),C===$C.Z_FINISH?(g=Ah.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===$C.Z_OK):C!==$C.Z_SYNC_FLUSH||(this.onEnd($C.Z_OK),s.avail_out=0,!0)},jo.prototype.onData=function(t){this.chunks.push(t)},jo.prototype.onEnd=function(t){t===$C.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=gm.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},$u.Inflate=jo,$u.inflate=rX,$u.inflateRaw=function(t,I){return(I=I||{}).raw=!0,rX(t,I)},$u.ungzip=rX;var _Cg={};(0,Ol.assign)(_Cg,Eu,$u,ECg);var vhg=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Thg=_Cg,X_=PC(),SN=Pe,xhg=vhg?"uint8array":"array";function Ho(t,I){SN.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=I,this.meta={}}fN.magic="\b\0",X_.inherits(Ho,SN),Ho.prototype.processChunk=function(t){this.meta=t.meta,this._pako===null&&this._createPako(),this._pako.push(X_.transformTo(xhg,t.data),!1)},Ho.prototype.flush=function(){SN.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},Ho.prototype.cleanUp=function(){SN.prototype.cleanUp.call(this),this._pako=null},Ho.prototype._createPako=function(){this._pako=new Thg[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(I){t.push({data:I,meta:t.meta})}},fN.compressWorker=function(t){return new Ho("Deflate",t)},fN.uncompressWorker=function(){return new Ho("Inflate",{})};var S_=Pe;CV.STORE={magic:"\0\0",compressWorker:function(){return new S_("STORE compression")},uncompressWorker:function(){return new S_("STORE decompression")}},CV.DEFLATE=fN;var qCg={LOCAL_FILE_HEADER:"PK",CENTRAL_FILE_HEADER:"PK",CENTRAL_DIRECTORY_END:"PK",ZIP64_CENTRAL_DIRECTORY_LOCATOR:"PK\x07",ZIP64_CENTRAL_DIRECTORY_END:"PK",DATA_DESCRIPTOR:"PK\x07\b"},_r=PC(),Qr=Pe,hX=Z0,D_=W9,eV=qCg,WC=function(t,I){var g,C="";for(g=0;g<I;g++)C+=String.fromCharCode(255&t),t>>>=8;return C},K_=function(t,I,g,C,i,e){var A,s,l=t.file,n=t.compression,a=e!==hX.utf8encode,d=_r.transformTo("string",e(l.name)),o=_r.transformTo("string",hX.utf8encode(l.name)),c=l.comment,r=_r.transformTo("string",e(c)),h=_r.transformTo("string",hX.utf8encode(c)),b=o.length!==l.name.length,u=h.length!==c.length,m="",Z="",p="",Y=l.dir,R=l.date,X={crc32:0,compressedSize:0,uncompressedSize:0};I&&!g||(X.crc32=t.crc32,X.compressedSize=t.compressedSize,X.uncompressedSize=t.uncompressedSize);var H=0;I&&(H|=8),a||!b&&!u||(H|=2048);var S,z,v,K=0,V=0;Y&&(K|=16),i==="UNIX"?(V=798,K|=(S=l.unixPermissions,z=Y,v=S,S||(v=z?16893:33204),(65535&v)<<16)):(V=20,K|=63&(l.dosPermissions||0)),A=R.getUTCHours(),A<<=6,A|=R.getUTCMinutes(),A<<=5,A|=R.getUTCSeconds()/2,s=R.getUTCFullYear()-1980,s<<=4,s|=R.getUTCMonth()+1,s<<=5,s|=R.getUTCDate(),b&&(Z=WC(1,1)+WC(D_(d),4)+o,m+="up"+WC(Z.length,2)+Z),u&&(p=WC(1,1)+WC(D_(r),4)+h,m+="uc"+WC(p.length,2)+p);var N="";return N+=`
\0`,N+=WC(H,2),N+=n.magic,N+=WC(A,2),N+=WC(s,2),N+=WC(X.crc32,4),N+=WC(X.compressedSize,4),N+=WC(X.uncompressedSize,4),N+=WC(d.length,2),N+=WC(m.length,2),{fileRecord:eV.LOCAL_FILE_HEADER+N+d+m,dirRecord:eV.CENTRAL_FILE_HEADER+WC(V,2)+N+WC(r.length,2)+"\0\0\0\0"+WC(K,4)+WC(C,4)+d+m+r}},jhg=function(t){return eV.DATA_DESCRIPTOR+WC(t.crc32,4)+WC(t.compressedSize,4)+WC(t.uncompressedSize,4)};function lA(t,I,g,C){Qr.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=I,this.zipPlatform=g,this.encodeFileName=C,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}_r.inherits(lA,Qr),lA.prototype.push=function(t){var I=t.meta.percent||0,g=this.entriesCount,C=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,Qr.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:g?(I+100*(g-C-1))/g:100}}))},lA.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var I=this.streamFiles&&!t.file.dir;if(I){var g=K_(t,I,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},lA.prototype.closedSource=function(t){this.accumulate=!1;var I=this.streamFiles&&!t.file.dir,g=K_(t,I,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),I)this.push({data:jhg(t),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},lA.prototype.flush=function(){for(var t=this.bytesWritten,I=0;I<this.dirRecords.length;I++)this.push({data:this.dirRecords[I],meta:{percent:100}});var g=this.bytesWritten-t,C=function(i,e,A,s,l){var n=_r.transformTo("string",l(s));return eV.CENTRAL_DIRECTORY_END+"\0\0\0\0"+WC(i,2)+WC(i,2)+WC(e,4)+WC(A,4)+WC(n.length,2)+n}(this.dirRecords.length,g,t,this.zipComment,this.encodeFileName);this.push({data:C,meta:{percent:100}})},lA.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},lA.prototype.registerPrevious=function(t){this._sources.push(t);var I=this;return t.on("data",function(g){I.processChunk(g)}),t.on("end",function(){I.closedSource(I.previous.streamInfo),I._sources.length?I.prepareNextSource():I.end()}),t.on("error",function(g){I.error(g)}),this},lA.prototype.resume=function(){return!!Qr.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},lA.prototype.error=function(t){var I=this._sources;if(!Qr.prototype.error.call(this,t))return!1;for(var g=0;g<I.length;g++)try{I[g].error(t)}catch{}return!0},lA.prototype.lock=function(){Qr.prototype.lock.call(this);for(var t=this._sources,I=0;I<t.length;I++)t[I].lock()};var Qhg=CV,Ohg=lA;fCg.generateWorker=function(t,I,g){var C=new Ohg(I.streamFiles,g,I.platform,I.encodeFileName),i=0;try{t.forEach(function(e,A){i++;var s=function(d,o){var c=d||o,r=Qhg[c];if(!r)throw new Error(c+" is not a valid compression method !");return r}(A.options.compression,I.compression),l=A.options.compressionOptions||I.compressionOptions||{},n=A.dir,a=A.date;A._compressWorker(s,l).withStreamInfo("file",{name:e,dir:n,date:a,comment:A.comment||"",unixPermissions:A.unixPermissions,dosPermissions:A.dosPermissions}).pipe(C)}),C.entriesCount=i}catch(e){C.error(e)}return C};var Uhg=PC(),DN=Pe;function Im(t,I){DN.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(I)}Uhg.inherits(Im,DN),Im.prototype._bindStream=function(t){var I=this;this._stream=t,t.pause(),t.on("data",function(g){I.push({data:g,meta:{percent:0}})}).on("error",function(g){I.isPaused?this.generatedError=g:I.error(g)}).on("end",function(){I.isPaused?I._upstreamEnded=!0:I.end()})},Im.prototype.pause=function(){return!!DN.prototype.pause.call(this)&&(this._stream.pause(),!0)},Im.prototype.resume=function(){return!!DN.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)};var Ehg=Im,Phg=Z0,um=PC(),$Cg=Pe,_hg=YCg,gtg=NCg,F_=y9,qhg=Yhg,$hg=fCg,k_=_V,g0g=Ehg,Itg=function(t,I,g){var C,i=um.getTypeOf(I),e=um.extend(g||{},gtg);e.date=e.date||new Date,e.compression!==null&&(e.compression=e.compression.toUpperCase()),typeof e.unixPermissions=="string"&&(e.unixPermissions=parseInt(e.unixPermissions,8)),e.unixPermissions&&16384&e.unixPermissions&&(e.dir=!0),e.dosPermissions&&16&e.dosPermissions&&(e.dir=!0),e.dir&&(t=Ctg(t)),e.createFolders&&(C=I0g(t))&&ttg.call(this,C,!0);var A=i==="string"&&e.binary===!1&&e.base64===!1;g&&g.binary!==void 0||(e.binary=!A),(I instanceof F_&&I.uncompressedSize===0||e.dir||!I||I.length===0)&&(e.base64=!1,e.binary=!0,I="",e.compression="STORE",i="string");var s=null;s=I instanceof F_||I instanceof $Cg?I:k_.isNode&&k_.isStream(I)?new g0g(t,I):um.prepareContent(t,I,e.binary,e.optimizedBinaryString,e.base64);var l=new qhg(t,s,e);this.files[t]=l},I0g=function(t){t.slice(-1)==="/"&&(t=t.substring(0,t.length-1));var I=t.lastIndexOf("/");return I>0?t.substring(0,I):""},Ctg=function(t){return t.slice(-1)!=="/"&&(t+="/"),t},ttg=function(t,I){return I=I!==void 0?I:gtg.createFolders,t=Ctg(t),this.files[t]||Itg.call(this,t,null,{dir:!0,createFolders:I}),this.files[t]};function z_(t){return Object.prototype.toString.call(t)==="[object RegExp]"}var C0g={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var I,g,C;for(I in this.files)C=this.files[I],(g=I.slice(this.root.length,I.length))&&I.slice(0,this.root.length)===this.root&&t(g,C)},filter:function(t){var I=[];return this.forEach(function(g,C){t(g,C)&&I.push(C)}),I},file:function(t,I,g){if(arguments.length===1){if(z_(t)){var C=t;return this.filter(function(e,A){return!A.dir&&C.test(e)})}var i=this.files[this.root+t];return i&&!i.dir?i:null}return t=this.root+t,Itg.call(this,t,I,g),this},folder:function(t){if(!t)return this;if(z_(t))return this.filter(function(i,e){return e.dir&&t.test(i)});var I=this.root+t,g=ttg.call(this,I),C=this.clone();return C.root=g.name,C},remove:function(t){t=this.root+t;var I=this.files[t];if(I||(t.slice(-1)!=="/"&&(t+="/"),I=this.files[t]),I&&!I.dir)delete this.files[t];else for(var g=this.filter(function(i,e){return e.name.slice(0,t.length)===t}),C=0;C<g.length;C++)delete this.files[g[C].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 I,g={};try{if((g=um.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Phg.utf8encode})).type=g.type.toLowerCase(),g.compression=g.compression.toUpperCase(),g.type==="binarystring"&&(g.type="string"),!g.type)throw new Error("No output type specified.");um.checkSupport(g.type),g.platform!=="darwin"&&g.platform!=="freebsd"&&g.platform!=="linux"&&g.platform!=="sunos"||(g.platform="UNIX"),g.platform==="win32"&&(g.platform="DOS");var C=g.comment||this.comment||"";I=$hg.generateWorker(this,g,C)}catch(i){(I=new $Cg("error")).error(i)}return new _hg(I,g.type||"string",g.mimeType)},generateAsync:function(t,I){return this.generateInternalStream(t).accumulate(I)},generateNodeStream:function(t,I){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(I)}},t0g=C0g,i0g=PC();function itg(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}itg.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(t){var I,g=0;for(this.checkOffset(t),I=this.index+t-1;I>=this.index;I--)g=(g<<8)+this.byteAt(I);return this.index+=t,g},readString:function(t){return i0g.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}};var etg=itg,Atg=etg;function Or(t){Atg.call(this,t);for(var I=0;I<this.data.length;I++)t[I]=255&t[I]}PC().inherits(Or,Atg),Or.prototype.byteAt=function(t){return this.data[this.zero+t]},Or.prototype.lastIndexOfSignature=function(t){for(var I=t.charCodeAt(0),g=t.charCodeAt(1),C=t.charCodeAt(2),i=t.charCodeAt(3),e=this.length-4;e>=0;--e)if(this.data[e]===I&&this.data[e+1]===g&&this.data[e+2]===C&&this.data[e+3]===i)return e-this.zero;return-1},Or.prototype.readAndCheckSignature=function(t){var I=t.charCodeAt(0),g=t.charCodeAt(1),C=t.charCodeAt(2),i=t.charCodeAt(3),e=this.readData(4);return I===e[0]&&g===e[1]&&C===e[2]&&i===e[3]},Or.prototype.readData=function(t){if(this.checkOffset(t),t===0)return[];var I=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,I};var stg=Or,ltg=etg;function Ur(t){ltg.call(this,t)}PC().inherits(Ur,ltg),Ur.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},Ur.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},Ur.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},Ur.prototype.readData=function(t){this.checkOffset(t);var I=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,I};var e0g=Ur,ntg=stg;function sD(t){ntg.call(this,t)}PC().inherits(sD,ntg),sD.prototype.readData=function(t){if(this.checkOffset(t),t===0)return new Uint8Array(0);var I=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,I};var atg=sD,otg=atg;function lD(t){otg.call(this,t)}PC().inherits(lD,otg),lD.prototype.readData=function(t){this.checkOffset(t);var I=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,I};var A0g=lD,KY=PC(),J_=nt,s0g=stg,l0g=e0g,n0g=A0g,a0g=atg,ctg=function(t){var I=KY.getTypeOf(t);return KY.checkSupport(I),I!=="string"||J_.uint8array?I==="nodebuffer"?new n0g(t):J_.uint8array?new a0g(KY.transformTo("uint8array",t)):new s0g(KY.transformTo("array",t)):new l0g(t)},bX=ctg,Jn=PC(),o0g=y9,L_=W9,FY=Z0,kY=CV,c0g=nt;function dtg(t,I){this.options=t,this.loadOptions=I}dtg.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(t){var I,g;if(t.skip(22),this.fileNameLength=t.readInt(2),g=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(g),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(I=function(C){for(var i in kY)if(Object.prototype.hasOwnProperty.call(kY,i)&&kY[i].magic===C)return kY[i];return null}(this.compressionMethod),I===null)throw new Error("Corrupted zip : compression "+Jn.pretty(this.compressionMethod)+" unknown (inner file : "+Jn.transformTo("string",this.fileName)+")");this.decompressed=new o0g(this.compressedSize,this.uncompressedSize,this.crc32,I,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var I=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(I),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),t===0&&(this.dosPermissions=63&this.externalFileAttributes),t===3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=bX(this.extraFields[1].value);this.uncompressedSize===Jn.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===Jn.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===Jn.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===Jn.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var I,g,C,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<i;)I=t.readInt(2),g=t.readInt(2),C=t.readData(g),this.extraFields[I]={id:I,length:g,value:C};t.setIndex(i)},handleUTF8:function(){var t=c0g.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=FY.utf8decode(this.fileName),this.fileCommentStr=FY.utf8decode(this.fileComment);else{var I=this.findExtraFieldUnicodePath();if(I!==null)this.fileNameStr=I;else{var g=Jn.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var C=this.findExtraFieldUnicodeComment();if(C!==null)this.fileCommentStr=C;else{var i=Jn.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var I=bX(t.value);return I.readInt(1)!==1||L_(this.fileName)!==I.readInt(4)?null:FY.utf8decode(I.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var I=bX(t.value);return I.readInt(1)!==1||L_(this.fileComment)!==I.readInt(4)?null:FY.utf8decode(I.readData(t.length-5))}return null}};var d0g=dtg,r0g=ctg,gl=PC(),eA=qCg,h0g=d0g,b0g=nt;function rtg(t){this.files=[],this.loadOptions=t}rtg.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var I=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+gl.pretty(I)+", expected "+gl.pretty(t)+")")}},isSignature:function(t,I){var g=this.reader.index;this.reader.setIndex(t);var C=this.reader.readString(4)===I;return this.reader.setIndex(g),C},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 t=this.reader.readData(this.zipCommentLength),I=b0g.uint8array?"uint8array":"array",g=gl.transformTo(I,t);this.zipComment=this.loadOptions.decodeFileName(g)},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 t,I,g,C=this.zip64EndOfCentralSize-44;0<C;)t=this.reader.readInt(2),I=this.reader.readInt(4),g=this.reader.readData(I),this.zip64ExtensibleData[t]={id:t,length:I,value:g}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,I;for(t=0;t<this.files.length;t++)I=this.files[t],this.reader.setIndex(I.localHeaderOffset),this.checkSignature(eA.LOCAL_FILE_HEADER),I.readLocalPart(this.reader),I.handleUTF8(),I.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(eA.CENTRAL_FILE_HEADER);)(t=new h0g({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);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 t=this.reader.lastIndexOfSignature(eA.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,eA.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(t);var I=t;if(this.checkSignature(eA.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===gl.MAX_VALUE_16BITS||this.diskWithCentralDirStart===gl.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===gl.MAX_VALUE_16BITS||this.centralDirRecords===gl.MAX_VALUE_16BITS||this.centralDirSize===gl.MAX_VALUE_32BITS||this.centralDirOffset===gl.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(eA.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(eA.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,eA.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(eA.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(eA.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var g=this.centralDirOffset+this.centralDirSize;this.zip64&&(g+=20,g+=12+this.zip64EndOfCentralSize);var C=I-g;if(C>0)this.isSignature(I,eA.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(t){this.reader=r0g(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var u0g=rtg,uX=PC(),KN=eG,m0g=Z0,Z0g=u0g,G0g=RCg,v_=_V;function w0g(t){return new KN.Promise(function(I,g){var C=t.decompressed.getContentWorker().pipe(new G0g);C.on("error",function(i){g(i)}).on("end",function(){C.streamInfo.crc32!==t.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):I()}).resume()})}function xe(){if(!(this instanceof xe))return new xe;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 t=new xe;for(var I in this)typeof this[I]!="function"&&(t[I]=this[I]);return t}}xe.prototype=t0g,xe.prototype.loadAsync=function(t,I){var g=this;return I=uX.extend(I||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:m0g.utf8decode}),v_.isNode&&v_.isStream(t)?KN.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):uX.prepareContent("the loaded zip file",t,!0,I.optimizedBinaryString,I.base64).then(function(C){var i=new Z0g(I);return i.load(C),i}).then(function(C){var i=[KN.Promise.resolve(C)],e=C.files;if(I.checkCRC32)for(var A=0;A<e.length;A++)i.push(w0g(e[A]));return KN.Promise.all(i)}).then(function(C){for(var i=C.shift(),e=i.files,A=0;A<e.length;A++){var s=e[A],l=s.fileNameStr,n=uX.resolve(s.fileNameStr);g.file(n,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:I.createFolders}),s.dir||(g.file(n).unsafeOriginalName=l)}return i.zipComment.length&&(g.comment=i.zipComment),g})},xe.support=nt,xe.defaults=NCg,xe.version="3.10.1",xe.loadAsync=function(t,I){return new xe().loadAsync(t,I)},xe.external=eG;var p0g=xe;function B0g(t,I){var g=(I=I||{}).pos||0,C=!!I.keepComments,i=!!I.keepWhitespace,e=60,A=62,s=45,l=47,n=33,a=39,d=34,o=91,c=93;function r(R){for(var X=[];t[g];)if(t.charCodeAt(g)==e){if(t.charCodeAt(g+1)===l){var H=g+2;if(g=t.indexOf(">",g),t.substring(H,g).indexOf(R)==-1){var S=t.substring(0,g).split(`
`);throw new Error(`Unexpected close tag
Line: `+(S.length-1)+`
Column: `+(S[S.length-1].length+1)+`
Char: `+t[g])}return g+1&&(g+=1),X}if(t.charCodeAt(g+1)===n){if(t.charCodeAt(g+2)==s){const B=g;for(;g!==-1&&(t.charCodeAt(g)!==A||t.charCodeAt(g-1)!=s||t.charCodeAt(g-2)!=s||g==-1);)g=t.indexOf(">",g+1);g===-1&&(g=t.length),C&&X.push(t.substring(B,g+1))}else{if(t.charCodeAt(g+2)===o&&t.charCodeAt(g+8)===o&&t.substr(g+3,5).toLowerCase()==="cdata"){var z=t.indexOf("]]>",g);z==-1?(X.push(t.substr(g+9)),g=t.length):(X.push(t.substring(g+9,z)),g=z+3);continue}{const B=g+1;g+=2;for(var v=!1;(t.charCodeAt(g)!==A||v===!0)&&t[g];)t.charCodeAt(g)===o?v=!0:v===!0&&t.charCodeAt(g)===c&&(v=!1),g++;X.push(t.substring(B,g))}}g++;continue}var K=m();X.push(K),K.tagName[0]==="?"&&(X.push(...K.children),K.children=[])}else{var V=h();if(i)V.length>0&&X.push(V);else{var N=V.trim();N.length>0&&X.push(N)}g++}return X}function h(){var R=g;return(g=t.indexOf("<",g)-1)===-2&&(g=t.length),t.slice(R,g+1)}function b(){for(var R=g;`\r
	>/= `.indexOf(t[g])===-1&&t[g];)g++;return t.slice(R,g)}var u=I.noChildNodes||["img","br","input","meta","link","hr"];function m(){g++;const R=b(),X={};let H=[];for(;t.charCodeAt(g)!==A&&t[g];){var S=t.charCodeAt(g);if(S>64&&S<91||S>96&&S<123){for(var z=b(),v=t.charCodeAt(g);v&&v!==a&&v!==d&&!(v>64&&v<91||v>96&&v<123)&&v!==A;)g++,v=t.charCodeAt(g);if(v===a||v===d){var K=Z();if(g===-1)return{tagName:R,attributes:X,children:H}}else K=null,g--;X[z]=K}g++}if(t.charCodeAt(g-1)!==l)if(R=="script"){var V=g+1;g=t.indexOf("<\/script>",g),H=[t.slice(V,g)],g+=9}else R=="style"?(V=g+1,g=t.indexOf("</style>",g),H=[t.slice(V,g)],g+=8):u.indexOf(R)===-1?(g++,H=r(R)):g++;else g++;return{tagName:R,attributes:X,children:H}}function Z(){var R=t[g],X=g+1;return g=t.indexOf(R,X),t.slice(X,g)}var p,Y=null;if(I.attrValue!==void 0)for(I.attrName=I.attrName||"id",Y=[];p=void 0,p=new RegExp("\\s"+I.attrName+`\\s*=['"]`+I.attrValue+`['"]`).exec(t),(g=p?p.index:-1)!==-1;)(g=t.lastIndexOf("<",g))!==-1&&Y.push(m()),t=t.substr(g),g=0;else Y=I.parseNode?m():r("");return I.filter&&(Y=btg(Y,I.filter)),I.simplify?htg(Array.isArray(Y)?Y:[Y]):(I.setPos&&(Y.pos=g),Y)}function htg(t){var I={};if(!t.length)return"";if(t.length===1&&typeof t[0]=="string")return t[0];for(var g in t.forEach(function(C){if(typeof C=="object"){I[C.tagName]||(I[C.tagName]=[]);var i=htg(C.children);I[C.tagName].push(i),Object.keys(C.attributes).length&&typeof i!="string"&&(i._attributes=C.attributes)}}),I)I[g].length==1&&(I[g]=I[g][0]);return I}function btg(t,I,g=0,C=""){var i=[];return t.forEach(function(e,A){if(typeof e=="object"&&I(e,A,g,C)&&i.push(e),e.children){var s=btg(e.children,I,g+1,(C?C+".":"")+A+"."+e.tagName);i=i.concat(s)}}),i}function W0g(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return T_(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return T_(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function T_(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function x_(t,I){var g=Object.keys(t);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(t);I&&(C=C.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),g.push.apply(g,C)}return g}function mX(t){for(var I=1;I<arguments.length;I++){var g=arguments[I]!=null?arguments[I]:{};I%2?x_(Object(g),!0).forEach(function(C){h9(t,C,g[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(g)):x_(Object(g)).forEach(function(C){Object.defineProperty(t,C,Object.getOwnPropertyDescriptor(g,C))})}return t}var ZX=0;function utg(t){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g={};if(!t.length)return g;if(t.length===1&&typeof t[0]=="string")return Object.keys(I).length?{attrs:mX({order:ZX++},I),value:t[0]}:t[0];var C,i=W0g(t);try{for(i.s();!(C=i.n()).done;){var e=C.value;if(La(e)!=="object")return;if(e.tagName!=="?xml"){g[e.tagName]||(g[e.tagName]=[]);var A=utg(e.children||[],e.attributes);La(A)==="object"&&(A.attrs?A.attrs.order=ZX++:A.attrs={order:ZX++}),Object.keys(e.attributes||{}).length&&(A.attrs=mX(mX({},A.attrs),e.attributes)),g[e.tagName].push(A)}}}catch(l){i.e(l)}finally{i.f()}for(var s in g)g[s].length===1&&(g[s]=g[s][0]);return g}function Gt(t,I){return mtg.apply(this,arguments)}function mtg(){return(mtg=RC(rI.mark(function t(I,g){var C;return rI.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,I.file(g).async("string");case 3:return C=i.sent,i.abrupt("return",utg(B0g(C)));case 7:return i.prev=7,i.t0=i.catch(0),i.abrupt("return",null);case 10:case"end":return i.stop()}},t,null,[[0,7]])}))).apply(this,arguments)}function AV(t){return AV=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},AV(t)}var y0g=/^\s+/,Y0g=/\s+$/;function Qg(t,I){if(I=I||{},(t=t||"")instanceof Qg)return t;if(!(this instanceof Qg))return new Qg(t,I);var g=function(C){var i={r:0,g:0,b:0},e=1,A=null,s=null,l=null,n=!1,a=!1;typeof C=="string"&&(C=function(r){r=r.replace(y0g,"").replace(Y0g,"").toLowerCase();var h,b=!1;if(nD[r])r=nD[r],b=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(h=nA.rgb.exec(r))?{r:h[1],g:h[2],b:h[3]}:(h=nA.rgba.exec(r))?{r:h[1],g:h[2],b:h[3],a:h[4]}:(h=nA.hsl.exec(r))?{h:h[1],s:h[2],l:h[3]}:(h=nA.hsla.exec(r))?{h:h[1],s:h[2],l:h[3],a:h[4]}:(h=nA.hsv.exec(r))?{h:h[1],s:h[2],v:h[3]}:(h=nA.hsva.exec(r))?{h:h[1],s:h[2],v:h[3],a:h[4]}:(h=nA.hex8.exec(r))?{r:qi(h[1]),g:qi(h[2]),b:qi(h[3]),a:P_(h[4]),format:b?"name":"hex8"}:(h=nA.hex6.exec(r))?{r:qi(h[1]),g:qi(h[2]),b:qi(h[3]),format:b?"name":"hex"}:(h=nA.hex4.exec(r))?{r:qi(h[1]+""+h[1]),g:qi(h[2]+""+h[2]),b:qi(h[3]+""+h[3]),a:P_(h[4]+""+h[4]),format:b?"name":"hex8"}:(h=nA.hex3.exec(r))?{r:qi(h[1]+""+h[1]),g:qi(h[2]+""+h[2]),b:qi(h[3]+""+h[3]),format:b?"name":"hex"}:!1}(C)),AV(C)=="object"&&(Il(C.r)&&Il(C.g)&&Il(C.b)?(d=C.r,o=C.g,c=C.b,i={r:255*KC(d,255),g:255*KC(o,255),b:255*KC(c,255)},n=!0,a=String(C.r).substr(-1)==="%"?"prgb":"rgb"):Il(C.h)&&Il(C.s)&&Il(C.v)?(A=Cm(C.s),s=Cm(C.v),i=function(r,h,b){r=6*KC(r,360),h=KC(h,100),b=KC(b,100);var u=Math.floor(r),m=r-u,Z=b*(1-h),p=b*(1-m*h),Y=b*(1-(1-m)*h),R=u%6;return{r:255*[b,p,Z,Z,Y,b][R],g:255*[Y,b,b,p,Z,Z][R],b:255*[Z,Z,Y,b,b,p][R]}}(C.h,A,s),n=!0,a="hsv"):Il(C.h)&&Il(C.s)&&Il(C.l)&&(A=Cm(C.s),l=Cm(C.l),i=function(r,h,b){var u,m,Z;function p(X,H,S){return S<0&&(S+=1),S>1&&(S-=1),S<1/6?X+6*(H-X)*S:S<.5?H:S<2/3?X+(H-X)*(2/3-S)*6:X}if(r=KC(r,360),h=KC(h,100),b=KC(b,100),h===0)u=m=Z=b;else{var Y=b<.5?b*(1+h):b+h-b*h,R=2*b-Y;u=p(R,Y,r+1/3),m=p(R,Y,r),Z=p(R,Y,r-1/3)}return{r:255*u,g:255*m,b:255*Z}}(C.h,A,l),n=!0,a="hsl"),C.hasOwnProperty("a")&&(e=C.a));var d,o,c;return e=Ztg(e),{ok:n,format:C.format||a,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:e}}(t);this._originalInput=t,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=Math.round(100*this._a)/100,this._format=I.format||g.format,this._gradientType=I.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=g.ok}function j_(t,I,g){t=KC(t,255),I=KC(I,255),g=KC(g,255);var C,i,e=Math.max(t,I,g),A=Math.min(t,I,g),s=(e+A)/2;if(e==A)C=i=0;else{var l=e-A;switch(i=s>.5?l/(2-e-A):l/(e+A),e){case t:C=(I-g)/l+(I<g?6:0);break;case I:C=(g-t)/l+2;break;case g:C=(t-I)/l+4}C/=6}return{h:C,s:i,l:s}}function Q_(t,I,g){t=KC(t,255),I=KC(I,255),g=KC(g,255);var C,i,e=Math.max(t,I,g),A=Math.min(t,I,g),s=e,l=e-A;if(i=e===0?0:l/e,e==A)C=0;else{switch(e){case t:C=(I-g)/l+(I<g?6:0);break;case I:C=(g-t)/l+2;break;case g:C=(t-I)/l+4}C/=6}return{h:C,s:i,v:s}}function O_(t,I,g,C){var i=[YA(Math.round(t).toString(16)),YA(Math.round(I).toString(16)),YA(Math.round(g).toString(16))];return C&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function U_(t,I,g,C){return[YA(Gtg(C)),YA(Math.round(t).toString(16)),YA(Math.round(I).toString(16)),YA(Math.round(g).toString(16))].join("")}function N0g(t,I){I=I===0?0:I||10;var g=Qg(t).toHsl();return g.s-=I/100,g.s=qV(g.s),Qg(g)}function V0g(t,I){I=I===0?0:I||10;var g=Qg(t).toHsl();return g.s+=I/100,g.s=qV(g.s),Qg(g)}function M0g(t){return Qg(t).desaturate(100)}function R0g(t,I){I=I===0?0:I||10;var g=Qg(t).toHsl();return g.l+=I/100,g.l=qV(g.l),Qg(g)}function f0g(t,I){I=I===0?0:I||10;var g=Qg(t).toRgb();return g.r=Math.max(0,Math.min(255,g.r-Math.round(-I/100*255))),g.g=Math.max(0,Math.min(255,g.g-Math.round(-I/100*255))),g.b=Math.max(0,Math.min(255,g.b-Math.round(-I/100*255))),Qg(g)}function H0g(t,I){I=I===0?0:I||10;var g=Qg(t).toHsl();return g.l-=I/100,g.l=qV(g.l),Qg(g)}function X0g(t,I){var g=Qg(t).toHsl(),C=(g.h+I)%360;return g.h=C<0?360+C:C,Qg(g)}function S0g(t){var I=Qg(t).toHsl();return I.h=(I.h+180)%360,Qg(I)}function E_(t,I){if(isNaN(I)||I<=0)throw new Error("Argument to polyad must be a positive number");for(var g=Qg(t).toHsl(),C=[Qg(t)],i=360/I,e=1;e<I;e++)C.push(Qg({h:(g.h+e*i)%360,s:g.s,l:g.l}));return C}function D0g(t){var I=Qg(t).toHsl(),g=I.h;return[Qg(t),Qg({h:(g+72)%360,s:I.s,l:I.l}),Qg({h:(g+216)%360,s:I.s,l:I.l})]}function K0g(t,I,g){I=I||6,g=g||30;var C=Qg(t).toHsl(),i=360/g,e=[Qg(t)];for(C.h=(C.h-(i*I>>1)+720)%360;--I;)C.h=(C.h+i)%360,e.push(Qg(C));return e}function F0g(t,I){I=I||6;for(var g=Qg(t).toHsv(),C=g.h,i=g.s,e=g.v,A=[],s=1/I;I--;)A.push(Qg({h:C,s:i,v:e})),e=(e+s)%1;return A}Qg.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,I,g,C=this.toRgb();return t=C.r/255,I=C.g/255,g=C.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))+.0722*(g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4))},setAlpha:function(t){return this._a=Ztg(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Q_(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Q_(this._r,this._g,this._b),I=Math.round(360*t.h),g=Math.round(100*t.s),C=Math.round(100*t.v);return this._a==1?"hsv("+I+", "+g+"%, "+C+"%)":"hsva("+I+", "+g+"%, "+C+"%, "+this._roundA+")"},toHsl:function(){var t=j_(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=j_(this._r,this._g,this._b),I=Math.round(360*t.h),g=Math.round(100*t.s),C=Math.round(100*t.l);return this._a==1?"hsl("+I+", "+g+"%, "+C+"%)":"hsla("+I+", "+g+"%, "+C+"%, "+this._roundA+")"},toHex:function(t){return O_(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(I,g,C,i,e){var A=[YA(Math.round(I).toString(16)),YA(Math.round(g).toString(16)),YA(Math.round(C).toString(16)),YA(Gtg(i))];return e&&A[0].charAt(0)==A[0].charAt(1)&&A[1].charAt(0)==A[1].charAt(1)&&A[2].charAt(0)==A[2].charAt(1)&&A[3].charAt(0)==A[3].charAt(1)?A[0].charAt(0)+A[1].charAt(0)+A[2].charAt(0)+A[3].charAt(0):A.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*KC(this._r,255))+"%",g:Math.round(100*KC(this._g,255))+"%",b:Math.round(100*KC(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*KC(this._r,255))+"%, "+Math.round(100*KC(this._g,255))+"%, "+Math.round(100*KC(this._b,255))+"%)":"rgba("+Math.round(100*KC(this._r,255))+"%, "+Math.round(100*KC(this._g,255))+"%, "+Math.round(100*KC(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(k0g[O_(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var I="#"+U_(this._r,this._g,this._b,this._a),g=I,C=this._gradientType?"GradientType = 1, ":"";if(t){var i=Qg(t);g="#"+U_(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+C+"startColorstr="+I+",endColorstr="+g+")"},toString:function(t){var I=!!t;t=t||this._format;var g=!1,C=this._a<1&&this._a>=0;return I||!C||t!=="hex"&&t!=="hex6"&&t!=="hex3"&&t!=="hex4"&&t!=="hex8"&&t!=="name"?(t==="rgb"&&(g=this.toRgbString()),t==="prgb"&&(g=this.toPercentageRgbString()),t!=="hex"&&t!=="hex6"||(g=this.toHexString()),t==="hex3"&&(g=this.toHexString(!0)),t==="hex4"&&(g=this.toHex8String(!0)),t==="hex8"&&(g=this.toHex8String()),t==="name"&&(g=this.toName()),t==="hsl"&&(g=this.toHslString()),t==="hsv"&&(g=this.toHsvString()),g||this.toHexString()):t==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return Qg(this.toString())},_applyModification:function(t,I){var g=t.apply(null,[this].concat([].slice.call(I)));return this._r=g._r,this._g=g._g,this._b=g._b,this.setAlpha(g._a),this},lighten:function(){return this._applyModification(R0g,arguments)},brighten:function(){return this._applyModification(f0g,arguments)},darken:function(){return this._applyModification(H0g,arguments)},desaturate:function(){return this._applyModification(N0g,arguments)},saturate:function(){return this._applyModification(V0g,arguments)},greyscale:function(){return this._applyModification(M0g,arguments)},spin:function(){return this._applyModification(X0g,arguments)},_applyCombination:function(t,I){return t.apply(null,[this].concat([].slice.call(I)))},analogous:function(){return this._applyCombination(K0g,arguments)},complement:function(){return this._applyCombination(S0g,arguments)},monochromatic:function(){return this._applyCombination(F0g,arguments)},splitcomplement:function(){return this._applyCombination(D0g,arguments)},triad:function(){return this._applyCombination(E_,[3])},tetrad:function(){return this._applyCombination(E_,[4])}},Qg.fromRatio=function(t,I){if(AV(t)=="object"){var g={};for(var C in t)t.hasOwnProperty(C)&&(g[C]=C==="a"?t[C]:Cm(t[C]));t=g}return Qg(t,I)},Qg.equals=function(t,I){return!(!t||!I)&&Qg(t).toRgbString()==Qg(I).toRgbString()},Qg.random=function(){return Qg.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Qg.mix=function(t,I,g){g=g===0?0:g||50;var C=Qg(t).toRgb(),i=Qg(I).toRgb(),e=g/100;return Qg({r:(i.r-C.r)*e+C.r,g:(i.g-C.g)*e+C.g,b:(i.b-C.b)*e+C.b,a:(i.a-C.a)*e+C.a})},Qg.readability=function(t,I){var g=Qg(t),C=Qg(I);return(Math.max(g.getLuminance(),C.getLuminance())+.05)/(Math.min(g.getLuminance(),C.getLuminance())+.05)},Qg.isReadable=function(t,I,g){var C,i,e=Qg.readability(t,I);switch(i=!1,(C=function(A){var s,l;return s=((A=A||{level:"AA",size:"small"}).level||"AA").toUpperCase(),l=(A.size||"small").toLowerCase(),s!=="AA"&&s!=="AAA"&&(s="AA"),l!=="small"&&l!=="large"&&(l="small"),{level:s,size:l}}(g)).level+C.size){case"AAsmall":case"AAAlarge":i=e>=4.5;break;case"AAlarge":i=e>=3;break;case"AAAsmall":i=e>=7}return i},Qg.mostReadable=function(t,I,g){var C,i,e,A,s=null,l=0;i=(g=g||{}).includeFallbackColors,e=g.level,A=g.size;for(var n=0;n<I.length;n++)(C=Qg.readability(t,I[n]))>l&&(l=C,s=Qg(I[n]));return Qg.isReadable(t,s,{level:e,size:A})||!i?s:(g.includeFallbackColors=!1,Qg.mostReadable(t,["#fff","#000"],g))};var nD=Qg.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k0g=Qg.hexNames=function(t){var I={};for(var g in t)t.hasOwnProperty(g)&&(I[t[g]]=g);return I}(nD);function Ztg(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function KC(t,I){(function(C){return typeof C=="string"&&C.indexOf(".")!=-1&&parseFloat(C)===1})(t)&&(t="100%");var g=function(C){return typeof C=="string"&&C.indexOf("%")!=-1}(t);return t=Math.min(I,Math.max(0,parseFloat(t))),g&&(t=parseInt(t*I,10)/100),Math.abs(t-I)<1e-6?1:t%I/parseFloat(I)}function qV(t){return Math.min(1,Math.max(0,t))}function qi(t){return parseInt(t,16)}function YA(t){return t.length==1?"0"+t:""+t}function Cm(t){return t<=1&&(t=100*t+"%"),t}function Gtg(t){return Math.round(255*parseFloat(t)).toString(16)}function P_(t){return qi(t)/255}var Ln,zY,JY,nA=(zY="[\\s|\\(]+("+(Ln="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Ln+")[,|\\s]+("+Ln+")\\s*\\)?",JY="[\\s|\\(]+("+Ln+")[,|\\s]+("+Ln+")[,|\\s]+("+Ln+")[,|\\s]+("+Ln+")\\s*\\)?",{CSS_UNIT:new RegExp(Ln),rgb:new RegExp("rgb"+zY),rgba:new RegExp("rgba"+JY),hsl:new RegExp("hsl"+zY),hsla:new RegExp("hsla"+JY),hsv:new RegExp("hsv"+zY),hsva:new RegExp("hsva"+JY),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Il(t){return!!nA.CSS_UNIT.exec(t)}function z0g(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return __(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return __(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function __(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function wtg(t){for(var I,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=new Uint8Array(t),i=C.byteLength,e=i%3,A=i-e,s="",l=0;l<A;l+=3)s+=g[(16515072&(I=C[l]<<16|C[l+1]<<8|C[l+2]))>>18]+g[(258048&I)>>12]+g[(4032&I)>>6]+g[63&I];return e===1?s+=g[(252&(I=C[A]))>>2]+g[(3&I)<<4]+"==":e===2&&(s+=g[(64512&(I=C[A]<<8|C[A+1]))>>10]+g[(1008&I)>>4]+g[(15&I)<<2]+"="),s}function GX(t){return t.substr(2+(~-t.lastIndexOf(".")>>>0))}function Mr(t,I){if(!t)return t;var g="";if(t.constructor===Array)for(var C=0;C<t.length;C++)g+=I(t[C],C);else g+=I(t,0);return g}function U(t,I){if(!t)return t;var g,C=z0g(I);try{for(C.s();!(g=C.n()).done;)if(!(t=t[g.value]))return t}catch(i){C.e(i)}finally{C.f()}return t}function b0(t){return t?Math.round(t/6e4):0}function sV(t){var I={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.replace(/[&<>"']/g,function(g){return I[g]})}function aD(t){var I="";switch(t.toLowerCase()){case"jpg":case"jpeg":I="image/jpeg";break;case"png":I="image/png";break;case"gif":I="image/gif";break;case"emf":I="image/x-emf";break;case"wmf":I="image/x-wmf";break;case"svg":I="image/svg+xml";break;case"mp4":I="video/mp4";break;case"webm":I="video/webm";break;case"ogg":I="video/ogg";break;case"avi":I="video/avi";break;case"mpg":I="video/mpg";break;case"wmv":I="video/wmv";break;case"mp3":I="audio/mpeg";break;case"wav":I="audio/wav";break;case"tif":case"tiff":I="image/tiff"}return I}function J0g(t){return/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(t)}function Rr(t){for(var I=t.toString(16);I.length<2;)I="0"+I;return I}function ptg(t){if(typeof DOMParser>"u")return t.replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim()!=="";var I=new DOMParser().parseFromString(t,"text/html");return(I.body.textContent||I.body.innerText).trim()!==""}function Dt(t){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4;return parseFloat(t.toFixed(I))}function oD(t,I,g,C){var i,e;if(g)e=g;else{var A=U(I.slideContent,["p:sld","p:clrMapOvr","a:overrideClrMapping","attrs"]);e=A||(A=U(I.slideLayoutContent,["p:sldLayout","p:clrMapOvr","a:overrideClrMapping","attrs"]))||U(I.slideMasterContent,["p:sldMaster","p:clrMap","attrs"])}var s=t.substr(2);if(s==="phClr"&&C)i=C;else{if(e)switch(s){case"tx1":case"tx2":case"bg1":case"bg2":t="a:"+e[s]}else switch(s){case"tx1":t="a:dk1";break;case"tx2":t="a:dk2";break;case"bg1":t="a:lt1";break;case"bg2":t="a:lt2"}var l=U(I.themeContent,["a:theme","a:themeElements","a:clrScheme",t]);!(i=U(l,["a:srgbClr","attrs","val"]))&&l&&(i=U(l,["a:sysClr","attrs","lastClr"]))}return i}function Ns(t,I,g){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],i=U(t,["p:spPr","a:ln"]),e=!!U(i,["a:grpFill"]);if((!i||e)&&C&&C.length)for(var A=C.length-1;A>=0;A--){var s=U(C[A],["p:grpSpPr","a:ln"]);if(s){i=s;break}}if(!i){var l=U(t,["p:style","a:lnRef"]);if(l){var n=U(l,["attrs","idx"]);i=g.themeContent["a:theme"]["a:themeElements"]["a:fmtScheme"]["a:lnStyleLst"]["a:ln"][Number(n)-1]}}i||(i=t);var a=U(i,["a:noFill"]),d=U(i,["attrs","w"]),o=!!(d!==void 0||U(i,["a:prstDash"])||U(i,["a:solidFill"])||U(i,["a:gradFill"])||U(i,["a:pattFill"])),c=0;!a&&o&&(c=parseInt(d)/12700,(!Number.isFinite(c)||c<=0)&&(c=1));var r=U(i,["a:solidFill","a:srgbClr","attrs","val"]);if(!r){var h=U(i,["a:solidFill","a:schemeClr"]),b="a:"+U(h,["attrs","val"]);r=oD(b,g)}if(!r){var u=U(t,["p:style","a:lnRef","a:schemeClr"]),m="a:"+U(u,["attrs","val"]);if(r=oD(m,g)){var Z=U(u,["a:shade","attrs","val"]);if(Z){Z=parseInt(Z)/1e5;var p=Qg("#"+r).toHsl();r=Qg({h:p.h,s:p.s,l:p.l*Z,a:p.a}).toHex()}}}r=r?"#".concat(r):"#000000";var Y=U(i,["a:prstDash","attrs","val"]),R="solid",X="0";switch(Y){case"solid":R="solid",X="0";break;case"dash":R="dashed",X="5";break;case"dashDot":R="dashed",X="5, 5, 1, 5";break;case"dot":R="dotted",X="1, 5";break;case"lgDash":R="dashed",X="10, 5";break;case"lgDashDotDot":R="dotted",X="10, 5, 1, 5, 1, 5";break;case"sysDash":R="dashed",X="5, 2";break;case"sysDashDot":R="dotted",X="5, 2, 1, 5";break;case"sysDashDotDot":R="dotted",X="5, 2, 1, 5, 1, 5";break;case"sysDot":R="dotted",X="2, 5"}return{borderColor:r,borderWidth:c,borderType:R,strokeDasharray:X}}function wX(t,I,g){return g<0&&(g+=6),g>=6&&(g-=6),g<1?(I-t)*g+t:g<3?I:g<4?(I-t)*(4-g)+t:t}function Btg(t,I,g){var C=Qg(t).toHsl();I>=1&&(I=1);var i=C.l*I+(1-I);return g?Qg({h:C.h,s:C.s,l:i,a:C.a}).toHex8():Qg({h:C.h,s:C.s,l:i,a:C.a}).toHex()}function q_(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return $_(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return $_(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function $_(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function ps(t){var I="";return t["a:noFill"]&&(I="NO_FILL"),t["a:solidFill"]&&(I="SOLID_FILL"),t["a:gradFill"]&&(I="GRADIENT_FILL"),t["a:pattFill"]&&(I="PATTERN_FILL"),t["a:blipFill"]&&(I="PIC_FILL"),t["a:grpFill"]&&(I="GROUP_FILL"),I}function $V(t,I,g){return cD.apply(this,arguments)}function cD(){return cD=RC(rI.mark(function t(I,g,C){var i,e,A,s,l,n,a;return rI.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(g){d.next=2;break}return d.abrupt("return","");case 2:if(e=U(g,["a:blip","attrs","r:embed"]),I==="slideBg"||I==="slide"?A=U(C,["slideResObj",e,"target"]):I==="slideLayoutBg"?A=U(C,["layoutResObj",e,"target"]):I==="slideMasterBg"?A=U(C,["masterResObj",e,"target"]):I==="themeBg"?A=U(C,["themeResObj",e,"target"]):I==="diagramBg"&&(A=U(C,["diagramResObj",e,"target"])),A){d.next=6;break}return d.abrupt("return",A);case 6:if(i=U(C,["loaded-images",A])){d.next=20;break}if(A=sV(A),(s=A.split(".").pop())!=="xml"){d.next=12;break}return d.abrupt("return","");case 12:return d.next=14,C.zip.file(A).async("arraybuffer");case 14:l=d.sent,n=aD(s),i="data:".concat(n,";base64,").concat(wtg(l)),(a=C["loaded-images"]||{})[A]=i,C["loaded-images"]=a;case 20:return d.abrupt("return",i);case 21:case"end":return d.stop()}},t)})),cD.apply(this,arguments)}function Wtg(t){var I=U(t["a:blip"],["a:alphaModFix","attrs"]),g=1;return I&&I.amt&&I.amt!==""&&(g=parseInt(I.amt)/1e5),g}function L0g(t){if(!t)return null;var I=t["a:blip"];if(!I)return null;var g={},C=I["a:extLst"];if(C&&C["a:ext"]){var i,e=q_(Array.isArray(C["a:ext"])?C["a:ext"]:[C["a:ext"]]);try{for(e.s();!(i=e.n()).done;){var A=i.value;if(A["a14:imgProps"]&&A["a14:imgProps"]["a14:imgLayer"]){var s=A["a14:imgProps"]["a14:imgLayer"]["a14:imgEffect"];if(s){var l,n=q_(Array.isArray(s)?s:[s]);try{for(n.s();!(l=n.n()).done;){var a=l.value;if(a["a14:saturation"]){var d=U(a,["a14:saturation","attrs","sat"]);d&&(g.saturation=parseInt(d)/1e5)}if(a["a14:brightnessContrast"]){var o=U(a,["a14:brightnessContrast","attrs","bright"]),c=U(a,["a14:brightnessContrast","attrs","contrast"]);o&&(g.brightness=parseInt(o)/1e5),c&&(g.contrast=parseInt(c)/1e5)}if(a["a14:sharpenSoften"]){var r=U(a,["a14:sharpenSoften","attrs","amount"]);if(r){var h=parseInt(r)/1e5;h>0?g.sharpen=h:g.soften=Math.abs(h)}}if(a["a14:colorTemperature"]){var b=U(a,["a14:colorTemperature","attrs","colorTemp"]);b&&(g.colorTemperature=parseInt(b))}}}catch(u){n.e(u)}finally{n.f()}}}}}catch(u){e.e(u)}finally{e.f()}}return Object.keys(g).length>0?g:null}function Mu(t,I,g){return ytg.apply(this,arguments)}function ytg(){return(ytg=RC(rI.mark(function t(I,g,C){var i,e,A,s;return rI.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,$V(g,I["a:blipFill"],C);case 2:return i=l.sent,e=I["a:blipFill"]["a:blip"],A=U(e,["a:alphaModFix","attrs"]),s=1,A&&A.amt&&A.amt!==""&&(s=parseInt(A.amt)/1e5),l.abrupt("return",{picBase64:i,opacity:s});case 8:case"end":return l.stop()}},t)}))).apply(this,arguments)}function M9(t,I){for(var g=t["a:gsLst"]["a:gs"],C=[],i=0;i<g.length;i++){var e=IC(g[i],void 0,void 0,I),A=U(g[i],["attrs","pos"]);C[i]={pos:A?A/1e3+"%":"",color:e}}var s=t["a:lin"],l=0,n="line";if(s)l=b0(s.attrs.ang);else{var a=t["a:path"];a&&a.attrs&&a.attrs.path&&(n=a.attrs.path)}return{rot:l,path:n,colors:C.sort(function(d,o){return parseInt(d.pos)-parseInt(o.pos)})}}function zo(t,I){if(!t)return null;var g=t["a:pattFill"];if(!g)return null;var C=U(g,["attrs","prst"]),i=g["a:fgClr"],e=g["a:bgClr"],A="#000000",s="#FFFFFF";return i&&(A=IC(i,void 0,void 0,I)),e&&(s=IC(e,void 0,void 0,I)),{type:C,foregroundColor:A,backgroundColor:s}}function fr(t,I,g,C){if(t){for(var i=t["a:gradFill"],e=i["a:gsLst"]["a:gs"],A=[],s=0;s<e.length;s++){var l=IC(e[s],g["p:sldMaster"]["p:clrMap"].attrs,I,C),n=U(e[s],["attrs","pos"]);A[s]={pos:n?n/1e3+"%":"",color:l}}var a=i["a:lin"],d=0,o="line";if(a)d=b0(a.attrs.ang)+0;else{var c=i["a:path"];c&&c.attrs&&c.attrs.path&&(o=c.attrs.path)}return{rot:d,path:o,colors:A.sort(function(r,h){return parseInt(r.pos)-parseInt(h.pos)})}}return I?I.indexOf("#")===-1?"#".concat(I):I:null}function v0g(t){return dD.apply(this,arguments)}function dD(){return dD=RC(rI.mark(function t(I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig,ng,ag,lg,cg,dg,hg,rg,Wg,Gg,Sg,Kg,kg;return rI.wrap(function(yg){for(;;)switch(yg.prev=yg.next){case 0:if(g=I.slideContent,C=I.slideLayoutContent,i=I.slideMasterContent,e=U(g,["p:sld","p:cSld","p:bg","p:bgPr"]),A=U(g,["p:sld","p:cSld","p:bg","p:bgRef"]),s="#fff",l="color",!e){yg.next=32;break}if((n=ps(e))!=="SOLID_FILL"){yg.next=17;break}a=e["a:solidFill"],(o=U(g,["p:sld","p:clrMapOvr","a:overrideClrMapping","attrs"]))?d=o:(c=U(C,["p:sldLayout","p:clrMapOvr","a:overrideClrMapping","attrs"]),d=c||U(i,["p:sldMaster","p:clrMap","attrs"])),r=IC(a,d,void 0,I),s=r,yg.next=30;break;case 17:if(n!=="GRADIENT_FILL"){yg.next=22;break}typeof(h=fr(e,void 0,i,I))=="string"?s=h:h&&(s=h,l="gradient"),yg.next=30;break;case 22:if(n!=="PIC_FILL"){yg.next=29;break}return yg.next=25,Mu(e,"slideBg",I);case 25:s=yg.sent,l="image",yg.next=30;break;case 29:n==="PATTERN_FILL"&&(b=zo(e,I))&&(s=b,l="pattern");case 30:yg.next=157;break;case 32:if(!A){yg.next=40;break}(m=U(g,["p:sld","p:clrMapOvr","a:overrideClrMapping","attrs"]))?u=m:(Z=U(C,["p:sldLayout","p:clrMapOvr","a:overrideClrMapping","attrs"]),u=Z||U(i,["p:sldMaster","p:clrMap","attrs"])),p=IC(A,u,void 0,I),(Y=Number(A.attrs.idx))>1e3&&(R=Y-1e3,X=I.themeContent["a:theme"]["a:themeElements"]["a:fmtScheme"]["a:bgFillStyleLst"],H=[],Object.keys(X).forEach(function(Vg){var pg=X[Vg];if(Vg!=="attrs")if(pg.constructor===Array)for(var Hg=0;Hg<pg.length;Hg++){var Jg={};Jg[Vg]=pg[Hg],pg[Hg].attrs&&(Jg.idex=pg[Hg].attrs.order,Jg.attrs={order:pg[Hg].attrs.order}),H.push(Jg)}else{var zg={};zg[Vg]=pg,pg.attrs&&(zg.idex=pg.attrs.order,zg.attrs={order:pg.attrs.order}),H.push(zg)}}),(S=H.slice(0)).sort(function(Vg,pg){return Vg.idex-pg.idex}),z=S[R-1],(v=ps(z))==="SOLID_FILL"?(K=z["a:solidFill"],V=IC(K,u,void 0,I),s=V):v==="GRADIENT_FILL"&&(typeof(N=fr(z,p,i,I))=="string"?s=N:N&&(s=N,l="gradient"))),yg.next=157;break;case 40:if(e=U(C,["p:sldLayout","p:cSld","p:bg","p:bgPr"]),A=U(C,["p:sldLayout","p:cSld","p:bg","p:bgRef"]),G=U(C,["p:sldLayout","p:clrMapOvr","a:overrideClrMapping","attrs"]),B=G||U(i,["p:sldMaster","p:clrMap","attrs"]),!e){yg.next=67;break}if((w=ps(e))!=="SOLID_FILL"){yg.next=52;break}W=e["a:solidFill"],y=IC(W,B,void 0,I),s=y,yg.next=65;break;case 52:if(w!=="GRADIENT_FILL"){yg.next=57;break}typeof(f=fr(e,void 0,i,I))=="string"?s=f:f&&(s=f,l="gradient"),yg.next=65;break;case 57:if(w!=="PIC_FILL"){yg.next=64;break}return yg.next=60,Mu(e,"slideLayoutBg",I);case 60:s=yg.sent,l="image",yg.next=65;break;case 64:w==="PATTERN_FILL"&&(D=zo(e,I))&&(s=D,l="pattern");case 65:yg.next=157;break;case 67:if(!A){yg.next=100;break}if(F=IC(A,B,void 0,I),!((T=Number(A.attrs.idx))>1e3)){yg.next=98;break}if(Q=T-1e3,P=I.themeContent["a:theme"]["a:themeElements"]["a:fmtScheme"]["a:bgFillStyleLst"],L=[],Object.keys(P).forEach(function(Vg){var pg=P[Vg];if(Vg!=="attrs")if(pg.constructor===Array)for(var Hg=0;Hg<pg.length;Hg++){var Jg={};Jg[Vg]=pg[Hg],pg[Hg].attrs&&(Jg.idex=pg[Hg].attrs.order,Jg.attrs={order:pg[Hg].attrs.order}),L.push(Jg)}else{var zg={};zg[Vg]=pg,pg.attrs&&(zg.idex=pg.attrs.order,zg.attrs={order:pg.attrs.order}),L.push(zg)}}),(E=L.slice(0)).sort(function(Vg,pg){return Vg.idex-pg.idex}),J=E[Q-1],(k=ps(J))!=="SOLID_FILL"){yg.next=85;break}j=J["a:solidFill"],q=IC(j,B,void 0,I),s=q,yg.next=98;break;case 85:if(k!=="GRADIENT_FILL"){yg.next=90;break}typeof(tg=fr(J,F,i,I))=="string"?s=tg:tg&&(s=tg,l="gradient"),yg.next=98;break;case 90:if(k!=="PIC_FILL"){yg.next=97;break}return yg.next=93,Mu(J,"themeBg",I);case 93:s=yg.sent,l="image",yg.next=98;break;case 97:k==="PATTERN_FILL"&&(Cg=zo(J,I))&&(s=Cg,l="pattern");case 98:yg.next=157;break;case 100:if(e=U(i,["p:sldMaster","p:cSld","p:bg","p:bgPr"]),A=U(i,["p:sldMaster","p:cSld","p:bg","p:bgRef"]),x=U(i,["p:sldMaster","p:clrMap","attrs"]),!e){yg.next=126;break}if((sg=ps(e))!=="SOLID_FILL"){yg.next=111;break}Ag=e["a:solidFill"],O=IC(Ag,x,void 0,I),s=O,yg.next=124;break;case 111:if(sg!=="GRADIENT_FILL"){yg.next=116;break}typeof(_=fr(e,void 0,i,I))=="string"?s=_:_&&(s=_,l="gradient"),yg.next=124;break;case 116:if(sg!=="PIC_FILL"){yg.next=123;break}return yg.next=119,Mu(e,"slideMasterBg",I);case 119:s=yg.sent,l="image",yg.next=124;break;case 123:sg==="PATTERN_FILL"&&(Ig=zo(e,I))&&(s=Ig,l="pattern");case 124:yg.next=157;break;case 126:if(!A){yg.next=157;break}if(ng=IC(A,x,void 0,I),!((ag=Number(A.attrs.idx))>1e3)){yg.next=157;break}if(lg=ag-1e3,cg=I.themeContent["a:theme"]["a:themeElements"]["a:fmtScheme"]["a:bgFillStyleLst"],dg=[],Object.keys(cg).forEach(function(Vg){var pg=cg[Vg];if(Vg!=="attrs")if(pg.constructor===Array)for(var Hg=0;Hg<pg.length;Hg++){var Jg={};Jg[Vg]=pg[Hg],pg[Hg].attrs&&(Jg.idex=pg[Hg].attrs.order,Jg.attrs={order:pg[Hg].attrs.order}),dg.push(Jg)}else{var zg={};zg[Vg]=pg,pg.attrs&&(zg.idex=pg.attrs.order,zg.attrs={order:pg.attrs.order}),dg.push(zg)}}),(hg=dg.slice(0)).sort(function(Vg,pg){return Vg.idex-pg.idex}),rg=hg[lg-1],(Wg=ps(rg))!=="SOLID_FILL"){yg.next=144;break}Gg=rg["a:solidFill"],Sg=IC(Gg,B,void 0,I),s=Sg,yg.next=157;break;case 144:if(Wg!=="GRADIENT_FILL"){yg.next=149;break}typeof(Kg=fr(rg,ng,i,I))=="string"?s=Kg:Kg&&(s=Kg,l="gradient"),yg.next=157;break;case 149:if(Wg!=="PIC_FILL"){yg.next=156;break}return yg.next=152,Mu(rg,"themeBg",I);case 152:s=yg.sent,l="image",yg.next=157;break;case 156:Wg==="PATTERN_FILL"&&(kg=zo(rg,I))&&(s=kg,l="pattern");case 157:return yg.abrupt("return",{type:l,value:s});case 158:case"end":return yg.stop()}},t)})),dD.apply(this,arguments)}function Ytg(t,I,g,C,i){return rD.apply(this,arguments)}function rD(){return rD=RC(rI.mark(function t(I,g,C,i,e){var A,s,l,n,a,d,o,c,r,h,b,u=arguments;return rI.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(A=u.length>5&&u[5]!==void 0?u[5]:[],s=ps(U(I,["p:spPr"])),l="color",n="",s!=="NO_FILL"){m.next=8;break}return m.abrupt("return",C?"none":"");case 8:if(s!=="SOLID_FILL"){m.next=14;break}a=I["p:spPr"]["a:solidFill"],n=IC(a,void 0,void 0,i),l="color",m.next=38;break;case 14:if(s!=="GRADIENT_FILL"){m.next=20;break}d=I["p:spPr"]["a:gradFill"],n=M9(d,i),l="gradient",m.next=38;break;case 20:if(s!=="PIC_FILL"){m.next=30;break}return o=I["p:spPr"]["a:blipFill"],m.next=24,$V(e,o,i);case 24:c=m.sent,r=Wtg(o),n={picBase64:c,opacity:r},l="image",m.next=38;break;case 30:if(s!=="PATTERN_FILL"){m.next=36;break}h=I["p:spPr"]["a:pattFill"],n=zo({"a:pattFill":h},i),l="pattern",m.next=38;break;case 36:if(s!=="GROUP_FILL"){m.next=38;break}return m.abrupt("return",T0g(A,i,e));case 38:if(n||(b=U(I,["p:style","a:fillRef"]),n=IC(b,void 0,void 0,i),l="color"),n||!g||s!=="NO_FILL"){m.next=41;break}return m.abrupt("return",C?"none":"");case 41:return m.abrupt("return",{type:l,value:n});case 42:case"end":return m.stop()}},t)})),rD.apply(this,arguments)}function T0g(t,I,g){return hD.apply(this,arguments)}function hD(){return hD=RC(rI.mark(function t(I,g,C){var i,e,A,s,l,n,a,d,o,c,r,h,b;return rI.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:i=I.length-1;case 1:if(!(i>=0)){u.next=39;break}if((e=I[i])&&e["p:grpSpPr"]){u.next=5;break}return u.abrupt("continue",36);case 5:if(A=e["p:grpSpPr"],(s=ps(A))!=="SOLID_FILL"){u.next=14;break}if(l=A["a:solidFill"],!(n=IC(l,void 0,void 0,g))){u.next=12;break}return u.abrupt("return",{type:"color",value:n});case 12:u.next=36;break;case 14:if(s!=="GRADIENT_FILL"){u.next=21;break}if(a=A["a:gradFill"],!(d=M9(a,g))){u.next=19;break}return u.abrupt("return",{type:"gradient",value:d});case 19:u.next=36;break;case 21:if(s!=="PIC_FILL"){u.next=31;break}return o=A["a:blipFill"],u.next=25,$V(C,o,g);case 25:if(c=u.sent,r=Wtg(o),!c){u.next=29;break}return u.abrupt("return",{type:"image",value:{picBase64:c,opacity:r}});case 29:u.next=36;break;case 31:if(s!=="PATTERN_FILL"){u.next=36;break}if(h=A["a:pattFill"],!(b=zo({"a:pattFill":h},g))){u.next=36;break}return u.abrupt("return",{type:"pattern",value:b});case 36:i--,u.next=1;break;case 39:return u.abrupt("return",null);case 40:case"end":return u.stop()}},t)})),hD.apply(this,arguments)}function IC(t,I,g,C){if(!t)return"";var i,e,A,s="";if(t["a:srgbClr"])s=U(i=t["a:srgbClr"],["attrs","val"]);else if(t["a:schemeClr"])s=oD("a:"+U(i=t["a:schemeClr"],["attrs","val"]),C,I,g)||"";else if(t["a:scrgbClr"]){var l=(i=t["a:scrgbClr"]).attrs,n=l.r.indexOf("%")!==-1?l.r.split("%").shift():l.r,a=l.g.indexOf("%")!==-1?l.g.split("%").shift():l.g,d=l.b.indexOf("%")!==-1?l.b.split("%").shift():l.b;s=Rr(Number(n)/100*255)+Rr(Number(a)/100*255)+Rr(Number(d)/100*255)}else if(t["a:prstClr"]){var o=U(i=t["a:prstClr"],["attrs","val"]);(A=["white","AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGray","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateGray","LightSlateGrey","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","RebeccaPurple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","SlateGrey","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","Wheat","White","WhiteSmoke","Yellow","YellowGreen"].indexOf(o))!==-1&&(e=["ffffff","f0f8ff","faebd7","00ffff","7fffd4","f0ffff","f5f5dc","ffe4c4","000000","ffebcd","0000ff","8a2be2","a52a2a","deb887","5f9ea0","7fff00","d2691e","ff7f50","6495ed","fff8dc","dc143c","00ffff","00008b","008b8b","b8860b","a9a9a9","a9a9a9","006400","bdb76b","8b008b","556b2f","ff8c00","9932cc","8b0000","e9967a","8fbc8f","483d8b","2f4f4f","2f4f4f","00ced1","9400d3","ff1493","00bfff","696969","696969","1e90ff","b22222","fffaf0","228b22","ff00ff","dcdcdc","f8f8ff","ffd700","daa520","808080","808080","008000","adff2f","f0fff0","ff69b4","cd5c5c","4b0082","fffff0","f0e68c","e6e6fa","fff0f5","7cfc00","fffacd","add8e6","f08080","e0ffff","fafad2","d3d3d3","d3d3d3","90ee90","ffb6c1","ffa07a","20b2aa","87cefa","778899","778899","b0c4de","ffffe0","00ff00","32cd32","faf0e6","ff00ff","800000","66cdaa","0000cd","ba55d3","9370db","3cb371","7b68ee","00fa9a","48d1cc","c71585","191970","f5fffa","ffe4e1","ffe4b5","ffdead","000080","fdf5e6","808000","6b8e23","ffa500","ff4500","da70d6","eee8aa","98fb98","afeeee","db7093","ffefd5","ffdab9","cd853f","ffc0cb","dda0dd","b0e0e6","800080","663399","ff0000","bc8f8f","4169e1","8b4513","fa8072","f4a460","2e8b57","fff5ee","a0522d","c0c0c0","87ceeb","6a5acd","708090","708090","fffafa","00ff7f","4682b4","d2b48c","008080","d8bfd8","ff6347","40e0d0","ee82ee","f5deb3","ffffff","f5f5f5","ffff00","9acd32"][A]),s=e}else if(t["a:hslClr"]){var c=(i=t["a:hslClr"]).attrs,r=function(S,z,v){var K,V=2*v-(K=v<=.5?v*(z+1):v+z-v*z);return{r:255*wX(V,K,2+(S/=60)),g:255*wX(V,K,S),b:255*wX(V,K,S-2)}}(Number(c.hue)/1e5,Number(c.sat.indexOf("%")!==-1?c.sat.split("%").shift():c.sat)/100,Number(c.lum.indexOf("%")!==-1?c.lum.split("%").shift():c.lum)/100);s=Rr(r.r)+Rr(r.g)+Rr(r.b)}else if(t["a:sysClr"]){var h=U(i=t["a:sysClr"],["attrs","lastClr"]);h&&(s=h)}var b=!1,u=parseInt(U(i,["a:alpha","attrs","val"]))/1e5;if(!isNaN(u)){var m=Qg(s);m.setAlpha(u),s=m.toHex8(),b=!0}var Z=parseInt(U(i,["a:hueMod","attrs","val"]))/1e5;isNaN(Z)||(s=function(S,z,v){var K=Qg(S).toHsl(),V=K.h*z;return V>=360&&(V-=360),v?Qg({h:V,s:K.s,l:K.l,a:K.a}).toHex8():Qg({h:V,s:K.s,l:K.l,a:K.a}).toHex()}(s,Z,b));var p=parseInt(U(i,["a:lumMod","attrs","val"]))/1e5;isNaN(p)||(s=function(S,z,v){var K=Qg(S).toHsl(),V=K.l*z;return V>=1&&(V=1),v?Qg({h:K.h,s:K.s,l:V,a:K.a}).toHex8():Qg({h:K.h,s:K.s,l:V,a:K.a}).toHex()}(s,p,b));var Y=parseInt(U(i,["a:lumOff","attrs","val"]))/1e5;isNaN(Y)||(s=function(S,z,v){var K=Qg(S).toHsl(),V=z+K.l;return V>=1?v?Qg({h:K.h,s:K.s,l:1,a:K.a}).toHex8():Qg({h:K.h,s:K.s,l:1,a:K.a}).toHex():v?Qg({h:K.h,s:K.s,l:V,a:K.a}).toHex8():Qg({h:K.h,s:K.s,l:V,a:K.a}).toHex()}(s,Y,b));var R=parseInt(U(i,["a:satMod","attrs","val"]))/1e5;isNaN(R)||(s=function(S,z,v){var K=Qg(S).toHsl(),V=K.s*z;return V>=1&&(V=1),v?Qg({h:K.h,s:V,l:K.l,a:K.a}).toHex8():Qg({h:K.h,s:V,l:K.l,a:K.a}).toHex()}(s,R,b));var X=parseInt(U(i,["a:shade","attrs","val"]))/1e5;isNaN(X)||(s=function(S,z,v){var K=Qg(S).toHsl();z>=1&&(z=1);var V=Math.min(K.l*z,1);return v?Qg({h:K.h,s:K.s,l:V,a:K.a}).toHex8():Qg({h:K.h,s:K.s,l:V,a:K.a}).toHex()}(s,X,b));var H=parseInt(U(i,["a:tint","attrs","val"]))/1e5;return isNaN(H)||(s=Btg(s,H,b)),s&&s.indexOf("#")===-1&&(s="#"+s),s}function x0g(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return gq(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return gq(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function gq(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function Si(t,I){t.constructor!==Array&&(t=[t]);var g,C=[],i=x0g(t);try{for(i.s();!(g=i.n()).done;){var e=g.value,A=U(e,["c:spPr","a:solidFill","a:schemeClr"]);A||(A=U(e,["c:spPr","a:ln","a:solidFill","a:schemeClr"])),A||(A=U(e,["c:marker","c:spPr","a:ln","a:solidFill","a:schemeClr"]));var s=U(A,["attrs","val"]);if(s){s=U(I.themeContent,["a:theme","a:themeElements","a:clrScheme","a:".concat(s),"a:srgbClr","attrs","val"]);var l=U(A,["a:tint","attrs","val"])/1e5;s&&!isNaN(l)&&(s=Btg(s,l))}else s=U(e,["c:spPr","a:solidFill","a:srgbClr","attrs","val"]);s&&(s="#"+s),C.push(s)}}catch(n){i.e(n)}finally{i.f()}return C}function mi(t){var I=[];if(!t)return I;if(t["c:xVal"]){var g=[];Mr(t["c:xVal"]["c:numRef"]["c:numCache"]["c:pt"],function(C){return g.push(parseFloat(C["c:v"])),""}),I.push(g),g=[],Mr(t["c:yVal"]["c:numRef"]["c:numCache"]["c:pt"],function(C){return g.push(parseFloat(C["c:v"])),""}),I.push(g)}else Mr(t,function(C,i){var e=[],A=U(C,["c:tx","c:strRef","c:strCache","c:pt","c:v"])||i,s={};return U(C,["c:cat","c:strRef","c:strCache","c:pt"])?Mr(C["c:cat"]["c:strRef"]["c:strCache"]["c:pt"],function(l){return s[l.attrs.idx]=l["c:v"],""}):U(C,["c:cat","c:numRef","c:numCache","c:pt"])&&Mr(C["c:cat"]["c:numRef"]["c:numCache"]["c:pt"],function(l){return s[l.attrs.idx]=l["c:v"],""}),U(C,["c:val","c:numRef","c:numCache","c:pt"])&&Mr(C["c:val"]["c:numRef"]["c:numCache"]["c:pt"],function(l){return e.push({x:l.attrs.idx,y:parseFloat(l["c:v"])}),""}),I.push({key:A,values:e,xlabels:s}),""});return I}function j0g(t,I){var g=null;for(var C in t)switch(C){case"c:lineChart":g={type:"lineChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),grouping:U(t[C],["c:grouping","attrs","val"]),marker:!!t[C]["c:marker"]};break;case"c:line3DChart":g={type:"line3DChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),grouping:U(t[C],["c:grouping","attrs","val"])};break;case"c:barChart":g={type:"barChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),grouping:U(t[C],["c:grouping","attrs","val"]),barDir:U(t[C],["c:barDir","attrs","val"])};break;case"c:bar3DChart":g={type:"bar3DChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),grouping:U(t[C],["c:grouping","attrs","val"]),barDir:U(t[C],["c:barDir","attrs","val"])};break;case"c:pieChart":g={type:"pieChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"]["c:dPt"],I)};break;case"c:pie3DChart":g={type:"pie3DChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"]["c:dPt"],I)};break;case"c:doughnutChart":g={type:"doughnutChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"]["c:dPt"],I),holeSize:U(t[C],["c:holeSize","attrs","val"])};break;case"c:areaChart":g={type:"areaChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),grouping:U(t[C],["c:grouping","attrs","val"])};break;case"c:area3DChart":g={type:"area3DChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),grouping:U(t[C],["c:grouping","attrs","val"])};break;case"c:scatterChart":g={type:"scatterChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),style:U(t[C],["c:scatterStyle","attrs","val"])};break;case"c:bubbleChart":g={type:"bubbleChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I)};break;case"c:radarChart":g={type:"radarChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I),style:U(t[C],["c:radarStyle","attrs","val"])};break;case"c:surfaceChart":g={type:"surfaceChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I)};break;case"c:surface3DChart":g={type:"surface3DChart",data:mi(t[C]["c:ser"]),colors:Si(t[C]["c:ser"],I)};break;case"c:stockChart":g={type:"stockChart",data:mi(t[C]["c:ser"]),colors:[]}}return g}function Q0g(t,I,g,C){var i=U(t,["a:pPr","attrs","algn"]);if(i||(i=U(I,["a:pPr","attrs","algn"])),!i)if(g==="title"||g==="ctrTitle"||g==="subTitle"){var e=1,A=U(I,["a:pPr","attrs","lvl"]);A&&(e=parseInt(A)+1);var s="a:lvl"+e+"pPr";(i=U(C,["slideLayoutTables","typeTable",g,"p:txBody","a:lstStyle",s,"attrs","algn"]))||(i=U(C,["slideMasterTables","typeTable",g,"p:txBody","a:lstStyle",s,"attrs","algn"])),i||(i=U(C,["slideMasterTextStyles","p:titleStyle",s,"attrs","algn"])),i||g!=="subTitle"||(i=U(C,["slideMasterTextStyles","p:bodyStyle",s,"attrs","algn"]))}else i=U(C,g==="body"?["slideMasterTextStyles","p:bodyStyle","a:lvl1pPr","attrs","algn"]:["slideMasterTables","typeTable",g,"p:txBody","a:lstStyle","a:lvl1pPr","attrs","algn"]);var l="left";if(i)switch(i){case"l":l="left";break;case"r":l="right";break;case"ctr":l="center";break;case"just":case"dist":l="justify";break;default:l="inherit"}return l}function O0g(t,I,g){var C=U(t,["p:txBody","a:bodyPr","attrs","anchor"]);return C||(C=U(I,["p:txBody","a:bodyPr","attrs","anchor"]))||(C=U(g,["p:txBody","a:bodyPr","attrs","anchor"]))||(C="t"),C==="ctr"?"mid":C==="b"?"down":"up"}function U0g(t,I,g){function C(s){if(!s)return null;if(s["a:noAutofit"])return{result:null};if(s["a:spAutoFit"])return{result:{type:"shape"}};if(s["a:normAutofit"]){var l=U(s["a:normAutofit"],["attrs","fontScale"]);return l?{result:{type:"text",fontScale:parseInt(l)/1e3}}:{result:{type:"text"}}}return null}var i=C(U(t,["p:txBody","a:bodyPr"]));if(i)return i.result;var e=C(U(I,["p:txBody","a:bodyPr"]));if(e)return e.result;var A=C(U(g,["p:txBody","a:bodyPr"]));return A?A.result:null}var wg=72/914400;function w0(t,I,g){var C;return t?C=t["a:off"].attrs:I?C=I["a:off"].attrs:g&&(C=g["a:off"].attrs),C?{top:Dt(parseInt(C.y)*wg),left:Dt(parseInt(C.x)*wg)}:{top:0,left:0}}function p0(t,I,g){var C;return t?C=t["a:ext"].attrs:I?C=I["a:ext"].attrs:g&&(C=g["a:ext"].attrs),C?{width:Dt(parseInt(C.cx)*wg),height:Dt(parseInt(C.cy)*wg)}:{width:0,height:0}}function E0g(t,I){return function(g){if(Array.isArray(g))return g}(t)||function(g,C){var i=g==null?null:typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(i!=null){var e,A,s=[],l=!0,n=!1;try{for(i=i.call(g);!(l=(e=i.next()).done)&&(s.push(e.value),!C||s.length!==C);l=!0);}catch(a){n=!0,A=a}finally{try{l||i.return==null||i.return()}finally{if(n)throw A}}return s}}(t,I)||kIg(t,I)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ntg(t,I){var g=IC(t,void 0,void 0,I),C=t.attrs,i=C.dir?parseInt(C.dir)/6e4:0,e=C.dist?parseInt(C.dist)*wg:0,A=C.blurRad?parseInt(C.blurRad)*wg:"",s=e*Math.sin(i*Math.PI/180);return{h:e*Math.cos(i*Math.PI/180),v:s,blur:A,color:g}}function Iq(t,I){var g=Object.keys(t);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(t);I&&(C=C.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),g.push.apply(g,C)}return g}function Is(t){for(var I=1;I<arguments.length;I++){var g=arguments[I]!=null?arguments[I]:{};I%2?Iq(Object(g),!0).forEach(function(C){h9(t,C,g[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(g)):Iq(Object(g)).forEach(function(C){Object.defineProperty(t,C,Object.getOwnPropertyDescriptor(g,C))})}return t}function Cq(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return tq(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return tq(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function tq(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function lV(t,I,g,C,i){if(!t)return"";var e,A="",s=U(I,["p:style","a:fontRef"]),l=t["a:p"],n=l.constructor===Array?l:[l],a=null,d=new Map,o=Cq(n);try{for(o.s();!(e=o.n()).done;){var c=e.value,r=c["a:r"],h=c["a:fld"],b=c["a:br"];r&&(r=r.constructor===Array?r:[r],h&&(h=h.constructor===Array?h:[h],r=r.concat(h)),b&&((b=b.constructor===Array?b:[b]).forEach(function(G){return G.type="br"}),b.length>1&&b.shift(),(r=r.concat(b)).sort(function(G,w){return!G.attrs||!w.attrs||G.attrs.order-w.attrs.order})));var u=Q0g(c,I,C,i),m=P0g(c,t,g,C,i);if(m){var Z=_0g(m);if(!a||a.key!==Z){a&&(A+="</".concat(a.tag,">")),A+="<".concat(m.tag,' style="list-style: none; padding-left: 0; margin: 0;">');var p=m.kind==="autoNum"?d.has(Z)?d.get(Z):m.startAt:null;a={key:Z,tag:m.tag,listInfo:m,counter:p}}var Y=$0g(a);a.listInfo.kind==="autoNum"&&d.set(a.key,a.counter);var R=q0g(a.listInfo),X=1.5*(m.lvl-1);A+='<li style="text-align: '.concat(u,"; margin-left: ").concat(X,'em;"><span style="').concat(R,'">').concat(Y,"</span>")}else a&&(A+="</".concat(a.tag,">"),a=null,d.clear()),A+='<p style="text-align: '.concat(u,';">');if(r){var H,S=null,z="",v=Cq(r);try{for(v.s();!(H=v.n()).done;){var K=Vtg(H.value,c,t,s,g,C,i);if(!S||S.styleText!==K.styleText||S.hasLink!==K.hasLink||K.hasLink){if(z){var V=z.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\s/g,"&nbsp;");A+='<span style="'.concat(S.styleText,'">').concat(V,"</span>"),z=""}if(K.hasLink){var N=K.text.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\s/g,"&nbsp;");A+='<span style="'.concat(K.styleText,'"><a href="').concat(K.linkURL,'" target="_blank">').concat(N,"</a></span>"),S=null}else S=K,z=K.text}else z+=K.text}}catch(G){v.e(G)}finally{v.f()}if(z&&S){var B=z.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\s/g,"&nbsp;");A+='<span style="'.concat(S.styleText,'">').concat(B,"</span>")}}else A+=gbg(c,I,t,s,g,C,i);A+=m?"</li>":"</p>"}}catch(G){o.e(G)}finally{o.f()}return a&&(A+="</".concat(a.tag,">")),A}function P0g(t,I,g,C,i){var e=t["a:pPr"];if(!e||e["a:buNone"])return null;var A=1,s=U(e,["attrs","lvl"]);s!==void 0&&(A=parseInt(s)+1);var l=Ru(e);if(l)return Is(Is({},l),{},{lvl:A});var n=Ru(U(I,["a:lstStyle","a:lvl".concat(A,"pPr")]));if(n)return Is(Is({},n),{},{lvl:A});var a=Ru(U(g,["p:txBody","a:lstStyle","a:lvl".concat(A,"pPr")]));if(a)return Is(Is({},a),{},{lvl:A});var d=i&&i.slideMasterTextStyles;if(d){var o=function(h,b){return b?h==="title"||h==="ctrTitle"?"p:titleStyle":h==="subTitle"?b["p:titleStyle"]?"p:titleStyle":"p:bodyStyle":h==="body"?"p:bodyStyle":"p:otherStyle":null}(C,d);if(o){var c=Ru(U(d,[o,"a:lvl".concat(A,"pPr")]));if(c)return Is(Is({},c),{},{lvl:A});var r=Ru(U(d,[o,"a:lvl1pPr"]));if(r)return Is(Is({},r),{},{lvl:A})}}return null}function Ru(t){if(!t||t["a:buNone"])return null;if(t["a:buChar"])return{kind:"char",tag:"ul",char:U(t,["a:buChar","attrs","char"])||"•",font:U(t,["a:buFont","attrs","typeface"])||""};if(t["a:buAutoNum"]){var I=t["a:buAutoNum"],g=U(I,["attrs","type"])||"arabicPeriod",C=U(I,["attrs","startAt"]),i=C?parseInt(C):1,e=U(t,["a:buFont","attrs","typeface"])||"";return{kind:"autoNum",tag:"ol",numType:g,startAt:isNaN(i)?1:i,font:e}}return null}function _0g(t){return t?t.kind==="autoNum"?"".concat(t.tag,":").concat(t.kind,":").concat(t.numType,":").concat(t.startAt,":").concat(t.lvl,":").concat(t.font):"".concat(t.tag,":").concat(t.kind,":").concat(t.char,":").concat(t.lvl,":").concat(t.font):""}function q0g(t){var I="display: inline-block; min-width: 1.4em; margin-right: 0.4em;";return t.font&&(I+="font-family: ".concat(t.font,";")),I}function $0g(t){var I=t.listInfo;if(I.kind==="char")return sV(I.char);var g=t.counter;return t.counter+=1,sV(function(C,i){if(/circle/i.test(i))return function(d){var o=parseInt(d);return isNaN(o)||o<=0?String(d):o>=1&&o<=20?String.fromCharCode(o-1+9312):o>=21&&o<=35?String.fromCharCode(o-21+12881):o>=36&&o<=50?String.fromCharCode(o-36+12977):String(o)}(C);var e,A=String(i||"").toLowerCase(),s=A.includes("chs")||A.includes("cht"),l=i.includes("ParenBoth"),n="";if(l||(i.includes("ParenR")?n=")":i.includes("Period")?n=".":i.includes("Comma")&&(n=",")),e=i.includes("alphaLc")?iq(C,!1):i.includes("alphaUc")?iq(C,!0):i.includes("romanLc")?eq(C,!1):i.includes("romanUc")?eq(C,!0):s?function(d,o,c){var r=parseInt(d);if(isNaN(r)||r<=0)return String(d);var h=c?["零","一","二","三","四","五","六","七","八","九"]:["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],b=c?["","拾","佰","仟"]:["","十","百","千"],u=o?["","萬","億","兆"]:["","万","亿","兆"],m=function(S){var z=S%1e4;if(z===0)return"";for(var v=[],K=[Math.floor(z/1e3),Math.floor(z%1e3/100),Math.floor(z%100/10),z%10],V=[b[3],b[2],b[1],b[0]],N=!1,B=0;B<K.length;B++){var G=K[B],w=V[B],W=B===K.length-1;G!==0?(N&&(v.push(h[0]),N=!1),w===b[1]&&G===1&&v.length===0?v.push(w):v.push(h[G]+w)):!W&&v.length&&K.slice(B+1).some(function(y){return y!==0})&&(N=!0)}return v.join("")};if(r<1e4)return m(r);for(var Z=[],p=r;p>0;)Z.push(p%1e4),p=Math.floor(p/1e4);for(var Y="",R=Z.length-1;R>=0;R--){var X=Z[R];if(X!==0){if(Y){var H=Y.endsWith(h[0]);!H&&X<1e3&&(Y+=h[0]),H&&X>=1e3&&(Y=Y.slice(0,-h[0].length))}Y+=m(X)+(u[R]||"")}else Y&&!Y.endsWith(h[0])&&(Y+=h[0])}return(Y=Y.replace(/零+$/g,""))||h[0]}(C,A.includes("cht"),A.includes("db")):String(C),l)return"(".concat(e,")");var a=s&&n==="."?"、":n;return"".concat(e).concat(a)}(g,I.numType))}function iq(t,I){for(var g=t,C="";g>0;)g-=1,C=String.fromCharCode(g%26+65)+C,g=Math.floor(g/26);return I?C:C.toLowerCase()}function eq(t,I){for(var g="",C=Math.max(1,Math.min(3999,t)),i=0,e=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];i<e.length;i++)for(var A=E0g(e[i],2),s=A[0],l=A[1];C>=s;)g+=l,C-=s;return I?g:g.toLowerCase()}function gbg(t,I,g,C,i,e,A){var s=Vtg(t,I,g,C,i,e,A),l=s.styleText,n=s.text,a=s.hasLink,d=s.linkURL,o=n.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\s/g,"&nbsp;");return a?'<span style="'.concat(l,'"><a href="').concat(d,'" target="_blank">').concat(o,"</a></span>"):'<span style="'.concat(l,'">').concat(o,"</span>")}function Vtg(t,I,g,C,i,e,A){var s=g["a:lstStyle"],l=A.slideMasterTextStyles,n=1,a=U(I["a:pPr"],["attrs","lvl"]);a!==void 0&&(n=parseInt(a)+1);var d=t["a:t"];typeof d!="string"&&(d=U(t,["a:fld","a:t"])),typeof d!="string"&&(d="&nbsp;");var o=U(t,["attrs","type"])||U(t,["a:fld","attrs","type"]),c=typeof o=="string"?o.toLowerCase():"";if(c==="slidenum"&&A&&A.slideNo!==void 0&&A.slideNo!==null)d=String(A.slideNo);else if(c.startsWith("datetime")){var r=typeof d=="string"?d.replace(/\s+/g," ").trim():"";if(!r||r==="日期"||r.toLowerCase()==="date"){var h=new Date,b=String(h.getFullYear()),u=String(h.getMonth()+1).padStart(2,"0"),m=String(h.getDate()).padStart(2,"0");d="".concat(b,"-").concat(u,"-").concat(m)}}var Z=typeof d=="string"?d.replace(/\s+/g," ").trim():"";if(e!=="sldNum"||Z!=="<#>"&&Z!=="#"||!A||A.slideNo===void 0||A.slideNo===null){if(e==="dt"&&(Z==="日期"||Z.toLowerCase()==="date")){var p=new Date,Y=String(p.getFullYear()),R=String(p.getMonth()+1).padStart(2,"0"),X=String(p.getDate()).padStart(2,"0");d="".concat(Y,"-").concat(R,"-").concat(X)}}else d=String(A.slideNo);var H="",S=function(P,L,E,J,k,j){var q,tg,Cg=U(P,["a:rPr"]);if(Cg&&((q=ps(Cg))==="SOLID_FILL"&&(tg=IC(Cg["a:solidFill"],void 0,void 0,j)),q==="GRADIENT_FILL"))return M9(Cg["a:gradFill"],j);if(!tg&&U(E,["a:lvl"+k+"pPr","a:defRPr"])){var x=U(E,["a:lvl"+k+"pPr","a:defRPr"]);(q=ps(x))==="SOLID_FILL"&&(tg=IC(x["a:solidFill"],void 0,void 0,j))}if(!tg){var sg=U(L,["p:style","a:fontRef"]);sg&&(tg=IC(sg,void 0,void 0,j)),!tg&&J&&(tg=IC(J,void 0,void 0,j))}return tg||""}(t,I,s,C,n,A),z=function(P,L,E,J,k,j,q){var tg,Cg=1;if(q){var x=U(q,["a:pPr","attrs","lvl"]);x!==void 0&&(Cg=parseInt(x)+1)}if(U(P,["a:rPr","attrs","sz"])&&(tg=U(P,["a:rPr","attrs","sz"])/100),!isNaN(tg)&&tg||!q||U(q,["a:endParaRPr","attrs","sz"])&&(tg=U(q,["a:endParaRPr","attrs","sz"])/100),(isNaN(tg)||!tg)&&j){var sg=U(j,["a:lstStyle"]);if(sg){var Ag=U(sg,["a:lvl".concat(Cg,"pPr"),"a:defRPr","attrs","sz"]);Ag&&(tg=parseInt(Ag)/100)}}if((isNaN(tg)||!tg)&&L){var O=U(L,["p:txBody","a:lstStyle","a:lvl".concat(Cg,"pPr"),"a:defRPr","attrs","sz"]);O&&(tg=parseInt(O)/100)}if((isNaN(tg)||!tg)&&L){var _=U(L,["p:txBody","a:lstStyle","a:lvl1pPr","a:defRPr","attrs","sz"]);_&&(tg=parseInt(_)/100)}if((isNaN(tg)||!tg)&&q){var Ig=U(q,["a:pPr","a:defRPr","attrs","sz"]);Ig&&(tg=parseInt(Ig)/100)}if(isNaN(tg)||!tg)if(E==="dt"||E==="sldNum")tg=12;else{var ng,ag="a:lvl".concat(Cg,"pPr"),lg=function(dg){var hg=U(J,[dg,ag,"a:defRPr","attrs","sz"]);if(hg)return parseInt(hg)/100;var rg=U(J,[dg,"a:lvl1pPr","a:defRPr","attrs","sz"]);return rg?parseInt(rg)/100:null};E==="title"||E==="ctrTitle"?ng=lg("p:titleStyle"):E==="subTitle"?(ng=lg("p:titleStyle"))===null&&(ng=lg("p:bodyStyle")):ng=lg(E==="body"?"p:bodyStyle":"p:otherStyle"),ng!==null&&(tg=ng)}if(isNaN(tg)||!tg){var cg=U(k,["a:lvl".concat(Cg,"pPr"),"a:defRPr","attrs","sz"])||U(k,["a:defPPr","a:defRPr","attrs","sz"]);cg&&(tg=parseInt(cg)/100)}return(tg=isNaN(tg)||!tg?18:tg)+"px"}(t,i,e,l,A.defaultTextStyle,g,I),v=function(P,L,E){var J=U(P,["a:t"]),k=typeof J=="string"&&/[\u3040-\u30ff\u3400-\u9fff\uf900-\ufaff]/.test(J),j=(k?U(P,["a:rPr","a:ea","attrs","typeface"]):null)||U(P,["a:rPr","a:latin","attrs","typeface"])||U(P,["a:rPr","a:ea","attrs","typeface"])||U(P,["a:rPr","a:cs","attrs","typeface"]);if(!j){var q,tg=U(E.themeContent,["a:theme","a:themeElements","a:fontScheme"]);q=U(tg,L==="title"||L==="subTitle"||L==="ctrTitle"?["a:majorFont"]:["a:minorFont"]),j=(k?U(q,["a:ea","attrs","typeface"]):null)||U(q,["a:latin","attrs","typeface"])||U(q,["a:ea","attrs","typeface"])||U(q,["a:cs","attrs","typeface"])}return j||""}(t,e,A),K=function(P){return U(P,["a:rPr","attrs","b"])==="1"?"bold":""}(t),V=function(P){return U(P,["a:rPr","attrs","i"])==="1"?"italic":""}(t),N=function(P){return U(P,["a:rPr","attrs","u"])==="sng"?"underline":""}(t),B=function(P){return U(P,["a:rPr","attrs","strike"])==="sngStrike"?"line-through":""}(t),G=function(P){var L=U(P,["a:rPr","attrs","spc"]);return L?parseInt(L)/100+"pt":""}(t),w=function(P,L){var E=U(P,["a:rPr","a:effectLst","a:outerShdw"]);if(E){var J=Ntg(E,L);if(J){var k=J.h,j=J.v,q=J.blur,tg=J.color;if(!isNaN(j)&&!isNaN(k))return k+"pt "+j+"pt "+(q?q+"pt":"")+" "+tg}}return""}(t,A),W=function(P){var L=U(P,["a:rPr","attrs","baseline"]);return L?parseInt(L)>0?"super":"sub":""}(t);if(S){if(typeof S=="string")H+="color: ".concat(S,";");else if(S.colors){var y=S.colors,f=S.rot,D=y.map(function(P){return"".concat(P.color," ").concat(P.pos)}).join(", "),F="linear-gradient(".concat(f+90,"deg, ").concat(D,")");H+="background: ".concat(F,"; background-clip: text; color: transparent;")}}z&&(H+="font-size: ".concat(z,";")),v&&(H+="font-family: ".concat(v,";")),K&&(H+="font-weight: ".concat(K,";")),V&&(H+="font-style: ".concat(V,";")),N&&(H+="text-decoration: ".concat(N,";")),B&&(H+="text-decoration-line: ".concat(B,";")),G&&(H+="letter-spacing: ".concat(G,";")),W&&(H+="vertical-align: ".concat(W,";")),w&&(H+="text-shadow: ".concat(w,";"));var T=U(t,["a:rPr","a:hlinkClick","attrs","r:id"]),Q=T&&A.slideResObj[T];return{styleText:H,text:d,hasLink:Q,linkURL:Q?A.slideResObj[T].target:null}}function Ibg(t,I,g,C,i,e,A){var s,l=i;if(e>=i)for(;l<=e;){var n=l*(Math.PI/180),a=t+Math.cos(n)*g,d=I+Math.sin(n)*C;l===i&&(s=" M"+a+" "+d),s+=" L"+a+" "+d,l++}else for(;l>e;){var o=l*(Math.PI/180),c=t+Math.cos(o)*g,r=I+Math.sin(o)*C;l===i&&(s=" M "+c+" "+r),s+=" L "+c+" "+r,l--}return s+=""}function Cbg(t,I,g){var C=U(t,["a:pathLst"]),i=U(C,["a:path"]);Array.isArray(i)&&(i=i.shift());var e=parseInt(i.attrs.w),A=parseInt(i.attrs.h),s=e===0?0:1/e*I,l=A===0?0:1/A*g,n="",a=U(i,["a:moveTo"]),d=i["a:lnTo"],o=i["a:cubicBezTo"],c=i["a:arcTo"],r=U(i,["a:close"]);Array.isArray(a)||(a=[a]);var h=[];if(a.length>0){if(Object.keys(a).forEach(function(N){var B=a[N]["a:pt"];B&&Object.keys(B).forEach(function(G){var w=B[G],W=w.x,y=w.y,f=w.order;h.push({type:"movto",x:W,y,order:f})})}),d&&(Array.isArray(d)||(d=[d]),Object.keys(d).forEach(function(N){var B=d[N]["a:pt"];B&&Object.keys(B).forEach(function(G){var w=B[G],W=w.x,y=w.y,f=w.order;h.push({type:"lnto",x:W,y,order:f})})})),o){var b=[];Array.isArray(o)||(o=[o]),Object.keys(o).forEach(function(N){b.push(o[N]["a:pt"])}),b.forEach(function(N){var B=[];N.forEach(function(w){var W={x:w.attrs.x,y:w.attrs.y};B.push(W)});var G=N[0].attrs.order;h.push({type:"cubicBezTo",cubBzPt:B,order:G})})}if(c){var u=c.attrs,m=u.order,Z=u.hR,p=u.wR,Y=u.stAng,R=u.swAng,X=0,H=0,S=U(c,["a:pt","attrs"]);S&&(X=S.x,H=S.y),h.push({type:"arcTo",hR:Z,wR:p,stAng:Y,swAng:R,shftX:X,shftY:H,order:m})}r&&(Array.isArray(r)||(r=[r]),Object.keys(r).forEach(function(){h.push({type:"close",order:1/0})})),h.sort(function(N,B){return N.order-B.order});for(var z=0;z<h.length;){if(h[z].type==="movto")n+=" M"+parseInt(h[z].x)*s+","+parseInt(h[z].y)*l;else if(h[z].type==="lnto")n+=" L"+parseInt(h[z].x)*s+","+parseInt(h[z].y)*l;else if(h[z].type==="cubicBezTo")n+=" C"+parseInt(h[z].cubBzPt[0].x)*s+","+parseInt(h[z].cubBzPt[0].y)*l+" "+parseInt(h[z].cubBzPt[1].x)*s+","+parseInt(h[z].cubBzPt[1].y)*l+" "+parseInt(h[z].cubBzPt[2].x)*s+","+parseInt(h[z].cubBzPt[2].y)*l;else if(h[z].type==="arcTo"){var v=parseInt(h[z].hR)*s,K=parseInt(h[z].wR)*l,V=parseInt(h[z].stAng)/6e4;n+=Ibg(K,v,K,v,V,V+parseInt(h[z].swAng)/6e4)}else h[z].type==="close"&&(n+="z");z++}}return n}function tbg(t,I){var g={};if(t["a:bottom"]){var C=Ns({"p:spPr":{"a:ln":t["a:bottom"]["a:ln"]}},void 0,I);g.bottom=C}if(t["a:top"]){var i=Ns({"p:spPr":{"a:ln":t["a:top"]["a:ln"]}},void 0,I);g.top=i}if(t["a:right"]){var e=Ns({"p:spPr":{"a:ln":t["a:right"]["a:ln"]}},void 0,I);g.right=e}if(t["a:left"]){var A=Ns({"p:spPr":{"a:ln":t["a:left"]["a:ln"]}},void 0,I);g.left=A}return g}function Aq(t,I,g,C){return Mtg.apply(this,arguments)}function Mtg(){return(Mtg=RC(rI.mark(function t(I,g,C,i){var e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y;return rI.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(e=U(I,["attrs","rowSpan"]),A=U(I,["attrs","gridSpan"]),s=U(I,["attrs","vMerge"]),l=U(I,["attrs","hMerge"]),!(o=U(I,["a:tcPr"]))){R.next=11;break}return c={"p:spPr":o},R.next=9,Ytg(c,void 0,!1,i,"slide");case 9:(r=R.sent)&&r.type==="color"&&r.value&&(n=r.value);case 11:return n||(C&&(h=U(g,[C,"a:tcStyle","a:fill","a:solidFill"])),h&&(n=IC(h,void 0,void 0,i))),C&&(b=U(g,[C,"a:tcTxStyle"])),b&&(a=IC(b,void 0,void 0,i),U(b,["attrs","b"])==="on"&&(d=!0)),(u=U(I,["a:tcPr","a:lnB"]))||(C&&(u=U(g[C],["a:tcStyle","a:tcBdr","a:bottom","a:ln"])),u||(u=U(g,["a:wholeTbl","a:tcStyle","a:tcBdr","a:bottom","a:ln"]))),(m=U(I,["a:tcPr","a:lnT"]))||(C&&(m=U(g[C],["a:tcStyle","a:tcBdr","a:top","a:ln"])),m||(m=U(g,["a:wholeTbl","a:tcStyle","a:tcBdr","a:top","a:ln"]))),(Z=U(I,["a:tcPr","a:lnL"]))||(C&&(Z=U(g[C],["a:tcStyle","a:tcBdr","a:left","a:ln"])),Z||(Z=U(g,["a:wholeTbl","a:tcStyle","a:tcBdr","a:left","a:ln"]))),(p=U(I,["a:tcPr","a:lnR"]))||(C&&(p=U(g[C],["a:tcStyle","a:tcBdr","a:right","a:ln"])),p||(p=U(g,["a:wholeTbl","a:tcStyle","a:tcBdr","a:right","a:ln"]))),Y={},u&&(Y.bottom=Ns(u,void 0,i)),m&&(Y.top=Ns(m,void 0,i)),Z&&(Y.left=Ns(Z,void 0,i)),p&&(Y.right=Ns(p,void 0,i)),R.abrupt("return",{fillColor:n,fontColor:a,fontBold:d,borders:Y,rowSpan:e?+e:void 0,colSpan:A?+A:void 0,vMerge:s?+s:void 0,hMerge:l?+l:void 0});case 28:case"end":return R.stop()}},t)}))).apply(this,arguments)}function ibg(t,I,g,C,i){var e,A,s;if(C&&C["a:wholeTbl"]){var l=U(C,["a:wholeTbl","a:tcStyle","a:fill","a:solidFill"]);if(l){var n=IC(l,void 0,void 0,i);n&&(e=n)}var a=U(C,["a:wholeTbl","a:tcTxStyle"]);if(a){var d=IC(a,void 0,void 0,i);d&&(A=d),U(a,["attrs","b"])==="on"&&(s=!0)}}if(I===0&&g.isFrstRowAttr===1&&C){var o=U(C,["a:firstRow","a:tcStyle","a:fill","a:solidFill"]);if(o){var c=IC(o,void 0,void 0,i);c&&(e=c)}var r=U(C,["a:firstRow","a:tcTxStyle"]);if(r){var h=IC(r,void 0,void 0,i);h&&(A=h),U(r,["attrs","b"])==="on"&&(s=!0)}}else if(I>0&&g.isBandRowAttr===1&&C){if(e="",I%2==0&&C["a:band2H"]){var b=U(C,["a:band2H","a:tcStyle","a:fill","a:solidFill"]);if(b){var u=IC(b,void 0,void 0,i);u&&(e=u)}var m=U(C,["a:band2H","a:tcTxStyle"]);if(m){var Z=IC(m,void 0,void 0,i);Z&&(A=Z)}U(m,["attrs","b"])==="on"&&(s=!0)}if(I%2!=0&&C["a:band1H"]){var p=U(C,["a:band1H","a:tcStyle","a:fill","a:solidFill"]);if(p){var Y=IC(p,void 0,void 0,i);Y&&(e=Y)}var R=U(C,["a:band1H","a:tcTxStyle"]);if(R){var X=IC(R,void 0,void 0,i);X&&(A=X),U(R,["attrs","b"])==="on"&&(s=!0)}}}if(I===t.length-1&&g.isLstRowAttr===1&&C){var H=U(C,["a:lastRow","a:tcStyle","a:fill","a:solidFill"]);if(H){var S=IC(H,void 0,void 0,i);S&&(e=S)}var z=U(C,["a:lastRow","a:tcTxStyle"]);if(z){var v=IC(z,void 0,void 0,i);v&&(A=v),U(z,["attrs","b"])==="on"&&(s=!0)}}return{fillColor:e,fontColor:A,fontBold:s}}function Rtg(t){var I=[];return La(t)!=="object"||(t["m:oMath"]&&(I=I.concat(t["m:oMath"])),Object.values(t).forEach(function(g){(Array.isArray(g)||La(g)==="object")&&(I=I.concat(Rtg(g)))})),I}function sq(t,I){var g=VC(t["m:e"]),C=VC(t["m:lim"]);return I==="low"?"".concat(g,"_{").concat(C,"}"):"".concat(g,"^{").concat(C,"}")}function VC(t){if(!t)return"";if(Array.isArray(t))return t.map(function(A){return VC(A)}).join("");for(var I=[],g=Object.keys(t),C=function(){var A=e[i];Array.isArray(t[A])?I.push.apply(I,r9(t[A].map(function(s){return{key:A,value:s}}))):I.push({key:A,value:t[A]})},i=0,e=g;i<e.length;i++)C();return I.sort(function(A,s){var l=0;A.key==="m:r"&&A.value&&A.value["a:rPr"]?l=A.value["a:rPr"].attrs.order:A.value["".concat(A.key,"Pr")]&&A.value["".concat(A.key,"Pr")]["m:ctrlPr"]&&A.value["".concat(A.key,"Pr")]["m:ctrlPr"]["a:rPr"]&&(l=A.value["".concat(A.key,"Pr")]&&A.value["".concat(A.key,"Pr")]["m:ctrlPr"]&&A.value["".concat(A.key,"Pr")]["m:ctrlPr"]["a:rPr"]&&A.value["".concat(A.key,"Pr")]["m:ctrlPr"]["a:rPr"].attrs.order);var n=0;return s.key==="m:r"&&s.value&&s.value["a:rPr"]?n=s.value["a:rPr"].attrs.order:s.value["".concat(s.key,"Pr")]&&s.value["".concat(s.key,"Pr")]["m:ctrlPr"]&&s.value["".concat(s.key,"Pr")]["m:ctrlPr"]["a:rPr"]&&(n=s.value["".concat(s.key,"Pr")]&&s.value["".concat(s.key,"Pr")]["m:ctrlPr"]&&s.value["".concat(s.key,"Pr")]["m:ctrlPr"]["a:rPr"]&&s.value["".concat(s.key,"Pr")]["m:ctrlPr"]["a:rPr"].attrs.order),l-n}),I.map(function(A){var s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H=A.key,S=A.value;return H==="m:f"?(l=VC((s=S)["m:num"]),n=VC(s["m:den"]),"\\frac{".concat(l,"}{").concat(n,"}")):H==="m:sSup"?(d=VC((a=S)["m:e"]),o=VC(a["m:sup"]),"".concat(d,"^{").concat(o,"}")):H==="m:sSub"?function(z){var v=VC(z["m:e"]),K=VC(z["m:sub"]);return"".concat(v,"_{").concat(K,"}")}(S):H==="m:rad"?(r=VC((c=S)["m:deg"]),h=VC(c["m:e"]),r?"\\sqrt[".concat(r,"]{").concat(h,"}"):"\\sqrt{".concat(h,"}")):H==="m:nary"?function(z){var v=U(z,["m:naryPr","m:chr","attrs","m:val"])||"∫",K=VC(z["m:sub"]),V=VC(z["m:sup"]),N=VC(z["m:e"]);return"".concat(v,"_{").concat(K,"}^{").concat(V,"}{").concat(N,"}")}(S):H==="m:limLow"?sq(S,"low"):H==="m:limUpp"?sq(S,"upp"):H==="m:d"?function(z){var v=U(z,["m:dPr","m:begChr","attrs","m:val"]),K=U(z,["m:dPr","m:endChr","attrs","m:val"]);v||K||(v="(",K=")"),v&&K&&(v="\\left".concat(v),K="\\right".concat(K));var V=VC(z["m:e"]);return"".concat(v).concat(V).concat(K)}(S):H==="m:func"?(u=VC((b=S)["m:fName"]),m=VC(b["m:e"]),"\\".concat(u,"{").concat(m,"}")):H==="m:groupChr"?(p=U(Z=S,["m:groupChrPr","m:chr","attrs","m:val"]),Y=VC(Z["m:e"]),"".concat(p).concat(Y).concat(p)):H==="m:eqArr"?(R=S["m:e"].map(function(z){return VC(z)}).join(" \\\\ "),"\\begin{cases} ".concat(R," \\end{cases}")):H==="m:bar"?function(z){var v=VC(z["m:e"]);return U(z,["m:barPr","m:pos","attrs","m:val"])==="top"?"\\overline{".concat(v,"}"):"\\underline{".concat(v,"}")}(S):H==="m:acc"?function(z){var v=U(z,["m:accPr","m:chr","attrs","m:val"])||"^",K=VC(z["m:e"]);switch(v){case"́":return"\\acute{".concat(K,"}");case"̀":return"\\grave{".concat(K,"}");case"̂":return"\\hat{".concat(K,"}");case"̃":return"\\tilde{".concat(K,"}");case"̄":return"\\bar{".concat(K,"}");case"̆":return"\\breve{".concat(K,"}");case"̇":return"\\dot{".concat(K,"}");case"̈":return"\\ddot{".concat(K,"}");case"̊":return"\\mathring{".concat(K,"}");case"̋":return"\\H{".concat(K,"}");case"̌":return"\\check{".concat(K,"}");case"̧":return"\\c{".concat(K,"}");default:return"\\".concat(v,"{").concat(K,"}")}}(S):H==="m:borderBox"?function(z){var v=VC(z["m:e"]);return"\\boxed{".concat(v,"}")}(S):H==="m:m"?(X=S["m:mr"].map(function(z){return z["m:e"].map(function(v){return VC(v)}).join(" & ")}),"\\begin{matrix} ".concat(X.join(" \\\\ ")," \\end{matrix}")):H==="m:r"?VC(S):H==="m:t"?S:""}).join("")}function ebg(t){return t.replaceAll(/&lt;/g,"<").replaceAll(/&gt;/g,">").replaceAll(/&amp;/g,"&").replaceAll(/&apos;/g,"'").replaceAll(/&quot;/g,'"')}function MI(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return lq(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return lq(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function lq(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function nq(t,I,g,C,i){return{x:t+Math.cos(i)*g,y:I+Math.sin(i)*C}}function aq(t,I,g,C,i,e,A){var s=nq(t,I,g,C,i),l=nq(t,I,g,C,e),n=l,a=s,d=i-e,o=Math.abs(d)>Math.PI?1:0,c=d>=0?1:0;return"M ".concat(n.x,",").concat(n.y," A ").concat(g,",").concat(C," 0 ").concat(o,",").concat(c," ").concat(a.x,",").concat(a.y," Z")}function Mg(t,I,g,C,i,e,A){for(var s,l="",n=e>=i?1:-1,a=i;s=a,n>0?s<=e:s>=e;){var d=a*(Math.PI/180),o=t+Math.cos(d)*g,c=I+Math.sin(d)*C;a===i&&(l=" M".concat(o," ").concat(c)),l+=" L".concat(o," ").concat(c),a+=n}return A&&(l+=" z"),l}function Abg(t,I,g,C){var i="";switch(t){case"rect":case"actionButtonBlank":case"leftRightCircularArrow":case"chartPlus":case"chartStar":case"chartX":case"cornerTabs":case"flowChartOfflineStorage":case"folderCorner":case"funnel":case"lineInv":case"nonIsoscelesTrapezoid":case"plaqueTabs":case"squareTabs":case"upDownArrowCallout":default:i="M 0 0 L ".concat(I," 0 L ").concat(I," ").concat(g," L 0 ").concat(g," Z");break;case"flowChartPredefinedProcess":i="M 0 0 L ".concat(I," 0 L ").concat(I," ").concat(g," L 0 ").concat(g," Z M ").concat(I*(1/8)," 0 L ").concat(I*(1/8)," ").concat(g," M ").concat(I*(7/8)," 0 L ").concat(I*(7/8)," ").concat(g);break;case"flowChartInternalStorage":i="M 0 0 L ".concat(I," 0 L ").concat(I," ").concat(g," L 0 ").concat(g," Z M ").concat(I*(1/8)," 0 L ").concat(I*(1/8)," ").concat(g," M 0 ").concat(g*(1/8)," L ").concat(I," ").concat(g*(1/8));break;case"flowChartCollate":i="M 0,0 L ".concat(I,",0 L 0,").concat(g," L ").concat(I,",").concat(g," z");break;case"flowChartDocument":var e=10800*I/21600,A=17322*g/21600,s=20172*g/21600,l=23922*g/21600;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(A," C ").concat(e,",").concat(A," ").concat(e,",").concat(l," 0,").concat(s," z");break;case"flowChartMultidocument":var n=18022*g/21600,a=3675*g/21600,d=23542*g/21600,o=1815*g/21600,c=16252*g/21600,r=16352*g/21600,h=14392*g/21600,b=20782*g/21600,u=14467*g/21600,m=1532*I/21600,Z=2e4*I/21600,p=9298*I/21600,Y=19298*I/21600,R=18595*I/21600,X=2972*I/21600,H=20800*I/21600;i="M 0,".concat(a," L ").concat(R,",").concat(a," L ").concat(R,",").concat(n," C ").concat(p,",").concat(n," ").concat(p,",").concat(d," 0,").concat(b," z M ").concat(m,",").concat(a," L ").concat(m,",").concat(o," L ").concat(Z,",").concat(o," L ").concat(Z,",").concat(c," C ").concat(Y,",").concat(c," ").concat(R,",").concat(r," ").concat(R,",").concat(r," M ").concat(X,",").concat(o," L ").concat(X,",0 L ").concat(I,",0 L ").concat(I,",").concat(h," C ").concat(H,",").concat(h," ").concat(Z,",").concat(u," ").concat(Z,",").concat(u);break;case"actionButtonBackPrevious":var S=I/2,z=g/2,v=3*Math.min(I,g)/8,K=z-v,V=z+v,N=S-v,B=S+v;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(N,",").concat(z," L ").concat(B,",").concat(K," L ").concat(B,",").concat(V," z");break;case"actionButtonBeginning":var G=I/2,w=g/2,W=Math.min(I,g),y=3*W/8,f=w-y,D=w+y,F=G-y,T=G+y,Q=3*W/4,P=F+Q/8,L=F+Q/4;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(L,",").concat(w," L ").concat(T,",").concat(f," L ").concat(T,",").concat(D," z M ").concat(P,",").concat(f," L ").concat(F,",").concat(f," L ").concat(F,",").concat(D," L ").concat(P,",").concat(D," z");break;case"actionButtonDocument":var E=I/2,J=g/2,k=Math.min(I,g),j=3*k/8,q=J-j,tg=J+j,Cg=9*k/32,x=E-Cg,sg=E+Cg,Ag=3*k/16,O=sg-Ag,_=q+Ag;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(x,",").concat(q," L ").concat(O,",").concat(q," L ").concat(sg,",").concat(_," L ").concat(sg,",").concat(tg," L ").concat(x,",").concat(tg," z M ").concat(O,",").concat(q," L ").concat(O,",").concat(_," L ").concat(sg,",").concat(_," z");break;case"actionButtonEnd":var Ig=I/2,ng=g/2,ag=Math.min(I,g),lg=3*ag/8,cg=ng-lg,dg=ng+lg,hg=Ig-lg,rg=Ig+lg,Wg=3*ag/4,Gg=hg+3*Wg/4,Sg=hg+7*Wg/8;i="M 0,".concat(g," L ").concat(I,",").concat(g," L ").concat(I,",0 L 0,0 z M ").concat(Sg,",").concat(cg," L ").concat(rg,",").concat(cg," L ").concat(rg,",").concat(dg," L ").concat(Sg,",").concat(dg," z M ").concat(Gg,",").concat(ng," L ").concat(hg,",").concat(cg," L ").concat(hg,",").concat(dg," z");break;case"actionButtonForwardNext":var Kg=I/2,kg=g/2,yg=3*Math.min(I,g)/8,Vg=kg-yg,pg=kg+yg,Hg=Kg-yg,Jg=Kg+yg;i="M 0,".concat(g," L ").concat(I,",").concat(g," L ").concat(I,",0 L 0,0 z M ").concat(Jg,",").concat(kg," L ").concat(Hg,",").concat(Vg," L ").concat(Hg,",").concat(pg," z");break;case"actionButtonHelp":var zg=I/2,aI=g/2,BI=Math.min(I,g),Ug=3*BI/8,lI=aI-Ug,oI=zg-Ug,Eg=3*BI/4,LI=Eg/7,fI=3*Eg/14,tI=2*Eg/7,WI=lI+tI,QI=lI+17*Eg/28,nI=lI+21*Eg/28,kI=lI+11*Eg/14,Bg=oI+fI,hI=oI+3*Eg/7,bg=oI+4*Eg/7,ug=Eg/14,fg=3*Eg/28,Tg=Bg+tI,cI=hI+LI,jg=kI+fg,mI=(bg+hI+tI)/2;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(Bg,",").concat(WI," ").concat(Mg(Tg,WI,tI,tI,180,360,!1).replace("M","L")," ").concat(Mg(mI,WI,LI,fI,0,90,!1).replace("M","L")," ").concat(Mg(mI,QI,ug,fg,270,180,!1).replace("M","L")," L ").concat(bg,",").concat(nI," L ").concat(hI,",").concat(nI," L ").concat(hI,",").concat(QI," ").concat(Mg(cI,QI,LI,fI,180,270,!1).replace("M","L")," ").concat(Mg(bg,WI,ug,fg,90,0,!1).replace("M","L")," ").concat(Mg(Tg,WI,LI,LI,0,-180,!1).replace("M","L")," z M ").concat(zg,",").concat(kI," ").concat(Mg(zg,jg,fg,fg,270,630,!1).replace("M","L")," z");break;case"actionButtonHome":var sI=I/2,gI=g/2,pI=Math.min(I,g),bI=3*pI/8,yI=gI-bI,wC=gI+bI,_I=sI-bI,_C=sI+bI,nC=3*pI/4,Ft=yI+nC/16,og=yI+3*nC/16,Zg=yI+5*nC/16,Dg=yI+3*nC/4,Fg=_I+nC/8,II=_I+7*nC/16,vg=_I+9*nC/16,xg=_I+11*nC/16,zI=_I+13*nC/16,VI=_I+7*nC/8;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(sI,",").concat(yI," L ").concat(_I,",").concat(gI," L ").concat(Fg,",").concat(gI," L ").concat(Fg,",").concat(wC," L ").concat(VI,",").concat(wC," L ").concat(VI,",").concat(gI," L ").concat(_C,",").concat(gI," L ").concat(zI,",").concat(Zg," L ").concat(zI,",").concat(Ft," L ").concat(xg,",").concat(Ft," L ").concat(xg,",").concat(og," z M ").concat(II,",").concat(Dg," L ").concat(vg,",").concat(Dg," L ").concat(vg,",").concat(wC," L ").concat(II,",").concat(wC," z");break;case"actionButtonInformation":var YI=I/2,dI=g/2,CC=Math.min(I,g),OI=3*CC/8,vI=dI-OI,rC=YI-OI,hC=3*CC/4,pt=5*hC/16,Ni=vI+hC/32,fA=vI+pt,Hs=vI+3*hC/8,_e=vI+13*hC/16,Xs=vI+7*hC/8,qI=rC+pt,TI=rC+13*hC/32,qe=rC+19*hC/32,HA=rC+11*hC/16,El=3*hC/32,bi=vI+OI,$e=Ni+El;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(YI,",").concat(vI," ").concat(Mg(YI,bi,OI,OI,270,630,!1).replace("M","L")," z M ").concat(YI,",").concat(Ni," ").concat(Mg(YI,$e,El,El,270,630,!1).replace("M","L")," M ").concat(qI,",").concat(fA," L ").concat(qe,",").concat(fA," L ").concat(qe,",").concat(_e," L ").concat(HA,",").concat(_e," L ").concat(HA,",").concat(Xs," L ").concat(qI,",").concat(Xs," L ").concat(qI,",").concat(_e," L ").concat(TI,",").concat(_e," L ").concat(TI,",").concat(Hs," L ").concat(qI,",").concat(Hs," z");break;case"actionButtonMovie":var gA=I/2,ja=g/2,Ss=Math.min(I,g),kt=gA-3*Ss/8,Bt=ja-3*Ss/8,W0=gA+3*Ss/8,OC=3*Ss/4,ad=kt+1455*OC/21600,Qa=kt+1905*OC/21600,Oa=kt+2325*OC/21600,nG=kt+16155*OC/21600,Ds=kt+17010*OC/21600,od=kt+19335*OC/21600,oig=kt+19725*OC/21600,Q9=kt+20595*OC/21600,O9=Bt+5280*OC/21600,U9=Bt+5730*OC/21600,CM=Bt+6630*OC/21600,E9=Bt+7492*OC/21600,P9=Bt+9067*OC/21600,_9=Bt+9555*OC/21600,q9=Bt+13342*OC/21600,$9=Bt+14580*OC/21600,g1=Bt+15592*OC/21600;i="M 0,".concat(g," L ").concat(I,",").concat(g," L ").concat(I,",0 L 0,0 z M ").concat(kt,",").concat(O9," L ").concat(kt,",").concat(_9," L ").concat(ad,",").concat(_9," L ").concat(Qa,",").concat(P9," L ").concat(Oa,",").concat(P9," L ").concat(Oa,",").concat(g1," L ").concat(Ds,",").concat(g1," L ").concat(Ds,",").concat(q9," L ").concat(od,",").concat(q9," L ").concat(Q9,",").concat($9," L ").concat(W0,",").concat($9," L ").concat(W0,",").concat(CM," L ").concat(Q9,",").concat(CM," L ").concat(oig,",").concat(E9," L ").concat(Ds,",").concat(E9," L ").concat(Ds,",").concat(CM," L ").concat(nG,",").concat(U9," L ").concat(Qa,",").concat(U9," L ").concat(ad,",").concat(O9," z");break;case"actionButtonReturn":var y0=I/2,I1=g/2,C1=Math.min(I,g),aG=3*C1/8,oG=I1-aG,t1=I1+aG,Pl=y0-aG,cig=y0+aG,cd=3*C1/4,i1=3*cd/4,e1=5*cd/8,Ua=3*cd/8,A1=cd/4,s1=oG+i1,cG=oG+e1,dd=oG+A1,dig=Pl+7*cd/8,rig=Pl+i1,tM=Pl+e1,l1=Pl+Ua,hig=Pl+A1,rd=cd/8,big=tM-rd,uig=s1-rd,mig=Pl+Ua,Zig=t1-Ua;i="M 0,".concat(g," L ").concat(I,",").concat(g," L ").concat(I,",0 L 0,0 z M ").concat(cig,",").concat(dd," L ").concat(rig,",").concat(oG," L ").concat(y0,",").concat(dd," L ").concat(tM,",").concat(dd," L ").concat(tM,",").concat(cG," ").concat(Mg(big,cG,rd,rd,0,90,!1).replace("M","L")," L ").concat(l1,",").concat(s1," ").concat(Mg(l1,uig,rd,rd,90,180,!1).replace("M","L")," L ").concat(hig,",").concat(dd," L ").concat(Pl,",").concat(dd," L ").concat(Pl,",").concat(cG," ").concat(Mg(mig,cG,Ua,Ua,180,90,!1).replace("M","L")," L ").concat(y0,",").concat(t1," ").concat(Mg(y0,Zig,Ua,Ua,90,0,!1).replace("M","L")," L ").concat(dig,",").concat(dd," z");break;case"actionButtonSound":var n1=I/2,dG=g/2,a1=Math.min(I,g),rG=3*a1/8,Y0=dG-rG,Gig=dG+rG,N0=n1-rG,iM=n1+rG,hd=3*a1/4,o1=5*hd/16,wig=Y0+hd/8,eM=Y0+o1,AM=Y0+11*hd/16,pig=Y0+7*hd/8,c1=N0+o1,d1=N0+5*hd/8,sM=N0+3*hd/4;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(N0,",").concat(eM," L ").concat(c1,",").concat(eM," L ").concat(d1,",").concat(Y0," L ").concat(d1,",").concat(Gig," L ").concat(c1,",").concat(AM," L ").concat(N0,",").concat(AM," z M ").concat(sM,",").concat(eM," L ").concat(iM,",").concat(wig," M ").concat(sM,",").concat(dG," L ").concat(iM,",").concat(dG," M ").concat(sM,",").concat(AM," L ").concat(iM,",").concat(pig);break;case"irregularSeal1":i="M ".concat(10800*I/21600,",").concat(5800*g/21600," L ").concat(14522*I/21600,",0 L ").concat(14155*I/21600,",").concat(5325*g/21600," L ").concat(18380*I/21600,",").concat(4457*g/21600," L ").concat(16702*I/21600,",").concat(7315*g/21600," L ").concat(21097*I/21600,",").concat(8137*g/21600," L ").concat(17607*I/21600,",").concat(10475*g/21600," L ").concat(I,",").concat(13290*g/21600," L ").concat(16837*I/21600,",").concat(12942*g/21600," L ").concat(18145*I/21600,",").concat(18095*g/21600," L ").concat(14020*I/21600,",").concat(14457*g/21600," L ").concat(13247*I/21600,",").concat(19737*g/21600," L ").concat(10532*I/21600,",").concat(14935*g/21600," L ").concat(8485*I/21600,",").concat(g," L ").concat(7715*I/21600,",").concat(15627*g/21600," L ").concat(4762*I/21600,",").concat(17617*g/21600," L ").concat(5667*I/21600,",").concat(13937*g/21600," L ").concat(135*I/21600,",").concat(14587*g/21600," L ").concat(3722*I/21600,",").concat(11775*g/21600," L 0,").concat(8615*g/21600," L ").concat(4627*I/21600,",").concat(7617*g/21600," L ").concat(370*I/21600,",").concat(2295*g/21600," L ").concat(7312*I/21600,",").concat(6320*g/21600," L ").concat(8352*I/21600,",").concat(2295*g/21600," z");break;case"irregularSeal2":i="M ".concat(11462*I/21600,",").concat(4342*g/21600," L ").concat(14790*I/21600,",0 L ").concat(14525*I/21600,",").concat(5777*g/21600," L ").concat(18007*I/21600,",").concat(3172*g/21600," L ").concat(16380*I/21600,",").concat(6532*g/21600," L ").concat(I,",").concat(6645*g/21600," L ").concat(16985*I/21600,",").concat(9402*g/21600," L ").concat(18270*I/21600,",").concat(11290*g/21600," L ").concat(16380*I/21600,",").concat(12310*g/21600," L ").concat(18877*I/21600,",").concat(15632*g/21600," L ").concat(14640*I/21600,",").concat(14350*g/21600," L ").concat(14942*I/21600,",").concat(17370*g/21600," L ").concat(12180*I/21600,",").concat(15935*g/21600," L ").concat(11612*I/21600,",").concat(18842*g/21600," L ").concat(9872*I/21600,",").concat(17370*g/21600," L ").concat(8700*I/21600,",").concat(19712*g/21600," L ").concat(7527*I/21600,",").concat(18125*g/21600," L ").concat(4917*I/21600,",").concat(g," L ").concat(4805*I/21600,",").concat(18240*g/21600," L ").concat(1285*I/21600,",").concat(17825*g/21600," L ").concat(3330*I/21600,",").concat(15370*g/21600," L 0,").concat(12877*g/21600," L ").concat(3935*I/21600,",").concat(11592*g/21600," L ").concat(1172*I/21600,",").concat(8270*g/21600," L ").concat(5372*I/21600,",").concat(7817*g/21600," L ").concat(4502*I/21600,",").concat(3625*g/21600," L ").concat(8550*I/21600,",").concat(6382*g/21600," L ").concat(9722*I/21600,",").concat(1887*g/21600," z");break;case"flowChartTerminator":var V0=3475*I/21600,r1=18125*I/21600,h1=10800*g/21600;i="M ".concat(V0,",0 L ").concat(r1,",0 ").concat(Mg(r1,g/2,V0,h1,270,450,!1).replace("M","L")," L ").concat(V0,",").concat(g," ").concat(Mg(V0,g/2,V0,h1,90,270,!1).replace("M","L")," z");break;case"flowChartPunchedTape":var lM=180,bd=5*I/20,Ea=2*g/20,nM=18*g/20;i="M 0,".concat(Ea," ").concat(Mg(bd,Ea,bd,Ea,lM,0,!1).replace("M","L")," ").concat(Mg(I*(3/4),Ea,bd,Ea,lM,360,!1).replace("M","L")," L ").concat(I,",").concat(nM," ").concat(Mg(I*(3/4),nM,bd,Ea,0,-180,!1).replace("M","L")," ").concat(Mg(bd,nM,bd,Ea,0,lM,!1).replace("M","L")," z");break;case"flowChartOnlineStorage":var M0=1*I/6,b1=3*g/6;i="M ".concat(M0,",0 L ").concat(I,",0 ").concat(Mg(I,g/2,M0,b1,270,90,!1).replace("M","L")," L ").concat(M0,",").concat(g," ").concat(Mg(M0,g/2,M0,b1,90,270,!1).replace("M","L")," z");break;case"flowChartDisplay":var aM=1*I/6,Big=5*I/6,u1=3*g/6;i="M 0,".concat(u1," L ").concat(aM,",0 L ").concat(Big,",0 ").concat(Mg(I,g/2,aM,u1,270,450,!1).replace("M","L")," L ").concat(aM,",").concat(g," z");break;case"flowChartDelay":var oM=I/2,m1=g/2;i="M 0,0 L ".concat(oM,",0 ").concat(Mg(oM,m1,oM,m1,270,450,!1).replace("M","L")," L 0,").concat(g," z");break;case"flowChartMagneticTape":var Ks=I/2,XA=g/2,Wig=XA+XA*Math.sin(Math.PI/4),yig=180*Math.atan(g/I)/Math.PI;i="M ".concat(Ks,",").concat(g," ").concat(Mg(Ks,XA,Ks,XA,90,180,!1).replace("M","L")," ").concat(Mg(Ks,XA,Ks,XA,180,270,!1).replace("M","L")," ").concat(Mg(Ks,XA,Ks,XA,270,360,!1).replace("M","L")," ").concat(Mg(Ks,XA,Ks,XA,0,yig,!1).replace("M","L")," L ").concat(I,",").concat(Wig," L ").concat(I,",").concat(g," z");break;case"ellipse":case"flowChartConnector":case"flowChartSummingJunction":case"flowChartOr":var R0=I/2,f0=g/2,H0=I/2,Z1=g/2;if(i="M ".concat(R0-H0,",").concat(f0," A ").concat(H0,",").concat(Z1," 0 1,0 ").concat(R0+H0,",").concat(f0," A ").concat(H0,",").concat(Z1," 0 1,0 ").concat(R0-H0,",").concat(f0," Z"),t==="flowChartOr")i+=" M ".concat(I/2," 0 L ").concat(I/2," ").concat(g," M 0 ").concat(g/2," L ").concat(I," ").concat(g/2);else if(t==="flowChartSummingJunction"){var G1=Math.PI/4,w1=I/2*Math.cos(G1),p1=g/2*Math.sin(G1),B1=R0-w1,W1=R0+w1,y1=f0-p1,Y1=f0+p1;i+=" M ".concat(B1," ").concat(y1," L ").concat(W1," ").concat(Y1," M ").concat(W1," ").concat(y1," L ").concat(B1," ").concat(Y1)}break;case"roundRect":case"round1Rect":case"round2DiagRect":case"round2SameRect":case"snip1Rect":case"snip2DiagRect":case"snip2SameRect":case"flowChartAlternateProcess":case"flowChartPunchedCard":var zt,Vi,_l,ql,X0=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);if(X0&&Array.isArray(X0)){var N1,hG=MI(X0);try{for(hG.s();!(N1=hG.n()).done;){var cM=N1.value,V1=U(cM,["attrs","name"]);if(V1==="adj1"){var Yig=U(cM,["attrs","fmla"]);zt=parseInt(Yig.substring(4))/5e4}else if(V1==="adj2"){var Nig=U(cM,["attrs","fmla"]);Vi=parseInt(Nig.substring(4))/5e4}}}catch(Rg){hG.e(Rg)}finally{hG.f()}}else if(X0){var Vig=U(X0,["attrs","fmla"]);zt=parseInt(Vig.substring(4))/5e4,Vi=0}var M1=!1;switch(t){case"roundRect":case"flowChartAlternateProcess":_l="round",ql="cornrAll",zt===void 0&&(zt=.33334),Vi=0;break;case"round1Rect":_l="round",ql="cornr1",zt===void 0&&(zt=.33334),Vi=0;break;case"round2DiagRect":_l="round",ql="diag",zt===void 0&&(zt=.33334),Vi===void 0&&(Vi=0);break;case"round2SameRect":_l="round",ql="cornr2",zt===void 0&&(zt=.33334),Vi===void 0&&(Vi=0);break;case"snip1Rect":case"flowChartPunchedCard":_l="snip",ql="cornr1",zt===void 0&&(zt=.33334),Vi=0,t==="flowChartPunchedCard"&&(M1=!0);break;case"snip2DiagRect":_l="snip",ql="diag",zt===void 0&&(zt=0),Vi===void 0&&(Vi=.33334);break;case"snip2SameRect":_l="snip",ql="cornr2",zt===void 0&&(zt=.33334),Vi===void 0&&(Vi=0)}i=function(Rg,NI,pC,vC,TC,Hi){var xC,qC,rt,Yt,_i;switch(Hi){case"cornr1":xC=0,qC=0,rt=0,Yt=pC;break;case"cornr2":xC=pC,qC=vC,rt=vC,Yt=pC;break;case"cornrAll":xC=pC,qC=pC,rt=pC,Yt=pC;break;case"diag":xC=pC,qC=vC,rt=pC,Yt=vC;break;default:xC=qC=rt=Yt=0}if(TC==="round"){if(!Rg||!NI)return"";var Jt=function(Yr){var Nr=Number(Yr);return Number.isFinite(Nr)?Math.max(0,Math.min(1,Nr)):0},ht=Math.min(Rg,NI),Lt=Jt(xC)*(ht/2),At=Jt(Yt)*(ht/2),fe=Jt(rt)*(ht/2),He=Jt(qC)*(ht/2),uY=Lt+At>0?Rg/(Lt+At):1,mY=He+fe>0?Rg/(He+fe):1,ZY=Lt+He>0?NI/(Lt+He):1,Zu=At+fe>0?NI/(At+fe):1,Ro=Math.min(1,uY,mY,ZY,Zu);At*=Ro,fe*=Ro,He*=Ro;var Xe=function(Yr,Nr){return"L".concat(Yr,",").concat(Nr)},GY=function(Yr,Nr,vng){return"A".concat(Yr,",").concat(Yr," 0 0,1 ").concat(Nr,",").concat(vng)},$s="";return $s+=(_i=0,"M".concat(Lt*=Ro,",").concat(_i)),$s+=Xe(Rg-At,0),$s+=At>0?GY(At,Rg,At):Xe(Rg,0),$s+=Xe(Rg,NI-fe),$s+=fe>0?GY(fe,Rg-fe,NI):Xe(Rg,NI),$s+=Xe(He,NI),$s+=He>0?GY(He,0,NI-He):Xe(0,NI),$s+=Xe(0,Lt),($s+=Lt>0?GY(Lt,Lt,0):Xe(0,0))+"Z"}return TC==="snip"?"M0,".concat(xC*(NI/2)," L0,").concat(NI/2+NI/2*(1-qC)," L").concat(qC*(Rg/2),",").concat(NI," L").concat(Rg/2+Rg/2*(1-rt),",").concat(NI," L").concat(Rg,",").concat(NI/2+NI/2*(1-rt)," L").concat(Rg,",").concat(Yt*(NI/2)," L").concat(Rg/2+Rg/2*(1-Yt),",0 L").concat(Rg/2*xC,",0 z"):""}(I,g,zt,Vi,_l,ql),M1&&(i=i.replace(/([MLQC])\s*([-\d.e]+)\s*([-\d.e]+)/gi,function(Rg,NI,pC,vC){var TC=I-parseFloat(pC);return"".concat(NI).concat(TC," ").concat(vC)}).replace(/([MLQC])\s*([-\d.e]+)\s*([-\d.e]+)\s*([-\d.e]+)\s*([-\d.e]+)/gi,function(Rg,NI,pC,vC,TC,Hi){var xC=I-parseFloat(pC),qC=I-parseFloat(TC);return"".concat(NI).concat(xC," ").concat(vC," ").concat(qC," ").concat(Hi)}));break;case"snipRoundRect":var R1=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),dM=.33334,rM=.33334;if(R1){var f1,bG=MI(R1);try{for(bG.s();!(f1=bG.n()).done;){var hM=f1.value,H1=U(hM,["attrs","name"]);if(H1==="adj1"){var Mig=U(hM,["attrs","fmla"]);dM=parseInt(Mig.substring(4))/5e4}else if(H1==="adj2"){var Rig=U(hM,["attrs","fmla"]);rM=parseInt(Rig.substring(4))/5e4}}}catch(Rg){bG.e(Rg)}finally{bG.f()}}i="M0,".concat(g," L").concat(I,",").concat(g," L").concat(I,",").concat(g/2*rM," L").concat(I/2+I/2*(1-rM),",0 L").concat(I/2*dM,",0 Q0,0 0,").concat(g/2*dM," z");break;case"bentConnector2":i="M ".concat(I," 0 L ").concat(I," ").concat(g," L 0 ").concat(g);break;case"rtTriangle":i="M 0 0 L 0 ".concat(g," L ").concat(I," ").concat(g," Z");break;case"triangle":case"flowChartExtract":case"flowChartMerge":var X1=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),S1=.5;X1&&(S1=parseInt(X1.substring(4))*wg);var bM=I*S1,uM=0,mM=0,ZM=g,GM=I,wM=g;if(t==="flowChartMerge"){var D1=[I-bM,g-uM];bM=D1[0],uM=D1[1];var K1=[I-mM,g-ZM];mM=K1[0],ZM=K1[1];var F1=[I-GM,g-wM];GM=F1[0],wM=F1[1]}i="M ".concat(bM," ").concat(uM," L ").concat(mM," ").concat(ZM," L ").concat(GM," ").concat(wM," Z");break;case"diamond":case"flowChartDecision":case"flowChartSort":var k1=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),z1=5e4;if(k1){var pM=U(k1,["attrs","fmla"]);pM&&pM.startsWith("val ")&&(z1=parseInt(pM.substring(4)))}var ud=z1/1e5;i="M ".concat(I*ud," 0 L 0 ").concat(g*ud," L ").concat(I*ud," ").concat(g," L ").concat(I," ").concat(g*ud," Z"),t==="flowChartSort"&&(i+=" M 0 ".concat(g*ud," L ").concat(I," ").concat(g*ud));break;case"trapezoid":case"flowChartManualOperation":case"flowChartManualInput":var J1=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),S0=.2;J1&&(S0=.5*(parseInt(J1.substring(4))*wg)/.7407);var uG=I*S0,mG=0,BM=0,WM=g,yM=I,YM=g,ZG=(1-S0)*I,NM=0;if(t==="flowChartManualInput"&&(mG=g/5,uG=I*(S0=0),ZG=(1-S0)*I),t==="flowChartManualOperation"){var L1=[I-uG,g-mG];uG=L1[0],mG=L1[1];var v1=[I-BM,g-WM];BM=v1[0],WM=v1[1];var T1=[I-yM,g-YM];yM=T1[0],YM=T1[1];var x1=[I-ZG,g-NM];ZG=x1[0],NM=x1[1]}i="M ".concat(uG," ").concat(mG," L ").concat(BM," ").concat(WM," L ").concat(yM," ").concat(YM," L ").concat(ZG," ").concat(NM," Z");break;case"parallelogram":case"flowChartInputOutput":var j1=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),VM=.25;if(j1){var fig=I>g?I/g:g/I;VM=parseInt(j1.substring(4))/1e5/fig}i="M ".concat(VM*I," 0 L 0 ").concat(g," L ").concat((1-VM)*I," ").concat(g," L ").concat(I," 0 Z");break;case"pentagon":i="M ".concat(.5*I," 0 L 0 ").concat(.375*g," L ").concat(.15*I," ").concat(g," L ").concat(.85*I," ").concat(g," L ").concat(I," ").concat(.375*g," Z");break;case"hexagon":case"flowChartPreparation":var Q1=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),GG=1.9685039370078738;Q1&&(GG=parseInt(Q1.substring(4))*wg);var O1=7.874015748031495,Hig=60*Math.PI/180,U1=Math.min(I,g),E1=3.9370078740157477*I/U1,MM=U1*(GG<0?0:GG>E1?E1:GG)/O1,P1=I-MM,_1=9.092125984251968*(g/2)/O1*Math.sin(Hig),wG=g/2,q1=wG-_1,$1=wG+_1;i="M 0,".concat(wG," L ").concat(MM,",").concat(q1," L ").concat(P1,",").concat(q1," L ").concat(I,",").concat(wG," L ").concat(P1,",").concat($1," L ").concat(MM,",").concat($1," z");break;case"heptagon":i="M ".concat(.5*I," 0 L ").concat(I/8," ").concat(g/4," L 0 ").concat(5/8*g," L ").concat(I/4," ").concat(g," L ").concat(3/4*I," ").concat(g," L ").concat(I," ").concat(5/8*g," L ").concat(7/8*I," ").concat(g/4," Z");break;case"octagon":var gK=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),md=.25;gK&&(md=parseInt(gK.substring(4))/1e5);var pG=1-md;i="M ".concat(md*I," 0 L 0 ").concat(md*g," L 0 ").concat(pG*g," L ").concat(md*I," ").concat(g," L ").concat(pG*I," ").concat(g," L ").concat(I," ").concat(pG*g," L ").concat(I," ").concat(md*g," L ").concat(pG*I," 0 Z");break;case"decagon":i="M ".concat(3/8*I," 0 L ").concat(I/8," ").concat(g/8," L 0 ").concat(g/2," L ").concat(I/8," ").concat(7/8*g," L ").concat(3/8*I," ").concat(g," L ").concat(5/8*I," ").concat(g," L ").concat(7/8*I," ").concat(7/8*g," L ").concat(I," ").concat(g/2," L ").concat(7/8*I," ").concat(g/8," L ").concat(5/8*I," 0 Z");break;case"dodecagon":i="M ".concat(3/8*I," 0 L ").concat(I/8," ").concat(g/8," L 0 ").concat(3/8*g," L 0 ").concat(5/8*g," L ").concat(I/8," ").concat(7/8*g," L ").concat(3/8*I," ").concat(g," L ").concat(5/8*I," ").concat(g," L ").concat(7/8*I," ").concat(7/8*g," L ").concat(I," ").concat(5/8*g," L ").concat(I," ").concat(3/8*g," L ").concat(7/8*I," ").concat(g/8," L ").concat(5/8*I," 0 Z");break;case"star4":var BG=I/2,WG=g/2,Xig=I/2,Sig=g/2,yG=1.503779527559055,YG=3.9370078740157477,RM=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);RM&&RM.attrs.name==="adj"&&(yG=parseInt(RM.attrs.fmla.substring(4))*wg);var IK=yG<0?0:yG>YG?YG:yG,Dig=Sig*IK/YG,CK=Xig*IK/YG*Math.cos(.7853981634),tK=Dig*Math.sin(.7853981634),iK=BG-CK,eK=BG+CK,AK=WG-tK,sK=WG+tK;i="M 0,".concat(WG," L ").concat(iK,",").concat(AK," L ").concat(BG,",0 L ").concat(eK,",").concat(AK," L ").concat(I,",").concat(WG," L ").concat(eK,",").concat(sK," L ").concat(BG,",").concat(g," L ").concat(iK,",").concat(sK," z");break;case"star5":var SA=I/2,Kig=g/2,Fig=I/2,kig=g/2,NG=1.503779527559055,lK=8.279212598425197,fM=8.70527559055118,VG=3.9370078740157477,HM=7.874015748031495,Zd=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);Zd&&Object.keys(Zd).forEach(function(Rg){var NI=Zd[Rg].attrs.name;NI==="adj"?NG=parseInt(Zd[Rg].attrs.fmla.substring(4))*wg:NI==="hf"?lK=parseInt(Zd[Rg].attrs.fmla.substring(4))*wg:NI==="vf"&&(fM=parseInt(Zd[Rg].attrs.fmla.substring(4))*wg)});var nK=NG<0?0:NG>VG?VG:NG,XM=Fig*lK/HM,SM=kig*fM/HM,D0=Kig*fM/HM,aK=XM*Math.cos(.31415926536),oK=XM*Math.cos(5.3407075111),zig=SA-aK,Jig=SA-oK,Lig=SA+oK,vig=SA+aK,cK=D0-SM*Math.sin(.31415926536),dK=D0-SM*Math.sin(5.3407075111),rK=XM*nK/VG,DM=SM*nK/VG,hK=rK*Math.cos(5.9690260418),bK=rK*Math.cos(.94247779608),Tig=SA-hK,xig=SA-bK,jig=SA+bK,Qig=SA+hK,uK=D0-DM*Math.sin(.94247779608),mK=D0-DM*Math.sin(5.9690260418),Oig=D0+DM;i="M ".concat(zig,",").concat(cK," L ").concat(xig,",").concat(uK," L ").concat(SA,",0 L ").concat(jig,",").concat(uK," L ").concat(vig,",").concat(cK," L ").concat(Qig,",").concat(mK," L ").concat(Lig,",").concat(dK," L ").concat(SA,",").concat(Oig," L ").concat(Jig,",").concat(dK," L ").concat(Tig,",").concat(mK," z");break;case"star6":var $l=I/2,K0=g/2,Uig=I/2,Eig=g/2,KM=g/4,MG=2.2730708661417323,ZK=9.092125984251968,RG=3.9370078740157477,F0=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);F0&&Object.keys(F0).forEach(function(Rg){var NI=F0[Rg].attrs.name;NI==="adj"?MG=parseInt(F0[Rg].attrs.fmla.substring(4))*wg:NI==="hf"&&(ZK=parseInt(F0[Rg].attrs.fmla.substring(4))*wg)});var GK=MG<0?0:MG>RG?RG:MG,wK=Uig*ZK/7.874015748031495,pK=wK*Math.cos(.5235987756),BK=$l-pK,WK=$l+pK,yK=K0+KM,FM=wK*GK/RG,YK=FM/2,Pig=$l-FM,NK=$l-YK,VK=$l+YK,_ig=$l+FM,MK=Eig*GK/RG*Math.sin(1.0471975512),RK=K0-MK,fK=K0+MK;i="M ".concat(BK,",").concat(KM," L ").concat(NK,",").concat(RK," L ").concat($l,",0 L ").concat(VK,",").concat(RK," L ").concat(WK,",").concat(KM," L ").concat(_ig,",").concat(K0," L ").concat(WK,",").concat(yK," L ").concat(VK,",").concat(fK," L ").concat($l,",").concat(g," L ").concat(NK,",").concat(fK," L ").concat(BK,",").concat(yK," L ").concat(Pig,",").concat(K0," z");break;case"star7":var Mi=I/2,qig=g/2,$ig=I/2,geg=g/2,fG=2.7244881889763777,HK=8.076535433070866,kM=8.284251968503936,HG=3.9370078740157477,zM=7.874015748031495,Gd=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);Gd&&Object.keys(Gd).forEach(function(Rg){var NI=Gd[Rg].attrs.name;NI==="adj"?fG=parseInt(Gd[Rg].attrs.fmla.substring(4))*wg:NI==="hf"?HK=parseInt(Gd[Rg].attrs.fmla.substring(4))*wg:NI==="vf"&&(kM=parseInt(Gd[Rg].attrs.fmla.substring(4))*wg)});var XK=fG<0?0:fG>HG?HG:fG,XG=$ig*HK/zM,SG=geg*kM/zM,Pa=qig*kM/zM,SK=97493*XG/1e5,DK=78183*XG/1e5,KK=43388*XG/1e5,Ieg=Mi-DK,Ceg=Mi-KK,teg=Mi+KK,ieg=Mi+DK,eeg=Mi+SK,FK=Pa-62349*SG/1e5,kK=Pa+22252*SG/1e5,zK=Pa+90097*SG/1e5,JM=XG*XK/HG,DG=SG*XK/HG,JK=97493*JM/1e5,LK=78183*JM/1e5,vK=43388*JM/1e5,Aeg=Mi-JK,seg=Mi-LK,leg=Mi-vK,neg=Mi+vK,aeg=Mi+LK,oeg=Mi+JK,TK=Pa-90097*DG/1e5,xK=Pa-22252*DG/1e5,jK=Pa+62349*DG/1e5,ceg=Pa+DG;i="M ".concat(Mi-SK,",").concat(kK," L ").concat(Aeg,",").concat(xK," L ").concat(Ieg,",").concat(FK," L ").concat(leg,",").concat(TK," L ").concat(Mi,",0 L ").concat(neg,",").concat(TK," L ").concat(ieg,",").concat(FK," L ").concat(oeg,",").concat(xK," L ").concat(eeg,",").concat(kK," L ").concat(aeg,",").concat(jK," L ").concat(teg,",").concat(zK," L ").concat(Mi,",").concat(ceg," L ").concat(Ceg,",").concat(zK," L ").concat(seg,",").concat(jK," z");break;case"star8":var gn=I/2,In=g/2,QK=I/2,OK=g/2,KG=2.9527559055118107,FG=3.9370078740157477,LM=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);LM&&LM.attrs.name==="adj"&&(KG=parseInt(LM.attrs.fmla.substring(4))*wg);var UK=KG<0?0:KG>FG?FG:KG,EK=QK*Math.cos(.7853981634),PK=gn-EK,_K=gn+EK,qK=OK*Math.sin(.7853981634),$K=In-qK,gF=In+qK,IF=QK*UK/FG,CF=OK*UK/FG,tF=92388*IF/1e5,iF=38268*IF/1e5,eF=92388*CF/1e5,AF=38268*CF/1e5,sF=gn-tF,lF=gn-iF,nF=gn+iF,aF=gn+tF,oF=In-eF,cF=In-AF,dF=In+AF,rF=In+eF;i="M 0,".concat(In," L ").concat(sF,",").concat(cF," L ").concat(PK,",").concat($K," L ").concat(lF,",").concat(oF," L ").concat(gn,",0 L ").concat(nF,",").concat(oF," L ").concat(_K,",").concat($K," L ").concat(aF,",").concat(cF," L ").concat(I,",").concat(In," L ").concat(aF,",").concat(dF," L ").concat(_K,",").concat(gF," L ").concat(nF,",").concat(rF," L ").concat(gn,",").concat(g," L ").concat(lF,",").concat(rF," L ").concat(PK,",").concat(gF," L ").concat(sF,",").concat(dF," z");break;case"star10":var pe=I/2,DA=g/2,deg=I/2,vM=g/2,kG=3.349055118110236,hF=8.279212598425197,zG=3.9370078740157477,k0=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);k0&&Object.keys(k0).forEach(function(Rg){var NI=k0[Rg].attrs.name;NI==="adj"?kG=parseInt(k0[Rg].attrs.fmla.substring(4))*wg:NI==="hf"&&(hF=parseInt(k0[Rg].attrs.fmla.substring(4))*wg)});var bF=kG<0?0:kG>zG?zG:kG,TM=deg*hF/7.874015748031495,uF=95106*TM/1e5,mF=58779*TM/1e5,ZF=pe-uF,GF=pe-mF,wF=pe+mF,pF=pe+uF,BF=80902*vM/1e5,WF=30902*vM/1e5,yF=DA-BF,YF=DA-WF,NF=DA+WF,VF=DA+BF,JG=TM*bF/zG,MF=vM*bF/zG,RF=80902*JG/1e5,fF=30902*JG/1e5,HF=95106*MF/1e5,XF=58779*MF/1e5,reg=pe-JG,SF=pe-RF,DF=pe-fF,KF=pe+fF,FF=pe+RF,heg=pe+JG,kF=DA-HF,zF=DA-XF,JF=DA+XF,LF=DA+HF;i="M ".concat(ZF,",").concat(YF," L ").concat(SF,",").concat(zF," L ").concat(GF,",").concat(yF," L ").concat(DF,",").concat(kF," L ").concat(pe,",0 L ").concat(KF,",").concat(kF," L ").concat(wF,",").concat(yF," L ").concat(FF,",").concat(zF," L ").concat(pF,",").concat(YF," L ").concat(heg,",").concat(DA," L ").concat(pF,",").concat(NF," L ").concat(FF,",").concat(JF," L ").concat(wF,",").concat(VF," L ").concat(KF,",").concat(LF," L ").concat(pe,",").concat(g," L ").concat(DF,",").concat(LF," L ").concat(GF,",").concat(VF," L ").concat(SF,",").concat(JF," L ").concat(ZF,",").concat(NF," L ").concat(reg,",").concat(DA," z");break;case"star12":var KA=I/2,FA=g/2,vF=I/2,TF=g/2,xF=g/4,jF=I/4,LG=2.9527559055118107,vG=3.9370078740157477,xM=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);xM&&xM.attrs.name==="adj"&&(LG=parseInt(xM.attrs.fmla.substring(4))*wg);var QF=LG<0?0:LG>vG?vG:LG,OF=vF*Math.cos(.5235987756),UF=TF*Math.sin(1.0471975512),EF=KA-OF,PF=3*I/4,_F=KA+OF,qF=FA-UF,$F=3*g/4,gk=FA+UF,jM=vF*QF/vG,QM=TF*QF/vG,Ik=jM*Math.cos(.2617993878),Ck=jM*Math.cos(.7853981634),tk=jM*Math.cos(1.308996939),ik=QM*Math.sin(1.308996939),ek=QM*Math.sin(.7853981634),Ak=QM*Math.sin(.2617993878),sk=KA-Ik,lk=KA-Ck,nk=KA-tk,ak=KA+tk,ok=KA+Ck,ck=KA+Ik,dk=FA-ik,rk=FA-ek,hk=FA-Ak,bk=FA+Ak,uk=FA+ek,mk=FA+ik;i="M 0,".concat(FA," L ").concat(sk,",").concat(hk," L ").concat(EF,",").concat(xF," L ").concat(lk,",").concat(rk," L ").concat(jF,",").concat(qF," L ").concat(nk,",").concat(dk," L ").concat(KA,",0 L ").concat(ak,",").concat(dk," L ").concat(PF,",").concat(qF," L ").concat(ok,",").concat(rk," L ").concat(_F,",").concat(xF," L ").concat(ck,",").concat(hk," L ").concat(I,",").concat(FA," L ").concat(ck,",").concat(bk," L ").concat(_F,",").concat($F," L ").concat(ok,",").concat(uk," L ").concat(PF,",").concat(gk," L ").concat(ak,",").concat(mk," L ").concat(KA,",").concat(g," L ").concat(nk,",").concat(mk," L ").concat(jF,",").concat(gk," L ").concat(lk,",").concat(uk," L ").concat(EF,",").concat($F," L ").concat(sk,",").concat(bk," z");break;case"star16":var Ii=I/2,Ci=g/2,TG=I/2,xG=g/2,jG=2.9527559055118107,QG=3.9370078740157477,OM=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);OM&&OM.attrs.name==="adj"&&(jG=parseInt(OM.attrs.fmla.substring(4))*wg);var Zk=jG<0?0:jG>QG?QG:jG,Gk=92388*TG/1e5,wk=70711*TG/1e5,pk=38268*TG/1e5,Bk=92388*xG/1e5,Wk=70711*xG/1e5,yk=38268*xG/1e5,Yk=Ii-Gk,Nk=Ii-wk,Vk=Ii-pk,Mk=Ii+pk,Rk=Ii+wk,fk=Ii+Gk,Hk=Ci-Bk,Xk=Ci-Wk,Sk=Ci-yk,Dk=Ci+yk,Kk=Ci+Wk,Fk=Ci+Bk,OG=TG*Zk/QG,UG=xG*Zk/QG,kk=98079*OG/1e5,zk=83147*OG/1e5,Jk=55557*OG/1e5,Lk=19509*OG/1e5,vk=98079*UG/1e5,Tk=83147*UG/1e5,xk=55557*UG/1e5,jk=19509*UG/1e5,Qk=Ii-kk,Ok=Ii-zk,Uk=Ii-Jk,Ek=Ii-Lk,Pk=Ii+Lk,_k=Ii+Jk,qk=Ii+zk,$k=Ii+kk,g3=Ci-vk,I3=Ci-Tk,C3=Ci-xk,t3=Ci-jk,i3=Ci+jk,e3=Ci+xk,A3=Ci+Tk,s3=Ci+vk;i="M 0,".concat(Ci," L ").concat(Qk,",").concat(t3," L ").concat(Yk,",").concat(Sk," L ").concat(Ok,",").concat(C3," L ").concat(Nk,",").concat(Xk," L ").concat(Uk,",").concat(I3," L ").concat(Vk,",").concat(Hk," L ").concat(Ek,",").concat(g3," L ").concat(Ii,",0 L ").concat(Pk,",").concat(g3," L ").concat(Mk,",").concat(Hk," L ").concat(_k,",").concat(I3," L ").concat(Rk,",").concat(Xk," L ").concat(qk,",").concat(C3," L ").concat(fk,",").concat(Sk," L ").concat($k,",").concat(t3," L ").concat(I,",").concat(Ci," L ").concat($k,",").concat(i3," L ").concat(fk,",").concat(Dk," L ").concat(qk,",").concat(e3," L ").concat(Rk,",").concat(Kk," L ").concat(_k,",").concat(A3," L ").concat(Mk,",").concat(Fk," L ").concat(Pk,",").concat(s3," L ").concat(Ii,",").concat(g," L ").concat(Ek,",").concat(s3," L ").concat(Vk,",").concat(Fk," L ").concat(Uk,",").concat(A3," L ").concat(Nk,",").concat(Kk," L ").concat(Ok,",").concat(e3," L ").concat(Yk,",").concat(Dk," L ").concat(Qk,",").concat(i3," z");break;case"star24":var fC=I/2,HC=g/2,z0=I/2,J0=g/2,beg=g/4,ueg=I/4,EG=2.9527559055118107,PG=3.9370078740157477,UM=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);UM&&UM.attrs.name==="adj"&&(EG=parseInt(UM.attrs.fmla.substring(4))*wg);var l3=EG<0?0:EG>PG?PG:EG,n3=z0*Math.cos(.2617993878),a3=z0*Math.cos(.5235987756),o3=z0*Math.cos(.7853981634),c3=ueg,d3=z0*Math.cos(1.308996939),r3=J0*Math.sin(1.308996939),h3=J0*Math.sin(1.0471975512),b3=J0*Math.sin(.7853981634),u3=beg,m3=J0*Math.sin(.2617993878),Z3=fC-n3,G3=fC-a3,w3=fC-o3,p3=fC-c3,B3=fC-d3,W3=fC+d3,y3=fC+c3,Y3=fC+o3,N3=fC+a3,V3=fC+n3,M3=HC-r3,R3=HC-h3,f3=HC-b3,H3=HC-u3,X3=HC-m3,S3=HC+m3,D3=HC+u3,K3=HC+b3,F3=HC+h3,k3=HC+r3,wd=z0*l3/PG,pd=J0*l3/PG,z3=99144*wd/1e5,J3=92388*wd/1e5,L3=79335*wd/1e5,v3=60876*wd/1e5,T3=38268*wd/1e5,x3=13053*wd/1e5,j3=99144*pd/1e5,Q3=92388*pd/1e5,O3=79335*pd/1e5,U3=60876*pd/1e5,E3=38268*pd/1e5,P3=13053*pd/1e5,_3=fC-z3,q3=fC-J3,$3=fC-L3,gz=fC-v3,Iz=fC-T3,Cz=fC-x3,tz=fC+x3,iz=fC+T3,ez=fC+v3,Az=fC+L3,sz=fC+J3,lz=fC+z3,nz=HC-j3,az=HC-Q3,oz=HC-O3,cz=HC-U3,dz=HC-E3,rz=HC-P3,hz=HC+P3,bz=HC+E3,uz=HC+U3,mz=HC+O3,Zz=HC+Q3,Gz=HC+j3;i="M 0,".concat(HC," L ").concat(_3,",").concat(rz," L ").concat(Z3,",").concat(X3," L ").concat(q3,",").concat(dz," L ").concat(G3,",").concat(H3," L ").concat($3,",").concat(cz," L ").concat(w3,",").concat(f3," L ").concat(gz,",").concat(oz," L ").concat(p3,",").concat(R3," L ").concat(Iz,",").concat(az," L ").concat(B3,",").concat(M3," L ").concat(Cz,",").concat(nz," L ").concat(fC,",0 L ").concat(tz,",").concat(nz," L ").concat(W3,",").concat(M3," L ").concat(iz,",").concat(az," L ").concat(y3,",").concat(R3," L ").concat(ez,",").concat(oz," L ").concat(Y3,",").concat(f3," L ").concat(Az,",").concat(cz," L ").concat(N3,",").concat(H3," L ").concat(sz,",").concat(dz," L ").concat(V3,",").concat(X3," L ").concat(lz,",").concat(rz," L ").concat(I,",").concat(HC," L ").concat(lz,",").concat(hz," L ").concat(V3,",").concat(S3," L ").concat(sz,",").concat(bz," L ").concat(N3,",").concat(D3," L ").concat(Az,",").concat(uz," L ").concat(Y3,",").concat(K3," L ").concat(ez,",").concat(mz," L ").concat(y3,",").concat(F3," L ").concat(iz,",").concat(Zz," L ").concat(W3,",").concat(k3," L ").concat(tz,",").concat(Gz," L ").concat(fC,",").concat(g," L ").concat(Cz,",").concat(Gz," L ").concat(B3,",").concat(k3," L ").concat(Iz,",").concat(Zz," L ").concat(p3,",").concat(F3," L ").concat(gz,",").concat(mz," L ").concat(w3,",").concat(K3," L ").concat($3,",").concat(uz," L ").concat(G3,",").concat(D3," L ").concat(q3,",").concat(bz," L ").concat(Z3,",").concat(S3," L ").concat(_3,",").concat(hz," z");break;case"star32":var eC=I/2,AC=g/2,Cn=I/2,tn=g/2,_G=2.9527559055118107,qG=3.9370078740157477,EM=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);EM&&EM.attrs.name==="adj"&&(_G=parseInt(EM.attrs.fmla.substring(4))*wg);var wz=_G<0?0:_G>qG?qG:_G,pz=98079*Cn/1e5,Bz=92388*Cn/1e5,Wz=83147*Cn/1e5,yz=Cn*Math.cos(.7853981634),Yz=55557*Cn/1e5,Nz=38268*Cn/1e5,Vz=19509*Cn/1e5,Mz=98079*tn/1e5,Rz=92388*tn/1e5,fz=83147*tn/1e5,Hz=tn*Math.sin(.7853981634),Xz=55557*tn/1e5,Sz=38268*tn/1e5,Dz=19509*tn/1e5,Kz=eC-pz,Fz=eC-Bz,kz=eC-Wz,zz=eC-yz,Jz=eC-Yz,Lz=eC-Nz,vz=eC-Vz,Tz=eC+Vz,xz=eC+Nz,jz=eC+Yz,Qz=eC+yz,Oz=eC+Wz,Uz=eC+Bz,Ez=eC+pz,Pz=AC-Mz,_z=AC-Rz,qz=AC-fz,$z=AC-Hz,gJ=AC-Xz,IJ=AC-Sz,CJ=AC-Dz,tJ=AC+Dz,iJ=AC+Sz,eJ=AC+Xz,AJ=AC+Hz,sJ=AC+fz,lJ=AC+Rz,nJ=AC+Mz,en=Cn*wz/qG,An=tn*wz/qG,aJ=99518*en/1e5,oJ=95694*en/1e5,cJ=88192*en/1e5,dJ=77301*en/1e5,rJ=63439*en/1e5,hJ=47140*en/1e5,bJ=29028*en/1e5,uJ=9802*en/1e5,mJ=99518*An/1e5,ZJ=95694*An/1e5,GJ=88192*An/1e5,wJ=77301*An/1e5,pJ=63439*An/1e5,BJ=47140*An/1e5,WJ=29028*An/1e5,yJ=9802*An/1e5,YJ=eC-aJ,NJ=eC-oJ,VJ=eC-cJ,MJ=eC-dJ,RJ=eC-rJ,fJ=eC-hJ,HJ=eC-bJ,XJ=eC-uJ,SJ=eC+uJ,DJ=eC+bJ,KJ=eC+hJ,FJ=eC+rJ,kJ=eC+dJ,zJ=eC+cJ,JJ=eC+oJ,LJ=eC+aJ,vJ=AC-mJ,TJ=AC-ZJ,xJ=AC-GJ,jJ=AC-wJ,QJ=AC-pJ,OJ=AC-BJ,UJ=AC-WJ,EJ=AC-yJ,PJ=AC+yJ,_J=AC+WJ,qJ=AC+BJ,$J=AC+pJ,gL=AC+wJ,IL=AC+GJ,CL=AC+ZJ,tL=AC+mJ;i="M 0,".concat(AC," L ").concat(YJ,",").concat(EJ," L ").concat(Kz,",").concat(CJ," L ").concat(NJ,",").concat(UJ," L ").concat(Fz,",").concat(IJ," L ").concat(VJ,",").concat(OJ," L ").concat(kz,",").concat(gJ," L ").concat(MJ,",").concat(QJ," L ").concat(zz,",").concat($z," L ").concat(RJ,",").concat(jJ," L ").concat(Jz,",").concat(qz," L ").concat(fJ,",").concat(xJ," L ").concat(Lz,",").concat(_z," L ").concat(HJ,",").concat(TJ," L ").concat(vz,",").concat(Pz," L ").concat(XJ,",").concat(vJ," L ").concat(eC,",0 L ").concat(SJ,",").concat(vJ," L ").concat(Tz,",").concat(Pz," L ").concat(DJ,",").concat(TJ," L ").concat(xz,",").concat(_z," L ").concat(KJ,",").concat(xJ," L ").concat(jz,",").concat(qz," L ").concat(FJ,",").concat(jJ," L ").concat(Qz,",").concat($z," L ").concat(kJ,",").concat(QJ," L ").concat(Oz,",").concat(gJ," L ").concat(zJ,",").concat(OJ," L ").concat(Uz,",").concat(IJ," L ").concat(JJ,",").concat(UJ," L ").concat(Ez,",").concat(CJ," L ").concat(LJ,",").concat(EJ," L ").concat(I,",").concat(AC," L ").concat(LJ,",").concat(PJ," L ").concat(Ez,",").concat(tJ," L ").concat(JJ,",").concat(_J," L ").concat(Uz,",").concat(iJ," L ").concat(zJ,",").concat(qJ," L ").concat(Oz,",").concat(eJ," L ").concat(kJ,",").concat($J," L ").concat(Qz,",").concat(AJ," L ").concat(FJ,",").concat(gL," L ").concat(jz,",").concat(sJ," L ").concat(KJ,",").concat(IL," L ").concat(xz,",").concat(lJ," L ").concat(DJ,",").concat(CL," L ").concat(Tz,",").concat(nJ," L ").concat(SJ,",").concat(tL," L ").concat(eC,",").concat(g," L ").concat(XJ,",").concat(tL," L ").concat(vz,",").concat(nJ," L ").concat(HJ,",").concat(CL," L ").concat(Lz,",").concat(lJ," L ").concat(fJ,",").concat(IL," L ").concat(Jz,",").concat(sJ," L ").concat(RJ,",").concat(gL," L ").concat(zz,",").concat(AJ," L ").concat(MJ,",").concat($J," L ").concat(kz,",").concat(eJ," L ").concat(VJ,",").concat(qJ," L ").concat(Fz,",").concat(iJ," L ").concat(NJ,",").concat(_J," L ").concat(Kz,",").concat(tJ," L ").concat(YJ,",").concat(PJ," z");break;case"pie":case"pieWedge":case"arc":var L0,v0,$G,gw,Iw=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);if(t==="pie"?(L0=0,v0=270,$G=g,gw=!0):t==="pieWedge"?(L0=180,v0=270,$G=2*g,gw=!0):t==="arc"&&(L0=270,v0=0,$G=g,gw=!1),Iw){var T0=U(Iw,["attrs","fmla"]),PM=T0;T0===void 0&&(T0=Iw[0].attrs.fmla,PM=Iw[1].attrs.fmla),T0&&(L0=parseInt(T0.substring(4))/6e4),PM&&(v0=parseInt(PM.substring(4))/6e4)}i=function(Rg,NI,pC,vC,TC){var Hi=function(Zu){var Ro=Number(Zu);if(!Number.isFinite(Ro))return 0;var Xe=Ro%360;return Xe<0&&(Xe+=360),Xe},xC=Hi(pC),qC=Hi(vC),rt=qC-xC;rt<0&&(rt+=360),rt=Math.min(Math.max(rt,0),360);var Yt=Number(Rg),_i=Number(NI)/2,Jt=Yt/2,ht=_i,Lt=Jt,At=function(Zu){return Zu*(Math.PI/180)},fe=ht+Math.cos(At(xC))*_i,He=Lt+Math.sin(At(xC))*Jt,uY=ht+Math.cos(At(qC))*_i,mY=Lt+Math.sin(At(qC))*Jt,ZY=rt>180?1:0;return TC?"M".concat(ht,",").concat(Lt," L").concat(fe,",").concat(He," A").concat(_i,",").concat(Jt," 0 ").concat(ZY,",").concat(1," ").concat(uY,",").concat(mY," Z"):"M".concat(fe,",").concat(He," A").concat(_i,",").concat(Jt," 0 ").concat(ZY,",").concat(1," ").concat(uY,",").concat(mY)}($G,I,L0,v0,gw);break;case"chord":var iL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),eL=45,AL=270;if(iL){var sL,Cw=MI(iL);try{for(Cw.s();!(sL=Cw.n()).done;){var _M=sL.value,lL=U(_M,["attrs","name"]);if(lL==="adj1"){var meg=U(_M,["attrs","fmla"]);eL=parseInt(meg.substring(4))/6e4}else if(lL==="adj2"){var Zeg=U(_M,["attrs","fmla"]);AL=parseInt(Zeg.substring(4))/6e4}}}catch(Rg){Cw.e(Rg)}finally{Cw.f()}}var nL=g/2,aL=I/2;i=Mg(aL,nL,aL,nL,eL,AL,!0);break;case"frame":var oL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),tw=.9842519685039369,cL=3.9370078740157477;oL&&(tw=parseInt(oL.substring(4))*wg);var Geg=tw<0?0:tw>cL?cL:tw,Bd=Math.min(I,g)*Geg/7.874015748031495,dL=I-Bd,rL=g-Bd;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(Bd,",").concat(Bd," L ").concat(Bd,",").concat(rL," L ").concat(dL,",").concat(rL," L ").concat(dL,",").concat(Bd," z");break;case"donut":var hL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),iw=1.9685039370078738,bL=3.9370078740157477;hL&&(iw=parseInt(hL.substring(4))*wg);var weg=iw<0?0:iw>bL?bL:iw,uL=Math.min(I,g)*weg/7.874015748031495,x0=I/2-uL,mL=g/2-uL,peg="M ".concat(I/2-I/2,",").concat(g/2," A ").concat(I/2,",").concat(g/2," 0 1,0 ").concat(I/2+I/2,",").concat(g/2," A ").concat(I/2,",").concat(g/2," 0 1,0 ").concat(I/2-I/2,",").concat(g/2," Z"),Beg="M ".concat(I/2+x0,",").concat(g/2," A ").concat(x0,",").concat(mL," 0 1,1 ").concat(I/2-x0,",").concat(g/2," A ").concat(x0,",").concat(mL," 0 1,1 ").concat(I/2+x0,",").concat(g/2," Z");i="".concat(peg," ").concat(Beg);break;case"noSmoking":var ZL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),ew=1.4763779527559053,GL=3.9370078740157477;ZL&&(ew=parseInt(ZL.substring(4))*wg);var Weg=ew<0?0:ew>GL?GL:ew,qM=Math.min(I,g)*Weg/7.874015748031495,Aw=I/2-qM,sw=g/2-qM,$M=Math.atan(g/I),wL=sw*Math.cos($M),pL=Aw*Math.sin($M),yeg=Aw*sw/Math.sqrt(wL*wL+pL*pL),Yeg=qM/2,BL=Math.atan(Yeg/yeg),WL=-Math.PI+2*BL,gR=$M-BL,yL=gR-Math.PI,Neg="M ".concat(I/2-I/2,",").concat(g/2," A ").concat(I/2,",").concat(g/2," 0 1,0 ").concat(I/2+I/2,",").concat(g/2," A ").concat(I/2,",").concat(g/2," 0 1,0 ").concat(I/2-I/2,",").concat(g/2," Z"),YL=I/2,NL=g/2,Veg=aq(YL,NL,Aw,sw,gR,gR+WL),Meg=aq(YL,NL,Aw,sw,yL,yL+WL);i="".concat(Neg," ").concat(Veg," ").concat(Meg);break;case"halfFrame":var VL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),lw=3.5,nw=3.5,aw=7.874015748031495;if(VL){var ML,ow=MI(VL);try{for(ow.s();!(ML=ow.n()).done;){var IR=ML.value,RL=U(IR,["attrs","name"]);RL==="adj1"?lw=parseInt(U(IR,["attrs","fmla"]).substring(4))*wg:RL==="adj2"&&(nw=parseInt(U(IR,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){ow.e(Rg)}finally{ow.f()}}var cw=Math.min(I,g),fL=aw*I/cw,dw=cw*(nw<0?0:nw>fL?fL:nw)/aw,HL=aw*(g-g*dw/I)/cw,CR=cw*(lw<0?0:lw>HL?HL:lw)/aw,Reg=I-CR*I/g,feg=g-dw*g/I;i="M 0,0 L ".concat(I,",0 L ").concat(Reg,",").concat(CR," L ").concat(dw,",").concat(CR," L ").concat(dw,",").concat(feg," L 0,").concat(g," z");break;case"blockArc":var XL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),rw=180,hw=0,bw=1.9685039370078738,SL=3.9370078740157477;if(XL){var DL,uw=MI(XL);try{for(uw.s();!(DL=uw.n()).done;){var mw=DL.value,tR=U(mw,["attrs","name"]);tR==="adj1"?rw=parseInt(U(mw,["attrs","fmla"]).substring(4))/6e4:tR==="adj2"?hw=parseInt(U(mw,["attrs","fmla"]).substring(4))/6e4:tR==="adj3"&&(bw=parseInt(U(mw,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){uw.e(Rg)}finally{uw.f()}}var iR,eR,j0=360,Wd=rw<0?0:rw>j0?j0:rw,Zw=hw<0?0:hw>j0?j0:hw,Heg=bw<0?0:bw>SL?SL:bw,AR=Zw-Wd,KL=AR>0?AR:AR+j0,Q0=Wd+KL,Xeg=Zw+-KL,Gw=Wd*Math.PI/180,ww=Zw*Math.PI/180,sn=I/2,ln=g/2,pw=I/2,Bw=g/2;if(Wd>90&&Wd<270){var FL=sn*Math.sin(Math.PI/2-Gw),kL=ln*Math.cos(Math.PI/2-Gw);iR=pw-sn*Math.cos(Math.atan(kL/FL)),eR=Bw-ln*Math.sin(Math.atan(kL/FL))}else{var zL=sn*Math.sin(Gw),JL=ln*Math.cos(Gw);iR=pw+sn*Math.cos(Math.atan(zL/JL)),eR=Bw+ln*Math.sin(Math.atan(zL/JL))}var sR,lR,LL=Math.min(I,g)*Heg/7.874015748031495,O0=sn-LL,U0=ln-LL;if(Q0<=450&&Q0>270||Q0>=630&&Q0<720){var vL=O0*Math.sin(ww),TL=U0*Math.cos(ww);sR=pw+O0*Math.cos(Math.atan(vL/TL)),lR=Bw+U0*Math.sin(Math.atan(vL/TL))}else{var xL=O0*Math.sin(Math.PI/2-ww),jL=U0*Math.cos(Math.PI/2-ww);sR=pw-O0*Math.cos(Math.atan(jL/xL)),lR=Bw-U0*Math.sin(Math.atan(jL/xL))}i="M ".concat(iR,",").concat(eR," ").concat(Mg(sn,ln,sn,ln,Wd,Q0,!1).replace("M","L")," L ").concat(sR,",").concat(lR," ").concat(Mg(sn,ln,O0,U0,Zw,Xeg,!1).replace("M","L")," z");break;case"bracePair":var QL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),Ww=.6561417322834645,OL=1.9685039370078738;QL&&(Ww=parseInt(QL.substring(4))*wg);var UL=g/2,yw=180,EL=Ww<0?0:Ww>OL?OL:Ww,PL=Math.min(I,g),yC=PL*EL/7.874015748031495,Yw=PL*EL/3.9370078740157477,nR=I-Yw,_L=I-yC,aR=UL-yC,oR=UL+yC,cR=g-yC;i="M ".concat(Yw,",").concat(g," ").concat(Mg(Yw,cR,yC,yC,90,yw,!1).replace("M","L")," L ").concat(yC,",").concat(oR," ").concat(Mg(0,oR,yC,yC,0,-90,!1).replace("M","L")," ").concat(Mg(0,aR,yC,yC,90,0,!1).replace("M","L")," L ").concat(yC,",").concat(yC," ").concat(Mg(Yw,yC,yC,yC,yw,270,!1).replace("M","L")," M ").concat(nR,",0 ").concat(Mg(nR,yC,yC,yC,270,360,!1).replace("M","L")," L ").concat(_L,",").concat(aR," ").concat(Mg(I,aR,yC,yC,yw,90,!1).replace("M","L")," ").concat(Mg(I,oR,yC,yC,270,yw,!1).replace("M","L")," L ").concat(_L,",").concat(cR," ").concat(Mg(nR,cR,yC,yC,0,90,!1).replace("M","L"));break;case"leftBrace":var qL=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Nw=.6561417322834645,Vw=3.9370078740157477,E0=7.874015748031495;if(qL){var $L,Mw=MI(qL);try{for(Mw.s();!($L=Mw.n()).done;){var dR=$L.value,gv=U(dR,["attrs","name"]);gv==="adj1"?Nw=parseInt(U(dR,["attrs","fmla"]).substring(4))*wg:gv==="adj2"&&(Vw=parseInt(U(dR,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){Mw.e(Rg)}finally{Mw.f()}}var Rw=Vw<0?0:Vw>E0?E0:Vw,Iv=Math.min(I,g),Cv=E0-Rw,tv=(Cv<Rw?Cv:Rw)/2*g/Iv,Fs=Iv*(Nw<0?0:Nw>tv?tv:Nw)/E0,iv=g*Rw/E0,Seg=iv-Fs,ev=iv+Fs;i="M ".concat(I,",").concat(g," ").concat(Mg(I,g-Fs,I/2,Fs,90,180,!1).replace("M","L")," L ").concat(I/2,",").concat(ev," ").concat(Mg(0,ev,I/2,Fs,0,-90,!1).replace("M","L")," ").concat(Mg(0,Seg,I/2,Fs,90,0,!1).replace("M","L")," L ").concat(I/2,",").concat(Fs," ").concat(Mg(I,Fs,I/2,Fs,180,270,!1).replace("M","L"));break;case"rightBrace":var Av=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),fw=.6561417322834645,Hw=3.9370078740157477,P0=7.874015748031495;if(Av){var sv,Xw=MI(Av);try{for(Xw.s();!(sv=Xw.n()).done;){var rR=sv.value,lv=U(rR,["attrs","name"]);lv==="adj1"?fw=parseInt(U(rR,["attrs","fmla"]).substring(4))*wg:lv==="adj2"&&(Hw=parseInt(U(rR,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){Xw.e(Rg)}finally{Xw.f()}}var Sw=Hw<0?0:Hw>P0?P0:Hw,nv=Math.min(I,g),av=P0-Sw,ov=(av<Sw?av:Sw)/2*g/nv,nn=nv*(fw<0?0:fw>ov?ov:fw)/P0,cv=g*Sw/P0,dv=cv-nn,rv=g-nn;i="M 0,0 ".concat(Mg(0,nn,I/2,nn,270,360,!1).replace("M","L")," L ").concat(I/2,",").concat(dv," ").concat(Mg(I,dv,I/2,nn,180,90,!1).replace("M","L")," ").concat(Mg(I,cv+nn,I/2,nn,270,180,!1).replace("M","L")," L ").concat(I/2,",").concat(rv," ").concat(Mg(0,rv,I/2,nn,0,90,!1).replace("M","L"));break;case"bracketPair":var hv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),Dw=1.3123622047244095,bv=3.9370078740157477;hv&&(Dw=parseInt(hv.substring(4))*wg);var Deg=Dw<0?0:Dw>bv?bv:Dw,Ri=Math.min(I,g)*Deg/7.874015748031495,uv=I-Ri,mv=g-Ri;i="".concat(Mg(Ri,Ri,Ri,Ri,270,180,!1)," ").concat(Mg(Ri,mv,Ri,Ri,180,90,!1).replace("M","L")," ").concat(Mg(uv,Ri,Ri,Ri,270,360,!1)," ").concat(Mg(uv,mv,Ri,Ri,0,90,!1).replace("M","L"));break;case"leftBracket":var Zv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),Kw=.6561417322834645,Gv=3.9370078740157477*g/Math.min(I,g);Zv&&(Kw=parseInt(Zv.substring(4))*wg);var Keg=Kw<0?0:Kw>Gv?Gv:Kw,IA=Math.min(I,g)*Keg/7.874015748031495;IA>I&&(IA=I);var Feg=g-IA;i="M ".concat(I,",").concat(g," ").concat(Mg(IA,Feg,IA,IA,90,180,!1).replace("M","L")," L 0,").concat(IA," ").concat(Mg(IA,IA,IA,IA,180,270,!1).replace("M","L")," L ").concat(I,",0");break;case"rightBracket":var wv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),Fw=.6561417322834645,pv=3.9370078740157477*g/Math.min(I,g);wv&&(Fw=parseInt(wv.substring(4))*wg);var keg=Fw<0?0:Fw>pv?pv:Fw,_a=Math.min(I,g)*keg/7.874015748031495,zeg=g-_a,Bv=I-_a;i="M 0,".concat(g," ").concat(Mg(Bv,zeg,_a,_a,90,0,!1).replace("M","L")," L ").concat(I,",").concat(g/2," ").concat(Mg(Bv,_a,_a,_a,360,270,!1).replace("M","L")," L 0,0");break;case"moon":var Wv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),yv=.5;Wv&&(yv=parseInt(Wv.substring(4))/1e5);var kw=g/2,Jeg=(1-yv)*I;i="M ".concat(I,",").concat(g," ").concat(Mg(I,kw,I,kw,90,270,!1).replace("M","L")," ").concat(Mg(I,kw,Jeg,kw,270,90,!1).replace("M","L")," z");break;case"corner":var Yv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),zw=3.9370078740157477,Jw=3.9370078740157477,Lw=7.874015748031495;if(Yv){var Nv,vw=MI(Yv);try{for(vw.s();!(Nv=vw.n()).done;){var hR=Nv.value,Vv=U(hR,["attrs","name"]);Vv==="adj1"?zw=parseInt(U(hR,["attrs","fmla"]).substring(4))*wg:Vv==="adj2"&&(Jw=parseInt(U(hR,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){vw.e(Rg)}finally{vw.f()}}var Tw=Math.min(I,g),Mv=Lw*g/Tw,Rv=Lw*I/Tw,fv=Tw*(Jw<0?0:Jw>Rv?Rv:Jw)/Lw,Hv=g-Tw*(zw<0?0:zw>Mv?Mv:zw)/Lw;i="M 0,0 L ".concat(fv,",0 L ").concat(fv,",").concat(Hv," L ").concat(I,",").concat(Hv," L ").concat(I,",").concat(g," L 0,").concat(g," z");break;case"diagStripe":var Xv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),xw=3.9370078740157477,jw=7.874015748031495;Xv&&(xw=parseInt(Xv.substring(4))*wg);var Sv=xw<0?0:xw>jw?jw:xw,Leg=I*Sv/jw;i="M 0,".concat(g*Sv/jw," L ").concat(Leg,",0 L ").concat(I,",0 L 0,").concat(g," z");break;case"gear6":case"gear9":i=function(Rg,NI){for(var pC=1.5*Rg,vC=pC,TC=pC,Hi=NI,xC=pC,qC=Rg,rt=2*Math.PI,Yt=rt/(2*Hi),_i=35*Yt*.005,Jt=50*Yt*.005,ht=Yt,Lt=!1,At=" M"+(vC+xC*Math.cos(Jt))+" "+(TC+xC*Math.sin(Jt));ht<=rt+Yt;ht+=Yt)Lt?(At+=" L"+(vC+qC*Math.cos(ht-_i))+","+(TC+qC*Math.sin(ht-_i)),At+=" L"+(vC+xC*Math.cos(ht+Jt))+","+(TC+xC*Math.sin(ht+Jt))):(At+=" L"+(vC+xC*Math.cos(ht-Jt))+","+(TC+xC*Math.sin(ht-Jt)),At+=" L"+(vC+qC*Math.cos(ht+_i))+","+(TC+qC*Math.sin(ht+_i))),Lt=!Lt;return At+" "}(I,g/3.5,parseInt(t.substring(4)));break;case"bentConnector3":var Dv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),bR=.5;Dv&&(bR=parseInt(Dv.substring(4))/1e5),i="M 0 0 L ".concat(bR*I," 0 L ").concat(bR*I," ").concat(g," L ").concat(I," ").concat(g);break;case"plus":var Kv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),kA=.25;Kv&&(kA=parseInt(Kv.substring(4))/1e5);var an=1-kA;i="M ".concat(kA*I," 0 L ").concat(kA*I," ").concat(kA*g," L 0 ").concat(kA*g," L 0 ").concat(an*g," L ").concat(kA*I," ").concat(an*g," L ").concat(kA*I," ").concat(g," L ").concat(an*I," ").concat(g," L ").concat(an*I," ").concat(an*g," L ").concat(I," ").concat(an*g," L ").concat(I," ").concat(kA*g," L ").concat(an*I," ").concat(kA*g," L ").concat(an*I," 0 Z");break;case"teardrop":var Fv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),_0=7.874015748031495,kv=_0,zv=15.74803149606299;Fv&&(_0=parseInt(Fv.substring(4))*wg);var Jv=_0<0?0:_0>zv?zv:_0,Lv=Math.sqrt(2),veg=Lv*(I/2)*Jv/kv,Teg=Lv*(g/2)*Jv/kv,vv=45*Math.PI/180,xeg=veg*Math.cos(vv),jeg=Teg*Math.cos(vv),Tv=I/2+xeg,xv=g/2-jeg,Qeg=(I/2+Tv)/2,Oeg=(g/2+xv)/2;i="".concat(Mg(I/2,g/2,I/2,g/2,180,270,!1)," Q ").concat(Qeg,",0 ").concat(Tv,",").concat(xv," Q ").concat(I,",").concat(Oeg," ").concat(I,",").concat(g/2," ").concat(Mg(I/2,g/2,I/2,g/2,0,90,!1).replace("M","L")," ").concat(Mg(I/2,g/2,I/2,g/2,90,180,!1).replace("M","L")," z");break;case"plaque":var jv=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),Qw=1.3123622047244095,Qv=3.9370078740157477;jv&&(Qw=parseInt(jv.substring(4))*wg);var Be=(Qw<0?0:Qw>Qv?Qv:Qw)*Math.min(I,g)/7.874015748031495,Ueg=I-Be,Eeg=g-Be;i="M 0,".concat(Be," ").concat(Mg(0,0,Be,Be,90,0,!1).replace("M","L")," L ").concat(Ueg,",0 ").concat(Mg(I,0,Be,Be,180,90,!1).replace("M","L")," L ").concat(I,",").concat(Eeg," ").concat(Mg(I,g,Be,Be,270,180,!1).replace("M","L")," L ").concat(Be,",").concat(g," ").concat(Mg(0,g,Be,Be,0,-90,!1).replace("M","L")," z");break;case"sun":var Ov=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),ks=wg,Ow=25e3*ks,Uv=12500*ks,Ev=46875*ks;Ov&&(Ow=parseInt(Ov.substring(4))*ks);var Pv=Ow<Uv?Uv:Ow>Ev?Ev:Ow,uR=5e4*ks,JC=1e5*ks,Uw=uR-Pv,Ew=3*(uR-30274*Uw/32768)/4,_v=3*(uR-12540*Uw/32768)/4,mR=Ew+3662*ks,ZR=_v+36620*ks,GR=_v+12500*ks,qv=JC-Ew,$v=JC-mR,gT=JC-ZR,IT=JC-GR,CT=18436*I/21600,tT=3163*g/21600,iT=3163*I/21600,eT=18436*g/21600,AT=I*Ew/JC,sT=I*mR/JC,lT=I*ZR/JC,nT=I*GR/JC,aT=I*qv/JC,oT=I*$v/JC,cT=I*gT/JC,dT=I*IT/JC,Peg=I*Pv/JC,_eg=I*Uw/JC,qeg=g*Uw/JC,rT=g*Ew/JC,hT=g*mR/JC,bT=g*ZR/JC,uT=g*GR/JC,mT=g*qv/JC,ZT=g*$v/JC,GT=g*gT/JC,wT=g*IT/JC;i="M ".concat(I,",").concat(g/2," L ").concat(aT,",").concat(wT," L ").concat(aT,",").concat(uT," z M ").concat(CT,",").concat(tT," L ").concat(oT,",").concat(GT," L ").concat(lT,",").concat(hT," z M ").concat(I/2,",0 L ").concat(dT,",").concat(rT," L ").concat(nT,",").concat(rT," z M ").concat(iT,",").concat(tT," L ").concat(cT,",").concat(hT," L ").concat(sT,",").concat(GT," z M 0,").concat(g/2," L ").concat(AT,",").concat(uT," L ").concat(AT,",").concat(wT," z M ").concat(iT,",").concat(eT," L ").concat(sT,",").concat(bT," L ").concat(cT,",").concat(ZT," z M ").concat(I/2,",").concat(g," L ").concat(nT,",").concat(mT," L ").concat(dT,",").concat(mT," z M ").concat(CT,",").concat(eT," L ").concat(lT,",").concat(ZT," L ").concat(oT,",").concat(bT," z M ").concat(Peg,",").concat(g/2," ").concat(Mg(I/2,g/2,_eg,qeg,180,540,!1).replace("M","L")," z");break;case"heart":var pT=49*I/48,BT=10*I/48,$eg=I/2-pT,gAg=I/2-BT,IAg=I/2+BT,CAg=I/2+pT,WT=-g/3;i="M ".concat(I/2,",").concat(g/4," C ").concat(IAg,",").concat(WT," ").concat(CAg,",").concat(g/4," ").concat(I/2,",").concat(g," C ").concat($eg,",").concat(g/4," ").concat(gAg,",").concat(WT," ").concat(I/2,",").concat(g/4," z");break;case"lightningBolt":var tAg=5022*I/21600,iAg=11050*I/21600,eAg=10012*I/21600,AAg=14767*I/21600,sAg=12222*I/21600,lAg=12860*I/21600,nAg=7602*I/21600,aAg=16577*I/21600,oAg=3890*g/21600,cAg=6080*g/21600,dAg=6797*g/21600,rAg=12877*g/21600,hAg=9705*g/21600,bAg=12007*g/21600,uAg=13987*g/21600,mAg=8382*g/21600,ZAg=14915*g/21600;i="M ".concat(8472*I/21600,",0 L ").concat(lAg,",").concat(cAg," L ").concat(iAg,",").concat(dAg," L ").concat(aAg,",").concat(bAg," L ").concat(AAg,",").concat(rAg," L ").concat(I,",").concat(g," L ").concat(eAg,",").concat(ZAg," L ").concat(sAg,",").concat(uAg," L ").concat(tAg,",").concat(hAg," L ").concat(nAg,",").concat(mAg," L 0,").concat(oAg," z");break;case"cube":var yT=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),wR=wg,Pw=25e3*wR;yT&&(Pw=parseInt(yT.substring(4))*wR);var pR=1e5*wR,on=Math.min(I,g)*(Pw<0?0:Pw>pR?pR:Pw)/pR,GAg=g-on,q0=I-on;i="M 0,".concat(on," L ").concat(on,",0 L ").concat(I,",0 L ").concat(I,",").concat(GAg," L ").concat(q0,",").concat(g," L 0,").concat(g," z M 0,").concat(on," L ").concat(q0,",").concat(on," M ").concat(q0,",").concat(on," L ").concat(I,",0 M ").concat(q0,",").concat(on," L ").concat(q0,",").concat(g);break;case"bevel":var YT=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),BR=wg,_w=12500*BR;YT&&(_w=parseInt(YT.substring(4))*BR);var NT=5e4*BR,zA=Math.min(I,g)*(_w<0?0:_w>NT?NT:_w)/7.874015748031495,qw=I-zA,$w=g-zA;i="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z M ").concat(zA,",").concat(zA," L ").concat(qw,",").concat(zA," L ").concat(qw,",").concat($w," L ").concat(zA,",").concat($w," z M 0,0 L ").concat(zA,",").concat(zA," M 0,").concat(g," L ").concat(zA,",").concat($w," M ").concat(I,",0 L ").concat(qw,",").concat(zA," M ").concat(I,",").concat(g," L ").concat(qw,",").concat($w);break;case"foldedCorner":var VT=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),WR=wg,gp=16667*WR;VT&&(gp=parseInt(VT.substring(4))*WR);var MT=5e4*WR,yR=Math.min(I,g)*(gp<0?0:gp>MT?MT:gp)/7.874015748031495,RT=yR/5,YR=I-yR,wAg=YR+RT,NR=g-yR,pAg=NR+RT;i="M ".concat(YR,",").concat(g," L ").concat(wAg,",").concat(pAg," L ").concat(I,",").concat(NR," L ").concat(YR,",").concat(g," L 0,").concat(g," L 0,0 L ").concat(I,",0 L ").concat(I,",").concat(NR);break;case"cloud":case"cloudCallout":for(var fT=3900*I/43200,HT=14370*g/43200,BAg=6753*I/43200,WAg=9190*g/43200,XT=5333*I/43200,yAg=7267*g/43200,YAg=4365*I/43200,ST=5945*g/43200,NAg=4857*I/43200,VAg=6595*g/43200,MAg=7273*g/43200,RAg=6775*I/43200,fAg=9220*g/43200,HAg=5785*I/43200,XAg=7867*g/43200,SAg=6752*I/43200,DAg=9215*g/43200,KAg=7720*I/43200,FAg=10543*g/43200,kAg=4360*I/43200,zAg=5918*g/43200,JAg=4345*I/43200,LAg=function(Rg,NI,pC,vC,TC,Hi){return Mg(Rg-pC*Math.cos(TC*Math.PI/180),NI-vC*Math.sin(TC*Math.PI/180),pC,vC,TC,TC+Hi,!1).replace("M","L")},Ip="M ".concat(fT,",").concat(HT),VR=[fT,HT],MR=0,DT=[[BAg,WAg,-11429249/6e4,7426832/6e4],[XT,yAg,-8646143/6e4,5396714/6e4],[YAg,ST,-8748475/6e4,5983381/6e4],[NAg,VAg,-7859164/6e4,7034504/6e4],[XT,MAg,-4722533/6e4,6541615/6e4],[RAg,fAg,-46.26725,130.269],[HAg,XAg,37501/6e4,6842e3/6e4],[SAg,DAg,22.4516,115.17255],[KAg,FAg,3974558/6e4,4542661/6e4],[kAg,zAg,-16496525/6e4,8804134/6e4],[JAg,ST,-246.8285,152.51885]];MR<DT.length;MR++){var vAg=DT[MR],RR=LAg.apply(void 0,[VR[0],VR[1]].concat(r9(vAg)));Ip+=RR;var TAg=RR.lastIndexOf("L"),KT=RR.substring(TAg+1).split(" ");VR=[parseFloat(KT[0]),parseFloat(KT[1])]}if(Ip+=" z",t==="cloudCallout"){var FT=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),$0=wg,Cp=-20833*$0,kT=62500*$0;if(FT){var zT,tp=MI(FT);try{for(tp.s();!(zT=tp.n()).done;){var fR=zT.value,JT=U(fR,["attrs","name"]);JT==="adj1"?Cp=parseInt(U(fR,["attrs","fmla"]).substring(4))*$0:JT==="adj2"&&(kT=parseInt(U(fR,["attrs","fmla"]).substring(4))*$0)}}catch(Rg){tp.e(Rg)}finally{tp.f()}}var LT=1e5*$0,gb=Math.min(I,g),Ib=I/2,Cb=g/2,HR=I*Cp/LT,XR=g*kT/LT,ip=Ib+HR,ep=Cb+XR,vT=Cb*Math.cos(Math.atan(XR/HR)),TT=Ib*Math.sin(Math.atan(XR/HR)),xT=Ib*Math.cos(Math.atan(TT/vT)),jT=Cb*Math.sin(Math.atan(TT/vT)),Ap=(Cp>=0?Ib+xT:Ib-xT)-ip,sp=(Cp>=0?Cb+jT:Cb-jT)-ep,tb=Math.sqrt(Ap*Ap+sp*sp),QT=(tb-6600*gb/21600)/3,ib=1800*gb/21600,OT=QT+ib,UT=OT*sp/tb+ep,ET=4800*gb/21600+2*QT,PT=ET*sp/tb+ep,lp=1200*gb/21600,np=600*gb/21600,_T=OT*Ap/tb+ip+lp,qT=ET*Ap/tb+ip+ib;Ip+="".concat(Mg(ip+np-np,ep,np,np,0,360,!0)," M ").concat(_T,",").concat(UT," ").concat(Mg(_T-lp,UT,lp,lp,0,360,!0).replace("M","L")," M ").concat(qT,",").concat(PT," ").concat(Mg(qT-ib,PT,ib,ib,0,360,!0).replace("M","L"))}i=Ip;break;case"smileyFace":var $T=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),SR=wg,ap=4653*SR;$T&&(ap=parseInt($T.substring(4))*SR);var op=4653*SR,cp=I/2,DR=g/2,gx=ap<-op?-op:ap>op?op:ap,xAg=16640*I/21600,Ix=16515*g/21600,Cx=g*gx/7.874015748031495,KR=Ix-Cx,tx=Ix+Cx+g*gx/3.9370078740157477,ix=1125*I/21600,ex=1125*g/21600,Ax=7570*g/21600,jAg=13135*I/21600,sx=4969*I/21699;i="".concat(Mg(6215*I/21600,Ax,ix,ex,0,360,!0)," ").concat(Mg(jAg,Ax,ix,ex,0,360,!0)," M ").concat(sx,",").concat(KR," Q ").concat(cp,",").concat(tx," ").concat(xAg,",").concat(KR," Q ").concat(cp,",").concat(tx," ").concat(sx,",").concat(KR," M 0,").concat(DR," ").concat(Mg(cp,DR,cp,DR,180,540,!1).replace("M","L")," z");break;case"verticalScroll":case"horizontalScroll":var lx=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),FR=wg,dp=12500*FR;lx&&(dp=parseInt(lx.substring(4))*FR);var nx=25e3*FR,QAg=Math.min(I,g),eb=g,Ab=I,bC=QAg*(dp<0?0:dp>nx?nx:dp)/7.874015748031495,wI=bC/2,cn=bC/4;if(t==="verticalScroll"){var yd=bC+wI,OAg=bC+bC,rp=Ab-bC,ax=Ab-wI,UAg=rp-wI,kR=eb-bC,qa=eb-wI;i="M ".concat(bC,",").concat(kR," L ").concat(bC,",").concat(wI," ").concat(Mg(yd,wI,wI,wI,180,270,!1).replace("M","L")," L ").concat(ax,",").concat(0," ").concat(Mg(ax,wI,wI,wI,270,450,!1).replace("M","L")," L ").concat(rp,",").concat(bC," L ").concat(rp,",").concat(qa," ").concat(Mg(UAg,qa,wI,wI,0,90,!1).replace("M","L")," L ").concat(wI,",").concat(eb," ").concat(Mg(wI,qa,wI,wI,90,270,!1).replace("M","L")," z M ").concat(yd,",").concat(0," ").concat(Mg(yd,wI,wI,wI,270,450,!1).replace("M","L")," ").concat(Mg(yd,yd/2,cn,cn,90,270,!1).replace("M","L")," L ").concat(OAg,",").concat(wI," M ").concat(rp,",").concat(bC," L ").concat(yd,",").concat(bC," M ").concat(bC,",").concat(qa," ").concat(Mg(wI,qa,wI,wI,0,270,!1).replace("M","L")," ").concat(Mg(wI,(qa+kR)/2,cn,cn,270,450,!1).replace("M","L")," z M ").concat(bC,",").concat(qa," L ").concat(bC,",").concat(kR)}else if(t==="horizontalScroll"){var $a=bC+wI,EAg=bC+bC,zR=eb-bC,ox=eb-wI,cx=zR-wI,hp=Ab-bC,Yd=Ab-wI;i="M ".concat(0,",").concat($a," ").concat(Mg(wI,$a,wI,wI,180,270,!1).replace("M","L")," L ").concat(hp,",").concat(bC," L ").concat(hp,",").concat(wI," ").concat(Mg(Yd,wI,wI,wI,180,360,!1).replace("M","L")," L ").concat(Ab,",").concat(cx," ").concat(Mg(Yd,cx,wI,wI,0,90,!1).replace("M","L")," L ").concat(bC,",").concat(zR," L ").concat(bC,",").concat(ox," ").concat(Mg(wI,ox,wI,wI,0,180,!1).replace("M","L")," z M ").concat(Yd,",").concat(bC," ").concat(Mg(Yd,wI,wI,wI,90,-180,!1).replace("M","L")," ").concat(Mg((hp+Yd)/2,wI,cn,cn,180,0,!1).replace("M","L")," z M ").concat(Yd,",").concat(bC," L ").concat(hp,",").concat(bC," M ").concat(wI,",").concat(EAg," L ").concat(wI,",").concat($a," ").concat(Mg($a/2,$a,cn,cn,180,360,!1).replace("M","L")," ").concat(Mg(wI,$a,wI,wI,0,180,!1).replace("M","L")," M ").concat(bC,",").concat($a," L ").concat(bC,",").concat(zR)}break;case"wedgeEllipseCallout":var dx=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),bp=wg,rx=-20833*bp,hx=62500*bp;if(dx){var bx,up=MI(dx);try{for(up.s();!(bx=up.n()).done;){var JR=bx.value,ux=U(JR,["attrs","name"]);ux==="adj1"?rx=parseInt(U(JR,["attrs","fmla"]).substring(4))*bp:ux==="adj2"&&(hx=parseInt(U(JR,["attrs","fmla"]).substring(4))*bp)}}catch(Rg){up.e(Rg)}finally{up.f()}}var mx=7.874015748031495,Zx=11*Math.PI/180,go=g/2,Io=I/2,Gx=I*rx/mx,wx=g*hx/mx,PAg=Io+Gx,_Ag=go+wx,px=Math.atan2(wx*I,Gx*g),LR=px+Zx,vR=px-Zx,qAg=Io*Math.cos(LR),$Ag=go+go*Math.sin(LR),gsg=Io+Io*Math.cos(vR),Isg=go+go*Math.sin(vR);i="M ".concat(Io+qAg,",").concat($Ag," L ").concat(PAg,",").concat(_Ag," L ").concat(gsg,",").concat(Isg," ").concat(Mg(Io,go,Io,go,180*vR/Math.PI,180*LR/Math.PI,!0).replace("M","L"));break;case"wedgeRectCallout":var Bx=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),mp=wg,Wx=-20833*mp,yx=62500*mp;if(Bx){var Yx,Zp=MI(Bx);try{for(Zp.s();!(Yx=Zp.n()).done;){var TR=Yx.value,Nx=U(TR,["attrs","name"]);Nx==="adj1"?Wx=parseInt(U(TR,["attrs","fmla"]).substring(4))*mp:Nx==="adj2"&&(yx=parseInt(U(TR,["attrs","fmla"]).substring(4))*mp)}}catch(Rg){Zp.e(Rg)}finally{Zp.f()}}var Vx=7.874015748031495,dn=I*Wx/Vx,rn=g*yx/Vx,Gp=I/2+dn,wp=g/2+rn,Csg=dn*g/I,hn=Math.abs(rn)-Math.abs(Csg),sb=I*(dn>0?7:2)/12,Mx=I*(dn>0?10:5)/12,lb=g*(rn>0?7:2)/12,Rx=g*(rn>0?10:5)/12,tsg=hn>0||dn>0?0:Gp,isg=hn>0?rn>0?sb:Gp:sb,esg=hn>0?I:dn>0?Gp:I,Asg=hn>0&&rn>0?Gp:sb,ssg=hn>0||dn>0?lb:wp,lsg=hn>0?rn>0?0:wp:0,nsg=hn>0?lb:dn>0?wp:lb,asg=hn>0&&rn>0?wp:g;i="M 0,0 L ".concat(sb,",0 L ").concat(isg,",").concat(lsg," L ").concat(Mx,",0 L ").concat(I,",0 L ").concat(I,",").concat(lb," L ").concat(esg,",").concat(nsg," L ").concat(I,",").concat(Rx," L ").concat(I,",").concat(g," L ").concat(Mx,",").concat(g," L ").concat(Asg,",").concat(asg," L ").concat(sb,",").concat(g," L 0,").concat(g," L 0,").concat(Rx," L ").concat(tsg,",").concat(ssg," L 0,").concat(lb," z");break;case"wedgeRoundRectCallout":var fx=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Nd=wg,Hx=-20833*Nd,Xx=62500*Nd,Sx=16667*Nd;if(fx){var Dx,pp=MI(fx);try{for(pp.s();!(Dx=pp.n()).done;){var Bp=Dx.value,xR=U(Bp,["attrs","name"]);xR==="adj1"?Hx=parseInt(U(Bp,["attrs","fmla"]).substring(4))*Nd:xR==="adj2"?Xx=parseInt(U(Bp,["attrs","fmla"]).substring(4))*Nd:xR==="adj3"&&(Sx=parseInt(U(Bp,["attrs","fmla"]).substring(4))*Nd)}}catch(Rg){pp.e(Rg)}finally{pp.f()}}var jR=7.874015748031495,osg=Math.min(I,g),bn=I*Hx/jR,un=g*Xx/jR,Wp=I/2+bn,yp=g/2+un,csg=bn*g/I,mn=Math.abs(un)-Math.abs(csg),nb=I*(bn>0?7:2)/12,Kx=I*(bn>0?10:5)/12,ab=g*(un>0?7:2)/12,Fx=g*(un>0?10:5)/12,dsg=mn>0||bn>0?0:Wp,rsg=mn>0?un>0?nb:Wp:nb,hsg=mn>0?I:bn>0?Wp:I,bsg=mn>0&&un>0?Wp:nb,usg=mn>0||bn>0?ab:yp,msg=mn>0?un>0?0:yp:0,Zsg=mn>0?ab:bn>0?yp:ab,Gsg=mn>0&&un>0?yp:g,ti=osg*Sx/jR,QR=I-ti,OR=g-ti;i="M 0,".concat(ti," ").concat(Mg(ti,ti,ti,ti,180,270,!1).replace("M","L")," L ").concat(nb,",0 L ").concat(rsg,",").concat(msg," L ").concat(Kx,",0 L ").concat(QR,",0 ").concat(Mg(QR,ti,ti,ti,270,360,!1).replace("M","L")," L ").concat(I,",").concat(ab," L ").concat(hsg,",").concat(Zsg," L ").concat(I,",").concat(Fx," L ").concat(I,",").concat(OR," ").concat(Mg(QR,OR,ti,ti,0,90,!1).replace("M","L")," L ").concat(Kx,",").concat(g," L ").concat(bsg,",").concat(Gsg," L ").concat(nb,",").concat(g," L ").concat(ti,",").concat(g," ").concat(Mg(ti,OR,ti,ti,90,180,!1).replace("M","L")," L 0,").concat(Fx," L ").concat(dsg,",").concat(usg," L 0,").concat(ab," z");break;case"accentBorderCallout1":case"accentBorderCallout2":case"accentBorderCallout3":case"borderCallout1":case"borderCallout2":case"borderCallout3":case"accentCallout1":case"accentCallout2":case"accentCallout3":case"callout1":case"callout2":case"callout3":var Zn=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),uI=wg,Qi=18750*uI,Oi=-8333*uI,Ui=18750*uI,Ei=-16667*uI,zs=1e5*uI,Js=-16667*uI,ob=112963*uI,cb=-8333*uI;if(Zn){var kx,Yp=MI(Zn);try{for(Yp.s();!(kx=Yp.n()).done;){var Ls=kx.value,Gn=U(Ls,["attrs","name"]);Gn==="adj1"?Qi=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj2"?Oi=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj3"?Ui=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj4"?Ei=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj5"?zs=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj6"?Js=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj7"?ob=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI:Gn==="adj8"&&(cb=parseInt(U(Ls,["attrs","fmla"]).substring(4))*uI)}}catch(Rg){Yp.e(Rg)}finally{Yp.f()}}var Wt,We,ye,Ye,wn,pn,Np,Vp,UI=1e5*uI,Vd="M 0,0 L ".concat(I,",0 L ").concat(I,",").concat(g," L 0,").concat(g," z");switch(t){case"borderCallout1":case"callout1":Zn||(Qi=18750*uI,Oi=-8333*uI,Ui=112500*uI,Ei=-38333*uI),We=g*Qi/UI,Wt=I*Oi/UI,Ye=g*Ui/UI,ye=I*Ei/UI,i="".concat(Vd," M ").concat(Wt,",").concat(We," L ").concat(ye,",").concat(Ye);break;case"borderCallout2":case"callout2":Zn||(Qi=18750*uI,Oi=-8333*uI,Ui=18750*uI,Ei=-16667*uI,zs=112500*uI,Js=-46667*uI),We=g*Qi/UI,Wt=I*Oi/UI,Ye=g*Ui/UI,ye=I*Ei/UI,pn=g*zs/UI,wn=I*Js/UI,i="".concat(Vd," M ").concat(Wt,",").concat(We," L ").concat(ye,",").concat(Ye," L ").concat(wn,",").concat(pn);break;case"borderCallout3":case"callout3":Zn||(Qi=18750*uI,Oi=-8333*uI,Ui=18750*uI,Ei=-16667*uI,zs=1e5*uI,Js=-16667*uI,ob=112963*uI,cb=-8333*uI),We=g*Qi/UI,Wt=I*Oi/UI,Ye=g*Ui/UI,ye=I*Ei/UI,pn=g*zs/UI,wn=I*Js/UI,Vp=g*ob/UI,Np=I*cb/UI,i="".concat(Vd," M ").concat(Wt,",").concat(We," L ").concat(ye,",").concat(Ye," L ").concat(wn,",").concat(pn," L ").concat(Np,",").concat(Vp);break;case"accentBorderCallout1":case"accentCallout1":Zn||(Qi=18750*uI,Oi=-8333*uI,Ui=112500*uI,Ei=-38333*uI),We=g*Qi/UI,Wt=I*Oi/UI,Ye=g*Ui/UI,ye=I*Ei/UI,i="".concat(Vd," M ").concat(Wt,",").concat(We," L ").concat(ye,",").concat(Ye," M ").concat(Wt,",0 L ").concat(Wt,",").concat(g);break;case"accentBorderCallout2":case"accentCallout2":Zn||(Qi=18750*uI,Oi=-8333*uI,Ui=18750*uI,Ei=-16667*uI,zs=112500*uI,Js=-46667*uI),We=g*Qi/UI,Wt=I*Oi/UI,Ye=g*Ui/UI,ye=I*Ei/UI,pn=g*zs/UI,wn=I*Js/UI,i="".concat(Vd," M ").concat(Wt,",").concat(We," L ").concat(ye,",").concat(Ye," L ").concat(wn,",").concat(pn," M ").concat(Wt,",0 L ").concat(Wt,",").concat(g);break;case"accentBorderCallout3":case"accentCallout3":Zn||(Qi=18750*uI,Oi=-8333*uI,Ui=18750*uI,Ei=-16667*uI,zs=1e5*uI,Js=-16667*uI,ob=112963*uI,cb=-8333*uI),We=g*Qi/UI,Wt=I*Oi/UI,Ye=g*Ui/UI,ye=I*Ei/UI,pn=g*zs/UI,wn=I*Js/UI,Vp=g*ob/UI,Np=I*cb/UI,i="".concat(Vd," M ").concat(Wt,",").concat(We," L ").concat(ye,",").concat(Ye," L ").concat(wn,",").concat(pn," L ").concat(Np,",").concat(Vp," M ").concat(Wt,",0 L ").concat(Wt,",").concat(g)}break;case"leftRightRibbon":var zx=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),vs=wg,Mp=5e4*vs,Rp=5e4*vs,fp=16667*vs;if(zx){var Jx,Hp=MI(zx);try{for(Hp.s();!(Jx=Hp.n()).done;){var Xp=Jx.value,UR=U(Xp,["attrs","name"]);UR==="adj1"?Mp=parseInt(U(Xp,["attrs","fmla"]).substring(4))*vs:UR==="adj2"?Rp=parseInt(U(Xp,["attrs","fmla"]).substring(4))*vs:UR==="adj3"&&(fp=parseInt(U(Xp,["attrs","fmla"]).substring(4))*vs)}}catch(Rg){Hp.e(Rg)}finally{Hp.f()}}var Lx=33333*vs,ER=1e5*vs,vx=2e5*vs,PR=Math.min(I,g),Bn=I/2,Tx=g/2,_R=fp<0?0:fp>Lx?Lx:fp,xx=ER-_R,jx=ER*(Bn-I/32)/PR,db=PR*(Rp<0?0:Rp>jx?jx:Rp)/ER,Sp=I-db,qR=g*(Mp<0?0:Mp>xx?xx:Mp)/vx,Qx=g*_R/-vx,Wn=Tx+Qx-qR,$R=Tx+qR-Qx,gf=Wn+qR,wsg=g-gf,Md=2*gf,If=g-(Md-Wn),Rd=_R*PR/31.49606299212598,Cf=Bn-I/32,Ox=Bn+I/32,Ux=Wn+Rd,Ex=If-Rd;i="M 0,".concat(gf," L ").concat(db,",0 L ").concat(db,",").concat(Wn," L ").concat(Bn,",").concat(Wn," ").concat(Mg(Bn,Ux,I/32,Rd,270,450,!1).replace("M","L")," ").concat(Mg(Bn,Ex,I/32,Rd,270,90,!1).replace("M","L")," L ").concat(Sp,",").concat(If," L ").concat(Sp,",").concat(g-Md," L ").concat(I,",").concat(wsg," L ").concat(Sp,",").concat(g," L ").concat(Sp,",").concat($R," L ").concat(Bn,",").concat($R," ").concat(Mg(Bn,$R-Rd,I/32,Rd,90,180,!1).replace("M","L")," L ").concat(Cf,",").concat(Md-Wn," L ").concat(db,",").concat(Md-Wn," L ").concat(db,",").concat(Md," z M ").concat(Ox,",").concat(Ux," L ").concat(Ox,",").concat(If," M ").concat(Cf,",").concat(Ex," L ").concat(Cf,",").concat(Md-Wn);break;case"ribbon":case"ribbon2":var Px=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Dp=1.3123622047244095,Kp=3.9370078740157477;if(Px){var _x,Fp=MI(Px);try{for(Fp.s();!(_x=Fp.n()).done;){var tf=_x.value,qx=U(tf,["attrs","name"]);qx==="adj1"?Dp=parseInt(U(tf,["attrs","fmla"]).substring(4))*wg:qx==="adj2"&&(Kp=parseInt(U(tf,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){Fp.e(Rg)}finally{Fp.f()}}var $x=1.9685039370078738,gj=2.6246456692913385,Ij=5.905511811023621,Cj=7.874015748031495,ef=15.74803149606299,tj=I/2,JA=g,rb=I,hb=I/8,ii=I/32,bb=Dp<0?0:Dp>gj?gj:Dp,ij=rb-hb,ej=I*(Kp<$x?$x:Kp>Ij?Ij:Kp)/ef,Ts=tj-ej,xs=tj+ej,Co=Ts+ii,to=xs-ii,ub=Ts+hb,mb=xs-hb,kp=ub-ii,zp=mb+ii,LC=g*bb/31.49606299212598;if(t==="ribbon2"){var Af=JA-g*bb/ef,Aj=g*bb/Cj,sf=JA-Aj,io=0+Aj,sj=(io+JA)/2,Jp=JA-LC,Lp=Af-LC;i="M ".concat(0,",").concat(JA," L ").concat(hb,",").concat(sj," L ").concat(0,",").concat(io," L ").concat(Ts,",").concat(io," L ").concat(Ts,",").concat(LC," ").concat(Mg(Co,LC,ii,LC,180,270,!1).replace("M","L")," L ").concat(to,",").concat(0," ").concat(Mg(to,LC,ii,LC,270,360,!1).replace("M","L")," L ").concat(xs,",").concat(io," L ").concat(rb,",").concat(io," L ").concat(ij,",").concat(sj," L ").concat(rb,",").concat(JA," L ").concat(zp,",").concat(JA," ").concat(Mg(zp,Jp,ii,LC,90,270,!1).replace("M","L")," L ").concat(to,",").concat(Af," ").concat(Mg(to,Lp,ii,LC,90,-90,!1).replace("M","L")," L ").concat(Co,",").concat(sf," ").concat(Mg(Co,Lp,ii,LC,270,90,!1).replace("M","L")," L ").concat(kp,",").concat(Af," ").concat(Mg(kp,Jp,ii,LC,270,450,!1).replace("M","L")," z M ").concat(ub,",").concat(sf," L ").concat(ub,",").concat(Jp," M ").concat(mb,",").concat(Jp," L ").concat(mb,",").concat(sf," M ").concat(Ts,",").concat(Lp," L ").concat(Ts,",").concat(io," M ").concat(xs,",").concat(io," L ").concat(xs,",").concat(Lp)}else if(t==="ribbon"){var lj=g*bb/ef,Zb=g*bb/Cj,eo=JA-Zb,nj=eo/2,lf=JA-LC,vp=Zb-LC;i="M ".concat(0,",").concat(0," L ").concat(kp,",").concat(0," ").concat(Mg(kp,LC,ii,LC,270,450,!1).replace("M","L")," L ").concat(Co,",").concat(lj," ").concat(Mg(Co,vp,ii,LC,270,90,!1).replace("M","L")," L ").concat(to,",").concat(Zb," ").concat(Mg(to,vp,ii,LC,90,-90,!1).replace("M","L")," L ").concat(zp,",").concat(lj," ").concat(Mg(zp,LC,ii,LC,90,270,!1).replace("M","L")," L ").concat(rb,",").concat(0," L ").concat(ij,",").concat(nj," L ").concat(rb,",").concat(eo," L ").concat(xs,",").concat(eo," L ").concat(xs,",").concat(lf," ").concat(Mg(to,lf,ii,LC,0,90,!1).replace("M","L")," L ").concat(Co,",").concat(JA," ").concat(Mg(Co,lf,ii,LC,90,180,!1).replace("M","L")," L ").concat(Ts,",").concat(eo," L ").concat(0,",").concat(eo," L ").concat(hb,",").concat(nj," z M ").concat(ub,",").concat(LC," L ").concat(ub,",").concat(Zb," M ").concat(mb,",").concat(Zb," L ").concat(mb,",").concat(LC," M ").concat(Ts,",").concat(eo," L ").concat(Ts,",").concat(vp," M ").concat(xs,",").concat(vp," L ").concat(xs,",").concat(eo)}break;case"doubleWave":case"wave":var aj=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Ao=t==="doubleWave"?.49212598425196846:.9842519685039369,so=0;if(aj){var oj,Tp=MI(aj);try{for(Tp.s();!(oj=Tp.n()).done;){var nf=oj.value,cj=U(nf,["attrs","name"]);cj==="adj1"?Ao=parseInt(U(nf,["attrs","fmla"]).substring(4))*wg:cj==="adj2"&&(so=parseInt(U(nf,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){Tp.e(Rg)}finally{Tp.f()}}var xp=-.7874015748031495,dj=3.9370078740157477,fd=7.874015748031495,rj=g,jp=I;if(t==="doubleWave"){var hj=.9842519685039369,lo=g*(Ao<0?0:Ao>hj?hj:Ao)/fd,Qp=10*lo/3,bj=lo-Qp,uj=lo+Qp,Gb=rj-lo,mj=Gb-Qp,Zj=Gb+Qp,Op=I*(so<xp?xp:so>fd?fd:so)/dj,Up=Op>0?0:Op,Ep=0-Up,Gj=Op>0?Op:0,wb=jp-Gj,Pp=(Up+wb)/6,psg=Ep+Pp,wj=(Up+wb)/3,Bsg=Ep+wj,pj=(Ep+wb)/2,Bj=pj+Pp,Wsg=(Bj+wb)/2,_p=0+Gj,af=jp+Up,ysg=_p+Pp,Ysg=_p+wj,Wj=(_p+af)/2,yj=Wj+Pp,Nsg=(yj+af)/2;i="M ".concat(Ep,",").concat(lo," C ").concat(psg,",").concat(bj," ").concat(Bsg,",").concat(uj," ").concat(pj,",").concat(lo," C ").concat(Bj,",").concat(bj," ").concat(Wsg,",").concat(uj," ").concat(wb,",").concat(lo," L ").concat(af,",").concat(Gb," C ").concat(Nsg,",").concat(Zj," ").concat(yj,",").concat(mj," ").concat(Wj,",").concat(Gb," C ").concat(Ysg,",").concat(Zj," ").concat(ysg,",").concat(mj," ").concat(_p,",").concat(Gb," z")}else if(t==="wave"){var Yj=1.574803149606299,Hd=g*(Ao<0?0:Ao>Yj?Yj:Ao)/fd,qp=10*Hd/3,Vsg=Hd-qp,Msg=Hd+qp,$p=rj-Hd,Rsg=$p-qp,fsg=$p+qp,gB=I*(so<xp?xp:so>fd?fd:so)/dj,of=gB>0?0:gB,Nj=0-of,Vj=gB>0?gB:0,cf=jp-Vj,Mj=(of+cf)/3,Rj=Nj+Mj,Hsg=(Rj+cf)/2,fj=0+Vj,Hj=jp+of,Xj=fj+Mj,Xsg=(Xj+Hj)/2;i="M ".concat(Nj,",").concat(Hd," C ").concat(Rj,",").concat(Vsg," ").concat(Hsg,",").concat(Msg," ").concat(cf,",").concat(Hd," L ").concat(Hj,",").concat($p," C ").concat(Xsg,",").concat(fsg," ").concat(Xj,",").concat(Rsg," ").concat(fj,",").concat($p," z")}break;case"ellipseRibbon":case"ellipseRibbon2":var Sj=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),IB=1.9685039370078738,CB=3.9370078740157477,tB=.9842519685039369;if(Sj){var Dj,iB=MI(Sj);try{for(iB.s();!(Dj=iB.n()).done;){var eB=Dj.value,df=U(eB,["attrs","name"]);df==="adj1"?IB=parseInt(U(eB,["attrs","fmla"]).substring(4))*wg:df==="adj2"?CB=parseInt(U(eB,["attrs","fmla"]).substring(4))*wg:df==="adj3"&&(tB=parseInt(U(eB,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){iB.e(Rg)}finally{iB.f()}}var Kj=1.9685039370078738,Fj=5.905511811023621,pb=7.874015748031495,Bb=I/2,fi=g,js=I,AB=I/8,Xd=IB<0?0:IB>pb?pb:IB,kj=pb-Xd,zj=Xd-kj/2>0?Xd-kj/2:0,ei=Bb-I*(CB<Kj?Kj:CB>Fj?Fj:CB)/15.74803149606299,CA=ei+AB,Sd=js-CA,LA=js-ei,Jj=js-AB,no=g*(tB<zj?zj:tB>Xd?Xd:tB)/pb,Dd=4*no/I,Lj=CA-CA*CA/I,Wb=CA/2,vj=js-Wb,sB=g*Xd/pb,yn=sB-no,lB=Dd*(ei-ei*ei/I),Ne=fi-sB,Tj=14*no/16,nB=ei/2,xj=Dd*nB,jj=js-nB;if(t==="ellipseRibbon"){var yb=Dd*Lj,Qj=Dd*Wb,Kd=lB+yn,Oj=no+yn-Kd+no+yn,Uj=(Tj+Ne)/2,aB=lB+Ne,Ej=Kd+Ne,Pj=xj+Ne,Ssg=Oj+Ne,_j=yb+yn;i="M ".concat(0,",").concat(0," Q ").concat(Wb,",").concat(Qj," ").concat(CA,",").concat(yb," L ").concat(ei,",").concat(Kd," Q ").concat(Bb,",").concat(Oj," ").concat(LA,",").concat(Kd," L ").concat(Sd,",").concat(yb," Q ").concat(vj,",").concat(Qj," ").concat(js,",").concat(0," L ").concat(Jj,",").concat(Uj," L ").concat(js,",").concat(Ne," Q ").concat(jj,",").concat(Pj," ").concat(LA,",").concat(aB," L ").concat(LA,",").concat(Ej," Q ").concat(Bb,",").concat(Ssg," ").concat(ei,",").concat(Ej," L ").concat(ei,",").concat(aB," Q ").concat(nB,",").concat(Pj," ").concat(0,",").concat(Ne," L ").concat(AB,",").concat(Uj," z M ").concat(ei,",").concat(aB," L ").concat(ei,",").concat(Kd," M ").concat(LA,",").concat(Kd," L ").concat(LA,",").concat(aB," M ").concat(CA,",").concat(yb," L ").concat(CA,",").concat(_j," M ").concat(Sd,",").concat(_j," L ").concat(Sd,",").concat(yb)}else if(t==="ellipseRibbon2"){var qj=Dd*Lj,oB=fi-qj,$j=fi-Dd*Wb,rf=lB+yn,cB=fi-rf,gQ=no+yn-rf+no+yn,Dsg=fi-gQ,IQ=fi-(Tj+Ne)/2,dB=fi-(lB+Ne),CQ=fi-(rf+Ne),tQ=fi-(xj+Ne),Ksg=fi-(gQ+Ne),iQ=fi-(qj+yn);i="M ".concat(0,",").concat(fi," L ").concat(AB,",").concat(IQ," L ").concat(0,",").concat(sB," Q ").concat(nB,",").concat(tQ," ").concat(ei,",").concat(dB," L ").concat(ei,",").concat(CQ," Q ").concat(Bb,",").concat(Ksg," ").concat(LA,",").concat(CQ," L ").concat(LA,",").concat(dB," Q ").concat(jj,",").concat(tQ," ").concat(js,",").concat(sB," L ").concat(Jj,",").concat(IQ," L ").concat(js,",").concat(fi," Q ").concat(vj,",").concat($j," ").concat(Sd,",").concat(oB," L ").concat(LA,",").concat(cB," Q ").concat(Bb,",").concat(Dsg," ").concat(ei,",").concat(cB," L ").concat(CA,",").concat(oB," Q ").concat(Wb,",").concat($j," ").concat(0,",").concat(fi," z M ").concat(ei,",").concat(cB," L ").concat(ei,",").concat(dB," M ").concat(LA,",").concat(dB," L ").concat(LA,",").concat(cB," M ").concat(CA,",").concat(iQ," L ").concat(CA,",").concat(oB," M ").concat(Sd,",").concat(oB," L ").concat(Sd,",").concat(iQ)}break;case"line":case"straightConnector1":case"bentConnector4":case"bentConnector5":case"curvedConnector2":case"curvedConnector3":case"curvedConnector4":case"curvedConnector5":i="M 0 0 L ".concat(I," ").concat(g);break;case"rightArrow":var eQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Yb=.25,Nb=.5;if(eQ){var AQ,Fsg=I/g,rB=MI(eQ);try{for(rB.s();!(AQ=rB.n()).done;){var hf=AQ.value,sQ=U(hf,["attrs","name"]);sQ==="adj1"?Yb=.5-parseInt(U(hf,["attrs","fmla"]).substring(4))/2e5:sQ==="adj2"&&(Nb=1-parseInt(U(hf,["attrs","fmla"]).substring(4))/1e5/Fsg)}}catch(Rg){rB.e(Rg)}finally{rB.f()}}i="M ".concat(I," ").concat(g/2," L ").concat(Nb*I," 0 L ").concat(Nb*I," ").concat(Yb*g," L 0 ").concat(Yb*g," L 0 ").concat((1-Yb)*g," L ").concat(Nb*I," ").concat((1-Yb)*g," L ").concat(Nb*I," ").concat(g," Z");break;case"leftArrow":var lQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Vb=.25,Mb=.5;if(lQ){var nQ,ksg=I/g,hB=MI(lQ);try{for(hB.s();!(nQ=hB.n()).done;){var bf=nQ.value,aQ=U(bf,["attrs","name"]);aQ==="adj1"?Vb=.5-parseInt(U(bf,["attrs","fmla"]).substring(4))/2e5:aQ==="adj2"&&(Mb=parseInt(U(bf,["attrs","fmla"]).substring(4))/1e5/ksg)}}catch(Rg){hB.e(Rg)}finally{hB.f()}}i="M 0 ".concat(g/2," L ").concat(Mb*I," ").concat(g," L ").concat(Mb*I," ").concat((1-Vb)*g," L ").concat(I," ").concat((1-Vb)*g," L ").concat(I," ").concat(Vb*g," L ").concat(Mb*I," ").concat(Vb*g," L ").concat(Mb*I," 0 Z");break;case"downArrow":case"flowChartOffpageConnector":var oQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Fd=.25,kd=.5;if(oQ){var cQ,zsg=g/I,bB=MI(oQ);try{for(bB.s();!(cQ=bB.n()).done;){var uf=cQ.value,dQ=U(uf,["attrs","name"]);dQ==="adj1"?Fd=parseInt(U(uf,["attrs","fmla"]).substring(4))/2e5:dQ==="adj2"&&(kd=parseInt(U(uf,["attrs","fmla"]).substring(4))/1e5/zsg)}}catch(Rg){bB.e(Rg)}finally{bB.f()}}t==="flowChartOffpageConnector"&&(Fd=.5,kd=.212),i="M ".concat((.5-Fd)*I," 0 L ").concat((.5-Fd)*I," ").concat((1-kd)*g," L 0 ").concat((1-kd)*g," L ").concat(I/2," ").concat(g," L ").concat(I," ").concat((1-kd)*g," L ").concat((.5+Fd)*I," ").concat((1-kd)*g," L ").concat((.5+Fd)*I," 0 Z");break;case"upArrow":var rQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Rb=.25,fb=.5;if(rQ){var hQ,Jsg=g/I,uB=MI(rQ);try{for(uB.s();!(hQ=uB.n()).done;){var mf=hQ.value,bQ=U(mf,["attrs","name"]);bQ==="adj1"?Rb=parseInt(U(mf,["attrs","fmla"]).substring(4))/2e5:bQ==="adj2"&&(fb=parseInt(U(mf,["attrs","fmla"]).substring(4))/1e5/Jsg)}}catch(Rg){uB.e(Rg)}finally{uB.f()}}i="M ".concat(I/2," 0 L 0 ").concat(fb*g," L ").concat((.5-Rb)*I," ").concat(fb*g," L ").concat((.5-Rb)*I," ").concat(g," L ").concat((.5+Rb)*I," ").concat(g," L ").concat((.5+Rb)*I," ").concat(fb*g," L ").concat(I," ").concat(fb*g," Z");break;case"leftRightArrow":var uQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Hb=.25,Qs=.25;if(uQ){var mQ,Lsg=I/g,mB=MI(uQ);try{for(mB.s();!(mQ=mB.n()).done;){var Zf=mQ.value,ZQ=U(Zf,["attrs","name"]);ZQ==="adj1"?Hb=.5-parseInt(U(Zf,["attrs","fmla"]).substring(4))/2e5:ZQ==="adj2"&&(Qs=parseInt(U(Zf,["attrs","fmla"]).substring(4))/1e5/Lsg)}}catch(Rg){mB.e(Rg)}finally{mB.f()}}i="M 0 ".concat(g/2," L ").concat(Qs*I," ").concat(g," L ").concat(Qs*I," ").concat((1-Hb)*g," L ").concat((1-Qs)*I," ").concat((1-Hb)*g," L ").concat((1-Qs)*I," ").concat(g," L ").concat(I," ").concat(g/2," L ").concat((1-Qs)*I," 0 L ").concat((1-Qs)*I," ").concat(Hb*g," L ").concat(Qs*I," ").concat(Hb*g," L ").concat(Qs*I," 0 Z");break;case"upDownArrow":var GQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Xb=.25,Os=.25;if(GQ){var wQ,vsg=g/I,ZB=MI(GQ);try{for(ZB.s();!(wQ=ZB.n()).done;){var Gf=wQ.value,pQ=U(Gf,["attrs","name"]);pQ==="adj1"?Xb=.5-parseInt(U(Gf,["attrs","fmla"]).substring(4))/2e5:pQ==="adj2"&&(Os=parseInt(U(Gf,["attrs","fmla"]).substring(4))/1e5/vsg)}}catch(Rg){ZB.e(Rg)}finally{ZB.f()}}i="M ".concat(I/2," 0 L 0 ").concat(Os*g," L ").concat(Xb*I," ").concat(Os*g," L ").concat(Xb*I," ").concat((1-Os)*g," L 0 ").concat((1-Os)*g," L ").concat(I/2," ").concat(g," L ").concat(I," ").concat((1-Os)*g," L ").concat((1-Xb)*I," ").concat((1-Os)*g," L ").concat((1-Xb)*I," ").concat(Os*g," L ").concat(I," ").concat(Os*g," Z");break;case"quadArrow":var BQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),GB=1.7716535433070866,wB=1.7716535433070866,pB=1.7716535433070866,WQ=3.9370078740157477,wf=7.874015748031495;if(BQ){var yQ,BB=MI(BQ);try{for(BB.s();!(yQ=BB.n()).done;){var WB=yQ.value,pf=U(WB,["attrs","name"]);pf==="adj1"?GB=parseInt(U(WB,["attrs","fmla"]).substring(4))*wg:pf==="adj2"?wB=parseInt(U(WB,["attrs","fmla"]).substring(4))*wg:pf==="adj3"&&(pB=parseInt(U(WB,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){BB.e(Rg)}finally{BB.f()}}var zd=g/2,Jd=I/2,Bf=Math.min(I,g),YQ=wB<0?0:wB>WQ?WQ:wB,Wf=2*YQ,NQ=(wf-Wf)/2,vA=Bf*(pB<0?0:pB>NQ?NQ:pB)/wf,yB=Bf*YQ/wf,VQ=Jd-yB,MQ=Jd+yB,YB=Bf*(GB<0?0:GB>Wf?Wf:GB)/15.74803149606299,NB=Jd-YB,VB=Jd+YB,MB=I-vA,RQ=zd-yB,fQ=zd+yB,RB=zd-YB,fB=zd+YB,HB=g-vA;i="M 0,".concat(zd," L ").concat(vA,",").concat(RQ," L ").concat(vA,",").concat(RB," L ").concat(NB,",").concat(RB," L ").concat(NB,",").concat(vA," L ").concat(VQ,",").concat(vA," L ").concat(Jd,",0 L ").concat(MQ,",").concat(vA," L ").concat(VB,",").concat(vA," L ").concat(VB,",").concat(RB," L ").concat(MB,",").concat(RB," L ").concat(MB,",").concat(RQ," L ").concat(I,",").concat(zd," L ").concat(MB,",").concat(fQ," L ").concat(MB,",").concat(fB," L ").concat(VB,",").concat(fB," L ").concat(VB,",").concat(HB," L ").concat(MQ,",").concat(HB," L ").concat(Jd,",").concat(g," L ").concat(VQ,",").concat(HB," L ").concat(NB,",").concat(HB," L ").concat(NB,",").concat(fB," L ").concat(vA,",").concat(fB," L ").concat(vA,",").concat(fQ," z");break;case"leftRightUpArrow":var HQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),XB=1.9685039370078738,SB=1.9685039370078738,DB=1.9685039370078738,yf=3.9370078740157477,Yf=7.874015748031495;if(HQ){var XQ,KB=MI(HQ);try{for(KB.s();!(XQ=KB.n()).done;){var FB=XQ.value,Nf=U(FB,["attrs","name"]);Nf==="adj1"?XB=parseInt(U(FB,["attrs","fmla"]).substring(4))*wg:Nf==="adj2"?SB=parseInt(U(FB,["attrs","fmla"]).substring(4))*wg:Nf==="adj3"&&(DB=parseInt(U(FB,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){KB.e(Rg)}finally{KB.f()}}var Sb=I/2,kB=Math.min(I,g),Vf=SB<0?0:SB>yf?yf:SB,Mf=2*Vf,SQ=(Yf-Mf)/2,Us=kB*(DB<0?0:DB>SQ?SQ:DB)/Yf,Rf=kB*Vf/Yf,Tsg=Sb-Rf,xsg=Sb+Rf,zB=kB*(XB<0?0:XB>Mf?Mf:XB)/15.74803149606299,DQ=Sb-zB,KQ=Sb+zB,JB=I-Us,FQ=g-kB*Vf/yf,LB=g-Rf,vB=LB-zB,kQ=LB+zB;i="M 0,".concat(LB," L ").concat(Us,",").concat(FQ," L ").concat(Us,",").concat(vB," L ").concat(DQ,",").concat(vB," L ").concat(DQ,",").concat(Us," L ").concat(Tsg,",").concat(Us," L ").concat(Sb,",0 L ").concat(xsg,",").concat(Us," L ").concat(KQ,",").concat(Us," L ").concat(KQ,",").concat(vB," L ").concat(JB,",").concat(vB," L ").concat(JB,",").concat(FQ," L ").concat(I,",").concat(LB," L ").concat(JB,",").concat(g," L ").concat(JB,",").concat(kQ," L ").concat(Us,",").concat(kQ," L ").concat(Us,",").concat(g," z");break;case"leftUpArrow":var zQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),TB=1.9685039370078738,xB=1.9685039370078738,jB=1.9685039370078738,ff=3.9370078740157477,Hf=7.874015748031495;if(zQ){var JQ,QB=MI(zQ);try{for(QB.s();!(JQ=QB.n()).done;){var OB=JQ.value,Xf=U(OB,["attrs","name"]);Xf==="adj1"?TB=parseInt(U(OB,["attrs","fmla"]).substring(4))*wg:Xf==="adj2"?xB=parseInt(U(OB,["attrs","fmla"]).substring(4))*wg:Xf==="adj3"&&(jB=parseInt(U(OB,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){QB.e(Rg)}finally{QB.f()}}var UB=Math.min(I,g),Sf=xB<0?0:xB>ff?ff:xB,Df=2*Sf,LQ=Hf-Df,Yn=UB*(jB<0?0:jB>LQ?LQ:jB)/Hf,vQ=UB*Sf/ff,jsg=I-vQ,Qsg=g-vQ,TQ=UB*Sf/Hf,Kf=I-TQ,Ff=g-TQ,EB=UB*(TB<0?0:TB>Df?Df:TB)/15.74803149606299,xQ=Kf-EB,jQ=Kf+EB,QQ=Ff-EB,OQ=Ff+EB;i="M 0,".concat(Ff," L ").concat(Yn,",").concat(Qsg," L ").concat(Yn,",").concat(QQ," L ").concat(xQ,",").concat(QQ," L ").concat(xQ,",").concat(Yn," L ").concat(jsg,",").concat(Yn," L ").concat(Kf,",0 L ").concat(I,",").concat(Yn," L ").concat(jQ,",").concat(Yn," L ").concat(jQ,",").concat(OQ," L ").concat(Yn,",").concat(OQ," L ").concat(Yn,",").concat(g," z");break;case"bentUpArrow":var UQ=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),PB=1.9685039370078738,_B=1.9685039370078738,qB=1.9685039370078738,ao=3.9370078740157477,kf=7.874015748031495;if(UQ){var EQ,$B=MI(UQ);try{for($B.s();!(EQ=$B.n()).done;){var gW=EQ.value,zf=U(gW,["attrs","name"]);zf==="adj1"?PB=parseInt(U(gW,["attrs","fmla"]).substring(4))*wg:zf==="adj2"?_B=parseInt(U(gW,["attrs","fmla"]).substring(4))*wg:zf==="adj3"&&(qB=parseInt(U(gW,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){$B.e(Rg)}finally{$B.f()}}var Db=Math.min(I,g),PQ=PB<0?0:PB>ao?ao:PB,_Q=_B<0?0:_B>ao?ao:_B,IW=Db*(qB<0?0:qB>ao?ao:qB)/kf,Osg=I-Db*_Q/ao,Jf=I-Db*_Q/kf,qQ=Db*PQ/15.74803149606299,$Q=Jf-qQ,gO=Jf+qQ,IO=g-Db*PQ/kf;i="M 0,".concat(IO," L ").concat($Q,",").concat(IO," L ").concat($Q,",").concat(IW," L ").concat(Osg,",").concat(IW," L ").concat(Jf,",0 L ").concat(I,",").concat(IW," L ").concat(gO,",").concat(IW," L ").concat(gO,",").concat(g," L 0,").concat(g," z");break;case"bentArrow":var CO=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),CW=1.9685039370078738,tW=1.9685039370078738,iW=1.9685039370078738,eW=3.444881889763779,AW=3.9370078740157477,Kb=7.874015748031495;if(CO){var tO,sW=MI(CO);try{for(sW.s();!(tO=sW.n()).done;){var Fb=tO.value,lW=U(Fb,["attrs","name"]);lW==="adj1"?CW=parseInt(U(Fb,["attrs","fmla"]).substring(4))*wg:lW==="adj2"?tW=parseInt(U(Fb,["attrs","fmla"]).substring(4))*wg:lW==="adj3"?iW=parseInt(U(Fb,["attrs","fmla"]).substring(4))*wg:lW==="adj4"&&(eW=parseInt(U(Fb,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){sW.e(Rg)}finally{sW.f()}}var kb=Math.min(I,g),iO=tW<0?0:tW>AW?AW:tW,eO=2*iO,zb=kb*(CW<0?0:CW>eO?eO:CW)/Kb,AO=kb*iO/Kb,Jb=AO-zb/2,sO=kb*(iW<0?0:iW>AW?AW:iW)/Kb,lO=I-sO,nO=g-Jb,aO=Kb*(lO<nO?lO:nO)/kb,Lb=kb*(eW<0?0:eW>aO?aO:eW)/Kb,oO=Lb-zb,nW=oO>0?oO:0,cO=zb+nW,aW=I-sO,oW=Jb+zb,Usg=oW+Jb,dO=Jb+Lb,Esg=oW+nW;i="M 0,".concat(g," L 0,").concat(dO," ").concat(Mg(Lb,dO,Lb,Lb,180,270,!1).replace("M","L")," L ").concat(aW,",").concat(Jb," L ").concat(aW,",0 L ").concat(I,",").concat(AO," L ").concat(aW,",").concat(Usg," L ").concat(aW,",").concat(oW," L ").concat(cO,",").concat(oW," ").concat(Mg(cO,Esg,nW,nW,270,180,!1).replace("M","L")," L ").concat(zb,",").concat(g," z");break;case"uturnArrow":var rO=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),cW=1.9685039370078738,dW=1.9685039370078738,rW=1.9685039370078738,hW=3.444881889763779,bW=5.905511811023621,hO=1.9685039370078738,Es=7.874015748031495;if(rO){var bO,uW=MI(rO);try{for(uW.s();!(bO=uW.n()).done;){var Ld=bO.value,vb=U(Ld,["attrs","name"]);vb==="adj1"?cW=parseInt(U(Ld,["attrs","fmla"]).substring(4))*wg:vb==="adj2"?dW=parseInt(U(Ld,["attrs","fmla"]).substring(4))*wg:vb==="adj3"?rW=parseInt(U(Ld,["attrs","fmla"]).substring(4))*wg:vb==="adj4"?hW=parseInt(U(Ld,["attrs","fmla"]).substring(4))*wg:vb==="adj5"&&(bW=parseInt(U(Ld,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){uW.e(Rg)}finally{uW.f()}}var Nn=Math.min(I,g),uO=dW<0?0:dW>hO?hO:dW,mO=2*uO,Lf=cW<0?0:cW>mO?mO:cW,ZO=(Es-Lf*Nn/g)*g/Nn,GO=rW<0?0:rW>ZO?ZO:rW,wO=(GO+Lf)*Nn/g,Tb=Nn*Lf/Es,vf=Nn*uO/Es,pO=vf-Tb/2,BO=g*(bW<wO?wO:bW>Es?Es:bW)/Es,vd=BO-Nn*GO/Es,Tf=I-pO,WO=Tf/2,yO=Es*(WO<vd?WO:vd)/Nn,TA=Nn*(hW<0?0:hW>yO?yO:hW)/Es,YO=TA-Tb,Td=YO>0?YO:0,xb=Tb+Td,NO=I-vf,VO=NO-vf,xf=VO+pO,MO=Tf-TA,Psg=xf-Td;i="M 0,".concat(g," L 0,").concat(TA," ").concat(Mg(TA,TA,TA,TA,180,270,!1).replace("M","L")," L ").concat(MO,",0 ").concat(Mg(MO,TA,TA,TA,270,360,!1).replace("M","L")," L ").concat(Tf,",").concat(vd," L ").concat(I,",").concat(vd," L ").concat(NO,",").concat(BO," L ").concat(VO,",").concat(vd," L ").concat(xf,",").concat(vd," L ").concat(xf,",").concat(xb," ").concat(Mg(Psg,xb,Td,Td,0,-90,!1).replace("M","L")," L ").concat(xb,",").concat(Tb," ").concat(Mg(xb,xb,Td,Td,270,180,!1).replace("M","L")," L ").concat(Tb,",").concat(g," z");break;case"stripedRightArrow":var RO=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),mW=3.9370078740157477,ZW=3.9370078740157477,jf=7.874015748031495;if(RO){var fO,GW=MI(RO);try{for(GW.s();!(fO=GW.n()).done;){var Qf=fO.value,HO=U(Qf,["attrs","name"]);HO==="adj1"?mW=parseInt(U(Qf,["attrs","fmla"]).substring(4))*wg:HO==="adj2"&&(ZW=parseInt(U(Qf,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){GW.e(Rg)}finally{GW.f()}}var Of=g/2,xd=Math.min(I,g),XO=6.643700787401574*I/xd,SO=5*xd/32,wW=I-xd*(ZW<0?0:ZW>XO?XO:ZW)/jf,DO=g*(mW<0?0:mW>jf?jf:mW)/15.74803149606299,jd=Of-DO,Qd=Of+DO,KO=xd/8,FO=xd/16,kO=xd/32;i="M 0,".concat(jd," L ").concat(kO,",").concat(jd," L ").concat(kO,",").concat(Qd," L 0,").concat(Qd," z M ").concat(FO,",").concat(jd," L ").concat(KO,",").concat(jd," L ").concat(KO,",").concat(Qd," L ").concat(FO,",").concat(Qd," z M ").concat(SO,",").concat(jd," L ").concat(wW,",").concat(jd," L ").concat(wW,",0 L ").concat(I,",").concat(Of," L ").concat(wW,",").concat(g," L ").concat(wW,",").concat(Qd," L ").concat(SO,",").concat(Qd," z");break;case"notchedRightArrow":var zO=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),pW=3.9370078740157477,BW=3.9370078740157477,WW=7.874015748031495;if(zO){var JO,yW=MI(zO);try{for(yW.s();!(JO=yW.n()).done;){var Uf=JO.value,LO=U(Uf,["attrs","name"]);LO==="adj1"?pW=parseInt(U(Uf,["attrs","fmla"]).substring(4))*wg:LO==="adj2"&&(BW=parseInt(U(Uf,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){yW.e(Rg)}finally{yW.f()}}var jb=g/2,_sg=jb,vO=Math.min(I,g),TO=WW*I/vO,xO=vO*(BW<0?0:BW>TO?TO:BW)/WW,YW=I-xO,Ef=g*(pW<0?0:pW>WW?WW:pW)/15.74803149606299,jO=jb-Ef,QO=jb+Ef,qsg=Ef*xO/_sg;i="M 0,".concat(jO," L ").concat(YW,",").concat(jO," L ").concat(YW,",0 L ").concat(I,",").concat(jb," L ").concat(YW,",").concat(g," L ").concat(YW,",").concat(QO," L 0,").concat(QO," L ").concat(qsg,",").concat(jb," z");break;case"homePlate":var OO=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),NW=3.9370078740157477,UO=7.874015748031495;OO&&(NW=parseInt(OO.substring(4))*wg);var $sg=g/2,EO=Math.min(I,g),PO=UO*I/EO,_O=I-EO*(NW<0?0:NW>PO?PO:NW)/UO;i="M 0,0 L ".concat(_O,",0 L ").concat(I,",").concat($sg," L ").concat(_O,",").concat(g," L 0,").concat(g," z");break;case"chevron":var qO=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),VW=3.9370078740157477,$O=7.874015748031495;qO&&(VW=parseInt(qO.substring(4))*wg);var g4=g/2,I4=Math.min(I,g),C4=$O*I/I4,t4=I4*(VW<0?0:VW>C4?C4:VW)/$O,i4=I-t4;i="M 0,0 L ".concat(i4,",0 L ").concat(I,",").concat(g4," L ").concat(i4,",").concat(g," L 0,").concat(g," L ").concat(t4,",").concat(g4," z");break;case"rightArrowCallout":var e4=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),MW=1.9685039370078738,RW=1.9685039370078738,fW=1.9685039370078738,HW=5.116299212598425,A4=3.9370078740157477,XW=7.874015748031495;if(e4){var s4,SW=MI(e4);try{for(SW.s();!(s4=SW.n()).done;){var Qb=s4.value,DW=U(Qb,["attrs","name"]);DW==="adj1"?MW=parseInt(U(Qb,["attrs","fmla"]).substring(4))*wg:DW==="adj2"?RW=parseInt(U(Qb,["attrs","fmla"]).substring(4))*wg:DW==="adj3"?fW=parseInt(U(Qb,["attrs","fmla"]).substring(4))*wg:DW==="adj4"&&(HW=parseInt(U(Qb,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){SW.e(Rg)}finally{SW.f()}}var Ob=g/2,l4=I,n4=g,Od=Math.min(I,g),a4=A4*g/Od,o4=RW<0?0:RW>a4?a4:RW,c4=2*o4,d4=XW*I/Od,r4=fW<0?0:fW>d4?d4:fW,h4=A4-r4*Od/I,b4=Od*o4/XW,u4=Od*(MW<0?0:MW>c4?c4:MW)/15.74803149606299,glg=Ob-b4,m4=Ob-u4,Z4=Ob+u4,Ilg=Ob+b4,KW=l4-Od*r4/XW,FW=I*(HW<0?0:HW>h4?h4:HW)/XW;i="M ".concat(0,",").concat(0," L ").concat(FW,",").concat(0," L ").concat(FW,",").concat(m4," L ").concat(KW,",").concat(m4," L ").concat(KW,",").concat(glg," L ").concat(l4,",").concat(Ob," L ").concat(KW,",").concat(Ilg," L ").concat(KW,",").concat(Z4," L ").concat(FW,",").concat(Z4," L ").concat(FW,",").concat(n4," L ").concat(0,",").concat(n4," z");break;case"downArrowCallout":var G4=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),kW=1.9685039370078738,zW=1.9685039370078738,JW=1.9685039370078738,LW=5.116299212598425,Ub=7.874015748031495;if(G4){var w4,vW=MI(G4);try{for(vW.s();!(w4=vW.n()).done;){var Eb=w4.value,TW=U(Eb,["attrs","name"]);TW==="adj1"?kW=parseInt(U(Eb,["attrs","fmla"]).substring(4))*wg:TW==="adj2"?zW=parseInt(U(Eb,["attrs","fmla"]).substring(4))*wg:TW==="adj3"?JW=parseInt(U(Eb,["attrs","fmla"]).substring(4))*wg:TW==="adj4"&&(LW=parseInt(U(Eb,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){vW.e(Rg)}finally{vW.f()}}var Pb=I/2,p4=I,B4=g,Ud=Math.min(I,g),W4=3.9370078740157477*I/Ud,y4=zW<0?0:zW>W4?W4:zW,Y4=2*y4,N4=Ub*g/Ud,V4=JW<0?0:JW>N4?N4:JW,M4=Ub-V4*Ud/g,R4=Ud*y4/Ub,f4=Ud*(kW<0?0:kW>Y4?Y4:kW)/15.74803149606299,Clg=Pb-R4,H4=Pb-f4,X4=Pb+f4,tlg=Pb+R4,xW=B4-Ud*V4/Ub,jW=g*(LW<0?0:LW>M4?M4:LW)/Ub;i="M ".concat(0,",").concat(0," L ").concat(p4,",").concat(0," L ").concat(p4,",").concat(jW," L ").concat(X4,",").concat(jW," L ").concat(X4,",").concat(xW," L ").concat(tlg,",").concat(xW," L ").concat(Pb,",").concat(B4," L ").concat(Clg,",").concat(xW," L ").concat(H4,",").concat(xW," L ").concat(H4,",").concat(jW," L ").concat(0,",").concat(jW," z");break;case"leftArrowCallout":var S4=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),QW=1.9685039370078738,OW=1.9685039370078738,UW=1.9685039370078738,EW=5.116299212598425,_b=7.874015748031495;if(S4){var D4,PW=MI(S4);try{for(PW.s();!(D4=PW.n()).done;){var qb=D4.value,_W=U(qb,["attrs","name"]);_W==="adj1"?QW=parseInt(U(qb,["attrs","fmla"]).substring(4))*wg:_W==="adj2"?OW=parseInt(U(qb,["attrs","fmla"]).substring(4))*wg:_W==="adj3"?UW=parseInt(U(qb,["attrs","fmla"]).substring(4))*wg:_W==="adj4"&&(EW=parseInt(U(qb,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){PW.e(Rg)}finally{PW.f()}}var $b=g/2,Pf=I,K4=g,Ed=Math.min(I,g),F4=3.9370078740157477*g/Ed,k4=OW<0?0:OW>F4?F4:OW,z4=2*k4,J4=_b*I/Ed,L4=UW<0?0:UW>J4?J4:UW,v4=_b-L4*Ed/I,T4=Ed*k4/_b,x4=Ed*(QW<0?0:QW>z4?z4:QW)/15.74803149606299,ilg=$b-T4,j4=$b-x4,Q4=$b+x4,elg=$b+T4,qW=Ed*L4/_b,$W=Pf-I*(EW<0?0:EW>v4?v4:EW)/_b;i="M ".concat(0,",").concat($b," L ").concat(qW,",").concat(ilg," L ").concat(qW,",").concat(j4," L ").concat($W,",").concat(j4," L ").concat($W,",").concat(0," L ").concat(Pf,",").concat(0," L ").concat(Pf,",").concat(K4," L ").concat($W,",").concat(K4," L ").concat($W,",").concat(Q4," L ").concat(qW,",").concat(Q4," L ").concat(qW,",").concat(elg," z");break;case"upArrowCallout":var O4=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),g2=1.9685039370078738,I2=1.9685039370078738,C2=1.9685039370078738,t2=5.116299212598425,gu=7.874015748031495;if(O4){var U4,i2=MI(O4);try{for(i2.s();!(U4=i2.n()).done;){var Iu=U4.value,e2=U(Iu,["attrs","name"]);e2==="adj1"?g2=parseInt(U(Iu,["attrs","fmla"]).substring(4))*wg:e2==="adj2"?I2=parseInt(U(Iu,["attrs","fmla"]).substring(4))*wg:e2==="adj3"?C2=parseInt(U(Iu,["attrs","fmla"]).substring(4))*wg:e2==="adj4"&&(t2=parseInt(U(Iu,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){i2.e(Rg)}finally{i2.f()}}var Cu=I/2,E4=I,_f=g,Pd=Math.min(I,g),P4=3.9370078740157477*I/Pd,_4=I2<0?0:I2>P4?P4:I2,q4=2*_4,$4=gu*g/Pd,gU=C2<0?0:C2>$4?$4:C2,IU=gu-gU*Pd/g,CU=Pd*_4/gu,tU=Pd*(g2<0?0:g2>q4?q4:g2)/15.74803149606299,Alg=Cu-CU,iU=Cu-tU,eU=Cu+tU,slg=Cu+CU,A2=Pd*gU/gu,s2=_f-g*(t2<0?0:t2>IU?IU:t2)/gu;i="M ".concat(0,",").concat(s2," L ").concat(iU,",").concat(s2," L ").concat(iU,",").concat(A2," L ").concat(Alg,",").concat(A2," L ").concat(Cu,",").concat(0," L ").concat(slg,",").concat(A2," L ").concat(eU,",").concat(A2," L ").concat(eU,",").concat(s2," L ").concat(E4,",").concat(s2," L ").concat(E4,",").concat(_f," L ").concat(0,",").concat(_f," z");break;case"leftRightArrowCallout":var AU=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),l2=1.9685039370078738,n2=1.9685039370078738,a2=1.9685039370078738,o2=3.7892125984251965,sU=3.9370078740157477,qf=7.874015748031495,lU=15.74803149606299;if(AU){var nU,c2=MI(AU);try{for(c2.s();!(nU=c2.n()).done;){var tu=nU.value,d2=U(tu,["attrs","name"]);d2==="adj1"?l2=parseInt(U(tu,["attrs","fmla"]).substring(4))*wg:d2==="adj2"?n2=parseInt(U(tu,["attrs","fmla"]).substring(4))*wg:d2==="adj3"?a2=parseInt(U(tu,["attrs","fmla"]).substring(4))*wg:d2==="adj4"&&(o2=parseInt(U(tu,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){c2.e(Rg)}finally{c2.f()}}var _d=g/2,aU=I/2,oU=I,cU=g,qd=Math.min(I,g),dU=sU*g/qd,rU=n2<0?0:n2>dU?dU:n2,hU=2*rU,bU=sU*I/qd,uU=a2<0?0:a2>bU?bU:a2,mU=qf-uU*qd/(I/2),ZU=qd*rU/qf,GU=qd*(l2<0?0:l2>hU?hU:l2)/lU,wU=_d-ZU,r2=_d-GU,h2=_d+GU,pU=_d+ZU,iu=qd*uU/qf,b2=oU-iu,BU=I*(o2<0?0:o2>mU?mU:o2)/lU,u2=aU-BU,m2=aU+BU;i="M ".concat(0,",").concat(_d," L ").concat(iu,",").concat(wU," L ").concat(iu,",").concat(r2," L ").concat(u2,",").concat(r2," L ").concat(u2,",").concat(0," L ").concat(m2,",").concat(0," L ").concat(m2,",").concat(r2," L ").concat(b2,",").concat(r2," L ").concat(b2,",").concat(wU," L ").concat(oU,",").concat(_d," L ").concat(b2,",").concat(pU," L ").concat(b2,",").concat(h2," L ").concat(m2,",").concat(h2," L ").concat(m2,",").concat(cU," L ").concat(u2,",").concat(cU," L ").concat(u2,",").concat(h2," L ").concat(iu,",").concat(h2," L ").concat(iu,",").concat(pU," z");break;case"quadArrowCallout":var WU=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Z2=1.4578740157480314,G2=1.4578740157480314,w2=1.4578740157480314,p2=3.7892125984251965,$f=3.9370078740157477,g5=7.874015748031495,I5=15.74803149606299;if(WU){var yU,B2=MI(WU);try{for(B2.s();!(yU=B2.n()).done;){var eu=yU.value,W2=U(eu,["attrs","name"]);W2==="adj1"?Z2=parseInt(U(eu,["attrs","fmla"]).substring(4))*wg:W2==="adj2"?G2=parseInt(U(eu,["attrs","fmla"]).substring(4))*wg:W2==="adj3"?w2=parseInt(U(eu,["attrs","fmla"]).substring(4))*wg:W2==="adj4"&&(p2=parseInt(U(eu,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){B2.e(Rg)}finally{B2.f()}}var Vn=g/2,Mn=I/2,YU=I,NU=g,C5=Math.min(I,g),t5=G2<0?0:G2>$f?$f:G2,VU=2*t5,i5=Z2<0?0:Z2>VU?VU:Z2,MU=$f-t5,RU=w2<0?0:w2>MU?MU:w2,fU=g5-2*RU,HU=p2<i5?i5:p2>fU?fU:p2,y2=C5*t5/g5,Y2=C5*i5/I5,xA=C5*RU/g5,XU=I*HU/I5,SU=g*HU/I5,N2=YU-xA,V2=Mn-XU,M2=Mn+XU,DU=Mn-y2,KU=Mn+y2,R2=Mn-Y2,f2=Mn+Y2,H2=NU-xA,X2=Vn-SU,S2=Vn+SU,FU=Vn-y2,kU=Vn+y2,D2=Vn-Y2,K2=Vn+Y2;i="M ".concat(0,",").concat(Vn," L ").concat(xA,",").concat(FU," L ").concat(xA,",").concat(D2," L ").concat(V2,",").concat(D2," L ").concat(V2,",").concat(X2," L ").concat(R2,",").concat(X2," L ").concat(R2,",").concat(xA," L ").concat(DU,",").concat(xA," L ").concat(Mn,",").concat(0," L ").concat(KU,",").concat(xA," L ").concat(f2,",").concat(xA," L ").concat(f2,",").concat(X2," L ").concat(M2,",").concat(X2," L ").concat(M2,",").concat(D2," L ").concat(N2,",").concat(D2," L ").concat(N2,",").concat(FU," L ").concat(YU,",").concat(Vn," L ").concat(N2,",").concat(kU," L ").concat(N2,",").concat(K2," L ").concat(M2,",").concat(K2," L ").concat(M2,",").concat(S2," L ").concat(f2,",").concat(S2," L ").concat(f2,",").concat(H2," L ").concat(KU,",").concat(H2," L ").concat(Mn,",").concat(NU," L ").concat(DU,",").concat(H2," L ").concat(R2,",").concat(H2," L ").concat(R2,",").concat(S2," L ").concat(V2,",").concat(S2," L ").concat(V2,",").concat(K2," L ").concat(xA,",").concat(K2," L ").concat(xA,",").concat(kU," z");break;case"curvedDownArrow":var zU=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),F2=1.9685039370078738,k2=3.9370078740157477,z2=1.9685039370078738,$d=7.874015748031495;if(zU){var JU,J2=MI(zU);try{for(J2.s();!(JU=J2.n()).done;){var L2=JU.value,e5=U(L2,["attrs","name"]);e5==="adj1"?F2=parseInt(U(L2,["attrs","fmla"]).substring(4))*wg:e5==="adj2"?k2=parseInt(U(L2,["attrs","fmla"]).substring(4))*wg:e5==="adj3"&&(z2=parseInt(U(L2,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){J2.e(Rg)}finally{J2.f()}}var llg=I/2,nlg=I,LU=g,v2=270,Au=Math.min(I,g),vU=3.9370078740157477*I/Au,oo=Au*(F2<0?0:F2>$d?$d:F2)/$d,A5=Au*(k2<0?0:k2>vU?vU:k2)/$d,jA=llg-(oo+A5)/4,s5=2*jA,TU=Math.sqrt(s5*s5-oo*oo)*g/s5,xU=$d*TU/Au,T2=Au*(z2<0?0:z2>xU?xU:z2)/$d,su=jA+oo,l5=Math.sqrt(g*g-T2*T2)*jA/g,n5=jA+l5,jU=(A5-oo)/2,alg=n5-jU,olg=su+l5+jU,clg=nlg-A5/2,x2=LU-T2,a5=180*Math.atan(l5/T2)/Math.PI,dlg=-a5,o5=180*Math.atan(oo/2/TU)/Math.PI,QU=v2+a5,OU=v2-o5,rlg=o5-90,hlg=90+o5;i="M ".concat(clg,",").concat(LU," L ").concat(alg,",").concat(x2," L ").concat(n5,",").concat(x2," ").concat(Mg(jA,g,jA,g,QU,QU+dlg,!1).replace("M","L")," L ").concat(su,",").concat(0," ").concat(Mg(su,g,jA,g,v2,v2+a5,!1).replace("M","L")," L ").concat(n5+oo,",").concat(x2," L ").concat(olg,",").concat(x2," z M ").concat(su,",").concat(0," ").concat(Mg(su,g,jA,g,OU,OU+rlg,!1).replace("M","L")," ").concat(Mg(jA,g,jA,g,180,180+hlg,!1).replace("M","L"));break;case"curvedLeftArrow":var UU=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),j2=1.9685039370078738,Q2=3.9370078740157477,O2=1.9685039370078738,U2=7.874015748031495;if(UU){var EU,E2=MI(UU);try{for(E2.s();!(EU=E2.n()).done;){var P2=EU.value,c5=U(P2,["attrs","name"]);c5==="adj1"?j2=parseInt(U(P2,["attrs","fmla"]).substring(4))*wg:c5==="adj2"?Q2=parseInt(U(P2,["attrs","fmla"]).substring(4))*wg:c5==="adj3"&&(O2=parseInt(U(P2,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){E2.e(Rg)}finally{E2.f()}}var blg=g/2,PU=I,ulg=g,_U=270,lu=Math.min(I,g),qU=3.9370078740157477*g/lu,d5=Q2<0?0:Q2>qU?qU:Q2,gr=lu*(j2<0?0:j2>d5?d5:j2)/U2,r5=lu*d5/U2,Pi=blg-(gr+r5)/4,h5=2*Pi,$U=Math.sqrt(h5*h5-gr*gr)*I/h5,gE=U2*$U/lu,_2=lu*(O2<0?0:O2>gE?gE:O2)/U2,Ir=Pi+gr,b5=Math.sqrt(I*I-_2*_2)*Pi/I,IE=Pi+b5,CE=Ir+b5,tE=(r5-gr)/2,mlg=IE-tE,Zlg=CE+tE,Glg=ulg-r5/2,q2=0+_2,iE=Math.atan(b5/_2),wlg=Math.atan(gr/2/$U)-iE,u5=180*iE/Math.PI,plg=180*wlg/Math.PI;i="M ".concat(PU,",").concat(Ir," ").concat(Mg(0,Pi,I,Pi,0,-90,!1).replace("M","L")," L ").concat(0,",").concat(0," ").concat(Mg(0,Ir,I,Pi,_U,360,!1).replace("M","L")," L ").concat(PU,",").concat(Ir," ").concat(Mg(0,Ir,I,Pi,0,u5,!1).replace("M","L")," L ").concat(q2,",").concat(CE," L ").concat(q2,",").concat(Zlg," L ").concat(0,",").concat(Glg," L ").concat(q2,",").concat(mlg," L ").concat(q2,",").concat(IE," ").concat(Mg(0,Pi,I,Pi,u5,u5+plg,!1).replace("M","L")," ").concat(Mg(0,Pi,I,Pi,0,-90,!1).replace("M","L")," ").concat(Mg(0,Ir,I,Pi,_U,360,!1).replace("M","L"));break;case"curvedRightArrow":var eE=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),$2=1.9685039370078738,gy=3.9370078740157477,Iy=1.9685039370078738,Cy=7.874015748031495;if(eE){var AE,ty=MI(eE);try{for(ty.s();!(AE=ty.n()).done;){var iy=AE.value,m5=U(iy,["attrs","name"]);m5==="adj1"?$2=parseInt(U(iy,["attrs","fmla"]).substring(4))*wg:m5==="adj2"?gy=parseInt(U(iy,["attrs","fmla"]).substring(4))*wg:m5==="adj3"&&(Iy=parseInt(U(iy,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){ty.e(Rg)}finally{ty.f()}}var Blg=g/2,Z5=I,Wlg=g,G5=180,nu=Math.min(I,g),sE=3.9370078740157477*g/nu,w5=gy<0?0:gy>sE?sE:gy,co=nu*($2<0?0:$2>w5?w5:$2)/Cy,p5=nu*w5/Cy,Ve=Blg-(co+p5)/4,B5=2*Ve,lE=Math.sqrt(B5*B5-co*co)*I/B5,nE=Cy*lE/nu,ey=nu*(Iy<0?0:Iy>nE?nE:Iy)/Cy,W5=Ve+co,y5=Math.sqrt(I*I-ey*ey)*Ve/I,aE=Ve+y5,oE=W5+y5,cE=(p5-co)/2,ylg=aE-cE,Ylg=oE+cE,Nlg=Wlg-p5/2,Ay=Z5-ey,Y5=Math.atan(y5/ey),Vlg=Math.PI-Y5,Mlg=-Y5,Rlg=Math.atan(co/2/lE)-Math.PI/2,dE=180*Vlg/Math.PI,flg=180*Mlg/Math.PI,Hlg=180*Y5/Math.PI,Xlg=180*Rlg/Math.PI;i="M ".concat(0,",").concat(Ve," ").concat(Mg(I,Ve,I,Ve,G5,G5+flg,!1).replace("M","L")," L ").concat(Ay,",").concat(aE," L ").concat(Ay,",").concat(ylg," L ").concat(Z5,",").concat(Nlg," L ").concat(Ay,",").concat(Ylg," L ").concat(Ay,",").concat(oE," ").concat(Mg(I,W5,I,Ve,dE,dE+Hlg,!1).replace("M","L")," L ").concat(0,",").concat(Ve," ").concat(Mg(I,Ve,I,Ve,G5,270,!1).replace("M","L")," L ").concat(Z5,",").concat(co," ").concat(Mg(I,W5,I,Ve,270,270+Xlg,!1).replace("M","L"));break;case"curvedUpArrow":var rE=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),sy=1.9685039370078738,ly=3.9370078740157477,ny=1.9685039370078738,Cr=7.874015748031495;if(rE){var hE,ay=MI(rE);try{for(ay.s();!(hE=ay.n()).done;){var oy=hE.value,N5=U(oy,["attrs","name"]);N5==="adj1"?sy=parseInt(U(oy,["attrs","fmla"]).substring(4))*wg:N5==="adj2"?ly=parseInt(U(oy,["attrs","fmla"]).substring(4))*wg:N5==="adj3"&&(ny=parseInt(U(oy,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){ay.e(Rg)}finally{ay.f()}}var Slg=I/2,Dlg=I,Klg=g,au=Math.min(I,g),bE=3.9370078740157477*I/au,ro=au*(sy<0?0:sy>Cr?Cr:sy)/Cr,V5=au*(ly<0?0:ly>bE?bE:ly)/Cr,tA=Slg-(ro+V5)/4,M5=2*tA,uE=Math.sqrt(M5*M5-ro*ro)*g/M5,mE=Cr*uE/au,cy=au*(ny<0?0:ny>mE?mE:ny)/Cr,R5=tA+ro,f5=Math.sqrt(g*g-cy*cy)*tA/g,ZE=tA+f5,GE=R5+f5,wE=(V5-ro)/2,Flg=ZE-wE,klg=GE+wE,zlg=Dlg-V5/2,dy=0+cy,H5=Math.atan(f5/cy),pE=Math.atan(ro/2/uE),Jlg=pE-H5,Llg=Math.PI/2-H5,BE=180*(Math.PI/2-pE)/Math.PI,vlg=180*Jlg/Math.PI,WE=180*Llg/Math.PI,Tlg=180*H5/Math.PI;i="".concat(Mg(tA,0,tA,g,BE,BE+vlg,!1)," L ").concat(ZE,",").concat(dy," L ").concat(Flg,",").concat(dy," L ").concat(zlg,",").concat(0," L ").concat(klg,",").concat(dy," L ").concat(GE,",").concat(dy," ").concat(Mg(R5,0,tA,g,WE,WE+Tlg,!1).replace("M","L")," L ").concat(tA,",").concat(Klg," ").concat(Mg(tA,0,tA,g,90,180,!1).replace("M","L")," L ").concat(ro,",").concat(0," ").concat(Mg(R5,0,tA,g,180,90,!1).replace("M","L"));break;case"mathDivide":case"mathEqual":case"mathMinus":case"mathMultiply":case"mathNotEqual":case"mathPlus":var $I,yt,Me,ry=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]);if(ry)if(Array.isArray(ry)){var yE,hy=MI(ry);try{for(hy.s();!(yE=hy.n()).done;){var by=yE.value,X5=U(by,["attrs","name"]);X5==="adj1"?$I=parseInt(U(by,["attrs","fmla"]).substring(4)):X5==="adj2"?yt=parseInt(U(by,["attrs","fmla"]).substring(4)):X5==="adj3"&&(Me=parseInt(U(by,["attrs","fmla"]).substring(4)))}}catch(Rg){hy.e(Rg)}finally{hy.f()}}else $I=parseInt(U(ry,["attrs","fmla"]).substring(4));var YE=3.9370078740157477,QA=7.874015748031495,iA=15.74803149606299,UC=I/2,Ai=g/2,Ps=g/2;if(t==="mathNotEqual"){$I===void 0&&($I=23520),yt===void 0&&(yt=66e5),Me===void 0&&(Me=11760),$I*=wg,yt=yt/6e4*Math.PI/180,Me*=wg;var NE=70*Math.PI/180,VE=110*Math.PI/180,ME=$I<0?0:$I>YE?YE:$I,RE=QA-2*ME,ou=g*ME/QA,fE=g*(Me<0?0:Me>RE?RE:Me)/iA,HE=5.7866141732283465*I/iA,uy=UC-HE,my=UC+HE,tr=Ai-fE,ir=Ai+fE,cu=tr-ou,du=ir+ou,ru=(yt<NE?NE:yt>VE?VE:yt)-Math.PI/2,Rn=Ps*Math.tan(ru),S5=Math.sqrt(Rn*Rn+Ps*Ps),ho=S5*ou/Ps,fn=UC+Rn-ho/2,XE=fn-Rn*cu/Ps,SE=fn-Rn*tr/Ps,DE=fn-Rn*ir/Ps,KE=fn-Rn*du/Ps,xlg=XE+ho,jlg=SE+ho,Qlg=DE+ho,Olg=KE+ho,FE=ou*Ps/S5,kE=ru>0?fn+FE:fn+ho,zE=ru>0?fn:fn+ho-FE,JE=ou*Rn/S5,LE=ru>0?JE:0,vE=ru>0?0:-JE,Ulg=I-kE,Elg=I-zE,Plg=g-LE,_lg=g-vE;i="M ".concat(uy,",").concat(cu," L ").concat(XE,",").concat(cu," L ").concat(zE,",").concat(vE," L ").concat(kE,",").concat(LE," L ").concat(xlg,",").concat(cu," L ").concat(my,",").concat(cu," L ").concat(my,",").concat(tr," L ").concat(jlg,",").concat(tr," L ").concat(Qlg,",").concat(ir," L ").concat(my,",").concat(ir," L ").concat(my,",").concat(du," L ").concat(Olg,",").concat(du," L ").concat(Elg,",").concat(_lg," L ").concat(Ulg,",").concat(Plg," L ").concat(KE,",").concat(du," L ").concat(uy,",").concat(du," L ").concat(uy,",").concat(ir," L ").concat(DE,",").concat(ir," L ").concat(SE,",").concat(tr," L ").concat(uy,",").concat(tr," z")}else if(t==="mathDivide"){$I===void 0&&($I=23520),yt===void 0&&(yt=5880),Me===void 0&&(Me=11760);var Zy=.07874015748031496,D5=2.8933070866141732,K5=5.7866141732283465,F5=($I*=wg)<Zy?Zy:$I>D5?D5:$I,TE=(K5-F5)/4,xE=D5*I/g,jE=TE<xE?TE:xE,QE=(Me*=wg)<Zy?Zy:Me>jE?jE:Me,OE=K5-4*QE-F5,UE=g*F5/iA,Re=g*QE/QA,EE=I*K5/iA,k5=Ai-UE,PE=Ai+UE,Gy=k5-(g*((yt*=wg)<0?0:yt>OE?OE:yt)/QA+Re)-Re,z5=g-Gy,_E=UC-EE,qE=UC+EE;i="M ".concat(UC,",").concat(Gy," A ").concat(Re,",").concat(Re," 0 1,0 ").concat(UC,",").concat(Gy+2*Re," A ").concat(Re,",").concat(Re," 0 1,0 ").concat(UC,",").concat(Gy," z M ").concat(UC,",").concat(z5," A ").concat(Re,",").concat(Re," 0 1,1 ").concat(UC,",").concat(z5-2*Re," A ").concat(Re,",").concat(Re," 0 1,1 ").concat(UC,",").concat(z5," z M ").concat(_E,",").concat(k5," L ").concat(qE,",").concat(k5," L ").concat(qE,",").concat(PE," L ").concat(_E,",").concat(PE," z")}else if(t==="mathEqual"){$I===void 0&&($I=23520),yt===void 0&&(yt=11760);var $E=2.8933070866141732,g7=($I*=wg)<0?0:$I>$E?$E:$I,I7=QA-2*g7,C7=g*g7/QA,t7=g*((yt*=wg)<0?0:yt>I7?I7:yt)/iA,i7=5.7866141732283465*I/iA,J5=Ai-t7,L5=Ai+t7,e7=J5-C7,A7=L5+C7,wy=UC-i7,py=UC+i7;i="M ".concat(wy,",").concat(e7," L ").concat(py,",").concat(e7," L ").concat(py,",").concat(J5," L ").concat(wy,",").concat(J5," z M ").concat(wy,",").concat(L5," L ").concat(py,",").concat(L5," L ").concat(py,",").concat(A7," L ").concat(wy,",").concat(A7," z")}else if(t==="mathMinus"){$I===void 0&&($I=23520);var s7=g*(($I*=wg)<0?0:$I>QA?QA:$I)/iA,l7=5.7866141732283465*I/iA,n7=Ai-s7,a7=Ai+s7,o7=UC-l7,c7=UC+l7;i="M ".concat(o7,",").concat(n7," L ").concat(c7,",").concat(n7," L ").concat(c7,",").concat(a7," L ").concat(o7,",").concat(a7," z")}else if(t==="mathMultiply"){$I===void 0&&($I=23520),$I*=wg;var v5=4.091732283464567,d7=Math.min(I,g)*($I<0?0:$I>v5?v5:$I)/QA,T5=Math.atan(g/I),r7=Math.sin(T5),h7=Math.cos(T5),x5=Math.tan(T5),b7=Math.sqrt(I*I+g*g),u7=b7-b7*v5/QA,m7=h7*u7/2,Z7=r7*u7/2,G7=r7*d7/2,w7=h7*d7/2,By=m7-G7,hu=Z7+w7,Wy=m7+G7,yy=Z7-w7,p7=(UC-Wy)*x5+yy,B7=I-Wy,j5=I-By,qlg=j5-(Ai-hu)/x5,$lg=By+(Ai-hu)/x5,W7=g-hu,y7=g-yy,gng=g-p7;i="M ".concat(By,",").concat(hu," L ").concat(Wy,",").concat(yy," L ").concat(UC,",").concat(p7," L ").concat(B7,",").concat(yy," L ").concat(j5,",").concat(hu," L ").concat(qlg,",").concat(Ai," L ").concat(j5,",").concat(W7," L ").concat(B7,",").concat(y7," L ").concat(UC,",").concat(gng," L ").concat(Wy,",").concat(y7," L ").concat(By,",").concat(W7," L ").concat($lg,",").concat(Ai," z")}else if(t==="mathPlus"){$I===void 0&&($I=23520),$I*=wg;var Yy=5.7866141732283465,Ing=Math.min(I,g),Y7=I*Yy/iA,N7=g*Yy/iA,Ny=Ing*($I<0?0:$I>Yy?Yy:$I)/iA,V7=UC-Y7,Vy=UC-Ny,My=UC+Ny,M7=UC+Y7,R7=Ai-N7,Ry=Ai-Ny,fy=Ai+Ny,f7=Ai+N7;i="M ".concat(V7,",").concat(Ry," L ").concat(Vy,",").concat(Ry," L ").concat(Vy,",").concat(R7," L ").concat(My,",").concat(R7," L ").concat(My,",").concat(Ry," L ").concat(M7,",").concat(Ry," L ").concat(M7,",").concat(fy," L ").concat(My,",").concat(fy," L ").concat(My,",").concat(f7," L ").concat(Vy,",").concat(f7," L ").concat(Vy,",").concat(fy," L ").concat(V7,",").concat(fy," z")}break;case"can":case"flowChartMagneticDisk":case"flowChartMagneticDrum":var H7=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd","attrs","fmla"]),bu=1.9685039370078738;H7&&(bu=parseInt(H7.substring(4))*wg),t!=="flowChartMagneticDisk"&&t!=="flowChartMagneticDrum"||(bu=3.9370078740157477);var X7=Math.min(I,g),S7=3.9370078740157477*g/X7,bo=X7*(bu<0?0:bu>S7?S7:bu)/15.74803149606299,D7=g-bo,Q5=180,er=I/2,O5="".concat(Mg(er,bo,er,bo,0,Q5,!1)," ").concat(Mg(er,bo,er,bo,Q5,360,!1).replace("M","L")," L ").concat(I,",").concat(D7," ").concat(Mg(er,D7,er,bo,0,Q5,!1).replace("M","L")," L 0,").concat(bo);t==="flowChartMagneticDrum"&&(O5=O5.replace(/([MLQC])\s*([-\d.e]+)\s*([-\d.e]+)/gi,function(Rg,NI,pC,vC){var TC=I/2-(parseFloat(vC)-g/2),Hi=g/2+(parseFloat(pC)-I/2);return"".concat(NI).concat(TC," ").concat(Hi)}).replace(/([MLQC])\s*([-\d.e]+)\s*([-\d.e]+)\s*([-\d.e]+)\s*([-\d.e]+)/gi,function(Rg,NI,pC,vC,TC,Hi){var xC=I/2-(parseFloat(vC)-g/2),qC=g/2+(parseFloat(pC)-I/2),rt=I/2-(parseFloat(Hi)-g/2),Yt=g/2+(parseFloat(TC)-I/2);return"".concat(NI).concat(xC," ").concat(qC," ").concat(rt," ").concat(Yt)})),i=O5;break;case"swooshArrow":var K7=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),uo=wg,Hy=25e3*uo,Xy=16667*uo;if(K7){var F7,Sy=MI(K7);try{for(Sy.s();!(F7=Sy.n()).done;){var U5=F7.value,k7=U(U5,["attrs","name"]);k7==="adj1"?Hy=parseInt(U(U5,["attrs","fmla"]).substring(4))*uo:k7==="adj2"&&(Xy=parseInt(U(U5,["attrs","fmla"]).substring(4))*uo)}}catch(Rg){Sy.e(Rg)}finally{Sy.f()}}var z7=1*uo,J7=75e3*uo,L7=1e5*uo,E5=Math.min(I,g),P5=E5/8,_5=g/6,v7=5.511811023622047*I/E5,T7=g*(Hy<z7?z7:Hy>J7?J7:Hy)/L7,q5=I-E5*(Xy<0?0:Xy>v7?v7:Xy)/L7,x7=P5,j7=Math.PI/2/14,Q7=P5*Math.tan(j7),Cng=q5-Q7,$5=x7+T7,O7=q5+T7*Math.tan(j7),tng=O7+Q7,U7=$5+P5,ing=U7/2-g/20,eng=_5+_5,Ang=I/6,sng=$5+_5/2,lng=I/4;i="M 0,".concat(g," Q ").concat(Ang,",").concat(eng," ").concat(q5,",").concat(x7," L ").concat(Cng,",0 L ").concat(I,",").concat(ing," L ").concat(tng,",").concat(U7," L ").concat(O7,",").concat($5," Q ").concat(lng,",").concat(sng," 0,").concat(g," z");break;case"circularArrow":var E7=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),Dy=.9842519685039369,Ky=19.03865*Math.PI/180,Fy=340.96135*Math.PI/180,ky=180*Math.PI/180,zy=.9842519685039369;if(E7){var P7,Jy=MI(E7);try{for(Jy.s();!(P7=Jy.n()).done;){var Ar=P7.value,uu=U(Ar,["attrs","name"]);uu==="adj1"?Dy=parseInt(U(Ar,["attrs","fmla"]).substring(4))*wg:uu==="adj2"?Ky=parseInt(U(Ar,["attrs","fmla"]).substring(4))/6e4*Math.PI/180:uu==="adj3"?Fy=parseInt(U(Ar,["attrs","fmla"]).substring(4))/6e4*Math.PI/180:uu==="adj4"?ky=parseInt(U(Ar,["attrs","fmla"]).substring(4))/6e4*Math.PI/180:uu==="adj5"&&(zy=parseInt(U(Ar,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){Jy.e(Rg)}finally{Jy.f()}}var mo=I/2,Zo=g/2,nng=I/2,ang=g/2,_7=Math.min(I,g),q7=1.9685039370078738,$7=7.874015748031495,gP=1/6e4*Math.PI/180,Ly=21599999/6e4*Math.PI/180,Go=2*Math.PI,IP=zy<0?0:zy>q7?q7:zy,CP=2*IP,sr=Fy<gP?gP:Fy>Ly?Ly:Fy,gH=ky<0?0:ky>Ly?Ly:ky,IH=_7*(Dy<0?0:Dy>CP?CP:Dy)/$7,wo=_7*IP/$7,vy=IH/2,lr=nng+vy-wo,nr=ang+vy-wo,po=lr-IH,Bo=nr-IH,Ty=po+vy,xy=Bo+vy,tP=Ty*Math.sin(sr),iP=xy*Math.cos(sr),Hn=Ty*Math.cos(Math.atan2(tP,iP)),ar=xy*Math.sin(Math.atan2(tP,iP)),eP=mo+Hn,AP=Zo+ar,si=Math.min(po,Bo),ong=1-(Hn*Hn-si*si)*(ar*ar-si*si)/(Hn*Hn*ar*ar),CH=(1+Math.sqrt(ong))/((Hn*Hn-si*si)/Hn/ar),tH=Math.atan2(CH,1)>0?Math.atan2(CH,1):Math.atan2(CH,1)+Go,iH=tH-sr>0?tH-sr:tH-sr+Go,cng=iH-Math.PI>0?iH-Go:iH,sP=Math.abs(cng),or=sr+(Ky<0?0:Ky>sP?sP:Ky),lP=Ty*Math.sin(or),nP=xy*Math.cos(or),dng=mo+Ty*Math.cos(Math.atan2(lP,nP)),rng=Zo+xy*Math.sin(Math.atan2(lP,nP)),aP=eP+wo*Math.cos(or),oP=AP+wo*Math.sin(or),cP=eP-wo*Math.cos(or),dP=AP-wo*Math.sin(or),rP=cP-mo,hP=dP-Zo,bP=aP-mo,uP=oP-Zo,Xn=Math.min(lr,nr),mP=rP*Xn/lr,ZP=hP*Xn/nr,jy=bP*Xn/lr,Qy=uP*Xn/nr,cr=jy-mP,Wo=Qy-ZP,OA=Math.sqrt(cr*cr+Wo*Wo),dr=mP*Qy-jy*ZP,Oy=Math.sqrt(Math.max(0,Xn*Xn*OA*OA-dr*dr)),Uy=-1*Wo>0?-1:1,GP=(dr*Wo+Uy*cr*Oy)/(OA*OA),wP=(dr*Wo-Uy*cr*Oy)/(OA*OA),pP=(-dr*cr+Math.abs(Wo)*Oy)/(OA*OA),BP=(-dr*cr-Math.abs(Wo)*Oy)/(OA*OA),WP=Math.sqrt(Math.pow(jy-wP,2)+Math.pow(Qy-BP,2))-Math.sqrt(Math.pow(jy-GP,2)+Math.pow(Qy-pP,2)),eH=mo+(WP>0?GP:wP)*lr/Xn,AH=Zo+(WP>0?pP:BP)*nr/Xn,Ey=rP*si/po,Py=hP*si/Bo,yP=bP*si/po,YP=uP*si/Bo,rr=yP-Ey,hr=YP-Py,UA=Math.sqrt(rr*rr+hr*hr),br=Ey*YP-yP*Py,_y=Math.sqrt(Math.max(0,si*si*UA*UA-br*br)),NP=(br*hr+Uy*rr*_y)/(UA*UA),VP=(br*hr-Uy*rr*_y)/(UA*UA),MP=(-br*rr+Math.abs(hr)*_y)/(UA*UA),RP=(-br*rr-Math.abs(hr)*_y)/(UA*UA),fP=Math.sqrt(Math.pow(Ey-VP,2)+Math.pow(Py-RP,2))-Math.sqrt(Math.pow(Ey-NP,2)+Math.pow(Py-MP,2)),HP=fP>0?NP:VP,XP=fP>0?MP:RP,sH=mo+HP*po/si,lH=Zo+XP*Bo/si,nH=Math.atan2(XP*Bo/si,HP*po/si),SP=nH>0?nH:nH+Go,aH=gH-SP,hng=aH>0?aH-Go:aH,qy=Math.sqrt(Math.pow(eH-sH,2)+Math.pow(AH-lH,2))/2-wo,bng=qy>0?eH:aP,ung=qy>0?AH:oP,mng=qy>0?sH:cP,Zng=qy>0?lH:dP,oH=Math.atan2(AH-Zo,eH-mo),cH=(oH>0?oH:oH+Go)-gH,Gng=cH>0?cH:cH+Go,DP=180*gH/Math.PI,wng=DP+180*Gng/Math.PI,KP=180*SP/Math.PI,png=KP+180*hng/Math.PI;i="".concat(Mg(I/2,g/2,lr,nr,DP,wng,!1)," L ").concat(bng,",").concat(ung," L ").concat(dng,",").concat(rng," L ").concat(mng,",").concat(Zng," L ").concat(sH,",").concat(lH," ").concat(Mg(I/2,g/2,po,Bo,KP,png,!1).replace("M","L")," z");break;case"leftCircularArrow":var FP=U(C,["p:spPr","a:prstGeom","a:avLst","a:gd"]),$y=.9842519685039369,gY=-19.03865*Math.PI/180,IY=19.03865*Math.PI/180,CY=180*Math.PI/180,tY=.9842519685039369;if(FP){var kP,iY=MI(FP);try{for(iY.s();!(kP=iY.n()).done;){var ur=kP.value,mu=U(ur,["attrs","name"]);mu==="adj1"?$y=parseInt(U(ur,["attrs","fmla"]).substring(4))*wg:mu==="adj2"?gY=parseInt(U(ur,["attrs","fmla"]).substring(4))/6e4*Math.PI/180:mu==="adj3"?IY=parseInt(U(ur,["attrs","fmla"]).substring(4))/6e4*Math.PI/180:mu==="adj4"?CY=parseInt(U(ur,["attrs","fmla"]).substring(4))/6e4*Math.PI/180:mu==="adj5"&&(tY=parseInt(U(ur,["attrs","fmla"]).substring(4))*wg)}}catch(Rg){iY.e(Rg)}finally{iY.f()}}var _s=I/2,qs=g/2,Bng=I/2,Wng=g/2,zP=Math.min(I,g),JP=1.9685039370078738,LP=7.874015748031495,vP=1/6e4*Math.PI/180,eY=21599999/6e4*Math.PI/180,yo=2*Math.PI,TP=tY<0?0:tY>JP?JP:tY,xP=2*TP,mr=IY<vP?vP:IY>eY?eY:IY,Sn=CY<0?0:CY>eY?eY:CY,dH=zP*($y<0?0:$y>xP?xP:$y)/LP,Yo=zP*TP/LP,AY=dH/2,No=Bng+AY-Yo,Vo=Wng+AY-Yo,Dn=No-dH,Kn=Vo-dH,jP=Dn+AY,QP=Kn+AY,Fn=jP*Math.cos(mr),Zr=QP*Math.sin(mr),OP=_s+Fn,UP=qs+Zr,li=Math.min(Dn,Kn),yng=1-(Fn*Fn-li*li)*(Zr*Zr-li*li)/(Fn*Fn*Zr*Zr),rH=(1+Math.sqrt(yng))/((Fn*Fn-li*li)/Fn/Zr),hH=Math.atan2(rH,1)>0?Math.atan2(rH,1):Math.atan2(rH,1)+yo,bH=hH-mr>0?hH-mr:hH-mr+yo,Yng=bH-Math.PI>0?bH-yo:bH,EP=-Math.abs(Yng),Gr=mr+(gY<EP?EP:gY>0?0:gY),Nng=_s+jP*Math.cos(Gr),Vng=qs+QP*Math.sin(Gr),Mng=_s+No*Math.cos(Sn),Rng=qs+Vo*Math.sin(Sn),fng=_s+Dn*Math.cos(Sn),Hng=qs+Kn*Math.sin(Sn),PP=OP+Yo*Math.cos(Gr),_P=UP+Yo*Math.sin(Gr),qP=OP-Yo*Math.cos(Gr),$P=UP-Yo*Math.sin(Gr),g6=qP-_s,I6=$P-qs,C6=PP-_s,t6=_P-qs,kn=Math.min(No,Vo),i6=g6*kn/No,e6=I6*kn/Vo,sY=C6*kn/No,lY=t6*kn/Vo,wr=sY-i6,Mo=lY-e6,EA=Math.sqrt(wr*wr+Mo*Mo),pr=i6*lY-sY*e6,nY=Math.sqrt(Math.max(0,kn*kn*EA*EA-pr*pr)),aY=-1*Mo>0?-1:1,A6=(pr*Mo+aY*wr*nY)/(EA*EA),s6=(pr*Mo-aY*wr*nY)/(EA*EA),l6=(-pr*wr+Math.abs(Mo)*nY)/(EA*EA),n6=(-pr*wr-Math.abs(Mo)*nY)/(EA*EA),a6=Math.sqrt(Math.pow(sY-s6,2)+Math.pow(lY-n6,2))-Math.sqrt(Math.pow(sY-A6,2)+Math.pow(lY-l6,2)),oY=_s+(a6>0?A6:s6)*No/kn,cY=qs+(a6>0?l6:n6)*Vo/kn,dY=g6*li/Dn,rY=I6*li/Kn,o6=C6*li/Dn,c6=t6*li/Kn,Br=o6-dY,Wr=c6-rY,PA=Math.sqrt(Br*Br+Wr*Wr),yr=dY*c6-o6*rY,hY=Math.sqrt(Math.max(0,li*li*PA*PA-yr*yr)),d6=(yr*Wr+aY*Br*hY)/(PA*PA),r6=(yr*Wr-aY*Br*hY)/(PA*PA),h6=(-yr*Br+Math.abs(Wr)*hY)/(PA*PA),b6=(-yr*Br-Math.abs(Wr)*hY)/(PA*PA),u6=Math.sqrt(Math.pow(dY-r6,2)+Math.pow(rY-b6,2))-Math.sqrt(Math.pow(dY-d6,2)+Math.pow(rY-h6,2)),m6=u6>0?d6:r6,Z6=u6>0?h6:b6,G6=_s+m6*Dn/li,w6=qs+Z6*Kn/li,uH=Math.atan2(Z6*Kn/li,m6*Dn/li),p6=uH>0?uH:uH+yo,mH=Sn-p6,B6=mH>0?mH:mH+yo,Xng=p6+B6,Sng=-B6,bY=Math.sqrt(Math.pow(oY-G6,2)+Math.pow(cY-w6,2))/2-Yo,Dng=bY>0?oY:PP,Kng=bY>0?cY:_P,Fng=bY>0?G6:qP,kng=bY>0?w6:$P,ZH=Math.atan2(cY-qs,oY-_s),GH=(ZH>0?ZH:ZH+yo)-Sn,zng=180*(Sn+(GH>0?GH-yo:GH))/Math.PI,Jng=180*Sn/Math.PI,W6=180*Xng/Math.PI,Lng=W6+180*Sng/Math.PI;i="M ".concat(Mng,",").concat(Rng," L ").concat(fng,",").concat(Hng," ").concat(Mg(I/2,g/2,Dn,Kn,W6,Lng,!1).replace("M","L")," L ").concat(Fng,",").concat(kng," L ").concat(Nng,",").concat(Vng," L ").concat(Dng,",").concat(Kng," L ").concat(oY,",").concat(cY," ").concat(Mg(I/2,g/2,No,Vo,zng,Jng,!1).replace("M","L")," z")}return i}function pX(t,I){if(!t||!I)return null;var g=U(t,[I,"p:transition"]);return g||((g=U(t,[I,"mc:AlternateContent","mc:Choice","p:transition"]))?g:g=U(t,[I,"mc:AlternateContent","mc:Fallback","p:transition"]))}function sbg(t){if(!t)return null;var I={type:"none",duration:1e3,direction:null},g=t.attrs||{},C=!1,i=/^p\d{2}:dur$/;for(var e in g)if(i.test(e)&&!isNaN(parseInt(g[e],10))){I.duration=parseInt(g[e],10),C=!0;break}if(!C&&g.spd)switch(g.spd){case"slow":default:I.duration=1e3;break;case"med":I.duration=800;break;case"fast":I.duration=500}g.advClick==="0"&&g.advTm&&(I.autoNextAfter=parseInt(g.advTm,10));var A=/^(p|p\d{2}):/;for(var s in t)if(s!=="attrs"&&A.test(s)){var l=t[s];if(I.type=s.substring(s.indexOf(":")+1),l&&l.attrs){var n=l.attrs;n.dur&&!isNaN(parseInt(n.dur,10))&&(C||(I.duration=parseInt(n.dur,10))),n.dir&&(I.direction=n.dir)}break}return I}function oq(t,I){var g=Object.keys(t);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(t);I&&(C=C.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),g.push.apply(g,C)}return g}function _t(t){for(var I=1;I<arguments.length;I++){var g=arguments[I]!=null?arguments[I]:{};I%2?oq(Object(g),!0).forEach(function(C){h9(t,C,g[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(g)):oq(Object(g)).forEach(function(C){Object.defineProperty(t,C,Object.getOwnPropertyDescriptor(g,C))})}return t}function uC(t,I){var g=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!g){if(Array.isArray(t)||(g=function(l,n){if(l){if(typeof l=="string")return cq(l,n);var a=Object.prototype.toString.call(l).slice(8,-1);if(a==="Object"&&l.constructor&&(a=l.constructor.name),a==="Map"||a==="Set")return Array.from(l);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return cq(l,n)}}(t))||I){g&&(t=g);var C=0,i=function(){};return{s:i,n:function(){return C>=t.length?{done:!0}:{done:!1,value:t[C++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var e,A=!0,s=!1;return{s:function(){g=g.call(t)},n:function(){var l=g.next();return A=l.done,l},e:function(l){s=!0,e=l},f:function(){try{A||g.return==null||g.return()}finally{if(s)throw e}}}}function cq(t,I){(I==null||I>t.length)&&(I=t.length);for(var g=0,C=new Array(I);g<I;g++)C[g]=t[g];return C}function ftg(t){var I=U(t,["p:nvSpPr","p:nvPr","p:ph"])||U(t,["p:nvPicPr","p:nvPr","p:ph"])||U(t,["p:nvGraphicFramePr","p:nvPr","p:ph"]);if(!I)return null;var g=U(I,["attrs","type"]);return g?String(g):null}function Htg(t){return t==="dt"||t==="sldNum"||t==="ftr"||t==="hdr"}function lbg(t){return U(t,["p:nvSpPr","p:cNvPr","attrs","name"])||U(t,["p:nvPicPr","p:cNvPr","attrs","name"])||U(t,["p:nvGraphicFramePr","p:cNvPr","attrs","name"])||""}function Xtg(t){if(!t)return!1;var I=String(t);return/(^|\b)(Footer Text|Header Text|Slide Number|Date)(\b|$)/i.test(I)||/页脚|页眉|页码|日期/.test(I)}function Stg(t){return String(t||"").replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").trim()}function nbg(t){var I=String(t||"").replace(/\s+/g," ").trim();if(!I)return!1;var g=I.toLowerCase();return g==="click to add title"||g==="click to add text"||g==="click to add subtitle"||g==="click to add notes"||/edit\s+master/.test(g)||/edit\s+the\s+master/.test(g)||/edit\s+master\s+(title|text)/.test(g)||I==="此处添加标题"||I==="单击以添加标题"||I==="单击此处添加标题"||I==="此处添加文本"||I==="单击以添加文本"||I==="单击此处添加文本"||I==="单击以添加副标题"||I==="单击此处添加副标题"||I.includes("编辑母版")}function abg(t,I){if(!t||t.type!=="text"||!Number.isFinite(I)||I<=0||!Number.isFinite(t.top)||!Number.isFinite(t.height))return!1;var g=Stg(t.content);if(!g)return!1;var C=t.top>.78*I,i=t.height<.2*I;if(!C||!i)return!1;var e=/^[0-9]{1,3}$/.test(g),A=/^(\d{4}[\-/]\d{1,2}[\-/]\d{1,2})$/.test(g)||/(年\d{1,2}月\d{1,2}日)$/.test(g),s=/页码|日期/.test(g);return e||A||s}function bD(t,I){var g,C=[],i=uC(t||[]);try{for(i.s();!(g=i.n()).done;){var e=g.value;if(e&&!Xtg(e.name)&&!(abg(e,I)||e.type==="text"&&nbg(Stg(e.content))))if(Array.isArray(e.elements)){var A=bD(e.elements,I);if(!A.length)continue;C.push(_t(_t({},e),{},{elements:A}))}else C.push(e)}}catch(s){i.e(s)}finally{i.f()}return C}function uD(t){if(!Array.isArray(t))return t;for(var I=0;I<t.length;I++){var g=t[I];g&&La(g)==="object"&&(g.order=I,Array.isArray(g.elements)&&uD(g.elements))}return t}function obg(t,I){var g=bD(t.elements,I),C=bD(t.layoutElements,I);return uD(g),uD(C),_t(_t({},t),{},{elements:g,layoutElements:C})}function kl(t,I,g){t&&Array.isArray(t.trace)&&(g===void 0?t.trace.push({step:I}):t.trace.push({step:I,data:g}))}function cbg(t){return mD.apply(this,arguments)}function mD(){return mD=RC(rI.mark(function t(I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p=arguments;return rI.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return g=p.length>1&&p[1]!==void 0?p[1]:{},C=[],Y.next=4,p0g.loadAsync(I);case 4:return i=Y.sent,Y.next=7,dbg(i);case 7:return e=Y.sent,Y.next=10,rbg(i);case 10:return A=Y.sent,s=A.width,l=A.height,n=A.defaultTextStyle,a=A.headerFooter,Y.next=17,hbg(i);case 17:return d=Y.sent,o=d.themeContent,c=d.themeColors,Y.next=22,bbg(i);case 22:r=Y.sent,h=r.length?r:e.slides,b=0;case 25:if(!(b<h.length)){Y.next=35;break}return u=h[b],m=b+1,Y.next=30,ubg(i,u,o,n,a,m,g);case 30:Z=Y.sent,C.push(obg(Z,l));case 32:b++,Y.next=25;break;case 35:return Y.abrupt("return",{slides:C,themeColors:c,size:{width:s,height:l}});case 36:case"end":return Y.stop()}},t)})),mD.apply(this,arguments)}function dbg(t){return Dtg.apply(this,arguments)}function Dtg(){return(Dtg=RC(rI.mark(function t(I){var g,C,i,e,A,s,l,n;return rI.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Gt(I,"[Content_Types].xml");case 2:g=a.sent,C=g.Types.Override,i=[],e=[],A=uC(C),a.prev=7,A.s();case 9:if((s=A.n()).done){a.next=20;break}l=s.value,a.t0=l.attrs.ContentType,a.next=a.t0==="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"?14:a.t0==="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"?16:18;break;case 14:return i.push(l.attrs.PartName.substr(1)),a.abrupt("break",18);case 16:return e.push(l.attrs.PartName.substr(1)),a.abrupt("break",18);case 18:a.next=9;break;case 20:a.next=25;break;case 22:a.prev=22,a.t1=a.catch(7),A.e(a.t1);case 25:return a.prev=25,A.f(),a.finish(25);case 28:return n=function(d,o){return+/(\d+)\.xml/.exec(d)[1]-+/(\d+)\.xml/.exec(o)[1]},i=i.sort(n),e=e.sort(n),a.abrupt("return",{slides:i,slideLayouts:e});case 32:case"end":return a.stop()}},t,null,[[7,22,25,28]])}))).apply(this,arguments)}function rbg(t){return ZD.apply(this,arguments)}function ZD(){return ZD=RC(rI.mark(function t(I){var g,C,i,e,A,s,l;return rI.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Gt(I,"ppt/presentation.xml");case 2:return g=n.sent,C=g["p:presentation"]["p:sldSz"].attrs,i=g["p:presentation"]["p:defaultTextStyle"],e=function(a){if(a!=null){var d=String(a).toLowerCase();return d==="1"||d==="true"||d==="on"}},A=function(a){return a===void 0||a},s=U(g,["p:presentation","p:hf","attrs"]),l={dt:A(e(U(s,["dt"]))),ftr:A(e(U(s,["ftr"]))),hdr:A(e(U(s,["hdr"]))),sldNum:A(e(U(s,["sldNum"])))},n.abrupt("return",{width:parseInt(C.cx)*wg,height:parseInt(C.cy)*wg,defaultTextStyle:i,headerFooter:l});case 10:case"end":return n.stop()}},t)})),ZD.apply(this,arguments)}function hbg(t){return GD.apply(this,arguments)}function GD(){return GD=RC(rI.mark(function t(I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m;return rI.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,Gt(I,"ppt/_rels/presentation.xml.rels");case 2:if(g=Z.sent,(C=g.Relationships.Relationship).constructor!==Array){Z.next=25;break}e=uC(C),Z.prev=6,e.s();case 8:if((A=e.n()).done){Z.next=15;break}if((s=A.value).attrs.Type!=="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"){Z.next=13;break}return i=s.attrs.Target,Z.abrupt("break",15);case 13:Z.next=8;break;case 15:Z.next=20;break;case 17:Z.prev=17,Z.t0=Z.catch(6),e.e(Z.t0);case 20:return Z.prev=20,e.f(),Z.finish(20);case 23:Z.next=26;break;case 25:C.attrs.Type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"&&(i=C.attrs.Target);case 26:return Z.next=28,Gt(I,"ppt/"+i);case 28:if(l=Z.sent,n=[],!(a=U(l,["a:theme","a:themeElements","a:clrScheme"]))){Z.next=46;break}d=Object.keys(a),o=0,c=d;case 34:if(!(o<c.length)){Z.next=46;break}if((r=c[o]).startsWith("a:")){Z.next=38;break}return Z.abrupt("continue",43);case 38:h=a[r],b=U(h,["a:srgbClr","attrs","val"]),u=U(h,["a:sysClr","attrs","lastClr"]),(m=b||u)&&n.push("#"+m);case 43:o++,Z.next=34;break;case 46:return Z.abrupt("return",{themeContent:l,themeColors:n});case 47:case"end":return Z.stop()}},t,null,[[6,17,20,23]])})),GD.apply(this,arguments)}function bbg(t){return wD.apply(this,arguments)}function wD(){return wD=RC(rI.mark(function t(I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z;return rI.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Gt(I,"ppt/presentation.xml");case 2:return g=p.sent,p.next=5,Gt(I,"ppt/_rels/presentation.xml.rels");case 5:if(C=p.sent,g&&C){p.next=8;break}return p.abrupt("return",[]);case 8:i=U(g,["p:presentation","p:sldIdLst","p:sldId"]),e=Array.isArray(i)?i:i?[i]:[],A=U(C,["Relationships","Relationship"]),s=Array.isArray(A)?A:A?[A]:[],l=new Map,n=uC(s),p.prev=14,n.s();case 16:if((a=n.n()).done){p.next=28;break}if(d=a.value,U(d,["attrs","Type"])==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"){p.next=21;break}return p.abrupt("continue",26);case 21:if(o=U(d,["attrs","Id"]),c=U(d,["attrs","Target"]),o&&c){p.next=25;break}return p.abrupt("continue",26);case 25:l.set(String(o),String(c));case 26:p.next=16;break;case 28:p.next=33;break;case 30:p.prev=30,p.t0=p.catch(14),n.e(p.t0);case 33:return p.prev=33,n.f(),p.finish(33);case 36:r=[],h=uC(e),p.prev=38,h.s();case 40:if((b=h.n()).done){p.next=51;break}if(u=b.value,m=U(u,["attrs","r:id"])){p.next=45;break}return p.abrupt("continue",49);case 45:if(Z=l.get(String(m))){p.next=48;break}return p.abrupt("continue",49);case 48:Z.startsWith("ppt/")?r.push(Z):Z.startsWith("../")?r.push(Z.replace("../","ppt/")):r.push("ppt/"+Z.replace(/^\//,""));case 49:p.next=40;break;case 51:p.next=56;break;case 53:p.prev=53,p.t1=p.catch(38),h.e(p.t1);case 56:return p.prev=56,h.f(),p.finish(56);case 59:return p.abrupt("return",r);case 60:case"end":return p.stop()}},t,null,[[14,30,33,36],[38,53,56,59]])})),wD.apply(this,arguments)}function ubg(t,I,g,C,i,e){return pD.apply(this,arguments)}function pD(){return pD=RC(rI.mark(function t(I,g,C,i,e,A){var s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig,ng,ag,lg,cg,dg,hg,rg,Wg,Gg,Sg,Kg,kg,yg,Vg,pg,Hg,Jg,zg,aI,BI,Ug,lI,oI,Eg,LI,fI,tI,WI,QI,nI,kI=arguments;return rI.wrap(function(Bg){for(;;)switch(Bg.prev=Bg.next){case 0:return s=kI.length>6&&kI[6]!==void 0?kI[6]:{},l=g.replace("slides/slide","slides/_rels/slide")+".rels",Bg.next=4,Gt(I,l);case 4:n=Bg.sent,(a=n.Relationships.Relationship).constructor!==Array&&(a=[a]),d="",o="",c="",r="",h=[],b={},u={},m={},Z={},p={},Y=uC(a),Bg.prev=18,Y.s();case 20:if((R=Y.n()).done){Bg.next=37;break}X=R.value,Bg.t0=X.attrs.Type,Bg.next=Bg.t0==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"?25:Bg.t0==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"?28:Bg.t0==="http://schemas.microsoft.com/office/2007/relationships/diagramDrawing"?31:(Bg.t0==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"||Bg.t0==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"||Bg.t0,34);break;case 25:return o=X.attrs.Target.replace("../","ppt/"),b[X.attrs.Id]={type:X.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:X.attrs.Target.replace("../","ppt/")},Bg.abrupt("break",35);case 28:return d=X.attrs.Target.replace("../","ppt/"),b[X.attrs.Id]={type:X.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:X.attrs.Target.replace("../","ppt/")},Bg.abrupt("break",35);case 31:return h.push(X.attrs.Target.replace("../","ppt/")),b[X.attrs.Id]={type:"diagramDrawing",target:X.attrs.Target.replace("../","ppt/")},Bg.abrupt("break",35);case 34:b[X.attrs.Id]={type:X.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:X.attrs.Target.replace("../","ppt/")};case 35:Bg.next=20;break;case 37:Bg.next=42;break;case 39:Bg.prev=39,Bg.t1=Bg.catch(18),Y.e(Bg.t1);case 42:return Bg.prev=42,Y.f(),Bg.finish(42);case 45:return H=s&&s.trace?[]:null,(S=!!H)&&H.push({step:"slide/rels",data:{slideNo:A,sldFileName:g,slideRels:l,noteFilename:d,layoutFilename:o}}),Bg.next=50,Gt(I,d);case 50:return z=Bg.sent,v=mbg(z),Bg.next=54,Gt(I,o);case 54:return K=Bg.sent,Bg.next=57,dq(K);case 57:return V=Bg.sent,N=o.replace("slideLayouts/slideLayout","slideLayouts/_rels/slideLayout")+".rels",Bg.next=61,Gt(I,N);case 61:B=Bg.sent,(a=B.Relationships.Relationship).constructor!==Array&&(a=[a]),G=uC(a),Bg.prev=65,G.s();case 67:if((w=G.n()).done){Bg.next=77;break}W=w.value,Bg.t2=W.attrs.Type,Bg.next=Bg.t2==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"?72:74;break;case 72:return c=W.attrs.Target.replace("../","ppt/"),Bg.abrupt("break",75);case 74:u[W.attrs.Id]={type:W.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:W.attrs.Target.replace("../","ppt/")};case 75:Bg.next=67;break;case 77:Bg.next=82;break;case 79:Bg.prev=79,Bg.t3=Bg.catch(65),G.e(Bg.t3);case 82:return Bg.prev=82,G.f(),Bg.finish(82);case 85:return S&&H.push({step:"slideLayout/rels",data:{slideLayout:o,slideLayoutRels:N,slideMaster:c}}),Bg.next=88,Gt(I,c);case 88:return y=Bg.sent,f=U(y,["p:sldMaster","p:txStyles"]),D=dq(y),F=c.replace("slideMasters/slideMaster","slideMasters/_rels/slideMaster")+".rels",Bg.next=94,Gt(I,F);case 94:T=Bg.sent,(a=T.Relationships.Relationship).constructor!==Array&&(a=[a]),Q=uC(a),Bg.prev=98,Q.s();case 100:if((P=Q.n()).done){Bg.next=110;break}L=P.value,Bg.t4=L.attrs.Type,Bg.next=Bg.t4==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"?105:107;break;case 105:return r=L.attrs.Target.replace("../","ppt/"),Bg.abrupt("break",108);case 107:m[L.attrs.Id]={type:L.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:L.attrs.Target.replace("../","ppt/")};case 108:Bg.next=100;break;case 110:Bg.next=115;break;case 112:Bg.prev=112,Bg.t5=Bg.catch(98),Q.e(Bg.t5);case 115:return Bg.prev=115,Q.f(),Bg.finish(115);case 118:if(S&&H.push({step:"slideMaster/rels",data:{slideMaster:c,slideMasterRels:F,themeFilename:r}}),E=C,!r){Bg.next=131;break}return Bg.next=123,Gt(I,r);case 123:return(J=Bg.sent)&&(E=J),k=r.split("/").pop(),j=r.replace(k,"_rels/"+k)+".rels",Bg.next=129,Gt(I,j);case 129:if((q=Bg.sent)&&(a=q.Relationships.Relationship)){a.constructor!==Array&&(a=[a]),tg=uC(a);try{for(tg.s();!(Cg=tg.n()).done;)x=Cg.value,Z[x.attrs.Id]={type:x.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:x.attrs.Target.replace("../","ppt/")}}catch(hI){tg.e(hI)}finally{tg.f()}}case 131:if(sg={},Ag={},!h.length){Bg.next=162;break}O=uC(h),Bg.prev=135,O.s();case 137:if((_=O.n()).done){Bg.next=154;break}return Ig=_.value,ng=Ig.split("/").pop(),ag=Ig.replace(ng,"_rels/"+ng)+".rels",Bg.next=143,Gt(I,Ig);case 143:return(lg=Bg.sent)&&(cg=JSON.stringify(lg).replace(/dsp:/g,"p:"),lg=JSON.parse(cg)),sg[Ig]=lg,dg={},Bg.next=149,Gt(I,ag);case 149:if(hg=Bg.sent){(a=hg.Relationships.Relationship).constructor!==Array&&(a=[a]),rg=uC(a);try{for(rg.s();!(Wg=rg.n()).done;)Gg=Wg.value,dg[Gg.attrs.Id]={type:Gg.attrs.Type.replace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/",""),target:Gg.attrs.Target.replace("../","ppt/")}}catch(hI){rg.e(hI)}finally{rg.f()}}Ag[Ig]=dg;case 152:Bg.next=137;break;case 154:Bg.next=159;break;case 156:Bg.prev=156,Bg.t6=Bg.catch(135),O.e(Bg.t6);case 159:return Bg.prev=159,O.f(),Bg.finish(159);case 162:if(Sg=h.length?sg[h[0]]:null,h.length&&(Kg=h[0],kg=Ag[Kg]))for(yg in kg)p[yg]=kg[yg];return Bg.next=166,Gt(I,"ppt/tableStyles.xml");case 166:return Vg=Bg.sent,Bg.next=169,Gt(I,g);case 169:return pg=Bg.sent,Hg=pg["p:sld"]["p:cSld"]["p:spTree"],Jg=U(pg,["p:sld","attrs"]),zg=U(Jg,["showPh"]),aI={zip:I,slideLayoutContent:K,slideLayoutTables:V,slideMasterContent:y,slideMasterTables:D,slideContent:pg,tableStyles:Vg,slideResObj:b,slideMasterTextStyles:f,layoutResObj:u,masterResObj:m,themeContent:E,themeResObj:Z,digramFileContent:Sg,diagramResObj:p,diagramDrawingTargets:h,diagramDrawingContents:sg,diagramResObjByTarget:Ag,diagramDrawingCursor:0,defaultTextStyle:i,headerFooter:e,slideNo:A,trace:H},Bg.next=176,Zbg(aI);case 176:return BI=Bg.sent,Bg.next=179,v0g(aI);case 179:Ug=Bg.sent,lI=[],Bg.t7=rI.keys(Hg);case 182:if((Bg.t8=Bg.t7()).done){Bg.next=213;break}oI=Bg.t8.value,Hg[oI].constructor!==Array&&(Hg[oI]=[Hg[oI]]),Eg=uC(Hg[oI]),Bg.prev=186,Eg.s();case 188:if((LI=Eg.n()).done){Bg.next=203;break}if(fI=LI.value,zg!=="0"){Bg.next=194;break}if(!(U(fI,["p:nvSpPr","p:nvPr","p:ph"])||U(fI,["p:nvPicPr","p:nvPr","p:ph"])||U(fI,["p:nvGraphicFramePr","p:nvPr","p:ph"]))){Bg.next=194;break}return Bg.abrupt("continue",201);case 194:if(!Htg(ftg(fI))){Bg.next=197;break}return Bg.abrupt("continue",201);case 197:return Bg.next=199,vl(oI,fI,Hg,aI,"slide");case 199:(tI=Bg.sent)&&lI.push(tI);case 201:Bg.next=188;break;case 203:Bg.next=208;break;case 205:Bg.prev=205,Bg.t9=Bg.catch(186),Eg.e(Bg.t9);case 208:return Bg.prev=208,Eg.f(),Bg.finish(208);case 211:Bg.next=182;break;case 213:return u0(lI),u0(BI),(WI=pX(pg,"p:sld"))||(WI=pX(K,"p:sldLayout")),WI||(WI=pX(y,"p:sldMaster")),QI=sbg(WI),nI={fill:Ug,elements:lI,layoutElements:BI,note:v,transition:QI},S&&H.length&&(nI.trace=H),Bg.abrupt("return",nI);case 222:case"end":return Bg.stop()}},t,null,[[18,39,42,45],[65,79,82,85],[98,112,115,118],[135,156,159,162],[186,205,208,211]])})),pD.apply(this,arguments)}function mbg(t){var I="",g=U(t,["p:notes","p:cSld","p:spTree","p:sp"]);if(!g)return"";g.constructor!==Array&&(g=[g]);var C,i=uC(g);try{for(i.s();!(C=i.n()).done;){var e=U(C.value,["p:txBody","a:p","a:r"]);if(e){e.constructor!==Array&&(e=[e]);var A,s=uC(e);try{for(s.s();!(A=s.n()).done;){var l=U(A.value,["a:t"]);l&&typeof l=="string"&&(I+=l)}}catch(n){s.e(n)}finally{s.f()}}}}catch(n){i.e(n)}finally{i.f()}return I}function Zbg(t){return BD.apply(this,arguments)}function BD(){return BD=RC(rI.mark(function t(I){var g,C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig,ng,ag,lg,cg,dg,hg;return rI.wrap(function(rg){for(;;)switch(rg.prev=rg.next){case 0:if(g=[],C=I.slideLayoutContent,i=I.slideMasterContent,e=I.slideContent,A=U(C,["p:sldLayout","p:cSld","p:spTree"]),s=U(i,["p:sldMaster","p:cSld","p:spTree"]),l=new Set,n=U(e,["p:sld","p:cSld","p:spTree"]),a=U(e,["p:sld","attrs"]),d=U(a,["showMasterSp"]),o=U(a,["showMasterPh"]),c=U(a,["showPh"]),kl(I,"layout/start",{slideNo:I&&I.slideNo,slideShowPh:c,slideShowMasterSp:d,slideShowMasterPh:o}),r=function(Wg,Gg){var Sg=Wg||"",Kg=Gg||"";(Sg||Kg)&&(l.add("".concat(Sg,"|").concat(Kg)),Sg&&l.add("".concat(Sg,"|")),Kg&&l.add("|".concat(Kg)))},h=function(Wg){var Gg=U(Wg,["p:txBody"]);if(!Gg)return!1;var Sg,Kg=U(Gg,["a:p"]),kg=uC(Array.isArray(Kg)?Kg:Kg?[Kg]:[]);try{for(kg.s();!(Sg=kg.n()).done;){var yg,Vg=Sg.value,pg=U(Vg,["a:r"]),Hg=uC(Array.isArray(pg)?pg:pg?[pg]:[]);try{for(Hg.s();!(yg=Hg.n()).done;){var Jg=U(yg.value,["a:t"]);if(typeof Jg=="string"&&Jg.trim()!=="")return!0}}catch(lI){Hg.e(lI)}finally{Hg.f()}var zg,aI=U(Vg,["a:fld"]),BI=uC(Array.isArray(aI)?aI:aI?[aI]:[]);try{for(BI.s();!(zg=BI.n()).done;){var Ug=U(zg.value,["a:t"]);if(typeof Ug=="string"&&Ug.trim()!=="")return!0}}catch(lI){BI.e(lI)}finally{BI.f()}}}catch(lI){kg.e(lI)}finally{kg.f()}return!1},b=function(Wg,Gg){if(!Gg||!Gg.type)return!1;var Sg=String(Gg.type);if(!new Set(["ftr"]).has(Sg))return!1;var Kg=U(I,["slideContent","p:sld","p:hdrFtr","attrs"]),kg=U(Kg,[Sg]),yg=kg!==void 0?function(pg){if(pg==null)return!1;var Hg=String(pg).toLowerCase();return Hg==="1"||Hg==="true"||Hg==="on"}(kg):void 0,Vg=I&&I.headerFooter&&I.headerFooter[Sg]!==void 0?!!I.headerFooter[Sg]:void 0;return!!(yg!==void 0?yg:Vg===void 0||Vg)&&Sg==="ftr"&&h(Wg)},u=function(Wg){return!!(U(Wg,["p:nvSpPr","p:nvPr","p:ph"])||U(Wg,["p:nvPicPr","p:nvPr","p:ph"])||U(Wg,["p:nvGraphicFramePr","p:nvPr","p:ph"]))},m=function(Wg){var Gg=U(Wg,["p:nvSpPr","p:nvPr","p:ph"])||U(Wg,["p:nvPicPr","p:nvPr","p:ph"])||U(Wg,["p:nvGraphicFramePr","p:nvPr","p:ph"]);if(!Gg)return null;var Sg=U(Gg,["attrs","type"]),Kg=U(Gg,["attrs","idx"]);return Sg||Kg?{type:Sg,idx:Kg}:null},Z=function Wg(Gg,Sg){if(Sg){var Kg=m(Sg);if(Kg&&r(Kg.type,Kg.idx),Gg!=="p:grpSp"){if(Gg==="mc:AlternateContent"){var kg=U(Sg,["mc:Fallback"]),yg=kg&&(kg["p:grpSp"]||kg);if(yg)if(yg["p:grpSpPr"])Wg("p:grpSp",yg);else for(var Vg in yg){var pg=yg[Vg];if(Array.isArray(pg)){var Hg,Jg=uC(pg);try{for(Jg.s();!(Hg=Jg.n()).done;)Wg(Vg,Hg.value)}catch(lI){Jg.e(lI)}finally{Jg.f()}}else Wg(Vg,pg)}}}else for(var zg in Sg)if(zg!=="p:nvGrpSpPr"&&zg!=="p:grpSpPr"){var aI=Sg[zg];if(Array.isArray(aI)){var BI,Ug=uC(aI);try{for(Ug.s();!(BI=Ug.n()).done;)Wg(zg,BI.value)}catch(lI){Ug.e(lI)}finally{Ug.f()}}else Wg(zg,aI)}}},p=function(Wg){if(Wg)for(var Gg in Wg){var Sg=Wg[Gg];if(Array.isArray(Sg)){var Kg,kg=uC(Sg);try{for(kg.s();!(Kg=kg.n()).done;){var yg=Kg.value;Z(Gg,yg)}}catch(Vg){kg.e(Vg)}finally{kg.f()}}else Z(Gg,Sg)}},Y=function(Wg,Gg){var Sg=Wg||"",Kg=Gg||"";return!!l.has("".concat(Sg,"|").concat(Kg))||!(!Sg||!l.has("".concat(Sg,"|")))||!(!Kg||!l.has("|".concat(Kg)))},R=function Wg(Gg){if(!Gg||Y(Gg.placeholderType,Gg.placeholderIdx))return null;if(Array.isArray(Gg.elements)){var Sg,Kg=[],kg=uC(Gg.elements);try{for(kg.s();!(Sg=kg.n()).done;){var yg=Wg(Sg.value);yg&&Kg.push(yg)}}catch(Vg){kg.e(Vg)}finally{kg.f()}return Kg.length?_t(_t({},Gg),{},{elements:Kg}):null}return Gg},p(n),kl(I,"layout/overrides/fromSlide",{size:l.size}),X=U(C,["p:sldLayout","attrs","showMasterSp"]),H=U(C,["p:sldLayout","attrs","showMasterPh"]),S=0,z=0,v=0,K=0,!A){rg.next=82;break}rg.t0=rI.keys(A);case 32:if((rg.t1=rg.t0()).done){rg.next=82;break}if(V=rg.t1.value,A[V].constructor!==Array){rg.next=61;break}N=0;case 36:if(!(N<A[V].length)){rg.next=59;break}if(B=A[V][N],c!=="0"||!u(B)){rg.next=41;break}return z+=1,rg.abrupt("continue",56);case 41:if(!(G=m(B))){rg.next=51;break}if(w=G.type||"",W=G.idx||"",!(l.has("".concat(w,"|").concat(W))||w&&l.has("".concat(w,"|"))||W&&l.has("|".concat(W)))){rg.next=48;break}return v+=1,rg.abrupt("continue",56);case 48:if(b(B,G)){rg.next=51;break}return K+=1,rg.abrupt("continue",56);case 51:return rg.next=53,vl(V,B,A,I,"slideLayoutBg");case 53:y=rg.sent,(f=R(y))&&(g.push(f),S+=1);case 56:N++,rg.next=36;break;case 59:rg.next=80;break;case 61:if(D=A[V],c!=="0"||!u(D)){rg.next=65;break}return z+=1,rg.abrupt("continue",32);case 65:if(!(F=m(D))){rg.next=75;break}if(T=F.type||"",Q=F.idx||"",!(l.has("".concat(T,"|").concat(Q))||T&&l.has("".concat(T,"|"))||Q&&l.has("|".concat(Q)))){rg.next=72;break}return v+=1,rg.abrupt("continue",32);case 72:if(b(D,F)){rg.next=75;break}return K+=1,rg.abrupt("continue",32);case 75:return rg.next=77,vl(V,D,A,I,"slideLayoutBg");case 77:P=rg.sent,(L=R(P))&&(g.push(L),S+=1);case 80:rg.next=32;break;case 82:if(kl(I,"layout/layoutElements",{showMasterSp:X,showMasterPh:H,kept:S,skipShowPh:z,skipOverridden:v,skipNotRenderable:K}),p(A),kl(I,"layout/overrides/fromLayout",{size:l.size}),E=0,J=0,k=0,j=0,q=0,!s||X==="0"||d==="0"){rg.next=148;break}rg.t2=rI.keys(s);case 92:if((rg.t3=rg.t2()).done){rg.next=148;break}if(tg=rg.t3.value,s[tg].constructor!==Array){rg.next=124;break}Cg=0;case 96:if(!(Cg<s[tg].length)){rg.next=122;break}if(x=s[tg][Cg],c!=="0"||!u(x)){rg.next=101;break}return J+=1,rg.abrupt("continue",119);case 101:if(!(sg=m(x))){rg.next=114;break}if(H!=="0"&&o!=="0"){rg.next=106;break}return k+=1,rg.abrupt("continue",119);case 106:if(Ag=sg.type||"",O=sg.idx||"",!(l.has("".concat(Ag,"|").concat(O))||Ag&&l.has("".concat(Ag,"|"))||O&&l.has("|".concat(O)))){rg.next=111;break}return j+=1,rg.abrupt("continue",119);case 111:if(b(x,sg)){rg.next=114;break}return q+=1,rg.abrupt("continue",119);case 114:return rg.next=116,vl(tg,x,s,I,"slideMasterBg");case 116:_=rg.sent,(Ig=R(_))&&(g.push(Ig),E+=1);case 119:Cg++,rg.next=96;break;case 122:rg.next=146;break;case 124:if(ng=s[tg],c!=="0"||!u(ng)){rg.next=128;break}return J+=1,rg.abrupt("continue",92);case 128:if(!(ag=m(ng))){rg.next=141;break}if(H!=="0"&&o!=="0"){rg.next=133;break}return k+=1,rg.abrupt("continue",92);case 133:if(lg=ag.type||"",cg=ag.idx||"",!(l.has("".concat(lg,"|").concat(cg))||lg&&l.has("".concat(lg,"|"))||cg&&l.has("|".concat(cg)))){rg.next=138;break}return j+=1,rg.abrupt("continue",92);case 138:if(b(ng,ag)){rg.next=141;break}return q+=1,rg.abrupt("continue",92);case 141:return rg.next=143,vl(tg,ng,s,I,"slideMasterBg");case 143:dg=rg.sent,(hg=R(dg))&&(g.push(hg),E+=1);case 146:rg.next=92;break;case 148:return kl(I,"layout/masterElements",{kept:E,skipShowPh:J,skipShowMasterPh:k,skipOverridden:j,skipNotRenderable:q}),rg.abrupt("return",g);case 150:case"end":return rg.stop()}},t)})),BD.apply(this,arguments)}function u0(t){return t.sort(function(I,g){var C=parseInt(I&&I.order),i=parseInt(g&&g.order);return(isNaN(C)?0:C)-(isNaN(i)?0:i)})}function Ktg(t){return U(t,["p:grpSpPr","a:xfrm"])||U(t,["p:grpSp","p:grpSpPr","a:xfrm"])}function Ftg(t,I,g){if(!t)return t;var C,i,e=_t({},t);return typeof e.left=="number"&&(e.left=Dt(e.left*I)),typeof e.top=="number"&&(e.top=Dt(e.top*g)),typeof e.width=="number"&&(e.width=Dt(e.width*I)),typeof e.height=="number"&&(e.height=Dt(e.height*g)),typeof e.borderWidth=="number"&&(e.borderWidth=Dt(e.borderWidth*Math.max(I,g))),typeof e.path=="string"&&(e.path=function(A,s,l){if(!A||s===1&&l===1)return A;var n=String(A).match(/[a-zA-Z]|[-+]?(?:\d*\.\d+|\d+)(?:e[-+]?\d+)?/g);if(!n)return A;var a,d={M:2,L:2,T:2,H:1,V:1,C:6,S:4,Q:4,A:7,Z:0},o=[],c=null,r=0,h=uC(n);try{for(h.s();!(a=h.n()).done;){var b=a.value;if(/^[a-zA-Z]$/.test(b))c=b,r=0,o.push(b);else{var u=c?c.toUpperCase():"",m=d[u];if(m){var Z=r%m,p=b;if(u!=="A"||Z!==2&&Z!==3&&Z!==4){var Y=parseFloat(b);if(!isNaN(Y)){var R=Y;u==="H"?R=Y*s:u==="V"?R=Y*l:u==="A"?Z===0?R=Y*s:Z===1?R=Y*l:Z===5?R=Y*s:Z===6&&(R=Y*l):R=Z%2==0?Y*s:Y*l,p=String(Dt(R))}}else p=b;o.push(p),r+=1}else o.push(b)}}}catch(X){h.e(X)}finally{h.f()}return o.join(" ")}(e.path,I,g)),e.content&&(e.content=(C=e.content,(i=g)!==1&&C?C.replace(/(font-size:\s*)([\d.]+)pt/g,function(A,s,l){var n=parseFloat(l)*i;return"".concat(s).concat(Dt(n),"pt")}):C)),Array.isArray(e.elements)&&(e.elements=e.elements.map(function(A){return Ftg(A,I,g)})),e}function ktg(t,I,g,C,i){if(!Array.isArray(t)||!C&&!i)return t;var e=Number(I),A=Number(g);if(!Number.isFinite(e)||!Number.isFinite(A))return t;var s,l=uC(t);try{for(l.s();!(s=l.n()).done;){var n=s.value;if(n&&La(n)==="object"){var a=typeof n.width=="number"?n.width:0,d=typeof n.height=="number"?n.height:0;C&&typeof n.left=="number"&&(n.left=Dt(e-n.left-a)),i&&typeof n.top=="number"&&(n.top=Dt(A-n.top-d));var o=typeof n.content=="string"&&ptg(n.content);n.type==="text"||o?(n.isFlipH=!1,n.isFlipV=!1):n.type==="group"&&Array.isArray(n.elements)?(ktg(n.elements,n.width,n.height,C,i),n.isFlipH=!1,n.isFlipV=!1):(C&&(n.isFlipH=!n.isFlipH),i&&(n.isFlipV=!n.isFlipV),(C?1:0)^(i?1:0)&&typeof n.rotate=="number"&&(n.rotate=Dt(-n.rotate)))}}}catch(c){l.e(c)}finally{l.f()}return u0(t),t}function sh(t,I){var g,C=uC(t||[]);try{for(C.s();!(g=C.n()).done;){var i=g.value;if(i){var e=U(i,["attrs",I]);if(e!=null)return e}}}catch(A){C.e(A)}finally{C.f()}}function dq(t){var I=t[Object.keys(t)[0]]["p:cSld"]["p:spTree"],g={},C={},i={},e={},A=function(l){if(l){for(var n in l)if(n!=="p:nvGrpSpPr"&&n!=="p:grpSpPr"){var a=l[n];if(Array.isArray(a)){var d,o=uC(a);try{for(o.s();!(d=o.n()).done;){var c=d.value;s(n,c)}}catch(r){o.e(r)}finally{o.f()}}else s(n,a)}}},s=function l(n,a){if(a)if(n!=="p:sp"&&n!=="p:pic"&&n!=="p:graphicFrame")if(n!=="p:grpSp"){if(n==="mc:AlternateContent"){var d=U(a,["mc:Fallback"]),o=d&&(d["p:grpSp"]||d);o&&(o["p:grpSpPr"]?l("p:grpSp",o):A(o))}}else A(a);else(function(c){var r=function(m){return m&&(m["p:nvSpPr"]||m["p:nvPicPr"]||m["p:nvGraphicFramePr"])||null}(c);if(r){var h=U(r,["p:cNvPr","attrs","id"]),b=U(r,["p:nvPr","p:ph","attrs","idx"]),u=U(r,["p:nvPr","p:ph","attrs","type"]);h&&(g[h]=c),b&&(C[b]=c),u&&(i[u]=c),u&&b&&(e["".concat(u,"|").concat(b)]=c)}})(a)};return A(I),{idTable:g,idxTable:C,typeTable:i,typeIdxTable:e}}function vl(t,I,g,C,i){return WD.apply(this,arguments)}function WD(){return WD=RC(rI.mark(function t(I,g,C,i,e){var A,s,l,n,a=arguments;return rI.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(A=a.length>5&&a[5]!==void 0?a[5]:[],!Htg(ftg(g))){d.next=4;break}return d.abrupt("return",null);case 4:if(!Xtg(lbg(g))){d.next=7;break}return d.abrupt("return",null);case 7:d.t0=I,d.next=d.t0==="p:sp"?10:d.t0==="p:cxnSp"?14:d.t0==="p:pic"?18:d.t0==="p:graphicFrame"?22:d.t0==="p:grpSp"?26:d.t0==="mc:AlternateContent"?30:42;break;case 10:return d.next=12,wbg(g,C,i,e,A);case 12:return s=d.sent,d.abrupt("break",42);case 14:return d.next=16,pbg(g,C,i,e,A);case 16:return s=d.sent,d.abrupt("break",42);case 18:return d.next=20,Bbg(g,i,e,A);case 20:return s=d.sent,d.abrupt("break",42);case 22:return d.next=24,Wbg(g,i,e);case 24:return s=d.sent,d.abrupt("break",42);case 26:return d.next=28,YD(g,i,e,A);case 28:return s=d.sent,d.abrupt("break",42);case 30:if(l=U(g,["mc:Fallback"]),!(n=l&&(l["p:grpSp"]||l))||!Ktg(n)){d.next=37;break}return d.next=35,YD(n,i,e,A);case 35:return s=d.sent,d.abrupt("break",42);case 37:if(!U(g,["mc:Choice"])){d.next=41;break}return d.next=40,Gbg(g,i,e);case 40:s=d.sent;case 41:return d.abrupt("break",42);case 42:return d.abrupt("return",s);case 43:case"end":return d.stop()}},t)})),WD.apply(this,arguments)}function Gbg(t,I,g){return yD.apply(this,arguments)}function yD(){return yD=RC(rI.mark(function t(I,g,C){var i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z;return rI.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return i=U(I,["mc:Choice"]),e=U(I,["mc:Fallback"]),A=I.attrs.order,s=U(i,["p:sp","p:spPr","a:xfrm"]),l=w0(s,void 0,void 0),n=l.top,a=l.left,d=p0(s,void 0,void 0),o=d.width,c=d.height,r=Rtg(i)[0],h=ebg(VC(r)),b=U(e,["p:sp","p:spPr","a:blipFill"]),p.next=11,$V(C,b,g);case 11:return u=p.sent,m="",U(i,["p:sp","p:txBody","a:p","a:r"])&&(Z=U(i,["p:sp"]),m=lV(Z["p:txBody"],Z,void 0,void 0,g)),p.abrupt("return",{type:"math",top:n,left:a,width:o,height:c,latex:h,picBase64:u,text:m,order:A});case 15:case"end":return p.stop()}},t)})),yD.apply(this,arguments)}function YD(t,I,g){return ND.apply(this,arguments)}function ND(){return ND=RC(rI.mark(function t(I,g,C){var i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig,ng,ag,lg,cg=arguments;return rI.wrap(function(dg){for(;;)switch(dg.prev=dg.next){case 0:if(i=cg.length>3&&cg[3]!==void 0?cg[3]:[],e=I.attrs.order,A=Ktg(I)){dg.next=5;break}return dg.abrupt("return",null);case 5:s=U(I,["p:nvGrpSpPr","p:cNvPr","attrs","name"])||"",l=U(I,["p:nvGrpSpPr","p:cNvPr","attrs","id"])||"",n=parseInt(A["a:off"].attrs.x)*wg,a=parseInt(A["a:off"].attrs.y)*wg,d=parseInt(A["a:ext"].attrs.cx)*wg,o=parseInt(A["a:ext"].attrs.cy)*wg,c=U(A,["a:chOff","attrs"]),r=U(A,["a:chExt","attrs"]),h=c&&c.x!==void 0?parseInt(c.x)*wg:0,b=c&&c.y!==void 0?parseInt(c.y)*wg:0,u=r&&r.cx!==void 0?parseInt(r.cx)*wg:d,m=r&&r.cy!==void 0?parseInt(r.cy)*wg:o,Z=U(A,["attrs","flipV"])==="1",p=U(A,["attrs","flipH"])==="1",(Y=U(A,["attrs","rot"])||0)&&(Y=b0(Y)),R=u&&!isNaN(u)&&d?d/u:1,X=m&&!isNaN(m)&&o?o/m:1,H=[].concat(r9(i),[I]),S=function(hg){if(!hg)return"";var rg=U(hg,["p:nvGrpSpPr","p:cNvPr","attrs","name"]),Wg=U(hg,["p:nvGrpSpPr","p:cNvPr","attrs","id"]),Gg=U(hg,["attrs","order"]),Sg=[];return rg&&Sg.push(String(rg)),Wg&&Sg.push("#".concat(Wg)),Gg!==void 0&&Sg.push("@".concat(Gg)),Sg.join("")},kl(g,"group/start",{slideNo:g&&g.slideNo,source:C,name:s,id:l,order:e,hierarchy:H.map(S).filter(Boolean),x:n,y:a,cx:d,cy:o,chx:h,chy:b,chcx:u,chcy:m,ws:R,hs:X,isFlipV:Z,isFlipH:p,rotate:Y}),z=[],dg.t0=rI.keys(I);case 28:if((dg.t1=dg.t0()).done){dg.next=58;break}if(v=dg.t1.value,I[v].constructor!==Array){dg.next=52;break}K=uC(I[v]),dg.prev=32,K.s();case 34:if((V=K.n()).done){dg.next=42;break}return N=V.value,dg.next=38,vl(v,N,I,g,C,H);case 38:(B=dg.sent)&&z.push(B);case 40:dg.next=34;break;case 42:dg.next=47;break;case 44:dg.prev=44,dg.t2=dg.catch(32),K.e(dg.t2);case 47:return dg.prev=47,K.f(),dg.finish(47);case 50:dg.next=56;break;case 52:return dg.next=54,vl(v,I[v],I,g,C,H);case 54:(G=dg.sent)&&z.push(G);case 56:dg.next=28;break;case 58:u0(z),w=1/0,W=1/0,y=-1/0,f=-1/0,D=0,F=z;case 64:if(!(D<F.length)){dg.next=77;break}if((T=F[D])&&typeof T.left=="number"&&typeof T.top=="number"){dg.next=68;break}return dg.abrupt("continue",74);case 68:Q=T.left+(typeof T.width=="number"?T.width:0),P=T.top+(typeof T.height=="number"?T.height:0),w=Math.min(w,T.left),W=Math.min(W,T.top),y=Math.max(y,Q),f=Math.max(f,P);case 74:D++,dg.next=64;break;case 77:return L=Number.isFinite(w)&&Number.isFinite(W)&&Number.isFinite(y)&&Number.isFinite(f),E=!(Number.isFinite(d)&&Number.isFinite(o)&&d&&o&&Number.isFinite(u)&&Number.isFinite(m)&&u&&m),J=L?y-w:0,k=L?f-W:0,j=Math.max(1,.002*Math.min(Number.isFinite(d)?d:0,Number.isFinite(o)?o:0)),q=L?Math.abs(J-d)+Math.abs(k-o)+Math.abs(w-n)+Math.abs(W-a):1/0,tg=L?Math.abs(J-u)+Math.abs(k-m)+Math.abs(w-h)+Math.abs(W-b):1/0,Cg=!E&&L&&q+2*j<tg,kl(g,"group/bbox",{slideNo:g&&g.slideNo,source:C,name:s,id:l,order:e,children:z.length,hasBBox:L,bboxMinX:w,bboxMinY:W,bboxMaxX:y,bboxMaxY:f,bboxW:J,bboxH:k,eps:j,isLooseGroup:E,errToSlide:q,errToChild:tg,isChildCoordAbsToSlide:Cg}),x=E?L?w:0:Cg?n:h,sg=E?L?W:0:Cg?a:b,Ag=E||Cg?1:R,O=E||Cg?1:X,_=Dt(E&&L?w:n),Ig=Dt(E&&L?W:a),ng=Dt(E&&L?y-w:d),ag=Dt(E&&L?f-W:o),kl(g,"group/normalize",{slideNo:g&&g.slideNo,source:C,name:s,id:l,order:e,baseX:x,baseY:sg,effWs:Ag,effHs:O,outLeft:_,outTop:Ig,outWidth:ng,outHeight:ag}),u0(lg=z.map(function(hg){return hg&&typeof hg.left=="number"&&typeof hg.top=="number"?Ftg(_t(_t({},hg),{},{left:hg.left-x,top:hg.top-sg}),Ag,O):hg})),ktg(lg,ng,ag,p,Z),kl(g,"group/end",{slideNo:g&&g.slideNo,source:C,name:s,id:l,order:e,normalizedChildren:lg.length}),dg.abrupt("return",{type:"group",top:Ig,left:_,width:ng,height:ag,rotate:Y,order:e,isFlipV:!1,isFlipH:!1,elements:lg});case 100:case"end":return dg.stop()}},t,null,[[32,44,47,50]])})),ND.apply(this,arguments)}function wbg(t,I,g,C){return VD.apply(this,arguments)}function VD(){return VD=RC(rI.mark(function t(I,g,C,i){var e,A,s,l,n,a,d,o,c,r,h=arguments;return rI.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return e=h.length>4&&h[4]!==void 0?h[4]:[],A=U(I,["p:nvSpPr","p:cNvPr","attrs","name"]),s=U(I,["p:nvSpPr","p:nvPr","p:ph","attrs","idx"]),l=U(I,["p:nvSpPr","p:nvPr","p:ph","attrs","type"]),n=U(I,["attrs","order"]),o=C.slideLayoutTables,c=C.slideMasterTables,l&&s?(r="".concat(l,"|").concat(s),a=o&&o.typeIdxTable&&o.typeIdxTable[r]||o&&o.idxTable&&o.idxTable[s]||o&&o.typeTable&&o.typeTable[l],d=c&&c.typeIdxTable&&c.typeIdxTable[r]||c&&c.idxTable&&c.idxTable[s]||c&&c.typeTable&&c.typeTable[l]):s?(a=o&&o.idxTable?o.idxTable[s]:void 0,d=c&&c.idxTable?c.idxTable[s]:void 0):l&&(a=o&&o.typeTable?o.typeTable[l]:void 0,d=c&&c.typeTable?c.typeTable[l]:void 0),l||U(I,["p:nvSpPr","p:cNvSpPr","attrs","txBox"])==="1"&&(l="text"),l||(l=U(a,["p:nvSpPr","p:nvPr","p:ph","attrs","type"])),l||(l=U(d,["p:nvSpPr","p:nvPr","p:ph","attrs","type"])),l||(l=i==="diagramBg"?"diagram":"obj"),b.next=14,ztg(I,g,a,d,A,l,n,C,i,e);case 14:return b.abrupt("return",b.sent);case 15:case"end":return b.stop()}},t)})),VD.apply(this,arguments)}function pbg(t,I,g,C){return MD.apply(this,arguments)}function MD(){return MD=RC(rI.mark(function t(I,g,C,i){var e,A,s,l,n=arguments;return rI.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.length>4&&n[4]!==void 0?n[4]:[],A=I["p:nvCxnSpPr"]["p:cNvPr"].attrs.name,s=I["p:nvCxnSpPr"]["p:nvPr"]["p:ph"]===void 0?void 0:I["p:nvSpPr"]["p:nvPr"]["p:ph"].attrs.type,l=I.attrs.order,a.next=6,ztg(I,g,void 0,void 0,A,s,l,C,i,e);case 6:return a.abrupt("return",a.sent);case 7:case"end":return a.stop()}},t)})),MD.apply(this,arguments)}function ztg(t,I,g,C,i,e,A,s,l){return RD.apply(this,arguments)}function RD(){return RD=RC(rI.mark(function t(I,g,C,i,e,A,s,l,n){var a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag=arguments;return rI.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return a=Ag.length>9&&Ag[9]!==void 0?Ag[9]:[],d=U(I,["p:nvSpPr","p:nvPr","p:ph"])||U(I,["p:nvPicPr","p:nvPr","p:ph"])||U(I,["p:nvGraphicFramePr","p:nvPr","p:ph"]),o=d&&U(d,["attrs","type"])||"",c=d&&U(d,["attrs","idx"])||"",h=U(I,r=["p:spPr","a:xfrm"]),b=U(C,r),u=U(i,r),m=U(I,["p:spPr","a:prstGeom","attrs","prst"]),Z=U(I,["p:spPr","a:custGeom"]),p=w0(h,b,u),Y=p.top,R=p.left,X=p0(h,b,u),H=X.width,S=X.height,v=sh(z=[h,b,u],"flipV")==="1",K=sh(z,"flipH")==="1",V=b0(sh(z,"rot")),N=U(I,["p:txXfrm"]),B=V,N&&(G=U(N,["attrs","rot"]))&&(B=V+b0(G)),w="",I["p:txBody"]&&(w=lV(I["p:txBody"],I,C,A,l)),W=Ns(I,A,l,a),y=W.borderColor,f=W.borderWidth,D=W.borderType,F=W.strokeDasharray,O.next=24,Ytg(I,g,void 0,l,n,a);case 24:if(O.t0=O.sent,O.t0){O.next=27;break}O.t0="";case 27:if(T=O.t0,m==="arc"&&(T=""),Q=H,P=S,m==="line"&&(L=Math.max(1,f||0),Q||(Q=L),P||(P=L)),(J=U(I,["p:spPr","a:effectLst","a:outerShdw"]))&&(E=Ntg(J,l)),k=O0g(I,C,i),j=U(I,["p:txBody","a:bodyPr","attrs","vert"])==="eaVert",q=U0g(I,C,i),tg={left:R,top:Y,width:Q,height:P,borderColor:y,borderWidth:f,borderType:D,borderStrokeDasharray:F,fill:T,content:w,isFlipV:v,isFlipH:K,rotate:V,vAlign:k,name:e,order:s,placeholderType:o,placeholderIdx:c},E&&(tg.shadow=E),q&&(tg.autoFit=q),Cg=tg.content&&ptg(tg.content),!Z||A==="diagram"){O.next=47;break}return x=Cbg(Z,Q,P),Cg||(tg.content=""),O.abrupt("return",_t(_t({},tg),{},{type:"shape",shapType:"custom",path:x}));case 47:if(sg="",m&&(sg=Abg(m,Q,P,I)),!m||A!=="obj"&&A&&m==="rect"){O.next=52;break}return Cg||(tg.content=""),O.abrupt("return",_t(_t({},tg),{},{type:"shape",shapType:m,path:sg}));case 52:if(!m||Cg||!T&&!f){O.next=54;break}return O.abrupt("return",_t(_t({},tg),{},{type:"shape",content:"",shapType:m,path:sg}));case 54:return O.abrupt("return",_t(_t({},tg),{},{type:"text",isVertical:j,isFlipV:!1,isFlipH:!1,rotate:B}));case 55:case"end":return O.stop()}},t)})),RD.apply(this,arguments)}function Bbg(t,I,g){return fD.apply(this,arguments)}function fD(){return fD=RC(rI.mark(function t(I,g,C){var i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig=arguments;return rI.wrap(function(ng){for(;;)switch(ng.prev=ng.next){case 0:return i=Ig.length>3&&Ig[3]!==void 0?Ig[3]:[],e=C==="slideMasterBg"?g.masterResObj:C==="slideLayoutBg"?g.layoutResObj:g.slideResObj,A=I.attrs.order,s=U(I,["p:nvPicPr","p:nvPr","p:ph"]),l=s&&U(s,["attrs","type"])||"",n=s&&U(s,["attrs","idx"])||"",a=I["p:blipFill"]["a:blip"].attrs["r:embed"],d=e[a].target,o=GX(d).toLowerCase(),c=g.zip,ng.next=12,c.file(d).async("arraybuffer");case 12:if(r=ng.sent,h=I["p:spPr"]["a:xfrm"],b=U(I,["p:nvPicPr","p:nvPr","p:ph","attrs","idx"]),u=b?U(g.slideLayoutTables,["idxTable",b,"p:spPr","a:xfrm"]):void 0,m=b?U(g.slideMasterTables,["idxTable",b,"p:spPr","a:xfrm"]):void 0,h||(h=u||m),Z=aD(o),p=w0(h,u,m),Y=p.top,R=p.left,X=p0(h,u,m),H=X.width,S=X.height,z="data:".concat(Z,";base64,").concat(wtg(r)),K=sh(v=[h,u,m],"flipV")==="1",V=sh(v,"flipH")==="1",N=b0(sh(v,"rot")),B=U(I,["p:nvPicPr","p:nvPr","a:videoFile"]),F=!1,!B){ng.next=43;break}if(G=B.attrs["r:link"],!J0g(w=e[G].target)){ng.next=36;break}w=sV(w),F=!0,ng.next=43;break;case 36:if((W=GX(w).toLowerCase())!=="mp4"&&W!=="webm"&&W!=="ogg"){ng.next=43;break}return ng.next=40,c.file(w).async("arraybuffer");case 40:f=ng.sent,y=aD(W),D=URL.createObjectURL(new Blob([f],{type:y}));case 43:if(!(T=U(I,["p:nvPicPr","p:nvPr","a:audioFile"]))){ng.next=53;break}if(Q=T.attrs["r:link"],P=e[Q].target,(L=GX(P).toLowerCase())!=="mp3"&&L!=="wav"&&L!=="ogg"){ng.next=53;break}return ng.next=51,c.file(P).async("arraybuffer");case 51:E=ng.sent,J=URL.createObjectURL(new Blob([E]));case 53:if(!B||F){ng.next=55;break}return ng.abrupt("return",{type:"video",top:Y,left:R,width:H,height:S,rotate:N,blob:D,order:A,placeholderType:l,placeholderIdx:n});case 55:if(!B||!F){ng.next=57;break}return ng.abrupt("return",{type:"video",top:Y,left:R,width:H,height:S,rotate:N,src:w,order:A,placeholderType:l,placeholderIdx:n});case 57:if(!T){ng.next=59;break}return ng.abrupt("return",{type:"audio",top:Y,left:R,width:H,height:S,rotate:N,blob:J,order:A,placeholderType:l,placeholderIdx:n});case 59:return(j=U(I,["p:blipFill","a:srcRect","attrs"]))&&(j.t||j.b||j.l||j.r)&&(k={},j.t&&(k.t=j.t/1e3),j.b&&(k.b=j.b/1e3),j.l&&(k.l=j.l/1e3),j.r&&(k.r=j.r/1e3)),q=U(I,["p:spPr","a:prstGeom","attrs","prst"])||"rect",tg=Ns(I,void 0,g,i),Cg=tg.borderColor,x=tg.borderWidth,sg=tg.borderType,Ag=tg.strokeDasharray,O=L0g(I["p:blipFill"]),_={type:"image",top:Y,left:R,width:H,height:S,rotate:N,src:z,isFlipV:K,isFlipH:V,order:A,rect:k,geom:q,borderColor:Cg,borderWidth:x,borderType:sg,borderStrokeDasharray:Ag,placeholderType:l,placeholderIdx:n},O&&(_.filters=O),ng.abrupt("return",_);case 67:case"end":return ng.stop()}},t)})),fD.apply(this,arguments)}function Wbg(t,I,g){return HD.apply(this,arguments)}function HD(){return HD=RC(rI.mark(function t(I,g,C){var i,e,A,s,l,n;return rI.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:i=U(I,["p:nvGraphicFramePr","p:nvPr","p:ph"]),e=i&&U(i,["attrs","type"])||"",A=i&&U(i,["attrs","idx"])||"",s=U(I,["a:graphic","a:graphicData","attrs","uri"]),a.t0=s,a.next=a.t0==="http://schemas.openxmlformats.org/drawingml/2006/table"?7:a.t0==="http://schemas.openxmlformats.org/drawingml/2006/chart"?11:a.t0==="http://schemas.openxmlformats.org/drawingml/2006/diagram"?15:a.t0==="http://schemas.openxmlformats.org/presentationml/2006/ole"?19:26;break;case 7:return a.next=9,ybg(I,g);case 9:return l=a.sent,a.abrupt("break",26);case 11:return a.next=13,Ybg(I,g);case 13:return l=a.sent,a.abrupt("break",26);case 15:return a.next=17,Nbg(I,g);case 17:return l=a.sent,a.abrupt("break",26);case 19:if((n=U(I,["a:graphic","a:graphicData","mc:AlternateContent","mc:Fallback","p:oleObj"]))||(n=U(I,["a:graphic","a:graphicData","p:oleObj"])),!n){a.next=25;break}return a.next=24,YD(n,g,C);case 24:l=a.sent;case 25:return a.abrupt("break",26);case 26:return l&&(e||A)&&(l.placeholderType=e,l.placeholderIdx=A),a.abrupt("return",l);case 28:case"end":return a.stop()}},t)})),HD.apply(this,arguments)}function ybg(t,I){return XD.apply(this,arguments)}function XD(){return XD=RC(rI.mark(function t(I,g){var C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig,ng,ag,lg;return rI.wrap(function(cg){for(;;)switch(cg.prev=cg.next){case 0:if(C=I.attrs.order,i=U(I,["a:graphic","a:graphicData","a:tbl"]),e=U(I,["p:xfrm"]),A=w0(e,void 0,void 0),s=A.top,l=A.left,n=p0(e,void 0,void 0),a=n.width,d=n.height,o=U(I,["a:graphic","a:graphicData","a:tbl","a:tblPr"]),(c=U(I,["a:graphic","a:graphicData","a:tbl","a:tblGrid","a:gridCol"])).constructor!==Array&&(c=[c]),r=[],c){h=uC(c);try{for(h.s();!(b=h.n()).done;)u=b.value,m=U(u,["attrs","w"])||0,Z=parseInt(m)*wg,r.push(Z)}catch(dg){h.e(dg)}finally{h.f()}}if(p=o.attrs?o.attrs.firstRow:void 0,Y=o.attrs?o.attrs.firstCol:void 0,R=o.attrs?o.attrs.lastRow:void 0,X=o.attrs?o.attrs.lastCol:void 0,H=o.attrs?o.attrs.bandRow:void 0,S=o.attrs?o.attrs.bandCol:void 0,z={isFrstRowAttr:p&&p==="1"?1:0,isFrstColAttr:Y&&Y==="1"?1:0,isLstRowAttr:R&&R==="1"?1:0,isLstColAttr:X&&X==="1"?1:0,isBandRowAttr:H&&H==="1"?1:0,isBandColAttr:S&&S==="1"?1:0},(K=o["a:tableStyleId"])&&(V=g.tableStyles["a:tblStyleLst"]["a:tblStyle"]))if(V.constructor===Array)for(N=0;N<V.length;N++)V[N].attrs.styleId===K&&(v=V[N]);else V.attrs.styleId===K&&(v=V);v&&(v.tblStylAttrObj=z),B={},G=U(v,["a:wholeTbl","a:tcStyle"]),(w=U(G,["a:tcBdr"]))&&(B=tbg(w,g)),W="",(y=U(v,["a:tblBg","a:fillRef"]))&&(W=IC(y,void 0,void 0,g)),y===void 0&&(y=U(v,["a:wholeTbl","a:tcStyle","a:fill","a:solidFill"]),W=IC(y,void 0,void 0,g)),(f=i["a:tr"]).constructor!==Array&&(f=[f]),D=[],F=[],T=0;case 33:if(!(T<f.length)){cg.next=88;break}if(Q=f[T],P=U(f[T],["attrs","h"])||0,L=parseInt(P)*wg,F.push(L),E=ibg(f,T,z,v,g),J=E.fillColor,k=E.fontColor,j=E.fontBold,q=Q["a:tc"],tg=[],q.constructor!==Array){cg.next=67;break}Cg=0;case 43:if(!(Cg<q.length)){cg.next=65;break}return x=q[Cg],sg=void 0,Cg===0&&z.isFrstColAttr===1?(sg="a:firstCol",z.isLstRowAttr===1&&T===f.length-1&&U(v,["a:seCell"])?sg="a:seCell":z.isFrstRowAttr===1&&T===0&&U(v,["a:neCell"])&&(sg="a:neCell")):!(Cg>0&&z.isBandColAttr===1)||z.isFrstColAttr===1&&T===0||z.isLstRowAttr===1&&T===f.length-1||Cg===q.length-1||Cg%2!=0&&(U(v,["a:band2V"])===void 0?U(v,["a:band1V"])&&(sg="a:band2V"):sg="a:band2V"),Cg===q.length-1&&z.isLstColAttr===1&&(sg="a:lastCol",z.isLstRowAttr===1&&T===f.length-1&&U(v,["a:swCell"])?sg="a:swCell":z.isFrstRowAttr===1&&T===0&&U(v,["a:nwCell"])&&(sg="a:nwCell")),Ag=lV(x["a:txBody"],x,void 0,void 0,g),cg.next=51,Aq(x,v,sg,g);case 51:O=cg.sent,_={text:Ag},O.rowSpan&&(_.rowSpan=O.rowSpan),O.colSpan&&(_.colSpan=O.colSpan),O.vMerge&&(_.vMerge=O.vMerge),O.hMerge&&(_.hMerge=O.hMerge),(O.fontBold||j)&&(_.fontBold=O.fontBold||j),(O.fontColor||k)&&(_.fontColor=O.fontColor||k),(O.fillColor||J||W)&&(_.fillColor=O.fillColor||J||W),O.borders&&(_.borders=O.borders),tg.push(_);case 62:Cg++,cg.next=43;break;case 65:cg.next=84;break;case 67:return Ig=void 0,z.isFrstColAttr===1&&z.isLstRowAttr!==1?Ig="a:firstCol":z.isBandColAttr===1&&z.isLstRowAttr!==1&&(U(v,["a:band2V"])||U(v,["a:band1V"]))&&(Ig="a:band2V"),z.isLstColAttr===1&&z.isLstRowAttr!==1&&(Ig="a:lastCol"),ng=lV(q["a:txBody"],q,void 0,void 0,g),cg.next=73,Aq(q,v,Ig,g);case 73:ag=cg.sent,lg={text:ng},ag.rowSpan&&(lg.rowSpan=ag.rowSpan),ag.colSpan&&(lg.colSpan=ag.colSpan),ag.vMerge&&(lg.vMerge=ag.vMerge),ag.hMerge&&(lg.hMerge=ag.hMerge),(ag.fontBold||j)&&(lg.fontBold=ag.fontBold||j),(ag.fontColor||k)&&(lg.fontColor=ag.fontColor||k),(ag.fillColor||J||W)&&(lg.fillColor=ag.fillColor||J||W),ag.borders&&(lg.borders=ag.borders),tg.push(lg);case 84:D.push(tg);case 85:T++,cg.next=33;break;case 88:return cg.abrupt("return",{type:"table",top:s,left:l,width:a,height:d,data:D,order:C,borders:B,rowHeights:F,colWidths:r});case 89:case"end":return cg.stop()}},t)})),XD.apply(this,arguments)}function Ybg(t,I){return SD.apply(this,arguments)}function SD(){return SD=RC(rI.mark(function t(I,g){var C,i,e,A,s,l,n,a,d,o,c,r,h,b;return rI.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(C=I.attrs.order,i=U(I,["p:xfrm"]),e=w0(i,void 0,void 0),A=e.top,s=e.left,l=p0(i,void 0,void 0),n=l.width,a=l.height,d=I["a:graphic"]["a:graphicData"]["c:chart"].attrs["r:id"],(o=U(g.slideResObj,[d,"target"]))||(o=U(g.layoutResObj,[d,"target"])),o||(o=U(g.masterResObj,[d,"target"])),o){u.next=10;break}return u.abrupt("return",{});case 10:return u.next=12,Gt(g.zip,o);case 12:if(c=u.sent,r=U(c,["c:chartSpace","c:chart","c:plotArea"]),h=j0g(r,g)){u.next=17;break}return u.abrupt("return",{});case 17:return b={type:"chart",top:A,left:s,width:n,height:a,data:h.data,colors:h.colors,chartType:h.type,order:C},h.marker!==void 0&&(b.marker=h.marker),h.barDir!==void 0&&(b.barDir=h.barDir),h.holeSize!==void 0&&(b.holeSize=h.holeSize),h.grouping!==void 0&&(b.grouping=h.grouping),h.style!==void 0&&(b.style=h.style),u.abrupt("return",b);case 24:case"end":return u.stop()}},t)})),SD.apply(this,arguments)}function Nbg(t,I){return DD.apply(this,arguments)}function DD(){return DD=RC(rI.mark(function t(I,g){var C,i,e,A,s,l,n,a,d,o,c,r,h,b,u,m,Z,p,Y,R,X,H,S,z,v,K,V;return rI.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(C=I.attrs.order,i=U(I,["p:xfrm"]),e=w0(i,void 0,void 0),A=e.left,s=e.top,l=p0(i,void 0,void 0),n=l.width,a=l.height,!(d=U(I,["a:graphic","a:graphicData","dgm:relIds","attrs"])||U(I,["a:graphic","a:graphicData","p:relIds","attrs"]))){N.next=19;break}c=0,r=Object.keys(d);case 7:if(!(c<r.length)){N.next=19;break}if((h=r[c]).startsWith("r:")){N.next=11;break}return N.abrupt("continue",16);case 11:if(b=d[h],!(u=U(g,["slideResObj",b,"target"]))||typeof u!="string"||!/\/diagrams\/drawing/i.test(u)){N.next=16;break}return o=u,N.abrupt("break",19);case 16:c++,N.next=7;break;case 19:if(o||(m=g.diagramDrawingCursor||0,o=g.diagramDrawingTargets&&g.diagramDrawingTargets[m],g.diagramDrawingCursor=m+1),Z=g.diagramResObj,p=g.digramFileContent,o&&(g.diagramResObj=U(g,["diagramResObjByTarget",o])||Z,g.digramFileContent=U(g,["diagramDrawingContents",o])||p),Y=[],!(R=U(g.digramFileContent,["p:drawing","p:spTree"]))){N.next=60;break}N.t0=rI.keys(R);case 27:if((N.t1=N.t0()).done){N.next=60;break}if((X=N.t1.value)!=="p:nvGrpSpPr"&&X!=="p:grpSpPr"){N.next=31;break}return N.abrupt("continue",27);case 31:if(H=R[X],!Array.isArray(H)){N.next=54;break}S=uC(H),N.prev=34,S.s();case 36:if((z=S.n()).done){N.next=44;break}return v=z.value,N.next=40,vl(X,v,R,g,"diagramBg");case 40:(K=N.sent)&&Y.push(K);case 42:N.next=36;break;case 44:N.next=49;break;case 46:N.prev=46,N.t2=N.catch(34),S.e(N.t2);case 49:return N.prev=49,S.f(),N.finish(49);case 52:N.next=58;break;case 54:return N.next=56,vl(X,H,R,g,"diagramBg");case 56:(V=N.sent)&&Y.push(V);case 58:N.next=27;break;case 60:return u0(Y),g.diagramResObj=Z,g.digramFileContent=p,N.abrupt("return",{type:"diagram",left:A,top:s,width:n,height:a,elements:Y,order:C});case 64:case"end":return N.stop()}},t,null,[[34,46,49,52]])})),DD.apply(this,arguments)}async function Vbg(t,I){const g=await cbg(t),C=gg.createApp(Zrg,{pptxJson:g});return C.mount(I),{$el:I,$destroy(){C.unmount()}}}var BX={exports:{}};/*! ExcelJS 19-10-2023 */var rq;function Mbg(){return rq||(rq=1,function(t,I){(function(g){t.exports=g()})(function(){return function g(C,i,e){function A(n,a){if(!i[n]){if(!C[n]){var d=typeof Ka=="function"&&Ka;if(!a&&d)return d(n,!0);if(s)return s(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var c=i[n]={exports:{}};C[n][0].call(c.exports,function(r){return A(C[n][1][r]||r)},c,c.exports,g,C,i,e)}return i[n].exports}for(var s=typeof Ka=="function"&&Ka,l=0;l<e.length;l++)A(e[l]);return A}({1:[function(g,C,i){const e=g("fs"),A=g("fast-csv"),s=g("dayjs/plugin/customParseFormat"),l=g("dayjs/plugin/utc"),n=g("dayjs").extend(s).extend(l),a=g("../utils/stream-buf"),{fs:{exists:d}}=g("../utils/utils"),o={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};C.exports=class{constructor(c){this.workbook=c,this.worksheet=null}async readFile(c,r){if(r=r||{},!await d(c))throw new Error("File not found: "+c);const h=e.createReadStream(c),b=await this.read(h,r);return h.close(),b}read(c,r){return r=r||{},new Promise((h,b)=>{const u=this.workbook.addWorksheet(r.sheetName),m=r.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],Z=r.map||function(Y){if(Y==="")return null;const R=Number(Y);if(!Number.isNaN(R)&&R!==1/0)return R;const X=m.reduce((S,z)=>{if(S)return S;const v=n(Y,z,!0);return v.isValid()?v:null},null);if(X)return new Date(X.valueOf());const H=o[Y];return H!==void 0?H:Y},p=A.parse(r.parserOptions).on("data",Y=>{u.addRow(Y.map(Z))}).on("end",()=>{p.emit("worksheet",u)});p.on("worksheet",h).on("error",b),c.pipe(p)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(c,r){return new Promise((h,b)=>{r=r||{};const u=this.workbook.getWorksheet(r.sheetName||r.sheetId),m=A.format(r.formatterOptions);c.on("finish",()=>{h()}),m.on("error",b),m.pipe(c);const{dateFormat:Z,dateUTC:p}=r,Y=r.map||(H=>{if(H){if(H.text||H.hyperlink)return H.hyperlink||H.text||"";if(H.formula||H.result)return H.result||"";if(H instanceof Date)return Z?p?n.utc(H).format(Z):n(H).format(Z):p?n.utc(H).format():n(H).format();if(H.error)return H.error;if(typeof H=="object")return JSON.stringify(H)}return H}),R=r.includeEmptyRows===void 0||r.includeEmptyRows;let X=1;u&&u.eachRow((H,S)=>{if(R)for(;X++<S-1;)m.write([]);const{values:z}=H;z.shift(),m.write(z.map(Y)),X=S}),m.end()})}writeFile(c,r){const h={encoding:(r=r||{}).encoding||"utf8"},b=e.createWriteStream(c,h);return this.write(b,r)}async writeBuffer(c){const r=new a;return await this.write(r,c),r.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(g,C,i){const e=g("../utils/col-cache");class A{constructor(l,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=l,n)if(typeof n=="string"){const d=e.decodeAddress(n);this.nativeCol=d.col+a,this.nativeColOff=0,this.nativeRow=d.row+a,this.nativeRowOff=0}else n.nativeCol!==void 0?(this.nativeCol=n.nativeCol||0,this.nativeColOff=n.nativeColOff||0,this.nativeRow=n.nativeRow||0,this.nativeRowOff=n.nativeRowOff||0):n.col!==void 0?(this.col=n.col+a,this.row=n.row+a):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(l){return l instanceof A||l==null?l:new A(l)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(l){this.nativeCol=Math.floor(l),this.nativeColOff=Math.floor((l-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(l){this.nativeRow=Math.floor(l),this.nativeRowOff=Math.floor((l-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(l){this.nativeCol=l.nativeCol,this.nativeColOff=l.nativeColOff,this.nativeRow=l.nativeRow,this.nativeRowOff=l.nativeRowOff}}C.exports=A},{"../utils/col-cache":19}],3:[function(g,C,i){const e=g("../utils/col-cache"),A=g("../utils/under-dash"),s=g("./enums"),{slideFormula:l}=g("../utils/shared-formula"),n=g("./note");class a{constructor(c,r,h){if(!c||!r)throw new Error("A Cell needs a Row");this._row=c,this._column=r,e.validateAddress(h),this._address=h,this._value=d.create(a.Types.Null,this),this.style=this._mergeStyle(c.style,r.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(c){this.style.numFmt=c}get font(){return this.style.font}set font(c){this.style.font=c}get alignment(){return this.style.alignment}set alignment(c){this.style.alignment=c}get border(){return this.style.border}set border(c){this.style.border=c}get fill(){return this.style.fill}set fill(c){this.style.fill=c}get protection(){return this.style.protection}set protection(c){this.style.protection=c}_mergeStyle(c,r,h){const b=c&&c.numFmt||r&&r.numFmt;b&&(h.numFmt=b);const u=c&&c.font||r&&r.font;u&&(h.font=u);const m=c&&c.alignment||r&&r.alignment;m&&(h.alignment=m);const Z=c&&c.border||r&&r.border;Z&&(h.border=Z);const p=c&&c.fill||r&&r.fill;p&&(h.fill=p);const Y=c&&c.protection||r&&r.protection;return Y&&(h.protection=Y),h}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===a.Types.Merge}merge(c,r){this._value.release(),this._value=d.create(a.Types.Merge,this,c),r||(this.style=c.style)}unmerge(){this.type===a.Types.Merge&&(this._value.release(),this._value=d.create(a.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(c){return this._value.type===a.Types.Merge&&this._value.isMergedTo(c)}get master(){return this.type===a.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===a.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(c){this.type!==a.Types.Merge?(this._value.release(),this._value=d.create(d.getType(c),this,c)):this._value.master.value=c}get note(){return this._comment&&this._comment.note}set note(c){this._comment=new n(c)}get text(){return this._value.toString()}get html(){return A.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(c){this.type===a.Types.String&&(this._value=d.create(a.Types.Hyperlink,this,{text:this._value.value,hyperlink:c}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:c}=this._row;return{sheetName:c.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(c){this.names=[c]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(c){const{definedNames:r}=this.workbook;r.removeAllNames(this.fullAddress),c.forEach(h=>{r.addEx(this.fullAddress,h)})}addName(c){this.workbook.definedNames.addEx(this.fullAddress,c)}removeName(c){this.workbook.definedNames.removeEx(this.fullAddress,c)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(c){this._dataValidations.add(this.address,c)}get model(){const{model:c}=this._value;return c.style=this.style,this._comment&&(c.comment=this._comment.model),c}set model(c){if(this._value.release(),this._value=d.create(c.type,this),this._value.model=c,c.comment)switch(c.comment.type){case"note":this._comment=n.fromModel(c.comment)}c.style?this.style=c.style:this.style={}}}a.Types=s.ValueType;const d={getType:o=>o==null?a.Types.Null:o instanceof String||typeof o=="string"?a.Types.String:typeof o=="number"?a.Types.Number:typeof o=="boolean"?a.Types.Boolean:o instanceof Date?a.Types.Date:o.text&&o.hyperlink?a.Types.Hyperlink:o.formula||o.sharedFormula?a.Types.Formula:o.richText?a.Types.RichText:o.sharedString?a.Types.SharedString:o.error?a.Types.Error:a.Types.JSON,types:[{t:a.Types.Null,f:class{constructor(o){this.model={address:o.address,type:a.Types.Null}}get value(){return null}set value(o){}get type(){return a.Types.Null}get effectiveType(){return a.Types.Null}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return""}release(){}toString(){return""}}},{t:a.Types.Number,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.Number,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}get type(){return a.Types.Number}get effectiveType(){return a.Types.Number}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:a.Types.String,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.String,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}get type(){return a.Types.String}get effectiveType(){return a.Types.String}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:a.Types.Date,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.Date,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}get type(){return a.Types.Date}get effectiveType(){return a.Types.Date}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:a.Types.Hyperlink,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.Hyperlink,text:c?c.text:void 0,hyperlink:c?c.hyperlink:void 0},c&&c.tooltip&&(this.model.tooltip=c.tooltip)}get value(){const o={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(o.tooltip=this.model.tooltip),o}set value(o){this.model={text:o.text,hyperlink:o.hyperlink},o.tooltip&&(this.model.tooltip=o.tooltip)}get text(){return this.model.text}set text(o){this.model.text=o}get hyperlink(){return this.model.hyperlink}set hyperlink(o){this.model.hyperlink=o}get type(){return a.Types.Hyperlink}get effectiveType(){return a.Types.Hyperlink}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:a.Types.Formula,f:class{constructor(o,c){this.cell=o,this.model={address:o.address,type:a.Types.Formula,shareType:c?c.shareType:void 0,ref:c?c.ref:void 0,formula:c?c.formula:void 0,sharedFormula:c?c.sharedFormula:void 0,result:c?c.result:void 0}}_copyModel(o){const c={},r=h=>{const b=o[h];b&&(c[h]=b)};return r("formula"),r("result"),r("ref"),r("shareType"),r("sharedFormula"),c}get value(){return this._copyModel(this.model)}set value(o){this.model=this._copyModel(o)}validate(o){switch(d.getType(o)){case a.Types.Null:case a.Types.String:case a.Types.Number:case a.Types.Date:break;case a.Types.Hyperlink:case a.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(o){this.model.formula=o}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(o){this.model.result=o}get type(){return a.Types.Formula}get effectiveType(){const o=this.model.result;return o==null?s.ValueType.Null:o instanceof String||typeof o=="string"?s.ValueType.String:typeof o=="number"?s.ValueType.Number:o instanceof Date?s.ValueType.Date:o.text&&o.hyperlink?s.ValueType.Hyperlink:o.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(o){this.model.address=o}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:o}=this.cell,c=o.findCell(this.model.sharedFormula);this._translatedFormula=c&&l(c.formula,c.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:a.Types.Merge,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.Merge,master:c?c.address:void 0},this._master=c,c&&c.addMergeRef()}get value(){return this._master.value}set value(o){o instanceof a?(this._master&&this._master.releaseMergeRef(),o.addMergeRef(),this._master=o):this._master.value=o}isMergedTo(o){return o===this._master}get master(){return this._master}get type(){return a.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:a.Types.JSON,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.String,value:JSON.stringify(c),rawValue:c}}get value(){return this.model.rawValue}set value(o){this.model.rawValue=o,this.model.value=JSON.stringify(o)}get type(){return a.Types.String}get effectiveType(){return a.Types.String}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:a.Types.SharedString,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.SharedString,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}get type(){return a.Types.SharedString}get effectiveType(){return a.Types.SharedString}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:a.Types.RichText,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.String,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}toString(){return this.model.value.richText.map(o=>o.text).join("")}get type(){return a.Types.RichText}get effectiveType(){return a.Types.RichText}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:a.Types.Boolean,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.Boolean,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}get type(){return a.Types.Boolean}get effectiveType(){return a.Types.Boolean}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:a.Types.Error,f:class{constructor(o,c){this.model={address:o.address,type:a.Types.Error,value:c}}get value(){return this.model.value}set value(o){this.model.value=o}get type(){return a.Types.Error}get effectiveType(){return a.Types.Error}get address(){return this.model.address}set address(o){this.model.address=o}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((o,c)=>(o[c.t]=c.f,o),[]),create(o,c,r){const h=this.types[o];if(!h)throw new Error("Could not create Value of type "+o);return new h(c,r)}};C.exports=a},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(g,C,i){const e=g("../utils/under-dash"),A=g("./enums"),s=g("../utils/col-cache");class l{constructor(a,d,o){this._worksheet=a,this._number=d,o!==!1&&(this.defn=o)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(a){a?(this.key=a.key,this.width=a.width!==void 0?a.width:9,this.outlineLevel=a.outlineLevel,a.style?this.style=a.style:this.style={},this.header=a.header,this._hidden=!!a.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(a){a!==void 0?(this._header=a,this.headers.forEach((d,o)=>{this._worksheet.getCell(o+1,this.number).value=d})):this._header=void 0}get key(){return this._key}set key(a){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=a,a&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(a){this._hidden=a}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(a){this._outlineLevel=a}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(a){return this.width===a.width&&this.hidden===a.hidden&&this.outlineLevel===a.outlineLevel&&e.isEqual(this.style,a.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const a=this.style;return!a||!(a.font||a.numFmt||a.alignment||a.border||a.fill||a.protection)}get headerCount(){return this.headers.length}eachCell(a,d){const o=this.number;d||(d=a,a=null),this._worksheet.eachRow(a,(c,r)=>{d(c.getCell(o),r)})}get values(){const a=[];return this.eachCell((d,o)=>{d&&d.type!==A.ValueType.Null&&(a[o]=d.value)}),a}set values(a){if(!a)return;const d=this.number;let o=0;a.hasOwnProperty("0")&&(o=1),a.forEach((c,r)=>{this._worksheet.getCell(r+o,d).value=c})}_applyStyle(a,d){return this.style[a]=d,this.eachCell(o=>{o[a]=d}),d}get numFmt(){return this.style.numFmt}set numFmt(a){this._applyStyle("numFmt",a)}get font(){return this.style.font}set font(a){this._applyStyle("font",a)}get alignment(){return this.style.alignment}set alignment(a){this._applyStyle("alignment",a)}get protection(){return this.style.protection}set protection(a){this._applyStyle("protection",a)}get border(){return this.style.border}set border(a){this._applyStyle("border",a)}get fill(){return this.style.fill}set fill(a){this._applyStyle("fill",a)}static toModel(a){const d=[];let o=null;return a&&a.forEach((c,r)=>{c.isDefault?o&&(o=null):o&&c.equivalentTo(o)?o.max=r+1:(o={min:r+1,max:r+1,width:c.width!==void 0?c.width:9,style:c.style,isCustomWidth:c.isCustomWidth,hidden:c.hidden,outlineLevel:c.outlineLevel,collapsed:c.collapsed},d.push(o))}),d.length?d:void 0}static fromModel(a,d){const o=[];let c=1,r=0;for(d=(d=d||[]).sort(function(h,b){return h.min-b.min});r<d.length;){const h=d[r++];for(;c<h.min;)o.push(new l(a,c++));for(;c<=h.max;)o.push(new l(a,c++,h))}return o.length?o:null}}C.exports=l},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(g,C,i){C.exports=class{constructor(e){this.model=e||{}}add(e,A){return this.model[e]=A}find(e){return this.model[e]}remove(e){this.model[e]=void 0}}},{}],6:[function(g,C,i){const e=g("../utils/under-dash"),A=g("../utils/col-cache"),s=g("../utils/cell-matrix"),l=g("./range"),n=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;C.exports=class{constructor(){this.matrixMap={}}getMatrix(a){return this.matrixMap[a]||(this.matrixMap[a]=new s)}add(a,d){const o=A.decodeEx(a);this.addEx(o,d)}addEx(a,d){const o=this.getMatrix(d);if(a.top)for(let c=a.left;c<=a.right;c++)for(let r=a.top;r<=a.bottom;r++){const h={sheetName:a.sheetName,address:A.n2l(c)+r,row:r,col:c};o.addCellEx(h)}else o.addCellEx(a)}remove(a,d){const o=A.decodeEx(a);this.removeEx(o,d)}removeEx(a,d){this.getMatrix(d).removeCellEx(a)}removeAllNames(a){e.each(this.matrixMap,d=>{d.removeCellEx(a)})}forEach(a){e.each(this.matrixMap,(d,o)=>{d.forEach(c=>{a(o,c)})})}getNames(a){return this.getNamesEx(A.decodeEx(a))}getNamesEx(a){return e.map(this.matrixMap,(d,o)=>d.findCellEx(a)&&o).filter(Boolean)}_explore(a,d){d.mark=!1;const{sheetName:o}=d,c=new l(d.row,d.col,d.row,d.col,o);let r,h;function b(m,Z){const p=a.findCellAt(o,m,d.col);return!(!p||!p.mark)&&(c[Z]=m,p.mark=!1,!0)}for(h=d.row-1;b(h,"top");h--);for(h=d.row+1;b(h,"bottom");h++);function u(m,Z){const p=[];for(h=c.top;h<=c.bottom;h++){const Y=a.findCellAt(o,h,m);if(!Y||!Y.mark)return!1;p.push(Y)}c[Z]=m;for(let Y=0;Y<p.length;Y++)p[Y].mark=!1;return!0}for(r=d.col-1;u(r,"left");r--);for(r=d.col+1;u(r,"right");r++);return c}getRanges(a,d){return(d=d||this.matrixMap[a])?(d.forEach(o=>{o.mark=!0}),{name:a,ranges:d.map(o=>o.mark&&this._explore(d,o)).filter(Boolean).map(o=>o.$shortRange)}):{name:a,ranges:[]}}normaliseMatrix(a,d){a.forEachInSheet(d,(o,c,r)=>{o&&(o.row===c&&o.col===r||(o.row=c,o.col=r,o.address=A.n2l(r)+c))})}spliceRows(a,d,o,c){e.each(this.matrixMap,r=>{r.spliceRows(a,d,o,c),this.normaliseMatrix(r,a)})}spliceColumns(a,d,o,c){e.each(this.matrixMap,r=>{r.spliceColumns(a,d,o,c),this.normaliseMatrix(r,a)})}get model(){return e.map(this.matrixMap,(a,d)=>this.getRanges(d,a)).filter(a=>a.ranges.length)}set model(a){const d=this.matrixMap={};a.forEach(o=>{const c=d[o.name]=new s;o.ranges.forEach(r=>{n.test(r.split("!").pop()||"")&&c.addCell(r)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(g,C,i){C.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(g,C,i){const e=g("../utils/col-cache"),A=g("./anchor");C.exports=class{constructor(s,l){this.worksheet=s,this.model=l}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:l,imageId:n,range:a,hyperlinks:d}=s;if(this.type=l,this.imageId=n,l==="image")if(typeof a=="string"){const o=e.decode(a);this.range={tl:new A(this.worksheet,{col:o.left,row:o.top},-1),br:new A(this.worksheet,{col:o.right,row:o.bottom},0),editAs:"oneCell"}}else this.range={tl:new A(this.worksheet,a.tl,0),br:a.br&&new A(this.worksheet,a.br,0),ext:a.ext,editAs:a.editAs,hyperlinks:d||a.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(g,C,i){const e=g("../utils/under-dash");class A{constructor(l){this.note=l}get model(){let l=null;switch(typeof this.note){case"string":l={type:"note",note:{texts:[{text:this.note}]}};break;default:l={type:"note",note:this.note}}return e.deepMerge({},A.DEFAULT_CONFIGS,l)}set model(l){const{note:n}=l,{texts:a}=n;a.length===1&&Object.keys(a[0]).length===1?this.note=a[0].text:this.note=n}static fromModel(l){const n=new A;return n.model=l,n}}A.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},C.exports=A},{"../utils/under-dash":26}],10:[function(g,C,i){const e=g("../utils/col-cache");class A{constructor(){this.decode(arguments)}setTLBR(l,n,a,d,o){if(arguments.length<4){const c=e.decodeAddress(l),r=e.decodeAddress(n);this.model={top:Math.min(c.row,r.row),left:Math.min(c.col,r.col),bottom:Math.max(c.row,r.row),right:Math.max(c.col,r.col),sheetName:a},this.setTLBR(c.row,c.col,r.row,r.col,o)}else this.model={top:Math.min(l,a),left:Math.min(n,d),bottom:Math.max(l,a),right:Math.max(n,d),sheetName:o}}decode(l){switch(l.length){case 5:this.setTLBR(l[0],l[1],l[2],l[3],l[4]);break;case 4:this.setTLBR(l[0],l[1],l[2],l[3]);break;case 3:this.setTLBR(l[0],l[1],l[2]);break;case 2:this.setTLBR(l[0],l[1]);break;case 1:{const n=l[0];if(n instanceof A)this.model={top:n.model.top,left:n.model.left,bottom:n.model.bottom,right:n.model.right,sheetName:n.sheetName};else if(n instanceof Array)this.decode(n);else if(n.top&&n.left&&n.bottom&&n.right)this.model={top:n.top,left:n.left,bottom:n.bottom,right:n.right,sheetName:n.sheetName};else{const a=e.decodeEx(n);a.top?this.model={top:a.top,left:a.left,bottom:a.bottom,right:a.right,sheetName:a.sheetName}:this.model={top:a.row,left:a.col,bottom:a.row,right:a.col,sheetName:a.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+l.length)}}get top(){return this.model.top||1}set top(l){this.model.top=l}get left(){return this.model.left||1}set left(l){this.model.left=l}get bottom(){return this.model.bottom||1}set bottom(l){this.model.bottom=l}get right(){return this.model.right||1}set right(l){this.model.right=l}get sheetName(){return this.model.sheetName}set sheetName(l){this.model.sheetName=l}get _serialisedSheetName(){const{sheetName:l}=this.model;return l?/^[a-zA-Z0-9]*$/.test(l)?l+"!":`'${l}'!`:""}expand(l,n,a,d){(!this.model.top||l<this.top)&&(this.top=l),(!this.model.left||n<this.left)&&(this.left=n),(!this.model.bottom||a>this.bottom)&&(this.bottom=a),(!this.model.right||d>this.right)&&(this.right=d)}expandRow(l){if(l){const{dimensions:n,number:a}=l;n&&this.expand(a,n.min,a,n.max)}}expandToAddress(l){const n=e.decodeEx(l);this.expand(n.row,n.col,n.row,n.col)}get tl(){return e.n2l(this.left)+this.top}get $t$l(){return`$${e.n2l(this.left)}$${this.top}`}get br(){return e.n2l(this.right)+this.bottom}get $b$r(){return`$${e.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(l){return(!l.sheetName||!this.sheetName||l.sheetName===this.sheetName)&&!(l.bottom<this.top)&&!(l.top>this.bottom)&&!(l.right<this.left)&&!(l.left>this.right)}contains(l){const n=e.decodeEx(l);return this.containsEx(n)}containsEx(l){return(!l.sheetName||!this.sheetName||l.sheetName===this.sheetName)&&l.row>=this.top&&l.row<=this.bottom&&l.col>=this.left&&l.col<=this.right}forEachAddress(l){for(let n=this.left;n<=this.right;n++)for(let a=this.top;a<=this.bottom;a++)l(e.encodeAddress(a,n),a,n)}}C.exports=A},{"../utils/col-cache":19}],11:[function(g,C,i){const e=g("../utils/under-dash"),A=g("./enums"),s=g("../utils/col-cache"),l=g("./cell");C.exports=class{constructor(n,a){this._worksheet=n,this._number=a,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(n){return this._cells[n-1]}getCellEx(n){let a=this._cells[n.col-1];if(!a){const d=this._worksheet.getColumn(n.col);a=new l(this,d,n.address),this._cells[n.col-1]=a}return a}getCell(n){if(typeof n=="string"){const a=this._worksheet.getColumnKey(n);n=a?a.number:s.l2n(n)}return this._cells[n-1]||this.getCellEx({address:s.encodeAddress(this._number,n),row:this._number,col:n})}splice(n,a){const d=n+a;for(var o=arguments.length,c=new Array(o>2?o-2:0),r=2;r<o;r++)c[r-2]=arguments[r];const h=c.length-a,b=this._cells.length;let u,m,Z;if(h<0)for(u=n+c.length;u<=b;u++)Z=this._cells[u-1],m=this._cells[u-h-1],m?(Z=this.getCell(u),Z.value=m.value,Z.style=m.style,Z._comment=m._comment):Z&&(Z.value=null,Z.style={},Z._comment=void 0);else if(h>0)for(u=b;u>=d;u--)m=this._cells[u-1],m?(Z=this.getCell(u+h),Z.value=m.value,Z.style=m.style,Z._comment=m._comment):this._cells[u+h-1]=void 0;for(u=0;u<c.length;u++)Z=this.getCell(n+u),Z.value=c[u],Z.style={},Z._comment=void 0}eachCell(n,a){if(a||(a=n,n=null),n&&n.includeEmpty){const d=this._cells.length;for(let o=1;o<=d;o++)a(this.getCell(o),o)}else this._cells.forEach((d,o)=>{d&&d.type!==A.ValueType.Null&&a(d,o+1)})}addPageBreak(n,a){const d=this._worksheet,o=Math.max(0,n-1)||0,c=Math.max(0,a-1)||16838,r={id:this._number,max:c,man:1};o&&(r.min=o),d.rowBreaks.push(r)}get values(){const n=[];return this._cells.forEach(a=>{a&&a.type!==A.ValueType.Null&&(n[a.col]=a.value)}),n}set values(n){if(this._cells=[],n)if(n instanceof Array){let a=0;n.hasOwnProperty("0")&&(a=1),n.forEach((d,o)=>{d!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,o+a),row:this._number,col:o+a}).value=d)})}else this._worksheet.eachColumnKey((a,d)=>{n[d]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,a.number),row:this._number,col:a.number}).value=n[d])})}get hasValues(){return e.some(this._cells,n=>n&&n.type!==A.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let n=0;return this.eachCell(()=>{n++}),n}get dimensions(){let n=0,a=0;return this._cells.forEach(d=>{d&&d.type!==A.ValueType.Null&&((!n||n>d.col)&&(n=d.col),a<d.col&&(a=d.col))}),n>0?{min:n,max:a}:null}_applyStyle(n,a){return this.style[n]=a,this._cells.forEach(d=>{d&&(d[n]=a)}),a}get numFmt(){return this.style.numFmt}set numFmt(n){this._applyStyle("numFmt",n)}get font(){return this.style.font}set font(n){this._applyStyle("font",n)}get alignment(){return this.style.alignment}set alignment(n){this._applyStyle("alignment",n)}get protection(){return this.style.protection}set protection(n){this._applyStyle("protection",n)}get border(){return this.style.border}set border(n){this._applyStyle("border",n)}get fill(){return this.style.fill}set fill(n){this._applyStyle("fill",n)}get hidden(){return!!this._hidden}set hidden(n){this._hidden=n}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(n){this._outlineLevel=n}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const n=[];let a=0,d=0;return this._cells.forEach(o=>{if(o){const c=o.model;c&&((!a||a>o.col)&&(a=o.col),d<o.col&&(d=o.col),n.push(c))}}),this.height||n.length?{cells:n,number:this.number,min:a,max:d,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(n){if(n.number!==this._number)throw new Error("Invalid row number in model");let a;this._cells=[],n.cells.forEach(d=>{switch(d.type){case l.Types.Merge:break;default:{let o;if(d.address)o=s.decodeAddress(d.address);else if(a){const{row:c}=a,r=a.col+1;o={row:c,col:r,address:s.encodeAddress(c,r),$col$row:`$${s.n2l(r)}$${c}`}}a=o,this.getCellEx(o).model=d;break}}}),n.height?this.height=n.height:delete this.height,this.hidden=n.hidden,this.outlineLevel=n.outlineLevel||0,this.style=n.style&&JSON.parse(JSON.stringify(n.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(g,C,i){const e=g("../utils/col-cache");class A{constructor(l,n,a){this.table=l,this.column=n,this.index=a}_set(l,n){this.table.cacheState(),this.column[l]=n}get name(){return this.column.name}set name(l){this._set("name",l)}get filterButton(){return this.column.filterButton}set filterButton(l){this.column.filterButton=l}get style(){return this.column.style}set style(l){this.column.style=l}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(l){this._set("totalsRowLabel",l)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(l){this._set("totalsRowFunction",l)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(l){this._set("totalsRowResult",l)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(l){this._set("totalsRowFormula",l)}}C.exports=class{constructor(s,l){this.worksheet=s,l&&(this.table=l,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:s}=this,l=(h,b,u)=>{h[b]===void 0&&(h[b]=u)};l(s,"headerRow",!0),l(s,"totalsRow",!1),l(s,"style",{}),l(s.style,"theme","TableStyleMedium2"),l(s.style,"showFirstColumn",!1),l(s.style,"showLastColumn",!1),l(s.style,"showRowStripes",!1),l(s.style,"showColumnStripes",!1);const n=(h,b)=>{if(!h)throw new Error(b)};n(s.ref,"Table must have ref"),n(s.columns,"Table must have column definitions"),n(s.rows,"Table must have row definitions"),s.tl=e.decodeAddress(s.ref);const{row:a,col:d}=s.tl;n(a>0,"Table must be on valid row"),n(d>0,"Table must be on valid col");const{width:o,filterHeight:c,tableHeight:r}=this;s.autoFilterRef=e.encode(a,d,a+c-1,d+o-1),s.tableRef=e.encode(a,d,a+r-1,d+o-1),s.columns.forEach((h,b)=>{n(h.name,`Column ${b} must have a name`),b===0?l(h,"totalsRowLabel","Total"):(l(h,"totalsRowFunction","none"),h.totalsRowFormula=this.getFormula(h))})}store(){const s=(c,r)=>{r&&Object.keys(r).forEach(h=>{c[h]=r[h]})},{worksheet:l,table:n}=this,{row:a,col:d}=n.tl;let o=0;if(n.headerRow){const c=l.getRow(a+o++);n.columns.forEach((r,h)=>{const{style:b,name:u}=r,m=c.getCell(d+h);m.value=u,s(m,b)})}if(n.rows.forEach(c=>{const r=l.getRow(a+o++);c.forEach((h,b)=>{const u=r.getCell(d+b);u.value=h,s(u,n.columns[b].style)})}),n.totalsRow){const c=l.getRow(a+o++);n.columns.forEach((r,h)=>{const b=c.getCell(d+h);if(h===0)b.value=r.totalsRowLabel;else{const u=this.getFormula(r);b.value=u?{formula:r.totalsRowFormula,result:r.totalsRowResult}:null}s(b,r.style)})}}load(s){const{table:l}=this,{row:n,col:a}=l.tl;let d=0;if(l.headerRow){const o=s.getRow(n+d++);l.columns.forEach((c,r)=>{o.getCell(a+r).value=c.name})}if(l.rows.forEach(o=>{const c=s.getRow(n+d++);o.forEach((r,h)=>{c.getCell(a+h).value=r})}),l.totalsRow){const o=s.getRow(n+d++);l.columns.forEach((c,r)=>{const h=o.getCell(a+r);r===0?h.value=c.totalsRowLabel:this.getFormula(c)&&(h.value={formula:c.totalsRowFormula,result:c.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const s=e.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let l=0;l<this._cache.tableHeight;l++){const n=this.worksheet.getRow(s.row+l);for(let a=0;a<this._cache.width;a++)n.getCell(s.col+a).value=null}else{for(let l=this.tableHeight;l<this._cache.tableHeight;l++){const n=this.worksheet.getRow(s.row+l);for(let a=0;a<this._cache.width;a++)n.getCell(s.col+a).value=null}for(let l=0;l<this.tableHeight;l++){const n=this.worksheet.getRow(s.row+l);for(let a=this.width;a<this._cache.width;a++)n.getCell(s.col+a).value=null}}this.store()}addRow(s,l){this.cacheState(),l===void 0?this.table.rows.push(s):this.table.rows.splice(l,0,s)}removeRows(s){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,l)}getColumn(s){const l=this.table.columns[s];return new A(this,l,s)}addColumn(s,l,n){this.cacheState(),n===void 0?(this.table.columns.push(s),this.table.rows.forEach((a,d)=>{a.push(l[d])})):(this.table.columns.splice(n,0,s),this.table.rows.forEach((a,d)=>{a.splice(n,0,l[d])}))}removeColumns(s){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,l),this.table.rows.forEach(n=>{n.splice(s,l)})}_assign(s,l,n){this.cacheState(),s[l]=n}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(g,C,i){const e=g("./worksheet"),A=g("./defined-names"),s=g("../xlsx/xlsx"),l=g("../csv/csv");C.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new A}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new l(this)),this._csv}get nextId(){for(let n=1;n<this._worksheets.length;n++)if(!this._worksheets[n])return n;return this._worksheets.length||1}addWorksheet(n,a){const d=this.nextId;a&&(typeof a=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),a={properties:{tabColor:{argb:a}}}):(a.argb||a.theme||a.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),a={properties:{tabColor:a}}));const o=this._worksheets.reduce((h,b)=>(b&&b.orderNo)>h?b.orderNo:h,0),c=Object.assign({},a,{id:d,name:n,orderNo:o+1,workbook:this}),r=new e(c);return this._worksheets[d]=r,r}removeWorksheetEx(n){delete this._worksheets[n.id]}removeWorksheet(n){const a=this.getWorksheet(n);a&&a.destroy()}getWorksheet(n){return n===void 0?this._worksheets.find(Boolean):typeof n=="number"?this._worksheets[n]:typeof n=="string"?this._worksheets.find(a=>a&&a.name===n):void 0}get worksheets(){return this._worksheets.slice(1).sort((n,a)=>n.orderNo-a.orderNo).filter(Boolean)}eachSheet(n){this.worksheets.forEach(a=>{n(a,a.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(n){const a=this.media.length;return this.media.push(Object.assign({},n,{type:"image"})),a}getImage(n){return this.media[n]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(n=>n.model),sheets:this.worksheets.map(n=>n.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(n){this.creator=n.creator,this.lastModifiedBy=n.lastModifiedBy,this.lastPrinted=n.lastPrinted,this.created=n.created,this.modified=n.modified,this.company=n.company,this.manager=n.manager,this.title=n.title,this.subject=n.subject,this.keywords=n.keywords,this.category=n.category,this.description=n.description,this.language=n.language,this.revision=n.revision,this.contentStatus=n.contentStatus,this.properties=n.properties,this.calcProperties=n.calcProperties,this._worksheets=[],n.worksheets.forEach(a=>{const{id:d,name:o,state:c}=a,r=n.sheets&&n.sheets.findIndex(h=>h.id===d);(this._worksheets[d]=new e({id:d,name:o,orderNo:r,state:c,workbook:this})).model=a}),this._definedNames.model=n.definedNames,this.views=n.views,this._themes=n.themes,this.media=n.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(g,C,i){const e=g("../utils/under-dash"),A=g("../utils/col-cache"),s=g("./range"),l=g("./row"),n=g("./column"),a=g("./enums"),d=g("./image"),o=g("./table"),c=g("./data-validations"),r=g("../utils/encryptor"),{copyStyle:h}=g("../utils/copy-style");C.exports=class{constructor(b){b=b||{},this._workbook=b.workbook,this.id=b.id,this.orderNo=b.orderNo,this.name=b.name,this.state=b.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},b.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!b.pageSetup||!b.pageSetup.fitToWidth&&!b.pageSetup.fitToHeight||b.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},b.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},b.headerFooter),this.dataValidations=new c,this.views=b.views||[],this.autoFilter=b.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(b){if(b===void 0&&(b="sheet"+this.id),this._name!==b){if(typeof b!="string")throw new Error("The name has to be a string.");if(b==="")throw new Error("The name can't be empty.");if(b==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(b))throw new Error(`Worksheet name ${b} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(b))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+b);if(b&&b.length>31&&(console.warn(`Worksheet name ${b} exceeds 31 chars. This will be truncated`),b=b.substring(0,31)),this._workbook._worksheets.find(u=>u&&u.name.toLowerCase()===b.toLowerCase()))throw new Error("Worksheet name already exists: "+b);this._name=b}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const b=new s;return this._rows.forEach(u=>{if(u){const m=u.dimensions;m&&b.expand(u.number,m.min,u.number,m.max)}}),b}get columns(){return this._columns}set columns(b){this._headerRowCount=b.reduce((Z,p)=>{const Y=(p.header?1:p.headers&&p.headers.length)||0;return Math.max(Z,Y)},0);let u=1;const m=this._columns=[];b.forEach(Z=>{const p=new n(this,u++,!1);m.push(p),p.defn=Z})}getColumnKey(b){return this._keys[b]}setColumnKey(b,u){this._keys[b]=u}deleteColumnKey(b){delete this._keys[b]}eachColumnKey(b){e.each(this._keys,b)}getColumn(b){if(typeof b=="string"){const u=this._keys[b];if(u)return u;b=A.l2n(b)}if(this._columns||(this._columns=[]),b>this._columns.length){let u=this._columns.length+1;for(;u<=b;)this._columns.push(new n(this,u++))}return this._columns[b-1]}spliceColumns(b,u){const m=this._rows.length;for(var Z=arguments.length,p=new Array(Z>2?Z-2:0),Y=2;Y<Z;Y++)p[Y-2]=arguments[Y];if(p.length>0)for(let S=0;S<m;S++){const z=[b,u];p.forEach(K=>{z.push(K[S]||null)});const v=this.getRow(S+1);v.splice.apply(v,z)}else this._rows.forEach(S=>{S&&S.splice(b,u)});const R=p.length-u,X=b+u,H=this._columns.length;if(R<0)for(let S=b+p.length;S<=H;S++)this.getColumn(S).defn=this.getColumn(S-R).defn;else if(R>0)for(let S=H;S>=X;S--)this.getColumn(S+R).defn=this.getColumn(S).defn;for(let S=b;S<b+p.length;S++)this.getColumn(S).defn=null;this.workbook.definedNames.spliceColumns(this.name,b,u,p.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let b=0;return this.eachRow(u=>{b=Math.max(b,u.cellCount)}),b}get actualColumnCount(){const b=[];let u=0;return this.eachRow(m=>{m.eachCell(Z=>{let{col:p}=Z;b[p]||(b[p]=!0,u++)})}),u}_commitRow(){}get _lastRowNumber(){const b=this._rows;let u=b.length;for(;u>0&&b[u-1]===void 0;)u--;return u}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(b){return this._rows[b-1]}findRows(b,u){return this._rows.slice(b-1,b-1+u)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let b=0;return this.eachRow(()=>{b++}),b}getRow(b){let u=this._rows[b-1];return u||(u=this._rows[b-1]=new l(this,b)),u}getRows(b,u){if(u<1)return;const m=[];for(let Z=b;Z<b+u;Z++)m.push(this.getRow(Z));return m}addRow(b){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const m=this._nextRow,Z=this.getRow(m);return Z.values=b,this._setStyleOption(m,u[0]==="i"?u:"n"),Z}addRows(b){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const m=[];return b.forEach(Z=>{m.push(this.addRow(Z,u))}),m}insertRow(b,u){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(b,0,u),this._setStyleOption(b,m),this.getRow(b)}insertRows(b,u){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(b,0,...u),m!=="n")for(let Z=0;Z<u.length;Z++)m[0]==="o"&&this.findRow(u.length+b+Z)!==void 0?this._copyStyle(u.length+b+Z,b+Z,m[1]==="+"):m[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b+Z,m[1]==="+");return this.getRows(b,u.length)}_setStyleOption(b){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";u[0]==="o"&&this.findRow(b+1)!==void 0?this._copyStyle(b+1,b,u[1]==="+"):u[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b,u[1]==="+")}_copyStyle(b,u){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const Z=this.getRow(b),p=this.getRow(u);p.style=h(Z.style),Z.eachCell({includeEmpty:m},(Y,R)=>{p.getCell(R).style=h(Y.style)}),p.height=Z.height}duplicateRow(b,u){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const Z=this._rows[b-1],p=new Array(u).fill(Z.values);this.spliceRows(b+1,m?0:u,...p);for(let Y=0;Y<u;Y++){const R=this._rows[b+Y];R.style=Z.style,R.height=Z.height,Z.eachCell({includeEmpty:!0},(X,H)=>{R.getCell(H).style=X.style})}}spliceRows(b,u){const m=b+u;for(var Z=arguments.length,p=new Array(Z>2?Z-2:0),Y=2;Y<Z;Y++)p[Y-2]=arguments[Y];const R=p.length,X=R-u,H=this._rows.length;let S,z;if(X<0)for(b===H&&(this._rows[H-1]=void 0),S=m;S<=H;S++)if(z=this._rows[S-1],z){const v=this.getRow(S+X);v.values=z.values,v.style=z.style,v.height=z.height,z.eachCell({includeEmpty:!0},(K,V)=>{v.getCell(V).style=K.style}),this._rows[S-1]=void 0}else this._rows[S+X-1]=void 0;else if(X>0)for(S=H;S>=m;S--)if(z=this._rows[S-1],z){const v=this.getRow(S+X);v.values=z.values,v.style=z.style,v.height=z.height,z.eachCell({includeEmpty:!0},(K,V)=>{if(v.getCell(V).style=K.style,K._value.constructor.name==="MergeValue"){const N=this.getRow(K._row._number+R).getCell(V),B=K._value._master,G=this.getRow(B._row._number+R).getCell(B._column._number);N.merge(G)}})}else this._rows[S+X-1]=void 0;for(S=0;S<R;S++){const v=this.getRow(b+S);v.style={},v.values=p[S]}this.workbook.definedNames.spliceRows(this.name,b,u,R)}eachRow(b,u){if(u||(u=b,b=void 0),b&&b.includeEmpty){const m=this._rows.length;for(let Z=1;Z<=m;Z++)u(this.getRow(Z),Z)}else this._rows.forEach(m=>{m&&m.hasValues&&u(m,m.number)})}getSheetValues(){const b=[];return this._rows.forEach(u=>{u&&(b[u.number]=u.values)}),b}findCell(b,u){const m=A.getAddress(b,u),Z=this._rows[m.row-1];return Z?Z.findCell(m.col):void 0}getCell(b,u){const m=A.getAddress(b,u);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var b=arguments.length,u=new Array(b),m=0;m<b;m++)u[m]=arguments[m];const Z=new s(u);this._mergeCellsInternal(Z)}mergeCellsWithoutStyle(){for(var b=arguments.length,u=new Array(b),m=0;m<b;m++)u[m]=arguments[m];const Z=new s(u);this._mergeCellsInternal(Z,!0)}_mergeCellsInternal(b,u){e.each(this._merges,Z=>{if(Z.intersects(b))throw new Error("Cannot merge already merged cells")});const m=this.getCell(b.top,b.left);for(let Z=b.top;Z<=b.bottom;Z++)for(let p=b.left;p<=b.right;p++)(Z>b.top||p>b.left)&&this.getCell(Z,p).merge(m,u);this._merges[m.address]=b}_unMergeMaster(b){const u=this._merges[b.address];if(u){for(let m=u.top;m<=u.bottom;m++)for(let Z=u.left;Z<=u.right;Z++)this.getCell(m,Z).unmerge();delete this._merges[b.address]}}get hasMerges(){return e.some(this._merges,Boolean)}unMergeCells(){for(var b=arguments.length,u=new Array(b),m=0;m<b;m++)u[m]=arguments[m];const Z=new s(u);for(let p=Z.top;p<=Z.bottom;p++)for(let Y=Z.left;Y<=Z.right;Y++){const R=this.findCell(p,Y);R&&(R.type===a.ValueType.Merge?this._unMergeMaster(R.master):this._merges[R.address]&&this._unMergeMaster(R))}}fillFormula(b,u,m){let Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const p=A.decode(b),{top:Y,left:R,bottom:X,right:H}=p,S=H-R+1,z=A.encodeAddress(Y,R),v=Z==="shared";let K;K=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(N,B)=>m[N-Y][B-R]:(N,B)=>m[(N-Y)*S+(B-R)]:()=>{};let V=!0;for(let N=Y;N<=X;N++)for(let B=R;B<=H;B++)V?(this.getCell(N,B).value={shareType:Z,formula:u,ref:b,result:K(N,B)},V=!1):this.getCell(N,B).value=v?{sharedFormula:z,result:K(N,B)}:K(N,B)}addImage(b,u){const m={type:"image",imageId:b,range:u};this._media.push(new d(this,m))}getImages(){return this._media.filter(b=>b.type==="image")}addBackgroundImage(b){const u={type:"background",imageId:b};this._media.push(new d(this,u))}getBackgroundImageId(){const b=this._media.find(u=>u.type==="background");return b&&b.imageId}protect(b,u){return new Promise(m=>{this.sheetProtection={sheet:!0},u&&"spinCount"in u&&(u.spinCount=Number.isFinite(u.spinCount)?Math.round(Math.max(0,u.spinCount)):1e5),b&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=r.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=u&&"spinCount"in u?u.spinCount:1e5,this.sheetProtection.hashValue=r.convertPasswordToHash(b,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),u&&(this.sheetProtection=Object.assign(this.sheetProtection,u),!b&&"spinCount"in u&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(b){const u=new o(this,b);return this.tables[b.name]=u,u}getTable(b){return this.tables[b]}removeTable(b){delete this.tables[b]}getTables(){return Object.values(this.tables)}addConditionalFormatting(b){this.conditionalFormattings.push(b)}removeConditionalFormatting(b){typeof b=="number"?this.conditionalFormattings.splice(b,1):this.conditionalFormattings=b instanceof Function?this.conditionalFormattings.filter(b):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(b){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=b}get model(){const b={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(Z=>Z.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(Z=>Z.model),conditionalFormattings:this.conditionalFormattings};b.cols=n.toModel(this.columns);const u=b.rows=[],m=b.dimensions=new s;return this._rows.forEach(Z=>{const p=Z&&Z.model;p&&(m.expand(p.number,p.min,p.number,p.max),u.push(p))}),b.merges=[],e.each(this._merges,Z=>{b.merges.push(Z.range)}),b}_parseRows(b){this._rows=[],b.rows.forEach(u=>{const m=new l(this,u.number);this._rows[m.number-1]=m,m.model=u})}_parseMergeCells(b){e.each(b.mergeCells,u=>{this.mergeCellsWithoutStyle(u)})}set model(b){this.name=b.name,this._columns=n.fromModel(this,b.cols),this._parseRows(b),this._parseMergeCells(b),this.dataValidations=new c(b.dataValidations),this.properties=b.properties,this.pageSetup=b.pageSetup,this.headerFooter=b.headerFooter,this.views=b.views,this.autoFilter=b.autoFilter,this._media=b.media.map(u=>new d(this,u)),this.sheetProtection=b.sheetProtection,this.tables=b.tables.reduce((u,m)=>{const Z=new o;return Z.model=m,u[m.name]=Z,u},{}),this.conditionalFormattings=b.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(g,C,i){g("core-js/modules/es.promise"),g("core-js/modules/es.promise.finally"),g("core-js/modules/es.object.assign"),g("core-js/modules/es.object.keys"),g("core-js/modules/es.object.values"),g("core-js/modules/es.symbol"),g("core-js/modules/es.symbol.async-iterator"),g("core-js/modules/es.array.iterator"),g("core-js/modules/es.array.includes"),g("core-js/modules/es.array.find-index"),g("core-js/modules/es.array.find"),g("core-js/modules/es.string.from-code-point"),g("core-js/modules/es.string.includes"),g("core-js/modules/es.number.is-nan"),g("regenerator-runtime/runtime");const e={Workbook:g("./doc/workbook")},A=g("./doc/enums");Object.keys(A).forEach(s=>{e[s]=A[s]}),C.exports=e},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(g,C,i){const e=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");i.bufferToString=function(A){return typeof A=="string"?A:e?e.decode(A):A.toString()}},{}],17:[function(g,C,i){const e=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:A}=g("buffer");i.stringToBuffer=function(s){return typeof s!="string"?s:e?A.from(e.encode(s).buffer):A.from(s)}},{buffer:220}],18:[function(g,C,i){const e=g("./under-dash"),A=g("./col-cache");C.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(A.decodeEx(s))}getCell(s){return this.findCellEx(A.decodeEx(s),!0)}findCell(s){return this.findCellEx(A.decodeEx(s),!1)}findCellAt(s,l,n){const a=this.sheets[s],d=a&&a[l];return d&&d[n]}addCellEx(s){if(s.top)for(let l=s.top;l<=s.bottom;l++)for(let n=s.left;n<=s.right;n++)this.getCellAt(s.sheetName,l,n);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,l){const n=this.findSheet(s,l),a=this.findSheetRow(n,s,l);return this.findRowCell(a,s,l)}getCellAt(s,l,n){const a=this.sheets[s]||(this.sheets[s]=[]),d=a[l]||(a[l]=[]);return d[n]||(d[n]={sheetName:s,address:A.n2l(n)+l,row:l,col:n})}removeCellEx(s){const l=this.findSheet(s);if(!l)return;const n=this.findSheetRow(l,s);n&&delete n[s.col]}forEachInSheet(s,l){const n=this.sheets[s];n&&n.forEach((a,d)=>{a&&a.forEach((o,c)=>{o&&l(o,d,c)})})}forEach(s){e.each(this.sheets,(l,n)=>{this.forEachInSheet(n,s)})}map(s){const l=[];return this.forEach(n=>{l.push(s(n))}),l}findSheet(s,l){const n=s.sheetName;return this.sheets[n]?this.sheets[n]:l?this.sheets[n]=[]:void 0}findSheetRow(s,l,n){const{row:a}=l;return s&&s[a]?s[a]:n?s[a]=[]:void 0}findRowCell(s,l,n){const{col:a}=l;return s&&s[a]?s[a]:n?s[a]=this.template?Object.assign(l,JSON.parse(JSON.stringify(this.template))):l:void 0}spliceRows(s,l,n,a){const d=this.sheets[s];if(d){const o=[];for(let c=0;c<a;c++)o.push([]);d.splice(l,n,...o)}}spliceColumns(s,l,n,a){const d=this.sheets[s];if(d){const o=[];for(let c=0;c<a;c++)o.push(null);e.each(d,c=>{c.splice(l,n,...o)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(g,C,i){const e=/^[A-Z]+\d+$/,A={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let l,n,a,d,o,c=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;c<=26;)l=this._dictionary[c-1],this._n2l[c]=l,this._l2n[l]=c,c++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(c=27;c<=702;)n=c-27,a=n%26,d=Math.floor(n/26),l=this._dictionary[d]+this._dictionary[a],this._n2l[c]=l,this._l2n[l]=c,c++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(c=703;c<=16384;)n=c-703,a=n%26,d=Math.floor(n/26)%26,o=Math.floor(n/676),l=this._dictionary[o]+this._dictionary[d]+this._dictionary[a],this._n2l[c]=l,this._l2n[l]=c,c++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!e.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){const l=s.length<5&&this._hash[s];if(l)return l;let n=!1,a="",d=0,o=!1,c="",r=0;for(let b,u=0;u<s.length;u++)if(b=s.charCodeAt(u),!o&&b>=65&&b<=90)n=!0,a+=s[u],d=26*d+b-64;else if(b>=48&&b<=57)o=!0,c+=s[u],r=10*r+b-48;else if(o&&n&&b!==36)break;if(n){if(d>16384)throw new Error("Out of bounds. Invalid column letter: "+a)}else d=void 0;o||(r=void 0);const h={address:s=a+c,col:d,row:r,$col$row:`$${a}$${c}`};return d<=100&&r<=100&&(this._hash[s]=h,this._hash[h.$col$row]=h),h},getAddress(s,l){if(l){const n=this.n2l(l)+s;return this.decodeAddress(n)}return this.decodeAddress(s)},decode(s){const l=s.split(":");if(l.length===2){const n=this.decodeAddress(l[0]),a=this.decodeAddress(l[1]),d={top:Math.min(n.row,a.row),left:Math.min(n.col,a.col),bottom:Math.max(n.row,a.row),right:Math.max(n.col,a.col)};return d.tl=this.n2l(d.left)+d.top,d.br=this.n2l(d.right)+d.bottom,d.dimensions=`${d.tl}:${d.br}`,d}return this.decodeAddress(s)},decodeEx(s){const l=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),n=l[1]||l[2],a=l[3],d=a.split(":");if(d.length>1){let c=this.decodeAddress(d[0]),r=this.decodeAddress(d[1]);const h=Math.min(c.row,r.row),b=Math.min(c.col,r.col),u=Math.max(c.row,r.row),m=Math.max(c.col,r.col);return c=this.n2l(b)+h,r=this.n2l(m)+u,{top:h,left:b,bottom:u,right:m,sheetName:n,tl:{address:c,col:b,row:h,$col$row:`$${this.n2l(b)}$${h}`,sheetName:n},br:{address:r,col:m,row:u,$col$row:`$${this.n2l(m)}$${u}`,sheetName:n},dimensions:`${c}:${r}`}}if(a.startsWith("#"))return n?{sheetName:n,error:a}:{error:a};const o=this.decodeAddress(a);return n?{sheetName:n,...o}:o},encodeAddress:(s,l)=>A.n2l(l)+s,encode(){switch(arguments.length){case 2:return A.encodeAddress(arguments[0],arguments[1]);case 4:return`${A.encodeAddress(arguments[0],arguments[1])}:${A.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,l){const[n,a,,d,o]=s,[c,r]=l;return c>=n&&c<=d&&r>=a&&r<=o}};C.exports=A},{}],20:[function(g,C,i){const e=(s,l)=>({...s,...l.reduce((n,a)=>(s[a]&&(n[a]={...s[a]}),n),{})}),A=function(s,l,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[n]&&(l[n]=e(s[n],a))};i.copyStyle=s=>{if(!s)return s;if(l=s,Object.keys(l).length===0)return{};var l;const n={...s};return A(s,n,"font",["color"]),A(s,n,"alignment"),A(s,n,"protection"),s.border&&(A(s,n,"border"),A(s.border,n.border,"top",["color"]),A(s.border,n.border,"left",["color"]),A(s.border,n.border,"bottom",["color"]),A(s.border,n.border,"right",["color"]),A(s.border,n.border,"diagonal",["color"])),s.fill&&(A(s,n,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(n.fill.stops=s.fill.stops.map(a=>e(a,["color"])))),n}},{}],21:[function(g,C,i){(function(e){(function(){const A=g("crypto"),s={hash(l){const n=A.createHash(l);for(var a=arguments.length,d=new Array(a>1?a-1:0),o=1;o<a;o++)d[o-1]=arguments[o];return n.update(e.concat(d)),n.digest()},convertPasswordToHash(l,n,a,d){if(n=n.toLowerCase(),A.getHashes().indexOf(n)<0)throw new Error(`Hash algorithm '${n}' not supported!`);const o=e.from(l,"utf16le");let c=this.hash(n,e.from(a,"base64"),o);for(let r=0;r<d;r++){const h=e.alloc(4);h.writeUInt32LE(r,0),c=this.hash(n,c,h)}return c.toString("base64")},randomBytes:l=>A.randomBytes(l)};C.exports=s}).call(this)}).call(this,g("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(g,C,i){const{SaxesParser:e}=g("saxes"),{PassThrough:A}=g("readable-stream"),{bufferToString:s}=g("./browser-buffer-decode");C.exports=async function*(l){l.pipe&&!l[Symbol.asyncIterator]&&(l=l.pipe(new A));const n=new e;let a;n.on("error",o=>{a=o});let d=[];n.on("opentag",o=>d.push({eventType:"opentag",value:o})),n.on("text",o=>d.push({eventType:"text",value:o})),n.on("closetag",o=>d.push({eventType:"closetag",value:o}));for await(const o of l){if(n.write(s(o)),a)throw a;yield d,d=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(g,C,i){const e=g("./col-cache"),A=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;C.exports={slideFormula:function(l,n,a){const d=e.decode(n),o=e.decode(a);return l.replace(A,(c,r,h,b,u)=>{if(u)return c;const m=s.exec(b);if(m){const Z=m[1],p=m[2].toUpperCase(),Y=m[3],R=m[4];if(p.length>3||p.length===3&&p>"XFD")return c;let X=e.l2n(p),H=parseInt(R,10);return Z||(X+=o.col-d.col),Y||(H+=o.row-d.row),(r||"")+(Z||"")+e.n2l(X)+(Y||"")+H}return c})}}},{"./col-cache":19}],24:[function(g,C,i){(function(e,A){(function(){const s=g("readable-stream"),l=g("./utils"),n=g("./string-buf");class a{constructor(b,u){this._data=b,this._encoding=u}get length(){return this.toBuffer().length}copy(b,u,m,Z){return this.toBuffer().copy(b,u,m,Z)}toBuffer(){return this._buffer||(this._buffer=A.from(this._data,this._encoding)),this._buffer}}class d{constructor(b){this._data=b}get length(){return this._data.length}copy(b,u,m,Z){return this._data._buf.copy(b,u,m,Z)}toBuffer(){return this._data.toBuffer()}}class o{constructor(b){this._data=b}get length(){return this._data.length}copy(b,u,m,Z){this._data.copy(b,u,m,Z)}toBuffer(){return this._data}}class c{constructor(b){this.size=b,this.buffer=A.alloc(b),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const b=A.alloc(this.iWrite-this.iRead);return this.buffer.copy(b,0,this.iRead,this.iWrite),b}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(b){let u;return b===0?null:b===void 0||b>=this.length?(u=this.toBuffer(),this.iRead=this.iWrite,u):(u=A.alloc(b),this.buffer.copy(u,0,this.iRead,b),this.iRead+=b,u)}write(b,u,m){const Z=Math.min(m,this.size-this.iWrite);return b.copy(this.buffer,this.iWrite,u,u+Z),this.iWrite+=Z,Z}}const r=function(h){h=h||{},this.bufSize=h.bufSize||1048576,this.buffers=[],this.batch=h.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};l.inherits(r,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return A.concat(this.buffers.map(h=>h.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const b=this.buffers[this.buffers.length-1];if(!b.full)return b}const h=new c(this.bufSize);return this.buffers.push(h),h},async _pipe(h){await Promise.all(this.pipes.map(function(b){return new Promise(u=>{b.write(h.toBuffer(),()=>{u()})})}))},_writeToBuffers(h){let b=0;const u=h.length;for(;b<u;)b+=this._getWritableBuffer().write(h,b,u-b)},async write(h,b,u){let m;if(b instanceof Function&&(u=b,b="utf8"),u=u||l.nop,h instanceof n)m=new d(h);else if(h instanceof A)m=new o(h);else{if(!(typeof h=="string"||h instanceof String||h instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new a(h,b)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(m);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(m),e.nextTick(u)):(await this._pipe(m),u());else this.paused||this.emit("data",m.toBuffer()),this._writeToBuffers(m),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(h,b,u){const m=Z=>{Z?u(Z):(this._flush(),this.pipes.forEach(p=>{p.end()}),this.emit("finish"))};h?this.write(h,b,m):m()},read(h){let b;if(h){for(b=[];h&&this.buffers.length&&!this.buffers[0].eod;){const u=this.buffers[0],m=u.read(h);h-=m.length,b.push(m),u.eod&&u.full&&this.buffers.shift()}return A.concat(b)}return b=this.buffers.map(u=>u.toBuffer()).filter(Boolean),this.buffers=[],A.concat(b)},setEncoding(h){this.encoding=h},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(h){this.pipes.push(h),!this.paused&&this.buffers.length&&this.end()},unpipe(h){this.pipes=this.pipes.filter(b=>b!==h)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),C.exports=r}).call(this)}).call(this,g("_process"),g("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(g,C,i){(function(e){(function(){C.exports=class{constructor(A){this._buf=e.alloc(A&&A.size||16384),this._encoding=A&&A.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=e.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(A){A=A||0,this._buffer=void 0,this._inPos=A}_grow(A){let s=2*this._buf.length;for(;s<A;)s*=2;const l=e.alloc(s);this._buf.copy(l,0),this._buf=l}addText(A){this._buffer=void 0;let s=this._inPos+this._buf.write(A,this._inPos,this._encoding);for(;s>=this._buf.length-4;)this._grow(this._inPos+A.length),s=this._inPos+this._buf.write(A,this._inPos,this._encoding);this._inPos=s}addStringBuf(A){A.length&&(this._buffer=void 0,this.length+A.length>this.capacity&&this._grow(this.length+A.length),A._buf.copy(this._buf,this._inPos,0,A.length),this._inPos+=A.length)}}}).call(this)}).call(this,g("buffer").Buffer)},{buffer:220}],26:[function(g,C,i){const{toString:e}=Object.prototype,A=/["&<>]/,s={each:function(l,n){l&&(Array.isArray(l)?l.forEach(n):Object.keys(l).forEach(a=>{n(l[a],a)}))},some:function(l,n){return!!l&&(Array.isArray(l)?l.some(n):Object.keys(l).some(a=>n(l[a],a)))},every:function(l,n){return!l||(Array.isArray(l)?l.every(n):Object.keys(l).every(a=>n(l[a],a)))},map:function(l,n){return l?Array.isArray(l)?l.map(n):Object.keys(l).map(a=>n(l[a],a)):[]},keyBy:(l,n)=>l.reduce((a,d)=>(a[d[n]]=d,a),{}),isEqual:function(l,n){const a=typeof l,d=typeof n,o=Array.isArray(l),c=Array.isArray(n);let r;if(a!==d)return!1;switch(typeof l){case"object":if(o||c)return!(!o||!c)&&l.length===n.length&&l.every((h,b)=>{const u=n[b];return s.isEqual(h,u)});if(l===null||n===null)return l===n;if(r=Object.keys(l),Object.keys(n).length!==r.length)return!1;for(const h of r)if(!n.hasOwnProperty(h))return!1;return s.every(l,(h,b)=>{const u=n[b];return s.isEqual(h,u)});default:return l===n}},escapeHtml(l){const n=A.exec(l);if(!n)return l;let a="",d="",o=0,c=n.index;for(;c<l.length;c++){switch(l.charAt(c)){case'"':d="&quot;";break;case"&":d="&amp;";break;case"'":d="&apos;";break;case"<":d="&lt;";break;case">":d="&gt;";break;default:continue}o!==c&&(a+=l.substring(o,c)),o=c+1,a+=d}return o!==c?a+l.substring(o,c):a},strcmp:(l,n)=>l<n?-1:l>n?1:0,isUndefined:l=>e.call(l)==="[object Undefined]",isObject:l=>e.call(l)==="[object Object]",deepMerge(){const l=arguments[0]||{},{length:n}=arguments;let a,d,o;function c(r,h){a=l[h],o=Array.isArray(r),s.isObject(r)||o?(o?(o=!1,d=a&&Array.isArray(a)?a:[]):d=a&&s.isObject(a)?a:{},l[h]=s.deepMerge(d,r)):s.isUndefined(r)||(l[h]=r)}for(let r=0;r<n;r++)s.each(arguments[r],c);return l}};C.exports=s},{}],27:[function(g,C,i){(function(e,A){(function(){const s=g("fs"),l=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,n={nop(){},promiseImmediate:a=>new Promise(d=>{e.setImmediate?A(()=>{d(a)}):setTimeout(()=>{d(a)},1)}),inherits:function(a,d,o,c){a.super_=d,c||(c=o,o=null),o&&Object.keys(o).forEach(h=>{Object.defineProperty(a,h,Object.getOwnPropertyDescriptor(o,h))});const r={constructor:{value:a,enumerable:!1,writable:!1,configurable:!0}};c&&Object.keys(c).forEach(h=>{r[h]=Object.getOwnPropertyDescriptor(c,h)}),a.prototype=Object.create(d.prototype,r)},dateToExcel:(a,d)=>25569+a.getTime()/864e5-(d?1462:0),excelToDate(a,d){const o=Math.round(24*(a-25569+(d?1462:0))*3600*1e3);return new Date(o)},parsePath(a){const d=a.lastIndexOf("/");return{path:a.substring(0,d),name:a.substring(d+1)}},getRelsPath(a){const d=n.parsePath(a);return`${d.path}/_rels/${d.name}.rels`},xmlEncode(a){const d=l.exec(a);if(!d)return a;let o="",c="",r=0,h=d.index;for(;h<a.length;h++){const b=a.charCodeAt(h);switch(b){case 34:c="&quot;";break;case 38:c="&amp;";break;case 39:c="&apos;";break;case 60:c="&lt;";break;case 62:c="&gt;";break;case 127:c="";break;default:if(b<=31&&(b<=8||b>=11&&b!==13)){c="";break}continue}r!==h&&(o+=a.substring(r,h)),r=h+1,c&&(o+=c)}return r!==h?o+a.substring(r,h):o},xmlDecode:a=>a.replace(/&([a-z]*);/g,d=>{switch(d){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return d}}),validInt(a){const d=parseInt(a,10);return Number.isNaN(d)?0:d},isDateFmt(a){return a?(a=(a=a.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:a=>new Promise(d=>{s.access(a,s.constants.F_OK,o=>{d(!o)})})},toIsoDateString:a=>a.toIsoString().subsstr(0,10),parseBoolean:a=>a===!0||a==="true"||a===1||a==="1"};C.exports=n}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{},g("timers").setImmediate)},{fs:216,timers:523}],28:[function(g,C,i){const e=g("./under-dash"),A=g("./utils");function s(a,d,o){a.push(` ${d}="${A.xmlEncode(o.toString())}"`)}function l(a,d){if(d){const o=[];e.each(d,(c,r)=>{c!==void 0&&s(o,r,c)}),a.push(o.join(""))}}class n{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(d){const o=this._xml;o.push("<?xml"),l(o,d),o.push(`?>
`)}openNode(d,o){const c=this.tos,r=this._xml;c&&this.open&&r.push(">"),this._stack.push(d),r.push("<"),r.push(d),l(r,o),this.leaf=!0,this.open=!0}addAttribute(d,o){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");o!==void 0&&s(this._xml,d,o)}addAttributes(d){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");l(this._xml,d)}writeText(d){const o=this._xml;this.open&&(o.push(">"),this.open=!1),this.leaf=!1,o.push(A.xmlEncode(d.toString()))}writeXml(d){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(d)}closeNode(){const d=this._stack.pop(),o=this._xml;this.leaf?o.push("/>"):(o.push("</"),o.push(d),o.push(">")),this.open=!1,this.leaf=!1}leafNode(d,o,c){this.openNode(d,o),c!==void 0&&this.writeText(c),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const d=this._rollbacks.pop();this._xml.length>d.xml&&this._xml.splice(d.xml,this._xml.length-d.xml),this._stack.length>d.stack&&this._stack.splice(d.stack,this._stack.length-d.stack),this.leaf=d.leaf,this.open=d.open}get xml(){return this.closeAll(),this._xml.join("")}}n.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},C.exports=n},{"./under-dash":26,"./utils":27}],29:[function(g,C,i){(function(e){(function(){const A=g("events"),s=g("jszip"),l=g("./stream-buf"),{stringToBuffer:n}=g("./browser-buffer-encode");class a extends A.EventEmitter{constructor(o){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},o),this.zip=new s,this.stream=new l}append(o,c){c.hasOwnProperty("base64")&&c.base64?this.zip.file(c.name,o,{base64:!0}):(e.browser&&typeof o=="string"&&(o=n(o)),this.zip.file(c.name,o))}async finalize(){const o=await this.zip.generateAsync(this.options);this.stream.end(o),this.emit("finish")}read(o){return this.stream.read(o)}setEncoding(o){return this.stream.setEncoding(o)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(o,c){return this.stream.pipe(o,c)}unpipe(o){return this.stream.unpipe(o)}unshift(o){return this.stream.unshift(o)}wrap(o){return this.stream.wrap(o)}}C.exports={ZipWriter:a}}).call(this)}).call(this,g("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(g,C,i){C.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(g,C,i){C.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(g,C,i){const e=g("../../utils/parse-sax"),A=g("../../utils/xml-stream");class s{prepare(){}render(){}parseOpen(n){}parseText(n){}parseClose(n){}reconcile(n,a){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(n=>{n instanceof s?n.reset():n.xform&&n.xform.reset()})}mergeModel(n){this.model=Object.assign(this.model||{},n)}async parse(n){for await(const a of n)for(const{eventType:d,value:o}of a)if(d==="opentag")this.parseOpen(o);else if(d==="text")this.parseText(o);else if(d==="closetag"&&!this.parseClose(o.name))return this.model;return this.model}async parseStream(n){return this.parse(e(n))}get xml(){return this.toXml(this.model)}toXml(n){const a=new A;return this.render(a,n),a.xml}static toAttribute(n,a){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(n===void 0){if(d)return a}else if(d||n!==a)return n.toString()}static toStringAttribute(n,a){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(n,a,d)}static toStringValue(n,a){return n===void 0?a:n}static toBoolAttribute(n,a){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(n===void 0){if(d)return a}else if(d||n!==a)return n?"1":"0"}static toBoolValue(n,a){return n===void 0?a:n==="1"}static toIntAttribute(n,a){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(n,a,d)}static toIntValue(n,a){return n===void 0?a:parseInt(n,10)}static toFloatAttribute(n,a){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(n,a,d)}static toFloatValue(n,a){return n===void 0?a:parseFloat(n)}}C.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(g,C,i){const e=g("../base-xform"),A=g("../../../utils/col-cache");function s(n){try{return A.decodeEx(n),!0}catch{return!1}}function l(n){const a=[];let d=!1,o="";return n.split(",").forEach(c=>{if(!c)return;const r=(c.match(/'/g)||[]).length;if(!r)return void(d?o+=c+",":s(c)&&a.push(c));const h=r%2==0;!d&&h&&s(c)?a.push(c):d&&!h?(d=!1,s(o+c)&&a.push(o+c),o=""):(d=!0,o+=c+",")}),a}C.exports=class extends e{render(n,a){n.openNode("definedName",{name:a.name,localSheetId:a.localSheetId}),n.writeText(a.ranges.join(",")),n.closeNode()}parseOpen(n){switch(n.name){case"definedName":return this._parsedName=n.attributes.name,this._parsedLocalSheetId=n.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(n){this._parsedText.push(n)}parseClose(){return this.model={name:this._parsedName,ranges:l(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(g,C,i){const e=g("../../../utils/utils"),A=g("../base-xform");C.exports=class extends A{render(s,l){s.leafNode("sheet",{sheetId:l.id,name:l.name,state:l.state,"r:id":l.rId})}parseOpen(s){return s.name==="sheet"&&(this.model={name:e.xmlDecode(s.attributes.name),id:parseInt(s.attributes.sheetId,10),state:s.attributes.state,rId:s.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{render(A,s){A.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:s.fullCalcOnLoad?1:void 0})}parseOpen(A){return A.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{render(A,s){A.leafNode("workbookPr",{date1904:s.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(A){return A.name==="workbookPr"&&(this.model={date1904:A.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{render(A,s){const l={xWindow:s.x||0,yWindow:s.y||0,windowWidth:s.width||12e3,windowHeight:s.height||24e3,firstSheet:s.firstSheet,activeTab:s.activeTab};s.visibility&&s.visibility!=="visible"&&(l.visibility=s.visibility),A.leafNode("workbookView",l)}parseOpen(A){if(A.name==="workbookView"){const s=this.model={},l=function(a,d,o){const c=d!==void 0?s[a]=d:o;c!==void 0&&(s[a]=c)},n=function(a,d,o){const c=d!==void 0?s[a]=parseInt(d,10):o;c!==void 0&&(s[a]=c)};return n("x",A.attributes.xWindow,0),n("y",A.attributes.yWindow,0),n("width",A.attributes.windowWidth,25e3),n("height",A.attributes.windowHeight,1e4),l("visibility",A.attributes.visibility,"visible"),n("activeTab",A.attributes.activeTab,void 0),n("firstSheet",A.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../../../utils/col-cache"),s=g("../../../utils/xml-stream"),l=g("../base-xform"),n=g("../static-xform"),a=g("../list-xform"),d=g("./defined-name-xform"),o=g("./sheet-xform"),c=g("./workbook-view-xform"),r=g("./workbook-properties-xform"),h=g("./workbook-calc-properties-xform");class b extends l{constructor(){super(),this.map={fileVersion:b.STATIC_XFORMS.fileVersion,workbookPr:new r,bookViews:new a({tag:"bookViews",count:!1,childXform:new c}),sheets:new a({tag:"sheets",count:!1,childXform:new o}),definedNames:new a({tag:"definedNames",count:!1,childXform:new d}),calcPr:new h}}prepare(m){m.sheets=m.worksheets;const Z=[];let p=0;m.sheets.forEach(Y=>{if(Y.pageSetup&&Y.pageSetup.printArea&&Y.pageSetup.printArea.split("&&").forEach(R=>{const X=R.split(":"),H={name:"_xlnm.Print_Area",ranges:[`'${Y.name}'!$${X[0]}:$${X[1]}`],localSheetId:p};Z.push(H)}),Y.pageSetup&&(Y.pageSetup.printTitlesRow||Y.pageSetup.printTitlesColumn)){const R=[];if(Y.pageSetup.printTitlesColumn){const H=Y.pageSetup.printTitlesColumn.split(":");R.push(`'${Y.name}'!$${H[0]}:$${H[1]}`)}if(Y.pageSetup.printTitlesRow){const H=Y.pageSetup.printTitlesRow.split(":");R.push(`'${Y.name}'!$${H[0]}:$${H[1]}`)}const X={name:"_xlnm.Print_Titles",ranges:R,localSheetId:p};Z.push(X)}p++}),Z.length&&(m.definedNames=m.definedNames.concat(Z)),(m.media||[]).forEach((Y,R)=>{Y.name=Y.type+(R+1)})}render(m,Z){m.openXml(s.StdDocAttributes),m.openNode("workbook",b.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(m),this.map.workbookPr.render(m,Z.properties),this.map.bookViews.render(m,Z.views),this.map.sheets.render(m,Z.sheets),this.map.definedNames.render(m,Z.definedNames),this.map.calcPr.render(m,Z.calcProperties),m.closeNode()}parseOpen(m){if(this.parser)return this.parser.parseOpen(m),!0;switch(m.name){case"workbook":return!0;default:return this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m),!0}}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){if(this.parser)return this.parser.parseClose(m)||(this.parser=void 0),!0;switch(m){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(m){const Z=(m.workbookRels||[]).reduce((H,S)=>(H[S.Id]=S,H),{}),p=[];let Y,R=0;(m.sheets||[]).forEach(H=>{const S=Z[H.rId];S&&(Y=m.worksheetHash["xl/"+S.Target.replace(/^(\s|\/xl\/)+/,"")],Y&&(Y.name=H.name,Y.id=H.id,Y.state=H.state,p[R++]=Y))});const X=[];e.each(m.definedNames,H=>{if(H.name==="_xlnm.Print_Area"){if(Y=p[H.localSheetId],Y){Y.pageSetup||(Y.pageSetup={});const S=A.decodeEx(H.ranges[0]);Y.pageSetup.printArea=Y.pageSetup.printArea?`${Y.pageSetup.printArea}&&${S.dimensions}`:S.dimensions}}else if(H.name==="_xlnm.Print_Titles"){if(Y=p[H.localSheetId],Y){Y.pageSetup||(Y.pageSetup={});const S=H.ranges.join(","),z=/\$/g,v=/\$\d+:\$\d+/,K=S.match(v);if(K&&K.length){const B=K[0];Y.pageSetup.printTitlesRow=B.replace(z,"")}const V=/\$[A-Z]+:\$[A-Z]+/,N=S.match(V);if(N&&N.length){const B=N[0];Y.pageSetup.printTitlesColumn=B.replace(z,"")}}}else X.push(H)}),m.definedNames=X,m.media.forEach((H,S)=>{H.index=S})}}b.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},b.STATIC_XFORMS={fileVersion:new n({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},C.exports=b},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(g,C,i){const e=g("../strings/rich-text-xform"),A=g("../../../utils/utils"),s=g("../base-xform"),l=C.exports=function(n){this.model=n};A.inherits(l,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new e),this._richTextXform},render(n,a){a=a||this.model,n.openNode("comment",{ref:a.ref,authorId:0}),n.openNode("text"),a&&a.note&&a.note.texts&&a.note.texts.forEach(d=>{this.richTextXform.render(n,d)}),n.closeNode(),n.closeNode()},parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"comment":return this.model={type:"note",note:{texts:[]},...n.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(n),!0;default:return!1}},parseText(n){this.parser&&this.parser.parseText(n)},parseClose(n){switch(n){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../../../utils/utils"),s=g("../base-xform"),l=g("./comment-xform"),n=C.exports=function(){this.map={comment:new l}};A.inherits(n,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(a,d){d=d||this.model,a.openXml(e.StdDocAttributes),a.openNode("comments",n.COMMENTS_ATTRIBUTES),a.openNode("authors"),a.leafNode("author",null,"Author"),a.closeNode(),a.openNode("commentList"),d.comments.forEach(o=>{this.map.comment.render(a,o)}),a.closeNode(),a.closeNode()},parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(a),!0;default:return!1}},parseText(a){this.parser&&this.parser.parseText(a)},parseClose(a){switch(a){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(a),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{constructor(A){super(),this._model=A}get tag(){return this._model&&this._model.tag}render(A,s,l){(s===l[2]||this.tag==="x:SizeWithCells"&&s===l[1])&&A.leafNode(this.tag)}parseOpen(A){switch(A.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{constructor(A){super(),this._model=A}get tag(){return this._model&&this._model.tag}render(A,s){A.leafNode(this.tag,null,s)}parseOpen(A){switch(A.name){case this.tag:return this.text="",!0;default:return!1}}parseText(A){this.text=A}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"x:Anchor"}getAnchorRect(A){const s=Math.floor(A.left),l=Math.floor(68*(A.left-s)),n=Math.floor(A.top),a=Math.floor(18*(A.top-n)),d=Math.floor(A.right),o=Math.floor(68*(A.right-d)),c=Math.floor(A.bottom);return[s,l,n,a,d,o,c,Math.floor(18*(A.bottom-c))]}getDefaultRect(A){const s=A.col,l=Math.max(A.row-2,0);return[s,6,l,14,s+2,2,l+4,16]}render(A,s){const l=s.anchor?this.getAnchorRect(s.anchor):this.getDefaultRect(s.refAddress);A.leafNode("x:Anchor",null,l.join(", "))}parseOpen(A){switch(A.name){case this.tag:return this.text="",!0;default:return!1}}parseText(A){this.text=A}parseClose(){return!1}}},{"../base-xform":32}],44:[function(g,C,i){const e=g("../base-xform"),A=g("./vml-anchor-xform"),s=g("./style/vml-protection-xform"),l=g("./style/vml-position-xform"),n=["twoCells","oneCells","absolute"];C.exports=class extends e{constructor(){super(),this.map={"x:Anchor":new A,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new l({tag:"x:SizeWithCells"}),"x:MoveWithCells":new l({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(a,d){const{protection:o,editAs:c}=d.note;a.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(a,c,n),this.map["x:SizeWithCells"].render(a,c,n),this.map["x:Anchor"].render(a,d),this.map["x:Locked"].render(a,o.locked),a.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(a,o.lockText),a.leafNode("x:Row",null,d.refAddress.row-1),a.leafNode("x:Column",null,d.refAddress.col-1),a.closeNode()}parseOpen(a){switch(a.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const a=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),d=Object.keys(a).length;this.model.editAs=n[d],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform"),s=g("./vml-shape-xform");class l extends A{constructor(){super(),this.map={"v:shape":new s}}get tag(){return"xml"}render(a,d){a.openXml(e.StdDocAttributes),a.openNode(this.tag,l.DRAWING_ATTRIBUTES),a.openNode("o:shapelayout",{"v:ext":"edit"}),a.leafNode("o:idmap",{"v:ext":"edit",data:1}),a.closeNode(),a.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),a.leafNode("v:stroke",{joinstyle:"miter"}),a.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),a.closeNode(),d.comments.forEach((o,c)=>{this.map["v:shape"].render(a,o,c)}),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:return!0}}reconcile(a,d){a.anchors.forEach(o=>{o.br?this.map["xdr:twoCellAnchor"].reconcile(o,d):this.map["xdr:oneCellAnchor"].reconcile(o,d)})}}l.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},C.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(g,C,i){const e=g("../base-xform"),A=g("./vml-textbox-xform"),s=g("./vml-client-data-xform");class l extends e{constructor(){super(),this.map={"v:textbox":new A,"x:ClientData":new s}}get tag(){return"v:shape"}render(a,d,o){a.openNode("v:shape",l.V_SHAPE_ATTRIBUTES(d,o)),a.leafNode("v:fill",{color2:"infoBackground [80]"}),a.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),a.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(a,d),this.map["x:ClientData"].render(a,d),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset(),this.model={margins:{insetmode:a.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}l.V_SHAPE_ATTRIBUTES=(n,a)=>({id:"_x0000_s"+(1025+a),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":n.note.margins&&n.note.margins.insetmode}),C.exports=l},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"v:textbox"}conversionUnit(A,s,l){return`${parseFloat(A)*s.toFixed(2)}${l}`}reverseConversionUnit(A){return(A||"").split(",").map(s=>Number(parseFloat(this.conversionUnit(parseFloat(s),.1,"")).toFixed(2)))}render(A,s){const l={style:"mso-direction-alt:auto"};if(s&&s.note){let{inset:n}=s.note&&s.note.margins;Array.isArray(n)&&(n=n.map(a=>this.conversionUnit(a,10,"mm")).join(",")),n&&(l.inset=n)}A.openNode("v:textbox",l),A.leafNode("div",{style:"text-align:left"}),A.closeNode()}parseOpen(A){switch(A.name){case this.tag:return this.model={inset:this.reverseConversionUnit(A.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(A){switch(A){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(g,C,i){const e=g("./base-xform");C.exports=class extends e{createNewModel(A){return{}}parseOpen(A){return this.parser=this.parser||this.map[A.name],this.parser?(this.parser.parseOpen(A),!0):A.name===this.tag&&(this.model=this.createNewModel(A),!0)}parseText(A){this.parser&&this.parser.parseText(A)}onParserClose(A,s){this.model[A]=s.model}parseClose(A){return this.parser?(this.parser.parseClose(A)||(this.onParserClose(A,this.parser),this.parser=void 0),!0):A!==this.tag}}},{"./base-xform":32}],49:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{render(A,s){A.openNode("HeadingPairs"),A.openNode("vt:vector",{size:2,baseType:"variant"}),A.openNode("vt:variant"),A.leafNode("vt:lpstr",void 0,"Worksheets"),A.closeNode(),A.openNode("vt:variant"),A.leafNode("vt:i4",void 0,s.length),A.closeNode(),A.closeNode(),A.closeNode()}parseOpen(A){return A.name==="HeadingPairs"}parseText(){}parseClose(A){return A!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{render(A,s){A.openNode("TitlesOfParts"),A.openNode("vt:vector",{size:s.length,baseType:"lpstr"}),s.forEach(l=>{A.leafNode("vt:lpstr",void 0,l.name)}),A.closeNode(),A.closeNode()}parseOpen(A){return A.name==="TitlesOfParts"}parseText(){}parseClose(A){return A!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform"),s=g("../simple/string-xform"),l=g("./app-heading-pairs-xform"),n=g("./app-titles-of-parts-xform");class a extends A{constructor(){super(),this.map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new l,TitleOfParts:new n}}render(o,c){o.openXml(e.StdDocAttributes),o.openNode("Properties",a.PROPERTY_ATTRIBUTES),o.leafNode("Application",void 0,"Microsoft Excel"),o.leafNode("DocSecurity",void 0,"0"),o.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(o,c.worksheets),this.map.TitleOfParts.render(o,c.worksheets),this.map.Company.render(o,c.company||""),this.map.Manager.render(o,c.manager),o.leafNode("LinksUpToDate",void 0,"false"),o.leafNode("SharedDoc",void 0,"false"),o.leafNode("HyperlinksChanged",void 0,"false"),o.leafNode("AppVersion",void 0,"16.0300"),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"Properties":return!0;default:return this.parser=this.map[o.name],!!this.parser&&(this.parser.parseOpen(o),!0)}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),!0;switch(o){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}a.DateFormat=function(d){return d.toISOString().replace(/[.]\d{3,6}/,"")},a.DateAttrs={"xsi:type":"dcterms:W3CDTF"},a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},C.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform");class s extends A{render(n,a){n.openXml(e.StdDocAttributes),n.openNode("Types",s.PROPERTY_ATTRIBUTES);const d={};(a.media||[]).forEach(o=>{if(o.type==="image"){const c=o.extension;d[c]||(d[c]=!0,n.leafNode("Default",{Extension:c,ContentType:"image/"+c}))}}),n.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),n.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),n.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),a.worksheets.forEach(o=>{const c=`/xl/worksheets/sheet${o.id}.xml`;n.leafNode("Override",{PartName:c,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),n.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),n.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),a.sharedStrings&&a.sharedStrings.count&&n.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),a.tables&&a.tables.forEach(o=>{n.leafNode("Override",{PartName:"/xl/tables/"+o.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),a.drawings&&a.drawings.forEach(o=>{n.leafNode("Override",{PartName:`/xl/drawings/${o.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),a.commentRefs&&(n.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),a.commentRefs.forEach(o=>{let{commentName:c}=o;n.leafNode("Override",{PartName:`/xl/${c}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),n.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),n.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),n.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}s.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},C.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform"),s=g("../simple/date-xform"),l=g("../simple/string-xform"),n=g("../simple/integer-xform");class a extends A{constructor(){super(),this.map={"dc:creator":new l({tag:"dc:creator"}),"dc:title":new l({tag:"dc:title"}),"dc:subject":new l({tag:"dc:subject"}),"dc:description":new l({tag:"dc:description"}),"dc:identifier":new l({tag:"dc:identifier"}),"dc:language":new l({tag:"dc:language"}),"cp:keywords":new l({tag:"cp:keywords"}),"cp:category":new l({tag:"cp:category"}),"cp:lastModifiedBy":new l({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:a.DateFormat}),"cp:revision":new n({tag:"cp:revision"}),"cp:version":new l({tag:"cp:version"}),"cp:contentStatus":new l({tag:"cp:contentStatus"}),"cp:contentType":new l({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:a.DateAttrs,format:a.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:a.DateAttrs,format:a.DateFormat})}}render(o,c){o.openXml(e.StdDocAttributes),o.openNode("cp:coreProperties",a.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(o,c.creator),this.map["dc:title"].render(o,c.title),this.map["dc:subject"].render(o,c.subject),this.map["dc:description"].render(o,c.description),this.map["dc:identifier"].render(o,c.identifier),this.map["dc:language"].render(o,c.language),this.map["cp:keywords"].render(o,c.keywords),this.map["cp:category"].render(o,c.category),this.map["cp:lastModifiedBy"].render(o,c.lastModifiedBy),this.map["cp:lastPrinted"].render(o,c.lastPrinted),this.map["cp:revision"].render(o,c.revision),this.map["cp:version"].render(o,c.version),this.map["cp:contentStatus"].render(o,c.contentStatus),this.map["cp:contentType"].render(o,c.contentType),this.map["dcterms:created"].render(o,c.created),this.map["dcterms:modified"].render(o,c.modified),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[o.name],this.parser)return this.parser.parseOpen(o),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(o))}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),!0;switch(o){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+o)}}}a.DateFormat=function(d){return d.toISOString().replace(/[.]\d{3}/,"")},a.DateAttrs={"xsi:type":"dcterms:W3CDTF"},a.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},C.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{render(A,s){A.leafNode("Relationship",s)}parseOpen(A){switch(A.name){case"Relationship":return this.model=A.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform"),s=g("./relationship-xform");class l extends A{constructor(){super(),this.map={Relationship:new s}}render(a,d){d=d||this._values,a.openXml(e.StdDocAttributes),a.openNode("Relationships",l.RELATIONSHIPS_ATTRIBUTES),d.forEach(o=>{this.map.Relationship.render(a,o)}),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[a.name],this.parser)return this.parser.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(a){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+a)}}}l.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},C.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{parseOpen(A){if(this.parser)return this.parser.parseOpen(A),!0;switch(A.name){case this.tag:this.reset(),this.model={range:{editAs:A.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[A.name],this.parser&&this.parser.parseOpen(A)}return!0}parseText(A){this.parser&&this.parser.parseText(A)}reconcilePicture(A,s){if(A&&A.rId){const l=s.rels[A.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(l){const n=l[1],a=s.mediaIndex[n];return s.media[a]}}}}},{"../base-xform":32}],57:[function(g,C,i){const e=g("../base-xform"),A=g("./blip-xform");C.exports=class extends e{constructor(){super(),this.map={"a:blip":new A}}get tag(){return"xdr:blipFill"}render(s,l){s.openNode(this.tag),this.map["a:blip"].render(s,l),s.openNode("a:stretch"),s.leafNode("a:fillRect"),s.closeNode(),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(){}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"a:blip"}render(A,s){A.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":s.rId,cstate:"print"})}parseOpen(A){switch(A.name){case this.tag:return this.model={rId:A.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(A){switch(A){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"xdr:cNvPicPr"}render(A){A.openNode(this.tag),A.leafNode("a:picLocks",{noChangeAspect:"1"}),A.closeNode()}parseOpen(A){switch(A.name){case this.tag:default:return!0}}parseText(){}parseClose(A){switch(A){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(g,C,i){const e=g("../base-xform"),A=g("./hlink-click-xform"),s=g("./ext-lst-xform");C.exports=class extends e{constructor(){super(),this.map={"a:hlinkClick":new A,"a:extLst":new s}}get tag(){return"xdr:cNvPr"}render(l,n){l.openNode(this.tag,{id:n.index,name:"Picture "+n.index}),this.map["a:hlinkClick"].render(l,n),this.map["a:extLst"].render(l,n),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset();break;default:this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)}return!0}parseText(){}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(g,C,i){const e=g("../base-xform"),A=g("../simple/integer-xform");C.exports=class extends e{constructor(s){super(),this.tag=s.tag,this.map={"xdr:col":new A({tag:"xdr:col",zero:!0}),"xdr:colOff":new A({tag:"xdr:colOff",zero:!0}),"xdr:row":new A({tag:"xdr:row",zero:!0}),"xdr:rowOff":new A({tag:"xdr:rowOff",zero:!0})}}render(s,l){s.openNode(this.tag),this.map["xdr:col"].render(s,l.nativeCol),this.map["xdr:colOff"].render(s,l.nativeColOff),this.map["xdr:row"].render(s,l.nativeRow),this.map["xdr:rowOff"].render(s,l.nativeRowOff),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(g,C,i){const e=g("../../../utils/col-cache"),A=g("../../../utils/xml-stream"),s=g("../base-xform"),l=g("./two-cell-anchor-xform"),n=g("./one-cell-anchor-xform");class a extends s{constructor(){super(),this.map={"xdr:twoCellAnchor":new l,"xdr:oneCellAnchor":new n}}prepare(o){o.anchors.forEach((c,r)=>{c.anchorType=function(h){return(typeof h.range=="string"?e.decode(h.range):h.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(c),this.map[c.anchorType].prepare(c,{index:r})})}get tag(){return"xdr:wsDr"}render(o,c){o.openXml(A.StdDocAttributes),o.openNode(this.tag,a.DRAWING_ATTRIBUTES),c.anchors.forEach(r=>{this.map[r.anchorType].render(o,r)}),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(o){case this.tag:return!1;default:return!0}}reconcile(o,c){o.anchors.forEach(r=>{r.br?this.map["xdr:twoCellAnchor"].reconcile(r,c):this.map["xdr:oneCellAnchor"].reconcile(r,c)})}}a.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},C.exports=a},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"a:extLst"}render(A){A.openNode(this.tag),A.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),A.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),A.closeNode(),A.closeNode()}parseOpen(A){switch(A.name){case this.tag:default:return!0}}parseText(){}parseClose(A){switch(A){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{constructor(A){super(),this.tag=A.tag,this.map={}}render(A,s){A.openNode(this.tag);const l=Math.floor(9525*s.width),n=Math.floor(9525*s.height);A.addAttribute("cx",l),A.addAttribute("cy",n),A.closeNode()}parseOpen(A){return A.name===this.tag&&(this.model={width:parseInt(A.attributes.cx||"0",10)/9525,height:parseInt(A.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"a:hlinkClick"}render(A,s){s.hyperlinks&&s.hyperlinks.rId&&A.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":s.hyperlinks.rId,tooltip:s.hyperlinks.tooltip})}parseOpen(A){switch(A.name){case this.tag:return this.model={hyperlinks:{rId:A.attributes["r:id"],tooltip:A.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(g,C,i){const e=g("../base-xform"),A=g("./c-nv-pr-xform"),s=g("./c-nv-pic-pr-xform");C.exports=class extends e{constructor(){super(),this.map={"xdr:cNvPr":new A,"xdr:cNvPicPr":new s}}get tag(){return"xdr:nvPicPr"}render(l,n){l.openNode(this.tag),this.map["xdr:cNvPr"].render(l,n),this.map["xdr:cNvPicPr"].render(l,n),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset();break;default:this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)}return!0}parseText(){}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(g,C,i){const e=g("./base-cell-anchor-xform"),A=g("../static-xform"),s=g("./cell-position-xform"),l=g("./ext-xform"),n=g("./pic-xform");C.exports=class extends e{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new l({tag:"xdr:ext"}),"xdr:pic":new n,"xdr:clientData":new A({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(a,d){this.map["xdr:pic"].prepare(a.picture,d)}render(a,d){a.openNode(this.tag,{editAs:d.range.editAs||"oneCell"}),this.map["xdr:from"].render(a,d.range.tl),this.map["xdr:ext"].render(a,d.range.ext),this.map["xdr:pic"].render(a,d.picture),this.map["xdr:clientData"].render(a,{}),a.closeNode()}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(a,d){a.medium=this.reconcilePicture(a.picture,d)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(g,C,i){const e=g("../base-xform"),A=g("../static-xform"),s=g("./blip-fill-xform"),l=g("./nv-pic-pr-xform"),n=g("./sp-pr");C.exports=class extends e{constructor(){super(),this.map={"xdr:nvPicPr":new l,"xdr:blipFill":new s,"xdr:spPr":new A(n)}}get tag(){return"xdr:pic"}prepare(a,d){a.index=d.index+1}render(a,d){a.openNode(this.tag),this.map["xdr:nvPicPr"].render(a,d),this.map["xdr:blipFill"].render(a,d),this.map["xdr:spPr"].render(a,d),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(){}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(g,C,i){C.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(g,C,i){const e=g("./base-cell-anchor-xform"),A=g("../static-xform"),s=g("./cell-position-xform"),l=g("./pic-xform");C.exports=class extends e{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new l,"xdr:clientData":new A({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(n,a){this.map["xdr:pic"].prepare(n.picture,a)}render(n,a){n.openNode(this.tag,{editAs:a.range.editAs||"oneCell"}),this.map["xdr:from"].render(n,a.range.tl),this.map["xdr:to"].render(n,a.range.br),this.map["xdr:pic"].render(n,a.picture),this.map["xdr:clientData"].render(n,{}),n.closeNode()}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(n,a){n.medium=this.reconcilePicture(n.picture,a)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(g,C,i){const e=g("./base-xform");C.exports=class extends e{constructor(A){super(),this.tag=A.tag,this.always=!!A.always,this.count=A.count,this.empty=A.empty,this.$count=A.$count||"count",this.$=A.$,this.childXform=A.childXform,this.maxItems=A.maxItems}prepare(A,s){const{childXform:l}=this;A&&A.forEach((n,a)=>{s.index=a,l.prepare(n,s)})}render(A,s){if(this.always||s&&s.length){A.openNode(this.tag,this.$),this.count&&A.addAttribute(this.$count,s&&s.length||0);const{childXform:l}=this;(s||[]).forEach((n,a)=>{l.render(A,n,a)}),A.closeNode()}else this.empty&&A.leafNode(this.tag)}parseOpen(A){if(this.parser)return this.parser.parseOpen(A),!0;switch(A.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(A)&&(this.parser=this.childXform,!0)}}parseText(A){this.parser&&this.parser.parseText(A)}parseClose(A){if(this.parser){if(!this.parser.parseClose(A)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(A,s){if(A){const{childXform:l}=this;A.forEach(n=>{l.reconcile(n,s)})}}}},{"./base-xform":32}],72:[function(g,C,i){const e=g("../../../utils/col-cache"),A=g("../base-xform");C.exports=class extends A{get tag(){return"autoFilter"}render(s,l){if(l)if(typeof l=="string")s.leafNode("autoFilter",{ref:l});else{const n=function(o){return typeof o=="string"?o:e.getAddress(o.row,o.column).address},a=n(l.from),d=n(l.to);a&&d&&s.leafNode("autoFilter",{ref:`${a}:${d}`})}}parseOpen(s){s.name==="autoFilter"&&(this.model=s.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(g,C,i){const e=g("../../../utils/utils"),A=g("../base-xform"),s=g("../../../doc/range"),l=g("../../../doc/enums"),n=g("../strings/rich-text-xform");function a(d){if(d==null)return l.ValueType.Null;if(d instanceof String||typeof d=="string")return l.ValueType.String;if(typeof d=="number")return l.ValueType.Number;if(typeof d=="boolean")return l.ValueType.Boolean;if(d instanceof Date)return l.ValueType.Date;if(d.text&&d.hyperlink)return l.ValueType.Hyperlink;if(d.formula)return l.ValueType.Formula;if(d.error)return l.ValueType.Error;throw new Error("I could not understand type of value")}C.exports=class extends A{constructor(){super(),this.richTextXForm=new n}get tag(){return"c"}prepare(d,o){const c=o.styles.addStyleModel(d.style||{},function(r){switch(r.type){case l.ValueType.Formula:return a(r.result);default:return r.type}}(d));switch(c&&(d.styleId=c),d.comment&&o.comments.push({...d.comment,ref:d.address}),d.type){case l.ValueType.String:case l.ValueType.RichText:o.sharedStrings&&(d.ssId=o.sharedStrings.add(d.value));break;case l.ValueType.Date:o.date1904&&(d.date1904=!0);break;case l.ValueType.Hyperlink:o.sharedStrings&&d.text!==void 0&&d.text!==null&&(d.ssId=o.sharedStrings.add(d.text)),o.hyperlinks.push({address:d.address,target:d.hyperlink,tooltip:d.tooltip});break;case l.ValueType.Merge:o.merges.add(d);break;case l.ValueType.Formula:if(o.date1904&&(d.date1904=!0),d.shareType==="shared"&&(d.si=o.siFormulae++),d.formula)o.formulae[d.address]=d;else if(d.sharedFormula){const r=o.formulae[d.sharedFormula];if(!r)throw new Error("Shared Formula master must exist above and or left of clone for cell "+d.address);r.si===void 0?(r.shareType="shared",r.si=o.siFormulae++,r.range=new s(r.address,d.address)):r.range&&r.range.expandToAddress(d.address),d.si=r.si}}}renderFormula(d,o){let c=null;switch(o.shareType){case"shared":c={t:"shared",ref:o.ref||o.range.range,si:o.si};break;case"array":c={t:"array",ref:o.ref};break;default:o.si!==void 0&&(c={t:"shared",si:o.si})}switch(a(o.result)){case l.ValueType.Null:d.leafNode("f",c,o.formula);break;case l.ValueType.String:d.addAttribute("t","str"),d.leafNode("f",c,o.formula),d.leafNode("v",null,o.result);break;case l.ValueType.Number:d.leafNode("f",c,o.formula),d.leafNode("v",null,o.result);break;case l.ValueType.Boolean:d.addAttribute("t","b"),d.leafNode("f",c,o.formula),d.leafNode("v",null,o.result?1:0);break;case l.ValueType.Error:d.addAttribute("t","e"),d.leafNode("f",c,o.formula),d.leafNode("v",null,o.result.error);break;case l.ValueType.Date:d.leafNode("f",c,o.formula),d.leafNode("v",null,e.dateToExcel(o.result,o.date1904));break;default:throw new Error("I could not understand type of value")}}render(d,o){if(o.type!==l.ValueType.Null||o.styleId){switch(d.openNode("c"),d.addAttribute("r",o.address),o.styleId&&d.addAttribute("s",o.styleId),o.type){case l.ValueType.Null:break;case l.ValueType.Number:d.leafNode("v",null,o.value);break;case l.ValueType.Boolean:d.addAttribute("t","b"),d.leafNode("v",null,o.value?"1":"0");break;case l.ValueType.Error:d.addAttribute("t","e"),d.leafNode("v",null,o.value.error);break;case l.ValueType.String:case l.ValueType.RichText:o.ssId!==void 0?(d.addAttribute("t","s"),d.leafNode("v",null,o.ssId)):o.value&&o.value.richText?(d.addAttribute("t","inlineStr"),d.openNode("is"),o.value.richText.forEach(c=>{this.richTextXForm.render(d,c)}),d.closeNode("is")):(d.addAttribute("t","str"),d.leafNode("v",null,o.value));break;case l.ValueType.Date:d.leafNode("v",null,e.dateToExcel(o.value,o.date1904));break;case l.ValueType.Hyperlink:o.ssId!==void 0?(d.addAttribute("t","s"),d.leafNode("v",null,o.ssId)):(d.addAttribute("t","str"),d.leafNode("v",null,o.text));break;case l.ValueType.Formula:this.renderFormula(d,o);break;case l.ValueType.Merge:}d.closeNode()}}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"c":return this.model={address:d.attributes.r},this.t=d.attributes.t,d.attributes.s&&(this.model.styleId=parseInt(d.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=d.attributes.si,this.model.shareType=d.attributes.t,this.model.ref=d.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){if(this.parser)this.parser.parseText(d);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+d:d;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+d:d:this.model.value=this.model.value?this.model.value+d:d}}parseClose(d){switch(d){case"c":{const{model:o}=this;if(o.formula||o.shareType)o.type=l.ValueType.Formula,o.value&&(this.t==="str"?o.result=e.xmlDecode(o.value):this.t==="b"?o.result=parseInt(o.value,10)!==0:this.t==="e"?o.result={error:o.value}:o.result=parseFloat(o.value),o.value=void 0);else if(o.value!==void 0)switch(this.t){case"s":o.type=l.ValueType.String,o.value=parseInt(o.value,10);break;case"str":o.type=l.ValueType.String,o.value=e.xmlDecode(o.value);break;case"inlineStr":o.type=l.ValueType.String;break;case"b":o.type=l.ValueType.Boolean,o.value=parseInt(o.value,10)!==0;break;case"e":o.type=l.ValueType.Error,o.value={error:o.value};break;default:o.type=l.ValueType.Number,o.value=parseFloat(o.value)}else o.styleId?o.type=l.ValueType.Null:o.type=l.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(d),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(d),!0)}}reconcile(d,o){const c=d.styleId&&o.styles&&o.styles.getStyleModel(d.styleId);switch(c&&(d.style=c),d.styleId!==void 0&&(d.styleId=void 0),d.type){case l.ValueType.String:typeof d.value=="number"&&o.sharedStrings&&(d.value=o.sharedStrings.getString(d.value)),d.value.richText&&(d.type=l.ValueType.RichText);break;case l.ValueType.Number:c&&e.isDateFmt(c.numFmt)&&(d.type=l.ValueType.Date,d.value=e.excelToDate(d.value,o.date1904));break;case l.ValueType.Formula:d.result!==void 0&&c&&e.isDateFmt(c.numFmt)&&(d.result=e.excelToDate(d.result,o.date1904)),d.shareType==="shared"&&(d.ref?o.formulae[d.si]=d.address:(d.sharedFormula=o.formulae[d.si],delete d.shareType),delete d.si)}const r=o.hyperlinkMap[d.address];r&&(d.type===l.ValueType.Formula?(d.text=d.result,d.result=void 0):(d.text=d.value,d.value=void 0),d.type=l.ValueType.Hyperlink,d.hyperlink=r);const h=o.commentsMap&&o.commentsMap[d.address];h&&(d.comment=h)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{get tag(){return"x14:cfIcon"}render(A,s){A.leafNode(this.tag,{iconSet:s.iconSet,iconId:s.iconId})}parseOpen(A){let{attributes:s}=A;this.model={iconSet:s.iconSet,iconId:e.toIntValue(s.iconId)}}parseClose(A){return A!==this.tag}}},{"../../base-xform":32}],75:[function(g,C,i){const{v4:e}=g("uuid"),A=g("../../base-xform"),s=g("../../composite-xform"),l=g("./databar-ext-xform"),n=g("./icon-set-ext-xform"),a={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class d extends s{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new l,"x14:iconSet":this.iconSetXform=new n}}get tag(){return"x14:cfRule"}static isExt(c){return c.type==="dataBar"?l.isExt(c):!(c.type!=="iconSet"||!c.custom&&!a[c.iconSet])}prepare(c){d.isExt(c)&&(c.x14Id=`{${e()}}`.toUpperCase())}render(c,r){if(d.isExt(r))switch(r.type){case"dataBar":this.renderDataBar(c,r);break;case"iconSet":this.renderIconSet(c,r)}}renderDataBar(c,r){c.openNode(this.tag,{type:"dataBar",id:r.x14Id}),this.databarXform.render(c,r),c.closeNode()}renderIconSet(c,r){c.openNode(this.tag,{type:"iconSet",priority:r.priority,id:r.x14Id||`{${e()}}`}),this.iconSetXform.render(c,r),c.closeNode()}createNewModel(c){let{attributes:r}=c;return{type:r.type,x14Id:r.id,priority:A.toIntValue(r.priority)}}onParserClose(c,r){Object.assign(this.model,r.model)}}C.exports=d},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(g,C,i){const e=g("../../composite-xform"),A=g("./f-ext-xform");C.exports=class extends e{constructor(){super(),this.map={"xm:f":this.fExtXform=new A}}get tag(){return"x14:cfvo"}render(s,l){s.openNode(this.tag,{type:l.type}),l.value!==void 0&&this.fExtXform.render(s,l.value),s.closeNode()}createNewModel(s){return{type:s.attributes.type}}onParserClose(s,l){switch(s){case"xm:f":this.model.value=l.model?parseFloat(l.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(g,C,i){const e=g("../../composite-xform"),A=g("./sqref-ext-xform"),s=g("./cf-rule-ext-xform");C.exports=class extends e{constructor(){super(),this.map={"xm:sqref":this.sqRef=new A,"x14:cfRule":this.cfRule=new s}}get tag(){return"x14:conditionalFormatting"}prepare(l,n){l.rules.forEach(a=>{this.cfRule.prepare(a,n)})}render(l,n){n.rules.some(s.isExt)&&(l.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),n.rules.filter(s.isExt).forEach(a=>this.cfRule.render(l,a)),this.sqRef.render(l,n.ref),l.closeNode())}createNewModel(){return{rules:[]}}onParserClose(l,n){switch(l){case"xm:sqref":this.model.ref=n.model;break;case"x14:cfRule":this.model.rules.push(n.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(g,C,i){const e=g("../../composite-xform"),A=g("./cf-rule-ext-xform"),s=g("./conditional-formatting-ext-xform");C.exports=class extends e{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new s}}get tag(){return"x14:conditionalFormattings"}hasContent(l){return l.hasExtContent===void 0&&(l.hasExtContent=l.some(n=>n.rules.some(A.isExt))),l.hasExtContent}prepare(l,n){l.forEach(a=>{this.cfXform.prepare(a,n)})}render(l,n){this.hasContent(n)&&(l.openNode(this.tag),n.forEach(a=>this.cfXform.render(l,a)),l.closeNode())}createNewModel(){return[]}onParserClose(l,n){this.model.push(n.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(g,C,i){const e=g("../../base-xform"),A=g("../../composite-xform"),s=g("../../style/color-xform"),l=g("./cfvo-ext-xform");C.exports=class extends A{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new l,"x14:borderColor":this.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new s("x14:axisColor")}}static isExt(n){return!n.gradient}get tag(){return"x14:dataBar"}render(n,a){n.openNode(this.tag,{minLength:e.toIntAttribute(a.minLength,0,!0),maxLength:e.toIntAttribute(a.maxLength,100,!0),border:e.toBoolAttribute(a.border,!1),gradient:e.toBoolAttribute(a.gradient,!0),negativeBarColorSameAsPositive:e.toBoolAttribute(a.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:e.toBoolAttribute(a.negativeBarBorderColorSameAsPositive,!0),axisPosition:e.toAttribute(a.axisPosition,"auto"),direction:e.toAttribute(a.direction,"leftToRight")}),a.cfvo.forEach(d=>{this.cfvoXform.render(n,d)}),this.borderColorXform.render(n,a.borderColor),this.negativeBorderColorXform.render(n,a.negativeBorderColor),this.negativeFillColorXform.render(n,a.negativeFillColor),this.axisColorXform.render(n,a.axisColor),n.closeNode()}createNewModel(n){let{attributes:a}=n;return{cfvo:[],minLength:e.toIntValue(a.minLength,0),maxLength:e.toIntValue(a.maxLength,100),border:e.toBoolValue(a.border,!1),gradient:e.toBoolValue(a.gradient,!0),negativeBarColorSameAsPositive:e.toBoolValue(a.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:e.toBoolValue(a.negativeBarBorderColorSameAsPositive,!0),axisPosition:e.toStringValue(a.axisPosition,"auto"),direction:e.toStringValue(a.direction,"leftToRight")}}onParserClose(n,a){const[,d]=n.split(":");switch(d){case"cfvo":this.model.cfvo.push(a.model);break;default:this.model[d]=a.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{get tag(){return"xm:f"}render(A,s){A.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(A){this.model+=A}parseClose(A){return A!==this.tag}}},{"../../base-xform":32}],81:[function(g,C,i){const e=g("../../base-xform"),A=g("../../composite-xform"),s=g("./cfvo-ext-xform"),l=g("./cf-icon-ext-xform");C.exports=class extends A{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:cfIcon":this.cfIconXform=new l}}get tag(){return"x14:iconSet"}render(n,a){n.openNode(this.tag,{iconSet:e.toStringAttribute(a.iconSet),reverse:e.toBoolAttribute(a.reverse,!1),showValue:e.toBoolAttribute(a.showValue,!0),custom:e.toBoolAttribute(a.icons,!1)}),a.cfvo.forEach(d=>{this.cfvoXform.render(n,d)}),a.icons&&a.icons.forEach((d,o)=>{d.iconId=o,this.cfIconXform.render(n,d)}),n.closeNode()}createNewModel(n){let{attributes:a}=n;return{cfvo:[],iconSet:e.toStringValue(a.iconSet,"3TrafficLights"),reverse:e.toBoolValue(a.reverse,!1),showValue:e.toBoolValue(a.showValue,!0)}}onParserClose(n,a){const[,d]=n.split(":");switch(d){case"cfvo":this.model.cfvo.push(a.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(a.model);break;default:this.model[d]=a.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{get tag(){return"xm:sqref"}render(A,s){A.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(A){this.model+=A}parseClose(A){return A!==this.tag}}},{"../../base-xform":32}],83:[function(g,C,i){const e=g("../../base-xform"),A=g("../../composite-xform"),s=g("../../../../doc/range"),l=g("./databar-xform"),n=g("./ext-lst-ref-xform"),a=g("./formula-xform"),d=g("./color-scale-xform"),o=g("./icon-set-xform"),c={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},r=b=>{const{type:u,operator:m}=b;switch(u){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:u};default:return{type:u,operator:m}}};class h extends A{constructor(){super(),this.map={dataBar:this.databarXform=new l,extLst:this.extLstRefXform=new n,formula:this.formulaXform=new a,colorScale:this.colorScaleXform=new d,iconSet:this.iconSetXform=new o}}get tag(){return"cfRule"}static isPrimitive(u){return u.type!=="iconSet"||!u.custom&&!c[u.iconSet]}render(u,m){switch(m.type){case"expression":this.renderExpression(u,m);break;case"cellIs":this.renderCellIs(u,m);break;case"top10":this.renderTop10(u,m);break;case"aboveAverage":this.renderAboveAverage(u,m);break;case"dataBar":this.renderDataBar(u,m);break;case"colorScale":this.renderColorScale(u,m);break;case"iconSet":this.renderIconSet(u,m);break;case"containsText":this.renderText(u,m);break;case"timePeriod":this.renderTimePeriod(u,m)}}renderExpression(u,m){u.openNode(this.tag,{type:"expression",dxfId:m.dxfId,priority:m.priority}),this.formulaXform.render(u,m.formulae[0]),u.closeNode()}renderCellIs(u,m){u.openNode(this.tag,{type:"cellIs",dxfId:m.dxfId,priority:m.priority,operator:m.operator}),m.formulae.forEach(Z=>{this.formulaXform.render(u,Z)}),u.closeNode()}renderTop10(u,m){u.leafNode(this.tag,{type:"top10",dxfId:m.dxfId,priority:m.priority,percent:e.toBoolAttribute(m.percent,!1),bottom:e.toBoolAttribute(m.bottom,!1),rank:e.toIntValue(m.rank,10,!0)})}renderAboveAverage(u,m){u.leafNode(this.tag,{type:"aboveAverage",dxfId:m.dxfId,priority:m.priority,aboveAverage:e.toBoolAttribute(m.aboveAverage,!0)})}renderDataBar(u,m){u.openNode(this.tag,{type:"dataBar",priority:m.priority}),this.databarXform.render(u,m),this.extLstRefXform.render(u,m),u.closeNode()}renderColorScale(u,m){u.openNode(this.tag,{type:"colorScale",priority:m.priority}),this.colorScaleXform.render(u,m),u.closeNode()}renderIconSet(u,m){h.isPrimitive(m)&&(u.openNode(this.tag,{type:"iconSet",priority:m.priority}),this.iconSetXform.render(u,m),u.closeNode())}renderText(u,m){u.openNode(this.tag,{type:m.operator,dxfId:m.dxfId,priority:m.priority,operator:e.toStringAttribute(m.operator,"containsText")});const Z=(p=>{if(p.formulae&&p.formulae[0])return p.formulae[0];const Y=new s(p.ref),{tl:R}=Y;switch(p.operator){case"containsText":return`NOT(ISERROR(SEARCH("${p.text}",${R})))`;case"containsBlanks":return`LEN(TRIM(${R}))=0`;case"notContainsBlanks":return`LEN(TRIM(${R}))>0`;case"containsErrors":return`ISERROR(${R})`;case"notContainsErrors":return`NOT(ISERROR(${R}))`;default:return}})(m);Z&&this.formulaXform.render(u,Z),u.closeNode()}renderTimePeriod(u,m){u.openNode(this.tag,{type:"timePeriod",dxfId:m.dxfId,priority:m.priority,timePeriod:m.timePeriod});const Z=(p=>{if(p.formulae&&p.formulae[0])return p.formulae[0];const Y=new s(p.ref),{tl:R}=Y;switch(p.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${R},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${R},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${R},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${R},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${R},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${R},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${R},1)=TODAY()-1`;case"today":return`FLOOR(${R},1)=TODAY()`;case"tomorrow":return`FLOOR(${R},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${R},1)<=6,FLOOR(${R},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${R})=MONTH(EDATE(TODAY(),0-1)),YEAR(${R})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${R})=MONTH(TODAY()),YEAR(${R})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${R})=MONTH(EDATE(TODAY(),0+1)),YEAR(${R})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(m);Z&&this.formulaXform.render(u,Z),u.closeNode()}createNewModel(u){let{attributes:m}=u;return{...r(m),dxfId:e.toIntValue(m.dxfId),priority:e.toIntValue(m.priority),timePeriod:m.timePeriod,percent:e.toBoolValue(m.percent),bottom:e.toBoolValue(m.bottom),rank:e.toIntValue(m.rank),aboveAverage:e.toBoolValue(m.aboveAverage)}}onParserClose(u,m){switch(u){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,m.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(m.model)}}}C.exports=h},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{get tag(){return"cfvo"}render(A,s){A.leafNode(this.tag,{type:s.type,val:s.value})}parseOpen(A){this.model={type:A.attributes.type,value:e.toFloatValue(A.attributes.val)}}parseClose(A){return A!==this.tag}}},{"../../base-xform":32}],85:[function(g,C,i){const e=g("../../composite-xform"),A=g("../../style/color-xform"),s=g("./cfvo-xform");C.exports=class extends e{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new A}}get tag(){return"colorScale"}render(l,n){l.openNode(this.tag),n.cfvo.forEach(a=>{this.cfvoXform.render(l,a)}),n.color.forEach(a=>{this.colorXform.render(l,a)}),l.closeNode()}createNewModel(l){return{cfvo:[],color:[]}}onParserClose(l,n){this.model[l].push(n.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(g,C,i){const e=g("../../composite-xform"),A=g("./cf-rule-xform");C.exports=class extends e{constructor(){super(),this.map={cfRule:new A}}get tag(){return"conditionalFormatting"}render(s,l){l.rules.some(A.isPrimitive)&&(s.openNode(this.tag,{sqref:l.ref}),l.rules.forEach(n=>{A.isPrimitive(n)&&(n.ref=l.ref,this.map.cfRule.render(s,n))}),s.closeNode())}createNewModel(s){let{attributes:l}=s;return{ref:l.sqref,rules:[]}}onParserClose(s,l){this.model.rules.push(l.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(g,C,i){const e=g("../../base-xform"),A=g("./conditional-formatting-xform");C.exports=class extends e{constructor(){super(),this.cfXform=new A}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(s,l){let n=s.reduce((a,d)=>Math.max(a,...d.rules.map(o=>o.priority||0)),1);s.forEach(a=>{a.rules.forEach(d=>{d.priority||(d.priority=n++),d.style&&(d.dxfId=l.styles.addDxfStyle(d.style))})})}render(s,l){l.forEach(n=>{this.cfXform.render(s,n)})}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(s),!0;default:return!1}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return!!this.parser&&(!!this.parser.parseClose(s)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(s,l){s.forEach(n=>{n.rules.forEach(a=>{a.dxfId!==void 0&&(a.style=l.styles.getDxfStyle(a.dxfId),delete a.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(g,C,i){const e=g("../../composite-xform"),A=g("../../style/color-xform"),s=g("./cfvo-xform");C.exports=class extends e{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new A}}get tag(){return"dataBar"}render(l,n){l.openNode(this.tag),n.cfvo.forEach(a=>{this.cfvoXform.render(l,a)}),this.colorXform.render(l,n.color),l.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(l,n){switch(l){case"cfvo":this.model.cfvo.push(n.model);break;case"color":this.model.color=n.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(g,C,i){const e=g("../../base-xform"),A=g("../../composite-xform");class s extends e{get tag(){return"x14:id"}render(a,d){a.leafNode(this.tag,null,d)}parseOpen(){this.model=""}parseText(a){this.model+=a}parseClose(a){return a!==this.tag}}class l extends A{constructor(){super(),this.map={"x14:id":this.idXform=new s}}get tag(){return"ext"}render(a,d){a.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(a,d.x14Id),a.closeNode()}createNewModel(){return{}}onParserClose(a,d){this.model.x14Id=d.model}}C.exports=class extends A{constructor(){super(),this.map={ext:new l}}get tag(){return"extLst"}render(n,a){n.openNode(this.tag),this.map.ext.render(n,a),n.closeNode()}createNewModel(){return{}}onParserClose(n,a){Object.assign(this.model,a.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(g,C,i){const e=g("../../base-xform");C.exports=class extends e{get tag(){return"formula"}render(A,s){A.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(A){this.model+=A}parseClose(A){return A!==this.tag}}},{"../../base-xform":32}],91:[function(g,C,i){const e=g("../../base-xform"),A=g("../../composite-xform"),s=g("./cfvo-xform");C.exports=class extends A{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return"iconSet"}render(l,n){l.openNode(this.tag,{iconSet:e.toStringAttribute(n.iconSet,"3TrafficLights"),reverse:e.toBoolAttribute(n.reverse,!1),showValue:e.toBoolAttribute(n.showValue,!0)}),n.cfvo.forEach(a=>{this.cfvoXform.render(l,a)}),l.closeNode()}createNewModel(l){let{attributes:n}=l;return{iconSet:e.toStringValue(n.iconSet,"3TrafficLights"),reverse:e.toBoolValue(n.reverse),showValue:e.toBoolValue(n.showValue),cfvo:[]}}onParserClose(l,n){this.model[l].push(n.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(g,C,i){const e=g("../../../utils/utils"),A=g("../base-xform");C.exports=class extends A{get tag(){return"col"}prepare(s,l){const n=l.styles.addStyleModel(s.style||{});n&&(s.styleId=n)}render(s,l){s.openNode("col"),s.addAttribute("min",l.min),s.addAttribute("max",l.max),l.width&&s.addAttribute("width",l.width),l.styleId&&s.addAttribute("style",l.styleId),l.hidden&&s.addAttribute("hidden","1"),l.bestFit&&s.addAttribute("bestFit","1"),l.outlineLevel&&s.addAttribute("outlineLevel",l.outlineLevel),l.collapsed&&s.addAttribute("collapsed","1"),s.addAttribute("customWidth","1"),s.closeNode()}parseOpen(s){if(s.name==="col"){const l=this.model={min:parseInt(s.attributes.min||"0",10),max:parseInt(s.attributes.max||"0",10),width:s.attributes.width===void 0?void 0:parseFloat(s.attributes.width||"0")};return s.attributes.style&&(l.styleId=parseInt(s.attributes.style,10)),e.parseBoolean(s.attributes.hidden)&&(l.hidden=!0),e.parseBoolean(s.attributes.bestFit)&&(l.bestFit=!0),s.attributes.outlineLevel&&(l.outlineLevel=parseInt(s.attributes.outlineLevel,10)),e.parseBoolean(s.attributes.collapsed)&&(l.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(s,l){s.styleId&&(s.style=l.styles.getStyleModel(s.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../../../utils/utils"),s=g("../../../utils/col-cache"),l=g("../base-xform"),n=g("../../../doc/range");function a(o,c,r,h){const b=c[r];b!==void 0?o[r]=b:h!==void 0&&(o[r]=h)}function d(o,c,r,h){const b=c[r];b!==void 0&&(o[r]=A.parseBoolean(b))}C.exports=class extends l{get tag(){return"dataValidations"}render(o,c){const r=function(h){const b=e.map(h,(Z,p)=>({address:p,dataValidation:Z,marked:!1})).sort((Z,p)=>e.strcmp(Z.address,p.address)),u=e.keyBy(b,"address"),m=(Z,p,Y)=>{for(let R=0;R<p;R++){const X=s.encodeAddress(Z.row+R,Y);if(!h[X]||!e.isEqual(h[Z.address],h[X]))return!1}return!0};return b.map(Z=>{if(!Z.marked){const p=s.decodeEx(Z.address);if(p.dimensions)return u[p.dimensions].marked=!0,{...Z.dataValidation,sqref:Z.address};let Y=1,R=s.encodeAddress(p.row+Y,p.col);for(;h[R]&&e.isEqual(Z.dataValidation,h[R]);)Y++,R=s.encodeAddress(p.row+Y,p.col);let X=1;for(;m(p,Y,p.col+X);)X++;for(let H=0;H<Y;H++)for(let S=0;S<X;S++)R=s.encodeAddress(p.row+H,p.col+S),u[R].marked=!0;if(Y>1||X>1){const H=p.row+(Y-1),S=p.col+(X-1);return{...Z.dataValidation,sqref:`${Z.address}:${s.encodeAddress(H,S)}`}}return{...Z.dataValidation,sqref:Z.address}}return null}).filter(Boolean)}(c);r.length&&(o.openNode("dataValidations",{count:r.length}),r.forEach(h=>{o.openNode("dataValidation"),h.type!=="any"&&(o.addAttribute("type",h.type),h.operator&&h.type!=="list"&&h.operator!=="between"&&o.addAttribute("operator",h.operator),h.allowBlank&&o.addAttribute("allowBlank","1")),h.showInputMessage&&o.addAttribute("showInputMessage","1"),h.promptTitle&&o.addAttribute("promptTitle",h.promptTitle),h.prompt&&o.addAttribute("prompt",h.prompt),h.showErrorMessage&&o.addAttribute("showErrorMessage","1"),h.errorStyle&&o.addAttribute("errorStyle",h.errorStyle),h.errorTitle&&o.addAttribute("errorTitle",h.errorTitle),h.error&&o.addAttribute("error",h.error),o.addAttribute("sqref",h.sqref),(h.formulae||[]).forEach((b,u)=>{o.openNode("formula"+(u+1)),h.type==="date"?o.writeText(A.dateToExcel(new Date(b))):o.writeText(b),o.closeNode()}),o.closeNode()}),o.closeNode())}parseOpen(o){switch(o.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=o.attributes.sqref;const c={type:o.attributes.type||"any",formulae:[]};switch(o.attributes.type&&d(c,o.attributes,"allowBlank"),d(c,o.attributes,"showInputMessage"),d(c,o.attributes,"showErrorMessage"),c.type){case"any":case"list":case"custom":break;default:a(c,o.attributes,"operator","between")}return a(c,o.attributes,"promptTitle"),a(c,o.attributes,"prompt"),a(c,o.attributes,"errorStyle"),a(c,o.attributes,"errorTitle"),a(c,o.attributes,"error"),this._dataValidation=c,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(o){this._formula&&this._formula.push(o)}parseClose(o){switch(o){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(c=>{c.includes(":")?new n(c).forEachAddress(r=>{this.model[r]=this._dataValidation}):this.model[c]=this._dataValidation}),!0;case"formula1":case"formula2":{let c=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":c=parseInt(c,10);break;case"decimal":c=parseFloat(c);break;case"date":c=A.excelToDate(parseFloat(c))}return this._dataValidation.formulae.push(c),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"dimension"}render(A,s){s&&A.leafNode("dimension",{ref:s})}parseOpen(A){return A.name==="dimension"&&(this.model=A.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"drawing"}render(A,s){s&&A.leafNode(this.tag,{"r:id":s.rId})}parseOpen(A){switch(A.name){case this.tag:return this.model={rId:A.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(g,C,i){const e=g("../composite-xform"),A=g("./cf-ext/conditional-formattings-ext-xform");class s extends e{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new A}}get tag(){return"ext"}hasContent(n){return this.conditionalFormattings.hasContent(n.conditionalFormattings)}prepare(n,a){this.conditionalFormattings.prepare(n.conditionalFormattings,a)}render(n,a){n.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(n,a.conditionalFormattings),n.closeNode()}createNewModel(){return{}}onParserClose(n,a){this.model[n]=a.model}}C.exports=class extends e{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return"extLst"}prepare(l,n){this.ext.prepare(l,n)}hasContent(l){return this.ext.hasContent(l)}render(l,n){this.hasContent(n)&&(l.openNode("extLst"),this.ext.render(l,n),l.closeNode())}createNewModel(){return{}}onParserClose(l,n){Object.assign(this.model,n.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"headerFooter"}render(A,s){if(s){A.addRollback();let l=!1;A.openNode("headerFooter"),s.differentFirst&&(A.addAttribute("differentFirst","1"),l=!0),s.differentOddEven&&(A.addAttribute("differentOddEven","1"),l=!0),s.oddHeader&&typeof s.oddHeader=="string"&&(A.leafNode("oddHeader",null,s.oddHeader),l=!0),s.oddFooter&&typeof s.oddFooter=="string"&&(A.leafNode("oddFooter",null,s.oddFooter),l=!0),s.evenHeader&&typeof s.evenHeader=="string"&&(A.leafNode("evenHeader",null,s.evenHeader),l=!0),s.evenFooter&&typeof s.evenFooter=="string"&&(A.leafNode("evenFooter",null,s.evenFooter),l=!0),s.firstHeader&&typeof s.firstHeader=="string"&&(A.leafNode("firstHeader",null,s.firstHeader),l=!0),s.firstFooter&&typeof s.firstFooter=="string"&&(A.leafNode("firstFooter",null,s.firstFooter),l=!0),l?(A.closeNode(),A.commit()):A.rollback()}}parseOpen(A){switch(A.name){case"headerFooter":return this.model={},A.attributes.differentFirst&&(this.model.differentFirst=parseInt(A.attributes.differentFirst,0)===1),A.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(A.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(A){switch(this.currentNode){case"oddHeader":this.model.oddHeader=A;break;case"oddFooter":this.model.oddFooter=A;break;case"evenHeader":this.model.evenHeader=A;break;case"evenFooter":this.model.evenFooter=A;break;case"firstHeader":this.model.firstHeader=A;break;case"firstFooter":this.model.firstFooter=A}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"hyperlink"}render(A,s){this.isInternalLink(s)?A.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip,location:s.target}):A.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip})}parseOpen(A){return A.name==="hyperlink"&&(this.model={address:A.attributes.ref,rId:A.attributes["r:id"],tooltip:A.attributes.tooltip},A.attributes.location&&(this.model.target=A.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(A){return A.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(A.target)}}},{"../base-xform":32}],99:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"mergeCell"}render(A,s){A.leafNode("mergeCell",{ref:s})}parseOpen(A){return A.name==="mergeCell"&&(this.model=A.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../../../doc/range"),s=g("../../../utils/col-cache"),l=g("../../../doc/enums");C.exports=class{constructor(){this.merges={}}add(n){if(this.merges[n.master])this.merges[n.master].expandToAddress(n.address);else{const a=`${n.master}:${n.address}`;this.merges[n.master]=new A(a)}}get mergeCells(){return e.map(this.merges,n=>n.range)}reconcile(n,a){e.each(n,d=>{const o=s.decode(d);for(let c=o.top;c<=o.bottom;c++){const r=a[c-1];for(let h=o.left;h<=o.right;h++){const b=r.cells[h-1];b?b.type===l.ValueType.Merge&&(b.master=o.tl):r.cells[h]={type:l.ValueType.Null,address:s.encodeAddress(c,h)}}}})}getMasterAddress(n){const a=this.hash[n];return a&&a.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(g,C,i){const e=g("../base-xform"),A=s=>s!==void 0;C.exports=class extends e{get tag(){return"outlinePr"}render(s,l){return!(!l||!A(l.summaryBelow)&&!A(l.summaryRight))&&(s.leafNode(this.tag,{summaryBelow:A(l.summaryBelow)?Number(l.summaryBelow):void 0,summaryRight:A(l.summaryRight)?Number(l.summaryRight):void 0}),!0)}parseOpen(s){return s.name===this.tag&&(this.model={summaryBelow:A(s.attributes.summaryBelow)?!!Number(s.attributes.summaryBelow):void 0,summaryRight:A(s.attributes.summaryRight)?!!Number(s.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"brk"}render(A,s){A.leafNode("brk",s)}parseOpen(A){return A.name==="brk"&&(this.model=A.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../base-xform");C.exports=class extends A{get tag(){return"pageMargins"}render(s,l){if(l){const n={left:l.left,right:l.right,top:l.top,bottom:l.bottom,header:l.header,footer:l.footer};e.some(n,a=>a!==void 0)&&s.leafNode(this.tag,n)}}parseOpen(s){switch(s.name){case this.tag:return this.model={left:parseFloat(s.attributes.left||.7),right:parseFloat(s.attributes.right||.7),top:parseFloat(s.attributes.top||.75),bottom:parseFloat(s.attributes.bottom||.75),header:parseFloat(s.attributes.header||.3),footer:parseFloat(s.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"pageSetUpPr"}render(A,s){return!(!s||!s.fitToPage)&&(A.leafNode(this.tag,{fitToPage:s.fitToPage?"1":void 0}),!0)}parseOpen(A){return A.name===this.tag&&(this.model={fitToPage:A.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../base-xform");function s(d){return d?"1":void 0}function l(d){switch(d){case"overThenDown":return d;default:return}}function n(d){switch(d){case"atEnd":case"asDisplyed":return d;default:return}}function a(d){switch(d){case"dash":case"blank":case"NA":return d;default:return}}C.exports=class extends A{get tag(){return"pageSetup"}render(d,o){if(o){const c={paperSize:o.paperSize,orientation:o.orientation,horizontalDpi:o.horizontalDpi,verticalDpi:o.verticalDpi,pageOrder:l(o.pageOrder),blackAndWhite:s(o.blackAndWhite),draft:s(o.draft),cellComments:n(o.cellComments),errors:a(o.errors),scale:o.scale,fitToWidth:o.fitToWidth,fitToHeight:o.fitToHeight,firstPageNumber:o.firstPageNumber,useFirstPageNumber:s(o.firstPageNumber),usePrinterDefaults:s(o.usePrinterDefaults),copies:o.copies};e.some(c,r=>r!==void 0)&&d.leafNode(this.tag,c)}}parseOpen(d){switch(d.name){case this.tag:return this.model={paperSize:(o=d.attributes.paperSize,o!==void 0?parseInt(o,10):void 0),orientation:d.attributes.orientation||"portrait",horizontalDpi:parseInt(d.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(d.attributes.verticalDpi||"4294967295",10),pageOrder:d.attributes.pageOrder||"downThenOver",blackAndWhite:d.attributes.blackAndWhite==="1",draft:d.attributes.draft==="1",cellComments:d.attributes.cellComments||"None",errors:d.attributes.errors||"displayed",scale:parseInt(d.attributes.scale||"100",10),fitToWidth:parseInt(d.attributes.fitToWidth||"1",10),fitToHeight:parseInt(d.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(d.attributes.firstPageNumber||"1",10),useFirstPageNumber:d.attributes.useFirstPageNumber==="1",usePrinterDefaults:d.attributes.usePrinterDefaults==="1",copies:parseInt(d.attributes.copies||"1",10)},!0;default:return!1}var o}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"picture"}render(A,s){s&&A.leafNode(this.tag,{"r:id":s.rId})}parseOpen(A){switch(A.name){case this.tag:return this.model={rId:A.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../base-xform");function s(l){return l?"1":void 0}C.exports=class extends A{get tag(){return"printOptions"}render(l,n){if(n){const a={headings:s(n.showRowColHeaders),gridLines:s(n.showGridLines),horizontalCentered:s(n.horizontalCentered),verticalCentered:s(n.verticalCentered)};e.some(a,d=>d!==void 0)&&l.leafNode(this.tag,a)}}parseOpen(l){switch(l.name){case this.tag:return this.model={showRowColHeaders:l.attributes.headings==="1",showGridLines:l.attributes.gridLines==="1",horizontalCentered:l.attributes.horizontalCentered==="1",verticalCentered:l.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(g,C,i){const e=g("./page-breaks-xform"),A=g("../list-xform");C.exports=class extends A{constructor(){super({tag:"rowBreaks",count:!0,childXform:new e})}render(s,l){if(l&&l.length){s.openNode(this.tag,this.$),this.count&&(s.addAttribute(this.$count,l.length),s.addAttribute("manualBreakCount",l.length));const{childXform:n}=this;l.forEach(a=>{n.render(s,a)}),s.closeNode()}else this.empty&&s.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(g,C,i){const e=g("../base-xform"),A=g("../../../utils/utils"),s=g("./cell-xform");C.exports=class extends e{constructor(l){super(),this.maxItems=l&&l.maxItems,this.map={c:new s}}get tag(){return"row"}prepare(l,n){const a=n.styles.addStyleModel(l.style);a&&(l.styleId=a);const d=this.map.c;l.cells.forEach(o=>{d.prepare(o,n)})}render(l,n,a){l.openNode("row"),l.addAttribute("r",n.number),n.height&&(l.addAttribute("ht",n.height),l.addAttribute("customHeight","1")),n.hidden&&l.addAttribute("hidden","1"),n.min>0&&n.max>0&&n.min<=n.max&&l.addAttribute("spans",`${n.min}:${n.max}`),n.styleId&&(l.addAttribute("s",n.styleId),l.addAttribute("customFormat","1")),l.addAttribute("x14ac:dyDescent","0.25"),n.outlineLevel&&l.addAttribute("outlineLevel",n.outlineLevel),n.collapsed&&l.addAttribute("collapsed","1");const d=this.map.c;n.cells.forEach(o=>{d.render(l,o,a)}),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;if(l.name==="row"){this.numRowsSeen+=1;const n=l.attributes.spans?l.attributes.spans.split(":").map(d=>parseInt(d,10)):[void 0,void 0],a=this.model={number:parseInt(l.attributes.r,10),min:n[0],max:n[1],cells:[]};return l.attributes.s&&(a.styleId=parseInt(l.attributes.s,10)),A.parseBoolean(l.attributes.hidden)&&(a.hidden=!0),A.parseBoolean(l.attributes.bestFit)&&(a.bestFit=!0),l.attributes.ht&&(a.height=parseFloat(l.attributes.ht)),l.attributes.outlineLevel&&(a.outlineLevel=parseInt(l.attributes.outlineLevel,10)),A.parseBoolean(l.attributes.collapsed)&&(a.collapsed=!0),!0}return this.parser=this.map[l.name],!!this.parser&&(this.parser.parseOpen(l),!0)}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser){if(!this.parser.parseClose(l)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(l,n){l.style=l.styleId?n.styles.getStyleModel(l.styleId):{},l.styleId!==void 0&&(l.styleId=void 0);const a=this.map.c;l.cells.forEach(d=>{a.reconcile(d,n)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../base-xform");C.exports=class extends A{get tag(){return"sheetFormatPr"}render(s,l){if(l){const n={defaultRowHeight:l.defaultRowHeight,outlineLevelRow:l.outlineLevelRow,outlineLevelCol:l.outlineLevelCol,"x14ac:dyDescent":l.dyDescent};l.defaultColWidth&&(n.defaultColWidth=l.defaultColWidth),l.defaultRowHeight&&l.defaultRowHeight===15||(n.customHeight="1"),e.some(n,a=>a!==void 0)&&s.leafNode("sheetFormatPr",n)}}parseOpen(s){return s.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(s.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(s.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(s.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(s.attributes.outlineLevelCol||"0",10)},s.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(s.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(g,C,i){const e=g("../base-xform"),A=g("../style/color-xform"),s=g("./page-setup-properties-xform"),l=g("./outline-properties-xform");C.exports=class extends e{constructor(){super(),this.map={tabColor:new A("tabColor"),pageSetUpPr:new s,outlinePr:new l}}get tag(){return"sheetPr"}render(n,a){if(a){n.addRollback(),n.openNode("sheetPr");let d=!1;d=this.map.tabColor.render(n,a.tabColor)||d,d=this.map.pageSetUpPr.render(n,a.pageSetup)||d,d=this.map.outlinePr.render(n,a.outlineProperties)||d,d?(n.closeNode(),n.commit()):n.rollback()}}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):n.name===this.tag?(this.reset(),!0):!!this.map[n.name]&&(this.parser=this.map[n.name],this.parser.parseOpen(n),!0)}parseText(n){return!!this.parser&&(this.parser.parseText(n),!0)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../base-xform");function s(n,a){return n?a:void 0}function l(n,a){return n===a||void 0}C.exports=class extends A{get tag(){return"sheetProtection"}render(n,a){if(a){const d={sheet:s(a.sheet,"1"),selectLockedCells:a.selectLockedCells===!1?"1":void 0,selectUnlockedCells:a.selectUnlockedCells===!1?"1":void 0,formatCells:s(a.formatCells,"0"),formatColumns:s(a.formatColumns,"0"),formatRows:s(a.formatRows,"0"),insertColumns:s(a.insertColumns,"0"),insertRows:s(a.insertRows,"0"),insertHyperlinks:s(a.insertHyperlinks,"0"),deleteColumns:s(a.deleteColumns,"0"),deleteRows:s(a.deleteRows,"0"),sort:s(a.sort,"0"),autoFilter:s(a.autoFilter,"0"),pivotTables:s(a.pivotTables,"0")};a.sheet&&(d.algorithmName=a.algorithmName,d.hashValue=a.hashValue,d.saltValue=a.saltValue,d.spinCount=a.spinCount,d.objects=s(a.objects===!1,"1"),d.scenarios=s(a.scenarios===!1,"1")),e.some(d,o=>o!==void 0)&&n.leafNode(this.tag,d)}}parseOpen(n){switch(n.name){case this.tag:return this.model={sheet:l(n.attributes.sheet,"1"),objects:n.attributes.objects!=="1"&&void 0,scenarios:n.attributes.scenarios!=="1"&&void 0,selectLockedCells:n.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:n.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:l(n.attributes.formatCells,"0"),formatColumns:l(n.attributes.formatColumns,"0"),formatRows:l(n.attributes.formatRows,"0"),insertColumns:l(n.attributes.insertColumns,"0"),insertRows:l(n.attributes.insertRows,"0"),insertHyperlinks:l(n.attributes.insertHyperlinks,"0"),deleteColumns:l(n.attributes.deleteColumns,"0"),deleteRows:l(n.attributes.deleteRows,"0"),sort:l(n.attributes.sort,"0"),autoFilter:l(n.attributes.autoFilter,"0"),pivotTables:l(n.attributes.pivotTables,"0")},n.attributes.algorithmName&&(this.model.algorithmName=n.attributes.algorithmName,this.model.hashValue=n.attributes.hashValue,this.model.saltValue=n.attributes.saltValue,this.model.spinCount=parseInt(n.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(g,C,i){const e=g("../../../utils/col-cache"),A=g("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};C.exports=class extends A{get tag(){return"sheetView"}prepare(l){switch(l.state){case"frozen":case"split":break;default:l.state="normal"}}render(l,n){l.openNode("sheetView",{workbookViewId:n.workbookViewId||0});const a=function(h,b,u){u&&l.addAttribute(h,b)};let d,o,c,r;switch(a("rightToLeft","1",n.rightToLeft===!0),a("tabSelected","1",n.tabSelected),a("showRuler","0",n.showRuler===!1),a("showRowColHeaders","0",n.showRowColHeaders===!1),a("showGridLines","0",n.showGridLines===!1),a("zoomScale",n.zoomScale,n.zoomScale),a("zoomScaleNormal",n.zoomScaleNormal,n.zoomScaleNormal),a("view",n.style,n.style),n.state){case"frozen":o=n.xSplit||0,c=n.ySplit||0,d=n.topLeftCell||e.getAddress(c+1,o+1).address,r=(n.xSplit&&n.ySplit?"bottomRight":n.xSplit&&"topRight")||"bottomLeft",l.leafNode("pane",{xSplit:n.xSplit||void 0,ySplit:n.ySplit||void 0,topLeftCell:d,activePane:r,state:"frozen"}),l.leafNode("selection",{pane:r,activeCell:n.activeCell,sqref:n.activeCell});break;case"split":n.activePane==="topLeft"&&(n.activePane=void 0),l.leafNode("pane",{xSplit:n.xSplit||void 0,ySplit:n.ySplit||void 0,topLeftCell:n.topLeftCell,activePane:n.activePane}),l.leafNode("selection",{pane:n.activePane,activeCell:n.activeCell,sqref:n.activeCell});break;case"normal":n.activeCell&&l.leafNode("selection",{activeCell:n.activeCell,sqref:n.activeCell})}l.closeNode()}parseOpen(l){switch(l.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(l.attributes.workbookViewId,10),rightToLeft:l.attributes.rightToLeft==="1",tabSelected:l.attributes.tabSelected==="1",showRuler:l.attributes.showRuler!=="0",showRowColHeaders:l.attributes.showRowColHeaders!=="0",showGridLines:l.attributes.showGridLines!=="0",zoomScale:parseInt(l.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(l.attributes.zoomScaleNormal||"100",10),style:l.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(l.attributes.xSplit||"0",10),ySplit:parseInt(l.attributes.ySplit||"0",10),topLeftCell:l.attributes.topLeftCell,activePane:l.attributes.activePane||"topLeft",state:l.attributes.state},!0;case"selection":{const n=l.attributes.pane||"topLeft";return this.selections[n]={pane:n,activeCell:l.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(l){let n,a;switch(l){case"sheetView":return this.sheetView&&this.pane?(n=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(n.activePane=this.pane.activePane),a=this.selections[this.pane.activePane],a&&a.activeCell&&(n.activeCell=a.activeCell),this.sheetView.style&&(n.style=this.sheetView.style)):(n=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},a=this.selections.topLeft,a&&a.activeCell&&(n.activeCell=a.activeCell),this.sheetView.style&&(n.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"tablePart"}render(A,s){s&&A.leafNode(this.tag,{"r:id":s.rId})}parseOpen(A){switch(A.name){case this.tag:return this.model={rId:A.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../../../utils/col-cache"),s=g("../../../utils/xml-stream"),l=g("../../rel-type"),n=g("./merges"),a=g("../base-xform"),d=g("../list-xform"),o=g("./row-xform"),c=g("./col-xform"),r=g("./dimension-xform"),h=g("./hyperlink-xform"),b=g("./merge-cell-xform"),u=g("./data-validations-xform"),m=g("./sheet-properties-xform"),Z=g("./sheet-format-properties-xform"),p=g("./sheet-view-xform"),Y=g("./sheet-protection-xform"),R=g("./page-margins-xform"),X=g("./page-setup-xform"),H=g("./print-options-xform"),S=g("./auto-filter-xform"),z=g("./picture-xform"),v=g("./drawing-xform"),K=g("./table-part-xform"),V=g("./row-breaks-xform"),N=g("./header-footer-xform"),B=g("./cf/conditional-formattings-xform"),G=g("./ext-lst-xform"),w=(y,f)=>{if(!f||!f.length)return y;if(!y||!y.length)return f;const D={},F={};return y.forEach(T=>{D[T.ref]=T,T.rules.forEach(Q=>{const{x14Id:P}=Q;P&&(F[P]=Q)})}),f.forEach(T=>{T.rules.forEach(Q=>{const P=F[Q.x14Id];P?((L,E)=>{Object.keys(E).forEach(J=>{const k=L[J],j=E[J];k===void 0&&j!==void 0&&(L[J]=j)})})(P,Q):D[T.ref]?D[T.ref].rules.push(Q):y.push({ref:T.ref,rules:[Q]})})}),y};class W extends a{constructor(f){super();const{maxRows:D,maxCols:F,ignoreNodes:T}=f||{};this.ignoreNodes=T||[],this.map={sheetPr:new m,dimension:new r,sheetViews:new d({tag:"sheetViews",count:!1,childXform:new p}),sheetFormatPr:new Z,cols:new d({tag:"cols",count:!1,childXform:new c}),sheetData:new d({tag:"sheetData",count:!1,empty:!0,childXform:new o({maxItems:F}),maxItems:D}),autoFilter:new S,mergeCells:new d({tag:"mergeCells",count:!0,childXform:new b}),rowBreaks:new V,hyperlinks:new d({tag:"hyperlinks",count:!1,childXform:new h}),pageMargins:new R,dataValidations:new u,pageSetup:new X,headerFooter:new N,printOptions:new H,picture:new z,drawing:new v,sheetProtection:new Y,tableParts:new d({tag:"tableParts",count:!0,childXform:new K}),conditionalFormatting:new B,extLst:new G}}prepare(f,D){D.merges=new n,f.hyperlinks=D.hyperlinks=[],f.comments=D.comments=[],D.formulae={},D.siFormulae=0,this.map.cols.prepare(f.cols,D),this.map.sheetData.prepare(f.rows,D),this.map.conditionalFormatting.prepare(f.conditionalFormattings,D),f.mergeCells=D.merges.mergeCells;const F=f.rels=[];function T(L){return"rId"+(L.length+1)}if(f.hyperlinks.forEach(L=>{const E=T(F);L.rId=E,F.push({Id:E,Type:l.Hyperlink,Target:L.target,TargetMode:"External"})}),f.comments.length>0){const L={Id:T(F),Type:l.Comments,Target:`../comments${f.id}.xml`};F.push(L);const E={Id:T(F),Type:l.VmlDrawing,Target:`../drawings/vmlDrawing${f.id}.vml`};F.push(E),f.comments.forEach(J=>{J.refAddress=A.decodeAddress(J.ref)}),D.commentRefs.push({commentName:"comments"+f.id,vmlDrawing:"vmlDrawing"+f.id})}const Q=[];let P;f.media.forEach(L=>{if(L.type==="background"){const E=T(F);P=D.media[L.imageId],F.push({Id:E,Type:l.Image,Target:`../media/${P.name}.${P.extension}`}),f.background={rId:E},f.image=D.media[L.imageId]}else if(L.type==="image"){let{drawing:E}=f;P=D.media[L.imageId],E||(E=f.drawing={rId:T(F),name:"drawing"+ ++D.drawingsCount,anchors:[],rels:[]},D.drawings.push(E),F.push({Id:E.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${E.name}.xml`}));let J=this.preImageId===L.imageId?Q[L.imageId]:Q[E.rels.length];J||(J=T(E.rels),Q[E.rels.length]=J,E.rels.push({Id:J,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${P.name}.${P.extension}`}));const k={picture:{rId:J},range:L.range};if(L.hyperlinks&&L.hyperlinks.hyperlink){const j=T(E.rels);Q[E.rels.length]=j,k.picture.hyperlinks={tooltip:L.hyperlinks.tooltip,rId:j},E.rels.push({Id:j,Type:l.Hyperlink,Target:L.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=L.imageId,E.anchors.push(k)}}),f.tables.forEach(L=>{const E=T(F);L.rId=E,F.push({Id:E,Type:l.Table,Target:"../tables/"+L.target}),L.columns.forEach(J=>{const{style:k}=J;k&&(J.dxfId=D.styles.addDxfStyle(k))})}),this.map.extLst.prepare(f,D)}render(f,D){f.openXml(s.StdDocAttributes),f.openNode("worksheet",W.WORKSHEET_ATTRIBUTES);const F=D.properties?{defaultRowHeight:D.properties.defaultRowHeight,dyDescent:D.properties.dyDescent,outlineLevelCol:D.properties.outlineLevelCol,outlineLevelRow:D.properties.outlineLevelRow}:void 0;D.properties&&D.properties.defaultColWidth&&(F.defaultColWidth=D.properties.defaultColWidth);const T={outlineProperties:D.properties&&D.properties.outlineProperties,tabColor:D.properties&&D.properties.tabColor,pageSetup:D.pageSetup&&D.pageSetup.fitToPage?{fitToPage:D.pageSetup.fitToPage}:void 0},Q=D.pageSetup&&D.pageSetup.margins,P={showRowColHeaders:D.pageSetup&&D.pageSetup.showRowColHeaders,showGridLines:D.pageSetup&&D.pageSetup.showGridLines,horizontalCentered:D.pageSetup&&D.pageSetup.horizontalCentered,verticalCentered:D.pageSetup&&D.pageSetup.verticalCentered},L=D.sheetProtection;this.map.sheetPr.render(f,T),this.map.dimension.render(f,D.dimensions),this.map.sheetViews.render(f,D.views),this.map.sheetFormatPr.render(f,F),this.map.cols.render(f,D.cols),this.map.sheetData.render(f,D.rows),this.map.sheetProtection.render(f,L),this.map.autoFilter.render(f,D.autoFilter),this.map.mergeCells.render(f,D.mergeCells),this.map.conditionalFormatting.render(f,D.conditionalFormattings),this.map.dataValidations.render(f,D.dataValidations),this.map.hyperlinks.render(f,D.hyperlinks),this.map.printOptions.render(f,P),this.map.pageMargins.render(f,Q),this.map.pageSetup.render(f,D.pageSetup),this.map.headerFooter.render(f,D.headerFooter),this.map.rowBreaks.render(f,D.rowBreaks),this.map.drawing.render(f,D.drawing),this.map.picture.render(f,D.background),this.map.tableParts.render(f,D.tables),this.map.extLst.render(f,D),D.rels&&D.rels.forEach(E=>{E.Type===l.VmlDrawing&&f.leafNode("legacyDrawing",{"r:id":E.Id})}),f.closeNode()}parseOpen(f){return this.parser?(this.parser.parseOpen(f),!0):f.name==="worksheet"?(e.each(this.map,D=>{D.reset()}),!0):(this.map[f.name]&&!this.ignoreNodes.includes(f.name)&&(this.parser=this.map[f.name],this.parser.parseOpen(f)),!0)}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case"worksheet":{const D=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(D.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(D.outlineProperties=this.map.sheetPr.model.outlineProperties);const F={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},T=Object.assign(F,this.map.pageSetup.model,this.map.printOptions.model),Q=w(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:D,views:this.map.sheetViews.model,pageSetup:T,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:Q},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(f,D){const F=(f.relationships||[]).reduce((Q,P)=>{if(Q[P.Id]=P,P.Type===l.Comments&&(f.comments=D.comments[P.Target].comments),P.Type===l.VmlDrawing&&f.comments&&f.comments.length){const L=D.vmlDrawings[P.Target].comments;f.comments.forEach((E,J)=>{E.note=Object.assign({},E.note,L[J])})}return Q},{});if(D.commentsMap=(f.comments||[]).reduce((Q,P)=>(P.ref&&(Q[P.ref]=P),Q),{}),D.hyperlinkMap=(f.hyperlinks||[]).reduce((Q,P)=>(P.rId&&(Q[P.address]=F[P.rId].Target),Q),{}),D.formulae={},f.rows=f.rows&&f.rows.filter(Boolean)||[],f.rows.forEach(Q=>{Q.cells=Q.cells&&Q.cells.filter(Boolean)||[]}),this.map.cols.reconcile(f.cols,D),this.map.sheetData.reconcile(f.rows,D),this.map.conditionalFormatting.reconcile(f.conditionalFormattings,D),f.media=[],f.drawing){const Q=F[f.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(Q){const P=Q[1];D.drawings[P].anchors.forEach(L=>{if(L.medium){const E={type:"image",imageId:L.medium.index,range:L.range,hyperlinks:L.picture.hyperlinks};f.media.push(E)}})}}const T=f.background&&F[f.background.rId];if(T){const Q=T.Target.split("/media/")[1],P=D.mediaIndex&&D.mediaIndex[Q];P!==void 0&&f.media.push({type:"background",imageId:P})}f.tables=(f.tables||[]).map(Q=>{const P=F[Q.rId];return D.tables[P.Target]}),delete f.relationships,delete f.hyperlinks,delete f.comments}}W.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},C.exports=W},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{constructor(A){super(),this.tag=A.tag,this.attr=A.attr}render(A,s){s&&(A.openNode(this.tag),A.closeNode())}parseOpen(A){A.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{constructor(A){super(),this.tag=A.tag,this.attr=A.attr,this.attrs=A.attrs,this._format=A.format||function(s){try{return Number.isNaN(s.getTime())?"":s.toISOString()}catch{return""}},this._parse=A.parse||function(s){return new Date(s)}}render(A,s){s&&(A.openNode(this.tag),this.attrs&&A.addAttributes(this.attrs),this.attr?A.addAttribute(this.attr,this._format(s)):A.writeText(this._format(s)),A.closeNode())}parseOpen(A){A.name===this.tag&&(this.attr?this.model=this._parse(A.attributes[this.attr]):this.text=[])}parseText(A){this.attr||this.text.push(A)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{constructor(A){super(),this.tag=A.tag,this.attr=A.attr,this.attrs=A.attrs,this.zero=A.zero}render(A,s){(s||this.zero)&&(A.openNode(this.tag),this.attrs&&A.addAttributes(this.attrs),this.attr?A.addAttribute(this.attr,s):A.writeText(s),A.closeNode())}parseOpen(A){return A.name===this.tag&&(this.attr?this.model=parseInt(A.attributes[this.attr],10):this.text=[],!0)}parseText(A){this.attr||this.text.push(A)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{constructor(A){super(),this.tag=A.tag,this.attr=A.attr,this.attrs=A.attrs}render(A,s){s!==void 0&&(A.openNode(this.tag),this.attrs&&A.addAttributes(this.attrs),this.attr?A.addAttribute(this.attr,s):A.writeText(s),A.closeNode())}parseOpen(A){A.name===this.tag&&(this.attr?this.model=A.attributes[this.attr]:this.text=[])}parseText(A){this.attr||this.text.push(A)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(g,C,i){const e=g("./base-xform"),A=g("../../utils/xml-stream");C.exports=class extends e{constructor(s){super(),this._model=s}render(s){if(!this._xml){const l=new A;(function n(a,d){a.openNode(d.tag,d.$),d.c&&d.c.forEach(o=>{n(a,o)}),d.t&&a.writeText(d.t),a.closeNode()})(l,this._model),this._xml=l.xml}s.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(s){switch(s){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(g,C,i){const e=g("./text-xform"),A=g("./rich-text-xform"),s=g("../base-xform");C.exports=class extends s{constructor(){super(),this.map={r:new A,t:new e}}get tag(){return"rPh"}render(l,n){if(l.openNode(this.tag,{sb:n.sb||0,eb:n.eb||0}),n&&n.hasOwnProperty("richText")&&n.richText){const{r:a}=this.map;n.richText.forEach(d=>{a.render(l,d)})}else n&&this.map.t.render(l,n.text);l.closeNode()}parseOpen(l){const{name:n}=l;return this.parser?(this.parser.parseOpen(l),!0):n===this.tag?(this.model={sb:parseInt(l.attributes.sb,10),eb:parseInt(l.attributes.eb,10)},!0):(this.parser=this.map[n],!!this.parser&&(this.parser.parseOpen(l),!0))}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser){if(!this.parser.parseClose(l)){switch(l){case"r":{let n=this.model.richText;n||(n=this.model.richText=[]),n.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(l){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(g,C,i){const e=g("./text-xform"),A=g("../style/font-xform"),s=g("../base-xform");class l extends s{constructor(a){super(),this.model=a}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new e)}get fontXform(){return this._fontXform||(this._fontXform=new A(l.FONT_OPTIONS))}render(a,d){d=d||this.model,a.openNode("r"),d.font&&this.fontXform.render(a,d.font),this.textXform.render(a,d.text),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(a),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(a),!0;default:return!1}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){switch(a){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(a),!0}}}l.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},C.exports=l},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(g,C,i){const e=g("./text-xform"),A=g("./rich-text-xform"),s=g("./phonetic-text-xform"),l=g("../base-xform");C.exports=class extends l{constructor(n){super(),this.model=n,this.map={r:new A,t:new e,rPh:new s}}get tag(){return"si"}render(n,a){n.openNode(this.tag),a&&a.hasOwnProperty("richText")&&a.richText?a.richText.length?a.richText.forEach(d=>{this.map.r.render(n,d)}):this.map.t.render(n,""):a!=null&&this.map.t.render(n,a),n.closeNode()}parseOpen(n){const{name:a}=n;return this.parser?(this.parser.parseOpen(n),!0):a===this.tag?(this.model={},!0):(this.parser=this.map[a],!!this.parser&&(this.parser.parseOpen(n),!0))}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser){if(!this.parser.parseClose(n)){switch(n){case"r":{let a=this.model.richText;a||(a=this.model.richText=[]),a.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(n){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform"),s=g("./shared-string-xform");C.exports=class extends A{constructor(l){super(),this.model=l||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(l){return this.model.values[l]}add(l){return l.richText?this.addRichText(l):this.addText(l)}addText(l){let n=this.hash[l];return n===void 0&&(n=this.hash[l]=this.model.values.length,this.model.values.push(l)),this.model.count++,n}addRichText(l){const n=this.sharedStringXform.toXml(l);let a=this.rich[n];return a===void 0&&(a=this.rich[n]=this.model.values.length,this.model.values.push(l)),this.model.count++,a}render(l,n){n=n||this._values,l.openXml(e.StdDocAttributes),l.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:n.count,uniqueCount:n.values.length});const a=this.sharedStringXform;n.values.forEach(d=>{a.render(l,d)}),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(l),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(l))}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(l){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+l)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"t"}render(A,s){A.openNode("t"),/^\s|\n|\s$/.test(s)&&A.addAttribute("xml:space","preserve"),A.writeText(s),A.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(A,s)=>String.fromCharCode(parseInt(s,16)))}parseOpen(A){switch(A.name){case"t":return this._text=[],!0;default:return!1}}parseText(A){this._text.push(A)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(g,C,i){const e=g("../../../doc/enums"),A=g("../../../utils/utils"),s=g("../base-xform"),l={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((a,d)=>(a[d]=!0,a),{}),horizontal(a){return this.horizontalValues[a]?a:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((a,d)=>(a[d]=!0,a),{}),vertical(a){return a==="middle"?"center":this.verticalValues[a]?a:void 0},wrapText:a=>!!a||void 0,shrinkToFit:a=>!!a||void 0,textRotation(a){switch(a){case"vertical":return a;default:return(a=A.validInt(a))>=-90&&a<=90?a:void 0}},indent:a=>(a=A.validInt(a),Math.max(0,a)),readingOrder(a){switch(a){case"ltr":return e.ReadingOrder.LeftToRight;case"rtl":return e.ReadingOrder.RightToLeft;default:return}}},n={toXml(a){if(a=l.textRotation(a)){if(a==="vertical")return 255;const d=Math.round(a);if(d>=0&&d<=90)return d;if(d<0&&d>=-90)return 90-d}},toModel(a){const d=A.validInt(a);if(d!==void 0){if(d===255)return"vertical";if(d>=0&&d<=90)return d;if(d>90&&d<=180)return 90-d}}};C.exports=class extends s{get tag(){return"alignment"}render(a,d){a.addRollback(),a.openNode("alignment");let o=!1;function c(r,h){h&&(a.addAttribute(r,h),o=!0)}c("horizontal",l.horizontal(d.horizontal)),c("vertical",l.vertical(d.vertical)),c("wrapText",!!l.wrapText(d.wrapText)&&"1"),c("shrinkToFit",!!l.shrinkToFit(d.shrinkToFit)&&"1"),c("indent",l.indent(d.indent)),c("textRotation",n.toXml(d.textRotation)),c("readingOrder",l.readingOrder(d.readingOrder)),a.closeNode(),o?a.commit():a.rollback()}parseOpen(a){const d={};let o=!1;function c(r,h,b){r&&(d[h]=b,o=!0)}c(a.attributes.horizontal,"horizontal",a.attributes.horizontal),c(a.attributes.vertical,"vertical",a.attributes.vertical==="center"?"middle":a.attributes.vertical),c(a.attributes.wrapText,"wrapText",A.parseBoolean(a.attributes.wrapText)),c(a.attributes.shrinkToFit,"shrinkToFit",A.parseBoolean(a.attributes.shrinkToFit)),c(a.attributes.indent,"indent",parseInt(a.attributes.indent,10)),c(a.attributes.textRotation,"textRotation",n.toModel(a.attributes.textRotation)),c(a.attributes.readingOrder,"readingOrder",a.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=o?d:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(g,C,i){const e=g("../base-xform"),A=g("../../../utils/utils"),s=g("./color-xform");class l extends e{constructor(a){super(),this.name=a,this.map={color:new s}}get tag(){return this.name}render(a,d,o){const c=d&&d.color||o||this.defaultColor;a.openNode(this.name),d&&d.style&&(a.addAttribute("style",d.style),c&&this.map.color.render(a,c)),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.name:{const{style:d}=a.attributes;return this.model=d?{style:d}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(a),!0;default:return!1}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),!0):(a===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(a){return l.validStyleValues[a]}}l.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((n,a)=>(n[a]=!0,n),{}),C.exports=class extends e{constructor(){super(),this.map={top:new l("top"),left:new l("left"),bottom:new l("bottom"),right:new l("right"),diagonal:new l("diagonal")}}render(n,a){const{color:d}=a;function o(c,r){c&&!c.color&&a.color&&(c={...c,color:a.color}),r.render(n,c,d)}n.openNode("border"),a.diagonal&&a.diagonal.style&&(a.diagonal.up&&n.addAttribute("diagonalUp","1"),a.diagonal.down&&n.addAttribute("diagonalDown","1")),o(a.left,this.map.left),o(a.right,this.map.right),o(a.top,this.map.top),o(a.bottom,this.map.bottom),o(a.diagonal,this.map.diagonal),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"border":return this.reset(),this.diagonalUp=A.parseBoolean(n.attributes.diagonalUp),this.diagonalDown=A.parseBoolean(n.attributes.diagonalDown),!0;default:return this.parser=this.map[n.name],!!this.parser&&(this.parser.parseOpen(n),!0)}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;if(n==="border"){const a=this.model={},d=function(o,c,r){c&&(r&&Object.assign(c,r),a[o]=c)};d("left",this.map.left.model),d("right",this.map.right.model),d("top",this.map.top.model),d("bottom",this.map.bottom.model),d("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{constructor(A){super(),this.name=A||"color"}get tag(){return this.name}render(A,s){return!!s&&(A.openNode(this.name),s.argb?A.addAttribute("rgb",s.argb):s.theme!==void 0?(A.addAttribute("theme",s.theme),s.tint!==void 0&&A.addAttribute("tint",s.tint)):s.indexed!==void 0?A.addAttribute("indexed",s.indexed):A.addAttribute("auto","1"),A.closeNode(),!0)}parseOpen(A){return A.name===this.name&&(A.attributes.rgb?this.model={argb:A.attributes.rgb}:A.attributes.theme?(this.model={theme:parseInt(A.attributes.theme,10)},A.attributes.tint&&(this.model.tint=parseFloat(A.attributes.tint))):A.attributes.indexed?this.model={indexed:parseInt(A.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(g,C,i){const e=g("../base-xform"),A=g("./alignment-xform"),s=g("./border-xform"),l=g("./fill-xform"),n=g("./font-xform"),a=g("./numfmt-xform"),d=g("./protection-xform");C.exports=class extends e{constructor(){super(),this.map={alignment:new A,border:new s,fill:new l,font:new n,numFmt:new a,protection:new d}}get tag(){return"dxf"}render(o,c){if(o.openNode(this.tag),c.font&&this.map.font.render(o,c.font),c.numFmt&&c.numFmtId){const r={id:c.numFmtId,formatCode:c.numFmt};this.map.numFmt.render(o,r)}c.fill&&this.map.fill.render(o,c.fill),c.alignment&&this.map.alignment.render(o,c.alignment),c.border&&this.map.border.render(o,c.border),c.protection&&this.map.protection.render(o,c.protection),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o),!0}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.parser=void 0),!0):o!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(g,C,i){const e=g("../base-xform"),A=g("./color-xform");class s extends e{constructor(){super(),this.map={color:new A}}get tag(){return"stop"}render(o,c){o.openNode("stop"),o.addAttribute("position",c.position),this.map.color.render(o,c.color),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"stop":return this.model={position:parseFloat(o.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(o),!0;default:return!1}}parseText(){}parseClose(o){return!!this.parser&&(this.parser.parseClose(o)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class l extends e{constructor(){super(),this.map={fgColor:new A("fgColor"),bgColor:new A("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(o,c){o.openNode("patternFill"),o.addAttribute("patternType",c.pattern),c.fgColor&&this.map.fgColor.render(o,c.fgColor),c.bgColor&&this.map.bgColor.render(o,c.bgColor),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"patternFill":return this.model={type:"pattern",pattern:o.attributes.patternType},!0;default:return this.parser=this.map[o.name],!!this.parser&&(this.parser.parseOpen(o),!0)}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){return!!this.parser&&(this.parser.parseClose(o)||(this.parser.model&&(this.model[o]=this.parser.model),this.parser=void 0),!0)}}class n extends e{constructor(){super(),this.map={stop:new s}}get name(){return"gradient"}get tag(){return"gradientFill"}render(o,c){switch(o.openNode("gradientFill"),c.gradient){case"angle":o.addAttribute("degree",c.degree);break;case"path":o.addAttribute("type","path"),c.center.left&&(o.addAttribute("left",c.center.left),c.center.right===void 0&&o.addAttribute("right",c.center.left)),c.center.right&&o.addAttribute("right",c.center.right),c.center.top&&(o.addAttribute("top",c.center.top),c.center.bottom===void 0&&o.addAttribute("bottom",c.center.top)),c.center.bottom&&o.addAttribute("bottom",c.center.bottom)}const r=this.map.stop;c.stops.forEach(h=>{r.render(o,h)}),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"gradientFill":{const c=this.model={stops:[]};return o.attributes.degree?(c.gradient="angle",c.degree=parseInt(o.attributes.degree,10)):o.attributes.type==="path"&&(c.gradient="path",c.center={left:o.attributes.left?parseFloat(o.attributes.left):0,top:o.attributes.top?parseFloat(o.attributes.top):0},o.attributes.right!==o.attributes.left&&(c.center.right=o.attributes.right?parseFloat(o.attributes.right):0),o.attributes.bottom!==o.attributes.top&&(c.center.bottom=o.attributes.bottom?parseFloat(o.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(o),!0;default:return!1}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){return!!this.parser&&(this.parser.parseClose(o)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class a extends e{constructor(){super(),this.map={patternFill:new l,gradientFill:new n}}get tag(){return"fill"}render(o,c){switch(o.addRollback(),o.openNode("fill"),c.type){case"pattern":this.map.patternFill.render(o,c);break;case"gradient":this.map.gradientFill.render(o,c);break;default:return void o.rollback()}o.closeNode(),o.commit()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"fill":return this.model={},!0;default:return this.parser=this.map[o.name],!!this.parser&&(this.parser.parseOpen(o),!0)}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){return!!this.parser&&(this.parser.parseClose(o)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(o){return a.validPatternValues[o]}}a.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((d,o)=>(d[o]=!0,d),{}),a.StopXform=s,a.PatternFillXform=l,a.GradientFillXform=n,C.exports=a},{"../base-xform":32,"./color-xform":128}],131:[function(g,C,i){const e=g("./color-xform"),A=g("../simple/boolean-xform"),s=g("../simple/integer-xform"),l=g("../simple/string-xform"),n=g("./underline-xform"),a=g("../../../utils/under-dash"),d=g("../base-xform");class o extends d{constructor(r){super(),this.options=r||o.OPTIONS,this.map={b:{prop:"bold",xform:new A({tag:"b",attr:"val"})},i:{prop:"italic",xform:new A({tag:"i",attr:"val"})},u:{prop:"underline",xform:new n},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new e},condense:{prop:"condense",xform:new A({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new A({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new A({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new l({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new l({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new A({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new A({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new l({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(r,h){const{map:b}=this;r.openNode(this.options.tagName),a.each(this.map,(u,m)=>{b[m].xform.render(r,h[u.prop])}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;if(this.map[r.name])return this.parser=this.map[r.name].xform,this.parser.parseOpen(r);switch(r.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser&&!this.parser.parseClose(r)){const h=this.map[r];return this.parser.model&&(this.model[h.prop]=this.parser.model),this.parser=void 0,!0}switch(r){case this.options.tagName:return!1;default:return!0}}}o.OPTIONS={tagName:"font",fontNameTag:"name"},C.exports=o},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(g,C,i){const e=g("../../../utils/under-dash"),A=g("../../defaultnumformats"),s=g("../base-xform"),l=function(){const a={};return e.each(A,(d,o)=>{d.f&&(a[d.f]=parseInt(o,10))}),a}();class n extends s{constructor(d,o){super(),this.id=d,this.formatCode=o}get tag(){return"numFmt"}render(d,o){d.leafNode("numFmt",{numFmtId:o.id,formatCode:o.formatCode})}parseOpen(d){switch(d.name){case"numFmt":return this.model={id:parseInt(d.attributes.numFmtId,10),formatCode:d.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}n.getDefaultFmtId=function(a){return l[a]},n.getDefaultFmtCode=function(a){return A[a]&&A[a].f},C.exports=n},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(g,C,i){const e=g("../base-xform"),A={boolean:(s,l)=>s===void 0?l:s};C.exports=class extends e{get tag(){return"protection"}render(s,l){s.addRollback(),s.openNode("protection");let n=!1;function a(d,o){o!==void 0&&(s.addAttribute(d,o),n=!0)}a("locked",A.boolean(l.locked,!0)?void 0:"0"),a("hidden",A.boolean(l.hidden,!1)?"1":void 0),s.closeNode(),n?s.commit():s.rollback()}parseOpen(s){const l={locked:s.attributes.locked!=="0",hidden:s.attributes.hidden==="1"},n=!l.locked||l.hidden;this.model=n?l:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(g,C,i){const e=g("../base-xform"),A=g("./alignment-xform"),s=g("./protection-xform");C.exports=class extends e{constructor(l){super(),this.xfId=!(!l||!l.xfId),this.map={alignment:new A,protection:new s}}get tag(){return"xf"}render(l,n){l.openNode("xf",{numFmtId:n.numFmtId||0,fontId:n.fontId||0,fillId:n.fillId||0,borderId:n.borderId||0}),this.xfId&&l.addAttribute("xfId",n.xfId||0),n.numFmtId&&l.addAttribute("applyNumberFormat","1"),n.fontId&&l.addAttribute("applyFont","1"),n.fillId&&l.addAttribute("applyFill","1"),n.borderId&&l.addAttribute("applyBorder","1"),n.alignment&&l.addAttribute("applyAlignment","1"),n.protection&&l.addAttribute("applyProtection","1"),n.alignment&&this.map.alignment.render(l,n.alignment),n.protection&&this.map.protection.render(l,n.protection),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"xf":return this.model={numFmtId:parseInt(l.attributes.numFmtId,10),fontId:parseInt(l.attributes.fontId,10),fillId:parseInt(l.attributes.fillId,10),borderId:parseInt(l.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(l.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(l),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):l!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(g,C,i){const e=g("../../../doc/enums"),A=g("../../../utils/xml-stream"),s=g("../base-xform"),l=g("../static-xform"),n=g("../list-xform"),a=g("./font-xform"),d=g("./fill-xform"),o=g("./border-xform"),c=g("./numfmt-xform"),r=g("./style-xform"),h=g("./dxf-xform");class b extends s{constructor(m){super(),this.map={numFmts:new n({tag:"numFmts",count:!0,childXform:new c}),fonts:new n({tag:"fonts",count:!0,childXform:new a,$:{"x14ac:knownFonts":1}}),fills:new n({tag:"fills",count:!0,childXform:new d}),borders:new n({tag:"borders",count:!0,childXform:new o}),cellStyleXfs:new n({tag:"cellStyleXfs",count:!0,childXform:new r}),cellXfs:new n({tag:"cellXfs",count:!0,childXform:new r({xfId:!0})}),dxfs:new n({tag:"dxfs",always:!0,count:!0,childXform:new h}),numFmt:new c,font:new a,fill:new d,border:new o,style:new r({xfId:!0}),cellStyles:b.STATIC_XFORMS.cellStyles,tableStyles:b.STATIC_XFORMS.tableStyles,extLst:b.STATIC_XFORMS.extLst},m&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(m,Z){Z=Z||this.model,m.openXml(A.StdDocAttributes),m.openNode("styleSheet",b.STYLESHEET_ATTRIBUTES),this.index?(Z.numFmts&&Z.numFmts.length&&(m.openNode("numFmts",{count:Z.numFmts.length}),Z.numFmts.forEach(p=>{m.writeXml(p)}),m.closeNode()),Z.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),m.openNode("fonts",{count:Z.fonts.length,"x14ac:knownFonts":1}),Z.fonts.forEach(p=>{m.writeXml(p)}),m.closeNode(),m.openNode("fills",{count:Z.fills.length}),Z.fills.forEach(p=>{m.writeXml(p)}),m.closeNode(),m.openNode("borders",{count:Z.borders.length}),Z.borders.forEach(p=>{m.writeXml(p)}),m.closeNode(),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),m.openNode("cellXfs",{count:Z.styles.length}),Z.styles.forEach(p=>{m.writeXml(p)}),m.closeNode()):(this.map.numFmts.render(m,Z.numFmts),this.map.fonts.render(m,Z.fonts),this.map.fills.render(m,Z.fills),this.map.borders.render(m,Z.borders),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(m,Z.styles)),b.STATIC_XFORMS.cellStyles.render(m),this.map.dxfs.render(m,Z.dxfs),b.STATIC_XFORMS.tableStyles.render(m),b.STATIC_XFORMS.extLst.render(m),m.closeNode()}parseOpen(m){if(this.parser)return this.parser.parseOpen(m),!0;switch(m.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m),!0}}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){if(this.parser)return this.parser.parseClose(m)||(this.parser=void 0),!0;switch(m){case"styleSheet":{this.model={};const Z=(p,Y)=>{Y.model&&Y.model.length&&(this.model[p]=Y.model)};if(Z("numFmts",this.map.numFmts),Z("fonts",this.map.fonts),Z("fills",this.map.fills),Z("borders",this.map.borders),Z("styles",this.map.cellXfs),Z("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const p=this.index.numFmt;this.model.numFmts.forEach(Y=>{p[Y.id]=Y.formatCode})}return!1}default:return!0}}addStyleModel(m,Z){if(!m)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(m))return this.weakMap.get(m);const p={};if(Z=Z||e.ValueType.Number,m.numFmt)p.numFmtId=this._addNumFmtStr(m.numFmt);else switch(Z){case e.ValueType.Number:p.numFmtId=this._addNumFmtStr("General");break;case e.ValueType.Date:p.numFmtId=this._addNumFmtStr("mm-dd-yy")}m.font&&(p.fontId=this._addFont(m.font)),m.border&&(p.borderId=this._addBorder(m.border)),m.fill&&(p.fillId=this._addFill(m.fill)),m.alignment&&(p.alignment=m.alignment),m.protection&&(p.protection=m.protection);const Y=this._addStyle(p);return this.weakMap&&this.weakMap.set(m,Y),Y}getStyleModel(m){const Z=this.model.styles[m];if(!Z)return null;let p=this.index.model[m];if(p)return p;if(p=this.index.model[m]={},Z.numFmtId){const R=this.index.numFmt[Z.numFmtId]||c.getDefaultFmtCode(Z.numFmtId);R&&(p.numFmt=R)}function Y(R,X,H){if(H||H===0){const S=X[H];S&&(p[R]=S)}}return Y("font",this.model.fonts,Z.fontId),Y("border",this.model.borders,Z.borderId),Y("fill",this.model.fills,Z.fillId),Z.alignment&&(p.alignment=Z.alignment),Z.protection&&(p.protection=Z.protection),p}addDxfStyle(m){return m.numFmt&&(m.numFmtId=this._addNumFmtStr(m.numFmt)),this.model.dxfs.push(m),this.model.dxfs.length-1}getDxfStyle(m){return this.model.dxfs[m]}_addStyle(m){const Z=this.map.style.toXml(m);let p=this.index.style[Z];return p===void 0&&(p=this.index.style[Z]=this.model.styles.length,this.model.styles.push(Z)),p}_addNumFmtStr(m){let Z=c.getDefaultFmtId(m);if(Z!==void 0||(Z=this.index.numFmt[m],Z!==void 0))return Z;Z=this.index.numFmt[m]=164+this.model.numFmts.length;const p=this.map.numFmt.toXml({id:Z,formatCode:m});return this.model.numFmts.push(p),Z}_addFont(m){const Z=this.map.font.toXml(m);let p=this.index.font[Z];return p===void 0&&(p=this.index.font[Z]=this.model.fonts.length,this.model.fonts.push(Z)),p}_addBorder(m){const Z=this.map.border.toXml(m);let p=this.index.border[Z];return p===void 0&&(p=this.index.border[Z]=this.model.borders.length,this.model.borders.push(Z)),p}_addFill(m){const Z=this.map.fill.toXml(m);let p=this.index.fill[Z];return p===void 0&&(p=this.index.fill[Z]=this.model.fills.length,this.model.fills.push(Z)),p}}b.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},b.STATIC_XFORMS={cellStyles:new l({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new l({tag:"dxfs",$:{count:0}}),tableStyles:new l({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new l({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},b.Mock=class extends b{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(u){return u.autodrain(),Promise.resolve()}addStyleModel(u,m){switch(m){case e.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const u={numFmtId:c.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(u)}return this._dateStyleId}getStyleModel(){return{}}},C.exports=b},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(g,C,i){const e=g("../base-xform");class A extends e{constructor(l){super(),this.model=l}get tag(){return"u"}render(l,n){if((n=n||this.model)===!0)l.leafNode("u");else{const a=A.Attributes[n];a&&l.leafNode("u",a)}}parseOpen(l){l.name==="u"&&(this.model=l.attributes.val||!0)}parseText(){}parseClose(){return!1}}A.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},C.exports=A},{"../base-xform":32}],137:[function(g,C,i){const e=g("../base-xform"),A=g("./filter-column-xform");C.exports=class extends e{constructor(){super(),this.map={filterColumn:new A}}get tag(){return"autoFilter"}prepare(s){s.columns.forEach((l,n)=>{this.map.filterColumn.prepare(l,{index:n})})}render(s,l){return s.openNode(this.tag,{ref:l.autoFilterRef}),l.columns.forEach(n=>{this.map.filterColumn.render(s,n)}),s.closeNode(),!0}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:return this.model={autoFilterRef:s.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[s.name],this.parser)return this.parseOpen(s),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(s){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+s)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"customFilter"}render(A,s){A.leafNode(this.tag,{val:s.val,operator:s.operator})}parseOpen(A){return A.name===this.tag&&(this.model={val:A.attributes.val,operator:A.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(g,C,i){const e=g("../base-xform"),A=g("../list-xform"),s=g("./custom-filter-xform"),l=g("./filter-xform");C.exports=class extends e{constructor(){super(),this.map={customFilters:new A({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new A({tag:"filters",count:!1,empty:!0,childXform:new l})}}get tag(){return"filterColumn"}prepare(n,a){n.colId=a.index.toString()}render(n,a){return a.customFilters?(n.openNode(this.tag,{colId:a.colId,hiddenButton:a.filterButton?"0":"1"}),this.map.customFilters.render(n,a.customFilters),n.closeNode(),!0):(n.leafNode(this.tag,{colId:a.colId,hiddenButton:a.filterButton?"0":"1"}),!0)}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;const{attributes:a}=n;switch(n.name){case this.tag:return this.model={filterButton:a.hiddenButton==="0"},!0;default:if(this.parser=this.map[n.name],this.parser)return this.parseOpen(n),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(n))}}parseText(){}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"filter"}render(A,s){A.leafNode(this.tag,{val:s.val})}parseOpen(A){return A.name===this.tag&&(this.model={val:A.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"tableColumn"}prepare(A,s){A.id=s.index+1}render(A,s){return A.leafNode(this.tag,{id:s.id.toString(),name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId}),!0}parseOpen(A){if(A.name===this.tag){const{attributes:s}=A;return this.model={name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(g,C,i){const e=g("../base-xform");C.exports=class extends e{get tag(){return"tableStyleInfo"}render(A,s){return A.leafNode(this.tag,{name:s.theme?s.theme:void 0,showFirstColumn:s.showFirstColumn?"1":"0",showLastColumn:s.showLastColumn?"1":"0",showRowStripes:s.showRowStripes?"1":"0",showColumnStripes:s.showColumnStripes?"1":"0"}),!0}parseOpen(A){if(A.name===this.tag){const{attributes:s}=A;return this.model={theme:s.name?s.name:null,showFirstColumn:s.showFirstColumn==="1",showLastColumn:s.showLastColumn==="1",showRowStripes:s.showRowStripes==="1",showColumnStripes:s.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(g,C,i){const e=g("../../../utils/xml-stream"),A=g("../base-xform"),s=g("../list-xform"),l=g("./auto-filter-xform"),n=g("./table-column-xform"),a=g("./table-style-info-xform");class d extends A{constructor(){super(),this.map={autoFilter:new l,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new n}),tableStyleInfo:new a}}prepare(c,r){this.map.autoFilter.prepare(c),this.map.tableColumns.prepare(c.columns,r)}get tag(){return"table"}render(c,r){c.openXml(e.StdDocAttributes),c.openNode(this.tag,{...d.TABLE_ATTRIBUTES,id:r.id,name:r.name,displayName:r.displayName||r.name,ref:r.tableRef,totalsRowCount:r.totalsRow?"1":void 0,totalsRowShown:r.totalsRow?void 0:"1",headerRowCount:r.headerRow?"1":"0"}),this.map.autoFilter.render(c,r),this.map.tableColumns.render(c,r.columns),this.map.tableStyleInfo.render(c,r.style),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;const{name:r,attributes:h}=c;switch(r){case this.tag:this.reset(),this.model={name:h.name,displayName:h.displayName||h.name,tableRef:h.ref,totalsRow:h.totalsRowCount==="1",headerRow:h.headerRowCount==="1"};break;default:this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)}return!0}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((r,h)=>{this.model.columns[h].filterButton=r.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(c,r){c.columns.forEach(h=>{h.dxfId!==void 0&&(h.style=r.styles.getDxfStyle(h.dxfId))})}}d.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},C.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(g,C,i){(function(e,A){(function(){const s=g("fs"),l=g("jszip"),{PassThrough:n}=g("readable-stream"),a=g("../utils/zip-stream"),d=g("../utils/stream-buf"),o=g("../utils/utils"),c=g("../utils/xml-stream"),{bufferToString:r}=g("../utils/browser-buffer-decode"),h=g("./xform/style/styles-xform"),b=g("./xform/core/core-xform"),u=g("./xform/strings/shared-strings-xform"),m=g("./xform/core/relationships-xform"),Z=g("./xform/core/content-types-xform"),p=g("./xform/core/app-xform"),Y=g("./xform/book/workbook-xform"),R=g("./xform/sheet/worksheet-xform"),X=g("./xform/drawing/drawing-xform"),H=g("./xform/table/table-xform"),S=g("./xform/comment/comments-xform"),z=g("./xform/comment/vml-notes-xform"),v=g("./xml/theme1");class K{constructor(N){this.workbook=N}async readFile(N,B){if(!await o.fs.exists(N))throw new Error("File not found: "+N);const G=s.createReadStream(N);try{const w=await this.read(G,B);return G.close(),w}catch(w){throw G.close(),w}}parseRels(N){return new m().parseStream(N)}parseWorkbook(N){return new Y().parseStream(N)}parseSharedStrings(N){return new u().parseStream(N)}reconcile(N,B){const G=new Y,w=new R(B),W=new X,y=new H;G.reconcile(N);const f={media:N.media,mediaIndex:N.mediaIndex};Object.keys(N.drawings).forEach(T=>{const Q=N.drawings[T],P=N.drawingRels[T];P&&(f.rels=P.reduce((L,E)=>(L[E.Id]=E,L),{}),(Q.anchors||[]).forEach(L=>{const E=L.picture&&L.picture.hyperlinks;E&&f.rels[E.rId]&&(E.hyperlink=f.rels[E.rId].Target,delete E.rId)}),W.reconcile(Q,f))});const D={styles:N.styles};Object.values(N.tables).forEach(T=>{y.reconcile(T,D)});const F={styles:N.styles,sharedStrings:N.sharedStrings,media:N.media,mediaIndex:N.mediaIndex,date1904:N.properties&&N.properties.date1904,drawings:N.drawings,comments:N.comments,tables:N.tables,vmlDrawings:N.vmlDrawings};N.worksheets.forEach(T=>{T.relationships=N.worksheetRels[T.sheetNo],w.reconcile(T,F)}),delete N.worksheetHash,delete N.worksheetRels,delete N.globalRels,delete N.sharedStrings,delete N.workbookRels,delete N.sheetDefs,delete N.styles,delete N.mediaIndex,delete N.drawings,delete N.drawingRels,delete N.vmlDrawings}async _processWorksheetEntry(N,B,G,w,W){const y=new R(w),f=await y.parseStream(N);f.sheetNo=G,B.worksheetHash[W]=f,B.worksheets.push(f)}async _processCommentEntry(N,B,G){const w=new S,W=await w.parseStream(N);B.comments[`../${G}.xml`]=W}async _processTableEntry(N,B,G){const w=new H,W=await w.parseStream(N);B.tables[`../tables/${G}.xml`]=W}async _processWorksheetRelsEntry(N,B,G){const w=new m,W=await w.parseStream(N);B.worksheetRels[G]=W}async _processMediaEntry(N,B,G){const w=G.lastIndexOf(".");if(w>=1){const W=G.substr(w+1),y=G.substr(0,w);await new Promise((f,D)=>{const F=new d;F.on("finish",()=>{B.mediaIndex[G]=B.media.length,B.mediaIndex[y]=B.media.length;const T={type:"image",name:y,extension:W,buffer:F.toBuffer()};B.media.push(T),f()}),N.on("error",T=>{D(T)}),N.pipe(F)})}}async _processDrawingEntry(N,B,G){const w=new X,W=await w.parseStream(N);B.drawings[G]=W}async _processDrawingRelsEntry(N,B,G){const w=new m,W=await w.parseStream(N);B.drawingRels[G]=W}async _processVmlDrawingEntry(N,B,G){const w=new z,W=await w.parseStream(N);B.vmlDrawings[`../drawings/${G}.vml`]=W}async _processThemeEntry(N,B,G){await new Promise((w,W)=>{const y=new d;N.on("error",W),y.on("error",W),y.on("finish",()=>{B.themes[G]=y.read().toString(),w()}),N.pipe(y)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(N,B){!N[Symbol.asyncIterator]&&N.pipe&&(N=N.pipe(new n));const G=[];for await(const w of N)G.push(w);return this.load(A.concat(G),B)}async load(N,B){let G;G=B&&B.base64?A.from(N.toString(),"base64"):N;const w={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},W=await l.loadAsync(G);for(const y of Object.values(W.files))if(!y.dir){let f,D=y.name;if(D[0]==="/"&&(D=D.substr(1)),D.match(/xl\/media\//)||D.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))f=new n,f.write(await y.async("nodebuffer"));else{let F;f=new n({writableObjectMode:!0,readableObjectMode:!0}),F=e.browser?r(await y.async("nodebuffer")):await y.async("string");const T=16384;for(let Q=0;Q<F.length;Q+=T)f.write(F.substring(Q,Q+T))}switch(f.end(),D){case"_rels/.rels":w.globalRels=await this.parseRels(f);break;case"xl/workbook.xml":{const F=await this.parseWorkbook(f);w.sheets=F.sheets,w.definedNames=F.definedNames,w.views=F.views,w.properties=F.properties,w.calcProperties=F.calcProperties;break}case"xl/_rels/workbook.xml.rels":w.workbookRels=await this.parseRels(f);break;case"xl/sharedStrings.xml":w.sharedStrings=new u,await w.sharedStrings.parseStream(f);break;case"xl/styles.xml":w.styles=new h,await w.styles.parseStream(f);break;case"docProps/app.xml":{const F=new p,T=await F.parseStream(f);w.company=T.company,w.manager=T.manager;break}case"docProps/core.xml":{const F=new b,T=await F.parseStream(f);Object.assign(w,T);break}default:{let F=D.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(F){await this._processWorksheetEntry(f,w,F[1],B,D);break}if(F=D.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),F){await this._processWorksheetRelsEntry(f,w,F[1]);break}if(F=D.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),F){await this._processThemeEntry(f,w,F[1]);break}if(F=D.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),F){await this._processMediaEntry(f,w,F[1]);break}if(F=D.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),F){await this._processDrawingEntry(f,w,F[1]);break}if(F=D.match(/xl\/(comments\d+)[.]xml/),F){await this._processCommentEntry(f,w,F[1]);break}if(F=D.match(/xl\/tables\/(table\d+)[.]xml/),F){await this._processTableEntry(f,w,F[1]);break}if(F=D.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),F){await this._processDrawingRelsEntry(f,w,F[1]);break}if(F=D.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),F){await this._processVmlDrawingEntry(f,w,F[1]);break}}}}return this.reconcile(w,B),this.workbook.model=w,this.workbook}async addMedia(N,B){await Promise.all(B.media.map(async G=>{if(G.type==="image"){const w=`xl/media/${G.name}.${G.extension}`;if(G.filename){const W=await function(y,f){return new Promise((D,F)=>{s.readFile(y,f,(T,Q)=>{T?F(T):D(Q)})})}(G.filename);return N.append(W,{name:w})}if(G.buffer)return N.append(G.buffer,{name:w});if(G.base64){const W=G.base64,y=W.substring(W.indexOf(",")+1);return N.append(y,{name:w,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(N,B){const G=new X,w=new m;B.worksheets.forEach(W=>{const{drawing:y}=W;if(y){G.prepare(y,{});let f=G.toXml(y);N.append(f,{name:`xl/drawings/${y.name}.xml`}),f=w.toXml(y.rels),N.append(f,{name:`xl/drawings/_rels/${y.name}.xml.rels`})}})}addTables(N,B){const G=new H;B.worksheets.forEach(w=>{const{tables:W}=w;W.forEach(y=>{G.prepare(y,{});const f=G.toXml(y);N.append(f,{name:"xl/tables/"+y.target})})})}async addContentTypes(N,B){const G=new Z().toXml(B);N.append(G,{name:"[Content_Types].xml"})}async addApp(N,B){const G=new p().toXml(B);N.append(G,{name:"docProps/app.xml"})}async addCore(N,B){const G=new b;N.append(G.toXml(B),{name:"docProps/core.xml"})}async addThemes(N,B){const G=B.themes||{theme1:v};Object.keys(G).forEach(w=>{const W=G[w],y=`xl/theme/${w}.xml`;N.append(W,{name:y})})}async addOfficeRels(N){const B=new m().toXml([{Id:"rId1",Type:K.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:K.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:K.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);N.append(B,{name:"_rels/.rels"})}async addWorkbookRels(N,B){let G=1;const w=[{Id:"rId"+G++,Type:K.RelType.Styles,Target:"styles.xml"},{Id:"rId"+G++,Type:K.RelType.Theme,Target:"theme/theme1.xml"}];B.sharedStrings.count&&w.push({Id:"rId"+G++,Type:K.RelType.SharedStrings,Target:"sharedStrings.xml"}),B.worksheets.forEach(y=>{y.rId="rId"+G++,w.push({Id:y.rId,Type:K.RelType.Worksheet,Target:`worksheets/sheet${y.id}.xml`})});const W=new m().toXml(w);N.append(W,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(N,B){B.sharedStrings&&B.sharedStrings.count&&N.append(B.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(N,B){const{xml:G}=B.styles;G&&N.append(G,{name:"xl/styles.xml"})}async addWorkbook(N,B){const G=new Y;N.append(G.toXml(B),{name:"xl/workbook.xml"})}async addWorksheets(N,B){const G=new R,w=new m,W=new S,y=new z;B.worksheets.forEach(f=>{let D=new c;G.render(D,f),N.append(D.xml,{name:`xl/worksheets/sheet${f.id}.xml`}),f.rels&&f.rels.length&&(D=new c,w.render(D,f.rels),N.append(D.xml,{name:`xl/worksheets/_rels/sheet${f.id}.xml.rels`})),f.comments.length>0&&(D=new c,W.render(D,f),N.append(D.xml,{name:`xl/comments${f.id}.xml`}),D=new c,y.render(D,f),N.append(D.xml,{name:`xl/drawings/vmlDrawing${f.id}.vml`}))})}_finalize(N){return new Promise((B,G)=>{N.on("finish",()=>{B(this)}),N.on("error",G),N.finalize()})}prepareModel(N,B){N.creator=N.creator||"ExcelJS",N.lastModifiedBy=N.lastModifiedBy||"ExcelJS",N.created=N.created||new Date,N.modified=N.modified||new Date,N.useSharedStrings=B.useSharedStrings===void 0||B.useSharedStrings,N.useStyles=B.useStyles===void 0||B.useStyles,N.sharedStrings=new u,N.styles=N.useStyles?new h(!0):new h.Mock;const G=new Y,w=new R;G.prepare(N);const W={sharedStrings:N.sharedStrings,styles:N.styles,date1904:N.properties.date1904,drawingsCount:0,media:N.media};W.drawings=N.drawings=[],W.commentRefs=N.commentRefs=[];let y=0;N.tables=[],N.worksheets.forEach(f=>{f.tables.forEach(D=>{y++,D.target=`table${y}.xml`,D.id=y,N.tables.push(D)}),w.prepare(f,W)})}async write(N,B){B=B||{};const{model:G}=this.workbook,w=new a.ZipWriter(B.zip);return w.pipe(N),this.prepareModel(G,B),await this.addContentTypes(w,G),await this.addOfficeRels(w,G),await this.addWorkbookRels(w,G),await this.addWorksheets(w,G),await this.addSharedStrings(w,G),await this.addDrawings(w,G),await this.addTables(w,G),await Promise.all([this.addThemes(w,G),this.addStyles(w,G)]),await this.addMedia(w,G),await Promise.all([this.addApp(w,G),this.addCore(w,G)]),await this.addWorkbook(w,G),this._finalize(w)}writeFile(N,B){const G=s.createWriteStream(N);return new Promise((w,W)=>{G.on("finish",()=>{w()}),G.on("error",y=>{W(y)}),this.write(G,B).then(()=>{G.end()}).catch(y=>{W(y)})})}async writeBuffer(N){const B=new d;return await this.write(B,N),B.read()}}K.RelType=g("./rel-type"),C.exports=K}).call(this)}).call(this,g("_process"),g("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(g,C,i){C.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(g,C,i){(function(e){(function(){Object.defineProperty(i,"__esModule",{value:!0}),i.CsvFormatterStream=void 0;const A=g("stream"),s=g("./formatter");class l extends A.Transform{constructor(a){super({writableObjectMode:a.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=a,this.rowFormatter=new s.RowFormatter(a),this.hasWrittenBOM=!a.writeBOM}transform(a){return this.rowFormatter.rowTransform=a,this}_transform(a,d,o){let c=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(a,(r,h)=>r?(c=!0,o(r)):(h&&h.forEach(b=>{this.push(e.from(b,"utf8"))}),c=!0,o()))}catch(r){if(c)throw r;o(r)}}_flush(a){this.rowFormatter.finish((d,o)=>d?a(d):(o&&o.forEach(c=>{this.push(e.from(c,"utf8"))}),a()))}}i.CsvFormatterStream=l}).call(this)}).call(this,g("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.FormatterOptions=void 0,i.FormatterOptions=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var A;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),(e==null?void 0:e.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(e==null?void 0:e.quote)===!0?this.quote='"':(e==null?void 0:e.quote)===!1&&(this.quote=""),typeof(e==null?void 0:e.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((A=e.writeHeaders)===null||A===void 0||A),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(g,C,i){var e=function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(i,"__esModule",{value:!0}),i.FieldFormatter=void 0;const A=e(g("lodash.isboolean")),s=e(g("lodash.isnil")),l=e(g("lodash.escaperegexp"));i.FieldFormatter=class{constructor(n){this._headers=null,this.formatterOptions=n,n.headers!==null&&(this.headers=n.headers),this.REPLACE_REGEXP=new RegExp(n.quote,"g");const a=`[${n.delimiter}${l.default(n.rowDelimiter)}|\r|
]`;this.ESCAPE_REGEXP=new RegExp(a)}set headers(n){this._headers=n}shouldQuote(n,a){const d=a?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return A.default(d)?d:Array.isArray(d)?d[n]:this._headers!==null&&d[this._headers[n]]}format(n,a,d){const o=(""+(s.default(n)?"":n)).replace(/\0/g,""),{formatterOptions:c}=this;return c.quote!==""&&o.indexOf(c.quote)!==-1?this.quoteField(o.replace(this.REPLACE_REGEXP,c.escapedQuote)):o.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(a,d)?this.quoteField(o):o}quoteField(n){const{quote:a}=this.formatterOptions;return`${a}${n}${a}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(g,C,i){var e=function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0}),i.RowFormatter=void 0;const A=e(g("lodash.isfunction")),s=e(g("lodash.isequal")),l=g("./FieldFormatter"),n=g("../types");class a{constructor(o){this.rowCount=0,this.formatterOptions=o,this.fieldFormatter=new l.FieldFormatter(o),this.headers=o.headers,this.shouldWriteHeaders=o.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),o.transform&&(this.rowTransform=o.transform)}static isRowHashArray(o){return!!Array.isArray(o)&&Array.isArray(o[0])&&o[0].length===2}static isRowArray(o){return Array.isArray(o)&&!this.isRowHashArray(o)}static gatherHeaders(o){return a.isRowHashArray(o)?o.map(c=>c[0]):Array.isArray(o)?o:Object.keys(o)}static createTransform(o){return n.isSyncTransform(o)?(c,r)=>{let h=null;try{h=o(c)}catch(b){return r(b)}return r(null,h)}:(c,r)=>{o(c,r)}}set rowTransform(o){if(!A.default(o))throw new TypeError("The transform should be a function");this._rowTransform=a.createTransform(o)}format(o,c){this.callTransformer(o,(r,h)=>{if(r)return c(r);if(!o)return c(null);const b=[];if(h){const{shouldFormatColumns:u,headers:m}=this.checkHeaders(h);if(this.shouldWriteHeaders&&m&&!this.hasWrittenHeaders&&(b.push(this.formatColumns(m,!0)),this.hasWrittenHeaders=!0),u){const Z=this.gatherColumns(h);b.push(this.formatColumns(Z,!1))}}return c(null,b)})}finish(o){const c=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return o(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));c.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&c.push(this.formatterOptions.rowDelimiter),o(null,c)}checkHeaders(o){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const c=a.gatherHeaders(o);return this.headers=c,this.fieldFormatter.headers=c,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(c,o),headers:c}:{shouldFormatColumns:!0,headers:null}}gatherColumns(o){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(o)?a.isRowHashArray(o)?this.headers.map((c,r)=>{const h=o[r];return h?h[1]:""}):a.isRowArray(o)&&!this.shouldWriteHeaders?o:this.headers.map((c,r)=>o[r]):this.headers.map(c=>o[c])}callTransformer(o,c){return this._rowTransform?this._rowTransform(o,c):c(null,o)}formatColumns(o,c){const r=o.map((b,u)=>this.fieldFormatter.format(b,u,c)).join(this.formatterOptions.delimiter),{rowCount:h}=this;return this.rowCount+=1,h?[this.formatterOptions.rowDelimiter,r].join(""):r}}i.RowFormatter=a},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.FieldFormatter=i.RowFormatter=void 0;var e=g("./RowFormatter");Object.defineProperty(i,"RowFormatter",{enumerable:!0,get:function(){return e.RowFormatter}});var A=g("./FieldFormatter");Object.defineProperty(i,"FieldFormatter",{enumerable:!0,get:function(){return A.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(g,C,i){(function(e){(function(){var A=Object.create?function(u,m,Z,p){p===void 0&&(p=Z),Object.defineProperty(u,p,{enumerable:!0,get:function(){return m[Z]}})}:function(u,m,Z,p){p===void 0&&(p=Z),u[p]=m[Z]},s=Object.create?function(u,m){Object.defineProperty(u,"default",{enumerable:!0,value:m})}:function(u,m){u.default=m},l=function(u){if(u&&u.__esModule)return u;var m={};if(u!=null)for(var Z in u)Z!=="default"&&Object.prototype.hasOwnProperty.call(u,Z)&&A(m,u,Z);return s(m,u),m},n=function(u,m){for(var Z in u)Z==="default"||Object.prototype.hasOwnProperty.call(m,Z)||A(m,u,Z)};Object.defineProperty(i,"__esModule",{value:!0}),i.writeToPath=i.writeToString=i.writeToBuffer=i.writeToStream=i.write=i.format=i.FormatterOptions=i.CsvFormatterStream=void 0;const a=g("util"),d=g("stream"),o=l(g("fs")),c=g("./FormatterOptions"),r=g("./CsvFormatterStream");n(g("./types"),i);var h=g("./CsvFormatterStream");Object.defineProperty(i,"CsvFormatterStream",{enumerable:!0,get:function(){return h.CsvFormatterStream}});var b=g("./FormatterOptions");Object.defineProperty(i,"FormatterOptions",{enumerable:!0,get:function(){return b.FormatterOptions}}),i.format=u=>new r.CsvFormatterStream(new c.FormatterOptions(u)),i.write=(u,m)=>{const Z=i.format(m),p=a.promisify((Y,R)=>{Z.write(Y,void 0,R)});return u.reduce((Y,R)=>Y.then(()=>p(R)),Promise.resolve()).then(()=>Z.end()).catch(Y=>{Z.emit("error",Y)}),Z},i.writeToStream=(u,m,Z)=>i.write(m,Z).pipe(u),i.writeToBuffer=function(u){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Z=[],p=new d.Writable({write(Y,R,X){Z.push(Y),X()}});return new Promise((Y,R)=>{p.on("error",R).on("finish",()=>Y(e.concat(Z))),i.write(u,m).pipe(p)})},i.writeToString=(u,m)=>i.writeToBuffer(u,m).then(Z=>Z.toString()),i.writeToPath=(u,m,Z)=>{const p=o.createWriteStream(u,{encoding:"utf8"});return i.write(m,Z).pipe(p)}}).call(this)}).call(this,g("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isSyncTransform=void 0,i.isSyncTransform=e=>e.length===1},{}],153:[function(g,C,i){(function(e){(function(){Object.defineProperty(i,"__esModule",{value:!0}),i.CsvParserStream=void 0;const A=g("string_decoder"),s=g("stream"),l=g("./transforms"),n=g("./parser");class a extends s.Transform{constructor(o){super({objectMode:o.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=o,this.parser=new n.Parser(o),this.headerTransformer=new l.HeaderTransformer(o),this.decoder=new A.StringDecoder(o.encoding),this.rowTransformerValidator=new l.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(o){return this.rowTransformerValidator.rowTransform=o,this}validate(o){return this.rowTransformerValidator.rowValidator=o,this}emit(o){if(o==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var c=arguments.length,r=new Array(c>1?c-1:0),h=1;h<c;h++)r[h-1]=arguments[h];return super.emit(o,...r)}_transform(o,c,r){if(this.hasHitRowLimit)return r();const h=a.wrapDoneCallback(r);try{const{lines:b}=this,u=b+this.decoder.write(o),m=this.parse(u,!0);return this.processRows(m,h)}catch(b){return h(b)}}_flush(o){const c=a.wrapDoneCallback(o);if(this.hasHitRowLimit)return c();try{const r=this.lines+this.decoder.end(),h=this.parse(r,!1);return this.processRows(h,c)}catch(r){return c(r)}}parse(o,c){if(!o)return[];const{line:r,rows:h}=this.parser.parse(o,c);return this.lines=r,h}processRows(o,c){const r=o.length,h=b=>{const u=p=>p?c(p):b%100!=0?h(b+1):void e(()=>h(b+1));if(this.checkAndEmitHeaders(),b>=r||this.hasHitRowLimit)return c();if(this.parsedLineCount+=1,this.shouldSkipLine)return u();const m=o[b];this.rowCount+=1,this.parsedRowCount+=1;const Z=this.rowCount;return this.transformRow(m,(p,Y)=>{if(p)return this.rowCount-=1,u(p);if(!Y)return u(new Error("expected transform result"));if(Y.isValid){if(Y.row)return this.pushRow(Y.row,u)}else this.emit("data-invalid",Y.row,Z,Y.reason);return u()})};h(0)}transformRow(o,c){try{this.headerTransformer.transform(o,(r,h)=>r?c(r):h?h.isValid?h.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(h.row,c):this.skipRow(c):(this.rowCount-=1,this.parsedRowCount-=1,c(null,{row:null,isValid:!0})):this.shouldEmitRows?c(null,{isValid:!1,row:o}):this.skipRow(c):c(new Error("Expected result from header transform")))}catch(r){c(r)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(o){return this.rowCount-=1,o(null,{row:null,isValid:!0})}pushRow(o,c){try{this.parserOptions.objectMode?this.push(o):this.push(JSON.stringify(o)),c()}catch(r){c(r)}}static wrapDoneCallback(o){let c=!1;return function(r){if(r){if(c)throw r;return c=!0,void o(r)}for(var h=arguments.length,b=new Array(h>1?h-1:0),u=1;u<h;u++)b[u-1]=arguments[u];o(...b)}}}i.CsvParserStream=a}).call(this)}).call(this,g("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(g,C,i){var e=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0}),i.ParserOptions=void 0;const A=e(g("lodash.escaperegexp")),s=e(g("lodash.isnil"));i.ParserOptions=class{constructor(l){var n;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,l||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=A.default(this.delimiter),this.escapeChar=(n=this.escape)!==null&&n!==void 0?n:this.quote,this.supportsComments=!s.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(g,C,i){var e=Object.create?function(h,b,u,m){m===void 0&&(m=u),Object.defineProperty(h,m,{enumerable:!0,get:function(){return b[u]}})}:function(h,b,u,m){m===void 0&&(m=u),h[m]=b[u]},A=Object.create?function(h,b){Object.defineProperty(h,"default",{enumerable:!0,value:b})}:function(h,b){h.default=b},s=function(h){if(h&&h.__esModule)return h;var b={};if(h!=null)for(var u in h)u!=="default"&&Object.prototype.hasOwnProperty.call(h,u)&&e(b,h,u);return A(b,h),b},l=function(h,b){for(var u in h)u==="default"||Object.prototype.hasOwnProperty.call(b,u)||e(b,h,u)};Object.defineProperty(i,"__esModule",{value:!0}),i.parseString=i.parseFile=i.parseStream=i.parse=i.ParserOptions=i.CsvParserStream=void 0;const n=s(g("fs")),a=g("stream"),d=g("./ParserOptions"),o=g("./CsvParserStream");l(g("./types"),i);var c=g("./CsvParserStream");Object.defineProperty(i,"CsvParserStream",{enumerable:!0,get:function(){return c.CsvParserStream}});var r=g("./ParserOptions");Object.defineProperty(i,"ParserOptions",{enumerable:!0,get:function(){return r.ParserOptions}}),i.parse=h=>new o.CsvParserStream(new d.ParserOptions(h)),i.parseStream=(h,b)=>h.pipe(new o.CsvParserStream(new d.ParserOptions(b))),i.parseFile=function(h){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.createReadStream(h).pipe(new o.CsvParserStream(new d.ParserOptions(b)))},i.parseString=(h,b)=>{const u=new a.Readable;return u.push(h),u.push(null),u.pipe(new o.CsvParserStream(new d.ParserOptions(b)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Parser=void 0;const e=g("./Scanner"),A=g("./RowParser"),s=g("./Token");class l{constructor(a){this.parserOptions=a,this.rowParser=new A.RowParser(this.parserOptions)}static removeBOM(a){return a&&a.charCodeAt(0)===65279?a.slice(1):a}parse(a,d){const o=new e.Scanner({line:l.removeBOM(a),parserOptions:this.parserOptions,hasMoreData:d});return this.parserOptions.supportsComments?this.parseWithComments(o):this.parseWithoutComments(o)}parseWithoutComments(a){const d=[];let o=!0;for(;o;)o=this.parseRow(a,d);return{line:a.line,rows:d}}parseWithComments(a){const{parserOptions:d}=this,o=[];for(let c=a.nextCharacterToken;c!==null;c=a.nextCharacterToken)if(s.Token.isTokenComment(c,d)){if(a.advancePastLine()===null)return{line:a.lineFromCursor,rows:o};if(!a.hasMoreCharacters)return{line:a.lineFromCursor,rows:o};a.truncateToCursor()}else if(!this.parseRow(a,o))break;return{line:a.line,rows:o}}parseRow(a,d){if(!a.nextNonSpaceToken)return!1;const o=this.rowParser.parse(a);return o!==null&&(this.parserOptions.ignoreEmpty&&A.RowParser.isEmptyRow(o)||d.push(o),!0)}}i.Parser=l},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.RowParser=void 0;const e=g("./column"),A=g("./Token");i.RowParser=class{constructor(s){this.parserOptions=s,this.columnParser=new e.ColumnParser(s)}static isEmptyRow(s){return s.join("").replace(/\s+/g,"")===""}parse(s){const{parserOptions:l}=this,{hasMoreData:n}=s,a=s,d=[];let o=this.getStartToken(a,d);for(;o;){if(A.Token.isTokenRowDelimiter(o))return a.advancePastToken(o),!a.hasMoreCharacters&&A.Token.isTokenCarriageReturn(o,l)&&n?null:(a.truncateToCursor(),d);if(!this.shouldSkipColumnParse(a,o,d)){const c=this.columnParser.parse(a);if(c===null)return null;d.push(c)}o=a.nextNonSpaceToken}return n?null:(a.truncateToCursor(),d)}getStartToken(s,l){const n=s.nextNonSpaceToken;return n!==null&&A.Token.isTokenDelimiter(n,this.parserOptions)?(l.push(""),s.nextNonSpaceToken):n}shouldSkipColumnParse(s,l,n){const{parserOptions:a}=this;if(A.Token.isTokenDelimiter(l,a)){s.advancePastToken(l);const d=s.nextCharacterToken;if(!s.hasMoreCharacters||d!==null&&A.Token.isTokenRowDelimiter(d)||d!==null&&A.Token.isTokenDelimiter(d,a))return n.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Scanner=void 0;const e=g("./Token"),A=/((?:\r\n)|\n|\r)/;i.Scanner=class{constructor(s){this.cursor=0,this.line=s.line,this.lineLength=this.line.length,this.parserOptions=s.parserOptions,this.hasMoreData=s.hasMoreData,this.cursor=s.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:s}=this,l=this.parserOptions.NEXT_TOKEN_REGEXP;if(s.search(l)===-1)return null;const n=l.exec(s);if(n==null)return null;const a=n[1],d=this.cursor+(n.index||0);return new e.Token({token:a,startCursor:d,endCursor:d+a.length-1})}get nextCharacterToken(){const{cursor:s,lineLength:l}=this;return l<=s?null:new e.Token({token:this.line[s],startCursor:s,endCursor:s})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const s=A.exec(this.lineFromCursor);return s?(this.cursor+=(s.index||0)+s[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(s){return this.cursor=s,this}advanceToToken(s){return this.cursor=s.startCursor,this}advancePastToken(s){return this.cursor=s.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Token=void 0,i.Token=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){const A=e.token;return A==="\r"||A===`
`||A===`\r
`}static isTokenCarriageReturn(e,A){return e.token===A.carriageReturn}static isTokenComment(e,A){return A.supportsComments&&!!e&&e.token===A.comment}static isTokenEscapeCharacter(e,A){return e.token===A.escapeChar}static isTokenQuote(e,A){return e.token===A.quote}static isTokenDelimiter(e,A){return e.token===A.delimiter}}},{}],160:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ColumnFormatter=void 0,i.ColumnFormatter=class{constructor(e){e.trim?this.format=A=>A.trim():e.ltrim?this.format=A=>A.trimLeft():e.rtrim?this.format=A=>A.trimRight():this.format=A=>A}}},{}],161:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ColumnParser=void 0;const e=g("./NonQuotedColumnParser"),A=g("./QuotedColumnParser"),s=g("../Token");i.ColumnParser=class{constructor(l){this.parserOptions=l,this.quotedColumnParser=new A.QuotedColumnParser(l),this.nonQuotedColumnParser=new e.NonQuotedColumnParser(l)}parse(l){const{nextNonSpaceToken:n}=l;return n!==null&&s.Token.isTokenQuote(n,this.parserOptions)?(l.advanceToToken(n),this.quotedColumnParser.parse(l)):this.nonQuotedColumnParser.parse(l)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.NonQuotedColumnParser=void 0;const e=g("./ColumnFormatter"),A=g("../Token");i.NonQuotedColumnParser=class{constructor(s){this.parserOptions=s,this.columnFormatter=new e.ColumnFormatter(s)}parse(s){if(!s.hasMoreCharacters)return null;const{parserOptions:l}=this,n=[];let a=s.nextCharacterToken;for(;a&&!A.Token.isTokenDelimiter(a,l)&&!A.Token.isTokenRowDelimiter(a);a=s.nextCharacterToken)n.push(a.token),s.advancePastToken(a);return this.columnFormatter.format(n.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.QuotedColumnParser=void 0;const e=g("./ColumnFormatter"),A=g("../Token");i.QuotedColumnParser=class{constructor(s){this.parserOptions=s,this.columnFormatter=new e.ColumnFormatter(s)}parse(s){if(!s.hasMoreCharacters)return null;const l=s.cursor,{foundClosingQuote:n,col:a}=this.gatherDataBetweenQuotes(s);if(!n){if(s.advanceTo(l),!s.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${s.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(s),a}gatherDataBetweenQuotes(s){const{parserOptions:l}=this;let n=!1,a=!1;const d=[];let o=s.nextCharacterToken;for(;!a&&o!==null;o=s.nextCharacterToken){const c=A.Token.isTokenQuote(o,l);if(!n&&c)n=!0;else if(n)if(A.Token.isTokenEscapeCharacter(o,l)){s.advancePastToken(o);const r=s.nextCharacterToken;r!==null&&(A.Token.isTokenQuote(r,l)||A.Token.isTokenEscapeCharacter(r,l))?(d.push(r.token),o=r):c?a=!0:d.push(o.token)}else c?a=!0:d.push(o.token);s.advancePastToken(o)}return{col:this.columnFormatter.format(d.join("")),foundClosingQuote:a}}checkForMalformedColumn(s){const{parserOptions:l}=this,{nextNonSpaceToken:n}=s;if(n){const a=A.Token.isTokenDelimiter(n,l),d=A.Token.isTokenRowDelimiter(n);if(!a&&!d){const o=s.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${l.escapedDelimiter}' OR new line got: '${n.token}'. at '${o}`)}s.advanceToToken(n)}else s.hasMoreData||s.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ColumnFormatter=i.QuotedColumnParser=i.NonQuotedColumnParser=i.ColumnParser=void 0;var e=g("./ColumnParser");Object.defineProperty(i,"ColumnParser",{enumerable:!0,get:function(){return e.ColumnParser}});var A=g("./NonQuotedColumnParser");Object.defineProperty(i,"NonQuotedColumnParser",{enumerable:!0,get:function(){return A.NonQuotedColumnParser}});var s=g("./QuotedColumnParser");Object.defineProperty(i,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}});var l=g("./ColumnFormatter");Object.defineProperty(i,"ColumnFormatter",{enumerable:!0,get:function(){return l.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.QuotedColumnParser=i.NonQuotedColumnParser=i.ColumnParser=i.Token=i.Scanner=i.RowParser=i.Parser=void 0;var e=g("./Parser");Object.defineProperty(i,"Parser",{enumerable:!0,get:function(){return e.Parser}});var A=g("./RowParser");Object.defineProperty(i,"RowParser",{enumerable:!0,get:function(){return A.RowParser}});var s=g("./Scanner");Object.defineProperty(i,"Scanner",{enumerable:!0,get:function(){return s.Scanner}});var l=g("./Token");Object.defineProperty(i,"Token",{enumerable:!0,get:function(){return l.Token}});var n=g("./column");Object.defineProperty(i,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}}),Object.defineProperty(i,"NonQuotedColumnParser",{enumerable:!0,get:function(){return n.NonQuotedColumnParser}}),Object.defineProperty(i,"QuotedColumnParser",{enumerable:!0,get:function(){return n.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(g,C,i){var e=function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(i,"__esModule",{value:!0}),i.HeaderTransformer=void 0;const A=e(g("lodash.isundefined")),s=e(g("lodash.isfunction")),l=e(g("lodash.uniq")),n=e(g("lodash.groupby"));i.HeaderTransformer=class{constructor(a){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=a,a.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(a.headers)?this.setHeaders(a.headers):s.default(a.headers)&&(this.headersTransform=a.headers)}transform(a,d){return this.shouldMapRow(a)?d(null,this.processRow(a)):d(null,{row:null,isValid:!0})}shouldMapRow(a){const{parserOptions:d}=this;if(!this.headersTransform&&d.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(a)){if(this.headersTransform)this.setHeaders(this.headersTransform(a));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(a)}return!1}return!0}processRow(a){if(!this.headers)return{row:a,isValid:!0};const{parserOptions:d}=this;if(!d.discardUnmappedColumns&&a.length>this.headersLength){if(!d.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${a.length}`);return{row:a,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${a.length}`}}return d.strictColumnHandling&&a.length<this.headersLength?{row:a,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${a.length}`}:{row:this.mapHeaders(a),isValid:!0}}mapHeaders(a){const d={},{headers:o,headersLength:c}=this;for(let r=0;r<c;r+=1){const h=o[r];if(!A.default(h)){const b=a[r];A.default(b)?d[h]="":d[h]=b}}return d}setHeaders(a){var d;const o=a.filter(c=>!!c);if(l.default(o).length!==o.length){const c=n.default(o),r=Object.keys(c).filter(h=>c[h].length>1);throw new Error("Duplicate headers found "+JSON.stringify(r))}this.headers=a,this.receivedHeaders=!0,this.headersLength=((d=this.headers)===null||d===void 0?void 0:d.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(g,C,i){var e=function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(i,"__esModule",{value:!0}),i.RowTransformerValidator=void 0;const A=e(g("lodash.isfunction")),s=g("../types");class l{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(a){return s.isSyncTransform(a)?(d,o)=>{let c=null;try{c=a(d)}catch(r){return o(r)}return o(null,c)}:a}static createValidator(a){return s.isSyncValidate(a)?(d,o)=>{o(null,{row:d,isValid:a(d)})}:(d,o)=>{a(d,(c,r,h)=>c?o(c):o(null,r?{row:d,isValid:r,reason:h}:{row:d,isValid:!1,reason:h}))}}set rowTransform(a){if(!A.default(a))throw new TypeError("The transform should be a function");this._rowTransform=l.createTransform(a)}set rowValidator(a){if(!A.default(a))throw new TypeError("The validate should be a function");this._rowValidator=l.createValidator(a)}transformAndValidate(a,d){return this.callTransformer(a,(o,c)=>o?d(o):c?this.callValidator(c,(r,h)=>r?d(r):h&&!h.isValid?d(null,{row:c,isValid:!1,reason:h.reason}):d(null,{row:c,isValid:!0})):d(null,{row:null,isValid:!0}))}callTransformer(a,d){return this._rowTransform?this._rowTransform(a,d):d(null,a)}callValidator(a,d){return this._rowValidator?this._rowValidator(a,d):d(null,{row:a,isValid:!0})}}i.RowTransformerValidator=l},{"../types":169,"lodash.isfunction":446}],168:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.HeaderTransformer=i.RowTransformerValidator=void 0;var e=g("./RowTransformerValidator");Object.defineProperty(i,"RowTransformerValidator",{enumerable:!0,get:function(){return e.RowTransformerValidator}});var A=g("./HeaderTransformer");Object.defineProperty(i,"HeaderTransformer",{enumerable:!0,get:function(){return A.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isSyncValidate=i.isSyncTransform=void 0,i.isSyncTransform=e=>e.length===1,i.isSyncValidate=e=>e.length===1},{}],170:[function(g,C,i){const e=i;e.bignum=g("bn.js"),e.define=g("./asn1/api").define,e.base=g("./asn1/base"),e.constants=g("./asn1/constants"),e.decoders=g("./asn1/decoders"),e.encoders=g("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(g,C,i){const e=g("./encoders"),A=g("./decoders"),s=g("inherits");function l(n,a){this.name=n,this.body=a,this.decoders={},this.encoders={}}i.define=function(n,a){return new l(n,a)},l.prototype._createNamed=function(n){const a=this.name;function d(o){this._initNamed(o,a)}return s(d,n),d.prototype._initNamed=function(o,c){n.call(this,o,c)},new d(this)},l.prototype._getDecoder=function(n){return n=n||"der",this.decoders.hasOwnProperty(n)||(this.decoders[n]=this._createNamed(A[n])),this.decoders[n]},l.prototype.decode=function(n,a,d){return this._getDecoder(a).decode(n,d)},l.prototype._getEncoder=function(n){return n=n||"der",this.encoders.hasOwnProperty(n)||(this.encoders[n]=this._createNamed(e[n])),this.encoders[n]},l.prototype.encode=function(n,a,d){return this._getEncoder(a).encode(n,d)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(g,C,i){const e=g("inherits"),A=g("../base/reporter").Reporter,s=g("safer-buffer").Buffer;function l(a,d){A.call(this,d),s.isBuffer(a)?(this.base=a,this.offset=0,this.length=a.length):this.error("Input not Buffer")}function n(a,d){if(Array.isArray(a))this.length=0,this.value=a.map(function(o){return n.isEncoderBuffer(o)||(o=new n(o,d)),this.length+=o.length,o},this);else if(typeof a=="number"){if(!(0<=a&&a<=255))return d.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if(typeof a=="string")this.value=a,this.length=s.byteLength(a);else{if(!s.isBuffer(a))return d.error("Unsupported type: "+typeof a);this.value=a,this.length=a.length}}e(l,A),i.DecoderBuffer=l,l.isDecoderBuffer=function(a){return a instanceof l?!0:typeof a=="object"&&s.isBuffer(a.base)&&a.constructor.name==="DecoderBuffer"&&typeof a.offset=="number"&&typeof a.length=="number"&&typeof a.save=="function"&&typeof a.restore=="function"&&typeof a.isEmpty=="function"&&typeof a.readUInt8=="function"&&typeof a.skip=="function"&&typeof a.raw=="function"},l.prototype.save=function(){return{offset:this.offset,reporter:A.prototype.save.call(this)}},l.prototype.restore=function(a){const d=new l(this.base);return d.offset=a.offset,d.length=this.offset,this.offset=a.offset,A.prototype.restore.call(this,a.reporter),d},l.prototype.isEmpty=function(){return this.offset===this.length},l.prototype.readUInt8=function(a){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(a||"DecoderBuffer overrun")},l.prototype.skip=function(a,d){if(!(this.offset+a<=this.length))return this.error(d||"DecoderBuffer overrun");const o=new l(this.base);return o._reporterState=this._reporterState,o.offset=this.offset,o.length=this.offset+a,this.offset+=a,o},l.prototype.raw=function(a){return this.base.slice(a?a.offset:this.offset,this.length)},i.EncoderBuffer=n,n.isEncoderBuffer=function(a){return a instanceof n?!0:typeof a=="object"&&a.constructor.name==="EncoderBuffer"&&typeof a.length=="number"&&typeof a.join=="function"},n.prototype.join=function(a,d){return a||(a=s.alloc(this.length)),d||(d=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(o){o.join(a,d),d+=o.length}):(typeof this.value=="number"?a[d]=this.value:typeof this.value=="string"?a.write(this.value,d):s.isBuffer(this.value)&&this.value.copy(a,d),d+=this.length)),a}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(g,C,i){const e=i;e.Reporter=g("./reporter").Reporter,e.DecoderBuffer=g("./buffer").DecoderBuffer,e.EncoderBuffer=g("./buffer").EncoderBuffer,e.Node=g("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(g,C,i){const e=g("../base/reporter").Reporter,A=g("../base/buffer").EncoderBuffer,s=g("../base/buffer").DecoderBuffer,l=g("minimalistic-assert"),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],a=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n);function d(c,r,h){const b={};this._baseState=b,b.name=h,b.enc=c,b.parent=r||null,b.children=null,b.tag=null,b.args=null,b.reverseArgs=null,b.choice=null,b.optional=!1,b.any=!1,b.obj=!1,b.use=null,b.useDecoder=null,b.key=null,b.default=null,b.explicit=null,b.implicit=null,b.contains=null,b.parent||(b.children=[],this._wrap())}C.exports=d;const o=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];d.prototype.clone=function(){const c=this._baseState,r={};o.forEach(function(b){r[b]=c[b]});const h=new this.constructor(r.parent);return h._baseState=r,h},d.prototype._wrap=function(){const c=this._baseState;a.forEach(function(r){this[r]=function(){const h=new this.constructor(this);return c.children.push(h),h[r].apply(h,arguments)}},this)},d.prototype._init=function(c){const r=this._baseState;l(r.parent===null),c.call(this),r.children=r.children.filter(function(h){return h._baseState.parent===this},this),l.equal(r.children.length,1,"Root node can have only one child")},d.prototype._useArgs=function(c){const r=this._baseState,h=c.filter(function(b){return b instanceof this.constructor},this);c=c.filter(function(b){return!(b instanceof this.constructor)},this),h.length!==0&&(l(r.children===null),r.children=h,h.forEach(function(b){b._baseState.parent=this},this)),c.length!==0&&(l(r.args===null),r.args=c,r.reverseArgs=c.map(function(b){if(typeof b!="object"||b.constructor!==Object)return b;const u={};return Object.keys(b).forEach(function(m){m==(0|m)&&(m|=0);const Z=b[m];u[Z]=m}),u}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(c){d.prototype[c]=function(){const r=this._baseState;throw new Error(c+" not implemented for encoding: "+r.enc)}}),n.forEach(function(c){d.prototype[c]=function(){const r=this._baseState,h=Array.prototype.slice.call(arguments);return l(r.tag===null),r.tag=c,this._useArgs(h),this}}),d.prototype.use=function(c){l(c);const r=this._baseState;return l(r.use===null),r.use=c,this},d.prototype.optional=function(){return this._baseState.optional=!0,this},d.prototype.def=function(c){const r=this._baseState;return l(r.default===null),r.default=c,r.optional=!0,this},d.prototype.explicit=function(c){const r=this._baseState;return l(r.explicit===null&&r.implicit===null),r.explicit=c,this},d.prototype.implicit=function(c){const r=this._baseState;return l(r.explicit===null&&r.implicit===null),r.implicit=c,this},d.prototype.obj=function(){const c=this._baseState,r=Array.prototype.slice.call(arguments);return c.obj=!0,r.length!==0&&this._useArgs(r),this},d.prototype.key=function(c){const r=this._baseState;return l(r.key===null),r.key=c,this},d.prototype.any=function(){return this._baseState.any=!0,this},d.prototype.choice=function(c){const r=this._baseState;return l(r.choice===null),r.choice=c,this._useArgs(Object.keys(c).map(function(h){return c[h]})),this},d.prototype.contains=function(c){const r=this._baseState;return l(r.use===null),r.contains=c,this},d.prototype._decode=function(c,r){const h=this._baseState;if(h.parent===null)return c.wrapResult(h.children[0]._decode(c,r));let b,u=h.default,m=!0,Z=null;if(h.key!==null&&(Z=c.enterKey(h.key)),h.optional){let p=null;if(h.explicit!==null?p=h.explicit:h.implicit!==null?p=h.implicit:h.tag!==null&&(p=h.tag),p!==null||h.any){if(m=this._peekTag(c,p,h.any),c.isError(m))return m}else{const Y=c.save();try{h.choice===null?this._decodeGeneric(h.tag,c,r):this._decodeChoice(c,r),m=!0}catch{m=!1}c.restore(Y)}}if(h.obj&&m&&(b=c.enterObject()),m){if(h.explicit!==null){const Y=this._decodeTag(c,h.explicit);if(c.isError(Y))return Y;c=Y}const p=c.offset;if(h.use===null&&h.choice===null){let Y;h.any&&(Y=c.save());const R=this._decodeTag(c,h.implicit!==null?h.implicit:h.tag,h.any);if(c.isError(R))return R;h.any?u=c.raw(Y):c=R}if(r&&r.track&&h.tag!==null&&r.track(c.path(),p,c.length,"tagged"),r&&r.track&&h.tag!==null&&r.track(c.path(),c.offset,c.length,"content"),h.any||(u=h.choice===null?this._decodeGeneric(h.tag,c,r):this._decodeChoice(c,r)),c.isError(u))return u;if(h.any||h.choice!==null||h.children===null||h.children.forEach(function(Y){Y._decode(c,r)}),h.contains&&(h.tag==="octstr"||h.tag==="bitstr")){const Y=new s(u);u=this._getUse(h.contains,c._reporterState.obj)._decode(Y,r)}}return h.obj&&m&&(u=c.leaveObject(b)),h.key===null||u===null&&m!==!0?Z!==null&&c.exitKey(Z):c.leaveKey(Z,h.key,u),u},d.prototype._decodeGeneric=function(c,r,h){const b=this._baseState;return c==="seq"||c==="set"?null:c==="seqof"||c==="setof"?this._decodeList(r,c,b.args[0],h):/str$/.test(c)?this._decodeStr(r,c,h):c==="objid"&&b.args?this._decodeObjid(r,b.args[0],b.args[1],h):c==="objid"?this._decodeObjid(r,null,null,h):c==="gentime"||c==="utctime"?this._decodeTime(r,c,h):c==="null_"?this._decodeNull(r,h):c==="bool"?this._decodeBool(r,h):c==="objDesc"?this._decodeStr(r,c,h):c==="int"||c==="enum"?this._decodeInt(r,b.args&&b.args[0],h):b.use!==null?this._getUse(b.use,r._reporterState.obj)._decode(r,h):r.error("unknown tag: "+c)},d.prototype._getUse=function(c,r){const h=this._baseState;return h.useDecoder=this._use(c,r),l(h.useDecoder._baseState.parent===null),h.useDecoder=h.useDecoder._baseState.children[0],h.implicit!==h.useDecoder._baseState.implicit&&(h.useDecoder=h.useDecoder.clone(),h.useDecoder._baseState.implicit=h.implicit),h.useDecoder},d.prototype._decodeChoice=function(c,r){const h=this._baseState;let b=null,u=!1;return Object.keys(h.choice).some(function(m){const Z=c.save(),p=h.choice[m];try{const Y=p._decode(c,r);if(c.isError(Y))return!1;b={type:m,value:Y},u=!0}catch{return c.restore(Z),!1}return!0},this),u?b:c.error("Choice not matched")},d.prototype._createEncoderBuffer=function(c){return new A(c,this.reporter)},d.prototype._encode=function(c,r,h){const b=this._baseState;if(b.default!==null&&b.default===c)return;const u=this._encodeValue(c,r,h);return u===void 0||this._skipDefault(u,r,h)?void 0:u},d.prototype._encodeValue=function(c,r,h){const b=this._baseState;if(b.parent===null)return b.children[0]._encode(c,r||new e);let u=null;if(this.reporter=r,b.optional&&c===void 0){if(b.default===null)return;c=b.default}let m=null,Z=!1;if(b.any)u=this._createEncoderBuffer(c);else if(b.choice)u=this._encodeChoice(c,r);else if(b.contains)m=this._getUse(b.contains,h)._encode(c,r),Z=!0;else if(b.children)m=b.children.map(function(p){if(p._baseState.tag==="null_")return p._encode(null,r,c);if(p._baseState.key===null)return r.error("Child should have a key");const Y=r.enterKey(p._baseState.key);if(typeof c!="object")return r.error("Child expected, but input is not object");const R=p._encode(c[p._baseState.key],r,c);return r.leaveKey(Y),R},this).filter(function(p){return p}),m=this._createEncoderBuffer(m);else if(b.tag==="seqof"||b.tag==="setof"){if(!b.args||b.args.length!==1)return r.error("Too many args for : "+b.tag);if(!Array.isArray(c))return r.error("seqof/setof, but data is not Array");const p=this.clone();p._baseState.implicit=null,m=this._createEncoderBuffer(c.map(function(Y){const R=this._baseState;return this._getUse(R.args[0],c)._encode(Y,r)},p))}else b.use!==null?u=this._getUse(b.use,h)._encode(c,r):(m=this._encodePrimitive(b.tag,c),Z=!0);if(!b.any&&b.choice===null){const p=b.implicit!==null?b.implicit:b.tag,Y=b.implicit===null?"universal":"context";p===null?b.use===null&&r.error("Tag could be omitted only for .use()"):b.use===null&&(u=this._encodeComposite(p,Z,Y,m))}return b.explicit!==null&&(u=this._encodeComposite(b.explicit,!1,"context",u)),u},d.prototype._encodeChoice=function(c,r){const h=this._baseState,b=h.choice[c.type];return b||l(!1,c.type+" not found in "+JSON.stringify(Object.keys(h.choice))),b._encode(c.value,r)},d.prototype._encodePrimitive=function(c,r){const h=this._baseState;if(/str$/.test(c))return this._encodeStr(r,c);if(c==="objid"&&h.args)return this._encodeObjid(r,h.reverseArgs[0],h.args[1]);if(c==="objid")return this._encodeObjid(r,null,null);if(c==="gentime"||c==="utctime")return this._encodeTime(r,c);if(c==="null_")return this._encodeNull();if(c==="int"||c==="enum")return this._encodeInt(r,h.args&&h.reverseArgs[0]);if(c==="bool")return this._encodeBool(r);if(c==="objDesc")return this._encodeStr(r,c);throw new Error("Unsupported tag: "+c)},d.prototype._isNumstr=function(c){return/^[0-9 ]*$/.test(c)},d.prototype._isPrintstr=function(c){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(c)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(g,C,i){const e=g("inherits");function A(l){this._reporterState={obj:null,path:[],options:l||{},errors:[]}}function s(l,n){this.path=l,this.rethrow(n)}i.Reporter=A,A.prototype.isError=function(l){return l instanceof s},A.prototype.save=function(){const l=this._reporterState;return{obj:l.obj,pathLen:l.path.length}},A.prototype.restore=function(l){const n=this._reporterState;n.obj=l.obj,n.path=n.path.slice(0,l.pathLen)},A.prototype.enterKey=function(l){return this._reporterState.path.push(l)},A.prototype.exitKey=function(l){const n=this._reporterState;n.path=n.path.slice(0,l-1)},A.prototype.leaveKey=function(l,n,a){const d=this._reporterState;this.exitKey(l),d.obj!==null&&(d.obj[n]=a)},A.prototype.path=function(){return this._reporterState.path.join("/")},A.prototype.enterObject=function(){const l=this._reporterState,n=l.obj;return l.obj={},n},A.prototype.leaveObject=function(l){const n=this._reporterState,a=n.obj;return n.obj=l,a},A.prototype.error=function(l){let n;const a=this._reporterState,d=l instanceof s;if(n=d?l:new s(a.path.map(function(o){return"["+JSON.stringify(o)+"]"}).join(""),l.message||l,l.stack),!a.options.partial)throw n;return d||a.errors.push(n),n},A.prototype.wrapResult=function(l){const n=this._reporterState;return n.options.partial?{result:this.isError(l)?null:l,errors:n.errors}:l},e(s,Error),s.prototype.rethrow=function(l){if(this.message=l+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(n){this.stack=n.stack}return this}},{inherits:440}],176:[function(g,C,i){function e(A){const s={};return Object.keys(A).forEach(function(l){(0|l)==l&&(l|=0);const n=A[l];s[n]=l}),s}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=e(i.tagClass),i.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},i.tagByName=e(i.tag)},{}],177:[function(g,C,i){const e=i;e._reverse=function(A){const s={};return Object.keys(A).forEach(function(l){(0|l)==l&&(l|=0);const n=A[l];s[n]=l}),s},e.der=g("./der")},{"./der":176}],178:[function(g,C,i){const e=g("inherits"),A=g("bn.js"),s=g("../base/buffer").DecoderBuffer,l=g("../base/node"),n=g("../constants/der");function a(r){this.enc="der",this.name=r.name,this.entity=r,this.tree=new d,this.tree._init(r.body)}function d(r){l.call(this,"der",r)}function o(r,h){let b=r.readUInt8(h);if(r.isError(b))return b;const u=n.tagClass[b>>6],m=(32&b)==0;if((31&b)==31){let Z=b;for(b=0;(128&Z)==128;){if(Z=r.readUInt8(h),r.isError(Z))return Z;b<<=7,b|=127&Z}}else b&=31;return{cls:u,primitive:m,tag:b,tagStr:n.tag[b]}}function c(r,h,b){let u=r.readUInt8(b);if(r.isError(u))return u;if(!h&&u===128)return null;if((128&u)==0)return u;const m=127&u;if(m>4)return r.error("length octect is too long");u=0;for(let Z=0;Z<m;Z++){u<<=8;const p=r.readUInt8(b);if(r.isError(p))return p;u|=p}return u}C.exports=a,a.prototype.decode=function(r,h){return s.isDecoderBuffer(r)||(r=new s(r,h)),this.tree._decode(r,h)},e(d,l),d.prototype._peekTag=function(r,h,b){if(r.isEmpty())return!1;const u=r.save(),m=o(r,'Failed to peek tag: "'+h+'"');return r.isError(m)?m:(r.restore(u),m.tag===h||m.tagStr===h||m.tagStr+"of"===h||b)},d.prototype._decodeTag=function(r,h,b){const u=o(r,'Failed to decode tag of "'+h+'"');if(r.isError(u))return u;let m=c(r,u.primitive,'Failed to get length of "'+h+'"');if(r.isError(m))return m;if(!b&&u.tag!==h&&u.tagStr!==h&&u.tagStr+"of"!==h)return r.error('Failed to match tag: "'+h+'"');if(u.primitive||m!==null)return r.skip(m,'Failed to match body of: "'+h+'"');const Z=r.save(),p=this._skipUntilEnd(r,'Failed to skip indefinite length body: "'+this.tag+'"');return r.isError(p)?p:(m=r.offset-Z.offset,r.restore(Z),r.skip(m,'Failed to match body of: "'+h+'"'))},d.prototype._skipUntilEnd=function(r,h){for(;;){const b=o(r,h);if(r.isError(b))return b;const u=c(r,b.primitive,h);if(r.isError(u))return u;let m;if(m=b.primitive||u!==null?r.skip(u):this._skipUntilEnd(r,h),r.isError(m))return m;if(b.tagStr==="end")break}},d.prototype._decodeList=function(r,h,b,u){const m=[];for(;!r.isEmpty();){const Z=this._peekTag(r,"end");if(r.isError(Z))return Z;const p=b.decode(r,"der",u);if(r.isError(p)&&Z)break;m.push(p)}return m},d.prototype._decodeStr=function(r,h){if(h==="bitstr"){const b=r.readUInt8();return r.isError(b)?b:{unused:b,data:r.raw()}}if(h==="bmpstr"){const b=r.raw();if(b.length%2==1)return r.error("Decoding of string type: bmpstr length mismatch");let u="";for(let m=0;m<b.length/2;m++)u+=String.fromCharCode(b.readUInt16BE(2*m));return u}if(h==="numstr"){const b=r.raw().toString("ascii");return this._isNumstr(b)?b:r.error("Decoding of string type: numstr unsupported characters")}if(h==="octstr"||h==="objDesc")return r.raw();if(h==="printstr"){const b=r.raw().toString("ascii");return this._isPrintstr(b)?b:r.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(h)?r.raw().toString():r.error("Decoding of string type: "+h+" unsupported")},d.prototype._decodeObjid=function(r,h,b){let u;const m=[];let Z=0,p=0;for(;!r.isEmpty();)p=r.readUInt8(),Z<<=7,Z|=127&p,(128&p)==0&&(m.push(Z),Z=0);128&p&&m.push(Z);const Y=m[0]/40|0,R=m[0]%40;if(u=b?m:[Y,R].concat(m.slice(1)),h){let X=h[u.join(" ")];X===void 0&&(X=h[u.join(".")]),X!==void 0&&(u=X)}return u},d.prototype._decodeTime=function(r,h){const b=r.raw().toString();let u,m,Z,p,Y,R;if(h==="gentime")u=0|b.slice(0,4),m=0|b.slice(4,6),Z=0|b.slice(6,8),p=0|b.slice(8,10),Y=0|b.slice(10,12),R=0|b.slice(12,14);else{if(h!=="utctime")return r.error("Decoding "+h+" time is not supported yet");u=0|b.slice(0,2),m=0|b.slice(2,4),Z=0|b.slice(4,6),p=0|b.slice(6,8),Y=0|b.slice(8,10),R=0|b.slice(10,12),u=u<70?2e3+u:1900+u}return Date.UTC(u,m-1,Z,p,Y,R,0)},d.prototype._decodeNull=function(){return null},d.prototype._decodeBool=function(r){const h=r.readUInt8();return r.isError(h)?h:h!==0},d.prototype._decodeInt=function(r,h){const b=r.raw();let u=new A(b);return h&&(u=h[u.toString(10)]||u),u},d.prototype._use=function(r,h){return typeof r=="function"&&(r=r(h)),r._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(g,C,i){const e=i;e.der=g("./der"),e.pem=g("./pem")},{"./der":178,"./pem":180}],180:[function(g,C,i){const e=g("inherits"),A=g("safer-buffer").Buffer,s=g("./der");function l(n){s.call(this,n),this.enc="pem"}e(l,s),C.exports=l,l.prototype.decode=function(n,a){const d=n.toString().split(/[\r\n]+/g),o=a.label.toUpperCase(),c=/^-----(BEGIN|END) ([^-]+)-----$/;let r=-1,h=-1;for(let m=0;m<d.length;m++){const Z=d[m].match(c);if(Z!==null&&Z[2]===o){if(r!==-1){if(Z[1]!=="END")break;h=m;break}if(Z[1]!=="BEGIN")break;r=m}}if(r===-1||h===-1)throw new Error("PEM section not found for: "+o);const b=d.slice(r+1,h).join("");b.replace(/[^a-z0-9+/=]+/gi,"");const u=A.from(b,"base64");return s.prototype.decode.call(this,u,a)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(g,C,i){const e=g("inherits"),A=g("safer-buffer").Buffer,s=g("../base/node"),l=g("../constants/der");function n(o){this.enc="der",this.name=o.name,this.entity=o,this.tree=new a,this.tree._init(o.body)}function a(o){s.call(this,"der",o)}function d(o){return o<10?"0"+o:o}C.exports=n,n.prototype.encode=function(o,c){return this.tree._encode(o,c).join()},e(a,s),a.prototype._encodeComposite=function(o,c,r,h){const b=function(Z,p,Y,R){let X;if(Z==="seqof"?Z="seq":Z==="setof"&&(Z="set"),l.tagByName.hasOwnProperty(Z))X=l.tagByName[Z];else{if(typeof Z!="number"||(0|Z)!==Z)return R.error("Unknown tag: "+Z);X=Z}return X>=31?R.error("Multi-octet tag encoding unsupported"):(p||(X|=32),X|=l.tagClassByName[Y||"universal"]<<6,X)}(o,c,r,this.reporter);if(h.length<128){const Z=A.alloc(2);return Z[0]=b,Z[1]=h.length,this._createEncoderBuffer([Z,h])}let u=1;for(let Z=h.length;Z>=256;Z>>=8)u++;const m=A.alloc(2+u);m[0]=b,m[1]=128|u;for(let Z=1+u,p=h.length;p>0;Z--,p>>=8)m[Z]=255&p;return this._createEncoderBuffer([m,h])},a.prototype._encodeStr=function(o,c){if(c==="bitstr")return this._createEncoderBuffer([0|o.unused,o.data]);if(c==="bmpstr"){const r=A.alloc(2*o.length);for(let h=0;h<o.length;h++)r.writeUInt16BE(o.charCodeAt(h),2*h);return this._createEncoderBuffer(r)}return c==="numstr"?this._isNumstr(o)?this._createEncoderBuffer(o):this.reporter.error("Encoding of string type: numstr supports only digits and space"):c==="printstr"?this._isPrintstr(o)?this._createEncoderBuffer(o):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(c)||c==="objDesc"?this._createEncoderBuffer(o):this.reporter.error("Encoding of string type: "+c+" unsupported")},a.prototype._encodeObjid=function(o,c,r){if(typeof o=="string"){if(!c)return this.reporter.error("string objid given, but no values map found");if(!c.hasOwnProperty(o))return this.reporter.error("objid not found in values map");o=c[o].split(/[\s.]+/g);for(let m=0;m<o.length;m++)o[m]|=0}else if(Array.isArray(o)){o=o.slice();for(let m=0;m<o.length;m++)o[m]|=0}if(!Array.isArray(o))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(o));if(!r){if(o[1]>=40)return this.reporter.error("Second objid identifier OOB");o.splice(0,2,40*o[0]+o[1])}let h=0;for(let m=0;m<o.length;m++){let Z=o[m];for(h++;Z>=128;Z>>=7)h++}const b=A.alloc(h);let u=b.length-1;for(let m=o.length-1;m>=0;m--){let Z=o[m];for(b[u--]=127&Z;(Z>>=7)>0;)b[u--]=128|127&Z}return this._createEncoderBuffer(b)},a.prototype._encodeTime=function(o,c){let r;const h=new Date(o);return c==="gentime"?r=[d(h.getUTCFullYear()),d(h.getUTCMonth()+1),d(h.getUTCDate()),d(h.getUTCHours()),d(h.getUTCMinutes()),d(h.getUTCSeconds()),"Z"].join(""):c==="utctime"?r=[d(h.getUTCFullYear()%100),d(h.getUTCMonth()+1),d(h.getUTCDate()),d(h.getUTCHours()),d(h.getUTCMinutes()),d(h.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+c+" time is not supported yet"),this._encodeStr(r,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(o,c){if(typeof o=="string"){if(!c)return this.reporter.error("String int or enum given, but no values map");if(!c.hasOwnProperty(o))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(o));o=c[o]}if(typeof o!="number"&&!A.isBuffer(o)){const b=o.toArray();!o.sign&&128&b[0]&&b.unshift(0),o=A.from(b)}if(A.isBuffer(o)){let b=o.length;o.length===0&&b++;const u=A.alloc(b);return o.copy(u),o.length===0&&(u[0]=0),this._createEncoderBuffer(u)}if(o<128)return this._createEncoderBuffer(o);if(o<256)return this._createEncoderBuffer([0,o]);let r=1;for(let b=o;b>=256;b>>=8)r++;const h=new Array(r);for(let b=h.length-1;b>=0;b--)h[b]=255&o,o>>=8;return 128&h[0]&&h.unshift(0),this._createEncoderBuffer(A.from(h))},a.prototype._encodeBool=function(o){return this._createEncoderBuffer(o?255:0)},a.prototype._use=function(o,c){return typeof o=="function"&&(o=o(c)),o._getEncoder("der").tree},a.prototype._skipDefault=function(o,c,r){const h=this._baseState;let b;if(h.default===null)return!1;const u=o.join();if(h.defaultBuffer===void 0&&(h.defaultBuffer=this._encodeValue(h.default,c,r).join()),u.length!==h.defaultBuffer.length)return!1;for(b=0;b<u.length;b++)if(u[b]!==h.defaultBuffer[b])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(g,C,i){const e=i;e.der=g("./der"),e.pem=g("./pem")},{"./der":181,"./pem":183}],183:[function(g,C,i){const e=g("inherits"),A=g("./der");function s(l){A.call(this,l),this.enc="pem"}e(s,A),C.exports=s,s.prototype.encode=function(l,n){const a=A.prototype.encode.call(this,l).toString("base64"),d=["-----BEGIN "+n.label+"-----"];for(let o=0;o<a.length;o+=64)d.push(a.slice(o,o+64));return d.push("-----END "+n.label+"-----"),d.join(`
`)}},{"./der":181,inherits:440}],184:[function(g,C,i){(function(e,A){function s(V,N){if(!V)throw new Error(N||"Assertion failed")}function l(V,N){V.super_=N;var B=function(){};B.prototype=N.prototype,V.prototype=new B,V.prototype.constructor=V}function n(V,N,B){if(n.isBN(V))return V;this.negative=0,this.words=null,this.length=0,this.red=null,V!==null&&(N!=="le"&&N!=="be"||(B=N,N=10),this._init(V||0,N||10,B||"be"))}var a;typeof e=="object"?e.exports=n:(void 0).BN=n,n.BN=n,n.wordSize=26;try{a=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:g("buffer").Buffer}catch{}function d(V,N){var B=V.charCodeAt(N);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function o(V,N,B){var G=d(V,B);return B-1>=N&&(G|=d(V,B-1)<<4),G}function c(V,N,B,G){for(var w=0,W=Math.min(V.length,B),y=N;y<W;y++){var f=V.charCodeAt(y)-48;w*=G,w+=f>=49?f-49+10:f>=17?f-17+10:f}return w}n.isBN=function(V){return V instanceof n||V!==null&&typeof V=="object"&&V.constructor.wordSize===n.wordSize&&Array.isArray(V.words)},n.max=function(V,N){return V.cmp(N)>0?V:N},n.min=function(V,N){return V.cmp(N)<0?V:N},n.prototype._init=function(V,N,B){if(typeof V=="number")return this._initNumber(V,N,B);if(typeof V=="object")return this._initArray(V,N,B);N==="hex"&&(N=16),s(N===(0|N)&&N>=2&&N<=36);var G=0;(V=V.toString().replace(/\s+/g,""))[0]==="-"&&(G++,this.negative=1),G<V.length&&(N===16?this._parseHex(V,G,B):(this._parseBase(V,N,G),B==="le"&&this._initArray(this.toArray(),N,B)))},n.prototype._initNumber=function(V,N,B){V<0&&(this.negative=1,V=-V),V<67108864?(this.words=[67108863&V],this.length=1):V<4503599627370496?(this.words=[67108863&V,V/67108864&67108863],this.length=2):(s(V<9007199254740992),this.words=[67108863&V,V/67108864&67108863,1],this.length=3),B==="le"&&this._initArray(this.toArray(),N,B)},n.prototype._initArray=function(V,N,B){if(s(typeof V.length=="number"),V.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(V.length/3),this.words=new Array(this.length);for(var G=0;G<this.length;G++)this.words[G]=0;var w,W,y=0;if(B==="be")for(G=V.length-1,w=0;G>=0;G-=3)W=V[G]|V[G-1]<<8|V[G-2]<<16,this.words[w]|=W<<y&67108863,this.words[w+1]=W>>>26-y&67108863,(y+=24)>=26&&(y-=26,w++);else if(B==="le")for(G=0,w=0;G<V.length;G+=3)W=V[G]|V[G+1]<<8|V[G+2]<<16,this.words[w]|=W<<y&67108863,this.words[w+1]=W>>>26-y&67108863,(y+=24)>=26&&(y-=26,w++);return this.strip()},n.prototype._parseHex=function(V,N,B){this.length=Math.ceil((V.length-N)/6),this.words=new Array(this.length);for(var G=0;G<this.length;G++)this.words[G]=0;var w,W=0,y=0;if(B==="be")for(G=V.length-1;G>=N;G-=2)w=o(V,N,G)<<W,this.words[y]|=67108863&w,W>=18?(W-=18,y+=1,this.words[y]|=w>>>26):W+=8;else for(G=(V.length-N)%2==0?N+1:N;G<V.length;G+=2)w=o(V,N,G)<<W,this.words[y]|=67108863&w,W>=18?(W-=18,y+=1,this.words[y]|=w>>>26):W+=8;this.strip()},n.prototype._parseBase=function(V,N,B){this.words=[0],this.length=1;for(var G=0,w=1;w<=67108863;w*=N)G++;G--,w=w/N|0;for(var W=V.length-B,y=W%G,f=Math.min(W,W-y)+B,D=0,F=B;F<f;F+=G)D=c(V,F,F+G,N),this.imuln(w),this.words[0]+D<67108864?this.words[0]+=D:this._iaddn(D);if(y!==0){var T=1;for(D=c(V,F,V.length,N),F=0;F<y;F++)T*=N;this.imuln(T),this.words[0]+D<67108864?this.words[0]+=D:this._iaddn(D)}this.strip()},n.prototype.copy=function(V){V.words=new Array(this.length);for(var N=0;N<this.length;N++)V.words[N]=this.words[N];V.length=this.length,V.negative=this.negative,V.red=this.red},n.prototype.clone=function(){var V=new n(null);return this.copy(V),V},n.prototype._expand=function(V){for(;this.length<V;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var r=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function u(V,N,B){B.negative=N.negative^V.negative;var G=V.length+N.length|0;B.length=G,G=G-1|0;var w=0|V.words[0],W=0|N.words[0],y=w*W,f=67108863&y,D=y/67108864|0;B.words[0]=f;for(var F=1;F<G;F++){for(var T=D>>>26,Q=67108863&D,P=Math.min(F,N.length-1),L=Math.max(0,F-V.length+1);L<=P;L++){var E=F-L|0;T+=(y=(w=0|V.words[E])*(W=0|N.words[L])+Q)/67108864|0,Q=67108863&y}B.words[F]=0|Q,D=0|T}return D!==0?B.words[F]=0|D:B.length--,B.strip()}n.prototype.toString=function(V,N){var B;if(N=0|N||1,(V=V||10)===16||V==="hex"){B="";for(var G=0,w=0,W=0;W<this.length;W++){var y=this.words[W],f=(16777215&(y<<G|w)).toString(16);B=(w=y>>>24-G&16777215)!==0||W!==this.length-1?r[6-f.length]+f+B:f+B,(G+=2)>=26&&(G-=26,W--)}for(w!==0&&(B=w.toString(16)+B);B.length%N!=0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(V===(0|V)&&V>=2&&V<=36){var D=h[V],F=b[V];B="";var T=this.clone();for(T.negative=0;!T.isZero();){var Q=T.modn(F).toString(V);B=(T=T.idivn(F)).isZero()?Q+B:r[D-Q.length]+Q+B}for(this.isZero()&&(B="0"+B);B.length%N!=0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}s(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var V=this.words[0];return this.length===2?V+=67108864*this.words[1]:this.length===3&&this.words[2]===1?V+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-V:V},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(V,N){return s(a!==void 0),this.toArrayLike(a,V,N)},n.prototype.toArray=function(V,N){return this.toArrayLike(Array,V,N)},n.prototype.toArrayLike=function(V,N,B){var G=this.byteLength(),w=B||Math.max(1,G);s(G<=w,"byte array longer than desired length"),s(w>0,"Requested array length <= 0"),this.strip();var W,y,f=N==="le",D=new V(w),F=this.clone();if(f){for(y=0;!F.isZero();y++)W=F.andln(255),F.iushrn(8),D[y]=W;for(;y<w;y++)D[y]=0}else{for(y=0;y<w-G;y++)D[y]=0;for(y=0;!F.isZero();y++)W=F.andln(255),F.iushrn(8),D[w-y-1]=W}return D},Math.clz32?n.prototype._countBits=function(V){return 32-Math.clz32(V)}:n.prototype._countBits=function(V){var N=V,B=0;return N>=4096&&(B+=13,N>>>=13),N>=64&&(B+=7,N>>>=7),N>=8&&(B+=4,N>>>=4),N>=2&&(B+=2,N>>>=2),B+N},n.prototype._zeroBits=function(V){if(V===0)return 26;var N=V,B=0;return(8191&N)==0&&(B+=13,N>>>=13),(127&N)==0&&(B+=7,N>>>=7),(15&N)==0&&(B+=4,N>>>=4),(3&N)==0&&(B+=2,N>>>=2),(1&N)==0&&B++,B},n.prototype.bitLength=function(){var V=this.words[this.length-1],N=this._countBits(V);return 26*(this.length-1)+N},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var V=0,N=0;N<this.length;N++){var B=this._zeroBits(this.words[N]);if(V+=B,B!==26)break}return V},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(V){return this.negative!==0?this.abs().inotn(V).iaddn(1):this.clone()},n.prototype.fromTwos=function(V){return this.testn(V-1)?this.notn(V).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(V){for(;this.length<V.length;)this.words[this.length++]=0;for(var N=0;N<V.length;N++)this.words[N]=this.words[N]|V.words[N];return this.strip()},n.prototype.ior=function(V){return s((this.negative|V.negative)==0),this.iuor(V)},n.prototype.or=function(V){return this.length>V.length?this.clone().ior(V):V.clone().ior(this)},n.prototype.uor=function(V){return this.length>V.length?this.clone().iuor(V):V.clone().iuor(this)},n.prototype.iuand=function(V){var N;N=this.length>V.length?V:this;for(var B=0;B<N.length;B++)this.words[B]=this.words[B]&V.words[B];return this.length=N.length,this.strip()},n.prototype.iand=function(V){return s((this.negative|V.negative)==0),this.iuand(V)},n.prototype.and=function(V){return this.length>V.length?this.clone().iand(V):V.clone().iand(this)},n.prototype.uand=function(V){return this.length>V.length?this.clone().iuand(V):V.clone().iuand(this)},n.prototype.iuxor=function(V){var N,B;this.length>V.length?(N=this,B=V):(N=V,B=this);for(var G=0;G<B.length;G++)this.words[G]=N.words[G]^B.words[G];if(this!==N)for(;G<N.length;G++)this.words[G]=N.words[G];return this.length=N.length,this.strip()},n.prototype.ixor=function(V){return s((this.negative|V.negative)==0),this.iuxor(V)},n.prototype.xor=function(V){return this.length>V.length?this.clone().ixor(V):V.clone().ixor(this)},n.prototype.uxor=function(V){return this.length>V.length?this.clone().iuxor(V):V.clone().iuxor(this)},n.prototype.inotn=function(V){s(typeof V=="number"&&V>=0);var N=0|Math.ceil(V/26),B=V%26;this._expand(N),B>0&&N--;for(var G=0;G<N;G++)this.words[G]=67108863&~this.words[G];return B>0&&(this.words[G]=~this.words[G]&67108863>>26-B),this.strip()},n.prototype.notn=function(V){return this.clone().inotn(V)},n.prototype.setn=function(V,N){s(typeof V=="number"&&V>=0);var B=V/26|0,G=V%26;return this._expand(B+1),this.words[B]=N?this.words[B]|1<<G:this.words[B]&~(1<<G),this.strip()},n.prototype.iadd=function(V){var N,B,G;if(this.negative!==0&&V.negative===0)return this.negative=0,N=this.isub(V),this.negative^=1,this._normSign();if(this.negative===0&&V.negative!==0)return V.negative=0,N=this.isub(V),V.negative=1,N._normSign();this.length>V.length?(B=this,G=V):(B=V,G=this);for(var w=0,W=0;W<G.length;W++)N=(0|B.words[W])+(0|G.words[W])+w,this.words[W]=67108863&N,w=N>>>26;for(;w!==0&&W<B.length;W++)N=(0|B.words[W])+w,this.words[W]=67108863&N,w=N>>>26;if(this.length=B.length,w!==0)this.words[this.length]=w,this.length++;else if(B!==this)for(;W<B.length;W++)this.words[W]=B.words[W];return this},n.prototype.add=function(V){var N;return V.negative!==0&&this.negative===0?(V.negative=0,N=this.sub(V),V.negative^=1,N):V.negative===0&&this.negative!==0?(this.negative=0,N=V.sub(this),this.negative=1,N):this.length>V.length?this.clone().iadd(V):V.clone().iadd(this)},n.prototype.isub=function(V){if(V.negative!==0){V.negative=0;var N=this.iadd(V);return V.negative=1,N._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(V),this.negative=1,this._normSign();var B,G,w=this.cmp(V);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(B=this,G=V):(B=V,G=this);for(var W=0,y=0;y<G.length;y++)W=(N=(0|B.words[y])-(0|G.words[y])+W)>>26,this.words[y]=67108863&N;for(;W!==0&&y<B.length;y++)W=(N=(0|B.words[y])+W)>>26,this.words[y]=67108863&N;if(W===0&&y<B.length&&B!==this)for(;y<B.length;y++)this.words[y]=B.words[y];return this.length=Math.max(this.length,y),B!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(V){return this.clone().isub(V)};var m=function(V,N,B){var G,w,W,y=V.words,f=N.words,D=B.words,F=0,T=0|y[0],Q=8191&T,P=T>>>13,L=0|y[1],E=8191&L,J=L>>>13,k=0|y[2],j=8191&k,q=k>>>13,tg=0|y[3],Cg=8191&tg,x=tg>>>13,sg=0|y[4],Ag=8191&sg,O=sg>>>13,_=0|y[5],Ig=8191&_,ng=_>>>13,ag=0|y[6],lg=8191&ag,cg=ag>>>13,dg=0|y[7],hg=8191&dg,rg=dg>>>13,Wg=0|y[8],Gg=8191&Wg,Sg=Wg>>>13,Kg=0|y[9],kg=8191&Kg,yg=Kg>>>13,Vg=0|f[0],pg=8191&Vg,Hg=Vg>>>13,Jg=0|f[1],zg=8191&Jg,aI=Jg>>>13,BI=0|f[2],Ug=8191&BI,lI=BI>>>13,oI=0|f[3],Eg=8191&oI,LI=oI>>>13,fI=0|f[4],tI=8191&fI,WI=fI>>>13,QI=0|f[5],nI=8191&QI,kI=QI>>>13,Bg=0|f[6],hI=8191&Bg,bg=Bg>>>13,ug=0|f[7],fg=8191&ug,Tg=ug>>>13,cI=0|f[8],jg=8191&cI,mI=cI>>>13,sI=0|f[9],gI=8191&sI,pI=sI>>>13;B.negative=V.negative^N.negative,B.length=19;var bI=(F+(G=Math.imul(Q,pg))|0)+((8191&(w=(w=Math.imul(Q,Hg))+Math.imul(P,pg)|0))<<13)|0;F=((W=Math.imul(P,Hg))+(w>>>13)|0)+(bI>>>26)|0,bI&=67108863,G=Math.imul(E,pg),w=(w=Math.imul(E,Hg))+Math.imul(J,pg)|0,W=Math.imul(J,Hg);var yI=(F+(G=G+Math.imul(Q,zg)|0)|0)+((8191&(w=(w=w+Math.imul(Q,aI)|0)+Math.imul(P,zg)|0))<<13)|0;F=((W=W+Math.imul(P,aI)|0)+(w>>>13)|0)+(yI>>>26)|0,yI&=67108863,G=Math.imul(j,pg),w=(w=Math.imul(j,Hg))+Math.imul(q,pg)|0,W=Math.imul(q,Hg),G=G+Math.imul(E,zg)|0,w=(w=w+Math.imul(E,aI)|0)+Math.imul(J,zg)|0,W=W+Math.imul(J,aI)|0;var wC=(F+(G=G+Math.imul(Q,Ug)|0)|0)+((8191&(w=(w=w+Math.imul(Q,lI)|0)+Math.imul(P,Ug)|0))<<13)|0;F=((W=W+Math.imul(P,lI)|0)+(w>>>13)|0)+(wC>>>26)|0,wC&=67108863,G=Math.imul(Cg,pg),w=(w=Math.imul(Cg,Hg))+Math.imul(x,pg)|0,W=Math.imul(x,Hg),G=G+Math.imul(j,zg)|0,w=(w=w+Math.imul(j,aI)|0)+Math.imul(q,zg)|0,W=W+Math.imul(q,aI)|0,G=G+Math.imul(E,Ug)|0,w=(w=w+Math.imul(E,lI)|0)+Math.imul(J,Ug)|0,W=W+Math.imul(J,lI)|0;var _I=(F+(G=G+Math.imul(Q,Eg)|0)|0)+((8191&(w=(w=w+Math.imul(Q,LI)|0)+Math.imul(P,Eg)|0))<<13)|0;F=((W=W+Math.imul(P,LI)|0)+(w>>>13)|0)+(_I>>>26)|0,_I&=67108863,G=Math.imul(Ag,pg),w=(w=Math.imul(Ag,Hg))+Math.imul(O,pg)|0,W=Math.imul(O,Hg),G=G+Math.imul(Cg,zg)|0,w=(w=w+Math.imul(Cg,aI)|0)+Math.imul(x,zg)|0,W=W+Math.imul(x,aI)|0,G=G+Math.imul(j,Ug)|0,w=(w=w+Math.imul(j,lI)|0)+Math.imul(q,Ug)|0,W=W+Math.imul(q,lI)|0,G=G+Math.imul(E,Eg)|0,w=(w=w+Math.imul(E,LI)|0)+Math.imul(J,Eg)|0,W=W+Math.imul(J,LI)|0;var _C=(F+(G=G+Math.imul(Q,tI)|0)|0)+((8191&(w=(w=w+Math.imul(Q,WI)|0)+Math.imul(P,tI)|0))<<13)|0;F=((W=W+Math.imul(P,WI)|0)+(w>>>13)|0)+(_C>>>26)|0,_C&=67108863,G=Math.imul(Ig,pg),w=(w=Math.imul(Ig,Hg))+Math.imul(ng,pg)|0,W=Math.imul(ng,Hg),G=G+Math.imul(Ag,zg)|0,w=(w=w+Math.imul(Ag,aI)|0)+Math.imul(O,zg)|0,W=W+Math.imul(O,aI)|0,G=G+Math.imul(Cg,Ug)|0,w=(w=w+Math.imul(Cg,lI)|0)+Math.imul(x,Ug)|0,W=W+Math.imul(x,lI)|0,G=G+Math.imul(j,Eg)|0,w=(w=w+Math.imul(j,LI)|0)+Math.imul(q,Eg)|0,W=W+Math.imul(q,LI)|0,G=G+Math.imul(E,tI)|0,w=(w=w+Math.imul(E,WI)|0)+Math.imul(J,tI)|0,W=W+Math.imul(J,WI)|0;var nC=(F+(G=G+Math.imul(Q,nI)|0)|0)+((8191&(w=(w=w+Math.imul(Q,kI)|0)+Math.imul(P,nI)|0))<<13)|0;F=((W=W+Math.imul(P,kI)|0)+(w>>>13)|0)+(nC>>>26)|0,nC&=67108863,G=Math.imul(lg,pg),w=(w=Math.imul(lg,Hg))+Math.imul(cg,pg)|0,W=Math.imul(cg,Hg),G=G+Math.imul(Ig,zg)|0,w=(w=w+Math.imul(Ig,aI)|0)+Math.imul(ng,zg)|0,W=W+Math.imul(ng,aI)|0,G=G+Math.imul(Ag,Ug)|0,w=(w=w+Math.imul(Ag,lI)|0)+Math.imul(O,Ug)|0,W=W+Math.imul(O,lI)|0,G=G+Math.imul(Cg,Eg)|0,w=(w=w+Math.imul(Cg,LI)|0)+Math.imul(x,Eg)|0,W=W+Math.imul(x,LI)|0,G=G+Math.imul(j,tI)|0,w=(w=w+Math.imul(j,WI)|0)+Math.imul(q,tI)|0,W=W+Math.imul(q,WI)|0,G=G+Math.imul(E,nI)|0,w=(w=w+Math.imul(E,kI)|0)+Math.imul(J,nI)|0,W=W+Math.imul(J,kI)|0;var Ft=(F+(G=G+Math.imul(Q,hI)|0)|0)+((8191&(w=(w=w+Math.imul(Q,bg)|0)+Math.imul(P,hI)|0))<<13)|0;F=((W=W+Math.imul(P,bg)|0)+(w>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,G=Math.imul(hg,pg),w=(w=Math.imul(hg,Hg))+Math.imul(rg,pg)|0,W=Math.imul(rg,Hg),G=G+Math.imul(lg,zg)|0,w=(w=w+Math.imul(lg,aI)|0)+Math.imul(cg,zg)|0,W=W+Math.imul(cg,aI)|0,G=G+Math.imul(Ig,Ug)|0,w=(w=w+Math.imul(Ig,lI)|0)+Math.imul(ng,Ug)|0,W=W+Math.imul(ng,lI)|0,G=G+Math.imul(Ag,Eg)|0,w=(w=w+Math.imul(Ag,LI)|0)+Math.imul(O,Eg)|0,W=W+Math.imul(O,LI)|0,G=G+Math.imul(Cg,tI)|0,w=(w=w+Math.imul(Cg,WI)|0)+Math.imul(x,tI)|0,W=W+Math.imul(x,WI)|0,G=G+Math.imul(j,nI)|0,w=(w=w+Math.imul(j,kI)|0)+Math.imul(q,nI)|0,W=W+Math.imul(q,kI)|0,G=G+Math.imul(E,hI)|0,w=(w=w+Math.imul(E,bg)|0)+Math.imul(J,hI)|0,W=W+Math.imul(J,bg)|0;var og=(F+(G=G+Math.imul(Q,fg)|0)|0)+((8191&(w=(w=w+Math.imul(Q,Tg)|0)+Math.imul(P,fg)|0))<<13)|0;F=((W=W+Math.imul(P,Tg)|0)+(w>>>13)|0)+(og>>>26)|0,og&=67108863,G=Math.imul(Gg,pg),w=(w=Math.imul(Gg,Hg))+Math.imul(Sg,pg)|0,W=Math.imul(Sg,Hg),G=G+Math.imul(hg,zg)|0,w=(w=w+Math.imul(hg,aI)|0)+Math.imul(rg,zg)|0,W=W+Math.imul(rg,aI)|0,G=G+Math.imul(lg,Ug)|0,w=(w=w+Math.imul(lg,lI)|0)+Math.imul(cg,Ug)|0,W=W+Math.imul(cg,lI)|0,G=G+Math.imul(Ig,Eg)|0,w=(w=w+Math.imul(Ig,LI)|0)+Math.imul(ng,Eg)|0,W=W+Math.imul(ng,LI)|0,G=G+Math.imul(Ag,tI)|0,w=(w=w+Math.imul(Ag,WI)|0)+Math.imul(O,tI)|0,W=W+Math.imul(O,WI)|0,G=G+Math.imul(Cg,nI)|0,w=(w=w+Math.imul(Cg,kI)|0)+Math.imul(x,nI)|0,W=W+Math.imul(x,kI)|0,G=G+Math.imul(j,hI)|0,w=(w=w+Math.imul(j,bg)|0)+Math.imul(q,hI)|0,W=W+Math.imul(q,bg)|0,G=G+Math.imul(E,fg)|0,w=(w=w+Math.imul(E,Tg)|0)+Math.imul(J,fg)|0,W=W+Math.imul(J,Tg)|0;var Zg=(F+(G=G+Math.imul(Q,jg)|0)|0)+((8191&(w=(w=w+Math.imul(Q,mI)|0)+Math.imul(P,jg)|0))<<13)|0;F=((W=W+Math.imul(P,mI)|0)+(w>>>13)|0)+(Zg>>>26)|0,Zg&=67108863,G=Math.imul(kg,pg),w=(w=Math.imul(kg,Hg))+Math.imul(yg,pg)|0,W=Math.imul(yg,Hg),G=G+Math.imul(Gg,zg)|0,w=(w=w+Math.imul(Gg,aI)|0)+Math.imul(Sg,zg)|0,W=W+Math.imul(Sg,aI)|0,G=G+Math.imul(hg,Ug)|0,w=(w=w+Math.imul(hg,lI)|0)+Math.imul(rg,Ug)|0,W=W+Math.imul(rg,lI)|0,G=G+Math.imul(lg,Eg)|0,w=(w=w+Math.imul(lg,LI)|0)+Math.imul(cg,Eg)|0,W=W+Math.imul(cg,LI)|0,G=G+Math.imul(Ig,tI)|0,w=(w=w+Math.imul(Ig,WI)|0)+Math.imul(ng,tI)|0,W=W+Math.imul(ng,WI)|0,G=G+Math.imul(Ag,nI)|0,w=(w=w+Math.imul(Ag,kI)|0)+Math.imul(O,nI)|0,W=W+Math.imul(O,kI)|0,G=G+Math.imul(Cg,hI)|0,w=(w=w+Math.imul(Cg,bg)|0)+Math.imul(x,hI)|0,W=W+Math.imul(x,bg)|0,G=G+Math.imul(j,fg)|0,w=(w=w+Math.imul(j,Tg)|0)+Math.imul(q,fg)|0,W=W+Math.imul(q,Tg)|0,G=G+Math.imul(E,jg)|0,w=(w=w+Math.imul(E,mI)|0)+Math.imul(J,jg)|0,W=W+Math.imul(J,mI)|0;var Dg=(F+(G=G+Math.imul(Q,gI)|0)|0)+((8191&(w=(w=w+Math.imul(Q,pI)|0)+Math.imul(P,gI)|0))<<13)|0;F=((W=W+Math.imul(P,pI)|0)+(w>>>13)|0)+(Dg>>>26)|0,Dg&=67108863,G=Math.imul(kg,zg),w=(w=Math.imul(kg,aI))+Math.imul(yg,zg)|0,W=Math.imul(yg,aI),G=G+Math.imul(Gg,Ug)|0,w=(w=w+Math.imul(Gg,lI)|0)+Math.imul(Sg,Ug)|0,W=W+Math.imul(Sg,lI)|0,G=G+Math.imul(hg,Eg)|0,w=(w=w+Math.imul(hg,LI)|0)+Math.imul(rg,Eg)|0,W=W+Math.imul(rg,LI)|0,G=G+Math.imul(lg,tI)|0,w=(w=w+Math.imul(lg,WI)|0)+Math.imul(cg,tI)|0,W=W+Math.imul(cg,WI)|0,G=G+Math.imul(Ig,nI)|0,w=(w=w+Math.imul(Ig,kI)|0)+Math.imul(ng,nI)|0,W=W+Math.imul(ng,kI)|0,G=G+Math.imul(Ag,hI)|0,w=(w=w+Math.imul(Ag,bg)|0)+Math.imul(O,hI)|0,W=W+Math.imul(O,bg)|0,G=G+Math.imul(Cg,fg)|0,w=(w=w+Math.imul(Cg,Tg)|0)+Math.imul(x,fg)|0,W=W+Math.imul(x,Tg)|0,G=G+Math.imul(j,jg)|0,w=(w=w+Math.imul(j,mI)|0)+Math.imul(q,jg)|0,W=W+Math.imul(q,mI)|0;var Fg=(F+(G=G+Math.imul(E,gI)|0)|0)+((8191&(w=(w=w+Math.imul(E,pI)|0)+Math.imul(J,gI)|0))<<13)|0;F=((W=W+Math.imul(J,pI)|0)+(w>>>13)|0)+(Fg>>>26)|0,Fg&=67108863,G=Math.imul(kg,Ug),w=(w=Math.imul(kg,lI))+Math.imul(yg,Ug)|0,W=Math.imul(yg,lI),G=G+Math.imul(Gg,Eg)|0,w=(w=w+Math.imul(Gg,LI)|0)+Math.imul(Sg,Eg)|0,W=W+Math.imul(Sg,LI)|0,G=G+Math.imul(hg,tI)|0,w=(w=w+Math.imul(hg,WI)|0)+Math.imul(rg,tI)|0,W=W+Math.imul(rg,WI)|0,G=G+Math.imul(lg,nI)|0,w=(w=w+Math.imul(lg,kI)|0)+Math.imul(cg,nI)|0,W=W+Math.imul(cg,kI)|0,G=G+Math.imul(Ig,hI)|0,w=(w=w+Math.imul(Ig,bg)|0)+Math.imul(ng,hI)|0,W=W+Math.imul(ng,bg)|0,G=G+Math.imul(Ag,fg)|0,w=(w=w+Math.imul(Ag,Tg)|0)+Math.imul(O,fg)|0,W=W+Math.imul(O,Tg)|0,G=G+Math.imul(Cg,jg)|0,w=(w=w+Math.imul(Cg,mI)|0)+Math.imul(x,jg)|0,W=W+Math.imul(x,mI)|0;var II=(F+(G=G+Math.imul(j,gI)|0)|0)+((8191&(w=(w=w+Math.imul(j,pI)|0)+Math.imul(q,gI)|0))<<13)|0;F=((W=W+Math.imul(q,pI)|0)+(w>>>13)|0)+(II>>>26)|0,II&=67108863,G=Math.imul(kg,Eg),w=(w=Math.imul(kg,LI))+Math.imul(yg,Eg)|0,W=Math.imul(yg,LI),G=G+Math.imul(Gg,tI)|0,w=(w=w+Math.imul(Gg,WI)|0)+Math.imul(Sg,tI)|0,W=W+Math.imul(Sg,WI)|0,G=G+Math.imul(hg,nI)|0,w=(w=w+Math.imul(hg,kI)|0)+Math.imul(rg,nI)|0,W=W+Math.imul(rg,kI)|0,G=G+Math.imul(lg,hI)|0,w=(w=w+Math.imul(lg,bg)|0)+Math.imul(cg,hI)|0,W=W+Math.imul(cg,bg)|0,G=G+Math.imul(Ig,fg)|0,w=(w=w+Math.imul(Ig,Tg)|0)+Math.imul(ng,fg)|0,W=W+Math.imul(ng,Tg)|0,G=G+Math.imul(Ag,jg)|0,w=(w=w+Math.imul(Ag,mI)|0)+Math.imul(O,jg)|0,W=W+Math.imul(O,mI)|0;var vg=(F+(G=G+Math.imul(Cg,gI)|0)|0)+((8191&(w=(w=w+Math.imul(Cg,pI)|0)+Math.imul(x,gI)|0))<<13)|0;F=((W=W+Math.imul(x,pI)|0)+(w>>>13)|0)+(vg>>>26)|0,vg&=67108863,G=Math.imul(kg,tI),w=(w=Math.imul(kg,WI))+Math.imul(yg,tI)|0,W=Math.imul(yg,WI),G=G+Math.imul(Gg,nI)|0,w=(w=w+Math.imul(Gg,kI)|0)+Math.imul(Sg,nI)|0,W=W+Math.imul(Sg,kI)|0,G=G+Math.imul(hg,hI)|0,w=(w=w+Math.imul(hg,bg)|0)+Math.imul(rg,hI)|0,W=W+Math.imul(rg,bg)|0,G=G+Math.imul(lg,fg)|0,w=(w=w+Math.imul(lg,Tg)|0)+Math.imul(cg,fg)|0,W=W+Math.imul(cg,Tg)|0,G=G+Math.imul(Ig,jg)|0,w=(w=w+Math.imul(Ig,mI)|0)+Math.imul(ng,jg)|0,W=W+Math.imul(ng,mI)|0;var xg=(F+(G=G+Math.imul(Ag,gI)|0)|0)+((8191&(w=(w=w+Math.imul(Ag,pI)|0)+Math.imul(O,gI)|0))<<13)|0;F=((W=W+Math.imul(O,pI)|0)+(w>>>13)|0)+(xg>>>26)|0,xg&=67108863,G=Math.imul(kg,nI),w=(w=Math.imul(kg,kI))+Math.imul(yg,nI)|0,W=Math.imul(yg,kI),G=G+Math.imul(Gg,hI)|0,w=(w=w+Math.imul(Gg,bg)|0)+Math.imul(Sg,hI)|0,W=W+Math.imul(Sg,bg)|0,G=G+Math.imul(hg,fg)|0,w=(w=w+Math.imul(hg,Tg)|0)+Math.imul(rg,fg)|0,W=W+Math.imul(rg,Tg)|0,G=G+Math.imul(lg,jg)|0,w=(w=w+Math.imul(lg,mI)|0)+Math.imul(cg,jg)|0,W=W+Math.imul(cg,mI)|0;var zI=(F+(G=G+Math.imul(Ig,gI)|0)|0)+((8191&(w=(w=w+Math.imul(Ig,pI)|0)+Math.imul(ng,gI)|0))<<13)|0;F=((W=W+Math.imul(ng,pI)|0)+(w>>>13)|0)+(zI>>>26)|0,zI&=67108863,G=Math.imul(kg,hI),w=(w=Math.imul(kg,bg))+Math.imul(yg,hI)|0,W=Math.imul(yg,bg),G=G+Math.imul(Gg,fg)|0,w=(w=w+Math.imul(Gg,Tg)|0)+Math.imul(Sg,fg)|0,W=W+Math.imul(Sg,Tg)|0,G=G+Math.imul(hg,jg)|0,w=(w=w+Math.imul(hg,mI)|0)+Math.imul(rg,jg)|0,W=W+Math.imul(rg,mI)|0;var VI=(F+(G=G+Math.imul(lg,gI)|0)|0)+((8191&(w=(w=w+Math.imul(lg,pI)|0)+Math.imul(cg,gI)|0))<<13)|0;F=((W=W+Math.imul(cg,pI)|0)+(w>>>13)|0)+(VI>>>26)|0,VI&=67108863,G=Math.imul(kg,fg),w=(w=Math.imul(kg,Tg))+Math.imul(yg,fg)|0,W=Math.imul(yg,Tg),G=G+Math.imul(Gg,jg)|0,w=(w=w+Math.imul(Gg,mI)|0)+Math.imul(Sg,jg)|0,W=W+Math.imul(Sg,mI)|0;var YI=(F+(G=G+Math.imul(hg,gI)|0)|0)+((8191&(w=(w=w+Math.imul(hg,pI)|0)+Math.imul(rg,gI)|0))<<13)|0;F=((W=W+Math.imul(rg,pI)|0)+(w>>>13)|0)+(YI>>>26)|0,YI&=67108863,G=Math.imul(kg,jg),w=(w=Math.imul(kg,mI))+Math.imul(yg,jg)|0,W=Math.imul(yg,mI);var dI=(F+(G=G+Math.imul(Gg,gI)|0)|0)+((8191&(w=(w=w+Math.imul(Gg,pI)|0)+Math.imul(Sg,gI)|0))<<13)|0;F=((W=W+Math.imul(Sg,pI)|0)+(w>>>13)|0)+(dI>>>26)|0,dI&=67108863;var CC=(F+(G=Math.imul(kg,gI))|0)+((8191&(w=(w=Math.imul(kg,pI))+Math.imul(yg,gI)|0))<<13)|0;return F=((W=Math.imul(yg,pI))+(w>>>13)|0)+(CC>>>26)|0,CC&=67108863,D[0]=bI,D[1]=yI,D[2]=wC,D[3]=_I,D[4]=_C,D[5]=nC,D[6]=Ft,D[7]=og,D[8]=Zg,D[9]=Dg,D[10]=Fg,D[11]=II,D[12]=vg,D[13]=xg,D[14]=zI,D[15]=VI,D[16]=YI,D[17]=dI,D[18]=CC,F!==0&&(D[19]=F,B.length++),B};function Z(V,N,B){return new p().mulp(V,N,B)}function p(V,N){this.x=V,this.y=N}Math.imul||(m=u),n.prototype.mulTo=function(V,N){var B=this.length+V.length;return this.length===10&&V.length===10?m(this,V,N):B<63?u(this,V,N):B<1024?function(G,w,W){W.negative=w.negative^G.negative,W.length=G.length+w.length;for(var y=0,f=0,D=0;D<W.length-1;D++){var F=f;f=0;for(var T=67108863&y,Q=Math.min(D,w.length-1),P=Math.max(0,D-G.length+1);P<=Q;P++){var L=D-P,E=(0|G.words[L])*(0|w.words[P]),J=67108863&E;T=67108863&(J=J+T|0),f+=(F=(F=F+(E/67108864|0)|0)+(J>>>26)|0)>>>26,F&=67108863}W.words[D]=T,y=F,F=f}return y!==0?W.words[D]=y:W.length--,W.strip()}(this,V,N):Z(this,V,N)},p.prototype.makeRBT=function(V){for(var N=new Array(V),B=n.prototype._countBits(V)-1,G=0;G<V;G++)N[G]=this.revBin(G,B,V);return N},p.prototype.revBin=function(V,N,B){if(V===0||V===B-1)return V;for(var G=0,w=0;w<N;w++)G|=(1&V)<<N-w-1,V>>=1;return G},p.prototype.permute=function(V,N,B,G,w,W){for(var y=0;y<W;y++)G[y]=N[V[y]],w[y]=B[V[y]]},p.prototype.transform=function(V,N,B,G,w,W){this.permute(W,V,N,B,G,w);for(var y=1;y<w;y<<=1)for(var f=y<<1,D=Math.cos(2*Math.PI/f),F=Math.sin(2*Math.PI/f),T=0;T<w;T+=f)for(var Q=D,P=F,L=0;L<y;L++){var E=B[T+L],J=G[T+L],k=B[T+L+y],j=G[T+L+y],q=Q*k-P*j;j=Q*j+P*k,k=q,B[T+L]=E+k,G[T+L]=J+j,B[T+L+y]=E-k,G[T+L+y]=J-j,L!==f&&(q=D*Q-F*P,P=D*P+F*Q,Q=q)}},p.prototype.guessLen13b=function(V,N){var B=1|Math.max(N,V),G=1&B,w=0;for(B=B/2|0;B;B>>>=1)w++;return 1<<w+1+G},p.prototype.conjugate=function(V,N,B){if(!(B<=1))for(var G=0;G<B/2;G++){var w=V[G];V[G]=V[B-G-1],V[B-G-1]=w,w=N[G],N[G]=-N[B-G-1],N[B-G-1]=-w}},p.prototype.normalize13b=function(V,N){for(var B=0,G=0;G<N/2;G++){var w=8192*Math.round(V[2*G+1]/N)+Math.round(V[2*G]/N)+B;V[G]=67108863&w,B=w<67108864?0:w/67108864|0}return V},p.prototype.convert13b=function(V,N,B,G){for(var w=0,W=0;W<N;W++)w+=0|V[W],B[2*W]=8191&w,w>>>=13,B[2*W+1]=8191&w,w>>>=13;for(W=2*N;W<G;++W)B[W]=0;s(w===0),s((-8192&w)==0)},p.prototype.stub=function(V){for(var N=new Array(V),B=0;B<V;B++)N[B]=0;return N},p.prototype.mulp=function(V,N,B){var G=2*this.guessLen13b(V.length,N.length),w=this.makeRBT(G),W=this.stub(G),y=new Array(G),f=new Array(G),D=new Array(G),F=new Array(G),T=new Array(G),Q=new Array(G),P=B.words;P.length=G,this.convert13b(V.words,V.length,y,G),this.convert13b(N.words,N.length,F,G),this.transform(y,W,f,D,G,w),this.transform(F,W,T,Q,G,w);for(var L=0;L<G;L++){var E=f[L]*T[L]-D[L]*Q[L];D[L]=f[L]*Q[L]+D[L]*T[L],f[L]=E}return this.conjugate(f,D,G),this.transform(f,D,P,W,G,w),this.conjugate(P,W,G),this.normalize13b(P,G),B.negative=V.negative^N.negative,B.length=V.length+N.length,B.strip()},n.prototype.mul=function(V){var N=new n(null);return N.words=new Array(this.length+V.length),this.mulTo(V,N)},n.prototype.mulf=function(V){var N=new n(null);return N.words=new Array(this.length+V.length),Z(this,V,N)},n.prototype.imul=function(V){return this.clone().mulTo(V,this)},n.prototype.imuln=function(V){s(typeof V=="number"),s(V<67108864);for(var N=0,B=0;B<this.length;B++){var G=(0|this.words[B])*V,w=(67108863&G)+(67108863&N);N>>=26,N+=G/67108864|0,N+=w>>>26,this.words[B]=67108863&w}return N!==0&&(this.words[B]=N,this.length++),this},n.prototype.muln=function(V){return this.clone().imuln(V)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(V){var N=function(W){for(var y=new Array(W.bitLength()),f=0;f<y.length;f++){var D=f/26|0,F=f%26;y[f]=(W.words[D]&1<<F)>>>F}return y}(V);if(N.length===0)return new n(1);for(var B=this,G=0;G<N.length&&N[G]===0;G++,B=B.sqr());if(++G<N.length)for(var w=B.sqr();G<N.length;G++,w=w.sqr())N[G]!==0&&(B=B.mul(w));return B},n.prototype.iushln=function(V){s(typeof V=="number"&&V>=0);var N,B=V%26,G=(V-B)/26,w=67108863>>>26-B<<26-B;if(B!==0){var W=0;for(N=0;N<this.length;N++){var y=this.words[N]&w,f=(0|this.words[N])-y<<B;this.words[N]=f|W,W=y>>>26-B}W&&(this.words[N]=W,this.length++)}if(G!==0){for(N=this.length-1;N>=0;N--)this.words[N+G]=this.words[N];for(N=0;N<G;N++)this.words[N]=0;this.length+=G}return this.strip()},n.prototype.ishln=function(V){return s(this.negative===0),this.iushln(V)},n.prototype.iushrn=function(V,N,B){var G;s(typeof V=="number"&&V>=0),G=N?(N-N%26)/26:0;var w=V%26,W=Math.min((V-w)/26,this.length),y=67108863^67108863>>>w<<w,f=B;if(G-=W,G=Math.max(0,G),f){for(var D=0;D<W;D++)f.words[D]=this.words[D];f.length=W}if(W!==0)if(this.length>W)for(this.length-=W,D=0;D<this.length;D++)this.words[D]=this.words[D+W];else this.words[0]=0,this.length=1;var F=0;for(D=this.length-1;D>=0&&(F!==0||D>=G);D--){var T=0|this.words[D];this.words[D]=F<<26-w|T>>>w,F=T&y}return f&&F!==0&&(f.words[f.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(V,N,B){return s(this.negative===0),this.iushrn(V,N,B)},n.prototype.shln=function(V){return this.clone().ishln(V)},n.prototype.ushln=function(V){return this.clone().iushln(V)},n.prototype.shrn=function(V){return this.clone().ishrn(V)},n.prototype.ushrn=function(V){return this.clone().iushrn(V)},n.prototype.testn=function(V){s(typeof V=="number"&&V>=0);var N=V%26,B=(V-N)/26,G=1<<N;return!(this.length<=B)&&!!(this.words[B]&G)},n.prototype.imaskn=function(V){s(typeof V=="number"&&V>=0);var N=V%26,B=(V-N)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(N!==0&&B++,this.length=Math.min(B,this.length),N!==0){var G=67108863^67108863>>>N<<N;this.words[this.length-1]&=G}return this.strip()},n.prototype.maskn=function(V){return this.clone().imaskn(V)},n.prototype.iaddn=function(V){return s(typeof V=="number"),s(V<67108864),V<0?this.isubn(-V):this.negative!==0?this.length===1&&(0|this.words[0])<V?(this.words[0]=V-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(V),this.negative=1,this):this._iaddn(V)},n.prototype._iaddn=function(V){this.words[0]+=V;for(var N=0;N<this.length&&this.words[N]>=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},n.prototype.isubn=function(V){if(s(typeof V=="number"),s(V<67108864),V<0)return this.iaddn(-V);if(this.negative!==0)return this.negative=0,this.iaddn(V),this.negative=1,this;if(this.words[0]-=V,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N<this.length&&this.words[N]<0;N++)this.words[N]+=67108864,this.words[N+1]-=1;return this.strip()},n.prototype.addn=function(V){return this.clone().iaddn(V)},n.prototype.subn=function(V){return this.clone().isubn(V)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(V,N,B){var G,w,W=V.length+B;this._expand(W);var y=0;for(G=0;G<V.length;G++){w=(0|this.words[G+B])+y;var f=(0|V.words[G])*N;y=((w-=67108863&f)>>26)-(f/67108864|0),this.words[G+B]=67108863&w}for(;G<this.length-B;G++)y=(w=(0|this.words[G+B])+y)>>26,this.words[G+B]=67108863&w;if(y===0)return this.strip();for(s(y===-1),y=0,G=0;G<this.length;G++)y=(w=-(0|this.words[G])+y)>>26,this.words[G]=67108863&w;return this.negative=1,this.strip()},n.prototype._wordDiv=function(V,N){var B=(this.length,V.length),G=this.clone(),w=V,W=0|w.words[w.length-1];(B=26-this._countBits(W))!==0&&(w=w.ushln(B),G.iushln(B),W=0|w.words[w.length-1]);var y,f=G.length-w.length;if(N!=="mod"){(y=new n(null)).length=f+1,y.words=new Array(y.length);for(var D=0;D<y.length;D++)y.words[D]=0}var F=G.clone()._ishlnsubmul(w,1,f);F.negative===0&&(G=F,y&&(y.words[f]=1));for(var T=f-1;T>=0;T--){var Q=67108864*(0|G.words[w.length+T])+(0|G.words[w.length+T-1]);for(Q=Math.min(Q/W|0,67108863),G._ishlnsubmul(w,Q,T);G.negative!==0;)Q--,G.negative=0,G._ishlnsubmul(w,1,T),G.isZero()||(G.negative^=1);y&&(y.words[T]=Q)}return y&&y.strip(),G.strip(),N!=="div"&&B!==0&&G.iushrn(B),{div:y||null,mod:G}},n.prototype.divmod=function(V,N,B){return s(!V.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:this.negative!==0&&V.negative===0?(W=this.neg().divmod(V,N),N!=="mod"&&(G=W.div.neg()),N!=="div"&&(w=W.mod.neg(),B&&w.negative!==0&&w.iadd(V)),{div:G,mod:w}):this.negative===0&&V.negative!==0?(W=this.divmod(V.neg(),N),N!=="mod"&&(G=W.div.neg()),{div:G,mod:W.mod}):(this.negative&V.negative)!=0?(W=this.neg().divmod(V.neg(),N),N!=="div"&&(w=W.mod.neg(),B&&w.negative!==0&&w.isub(V)),{div:W.div,mod:w}):V.length>this.length||this.cmp(V)<0?{div:new n(0),mod:this}:V.length===1?N==="div"?{div:this.divn(V.words[0]),mod:null}:N==="mod"?{div:null,mod:new n(this.modn(V.words[0]))}:{div:this.divn(V.words[0]),mod:new n(this.modn(V.words[0]))}:this._wordDiv(V,N);var G,w,W},n.prototype.div=function(V){return this.divmod(V,"div",!1).div},n.prototype.mod=function(V){return this.divmod(V,"mod",!1).mod},n.prototype.umod=function(V){return this.divmod(V,"mod",!0).mod},n.prototype.divRound=function(V){var N=this.divmod(V);if(N.mod.isZero())return N.div;var B=N.div.negative!==0?N.mod.isub(V):N.mod,G=V.ushrn(1),w=V.andln(1),W=B.cmp(G);return W<0||w===1&&W===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},n.prototype.modn=function(V){s(V<=67108863);for(var N=(1<<26)%V,B=0,G=this.length-1;G>=0;G--)B=(N*B+(0|this.words[G]))%V;return B},n.prototype.idivn=function(V){s(V<=67108863);for(var N=0,B=this.length-1;B>=0;B--){var G=(0|this.words[B])+67108864*N;this.words[B]=G/V|0,N=G%V}return this.strip()},n.prototype.divn=function(V){return this.clone().idivn(V)},n.prototype.egcd=function(V){s(V.negative===0),s(!V.isZero());var N=this,B=V.clone();N=N.negative!==0?N.umod(V):N.clone();for(var G=new n(1),w=new n(0),W=new n(0),y=new n(1),f=0;N.isEven()&&B.isEven();)N.iushrn(1),B.iushrn(1),++f;for(var D=B.clone(),F=N.clone();!N.isZero();){for(var T=0,Q=1;(N.words[0]&Q)==0&&T<26;++T,Q<<=1);if(T>0)for(N.iushrn(T);T-- >0;)(G.isOdd()||w.isOdd())&&(G.iadd(D),w.isub(F)),G.iushrn(1),w.iushrn(1);for(var P=0,L=1;(B.words[0]&L)==0&&P<26;++P,L<<=1);if(P>0)for(B.iushrn(P);P-- >0;)(W.isOdd()||y.isOdd())&&(W.iadd(D),y.isub(F)),W.iushrn(1),y.iushrn(1);N.cmp(B)>=0?(N.isub(B),G.isub(W),w.isub(y)):(B.isub(N),W.isub(G),y.isub(w))}return{a:W,b:y,gcd:B.iushln(f)}},n.prototype._invmp=function(V){s(V.negative===0),s(!V.isZero());var N=this,B=V.clone();N=N.negative!==0?N.umod(V):N.clone();for(var G,w=new n(1),W=new n(0),y=B.clone();N.cmpn(1)>0&&B.cmpn(1)>0;){for(var f=0,D=1;(N.words[0]&D)==0&&f<26;++f,D<<=1);if(f>0)for(N.iushrn(f);f-- >0;)w.isOdd()&&w.iadd(y),w.iushrn(1);for(var F=0,T=1;(B.words[0]&T)==0&&F<26;++F,T<<=1);if(F>0)for(B.iushrn(F);F-- >0;)W.isOdd()&&W.iadd(y),W.iushrn(1);N.cmp(B)>=0?(N.isub(B),w.isub(W)):(B.isub(N),W.isub(w))}return(G=N.cmpn(1)===0?w:W).cmpn(0)<0&&G.iadd(V),G},n.prototype.gcd=function(V){if(this.isZero())return V.abs();if(V.isZero())return this.abs();var N=this.clone(),B=V.clone();N.negative=0,B.negative=0;for(var G=0;N.isEven()&&B.isEven();G++)N.iushrn(1),B.iushrn(1);for(;;){for(;N.isEven();)N.iushrn(1);for(;B.isEven();)B.iushrn(1);var w=N.cmp(B);if(w<0){var W=N;N=B,B=W}else if(w===0||B.cmpn(1)===0)break;N.isub(B)}return B.iushln(G)},n.prototype.invm=function(V){return this.egcd(V).a.umod(V)},n.prototype.isEven=function(){return(1&this.words[0])==0},n.prototype.isOdd=function(){return(1&this.words[0])==1},n.prototype.andln=function(V){return this.words[0]&V},n.prototype.bincn=function(V){s(typeof V=="number");var N=V%26,B=(V-N)/26,G=1<<N;if(this.length<=B)return this._expand(B+1),this.words[B]|=G,this;for(var w=G,W=B;w!==0&&W<this.length;W++){var y=0|this.words[W];w=(y+=w)>>>26,y&=67108863,this.words[W]=y}return w!==0&&(this.words[W]=w,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(V){var N,B=V<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;if(this.strip(),this.length>1)N=1;else{B&&(V=-V),s(V<=67108863,"Number is too big");var G=0|this.words[0];N=G===V?0:G<V?-1:1}return this.negative!==0?0|-N:N},n.prototype.cmp=function(V){if(this.negative!==0&&V.negative===0)return-1;if(this.negative===0&&V.negative!==0)return 1;var N=this.ucmp(V);return this.negative!==0?0|-N:N},n.prototype.ucmp=function(V){if(this.length>V.length)return 1;if(this.length<V.length)return-1;for(var N=0,B=this.length-1;B>=0;B--){var G=0|this.words[B],w=0|V.words[B];if(G!==w){G<w?N=-1:G>w&&(N=1);break}}return N},n.prototype.gtn=function(V){return this.cmpn(V)===1},n.prototype.gt=function(V){return this.cmp(V)===1},n.prototype.gten=function(V){return this.cmpn(V)>=0},n.prototype.gte=function(V){return this.cmp(V)>=0},n.prototype.ltn=function(V){return this.cmpn(V)===-1},n.prototype.lt=function(V){return this.cmp(V)===-1},n.prototype.lten=function(V){return this.cmpn(V)<=0},n.prototype.lte=function(V){return this.cmp(V)<=0},n.prototype.eqn=function(V){return this.cmpn(V)===0},n.prototype.eq=function(V){return this.cmp(V)===0},n.red=function(V){return new v(V)},n.prototype.toRed=function(V){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),V.convertTo(this)._forceRed(V)},n.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(V){return this.red=V,this},n.prototype.forceRed=function(V){return s(!this.red,"Already a number in reduction context"),this._forceRed(V)},n.prototype.redAdd=function(V){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,V)},n.prototype.redIAdd=function(V){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,V)},n.prototype.redSub=function(V){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,V)},n.prototype.redISub=function(V){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,V)},n.prototype.redShl=function(V){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,V)},n.prototype.redMul=function(V){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,V),this.red.mul(this,V)},n.prototype.redIMul=function(V){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,V),this.red.imul(this,V)},n.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(V){return s(this.red&&!V.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,V)};var Y={k256:null,p224:null,p192:null,p25519:null};function R(V,N){this.name=V,this.p=new n(N,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function X(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function H(){R.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){R.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function z(){R.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function v(V){if(typeof V=="string"){var N=n._prime(V);this.m=N.p,this.prime=N}else s(V.gtn(1),"modulus must be greater than 1"),this.m=V,this.prime=null}function K(V){v.call(this,V),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R.prototype._tmp=function(){var V=new n(null);return V.words=new Array(Math.ceil(this.n/13)),V},R.prototype.ireduce=function(V){var N,B=V;do this.split(B,this.tmp),N=(B=(B=this.imulK(B)).iadd(this.tmp)).bitLength();while(N>this.n);var G=N<this.n?-1:B.ucmp(this.p);return G===0?(B.words[0]=0,B.length=1):G>0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},R.prototype.split=function(V,N){V.iushrn(this.n,0,N)},R.prototype.imulK=function(V){return V.imul(this.k)},l(X,R),X.prototype.split=function(V,N){for(var B=Math.min(V.length,9),G=0;G<B;G++)N.words[G]=V.words[G];if(N.length=B,V.length<=9)return V.words[0]=0,void(V.length=1);var w=V.words[9];for(N.words[N.length++]=4194303&w,G=10;G<V.length;G++){var W=0|V.words[G];V.words[G-10]=(4194303&W)<<4|w>>>22,w=W}w>>>=22,V.words[G-10]=w,w===0&&V.length>10?V.length-=10:V.length-=9},X.prototype.imulK=function(V){V.words[V.length]=0,V.words[V.length+1]=0,V.length+=2;for(var N=0,B=0;B<V.length;B++){var G=0|V.words[B];N+=977*G,V.words[B]=67108863&N,N=64*G+(N/67108864|0)}return V.words[V.length-1]===0&&(V.length--,V.words[V.length-1]===0&&V.length--),V},l(H,R),l(S,R),l(z,R),z.prototype.imulK=function(V){for(var N=0,B=0;B<V.length;B++){var G=19*(0|V.words[B])+N,w=67108863&G;G>>>=26,V.words[B]=w,N=G}return N!==0&&(V.words[V.length++]=N),V},n._prime=function(V){if(Y[V])return Y[V];var N;if(V==="k256")N=new X;else if(V==="p224")N=new H;else if(V==="p192")N=new S;else{if(V!=="p25519")throw new Error("Unknown prime "+V);N=new z}return Y[V]=N,N},v.prototype._verify1=function(V){s(V.negative===0,"red works only with positives"),s(V.red,"red works only with red numbers")},v.prototype._verify2=function(V,N){s((V.negative|N.negative)==0,"red works only with positives"),s(V.red&&V.red===N.red,"red works only with red numbers")},v.prototype.imod=function(V){return this.prime?this.prime.ireduce(V)._forceRed(this):V.umod(this.m)._forceRed(this)},v.prototype.neg=function(V){return V.isZero()?V.clone():this.m.sub(V)._forceRed(this)},v.prototype.add=function(V,N){this._verify2(V,N);var B=V.add(N);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},v.prototype.iadd=function(V,N){this._verify2(V,N);var B=V.iadd(N);return B.cmp(this.m)>=0&&B.isub(this.m),B},v.prototype.sub=function(V,N){this._verify2(V,N);var B=V.sub(N);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},v.prototype.isub=function(V,N){this._verify2(V,N);var B=V.isub(N);return B.cmpn(0)<0&&B.iadd(this.m),B},v.prototype.shl=function(V,N){return this._verify1(V),this.imod(V.ushln(N))},v.prototype.imul=function(V,N){return this._verify2(V,N),this.imod(V.imul(N))},v.prototype.mul=function(V,N){return this._verify2(V,N),this.imod(V.mul(N))},v.prototype.isqr=function(V){return this.imul(V,V.clone())},v.prototype.sqr=function(V){return this.mul(V,V)},v.prototype.sqrt=function(V){if(V.isZero())return V.clone();var N=this.m.andln(3);if(s(N%2==1),N===3){var B=this.m.add(new n(1)).iushrn(2);return this.pow(V,B)}for(var G=this.m.subn(1),w=0;!G.isZero()&&G.andln(1)===0;)w++,G.iushrn(1);s(!G.isZero());var W=new n(1).toRed(this),y=W.redNeg(),f=this.m.subn(1).iushrn(1),D=this.m.bitLength();for(D=new n(2*D*D).toRed(this);this.pow(D,f).cmp(y)!==0;)D.redIAdd(y);for(var F=this.pow(D,G),T=this.pow(V,G.addn(1).iushrn(1)),Q=this.pow(V,G),P=w;Q.cmp(W)!==0;){for(var L=Q,E=0;L.cmp(W)!==0;E++)L=L.redSqr();s(E<P);var J=this.pow(F,new n(1).iushln(P-E-1));T=T.redMul(J),F=J.redSqr(),Q=Q.redMul(F),P=E}return T},v.prototype.invm=function(V){var N=V._invmp(this.m);return N.negative!==0?(N.negative=0,this.imod(N).redNeg()):this.imod(N)},v.prototype.pow=function(V,N){if(N.isZero())return new n(1).toRed(this);if(N.cmpn(1)===0)return V.clone();var B=new Array(16);B[0]=new n(1).toRed(this),B[1]=V;for(var G=2;G<B.length;G++)B[G]=this.mul(B[G-1],V);var w=B[0],W=0,y=0,f=N.bitLength()%26;for(f===0&&(f=26),G=N.length-1;G>=0;G--){for(var D=N.words[G],F=f-1;F>=0;F--){var T=D>>F&1;w!==B[0]&&(w=this.sqr(w)),T!==0||W!==0?(W<<=1,W|=T,(++y===4||G===0&&F===0)&&(w=this.mul(w,B[W]),y=0,W=0)):y=0}f=26}return w},v.prototype.convertTo=function(V){var N=V.umod(this.m);return N===V?N.clone():N},v.prototype.convertFrom=function(V){var N=V.clone();return N.red=null,N},n.mont=function(V){return new K(V)},l(K,v),K.prototype.convertTo=function(V){return this.imod(V.ushln(this.shift))},K.prototype.convertFrom=function(V){var N=this.imod(V.mul(this.rinv));return N.red=null,N},K.prototype.imul=function(V,N){if(V.isZero()||N.isZero())return V.words[0]=0,V.length=1,V;var B=V.imul(N),G=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=B.isub(G).iushrn(this.shift),W=w;return w.cmp(this.m)>=0?W=w.isub(this.m):w.cmpn(0)<0&&(W=w.iadd(this.m)),W._forceRed(this)},K.prototype.mul=function(V,N){if(V.isZero()||N.isZero())return new n(0)._forceRed(this);var B=V.mul(N),G=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=B.isub(G).iushrn(this.shift),W=w;return w.cmp(this.m)>=0?W=w.isub(this.m):w.cmpn(0)<0&&(W=w.iadd(this.m)),W._forceRed(this)},K.prototype.invm=function(V){return this.imod(V._invmp(this.m).mul(this.r2))._forceRed(this)}})(C===void 0||C)},{buffer:188}],185:[function(g,C,i){i.byteLength=function(c){var r=d(c),h=r[0],b=r[1];return 3*(h+b)/4-b},i.toByteArray=function(c){var r,h,b=d(c),u=b[0],m=b[1],Z=new s(function(R,X,H){return 3*(X+H)/4-H}(0,u,m)),p=0,Y=m>0?u-4:u;for(h=0;h<Y;h+=4)r=A[c.charCodeAt(h)]<<18|A[c.charCodeAt(h+1)]<<12|A[c.charCodeAt(h+2)]<<6|A[c.charCodeAt(h+3)],Z[p++]=r>>16&255,Z[p++]=r>>8&255,Z[p++]=255&r;return m===2&&(r=A[c.charCodeAt(h)]<<2|A[c.charCodeAt(h+1)]>>4,Z[p++]=255&r),m===1&&(r=A[c.charCodeAt(h)]<<10|A[c.charCodeAt(h+1)]<<4|A[c.charCodeAt(h+2)]>>2,Z[p++]=r>>8&255,Z[p++]=255&r),Z},i.fromByteArray=function(c){for(var r,h=c.length,b=h%3,u=[],m=0,Z=h-b;m<Z;m+=16383)u.push(o(c,m,m+16383>Z?Z:m+16383));return b===1?(r=c[h-1],u.push(e[r>>2]+e[r<<4&63]+"==")):b===2&&(r=(c[h-2]<<8)+c[h-1],u.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"=")),u.join("")};for(var e=[],A=[],s=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,a=l.length;n<a;++n)e[n]=l[n],A[l.charCodeAt(n)]=n;function d(c){var r=c.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");return h===-1&&(h=r),[h,h===r?0:4-h%4]}function o(c,r,h){for(var b,u,m=[],Z=r;Z<h;Z+=3)b=(c[Z]<<16&16711680)+(c[Z+1]<<8&65280)+(255&c[Z+2]),m.push(e[(u=b)>>18&63]+e[u>>12&63]+e[u>>6&63]+e[63&u]);return m.join("")}A[45]=62,A[95]=63},{}],186:[function(g,C,i){(function(e,A){function s(B,G){if(!B)throw new Error(G||"Assertion failed")}function l(B,G){B.super_=G;var w=function(){};w.prototype=G.prototype,B.prototype=new w,B.prototype.constructor=B}function n(B,G,w){if(n.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&(G!=="le"&&G!=="be"||(w=G,G=10),this._init(B||0,G||10,w||"be"))}var a;typeof e=="object"?e.exports=n:(void 0).BN=n,n.BN=n,n.wordSize=26;try{a=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:g("buffer").Buffer}catch{}function d(B,G){var w=B.charCodeAt(G);return w>=48&&w<=57?w-48:w>=65&&w<=70?w-55:w>=97&&w<=102?w-87:void s(!1,"Invalid character in "+B)}function o(B,G,w){var W=d(B,w);return w-1>=G&&(W|=d(B,w-1)<<4),W}function c(B,G,w,W){for(var y=0,f=0,D=Math.min(B.length,w),F=G;F<D;F++){var T=B.charCodeAt(F)-48;y*=W,f=T>=49?T-49+10:T>=17?T-17+10:T,s(T>=0&&f<W,"Invalid character"),y+=f}return y}function r(B,G){B.words=G.words,B.length=G.length,B.negative=G.negative,B.red=G.red}if(n.isBN=function(B){return B instanceof n||B!==null&&typeof B=="object"&&B.constructor.wordSize===n.wordSize&&Array.isArray(B.words)},n.max=function(B,G){return B.cmp(G)>0?B:G},n.min=function(B,G){return B.cmp(G)<0?B:G},n.prototype._init=function(B,G,w){if(typeof B=="number")return this._initNumber(B,G,w);if(typeof B=="object")return this._initArray(B,G,w);G==="hex"&&(G=16),s(G===(0|G)&&G>=2&&G<=36);var W=0;(B=B.toString().replace(/\s+/g,""))[0]==="-"&&(W++,this.negative=1),W<B.length&&(G===16?this._parseHex(B,W,w):(this._parseBase(B,G,W),w==="le"&&this._initArray(this.toArray(),G,w)))},n.prototype._initNumber=function(B,G,w){B<0&&(this.negative=1,B=-B),B<67108864?(this.words=[67108863&B],this.length=1):B<4503599627370496?(this.words=[67108863&B,B/67108864&67108863],this.length=2):(s(B<9007199254740992),this.words=[67108863&B,B/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),G,w)},n.prototype._initArray=function(B,G,w){if(s(typeof B.length=="number"),B.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(B.length/3),this.words=new Array(this.length);for(var W=0;W<this.length;W++)this.words[W]=0;var y,f,D=0;if(w==="be")for(W=B.length-1,y=0;W>=0;W-=3)f=B[W]|B[W-1]<<8|B[W-2]<<16,this.words[y]|=f<<D&67108863,this.words[y+1]=f>>>26-D&67108863,(D+=24)>=26&&(D-=26,y++);else if(w==="le")for(W=0,y=0;W<B.length;W+=3)f=B[W]|B[W+1]<<8|B[W+2]<<16,this.words[y]|=f<<D&67108863,this.words[y+1]=f>>>26-D&67108863,(D+=24)>=26&&(D-=26,y++);return this._strip()},n.prototype._parseHex=function(B,G,w){this.length=Math.ceil((B.length-G)/6),this.words=new Array(this.length);for(var W=0;W<this.length;W++)this.words[W]=0;var y,f=0,D=0;if(w==="be")for(W=B.length-1;W>=G;W-=2)y=o(B,G,W)<<f,this.words[D]|=67108863&y,f>=18?(f-=18,D+=1,this.words[D]|=y>>>26):f+=8;else for(W=(B.length-G)%2==0?G+1:G;W<B.length;W+=2)y=o(B,G,W)<<f,this.words[D]|=67108863&y,f>=18?(f-=18,D+=1,this.words[D]|=y>>>26):f+=8;this._strip()},n.prototype._parseBase=function(B,G,w){this.words=[0],this.length=1;for(var W=0,y=1;y<=67108863;y*=G)W++;W--,y=y/G|0;for(var f=B.length-w,D=f%W,F=Math.min(f,f-D)+w,T=0,Q=w;Q<F;Q+=W)T=c(B,Q,Q+W,G),this.imuln(y),this.words[0]+T<67108864?this.words[0]+=T:this._iaddn(T);if(D!==0){var P=1;for(T=c(B,Q,B.length,G),Q=0;Q<D;Q++)P*=G;this.imuln(P),this.words[0]+T<67108864?this.words[0]+=T:this._iaddn(T)}this._strip()},n.prototype.copy=function(B){B.words=new Array(this.length);for(var G=0;G<this.length;G++)B.words[G]=this.words[G];B.length=this.length,B.negative=this.negative,B.red=this.red},n.prototype._move=function(B){r(B,this)},n.prototype.clone=function(){var B=new n(null);return this.copy(B),B},n.prototype._expand=function(B){for(;this.length<B;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch{n.prototype.inspect=h}else n.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(B,G){var w;if(G=0|G||1,(B=B||10)===16||B==="hex"){w="";for(var W=0,y=0,f=0;f<this.length;f++){var D=this.words[f],F=(16777215&(D<<W|y)).toString(16);y=D>>>24-W&16777215,(W+=2)>=26&&(W-=26,f--),w=y!==0||f!==this.length-1?b[6-F.length]+F+w:F+w}for(y!==0&&(w=y.toString(16)+w);w.length%G!=0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(B===(0|B)&&B>=2&&B<=36){var T=u[B],Q=m[B];w="";var P=this.clone();for(P.negative=0;!P.isZero();){var L=P.modrn(Q).toString(B);w=(P=P.idivn(Q)).isZero()?L+w:b[T-L.length]+L+w}for(this.isZero()&&(w="0"+w);w.length%G!=0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}s(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var B=this.words[0];return this.length===2?B+=67108864*this.words[1]:this.length===3&&this.words[2]===1?B+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-B:B},n.prototype.toJSON=function(){return this.toString(16,2)},a&&(n.prototype.toBuffer=function(B,G){return this.toArrayLike(a,B,G)}),n.prototype.toArray=function(B,G){return this.toArrayLike(Array,B,G)};function Z(B,G,w){w.negative=G.negative^B.negative;var W=B.length+G.length|0;w.length=W,W=W-1|0;var y=0|B.words[0],f=0|G.words[0],D=y*f,F=67108863&D,T=D/67108864|0;w.words[0]=F;for(var Q=1;Q<W;Q++){for(var P=T>>>26,L=67108863&T,E=Math.min(Q,G.length-1),J=Math.max(0,Q-B.length+1);J<=E;J++){var k=Q-J|0;P+=(D=(y=0|B.words[k])*(f=0|G.words[J])+L)/67108864|0,L=67108863&D}w.words[Q]=0|L,T=0|P}return T!==0?w.words[Q]=0|T:w.length--,w._strip()}n.prototype.toArrayLike=function(B,G,w){this._strip();var W=this.byteLength(),y=w||Math.max(1,W);s(W<=y,"byte array longer than desired length"),s(y>0,"Requested array length <= 0");var f=function(D,F){return D.allocUnsafe?D.allocUnsafe(F):new D(F)}(B,y);return this["_toArrayLike"+(G==="le"?"LE":"BE")](f,W),f},n.prototype._toArrayLikeLE=function(B,G){for(var w=0,W=0,y=0,f=0;y<this.length;y++){var D=this.words[y]<<f|W;B[w++]=255&D,w<B.length&&(B[w++]=D>>8&255),w<B.length&&(B[w++]=D>>16&255),f===6?(w<B.length&&(B[w++]=D>>24&255),W=0,f=0):(W=D>>>24,f+=2)}if(w<B.length)for(B[w++]=W;w<B.length;)B[w++]=0},n.prototype._toArrayLikeBE=function(B,G){for(var w=B.length-1,W=0,y=0,f=0;y<this.length;y++){var D=this.words[y]<<f|W;B[w--]=255&D,w>=0&&(B[w--]=D>>8&255),w>=0&&(B[w--]=D>>16&255),f===6?(w>=0&&(B[w--]=D>>24&255),W=0,f=0):(W=D>>>24,f+=2)}if(w>=0)for(B[w--]=W;w>=0;)B[w--]=0},Math.clz32?n.prototype._countBits=function(B){return 32-Math.clz32(B)}:n.prototype._countBits=function(B){var G=B,w=0;return G>=4096&&(w+=13,G>>>=13),G>=64&&(w+=7,G>>>=7),G>=8&&(w+=4,G>>>=4),G>=2&&(w+=2,G>>>=2),w+G},n.prototype._zeroBits=function(B){if(B===0)return 26;var G=B,w=0;return(8191&G)==0&&(w+=13,G>>>=13),(127&G)==0&&(w+=7,G>>>=7),(15&G)==0&&(w+=4,G>>>=4),(3&G)==0&&(w+=2,G>>>=2),(1&G)==0&&w++,w},n.prototype.bitLength=function(){var B=this.words[this.length-1],G=this._countBits(B);return 26*(this.length-1)+G},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var B=0,G=0;G<this.length;G++){var w=this._zeroBits(this.words[G]);if(B+=w,w!==26)break}return B},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(B){return this.negative!==0?this.abs().inotn(B).iaddn(1):this.clone()},n.prototype.fromTwos=function(B){return this.testn(B-1)?this.notn(B).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(B){for(;this.length<B.length;)this.words[this.length++]=0;for(var G=0;G<B.length;G++)this.words[G]=this.words[G]|B.words[G];return this._strip()},n.prototype.ior=function(B){return s((this.negative|B.negative)==0),this.iuor(B)},n.prototype.or=function(B){return this.length>B.length?this.clone().ior(B):B.clone().ior(this)},n.prototype.uor=function(B){return this.length>B.length?this.clone().iuor(B):B.clone().iuor(this)},n.prototype.iuand=function(B){var G;G=this.length>B.length?B:this;for(var w=0;w<G.length;w++)this.words[w]=this.words[w]&B.words[w];return this.length=G.length,this._strip()},n.prototype.iand=function(B){return s((this.negative|B.negative)==0),this.iuand(B)},n.prototype.and=function(B){return this.length>B.length?this.clone().iand(B):B.clone().iand(this)},n.prototype.uand=function(B){return this.length>B.length?this.clone().iuand(B):B.clone().iuand(this)},n.prototype.iuxor=function(B){var G,w;this.length>B.length?(G=this,w=B):(G=B,w=this);for(var W=0;W<w.length;W++)this.words[W]=G.words[W]^w.words[W];if(this!==G)for(;W<G.length;W++)this.words[W]=G.words[W];return this.length=G.length,this._strip()},n.prototype.ixor=function(B){return s((this.negative|B.negative)==0),this.iuxor(B)},n.prototype.xor=function(B){return this.length>B.length?this.clone().ixor(B):B.clone().ixor(this)},n.prototype.uxor=function(B){return this.length>B.length?this.clone().iuxor(B):B.clone().iuxor(this)},n.prototype.inotn=function(B){s(typeof B=="number"&&B>=0);var G=0|Math.ceil(B/26),w=B%26;this._expand(G),w>0&&G--;for(var W=0;W<G;W++)this.words[W]=67108863&~this.words[W];return w>0&&(this.words[W]=~this.words[W]&67108863>>26-w),this._strip()},n.prototype.notn=function(B){return this.clone().inotn(B)},n.prototype.setn=function(B,G){s(typeof B=="number"&&B>=0);var w=B/26|0,W=B%26;return this._expand(w+1),this.words[w]=G?this.words[w]|1<<W:this.words[w]&~(1<<W),this._strip()},n.prototype.iadd=function(B){var G,w,W;if(this.negative!==0&&B.negative===0)return this.negative=0,G=this.isub(B),this.negative^=1,this._normSign();if(this.negative===0&&B.negative!==0)return B.negative=0,G=this.isub(B),B.negative=1,G._normSign();this.length>B.length?(w=this,W=B):(w=B,W=this);for(var y=0,f=0;f<W.length;f++)G=(0|w.words[f])+(0|W.words[f])+y,this.words[f]=67108863&G,y=G>>>26;for(;y!==0&&f<w.length;f++)G=(0|w.words[f])+y,this.words[f]=67108863&G,y=G>>>26;if(this.length=w.length,y!==0)this.words[this.length]=y,this.length++;else if(w!==this)for(;f<w.length;f++)this.words[f]=w.words[f];return this},n.prototype.add=function(B){var G;return B.negative!==0&&this.negative===0?(B.negative=0,G=this.sub(B),B.negative^=1,G):B.negative===0&&this.negative!==0?(this.negative=0,G=B.sub(this),this.negative=1,G):this.length>B.length?this.clone().iadd(B):B.clone().iadd(this)},n.prototype.isub=function(B){if(B.negative!==0){B.negative=0;var G=this.iadd(B);return B.negative=1,G._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(B),this.negative=1,this._normSign();var w,W,y=this.cmp(B);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;y>0?(w=this,W=B):(w=B,W=this);for(var f=0,D=0;D<W.length;D++)f=(G=(0|w.words[D])-(0|W.words[D])+f)>>26,this.words[D]=67108863&G;for(;f!==0&&D<w.length;D++)f=(G=(0|w.words[D])+f)>>26,this.words[D]=67108863&G;if(f===0&&D<w.length&&w!==this)for(;D<w.length;D++)this.words[D]=w.words[D];return this.length=Math.max(this.length,D),w!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(B){return this.clone().isub(B)};var p=function(B,G,w){var W,y,f,D=B.words,F=G.words,T=w.words,Q=0,P=0|D[0],L=8191&P,E=P>>>13,J=0|D[1],k=8191&J,j=J>>>13,q=0|D[2],tg=8191&q,Cg=q>>>13,x=0|D[3],sg=8191&x,Ag=x>>>13,O=0|D[4],_=8191&O,Ig=O>>>13,ng=0|D[5],ag=8191&ng,lg=ng>>>13,cg=0|D[6],dg=8191&cg,hg=cg>>>13,rg=0|D[7],Wg=8191&rg,Gg=rg>>>13,Sg=0|D[8],Kg=8191&Sg,kg=Sg>>>13,yg=0|D[9],Vg=8191&yg,pg=yg>>>13,Hg=0|F[0],Jg=8191&Hg,zg=Hg>>>13,aI=0|F[1],BI=8191&aI,Ug=aI>>>13,lI=0|F[2],oI=8191&lI,Eg=lI>>>13,LI=0|F[3],fI=8191&LI,tI=LI>>>13,WI=0|F[4],QI=8191&WI,nI=WI>>>13,kI=0|F[5],Bg=8191&kI,hI=kI>>>13,bg=0|F[6],ug=8191&bg,fg=bg>>>13,Tg=0|F[7],cI=8191&Tg,jg=Tg>>>13,mI=0|F[8],sI=8191&mI,gI=mI>>>13,pI=0|F[9],bI=8191&pI,yI=pI>>>13;w.negative=B.negative^G.negative,w.length=19;var wC=(Q+(W=Math.imul(L,Jg))|0)+((8191&(y=(y=Math.imul(L,zg))+Math.imul(E,Jg)|0))<<13)|0;Q=((f=Math.imul(E,zg))+(y>>>13)|0)+(wC>>>26)|0,wC&=67108863,W=Math.imul(k,Jg),y=(y=Math.imul(k,zg))+Math.imul(j,Jg)|0,f=Math.imul(j,zg);var _I=(Q+(W=W+Math.imul(L,BI)|0)|0)+((8191&(y=(y=y+Math.imul(L,Ug)|0)+Math.imul(E,BI)|0))<<13)|0;Q=((f=f+Math.imul(E,Ug)|0)+(y>>>13)|0)+(_I>>>26)|0,_I&=67108863,W=Math.imul(tg,Jg),y=(y=Math.imul(tg,zg))+Math.imul(Cg,Jg)|0,f=Math.imul(Cg,zg),W=W+Math.imul(k,BI)|0,y=(y=y+Math.imul(k,Ug)|0)+Math.imul(j,BI)|0,f=f+Math.imul(j,Ug)|0;var _C=(Q+(W=W+Math.imul(L,oI)|0)|0)+((8191&(y=(y=y+Math.imul(L,Eg)|0)+Math.imul(E,oI)|0))<<13)|0;Q=((f=f+Math.imul(E,Eg)|0)+(y>>>13)|0)+(_C>>>26)|0,_C&=67108863,W=Math.imul(sg,Jg),y=(y=Math.imul(sg,zg))+Math.imul(Ag,Jg)|0,f=Math.imul(Ag,zg),W=W+Math.imul(tg,BI)|0,y=(y=y+Math.imul(tg,Ug)|0)+Math.imul(Cg,BI)|0,f=f+Math.imul(Cg,Ug)|0,W=W+Math.imul(k,oI)|0,y=(y=y+Math.imul(k,Eg)|0)+Math.imul(j,oI)|0,f=f+Math.imul(j,Eg)|0;var nC=(Q+(W=W+Math.imul(L,fI)|0)|0)+((8191&(y=(y=y+Math.imul(L,tI)|0)+Math.imul(E,fI)|0))<<13)|0;Q=((f=f+Math.imul(E,tI)|0)+(y>>>13)|0)+(nC>>>26)|0,nC&=67108863,W=Math.imul(_,Jg),y=(y=Math.imul(_,zg))+Math.imul(Ig,Jg)|0,f=Math.imul(Ig,zg),W=W+Math.imul(sg,BI)|0,y=(y=y+Math.imul(sg,Ug)|0)+Math.imul(Ag,BI)|0,f=f+Math.imul(Ag,Ug)|0,W=W+Math.imul(tg,oI)|0,y=(y=y+Math.imul(tg,Eg)|0)+Math.imul(Cg,oI)|0,f=f+Math.imul(Cg,Eg)|0,W=W+Math.imul(k,fI)|0,y=(y=y+Math.imul(k,tI)|0)+Math.imul(j,fI)|0,f=f+Math.imul(j,tI)|0;var Ft=(Q+(W=W+Math.imul(L,QI)|0)|0)+((8191&(y=(y=y+Math.imul(L,nI)|0)+Math.imul(E,QI)|0))<<13)|0;Q=((f=f+Math.imul(E,nI)|0)+(y>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,W=Math.imul(ag,Jg),y=(y=Math.imul(ag,zg))+Math.imul(lg,Jg)|0,f=Math.imul(lg,zg),W=W+Math.imul(_,BI)|0,y=(y=y+Math.imul(_,Ug)|0)+Math.imul(Ig,BI)|0,f=f+Math.imul(Ig,Ug)|0,W=W+Math.imul(sg,oI)|0,y=(y=y+Math.imul(sg,Eg)|0)+Math.imul(Ag,oI)|0,f=f+Math.imul(Ag,Eg)|0,W=W+Math.imul(tg,fI)|0,y=(y=y+Math.imul(tg,tI)|0)+Math.imul(Cg,fI)|0,f=f+Math.imul(Cg,tI)|0,W=W+Math.imul(k,QI)|0,y=(y=y+Math.imul(k,nI)|0)+Math.imul(j,QI)|0,f=f+Math.imul(j,nI)|0;var og=(Q+(W=W+Math.imul(L,Bg)|0)|0)+((8191&(y=(y=y+Math.imul(L,hI)|0)+Math.imul(E,Bg)|0))<<13)|0;Q=((f=f+Math.imul(E,hI)|0)+(y>>>13)|0)+(og>>>26)|0,og&=67108863,W=Math.imul(dg,Jg),y=(y=Math.imul(dg,zg))+Math.imul(hg,Jg)|0,f=Math.imul(hg,zg),W=W+Math.imul(ag,BI)|0,y=(y=y+Math.imul(ag,Ug)|0)+Math.imul(lg,BI)|0,f=f+Math.imul(lg,Ug)|0,W=W+Math.imul(_,oI)|0,y=(y=y+Math.imul(_,Eg)|0)+Math.imul(Ig,oI)|0,f=f+Math.imul(Ig,Eg)|0,W=W+Math.imul(sg,fI)|0,y=(y=y+Math.imul(sg,tI)|0)+Math.imul(Ag,fI)|0,f=f+Math.imul(Ag,tI)|0,W=W+Math.imul(tg,QI)|0,y=(y=y+Math.imul(tg,nI)|0)+Math.imul(Cg,QI)|0,f=f+Math.imul(Cg,nI)|0,W=W+Math.imul(k,Bg)|0,y=(y=y+Math.imul(k,hI)|0)+Math.imul(j,Bg)|0,f=f+Math.imul(j,hI)|0;var Zg=(Q+(W=W+Math.imul(L,ug)|0)|0)+((8191&(y=(y=y+Math.imul(L,fg)|0)+Math.imul(E,ug)|0))<<13)|0;Q=((f=f+Math.imul(E,fg)|0)+(y>>>13)|0)+(Zg>>>26)|0,Zg&=67108863,W=Math.imul(Wg,Jg),y=(y=Math.imul(Wg,zg))+Math.imul(Gg,Jg)|0,f=Math.imul(Gg,zg),W=W+Math.imul(dg,BI)|0,y=(y=y+Math.imul(dg,Ug)|0)+Math.imul(hg,BI)|0,f=f+Math.imul(hg,Ug)|0,W=W+Math.imul(ag,oI)|0,y=(y=y+Math.imul(ag,Eg)|0)+Math.imul(lg,oI)|0,f=f+Math.imul(lg,Eg)|0,W=W+Math.imul(_,fI)|0,y=(y=y+Math.imul(_,tI)|0)+Math.imul(Ig,fI)|0,f=f+Math.imul(Ig,tI)|0,W=W+Math.imul(sg,QI)|0,y=(y=y+Math.imul(sg,nI)|0)+Math.imul(Ag,QI)|0,f=f+Math.imul(Ag,nI)|0,W=W+Math.imul(tg,Bg)|0,y=(y=y+Math.imul(tg,hI)|0)+Math.imul(Cg,Bg)|0,f=f+Math.imul(Cg,hI)|0,W=W+Math.imul(k,ug)|0,y=(y=y+Math.imul(k,fg)|0)+Math.imul(j,ug)|0,f=f+Math.imul(j,fg)|0;var Dg=(Q+(W=W+Math.imul(L,cI)|0)|0)+((8191&(y=(y=y+Math.imul(L,jg)|0)+Math.imul(E,cI)|0))<<13)|0;Q=((f=f+Math.imul(E,jg)|0)+(y>>>13)|0)+(Dg>>>26)|0,Dg&=67108863,W=Math.imul(Kg,Jg),y=(y=Math.imul(Kg,zg))+Math.imul(kg,Jg)|0,f=Math.imul(kg,zg),W=W+Math.imul(Wg,BI)|0,y=(y=y+Math.imul(Wg,Ug)|0)+Math.imul(Gg,BI)|0,f=f+Math.imul(Gg,Ug)|0,W=W+Math.imul(dg,oI)|0,y=(y=y+Math.imul(dg,Eg)|0)+Math.imul(hg,oI)|0,f=f+Math.imul(hg,Eg)|0,W=W+Math.imul(ag,fI)|0,y=(y=y+Math.imul(ag,tI)|0)+Math.imul(lg,fI)|0,f=f+Math.imul(lg,tI)|0,W=W+Math.imul(_,QI)|0,y=(y=y+Math.imul(_,nI)|0)+Math.imul(Ig,QI)|0,f=f+Math.imul(Ig,nI)|0,W=W+Math.imul(sg,Bg)|0,y=(y=y+Math.imul(sg,hI)|0)+Math.imul(Ag,Bg)|0,f=f+Math.imul(Ag,hI)|0,W=W+Math.imul(tg,ug)|0,y=(y=y+Math.imul(tg,fg)|0)+Math.imul(Cg,ug)|0,f=f+Math.imul(Cg,fg)|0,W=W+Math.imul(k,cI)|0,y=(y=y+Math.imul(k,jg)|0)+Math.imul(j,cI)|0,f=f+Math.imul(j,jg)|0;var Fg=(Q+(W=W+Math.imul(L,sI)|0)|0)+((8191&(y=(y=y+Math.imul(L,gI)|0)+Math.imul(E,sI)|0))<<13)|0;Q=((f=f+Math.imul(E,gI)|0)+(y>>>13)|0)+(Fg>>>26)|0,Fg&=67108863,W=Math.imul(Vg,Jg),y=(y=Math.imul(Vg,zg))+Math.imul(pg,Jg)|0,f=Math.imul(pg,zg),W=W+Math.imul(Kg,BI)|0,y=(y=y+Math.imul(Kg,Ug)|0)+Math.imul(kg,BI)|0,f=f+Math.imul(kg,Ug)|0,W=W+Math.imul(Wg,oI)|0,y=(y=y+Math.imul(Wg,Eg)|0)+Math.imul(Gg,oI)|0,f=f+Math.imul(Gg,Eg)|0,W=W+Math.imul(dg,fI)|0,y=(y=y+Math.imul(dg,tI)|0)+Math.imul(hg,fI)|0,f=f+Math.imul(hg,tI)|0,W=W+Math.imul(ag,QI)|0,y=(y=y+Math.imul(ag,nI)|0)+Math.imul(lg,QI)|0,f=f+Math.imul(lg,nI)|0,W=W+Math.imul(_,Bg)|0,y=(y=y+Math.imul(_,hI)|0)+Math.imul(Ig,Bg)|0,f=f+Math.imul(Ig,hI)|0,W=W+Math.imul(sg,ug)|0,y=(y=y+Math.imul(sg,fg)|0)+Math.imul(Ag,ug)|0,f=f+Math.imul(Ag,fg)|0,W=W+Math.imul(tg,cI)|0,y=(y=y+Math.imul(tg,jg)|0)+Math.imul(Cg,cI)|0,f=f+Math.imul(Cg,jg)|0,W=W+Math.imul(k,sI)|0,y=(y=y+Math.imul(k,gI)|0)+Math.imul(j,sI)|0,f=f+Math.imul(j,gI)|0;var II=(Q+(W=W+Math.imul(L,bI)|0)|0)+((8191&(y=(y=y+Math.imul(L,yI)|0)+Math.imul(E,bI)|0))<<13)|0;Q=((f=f+Math.imul(E,yI)|0)+(y>>>13)|0)+(II>>>26)|0,II&=67108863,W=Math.imul(Vg,BI),y=(y=Math.imul(Vg,Ug))+Math.imul(pg,BI)|0,f=Math.imul(pg,Ug),W=W+Math.imul(Kg,oI)|0,y=(y=y+Math.imul(Kg,Eg)|0)+Math.imul(kg,oI)|0,f=f+Math.imul(kg,Eg)|0,W=W+Math.imul(Wg,fI)|0,y=(y=y+Math.imul(Wg,tI)|0)+Math.imul(Gg,fI)|0,f=f+Math.imul(Gg,tI)|0,W=W+Math.imul(dg,QI)|0,y=(y=y+Math.imul(dg,nI)|0)+Math.imul(hg,QI)|0,f=f+Math.imul(hg,nI)|0,W=W+Math.imul(ag,Bg)|0,y=(y=y+Math.imul(ag,hI)|0)+Math.imul(lg,Bg)|0,f=f+Math.imul(lg,hI)|0,W=W+Math.imul(_,ug)|0,y=(y=y+Math.imul(_,fg)|0)+Math.imul(Ig,ug)|0,f=f+Math.imul(Ig,fg)|0,W=W+Math.imul(sg,cI)|0,y=(y=y+Math.imul(sg,jg)|0)+Math.imul(Ag,cI)|0,f=f+Math.imul(Ag,jg)|0,W=W+Math.imul(tg,sI)|0,y=(y=y+Math.imul(tg,gI)|0)+Math.imul(Cg,sI)|0,f=f+Math.imul(Cg,gI)|0;var vg=(Q+(W=W+Math.imul(k,bI)|0)|0)+((8191&(y=(y=y+Math.imul(k,yI)|0)+Math.imul(j,bI)|0))<<13)|0;Q=((f=f+Math.imul(j,yI)|0)+(y>>>13)|0)+(vg>>>26)|0,vg&=67108863,W=Math.imul(Vg,oI),y=(y=Math.imul(Vg,Eg))+Math.imul(pg,oI)|0,f=Math.imul(pg,Eg),W=W+Math.imul(Kg,fI)|0,y=(y=y+Math.imul(Kg,tI)|0)+Math.imul(kg,fI)|0,f=f+Math.imul(kg,tI)|0,W=W+Math.imul(Wg,QI)|0,y=(y=y+Math.imul(Wg,nI)|0)+Math.imul(Gg,QI)|0,f=f+Math.imul(Gg,nI)|0,W=W+Math.imul(dg,Bg)|0,y=(y=y+Math.imul(dg,hI)|0)+Math.imul(hg,Bg)|0,f=f+Math.imul(hg,hI)|0,W=W+Math.imul(ag,ug)|0,y=(y=y+Math.imul(ag,fg)|0)+Math.imul(lg,ug)|0,f=f+Math.imul(lg,fg)|0,W=W+Math.imul(_,cI)|0,y=(y=y+Math.imul(_,jg)|0)+Math.imul(Ig,cI)|0,f=f+Math.imul(Ig,jg)|0,W=W+Math.imul(sg,sI)|0,y=(y=y+Math.imul(sg,gI)|0)+Math.imul(Ag,sI)|0,f=f+Math.imul(Ag,gI)|0;var xg=(Q+(W=W+Math.imul(tg,bI)|0)|0)+((8191&(y=(y=y+Math.imul(tg,yI)|0)+Math.imul(Cg,bI)|0))<<13)|0;Q=((f=f+Math.imul(Cg,yI)|0)+(y>>>13)|0)+(xg>>>26)|0,xg&=67108863,W=Math.imul(Vg,fI),y=(y=Math.imul(Vg,tI))+Math.imul(pg,fI)|0,f=Math.imul(pg,tI),W=W+Math.imul(Kg,QI)|0,y=(y=y+Math.imul(Kg,nI)|0)+Math.imul(kg,QI)|0,f=f+Math.imul(kg,nI)|0,W=W+Math.imul(Wg,Bg)|0,y=(y=y+Math.imul(Wg,hI)|0)+Math.imul(Gg,Bg)|0,f=f+Math.imul(Gg,hI)|0,W=W+Math.imul(dg,ug)|0,y=(y=y+Math.imul(dg,fg)|0)+Math.imul(hg,ug)|0,f=f+Math.imul(hg,fg)|0,W=W+Math.imul(ag,cI)|0,y=(y=y+Math.imul(ag,jg)|0)+Math.imul(lg,cI)|0,f=f+Math.imul(lg,jg)|0,W=W+Math.imul(_,sI)|0,y=(y=y+Math.imul(_,gI)|0)+Math.imul(Ig,sI)|0,f=f+Math.imul(Ig,gI)|0;var zI=(Q+(W=W+Math.imul(sg,bI)|0)|0)+((8191&(y=(y=y+Math.imul(sg,yI)|0)+Math.imul(Ag,bI)|0))<<13)|0;Q=((f=f+Math.imul(Ag,yI)|0)+(y>>>13)|0)+(zI>>>26)|0,zI&=67108863,W=Math.imul(Vg,QI),y=(y=Math.imul(Vg,nI))+Math.imul(pg,QI)|0,f=Math.imul(pg,nI),W=W+Math.imul(Kg,Bg)|0,y=(y=y+Math.imul(Kg,hI)|0)+Math.imul(kg,Bg)|0,f=f+Math.imul(kg,hI)|0,W=W+Math.imul(Wg,ug)|0,y=(y=y+Math.imul(Wg,fg)|0)+Math.imul(Gg,ug)|0,f=f+Math.imul(Gg,fg)|0,W=W+Math.imul(dg,cI)|0,y=(y=y+Math.imul(dg,jg)|0)+Math.imul(hg,cI)|0,f=f+Math.imul(hg,jg)|0,W=W+Math.imul(ag,sI)|0,y=(y=y+Math.imul(ag,gI)|0)+Math.imul(lg,sI)|0,f=f+Math.imul(lg,gI)|0;var VI=(Q+(W=W+Math.imul(_,bI)|0)|0)+((8191&(y=(y=y+Math.imul(_,yI)|0)+Math.imul(Ig,bI)|0))<<13)|0;Q=((f=f+Math.imul(Ig,yI)|0)+(y>>>13)|0)+(VI>>>26)|0,VI&=67108863,W=Math.imul(Vg,Bg),y=(y=Math.imul(Vg,hI))+Math.imul(pg,Bg)|0,f=Math.imul(pg,hI),W=W+Math.imul(Kg,ug)|0,y=(y=y+Math.imul(Kg,fg)|0)+Math.imul(kg,ug)|0,f=f+Math.imul(kg,fg)|0,W=W+Math.imul(Wg,cI)|0,y=(y=y+Math.imul(Wg,jg)|0)+Math.imul(Gg,cI)|0,f=f+Math.imul(Gg,jg)|0,W=W+Math.imul(dg,sI)|0,y=(y=y+Math.imul(dg,gI)|0)+Math.imul(hg,sI)|0,f=f+Math.imul(hg,gI)|0;var YI=(Q+(W=W+Math.imul(ag,bI)|0)|0)+((8191&(y=(y=y+Math.imul(ag,yI)|0)+Math.imul(lg,bI)|0))<<13)|0;Q=((f=f+Math.imul(lg,yI)|0)+(y>>>13)|0)+(YI>>>26)|0,YI&=67108863,W=Math.imul(Vg,ug),y=(y=Math.imul(Vg,fg))+Math.imul(pg,ug)|0,f=Math.imul(pg,fg),W=W+Math.imul(Kg,cI)|0,y=(y=y+Math.imul(Kg,jg)|0)+Math.imul(kg,cI)|0,f=f+Math.imul(kg,jg)|0,W=W+Math.imul(Wg,sI)|0,y=(y=y+Math.imul(Wg,gI)|0)+Math.imul(Gg,sI)|0,f=f+Math.imul(Gg,gI)|0;var dI=(Q+(W=W+Math.imul(dg,bI)|0)|0)+((8191&(y=(y=y+Math.imul(dg,yI)|0)+Math.imul(hg,bI)|0))<<13)|0;Q=((f=f+Math.imul(hg,yI)|0)+(y>>>13)|0)+(dI>>>26)|0,dI&=67108863,W=Math.imul(Vg,cI),y=(y=Math.imul(Vg,jg))+Math.imul(pg,cI)|0,f=Math.imul(pg,jg),W=W+Math.imul(Kg,sI)|0,y=(y=y+Math.imul(Kg,gI)|0)+Math.imul(kg,sI)|0,f=f+Math.imul(kg,gI)|0;var CC=(Q+(W=W+Math.imul(Wg,bI)|0)|0)+((8191&(y=(y=y+Math.imul(Wg,yI)|0)+Math.imul(Gg,bI)|0))<<13)|0;Q=((f=f+Math.imul(Gg,yI)|0)+(y>>>13)|0)+(CC>>>26)|0,CC&=67108863,W=Math.imul(Vg,sI),y=(y=Math.imul(Vg,gI))+Math.imul(pg,sI)|0,f=Math.imul(pg,gI);var OI=(Q+(W=W+Math.imul(Kg,bI)|0)|0)+((8191&(y=(y=y+Math.imul(Kg,yI)|0)+Math.imul(kg,bI)|0))<<13)|0;Q=((f=f+Math.imul(kg,yI)|0)+(y>>>13)|0)+(OI>>>26)|0,OI&=67108863;var vI=(Q+(W=Math.imul(Vg,bI))|0)+((8191&(y=(y=Math.imul(Vg,yI))+Math.imul(pg,bI)|0))<<13)|0;return Q=((f=Math.imul(pg,yI))+(y>>>13)|0)+(vI>>>26)|0,vI&=67108863,T[0]=wC,T[1]=_I,T[2]=_C,T[3]=nC,T[4]=Ft,T[5]=og,T[6]=Zg,T[7]=Dg,T[8]=Fg,T[9]=II,T[10]=vg,T[11]=xg,T[12]=zI,T[13]=VI,T[14]=YI,T[15]=dI,T[16]=CC,T[17]=OI,T[18]=vI,Q!==0&&(T[19]=Q,w.length++),w};function Y(B,G,w){w.negative=G.negative^B.negative,w.length=B.length+G.length;for(var W=0,y=0,f=0;f<w.length-1;f++){var D=y;y=0;for(var F=67108863&W,T=Math.min(f,G.length-1),Q=Math.max(0,f-B.length+1);Q<=T;Q++){var P=f-Q,L=(0|B.words[P])*(0|G.words[Q]),E=67108863&L;F=67108863&(E=E+F|0),y+=(D=(D=D+(L/67108864|0)|0)+(E>>>26)|0)>>>26,D&=67108863}w.words[f]=F,W=D,D=y}return W!==0?w.words[f]=W:w.length--,w._strip()}function R(B,G,w){return Y(B,G,w)}Math.imul||(p=Z),n.prototype.mulTo=function(B,G){var w=this.length+B.length;return this.length===10&&B.length===10?p(this,B,G):w<63?Z(this,B,G):w<1024?Y(this,B,G):R(this,B,G)},n.prototype.mul=function(B){var G=new n(null);return G.words=new Array(this.length+B.length),this.mulTo(B,G)},n.prototype.mulf=function(B){var G=new n(null);return G.words=new Array(this.length+B.length),R(this,B,G)},n.prototype.imul=function(B){return this.clone().mulTo(B,this)},n.prototype.imuln=function(B){var G=B<0;G&&(B=-B),s(typeof B=="number"),s(B<67108864);for(var w=0,W=0;W<this.length;W++){var y=(0|this.words[W])*B,f=(67108863&y)+(67108863&w);w>>=26,w+=y/67108864|0,w+=f>>>26,this.words[W]=67108863&f}return w!==0&&(this.words[W]=w,this.length++),G?this.ineg():this},n.prototype.muln=function(B){return this.clone().imuln(B)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(B){var G=function(f){for(var D=new Array(f.bitLength()),F=0;F<D.length;F++){var T=F/26|0,Q=F%26;D[F]=f.words[T]>>>Q&1}return D}(B);if(G.length===0)return new n(1);for(var w=this,W=0;W<G.length&&G[W]===0;W++,w=w.sqr());if(++W<G.length)for(var y=w.sqr();W<G.length;W++,y=y.sqr())G[W]!==0&&(w=w.mul(y));return w},n.prototype.iushln=function(B){s(typeof B=="number"&&B>=0);var G,w=B%26,W=(B-w)/26,y=67108863>>>26-w<<26-w;if(w!==0){var f=0;for(G=0;G<this.length;G++){var D=this.words[G]&y,F=(0|this.words[G])-D<<w;this.words[G]=F|f,f=D>>>26-w}f&&(this.words[G]=f,this.length++)}if(W!==0){for(G=this.length-1;G>=0;G--)this.words[G+W]=this.words[G];for(G=0;G<W;G++)this.words[G]=0;this.length+=W}return this._strip()},n.prototype.ishln=function(B){return s(this.negative===0),this.iushln(B)},n.prototype.iushrn=function(B,G,w){var W;s(typeof B=="number"&&B>=0),W=G?(G-G%26)/26:0;var y=B%26,f=Math.min((B-y)/26,this.length),D=67108863^67108863>>>y<<y,F=w;if(W-=f,W=Math.max(0,W),F){for(var T=0;T<f;T++)F.words[T]=this.words[T];F.length=f}if(f!==0)if(this.length>f)for(this.length-=f,T=0;T<this.length;T++)this.words[T]=this.words[T+f];else this.words[0]=0,this.length=1;var Q=0;for(T=this.length-1;T>=0&&(Q!==0||T>=W);T--){var P=0|this.words[T];this.words[T]=Q<<26-y|P>>>y,Q=P&D}return F&&Q!==0&&(F.words[F.length++]=Q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(B,G,w){return s(this.negative===0),this.iushrn(B,G,w)},n.prototype.shln=function(B){return this.clone().ishln(B)},n.prototype.ushln=function(B){return this.clone().iushln(B)},n.prototype.shrn=function(B){return this.clone().ishrn(B)},n.prototype.ushrn=function(B){return this.clone().iushrn(B)},n.prototype.testn=function(B){s(typeof B=="number"&&B>=0);var G=B%26,w=(B-G)/26,W=1<<G;return!(this.length<=w)&&!!(this.words[w]&W)},n.prototype.imaskn=function(B){s(typeof B=="number"&&B>=0);var G=B%26,w=(B-G)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(G!==0&&w++,this.length=Math.min(w,this.length),G!==0){var W=67108863^67108863>>>G<<G;this.words[this.length-1]&=W}return this._strip()},n.prototype.maskn=function(B){return this.clone().imaskn(B)},n.prototype.iaddn=function(B){return s(typeof B=="number"),s(B<67108864),B<0?this.isubn(-B):this.negative!==0?this.length===1&&(0|this.words[0])<=B?(this.words[0]=B-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(B),this.negative=1,this):this._iaddn(B)},n.prototype._iaddn=function(B){this.words[0]+=B;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},n.prototype.isubn=function(B){if(s(typeof B=="number"),s(B<67108864),B<0)return this.iaddn(-B);if(this.negative!==0)return this.negative=0,this.iaddn(B),this.negative=1,this;if(this.words[0]-=B,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this._strip()},n.prototype.addn=function(B){return this.clone().iaddn(B)},n.prototype.subn=function(B){return this.clone().isubn(B)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(B,G,w){var W,y,f=B.length+w;this._expand(f);var D=0;for(W=0;W<B.length;W++){y=(0|this.words[W+w])+D;var F=(0|B.words[W])*G;D=((y-=67108863&F)>>26)-(F/67108864|0),this.words[W+w]=67108863&y}for(;W<this.length-w;W++)D=(y=(0|this.words[W+w])+D)>>26,this.words[W+w]=67108863&y;if(D===0)return this._strip();for(s(D===-1),D=0,W=0;W<this.length;W++)D=(y=-(0|this.words[W])+D)>>26,this.words[W]=67108863&y;return this.negative=1,this._strip()},n.prototype._wordDiv=function(B,G){var w=(this.length,B.length),W=this.clone(),y=B,f=0|y.words[y.length-1];(w=26-this._countBits(f))!==0&&(y=y.ushln(w),W.iushln(w),f=0|y.words[y.length-1]);var D,F=W.length-y.length;if(G!=="mod"){(D=new n(null)).length=F+1,D.words=new Array(D.length);for(var T=0;T<D.length;T++)D.words[T]=0}var Q=W.clone()._ishlnsubmul(y,1,F);Q.negative===0&&(W=Q,D&&(D.words[F]=1));for(var P=F-1;P>=0;P--){var L=67108864*(0|W.words[y.length+P])+(0|W.words[y.length+P-1]);for(L=Math.min(L/f|0,67108863),W._ishlnsubmul(y,L,P);W.negative!==0;)L--,W.negative=0,W._ishlnsubmul(y,1,P),W.isZero()||(W.negative^=1);D&&(D.words[P]=L)}return D&&D._strip(),W._strip(),G!=="div"&&w!==0&&W.iushrn(w),{div:D||null,mod:W}},n.prototype.divmod=function(B,G,w){return s(!B.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:this.negative!==0&&B.negative===0?(f=this.neg().divmod(B,G),G!=="mod"&&(W=f.div.neg()),G!=="div"&&(y=f.mod.neg(),w&&y.negative!==0&&y.iadd(B)),{div:W,mod:y}):this.negative===0&&B.negative!==0?(f=this.divmod(B.neg(),G),G!=="mod"&&(W=f.div.neg()),{div:W,mod:f.mod}):(this.negative&B.negative)!=0?(f=this.neg().divmod(B.neg(),G),G!=="div"&&(y=f.mod.neg(),w&&y.negative!==0&&y.isub(B)),{div:f.div,mod:y}):B.length>this.length||this.cmp(B)<0?{div:new n(0),mod:this}:B.length===1?G==="div"?{div:this.divn(B.words[0]),mod:null}:G==="mod"?{div:null,mod:new n(this.modrn(B.words[0]))}:{div:this.divn(B.words[0]),mod:new n(this.modrn(B.words[0]))}:this._wordDiv(B,G);var W,y,f},n.prototype.div=function(B){return this.divmod(B,"div",!1).div},n.prototype.mod=function(B){return this.divmod(B,"mod",!1).mod},n.prototype.umod=function(B){return this.divmod(B,"mod",!0).mod},n.prototype.divRound=function(B){var G=this.divmod(B);if(G.mod.isZero())return G.div;var w=G.div.negative!==0?G.mod.isub(B):G.mod,W=B.ushrn(1),y=B.andln(1),f=w.cmp(W);return f<0||y===1&&f===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},n.prototype.modrn=function(B){var G=B<0;G&&(B=-B),s(B<=67108863);for(var w=(1<<26)%B,W=0,y=this.length-1;y>=0;y--)W=(w*W+(0|this.words[y]))%B;return G?-W:W},n.prototype.modn=function(B){return this.modrn(B)},n.prototype.idivn=function(B){var G=B<0;G&&(B=-B),s(B<=67108863);for(var w=0,W=this.length-1;W>=0;W--){var y=(0|this.words[W])+67108864*w;this.words[W]=y/B|0,w=y%B}return this._strip(),G?this.ineg():this},n.prototype.divn=function(B){return this.clone().idivn(B)},n.prototype.egcd=function(B){s(B.negative===0),s(!B.isZero());var G=this,w=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var W=new n(1),y=new n(0),f=new n(0),D=new n(1),F=0;G.isEven()&&w.isEven();)G.iushrn(1),w.iushrn(1),++F;for(var T=w.clone(),Q=G.clone();!G.isZero();){for(var P=0,L=1;(G.words[0]&L)==0&&P<26;++P,L<<=1);if(P>0)for(G.iushrn(P);P-- >0;)(W.isOdd()||y.isOdd())&&(W.iadd(T),y.isub(Q)),W.iushrn(1),y.iushrn(1);for(var E=0,J=1;(w.words[0]&J)==0&&E<26;++E,J<<=1);if(E>0)for(w.iushrn(E);E-- >0;)(f.isOdd()||D.isOdd())&&(f.iadd(T),D.isub(Q)),f.iushrn(1),D.iushrn(1);G.cmp(w)>=0?(G.isub(w),W.isub(f),y.isub(D)):(w.isub(G),f.isub(W),D.isub(y))}return{a:f,b:D,gcd:w.iushln(F)}},n.prototype._invmp=function(B){s(B.negative===0),s(!B.isZero());var G=this,w=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var W,y=new n(1),f=new n(0),D=w.clone();G.cmpn(1)>0&&w.cmpn(1)>0;){for(var F=0,T=1;(G.words[0]&T)==0&&F<26;++F,T<<=1);if(F>0)for(G.iushrn(F);F-- >0;)y.isOdd()&&y.iadd(D),y.iushrn(1);for(var Q=0,P=1;(w.words[0]&P)==0&&Q<26;++Q,P<<=1);if(Q>0)for(w.iushrn(Q);Q-- >0;)f.isOdd()&&f.iadd(D),f.iushrn(1);G.cmp(w)>=0?(G.isub(w),y.isub(f)):(w.isub(G),f.isub(y))}return(W=G.cmpn(1)===0?y:f).cmpn(0)<0&&W.iadd(B),W},n.prototype.gcd=function(B){if(this.isZero())return B.abs();if(B.isZero())return this.abs();var G=this.clone(),w=B.clone();G.negative=0,w.negative=0;for(var W=0;G.isEven()&&w.isEven();W++)G.iushrn(1),w.iushrn(1);for(;;){for(;G.isEven();)G.iushrn(1);for(;w.isEven();)w.iushrn(1);var y=G.cmp(w);if(y<0){var f=G;G=w,w=f}else if(y===0||w.cmpn(1)===0)break;G.isub(w)}return w.iushln(W)},n.prototype.invm=function(B){return this.egcd(B).a.umod(B)},n.prototype.isEven=function(){return(1&this.words[0])==0},n.prototype.isOdd=function(){return(1&this.words[0])==1},n.prototype.andln=function(B){return this.words[0]&B},n.prototype.bincn=function(B){s(typeof B=="number");var G=B%26,w=(B-G)/26,W=1<<G;if(this.length<=w)return this._expand(w+1),this.words[w]|=W,this;for(var y=W,f=w;y!==0&&f<this.length;f++){var D=0|this.words[f];y=(D+=y)>>>26,D&=67108863,this.words[f]=D}return y!==0&&(this.words[f]=y,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(B){var G,w=B<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;if(this._strip(),this.length>1)G=1;else{w&&(B=-B),s(B<=67108863,"Number is too big");var W=0|this.words[0];G=W===B?0:W<B?-1:1}return this.negative!==0?0|-G:G},n.prototype.cmp=function(B){if(this.negative!==0&&B.negative===0)return-1;if(this.negative===0&&B.negative!==0)return 1;var G=this.ucmp(B);return this.negative!==0?0|-G:G},n.prototype.ucmp=function(B){if(this.length>B.length)return 1;if(this.length<B.length)return-1;for(var G=0,w=this.length-1;w>=0;w--){var W=0|this.words[w],y=0|B.words[w];if(W!==y){W<y?G=-1:W>y&&(G=1);break}}return G},n.prototype.gtn=function(B){return this.cmpn(B)===1},n.prototype.gt=function(B){return this.cmp(B)===1},n.prototype.gten=function(B){return this.cmpn(B)>=0},n.prototype.gte=function(B){return this.cmp(B)>=0},n.prototype.ltn=function(B){return this.cmpn(B)===-1},n.prototype.lt=function(B){return this.cmp(B)===-1},n.prototype.lten=function(B){return this.cmpn(B)<=0},n.prototype.lte=function(B){return this.cmp(B)<=0},n.prototype.eqn=function(B){return this.cmpn(B)===0},n.prototype.eq=function(B){return this.cmp(B)===0},n.red=function(B){return new V(B)},n.prototype.toRed=function(B){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),B.convertTo(this)._forceRed(B)},n.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(B){return this.red=B,this},n.prototype.forceRed=function(B){return s(!this.red,"Already a number in reduction context"),this._forceRed(B)},n.prototype.redAdd=function(B){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,B)},n.prototype.redIAdd=function(B){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,B)},n.prototype.redSub=function(B){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,B)},n.prototype.redISub=function(B){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,B)},n.prototype.redShl=function(B){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,B)},n.prototype.redMul=function(B){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.mul(this,B)},n.prototype.redIMul=function(B){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.imul(this,B)},n.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(B){return s(this.red&&!B.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,B)};var X={k256:null,p224:null,p192:null,p25519:null};function H(B,G){this.name=B,this.p=new n(G,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function z(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function K(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function V(B){if(typeof B=="string"){var G=n._prime(B);this.m=G.p,this.prime=G}else s(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}function N(B){V.call(this,B),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}H.prototype._tmp=function(){var B=new n(null);return B.words=new Array(Math.ceil(this.n/13)),B},H.prototype.ireduce=function(B){var G,w=B;do this.split(w,this.tmp),G=(w=(w=this.imulK(w)).iadd(this.tmp)).bitLength();while(G>this.n);var W=G<this.n?-1:w.ucmp(this.p);return W===0?(w.words[0]=0,w.length=1):W>0?w.isub(this.p):w.strip!==void 0?w.strip():w._strip(),w},H.prototype.split=function(B,G){B.iushrn(this.n,0,G)},H.prototype.imulK=function(B){return B.imul(this.k)},l(S,H),S.prototype.split=function(B,G){for(var w=Math.min(B.length,9),W=0;W<w;W++)G.words[W]=B.words[W];if(G.length=w,B.length<=9)return B.words[0]=0,void(B.length=1);var y=B.words[9];for(G.words[G.length++]=4194303&y,W=10;W<B.length;W++){var f=0|B.words[W];B.words[W-10]=(4194303&f)<<4|y>>>22,y=f}y>>>=22,B.words[W-10]=y,y===0&&B.length>10?B.length-=10:B.length-=9},S.prototype.imulK=function(B){B.words[B.length]=0,B.words[B.length+1]=0,B.length+=2;for(var G=0,w=0;w<B.length;w++){var W=0|B.words[w];G+=977*W,B.words[w]=67108863&G,G=64*W+(G/67108864|0)}return B.words[B.length-1]===0&&(B.length--,B.words[B.length-1]===0&&B.length--),B},l(z,H),l(v,H),l(K,H),K.prototype.imulK=function(B){for(var G=0,w=0;w<B.length;w++){var W=19*(0|B.words[w])+G,y=67108863&W;W>>>=26,B.words[w]=y,G=W}return G!==0&&(B.words[B.length++]=G),B},n._prime=function(B){if(X[B])return X[B];var G;if(B==="k256")G=new S;else if(B==="p224")G=new z;else if(B==="p192")G=new v;else{if(B!=="p25519")throw new Error("Unknown prime "+B);G=new K}return X[B]=G,G},V.prototype._verify1=function(B){s(B.negative===0,"red works only with positives"),s(B.red,"red works only with red numbers")},V.prototype._verify2=function(B,G){s((B.negative|G.negative)==0,"red works only with positives"),s(B.red&&B.red===G.red,"red works only with red numbers")},V.prototype.imod=function(B){return this.prime?this.prime.ireduce(B)._forceRed(this):(r(B,B.umod(this.m)._forceRed(this)),B)},V.prototype.neg=function(B){return B.isZero()?B.clone():this.m.sub(B)._forceRed(this)},V.prototype.add=function(B,G){this._verify2(B,G);var w=B.add(G);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},V.prototype.iadd=function(B,G){this._verify2(B,G);var w=B.iadd(G);return w.cmp(this.m)>=0&&w.isub(this.m),w},V.prototype.sub=function(B,G){this._verify2(B,G);var w=B.sub(G);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},V.prototype.isub=function(B,G){this._verify2(B,G);var w=B.isub(G);return w.cmpn(0)<0&&w.iadd(this.m),w},V.prototype.shl=function(B,G){return this._verify1(B),this.imod(B.ushln(G))},V.prototype.imul=function(B,G){return this._verify2(B,G),this.imod(B.imul(G))},V.prototype.mul=function(B,G){return this._verify2(B,G),this.imod(B.mul(G))},V.prototype.isqr=function(B){return this.imul(B,B.clone())},V.prototype.sqr=function(B){return this.mul(B,B)},V.prototype.sqrt=function(B){if(B.isZero())return B.clone();var G=this.m.andln(3);if(s(G%2==1),G===3){var w=this.m.add(new n(1)).iushrn(2);return this.pow(B,w)}for(var W=this.m.subn(1),y=0;!W.isZero()&&W.andln(1)===0;)y++,W.iushrn(1);s(!W.isZero());var f=new n(1).toRed(this),D=f.redNeg(),F=this.m.subn(1).iushrn(1),T=this.m.bitLength();for(T=new n(2*T*T).toRed(this);this.pow(T,F).cmp(D)!==0;)T.redIAdd(D);for(var Q=this.pow(T,W),P=this.pow(B,W.addn(1).iushrn(1)),L=this.pow(B,W),E=y;L.cmp(f)!==0;){for(var J=L,k=0;J.cmp(f)!==0;k++)J=J.redSqr();s(k<E);var j=this.pow(Q,new n(1).iushln(E-k-1));P=P.redMul(j),Q=j.redSqr(),L=L.redMul(Q),E=k}return P},V.prototype.invm=function(B){var G=B._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},V.prototype.pow=function(B,G){if(G.isZero())return new n(1).toRed(this);if(G.cmpn(1)===0)return B.clone();var w=new Array(16);w[0]=new n(1).toRed(this),w[1]=B;for(var W=2;W<w.length;W++)w[W]=this.mul(w[W-1],B);var y=w[0],f=0,D=0,F=G.bitLength()%26;for(F===0&&(F=26),W=G.length-1;W>=0;W--){for(var T=G.words[W],Q=F-1;Q>=0;Q--){var P=T>>Q&1;y!==w[0]&&(y=this.sqr(y)),P!==0||f!==0?(f<<=1,f|=P,(++D===4||W===0&&Q===0)&&(y=this.mul(y,w[f]),D=0,f=0)):D=0}F=26}return y},V.prototype.convertTo=function(B){var G=B.umod(this.m);return G===B?G.clone():G},V.prototype.convertFrom=function(B){var G=B.clone();return G.red=null,G},n.mont=function(B){return new N(B)},l(N,V),N.prototype.convertTo=function(B){return this.imod(B.ushln(this.shift))},N.prototype.convertFrom=function(B){var G=this.imod(B.mul(this.rinv));return G.red=null,G},N.prototype.imul=function(B,G){if(B.isZero()||G.isZero())return B.words[0]=0,B.length=1,B;var w=B.imul(G),W=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=w.isub(W).iushrn(this.shift),f=y;return y.cmp(this.m)>=0?f=y.isub(this.m):y.cmpn(0)<0&&(f=y.iadd(this.m)),f._forceRed(this)},N.prototype.mul=function(B,G){if(B.isZero()||G.isZero())return new n(0)._forceRed(this);var w=B.mul(G),W=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=w.isub(W).iushrn(this.shift),f=y;return y.cmp(this.m)>=0?f=y.isub(this.m):y.cmpn(0)<0&&(f=y.iadd(this.m)),f._forceRed(this)},N.prototype.invm=function(B){return this.imod(B._invmp(this.m).mul(this.r2))._forceRed(this)}})(C===void 0||C)},{buffer:188}],187:[function(g,C,i){var e;function A(l){this.rand=l}if(C.exports=function(l){return e||(e=new A(null)),e.generate(l)},C.exports.Rand=A,A.prototype.generate=function(l){return this._rand(l)},A.prototype._rand=function(l){if(this.rand.getBytes)return this.rand.getBytes(l);for(var n=new Uint8Array(l),a=0;a<n.length;a++)n[a]=this.rand.getByte();return n},typeof self=="object")self.crypto&&self.crypto.getRandomValues?A.prototype._rand=function(l){var n=new Uint8Array(l);return self.crypto.getRandomValues(n),n}:self.msCrypto&&self.msCrypto.getRandomValues?A.prototype._rand=function(l){var n=new Uint8Array(l);return self.msCrypto.getRandomValues(n),n}:typeof window=="object"&&(A.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=g("crypto");if(typeof s.randomBytes!="function")throw new Error("Not supported");A.prototype._rand=function(l){return s.randomBytes(l)}}catch{}},{crypto:188}],188:[function(g,C,i){},{}],189:[function(g,C,i){var e=g("safe-buffer").Buffer;function A(o){e.isBuffer(o)||(o=e.from(o));for(var c=o.length/4|0,r=new Array(c),h=0;h<c;h++)r[h]=o.readUInt32BE(4*h);return r}function s(o){for(;0<o.length;o++)o[0]=0}function l(o,c,r,h,b){for(var u,m,Z,p,Y=r[0],R=r[1],X=r[2],H=r[3],S=o[0]^c[0],z=o[1]^c[1],v=o[2]^c[2],K=o[3]^c[3],V=4,N=1;N<b;N++)u=Y[S>>>24]^R[z>>>16&255]^X[v>>>8&255]^H[255&K]^c[V++],m=Y[z>>>24]^R[v>>>16&255]^X[K>>>8&255]^H[255&S]^c[V++],Z=Y[v>>>24]^R[K>>>16&255]^X[S>>>8&255]^H[255&z]^c[V++],p=Y[K>>>24]^R[S>>>16&255]^X[z>>>8&255]^H[255&v]^c[V++],S=u,z=m,v=Z,K=p;return u=(h[S>>>24]<<24|h[z>>>16&255]<<16|h[v>>>8&255]<<8|h[255&K])^c[V++],m=(h[z>>>24]<<24|h[v>>>16&255]<<16|h[K>>>8&255]<<8|h[255&S])^c[V++],Z=(h[v>>>24]<<24|h[K>>>16&255]<<16|h[S>>>8&255]<<8|h[255&z])^c[V++],p=(h[K>>>24]<<24|h[S>>>16&255]<<16|h[z>>>8&255]<<8|h[255&v])^c[V++],[u>>>=0,m>>>=0,Z>>>=0,p>>>=0]}var n=[0,1,2,4,8,16,32,64,128,27,54],a=function(){for(var o=new Array(256),c=0;c<256;c++)o[c]=c<128?c<<1:c<<1^283;for(var r=[],h=[],b=[[],[],[],[]],u=[[],[],[],[]],m=0,Z=0,p=0;p<256;++p){var Y=Z^Z<<1^Z<<2^Z<<3^Z<<4;Y=Y>>>8^255&Y^99,r[m]=Y,h[Y]=m;var R=o[m],X=o[R],H=o[X],S=257*o[Y]^16843008*Y;b[0][m]=S<<24|S>>>8,b[1][m]=S<<16|S>>>16,b[2][m]=S<<8|S>>>24,b[3][m]=S,S=16843009*H^65537*X^257*R^16843008*m,u[0][Y]=S<<24|S>>>8,u[1][Y]=S<<16|S>>>16,u[2][Y]=S<<8|S>>>24,u[3][Y]=S,m===0?m=Z=1:(m=R^o[o[o[H^R]]],Z^=o[o[Z]])}return{SBOX:r,INV_SBOX:h,SUB_MIX:b,INV_SUB_MIX:u}}();function d(o){this._key=A(o),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var o=this._key,c=o.length,r=c+6,h=4*(r+1),b=[],u=0;u<c;u++)b[u]=o[u];for(u=c;u<h;u++){var m=b[u-1];u%c==0?(m=m<<8|m>>>24,m=a.SBOX[m>>>24]<<24|a.SBOX[m>>>16&255]<<16|a.SBOX[m>>>8&255]<<8|a.SBOX[255&m],m^=n[u/c|0]<<24):c>6&&u%c==4&&(m=a.SBOX[m>>>24]<<24|a.SBOX[m>>>16&255]<<16|a.SBOX[m>>>8&255]<<8|a.SBOX[255&m]),b[u]=b[u-c]^m}for(var Z=[],p=0;p<h;p++){var Y=h-p,R=b[Y-(p%4?0:4)];Z[p]=p<4||Y<=4?R:a.INV_SUB_MIX[0][a.SBOX[R>>>24]]^a.INV_SUB_MIX[1][a.SBOX[R>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[R>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&R]]}this._nRounds=r,this._keySchedule=b,this._invKeySchedule=Z},d.prototype.encryptBlockRaw=function(o){return l(o=A(o),this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},d.prototype.encryptBlock=function(o){var c=this.encryptBlockRaw(o),r=e.allocUnsafe(16);return r.writeUInt32BE(c[0],0),r.writeUInt32BE(c[1],4),r.writeUInt32BE(c[2],8),r.writeUInt32BE(c[3],12),r},d.prototype.decryptBlock=function(o){var c=(o=A(o))[1];o[1]=o[3],o[3]=c;var r=l(o,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),h=e.allocUnsafe(16);return h.writeUInt32BE(r[0],0),h.writeUInt32BE(r[3],4),h.writeUInt32BE(r[2],8),h.writeUInt32BE(r[1],12),h},d.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},C.exports.AES=d},{"safe-buffer":494}],190:[function(g,C,i){var e=g("./aes"),A=g("safe-buffer").Buffer,s=g("cipher-base"),l=g("inherits"),n=g("./ghash"),a=g("buffer-xor"),d=g("./incr32");function o(c,r,h,b){s.call(this);var u=A.alloc(4,0);this._cipher=new e.AES(r);var m=this._cipher.encryptBlock(u);this._ghash=new n(m),h=function(Z,p,Y){if(p.length===12)return Z._finID=A.concat([p,A.from([0,0,0,1])]),A.concat([p,A.from([0,0,0,2])]);var R=new n(Y),X=p.length,H=X%16;R.update(p),H&&(H=16-H,R.update(A.alloc(H,0))),R.update(A.alloc(8,0));var S=8*X,z=A.alloc(8);z.writeUIntBE(S,0,8),R.update(z),Z._finID=R.state;var v=A.from(Z._finID);return d(v),v}(this,h,m),this._prev=A.from(h),this._cache=A.allocUnsafe(0),this._secCache=A.allocUnsafe(0),this._decrypt=b,this._alen=0,this._len=0,this._mode=c,this._authTag=null,this._called=!1}l(o,s),o.prototype._update=function(c){if(!this._called&&this._alen){var r=16-this._alen%16;r<16&&(r=A.alloc(r,0),this._ghash.update(r))}this._called=!0;var h=this._mode.encrypt(this,c);return this._decrypt?this._ghash.update(c):this._ghash.update(h),this._len+=c.length,h},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var c=a(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(r,h){var b=0;r.length!==h.length&&b++;for(var u=Math.min(r.length,h.length),m=0;m<u;++m)b+=r[m]^h[m];return b}(c,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=c,this._cipher.scrub()},o.prototype.getAuthTag=function(){if(this._decrypt||!A.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},o.prototype.setAuthTag=function(c){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=c},o.prototype.setAAD=function(c){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(c),this._alen+=c.length},C.exports=o},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(g,C,i){var e=g("./encrypter"),A=g("./decrypter"),s=g("./modes/list.json");i.createCipher=i.Cipher=e.createCipher,i.createCipheriv=i.Cipheriv=e.createCipheriv,i.createDecipher=i.Decipher=A.createDecipher,i.createDecipheriv=i.Decipheriv=A.createDecipheriv,i.listCiphers=i.getCiphers=function(){return Object.keys(s)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(g,C,i){var e=g("./authCipher"),A=g("safe-buffer").Buffer,s=g("./modes"),l=g("./streamCipher"),n=g("cipher-base"),a=g("./aes"),d=g("evp_bytestokey");function o(h,b,u){n.call(this),this._cache=new c,this._last=void 0,this._cipher=new a.AES(b),this._prev=A.from(u),this._mode=h,this._autopadding=!0}function c(){this.cache=A.allocUnsafe(0)}function r(h,b,u){var m=s[h.toLowerCase()];if(!m)throw new TypeError("invalid suite type");if(typeof u=="string"&&(u=A.from(u)),m.mode!=="GCM"&&u.length!==m.iv)throw new TypeError("invalid iv length "+u.length);if(typeof b=="string"&&(b=A.from(b)),b.length!==m.key/8)throw new TypeError("invalid key length "+b.length);return m.type==="stream"?new l(m.module,b,u,!0):m.type==="auth"?new e(m.module,b,u,!0):new o(m.module,b,u)}g("inherits")(o,n),o.prototype._update=function(h){var b,u;this._cache.add(h);for(var m=[];b=this._cache.get(this._autopadding);)u=this._mode.decrypt(this,b),m.push(u);return A.concat(m)},o.prototype._final=function(){var h=this._cache.flush();if(this._autopadding)return function(b){var u=b[15];if(u<1||u>16)throw new Error("unable to decrypt data");for(var m=-1;++m<u;)if(b[m+(16-u)]!==u)throw new Error("unable to decrypt data");if(u!==16)return b.slice(0,16-u)}(this._mode.decrypt(this,h));if(h)throw new Error("data not multiple of block length")},o.prototype.setAutoPadding=function(h){return this._autopadding=!!h,this},c.prototype.add=function(h){this.cache=A.concat([this.cache,h])},c.prototype.get=function(h){var b;if(h){if(this.cache.length>16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b}else if(this.cache.length>=16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function(h,b){var u=s[h.toLowerCase()];if(!u)throw new TypeError("invalid suite type");var m=d(b,!1,u.key,u.iv);return r(h,m.key,m.iv)},i.createDecipheriv=r},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(g,C,i){var e=g("./modes"),A=g("./authCipher"),s=g("safe-buffer").Buffer,l=g("./streamCipher"),n=g("cipher-base"),a=g("./aes"),d=g("evp_bytestokey");function o(b,u,m){n.call(this),this._cache=new r,this._cipher=new a.AES(u),this._prev=s.from(m),this._mode=b,this._autopadding=!0}g("inherits")(o,n),o.prototype._update=function(b){var u,m;this._cache.add(b);for(var Z=[];u=this._cache.get();)m=this._mode.encrypt(this,u),Z.push(m);return s.concat(Z)};var c=s.alloc(16,16);function r(){this.cache=s.allocUnsafe(0)}function h(b,u,m){var Z=e[b.toLowerCase()];if(!Z)throw new TypeError("invalid suite type");if(typeof u=="string"&&(u=s.from(u)),u.length!==Z.key/8)throw new TypeError("invalid key length "+u.length);if(typeof m=="string"&&(m=s.from(m)),Z.mode!=="GCM"&&m.length!==Z.iv)throw new TypeError("invalid iv length "+m.length);return Z.type==="stream"?new l(Z.module,u,m):Z.type==="auth"?new A(Z.module,u,m):new o(Z.module,u,m)}o.prototype._final=function(){var b=this._cache.flush();if(this._autopadding)return b=this._mode.encrypt(this,b),this._cipher.scrub(),b;if(!b.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},o.prototype.setAutoPadding=function(b){return this._autopadding=!!b,this},r.prototype.add=function(b){this.cache=s.concat([this.cache,b])},r.prototype.get=function(){if(this.cache.length>15){var b=this.cache.slice(0,16);return this.cache=this.cache.slice(16),b}return null},r.prototype.flush=function(){for(var b=16-this.cache.length,u=s.allocUnsafe(b),m=-1;++m<b;)u.writeUInt8(b,m);return s.concat([this.cache,u])},i.createCipheriv=h,i.createCipher=function(b,u){var m=e[b.toLowerCase()];if(!m)throw new TypeError("invalid suite type");var Z=d(u,!1,m.key,m.iv);return h(b,Z.key,Z.iv)}},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],194:[function(g,C,i){var e=g("safe-buffer").Buffer,A=e.alloc(16,0);function s(n){var a=e.allocUnsafe(16);return a.writeUInt32BE(n[0]>>>0,0),a.writeUInt32BE(n[1]>>>0,4),a.writeUInt32BE(n[2]>>>0,8),a.writeUInt32BE(n[3]>>>0,12),a}function l(n){this.h=n,this.state=e.alloc(16,0),this.cache=e.allocUnsafe(0)}l.prototype.ghash=function(n){for(var a=-1;++a<n.length;)this.state[a]^=n[a];this._multiply()},l.prototype._multiply=function(){for(var n,a,d,o=[(n=this.h).readUInt32BE(0),n.readUInt32BE(4),n.readUInt32BE(8),n.readUInt32BE(12)],c=[0,0,0,0],r=-1;++r<128;){for((this.state[~~(r/8)]&1<<7-r%8)!=0&&(c[0]^=o[0],c[1]^=o[1],c[2]^=o[2],c[3]^=o[3]),d=(1&o[3])!=0,a=3;a>0;a--)o[a]=o[a]>>>1|(1&o[a-1])<<31;o[0]=o[0]>>>1,d&&(o[0]=o[0]^225<<24)}this.state=s(c)},l.prototype.update=function(n){var a;for(this.cache=e.concat([this.cache,n]);this.cache.length>=16;)a=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(a)},l.prototype.final=function(n,a){return this.cache.length&&this.ghash(e.concat([this.cache,A],16)),this.ghash(s([0,n,0,a])),this.state},C.exports=l},{"safe-buffer":494}],195:[function(g,C,i){C.exports=function(e){for(var A,s=e.length;s--;){if((A=e.readUInt8(s))!==255){A++,e.writeUInt8(A,s);break}e.writeUInt8(0,s)}}},{}],196:[function(g,C,i){var e=g("buffer-xor");i.encrypt=function(A,s){var l=e(s,A._prev);return A._prev=A._cipher.encryptBlock(l),A._prev},i.decrypt=function(A,s){var l=A._prev;A._prev=s;var n=A._cipher.decryptBlock(s);return e(n,l)}},{"buffer-xor":219}],197:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("buffer-xor");function s(l,n,a){var d=n.length,o=A(n,l._cache);return l._cache=l._cache.slice(d),l._prev=e.concat([l._prev,a?n:o]),o}i.encrypt=function(l,n,a){for(var d,o=e.allocUnsafe(0);n.length;){if(l._cache.length===0&&(l._cache=l._cipher.encryptBlock(l._prev),l._prev=e.allocUnsafe(0)),!(l._cache.length<=n.length)){o=e.concat([o,s(l,n,a)]);break}d=l._cache.length,o=e.concat([o,s(l,n.slice(0,d),a)]),n=n.slice(d)}return o}},{"buffer-xor":219,"safe-buffer":494}],198:[function(g,C,i){var e=g("safe-buffer").Buffer;function A(l,n,a){for(var d,o,c=-1,r=0;++c<8;)d=n&1<<7-c?128:0,r+=(128&(o=l._cipher.encryptBlock(l._prev)[0]^d))>>c%8,l._prev=s(l._prev,a?d:o);return r}function s(l,n){var a=l.length,d=-1,o=e.allocUnsafe(l.length);for(l=e.concat([l,e.from([n])]);++d<a;)o[d]=l[d]<<1|l[d+1]>>7;return o}i.encrypt=function(l,n,a){for(var d=n.length,o=e.allocUnsafe(d),c=-1;++c<d;)o[c]=A(l,n[c],a);return o}},{"safe-buffer":494}],199:[function(g,C,i){var e=g("safe-buffer").Buffer;function A(s,l,n){var a=s._cipher.encryptBlock(s._prev)[0]^l;return s._prev=e.concat([s._prev.slice(1),e.from([n?l:a])]),a}i.encrypt=function(s,l,n){for(var a=l.length,d=e.allocUnsafe(a),o=-1;++o<a;)d[o]=A(s,l[o],n);return d}},{"safe-buffer":494}],200:[function(g,C,i){var e=g("buffer-xor"),A=g("safe-buffer").Buffer,s=g("../incr32");function l(n){var a=n._cipher.encryptBlockRaw(n._prev);return s(n._prev),a}i.encrypt=function(n,a){var d=Math.ceil(a.length/16),o=n._cache.length;n._cache=A.concat([n._cache,A.allocUnsafe(16*d)]);for(var c=0;c<d;c++){var r=l(n),h=o+16*c;n._cache.writeUInt32BE(r[0],h+0),n._cache.writeUInt32BE(r[1],h+4),n._cache.writeUInt32BE(r[2],h+8),n._cache.writeUInt32BE(r[3],h+12)}var b=n._cache.slice(0,a.length);return n._cache=n._cache.slice(a.length),e(a,b)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(g,C,i){i.encrypt=function(e,A){return e._cipher.encryptBlock(A)},i.decrypt=function(e,A){return e._cipher.decryptBlock(A)}},{}],202:[function(g,C,i){var e={ECB:g("./ecb"),CBC:g("./cbc"),CFB:g("./cfb"),CFB8:g("./cfb8"),CFB1:g("./cfb1"),OFB:g("./ofb"),CTR:g("./ctr"),GCM:g("./ctr")},A=g("./list.json");for(var s in A)A[s].module=e[A[s].mode];C.exports=A},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(g,C,i){C.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],204:[function(g,C,i){(function(e){(function(){var A=g("buffer-xor");function s(l){return l._prev=l._cipher.encryptBlock(l._prev),l._prev}i.encrypt=function(l,n){for(;l._cache.length<n.length;)l._cache=e.concat([l._cache,s(l)]);var a=l._cache.slice(0,n.length);return l._cache=l._cache.slice(n.length),A(n,a)}}).call(this)}).call(this,g("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(g,C,i){var e=g("./aes"),A=g("safe-buffer").Buffer,s=g("cipher-base");function l(n,a,d,o){s.call(this),this._cipher=new e.AES(a),this._prev=A.from(d),this._cache=A.allocUnsafe(0),this._secCache=A.allocUnsafe(0),this._decrypt=o,this._mode=n}g("inherits")(l,s),l.prototype._update=function(n){return this._mode.encrypt(this,n,this._decrypt)},l.prototype._final=function(){this._cipher.scrub()},C.exports=l},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(g,C,i){var e=g("browserify-des"),A=g("browserify-aes/browser"),s=g("browserify-aes/modes"),l=g("browserify-des/modes"),n=g("evp_bytestokey");function a(o,c,r){if(o=o.toLowerCase(),s[o])return A.createCipheriv(o,c,r);if(l[o])return new e({key:c,iv:r,mode:o});throw new TypeError("invalid suite type")}function d(o,c,r){if(o=o.toLowerCase(),s[o])return A.createDecipheriv(o,c,r);if(l[o])return new e({key:c,iv:r,mode:o,decrypt:!0});throw new TypeError("invalid suite type")}i.createCipher=i.Cipher=function(o,c){var r,h;if(o=o.toLowerCase(),s[o])r=s[o].key,h=s[o].iv;else{if(!l[o])throw new TypeError("invalid suite type");r=8*l[o].key,h=l[o].iv}var b=n(c,!1,r,h);return a(o,b.key,b.iv)},i.createCipheriv=i.Cipheriv=a,i.createDecipher=i.Decipher=function(o,c){var r,h;if(o=o.toLowerCase(),s[o])r=s[o].key,h=s[o].iv;else{if(!l[o])throw new TypeError("invalid suite type");r=8*l[o].key,h=l[o].iv}var b=n(c,!1,r,h);return d(o,b.key,b.iv)},i.createDecipheriv=i.Decipheriv=d,i.listCiphers=i.getCiphers=function(){return Object.keys(l).concat(A.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(g,C,i){var e=g("cipher-base"),A=g("des.js"),s=g("inherits"),l=g("safe-buffer").Buffer,n={"des-ede3-cbc":A.CBC.instantiate(A.EDE),"des-ede3":A.EDE,"des-ede-cbc":A.CBC.instantiate(A.EDE),"des-ede":A.EDE,"des-cbc":A.CBC.instantiate(A.DES),"des-ecb":A.DES};function a(d){e.call(this);var o,c=d.mode.toLowerCase(),r=n[c];o=d.decrypt?"decrypt":"encrypt";var h=d.key;l.isBuffer(h)||(h=l.from(h)),c!=="des-ede"&&c!=="des-ede-cbc"||(h=l.concat([h,h.slice(0,8)]));var b=d.iv;l.isBuffer(b)||(b=l.from(b)),this._des=r.create({key:h,iv:b,type:o})}n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],C.exports=a,s(a,e),a.prototype._update=function(d){return l.from(this._des.update(d))},a.prototype._final=function(){return l.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(g,C,i){i["des-ecb"]={key:8,iv:0},i["des-cbc"]=i.des={key:8,iv:8},i["des-ede3-cbc"]=i.des3={key:24,iv:8},i["des-ede3"]={key:24,iv:0},i["des-ede-cbc"]={key:16,iv:8},i["des-ede"]={key:16,iv:0}},{}],209:[function(g,C,i){(function(e){(function(){var A=g("bn.js"),s=g("randombytes");function l(a){var d,o=a.modulus.byteLength();do d=new A(s(o));while(d.cmp(a.modulus)>=0||!d.umod(a.prime1)||!d.umod(a.prime2));return d}function n(a,d){var o=function(X){var H=l(X);return{blinder:H.toRed(A.mont(X.modulus)).redPow(new A(X.publicExponent)).fromRed(),unblinder:H.invm(X.modulus)}}(d),c=d.modulus.byteLength(),r=new A(a).mul(o.blinder).umod(d.modulus),h=r.toRed(A.mont(d.prime1)),b=r.toRed(A.mont(d.prime2)),u=d.coefficient,m=d.prime1,Z=d.prime2,p=h.redPow(d.exponent1).fromRed(),Y=b.redPow(d.exponent2).fromRed(),R=p.isub(Y).imul(u).umod(m).imul(Z);return Y.iadd(R).imul(o.unblinder).umod(d.modulus).toArrayLike(e,"be",c)}n.getr=l,C.exports=n}).call(this)}).call(this,g("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(g,C,i){C.exports=g("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(g,C,i){C.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],212:[function(g,C,i){C.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],213:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("create-hash"),s=g("readable-stream"),l=g("inherits"),n=g("./sign"),a=g("./verify"),d=g("./algorithms.json");function o(b){s.Writable.call(this);var u=d[b];if(!u)throw new Error("Unknown message digest");this._hashType=u.hash,this._hash=A(u.hash),this._tag=u.id,this._signType=u.sign}function c(b){s.Writable.call(this);var u=d[b];if(!u)throw new Error("Unknown message digest");this._hash=A(u.hash),this._tag=u.id,this._signType=u.sign}function r(b){return new o(b)}function h(b){return new c(b)}Object.keys(d).forEach(function(b){d[b].id=e.from(d[b].id,"hex"),d[b.toLowerCase()]=d[b]}),l(o,s.Writable),o.prototype._write=function(b,u,m){this._hash.update(b),m()},o.prototype.update=function(b,u){return typeof b=="string"&&(b=e.from(b,u)),this._hash.update(b),this},o.prototype.sign=function(b,u){this.end();var m=this._hash.digest(),Z=n(m,b,this._hashType,this._signType,this._tag);return u?Z.toString(u):Z},l(c,s.Writable),c.prototype._write=function(b,u,m){this._hash.update(b),m()},c.prototype.update=function(b,u){return typeof b=="string"&&(b=e.from(b,u)),this._hash.update(b),this},c.prototype.verify=function(b,u,m){typeof u=="string"&&(u=e.from(u,m)),this.end();var Z=this._hash.digest();return a(u,Z,b,this._signType,this._tag)},C.exports={Sign:r,Verify:h,createSign:r,createVerify:h}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("create-hmac"),s=g("browserify-rsa"),l=g("elliptic").ec,n=g("bn.js"),a=g("parse-asn1"),d=g("./curves.json");function o(b,u,m,Z){if((b=e.from(b.toArray())).length<u.byteLength()){var p=e.alloc(u.byteLength()-b.length);b=e.concat([p,b])}var Y=m.length,R=function(S,z){S=(S=c(S,z)).mod(z);var v=e.from(S.toArray());if(v.length<z.byteLength()){var K=e.alloc(z.byteLength()-v.length);v=e.concat([K,v])}return v}(m,u),X=e.alloc(Y);X.fill(1);var H=e.alloc(Y);return H=A(Z,H).update(X).update(e.from([0])).update(b).update(R).digest(),X=A(Z,H).update(X).digest(),{k:H=A(Z,H).update(X).update(e.from([1])).update(b).update(R).digest(),v:X=A(Z,H).update(X).digest()}}function c(b,u){var m=new n(b),Z=(b.length<<3)-u.bitLength();return Z>0&&m.ishrn(Z),m}function r(b,u,m){var Z,p;do{for(Z=e.alloc(0);8*Z.length<b.bitLength();)u.v=A(m,u.k).update(u.v).digest(),Z=e.concat([Z,u.v]);p=c(Z,b),u.k=A(m,u.k).update(u.v).update(e.from([0])).digest(),u.v=A(m,u.k).update(u.v).digest()}while(p.cmp(b)!==-1);return p}function h(b,u,m,Z){return b.toRed(n.mont(m)).redPow(u).fromRed().mod(Z)}C.exports=function(b,u,m,Z,p){var Y=a(u);if(Y.curve){if(Z!=="ecdsa"&&Z!=="ecdsa/rsa")throw new Error("wrong private key type");return function(S,z){var v=d[z.curve.join(".")];if(!v)throw new Error("unknown curve "+z.curve.join("."));var K=new l(v).keyFromPrivate(z.privateKey).sign(S);return e.from(K.toDER())}(b,Y)}if(Y.type==="dsa"){if(Z!=="dsa")throw new Error("wrong private key type");return function(S,z,v){for(var K,V=z.params.priv_key,N=z.params.p,B=z.params.q,G=z.params.g,w=new n(0),W=c(S,B).mod(B),y=!1,f=o(V,B,S,v);y===!1;)K=r(B,f,v),w=h(G,K,N,B),(y=K.invm(B).imul(W.add(V.mul(w))).mod(B)).cmpn(0)===0&&(y=!1,w=new n(0));return function(D,F){D=D.toArray(),F=F.toArray(),128&D[0]&&(D=[0].concat(D)),128&F[0]&&(F=[0].concat(F));var T=[48,D.length+F.length+4,2,D.length];return T=T.concat(D,[2,F.length],F),e.from(T)}(w,y)}(b,Y,m)}if(Z!=="rsa"&&Z!=="ecdsa/rsa")throw new Error("wrong private key type");b=e.concat([p,b]);for(var R=Y.modulus.byteLength(),X=[0,1];b.length+X.length+1<R;)X.push(255);X.push(0);for(var H=-1;++H<b.length;)X.push(b[H]);return s(X,Y)},C.exports.getKey=o,C.exports.makeKey=r},{"./curves.json":212,"bn.js":186,"browserify-rsa":209,"create-hmac":388,elliptic:405,"parse-asn1":459,"safe-buffer":494}],215:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("bn.js"),s=g("elliptic").ec,l=g("parse-asn1"),n=g("./curves.json");function a(d,o){if(d.cmpn(0)<=0)throw new Error("invalid sig");if(d.cmp(o)>=o)throw new Error("invalid sig")}C.exports=function(d,o,c,r,h){var b=l(c);if(b.type==="ec"){if(r!=="ecdsa"&&r!=="ecdsa/rsa")throw new Error("wrong public key type");return function(X,H,S){var z=n[S.data.algorithm.curve.join(".")];if(!z)throw new Error("unknown curve "+S.data.algorithm.curve.join("."));var v=new s(z),K=S.data.subjectPrivateKey.data;return v.verify(H,X,K)}(d,o,b)}if(b.type==="dsa"){if(r!=="dsa")throw new Error("wrong public key type");return function(X,H,S){var z=S.data.p,v=S.data.q,K=S.data.g,V=S.data.pub_key,N=l.signature.decode(X,"der"),B=N.s,G=N.r;a(B,v),a(G,v);var w=A.mont(z),W=B.invm(v);return K.toRed(w).redPow(new A(H).mul(W).mod(v)).fromRed().mul(V.toRed(w).redPow(G.mul(W).mod(v)).fromRed()).mod(z).mod(v).cmp(G)===0}(d,o,b)}if(r!=="rsa"&&r!=="ecdsa/rsa")throw new Error("wrong public key type");o=e.concat([h,o]);for(var u=b.modulus.byteLength(),m=[1],Z=0;o.length+m.length+2<u;)m.push(255),Z++;m.push(0);for(var p=-1;++p<o.length;)m.push(o[p]);m=e.from(m);var Y=A.mont(b.modulus);d=(d=new A(d).toRed(Y)).redPow(new A(b.publicExponent)),d=e.from(d.fromRed().toArray());var R=Z<8?1:0;for(u=Math.min(d.length,m.length),d.length!==m.length&&(R=1),p=-1;++p<u;)R|=d[p]^m[p];return R===0}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(g,C,i){},{}],217:[function(g,C,i){var e=g("buffer"),A=e.Buffer;function s(n,a){for(var d in n)a[d]=n[d]}function l(n,a,d){return A(n,a,d)}A.from&&A.alloc&&A.allocUnsafe&&A.allocUnsafeSlow?C.exports=e:(s(e,i),i.Buffer=l),s(A,l),l.from=function(n,a,d){if(typeof n=="number")throw new TypeError("Argument must not be a number");return A(n,a,d)},l.alloc=function(n,a,d){if(typeof n!="number")throw new TypeError("Argument must be a number");var o=A(n);return a!==void 0?typeof d=="string"?o.fill(a,d):o.fill(a):o.fill(0),o},l.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return A(n)},l.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(n)}},{buffer:220}],218:[function(g,C,i){var e=g("safe-buffer").Buffer,A=e.isEncoding||function(b){switch((b=""+b)&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(b){var u;switch(this.encoding=function(m){var Z=function(p){if(!p)return"utf8";for(var Y;;)switch(p){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return p;default:if(Y)return;p=(""+p).toLowerCase(),Y=!0}}(m);if(typeof Z!="string"&&(e.isEncoding===A||!A(m)))throw new Error("Unknown encoding: "+m);return Z||m}(b),this.encoding){case"utf16le":this.text=a,this.end=d,u=4;break;case"utf8":this.fillLast=n,u=4;break;case"base64":this.text=o,this.end=c,u=3;break;default:return this.write=r,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(u)}function l(b){return b<=127?0:b>>5==6?2:b>>4==14?3:b>>3==30?4:b>>6==2?-1:-2}function n(b){var u=this.lastTotal-this.lastNeed,m=function(Z,p,Y){if((192&p[0])!=128)return Z.lastNeed=0,"�";if(Z.lastNeed>1&&p.length>1){if((192&p[1])!=128)return Z.lastNeed=1,"�";if(Z.lastNeed>2&&p.length>2&&(192&p[2])!=128)return Z.lastNeed=2,"�"}}(this,b);return m!==void 0?m:this.lastNeed<=b.length?(b.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(b.copy(this.lastChar,u,0,b.length),void(this.lastNeed-=b.length))}function a(b,u){if((b.length-u)%2==0){var m=b.toString("utf16le",u);if(m){var Z=m.charCodeAt(m.length-1);if(Z>=55296&&Z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",u,b.length-1)}function d(b){var u=b&&b.length?this.write(b):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,m)}return u}function o(b,u){var m=(b.length-u)%3;return m===0?b.toString("base64",u):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",u,b.length-m))}function c(b){var u=b&&b.length?this.write(b):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function r(b){return b.toString(this.encoding)}function h(b){return b&&b.length?this.write(b):""}i.StringDecoder=s,s.prototype.write=function(b){if(b.length===0)return"";var u,m;if(this.lastNeed){if((u=this.fillLast(b))===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<b.length?u?u+this.text(b,m):this.text(b,m):u||""},s.prototype.end=function(b){var u=b&&b.length?this.write(b):"";return this.lastNeed?u+"�":u},s.prototype.text=function(b,u){var m=function(p,Y,R){var X=Y.length-1;if(X<R)return 0;var H=l(Y[X]);return H>=0?(H>0&&(p.lastNeed=H-1),H):--X<R||H===-2?0:(H=l(Y[X]))>=0?(H>0&&(p.lastNeed=H-2),H):--X<R||H===-2?0:(H=l(Y[X]))>=0?(H>0&&(H===2?H=0:p.lastNeed=H-3),H):0}(this,b,u);if(!this.lastNeed)return b.toString("utf8",u);this.lastTotal=m;var Z=b.length-(m-this.lastNeed);return b.copy(this.lastChar,0,Z),b.toString("utf8",u,Z)},s.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length}},{"safe-buffer":217}],219:[function(g,C,i){(function(e){(function(){C.exports=function(A,s){for(var l=Math.min(A.length,s.length),n=new e(l),a=0;a<l;++a)n[a]=A[a]^s[a];return n}}).call(this)}).call(this,g("buffer").Buffer)},{buffer:220}],220:[function(g,C,i){(function(e){(function(){var A=g("base64-js"),s=g("ieee754");i.Buffer=n,i.SlowBuffer=function(J){return+J!=J&&(J=0),n.alloc(+J)},i.INSPECT_MAX_BYTES=50;function l(J){if(J>2147483647)throw new RangeError('The value "'+J+'" is invalid for option "size"');var k=new Uint8Array(J);return k.__proto__=n.prototype,k}function n(J,k,j){if(typeof J=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(J)}return a(J,k,j)}function a(J,k,j){if(typeof J=="string")return function(Cg,x){if(typeof x=="string"&&x!==""||(x="utf8"),!n.isEncoding(x))throw new TypeError("Unknown encoding: "+x);var sg=0|h(Cg,x),Ag=l(sg),O=Ag.write(Cg,x);return O!==sg&&(Ag=Ag.slice(0,O)),Ag}(J,k);if(ArrayBuffer.isView(J))return c(J);if(J==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof J);if(L(J,ArrayBuffer)||J&&L(J.buffer,ArrayBuffer))return function(Cg,x,sg){if(x<0||Cg.byteLength<x)throw new RangeError('"offset" is outside of buffer bounds');if(Cg.byteLength<x+(sg||0))throw new RangeError('"length" is outside of buffer bounds');var Ag;return Ag=x===void 0&&sg===void 0?new Uint8Array(Cg):sg===void 0?new Uint8Array(Cg,x):new Uint8Array(Cg,x,sg),Ag.__proto__=n.prototype,Ag}(J,k,j);if(typeof J=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var q=J.valueOf&&J.valueOf();if(q!=null&&q!==J)return n.from(q,k,j);var tg=function(Cg){if(n.isBuffer(Cg)){var x=0|r(Cg.length),sg=l(x);return sg.length===0||Cg.copy(sg,0,0,x),sg}if(Cg.length!==void 0)return typeof Cg.length!="number"||E(Cg.length)?l(0):c(Cg);if(Cg.type==="Buffer"&&Array.isArray(Cg.data))return c(Cg.data)}(J);if(tg)return tg;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof J[Symbol.toPrimitive]=="function")return n.from(J[Symbol.toPrimitive]("string"),k,j);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof J)}function d(J){if(typeof J!="number")throw new TypeError('"size" argument must be of type number');if(J<0)throw new RangeError('The value "'+J+'" is invalid for option "size"')}function o(J){return d(J),l(J<0?0:0|r(J))}function c(J){for(var k=J.length<0?0:0|r(J.length),j=l(k),q=0;q<k;q+=1)j[q]=255&J[q];return j}function r(J){if(J>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|J}function h(J,k){if(n.isBuffer(J))return J.length;if(ArrayBuffer.isView(J)||L(J,ArrayBuffer))return J.byteLength;if(typeof J!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof J);var j=J.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&j===0)return 0;for(var tg=!1;;)switch(k){case"ascii":case"latin1":case"binary":return j;case"utf8":case"utf-8":return T(J).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*j;case"hex":return j>>>1;case"base64":return Q(J).length;default:if(tg)return q?-1:T(J).length;k=(""+k).toLowerCase(),tg=!0}}function b(J,k,j){var q=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0)<=(k>>>=0))return"";for(J||(J="utf8");;)switch(J){case"hex":return N(this,k,j);case"utf8":case"utf-8":return v(this,k,j);case"ascii":return K(this,k,j);case"latin1":case"binary":return V(this,k,j);case"base64":return z(this,k,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,k,j);default:if(q)throw new TypeError("Unknown encoding: "+J);J=(J+"").toLowerCase(),q=!0}}function u(J,k,j){var q=J[k];J[k]=J[j],J[j]=q}function m(J,k,j,q,tg){if(J.length===0)return-1;if(typeof j=="string"?(q=j,j=0):j>2147483647?j=2147483647:j<-2147483648&&(j=-2147483648),E(j=+j)&&(j=tg?0:J.length-1),j<0&&(j=J.length+j),j>=J.length){if(tg)return-1;j=J.length-1}else if(j<0){if(!tg)return-1;j=0}if(typeof k=="string"&&(k=n.from(k,q)),n.isBuffer(k))return k.length===0?-1:Z(J,k,j,q,tg);if(typeof k=="number")return k&=255,typeof Uint8Array.prototype.indexOf=="function"?tg?Uint8Array.prototype.indexOf.call(J,k,j):Uint8Array.prototype.lastIndexOf.call(J,k,j):Z(J,[k],j,q,tg);throw new TypeError("val must be string, number or Buffer")}function Z(J,k,j,q,tg){var Cg,x=1,sg=J.length,Ag=k.length;if(q!==void 0&&((q=String(q).toLowerCase())==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(J.length<2||k.length<2)return-1;x=2,sg/=2,Ag/=2,j/=2}function O(ag,lg){return x===1?ag[lg]:ag.readUInt16BE(lg*x)}if(tg){var _=-1;for(Cg=j;Cg<sg;Cg++)if(O(J,Cg)===O(k,_===-1?0:Cg-_)){if(_===-1&&(_=Cg),Cg-_+1===Ag)return _*x}else _!==-1&&(Cg-=Cg-_),_=-1}else for(j+Ag>sg&&(j=sg-Ag),Cg=j;Cg>=0;Cg--){for(var Ig=!0,ng=0;ng<Ag;ng++)if(O(J,Cg+ng)!==O(k,ng)){Ig=!1;break}if(Ig)return Cg}return-1}function p(J,k,j,q){j=Number(j)||0;var tg=J.length-j;q?(q=Number(q))>tg&&(q=tg):q=tg;var Cg=k.length;q>Cg/2&&(q=Cg/2);for(var x=0;x<q;++x){var sg=parseInt(k.substr(2*x,2),16);if(E(sg))return x;J[j+x]=sg}return x}function Y(J,k,j,q){return P(T(k,J.length-j),J,j,q)}function R(J,k,j,q){return P(function(tg){for(var Cg=[],x=0;x<tg.length;++x)Cg.push(255&tg.charCodeAt(x));return Cg}(k),J,j,q)}function X(J,k,j,q){return R(J,k,j,q)}function H(J,k,j,q){return P(Q(k),J,j,q)}function S(J,k,j,q){return P(function(tg,Cg){for(var x,sg,Ag,O=[],_=0;_<tg.length&&!((Cg-=2)<0);++_)x=tg.charCodeAt(_),sg=x>>8,Ag=x%256,O.push(Ag),O.push(sg);return O}(k,J.length-j),J,j,q)}function z(J,k,j){return k===0&&j===J.length?A.fromByteArray(J):A.fromByteArray(J.slice(k,j))}function v(J,k,j){j=Math.min(J.length,j);for(var q=[],tg=k;tg<j;){var Cg,x,sg,Ag,O=J[tg],_=null,Ig=O>239?4:O>223?3:O>191?2:1;if(tg+Ig<=j)switch(Ig){case 1:O<128&&(_=O);break;case 2:(192&(Cg=J[tg+1]))==128&&(Ag=(31&O)<<6|63&Cg)>127&&(_=Ag);break;case 3:Cg=J[tg+1],x=J[tg+2],(192&Cg)==128&&(192&x)==128&&(Ag=(15&O)<<12|(63&Cg)<<6|63&x)>2047&&(Ag<55296||Ag>57343)&&(_=Ag);break;case 4:Cg=J[tg+1],x=J[tg+2],sg=J[tg+3],(192&Cg)==128&&(192&x)==128&&(192&sg)==128&&(Ag=(15&O)<<18|(63&Cg)<<12|(63&x)<<6|63&sg)>65535&&Ag<1114112&&(_=Ag)}_===null?(_=65533,Ig=1):_>65535&&(_-=65536,q.push(_>>>10&1023|55296),_=56320|1023&_),q.push(_),tg+=Ig}return function(ng){var ag=ng.length;if(ag<=4096)return String.fromCharCode.apply(String,ng);for(var lg="",cg=0;cg<ag;)lg+=String.fromCharCode.apply(String,ng.slice(cg,cg+=4096));return lg}(q)}i.kMaxLength=2147483647,n.TYPED_ARRAY_SUPPORT=function(){try{var J=new Uint8Array(1);return J.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},J.foo()===42}catch{return!1}}(),n.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=function(J,k,j){return a(J,k,j)},n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,n.alloc=function(J,k,j){return function(q,tg,Cg){return d(q),q<=0?l(q):tg!==void 0?typeof Cg=="string"?l(q).fill(tg,Cg):l(q).fill(tg):l(q)}(J,k,j)},n.allocUnsafe=function(J){return o(J)},n.allocUnsafeSlow=function(J){return o(J)},n.isBuffer=function(J){return J!=null&&J._isBuffer===!0&&J!==n.prototype},n.compare=function(J,k){if(L(J,Uint8Array)&&(J=n.from(J,J.offset,J.byteLength)),L(k,Uint8Array)&&(k=n.from(k,k.offset,k.byteLength)),!n.isBuffer(J)||!n.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(J===k)return 0;for(var j=J.length,q=k.length,tg=0,Cg=Math.min(j,q);tg<Cg;++tg)if(J[tg]!==k[tg]){j=J[tg],q=k[tg];break}return j<q?-1:q<j?1:0},n.isEncoding=function(J){switch(String(J).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(J,k){if(!Array.isArray(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return n.alloc(0);var j;if(k===void 0)for(k=0,j=0;j<J.length;++j)k+=J[j].length;var q=n.allocUnsafe(k),tg=0;for(j=0;j<J.length;++j){var Cg=J[j];if(L(Cg,Uint8Array)&&(Cg=n.from(Cg)),!n.isBuffer(Cg))throw new TypeError('"list" argument must be an Array of Buffers');Cg.copy(q,tg),tg+=Cg.length}return q},n.byteLength=h,n.prototype._isBuffer=!0,n.prototype.swap16=function(){var J=this.length;if(J%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<J;k+=2)u(this,k,k+1);return this},n.prototype.swap32=function(){var J=this.length;if(J%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<J;k+=4)u(this,k,k+3),u(this,k+1,k+2);return this},n.prototype.swap64=function(){var J=this.length;if(J%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<J;k+=8)u(this,k,k+7),u(this,k+1,k+6),u(this,k+2,k+5),u(this,k+3,k+4);return this},n.prototype.toString=function(){var J=this.length;return J===0?"":arguments.length===0?v(this,0,J):b.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(J){if(!n.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J||n.compare(this,J)===0},n.prototype.inspect=function(){var J="",k=i.INSPECT_MAX_BYTES;return J=this.toString("hex",0,k).replace(/(.{2})/g,"$1 ").trim(),this.length>k&&(J+=" ... "),"<Buffer "+J+">"},n.prototype.compare=function(J,k,j,q,tg){if(L(J,Uint8Array)&&(J=n.from(J,J.offset,J.byteLength)),!n.isBuffer(J))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof J);if(k===void 0&&(k=0),j===void 0&&(j=J?J.length:0),q===void 0&&(q=0),tg===void 0&&(tg=this.length),k<0||j>J.length||q<0||tg>this.length)throw new RangeError("out of range index");if(q>=tg&&k>=j)return 0;if(q>=tg)return-1;if(k>=j)return 1;if(this===J)return 0;for(var Cg=(tg>>>=0)-(q>>>=0),x=(j>>>=0)-(k>>>=0),sg=Math.min(Cg,x),Ag=this.slice(q,tg),O=J.slice(k,j),_=0;_<sg;++_)if(Ag[_]!==O[_]){Cg=Ag[_],x=O[_];break}return Cg<x?-1:x<Cg?1:0},n.prototype.includes=function(J,k,j){return this.indexOf(J,k,j)!==-1},n.prototype.indexOf=function(J,k,j){return m(this,J,k,j,!0)},n.prototype.lastIndexOf=function(J,k,j){return m(this,J,k,j,!1)},n.prototype.write=function(J,k,j,q){if(k===void 0)q="utf8",j=this.length,k=0;else if(j===void 0&&typeof k=="string")q=k,j=this.length,k=0;else{if(!isFinite(k))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");k>>>=0,isFinite(j)?(j>>>=0,q===void 0&&(q="utf8")):(q=j,j=void 0)}var tg=this.length-k;if((j===void 0||j>tg)&&(j=tg),J.length>0&&(j<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var Cg=!1;;)switch(q){case"hex":return p(this,J,k,j);case"utf8":case"utf-8":return Y(this,J,k,j);case"ascii":return R(this,J,k,j);case"latin1":case"binary":return X(this,J,k,j);case"base64":return H(this,J,k,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,J,k,j);default:if(Cg)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),Cg=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function K(J,k,j){var q="";j=Math.min(J.length,j);for(var tg=k;tg<j;++tg)q+=String.fromCharCode(127&J[tg]);return q}function V(J,k,j){var q="";j=Math.min(J.length,j);for(var tg=k;tg<j;++tg)q+=String.fromCharCode(J[tg]);return q}function N(J,k,j){var q=J.length;(!k||k<0)&&(k=0),(!j||j<0||j>q)&&(j=q);for(var tg="",Cg=k;Cg<j;++Cg)tg+=F(J[Cg]);return tg}function B(J,k,j){for(var q=J.slice(k,j),tg="",Cg=0;Cg<q.length;Cg+=2)tg+=String.fromCharCode(q[Cg]+256*q[Cg+1]);return tg}function G(J,k,j){if(J%1!=0||J<0)throw new RangeError("offset is not uint");if(J+k>j)throw new RangeError("Trying to access beyond buffer length")}function w(J,k,j,q,tg,Cg){if(!n.isBuffer(J))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>tg||k<Cg)throw new RangeError('"value" argument is out of bounds');if(j+q>J.length)throw new RangeError("Index out of range")}function W(J,k,j,q,tg,Cg){if(j+q>J.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("Index out of range")}function y(J,k,j,q,tg){return k=+k,j>>>=0,tg||W(J,0,j,4),s.write(J,k,j,q,23,4),j+4}function f(J,k,j,q,tg){return k=+k,j>>>=0,tg||W(J,0,j,8),s.write(J,k,j,q,52,8),j+8}n.prototype.slice=function(J,k){var j=this.length;(J=~~J)<0?(J+=j)<0&&(J=0):J>j&&(J=j),(k=k===void 0?j:~~k)<0?(k+=j)<0&&(k=0):k>j&&(k=j),k<J&&(k=J);var q=this.subarray(J,k);return q.__proto__=n.prototype,q},n.prototype.readUIntLE=function(J,k,j){J>>>=0,k>>>=0,j||G(J,k,this.length);for(var q=this[J],tg=1,Cg=0;++Cg<k&&(tg*=256);)q+=this[J+Cg]*tg;return q},n.prototype.readUIntBE=function(J,k,j){J>>>=0,k>>>=0,j||G(J,k,this.length);for(var q=this[J+--k],tg=1;k>0&&(tg*=256);)q+=this[J+--k]*tg;return q},n.prototype.readUInt8=function(J,k){return J>>>=0,k||G(J,1,this.length),this[J]},n.prototype.readUInt16LE=function(J,k){return J>>>=0,k||G(J,2,this.length),this[J]|this[J+1]<<8},n.prototype.readUInt16BE=function(J,k){return J>>>=0,k||G(J,2,this.length),this[J]<<8|this[J+1]},n.prototype.readUInt32LE=function(J,k){return J>>>=0,k||G(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+16777216*this[J+3]},n.prototype.readUInt32BE=function(J,k){return J>>>=0,k||G(J,4,this.length),16777216*this[J]+(this[J+1]<<16|this[J+2]<<8|this[J+3])},n.prototype.readIntLE=function(J,k,j){J>>>=0,k>>>=0,j||G(J,k,this.length);for(var q=this[J],tg=1,Cg=0;++Cg<k&&(tg*=256);)q+=this[J+Cg]*tg;return q>=(tg*=128)&&(q-=Math.pow(2,8*k)),q},n.prototype.readIntBE=function(J,k,j){J>>>=0,k>>>=0,j||G(J,k,this.length);for(var q=k,tg=1,Cg=this[J+--q];q>0&&(tg*=256);)Cg+=this[J+--q]*tg;return Cg>=(tg*=128)&&(Cg-=Math.pow(2,8*k)),Cg},n.prototype.readInt8=function(J,k){return J>>>=0,k||G(J,1,this.length),128&this[J]?-1*(255-this[J]+1):this[J]},n.prototype.readInt16LE=function(J,k){J>>>=0,k||G(J,2,this.length);var j=this[J]|this[J+1]<<8;return 32768&j?4294901760|j:j},n.prototype.readInt16BE=function(J,k){J>>>=0,k||G(J,2,this.length);var j=this[J+1]|this[J]<<8;return 32768&j?4294901760|j:j},n.prototype.readInt32LE=function(J,k){return J>>>=0,k||G(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},n.prototype.readInt32BE=function(J,k){return J>>>=0,k||G(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},n.prototype.readFloatLE=function(J,k){return J>>>=0,k||G(J,4,this.length),s.read(this,J,!0,23,4)},n.prototype.readFloatBE=function(J,k){return J>>>=0,k||G(J,4,this.length),s.read(this,J,!1,23,4)},n.prototype.readDoubleLE=function(J,k){return J>>>=0,k||G(J,8,this.length),s.read(this,J,!0,52,8)},n.prototype.readDoubleBE=function(J,k){return J>>>=0,k||G(J,8,this.length),s.read(this,J,!1,52,8)},n.prototype.writeUIntLE=function(J,k,j,q){J=+J,k>>>=0,j>>>=0,q||w(this,J,k,j,Math.pow(2,8*j)-1,0);var tg=1,Cg=0;for(this[k]=255&J;++Cg<j&&(tg*=256);)this[k+Cg]=J/tg&255;return k+j},n.prototype.writeUIntBE=function(J,k,j,q){J=+J,k>>>=0,j>>>=0,q||w(this,J,k,j,Math.pow(2,8*j)-1,0);var tg=j-1,Cg=1;for(this[k+tg]=255&J;--tg>=0&&(Cg*=256);)this[k+tg]=J/Cg&255;return k+j},n.prototype.writeUInt8=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,1,255,0),this[k]=255&J,k+1},n.prototype.writeUInt16LE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,2,65535,0),this[k]=255&J,this[k+1]=J>>>8,k+2},n.prototype.writeUInt16BE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,2,65535,0),this[k]=J>>>8,this[k+1]=255&J,k+2},n.prototype.writeUInt32LE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,4,4294967295,0),this[k+3]=J>>>24,this[k+2]=J>>>16,this[k+1]=J>>>8,this[k]=255&J,k+4},n.prototype.writeUInt32BE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,4,4294967295,0),this[k]=J>>>24,this[k+1]=J>>>16,this[k+2]=J>>>8,this[k+3]=255&J,k+4},n.prototype.writeIntLE=function(J,k,j,q){if(J=+J,k>>>=0,!q){var tg=Math.pow(2,8*j-1);w(this,J,k,j,tg-1,-tg)}var Cg=0,x=1,sg=0;for(this[k]=255&J;++Cg<j&&(x*=256);)J<0&&sg===0&&this[k+Cg-1]!==0&&(sg=1),this[k+Cg]=(J/x>>0)-sg&255;return k+j},n.prototype.writeIntBE=function(J,k,j,q){if(J=+J,k>>>=0,!q){var tg=Math.pow(2,8*j-1);w(this,J,k,j,tg-1,-tg)}var Cg=j-1,x=1,sg=0;for(this[k+Cg]=255&J;--Cg>=0&&(x*=256);)J<0&&sg===0&&this[k+Cg+1]!==0&&(sg=1),this[k+Cg]=(J/x>>0)-sg&255;return k+j},n.prototype.writeInt8=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,1,127,-128),J<0&&(J=255+J+1),this[k]=255&J,k+1},n.prototype.writeInt16LE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,2,32767,-32768),this[k]=255&J,this[k+1]=J>>>8,k+2},n.prototype.writeInt16BE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,2,32767,-32768),this[k]=J>>>8,this[k+1]=255&J,k+2},n.prototype.writeInt32LE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,4,2147483647,-2147483648),this[k]=255&J,this[k+1]=J>>>8,this[k+2]=J>>>16,this[k+3]=J>>>24,k+4},n.prototype.writeInt32BE=function(J,k,j){return J=+J,k>>>=0,j||w(this,J,k,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),this[k]=J>>>24,this[k+1]=J>>>16,this[k+2]=J>>>8,this[k+3]=255&J,k+4},n.prototype.writeFloatLE=function(J,k,j){return y(this,J,k,!0,j)},n.prototype.writeFloatBE=function(J,k,j){return y(this,J,k,!1,j)},n.prototype.writeDoubleLE=function(J,k,j){return f(this,J,k,!0,j)},n.prototype.writeDoubleBE=function(J,k,j){return f(this,J,k,!1,j)},n.prototype.copy=function(J,k,j,q){if(!n.isBuffer(J))throw new TypeError("argument should be a Buffer");if(j||(j=0),q||q===0||(q=this.length),k>=J.length&&(k=J.length),k||(k=0),q>0&&q<j&&(q=j),q===j||J.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(j<0||j>=this.length)throw new RangeError("Index out of range");if(q<0)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),J.length-k<q-j&&(q=J.length-k+j);var tg=q-j;if(this===J&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(k,j,q);else if(this===J&&j<k&&k<q)for(var Cg=tg-1;Cg>=0;--Cg)J[Cg+k]=this[Cg+j];else Uint8Array.prototype.set.call(J,this.subarray(j,q),k);return tg},n.prototype.fill=function(J,k,j,q){if(typeof J=="string"){if(typeof k=="string"?(q=k,k=0,j=this.length):typeof j=="string"&&(q=j,j=this.length),q!==void 0&&typeof q!="string")throw new TypeError("encoding must be a string");if(typeof q=="string"&&!n.isEncoding(q))throw new TypeError("Unknown encoding: "+q);if(J.length===1){var tg=J.charCodeAt(0);(q==="utf8"&&tg<128||q==="latin1")&&(J=tg)}}else typeof J=="number"&&(J&=255);if(k<0||this.length<k||this.length<j)throw new RangeError("Out of range index");if(j<=k)return this;var Cg;if(k>>>=0,j=j===void 0?this.length:j>>>0,J||(J=0),typeof J=="number")for(Cg=k;Cg<j;++Cg)this[Cg]=J;else{var x=n.isBuffer(J)?J:n.from(J,q),sg=x.length;if(sg===0)throw new TypeError('The value "'+J+'" is invalid for argument "value"');for(Cg=0;Cg<j-k;++Cg)this[Cg+k]=x[Cg%sg]}return this};var D=/[^+/0-9A-Za-z-_]/g;function F(J){return J<16?"0"+J.toString(16):J.toString(16)}function T(J,k){var j;k=k||1/0;for(var q=J.length,tg=null,Cg=[],x=0;x<q;++x){if((j=J.charCodeAt(x))>55295&&j<57344){if(!tg){if(j>56319){(k-=3)>-1&&Cg.push(239,191,189);continue}if(x+1===q){(k-=3)>-1&&Cg.push(239,191,189);continue}tg=j;continue}if(j<56320){(k-=3)>-1&&Cg.push(239,191,189),tg=j;continue}j=65536+(tg-55296<<10|j-56320)}else tg&&(k-=3)>-1&&Cg.push(239,191,189);if(tg=null,j<128){if((k-=1)<0)break;Cg.push(j)}else if(j<2048){if((k-=2)<0)break;Cg.push(j>>6|192,63&j|128)}else if(j<65536){if((k-=3)<0)break;Cg.push(j>>12|224,j>>6&63|128,63&j|128)}else{if(!(j<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;Cg.push(j>>18|240,j>>12&63|128,j>>6&63|128,63&j|128)}}return Cg}function Q(J){return A.toByteArray(function(k){if((k=(k=k.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;k.length%4!=0;)k+="=";return k}(J))}function P(J,k,j,q){for(var tg=0;tg<q&&!(tg+j>=k.length||tg>=J.length);++tg)k[tg+j]=J[tg];return tg}function L(J,k){return J instanceof k||J!=null&&J.constructor!=null&&J.constructor.name!=null&&J.constructor.name===k.name}function E(J){return J!=J}}).call(this)}).call(this,g("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("stream").Transform,s=g("string_decoder").StringDecoder;function l(n){A.call(this),this.hashMode=typeof n=="string",this.hashMode?this[n]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}g("inherits")(l,A),l.prototype.update=function(n,a,d){typeof n=="string"&&(n=e.from(n,a));var o=this._update(n);return this.hashMode?this:(d&&(o=this._toString(o,d)),o)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(n,a,d){var o;try{this.hashMode?this._update(n):this.push(this._update(n))}catch(c){o=c}finally{d(o)}},l.prototype._flush=function(n){var a;try{this.push(this.__final())}catch(d){a=d}n(a)},l.prototype._finalOrDigest=function(n){var a=this.__final()||e.alloc(0);return n&&(a=this._toString(a,n,!0)),a},l.prototype._toString=function(n,a,d){if(this._decoder||(this._decoder=new s(a),this._encoding=a),this._encoding!==a)throw new Error("can't switch encodings");var o=this._decoder.write(n);return d&&(o+=this._decoder.end()),o},C.exports=l},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(g,C,i){var e=g("../internals/is-callable"),A=g("../internals/try-to-string"),s=TypeError;C.exports=function(l){if(e(l))return l;throw new s(A(l)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(g,C,i){var e=g("../internals/is-constructor"),A=g("../internals/try-to-string"),s=TypeError;C.exports=function(l){if(e(l))return l;throw new s(A(l)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(g,C,i){var e=g("../internals/is-callable"),A=String,s=TypeError;C.exports=function(l){if(typeof l=="object"||e(l))return l;throw new s("Can't set "+A(l)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(g,C,i){var e=g("../internals/well-known-symbol"),A=g("../internals/object-create"),s=g("../internals/object-define-property").f,l=e("unscopables"),n=Array.prototype;n[l]===void 0&&s(n,l,{configurable:!0,value:A(null)}),C.exports=function(a){n[l][a]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(g,C,i){var e=g("../internals/object-is-prototype-of"),A=TypeError;C.exports=function(s,l){if(e(l,s))return s;throw new A("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(g,C,i){var e=g("../internals/is-object"),A=String,s=TypeError;C.exports=function(l){if(e(l))return l;throw new s(A(l)+" is not an object")}},{"../internals/is-object":289}],228:[function(g,C,i){var e=g("../internals/to-indexed-object"),A=g("../internals/to-absolute-index"),s=g("../internals/length-of-array-like"),l=function(n){return function(a,d,o){var c,r=e(a),h=s(r),b=A(o,h);if(n&&d!=d){for(;h>b;)if((c=r[b++])!=c)return!0}else for(;h>b;b++)if((n||b in r)&&r[b]===d)return n||b||0;return!n&&-1}};C.exports={includes:l(!0),indexOf:l(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(g,C,i){var e=g("../internals/function-bind-context"),A=g("../internals/function-uncurry-this"),s=g("../internals/indexed-object"),l=g("../internals/to-object"),n=g("../internals/length-of-array-like"),a=g("../internals/array-species-create"),d=A([].push),o=function(c){var r=c===1,h=c===2,b=c===3,u=c===4,m=c===6,Z=c===7,p=c===5||m;return function(Y,R,X,H){for(var S,z,v=l(Y),K=s(v),V=e(R,X),N=n(K),B=0,G=H||a,w=r?G(Y,N):h||Z?G(Y,0):void 0;N>B;B++)if((p||B in K)&&(z=V(S=K[B],B,v),c))if(r)w[B]=z;else if(z)switch(c){case 3:return!0;case 5:return S;case 6:return B;case 2:d(w,S)}else switch(c){case 4:return!1;case 7:d(w,S)}return m?-1:b||u?u:w}};C.exports={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6),filterReject:o(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(g,C,i){var e=g("../internals/to-absolute-index"),A=g("../internals/length-of-array-like"),s=g("../internals/create-property"),l=Array,n=Math.max;C.exports=function(a,d,o){for(var c=A(a),r=e(d,c),h=e(o===void 0?c:o,c),b=l(n(h-r,0)),u=0;r<h;r++,u++)s(b,u,a[r]);return b.length=u,b}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(g,C,i){var e=g("../internals/function-uncurry-this");C.exports=e([].slice)},{"../internals/function-uncurry-this":268}],232:[function(g,C,i){var e=g("../internals/is-array"),A=g("../internals/is-constructor"),s=g("../internals/is-object"),l=g("../internals/well-known-symbol")("species"),n=Array;C.exports=function(a){var d;return e(a)&&(d=a.constructor,(A(d)&&(d===n||e(d.prototype))||s(d)&&(d=d[l])===null)&&(d=void 0)),d===void 0?n:d}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(g,C,i){var e=g("../internals/array-species-constructor");C.exports=function(A,s){return new(e(A))(s===0?0:s)}},{"../internals/array-species-constructor":232}],234:[function(g,C,i){var e=g("../internals/well-known-symbol")("iterator"),A=!1;try{var s=0,l={next:function(){return{done:!!s++}},return:function(){A=!0}};l[e]=function(){return this},Array.from(l,function(){throw 2})}catch{}C.exports=function(n,a){try{if(!a&&!A)return!1}catch{return!1}var d=!1;try{var o={};o[e]=function(){return{next:function(){return{done:d=!0}}}},n(o)}catch{}return d}},{"../internals/well-known-symbol":357}],235:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=e({}.toString),s=e("".slice);C.exports=function(l){return s(A(l),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(g,C,i){var e=g("../internals/to-string-tag-support"),A=g("../internals/is-callable"),s=g("../internals/classof-raw"),l=g("../internals/well-known-symbol")("toStringTag"),n=Object,a=s(function(){return arguments}())==="Arguments";C.exports=e?s:function(d){var o,c,r;return d===void 0?"Undefined":d===null?"Null":typeof(c=function(h,b){try{return h[b]}catch{}}(o=n(d),l))=="string"?c:a?s(o):(r=s(o))==="Object"&&A(o.callee)?"Arguments":r}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(g,C,i){var e=g("../internals/has-own-property"),A=g("../internals/own-keys"),s=g("../internals/object-get-own-property-descriptor"),l=g("../internals/object-define-property");C.exports=function(n,a,d){for(var o=A(a),c=l.f,r=s.f,h=0;h<o.length;h++){var b=o[h];e(n,b)||d&&e(d,b)||c(n,b,r(a,b))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(g,C,i){var e=g("../internals/well-known-symbol")("match");C.exports=function(A){var s=/./;try{"/./"[A](s)}catch{try{return s[e]=!1,"/./"[A](s)}catch{}}return!1}},{"../internals/well-known-symbol":357}],239:[function(g,C,i){var e=g("../internals/fails");C.exports=!e(function(){function A(){}return A.prototype.constructor=null,Object.getPrototypeOf(new A)!==A.prototype})},{"../internals/fails":260}],240:[function(g,C,i){C.exports=function(e,A){return{value:e,done:A}}},{}],241:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/object-define-property"),s=g("../internals/create-property-descriptor");C.exports=e?function(l,n,a){return A.f(l,n,s(1,a))}:function(l,n,a){return l[n]=a,l}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(g,C,i){C.exports=function(e,A){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:A}}},{}],243:[function(g,C,i){var e=g("../internals/to-property-key"),A=g("../internals/object-define-property"),s=g("../internals/create-property-descriptor");C.exports=function(l,n,a){var d=e(n);d in l?A.f(l,d,s(0,a)):l[d]=a}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(g,C,i){var e=g("../internals/make-built-in"),A=g("../internals/object-define-property");C.exports=function(s,l,n){return n.get&&e(n.get,l,{getter:!0}),n.set&&e(n.set,l,{setter:!0}),A.f(s,l,n)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(g,C,i){var e=g("../internals/is-callable"),A=g("../internals/object-define-property"),s=g("../internals/make-built-in"),l=g("../internals/define-global-property");C.exports=function(n,a,d,o){o||(o={});var c=o.enumerable,r=o.name!==void 0?o.name:a;if(e(d)&&s(d,r,o),o.global)c?n[a]=d:l(a,d);else{try{o.unsafe?n[a]&&(c=!0):delete n[a]}catch{}c?n[a]=d:A.f(n,a,{value:d,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return n}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(g,C,i){var e=g("../internals/global"),A=Object.defineProperty;C.exports=function(s,l){try{A(e,s,{value:l,configurable:!0,writable:!0})}catch{e[s]=l}return l}},{"../internals/global":274}],247:[function(g,C,i){var e=g("../internals/fails");C.exports=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},{"../internals/fails":260}],248:[function(g,C,i){var e=typeof document=="object"&&document.all,A=e===void 0&&e!==void 0;C.exports={all:e,IS_HTMLDDA:A}},{}],249:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/is-object"),s=e.document,l=A(s)&&A(s.createElement);C.exports=function(n){return l?s.createElement(n):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(g,C,i){var e=g("../internals/engine-is-deno"),A=g("../internals/engine-is-node");C.exports=!e&&!A&&typeof window=="object"&&typeof document=="object"},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(g,C,i){C.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},{}],252:[function(g,C,i){var e=g("../internals/engine-user-agent");C.exports=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u"},{"../internals/engine-user-agent":256}],253:[function(g,C,i){var e=g("../internals/engine-user-agent");C.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)},{"../internals/engine-user-agent":256}],254:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/classof-raw");C.exports=A(e.process)==="process"},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(g,C,i){var e=g("../internals/engine-user-agent");C.exports=/web0s(?!.*chrome)/i.test(e)},{"../internals/engine-user-agent":256}],256:[function(g,C,i){C.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},{}],257:[function(g,C,i){var e,A,s=g("../internals/global"),l=g("../internals/engine-user-agent"),n=s.process,a=s.Deno,d=n&&n.versions||a&&a.version,o=d&&d.v8;o&&(A=(e=o.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!A&&l&&(!(e=l.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=l.match(/Chrome\/(\d+)/))&&(A=+e[1]),C.exports=A},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(g,C,i){C.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/object-get-own-property-descriptor").f,s=g("../internals/create-non-enumerable-property"),l=g("../internals/define-built-in"),n=g("../internals/define-global-property"),a=g("../internals/copy-constructor-properties"),d=g("../internals/is-forced");C.exports=function(o,c){var r,h,b,u,m,Z=o.target,p=o.global,Y=o.stat;if(r=p?e:Y?e[Z]||n(Z,{}):(e[Z]||{}).prototype)for(h in c){if(u=c[h],b=o.dontCallGetSet?(m=A(r,h))&&m.value:r[h],!d(p?h:Z+(Y?".":"#")+h,o.forced)&&b!==void 0){if(typeof u==typeof b)continue;a(u,b)}(o.sham||b&&b.sham)&&s(u,"sham",!0),l(r,h,u,o)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(g,C,i){C.exports=function(e){try{return!!e()}catch{return!0}}},{}],261:[function(g,C,i){var e=g("../internals/function-bind-native"),A=Function.prototype,s=A.apply,l=A.call;C.exports=typeof Reflect=="object"&&Reflect.apply||(e?l.bind(s):function(){return l.apply(s,arguments)})},{"../internals/function-bind-native":263}],262:[function(g,C,i){var e=g("../internals/function-uncurry-this-clause"),A=g("../internals/a-callable"),s=g("../internals/function-bind-native"),l=e(e.bind);C.exports=function(n,a){return A(n),a===void 0?n:s?l(n,a):function(){return n.apply(a,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(g,C,i){var e=g("../internals/fails");C.exports=!e(function(){var A=(function(){}).bind();return typeof A!="function"||A.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(g,C,i){var e=g("../internals/function-bind-native"),A=Function.prototype.call;C.exports=e?A.bind(A):function(){return A.apply(A,arguments)}},{"../internals/function-bind-native":263}],265:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/has-own-property"),s=Function.prototype,l=e&&Object.getOwnPropertyDescriptor,n=A(s,"name"),a=n&&(function(){}).name==="something",d=n&&(!e||e&&l(s,"name").configurable);C.exports={EXISTS:n,PROPER:a,CONFIGURABLE:d}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/a-callable");C.exports=function(s,l,n){try{return e(A(Object.getOwnPropertyDescriptor(s,l)[n]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(g,C,i){var e=g("../internals/classof-raw"),A=g("../internals/function-uncurry-this");C.exports=function(s){if(e(s)==="Function")return A(s)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(g,C,i){var e=g("../internals/function-bind-native"),A=Function.prototype,s=A.call,l=e&&A.bind.bind(s,s);C.exports=e?l:function(n){return function(){return s.apply(n,arguments)}}},{"../internals/function-bind-native":263}],269:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/is-callable"),s=function(l){return A(l)?l:void 0};C.exports=function(l,n){return arguments.length<2?s(e[l]):e[l]&&e[l][n]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(g,C,i){var e=g("../internals/classof"),A=g("../internals/get-method"),s=g("../internals/is-null-or-undefined"),l=g("../internals/iterators"),n=g("../internals/well-known-symbol")("iterator");C.exports=function(a){if(!s(a))return A(a,n)||A(a,"@@iterator")||l[e(a)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(g,C,i){var e=g("../internals/function-call"),A=g("../internals/a-callable"),s=g("../internals/an-object"),l=g("../internals/try-to-string"),n=g("../internals/get-iterator-method"),a=TypeError;C.exports=function(d,o){var c=arguments.length<2?n(d):o;if(A(c))return s(e(c,d));throw new a(l(d)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/is-array"),s=g("../internals/is-callable"),l=g("../internals/classof-raw"),n=g("../internals/to-string"),a=e([].push);C.exports=function(d){if(s(d))return d;if(A(d)){for(var o=d.length,c=[],r=0;r<o;r++){var h=d[r];typeof h=="string"?a(c,h):typeof h!="number"&&l(h)!=="Number"&&l(h)!=="String"||a(c,n(h))}var b=c.length,u=!0;return function(m,Z){if(u)return u=!1,Z;if(A(this))return Z;for(var p=0;p<b;p++)if(c[p]===m)return Z}}}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268,"../internals/is-array":284,"../internals/is-callable":285,"../internals/to-string":348}],273:[function(g,C,i){var e=g("../internals/a-callable"),A=g("../internals/is-null-or-undefined");C.exports=function(s,l){var n=s[l];return A(n)?void 0:e(n)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(g,C,i){(function(e){(function(){var A=function(s){return s&&s.Math===Math&&s};C.exports=A(typeof globalThis=="object"&&globalThis)||A(typeof window=="object"&&window)||A(typeof self=="object"&&self)||A(typeof e=="object"&&e)||function(){return this}()||this||Function("return this")()}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],275:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/to-object"),s=e({}.hasOwnProperty);C.exports=Object.hasOwn||function(l,n){return s(A(l),n)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(g,C,i){C.exports={}},{}],277:[function(g,C,i){C.exports=function(e,A){try{arguments.length===1?console.error(e):console.error(e,A)}catch{}}},{}],278:[function(g,C,i){var e=g("../internals/get-built-in");C.exports=e("document","documentElement")},{"../internals/get-built-in":269}],279:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/fails"),s=g("../internals/document-create-element");C.exports=!e&&!A(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!==7})},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/fails"),s=g("../internals/classof-raw"),l=Object,n=e("".split);C.exports=A(function(){return!l("z").propertyIsEnumerable(0)})?function(a){return s(a)==="String"?n(a,""):l(a)}:l},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/is-callable"),s=g("../internals/shared-store"),l=e(Function.toString);A(s.inspectSource)||(s.inspectSource=function(n){return l(n)}),C.exports=s.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(g,C,i){var e,A,s,l=g("../internals/weak-map-basic-detection"),n=g("../internals/global"),a=g("../internals/is-object"),d=g("../internals/create-non-enumerable-property"),o=g("../internals/has-own-property"),c=g("../internals/shared-store"),r=g("../internals/shared-key"),h=g("../internals/hidden-keys"),b=n.TypeError,u=n.WeakMap;if(l||c.state){var m=c.state||(c.state=new u);m.get=m.get,m.has=m.has,m.set=m.set,e=function(p,Y){if(m.has(p))throw new b("Object already initialized");return Y.facade=p,m.set(p,Y),Y},A=function(p){return m.get(p)||{}},s=function(p){return m.has(p)}}else{var Z=r("state");h[Z]=!0,e=function(p,Y){if(o(p,Z))throw new b("Object already initialized");return Y.facade=p,d(p,Z,Y),Y},A=function(p){return o(p,Z)?p[Z]:{}},s=function(p){return o(p,Z)}}C.exports={set:e,get:A,has:s,enforce:function(p){return s(p)?A(p):e(p,{})},getterFor:function(p){return function(Y){var R;if(!a(Y)||(R=A(Y)).type!==p)throw new b("Incompatible receiver, "+p+" required");return R}}}},{"../internals/create-non-enumerable-property":241,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/is-object":289,"../internals/shared-key":332,"../internals/shared-store":333,"../internals/weak-map-basic-detection":354}],283:[function(g,C,i){var e=g("../internals/well-known-symbol"),A=g("../internals/iterators"),s=e("iterator"),l=Array.prototype;C.exports=function(n){return n!==void 0&&(A.Array===n||l[s]===n)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(g,C,i){var e=g("../internals/classof-raw");C.exports=Array.isArray||function(A){return e(A)==="Array"}},{"../internals/classof-raw":235}],285:[function(g,C,i){var e=g("../internals/document-all"),A=e.all;C.exports=e.IS_HTMLDDA?function(s){return typeof s=="function"||s===A}:function(s){return typeof s=="function"}},{"../internals/document-all":248}],286:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/fails"),s=g("../internals/is-callable"),l=g("../internals/classof"),n=g("../internals/get-built-in"),a=g("../internals/inspect-source"),d=function(){},o=[],c=n("Reflect","construct"),r=/^\s*(?:class|function)\b/,h=e(r.exec),b=!r.test(d),u=function(Z){if(!s(Z))return!1;try{return c(d,o,Z),!0}catch{return!1}},m=function(Z){if(!s(Z))return!1;switch(l(Z)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return b||!!h(r,a(Z))}catch{return!0}};m.sham=!0,C.exports=!c||A(function(){var Z;return u(u.call)||!u(Object)||!u(function(){Z=!0})||Z})?m:u},{"../internals/classof":236,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/inspect-source":281,"../internals/is-callable":285}],287:[function(g,C,i){var e=g("../internals/fails"),A=g("../internals/is-callable"),s=/#|\.prototype\./,l=function(c,r){var h=a[n(c)];return h===o||h!==d&&(A(r)?e(r):!!r)},n=l.normalize=function(c){return String(c).replace(s,".").toLowerCase()},a=l.data={},d=l.NATIVE="N",o=l.POLYFILL="P";C.exports=l},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(g,C,i){C.exports=function(e){return e==null}},{}],289:[function(g,C,i){var e=g("../internals/is-callable"),A=g("../internals/document-all"),s=A.all;C.exports=A.IS_HTMLDDA?function(l){return typeof l=="object"?l!==null:e(l)||l===s}:function(l){return typeof l=="object"?l!==null:e(l)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(g,C,i){C.exports=!1},{}],291:[function(g,C,i){var e=g("../internals/is-object"),A=g("../internals/classof-raw"),s=g("../internals/well-known-symbol")("match");C.exports=function(l){var n;return e(l)&&((n=l[s])!==void 0?!!n:A(l)==="RegExp")}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(g,C,i){var e=g("../internals/get-built-in"),A=g("../internals/is-callable"),s=g("../internals/object-is-prototype-of"),l=g("../internals/use-symbol-as-uid"),n=Object;C.exports=l?function(a){return typeof a=="symbol"}:function(a){var d=e("Symbol");return A(d)&&s(d.prototype,n(a))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(g,C,i){var e=g("../internals/function-bind-context"),A=g("../internals/function-call"),s=g("../internals/an-object"),l=g("../internals/try-to-string"),n=g("../internals/is-array-iterator-method"),a=g("../internals/length-of-array-like"),d=g("../internals/object-is-prototype-of"),o=g("../internals/get-iterator"),c=g("../internals/get-iterator-method"),r=g("../internals/iterator-close"),h=TypeError,b=function(m,Z){this.stopped=m,this.result=Z},u=b.prototype;C.exports=function(m,Z,p){var Y,R,X,H,S,z,v,K=p&&p.that,V=!(!p||!p.AS_ENTRIES),N=!(!p||!p.IS_RECORD),B=!(!p||!p.IS_ITERATOR),G=!(!p||!p.INTERRUPTED),w=e(Z,K),W=function(f){return Y&&r(Y,"normal",f),new b(!0,f)},y=function(f){return V?(s(f),G?w(f[0],f[1],W):w(f[0],f[1])):G?w(f,W):w(f)};if(N)Y=m.iterator;else if(B)Y=m;else{if(!(R=c(m)))throw new h(l(m)+" is not iterable");if(n(R)){for(X=0,H=a(m);H>X;X++)if((S=y(m[X]))&&d(u,S))return S;return new b(!1)}Y=o(m,R)}for(z=N?m.next:Y.next;!(v=A(z,Y)).done;){try{S=y(v.value)}catch(f){r(Y,"throw",f)}if(typeof S=="object"&&S&&d(u,S))return S}return new b(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(g,C,i){var e=g("../internals/function-call"),A=g("../internals/an-object"),s=g("../internals/get-method");C.exports=function(l,n,a){var d,o;A(l);try{if(!(d=s(l,"return"))){if(n==="throw")throw a;return a}d=e(d,l)}catch(c){o=!0,d=c}if(n==="throw")throw a;if(o)throw d;return A(d),a}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(g,C,i){var e=g("../internals/iterators-core").IteratorPrototype,A=g("../internals/object-create"),s=g("../internals/create-property-descriptor"),l=g("../internals/set-to-string-tag"),n=g("../internals/iterators"),a=function(){return this};C.exports=function(d,o,c,r){var h=o+" Iterator";return d.prototype=A(e,{next:s(+!r,c)}),l(d,h,!1,!0),n[h]=a,d}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/function-call"),s=g("../internals/is-pure"),l=g("../internals/function-name"),n=g("../internals/is-callable"),a=g("../internals/iterator-create-constructor"),d=g("../internals/object-get-prototype-of"),o=g("../internals/object-set-prototype-of"),c=g("../internals/set-to-string-tag"),r=g("../internals/create-non-enumerable-property"),h=g("../internals/define-built-in"),b=g("../internals/well-known-symbol"),u=g("../internals/iterators"),m=g("../internals/iterators-core"),Z=l.PROPER,p=l.CONFIGURABLE,Y=m.IteratorPrototype,R=m.BUGGY_SAFARI_ITERATORS,X=b("iterator"),H=function(){return this};C.exports=function(S,z,v,K,V,N,B){a(v,z,K);var G,w,W,y=function(L){if(L===V&&Q)return Q;if(!R&&L&&L in F)return F[L];switch(L){case"keys":case"values":case"entries":return function(){return new v(this,L)}}return function(){return new v(this)}},f=z+" Iterator",D=!1,F=S.prototype,T=F[X]||F["@@iterator"]||V&&F[V],Q=!R&&T||y(V),P=z==="Array"&&F.entries||T;if(P&&(G=d(P.call(new S)))!==Object.prototype&&G.next&&(s||d(G)===Y||(o?o(G,Y):n(G[X])||h(G,X,H)),c(G,f,!0,!0),s&&(u[f]=H)),Z&&V==="values"&&T&&T.name!=="values"&&(!s&&p?r(F,"name","values"):(D=!0,Q=function(){return A(T,this)})),V)if(w={values:y("values"),keys:N?Q:y("keys"),entries:y("entries")},B)for(W in w)(R||D||!(W in F))&&h(F,W,w[W]);else e({target:z,proto:!0,forced:R||D},w);return s&&!B||F[X]===Q||h(F,X,Q,{name:V}),u[z]=Q,w}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(g,C,i){var e,A,s,l=g("../internals/fails"),n=g("../internals/is-callable"),a=g("../internals/is-object"),d=g("../internals/object-create"),o=g("../internals/object-get-prototype-of"),c=g("../internals/define-built-in"),r=g("../internals/well-known-symbol"),h=g("../internals/is-pure"),b=r("iterator"),u=!1;[].keys&&("next"in(s=[].keys())?(A=o(o(s)))!==Object.prototype&&(e=A):u=!0),!a(e)||l(function(){var m={};return e[b].call(m)!==m})?e={}:h&&(e=d(e)),n(e[b])||c(e,b,function(){return this}),C.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:u}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(g,C,i){arguments[4][276][0].apply(i,arguments)},{dup:276}],299:[function(g,C,i){var e=g("../internals/to-length");C.exports=function(A){return e(A.length)}},{"../internals/to-length":343}],300:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/fails"),s=g("../internals/is-callable"),l=g("../internals/has-own-property"),n=g("../internals/descriptors"),a=g("../internals/function-name").CONFIGURABLE,d=g("../internals/inspect-source"),o=g("../internals/internal-state"),c=o.enforce,r=o.get,h=String,b=Object.defineProperty,u=e("".slice),m=e("".replace),Z=e([].join),p=n&&!A(function(){return b(function(){},"length",{value:8}).length!==8}),Y=String(String).split("String"),R=C.exports=function(X,H,S){u(h(H),0,7)==="Symbol("&&(H="["+m(h(H),/^Symbol\(([^)]*)\)/,"$1")+"]"),S&&S.getter&&(H="get "+H),S&&S.setter&&(H="set "+H),(!l(X,"name")||a&&X.name!==H)&&(n?b(X,"name",{value:H,configurable:!0}):X.name=H),p&&S&&l(S,"arity")&&X.length!==S.arity&&b(X,"length",{value:S.arity});try{S&&l(S,"constructor")&&S.constructor?n&&b(X,"prototype",{writable:!1}):X.prototype&&(X.prototype=void 0)}catch{}var z=c(X);return l(z,"source")||(z.source=Z(Y,typeof H=="string"?H:"")),X};Function.prototype.toString=R(function(){return s(this)&&r(this).source||d(this)},"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(g,C,i){var e=Math.ceil,A=Math.floor;C.exports=Math.trunc||function(s){var l=+s;return(l>0?A:e)(l)}},{}],302:[function(g,C,i){var e,A,s,l,n,a=g("../internals/global"),d=g("../internals/function-bind-context"),o=g("../internals/object-get-own-property-descriptor").f,c=g("../internals/task").set,r=g("../internals/queue"),h=g("../internals/engine-is-ios"),b=g("../internals/engine-is-ios-pebble"),u=g("../internals/engine-is-webos-webkit"),m=g("../internals/engine-is-node"),Z=a.MutationObserver||a.WebKitMutationObserver,p=a.document,Y=a.process,R=a.Promise,X=o(a,"queueMicrotask"),H=X&&X.value;if(!H){var S=new r,z=function(){var v,K;for(m&&(v=Y.domain)&&v.exit();K=S.get();)try{K()}catch(V){throw S.head&&e(),V}v&&v.enter()};h||m||u||!Z||!p?!b&&R&&R.resolve?((l=R.resolve(void 0)).constructor=R,n=d(l.then,l),e=function(){n(z)}):m?e=function(){Y.nextTick(z)}:(c=d(c,a),e=function(){c(z)}):(A=!0,s=p.createTextNode(""),new Z(z).observe(s,{characterData:!0}),e=function(){s.data=A=!A}),H=function(v){S.head||e(),S.add(v)}}C.exports=H},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(g,C,i){var e=g("../internals/a-callable"),A=TypeError,s=function(l){var n,a;this.promise=new l(function(d,o){if(n!==void 0||a!==void 0)throw new A("Bad Promise constructor");n=d,a=o}),this.resolve=e(n),this.reject=e(a)};C.exports.f=function(l){return new s(l)}},{"../internals/a-callable":222}],304:[function(g,C,i){var e=g("../internals/is-regexp"),A=TypeError;C.exports=function(s){if(e(s))throw new A("The method doesn't accept regular expressions");return s}},{"../internals/is-regexp":291}],305:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/function-uncurry-this"),s=g("../internals/function-call"),l=g("../internals/fails"),n=g("../internals/object-keys"),a=g("../internals/object-get-own-property-symbols"),d=g("../internals/object-property-is-enumerable"),o=g("../internals/to-object"),c=g("../internals/indexed-object"),r=Object.assign,h=Object.defineProperty,b=A([].concat);C.exports=!r||l(function(){if(e&&r({b:1},r(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var u={},m={},Z=Symbol("assign detection");return u[Z]=7,"abcdefghijklmnopqrst".split("").forEach(function(p){m[p]=p}),r({},u)[Z]!==7||n(r({},m)).join("")!=="abcdefghijklmnopqrst"})?function(u,m){for(var Z=o(u),p=arguments.length,Y=1,R=a.f,X=d.f;p>Y;)for(var H,S=c(arguments[Y++]),z=R?b(n(S),R(S)):n(S),v=z.length,K=0;v>K;)H=z[K++],e&&!s(X,S,H)||(Z[H]=S[H]);return Z}:r},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(g,C,i){var e,A=g("../internals/an-object"),s=g("../internals/object-define-properties"),l=g("../internals/enum-bug-keys"),n=g("../internals/hidden-keys"),a=g("../internals/html"),d=g("../internals/document-create-element"),o=g("../internals/shared-key"),c=o("IE_PROTO"),r=function(){},h=function(m){return"<script>"+m+"<\/script>"},b=function(m){m.write(h("")),m.close();var Z=m.parentWindow.Object;return m=null,Z},u=function(){try{e=new ActiveXObject("htmlfile")}catch{}var m,Z;u=typeof document<"u"?document.domain&&e?b(e):((Z=d("iframe")).style.display="none",a.appendChild(Z),Z.src="javascript:",(m=Z.contentWindow.document).open(),m.write(h("document.F=Object")),m.close(),m.F):b(e);for(var p=l.length;p--;)delete u.prototype[l[p]];return u()};n[c]=!0,C.exports=Object.create||function(m,Z){var p;return m!==null?(r.prototype=A(m),p=new r,r.prototype=null,p[c]=m):p=u(),Z===void 0?p:s.f(p,Z)}},{"../internals/an-object":227,"../internals/document-create-element":249,"../internals/enum-bug-keys":258,"../internals/hidden-keys":276,"../internals/html":278,"../internals/object-define-properties":307,"../internals/shared-key":332}],307:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/v8-prototype-define-bug"),s=g("../internals/object-define-property"),l=g("../internals/an-object"),n=g("../internals/to-indexed-object"),a=g("../internals/object-keys");i.f=e&&!A?Object.defineProperties:function(d,o){l(d);for(var c,r=n(o),h=a(o),b=h.length,u=0;b>u;)s.f(d,c=h[u++],r[c]);return d}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/object-define-property":308,"../internals/object-keys":316,"../internals/to-indexed-object":341,"../internals/v8-prototype-define-bug":352}],308:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/ie8-dom-define"),s=g("../internals/v8-prototype-define-bug"),l=g("../internals/an-object"),n=g("../internals/to-property-key"),a=TypeError,d=Object.defineProperty,o=Object.getOwnPropertyDescriptor;i.f=e?s?function(c,r,h){if(l(c),r=n(r),l(h),typeof c=="function"&&r==="prototype"&&"value"in h&&"writable"in h&&!h.writable){var b=o(c,r);b&&b.writable&&(c[r]=h.value,h={configurable:"configurable"in h?h.configurable:b.configurable,enumerable:"enumerable"in h?h.enumerable:b.enumerable,writable:!1})}return d(c,r,h)}:d:function(c,r,h){if(l(c),r=n(r),l(h),A)try{return d(c,r,h)}catch{}if("get"in h||"set"in h)throw new a("Accessors not supported");return"value"in h&&(c[r]=h.value),c}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/ie8-dom-define":279,"../internals/to-property-key":346,"../internals/v8-prototype-define-bug":352}],309:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/function-call"),s=g("../internals/object-property-is-enumerable"),l=g("../internals/create-property-descriptor"),n=g("../internals/to-indexed-object"),a=g("../internals/to-property-key"),d=g("../internals/has-own-property"),o=g("../internals/ie8-dom-define"),c=Object.getOwnPropertyDescriptor;i.f=e?c:function(r,h){if(r=n(r),h=a(h),o)try{return c(r,h)}catch{}if(d(r,h))return l(!A(s.f,r,h),r[h])}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/function-call":264,"../internals/has-own-property":275,"../internals/ie8-dom-define":279,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341,"../internals/to-property-key":346}],310:[function(g,C,i){var e=g("../internals/classof-raw"),A=g("../internals/to-indexed-object"),s=g("../internals/object-get-own-property-names").f,l=g("../internals/array-slice-simple"),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];C.exports.f=function(a){return n&&e(a)==="Window"?function(d){try{return s(d)}catch{return l(n)}}(a):s(A(a))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(g,C,i){var e=g("../internals/object-keys-internal"),A=g("../internals/enum-bug-keys").concat("length","prototype");i.f=Object.getOwnPropertyNames||function(s){return e(s,A)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(g,C,i){i.f=Object.getOwnPropertySymbols},{}],313:[function(g,C,i){var e=g("../internals/has-own-property"),A=g("../internals/is-callable"),s=g("../internals/to-object"),l=g("../internals/shared-key"),n=g("../internals/correct-prototype-getter"),a=l("IE_PROTO"),d=Object,o=d.prototype;C.exports=n?d.getPrototypeOf:function(c){var r=s(c);if(e(r,a))return r[a];var h=r.constructor;return A(h)&&r instanceof h?h.prototype:r instanceof d?o:null}},{"../internals/correct-prototype-getter":239,"../internals/has-own-property":275,"../internals/is-callable":285,"../internals/shared-key":332,"../internals/to-object":344}],314:[function(g,C,i){var e=g("../internals/function-uncurry-this");C.exports=e({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=g("../internals/has-own-property"),s=g("../internals/to-indexed-object"),l=g("../internals/array-includes").indexOf,n=g("../internals/hidden-keys"),a=e([].push);C.exports=function(d,o){var c,r=s(d),h=0,b=[];for(c in r)!A(n,c)&&A(r,c)&&a(b,c);for(;o.length>h;)A(r,c=o[h++])&&(~l(b,c)||a(b,c));return b}},{"../internals/array-includes":228,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/to-indexed-object":341}],316:[function(g,C,i){var e=g("../internals/object-keys-internal"),A=g("../internals/enum-bug-keys");C.exports=Object.keys||function(s){return e(s,A)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(g,C,i){var e={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,s=A&&!e.call({1:2},1);i.f=s?function(l){var n=A(this,l);return!!n&&n.enumerable}:e},{}],318:[function(g,C,i){var e=g("../internals/function-uncurry-this-accessor"),A=g("../internals/an-object"),s=g("../internals/a-possible-prototype");C.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var l,n=!1,a={};try{(l=e(Object.prototype,"__proto__","set"))(a,[]),n=a instanceof Array}catch{}return function(d,o){return A(d),s(o),n?l(d,o):d.__proto__=o,d}}():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/fails"),s=g("../internals/function-uncurry-this"),l=g("../internals/object-get-prototype-of"),n=g("../internals/object-keys"),a=g("../internals/to-indexed-object"),d=s(g("../internals/object-property-is-enumerable").f),o=s([].push),c=e&&A(function(){var h=Object.create(null);return h[2]=2,!d(h,2)}),r=function(h){return function(b){for(var u,m=a(b),Z=n(m),p=c&&l(m)===null,Y=Z.length,R=0,X=[];Y>R;)u=Z[R++],e&&!(p?u in m:d(m,u))||o(X,h?[u,m[u]]:m[u]);return X}};C.exports={entries:r(!0),values:r(!1)}},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/object-get-prototype-of":313,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341}],320:[function(g,C,i){var e=g("../internals/function-call"),A=g("../internals/is-callable"),s=g("../internals/is-object"),l=TypeError;C.exports=function(n,a){var d,o;if(a==="string"&&A(d=n.toString)&&!s(o=e(d,n))||A(d=n.valueOf)&&!s(o=e(d,n))||a!=="string"&&A(d=n.toString)&&!s(o=e(d,n)))return o;throw new l("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(g,C,i){var e=g("../internals/get-built-in"),A=g("../internals/function-uncurry-this"),s=g("../internals/object-get-own-property-names"),l=g("../internals/object-get-own-property-symbols"),n=g("../internals/an-object"),a=A([].concat);C.exports=e("Reflect","ownKeys")||function(d){var o=s.f(n(d)),c=l.f;return c?a(o,c(d)):o}},{"../internals/an-object":227,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-symbols":312}],322:[function(g,C,i){var e=g("../internals/global");C.exports=e},{"../internals/global":274}],323:[function(g,C,i){C.exports=function(e){try{return{error:!1,value:e()}}catch(A){return{error:!0,value:A}}}},{}],324:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/promise-native-constructor"),s=g("../internals/is-callable"),l=g("../internals/is-forced"),n=g("../internals/inspect-source"),a=g("../internals/well-known-symbol"),d=g("../internals/engine-is-browser"),o=g("../internals/engine-is-deno"),c=g("../internals/is-pure"),r=g("../internals/engine-v8-version"),h=A&&A.prototype,b=a("species"),u=!1,m=s(e.PromiseRejectionEvent),Z=l("Promise",function(){var p=n(A),Y=p!==String(A);if(!Y&&r===66||c&&(!h.catch||!h.finally))return!0;if(!r||r<51||!/native code/.test(p)){var R=new A(function(H){H(1)}),X=function(H){H(function(){},function(){})};if((R.constructor={})[b]=X,!(u=R.then(function(){})instanceof X))return!0}return!Y&&(d||o)&&!m});C.exports={CONSTRUCTOR:Z,REJECTION_EVENT:m,SUBCLASSING:u}},{"../internals/engine-is-browser":250,"../internals/engine-is-deno":251,"../internals/engine-v8-version":257,"../internals/global":274,"../internals/inspect-source":281,"../internals/is-callable":285,"../internals/is-forced":287,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/well-known-symbol":357}],325:[function(g,C,i){var e=g("../internals/global");C.exports=e.Promise},{"../internals/global":274}],326:[function(g,C,i){var e=g("../internals/an-object"),A=g("../internals/is-object"),s=g("../internals/new-promise-capability");C.exports=function(l,n){if(e(l),A(n)&&n.constructor===l)return n;var a=s.f(l);return(0,a.resolve)(n),a.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(g,C,i){var e=g("../internals/promise-native-constructor"),A=g("../internals/check-correctness-of-iteration"),s=g("../internals/promise-constructor-detection").CONSTRUCTOR;C.exports=s||!A(function(l){e.all(l).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(g,C,i){var e=function(){this.head=null,this.tail=null};e.prototype={add:function(A){var s={item:A,next:null},l=this.tail;l?l.next=s:this.head=s,this.tail=s},get:function(){var A=this.head;if(A)return(this.head=A.next)===null&&(this.tail=null),A.item}},C.exports=e},{}],329:[function(g,C,i){var e=g("../internals/is-null-or-undefined"),A=TypeError;C.exports=function(s){if(e(s))throw new A("Can't call method on "+s);return s}},{"../internals/is-null-or-undefined":288}],330:[function(g,C,i){var e=g("../internals/get-built-in"),A=g("../internals/define-built-in-accessor"),s=g("../internals/well-known-symbol"),l=g("../internals/descriptors"),n=s("species");C.exports=function(a){var d=e(a);l&&d&&!d[n]&&A(d,n,{configurable:!0,get:function(){return this}})}},{"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],331:[function(g,C,i){var e=g("../internals/object-define-property").f,A=g("../internals/has-own-property"),s=g("../internals/well-known-symbol")("toStringTag");C.exports=function(l,n,a){l&&!a&&(l=l.prototype),l&&!A(l,s)&&e(l,s,{configurable:!0,value:n})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(g,C,i){var e=g("../internals/shared"),A=g("../internals/uid"),s=e("keys");C.exports=function(l){return s[l]||(s[l]=A(l))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/define-global-property"),s=e["__core-js_shared__"]||A("__core-js_shared__",{});C.exports=s},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(g,C,i){var e=g("../internals/is-pure"),A=g("../internals/shared-store");(C.exports=function(s,l){return A[s]||(A[s]=l!==void 0?l:{})})("versions",[]).push({version:"3.33.0",mode:e?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":290,"../internals/shared-store":333}],335:[function(g,C,i){var e=g("../internals/an-object"),A=g("../internals/a-constructor"),s=g("../internals/is-null-or-undefined"),l=g("../internals/well-known-symbol")("species");C.exports=function(n,a){var d,o=e(n).constructor;return o===void 0||s(d=e(o)[l])?a:A(d)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(g,C,i){var e=g("../internals/engine-v8-version"),A=g("../internals/fails"),s=g("../internals/global").String;C.exports=!!Object.getOwnPropertySymbols&&!A(function(){var l=Symbol("symbol detection");return!s(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&e&&e<41})},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(g,C,i){var e=g("../internals/function-call"),A=g("../internals/get-built-in"),s=g("../internals/well-known-symbol"),l=g("../internals/define-built-in");C.exports=function(){var n=A("Symbol"),a=n&&n.prototype,d=a&&a.valueOf,o=s("toPrimitive");a&&!a[o]&&l(a,o,function(c){return e(d,this)},{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(g,C,i){var e=g("../internals/symbol-constructor-detection");C.exports=e&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(g,C,i){var e,A,s,l,n=g("../internals/global"),a=g("../internals/function-apply"),d=g("../internals/function-bind-context"),o=g("../internals/is-callable"),c=g("../internals/has-own-property"),r=g("../internals/fails"),h=g("../internals/html"),b=g("../internals/array-slice"),u=g("../internals/document-create-element"),m=g("../internals/validate-arguments-length"),Z=g("../internals/engine-is-ios"),p=g("../internals/engine-is-node"),Y=n.setImmediate,R=n.clearImmediate,X=n.process,H=n.Dispatch,S=n.Function,z=n.MessageChannel,v=n.String,K=0,V={};r(function(){e=n.location});var N=function(W){if(c(V,W)){var y=V[W];delete V[W],y()}},B=function(W){return function(){N(W)}},G=function(W){N(W.data)},w=function(W){n.postMessage(v(W),e.protocol+"//"+e.host)};Y&&R||(Y=function(W){m(arguments.length,1);var y=o(W)?W:S(W),f=b(arguments,1);return V[++K]=function(){a(y,void 0,f)},A(K),K},R=function(W){delete V[W]},p?A=function(W){X.nextTick(B(W))}:H&&H.now?A=function(W){H.now(B(W))}:z&&!Z?(l=(s=new z).port2,s.port1.onmessage=G,A=d(l.postMessage,l)):n.addEventListener&&o(n.postMessage)&&!n.importScripts&&e&&e.protocol!=="file:"&&!r(w)?(A=w,n.addEventListener("message",G,!1)):A="onreadystatechange"in u("script")?function(W){h.appendChild(u("script")).onreadystatechange=function(){h.removeChild(this),N(W)}}:function(W){setTimeout(B(W),0)}),C.exports={set:Y,clear:R}},{"../internals/array-slice":231,"../internals/document-create-element":249,"../internals/engine-is-ios":253,"../internals/engine-is-node":254,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-bind-context":262,"../internals/global":274,"../internals/has-own-property":275,"../internals/html":278,"../internals/is-callable":285,"../internals/validate-arguments-length":353}],340:[function(g,C,i){var e=g("../internals/to-integer-or-infinity"),A=Math.max,s=Math.min;C.exports=function(l,n){var a=e(l);return a<0?A(a+n,0):s(a,n)}},{"../internals/to-integer-or-infinity":342}],341:[function(g,C,i){var e=g("../internals/indexed-object"),A=g("../internals/require-object-coercible");C.exports=function(s){return e(A(s))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(g,C,i){var e=g("../internals/math-trunc");C.exports=function(A){var s=+A;return s!=s||s===0?0:e(s)}},{"../internals/math-trunc":301}],343:[function(g,C,i){var e=g("../internals/to-integer-or-infinity"),A=Math.min;C.exports=function(s){return s>0?A(e(s),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(g,C,i){var e=g("../internals/require-object-coercible"),A=Object;C.exports=function(s){return A(e(s))}},{"../internals/require-object-coercible":329}],345:[function(g,C,i){var e=g("../internals/function-call"),A=g("../internals/is-object"),s=g("../internals/is-symbol"),l=g("../internals/get-method"),n=g("../internals/ordinary-to-primitive"),a=g("../internals/well-known-symbol"),d=TypeError,o=a("toPrimitive");C.exports=function(c,r){if(!A(c)||s(c))return c;var h,b=l(c,o);if(b){if(r===void 0&&(r="default"),h=e(b,c,r),!A(h)||s(h))return h;throw new d("Can't convert object to primitive value")}return r===void 0&&(r="number"),n(c,r)}},{"../internals/function-call":264,"../internals/get-method":273,"../internals/is-object":289,"../internals/is-symbol":292,"../internals/ordinary-to-primitive":320,"../internals/well-known-symbol":357}],346:[function(g,C,i){var e=g("../internals/to-primitive"),A=g("../internals/is-symbol");C.exports=function(s){var l=e(s,"string");return A(l)?l:l+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(g,C,i){var e={};e[g("../internals/well-known-symbol")("toStringTag")]="z",C.exports=String(e)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(g,C,i){var e=g("../internals/classof"),A=String;C.exports=function(s){if(e(s)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return A(s)}},{"../internals/classof":236}],349:[function(g,C,i){var e=String;C.exports=function(A){try{return e(A)}catch{return"Object"}}},{}],350:[function(g,C,i){var e=g("../internals/function-uncurry-this"),A=0,s=Math.random(),l=e(1 .toString);C.exports=function(n){return"Symbol("+(n===void 0?"":n)+")_"+l(++A+s,36)}},{"../internals/function-uncurry-this":268}],351:[function(g,C,i){var e=g("../internals/symbol-constructor-detection");C.exports=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(g,C,i){var e=g("../internals/descriptors"),A=g("../internals/fails");C.exports=e&&A(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(g,C,i){var e=TypeError;C.exports=function(A,s){if(A<s)throw new e("Not enough arguments");return A}},{}],354:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/is-callable"),s=e.WeakMap;C.exports=A(s)&&/native code/.test(String(s))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(g,C,i){var e=g("../internals/path"),A=g("../internals/has-own-property"),s=g("../internals/well-known-symbol-wrapped"),l=g("../internals/object-define-property").f;C.exports=function(n){var a=e.Symbol||(e.Symbol={});A(a,n)||l(a,n,{value:s.f(n)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(g,C,i){var e=g("../internals/well-known-symbol");i.f=e},{"../internals/well-known-symbol":357}],357:[function(g,C,i){var e=g("../internals/global"),A=g("../internals/shared"),s=g("../internals/has-own-property"),l=g("../internals/uid"),n=g("../internals/symbol-constructor-detection"),a=g("../internals/use-symbol-as-uid"),d=e.Symbol,o=A("wks"),c=a?d.for||d:d&&d.withoutSetter||l;C.exports=function(r){return s(o,r)||(o[r]=n&&s(d,r)?d[r]:c("Symbol."+r)),o[r]}},{"../internals/global":274,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-constructor-detection":336,"../internals/uid":350,"../internals/use-symbol-as-uid":351}],358:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/array-iteration").findIndex,s=g("../internals/add-to-unscopables"),l=!0;"findIndex"in[]&&Array(1).findIndex(function(){l=!1}),e({target:"Array",proto:!0,forced:l},{findIndex:function(n){return A(this,n,arguments.length>1?arguments[1]:void 0)}}),s("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/array-iteration").find,s=g("../internals/add-to-unscopables"),l=!0;"find"in[]&&Array(1).find(function(){l=!1}),e({target:"Array",proto:!0,forced:l},{find:function(n){return A(this,n,arguments.length>1?arguments[1]:void 0)}}),s("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/array-includes").includes,s=g("../internals/fails"),l=g("../internals/add-to-unscopables");e({target:"Array",proto:!0,forced:s(function(){return!Array(1).includes()})},{includes:function(n){return A(this,n,arguments.length>1?arguments[1]:void 0)}}),l("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(g,C,i){var e=g("../internals/to-indexed-object"),A=g("../internals/add-to-unscopables"),s=g("../internals/iterators"),l=g("../internals/internal-state"),n=g("../internals/object-define-property").f,a=g("../internals/iterator-define"),d=g("../internals/create-iter-result-object"),o=g("../internals/is-pure"),c=g("../internals/descriptors"),r=l.set,h=l.getterFor("Array Iterator");C.exports=a(Array,"Array",function(u,m){r(this,{type:"Array Iterator",target:e(u),index:0,kind:m})},function(){var u=h(this),m=u.target,Z=u.kind,p=u.index++;if(!m||p>=m.length)return u.target=void 0,d(void 0,!0);switch(Z){case"keys":return d(p,!1);case"values":return d(m[p],!1)}return d([p,m[p]],!1)},"values");var b=s.Arguments=s.Array;if(A("keys"),A("values"),A("entries"),!o&&c&&b.name!=="values")try{n(b,"name",{value:"values"})}catch{}},{"../internals/add-to-unscopables":225,"../internals/create-iter-result-object":240,"../internals/descriptors":247,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/iterator-define":296,"../internals/iterators":298,"../internals/object-define-property":308,"../internals/to-indexed-object":341}],362:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/get-built-in"),s=g("../internals/function-apply"),l=g("../internals/function-call"),n=g("../internals/function-uncurry-this"),a=g("../internals/fails"),d=g("../internals/is-callable"),o=g("../internals/is-symbol"),c=g("../internals/array-slice"),r=g("../internals/get-json-replacer-function"),h=g("../internals/symbol-constructor-detection"),b=String,u=A("JSON","stringify"),m=n(/./.exec),Z=n("".charAt),p=n("".charCodeAt),Y=n("".replace),R=n(1 .toString),X=/[\uD800-\uDFFF]/g,H=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,z=!h||a(function(){var N=A("Symbol")("stringify detection");return u([N])!=="[null]"||u({a:N})!=="{}"||u(Object(N))!=="{}"}),v=a(function(){return u("\uDF06\uD834")!=='"\\udf06\\ud834"'||u("\uDEAD")!=='"\\udead"'}),K=function(N,B){var G=c(arguments),w=r(B);if(d(w)||N!==void 0&&!o(N))return G[1]=function(W,y){if(d(w)&&(y=l(w,this,b(W),y)),!o(y))return y},s(u,null,G)},V=function(N,B,G){var w=Z(G,B-1),W=Z(G,B+1);return m(H,N)&&!m(S,W)||m(S,N)&&!m(H,w)?"\\u"+R(p(N,0),16):N};u&&e({target:"JSON",stat:!0,arity:3,forced:z||v},{stringify:function(N,B,G){var w=c(arguments),W=s(z?K:u,null,w);return v&&typeof W=="string"?Y(W,X,V):W}})},{"../internals/array-slice":231,"../internals/export":259,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/get-json-replacer-function":272,"../internals/is-callable":285,"../internals/is-symbol":292,"../internals/symbol-constructor-detection":336}],363:[function(g,C,i){g("../internals/export")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"../internals/export":259}],364:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/object-assign");e({target:"Object",stat:!0,arity:2,forced:Object.assign!==A},{assign:A})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/symbol-constructor-detection"),s=g("../internals/fails"),l=g("../internals/object-get-own-property-symbols"),n=g("../internals/to-object");e({target:"Object",stat:!0,forced:!A||s(function(){l.f(1)})},{getOwnPropertySymbols:function(a){var d=l.f;return d?d(n(a)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/to-object"),s=g("../internals/object-keys");e({target:"Object",stat:!0,forced:g("../internals/fails")(function(){s(1)})},{keys:function(l){return s(A(l))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/object-to-array").values;e({target:"Object",stat:!0},{values:function(s){return A(s)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/function-call"),s=g("../internals/a-callable"),l=g("../internals/new-promise-capability"),n=g("../internals/perform"),a=g("../internals/iterate");e({target:"Promise",stat:!0,forced:g("../internals/promise-statics-incorrect-iteration")},{all:function(d){var o=this,c=l.f(o),r=c.resolve,h=c.reject,b=n(function(){var u=s(o.resolve),m=[],Z=0,p=1;a(d,function(Y){var R=Z++,X=!1;p++,A(u,o,Y).then(function(H){X||(X=!0,m[R]=H,--p||r(m))},h)}),--p||r(m)});return b.error&&h(b.value),c.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],369:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/is-pure"),s=g("../internals/promise-constructor-detection").CONSTRUCTOR,l=g("../internals/promise-native-constructor"),n=g("../internals/get-built-in"),a=g("../internals/is-callable"),d=g("../internals/define-built-in"),o=l&&l.prototype;if(e({target:"Promise",proto:!0,forced:s,real:!0},{catch:function(r){return this.then(void 0,r)}}),!A&&a(l)){var c=n("Promise").prototype.catch;o.catch!==c&&d(o,"catch",c,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],370:[function(g,C,i){var e,A,s,l=g("../internals/export"),n=g("../internals/is-pure"),a=g("../internals/engine-is-node"),d=g("../internals/global"),o=g("../internals/function-call"),c=g("../internals/define-built-in"),r=g("../internals/object-set-prototype-of"),h=g("../internals/set-to-string-tag"),b=g("../internals/set-species"),u=g("../internals/a-callable"),m=g("../internals/is-callable"),Z=g("../internals/is-object"),p=g("../internals/an-instance"),Y=g("../internals/species-constructor"),R=g("../internals/task").set,X=g("../internals/microtask"),H=g("../internals/host-report-errors"),S=g("../internals/perform"),z=g("../internals/queue"),v=g("../internals/internal-state"),K=g("../internals/promise-native-constructor"),V=g("../internals/promise-constructor-detection"),N=g("../internals/new-promise-capability"),B=V.CONSTRUCTOR,G=V.REJECTION_EVENT,w=V.SUBCLASSING,W=v.getterFor("Promise"),y=v.set,f=K&&K.prototype,D=K,F=f,T=d.TypeError,Q=d.document,P=d.process,L=N.f,E=L,J=!!(Q&&Q.createEvent&&d.dispatchEvent),k=function(Ig){var ng;return!(!Z(Ig)||!m(ng=Ig.then))&&ng},j=function(Ig,ng){var ag,lg,cg,dg=ng.value,hg=ng.state===1,rg=hg?Ig.ok:Ig.fail,Wg=Ig.resolve,Gg=Ig.reject,Sg=Ig.domain;try{rg?(hg||(ng.rejection===2&&sg(ng),ng.rejection=1),rg===!0?ag=dg:(Sg&&Sg.enter(),ag=rg(dg),Sg&&(Sg.exit(),cg=!0)),ag===Ig.promise?Gg(new T("Promise-chain cycle")):(lg=k(ag))?o(lg,ag,Wg,Gg):Wg(ag)):Gg(dg)}catch(Kg){Sg&&!cg&&Sg.exit(),Gg(Kg)}},q=function(Ig,ng){Ig.notified||(Ig.notified=!0,X(function(){for(var ag,lg=Ig.reactions;ag=lg.get();)j(ag,Ig);Ig.notified=!1,ng&&!Ig.rejection&&Cg(Ig)}))},tg=function(Ig,ng,ag){var lg,cg;J?((lg=Q.createEvent("Event")).promise=ng,lg.reason=ag,lg.initEvent(Ig,!1,!0),d.dispatchEvent(lg)):lg={promise:ng,reason:ag},!G&&(cg=d["on"+Ig])?cg(lg):Ig==="unhandledrejection"&&H("Unhandled promise rejection",ag)},Cg=function(Ig){o(R,d,function(){var ng,ag=Ig.facade,lg=Ig.value;if(x(Ig)&&(ng=S(function(){a?P.emit("unhandledRejection",lg,ag):tg("unhandledrejection",ag,lg)}),Ig.rejection=a||x(Ig)?2:1,ng.error))throw ng.value})},x=function(Ig){return Ig.rejection!==1&&!Ig.parent},sg=function(Ig){o(R,d,function(){var ng=Ig.facade;a?P.emit("rejectionHandled",ng):tg("rejectionhandled",ng,Ig.value)})},Ag=function(Ig,ng,ag){return function(lg){Ig(ng,lg,ag)}},O=function(Ig,ng,ag){Ig.done||(Ig.done=!0,ag&&(Ig=ag),Ig.value=ng,Ig.state=2,q(Ig,!0))},_=function(Ig,ng,ag){if(!Ig.done){Ig.done=!0,ag&&(Ig=ag);try{if(Ig.facade===ng)throw new T("Promise can't be resolved itself");var lg=k(ng);lg?X(function(){var cg={done:!1};try{o(lg,ng,Ag(_,cg,Ig),Ag(O,cg,Ig))}catch(dg){O(cg,dg,Ig)}}):(Ig.value=ng,Ig.state=1,q(Ig,!1))}catch(cg){O({done:!1},cg,Ig)}}};if(B&&(F=(D=function(Ig){p(this,F),u(Ig),o(e,this);var ng=W(this);try{Ig(Ag(_,ng),Ag(O,ng))}catch(ag){O(ng,ag)}}).prototype,(e=function(Ig){y(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new z,rejection:!1,state:0,value:void 0})}).prototype=c(F,"then",function(Ig,ng){var ag=W(this),lg=L(Y(this,D));return ag.parent=!0,lg.ok=!m(Ig)||Ig,lg.fail=m(ng)&&ng,lg.domain=a?P.domain:void 0,ag.state===0?ag.reactions.add(lg):X(function(){j(lg,ag)}),lg.promise}),A=function(){var Ig=new e,ng=W(Ig);this.promise=Ig,this.resolve=Ag(_,ng),this.reject=Ag(O,ng)},N.f=L=function(Ig){return Ig===D||Ig===void 0?new A(Ig):E(Ig)},!n&&m(K)&&f!==Object.prototype)){s=f.then,w||c(f,"then",function(Ig,ng){var ag=this;return new D(function(lg,cg){o(s,ag,lg,cg)}).then(Ig,ng)},{unsafe:!0});try{delete f.constructor}catch{}r&&r(f,F)}l({global:!0,constructor:!0,wrap:!0,forced:B},{Promise:D}),h(D,"Promise",!1,!0),b("Promise")},{"../internals/a-callable":222,"../internals/an-instance":226,"../internals/define-built-in":245,"../internals/engine-is-node":254,"../internals/export":259,"../internals/function-call":264,"../internals/global":274,"../internals/host-report-errors":277,"../internals/internal-state":282,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/microtask":302,"../internals/new-promise-capability":303,"../internals/object-set-prototype-of":318,"../internals/perform":323,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/queue":328,"../internals/set-species":330,"../internals/set-to-string-tag":331,"../internals/species-constructor":335,"../internals/task":339}],371:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/is-pure"),s=g("../internals/promise-native-constructor"),l=g("../internals/fails"),n=g("../internals/get-built-in"),a=g("../internals/is-callable"),d=g("../internals/species-constructor"),o=g("../internals/promise-resolve"),c=g("../internals/define-built-in"),r=s&&s.prototype;if(e({target:"Promise",proto:!0,real:!0,forced:!!s&&l(function(){r.finally.call({then:function(){}},function(){})})},{finally:function(b){var u=d(this,n("Promise")),m=a(b);return this.then(m?function(Z){return o(u,b()).then(function(){return Z})}:b,m?function(Z){return o(u,b()).then(function(){throw Z})}:b)}}),!A&&a(s)){var h=n("Promise").prototype.finally;r.finally!==h&&c(r,"finally",h,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/fails":260,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326,"../internals/species-constructor":335}],372:[function(g,C,i){g("../modules/es.promise.constructor"),g("../modules/es.promise.all"),g("../modules/es.promise.catch"),g("../modules/es.promise.race"),g("../modules/es.promise.reject"),g("../modules/es.promise.resolve")},{"../modules/es.promise.all":368,"../modules/es.promise.catch":369,"../modules/es.promise.constructor":370,"../modules/es.promise.race":373,"../modules/es.promise.reject":374,"../modules/es.promise.resolve":375}],373:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/function-call"),s=g("../internals/a-callable"),l=g("../internals/new-promise-capability"),n=g("../internals/perform"),a=g("../internals/iterate");e({target:"Promise",stat:!0,forced:g("../internals/promise-statics-incorrect-iteration")},{race:function(d){var o=this,c=l.f(o),r=c.reject,h=n(function(){var b=s(o.resolve);a(d,function(u){A(b,o,u).then(c.resolve,r)})});return h.error&&r(h.value),c.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],374:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/function-call"),s=g("../internals/new-promise-capability");e({target:"Promise",stat:!0,forced:g("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(l){var n=s.f(this);return A(n.reject,void 0,l),n.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/get-built-in"),s=g("../internals/is-pure"),l=g("../internals/promise-native-constructor"),n=g("../internals/promise-constructor-detection").CONSTRUCTOR,a=g("../internals/promise-resolve"),d=A("Promise"),o=s&&!n;e({target:"Promise",stat:!0,forced:s||n},{resolve:function(c){return a(o&&this===d?l:this,c)}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326}],376:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/function-uncurry-this"),s=g("../internals/to-absolute-index"),l=RangeError,n=String.fromCharCode,a=String.fromCodePoint,d=A([].join);e({target:"String",stat:!0,arity:1,forced:!!a&&a.length!==1},{fromCodePoint:function(o){for(var c,r=[],h=arguments.length,b=0;h>b;){if(c=+arguments[b++],s(c,1114111)!==c)throw new l(c+" is not a valid code point");r[b]=c<65536?n(c):n(55296+((c-=65536)>>10),c%1024+56320)}return d(r,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/function-uncurry-this"),s=g("../internals/not-a-regexp"),l=g("../internals/require-object-coercible"),n=g("../internals/to-string"),a=g("../internals/correct-is-regexp-logic"),d=A("".indexOf);e({target:"String",proto:!0,forced:!a("includes")},{includes:function(o){return!!~d(n(l(this)),n(s(o)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":238,"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/not-a-regexp":304,"../internals/require-object-coercible":329,"../internals/to-string":348}],378:[function(g,C,i){g("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/global"),s=g("../internals/function-call"),l=g("../internals/function-uncurry-this"),n=g("../internals/is-pure"),a=g("../internals/descriptors"),d=g("../internals/symbol-constructor-detection"),o=g("../internals/fails"),c=g("../internals/has-own-property"),r=g("../internals/object-is-prototype-of"),h=g("../internals/an-object"),b=g("../internals/to-indexed-object"),u=g("../internals/to-property-key"),m=g("../internals/to-string"),Z=g("../internals/create-property-descriptor"),p=g("../internals/object-create"),Y=g("../internals/object-keys"),R=g("../internals/object-get-own-property-names"),X=g("../internals/object-get-own-property-names-external"),H=g("../internals/object-get-own-property-symbols"),S=g("../internals/object-get-own-property-descriptor"),z=g("../internals/object-define-property"),v=g("../internals/object-define-properties"),K=g("../internals/object-property-is-enumerable"),V=g("../internals/define-built-in"),N=g("../internals/define-built-in-accessor"),B=g("../internals/shared"),G=g("../internals/shared-key"),w=g("../internals/hidden-keys"),W=g("../internals/uid"),y=g("../internals/well-known-symbol"),f=g("../internals/well-known-symbol-wrapped"),D=g("../internals/well-known-symbol-define"),F=g("../internals/symbol-define-to-primitive"),T=g("../internals/set-to-string-tag"),Q=g("../internals/internal-state"),P=g("../internals/array-iteration").forEach,L=G("hidden"),E=Q.set,J=Q.getterFor("Symbol"),k=Object.prototype,j=A.Symbol,q=j&&j.prototype,tg=A.RangeError,Cg=A.TypeError,x=A.QObject,sg=S.f,Ag=z.f,O=X.f,_=K.f,Ig=l([].push),ng=B("symbols"),ag=B("op-symbols"),lg=B("wks"),cg=!x||!x.prototype||!x.prototype.findChild,dg=function(Vg,pg,Hg){var Jg=sg(k,pg);Jg&&delete k[pg],Ag(Vg,pg,Hg),Jg&&Vg!==k&&Ag(k,pg,Jg)},hg=a&&o(function(){return p(Ag({},"a",{get:function(){return Ag(this,"a",{value:7}).a}})).a!==7})?dg:Ag,rg=function(Vg,pg){var Hg=ng[Vg]=p(q);return E(Hg,{type:"Symbol",tag:Vg,description:pg}),a||(Hg.description=pg),Hg},Wg=function(Vg,pg,Hg){Vg===k&&Wg(ag,pg,Hg),h(Vg);var Jg=u(pg);return h(Hg),c(ng,Jg)?(Hg.enumerable?(c(Vg,L)&&Vg[L][Jg]&&(Vg[L][Jg]=!1),Hg=p(Hg,{enumerable:Z(0,!1)})):(c(Vg,L)||Ag(Vg,L,Z(1,{})),Vg[L][Jg]=!0),hg(Vg,Jg,Hg)):Ag(Vg,Jg,Hg)},Gg=function(Vg,pg){h(Vg);var Hg=b(pg),Jg=Y(Hg).concat(yg(Hg));return P(Jg,function(zg){a&&!s(Sg,Hg,zg)||Wg(Vg,zg,Hg[zg])}),Vg},Sg=function(Vg){var pg=u(Vg),Hg=s(_,this,pg);return!(this===k&&c(ng,pg)&&!c(ag,pg))&&(!(Hg||!c(this,pg)||!c(ng,pg)||c(this,L)&&this[L][pg])||Hg)},Kg=function(Vg,pg){var Hg=b(Vg),Jg=u(pg);if(Hg!==k||!c(ng,Jg)||c(ag,Jg)){var zg=sg(Hg,Jg);return!zg||!c(ng,Jg)||c(Hg,L)&&Hg[L][Jg]||(zg.enumerable=!0),zg}},kg=function(Vg){var pg=O(b(Vg)),Hg=[];return P(pg,function(Jg){c(ng,Jg)||c(w,Jg)||Ig(Hg,Jg)}),Hg},yg=function(Vg){var pg=Vg===k,Hg=O(pg?ag:b(Vg)),Jg=[];return P(Hg,function(zg){!c(ng,zg)||pg&&!c(k,zg)||Ig(Jg,ng[zg])}),Jg};d||(V(q=(j=function(){if(r(q,this))throw new Cg("Symbol is not a constructor");var Vg=arguments.length&&arguments[0]!==void 0?m(arguments[0]):void 0,pg=W(Vg),Hg=function(Jg){this===k&&s(Hg,ag,Jg),c(this,L)&&c(this[L],pg)&&(this[L][pg]=!1);var zg=Z(1,Jg);try{hg(this,pg,zg)}catch(aI){if(!(aI instanceof tg))throw aI;dg(this,pg,zg)}};return a&&cg&&hg(k,pg,{configurable:!0,set:Hg}),rg(pg,Vg)}).prototype,"toString",function(){return J(this).tag}),V(j,"withoutSetter",function(Vg){return rg(W(Vg),Vg)}),K.f=Sg,z.f=Wg,v.f=Gg,S.f=Kg,R.f=X.f=kg,H.f=yg,f.f=function(Vg){return rg(y(Vg),Vg)},a&&(N(q,"description",{configurable:!0,get:function(){return J(this).description}}),n||V(k,"propertyIsEnumerable",Sg,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:j}),P(Y(lg),function(Vg){D(Vg)}),e({target:"Symbol",stat:!0,forced:!d},{useSetter:function(){cg=!0},useSimple:function(){cg=!1}}),e({target:"Object",stat:!0,forced:!d,sham:!a},{create:function(Vg,pg){return pg===void 0?p(Vg):Gg(p(Vg),pg)},defineProperty:Wg,defineProperties:Gg,getOwnPropertyDescriptor:Kg}),e({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:kg}),F(),T(j,"Symbol"),w[L]=!0},{"../internals/an-object":227,"../internals/array-iteration":229,"../internals/create-property-descriptor":242,"../internals/define-built-in":245,"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/export":259,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-define-properties":307,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-names-external":310,"../internals/object-get-own-property-symbols":312,"../internals/object-is-prototype-of":314,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/set-to-string-tag":331,"../internals/shared":334,"../internals/shared-key":332,"../internals/symbol-constructor-detection":336,"../internals/symbol-define-to-primitive":337,"../internals/to-indexed-object":341,"../internals/to-property-key":346,"../internals/to-string":348,"../internals/uid":350,"../internals/well-known-symbol":357,"../internals/well-known-symbol-define":355,"../internals/well-known-symbol-wrapped":356}],380:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/get-built-in"),s=g("../internals/has-own-property"),l=g("../internals/to-string"),n=g("../internals/shared"),a=g("../internals/symbol-registry-detection"),d=n("string-to-symbol-registry"),o=n("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!a},{for:function(c){var r=l(c);if(s(d,r))return d[r];var h=A("Symbol")(r);return d[r]=h,o[h]=r,h}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/to-string":348}],381:[function(g,C,i){g("../modules/es.symbol.constructor"),g("../modules/es.symbol.for"),g("../modules/es.symbol.key-for"),g("../modules/es.json.stringify"),g("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":362,"../modules/es.object.get-own-property-symbols":365,"../modules/es.symbol.constructor":379,"../modules/es.symbol.for":380,"../modules/es.symbol.key-for":382}],382:[function(g,C,i){var e=g("../internals/export"),A=g("../internals/has-own-property"),s=g("../internals/is-symbol"),l=g("../internals/try-to-string"),n=g("../internals/shared"),a=g("../internals/symbol-registry-detection"),d=n("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!a},{keyFor:function(o){if(!s(o))throw new TypeError(l(o)+" is not a symbol");if(A(d,o))return d[o]}})},{"../internals/export":259,"../internals/has-own-property":275,"../internals/is-symbol":292,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/try-to-string":349}],383:[function(g,C,i){function e(A){return Object.prototype.toString.call(A)}i.isArray=function(A){return Array.isArray?Array.isArray(A):e(A)==="[object Array]"},i.isBoolean=function(A){return typeof A=="boolean"},i.isNull=function(A){return A===null},i.isNullOrUndefined=function(A){return A==null},i.isNumber=function(A){return typeof A=="number"},i.isString=function(A){return typeof A=="string"},i.isSymbol=function(A){return typeof A=="symbol"},i.isUndefined=function(A){return A===void 0},i.isRegExp=function(A){return e(A)==="[object RegExp]"},i.isObject=function(A){return typeof A=="object"&&A!==null},i.isDate=function(A){return e(A)==="[object Date]"},i.isError=function(A){return e(A)==="[object Error]"||A instanceof Error},i.isFunction=function(A){return typeof A=="function"},i.isPrimitive=function(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||A===void 0},i.isBuffer=g("buffer").Buffer.isBuffer},{buffer:220}],384:[function(g,C,i){(function(e){(function(){var A=g("elliptic"),s=g("bn.js");C.exports=function(d){return new n(d)};var l={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(d){this.curveType=l[d],this.curveType||(this.curveType={name:d}),this.curve=new A.ec(this.curveType.name),this.keys=void 0}function a(d,o,c){Array.isArray(d)||(d=d.toArray());var r=new e(d);if(c&&r.length<c){var h=new e(c-r.length);h.fill(0),r=e.concat([h,r])}return o?r.toString(o):r}l.p224=l.secp224r1,l.p256=l.secp256r1=l.prime256v1,l.p192=l.secp192r1=l.prime192v1,l.p384=l.secp384r1,l.p521=l.secp521r1,n.prototype.generateKeys=function(d,o){return this.keys=this.curve.genKeyPair(),this.getPublicKey(d,o)},n.prototype.computeSecret=function(d,o,c){return o=o||"utf8",e.isBuffer(d)||(d=new e(d,o)),a(this.curve.keyFromPublic(d).getPublic().mul(this.keys.getPrivate()).getX(),c,this.curveType.byteLength)},n.prototype.getPublicKey=function(d,o){var c=this.keys.getPublic(o==="compressed",!0);return o==="hybrid"&&(c[c.length-1]%2?c[0]=7:c[0]=6),a(c,d)},n.prototype.getPrivateKey=function(d){return a(this.keys.getPrivate(),d)},n.prototype.setPublicKey=function(d,o){return o=o||"utf8",e.isBuffer(d)||(d=new e(d,o)),this.keys._importPublic(d),this},n.prototype.setPrivateKey=function(d,o){o=o||"utf8",e.isBuffer(d)||(d=new e(d,o));var c=new s(d);return c=c.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(c),this}}).call(this)}).call(this,g("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(g,C,i){arguments[4][184][0].apply(i,arguments)},{buffer:188,dup:184}],386:[function(g,C,i){var e=g("inherits"),A=g("md5.js"),s=g("ripemd160"),l=g("sha.js"),n=g("cipher-base");function a(d){n.call(this,"digest"),this._hash=d}e(a,n),a.prototype._update=function(d){this._hash.update(d)},a.prototype._final=function(){return this._hash.digest()},C.exports=function(d){return(d=d.toLowerCase())==="md5"?new A:d==="rmd160"||d==="ripemd160"?new s:new a(l(d))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(g,C,i){var e=g("md5.js");C.exports=function(A){return new e().update(A).digest()}},{"md5.js":450}],388:[function(g,C,i){var e=g("inherits"),A=g("./legacy"),s=g("cipher-base"),l=g("safe-buffer").Buffer,n=g("create-hash/md5"),a=g("ripemd160"),d=g("sha.js"),o=l.alloc(128);function c(r,h){s.call(this,"digest"),typeof h=="string"&&(h=l.from(h));var b=r==="sha512"||r==="sha384"?128:64;this._alg=r,this._key=h,h.length>b?h=(r==="rmd160"?new a:d(r)).update(h).digest():h.length<b&&(h=l.concat([h,o],b));for(var u=this._ipad=l.allocUnsafe(b),m=this._opad=l.allocUnsafe(b),Z=0;Z<b;Z++)u[Z]=54^h[Z],m[Z]=92^h[Z];this._hash=r==="rmd160"?new a:d(r),this._hash.update(u)}e(c,s),c.prototype._update=function(r){this._hash.update(r)},c.prototype._final=function(){var r=this._hash.digest();return(this._alg==="rmd160"?new a:d(this._alg)).update(this._opad).update(r).digest()},C.exports=function(r,h){return(r=r.toLowerCase())==="rmd160"||r==="ripemd160"?new c("rmd160",h):r==="md5"?new A(n,h):new c(r,h)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(g,C,i){var e=g("inherits"),A=g("safe-buffer").Buffer,s=g("cipher-base"),l=A.alloc(128);function n(a,d){s.call(this,"digest"),typeof d=="string"&&(d=A.from(d)),this._alg=a,this._key=d,d.length>64?d=a(d):d.length<64&&(d=A.concat([d,l],64));for(var o=this._ipad=A.allocUnsafe(64),c=this._opad=A.allocUnsafe(64),r=0;r<64;r++)o[r]=54^d[r],c[r]=92^d[r];this._hash=[o]}e(n,s),n.prototype._update=function(a){this._hash.push(a)},n.prototype._final=function(){var a=this._alg(A.concat(this._hash));return this._alg(A.concat([this._opad,a]))},C.exports=n},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(g,C,i){i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=g("randombytes"),i.createHash=i.Hash=g("create-hash"),i.createHmac=i.Hmac=g("create-hmac");var e=g("browserify-sign/algos"),A=Object.keys(e),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(A);i.getHashes=function(){return s};var l=g("pbkdf2");i.pbkdf2=l.pbkdf2,i.pbkdf2Sync=l.pbkdf2Sync;var n=g("browserify-cipher");i.Cipher=n.Cipher,i.createCipher=n.createCipher,i.Cipheriv=n.Cipheriv,i.createCipheriv=n.createCipheriv,i.Decipher=n.Decipher,i.createDecipher=n.createDecipher,i.Decipheriv=n.Decipheriv,i.createDecipheriv=n.createDecipheriv,i.getCiphers=n.getCiphers,i.listCiphers=n.listCiphers;var a=g("diffie-hellman");i.DiffieHellmanGroup=a.DiffieHellmanGroup,i.createDiffieHellmanGroup=a.createDiffieHellmanGroup,i.getDiffieHellman=a.getDiffieHellman,i.createDiffieHellman=a.createDiffieHellman,i.DiffieHellman=a.DiffieHellman;var d=g("browserify-sign");i.createSign=d.createSign,i.Sign=d.Sign,i.createVerify=d.createVerify,i.Verify=d.Verify,i.createECDH=g("create-ecdh");var o=g("public-encrypt");i.publicEncrypt=o.publicEncrypt,i.privateEncrypt=o.privateEncrypt,i.publicDecrypt=o.publicDecrypt,i.privateDecrypt=o.privateDecrypt;var c=g("randomfill");i.randomFill=c.randomFill,i.randomFillSync=c.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))},i.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":206,"browserify-sign":213,"browserify-sign/algos":210,"create-ecdh":384,"create-hash":386,"create-hmac":388,"diffie-hellman":400,pbkdf2:460,"public-encrypt":468,randombytes:475,randomfill:476}],391:[function(g,C,i){(function(e,A){typeof i=="object"&&C!==void 0?C.exports=A():(e=typeof globalThis<"u"?globalThis:e||self).dayjs=A()})(void 0,function(){var e=6e4,A=36e5,s="millisecond",l="second",n="minute",a="hour",d="day",o="week",c="month",r="quarter",h="year",b="date",u="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var w=["th","st","nd","rd"],W=G%100;return"["+G+(w[(W-20)%10]||w[W]||w[0])+"]"}},Y=function(G,w,W){var y=String(G);return!y||y.length>=w?G:""+Array(w+1-y.length).join(W)+G},R={s:Y,z:function(G){var w=-G.utcOffset(),W=Math.abs(w),y=Math.floor(W/60),f=W%60;return(w<=0?"+":"-")+Y(y,2,"0")+":"+Y(f,2,"0")},m:function G(w,W){if(w.date()<W.date())return-G(W,w);var y=12*(W.year()-w.year())+(W.month()-w.month()),f=w.clone().add(y,c),D=W-f<0,F=w.clone().add(y+(D?-1:1),c);return+(-(y+(W-f)/(D?f-F:F-f))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:c,y:h,w:o,d,D:b,h:a,m:n,s:l,ms:s,Q:r}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},X="en",H={};H[X]=p;var S="$isDayjsObject",z=function(G){return G instanceof N||!(!G||!G[S])},v=function G(w,W,y){var f;if(!w)return X;if(typeof w=="string"){var D=w.toLowerCase();H[D]&&(f=D),W&&(H[D]=W,f=D);var F=w.split("-");if(!f&&F.length>1)return G(F[0])}else{var T=w.name;H[T]=w,f=T}return!y&&f&&(X=f),f||!y&&X},K=function(G,w){if(z(G))return G.clone();var W=typeof w=="object"?w:{};return W.date=G,W.args=arguments,new N(W)},V=R;V.l=v,V.i=z,V.w=function(G,w){return K(G,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var N=function(){function G(W){this.$L=v(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[S]=!0}var w=G.prototype;return w.parse=function(W){this.$d=function(y){var f=y.date,D=y.utc;if(f===null)return new Date(NaN);if(V.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var F=f.match(m);if(F){var T=F[2]-1||0,Q=(F[7]||"0").substring(0,3);return D?new Date(Date.UTC(F[1],T,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Q)):new Date(F[1],T,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Q)}}return new Date(f)}(W),this.init()},w.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},w.$utils=function(){return V},w.isValid=function(){return this.$d.toString()!==u},w.isSame=function(W,y){var f=K(W);return this.startOf(y)<=f&&f<=this.endOf(y)},w.isAfter=function(W,y){return K(W)<this.startOf(y)},w.isBefore=function(W,y){return this.endOf(y)<K(W)},w.$g=function(W,y,f){return V.u(W)?this[y]:this.set(f,W)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(W,y){var f=this,D=!!V.u(y)||y,F=V.p(W),T=function(q,tg){var Cg=V.w(f.$u?Date.UTC(f.$y,tg,q):new Date(f.$y,tg,q),f);return D?Cg:Cg.endOf(d)},Q=function(q,tg){return V.w(f.toDate()[q].apply(f.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(tg)),f)},P=this.$W,L=this.$M,E=this.$D,J="set"+(this.$u?"UTC":"");switch(F){case h:return D?T(1,0):T(31,11);case c:return D?T(1,L):T(0,L+1);case o:var k=this.$locale().weekStart||0,j=(P<k?P+7:P)-k;return T(D?E-j:E+(6-j),L);case d:case b:return Q(J+"Hours",0);case a:return Q(J+"Minutes",1);case n:return Q(J+"Seconds",2);case l:return Q(J+"Milliseconds",3);default:return this.clone()}},w.endOf=function(W){return this.startOf(W,!1)},w.$set=function(W,y){var f,D=V.p(W),F="set"+(this.$u?"UTC":""),T=(f={},f[d]=F+"Date",f[b]=F+"Date",f[c]=F+"Month",f[h]=F+"FullYear",f[a]=F+"Hours",f[n]=F+"Minutes",f[l]=F+"Seconds",f[s]=F+"Milliseconds",f)[D],Q=D===d?this.$D+(y-this.$W):y;if(D===c||D===h){var P=this.clone().set(b,1);P.$d[T](Q),P.init(),this.$d=P.set(b,Math.min(this.$D,P.daysInMonth())).$d}else T&&this.$d[T](Q);return this.init(),this},w.set=function(W,y){return this.clone().$set(W,y)},w.get=function(W){return this[V.p(W)]()},w.add=function(W,y){var f,D=this;W=Number(W);var F=V.p(y),T=function(L){var E=K(D);return V.w(E.date(E.date()+Math.round(L*W)),D)};if(F===c)return this.set(c,this.$M+W);if(F===h)return this.set(h,this.$y+W);if(F===d)return T(1);if(F===o)return T(7);var Q=(f={},f[n]=e,f[a]=A,f[l]=1e3,f)[F]||1,P=this.$d.getTime()+W*Q;return V.w(P,this)},w.subtract=function(W,y){return this.add(-1*W,y)},w.format=function(W){var y=this,f=this.$locale();if(!this.isValid())return f.invalidDate||u;var D=W||"YYYY-MM-DDTHH:mm:ssZ",F=V.z(this),T=this.$H,Q=this.$m,P=this.$M,L=f.weekdays,E=f.months,J=f.meridiem,k=function(tg,Cg,x,sg){return tg&&(tg[Cg]||tg(y,D))||x[Cg].slice(0,sg)},j=function(tg){return V.s(T%12||12,tg,"0")},q=J||function(tg,Cg,x){var sg=tg<12?"AM":"PM";return x?sg.toLowerCase():sg};return D.replace(Z,function(tg,Cg){return Cg||function(x){switch(x){case"YY":return String(y.$y).slice(-2);case"YYYY":return V.s(y.$y,4,"0");case"M":return P+1;case"MM":return V.s(P+1,2,"0");case"MMM":return k(f.monthsShort,P,E,3);case"MMMM":return k(E,P);case"D":return y.$D;case"DD":return V.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return k(f.weekdaysMin,y.$W,L,2);case"ddd":return k(f.weekdaysShort,y.$W,L,3);case"dddd":return L[y.$W];case"H":return String(T);case"HH":return V.s(T,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return q(T,Q,!0);case"A":return q(T,Q,!1);case"m":return String(Q);case"mm":return V.s(Q,2,"0");case"s":return String(y.$s);case"ss":return V.s(y.$s,2,"0");case"SSS":return V.s(y.$ms,3,"0");case"Z":return F}return null}(tg)||F.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(W,y,f){var D,F=this,T=V.p(y),Q=K(W),P=(Q.utcOffset()-this.utcOffset())*e,L=this-Q,E=function(){return V.m(F,Q)};switch(T){case h:D=E()/12;break;case c:D=E();break;case r:D=E()/3;break;case o:D=(L-P)/6048e5;break;case d:D=(L-P)/864e5;break;case a:D=L/A;break;case n:D=L/e;break;case l:D=L/1e3;break;default:D=L}return f?D:V.a(D)},w.daysInMonth=function(){return this.endOf(c).$D},w.$locale=function(){return H[this.$L]},w.locale=function(W,y){if(!W)return this.$L;var f=this.clone(),D=v(W,y,!0);return D&&(f.$L=D),f},w.clone=function(){return V.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},G}(),B=N.prototype;return K.prototype=B,[["$ms",s],["$s",l],["$m",n],["$H",a],["$W",d],["$M",c],["$y",h],["$D",b]].forEach(function(G){B[G[1]]=function(w){return this.$g(w,G[0],G[1])}}),K.extend=function(G,w){return G.$i||(G(w,N,K),G.$i=!0),K},K.locale=v,K.isDayjs=z,K.unix=function(G){return K(1e3*G)},K.en=H[X],K.Ls=H,K.p={},K})},{}],392:[function(g,C,i){(function(e,A){typeof i=="object"&&C!==void 0?C.exports=A():(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=A()})(void 0,function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},A=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,l=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,a={},d=function(m){return(m=+m)+(m>68?1900:2e3)},o=function(m){return function(Z){this[m]=+Z}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(Z){if(!Z||Z==="Z")return 0;var p=Z.match(/([+-]|\d\d)/g),Y=60*p[1]+(+p[2]||0);return Y===0?0:p[0]==="+"?-Y:Y}(m)}],r=function(m){var Z=a[m];return Z&&(Z.indexOf?Z:Z.s.concat(Z.f))},h=function(m,Z){var p,Y=a.meridiem;if(Y){for(var R=1;R<=24;R+=1)if(m.indexOf(Y(R,0,Z))>-1){p=R>12;break}}else p=m===(Z?"pm":"PM");return p},b={A:[n,function(m){this.afternoon=h(m,!1)}],a:[n,function(m){this.afternoon=h(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[s,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[l,o("seconds")],ss:[l,o("seconds")],m:[l,o("minutes")],mm:[l,o("minutes")],H:[l,o("hours")],h:[l,o("hours")],HH:[l,o("hours")],hh:[l,o("hours")],D:[l,o("day")],DD:[s,o("day")],Do:[n,function(m){var Z=a.ordinal,p=m.match(/\d+/);if(this.day=p[0],Z)for(var Y=1;Y<=31;Y+=1)Z(Y).replace(/\[|\]/g,"")===m&&(this.day=Y)}],M:[l,o("month")],MM:[s,o("month")],MMM:[n,function(m){var Z=r("months"),p=(r("monthsShort")||Z.map(function(Y){return Y.slice(0,3)})).indexOf(m)+1;if(p<1)throw new Error;this.month=p%12||p}],MMMM:[n,function(m){var Z=r("months").indexOf(m)+1;if(Z<1)throw new Error;this.month=Z%12||Z}],Y:[/[+-]?\d+/,o("year")],YY:[s,function(m){this.year=d(m)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function u(m){var Z,p;Z=m,p=a&&a.formats;for(var Y=(m=Z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(K,V,N){var B=N&&N.toUpperCase();return V||p[N]||e[N]||p[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(G,w,W){return w||W.slice(1)})})).match(A),R=Y.length,X=0;X<R;X+=1){var H=Y[X],S=b[H],z=S&&S[0],v=S&&S[1];Y[X]=v?{regex:z,parser:v}:H.replace(/^\[|\]$/g,"")}return function(K){for(var V={},N=0,B=0;N<R;N+=1){var G=Y[N];if(typeof G=="string")B+=G.length;else{var w=G.regex,W=G.parser,y=K.slice(B),f=w.exec(y)[0];W.call(V,f),K=K.replace(f,"")}}return function(D){var F=D.afternoon;if(F!==void 0){var T=D.hours;F?T<12&&(D.hours+=12):T===12&&(D.hours=0),delete D.afternoon}}(V),V}}return function(m,Z,p){p.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(d=m.parseTwoDigitYear);var Y=Z.prototype,R=Y.parse;Y.parse=function(X){var H=X.date,S=X.utc,z=X.args;this.$u=S;var v=z[1];if(typeof v=="string"){var K=z[2]===!0,V=z[3]===!0,N=K||V,B=z[2];V&&(B=z[2]),a=this.$locale(),!K&&B&&(a=p.Ls[B]),this.$d=function(y,f,D){try{if(["x","X"].indexOf(f)>-1)return new Date((f==="X"?1e3:1)*y);var F=u(f)(y),T=F.year,Q=F.month,P=F.day,L=F.hours,E=F.minutes,J=F.seconds,k=F.milliseconds,j=F.zone,q=new Date,tg=P||(T||Q?1:q.getDate()),Cg=T||q.getFullYear(),x=0;T&&!Q||(x=Q>0?Q-1:q.getMonth());var sg=L||0,Ag=E||0,O=J||0,_=k||0;return j?new Date(Date.UTC(Cg,x,tg,sg,Ag,O,_+60*j.offset*1e3)):D?new Date(Date.UTC(Cg,x,tg,sg,Ag,O,_)):new Date(Cg,x,tg,sg,Ag,O,_)}catch{return new Date("")}}(H,v,S),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),N&&H!=this.format(v)&&(this.$d=new Date("")),a={}}else if(v instanceof Array)for(var G=v.length,w=1;w<=G;w+=1){z[1]=v[w-1];var W=p.apply(this,z);if(W.isValid()){this.$d=W.$d,this.$L=W.$L,this.init();break}w===G&&(this.$d=new Date(""))}else R.call(this,X)}}})},{}],393:[function(g,C,i){(function(e,A){typeof i=="object"&&C!==void 0?C.exports=A():(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=A()})(void 0,function(){var e="minute",A=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(l,n,a){var d=n.prototype;a.utc=function(m){var Z={date:m,utc:!0,args:arguments};return new n(Z)},d.utc=function(m){var Z=a(this.toDate(),{locale:this.$L,utc:!0});return m?Z.add(this.utcOffset(),e):Z},d.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var o=d.parse;d.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),o.call(this,m)};var c=d.init;d.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else c.call(this)};var r=d.utcOffset;d.utcOffset=function(m,Z){var p=this.$utils().u;if(p(m))return this.$u?0:p(this.$offset)?r.call(this):this.$offset;if(typeof m=="string"&&(m=function(H){H===void 0&&(H="");var S=H.match(A);if(!S)return null;var z=(""+S[0]).match(s)||["-",0,0],v=z[0],K=60*+z[1]+ +z[2];return K===0?0:v==="+"?K:-K}(m))===null)return this;var Y=Math.abs(m)<=16?60*m:m,R=this;if(Z)return R.$offset=Y,R.$u=m===0,R;if(m!==0){var X=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(R=this.local().add(Y+X,e)).$offset=Y,R.$x.$localOffset=X}else R=this.utc();return R};var h=d.format;d.format=function(m){var Z=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,Z)},d.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var b=d.toDate;d.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():b.call(this)};var u=d.diff;d.diff=function(m,Z,p){if(m&&this.$u===m.$u)return u.call(this,m,Z,p);var Y=this.local(),R=a(m).local();return u.call(Y,R,Z,p)}}})},{}],394:[function(g,C,i){i.utils=g("./des/utils"),i.Cipher=g("./des/cipher"),i.DES=g("./des/des"),i.CBC=g("./des/cbc"),i.EDE=g("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(g,C,i){var e=g("minimalistic-assert"),A=g("inherits"),s={};function l(n){e.equal(n.length,8,"Invalid IV length"),this.iv=new Array(8);for(var a=0;a<this.iv.length;a++)this.iv[a]=n[a]}i.instantiate=function(n){function a(r){n.call(this,r),this._cbcInit()}A(a,n);for(var d=Object.keys(s),o=0;o<d.length;o++){var c=d[o];a.prototype[c]=s[c]}return a.create=function(r){return new a(r)},a},s._cbcInit=function(){var n=new l(this.options.iv);this._cbcState=n},s._update=function(n,a,d,o){var c=this._cbcState,r=this.constructor.super_.prototype,h=c.iv;if(this.type==="encrypt"){for(var b=0;b<this.blockSize;b++)h[b]^=n[a+b];for(r._update.call(this,h,0,d,o),b=0;b<this.blockSize;b++)h[b]=d[o+b]}else{for(r._update.call(this,n,a,d,o),b=0;b<this.blockSize;b++)d[o+b]^=h[b];for(b=0;b<this.blockSize;b++)h[b]=n[a+b]}}},{inherits:440,"minimalistic-assert":453}],396:[function(g,C,i){var e=g("minimalistic-assert");function A(s){this.options=s,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=s.padding!==!1}C.exports=A,A.prototype._init=function(){},A.prototype.update=function(s){return s.length===0?[]:this.type==="decrypt"?this._updateDecrypt(s):this._updateEncrypt(s)},A.prototype._buffer=function(s,l){for(var n=Math.min(this.buffer.length-this.bufferOff,s.length-l),a=0;a<n;a++)this.buffer[this.bufferOff+a]=s[l+a];return this.bufferOff+=n,n},A.prototype._flushBuffer=function(s,l){return this._update(this.buffer,0,s,l),this.bufferOff=0,this.blockSize},A.prototype._updateEncrypt=function(s){var l=0,n=0,a=(this.bufferOff+s.length)/this.blockSize|0,d=new Array(a*this.blockSize);this.bufferOff!==0&&(l+=this._buffer(s,l),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(d,n)));for(var o=s.length-(s.length-l)%this.blockSize;l<o;l+=this.blockSize)this._update(s,l,d,n),n+=this.blockSize;for(;l<s.length;l++,this.bufferOff++)this.buffer[this.bufferOff]=s[l];return d},A.prototype._updateDecrypt=function(s){for(var l=0,n=0,a=Math.ceil((this.bufferOff+s.length)/this.blockSize)-1,d=new Array(a*this.blockSize);a>0;a--)l+=this._buffer(s,l),n+=this._flushBuffer(d,n);return l+=this._buffer(s,l),d},A.prototype.final=function(s){var l,n;return s&&(l=this.update(s)),n=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),l?l.concat(n):n},A.prototype._pad=function(s,l){if(l===0)return!1;for(;l<s.length;)s[l++]=0;return!0},A.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var s=new Array(this.blockSize);return this._update(this.buffer,0,s,0),s},A.prototype._unpad=function(s){return s},A.prototype._finalDecrypt=function(){e.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var s=new Array(this.blockSize);return this._flushBuffer(s,0),this._unpad(s)}},{"minimalistic-assert":453}],397:[function(g,C,i){var e=g("minimalistic-assert"),A=g("inherits"),s=g("./utils"),l=g("./cipher");function n(){this.tmp=new Array(2),this.keys=null}function a(o){l.call(this,o);var c=new n;this._desState=c,this.deriveKeys(c,o.key)}A(a,l),C.exports=a,a.create=function(o){return new a(o)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];a.prototype.deriveKeys=function(o,c){o.keys=new Array(32),e.equal(c.length,this.blockSize,"Invalid key length");var r=s.readUInt32BE(c,0),h=s.readUInt32BE(c,4);s.pc1(r,h,o.tmp,0),r=o.tmp[0],h=o.tmp[1];for(var b=0;b<o.keys.length;b+=2){var u=d[b>>>1];r=s.r28shl(r,u),h=s.r28shl(h,u),s.pc2(r,h,o.keys,b)}},a.prototype._update=function(o,c,r,h){var b=this._desState,u=s.readUInt32BE(o,c),m=s.readUInt32BE(o,c+4);s.ip(u,m,b.tmp,0),u=b.tmp[0],m=b.tmp[1],this.type==="encrypt"?this._encrypt(b,u,m,b.tmp,0):this._decrypt(b,u,m,b.tmp,0),u=b.tmp[0],m=b.tmp[1],s.writeUInt32BE(r,u,h),s.writeUInt32BE(r,m,h+4)},a.prototype._pad=function(o,c){if(this.padding===!1)return!1;for(var r=o.length-c,h=c;h<o.length;h++)o[h]=r;return!0},a.prototype._unpad=function(o){if(this.padding===!1)return o;for(var c=o[o.length-1],r=o.length-c;r<o.length;r++)e.equal(o[r],c);return o.slice(0,o.length-c)},a.prototype._encrypt=function(o,c,r,h,b){for(var u=c,m=r,Z=0;Z<o.keys.length;Z+=2){var p=o.keys[Z],Y=o.keys[Z+1];s.expand(m,o.tmp,0),p^=o.tmp[0],Y^=o.tmp[1];var R=s.substitute(p,Y),X=m;m=(u^s.permute(R))>>>0,u=X}s.rip(m,u,h,b)},a.prototype._decrypt=function(o,c,r,h,b){for(var u=r,m=c,Z=o.keys.length-2;Z>=0;Z-=2){var p=o.keys[Z],Y=o.keys[Z+1];s.expand(u,o.tmp,0),p^=o.tmp[0],Y^=o.tmp[1];var R=s.substitute(p,Y),X=u;u=(m^s.permute(R))>>>0,m=X}s.rip(u,m,h,b)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(g,C,i){var e=g("minimalistic-assert"),A=g("inherits"),s=g("./cipher"),l=g("./des");function n(d,o){e.equal(o.length,24,"Invalid key length");var c=o.slice(0,8),r=o.slice(8,16),h=o.slice(16,24);this.ciphers=d==="encrypt"?[l.create({type:"encrypt",key:c}),l.create({type:"decrypt",key:r}),l.create({type:"encrypt",key:h})]:[l.create({type:"decrypt",key:h}),l.create({type:"encrypt",key:r}),l.create({type:"decrypt",key:c})]}function a(d){s.call(this,d);var o=new n(this.type,this.options.key);this._edeState=o}A(a,s),C.exports=a,a.create=function(d){return new a(d)},a.prototype._update=function(d,o,c,r){var h=this._edeState;h.ciphers[0]._update(d,o,c,r),h.ciphers[1]._update(c,r,c,r),h.ciphers[2]._update(c,r,c,r)},a.prototype._pad=l.prototype._pad,a.prototype._unpad=l.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(g,C,i){i.readUInt32BE=function(l,n){return(l[0+n]<<24|l[1+n]<<16|l[2+n]<<8|l[3+n])>>>0},i.writeUInt32BE=function(l,n,a){l[0+a]=n>>>24,l[1+a]=n>>>16&255,l[2+a]=n>>>8&255,l[3+a]=255&n},i.ip=function(l,n,a,d){for(var o=0,c=0,r=6;r>=0;r-=2){for(var h=0;h<=24;h+=8)o<<=1,o|=n>>>h+r&1;for(h=0;h<=24;h+=8)o<<=1,o|=l>>>h+r&1}for(r=6;r>=0;r-=2){for(h=1;h<=25;h+=8)c<<=1,c|=n>>>h+r&1;for(h=1;h<=25;h+=8)c<<=1,c|=l>>>h+r&1}a[d+0]=o>>>0,a[d+1]=c>>>0},i.rip=function(l,n,a,d){for(var o=0,c=0,r=0;r<4;r++)for(var h=24;h>=0;h-=8)o<<=1,o|=n>>>h+r&1,o<<=1,o|=l>>>h+r&1;for(r=4;r<8;r++)for(h=24;h>=0;h-=8)c<<=1,c|=n>>>h+r&1,c<<=1,c|=l>>>h+r&1;a[d+0]=o>>>0,a[d+1]=c>>>0},i.pc1=function(l,n,a,d){for(var o=0,c=0,r=7;r>=5;r--){for(var h=0;h<=24;h+=8)o<<=1,o|=n>>h+r&1;for(h=0;h<=24;h+=8)o<<=1,o|=l>>h+r&1}for(h=0;h<=24;h+=8)o<<=1,o|=n>>h+r&1;for(r=1;r<=3;r++){for(h=0;h<=24;h+=8)c<<=1,c|=n>>h+r&1;for(h=0;h<=24;h+=8)c<<=1,c|=l>>h+r&1}for(h=0;h<=24;h+=8)c<<=1,c|=l>>h+r&1;a[d+0]=o>>>0,a[d+1]=c>>>0},i.r28shl=function(l,n){return l<<n&268435455|l>>>28-n};var e=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(l,n,a,d){for(var o=0,c=0,r=e.length>>>1,h=0;h<r;h++)o<<=1,o|=l>>>e[h]&1;for(h=r;h<e.length;h++)c<<=1,c|=n>>>e[h]&1;a[d+0]=o>>>0,a[d+1]=c>>>0},i.expand=function(l,n,a){var d=0,o=0;d=(1&l)<<5|l>>>27;for(var c=23;c>=15;c-=4)d<<=6,d|=l>>>c&63;for(c=11;c>=3;c-=4)o|=l>>>c&63,o<<=6;o|=(31&l)<<1|l>>>31,n[a+0]=d>>>0,n[a+1]=o>>>0};var A=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];i.substitute=function(l,n){for(var a=0,d=0;d<4;d++)a<<=4,a|=A[64*d+(l>>>18-6*d&63)];for(d=0;d<4;d++)a<<=4,a|=A[256+64*d+(n>>>18-6*d&63)];return a>>>0};var s=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];i.permute=function(l){for(var n=0,a=0;a<s.length;a++)n<<=1,n|=l>>>s[a]&1;return n>>>0},i.padSplit=function(l,n,a){for(var d=l.toString(2);d.length<n;)d="0"+d;for(var o=[],c=0;c<n;c+=a)o.push(d.slice(c,c+a));return o.join(" ")}},{}],400:[function(g,C,i){(function(e){(function(){var A=g("./lib/generatePrime"),s=g("./lib/primes.json"),l=g("./lib/dh"),n={binary:!0,hex:!0,base64:!0};i.DiffieHellmanGroup=i.createDiffieHellmanGroup=i.getDiffieHellman=function(a){var d=new e(s[a].prime,"hex"),o=new e(s[a].gen,"hex");return new l(d,o)},i.createDiffieHellman=i.DiffieHellman=function a(d,o,c,r){return e.isBuffer(o)||n[o]===void 0?a(d,"binary",o,c):(o=o||"binary",r=r||"binary",c=c||new e([2]),e.isBuffer(c)||(c=new e(c,r)),typeof d=="number"?new l(A(d,c),c,!0):(e.isBuffer(d)||(d=new e(d,o)),new l(d,c,!0)))}}).call(this)}).call(this,g("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(g,C,i){(function(e){(function(){var A=g("bn.js"),s=new(g("miller-rabin")),l=new A(24),n=new A(11),a=new A(10),d=new A(3),o=new A(7),c=g("./generatePrime"),r=g("randombytes");function h(p,Y){return Y=Y||"utf8",e.isBuffer(p)||(p=new e(p,Y)),this._pub=new A(p),this}function b(p,Y){return Y=Y||"utf8",e.isBuffer(p)||(p=new e(p,Y)),this._priv=new A(p),this}C.exports=m;var u={};function m(p,Y,R){this.setGenerator(Y),this.__prime=new A(p),this._prime=A.mont(this.__prime),this._primeLen=p.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,R?(this.setPublicKey=h,this.setPrivateKey=b):this._primeCode=8}function Z(p,Y){var R=new e(p.toArray());return Y?R.toString(Y):R}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=function(p,Y){var R=Y.toString("hex"),X=[R,p.toString(16)].join("_");if(X in u)return u[X];var H,S=0;if(p.isEven()||!c.simpleSieve||!c.fermatTest(p)||!s.test(p))return S+=1,S+=R==="02"||R==="05"?8:4,u[X]=S,S;switch(s.test(p.shrn(1))||(S+=2),R){case"02":p.mod(l).cmp(n)&&(S+=8);break;case"05":(H=p.mod(a)).cmp(d)&&H.cmp(o)&&(S+=8);break;default:S+=4}return u[X]=S,S}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new A(r(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(p){var Y=(p=(p=new A(p)).toRed(this._prime)).redPow(this._priv).fromRed(),R=new e(Y.toArray()),X=this.getPrime();if(R.length<X.length){var H=new e(X.length-R.length);H.fill(0),R=e.concat([H,R])}return R},m.prototype.getPublicKey=function(p){return Z(this._pub,p)},m.prototype.getPrivateKey=function(p){return Z(this._priv,p)},m.prototype.getPrime=function(p){return Z(this.__prime,p)},m.prototype.getGenerator=function(p){return Z(this._gen,p)},m.prototype.setGenerator=function(p,Y){return Y=Y||"utf8",e.isBuffer(p)||(p=new e(p,Y)),this.__gen=p,this._gen=new A(p),this}}).call(this)}).call(this,g("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(g,C,i){var e=g("randombytes");C.exports=p,p.simpleSieve=m,p.fermatTest=Z;var A=g("bn.js"),s=new A(24),l=new(g("miller-rabin")),n=new A(1),a=new A(2),d=new A(5),o=(new A(16),new A(8),new A(10)),c=new A(3),r=(new A(7),new A(11)),h=new A(4),b=(new A(12),null);function u(){if(b!==null)return b;var Y=[];Y[0]=2;for(var R=1,X=3;X<1048576;X+=2){for(var H=Math.ceil(Math.sqrt(X)),S=0;S<R&&Y[S]<=H&&X%Y[S]!=0;S++);R!==S&&Y[S]<=H||(Y[R++]=X)}return b=Y,Y}function m(Y){for(var R=u(),X=0;X<R.length;X++)if(Y.modn(R[X])===0)return Y.cmpn(R[X])===0;return!0}function Z(Y){var R=A.mont(Y);return a.toRed(R).redPow(Y.subn(1)).fromRed().cmpn(1)===0}function p(Y,R){if(Y<16)return new A(R===2||R===5?[140,123]:[140,39]);var X,H;for(R=new A(R);;){for(X=new A(e(Math.ceil(Y/8)));X.bitLength()>Y;)X.ishrn(1);if(X.isEven()&&X.iadd(n),X.testn(1)||X.iadd(a),R.cmp(a)){if(!R.cmp(d))for(;X.mod(o).cmp(c);)X.iadd(h)}else for(;X.mod(s).cmp(r);)X.iadd(h);if(m(H=X.shrn(1))&&m(X)&&Z(H)&&Z(X)&&l.test(H)&&l.test(X))return X}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(g,C,i){C.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],404:[function(g,C,i){arguments[4][184][0].apply(i,arguments)},{buffer:188,dup:184}],405:[function(g,C,i){var e=i;e.version=g("../package.json").version,e.utils=g("./elliptic/utils"),e.rand=g("brorand"),e.curve=g("./elliptic/curve"),e.curves=g("./elliptic/curves"),e.ec=g("./elliptic/ec"),e.eddsa=g("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(g,C,i){var e=g("bn.js"),A=g("../utils"),s=A.getNAF,l=A.getJSF,n=A.assert;function a(o,c){this.type=o,this.p=new e(c.p,16),this.red=c.prime?e.red(c.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=c.n&&new e(c.n,16),this.g=c.g&&this.pointFromJSON(c.g,c.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function d(o,c){this.curve=o,this.type=c,this.precomputed=null}C.exports=a,a.prototype.point=function(){throw new Error("Not implemented")},a.prototype.validate=function(){throw new Error("Not implemented")},a.prototype._fixedNafMul=function(o,c){n(o.precomputed);var r=o._getDoubles(),h=s(c,1,this._bitLength),b=(1<<r.step+1)-(r.step%2==0?2:1);b/=3;var u,m,Z=[];for(u=0;u<h.length;u+=r.step){m=0;for(var p=u+r.step-1;p>=u;p--)m=(m<<1)+h[p];Z.push(m)}for(var Y=this.jpoint(null,null,null),R=this.jpoint(null,null,null),X=b;X>0;X--){for(u=0;u<Z.length;u++)(m=Z[u])===X?R=R.mixedAdd(r.points[u]):m===-X&&(R=R.mixedAdd(r.points[u].neg()));Y=Y.add(R)}return Y.toP()},a.prototype._wnafMul=function(o,c){var r=4,h=o._getNAFPoints(r);r=h.wnd;for(var b=h.points,u=s(c,r,this._bitLength),m=this.jpoint(null,null,null),Z=u.length-1;Z>=0;Z--){for(var p=0;Z>=0&&u[Z]===0;Z--)p++;if(Z>=0&&p++,m=m.dblp(p),Z<0)break;var Y=u[Z];n(Y!==0),m=o.type==="affine"?Y>0?m.mixedAdd(b[Y-1>>1]):m.mixedAdd(b[-Y-1>>1].neg()):Y>0?m.add(b[Y-1>>1]):m.add(b[-Y-1>>1].neg())}return o.type==="affine"?m.toP():m},a.prototype._wnafMulAdd=function(o,c,r,h,b){var u,m,Z,p=this._wnafT1,Y=this._wnafT2,R=this._wnafT3,X=0;for(u=0;u<h;u++){var H=(Z=c[u])._getNAFPoints(o);p[u]=H.wnd,Y[u]=H.points}for(u=h-1;u>=1;u-=2){var S=u-1,z=u;if(p[S]===1&&p[z]===1){var v=[c[S],null,null,c[z]];c[S].y.cmp(c[z].y)===0?(v[1]=c[S].add(c[z]),v[2]=c[S].toJ().mixedAdd(c[z].neg())):c[S].y.cmp(c[z].y.redNeg())===0?(v[1]=c[S].toJ().mixedAdd(c[z]),v[2]=c[S].add(c[z].neg())):(v[1]=c[S].toJ().mixedAdd(c[z]),v[2]=c[S].toJ().mixedAdd(c[z].neg()));var K=[-3,-1,-5,-7,0,7,5,1,3],V=l(r[S],r[z]);for(X=Math.max(V[0].length,X),R[S]=new Array(X),R[z]=new Array(X),m=0;m<X;m++){var N=0|V[0][m],B=0|V[1][m];R[S][m]=K[3*(N+1)+(B+1)],R[z][m]=0,Y[S]=v}}else R[S]=s(r[S],p[S],this._bitLength),R[z]=s(r[z],p[z],this._bitLength),X=Math.max(R[S].length,X),X=Math.max(R[z].length,X)}var G=this.jpoint(null,null,null),w=this._wnafT4;for(u=X;u>=0;u--){for(var W=0;u>=0;){var y=!0;for(m=0;m<h;m++)w[m]=0|R[m][u],w[m]!==0&&(y=!1);if(!y)break;W++,u--}if(u>=0&&W++,G=G.dblp(W),u<0)break;for(m=0;m<h;m++){var f=w[m];f!==0&&(f>0?Z=Y[m][f-1>>1]:f<0&&(Z=Y[m][-f-1>>1].neg()),G=Z.type==="affine"?G.mixedAdd(Z):G.add(Z))}}for(u=0;u<h;u++)Y[u]=null;return b?G:G.toP()},a.BasePoint=d,d.prototype.eq=function(){throw new Error("Not implemented")},d.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(o,c){o=A.toArray(o,c);var r=this.p.byteLength();if((o[0]===4||o[0]===6||o[0]===7)&&o.length-1==2*r)return o[0]===6?n(o[o.length-1]%2==0):o[0]===7&&n(o[o.length-1]%2==1),this.point(o.slice(1,1+r),o.slice(1+r,1+2*r));if((o[0]===2||o[0]===3)&&o.length-1===r)return this.pointFromX(o.slice(1,1+r),o[0]===3);throw new Error("Unknown point format")},d.prototype.encodeCompressed=function(o){return this.encode(o,!0)},d.prototype._encode=function(o){var c=this.curve.p.byteLength(),r=this.getX().toArray("be",c);return o?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",c))},d.prototype.encode=function(o,c){return A.encode(this._encode(c),o)},d.prototype.precompute=function(o){if(this.precomputed)return this;var c={doubles:null,naf:null,beta:null};return c.naf=this._getNAFPoints(8),c.doubles=this._getDoubles(4,o),c.beta=this._getBeta(),this.precomputed=c,this},d.prototype._hasDoubles=function(o){if(!this.precomputed)return!1;var c=this.precomputed.doubles;return!!c&&c.points.length>=Math.ceil((o.bitLength()+1)/c.step)},d.prototype._getDoubles=function(o,c){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],h=this,b=0;b<c;b+=o){for(var u=0;u<o;u++)h=h.dbl();r.push(h)}return{step:o,points:r}},d.prototype._getNAFPoints=function(o){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var c=[this],r=(1<<o)-1,h=r===1?null:this.dbl(),b=1;b<r;b++)c[b]=c[b-1].add(h);return{wnd:o,points:c}},d.prototype._getBeta=function(){return null},d.prototype.dblp=function(o){for(var c=this,r=0;r<o;r++)c=c.dbl();return c}},{"../utils":419,"bn.js":420}],407:[function(g,C,i){var e=g("../utils"),A=g("bn.js"),s=g("inherits"),l=g("./base"),n=e.assert;function a(o){this.twisted=(0|o.a)!=1,this.mOneA=this.twisted&&(0|o.a)==-1,this.extended=this.mOneA,l.call(this,"edwards",o),this.a=new A(o.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new A(o.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new A(o.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|o.c)==1}function d(o,c,r,h,b){l.BasePoint.call(this,o,"projective"),c===null&&r===null&&h===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new A(c,16),this.y=new A(r,16),this.z=h?new A(h,16):this.curve.one,this.t=b&&new A(b,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}s(a,l),C.exports=a,a.prototype._mulA=function(o){return this.mOneA?o.redNeg():this.a.redMul(o)},a.prototype._mulC=function(o){return this.oneC?o:this.c.redMul(o)},a.prototype.jpoint=function(o,c,r,h){return this.point(o,c,r,h)},a.prototype.pointFromX=function(o,c){(o=new A(o,16)).red||(o=o.toRed(this.red));var r=o.redSqr(),h=this.c2.redSub(this.a.redMul(r)),b=this.one.redSub(this.c2.redMul(this.d).redMul(r)),u=h.redMul(b.redInvm()),m=u.redSqrt();if(m.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var Z=m.fromRed().isOdd();return(c&&!Z||!c&&Z)&&(m=m.redNeg()),this.point(o,m)},a.prototype.pointFromY=function(o,c){(o=new A(o,16)).red||(o=o.toRed(this.red));var r=o.redSqr(),h=r.redSub(this.c2),b=r.redMul(this.d).redMul(this.c2).redSub(this.a),u=h.redMul(b.redInvm());if(u.cmp(this.zero)===0){if(c)throw new Error("invalid point");return this.point(this.zero,o)}var m=u.redSqrt();if(m.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return m.fromRed().isOdd()!==c&&(m=m.redNeg()),this.point(m,o)},a.prototype.validate=function(o){if(o.isInfinity())return!0;o.normalize();var c=o.x.redSqr(),r=o.y.redSqr(),h=c.redMul(this.a).redAdd(r),b=this.c2.redMul(this.one.redAdd(this.d.redMul(c).redMul(r)));return h.cmp(b)===0},s(d,l.BasePoint),a.prototype.pointFromJSON=function(o){return d.fromJSON(this,o)},a.prototype.point=function(o,c,r,h){return new d(this,o,c,r,h)},d.fromJSON=function(o,c){return new d(o,c[0],c[1],c[2])},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},d.prototype._extDbl=function(){var o=this.x.redSqr(),c=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var h=this.curve._mulA(o),b=this.x.redAdd(this.y).redSqr().redISub(o).redISub(c),u=h.redAdd(c),m=u.redSub(r),Z=h.redSub(c),p=b.redMul(m),Y=u.redMul(Z),R=b.redMul(Z),X=m.redMul(u);return this.curve.point(p,Y,X,R)},d.prototype._projDbl=function(){var o,c,r,h,b,u,m=this.x.redAdd(this.y).redSqr(),Z=this.x.redSqr(),p=this.y.redSqr();if(this.curve.twisted){var Y=(h=this.curve._mulA(Z)).redAdd(p);this.zOne?(o=m.redSub(Z).redSub(p).redMul(Y.redSub(this.curve.two)),c=Y.redMul(h.redSub(p)),r=Y.redSqr().redSub(Y).redSub(Y)):(b=this.z.redSqr(),u=Y.redSub(b).redISub(b),o=m.redSub(Z).redISub(p).redMul(u),c=Y.redMul(h.redSub(p)),r=Y.redMul(u))}else h=Z.redAdd(p),b=this.curve._mulC(this.z).redSqr(),u=h.redSub(b).redSub(b),o=this.curve._mulC(m.redISub(h)).redMul(u),c=this.curve._mulC(h).redMul(Z.redISub(p)),r=h.redMul(u);return this.curve.point(o,c,r)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(o){var c=this.y.redSub(this.x).redMul(o.y.redSub(o.x)),r=this.y.redAdd(this.x).redMul(o.y.redAdd(o.x)),h=this.t.redMul(this.curve.dd).redMul(o.t),b=this.z.redMul(o.z.redAdd(o.z)),u=r.redSub(c),m=b.redSub(h),Z=b.redAdd(h),p=r.redAdd(c),Y=u.redMul(m),R=Z.redMul(p),X=u.redMul(p),H=m.redMul(Z);return this.curve.point(Y,R,H,X)},d.prototype._projAdd=function(o){var c,r,h=this.z.redMul(o.z),b=h.redSqr(),u=this.x.redMul(o.x),m=this.y.redMul(o.y),Z=this.curve.d.redMul(u).redMul(m),p=b.redSub(Z),Y=b.redAdd(Z),R=this.x.redAdd(this.y).redMul(o.x.redAdd(o.y)).redISub(u).redISub(m),X=h.redMul(p).redMul(R);return this.curve.twisted?(c=h.redMul(Y).redMul(m.redSub(this.curve._mulA(u))),r=p.redMul(Y)):(c=h.redMul(Y).redMul(m.redSub(u)),r=this.curve._mulC(p).redMul(Y)),this.curve.point(X,c,r)},d.prototype.add=function(o){return this.isInfinity()?o:o.isInfinity()?this:this.curve.extended?this._extAdd(o):this._projAdd(o)},d.prototype.mul=function(o){return this._hasDoubles(o)?this.curve._fixedNafMul(this,o):this.curve._wnafMul(this,o)},d.prototype.mulAdd=function(o,c,r){return this.curve._wnafMulAdd(1,[this,c],[o,r],2,!1)},d.prototype.jmulAdd=function(o,c,r){return this.curve._wnafMulAdd(1,[this,c],[o,r],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var o=this.z.redInvm();return this.x=this.x.redMul(o),this.y=this.y.redMul(o),this.t&&(this.t=this.t.redMul(o)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(o){return this===o||this.getX().cmp(o.getX())===0&&this.getY().cmp(o.getY())===0},d.prototype.eqXToP=function(o){var c=o.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(c)===0)return!0;for(var r=o.clone(),h=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(c.redIAdd(h),this.x.cmp(c)===0)return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(g,C,i){var e=i;e.base=g("./base"),e.short=g("./short"),e.mont=g("./mont"),e.edwards=g("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(g,C,i){var e=g("bn.js"),A=g("inherits"),s=g("./base"),l=g("../utils");function n(d){s.call(this,"mont",d),this.a=new e(d.a,16).toRed(this.red),this.b=new e(d.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(d,o,c){s.BasePoint.call(this,d,"projective"),o===null&&c===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(o,16),this.z=new e(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}A(n,s),C.exports=n,n.prototype.validate=function(d){var o=d.normalize().x,c=o.redSqr(),r=c.redMul(o).redAdd(c.redMul(this.a)).redAdd(o);return r.redSqrt().redSqr().cmp(r)===0},A(a,s.BasePoint),n.prototype.decodePoint=function(d,o){return this.point(l.toArray(d,o),1)},n.prototype.point=function(d,o){return new a(this,d,o)},n.prototype.pointFromJSON=function(d){return a.fromJSON(this,d)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(d,o){return new a(d,o[0],o[1]||d.one)},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.z.cmpn(0)===0},a.prototype.dbl=function(){var d=this.x.redAdd(this.z).redSqr(),o=this.x.redSub(this.z).redSqr(),c=d.redSub(o),r=d.redMul(o),h=c.redMul(o.redAdd(this.curve.a24.redMul(c)));return this.curve.point(r,h)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(d,o){var c=this.x.redAdd(this.z),r=this.x.redSub(this.z),h=d.x.redAdd(d.z),b=d.x.redSub(d.z).redMul(c),u=h.redMul(r),m=o.z.redMul(b.redAdd(u).redSqr()),Z=o.x.redMul(b.redISub(u).redSqr());return this.curve.point(m,Z)},a.prototype.mul=function(d){for(var o=d.clone(),c=this,r=this.curve.point(null,null),h=[];o.cmpn(0)!==0;o.iushrn(1))h.push(o.andln(1));for(var b=h.length-1;b>=0;b--)h[b]===0?(c=c.diffAdd(r,this),r=r.dbl()):(r=c.diffAdd(r,this),c=c.dbl());return r},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(d){return this.getX().cmp(d.getX())===0},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(g,C,i){var e=g("../utils"),A=g("bn.js"),s=g("inherits"),l=g("./base"),n=e.assert;function a(c){l.call(this,"short",c),this.a=new A(c.a,16).toRed(this.red),this.b=new A(c.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(c),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function d(c,r,h,b){l.BasePoint.call(this,c,"affine"),r===null&&h===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new A(r,16),this.y=new A(h,16),b&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(c,r,h,b){l.BasePoint.call(this,c,"jacobian"),r===null&&h===null&&b===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new A(0)):(this.x=new A(r,16),this.y=new A(h,16),this.z=new A(b,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(a,l),C.exports=a,a.prototype._getEndomorphism=function(c){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var r,h;if(c.beta)r=new A(c.beta,16).toRed(this.red);else{var b=this._getEndoRoots(this.p);r=(r=b[0].cmp(b[1])<0?b[0]:b[1]).toRed(this.red)}if(c.lambda)h=new A(c.lambda,16);else{var u=this._getEndoRoots(this.n);this.g.mul(u[0]).x.cmp(this.g.x.redMul(r))===0?h=u[0]:(h=u[1],n(this.g.mul(h).x.cmp(this.g.x.redMul(r))===0))}return{beta:r,lambda:h,basis:c.basis?c.basis.map(function(m){return{a:new A(m.a,16),b:new A(m.b,16)}}):this._getEndoBasis(h)}}},a.prototype._getEndoRoots=function(c){var r=c===this.p?this.red:A.mont(c),h=new A(2).toRed(r).redInvm(),b=h.redNeg(),u=new A(3).toRed(r).redNeg().redSqrt().redMul(h);return[b.redAdd(u).fromRed(),b.redSub(u).fromRed()]},a.prototype._getEndoBasis=function(c){for(var r,h,b,u,m,Z,p,Y,R,X=this.n.ushrn(Math.floor(this.n.bitLength()/2)),H=c,S=this.n.clone(),z=new A(1),v=new A(0),K=new A(0),V=new A(1),N=0;H.cmpn(0)!==0;){var B=S.div(H);Y=S.sub(B.mul(H)),R=K.sub(B.mul(z));var G=V.sub(B.mul(v));if(!b&&Y.cmp(X)<0)r=p.neg(),h=z,b=Y.neg(),u=R;else if(b&&++N==2)break;p=Y,S=H,H=Y,K=z,z=R,V=v,v=G}m=Y.neg(),Z=R;var w=b.sqr().add(u.sqr());return m.sqr().add(Z.sqr()).cmp(w)>=0&&(m=r,Z=h),b.negative&&(b=b.neg(),u=u.neg()),m.negative&&(m=m.neg(),Z=Z.neg()),[{a:b,b:u},{a:m,b:Z}]},a.prototype._endoSplit=function(c){var r=this.endo.basis,h=r[0],b=r[1],u=b.b.mul(c).divRound(this.n),m=h.b.neg().mul(c).divRound(this.n),Z=u.mul(h.a),p=m.mul(b.a),Y=u.mul(h.b),R=m.mul(b.b);return{k1:c.sub(Z).sub(p),k2:Y.add(R).neg()}},a.prototype.pointFromX=function(c,r){(c=new A(c,16)).red||(c=c.toRed(this.red));var h=c.redSqr().redMul(c).redIAdd(c.redMul(this.a)).redIAdd(this.b),b=h.redSqrt();if(b.redSqr().redSub(h).cmp(this.zero)!==0)throw new Error("invalid point");var u=b.fromRed().isOdd();return(r&&!u||!r&&u)&&(b=b.redNeg()),this.point(c,b)},a.prototype.validate=function(c){if(c.inf)return!0;var r=c.x,h=c.y,b=this.a.redMul(r),u=r.redSqr().redMul(r).redIAdd(b).redIAdd(this.b);return h.redSqr().redISub(u).cmpn(0)===0},a.prototype._endoWnafMulAdd=function(c,r,h){for(var b=this._endoWnafT1,u=this._endoWnafT2,m=0;m<c.length;m++){var Z=this._endoSplit(r[m]),p=c[m],Y=p._getBeta();Z.k1.negative&&(Z.k1.ineg(),p=p.neg(!0)),Z.k2.negative&&(Z.k2.ineg(),Y=Y.neg(!0)),b[2*m]=p,b[2*m+1]=Y,u[2*m]=Z.k1,u[2*m+1]=Z.k2}for(var R=this._wnafMulAdd(1,b,u,2*m,h),X=0;X<2*m;X++)b[X]=null,u[X]=null;return R},s(d,l.BasePoint),a.prototype.point=function(c,r,h){return new d(this,c,r,h)},a.prototype.pointFromJSON=function(c,r){return d.fromJSON(this,c,r)},d.prototype._getBeta=function(){if(this.curve.endo){var c=this.precomputed;if(c&&c.beta)return c.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(c){var h=this.curve,b=function(u){return h.point(u.x.redMul(h.endo.beta),u.y)};c.beta=r,r.precomputed={beta:null,naf:c.naf&&{wnd:c.naf.wnd,points:c.naf.points.map(b)},doubles:c.doubles&&{step:c.doubles.step,points:c.doubles.points.map(b)}}}return r}},d.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},d.fromJSON=function(c,r,h){typeof r=="string"&&(r=JSON.parse(r));var b=c.point(r[0],r[1],h);if(!r[2])return b;function u(Z){return c.point(Z[0],Z[1],h)}var m=r[2];return b.precomputed={beta:null,doubles:m.doubles&&{step:m.doubles.step,points:[b].concat(m.doubles.points.map(u))},naf:m.naf&&{wnd:m.naf.wnd,points:[b].concat(m.naf.points.map(u))}},b},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(c){if(this.inf)return c;if(c.inf)return this;if(this.eq(c))return this.dbl();if(this.neg().eq(c))return this.curve.point(null,null);if(this.x.cmp(c.x)===0)return this.curve.point(null,null);var r=this.y.redSub(c.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(c.x).redInvm()));var h=r.redSqr().redISub(this.x).redISub(c.x),b=r.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,b)},d.prototype.dbl=function(){if(this.inf)return this;var c=this.y.redAdd(this.y);if(c.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,h=this.x.redSqr(),b=c.redInvm(),u=h.redAdd(h).redIAdd(h).redIAdd(r).redMul(b),m=u.redSqr().redISub(this.x.redAdd(this.x)),Z=u.redMul(this.x.redSub(m)).redISub(this.y);return this.curve.point(m,Z)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(c){return c=new A(c,16),this.isInfinity()?this:this._hasDoubles(c)?this.curve._fixedNafMul(this,c):this.curve.endo?this.curve._endoWnafMulAdd([this],[c]):this.curve._wnafMul(this,c)},d.prototype.mulAdd=function(c,r,h){var b=[this,r],u=[c,h];return this.curve.endo?this.curve._endoWnafMulAdd(b,u):this.curve._wnafMulAdd(1,b,u,2)},d.prototype.jmulAdd=function(c,r,h){var b=[this,r],u=[c,h];return this.curve.endo?this.curve._endoWnafMulAdd(b,u,!0):this.curve._wnafMulAdd(1,b,u,2,!0)},d.prototype.eq=function(c){return this===c||this.inf===c.inf&&(this.inf||this.x.cmp(c.x)===0&&this.y.cmp(c.y)===0)},d.prototype.neg=function(c){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(c&&this.precomputed){var h=this.precomputed,b=function(u){return u.neg()};r.precomputed={naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(b)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(b)}}}return r},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(o,l.BasePoint),a.prototype.jpoint=function(c,r,h){return new o(this,c,r,h)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var c=this.z.redInvm(),r=c.redSqr(),h=this.x.redMul(r),b=this.y.redMul(r).redMul(c);return this.curve.point(h,b)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(c){if(this.isInfinity())return c;if(c.isInfinity())return this;var r=c.z.redSqr(),h=this.z.redSqr(),b=this.x.redMul(r),u=c.x.redMul(h),m=this.y.redMul(r.redMul(c.z)),Z=c.y.redMul(h.redMul(this.z)),p=b.redSub(u),Y=m.redSub(Z);if(p.cmpn(0)===0)return Y.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var R=p.redSqr(),X=R.redMul(p),H=b.redMul(R),S=Y.redSqr().redIAdd(X).redISub(H).redISub(H),z=Y.redMul(H.redISub(S)).redISub(m.redMul(X)),v=this.z.redMul(c.z).redMul(p);return this.curve.jpoint(S,z,v)},o.prototype.mixedAdd=function(c){if(this.isInfinity())return c.toJ();if(c.isInfinity())return this;var r=this.z.redSqr(),h=this.x,b=c.x.redMul(r),u=this.y,m=c.y.redMul(r).redMul(this.z),Z=h.redSub(b),p=u.redSub(m);if(Z.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var Y=Z.redSqr(),R=Y.redMul(Z),X=h.redMul(Y),H=p.redSqr().redIAdd(R).redISub(X).redISub(X),S=p.redMul(X.redISub(H)).redISub(u.redMul(R)),z=this.z.redMul(Z);return this.curve.jpoint(H,S,z)},o.prototype.dblp=function(c){if(c===0)return this;if(this.isInfinity())return this;if(!c)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var h=this;for(r=0;r<c;r++)h=h.dbl();return h}var b=this.curve.a,u=this.curve.tinv,m=this.x,Z=this.y,p=this.z,Y=p.redSqr().redSqr(),R=Z.redAdd(Z);for(r=0;r<c;r++){var X=m.redSqr(),H=R.redSqr(),S=H.redSqr(),z=X.redAdd(X).redIAdd(X).redIAdd(b.redMul(Y)),v=m.redMul(H),K=z.redSqr().redISub(v.redAdd(v)),V=v.redISub(K),N=z.redMul(V);N=N.redIAdd(N).redISub(S);var B=R.redMul(p);r+1<c&&(Y=Y.redMul(S)),m=K,p=B,R=N}return this.curve.jpoint(m,R.redMul(u),p)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var c,r,h;if(this.zOne){var b=this.x.redSqr(),u=this.y.redSqr(),m=u.redSqr(),Z=this.x.redAdd(u).redSqr().redISub(b).redISub(m);Z=Z.redIAdd(Z);var p=b.redAdd(b).redIAdd(b),Y=p.redSqr().redISub(Z).redISub(Z),R=m.redIAdd(m);R=(R=R.redIAdd(R)).redIAdd(R),c=Y,r=p.redMul(Z.redISub(Y)).redISub(R),h=this.y.redAdd(this.y)}else{var X=this.x.redSqr(),H=this.y.redSqr(),S=H.redSqr(),z=this.x.redAdd(H).redSqr().redISub(X).redISub(S);z=z.redIAdd(z);var v=X.redAdd(X).redIAdd(X),K=v.redSqr(),V=S.redIAdd(S);V=(V=V.redIAdd(V)).redIAdd(V),c=K.redISub(z).redISub(z),r=v.redMul(z.redISub(c)).redISub(V),h=(h=this.y.redMul(this.z)).redIAdd(h)}return this.curve.jpoint(c,r,h)},o.prototype._threeDbl=function(){var c,r,h;if(this.zOne){var b=this.x.redSqr(),u=this.y.redSqr(),m=u.redSqr(),Z=this.x.redAdd(u).redSqr().redISub(b).redISub(m);Z=Z.redIAdd(Z);var p=b.redAdd(b).redIAdd(b).redIAdd(this.curve.a),Y=p.redSqr().redISub(Z).redISub(Z);c=Y;var R=m.redIAdd(m);R=(R=R.redIAdd(R)).redIAdd(R),r=p.redMul(Z.redISub(Y)).redISub(R),h=this.y.redAdd(this.y)}else{var X=this.z.redSqr(),H=this.y.redSqr(),S=this.x.redMul(H),z=this.x.redSub(X).redMul(this.x.redAdd(X));z=z.redAdd(z).redIAdd(z);var v=S.redIAdd(S),K=(v=v.redIAdd(v)).redAdd(v);c=z.redSqr().redISub(K),h=this.y.redAdd(this.z).redSqr().redISub(H).redISub(X);var V=H.redSqr();V=(V=(V=V.redIAdd(V)).redIAdd(V)).redIAdd(V),r=z.redMul(v.redISub(c)).redISub(V)}return this.curve.jpoint(c,r,h)},o.prototype._dbl=function(){var c=this.curve.a,r=this.x,h=this.y,b=this.z,u=b.redSqr().redSqr(),m=r.redSqr(),Z=h.redSqr(),p=m.redAdd(m).redIAdd(m).redIAdd(c.redMul(u)),Y=r.redAdd(r),R=(Y=Y.redIAdd(Y)).redMul(Z),X=p.redSqr().redISub(R.redAdd(R)),H=R.redISub(X),S=Z.redSqr();S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S);var z=p.redMul(H).redISub(S),v=h.redAdd(h).redMul(b);return this.curve.jpoint(X,z,v)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var c=this.x.redSqr(),r=this.y.redSqr(),h=this.z.redSqr(),b=r.redSqr(),u=c.redAdd(c).redIAdd(c),m=u.redSqr(),Z=this.x.redAdd(r).redSqr().redISub(c).redISub(b),p=(Z=(Z=(Z=Z.redIAdd(Z)).redAdd(Z).redIAdd(Z)).redISub(m)).redSqr(),Y=b.redIAdd(b);Y=(Y=(Y=Y.redIAdd(Y)).redIAdd(Y)).redIAdd(Y);var R=u.redIAdd(Z).redSqr().redISub(m).redISub(p).redISub(Y),X=r.redMul(R);X=(X=X.redIAdd(X)).redIAdd(X);var H=this.x.redMul(p).redISub(X);H=(H=H.redIAdd(H)).redIAdd(H);var S=this.y.redMul(R.redMul(Y.redISub(R)).redISub(Z.redMul(p)));S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S);var z=this.z.redAdd(Z).redSqr().redISub(h).redISub(p);return this.curve.jpoint(H,S,z)},o.prototype.mul=function(c,r){return c=new A(c,r),this.curve._wnafMul(this,c)},o.prototype.eq=function(c){if(c.type==="affine")return this.eq(c.toJ());if(this===c)return!0;var r=this.z.redSqr(),h=c.z.redSqr();if(this.x.redMul(h).redISub(c.x.redMul(r)).cmpn(0)!==0)return!1;var b=r.redMul(this.z),u=h.redMul(c.z);return this.y.redMul(u).redISub(c.y.redMul(b)).cmpn(0)===0},o.prototype.eqXToP=function(c){var r=this.z.redSqr(),h=c.toRed(this.curve.red).redMul(r);if(this.x.cmp(h)===0)return!0;for(var b=c.clone(),u=this.curve.redN.redMul(r);;){if(b.iadd(this.curve.n),b.cmp(this.curve.p)>=0)return!1;if(h.redIAdd(u),this.x.cmp(h)===0)return!0}},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(g,C,i){var e,A=i,s=g("hash.js"),l=g("./curve"),n=g("./utils").assert;function a(o){o.type==="short"?this.curve=new l.short(o):o.type==="edwards"?this.curve=new l.edwards(o):this.curve=new l.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function d(o,c){Object.defineProperty(A,o,{configurable:!0,enumerable:!0,get:function(){var r=new a(c);return Object.defineProperty(A,o,{configurable:!0,enumerable:!0,value:r}),r}})}A.PresetCurve=a,d("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),d("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),d("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=g("./precomputed/secp256k1")}catch{e=void 0}d("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(g,C,i){var e=g("bn.js"),A=g("hmac-drbg"),s=g("../utils"),l=g("../curves"),n=g("brorand"),a=s.assert,d=g("./key"),o=g("./signature");function c(r){if(!(this instanceof c))return new c(r);typeof r=="string"&&(a(Object.prototype.hasOwnProperty.call(l,r),"Unknown curve "+r),r=l[r]),r instanceof l.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}C.exports=c,c.prototype.keyPair=function(r){return new d(this,r)},c.prototype.keyFromPrivate=function(r,h){return d.fromPrivate(this,r,h)},c.prototype.keyFromPublic=function(r,h){return d.fromPublic(this,r,h)},c.prototype.genKeyPair=function(r){r||(r={});for(var h=new A({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||n(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),b=this.n.byteLength(),u=this.n.sub(new e(2));;){var m=new e(h.generate(b));if(!(m.cmp(u)>0))return m.iaddn(1),this.keyFromPrivate(m)}},c.prototype._truncateToN=function(r,h){var b=8*r.byteLength()-this.n.bitLength();return b>0&&(r=r.ushrn(b)),!h&&r.cmp(this.n)>=0?r.sub(this.n):r},c.prototype.sign=function(r,h,b,u){typeof b=="object"&&(u=b,b=null),u||(u={}),h=this.keyFromPrivate(h,b),r=this._truncateToN(new e(r,16));for(var m=this.n.byteLength(),Z=h.getPrivate().toArray("be",m),p=r.toArray("be",m),Y=new A({hash:this.hash,entropy:Z,nonce:p,pers:u.pers,persEnc:u.persEnc||"utf8"}),R=this.n.sub(new e(1)),X=0;;X++){var H=u.k?u.k(X):new e(Y.generate(this.n.byteLength()));if(!((H=this._truncateToN(H,!0)).cmpn(1)<=0||H.cmp(R)>=0)){var S=this.g.mul(H);if(!S.isInfinity()){var z=S.getX(),v=z.umod(this.n);if(v.cmpn(0)!==0){var K=H.invm(this.n).mul(v.mul(h.getPrivate()).iadd(r));if((K=K.umod(this.n)).cmpn(0)!==0){var V=(S.getY().isOdd()?1:0)|(z.cmp(v)!==0?2:0);return u.canonical&&K.cmp(this.nh)>0&&(K=this.n.sub(K),V^=1),new o({r:v,s:K,recoveryParam:V})}}}}}},c.prototype.verify=function(r,h,b,u){r=this._truncateToN(new e(r,16)),b=this.keyFromPublic(b,u);var m=(h=new o(h,"hex")).r,Z=h.s;if(m.cmpn(1)<0||m.cmp(this.n)>=0||Z.cmpn(1)<0||Z.cmp(this.n)>=0)return!1;var p,Y=Z.invm(this.n),R=Y.mul(r).umod(this.n),X=Y.mul(m).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(R,b.getPublic(),X)).isInfinity()&&p.eqXToP(m):!(p=this.g.mulAdd(R,b.getPublic(),X)).isInfinity()&&p.getX().umod(this.n).cmp(m)===0},c.prototype.recoverPubKey=function(r,h,b,u){a((3&b)===b,"The recovery param is more than two bits"),h=new o(h,u);var m=this.n,Z=new e(r),p=h.r,Y=h.s,R=1&b,X=b>>1;if(p.cmp(this.curve.p.umod(this.curve.n))>=0&&X)throw new Error("Unable to find sencond key candinate");p=X?this.curve.pointFromX(p.add(this.curve.n),R):this.curve.pointFromX(p,R);var H=h.r.invm(m),S=m.sub(Z).mul(H).umod(m),z=Y.mul(H).umod(m);return this.g.mulAdd(S,p,z)},c.prototype.getKeyRecoveryParam=function(r,h,b,u){if((h=new o(h,u)).recoveryParam!==null)return h.recoveryParam;for(var m=0;m<4;m++){var Z;try{Z=this.recoverPubKey(r,h,m)}catch{continue}if(Z.eq(b))return m}throw new Error("Unable to find valid recovery factor")}},{"../curves":411,"../utils":419,"./key":413,"./signature":414,"bn.js":420,brorand:187,"hmac-drbg":438}],413:[function(g,C,i){var e=g("bn.js"),A=g("../utils").assert;function s(l,n){this.ec=l,this.priv=null,this.pub=null,n.priv&&this._importPrivate(n.priv,n.privEnc),n.pub&&this._importPublic(n.pub,n.pubEnc)}C.exports=s,s.fromPublic=function(l,n,a){return n instanceof s?n:new s(l,{pub:n,pubEnc:a})},s.fromPrivate=function(l,n,a){return n instanceof s?n:new s(l,{priv:n,privEnc:a})},s.prototype.validate=function(){var l=this.getPublic();return l.isInfinity()?{result:!1,reason:"Invalid public key"}:l.validate()?l.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},s.prototype.getPublic=function(l,n){return typeof l=="string"&&(n=l,l=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,l):this.pub},s.prototype.getPrivate=function(l){return l==="hex"?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(l,n){this.priv=new e(l,n||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(l,n){if(l.x||l.y)return this.ec.curve.type==="mont"?A(l.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||A(l.x&&l.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(l.x,l.y));this.pub=this.ec.curve.decodePoint(l,n)},s.prototype.derive=function(l){return l.validate()||A(l.validate(),"public point not validated"),l.mul(this.priv).getX()},s.prototype.sign=function(l,n,a){return this.ec.sign(l,this,n,a)},s.prototype.verify=function(l,n){return this.ec.verify(l,n,this)},s.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":419,"bn.js":420}],414:[function(g,C,i){var e=g("bn.js"),A=g("../utils"),s=A.assert;function l(c,r){if(c instanceof l)return c;this._importDER(c,r)||(s(c.r&&c.s,"Signature without r or s"),this.r=new e(c.r,16),this.s=new e(c.s,16),c.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=c.recoveryParam)}function n(){this.place=0}function a(c,r){var h=c[r.place++];if(!(128&h))return h;var b=15&h;if(b===0||b>4)return!1;for(var u=0,m=0,Z=r.place;m<b;m++,Z++)u<<=8,u|=c[Z],u>>>=0;return!(u<=127)&&(r.place=Z,u)}function d(c){for(var r=0,h=c.length-1;!c[r]&&!(128&c[r+1])&&r<h;)r++;return r===0?c:c.slice(r)}function o(c,r){if(r<128)c.push(r);else{var h=1+(Math.log(r)/Math.LN2>>>3);for(c.push(128|h);--h;)c.push(r>>>(h<<3)&255);c.push(r)}}C.exports=l,l.prototype._importDER=function(c,r){c=A.toArray(c,r);var h=new n;if(c[h.place++]!==48)return!1;var b=a(c,h);if(b===!1||b+h.place!==c.length||c[h.place++]!==2)return!1;var u=a(c,h);if(u===!1)return!1;var m=c.slice(h.place,u+h.place);if(h.place+=u,c[h.place++]!==2)return!1;var Z=a(c,h);if(Z===!1||c.length!==Z+h.place)return!1;var p=c.slice(h.place,Z+h.place);if(m[0]===0){if(!(128&m[1]))return!1;m=m.slice(1)}if(p[0]===0){if(!(128&p[1]))return!1;p=p.slice(1)}return this.r=new e(m),this.s=new e(p),this.recoveryParam=null,!0},l.prototype.toDER=function(c){var r=this.r.toArray(),h=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&h[0]&&(h=[0].concat(h)),r=d(r),h=d(h);!(h[0]||128&h[1]);)h=h.slice(1);var b=[2];o(b,r.length),(b=b.concat(r)).push(2),o(b,h.length);var u=b.concat(h),m=[48];return o(m,u.length),m=m.concat(u),A.encode(m,c)}},{"../utils":419,"bn.js":420}],415:[function(g,C,i){var e=g("hash.js"),A=g("../curves"),s=g("../utils"),l=s.assert,n=s.parseBytes,a=g("./key"),d=g("./signature");function o(c){if(l(c==="ed25519","only tested with ed25519 so far"),!(this instanceof o))return new o(c);c=A[c].curve,this.curve=c,this.g=c.g,this.g.precompute(c.n.bitLength()+1),this.pointClass=c.point().constructor,this.encodingLength=Math.ceil(c.n.bitLength()/8),this.hash=e.sha512}C.exports=o,o.prototype.sign=function(c,r){c=n(c);var h=this.keyFromSecret(r),b=this.hashInt(h.messagePrefix(),c),u=this.g.mul(b),m=this.encodePoint(u),Z=this.hashInt(m,h.pubBytes(),c).mul(h.priv()),p=b.add(Z).umod(this.curve.n);return this.makeSignature({R:u,S:p,Rencoded:m})},o.prototype.verify=function(c,r,h){c=n(c),r=this.makeSignature(r);var b=this.keyFromPublic(h),u=this.hashInt(r.Rencoded(),b.pubBytes(),c),m=this.g.mul(r.S());return r.R().add(b.pub().mul(u)).eq(m)},o.prototype.hashInt=function(){for(var c=this.hash(),r=0;r<arguments.length;r++)c.update(arguments[r]);return s.intFromLE(c.digest()).umod(this.curve.n)},o.prototype.keyFromPublic=function(c){return a.fromPublic(this,c)},o.prototype.keyFromSecret=function(c){return a.fromSecret(this,c)},o.prototype.makeSignature=function(c){return c instanceof d?c:new d(this,c)},o.prototype.encodePoint=function(c){var r=c.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=c.getX().isOdd()?128:0,r},o.prototype.decodePoint=function(c){var r=(c=s.parseBytes(c)).length-1,h=c.slice(0,r).concat(-129&c[r]),b=(128&c[r])!=0,u=s.intFromLE(h);return this.curve.pointFromY(u,b)},o.prototype.encodeInt=function(c){return c.toArray("le",this.encodingLength)},o.prototype.decodeInt=function(c){return s.intFromLE(c)},o.prototype.isPoint=function(c){return c instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(g,C,i){var e=g("../utils"),A=e.assert,s=e.parseBytes,l=e.cachedProperty;function n(a,d){this.eddsa=a,this._secret=s(d.secret),a.isPoint(d.pub)?this._pub=d.pub:this._pubBytes=s(d.pub)}n.fromPublic=function(a,d){return d instanceof n?d:new n(a,{pub:d})},n.fromSecret=function(a,d){return d instanceof n?d:new n(a,{secret:d})},n.prototype.secret=function(){return this._secret},l(n,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),l(n,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),l(n,"privBytes",function(){var a=this.eddsa,d=this.hash(),o=a.encodingLength-1,c=d.slice(0,a.encodingLength);return c[0]&=248,c[o]&=127,c[o]|=64,c}),l(n,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),l(n,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),l(n,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),n.prototype.sign=function(a){return A(this._secret,"KeyPair can only verify"),this.eddsa.sign(a,this)},n.prototype.verify=function(a,d){return this.eddsa.verify(a,d,this)},n.prototype.getSecret=function(a){return A(this._secret,"KeyPair is public only"),e.encode(this.secret(),a)},n.prototype.getPublic=function(a){return e.encode(this.pubBytes(),a)},C.exports=n},{"../utils":419}],417:[function(g,C,i){var e=g("bn.js"),A=g("../utils"),s=A.assert,l=A.cachedProperty,n=A.parseBytes;function a(d,o){this.eddsa=d,typeof o!="object"&&(o=n(o)),Array.isArray(o)&&(o={R:o.slice(0,d.encodingLength),S:o.slice(d.encodingLength)}),s(o.R&&o.S,"Signature without R or S"),d.isPoint(o.R)&&(this._R=o.R),o.S instanceof e&&(this._S=o.S),this._Rencoded=Array.isArray(o.R)?o.R:o.Rencoded,this._Sencoded=Array.isArray(o.S)?o.S:o.Sencoded}l(a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),l(a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),l(a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),l(a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return A.encode(this.toBytes(),"hex").toUpperCase()},C.exports=a},{"../utils":419,"bn.js":420}],418:[function(g,C,i){C.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],419:[function(g,C,i){var e=i,A=g("bn.js"),s=g("minimalistic-assert"),l=g("minimalistic-crypto-utils");e.assert=s,e.toArray=l.toArray,e.zero2=l.zero2,e.toHex=l.toHex,e.encode=l.encode,e.getNAF=function(n,a,d){var o=new Array(Math.max(n.bitLength(),d)+1);o.fill(0);for(var c=1<<a+1,r=n.clone(),h=0;h<o.length;h++){var b,u=r.andln(c-1);r.isOdd()?(b=u>(c>>1)-1?(c>>1)-u:u,r.isubn(b)):b=0,o[h]=b,r.iushrn(1)}return o},e.getJSF=function(n,a){var d=[[],[]];n=n.clone(),a=a.clone();for(var o,c=0,r=0;n.cmpn(-c)>0||a.cmpn(-r)>0;){var h,b,u=n.andln(3)+c&3,m=a.andln(3)+r&3;u===3&&(u=-1),m===3&&(m=-1),h=(1&u)==0?0:(o=n.andln(7)+c&7)!==3&&o!==5||m!==2?u:-u,d[0].push(h),b=(1&m)==0?0:(o=a.andln(7)+r&7)!==3&&o!==5||u!==2?m:-m,d[1].push(b),2*c===h+1&&(c=1-c),2*r===b+1&&(r=1-r),n.iushrn(1),a.iushrn(1)}return d},e.cachedProperty=function(n,a,d){var o="_"+a;n.prototype[a]=function(){return this[o]!==void 0?this[o]:this[o]=d.call(this)}},e.parseBytes=function(n){return typeof n=="string"?e.toArray(n,"hex"):n},e.intFromLE=function(n){return new A(n,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(g,C,i){arguments[4][184][0].apply(i,arguments)},{buffer:188,dup:184}],421:[function(g,C,i){C.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],422:[function(g,C,i){var e=Object.create||function(H){var S=function(){};return S.prototype=H,new S},A=Object.keys||function(H){var S=[];for(var z in H)Object.prototype.hasOwnProperty.call(H,z)&&S.push(z);return z},s=Function.prototype.bind||function(H){var S=this;return function(){return S.apply(H,arguments)}};function l(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=e(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}C.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._maxListeners=void 0;var n,a=10;try{var d={};Object.defineProperty&&Object.defineProperty(d,"x",{value:0}),n=d.x===0}catch{n=!1}function o(H){return H._maxListeners===void 0?l.defaultMaxListeners:H._maxListeners}function c(H,S,z){if(S)H.call(z);else for(var v=H.length,K=X(H,v),V=0;V<v;++V)K[V].call(z)}function r(H,S,z,v){if(S)H.call(z,v);else for(var K=H.length,V=X(H,K),N=0;N<K;++N)V[N].call(z,v)}function h(H,S,z,v,K){if(S)H.call(z,v,K);else for(var V=H.length,N=X(H,V),B=0;B<V;++B)N[B].call(z,v,K)}function b(H,S,z,v,K,V){if(S)H.call(z,v,K,V);else for(var N=H.length,B=X(H,N),G=0;G<N;++G)B[G].call(z,v,K,V)}function u(H,S,z,v){if(S)H.apply(z,v);else for(var K=H.length,V=X(H,K),N=0;N<K;++N)V[N].apply(z,v)}function m(H,S,z,v){var K,V,N;if(typeof z!="function")throw new TypeError('"listener" argument must be a function');if((V=H._events)?(V.newListener&&(H.emit("newListener",S,z.listener?z.listener:z),V=H._events),N=V[S]):(V=H._events=e(null),H._eventsCount=0),N){if(typeof N=="function"?N=V[S]=v?[z,N]:[N,z]:v?N.unshift(z):N.push(z),!N.warned&&(K=o(H))&&K>0&&N.length>K){N.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+N.length+' "'+String(S)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');B.name="MaxListenersExceededWarning",B.emitter=H,B.type=S,B.count=N.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",B.name,B.message)}}else N=V[S]=z,++H._eventsCount;return H}function Z(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var H=new Array(arguments.length),S=0;S<H.length;++S)H[S]=arguments[S];this.listener.apply(this.target,H)}}function p(H,S,z){var v={fired:!1,wrapFn:void 0,target:H,type:S,listener:z},K=s.call(Z,v);return K.listener=z,v.wrapFn=K,K}function Y(H,S,z){var v=H._events;if(!v)return[];var K=v[S];return K?typeof K=="function"?z?[K.listener||K]:[K]:z?function(V){for(var N=new Array(V.length),B=0;B<N.length;++B)N[B]=V[B].listener||V[B];return N}(K):X(K,K.length):[]}function R(H){var S=this._events;if(S){var z=S[H];if(typeof z=="function")return 1;if(z)return z.length}return 0}function X(H,S){for(var z=new Array(S),v=0;v<S;++v)z[v]=H[v];return z}n?Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(H){if(typeof H!="number"||H<0||H!=H)throw new TypeError('"defaultMaxListeners" must be a positive number');a=H}}):l.defaultMaxListeners=a,l.prototype.setMaxListeners=function(H){if(typeof H!="number"||H<0||isNaN(H))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=H,this},l.prototype.getMaxListeners=function(){return o(this)},l.prototype.emit=function(H){var S,z,v,K,V,N,B=H==="error";if(N=this._events)B=B&&N.error==null;else if(!B)return!1;if(B){if(arguments.length>1&&(S=arguments[1]),S instanceof Error)throw S;var G=new Error('Unhandled "error" event. ('+S+")");throw G.context=S,G}if(!(z=N[H]))return!1;var w=typeof z=="function";switch(v=arguments.length){case 1:c(z,w,this);break;case 2:r(z,w,this,arguments[1]);break;case 3:h(z,w,this,arguments[1],arguments[2]);break;case 4:b(z,w,this,arguments[1],arguments[2],arguments[3]);break;default:for(K=new Array(v-1),V=1;V<v;V++)K[V-1]=arguments[V];u(z,w,this,K)}return!0},l.prototype.addListener=function(H,S){return m(this,H,S,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(H,S){return m(this,H,S,!0)},l.prototype.once=function(H,S){if(typeof S!="function")throw new TypeError('"listener" argument must be a function');return this.on(H,p(this,H,S)),this},l.prototype.prependOnceListener=function(H,S){if(typeof S!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(H,p(this,H,S)),this},l.prototype.removeListener=function(H,S){var z,v,K,V,N;if(typeof S!="function")throw new TypeError('"listener" argument must be a function');if(!(v=this._events))return this;if(!(z=v[H]))return this;if(z===S||z.listener===S)--this._eventsCount==0?this._events=e(null):(delete v[H],v.removeListener&&this.emit("removeListener",H,z.listener||S));else if(typeof z!="function"){for(K=-1,V=z.length-1;V>=0;V--)if(z[V]===S||z[V].listener===S){N=z[V].listener,K=V;break}if(K<0)return this;K===0?z.shift():function(B,G){for(var w=G,W=w+1,y=B.length;W<y;w+=1,W+=1)B[w]=B[W];B.pop()}(z,K),z.length===1&&(v[H]=z[0]),v.removeListener&&this.emit("removeListener",H,N||S)}return this},l.prototype.removeAllListeners=function(H){var S,z,v;if(!(z=this._events))return this;if(!z.removeListener)return arguments.length===0?(this._events=e(null),this._eventsCount=0):z[H]&&(--this._eventsCount==0?this._events=e(null):delete z[H]),this;if(arguments.length===0){var K,V=A(z);for(v=0;v<V.length;++v)(K=V[v])!=="removeListener"&&this.removeAllListeners(K);return this.removeAllListeners("removeListener"),this._events=e(null),this._eventsCount=0,this}if(typeof(S=z[H])=="function")this.removeListener(H,S);else if(S)for(v=S.length-1;v>=0;v--)this.removeListener(H,S[v]);return this},l.prototype.listeners=function(H){return Y(this,H,!0)},l.prototype.rawListeners=function(H){return Y(this,H,!1)},l.listenerCount=function(H,S){return typeof H.listenerCount=="function"?H.listenerCount(S):R.call(H,S)},l.prototype.listenerCount=R,l.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("md5.js");C.exports=function(s,l,n,a){if(e.isBuffer(s)||(s=e.from(s,"binary")),l&&(e.isBuffer(l)||(l=e.from(l,"binary")),l.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var d=n/8,o=e.alloc(d),c=e.alloc(a||0),r=e.alloc(0);d>0||a>0;){var h=new A;h.update(r),h.update(s),l&&h.update(l),r=h.digest();var b=0;if(d>0){var u=o.length-d;b=Math.min(d,r.length),r.copy(o,u,0,b),d-=b}if(b<r.length&&a>0){var m=c.length-a,Z=Math.min(a,r.length-b);r.copy(c,m,b,b+Z),a-=Z}}return r.fill(0),{key:o,iv:c}}},{"md5.js":450,"safe-buffer":494}],424:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.CsvParserStream=i.ParserOptions=i.parseFile=i.parseStream=i.parseString=i.parse=i.FormatterOptions=i.CsvFormatterStream=i.writeToPath=i.writeToString=i.writeToBuffer=i.writeToStream=i.write=i.format=void 0;var e=g("@fast-csv/format");Object.defineProperty(i,"format",{enumerable:!0,get:function(){return e.format}}),Object.defineProperty(i,"write",{enumerable:!0,get:function(){return e.write}}),Object.defineProperty(i,"writeToStream",{enumerable:!0,get:function(){return e.writeToStream}}),Object.defineProperty(i,"writeToBuffer",{enumerable:!0,get:function(){return e.writeToBuffer}}),Object.defineProperty(i,"writeToString",{enumerable:!0,get:function(){return e.writeToString}}),Object.defineProperty(i,"writeToPath",{enumerable:!0,get:function(){return e.writeToPath}}),Object.defineProperty(i,"CsvFormatterStream",{enumerable:!0,get:function(){return e.CsvFormatterStream}}),Object.defineProperty(i,"FormatterOptions",{enumerable:!0,get:function(){return e.FormatterOptions}});var A=g("@fast-csv/parse");Object.defineProperty(i,"parse",{enumerable:!0,get:function(){return A.parse}}),Object.defineProperty(i,"parseString",{enumerable:!0,get:function(){return A.parseString}}),Object.defineProperty(i,"parseStream",{enumerable:!0,get:function(){return A.parseStream}}),Object.defineProperty(i,"parseFile",{enumerable:!0,get:function(){return A.parseFile}}),Object.defineProperty(i,"ParserOptions",{enumerable:!0,get:function(){return A.ParserOptions}}),Object.defineProperty(i,"CsvParserStream",{enumerable:!0,get:function(){return A.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("readable-stream").Transform;function s(l){A.call(this),this._block=e.allocUnsafe(l),this._blockSize=l,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}g("inherits")(s,A),s.prototype._transform=function(l,n,a){var d=null;try{this.update(l,n)}catch(o){d=o}a(d)},s.prototype._flush=function(l){var n=null;try{this.push(this.digest())}catch(a){n=a}l(n)},s.prototype.update=function(l,n){if(function(h,b){if(!e.isBuffer(h)&&typeof h!="string")throw new TypeError(b+" must be a string or a buffer")}(l,"Data"),this._finalized)throw new Error("Digest already called");e.isBuffer(l)||(l=e.from(l,n));for(var a=this._block,d=0;this._blockOffset+l.length-d>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)a[o++]=l[d++];this._update(),this._blockOffset=0}for(;d<l.length;)a[this._blockOffset++]=l[d++];for(var c=0,r=8*l.length;r>0;++c)this._length[c]+=r,(r=this._length[c]/4294967296|0)>0&&(this._length[c]-=4294967296*r);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(l){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var n=this._digest();l!==void 0&&(n=n.toString(l)),this._block.fill(0),this._blockOffset=0;for(var a=0;a<4;++a)this._length[a]=0;return n},s.prototype._digest=function(){throw new Error("_digest is not implemented")},C.exports=s},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(g,C,i){var e=i;e.utils=g("./hash/utils"),e.common=g("./hash/common"),e.sha=g("./hash/sha"),e.ripemd=g("./hash/ripemd"),e.hmac=g("./hash/hmac"),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(g,C,i){var e=g("./utils"),A=g("minimalistic-assert");function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}i.BlockHash=s,s.prototype.update=function(l,n){if(l=e.toArray(l,n),this.pending?this.pending=this.pending.concat(l):this.pending=l,this.pendingTotal+=l.length,this.pending.length>=this._delta8){var a=(l=this.pending).length%this._delta8;this.pending=l.slice(l.length-a,l.length),this.pending.length===0&&(this.pending=null),l=e.join32(l,0,l.length-a,this.endian);for(var d=0;d<l.length;d+=this._delta32)this._update(l,d,d+this._delta32)}return this},s.prototype.digest=function(l){return this.update(this._pad()),A(this.pending===null),this._digest(l)},s.prototype._pad=function(){var l=this.pendingTotal,n=this._delta8,a=n-(l+this.padLength)%n,d=new Array(a+this.padLength);d[0]=128;for(var o=1;o<a;o++)d[o]=0;if(l<<=3,this.endian==="big"){for(var c=8;c<this.padLength;c++)d[o++]=0;d[o++]=0,d[o++]=0,d[o++]=0,d[o++]=0,d[o++]=l>>>24&255,d[o++]=l>>>16&255,d[o++]=l>>>8&255,d[o++]=255&l}else for(d[o++]=255&l,d[o++]=l>>>8&255,d[o++]=l>>>16&255,d[o++]=l>>>24&255,d[o++]=0,d[o++]=0,d[o++]=0,d[o++]=0,c=8;c<this.padLength;c++)d[o++]=0;return d}},{"./utils":437,"minimalistic-assert":453}],428:[function(g,C,i){var e=g("./utils"),A=g("minimalistic-assert");function s(l,n,a){if(!(this instanceof s))return new s(l,n,a);this.Hash=l,this.blockSize=l.blockSize/8,this.outSize=l.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(n,a))}C.exports=s,s.prototype._init=function(l){l.length>this.blockSize&&(l=new this.Hash().update(l).digest()),A(l.length<=this.blockSize);for(var n=l.length;n<this.blockSize;n++)l.push(0);for(n=0;n<l.length;n++)l[n]^=54;for(this.inner=new this.Hash().update(l),n=0;n<l.length;n++)l[n]^=106;this.outer=new this.Hash().update(l)},s.prototype.update=function(l,n){return this.inner.update(l,n),this},s.prototype.digest=function(l){return this.outer.update(this.inner.digest()),this.outer.digest(l)}},{"./utils":437,"minimalistic-assert":453}],429:[function(g,C,i){var e=g("./utils"),A=g("./common"),s=e.rotl32,l=e.sum32,n=e.sum32_3,a=e.sum32_4,d=A.BlockHash;function o(){if(!(this instanceof o))return new o;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(p,Y,R,X){return p<=15?Y^R^X:p<=31?Y&R|~Y&X:p<=47?(Y|~R)^X:p<=63?Y&X|R&~X:Y^(R|~X)}function r(p){return p<=15?0:p<=31?1518500249:p<=47?1859775393:p<=63?2400959708:2840853838}function h(p){return p<=15?1352829926:p<=31?1548603684:p<=47?1836072691:p<=63?2053994217:0}e.inherits(o,d),i.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(p,Y){for(var R=this.h[0],X=this.h[1],H=this.h[2],S=this.h[3],z=this.h[4],v=R,K=X,V=H,N=S,B=z,G=0;G<80;G++){var w=l(s(a(R,c(G,X,H,S),p[b[G]+Y],r(G)),m[G]),z);R=z,z=S,S=s(H,10),H=X,X=w,w=l(s(a(v,c(79-G,K,V,N),p[u[G]+Y],h(G)),Z[G]),B),v=B,B=N,N=s(V,10),V=K,K=w}w=n(this.h[1],H,N),this.h[1]=n(this.h[2],S,B),this.h[2]=n(this.h[3],z,v),this.h[3]=n(this.h[4],R,K),this.h[4]=n(this.h[0],X,V),this.h[0]=w},o.prototype._digest=function(p){return p==="hex"?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var b=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Z=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":427,"./utils":437}],430:[function(g,C,i){i.sha1=g("./sha/1"),i.sha224=g("./sha/224"),i.sha256=g("./sha/256"),i.sha384=g("./sha/384"),i.sha512=g("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(g,C,i){var e=g("../utils"),A=g("../common"),s=g("./common"),l=e.rotl32,n=e.sum32,a=e.sum32_5,d=s.ft_1,o=A.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function r(){if(!(this instanceof r))return new r;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}e.inherits(r,o),C.exports=r,r.blockSize=512,r.outSize=160,r.hmacStrength=80,r.padLength=64,r.prototype._update=function(h,b){for(var u=this.W,m=0;m<16;m++)u[m]=h[b+m];for(;m<u.length;m++)u[m]=l(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);var Z=this.h[0],p=this.h[1],Y=this.h[2],R=this.h[3],X=this.h[4];for(m=0;m<u.length;m++){var H=~~(m/20),S=a(l(Z,5),d(H,p,Y,R),X,u[m],c[H]);X=R,R=Y,Y=l(p,30),p=Z,Z=S}this.h[0]=n(this.h[0],Z),this.h[1]=n(this.h[1],p),this.h[2]=n(this.h[2],Y),this.h[3]=n(this.h[3],R),this.h[4]=n(this.h[4],X)},r.prototype._digest=function(h){return h==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(g,C,i){var e=g("../utils"),A=g("./256");function s(){if(!(this instanceof s))return new s;A.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}e.inherits(s,A),C.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(l){return l==="hex"?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(g,C,i){var e=g("../utils"),A=g("../common"),s=g("./common"),l=g("minimalistic-assert"),n=e.sum32,a=e.sum32_4,d=e.sum32_5,o=s.ch32,c=s.maj32,r=s.s0_256,h=s.s1_256,b=s.g0_256,u=s.g1_256,m=A.BlockHash,Z=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function p(){if(!(this instanceof p))return new p;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Z,this.W=new Array(64)}e.inherits(p,m),C.exports=p,p.blockSize=512,p.outSize=256,p.hmacStrength=192,p.padLength=64,p.prototype._update=function(Y,R){for(var X=this.W,H=0;H<16;H++)X[H]=Y[R+H];for(;H<X.length;H++)X[H]=a(u(X[H-2]),X[H-7],b(X[H-15]),X[H-16]);var S=this.h[0],z=this.h[1],v=this.h[2],K=this.h[3],V=this.h[4],N=this.h[5],B=this.h[6],G=this.h[7];for(l(this.k.length===X.length),H=0;H<X.length;H++){var w=d(G,h(V),o(V,N,B),this.k[H],X[H]),W=n(r(S),c(S,z,v));G=B,B=N,N=V,V=n(K,w),K=v,v=z,z=S,S=n(w,W)}this.h[0]=n(this.h[0],S),this.h[1]=n(this.h[1],z),this.h[2]=n(this.h[2],v),this.h[3]=n(this.h[3],K),this.h[4]=n(this.h[4],V),this.h[5]=n(this.h[5],N),this.h[6]=n(this.h[6],B),this.h[7]=n(this.h[7],G)},p.prototype._digest=function(Y){return Y==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(g,C,i){var e=g("../utils"),A=g("./512");function s(){if(!(this instanceof s))return new s;A.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}e.inherits(s,A),C.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(l){return l==="hex"?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(g,C,i){var e=g("../utils"),A=g("../common"),s=g("minimalistic-assert"),l=e.rotr64_hi,n=e.rotr64_lo,a=e.shr64_hi,d=e.shr64_lo,o=e.sum64,c=e.sum64_hi,r=e.sum64_lo,h=e.sum64_4_hi,b=e.sum64_4_lo,u=e.sum64_5_hi,m=e.sum64_5_lo,Z=A.BlockHash,p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(){if(!(this instanceof Y))return new Y;Z.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=p,this.W=new Array(160)}function R(W,y,f,D,F){var T=W&f^~W&F;return T<0&&(T+=4294967296),T}function X(W,y,f,D,F,T){var Q=y&D^~y&T;return Q<0&&(Q+=4294967296),Q}function H(W,y,f,D,F){var T=W&f^W&F^f&F;return T<0&&(T+=4294967296),T}function S(W,y,f,D,F,T){var Q=y&D^y&T^D&T;return Q<0&&(Q+=4294967296),Q}function z(W,y){var f=l(W,y,28)^l(y,W,2)^l(y,W,7);return f<0&&(f+=4294967296),f}function v(W,y){var f=n(W,y,28)^n(y,W,2)^n(y,W,7);return f<0&&(f+=4294967296),f}function K(W,y){var f=l(W,y,14)^l(W,y,18)^l(y,W,9);return f<0&&(f+=4294967296),f}function V(W,y){var f=n(W,y,14)^n(W,y,18)^n(y,W,9);return f<0&&(f+=4294967296),f}function N(W,y){var f=l(W,y,1)^l(W,y,8)^a(W,y,7);return f<0&&(f+=4294967296),f}function B(W,y){var f=n(W,y,1)^n(W,y,8)^d(W,y,7);return f<0&&(f+=4294967296),f}function G(W,y){var f=l(W,y,19)^l(y,W,29)^a(W,y,6);return f<0&&(f+=4294967296),f}function w(W,y){var f=n(W,y,19)^n(y,W,29)^d(W,y,6);return f<0&&(f+=4294967296),f}e.inherits(Y,Z),C.exports=Y,Y.blockSize=1024,Y.outSize=512,Y.hmacStrength=192,Y.padLength=128,Y.prototype._prepareBlock=function(W,y){for(var f=this.W,D=0;D<32;D++)f[D]=W[y+D];for(;D<f.length;D+=2){var F=G(f[D-4],f[D-3]),T=w(f[D-4],f[D-3]),Q=f[D-14],P=f[D-13],L=N(f[D-30],f[D-29]),E=B(f[D-30],f[D-29]),J=f[D-32],k=f[D-31];f[D]=h(F,T,Q,P,L,E,J,k),f[D+1]=b(F,T,Q,P,L,E,J,k)}},Y.prototype._update=function(W,y){this._prepareBlock(W,y);var f=this.W,D=this.h[0],F=this.h[1],T=this.h[2],Q=this.h[3],P=this.h[4],L=this.h[5],E=this.h[6],J=this.h[7],k=this.h[8],j=this.h[9],q=this.h[10],tg=this.h[11],Cg=this.h[12],x=this.h[13],sg=this.h[14],Ag=this.h[15];s(this.k.length===f.length);for(var O=0;O<f.length;O+=2){var _=sg,Ig=Ag,ng=K(k,j),ag=V(k,j),lg=R(k,j,q,tg,Cg),cg=X(k,j,q,tg,Cg,x),dg=this.k[O],hg=this.k[O+1],rg=f[O],Wg=f[O+1],Gg=u(_,Ig,ng,ag,lg,cg,dg,hg,rg,Wg),Sg=m(_,Ig,ng,ag,lg,cg,dg,hg,rg,Wg);_=z(D,F),Ig=v(D,F),ng=H(D,F,T,Q,P),ag=S(D,F,T,Q,P,L);var Kg=c(_,Ig,ng,ag),kg=r(_,Ig,ng,ag);sg=Cg,Ag=x,Cg=q,x=tg,q=k,tg=j,k=c(E,J,Gg,Sg),j=r(J,J,Gg,Sg),E=P,J=L,P=T,L=Q,T=D,Q=F,D=c(Gg,Sg,Kg,kg),F=r(Gg,Sg,Kg,kg)}o(this.h,0,D,F),o(this.h,2,T,Q),o(this.h,4,P,L),o(this.h,6,E,J),o(this.h,8,k,j),o(this.h,10,q,tg),o(this.h,12,Cg,x),o(this.h,14,sg,Ag)},Y.prototype._digest=function(W){return W==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(g,C,i){var e=g("../utils").rotr32;function A(n,a,d){return n&a^~n&d}function s(n,a,d){return n&a^n&d^a&d}function l(n,a,d){return n^a^d}i.ft_1=function(n,a,d,o){return n===0?A(a,d,o):n===1||n===3?l(a,d,o):n===2?s(a,d,o):void 0},i.ch32=A,i.maj32=s,i.p32=l,i.s0_256=function(n){return e(n,2)^e(n,13)^e(n,22)},i.s1_256=function(n){return e(n,6)^e(n,11)^e(n,25)},i.g0_256=function(n){return e(n,7)^e(n,18)^n>>>3},i.g1_256=function(n){return e(n,17)^e(n,19)^n>>>10}},{"../utils":437}],437:[function(g,C,i){var e=g("minimalistic-assert"),A=g("inherits");function s(d,o){return(64512&d.charCodeAt(o))==55296&&!(o<0||o+1>=d.length)&&(64512&d.charCodeAt(o+1))==56320}function l(d){return(d>>>24|d>>>8&65280|d<<8&16711680|(255&d)<<24)>>>0}function n(d){return d.length===1?"0"+d:d}function a(d){return d.length===7?"0"+d:d.length===6?"00"+d:d.length===5?"000"+d:d.length===4?"0000"+d:d.length===3?"00000"+d:d.length===2?"000000"+d:d.length===1?"0000000"+d:d}i.inherits=A,i.toArray=function(d,o){if(Array.isArray(d))return d.slice();if(!d)return[];var c=[];if(typeof d=="string")if(o){if(o==="hex")for((d=d.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(d="0"+d),h=0;h<d.length;h+=2)c.push(parseInt(d[h]+d[h+1],16))}else for(var r=0,h=0;h<d.length;h++){var b=d.charCodeAt(h);b<128?c[r++]=b:b<2048?(c[r++]=b>>6|192,c[r++]=63&b|128):s(d,h)?(b=65536+((1023&b)<<10)+(1023&d.charCodeAt(++h)),c[r++]=b>>18|240,c[r++]=b>>12&63|128,c[r++]=b>>6&63|128,c[r++]=63&b|128):(c[r++]=b>>12|224,c[r++]=b>>6&63|128,c[r++]=63&b|128)}else for(h=0;h<d.length;h++)c[h]=0|d[h];return c},i.toHex=function(d){for(var o="",c=0;c<d.length;c++)o+=n(d[c].toString(16));return o},i.htonl=l,i.toHex32=function(d,o){for(var c="",r=0;r<d.length;r++){var h=d[r];o==="little"&&(h=l(h)),c+=a(h.toString(16))}return c},i.zero2=n,i.zero8=a,i.join32=function(d,o,c,r){var h=c-o;e(h%4==0);for(var b=new Array(h/4),u=0,m=o;u<b.length;u++,m+=4){var Z;Z=r==="big"?d[m]<<24|d[m+1]<<16|d[m+2]<<8|d[m+3]:d[m+3]<<24|d[m+2]<<16|d[m+1]<<8|d[m],b[u]=Z>>>0}return b},i.split32=function(d,o){for(var c=new Array(4*d.length),r=0,h=0;r<d.length;r++,h+=4){var b=d[r];o==="big"?(c[h]=b>>>24,c[h+1]=b>>>16&255,c[h+2]=b>>>8&255,c[h+3]=255&b):(c[h+3]=b>>>24,c[h+2]=b>>>16&255,c[h+1]=b>>>8&255,c[h]=255&b)}return c},i.rotr32=function(d,o){return d>>>o|d<<32-o},i.rotl32=function(d,o){return d<<o|d>>>32-o},i.sum32=function(d,o){return d+o>>>0},i.sum32_3=function(d,o,c){return d+o+c>>>0},i.sum32_4=function(d,o,c,r){return d+o+c+r>>>0},i.sum32_5=function(d,o,c,r,h){return d+o+c+r+h>>>0},i.sum64=function(d,o,c,r){var h=d[o],b=r+d[o+1]>>>0,u=(b<r?1:0)+c+h;d[o]=u>>>0,d[o+1]=b},i.sum64_hi=function(d,o,c,r){return(o+r>>>0<o?1:0)+d+c>>>0},i.sum64_lo=function(d,o,c,r){return o+r>>>0},i.sum64_4_hi=function(d,o,c,r,h,b,u,m){var Z=0,p=o;return Z+=(p=p+r>>>0)<o?1:0,Z+=(p=p+b>>>0)<b?1:0,d+c+h+u+(Z+=(p=p+m>>>0)<m?1:0)>>>0},i.sum64_4_lo=function(d,o,c,r,h,b,u,m){return o+r+b+m>>>0},i.sum64_5_hi=function(d,o,c,r,h,b,u,m,Z,p){var Y=0,R=o;return Y+=(R=R+r>>>0)<o?1:0,Y+=(R=R+b>>>0)<b?1:0,Y+=(R=R+m>>>0)<m?1:0,d+c+h+u+Z+(Y+=(R=R+p>>>0)<p?1:0)>>>0},i.sum64_5_lo=function(d,o,c,r,h,b,u,m,Z,p){return o+r+b+m+p>>>0},i.rotr64_hi=function(d,o,c){return(o<<32-c|d>>>c)>>>0},i.rotr64_lo=function(d,o,c){return(d<<32-c|o>>>c)>>>0},i.shr64_hi=function(d,o,c){return d>>>c},i.shr64_lo=function(d,o,c){return(d<<32-c|o>>>c)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(g,C,i){var e=g("hash.js"),A=g("minimalistic-crypto-utils"),s=g("minimalistic-assert");function l(n){if(!(this instanceof l))return new l(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=A.toArray(n.entropy,n.entropyEnc||"hex"),d=A.toArray(n.nonce,n.nonceEnc||"hex"),o=A.toArray(n.pers,n.persEnc||"hex");s(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,d,o)}C.exports=l,l.prototype._init=function(n,a,d){var o=n.concat(a).concat(d);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var c=0;c<this.V.length;c++)this.K[c]=0,this.V[c]=1;this._update(o),this._reseed=1,this.reseedInterval=281474976710656},l.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},l.prototype._update=function(n){var a=this._hmac().update(this.V).update([0]);n&&(a=a.update(n)),this.K=a.digest(),this.V=this._hmac().update(this.V).digest(),n&&(this.K=this._hmac().update(this.V).update([1]).update(n).digest(),this.V=this._hmac().update(this.V).digest())},l.prototype.reseed=function(n,a,d,o){typeof a!="string"&&(o=d,d=a,a=null),n=A.toArray(n,a),d=A.toArray(d,o),s(n.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(n.concat(d||[])),this._reseed=1},l.prototype.generate=function(n,a,d,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof a!="string"&&(o=d,d=a,a=null),d&&(d=A.toArray(d,o||"hex"),this._update(d));for(var c=[];c.length<n;)this.V=this._hmac().update(this.V).digest(),c=c.concat(this.V);var r=c.slice(0,n);return this._update(d),this._reseed++,A.encode(r,a)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(g,C,i){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */i.read=function(e,A,s,l,n){var a,d,o=8*n-l-1,c=(1<<o)-1,r=c>>1,h=-7,b=s?n-1:0,u=s?-1:1,m=e[A+b];for(b+=u,a=m&(1<<-h)-1,m>>=-h,h+=o;h>0;a=256*a+e[A+b],b+=u,h-=8);for(d=a&(1<<-h)-1,a>>=-h,h+=l;h>0;d=256*d+e[A+b],b+=u,h-=8);if(a===0)a=1-r;else{if(a===c)return d?NaN:1/0*(m?-1:1);d+=Math.pow(2,l),a-=r}return(m?-1:1)*d*Math.pow(2,a-l)},i.write=function(e,A,s,l,n,a){var d,o,c,r=8*a-n-1,h=(1<<r)-1,b=h>>1,u=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=l?0:a-1,Z=l?1:-1,p=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(o=isNaN(A)?1:0,d=h):(d=Math.floor(Math.log(A)/Math.LN2),A*(c=Math.pow(2,-d))<1&&(d--,c*=2),(A+=d+b>=1?u/c:u*Math.pow(2,1-b))*c>=2&&(d++,c/=2),d+b>=h?(o=0,d=h):d+b>=1?(o=(A*c-1)*Math.pow(2,n),d+=b):(o=A*Math.pow(2,b-1)*Math.pow(2,n),d=0));n>=8;e[s+m]=255&o,m+=Z,o/=256,n-=8);for(d=d<<n|o,r+=n;r>0;e[s+m]=255&d,m+=Z,d/=256,r-=8);e[s+m-Z]|=128*p}},{}],440:[function(g,C,i){typeof Object.create=="function"?C.exports=function(e,A){A&&(e.super_=A,e.prototype=Object.create(A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:C.exports=function(e,A){if(A){e.super_=A;var s=function(){};s.prototype=A.prototype,e.prototype=new s,e.prototype.constructor=e}}},{}],441:[function(g,C,i){(function(e,A,s,l,n,a,d,o){(function(){/*!

		JSZip v3.10.1 - A JavaScript class for generating and reading zip files
		<http://stuartk.com/jszip>

		(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
		Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

		JSZip uses the library pako released under the MIT license :
		https://github.com/nodeca/pako/blob/main/LICENSE
		*/(function(c){typeof i=="object"&&C!==void 0?C.exports=c():(typeof window<"u"?window:A!==void 0?A:typeof self<"u"?self:this).JSZip=c()})(function(){return function c(r,h,b){function u(p,Y){if(!h[p]){if(!r[p]){var R=typeof g=="function"&&g;if(!Y&&R)return R(p,!0);if(m)return m(p,!0);var X=new Error("Cannot find module '"+p+"'");throw X.code="MODULE_NOT_FOUND",X}var H=h[p]={exports:{}};r[p][0].call(H.exports,function(S){return u(r[p][1][S]||S)},H,H.exports,c,r,h,b)}return h[p].exports}for(var m=typeof g=="function"&&g,Z=0;Z<b.length;Z++)u(b[Z]);return u}({1:[function(c,r,h){var b=c("./utils"),u=c("./support"),m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";h.encode=function(Z){for(var p,Y,R,X,H,S,z,v=[],K=0,V=Z.length,N=V,B=b.getTypeOf(Z)!=="string";K<Z.length;)N=V-K,R=B?(p=Z[K++],Y=K<V?Z[K++]:0,K<V?Z[K++]:0):(p=Z.charCodeAt(K++),Y=K<V?Z.charCodeAt(K++):0,K<V?Z.charCodeAt(K++):0),X=p>>2,H=(3&p)<<4|Y>>4,S=1<N?(15&Y)<<2|R>>6:64,z=2<N?63&R:64,v.push(m.charAt(X)+m.charAt(H)+m.charAt(S)+m.charAt(z));return v.join("")},h.decode=function(Z){var p,Y,R,X,H,S,z=0,v=0,K="data:";if(Z.substr(0,K.length)===K)throw new Error("Invalid base64 input, it looks like a data url.");var V,N=3*(Z=Z.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(Z.charAt(Z.length-1)===m.charAt(64)&&N--,Z.charAt(Z.length-2)===m.charAt(64)&&N--,N%1!=0)throw new Error("Invalid base64 input, bad content length.");for(V=u.uint8array?new Uint8Array(0|N):new Array(0|N);z<Z.length;)p=m.indexOf(Z.charAt(z++))<<2|(X=m.indexOf(Z.charAt(z++)))>>4,Y=(15&X)<<4|(H=m.indexOf(Z.charAt(z++)))>>2,R=(3&H)<<6|(S=m.indexOf(Z.charAt(z++))),V[v++]=p,H!==64&&(V[v++]=Y),S!==64&&(V[v++]=R);return V}},{"./support":30,"./utils":32}],2:[function(c,r,h){var b=c("./external"),u=c("./stream/DataWorker"),m=c("./stream/Crc32Probe"),Z=c("./stream/DataLengthProbe");function p(Y,R,X,H,S){this.compressedSize=Y,this.uncompressedSize=R,this.crc32=X,this.compression=H,this.compressedContent=S}p.prototype={getContentWorker:function(){var Y=new u(b.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Z("data_length")),R=this;return Y.on("end",function(){if(this.streamInfo.data_length!==R.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),Y},getCompressedWorker:function(){return new u(b.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},p.createWorkerFrom=function(Y,R,X){return Y.pipe(new m).pipe(new Z("uncompressedSize")).pipe(R.compressWorker(X)).pipe(new Z("compressedSize")).withStreamInfo("compression",R)},r.exports=p},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(c,r,h){var b=c("./stream/GenericWorker");h.STORE={magic:"\0\0",compressWorker:function(){return new b("STORE compression")},uncompressWorker:function(){return new b("STORE decompression")}},h.DEFLATE=c("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(c,r,h){var b=c("./utils"),u=function(){for(var m,Z=[],p=0;p<256;p++){m=p;for(var Y=0;Y<8;Y++)m=1&m?3988292384^m>>>1:m>>>1;Z[p]=m}return Z}();r.exports=function(m,Z){return m!==void 0&&m.length?b.getTypeOf(m)!=="string"?function(p,Y,R,X){var H=u,S=0+R;p^=-1;for(var z=0;z<S;z++)p=p>>>8^H[255&(p^Y[z])];return-1^p}(0|Z,m,m.length):function(p,Y,R,X){var H=u,S=0+R;p^=-1;for(var z=0;z<S;z++)p=p>>>8^H[255&(p^Y.charCodeAt(z))];return-1^p}(0|Z,m,m.length):0}},{"./utils":32}],5:[function(c,r,h){h.base64=!1,h.binary=!1,h.dir=!1,h.createFolders=!0,h.date=null,h.compression=null,h.compressionOptions=null,h.comment=null,h.unixPermissions=null,h.dosPermissions=null},{}],6:[function(c,r,h){var b;b=typeof Promise<"u"?Promise:c("lie"),r.exports={Promise:b}},{lie:37}],7:[function(c,r,h){var b=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",u=c("pako"),m=c("./utils"),Z=c("./stream/GenericWorker"),p=b?"uint8array":"array";function Y(R,X){Z.call(this,"FlateWorker/"+R),this._pako=null,this._pakoAction=R,this._pakoOptions=X,this.meta={}}h.magic="\b\0",m.inherits(Y,Z),Y.prototype.processChunk=function(R){this.meta=R.meta,this._pako===null&&this._createPako(),this._pako.push(m.transformTo(p,R.data),!1)},Y.prototype.flush=function(){Z.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},Y.prototype.cleanUp=function(){Z.prototype.cleanUp.call(this),this._pako=null},Y.prototype._createPako=function(){this._pako=new u[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var R=this;this._pako.onData=function(X){R.push({data:X,meta:R.meta})}},h.compressWorker=function(R){return new Y("Deflate",R)},h.uncompressWorker=function(){return new Y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(c,r,h){function b(H,S){var z,v="";for(z=0;z<S;z++)v+=String.fromCharCode(255&H),H>>>=8;return v}function u(H,S,z,v,K,V){var N,B,G=H.file,w=H.compression,W=V!==p.utf8encode,y=m.transformTo("string",V(G.name)),f=m.transformTo("string",p.utf8encode(G.name)),D=G.comment,F=m.transformTo("string",V(D)),T=m.transformTo("string",p.utf8encode(D)),Q=f.length!==G.name.length,P=T.length!==D.length,L="",E="",J="",k=G.dir,j=G.date,q={crc32:0,compressedSize:0,uncompressedSize:0};S&&!z||(q.crc32=H.crc32,q.compressedSize=H.compressedSize,q.uncompressedSize=H.uncompressedSize);var tg=0;S&&(tg|=8),W||!Q&&!P||(tg|=2048);var Cg=0,x=0;k&&(Cg|=16),K==="UNIX"?(x=798,Cg|=function(Ag,O){var _=Ag;return Ag||(_=O?16893:33204),(65535&_)<<16}(G.unixPermissions,k)):(x=20,Cg|=function(Ag){return 63&(Ag||0)}(G.dosPermissions)),N=j.getUTCHours(),N<<=6,N|=j.getUTCMinutes(),N<<=5,N|=j.getUTCSeconds()/2,B=j.getUTCFullYear()-1980,B<<=4,B|=j.getUTCMonth()+1,B<<=5,B|=j.getUTCDate(),Q&&(E=b(1,1)+b(Y(y),4)+f,L+="up"+b(E.length,2)+E),P&&(J=b(1,1)+b(Y(F),4)+T,L+="uc"+b(J.length,2)+J);var sg="";return sg+=`
\0`,sg+=b(tg,2),sg+=w.magic,sg+=b(N,2),sg+=b(B,2),sg+=b(q.crc32,4),sg+=b(q.compressedSize,4),sg+=b(q.uncompressedSize,4),sg+=b(y.length,2),sg+=b(L.length,2),{fileRecord:R.LOCAL_FILE_HEADER+sg+y+L,dirRecord:R.CENTRAL_FILE_HEADER+b(x,2)+sg+b(F.length,2)+"\0\0\0\0"+b(Cg,4)+b(v,4)+y+L+F}}var m=c("../utils"),Z=c("../stream/GenericWorker"),p=c("../utf8"),Y=c("../crc32"),R=c("../signature");function X(H,S,z,v){Z.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=S,this.zipPlatform=z,this.encodeFileName=v,this.streamFiles=H,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}m.inherits(X,Z),X.prototype.push=function(H){var S=H.meta.percent||0,z=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(H):(this.bytesWritten+=H.data.length,Z.prototype.push.call(this,{data:H.data,meta:{currentFile:this.currentFile,percent:z?(S+100*(z-v-1))/z:100}}))},X.prototype.openedSource=function(H){this.currentSourceOffset=this.bytesWritten,this.currentFile=H.file.name;var S=this.streamFiles&&!H.file.dir;if(S){var z=u(H,S,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:z.fileRecord,meta:{percent:0}})}else this.accumulate=!0},X.prototype.closedSource=function(H){this.accumulate=!1;var S=this.streamFiles&&!H.file.dir,z=u(H,S,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(z.dirRecord),S)this.push({data:function(v){return R.DATA_DESCRIPTOR+b(v.crc32,4)+b(v.compressedSize,4)+b(v.uncompressedSize,4)}(H),meta:{percent:100}});else for(this.push({data:z.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},X.prototype.flush=function(){for(var H=this.bytesWritten,S=0;S<this.dirRecords.length;S++)this.push({data:this.dirRecords[S],meta:{percent:100}});var z=this.bytesWritten-H,v=function(K,V,N,B,G){var w=m.transformTo("string",G(B));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+b(K,2)+b(K,2)+b(V,4)+b(N,4)+b(w.length,2)+w}(this.dirRecords.length,z,H,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},X.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},X.prototype.registerPrevious=function(H){this._sources.push(H);var S=this;return H.on("data",function(z){S.processChunk(z)}),H.on("end",function(){S.closedSource(S.previous.streamInfo),S._sources.length?S.prepareNextSource():S.end()}),H.on("error",function(z){S.error(z)}),this},X.prototype.resume=function(){return!!Z.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},X.prototype.error=function(H){var S=this._sources;if(!Z.prototype.error.call(this,H))return!1;for(var z=0;z<S.length;z++)try{S[z].error(H)}catch{}return!0},X.prototype.lock=function(){Z.prototype.lock.call(this);for(var H=this._sources,S=0;S<H.length;S++)H[S].lock()},r.exports=X},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(c,r,h){var b=c("../compressions"),u=c("./ZipFileWorker");h.generateWorker=function(m,Z,p){var Y=new u(Z.streamFiles,p,Z.platform,Z.encodeFileName),R=0;try{m.forEach(function(X,H){R++;var S=function(V,N){var B=V||N,G=b[B];if(!G)throw new Error(B+" is not a valid compression method !");return G}(H.options.compression,Z.compression),z=H.options.compressionOptions||Z.compressionOptions||{},v=H.dir,K=H.date;H._compressWorker(S,z).withStreamInfo("file",{name:X,dir:v,date:K,comment:H.comment||"",unixPermissions:H.unixPermissions,dosPermissions:H.dosPermissions}).pipe(Y)}),Y.entriesCount=R}catch(X){Y.error(X)}return Y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(c,r,h){function b(){if(!(this instanceof b))return new b;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 u=new b;for(var m in this)typeof this[m]!="function"&&(u[m]=this[m]);return u}}(b.prototype=c("./object")).loadAsync=c("./load"),b.support=c("./support"),b.defaults=c("./defaults"),b.version="3.10.1",b.loadAsync=function(u,m){return new b().loadAsync(u,m)},b.external=c("./external"),r.exports=b},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(c,r,h){var b=c("./utils"),u=c("./external"),m=c("./utf8"),Z=c("./zipEntries"),p=c("./stream/Crc32Probe"),Y=c("./nodejsUtils");function R(X){return new u.Promise(function(H,S){var z=X.decompressed.getContentWorker().pipe(new p);z.on("error",function(v){S(v)}).on("end",function(){z.streamInfo.crc32!==X.decompressed.crc32?S(new Error("Corrupted zip : CRC32 mismatch")):H()}).resume()})}r.exports=function(X,H){var S=this;return H=b.extend(H||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:m.utf8decode}),Y.isNode&&Y.isStream(X)?u.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):b.prepareContent("the loaded zip file",X,!0,H.optimizedBinaryString,H.base64).then(function(z){var v=new Z(H);return v.load(z),v}).then(function(z){var v=[u.Promise.resolve(z)],K=z.files;if(H.checkCRC32)for(var V=0;V<K.length;V++)v.push(R(K[V]));return u.Promise.all(v)}).then(function(z){for(var v=z.shift(),K=v.files,V=0;V<K.length;V++){var N=K[V],B=N.fileNameStr,G=b.resolve(N.fileNameStr);S.file(G,N.decompressed,{binary:!0,optimizedBinaryString:!0,date:N.date,dir:N.dir,comment:N.fileCommentStr.length?N.fileCommentStr:null,unixPermissions:N.unixPermissions,dosPermissions:N.dosPermissions,createFolders:H.createFolders}),N.dir||(S.file(G).unsafeOriginalName=B)}return v.zipComment.length&&(S.comment=v.zipComment),S})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(c,r,h){var b=c("../utils"),u=c("../stream/GenericWorker");function m(Z,p){u.call(this,"Nodejs stream input adapter for "+Z),this._upstreamEnded=!1,this._bindStream(p)}b.inherits(m,u),m.prototype._bindStream=function(Z){var p=this;(this._stream=Z).pause(),Z.on("data",function(Y){p.push({data:Y,meta:{percent:0}})}).on("error",function(Y){p.isPaused?this.generatedError=Y:p.error(Y)}).on("end",function(){p.isPaused?p._upstreamEnded=!0:p.end()})},m.prototype.pause=function(){return!!u.prototype.pause.call(this)&&(this._stream.pause(),!0)},m.prototype.resume=function(){return!!u.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=m},{"../stream/GenericWorker":28,"../utils":32}],13:[function(c,r,h){var b=c("readable-stream").Readable;function u(m,Z,p){b.call(this,Z),this._helper=m;var Y=this;m.on("data",function(R,X){Y.push(R)||Y._helper.pause(),p&&p(X)}).on("error",function(R){Y.emit("error",R)}).on("end",function(){Y.push(null)})}c("../utils").inherits(u,b),u.prototype._read=function(){this._helper.resume()},r.exports=u},{"../utils":32,"readable-stream":16}],14:[function(c,r,h){r.exports={isNode:s!==void 0,newBufferFrom:function(b,u){if(s.from&&s.from!==Uint8Array.from)return s.from(b,u);if(typeof b=="number")throw new Error('The "data" argument must not be a number');return new s(b,u)},allocBuffer:function(b){if(s.alloc)return s.alloc(b);var u=new s(b);return u.fill(0),u},isBuffer:function(b){return s.isBuffer(b)},isStream:function(b){return b&&typeof b.on=="function"&&typeof b.pause=="function"&&typeof b.resume=="function"}}},{}],15:[function(c,r,h){function b(G,w,W){var y,f=m.getTypeOf(w),D=m.extend(W||{},Y);D.date=D.date||new Date,D.compression!==null&&(D.compression=D.compression.toUpperCase()),typeof D.unixPermissions=="string"&&(D.unixPermissions=parseInt(D.unixPermissions,8)),D.unixPermissions&&16384&D.unixPermissions&&(D.dir=!0),D.dosPermissions&&16&D.dosPermissions&&(D.dir=!0),D.dir&&(G=K(G)),D.createFolders&&(y=v(G))&&V.call(this,y,!0);var F=f==="string"&&D.binary===!1&&D.base64===!1;W&&W.binary!==void 0||(D.binary=!F),(w instanceof R&&w.uncompressedSize===0||D.dir||!w||w.length===0)&&(D.base64=!1,D.binary=!0,w="",D.compression="STORE",f="string");var T;T=w instanceof R||w instanceof Z?w:S.isNode&&S.isStream(w)?new z(G,w):m.prepareContent(G,w,D.binary,D.optimizedBinaryString,D.base64);var Q=new X(G,T,D);this.files[G]=Q}var u=c("./utf8"),m=c("./utils"),Z=c("./stream/GenericWorker"),p=c("./stream/StreamHelper"),Y=c("./defaults"),R=c("./compressedObject"),X=c("./zipObject"),H=c("./generate"),S=c("./nodejsUtils"),z=c("./nodejs/NodejsStreamInputAdapter"),v=function(G){G.slice(-1)==="/"&&(G=G.substring(0,G.length-1));var w=G.lastIndexOf("/");return 0<w?G.substring(0,w):""},K=function(G){return G.slice(-1)!=="/"&&(G+="/"),G},V=function(G,w){return w=w!==void 0?w:Y.createFolders,G=K(G),this.files[G]||b.call(this,G,null,{dir:!0,createFolders:w}),this.files[G]};function N(G){return Object.prototype.toString.call(G)==="[object RegExp]"}var B={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(G){var w,W,y;for(w in this.files)y=this.files[w],(W=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&G(W,y)},filter:function(G){var w=[];return this.forEach(function(W,y){G(W,y)&&w.push(y)}),w},file:function(G,w,W){if(arguments.length!==1)return G=this.root+G,b.call(this,G,w,W),this;if(N(G)){var y=G;return this.filter(function(D,F){return!F.dir&&y.test(D)})}var f=this.files[this.root+G];return f&&!f.dir?f:null},folder:function(G){if(!G)return this;if(N(G))return this.filter(function(f,D){return D.dir&&G.test(f)});var w=this.root+G,W=V.call(this,w),y=this.clone();return y.root=W.name,y},remove:function(G){G=this.root+G;var w=this.files[G];if(w||(G.slice(-1)!=="/"&&(G+="/"),w=this.files[G]),w&&!w.dir)delete this.files[G];else for(var W=this.filter(function(f,D){return D.name.slice(0,G.length)===G}),y=0;y<W.length;y++)delete this.files[W[y].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(G){var w,W={};try{if((W=m.extend(G||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:u.utf8encode})).type=W.type.toLowerCase(),W.compression=W.compression.toUpperCase(),W.type==="binarystring"&&(W.type="string"),!W.type)throw new Error("No output type specified.");m.checkSupport(W.type),W.platform!=="darwin"&&W.platform!=="freebsd"&&W.platform!=="linux"&&W.platform!=="sunos"||(W.platform="UNIX"),W.platform==="win32"&&(W.platform="DOS");var y=W.comment||this.comment||"";w=H.generateWorker(this,W,y)}catch(f){(w=new Z("error")).error(f)}return new p(w,W.type||"string",W.mimeType)},generateAsync:function(G,w){return this.generateInternalStream(G).accumulate(w)},generateNodeStream:function(G,w){return(G=G||{}).type||(G.type="nodebuffer"),this.generateInternalStream(G).toNodejsStream(w)}};r.exports=B},{"./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(c,r,h){r.exports=c("stream")},{stream:void 0}],17:[function(c,r,h){var b=c("./DataReader");function u(m){b.call(this,m);for(var Z=0;Z<this.data.length;Z++)m[Z]=255&m[Z]}c("../utils").inherits(u,b),u.prototype.byteAt=function(m){return this.data[this.zero+m]},u.prototype.lastIndexOfSignature=function(m){for(var Z=m.charCodeAt(0),p=m.charCodeAt(1),Y=m.charCodeAt(2),R=m.charCodeAt(3),X=this.length-4;0<=X;--X)if(this.data[X]===Z&&this.data[X+1]===p&&this.data[X+2]===Y&&this.data[X+3]===R)return X-this.zero;return-1},u.prototype.readAndCheckSignature=function(m){var Z=m.charCodeAt(0),p=m.charCodeAt(1),Y=m.charCodeAt(2),R=m.charCodeAt(3),X=this.readData(4);return Z===X[0]&&p===X[1]&&Y===X[2]&&R===X[3]},u.prototype.readData=function(m){if(this.checkOffset(m),m===0)return[];var Z=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,Z},r.exports=u},{"../utils":32,"./DataReader":18}],18:[function(c,r,h){var b=c("../utils");function u(m){this.data=m,this.length=m.length,this.index=0,this.zero=0}u.prototype={checkOffset:function(m){this.checkIndex(this.index+m)},checkIndex:function(m){if(this.length<this.zero+m||m<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+m+"). Corrupted zip ?")},setIndex:function(m){this.checkIndex(m),this.index=m},skip:function(m){this.setIndex(this.index+m)},byteAt:function(){},readInt:function(m){var Z,p=0;for(this.checkOffset(m),Z=this.index+m-1;Z>=this.index;Z--)p=(p<<8)+this.byteAt(Z);return this.index+=m,p},readString:function(m){return b.transformTo("string",this.readData(m))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var m=this.readInt(4);return new Date(Date.UTC(1980+(m>>25&127),(m>>21&15)-1,m>>16&31,m>>11&31,m>>5&63,(31&m)<<1))}},r.exports=u},{"../utils":32}],19:[function(c,r,h){var b=c("./Uint8ArrayReader");function u(m){b.call(this,m)}c("../utils").inherits(u,b),u.prototype.readData=function(m){this.checkOffset(m);var Z=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,Z},r.exports=u},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(c,r,h){var b=c("./DataReader");function u(m){b.call(this,m)}c("../utils").inherits(u,b),u.prototype.byteAt=function(m){return this.data.charCodeAt(this.zero+m)},u.prototype.lastIndexOfSignature=function(m){return this.data.lastIndexOf(m)-this.zero},u.prototype.readAndCheckSignature=function(m){return m===this.readData(4)},u.prototype.readData=function(m){this.checkOffset(m);var Z=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,Z},r.exports=u},{"../utils":32,"./DataReader":18}],21:[function(c,r,h){var b=c("./ArrayReader");function u(m){b.call(this,m)}c("../utils").inherits(u,b),u.prototype.readData=function(m){if(this.checkOffset(m),m===0)return new Uint8Array(0);var Z=this.data.subarray(this.zero+this.index,this.zero+this.index+m);return this.index+=m,Z},r.exports=u},{"../utils":32,"./ArrayReader":17}],22:[function(c,r,h){var b=c("../utils"),u=c("../support"),m=c("./ArrayReader"),Z=c("./StringReader"),p=c("./NodeBufferReader"),Y=c("./Uint8ArrayReader");r.exports=function(R){var X=b.getTypeOf(R);return b.checkSupport(X),X!=="string"||u.uint8array?X==="nodebuffer"?new p(R):u.uint8array?new Y(b.transformTo("uint8array",R)):new m(b.transformTo("array",R)):new Z(R)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(c,r,h){h.LOCAL_FILE_HEADER="PK",h.CENTRAL_FILE_HEADER="PK",h.CENTRAL_DIRECTORY_END="PK",h.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",h.ZIP64_CENTRAL_DIRECTORY_END="PK",h.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(c,r,h){var b=c("./GenericWorker"),u=c("../utils");function m(Z){b.call(this,"ConvertWorker to "+Z),this.destType=Z}u.inherits(m,b),m.prototype.processChunk=function(Z){this.push({data:u.transformTo(this.destType,Z.data),meta:Z.meta})},r.exports=m},{"../utils":32,"./GenericWorker":28}],25:[function(c,r,h){var b=c("./GenericWorker"),u=c("../crc32");function m(){b.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}c("../utils").inherits(m,b),m.prototype.processChunk=function(Z){this.streamInfo.crc32=u(Z.data,this.streamInfo.crc32||0),this.push(Z)},r.exports=m},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(c,r,h){var b=c("../utils"),u=c("./GenericWorker");function m(Z){u.call(this,"DataLengthProbe for "+Z),this.propName=Z,this.withStreamInfo(Z,0)}b.inherits(m,u),m.prototype.processChunk=function(Z){if(Z){var p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+Z.data.length}u.prototype.processChunk.call(this,Z)},r.exports=m},{"../utils":32,"./GenericWorker":28}],27:[function(c,r,h){var b=c("../utils"),u=c("./GenericWorker");function m(Z){u.call(this,"DataWorker");var p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,Z.then(function(Y){p.dataIsReady=!0,p.data=Y,p.max=Y&&Y.length||0,p.type=b.getTypeOf(Y),p.isPaused||p._tickAndRepeat()},function(Y){p.error(Y)})}b.inherits(m,u),m.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this.data=null},m.prototype.resume=function(){return!!u.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,b.delay(this._tickAndRepeat,[],this)),!0)},m.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(b.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},m.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var Z=null,p=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":Z=this.data.substring(this.index,p);break;case"uint8array":Z=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":Z=this.data.slice(this.index,p)}return this.index=p,this.push({data:Z,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=m},{"../utils":32,"./GenericWorker":28}],28:[function(c,r,h){function b(u){this.name=u||"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}b.prototype={push:function(u){this.emit("data",u)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(u){this.emit("error",u)}return!0},error:function(u){return!this.isFinished&&(this.isPaused?this.generatedError=u:(this.isFinished=!0,this.emit("error",u),this.previous&&this.previous.error(u),this.cleanUp()),!0)},on:function(u,m){return this._listeners[u].push(m),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(u,m){if(this._listeners[u])for(var Z=0;Z<this._listeners[u].length;Z++)this._listeners[u][Z].call(this,m)},pipe:function(u){return u.registerPrevious(this)},registerPrevious:function(u){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=u.streamInfo,this.mergeStreamInfo(),this.previous=u;var m=this;return u.on("data",function(Z){m.processChunk(Z)}),u.on("end",function(){m.end()}),u.on("error",function(Z){m.error(Z)}),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 u=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),u=!0),this.previous&&this.previous.resume(),!u},flush:function(){},processChunk:function(u){this.push(u)},withStreamInfo:function(u,m){return this.extraStreamInfo[u]=m,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var u in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,u)&&(this.streamInfo[u]=this.extraStreamInfo[u])},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 u="Worker "+this.name;return this.previous?this.previous+" -> "+u:u}},r.exports=b},{}],29:[function(c,r,h){var b=c("../utils"),u=c("./ConvertWorker"),m=c("./GenericWorker"),Z=c("../base64"),p=c("../support"),Y=c("../external"),R=null;if(p.nodestream)try{R=c("../nodejs/NodejsStreamOutputAdapter")}catch{}function X(H,S,z){var v=S;switch(S){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=S,this._mimeType=z,b.checkSupport(v),this._worker=H.pipe(new u(v)),H.lock()}catch(K){this._worker=new m("error"),this._worker.error(K)}}X.prototype={accumulate:function(H){return function(S,z){return new Y.Promise(function(v,K){var V=[],N=S._internalType,B=S._outputType,G=S._mimeType;S.on("data",function(w,W){V.push(w),z&&z(W)}).on("error",function(w){V=[],K(w)}).on("end",function(){try{var w=function(W,y,f){switch(W){case"blob":return b.newBlob(b.transformTo("arraybuffer",y),f);case"base64":return Z.encode(y);default:return b.transformTo(W,y)}}(B,function(W,y){var f,D=0,F=null,T=0;for(f=0;f<y.length;f++)T+=y[f].length;switch(W){case"string":return y.join("");case"array":return Array.prototype.concat.apply([],y);case"uint8array":for(F=new Uint8Array(T),f=0;f<y.length;f++)F.set(y[f],D),D+=y[f].length;return F;case"nodebuffer":return s.concat(y);default:throw new Error("concat : unsupported type '"+W+"'")}}(N,V),G);v(w)}catch(W){K(W)}V=[]}).resume()})}(this,H)},on:function(H,S){var z=this;return H==="data"?this._worker.on(H,function(v){S.call(z,v.data,v.meta)}):this._worker.on(H,function(){b.delay(S,arguments,z)}),this},resume:function(){return b.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(H){if(b.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new R(this,{objectMode:this._outputType!=="nodebuffer"},H)}},r.exports=X},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(c,r,h){if(h.base64=!0,h.array=!0,h.string=!0,h.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",h.nodebuffer=s!==void 0,h.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")h.blob=!1;else{var b=new ArrayBuffer(0);try{h.blob=new Blob([b],{type:"application/zip"}).size===0}catch{try{var u=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);u.append(b),h.blob=u.getBlob("application/zip").size===0}catch{h.blob=!1}}}try{h.nodestream=!!c("readable-stream").Readable}catch{h.nodestream=!1}},{"readable-stream":16}],31:[function(c,r,h){for(var b=c("./utils"),u=c("./support"),m=c("./nodejsUtils"),Z=c("./stream/GenericWorker"),p=new Array(256),Y=0;Y<256;Y++)p[Y]=252<=Y?6:248<=Y?5:240<=Y?4:224<=Y?3:192<=Y?2:1;function R(){Z.call(this,"utf-8 decode"),this.leftOver=null}function X(){Z.call(this,"utf-8 encode")}p[254]=p[254]=1,h.utf8encode=function(H){return u.nodebuffer?m.newBufferFrom(H,"utf-8"):function(S){var z,v,K,V,N,B=S.length,G=0;for(V=0;V<B;V++)(64512&(v=S.charCodeAt(V)))==55296&&V+1<B&&(64512&(K=S.charCodeAt(V+1)))==56320&&(v=65536+(v-55296<<10)+(K-56320),V++),G+=v<128?1:v<2048?2:v<65536?3:4;for(z=u.uint8array?new Uint8Array(G):new Array(G),V=N=0;N<G;V++)(64512&(v=S.charCodeAt(V)))==55296&&V+1<B&&(64512&(K=S.charCodeAt(V+1)))==56320&&(v=65536+(v-55296<<10)+(K-56320),V++),v<128?z[N++]=v:(v<2048?z[N++]=192|v>>>6:(v<65536?z[N++]=224|v>>>12:(z[N++]=240|v>>>18,z[N++]=128|v>>>12&63),z[N++]=128|v>>>6&63),z[N++]=128|63&v);return z}(H)},h.utf8decode=function(H){return u.nodebuffer?b.transformTo("nodebuffer",H).toString("utf-8"):function(S){var z,v,K,V,N=S.length,B=new Array(2*N);for(z=v=0;z<N;)if((K=S[z++])<128)B[v++]=K;else if(4<(V=p[K]))B[v++]=65533,z+=V-1;else{for(K&=V===2?31:V===3?15:7;1<V&&z<N;)K=K<<6|63&S[z++],V--;1<V?B[v++]=65533:K<65536?B[v++]=K:(K-=65536,B[v++]=55296|K>>10&1023,B[v++]=56320|1023&K)}return B.length!==v&&(B.subarray?B=B.subarray(0,v):B.length=v),b.applyFromCharCode(B)}(H=b.transformTo(u.uint8array?"uint8array":"array",H))},b.inherits(R,Z),R.prototype.processChunk=function(H){var S=b.transformTo(u.uint8array?"uint8array":"array",H.data);if(this.leftOver&&this.leftOver.length){if(u.uint8array){var z=S;(S=new Uint8Array(z.length+this.leftOver.length)).set(this.leftOver,0),S.set(z,this.leftOver.length)}else S=this.leftOver.concat(S);this.leftOver=null}var v=function(V,N){var B;for((N=N||V.length)>V.length&&(N=V.length),B=N-1;0<=B&&(192&V[B])==128;)B--;return B<0||B===0?N:B+p[V[B]]>N?B:N}(S),K=S;v!==S.length&&(u.uint8array?(K=S.subarray(0,v),this.leftOver=S.subarray(v,S.length)):(K=S.slice(0,v),this.leftOver=S.slice(v,S.length))),this.push({data:h.utf8decode(K),meta:H.meta})},R.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:h.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},h.Utf8DecodeWorker=R,b.inherits(X,Z),X.prototype.processChunk=function(H){this.push({data:h.utf8encode(H.data),meta:H.meta})},h.Utf8EncodeWorker=X},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(c,r,h){var b=c("./support"),u=c("./base64"),m=c("./nodejsUtils"),Z=c("./external");function p(z){return z}function Y(z,v){for(var K=0;K<z.length;++K)v[K]=255&z.charCodeAt(K);return v}c("setimmediate"),h.newBlob=function(z,v){h.checkSupport("blob");try{return new Blob([z],{type:v})}catch{try{var K=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return K.append(z),K.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var R={stringifyByChunk:function(z,v,K){var V=[],N=0,B=z.length;if(B<=K)return String.fromCharCode.apply(null,z);for(;N<B;)v==="array"||v==="nodebuffer"?V.push(String.fromCharCode.apply(null,z.slice(N,Math.min(N+K,B)))):V.push(String.fromCharCode.apply(null,z.subarray(N,Math.min(N+K,B)))),N+=K;return V.join("")},stringifyByChar:function(z){for(var v="",K=0;K<z.length;K++)v+=String.fromCharCode(z[K]);return v},applyCanBeUsed:{uint8array:function(){try{return b.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return b.nodebuffer&&String.fromCharCode.apply(null,m.allocBuffer(1)).length===1}catch{return!1}}()}};function X(z){var v=65536,K=h.getTypeOf(z),V=!0;if(K==="uint8array"?V=R.applyCanBeUsed.uint8array:K==="nodebuffer"&&(V=R.applyCanBeUsed.nodebuffer),V)for(;1<v;)try{return R.stringifyByChunk(z,K,v)}catch{v=Math.floor(v/2)}return R.stringifyByChar(z)}function H(z,v){for(var K=0;K<z.length;K++)v[K]=z[K];return v}h.applyFromCharCode=X;var S={};S.string={string:p,array:function(z){return Y(z,new Array(z.length))},arraybuffer:function(z){return S.string.uint8array(z).buffer},uint8array:function(z){return Y(z,new Uint8Array(z.length))},nodebuffer:function(z){return Y(z,m.allocBuffer(z.length))}},S.array={string:X,array:p,arraybuffer:function(z){return new Uint8Array(z).buffer},uint8array:function(z){return new Uint8Array(z)},nodebuffer:function(z){return m.newBufferFrom(z)}},S.arraybuffer={string:function(z){return X(new Uint8Array(z))},array:function(z){return H(new Uint8Array(z),new Array(z.byteLength))},arraybuffer:p,uint8array:function(z){return new Uint8Array(z)},nodebuffer:function(z){return m.newBufferFrom(new Uint8Array(z))}},S.uint8array={string:X,array:function(z){return H(z,new Array(z.length))},arraybuffer:function(z){return z.buffer},uint8array:p,nodebuffer:function(z){return m.newBufferFrom(z)}},S.nodebuffer={string:X,array:function(z){return H(z,new Array(z.length))},arraybuffer:function(z){return S.nodebuffer.uint8array(z).buffer},uint8array:function(z){return H(z,new Uint8Array(z.length))},nodebuffer:p},h.transformTo=function(z,v){if(v=v||"",!z)return v;h.checkSupport(z);var K=h.getTypeOf(v);return S[K][z](v)},h.resolve=function(z){for(var v=z.split("/"),K=[],V=0;V<v.length;V++){var N=v[V];N==="."||N===""&&V!==0&&V!==v.length-1||(N===".."?K.pop():K.push(N))}return K.join("/")},h.getTypeOf=function(z){return typeof z=="string"?"string":Object.prototype.toString.call(z)==="[object Array]"?"array":b.nodebuffer&&m.isBuffer(z)?"nodebuffer":b.uint8array&&z instanceof Uint8Array?"uint8array":b.arraybuffer&&z instanceof ArrayBuffer?"arraybuffer":void 0},h.checkSupport=function(z){if(!b[z.toLowerCase()])throw new Error(z+" is not supported by this platform")},h.MAX_VALUE_16BITS=65535,h.MAX_VALUE_32BITS=-1,h.pretty=function(z){var v,K,V="";for(K=0;K<(z||"").length;K++)V+="\\x"+((v=z.charCodeAt(K))<16?"0":"")+v.toString(16).toUpperCase();return V},h.delay=function(z,v,K){o(function(){z.apply(K||null,v||[])})},h.inherits=function(z,v){function K(){}K.prototype=v.prototype,z.prototype=new K},h.extend=function(){var z,v,K={};for(z=0;z<arguments.length;z++)for(v in arguments[z])Object.prototype.hasOwnProperty.call(arguments[z],v)&&K[v]===void 0&&(K[v]=arguments[z][v]);return K},h.prepareContent=function(z,v,K,V,N){return Z.Promise.resolve(v).then(function(B){return b.blob&&(B instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(B))!==-1)&&typeof FileReader<"u"?new Z.Promise(function(G,w){var W=new FileReader;W.onload=function(y){G(y.target.result)},W.onerror=function(y){w(y.target.error)},W.readAsArrayBuffer(B)}):B}).then(function(B){var G=h.getTypeOf(B);return G?(G==="arraybuffer"?B=h.transformTo("uint8array",B):G==="string"&&(N?B=u.decode(B):K&&V!==!0&&(B=function(w){return Y(w,b.uint8array?new Uint8Array(w.length):new Array(w.length))}(B))),B):Z.Promise.reject(new Error("Can't read the data of '"+z+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(c,r,h){var b=c("./reader/readerFor"),u=c("./utils"),m=c("./signature"),Z=c("./zipEntry"),p=c("./support");function Y(R){this.files=[],this.loadOptions=R}Y.prototype={checkSignature:function(R){if(!this.reader.readAndCheckSignature(R)){this.reader.index-=4;var X=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+u.pretty(X)+", expected "+u.pretty(R)+")")}},isSignature:function(R,X){var H=this.reader.index;this.reader.setIndex(R);var S=this.reader.readString(4)===X;return this.reader.setIndex(H),S},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 R=this.reader.readData(this.zipCommentLength),X=p.uint8array?"uint8array":"array",H=u.transformTo(X,R);this.zipComment=this.loadOptions.decodeFileName(H)},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 R,X,H,S=this.zip64EndOfCentralSize-44;0<S;)R=this.reader.readInt(2),X=this.reader.readInt(4),H=this.reader.readData(X),this.zip64ExtensibleData[R]={id:R,length:X,value:H}},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 R,X;for(R=0;R<this.files.length;R++)X=this.files[R],this.reader.setIndex(X.localHeaderOffset),this.checkSignature(m.LOCAL_FILE_HEADER),X.readLocalPart(this.reader),X.handleUTF8(),X.processAttributes()},readCentralDir:function(){var R;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(m.CENTRAL_FILE_HEADER);)(R=new Z({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(R);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 R=this.reader.lastIndexOfSignature(m.CENTRAL_DIRECTORY_END);if(R<0)throw this.isSignature(0,m.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(R);var X=R;if(this.checkSignature(m.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===u.MAX_VALUE_16BITS||this.diskWithCentralDirStart===u.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===u.MAX_VALUE_16BITS||this.centralDirRecords===u.MAX_VALUE_16BITS||this.centralDirSize===u.MAX_VALUE_32BITS||this.centralDirOffset===u.MAX_VALUE_32BITS){if(this.zip64=!0,(R=this.reader.lastIndexOfSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(R),this.checkSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,m.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(m.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(m.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var H=this.centralDirOffset+this.centralDirSize;this.zip64&&(H+=20,H+=12+this.zip64EndOfCentralSize);var S=X-H;if(0<S)this.isSignature(X,m.CENTRAL_FILE_HEADER)||(this.reader.zero=S);else if(S<0)throw new Error("Corrupted zip: missing "+Math.abs(S)+" bytes.")},prepareReader:function(R){this.reader=b(R)},load:function(R){this.prepareReader(R),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=Y},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(c,r,h){var b=c("./reader/readerFor"),u=c("./utils"),m=c("./compressedObject"),Z=c("./crc32"),p=c("./utf8"),Y=c("./compressions"),R=c("./support");function X(H,S){this.options=H,this.loadOptions=S}X.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(H){var S,z;if(H.skip(22),this.fileNameLength=H.readInt(2),z=H.readInt(2),this.fileName=H.readData(this.fileNameLength),H.skip(z),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((S=function(v){for(var K in Y)if(Object.prototype.hasOwnProperty.call(Y,K)&&Y[K].magic===v)return Y[K];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+u.pretty(this.compressionMethod)+" unknown (inner file : "+u.transformTo("string",this.fileName)+")");this.decompressed=new m(this.compressedSize,this.uncompressedSize,this.crc32,S,H.readData(this.compressedSize))},readCentralPart:function(H){this.versionMadeBy=H.readInt(2),H.skip(2),this.bitFlag=H.readInt(2),this.compressionMethod=H.readString(2),this.date=H.readDate(),this.crc32=H.readInt(4),this.compressedSize=H.readInt(4),this.uncompressedSize=H.readInt(4);var S=H.readInt(2);if(this.extraFieldsLength=H.readInt(2),this.fileCommentLength=H.readInt(2),this.diskNumberStart=H.readInt(2),this.internalFileAttributes=H.readInt(2),this.externalFileAttributes=H.readInt(4),this.localHeaderOffset=H.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");H.skip(S),this.readExtraFields(H),this.parseZIP64ExtraField(H),this.fileComment=H.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var H=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),H==0&&(this.dosPermissions=63&this.externalFileAttributes),H==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var H=b(this.extraFields[1].value);this.uncompressedSize===u.MAX_VALUE_32BITS&&(this.uncompressedSize=H.readInt(8)),this.compressedSize===u.MAX_VALUE_32BITS&&(this.compressedSize=H.readInt(8)),this.localHeaderOffset===u.MAX_VALUE_32BITS&&(this.localHeaderOffset=H.readInt(8)),this.diskNumberStart===u.MAX_VALUE_32BITS&&(this.diskNumberStart=H.readInt(4))}},readExtraFields:function(H){var S,z,v,K=H.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});H.index+4<K;)S=H.readInt(2),z=H.readInt(2),v=H.readData(z),this.extraFields[S]={id:S,length:z,value:v};H.setIndex(K)},handleUTF8:function(){var H=R.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=p.utf8decode(this.fileName),this.fileCommentStr=p.utf8decode(this.fileComment);else{var S=this.findExtraFieldUnicodePath();if(S!==null)this.fileNameStr=S;else{var z=u.transformTo(H,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(z)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var K=u.transformTo(H,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(K)}}},findExtraFieldUnicodePath:function(){var H=this.extraFields[28789];if(H){var S=b(H.value);return S.readInt(1)!==1||Z(this.fileName)!==S.readInt(4)?null:p.utf8decode(S.readData(H.length-5))}return null},findExtraFieldUnicodeComment:function(){var H=this.extraFields[25461];if(H){var S=b(H.value);return S.readInt(1)!==1||Z(this.fileComment)!==S.readInt(4)?null:p.utf8decode(S.readData(H.length-5))}return null}},r.exports=X},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(c,r,h){function b(S,z,v){this.name=S,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=z,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var u=c("./stream/StreamHelper"),m=c("./stream/DataWorker"),Z=c("./utf8"),p=c("./compressedObject"),Y=c("./stream/GenericWorker");b.prototype={internalStream:function(S){var z=null,v="string";try{if(!S)throw new Error("No output type specified.");var K=(v=S.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),z=this._decompressWorker();var V=!this._dataBinary;V&&!K&&(z=z.pipe(new Z.Utf8EncodeWorker)),!V&&K&&(z=z.pipe(new Z.Utf8DecodeWorker))}catch(N){(z=new Y("error")).error(N)}return new u(z,v,"")},async:function(S,z){return this.internalStream(S).accumulate(z)},nodeStream:function(S,z){return this.internalStream(S||"nodebuffer").toNodejsStream(z)},_compressWorker:function(S,z){if(this._data instanceof p&&this._data.compression.magic===S.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new Z.Utf8EncodeWorker)),p.createWorkerFrom(v,S,z)},_decompressWorker:function(){return this._data instanceof p?this._data.getContentWorker():this._data instanceof Y?this._data:new m(this._data)}};for(var R=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],X=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},H=0;H<R.length;H++)b.prototype[R[H]]=X;r.exports=b},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(c,r,h){(function(b){var u,m,Z=b.MutationObserver||b.WebKitMutationObserver;if(Z){var p=0,Y=new Z(S),R=b.document.createTextNode("");Y.observe(R,{characterData:!0}),u=function(){R.data=p=++p%2}}else if(b.setImmediate||b.MessageChannel===void 0)u="document"in b&&"onreadystatechange"in b.document.createElement("script")?function(){var z=b.document.createElement("script");z.onreadystatechange=function(){S(),z.onreadystatechange=null,z.parentNode.removeChild(z),z=null},b.document.documentElement.appendChild(z)}:function(){setTimeout(S,0)};else{var X=new b.MessageChannel;X.port1.onmessage=S,u=function(){X.port2.postMessage(0)}}var H=[];function S(){var z,v;m=!0;for(var K=H.length;K;){for(v=H,H=[],z=-1;++z<K;)v[z]();K=H.length}m=!1}r.exports=function(z){H.push(z)!==1||m||u()}}).call(this,A!==void 0?A:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(c,r,h){var b=c("immediate");function u(){}var m={},Z=["REJECTED"],p=["FULFILLED"],Y=["PENDING"];function R(K){if(typeof K!="function")throw new TypeError("resolver must be a function");this.state=Y,this.queue=[],this.outcome=void 0,K!==u&&z(this,K)}function X(K,V,N){this.promise=K,typeof V=="function"&&(this.onFulfilled=V,this.callFulfilled=this.otherCallFulfilled),typeof N=="function"&&(this.onRejected=N,this.callRejected=this.otherCallRejected)}function H(K,V,N){b(function(){var B;try{B=V(N)}catch(G){return m.reject(K,G)}B===K?m.reject(K,new TypeError("Cannot resolve promise with itself")):m.resolve(K,B)})}function S(K){var V=K&&K.then;if(K&&(typeof K=="object"||typeof K=="function")&&typeof V=="function")return function(){V.apply(K,arguments)}}function z(K,V){var N=!1;function B(W){N||(N=!0,m.reject(K,W))}function G(W){N||(N=!0,m.resolve(K,W))}var w=v(function(){V(G,B)});w.status==="error"&&B(w.value)}function v(K,V){var N={};try{N.value=K(V),N.status="success"}catch(B){N.status="error",N.value=B}return N}(r.exports=R).prototype.finally=function(K){if(typeof K!="function")return this;var V=this.constructor;return this.then(function(N){return V.resolve(K()).then(function(){return N})},function(N){return V.resolve(K()).then(function(){throw N})})},R.prototype.catch=function(K){return this.then(null,K)},R.prototype.then=function(K,V){if(typeof K!="function"&&this.state===p||typeof V!="function"&&this.state===Z)return this;var N=new this.constructor(u);return this.state!==Y?H(N,this.state===p?K:V,this.outcome):this.queue.push(new X(N,K,V)),N},X.prototype.callFulfilled=function(K){m.resolve(this.promise,K)},X.prototype.otherCallFulfilled=function(K){H(this.promise,this.onFulfilled,K)},X.prototype.callRejected=function(K){m.reject(this.promise,K)},X.prototype.otherCallRejected=function(K){H(this.promise,this.onRejected,K)},m.resolve=function(K,V){var N=v(S,V);if(N.status==="error")return m.reject(K,N.value);var B=N.value;if(B)z(K,B);else{K.state=p,K.outcome=V;for(var G=-1,w=K.queue.length;++G<w;)K.queue[G].callFulfilled(V)}return K},m.reject=function(K,V){K.state=Z,K.outcome=V;for(var N=-1,B=K.queue.length;++N<B;)K.queue[N].callRejected(V);return K},R.resolve=function(K){return K instanceof this?K:m.resolve(new this(u),K)},R.reject=function(K){var V=new this(u);return m.reject(V,K)},R.all=function(K){var V=this;if(Object.prototype.toString.call(K)!=="[object Array]")return this.reject(new TypeError("must be an array"));var N=K.length,B=!1;if(!N)return this.resolve([]);for(var G=new Array(N),w=0,W=-1,y=new this(u);++W<N;)f(K[W],W);return y;function f(D,F){V.resolve(D).then(function(T){G[F]=T,++w!==N||B||(B=!0,m.resolve(y,G))},function(T){B||(B=!0,m.reject(y,T))})}},R.race=function(K){if(Object.prototype.toString.call(K)!=="[object Array]")return this.reject(new TypeError("must be an array"));var V=K.length,N=!1;if(!V)return this.resolve([]);for(var B,G=-1,w=new this(u);++G<V;)B=K[G],this.resolve(B).then(function(W){N||(N=!0,m.resolve(w,W))},function(W){N||(N=!0,m.reject(w,W))});return w}},{immediate:36}],38:[function(c,r,h){var b={};(0,c("./lib/utils/common").assign)(b,c("./lib/deflate"),c("./lib/inflate"),c("./lib/zlib/constants")),r.exports=b},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(c,r,h){var b=c("./zlib/deflate"),u=c("./utils/common"),m=c("./utils/strings"),Z=c("./zlib/messages"),p=c("./zlib/zstream"),Y=Object.prototype.toString;function R(H){if(!(this instanceof R))return new R(H);this.options=u.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},H||{});var S=this.options;S.raw&&0<S.windowBits?S.windowBits=-S.windowBits:S.gzip&&0<S.windowBits&&S.windowBits<16&&(S.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var z=b.deflateInit2(this.strm,S.level,S.method,S.windowBits,S.memLevel,S.strategy);if(z!==0)throw new Error(Z[z]);if(S.header&&b.deflateSetHeader(this.strm,S.header),S.dictionary){var v;if(v=typeof S.dictionary=="string"?m.string2buf(S.dictionary):Y.call(S.dictionary)==="[object ArrayBuffer]"?new Uint8Array(S.dictionary):S.dictionary,(z=b.deflateSetDictionary(this.strm,v))!==0)throw new Error(Z[z]);this._dict_set=!0}}function X(H,S){var z=new R(S);if(z.push(H,!0),z.err)throw z.msg||Z[z.err];return z.result}R.prototype.push=function(H,S){var z,v,K=this.strm,V=this.options.chunkSize;if(this.ended)return!1;v=S===~~S?S:S===!0?4:0,typeof H=="string"?K.input=m.string2buf(H):Y.call(H)==="[object ArrayBuffer]"?K.input=new Uint8Array(H):K.input=H,K.next_in=0,K.avail_in=K.input.length;do{if(K.avail_out===0&&(K.output=new u.Buf8(V),K.next_out=0,K.avail_out=V),(z=b.deflate(K,v))!==1&&z!==0)return this.onEnd(z),!(this.ended=!0);K.avail_out!==0&&(K.avail_in!==0||v!==4&&v!==2)||(this.options.to==="string"?this.onData(m.buf2binstring(u.shrinkBuf(K.output,K.next_out))):this.onData(u.shrinkBuf(K.output,K.next_out)))}while((0<K.avail_in||K.avail_out===0)&&z!==1);return v===4?(z=b.deflateEnd(this.strm),this.onEnd(z),this.ended=!0,z===0):v!==2||(this.onEnd(0),!(K.avail_out=0))},R.prototype.onData=function(H){this.chunks.push(H)},R.prototype.onEnd=function(H){H===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=H,this.msg=this.strm.msg},h.Deflate=R,h.deflate=X,h.deflateRaw=function(H,S){return(S=S||{}).raw=!0,X(H,S)},h.gzip=function(H,S){return(S=S||{}).gzip=!0,X(H,S)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(c,r,h){var b=c("./zlib/inflate"),u=c("./utils/common"),m=c("./utils/strings"),Z=c("./zlib/constants"),p=c("./zlib/messages"),Y=c("./zlib/zstream"),R=c("./zlib/gzheader"),X=Object.prototype.toString;function H(z){if(!(this instanceof H))return new H(z);this.options=u.assign({chunkSize:16384,windowBits:0,to:""},z||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||z&&z.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&(15&v.windowBits)==0&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Y,this.strm.avail_out=0;var K=b.inflateInit2(this.strm,v.windowBits);if(K!==Z.Z_OK)throw new Error(p[K]);this.header=new R,b.inflateGetHeader(this.strm,this.header)}function S(z,v){var K=new H(v);if(K.push(z,!0),K.err)throw K.msg||p[K.err];return K.result}H.prototype.push=function(z,v){var K,V,N,B,G,w,W=this.strm,y=this.options.chunkSize,f=this.options.dictionary,D=!1;if(this.ended)return!1;V=v===~~v?v:v===!0?Z.Z_FINISH:Z.Z_NO_FLUSH,typeof z=="string"?W.input=m.binstring2buf(z):X.call(z)==="[object ArrayBuffer]"?W.input=new Uint8Array(z):W.input=z,W.next_in=0,W.avail_in=W.input.length;do{if(W.avail_out===0&&(W.output=new u.Buf8(y),W.next_out=0,W.avail_out=y),(K=b.inflate(W,Z.Z_NO_FLUSH))===Z.Z_NEED_DICT&&f&&(w=typeof f=="string"?m.string2buf(f):X.call(f)==="[object ArrayBuffer]"?new Uint8Array(f):f,K=b.inflateSetDictionary(this.strm,w)),K===Z.Z_BUF_ERROR&&D===!0&&(K=Z.Z_OK,D=!1),K!==Z.Z_STREAM_END&&K!==Z.Z_OK)return this.onEnd(K),!(this.ended=!0);W.next_out&&(W.avail_out!==0&&K!==Z.Z_STREAM_END&&(W.avail_in!==0||V!==Z.Z_FINISH&&V!==Z.Z_SYNC_FLUSH)||(this.options.to==="string"?(N=m.utf8border(W.output,W.next_out),B=W.next_out-N,G=m.buf2string(W.output,N),W.next_out=B,W.avail_out=y-B,B&&u.arraySet(W.output,W.output,N,B,0),this.onData(G)):this.onData(u.shrinkBuf(W.output,W.next_out)))),W.avail_in===0&&W.avail_out===0&&(D=!0)}while((0<W.avail_in||W.avail_out===0)&&K!==Z.Z_STREAM_END);return K===Z.Z_STREAM_END&&(V=Z.Z_FINISH),V===Z.Z_FINISH?(K=b.inflateEnd(this.strm),this.onEnd(K),this.ended=!0,K===Z.Z_OK):V!==Z.Z_SYNC_FLUSH||(this.onEnd(Z.Z_OK),!(W.avail_out=0))},H.prototype.onData=function(z){this.chunks.push(z)},H.prototype.onEnd=function(z){z===Z.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=z,this.msg=this.strm.msg},h.Inflate=H,h.inflate=S,h.inflateRaw=function(z,v){return(v=v||{}).raw=!0,S(z,v)},h.ungzip=S},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(c,r,h){var b=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";h.assign=function(Z){for(var p=Array.prototype.slice.call(arguments,1);p.length;){var Y=p.shift();if(Y){if(typeof Y!="object")throw new TypeError(Y+"must be non-object");for(var R in Y)Y.hasOwnProperty(R)&&(Z[R]=Y[R])}}return Z},h.shrinkBuf=function(Z,p){return Z.length===p?Z:Z.subarray?Z.subarray(0,p):(Z.length=p,Z)};var u={arraySet:function(Z,p,Y,R,X){if(p.subarray&&Z.subarray)Z.set(p.subarray(Y,Y+R),X);else for(var H=0;H<R;H++)Z[X+H]=p[Y+H]},flattenChunks:function(Z){var p,Y,R,X,H,S;for(p=R=0,Y=Z.length;p<Y;p++)R+=Z[p].length;for(S=new Uint8Array(R),p=X=0,Y=Z.length;p<Y;p++)H=Z[p],S.set(H,X),X+=H.length;return S}},m={arraySet:function(Z,p,Y,R,X){for(var H=0;H<R;H++)Z[X+H]=p[Y+H]},flattenChunks:function(Z){return[].concat.apply([],Z)}};h.setTyped=function(Z){Z?(h.Buf8=Uint8Array,h.Buf16=Uint16Array,h.Buf32=Int32Array,h.assign(h,u)):(h.Buf8=Array,h.Buf16=Array,h.Buf32=Array,h.assign(h,m))},h.setTyped(b)},{}],42:[function(c,r,h){var b=c("./common"),u=!0,m=!0;try{String.fromCharCode.apply(null,[0])}catch{u=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{m=!1}for(var Z=new b.Buf8(256),p=0;p<256;p++)Z[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;function Y(R,X){if(X<65537&&(R.subarray&&m||!R.subarray&&u))return String.fromCharCode.apply(null,b.shrinkBuf(R,X));for(var H="",S=0;S<X;S++)H+=String.fromCharCode(R[S]);return H}Z[254]=Z[254]=1,h.string2buf=function(R){var X,H,S,z,v,K=R.length,V=0;for(z=0;z<K;z++)(64512&(H=R.charCodeAt(z)))==55296&&z+1<K&&(64512&(S=R.charCodeAt(z+1)))==56320&&(H=65536+(H-55296<<10)+(S-56320),z++),V+=H<128?1:H<2048?2:H<65536?3:4;for(X=new b.Buf8(V),z=v=0;v<V;z++)(64512&(H=R.charCodeAt(z)))==55296&&z+1<K&&(64512&(S=R.charCodeAt(z+1)))==56320&&(H=65536+(H-55296<<10)+(S-56320),z++),H<128?X[v++]=H:(H<2048?X[v++]=192|H>>>6:(H<65536?X[v++]=224|H>>>12:(X[v++]=240|H>>>18,X[v++]=128|H>>>12&63),X[v++]=128|H>>>6&63),X[v++]=128|63&H);return X},h.buf2binstring=function(R){return Y(R,R.length)},h.binstring2buf=function(R){for(var X=new b.Buf8(R.length),H=0,S=X.length;H<S;H++)X[H]=R.charCodeAt(H);return X},h.buf2string=function(R,X){var H,S,z,v,K=X||R.length,V=new Array(2*K);for(H=S=0;H<K;)if((z=R[H++])<128)V[S++]=z;else if(4<(v=Z[z]))V[S++]=65533,H+=v-1;else{for(z&=v===2?31:v===3?15:7;1<v&&H<K;)z=z<<6|63&R[H++],v--;1<v?V[S++]=65533:z<65536?V[S++]=z:(z-=65536,V[S++]=55296|z>>10&1023,V[S++]=56320|1023&z)}return Y(V,S)},h.utf8border=function(R,X){var H;for((X=X||R.length)>R.length&&(X=R.length),H=X-1;0<=H&&(192&R[H])==128;)H--;return H<0||H===0?X:H+Z[R[H]]>X?H:X}},{"./common":41}],43:[function(c,r,h){r.exports=function(b,u,m,Z){for(var p=65535&b|0,Y=b>>>16&65535|0,R=0;m!==0;){for(m-=R=2e3<m?2e3:m;Y=Y+(p=p+u[Z++]|0)|0,--R;);p%=65521,Y%=65521}return p|Y<<16|0}},{}],44:[function(c,r,h){r.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(c,r,h){var b=function(){for(var u,m=[],Z=0;Z<256;Z++){u=Z;for(var p=0;p<8;p++)u=1&u?3988292384^u>>>1:u>>>1;m[Z]=u}return m}();r.exports=function(u,m,Z,p){var Y=b,R=p+Z;u^=-1;for(var X=p;X<R;X++)u=u>>>8^Y[255&(u^m[X])];return-1^u}},{}],46:[function(c,r,h){var b,u=c("../utils/common"),m=c("./trees"),Z=c("./adler32"),p=c("./crc32"),Y=c("./messages"),R=-2,X=258,H=262,S=113;function z(L,E){return L.msg=Y[E],E}function v(L){return(L<<1)-(4<L?9:0)}function K(L){for(var E=L.length;0<=--E;)L[E]=0}function V(L){var E=L.state,J=E.pending;J>L.avail_out&&(J=L.avail_out),J!==0&&(u.arraySet(L.output,E.pending_buf,E.pending_out,J,L.next_out),L.next_out+=J,E.pending_out+=J,L.total_out+=J,L.avail_out-=J,E.pending-=J,E.pending===0&&(E.pending_out=0))}function N(L,E){m._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,E),L.block_start=L.strstart,V(L.strm)}function B(L,E){L.pending_buf[L.pending++]=E}function G(L,E){L.pending_buf[L.pending++]=E>>>8&255,L.pending_buf[L.pending++]=255&E}function w(L,E){var J,k,j=L.max_chain_length,q=L.strstart,tg=L.prev_length,Cg=L.nice_match,x=L.strstart>L.w_size-H?L.strstart-(L.w_size-H):0,sg=L.window,Ag=L.w_mask,O=L.prev,_=L.strstart+X,Ig=sg[q+tg-1],ng=sg[q+tg];L.prev_length>=L.good_match&&(j>>=2),Cg>L.lookahead&&(Cg=L.lookahead);do if(sg[(J=E)+tg]===ng&&sg[J+tg-1]===Ig&&sg[J]===sg[q]&&sg[++J]===sg[q+1]){q+=2,J++;do;while(sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&sg[++q]===sg[++J]&&q<_);if(k=X-(_-q),q=_-X,tg<k){if(L.match_start=E,Cg<=(tg=k))break;Ig=sg[q+tg-1],ng=sg[q+tg]}}while((E=O[E&Ag])>x&&--j!=0);return tg<=L.lookahead?tg:L.lookahead}function W(L){var E,J,k,j,q,tg,Cg,x,sg,Ag,O=L.w_size;do{if(j=L.window_size-L.lookahead-L.strstart,L.strstart>=O+(O-H)){for(u.arraySet(L.window,L.window,O,O,0),L.match_start-=O,L.strstart-=O,L.block_start-=O,E=J=L.hash_size;k=L.head[--E],L.head[E]=O<=k?k-O:0,--J;);for(E=J=O;k=L.prev[--E],L.prev[E]=O<=k?k-O:0,--J;);j+=O}if(L.strm.avail_in===0)break;if(tg=L.strm,Cg=L.window,x=L.strstart+L.lookahead,Ag=void 0,(sg=j)<(Ag=tg.avail_in)&&(Ag=sg),J=Ag===0?0:(tg.avail_in-=Ag,u.arraySet(Cg,tg.input,tg.next_in,Ag,x),tg.state.wrap===1?tg.adler=Z(tg.adler,Cg,Ag,x):tg.state.wrap===2&&(tg.adler=p(tg.adler,Cg,Ag,x)),tg.next_in+=Ag,tg.total_in+=Ag,Ag),L.lookahead+=J,L.lookahead+L.insert>=3)for(q=L.strstart-L.insert,L.ins_h=L.window[q],L.ins_h=(L.ins_h<<L.hash_shift^L.window[q+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[q+3-1])&L.hash_mask,L.prev[q&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=q,q++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<H&&L.strm.avail_in!==0)}function y(L,E){for(var J,k;;){if(L.lookahead<H){if(W(L),L.lookahead<H&&E===0)return 1;if(L.lookahead===0)break}if(J=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,J=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),J!==0&&L.strstart-J<=L.w_size-H&&(L.match_length=w(L,J)),L.match_length>=3)if(k=m._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,J=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else k=m._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(k&&(N(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,E===4?(N(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(N(L,!1),L.strm.avail_out===0)?1:2}function f(L,E){for(var J,k,j;;){if(L.lookahead<H){if(W(L),L.lookahead<H&&E===0)return 1;if(L.lookahead===0)break}if(J=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,J=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,J!==0&&L.prev_length<L.max_lazy_match&&L.strstart-J<=L.w_size-H&&(L.match_length=w(L,J),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(j=L.strstart+L.lookahead-3,k=m._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=j&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,J=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,k&&(N(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((k=m._tr_tally(L,0,L.window[L.strstart-1]))&&N(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(k=m._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,E===4?(N(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(N(L,!1),L.strm.avail_out===0)?1:2}function D(L,E,J,k,j){this.good_length=L,this.max_lazy=E,this.nice_length=J,this.max_chain=k,this.func=j}function F(){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=8,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 u.Buf16(1146),this.dyn_dtree=new u.Buf16(122),this.bl_tree=new u.Buf16(78),K(this.dyn_ltree),K(this.dyn_dtree),K(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new u.Buf16(16),this.heap=new u.Buf16(573),K(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new u.Buf16(573),K(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 T(L){var E;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(E=L.state).pending=0,E.pending_out=0,E.wrap<0&&(E.wrap=-E.wrap),E.status=E.wrap?42:S,L.adler=E.wrap===2?0:1,E.last_flush=0,m._tr_init(E),0):z(L,R)}function Q(L){var E=T(L);return E===0&&function(J){J.window_size=2*J.w_size,K(J.head),J.max_lazy_match=b[J.level].max_lazy,J.good_match=b[J.level].good_length,J.nice_match=b[J.level].nice_length,J.max_chain_length=b[J.level].max_chain,J.strstart=0,J.block_start=0,J.lookahead=0,J.insert=0,J.match_length=J.prev_length=2,J.match_available=0,J.ins_h=0}(L.state),E}function P(L,E,J,k,j,q){if(!L)return R;var tg=1;if(E===-1&&(E=6),k<0?(tg=0,k=-k):15<k&&(tg=2,k-=16),j<1||9<j||J!==8||k<8||15<k||E<0||9<E||q<0||4<q)return z(L,R);k===8&&(k=9);var Cg=new F;return(L.state=Cg).strm=L,Cg.wrap=tg,Cg.gzhead=null,Cg.w_bits=k,Cg.w_size=1<<Cg.w_bits,Cg.w_mask=Cg.w_size-1,Cg.hash_bits=j+7,Cg.hash_size=1<<Cg.hash_bits,Cg.hash_mask=Cg.hash_size-1,Cg.hash_shift=~~((Cg.hash_bits+3-1)/3),Cg.window=new u.Buf8(2*Cg.w_size),Cg.head=new u.Buf16(Cg.hash_size),Cg.prev=new u.Buf16(Cg.w_size),Cg.lit_bufsize=1<<j+6,Cg.pending_buf_size=4*Cg.lit_bufsize,Cg.pending_buf=new u.Buf8(Cg.pending_buf_size),Cg.d_buf=1*Cg.lit_bufsize,Cg.l_buf=3*Cg.lit_bufsize,Cg.level=E,Cg.strategy=q,Cg.method=J,Q(L)}b=[new D(0,0,0,0,function(L,E){var J=65535;for(J>L.pending_buf_size-5&&(J=L.pending_buf_size-5);;){if(L.lookahead<=1){if(W(L),L.lookahead===0&&E===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var k=L.block_start+J;if((L.strstart===0||L.strstart>=k)&&(L.lookahead=L.strstart-k,L.strstart=k,N(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-H&&(N(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,E===4?(N(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(N(L,!1),L.strm.avail_out),1)}),new D(4,4,8,4,y),new D(4,5,16,8,y),new D(4,6,32,32,y),new D(4,4,16,16,f),new D(8,16,32,32,f),new D(8,16,128,128,f),new D(8,32,128,256,f),new D(32,128,258,1024,f),new D(32,258,258,4096,f)],h.deflateInit=function(L,E){return P(L,E,8,15,8,0)},h.deflateInit2=P,h.deflateReset=Q,h.deflateResetKeep=T,h.deflateSetHeader=function(L,E){return L&&L.state?L.state.wrap!==2?R:(L.state.gzhead=E,0):R},h.deflate=function(L,E){var J,k,j,q;if(!L||!L.state||5<E||E<0)return L?z(L,R):R;if(k=L.state,!L.output||!L.input&&L.avail_in!==0||k.status===666&&E!==4)return z(L,L.avail_out===0?-5:R);if(k.strm=L,J=k.last_flush,k.last_flush=E,k.status===42)if(k.wrap===2)L.adler=0,B(k,31),B(k,139),B(k,8),k.gzhead?(B(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),B(k,255&k.gzhead.time),B(k,k.gzhead.time>>8&255),B(k,k.gzhead.time>>16&255),B(k,k.gzhead.time>>24&255),B(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),B(k,255&k.gzhead.os),k.gzhead.extra&&k.gzhead.extra.length&&(B(k,255&k.gzhead.extra.length),B(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(L.adler=p(L.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=69):(B(k,0),B(k,0),B(k,0),B(k,0),B(k,0),B(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),B(k,3),k.status=S);else{var tg=8+(k.w_bits-8<<4)<<8;tg|=(2<=k.strategy||k.level<2?0:k.level<6?1:k.level===6?2:3)<<6,k.strstart!==0&&(tg|=32),tg+=31-tg%31,k.status=S,G(k,tg),k.strstart!==0&&(G(k,L.adler>>>16),G(k,65535&L.adler)),L.adler=1}if(k.status===69)if(k.gzhead.extra){for(j=k.pending;k.gzindex<(65535&k.gzhead.extra.length)&&(k.pending!==k.pending_buf_size||(k.gzhead.hcrc&&k.pending>j&&(L.adler=p(L.adler,k.pending_buf,k.pending-j,j)),V(L),j=k.pending,k.pending!==k.pending_buf_size));)B(k,255&k.gzhead.extra[k.gzindex]),k.gzindex++;k.gzhead.hcrc&&k.pending>j&&(L.adler=p(L.adler,k.pending_buf,k.pending-j,j)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=73)}else k.status=73;if(k.status===73)if(k.gzhead.name){j=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>j&&(L.adler=p(L.adler,k.pending_buf,k.pending-j,j)),V(L),j=k.pending,k.pending===k.pending_buf_size)){q=1;break}q=k.gzindex<k.gzhead.name.length?255&k.gzhead.name.charCodeAt(k.gzindex++):0,B(k,q)}while(q!==0);k.gzhead.hcrc&&k.pending>j&&(L.adler=p(L.adler,k.pending_buf,k.pending-j,j)),q===0&&(k.gzindex=0,k.status=91)}else k.status=91;if(k.status===91)if(k.gzhead.comment){j=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>j&&(L.adler=p(L.adler,k.pending_buf,k.pending-j,j)),V(L),j=k.pending,k.pending===k.pending_buf_size)){q=1;break}q=k.gzindex<k.gzhead.comment.length?255&k.gzhead.comment.charCodeAt(k.gzindex++):0,B(k,q)}while(q!==0);k.gzhead.hcrc&&k.pending>j&&(L.adler=p(L.adler,k.pending_buf,k.pending-j,j)),q===0&&(k.status=103)}else k.status=103;if(k.status===103&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&V(L),k.pending+2<=k.pending_buf_size&&(B(k,255&L.adler),B(k,L.adler>>8&255),L.adler=0,k.status=S)):k.status=S),k.pending!==0){if(V(L),L.avail_out===0)return k.last_flush=-1,0}else if(L.avail_in===0&&v(E)<=v(J)&&E!==4)return z(L,-5);if(k.status===666&&L.avail_in!==0)return z(L,-5);if(L.avail_in!==0||k.lookahead!==0||E!==0&&k.status!==666){var Cg=k.strategy===2?function(x,sg){for(var Ag;;){if(x.lookahead===0&&(W(x),x.lookahead===0)){if(sg===0)return 1;break}if(x.match_length=0,Ag=m._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++,Ag&&(N(x,!1),x.strm.avail_out===0))return 1}return x.insert=0,sg===4?(N(x,!0),x.strm.avail_out===0?3:4):x.last_lit&&(N(x,!1),x.strm.avail_out===0)?1:2}(k,E):k.strategy===3?function(x,sg){for(var Ag,O,_,Ig,ng=x.window;;){if(x.lookahead<=X){if(W(x),x.lookahead<=X&&sg===0)return 1;if(x.lookahead===0)break}if(x.match_length=0,x.lookahead>=3&&0<x.strstart&&(O=ng[_=x.strstart-1])===ng[++_]&&O===ng[++_]&&O===ng[++_]){Ig=x.strstart+X;do;while(O===ng[++_]&&O===ng[++_]&&O===ng[++_]&&O===ng[++_]&&O===ng[++_]&&O===ng[++_]&&O===ng[++_]&&O===ng[++_]&&_<Ig);x.match_length=X-(Ig-_),x.match_length>x.lookahead&&(x.match_length=x.lookahead)}if(x.match_length>=3?(Ag=m._tr_tally(x,1,x.match_length-3),x.lookahead-=x.match_length,x.strstart+=x.match_length,x.match_length=0):(Ag=m._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++),Ag&&(N(x,!1),x.strm.avail_out===0))return 1}return x.insert=0,sg===4?(N(x,!0),x.strm.avail_out===0?3:4):x.last_lit&&(N(x,!1),x.strm.avail_out===0)?1:2}(k,E):b[k.level].func(k,E);if(Cg!==3&&Cg!==4||(k.status=666),Cg===1||Cg===3)return L.avail_out===0&&(k.last_flush=-1),0;if(Cg===2&&(E===1?m._tr_align(k):E!==5&&(m._tr_stored_block(k,0,0,!1),E===3&&(K(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),V(L),L.avail_out===0))return k.last_flush=-1,0}return E!==4?0:k.wrap<=0?1:(k.wrap===2?(B(k,255&L.adler),B(k,L.adler>>8&255),B(k,L.adler>>16&255),B(k,L.adler>>24&255),B(k,255&L.total_in),B(k,L.total_in>>8&255),B(k,L.total_in>>16&255),B(k,L.total_in>>24&255)):(G(k,L.adler>>>16),G(k,65535&L.adler)),V(L),0<k.wrap&&(k.wrap=-k.wrap),k.pending!==0?0:1)},h.deflateEnd=function(L){var E;return L&&L.state?(E=L.state.status)!==42&&E!==69&&E!==73&&E!==91&&E!==103&&E!==S&&E!==666?z(L,R):(L.state=null,E===S?z(L,-3):0):R},h.deflateSetDictionary=function(L,E){var J,k,j,q,tg,Cg,x,sg,Ag=E.length;if(!L||!L.state||(q=(J=L.state).wrap)===2||q===1&&J.status!==42||J.lookahead)return R;for(q===1&&(L.adler=Z(L.adler,E,Ag,0)),J.wrap=0,Ag>=J.w_size&&(q===0&&(K(J.head),J.strstart=0,J.block_start=0,J.insert=0),sg=new u.Buf8(J.w_size),u.arraySet(sg,E,Ag-J.w_size,J.w_size,0),E=sg,Ag=J.w_size),tg=L.avail_in,Cg=L.next_in,x=L.input,L.avail_in=Ag,L.next_in=0,L.input=E,W(J);J.lookahead>=3;){for(k=J.strstart,j=J.lookahead-2;J.ins_h=(J.ins_h<<J.hash_shift^J.window[k+3-1])&J.hash_mask,J.prev[k&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=k,k++,--j;);J.strstart=k,J.lookahead=2,W(J)}return J.strstart+=J.lookahead,J.block_start=J.strstart,J.insert=J.lookahead,J.lookahead=0,J.match_length=J.prev_length=2,J.match_available=0,L.next_in=Cg,L.input=x,L.avail_in=tg,J.wrap=q,0},h.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(c,r,h){r.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(c,r,h){r.exports=function(b,u){var m,Z,p,Y,R,X,H,S,z,v,K,V,N,B,G,w,W,y,f,D,F,T,Q,P,L;m=b.state,Z=b.next_in,P=b.input,p=Z+(b.avail_in-5),Y=b.next_out,L=b.output,R=Y-(u-b.avail_out),X=Y+(b.avail_out-257),H=m.dmax,S=m.wsize,z=m.whave,v=m.wnext,K=m.window,V=m.hold,N=m.bits,B=m.lencode,G=m.distcode,w=(1<<m.lenbits)-1,W=(1<<m.distbits)-1;g:do{N<15&&(V+=P[Z++]<<N,N+=8,V+=P[Z++]<<N,N+=8),y=B[V&w];I:for(;;){if(V>>>=f=y>>>24,N-=f,(f=y>>>16&255)==0)L[Y++]=65535&y;else{if(!(16&f)){if((64&f)==0){y=B[(65535&y)+(V&(1<<f)-1)];continue I}if(32&f){m.mode=12;break g}b.msg="invalid literal/length code",m.mode=30;break g}D=65535&y,(f&=15)&&(N<f&&(V+=P[Z++]<<N,N+=8),D+=V&(1<<f)-1,V>>>=f,N-=f),N<15&&(V+=P[Z++]<<N,N+=8,V+=P[Z++]<<N,N+=8),y=G[V&W];C:for(;;){if(V>>>=f=y>>>24,N-=f,!(16&(f=y>>>16&255))){if((64&f)==0){y=G[(65535&y)+(V&(1<<f)-1)];continue C}b.msg="invalid distance code",m.mode=30;break g}if(F=65535&y,N<(f&=15)&&(V+=P[Z++]<<N,(N+=8)<f&&(V+=P[Z++]<<N,N+=8)),H<(F+=V&(1<<f)-1)){b.msg="invalid distance too far back",m.mode=30;break g}if(V>>>=f,N-=f,(f=Y-R)<F){if(z<(f=F-f)&&m.sane){b.msg="invalid distance too far back",m.mode=30;break g}if(Q=K,(T=0)===v){if(T+=S-f,f<D){for(D-=f;L[Y++]=K[T++],--f;);T=Y-F,Q=L}}else if(v<f){if(T+=S+v-f,(f-=v)<D){for(D-=f;L[Y++]=K[T++],--f;);if(T=0,v<D){for(D-=f=v;L[Y++]=K[T++],--f;);T=Y-F,Q=L}}}else if(T+=v-f,f<D){for(D-=f;L[Y++]=K[T++],--f;);T=Y-F,Q=L}for(;2<D;)L[Y++]=Q[T++],L[Y++]=Q[T++],L[Y++]=Q[T++],D-=3;D&&(L[Y++]=Q[T++],1<D&&(L[Y++]=Q[T++]))}else{for(T=Y-F;L[Y++]=L[T++],L[Y++]=L[T++],L[Y++]=L[T++],2<(D-=3););D&&(L[Y++]=L[T++],1<D&&(L[Y++]=L[T++]))}break}}break}}while(Z<p&&Y<X);Z-=D=N>>3,V&=(1<<(N-=D<<3))-1,b.next_in=Z,b.next_out=Y,b.avail_in=Z<p?p-Z+5:5-(Z-p),b.avail_out=Y<X?X-Y+257:257-(Y-X),m.hold=V,m.bits=N}},{}],49:[function(c,r,h){var b=c("../utils/common"),u=c("./adler32"),m=c("./crc32"),Z=c("./inffast"),p=c("./inftrees"),Y=-2;function R(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function X(){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 b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function H(w){var W;return w&&w.state?(W=w.state,w.total_in=w.total_out=W.total=0,w.msg="",W.wrap&&(w.adler=1&W.wrap),W.mode=1,W.last=0,W.havedict=0,W.dmax=32768,W.head=null,W.hold=0,W.bits=0,W.lencode=W.lendyn=new b.Buf32(852),W.distcode=W.distdyn=new b.Buf32(592),W.sane=1,W.back=-1,0):Y}function S(w){var W;return w&&w.state?((W=w.state).wsize=0,W.whave=0,W.wnext=0,H(w)):Y}function z(w,W){var y,f;return w&&w.state?(f=w.state,W<0?(y=0,W=-W):(y=1+(W>>4),W<48&&(W&=15)),W&&(W<8||15<W)?Y:(f.window!==null&&f.wbits!==W&&(f.window=null),f.wrap=y,f.wbits=W,S(w))):Y}function v(w,W){var y,f;return w?(f=new X,(w.state=f).window=null,(y=z(w,W))!==0&&(w.state=null),y):Y}var K,V,N=!0;function B(w){if(N){var W;for(K=new b.Buf32(512),V=new b.Buf32(32),W=0;W<144;)w.lens[W++]=8;for(;W<256;)w.lens[W++]=9;for(;W<280;)w.lens[W++]=7;for(;W<288;)w.lens[W++]=8;for(p(1,w.lens,0,288,K,0,w.work,{bits:9}),W=0;W<32;)w.lens[W++]=5;p(2,w.lens,0,32,V,0,w.work,{bits:5}),N=!1}w.lencode=K,w.lenbits=9,w.distcode=V,w.distbits=5}function G(w,W,y,f){var D,F=w.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new b.Buf8(F.wsize)),f>=F.wsize?(b.arraySet(F.window,W,y-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(f<(D=F.wsize-F.wnext)&&(D=f),b.arraySet(F.window,W,y-f,D,F.wnext),(f-=D)?(b.arraySet(F.window,W,y-f,f,0),F.wnext=f,F.whave=F.wsize):(F.wnext+=D,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=D))),0}h.inflateReset=S,h.inflateReset2=z,h.inflateResetKeep=H,h.inflateInit=function(w){return v(w,15)},h.inflateInit2=v,h.inflate=function(w,W){var y,f,D,F,T,Q,P,L,E,J,k,j,q,tg,Cg,x,sg,Ag,O,_,Ig,ng,ag,lg,cg=0,dg=new b.Buf8(4),hg=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return Y;(y=w.state).mode===12&&(y.mode=13),T=w.next_out,D=w.output,P=w.avail_out,F=w.next_in,f=w.input,Q=w.avail_in,L=y.hold,E=y.bits,J=Q,k=P,ng=0;g:for(;;)switch(y.mode){case 1:if(y.wrap===0){y.mode=13;break}for(;E<16;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(2&y.wrap&&L===35615){dg[y.check=0]=255&L,dg[1]=L>>>8&255,y.check=m(y.check,dg,2,0),E=L=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",y.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",y.mode=30;break}if(E-=4,Ig=8+(15&(L>>>=4)),y.wbits===0)y.wbits=Ig;else if(Ig>y.wbits){w.msg="invalid window size",y.mode=30;break}y.dmax=1<<Ig,w.adler=y.check=1,y.mode=512&L?10:12,E=L=0;break;case 2:for(;E<16;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(y.flags=L,(255&y.flags)!=8){w.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){w.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=L>>8&1),512&y.flags&&(dg[0]=255&L,dg[1]=L>>>8&255,y.check=m(y.check,dg,2,0)),E=L=0,y.mode=3;case 3:for(;E<32;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}y.head&&(y.head.time=L),512&y.flags&&(dg[0]=255&L,dg[1]=L>>>8&255,dg[2]=L>>>16&255,dg[3]=L>>>24&255,y.check=m(y.check,dg,4,0)),E=L=0,y.mode=4;case 4:for(;E<16;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}y.head&&(y.head.xflags=255&L,y.head.os=L>>8),512&y.flags&&(dg[0]=255&L,dg[1]=L>>>8&255,y.check=m(y.check,dg,2,0)),E=L=0,y.mode=5;case 5:if(1024&y.flags){for(;E<16;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}y.length=L,y.head&&(y.head.extra_len=L),512&y.flags&&(dg[0]=255&L,dg[1]=L>>>8&255,y.check=m(y.check,dg,2,0)),E=L=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(Q<(j=y.length)&&(j=Q),j&&(y.head&&(Ig=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),b.arraySet(y.head.extra,f,F,j,Ig)),512&y.flags&&(y.check=m(y.check,f,j,F)),Q-=j,F+=j,y.length-=j),y.length))break g;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(Q===0)break g;for(j=0;Ig=f[F+j++],y.head&&Ig&&y.length<65536&&(y.head.name+=String.fromCharCode(Ig)),Ig&&j<Q;);if(512&y.flags&&(y.check=m(y.check,f,j,F)),Q-=j,F+=j,Ig)break g}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(Q===0)break g;for(j=0;Ig=f[F+j++],y.head&&Ig&&y.length<65536&&(y.head.comment+=String.fromCharCode(Ig)),Ig&&j<Q;);if(512&y.flags&&(y.check=m(y.check,f,j,F)),Q-=j,F+=j,Ig)break g}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;E<16;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(L!==(65535&y.check)){w.msg="header crc mismatch",y.mode=30;break}E=L=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),w.adler=y.check=0,y.mode=12;break;case 10:for(;E<32;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}w.adler=y.check=R(L),E=L=0,y.mode=11;case 11:if(y.havedict===0)return w.next_out=T,w.avail_out=P,w.next_in=F,w.avail_in=Q,y.hold=L,y.bits=E,2;w.adler=y.check=1,y.mode=12;case 12:if(W===5||W===6)break g;case 13:if(y.last){L>>>=7&E,E-=7&E,y.mode=27;break}for(;E<3;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}switch(y.last=1&L,E-=1,3&(L>>>=1)){case 0:y.mode=14;break;case 1:if(B(y),y.mode=20,W!==6)break;L>>>=2,E-=2;break g;case 2:y.mode=17;break;case 3:w.msg="invalid block type",y.mode=30}L>>>=2,E-=2;break;case 14:for(L>>>=7&E,E-=7&E;E<32;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&L,E=L=0,y.mode=15,W===6)break g;case 15:y.mode=16;case 16:if(j=y.length){if(Q<j&&(j=Q),P<j&&(j=P),j===0)break g;b.arraySet(D,f,F,j,T),Q-=j,F+=j,P-=j,T+=j,y.length-=j;break}y.mode=12;break;case 17:for(;E<14;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(y.nlen=257+(31&L),L>>>=5,E-=5,y.ndist=1+(31&L),L>>>=5,E-=5,y.ncode=4+(15&L),L>>>=4,E-=4,286<y.nlen||30<y.ndist){w.msg="too many length or distance symbols",y.mode=30;break}y.have=0,y.mode=18;case 18:for(;y.have<y.ncode;){for(;E<3;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}y.lens[hg[y.have++]]=7&L,L>>>=3,E-=3}for(;y.have<19;)y.lens[hg[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,ag={bits:y.lenbits},ng=p(0,y.lens,0,19,y.lencode,0,y.work,ag),y.lenbits=ag.bits,ng){w.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have<y.nlen+y.ndist;){for(;x=(cg=y.lencode[L&(1<<y.lenbits)-1])>>>16&255,sg=65535&cg,!((Cg=cg>>>24)<=E);){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(sg<16)L>>>=Cg,E-=Cg,y.lens[y.have++]=sg;else{if(sg===16){for(lg=Cg+2;E<lg;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(L>>>=Cg,E-=Cg,y.have===0){w.msg="invalid bit length repeat",y.mode=30;break}Ig=y.lens[y.have-1],j=3+(3&L),L>>>=2,E-=2}else if(sg===17){for(lg=Cg+3;E<lg;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}E-=Cg,Ig=0,j=3+(7&(L>>>=Cg)),L>>>=3,E-=3}else{for(lg=Cg+7;E<lg;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}E-=Cg,Ig=0,j=11+(127&(L>>>=Cg)),L>>>=7,E-=7}if(y.have+j>y.nlen+y.ndist){w.msg="invalid bit length repeat",y.mode=30;break}for(;j--;)y.lens[y.have++]=Ig}}if(y.mode===30)break;if(y.lens[256]===0){w.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,ag={bits:y.lenbits},ng=p(1,y.lens,0,y.nlen,y.lencode,0,y.work,ag),y.lenbits=ag.bits,ng){w.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,ag={bits:y.distbits},ng=p(2,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,ag),y.distbits=ag.bits,ng){w.msg="invalid distances set",y.mode=30;break}if(y.mode=20,W===6)break g;case 20:y.mode=21;case 21:if(6<=Q&&258<=P){w.next_out=T,w.avail_out=P,w.next_in=F,w.avail_in=Q,y.hold=L,y.bits=E,Z(w,k),T=w.next_out,D=w.output,P=w.avail_out,F=w.next_in,f=w.input,Q=w.avail_in,L=y.hold,E=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;x=(cg=y.lencode[L&(1<<y.lenbits)-1])>>>16&255,sg=65535&cg,!((Cg=cg>>>24)<=E);){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(x&&(240&x)==0){for(Ag=Cg,O=x,_=sg;x=(cg=y.lencode[_+((L&(1<<Ag+O)-1)>>Ag)])>>>16&255,sg=65535&cg,!(Ag+(Cg=cg>>>24)<=E);){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}L>>>=Ag,E-=Ag,y.back+=Ag}if(L>>>=Cg,E-=Cg,y.back+=Cg,y.length=sg,x===0){y.mode=26;break}if(32&x){y.back=-1,y.mode=12;break}if(64&x){w.msg="invalid literal/length code",y.mode=30;break}y.extra=15&x,y.mode=22;case 22:if(y.extra){for(lg=y.extra;E<lg;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}y.length+=L&(1<<y.extra)-1,L>>>=y.extra,E-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;x=(cg=y.distcode[L&(1<<y.distbits)-1])>>>16&255,sg=65535&cg,!((Cg=cg>>>24)<=E);){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if((240&x)==0){for(Ag=Cg,O=x,_=sg;x=(cg=y.distcode[_+((L&(1<<Ag+O)-1)>>Ag)])>>>16&255,sg=65535&cg,!(Ag+(Cg=cg>>>24)<=E);){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}L>>>=Ag,E-=Ag,y.back+=Ag}if(L>>>=Cg,E-=Cg,y.back+=Cg,64&x){w.msg="invalid distance code",y.mode=30;break}y.offset=sg,y.extra=15&x,y.mode=24;case 24:if(y.extra){for(lg=y.extra;E<lg;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}y.offset+=L&(1<<y.extra)-1,L>>>=y.extra,E-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){w.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(P===0)break g;if(j=k-P,y.offset>j){if((j=y.offset-j)>y.whave&&y.sane){w.msg="invalid distance too far back",y.mode=30;break}q=j>y.wnext?(j-=y.wnext,y.wsize-j):y.wnext-j,j>y.length&&(j=y.length),tg=y.window}else tg=D,q=T-y.offset,j=y.length;for(P<j&&(j=P),P-=j,y.length-=j;D[T++]=tg[q++],--j;);y.length===0&&(y.mode=21);break;case 26:if(P===0)break g;D[T++]=y.length,P--,y.mode=21;break;case 27:if(y.wrap){for(;E<32;){if(Q===0)break g;Q--,L|=f[F++]<<E,E+=8}if(k-=P,w.total_out+=k,y.total+=k,k&&(w.adler=y.check=y.flags?m(y.check,D,k,T-k):u(y.check,D,k,T-k)),k=P,(y.flags?L:R(L))!==y.check){w.msg="incorrect data check",y.mode=30;break}E=L=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;E<32;){if(Q===0)break g;Q--,L+=f[F++]<<E,E+=8}if(L!==(4294967295&y.total)){w.msg="incorrect length check",y.mode=30;break}E=L=0}y.mode=29;case 29:ng=1;break g;case 30:ng=-3;break g;case 31:return-4;case 32:default:return Y}return w.next_out=T,w.avail_out=P,w.next_in=F,w.avail_in=Q,y.hold=L,y.bits=E,(y.wsize||k!==w.avail_out&&y.mode<30&&(y.mode<27||W!==4))&&G(w,w.output,w.next_out,k-w.avail_out)?(y.mode=31,-4):(J-=w.avail_in,k-=w.avail_out,w.total_in+=J,w.total_out+=k,y.total+=k,y.wrap&&k&&(w.adler=y.check=y.flags?m(y.check,D,k,w.next_out-k):u(y.check,D,k,w.next_out-k)),w.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(J==0&&k===0||W===4)&&ng===0&&(ng=-5),ng)},h.inflateEnd=function(w){if(!w||!w.state)return Y;var W=w.state;return W.window&&(W.window=null),w.state=null,0},h.inflateGetHeader=function(w,W){var y;return w&&w.state?(2&(y=w.state).wrap)==0?Y:((y.head=W).done=!1,0):Y},h.inflateSetDictionary=function(w,W){var y,f=W.length;return w&&w.state?(y=w.state).wrap!==0&&y.mode!==11?Y:y.mode===11&&u(1,W,f,0)!==y.check?-3:G(w,W,f,f)?(y.mode=31,-4):(y.havedict=1,0):Y},h.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(c,r,h){var b=c("../utils/common"),u=[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],m=[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],Z=[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],p=[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];r.exports=function(Y,R,X,H,S,z,v,K){var V,N,B,G,w,W,y,f,D,F=K.bits,T=0,Q=0,P=0,L=0,E=0,J=0,k=0,j=0,q=0,tg=0,Cg=null,x=0,sg=new b.Buf16(16),Ag=new b.Buf16(16),O=null,_=0;for(T=0;T<=15;T++)sg[T]=0;for(Q=0;Q<H;Q++)sg[R[X+Q]]++;for(E=F,L=15;1<=L&&sg[L]===0;L--);if(L<E&&(E=L),L===0)return S[z++]=20971520,S[z++]=20971520,K.bits=1,0;for(P=1;P<L&&sg[P]===0;P++);for(E<P&&(E=P),T=j=1;T<=15;T++)if(j<<=1,(j-=sg[T])<0)return-1;if(0<j&&(Y===0||L!==1))return-1;for(Ag[1]=0,T=1;T<15;T++)Ag[T+1]=Ag[T]+sg[T];for(Q=0;Q<H;Q++)R[X+Q]!==0&&(v[Ag[R[X+Q]]++]=Q);if(W=Y===0?(Cg=O=v,19):Y===1?(Cg=u,x-=257,O=m,_-=257,256):(Cg=Z,O=p,-1),T=P,w=z,k=Q=tg=0,B=-1,G=(q=1<<(J=E))-1,Y===1&&852<q||Y===2&&592<q)return 1;for(;;){for(y=T-k,D=v[Q]<W?(f=0,v[Q]):v[Q]>W?(f=O[_+v[Q]],Cg[x+v[Q]]):(f=96,0),V=1<<T-k,P=N=1<<J;S[w+(tg>>k)+(N-=V)]=y<<24|f<<16|D|0,N!==0;);for(V=1<<T-1;tg&V;)V>>=1;if(V!==0?(tg&=V-1,tg+=V):tg=0,Q++,--sg[T]==0){if(T===L)break;T=R[X+v[Q]]}if(E<T&&(tg&G)!==B){for(k===0&&(k=E),w+=P,j=1<<(J=T-k);J+k<L&&!((j-=sg[J+k])<=0);)J++,j<<=1;if(q+=1<<J,Y===1&&852<q||Y===2&&592<q)return 1;S[B=tg&G]=E<<24|J<<16|w-z|0}}return tg!==0&&(S[w+tg]=T-k<<24|64<<16|0),K.bits=E,0}},{"../utils/common":41}],51:[function(c,r,h){r.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(c,r,h){var b=c("../utils/common");function u(O){for(var _=O.length;0<=--_;)O[_]=0}var m=256,Z=286,p=30,Y=15,R=[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],X=[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],H=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(576);u(z);var v=new Array(60);u(v);var K=new Array(512);u(K);var V=new Array(256);u(V);var N=new Array(29);u(N);var B,G,w,W=new Array(p);function y(O,_,Ig,ng,ag){this.static_tree=O,this.extra_bits=_,this.extra_base=Ig,this.elems=ng,this.max_length=ag,this.has_stree=O&&O.length}function f(O,_){this.dyn_tree=O,this.max_code=0,this.stat_desc=_}function D(O){return O<256?K[O]:K[256+(O>>>7)]}function F(O,_){O.pending_buf[O.pending++]=255&_,O.pending_buf[O.pending++]=_>>>8&255}function T(O,_,Ig){O.bi_valid>16-Ig?(O.bi_buf|=_<<O.bi_valid&65535,F(O,O.bi_buf),O.bi_buf=_>>16-O.bi_valid,O.bi_valid+=Ig-16):(O.bi_buf|=_<<O.bi_valid&65535,O.bi_valid+=Ig)}function Q(O,_,Ig){T(O,Ig[2*_],Ig[2*_+1])}function P(O,_){for(var Ig=0;Ig|=1&O,O>>>=1,Ig<<=1,0<--_;);return Ig>>>1}function L(O,_,Ig){var ng,ag,lg=new Array(16),cg=0;for(ng=1;ng<=Y;ng++)lg[ng]=cg=cg+Ig[ng-1]<<1;for(ag=0;ag<=_;ag++){var dg=O[2*ag+1];dg!==0&&(O[2*ag]=P(lg[dg]++,dg))}}function E(O){var _;for(_=0;_<Z;_++)O.dyn_ltree[2*_]=0;for(_=0;_<p;_++)O.dyn_dtree[2*_]=0;for(_=0;_<19;_++)O.bl_tree[2*_]=0;O.dyn_ltree[512]=1,O.opt_len=O.static_len=0,O.last_lit=O.matches=0}function J(O){8<O.bi_valid?F(O,O.bi_buf):0<O.bi_valid&&(O.pending_buf[O.pending++]=O.bi_buf),O.bi_buf=0,O.bi_valid=0}function k(O,_,Ig,ng){var ag=2*_,lg=2*Ig;return O[ag]<O[lg]||O[ag]===O[lg]&&ng[_]<=ng[Ig]}function j(O,_,Ig){for(var ng=O.heap[Ig],ag=Ig<<1;ag<=O.heap_len&&(ag<O.heap_len&&k(_,O.heap[ag+1],O.heap[ag],O.depth)&&ag++,!k(_,ng,O.heap[ag],O.depth));)O.heap[Ig]=O.heap[ag],Ig=ag,ag<<=1;O.heap[Ig]=ng}function q(O,_,Ig){var ng,ag,lg,cg,dg=0;if(O.last_lit!==0)for(;ng=O.pending_buf[O.d_buf+2*dg]<<8|O.pending_buf[O.d_buf+2*dg+1],ag=O.pending_buf[O.l_buf+dg],dg++,ng===0?Q(O,ag,_):(Q(O,(lg=V[ag])+m+1,_),(cg=R[lg])!==0&&T(O,ag-=N[lg],cg),Q(O,lg=D(--ng),Ig),(cg=X[lg])!==0&&T(O,ng-=W[lg],cg)),dg<O.last_lit;);Q(O,256,_)}function tg(O,_){var Ig,ng,ag,lg=_.dyn_tree,cg=_.stat_desc.static_tree,dg=_.stat_desc.has_stree,hg=_.stat_desc.elems,rg=-1;for(O.heap_len=0,O.heap_max=573,Ig=0;Ig<hg;Ig++)lg[2*Ig]!==0?(O.heap[++O.heap_len]=rg=Ig,O.depth[Ig]=0):lg[2*Ig+1]=0;for(;O.heap_len<2;)lg[2*(ag=O.heap[++O.heap_len]=rg<2?++rg:0)]=1,O.depth[ag]=0,O.opt_len--,dg&&(O.static_len-=cg[2*ag+1]);for(_.max_code=rg,Ig=O.heap_len>>1;1<=Ig;Ig--)j(O,lg,Ig);for(ag=hg;Ig=O.heap[1],O.heap[1]=O.heap[O.heap_len--],j(O,lg,1),ng=O.heap[1],O.heap[--O.heap_max]=Ig,O.heap[--O.heap_max]=ng,lg[2*ag]=lg[2*Ig]+lg[2*ng],O.depth[ag]=(O.depth[Ig]>=O.depth[ng]?O.depth[Ig]:O.depth[ng])+1,lg[2*Ig+1]=lg[2*ng+1]=ag,O.heap[1]=ag++,j(O,lg,1),2<=O.heap_len;);O.heap[--O.heap_max]=O.heap[1],function(Wg,Gg){var Sg,Kg,kg,yg,Vg,pg,Hg=Gg.dyn_tree,Jg=Gg.max_code,zg=Gg.stat_desc.static_tree,aI=Gg.stat_desc.has_stree,BI=Gg.stat_desc.extra_bits,Ug=Gg.stat_desc.extra_base,lI=Gg.stat_desc.max_length,oI=0;for(yg=0;yg<=Y;yg++)Wg.bl_count[yg]=0;for(Hg[2*Wg.heap[Wg.heap_max]+1]=0,Sg=Wg.heap_max+1;Sg<573;Sg++)lI<(yg=Hg[2*Hg[2*(Kg=Wg.heap[Sg])+1]+1]+1)&&(yg=lI,oI++),Hg[2*Kg+1]=yg,Jg<Kg||(Wg.bl_count[yg]++,Vg=0,Ug<=Kg&&(Vg=BI[Kg-Ug]),pg=Hg[2*Kg],Wg.opt_len+=pg*(yg+Vg),aI&&(Wg.static_len+=pg*(zg[2*Kg+1]+Vg)));if(oI!==0){do{for(yg=lI-1;Wg.bl_count[yg]===0;)yg--;Wg.bl_count[yg]--,Wg.bl_count[yg+1]+=2,Wg.bl_count[lI]--,oI-=2}while(0<oI);for(yg=lI;yg!==0;yg--)for(Kg=Wg.bl_count[yg];Kg!==0;)Jg<(kg=Wg.heap[--Sg])||(Hg[2*kg+1]!==yg&&(Wg.opt_len+=(yg-Hg[2*kg+1])*Hg[2*kg],Hg[2*kg+1]=yg),Kg--)}}(O,_),L(lg,rg,O.bl_count)}function Cg(O,_,Ig){var ng,ag,lg=-1,cg=_[1],dg=0,hg=7,rg=4;for(cg===0&&(hg=138,rg=3),_[2*(Ig+1)+1]=65535,ng=0;ng<=Ig;ng++)ag=cg,cg=_[2*(ng+1)+1],++dg<hg&&ag===cg||(dg<rg?O.bl_tree[2*ag]+=dg:ag!==0?(ag!==lg&&O.bl_tree[2*ag]++,O.bl_tree[32]++):dg<=10?O.bl_tree[34]++:O.bl_tree[36]++,lg=ag,rg=(dg=0)===cg?(hg=138,3):ag===cg?(hg=6,3):(hg=7,4))}function x(O,_,Ig){var ng,ag,lg=-1,cg=_[1],dg=0,hg=7,rg=4;for(cg===0&&(hg=138,rg=3),ng=0;ng<=Ig;ng++)if(ag=cg,cg=_[2*(ng+1)+1],!(++dg<hg&&ag===cg)){if(dg<rg)for(;Q(O,ag,O.bl_tree),--dg!=0;);else ag!==0?(ag!==lg&&(Q(O,ag,O.bl_tree),dg--),Q(O,16,O.bl_tree),T(O,dg-3,2)):dg<=10?(Q(O,17,O.bl_tree),T(O,dg-3,3)):(Q(O,18,O.bl_tree),T(O,dg-11,7));lg=ag,rg=(dg=0)===cg?(hg=138,3):ag===cg?(hg=6,3):(hg=7,4)}}u(W);var sg=!1;function Ag(O,_,Ig,ng){T(O,0+(ng?1:0),3),function(ag,lg,cg,dg){J(ag),F(ag,cg),F(ag,~cg),b.arraySet(ag.pending_buf,ag.window,lg,cg,ag.pending),ag.pending+=cg}(O,_,Ig)}h._tr_init=function(O){sg||(function(){var _,Ig,ng,ag,lg,cg=new Array(16);for(ag=ng=0;ag<28;ag++)for(N[ag]=ng,_=0;_<1<<R[ag];_++)V[ng++]=ag;for(V[ng-1]=ag,ag=lg=0;ag<16;ag++)for(W[ag]=lg,_=0;_<1<<X[ag];_++)K[lg++]=ag;for(lg>>=7;ag<p;ag++)for(W[ag]=lg<<7,_=0;_<1<<X[ag]-7;_++)K[256+lg++]=ag;for(Ig=0;Ig<=Y;Ig++)cg[Ig]=0;for(_=0;_<=143;)z[2*_+1]=8,_++,cg[8]++;for(;_<=255;)z[2*_+1]=9,_++,cg[9]++;for(;_<=279;)z[2*_+1]=7,_++,cg[7]++;for(;_<=287;)z[2*_+1]=8,_++,cg[8]++;for(L(z,287,cg),_=0;_<p;_++)v[2*_+1]=5,v[2*_]=P(_,5);B=new y(z,R,257,Z,Y),G=new y(v,X,0,p,Y),w=new y(new Array(0),H,0,19,7)}(),sg=!0),O.l_desc=new f(O.dyn_ltree,B),O.d_desc=new f(O.dyn_dtree,G),O.bl_desc=new f(O.bl_tree,w),O.bi_buf=0,O.bi_valid=0,E(O)},h._tr_stored_block=Ag,h._tr_flush_block=function(O,_,Ig,ng){var ag,lg,cg=0;0<O.level?(O.strm.data_type===2&&(O.strm.data_type=function(dg){var hg,rg=4093624447;for(hg=0;hg<=31;hg++,rg>>>=1)if(1&rg&&dg.dyn_ltree[2*hg]!==0)return 0;if(dg.dyn_ltree[18]!==0||dg.dyn_ltree[20]!==0||dg.dyn_ltree[26]!==0)return 1;for(hg=32;hg<m;hg++)if(dg.dyn_ltree[2*hg]!==0)return 1;return 0}(O)),tg(O,O.l_desc),tg(O,O.d_desc),cg=function(dg){var hg;for(Cg(dg,dg.dyn_ltree,dg.l_desc.max_code),Cg(dg,dg.dyn_dtree,dg.d_desc.max_code),tg(dg,dg.bl_desc),hg=18;3<=hg&&dg.bl_tree[2*S[hg]+1]===0;hg--);return dg.opt_len+=3*(hg+1)+5+5+4,hg}(O),ag=O.opt_len+3+7>>>3,(lg=O.static_len+3+7>>>3)<=ag&&(ag=lg)):ag=lg=Ig+5,Ig+4<=ag&&_!==-1?Ag(O,_,Ig,ng):O.strategy===4||lg===ag?(T(O,2+(ng?1:0),3),q(O,z,v)):(T(O,4+(ng?1:0),3),function(dg,hg,rg,Wg){var Gg;for(T(dg,hg-257,5),T(dg,rg-1,5),T(dg,Wg-4,4),Gg=0;Gg<Wg;Gg++)T(dg,dg.bl_tree[2*S[Gg]+1],3);x(dg,dg.dyn_ltree,hg-1),x(dg,dg.dyn_dtree,rg-1)}(O,O.l_desc.max_code+1,O.d_desc.max_code+1,cg+1),q(O,O.dyn_ltree,O.dyn_dtree)),E(O),ng&&J(O)},h._tr_tally=function(O,_,Ig){return O.pending_buf[O.d_buf+2*O.last_lit]=_>>>8&255,O.pending_buf[O.d_buf+2*O.last_lit+1]=255&_,O.pending_buf[O.l_buf+O.last_lit]=255&Ig,O.last_lit++,_===0?O.dyn_ltree[2*Ig]++:(O.matches++,_--,O.dyn_ltree[2*(V[Ig]+m+1)]++,O.dyn_dtree[2*D(_)]++),O.last_lit===O.lit_bufsize-1},h._tr_align=function(O){T(O,2,3),Q(O,256,z),function(_){_.bi_valid===16?(F(_,_.bi_buf),_.bi_buf=0,_.bi_valid=0):8<=_.bi_valid&&(_.pending_buf[_.pending++]=255&_.bi_buf,_.bi_buf>>=8,_.bi_valid-=8)}(O)}},{"../utils/common":41}],53:[function(c,r,h){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(c,r,h){(function(b){(function(u,m){if(!u.setImmediate){var Z,p,Y,R,X=1,H={},S=!1,z=u.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(u);v=v&&v.setTimeout?v:u,Z={}.toString.call(u.process)==="[object process]"?function(B){e.nextTick(function(){V(B)})}:function(){if(u.postMessage&&!u.importScripts){var B=!0,G=u.onmessage;return u.onmessage=function(){B=!1},u.postMessage("","*"),u.onmessage=G,B}}()?(R="setImmediate$"+Math.random()+"$",u.addEventListener?u.addEventListener("message",N,!1):u.attachEvent("onmessage",N),function(B){u.postMessage(R+B,"*")}):u.MessageChannel?((Y=new MessageChannel).port1.onmessage=function(B){V(B.data)},function(B){Y.port2.postMessage(B)}):z&&"onreadystatechange"in z.createElement("script")?(p=z.documentElement,function(B){var G=z.createElement("script");G.onreadystatechange=function(){V(B),G.onreadystatechange=null,p.removeChild(G),G=null},p.appendChild(G)}):function(B){setTimeout(V,0,B)},v.setImmediate=function(B){typeof B!="function"&&(B=new Function(""+B));for(var G=new Array(arguments.length-1),w=0;w<G.length;w++)G[w]=arguments[w+1];var W={callback:B,args:G};return H[X]=W,Z(X),X++},v.clearImmediate=K}function K(B){delete H[B]}function V(B){if(S)setTimeout(V,0,B);else{var G=H[B];if(G){S=!0;try{(function(w){var W=w.callback,y=w.args;switch(y.length){case 0:W();break;case 1:W(y[0]);break;case 2:W(y[0],y[1]);break;case 3:W(y[0],y[1],y[2]);break;default:W.apply(void 0,y)}})(G)}finally{K(B),S=!1}}}}function N(B){B.source===u&&typeof B.data=="string"&&B.data.indexOf(R)===0&&V(+B.data.slice(R.length))}})(typeof self>"u"?b===void 0?this:b:self)}).call(this,A!==void 0?A:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(g,C,i){(function(e){(function(){var A=/[\\^$.*+?()[\]{}|]/g,s=RegExp(A.source),l=typeof e=="object"&&e&&e.Object===Object&&e,n=typeof self=="object"&&self&&self.Object===Object&&self,a=l||n||Function("return this")(),d=Object.prototype.toString,o=a.Symbol,c=o?o.prototype:void 0,r=c?c.toString:void 0;function h(b){if(typeof b=="string")return b;if(function(m){return typeof m=="symbol"||function(Z){return!!Z&&typeof Z=="object"}(m)&&d.call(m)=="[object Symbol]"}(b))return r?r.call(b):"";var u=b+"";return u=="0"&&1/b==-1/0?"-0":u}C.exports=function(b){var u;return(b=(u=b)==null?"":h(u))&&s.test(b)?b.replace(A,"\\$&"):b}}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(g,C,i){(function(e){(function(){var A="[object Arguments]",s="[object Map]",l="[object Object]",n="[object Set]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,o=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[A]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[s]=u["[object Number]"]=u[l]=u["[object RegExp]"]=u[n]=u["[object String]"]=u["[object WeakMap]"]=!1;var m=typeof e=="object"&&e&&e.Object===Object&&e,Z=typeof self=="object"&&self&&self.Object===Object&&self,p=m||Z||Function("return this")(),Y=typeof i=="object"&&i&&!i.nodeType&&i,R=Y&&typeof C=="object"&&C&&!C.nodeType&&C,X=R&&R.exports===Y&&m.process,H=function(){try{return X&&X.binding("util")}catch{}}(),S=H&&H.isTypedArray;function z(og,Zg,Dg,Fg){for(var II=-1,vg=og?og.length:0;++II<vg;){var xg=og[II];Zg(Fg,xg,Dg(xg),og)}return Fg}function v(og,Zg){for(var Dg=-1,Fg=og?og.length:0;++Dg<Fg;)if(Zg(og[Dg],Dg,og))return!0;return!1}function K(og){var Zg=!1;if(og!=null&&typeof og.toString!="function")try{Zg=!!(og+"")}catch{}return Zg}function V(og){var Zg=-1,Dg=Array(og.size);return og.forEach(function(Fg,II){Dg[++Zg]=[II,Fg]}),Dg}function N(og){var Zg=-1,Dg=Array(og.size);return og.forEach(function(Fg){Dg[++Zg]=Fg}),Dg}var B,G,w,W=Array.prototype,y=Function.prototype,f=Object.prototype,D=p["__core-js_shared__"],F=(B=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",T=y.toString,Q=f.hasOwnProperty,P=f.toString,L=RegExp("^"+T.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=p.Symbol,J=p.Uint8Array,k=f.propertyIsEnumerable,j=W.splice,q=(G=Object.keys,w=Object,function(og){return G(w(og))}),tg=tI(p,"DataView"),Cg=tI(p,"Map"),x=tI(p,"Promise"),sg=tI(p,"Set"),Ag=tI(p,"WeakMap"),O=tI(Object,"create"),_=ug(tg),Ig=ug(Cg),ng=ug(x),ag=ug(sg),lg=ug(Ag),cg=E?E.prototype:void 0,dg=cg?cg.valueOf:void 0,hg=cg?cg.toString:void 0;function rg(og){var Zg=-1,Dg=og?og.length:0;for(this.clear();++Zg<Dg;){var Fg=og[Zg];this.set(Fg[0],Fg[1])}}function Wg(og){var Zg=-1,Dg=og?og.length:0;for(this.clear();++Zg<Dg;){var Fg=og[Zg];this.set(Fg[0],Fg[1])}}function Gg(og){var Zg=-1,Dg=og?og.length:0;for(this.clear();++Zg<Dg;){var Fg=og[Zg];this.set(Fg[0],Fg[1])}}function Sg(og){var Zg=-1,Dg=og?og.length:0;for(this.__data__=new Gg;++Zg<Dg;)this.add(og[Zg])}function Kg(og){this.__data__=new Wg(og)}function kg(og,Zg){var Dg=sI(og)||mI(og)?function(xg,zI){for(var VI=-1,YI=Array(xg);++VI<xg;)YI[VI]=zI(VI);return YI}(og.length,String):[],Fg=Dg.length,II=!!Fg;for(var vg in og)!Q.call(og,vg)||II&&(vg=="length"||QI(vg,Fg))||Dg.push(vg);return Dg}function yg(og,Zg){for(var Dg=og.length;Dg--;)if(jg(og[Dg][0],Zg))return Dg;return-1}function Vg(og,Zg,Dg,Fg){return Hg(og,function(II,vg,xg){Zg(Fg,II,Dg(II),xg)}),Fg}rg.prototype.clear=function(){this.__data__=O?O(null):{}},rg.prototype.delete=function(og){return this.has(og)&&delete this.__data__[og]},rg.prototype.get=function(og){var Zg=this.__data__;if(O){var Dg=Zg[og];return Dg==="__lodash_hash_undefined__"?void 0:Dg}return Q.call(Zg,og)?Zg[og]:void 0},rg.prototype.has=function(og){var Zg=this.__data__;return O?Zg[og]!==void 0:Q.call(Zg,og)},rg.prototype.set=function(og,Zg){return this.__data__[og]=O&&Zg===void 0?"__lodash_hash_undefined__":Zg,this},Wg.prototype.clear=function(){this.__data__=[]},Wg.prototype.delete=function(og){var Zg=this.__data__,Dg=yg(Zg,og);return!(Dg<0)&&(Dg==Zg.length-1?Zg.pop():j.call(Zg,Dg,1),!0)},Wg.prototype.get=function(og){var Zg=this.__data__,Dg=yg(Zg,og);return Dg<0?void 0:Zg[Dg][1]},Wg.prototype.has=function(og){return yg(this.__data__,og)>-1},Wg.prototype.set=function(og,Zg){var Dg=this.__data__,Fg=yg(Dg,og);return Fg<0?Dg.push([og,Zg]):Dg[Fg][1]=Zg,this},Gg.prototype.clear=function(){this.__data__={hash:new rg,map:new(Cg||Wg),string:new rg}},Gg.prototype.delete=function(og){return fI(this,og).delete(og)},Gg.prototype.get=function(og){return fI(this,og).get(og)},Gg.prototype.has=function(og){return fI(this,og).has(og)},Gg.prototype.set=function(og,Zg){return fI(this,og).set(og,Zg),this},Sg.prototype.add=Sg.prototype.push=function(og){return this.__data__.set(og,"__lodash_hash_undefined__"),this},Sg.prototype.has=function(og){return this.__data__.has(og)},Kg.prototype.clear=function(){this.__data__=new Wg},Kg.prototype.delete=function(og){return this.__data__.delete(og)},Kg.prototype.get=function(og){return this.__data__.get(og)},Kg.prototype.has=function(og){return this.__data__.has(og)},Kg.prototype.set=function(og,Zg){var Dg=this.__data__;if(Dg instanceof Wg){var Fg=Dg.__data__;if(!Cg||Fg.length<199)return Fg.push([og,Zg]),this;Dg=this.__data__=new Gg(Fg)}return Dg.set(og,Zg),this};var pg,Hg=(pg=function(og,Zg){return og&&Jg(og,Zg,nC)},function(og,Zg){if(og==null)return og;if(!gI(og))return pg(og,Zg);for(var Dg=og.length,Fg=-1,II=Object(og);++Fg<Dg&&Zg(II[Fg],Fg,II)!==!1;);return og}),Jg=function(og){return function(Zg,Dg,Fg){for(var II=-1,vg=Object(Zg),xg=Fg(Zg),zI=xg.length;zI--;){var VI=xg[++II];if(Dg(vg[VI],VI,vg)===!1)break}return Zg}}();function zg(og,Zg){for(var Dg=0,Fg=(Zg=nI(Zg,og)?[Zg]:Eg(Zg)).length;og!=null&&Dg<Fg;)og=og[bg(Zg[Dg++])];return Dg&&Dg==Fg?og:void 0}function aI(og,Zg){return og!=null&&Zg in Object(og)}function BI(og,Zg,Dg,Fg,II){return og===Zg||(og==null||Zg==null||!yI(og)&&!wC(Zg)?og!=og&&Zg!=Zg:function(vg,xg,zI,VI,YI,dI){var CC=sI(vg),OI=sI(xg),vI="[object Array]",rC="[object Array]";CC||(vI=(vI=WI(vg))==A?l:vI),OI||(rC=(rC=WI(xg))==A?l:rC);var hC=vI==l&&!K(vg),pt=rC==l&&!K(xg),Ni=vI==rC;if(Ni&&!hC)return dI||(dI=new Kg),CC||_C(vg)?LI(vg,xg,zI,VI,YI,dI):function(qI,TI,qe,HA,El,bi,$e){switch(qe){case"[object DataView]":if(qI.byteLength!=TI.byteLength||qI.byteOffset!=TI.byteOffset)return!1;qI=qI.buffer,TI=TI.buffer;case"[object ArrayBuffer]":return!(qI.byteLength!=TI.byteLength||!HA(new J(qI),new J(TI)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jg(+qI,+TI);case"[object Error]":return qI.name==TI.name&&qI.message==TI.message;case"[object RegExp]":case"[object String]":return qI==TI+"";case s:var gA=V;case n:var ja=2&bi;if(gA||(gA=N),qI.size!=TI.size&&!ja)return!1;var Ss=$e.get(qI);if(Ss)return Ss==TI;bi|=1,$e.set(qI,TI);var kt=LI(gA(qI),gA(TI),HA,El,bi,$e);return $e.delete(qI),kt;case"[object Symbol]":if(dg)return dg.call(qI)==dg.call(TI)}return!1}(vg,xg,vI,zI,VI,YI,dI);if(!(2&YI)){var fA=hC&&Q.call(vg,"__wrapped__"),Hs=pt&&Q.call(xg,"__wrapped__");if(fA||Hs){var _e=fA?vg.value():vg,Xs=Hs?xg.value():xg;return dI||(dI=new Kg),zI(_e,Xs,VI,YI,dI)}}return Ni?(dI||(dI=new Kg),function(qI,TI,qe,HA,El,bi){var $e=2&El,gA=nC(qI),ja=gA.length,Ss=nC(TI).length;if(ja!=Ss&&!$e)return!1;for(var kt=ja;kt--;){var Bt=gA[kt];if(!($e?Bt in TI:Q.call(TI,Bt)))return!1}var W0=bi.get(qI);if(W0&&bi.get(TI))return W0==TI;var OC=!0;bi.set(qI,TI),bi.set(TI,qI);for(var ad=$e;++kt<ja;){Bt=gA[kt];var Qa=qI[Bt],Oa=TI[Bt];if(HA)var nG=$e?HA(Oa,Qa,Bt,TI,qI,bi):HA(Qa,Oa,Bt,qI,TI,bi);if(!(nG===void 0?Qa===Oa||qe(Qa,Oa,HA,El,bi):nG)){OC=!1;break}ad||(ad=Bt=="constructor")}if(OC&&!ad){var Ds=qI.constructor,od=TI.constructor;Ds==od||!("constructor"in qI)||!("constructor"in TI)||typeof Ds=="function"&&Ds instanceof Ds&&typeof od=="function"&&od instanceof od||(OC=!1)}return bi.delete(qI),bi.delete(TI),OC}(vg,xg,zI,VI,YI,dI)):!1}(og,Zg,BI,Dg,Fg,II))}function Ug(og){return!(!yI(og)||function(Zg){return!!F&&F in Zg}(og))&&(pI(og)||K(og)?L:h).test(ug(og))}function lI(og){return typeof og=="function"?og:og==null?Ft:typeof og=="object"?sI(og)?function(Fg,II){return nI(Fg)&&kI(II)?Bg(bg(Fg),II):function(vg){var xg=function(zI,VI,YI){var dI=zI==null?void 0:zg(zI,VI);return dI===void 0?YI:dI}(vg,Fg);return xg===void 0&&xg===II?function(zI,VI){return zI!=null&&function(YI,dI,CC){dI=nI(dI,YI)?[dI]:Eg(dI);for(var OI,vI=-1,rC=dI.length;++vI<rC;){var hC=bg(dI[vI]);if(!(OI=YI!=null&&CC(YI,hC)))break;YI=YI[hC]}return OI||!!(rC=YI?YI.length:0)&&bI(rC)&&QI(hC,rC)&&(sI(YI)||mI(YI))}(zI,VI,aI)}(vg,Fg):BI(II,xg,void 0,3)}}(og[0],og[1]):function(Fg){var II=function(vg){for(var xg=nC(vg),zI=xg.length;zI--;){var VI=xg[zI],YI=vg[VI];xg[zI]=[VI,YI,kI(YI)]}return xg}(Fg);return II.length==1&&II[0][2]?Bg(II[0][0],II[0][1]):function(vg){return vg===Fg||function(xg,zI,VI,YI){var dI=VI.length,CC=dI;if(xg==null)return!CC;for(xg=Object(xg);dI--;){var OI=VI[dI];if(OI[2]?OI[1]!==xg[OI[0]]:!(OI[0]in xg))return!1}for(;++dI<CC;){var vI=(OI=VI[dI])[0],rC=xg[vI],hC=OI[1];if(OI[2]){if(rC===void 0&&!(vI in xg))return!1}else{var pt=new Kg,Ni;if(!(Ni===void 0?BI(hC,rC,YI,3,pt):Ni))return!1}}return!0}(vg,Fg,II)}}(og):nI(Zg=og)?(Dg=bg(Zg),function(Fg){return Fg==null?void 0:Fg[Dg]}):function(Fg){return function(II){return zg(II,Fg)}}(Zg);var Zg,Dg}function oI(og){if(Dg=(Zg=og)&&Zg.constructor,Fg=typeof Dg=="function"&&Dg.prototype||f,Zg!==Fg)return q(og);var Zg,Dg,Fg,II=[];for(var vg in Object(og))Q.call(og,vg)&&vg!="constructor"&&II.push(vg);return II}function Eg(og){return sI(og)?og:hI(og)}function LI(og,Zg,Dg,Fg,II,vg){var xg=2&II,zI=og.length,VI=Zg.length;if(zI!=VI&&!(xg&&VI>zI))return!1;var YI=vg.get(og);if(YI&&vg.get(Zg))return YI==Zg;var dI=-1,CC=!0,OI=1&II?new Sg:void 0;for(vg.set(og,Zg),vg.set(Zg,og);++dI<zI;){var vI=og[dI],rC=Zg[dI];if(Fg)var hC=xg?Fg(rC,vI,dI,Zg,og,vg):Fg(vI,rC,dI,og,Zg,vg);if(hC!==void 0){if(hC)continue;CC=!1;break}if(OI){if(!v(Zg,function(pt,Ni){if(!OI.has(Ni)&&(vI===pt||Dg(vI,pt,Fg,II,vg)))return OI.add(Ni)})){CC=!1;break}}else if(vI!==rC&&!Dg(vI,rC,Fg,II,vg)){CC=!1;break}}return vg.delete(og),vg.delete(Zg),CC}function fI(og,Zg){var Dg,Fg,II=og.__data__;return((Fg=typeof(Dg=Zg))=="string"||Fg=="number"||Fg=="symbol"||Fg=="boolean"?Dg!=="__proto__":Dg===null)?II[typeof Zg=="string"?"string":"hash"]:II.map}function tI(og,Zg){var Dg=function(Fg,II){return Fg==null?void 0:Fg[II]}(og,Zg);return Ug(Dg)?Dg:void 0}var WI=function(og){return P.call(og)};function QI(og,Zg){return!!(Zg=Zg??9007199254740991)&&(typeof og=="number"||b.test(og))&&og>-1&&og%1==0&&og<Zg}function nI(og,Zg){if(sI(og))return!1;var Dg=typeof og;return!(Dg!="number"&&Dg!="symbol"&&Dg!="boolean"&&og!=null&&!_I(og))||d.test(og)||!a.test(og)||Zg!=null&&og in Object(Zg)}function kI(og){return og==og&&!yI(og)}function Bg(og,Zg){return function(Dg){return Dg!=null&&Dg[og]===Zg&&(Zg!==void 0||og in Object(Dg))}}(tg&&WI(new tg(new ArrayBuffer(1)))!="[object DataView]"||Cg&&WI(new Cg)!=s||x&&WI(x.resolve())!="[object Promise]"||sg&&WI(new sg)!=n||Ag&&WI(new Ag)!="[object WeakMap]")&&(WI=function(og){var Zg=P.call(og),Dg=Zg==l?og.constructor:void 0,Fg=Dg?ug(Dg):void 0;if(Fg)switch(Fg){case _:return"[object DataView]";case Ig:return s;case ng:return"[object Promise]";case ag:return n;case lg:return"[object WeakMap]"}return Zg});var hI=cI(function(og){var Zg;og=(Zg=og)==null?"":function(Fg){if(typeof Fg=="string")return Fg;if(_I(Fg))return hg?hg.call(Fg):"";var II=Fg+"";return II=="0"&&1/Fg==-1/0?"-0":II}(Zg);var Dg=[];return o.test(og)&&Dg.push(""),og.replace(c,function(Fg,II,vg,xg){Dg.push(vg?xg.replace(r,"$1"):II||Fg)}),Dg});function bg(og){if(typeof og=="string"||_I(og))return og;var Zg=og+"";return Zg=="0"&&1/og==-1/0?"-0":Zg}function ug(og){if(og!=null){try{return T.call(og)}catch{}try{return og+""}catch{}}return""}var fg,Tg=(fg=function(og,Zg,Dg){Q.call(og,Dg)?og[Dg].push(Zg):og[Dg]=[Zg]},function(og,Zg){var Dg=sI(og)?z:Vg,Fg={};return Dg(og,fg,lI(Zg),Fg)});function cI(og,Zg){if(typeof og!="function"||Zg&&typeof Zg!="function")throw new TypeError("Expected a function");var Dg=function(){var Fg=arguments,II=Zg?Zg.apply(this,Fg):Fg[0],vg=Dg.cache;if(vg.has(II))return vg.get(II);var xg=og.apply(this,Fg);return Dg.cache=vg.set(II,xg),xg};return Dg.cache=new(cI.Cache||Gg),Dg}function jg(og,Zg){return og===Zg||og!=og&&Zg!=Zg}function mI(og){return function(Zg){return wC(Zg)&&gI(Zg)}(og)&&Q.call(og,"callee")&&(!k.call(og,"callee")||P.call(og)==A)}cI.Cache=Gg;var sI=Array.isArray;function gI(og){return og!=null&&bI(og.length)&&!pI(og)}function pI(og){var Zg=yI(og)?P.call(og):"";return Zg=="[object Function]"||Zg=="[object GeneratorFunction]"}function bI(og){return typeof og=="number"&&og>-1&&og%1==0&&og<=9007199254740991}function yI(og){var Zg=typeof og;return!!og&&(Zg=="object"||Zg=="function")}function wC(og){return!!og&&typeof og=="object"}function _I(og){return typeof og=="symbol"||wC(og)&&P.call(og)=="[object Symbol]"}var _C=S?function(og){return function(Zg){return og(Zg)}}(S):function(og){return wC(og)&&bI(og.length)&&!!u[P.call(og)]};function nC(og){return gI(og)?kg(og):oI(og)}function Ft(og){return og}C.exports=Tg}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(g,C,i){var e=Object.prototype.toString;C.exports=function(A){return A===!0||A===!1||function(s){return!!s&&typeof s=="object"}(A)&&e.call(A)=="[object Boolean]"}},{}],445:[function(g,C,i){(function(e){(function(){var A="[object Arguments]",s="[object Map]",l="[object Object]",n="[object Set]",a=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o[A]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o[s]=o["[object Number]"]=o[l]=o["[object RegExp]"]=o[n]=o["[object String]"]=o["[object WeakMap]"]=!1;var c=typeof e=="object"&&e&&e.Object===Object&&e,r=typeof self=="object"&&self&&self.Object===Object&&self,h=c||r||Function("return this")(),b=typeof i=="object"&&i&&!i.nodeType&&i,u=b&&typeof C=="object"&&C&&!C.nodeType&&C,m=u&&u.exports===b,Z=m&&c.process,p=function(){try{return Z&&Z.binding&&Z.binding("util")}catch{}}(),Y=p&&p.isTypedArray;function R(bg,ug){for(var fg=-1,Tg=bg==null?0:bg.length;++fg<Tg;)if(ug(bg[fg],fg,bg))return!0;return!1}function X(bg){var ug=-1,fg=Array(bg.size);return bg.forEach(function(Tg,cI){fg[++ug]=[cI,Tg]}),fg}function H(bg){var ug=-1,fg=Array(bg.size);return bg.forEach(function(Tg){fg[++ug]=Tg}),fg}var S,z,v,K=Array.prototype,V=Function.prototype,N=Object.prototype,B=h["__core-js_shared__"],G=V.toString,w=N.hasOwnProperty,W=(S=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",y=N.toString,f=RegExp("^"+G.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m?h.Buffer:void 0,F=h.Symbol,T=h.Uint8Array,Q=N.propertyIsEnumerable,P=K.splice,L=F?F.toStringTag:void 0,E=Object.getOwnPropertySymbols,J=D?D.isBuffer:void 0,k=(z=Object.keys,v=Object,function(bg){return z(v(bg))}),j=aI(h,"DataView"),q=aI(h,"Map"),tg=aI(h,"Promise"),Cg=aI(h,"Set"),x=aI(h,"WeakMap"),sg=aI(Object,"create"),Ag=oI(j),O=oI(q),_=oI(tg),Ig=oI(Cg),ng=oI(x),ag=F?F.prototype:void 0,lg=ag?ag.valueOf:void 0;function cg(bg){var ug=-1,fg=bg==null?0:bg.length;for(this.clear();++ug<fg;){var Tg=bg[ug];this.set(Tg[0],Tg[1])}}function dg(bg){var ug=-1,fg=bg==null?0:bg.length;for(this.clear();++ug<fg;){var Tg=bg[ug];this.set(Tg[0],Tg[1])}}function hg(bg){var ug=-1,fg=bg==null?0:bg.length;for(this.clear();++ug<fg;){var Tg=bg[ug];this.set(Tg[0],Tg[1])}}function rg(bg){var ug=-1,fg=bg==null?0:bg.length;for(this.__data__=new hg;++ug<fg;)this.add(bg[ug])}function Wg(bg){var ug=this.__data__=new dg(bg);this.size=ug.size}function Gg(bg,ug){var fg=fI(bg),Tg=!fg&&LI(bg),cI=!fg&&!Tg&&tI(bg),jg=!fg&&!Tg&&!cI&&Bg(bg),mI=fg||Tg||cI||jg,sI=mI?function(bI,yI){for(var wC=-1,_I=Array(bI);++wC<bI;)_I[wC]=yI(wC);return _I}(bg.length,String):[],gI=sI.length;for(var pI in bg)!w.call(bg,pI)||mI&&(pI=="length"||cI&&(pI=="offset"||pI=="parent")||jg&&(pI=="buffer"||pI=="byteLength"||pI=="byteOffset")||lI(pI,gI))||sI.push(pI);return sI}function Sg(bg,ug){for(var fg=bg.length;fg--;)if(Eg(bg[fg][0],ug))return fg;return-1}function Kg(bg){return bg==null?bg===void 0?"[object Undefined]":"[object Null]":L&&L in Object(bg)?function(ug){var fg=w.call(ug,L),Tg=ug[L];try{ug[L]=void 0;var cI=!0}catch{}var jg=y.call(ug);return cI&&(fg?ug[L]=Tg:delete ug[L]),jg}(bg):function(ug){return y.call(ug)}(bg)}function kg(bg){return kI(bg)&&Kg(bg)==A}function yg(bg,ug,fg,Tg,cI){return bg===ug||(bg==null||ug==null||!kI(bg)&&!kI(ug)?bg!=bg&&ug!=ug:function(jg,mI,sI,gI,pI,bI){var yI=fI(jg),wC=fI(mI),_I=yI?"[object Array]":Ug(jg),_C=wC?"[object Array]":Ug(mI),nC=(_I=_I==A?l:_I)==l,Ft=(_C=_C==A?l:_C)==l,og=_I==_C;if(og&&tI(jg)){if(!tI(mI))return!1;yI=!0,nC=!1}if(og&&!nC)return bI||(bI=new Wg),yI||Bg(jg)?Hg(jg,mI,sI,gI,pI,bI):function(vg,xg,zI,VI,YI,dI,CC){switch(zI){case"[object DataView]":if(vg.byteLength!=xg.byteLength||vg.byteOffset!=xg.byteOffset)return!1;vg=vg.buffer,xg=xg.buffer;case"[object ArrayBuffer]":return!(vg.byteLength!=xg.byteLength||!dI(new T(vg),new T(xg)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Eg(+vg,+xg);case"[object Error]":return vg.name==xg.name&&vg.message==xg.message;case"[object RegExp]":case"[object String]":return vg==xg+"";case s:var OI=X;case n:var vI=1&VI;if(OI||(OI=H),vg.size!=xg.size&&!vI)return!1;var rC=CC.get(vg);if(rC)return rC==xg;VI|=2,CC.set(vg,xg);var hC=Hg(OI(vg),OI(xg),VI,YI,dI,CC);return CC.delete(vg),hC;case"[object Symbol]":if(lg)return lg.call(vg)==lg.call(xg)}return!1}(jg,mI,_I,sI,gI,pI,bI);if(!(1&sI)){var Zg=nC&&w.call(jg,"__wrapped__"),Dg=Ft&&w.call(mI,"__wrapped__");if(Zg||Dg){var Fg=Zg?jg.value():jg,II=Dg?mI.value():mI;return bI||(bI=new Wg),pI(Fg,II,sI,gI,bI)}}return og?(bI||(bI=new Wg),function(vg,xg,zI,VI,YI,dI){var CC=1&zI,OI=Jg(vg),vI=OI.length,rC=Jg(xg).length;if(vI!=rC&&!CC)return!1;for(var hC=vI;hC--;){var pt=OI[hC];if(!(CC?pt in xg:w.call(xg,pt)))return!1}var Ni=dI.get(vg);if(Ni&&dI.get(xg))return Ni==xg;var fA=!0;dI.set(vg,xg),dI.set(xg,vg);for(var Hs=CC;++hC<vI;){pt=OI[hC];var _e=vg[pt],Xs=xg[pt];if(VI)var qI=CC?VI(Xs,_e,pt,xg,vg,dI):VI(_e,Xs,pt,vg,xg,dI);if(!(qI===void 0?_e===Xs||YI(_e,Xs,zI,VI,dI):qI)){fA=!1;break}Hs||(Hs=pt=="constructor")}if(fA&&!Hs){var TI=vg.constructor,qe=xg.constructor;TI==qe||!("constructor"in vg)||!("constructor"in xg)||typeof TI=="function"&&TI instanceof TI&&typeof qe=="function"&&qe instanceof qe||(fA=!1)}return dI.delete(vg),dI.delete(xg),fA}(jg,mI,sI,gI,pI,bI)):!1}(bg,ug,fg,Tg,yg,cI))}function Vg(bg){return!(!nI(bg)||function(ug){return!!W&&W in ug}(bg))&&(WI(bg)?f:a).test(oI(bg))}function pg(bg){if(fg=(ug=bg)&&ug.constructor,Tg=typeof fg=="function"&&fg.prototype||N,ug!==Tg)return k(bg);var ug,fg,Tg,cI=[];for(var jg in Object(bg))w.call(bg,jg)&&jg!="constructor"&&cI.push(jg);return cI}function Hg(bg,ug,fg,Tg,cI,jg){var mI=1&fg,sI=bg.length,gI=ug.length;if(sI!=gI&&!(mI&&gI>sI))return!1;var pI=jg.get(bg);if(pI&&jg.get(ug))return pI==ug;var bI=-1,yI=!0,wC=2&fg?new rg:void 0;for(jg.set(bg,ug),jg.set(ug,bg);++bI<sI;){var _I=bg[bI],_C=ug[bI];if(Tg)var nC=mI?Tg(_C,_I,bI,ug,bg,jg):Tg(_I,_C,bI,bg,ug,jg);if(nC!==void 0){if(nC)continue;yI=!1;break}if(wC){if(!R(ug,function(Ft,og){if(Zg=og,!wC.has(Zg)&&(_I===Ft||cI(_I,Ft,fg,Tg,jg)))return wC.push(og);var Zg})){yI=!1;break}}else if(_I!==_C&&!cI(_I,_C,fg,Tg,jg)){yI=!1;break}}return jg.delete(bg),jg.delete(ug),yI}function Jg(bg){return function(ug,fg,Tg){var cI=fg(ug);return fI(ug)?cI:function(jg,mI){for(var sI=-1,gI=mI.length,pI=jg.length;++sI<gI;)jg[pI+sI]=mI[sI];return jg}(cI,Tg(ug))}(bg,hI,BI)}function zg(bg,ug){var fg,Tg,cI=bg.__data__;return((Tg=typeof(fg=ug))=="string"||Tg=="number"||Tg=="symbol"||Tg=="boolean"?fg!=="__proto__":fg===null)?cI[typeof ug=="string"?"string":"hash"]:cI.map}function aI(bg,ug){var fg=function(Tg,cI){return Tg==null?void 0:Tg[cI]}(bg,ug);return Vg(fg)?fg:void 0}cg.prototype.clear=function(){this.__data__=sg?sg(null):{},this.size=0},cg.prototype.delete=function(bg){var ug=this.has(bg)&&delete this.__data__[bg];return this.size-=ug?1:0,ug},cg.prototype.get=function(bg){var ug=this.__data__;if(sg){var fg=ug[bg];return fg==="__lodash_hash_undefined__"?void 0:fg}return w.call(ug,bg)?ug[bg]:void 0},cg.prototype.has=function(bg){var ug=this.__data__;return sg?ug[bg]!==void 0:w.call(ug,bg)},cg.prototype.set=function(bg,ug){var fg=this.__data__;return this.size+=this.has(bg)?0:1,fg[bg]=sg&&ug===void 0?"__lodash_hash_undefined__":ug,this},dg.prototype.clear=function(){this.__data__=[],this.size=0},dg.prototype.delete=function(bg){var ug=this.__data__,fg=Sg(ug,bg);return!(fg<0)&&(fg==ug.length-1?ug.pop():P.call(ug,fg,1),--this.size,!0)},dg.prototype.get=function(bg){var ug=this.__data__,fg=Sg(ug,bg);return fg<0?void 0:ug[fg][1]},dg.prototype.has=function(bg){return Sg(this.__data__,bg)>-1},dg.prototype.set=function(bg,ug){var fg=this.__data__,Tg=Sg(fg,bg);return Tg<0?(++this.size,fg.push([bg,ug])):fg[Tg][1]=ug,this},hg.prototype.clear=function(){this.size=0,this.__data__={hash:new cg,map:new(q||dg),string:new cg}},hg.prototype.delete=function(bg){var ug=zg(this,bg).delete(bg);return this.size-=ug?1:0,ug},hg.prototype.get=function(bg){return zg(this,bg).get(bg)},hg.prototype.has=function(bg){return zg(this,bg).has(bg)},hg.prototype.set=function(bg,ug){var fg=zg(this,bg),Tg=fg.size;return fg.set(bg,ug),this.size+=fg.size==Tg?0:1,this},rg.prototype.add=rg.prototype.push=function(bg){return this.__data__.set(bg,"__lodash_hash_undefined__"),this},rg.prototype.has=function(bg){return this.__data__.has(bg)},Wg.prototype.clear=function(){this.__data__=new dg,this.size=0},Wg.prototype.delete=function(bg){var ug=this.__data__,fg=ug.delete(bg);return this.size=ug.size,fg},Wg.prototype.get=function(bg){return this.__data__.get(bg)},Wg.prototype.has=function(bg){return this.__data__.has(bg)},Wg.prototype.set=function(bg,ug){var fg=this.__data__;if(fg instanceof dg){var Tg=fg.__data__;if(!q||Tg.length<199)return Tg.push([bg,ug]),this.size=++fg.size,this;fg=this.__data__=new hg(Tg)}return fg.set(bg,ug),this.size=fg.size,this};var BI=E?function(bg){return bg==null?[]:(bg=Object(bg),function(ug,fg){for(var Tg=-1,cI=ug==null?0:ug.length,jg=0,mI=[];++Tg<cI;){var sI=ug[Tg];fg(sI,Tg,ug)&&(mI[jg++]=sI)}return mI}(E(bg),function(ug){return Q.call(bg,ug)}))}:function(){return[]},Ug=Kg;function lI(bg,ug){return!!(ug=ug??9007199254740991)&&(typeof bg=="number"||d.test(bg))&&bg>-1&&bg%1==0&&bg<ug}function oI(bg){if(bg!=null){try{return G.call(bg)}catch{}try{return bg+""}catch{}}return""}function Eg(bg,ug){return bg===ug||bg!=bg&&ug!=ug}(j&&Ug(new j(new ArrayBuffer(1)))!="[object DataView]"||q&&Ug(new q)!=s||tg&&Ug(tg.resolve())!="[object Promise]"||Cg&&Ug(new Cg)!=n||x&&Ug(new x)!="[object WeakMap]")&&(Ug=function(bg){var ug=Kg(bg),fg=ug==l?bg.constructor:void 0,Tg=fg?oI(fg):"";if(Tg)switch(Tg){case Ag:return"[object DataView]";case O:return s;case _:return"[object Promise]";case Ig:return n;case ng:return"[object WeakMap]"}return ug});var LI=kg(function(){return arguments}())?kg:function(bg){return kI(bg)&&w.call(bg,"callee")&&!Q.call(bg,"callee")},fI=Array.isArray,tI=J||function(){return!1};function WI(bg){if(!nI(bg))return!1;var ug=Kg(bg);return ug=="[object Function]"||ug=="[object GeneratorFunction]"||ug=="[object AsyncFunction]"||ug=="[object Proxy]"}function QI(bg){return typeof bg=="number"&&bg>-1&&bg%1==0&&bg<=9007199254740991}function nI(bg){var ug=typeof bg;return bg!=null&&(ug=="object"||ug=="function")}function kI(bg){return bg!=null&&typeof bg=="object"}var Bg=Y?function(bg){return function(ug){return bg(ug)}}(Y):function(bg){return kI(bg)&&QI(bg.length)&&!!o[Kg(bg)]};function hI(bg){return(ug=bg)!=null&&QI(ug.length)&&!WI(ug)?Gg(bg):pg(bg);var ug}C.exports=function(bg,ug){return yg(bg,ug)}}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(g,C,i){(function(e){(function(){var A=typeof e=="object"&&e&&e.Object===Object&&e,s=typeof self=="object"&&self&&self.Object===Object&&self,l=A||s||Function("return this")(),n=Object.prototype,a=n.hasOwnProperty,d=n.toString,o=l.Symbol,c=o?o.toStringTag:void 0;function r(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":c&&c in Object(h)?function(b){var u=a.call(b,c),m=b[c];try{b[c]=void 0;var Z=!0}catch{}var p=d.call(b);return Z&&(u?b[c]=m:delete b[c]),p}(h):function(b){return d.call(b)}(h)}C.exports=function(h){if(!function(u){var m=typeof u;return u!=null&&(m=="object"||m=="function")}(h))return!1;var b=r(h);return b=="[object Function]"||b=="[object GeneratorFunction]"||b=="[object AsyncFunction]"||b=="[object Proxy]"}}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(g,C,i){C.exports=function(e){return e==null}},{}],448:[function(g,C,i){C.exports=function(e){return e===void 0}},{}],449:[function(g,C,i){(function(e){(function(){var A=/^\[object .+?Constructor\]$/,s=typeof e=="object"&&e&&e.Object===Object&&e,l=typeof self=="object"&&self&&self.Object===Object&&self,n=s||l||Function("return this")();function a(F,T){return!!(F&&F.length)&&function(Q,P,L){if(P!=P)return function(k,j,q,tg){for(var Cg=k.length,x=q+-1;++x<Cg;)if(j(k[x],x,k))return x;return-1}(Q,d,L);for(var E=L-1,J=Q.length;++E<J;)if(Q[E]===P)return E;return-1}(F,T,0)>-1}function d(F){return F!=F}function o(F,T){return F.has(T)}function c(F){var T=-1,Q=Array(F.size);return F.forEach(function(P){Q[++T]=P}),Q}var r,h=Array.prototype,b=Function.prototype,u=Object.prototype,m=n["__core-js_shared__"],Z=(r=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",p=b.toString,Y=u.hasOwnProperty,R=u.toString,X=RegExp("^"+p.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=h.splice,S=f(n,"Map"),z=f(n,"Set"),v=f(Object,"create");function K(F){var T=-1,Q=F?F.length:0;for(this.clear();++T<Q;){var P=F[T];this.set(P[0],P[1])}}function V(F){var T=-1,Q=F?F.length:0;for(this.clear();++T<Q;){var P=F[T];this.set(P[0],P[1])}}function N(F){var T=-1,Q=F?F.length:0;for(this.clear();++T<Q;){var P=F[T];this.set(P[0],P[1])}}function B(F){var T=-1,Q=F?F.length:0;for(this.__data__=new N;++T<Q;)this.add(F[T])}function G(F,T){for(var Q,P,L=F.length;L--;)if((Q=F[L][0])===(P=T)||Q!=Q&&P!=P)return L;return-1}function w(F){return!(!D(F)||(T=F,Z&&Z in T))&&(function(Q){var P=D(Q)?R.call(Q):"";return P=="[object Function]"||P=="[object GeneratorFunction]"}(F)||function(Q){var P=!1;if(Q!=null&&typeof Q.toString!="function")try{P=!!(Q+"")}catch{}return P}(F)?X:A).test(function(Q){if(Q!=null){try{return p.call(Q)}catch{}try{return Q+""}catch{}}return""}(F));var T}K.prototype.clear=function(){this.__data__=v?v(null):{}},K.prototype.delete=function(F){return this.has(F)&&delete this.__data__[F]},K.prototype.get=function(F){var T=this.__data__;if(v){var Q=T[F];return Q==="__lodash_hash_undefined__"?void 0:Q}return Y.call(T,F)?T[F]:void 0},K.prototype.has=function(F){var T=this.__data__;return v?T[F]!==void 0:Y.call(T,F)},K.prototype.set=function(F,T){return this.__data__[F]=v&&T===void 0?"__lodash_hash_undefined__":T,this},V.prototype.clear=function(){this.__data__=[]},V.prototype.delete=function(F){var T=this.__data__,Q=G(T,F);return!(Q<0)&&(Q==T.length-1?T.pop():H.call(T,Q,1),!0)},V.prototype.get=function(F){var T=this.__data__,Q=G(T,F);return Q<0?void 0:T[Q][1]},V.prototype.has=function(F){return G(this.__data__,F)>-1},V.prototype.set=function(F,T){var Q=this.__data__,P=G(Q,F);return P<0?Q.push([F,T]):Q[P][1]=T,this},N.prototype.clear=function(){this.__data__={hash:new K,map:new(S||V),string:new K}},N.prototype.delete=function(F){return y(this,F).delete(F)},N.prototype.get=function(F){return y(this,F).get(F)},N.prototype.has=function(F){return y(this,F).has(F)},N.prototype.set=function(F,T){return y(this,F).set(F,T),this},B.prototype.add=B.prototype.push=function(F){return this.__data__.set(F,"__lodash_hash_undefined__"),this},B.prototype.has=function(F){return this.__data__.has(F)};var W=z&&1/c(new z([,-0]))[1]==1/0?function(F){return new z(F)}:function(){};function y(F,T){var Q,P,L=F.__data__;return((P=typeof(Q=T))=="string"||P=="number"||P=="symbol"||P=="boolean"?Q!=="__proto__":Q===null)?L[typeof T=="string"?"string":"hash"]:L.map}function f(F,T){var Q=function(P,L){return P==null?void 0:P[L]}(F,T);return w(Q)?Q:void 0}function D(F){var T=typeof F;return!!F&&(T=="object"||T=="function")}C.exports=function(F){return F&&F.length?function(T,Q,P){var L=-1,E=a,J=T.length,k=!0,j=[],q=j;if(J>=200){var tg=W(T);if(tg)return c(tg);k=!1,E=o,q=new B}else q=j;g:for(;++L<J;){var Cg=T[L],x=Cg;if(Cg=Cg!==0?Cg:0,k&&x==x){for(var sg=q.length;sg--;)if(q[sg]===x)continue g;j.push(Cg)}else E(q,x,P)||(q!==j&&q.push(x),j.push(Cg))}return j}(F):[]}}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(g,C,i){var e=g("inherits"),A=g("hash-base"),s=g("safe-buffer").Buffer,l=new Array(16);function n(){A.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function a(h,b){return h<<b|h>>>32-b}function d(h,b,u,m,Z,p,Y){return a(h+(b&u|~b&m)+Z+p|0,Y)+b|0}function o(h,b,u,m,Z,p,Y){return a(h+(b&m|u&~m)+Z+p|0,Y)+b|0}function c(h,b,u,m,Z,p,Y){return a(h+(b^u^m)+Z+p|0,Y)+b|0}function r(h,b,u,m,Z,p,Y){return a(h+(u^(b|~m))+Z+p|0,Y)+b|0}e(n,A),n.prototype._update=function(){for(var h=l,b=0;b<16;++b)h[b]=this._block.readInt32LE(4*b);var u=this._a,m=this._b,Z=this._c,p=this._d;u=d(u,m,Z,p,h[0],3614090360,7),p=d(p,u,m,Z,h[1],3905402710,12),Z=d(Z,p,u,m,h[2],606105819,17),m=d(m,Z,p,u,h[3],3250441966,22),u=d(u,m,Z,p,h[4],4118548399,7),p=d(p,u,m,Z,h[5],1200080426,12),Z=d(Z,p,u,m,h[6],2821735955,17),m=d(m,Z,p,u,h[7],4249261313,22),u=d(u,m,Z,p,h[8],1770035416,7),p=d(p,u,m,Z,h[9],2336552879,12),Z=d(Z,p,u,m,h[10],4294925233,17),m=d(m,Z,p,u,h[11],2304563134,22),u=d(u,m,Z,p,h[12],1804603682,7),p=d(p,u,m,Z,h[13],4254626195,12),Z=d(Z,p,u,m,h[14],2792965006,17),u=o(u,m=d(m,Z,p,u,h[15],1236535329,22),Z,p,h[1],4129170786,5),p=o(p,u,m,Z,h[6],3225465664,9),Z=o(Z,p,u,m,h[11],643717713,14),m=o(m,Z,p,u,h[0],3921069994,20),u=o(u,m,Z,p,h[5],3593408605,5),p=o(p,u,m,Z,h[10],38016083,9),Z=o(Z,p,u,m,h[15],3634488961,14),m=o(m,Z,p,u,h[4],3889429448,20),u=o(u,m,Z,p,h[9],568446438,5),p=o(p,u,m,Z,h[14],3275163606,9),Z=o(Z,p,u,m,h[3],4107603335,14),m=o(m,Z,p,u,h[8],1163531501,20),u=o(u,m,Z,p,h[13],2850285829,5),p=o(p,u,m,Z,h[2],4243563512,9),Z=o(Z,p,u,m,h[7],1735328473,14),u=c(u,m=o(m,Z,p,u,h[12],2368359562,20),Z,p,h[5],4294588738,4),p=c(p,u,m,Z,h[8],2272392833,11),Z=c(Z,p,u,m,h[11],1839030562,16),m=c(m,Z,p,u,h[14],4259657740,23),u=c(u,m,Z,p,h[1],2763975236,4),p=c(p,u,m,Z,h[4],1272893353,11),Z=c(Z,p,u,m,h[7],4139469664,16),m=c(m,Z,p,u,h[10],3200236656,23),u=c(u,m,Z,p,h[13],681279174,4),p=c(p,u,m,Z,h[0],3936430074,11),Z=c(Z,p,u,m,h[3],3572445317,16),m=c(m,Z,p,u,h[6],76029189,23),u=c(u,m,Z,p,h[9],3654602809,4),p=c(p,u,m,Z,h[12],3873151461,11),Z=c(Z,p,u,m,h[15],530742520,16),u=r(u,m=c(m,Z,p,u,h[2],3299628645,23),Z,p,h[0],4096336452,6),p=r(p,u,m,Z,h[7],1126891415,10),Z=r(Z,p,u,m,h[14],2878612391,15),m=r(m,Z,p,u,h[5],4237533241,21),u=r(u,m,Z,p,h[12],1700485571,6),p=r(p,u,m,Z,h[3],2399980690,10),Z=r(Z,p,u,m,h[10],4293915773,15),m=r(m,Z,p,u,h[1],2240044497,21),u=r(u,m,Z,p,h[8],1873313359,6),p=r(p,u,m,Z,h[15],4264355552,10),Z=r(Z,p,u,m,h[6],2734768916,15),m=r(m,Z,p,u,h[13],1309151649,21),u=r(u,m,Z,p,h[4],4149444226,6),p=r(p,u,m,Z,h[11],3174756917,10),Z=r(Z,p,u,m,h[2],718787259,15),m=r(m,Z,p,u,h[9],3951481745,21),this._a=this._a+u|0,this._b=this._b+m|0,this._c=this._c+Z|0,this._d=this._d+p|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var h=s.allocUnsafe(16);return h.writeInt32LE(this._a,0),h.writeInt32LE(this._b,4),h.writeInt32LE(this._c,8),h.writeInt32LE(this._d,12),h},C.exports=n},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(g,C,i){var e=g("bn.js"),A=g("brorand");function s(l){this.rand=l||new A.Rand}C.exports=s,s.create=function(l){return new s(l)},s.prototype._randbelow=function(l){var n=l.bitLength(),a=Math.ceil(n/8);do var d=new e(this.rand.generate(a));while(d.cmp(l)>=0);return d},s.prototype._randrange=function(l,n){var a=n.sub(l);return l.add(this._randbelow(a))},s.prototype.test=function(l,n,a){var d=l.bitLength(),o=e.mont(l),c=new e(1).toRed(o);n||(n=Math.max(1,d/48|0));for(var r=l.subn(1),h=0;!r.testn(h);h++);for(var b=l.shrn(h),u=r.toRed(o);n>0;n--){var m=this._randrange(new e(2),r);a&&a(m);var Z=m.toRed(o).redPow(b);if(Z.cmp(c)!==0&&Z.cmp(u)!==0){for(var p=1;p<h;p++){if((Z=Z.redSqr()).cmp(c)===0)return!1;if(Z.cmp(u)===0)break}if(p===h)return!1}}return!0},s.prototype.getDivisor=function(l,n){var a=l.bitLength(),d=e.mont(l),o=new e(1).toRed(d);n||(n=Math.max(1,a/48|0));for(var c=l.subn(1),r=0;!c.testn(r);r++);for(var h=l.shrn(r),b=c.toRed(d);n>0;n--){var u=this._randrange(new e(2),c),m=l.gcd(u);if(m.cmpn(1)!==0)return m;var Z=u.toRed(d).redPow(h);if(Z.cmp(o)!==0&&Z.cmp(b)!==0){for(var p=1;p<r;p++){if((Z=Z.redSqr()).cmp(o)===0)return Z.fromRed().subn(1).gcd(l);if(Z.cmp(b)===0)break}if(p===r)return(Z=Z.redSqr()).fromRed().subn(1).gcd(l)}}return!1}},{"bn.js":452,brorand:187}],452:[function(g,C,i){arguments[4][184][0].apply(i,arguments)},{buffer:188,dup:184}],453:[function(g,C,i){function e(A,s){if(!A)throw new Error(s||"Assertion failed")}C.exports=e,e.equal=function(A,s,l){if(A!=s)throw new Error(l||"Assertion failed: "+A+" != "+s)}},{}],454:[function(g,C,i){var e=i;function A(l){return l.length===1?"0"+l:l}function s(l){for(var n="",a=0;a<l.length;a++)n+=A(l[a].toString(16));return n}e.toArray=function(l,n){if(Array.isArray(l))return l.slice();if(!l)return[];var a=[];if(typeof l!="string"){for(var d=0;d<l.length;d++)a[d]=0|l[d];return a}if(n==="hex")for((l=l.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(l="0"+l),d=0;d<l.length;d+=2)a.push(parseInt(l[d]+l[d+1],16));else for(d=0;d<l.length;d++){var o=l.charCodeAt(d),c=o>>8,r=255&o;c?a.push(c,r):a.push(r)}return a},e.zero2=A,e.toHex=s,e.encode=function(l,n){return n==="hex"?s(l):l}},{}],455:[function(g,C,i){C.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(g,C,i){var e=g("asn1.js");i.certificate=g("./certificate");var A=e.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});i.RSAPrivateKey=A;var s=e.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});i.RSAPublicKey=s;var l=e.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(n),this.key("subjectPublicKey").bitstr())});i.PublicKey=l;var n=e.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),a=e.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(n),this.key("subjectPrivateKey").octstr())});i.PrivateKey=a;var d=e.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});i.EncryptedPrivateKey=d;var o=e.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});i.DSAPrivateKey=o,i.DSAparam=e.define("DSAparam",function(){this.int()});var c=e.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(r),this.key("publicKey").optional().explicit(1).bitstr())});i.ECPrivateKey=c;var r=e.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});i.signature=e.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":457,"asn1.js":170}],457:[function(g,C,i){var e=g("asn1.js"),A=e.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),s=e.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),l=e.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),n=e.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(l),this.key("subjectPublicKey").bitstr())}),a=e.define("RelativeDistinguishedName",function(){this.setof(s)}),d=e.define("RDNSequence",function(){this.seqof(a)}),o=e.define("Name",function(){this.choice({rdnSequence:this.use(d)})}),c=e.define("Validity",function(){this.seq().obj(this.key("notBefore").use(A),this.key("notAfter").use(A))}),r=e.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),h=e.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(l),this.key("issuer").use(o),this.key("validity").use(c),this.key("subject").use(o),this.key("subjectPublicKeyInfo").use(n),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(r).optional())}),b=e.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(l),this.key("signatureValue").bitstr())});C.exports=b},{"asn1.js":170}],458:[function(g,C,i){var e=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,A=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,l=g("evp_bytestokey"),n=g("browserify-aes"),a=g("safe-buffer").Buffer;C.exports=function(d,o){var c,r=d.toString(),h=r.match(e);if(h){var b="aes"+h[1],u=a.from(h[2],"hex"),m=a.from(h[3].replace(/[\r\n]/g,""),"base64"),Z=l(o,u.slice(0,8),parseInt(h[1],10)).key,p=[],Y=n.createDecipheriv(b,Z,u);p.push(Y.update(m)),p.push(Y.final()),c=a.concat(p)}else{var R=r.match(s);c=a.from(R[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(A)[1],data:c}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(g,C,i){var e=g("./asn1"),A=g("./aesid.json"),s=g("./fixProc"),l=g("browserify-aes"),n=g("pbkdf2"),a=g("safe-buffer").Buffer;function d(o){var c;typeof o!="object"||a.isBuffer(o)||(c=o.passphrase,o=o.key),typeof o=="string"&&(o=a.from(o));var r,h,b=s(o,c),u=b.tag,m=b.data;switch(u){case"CERTIFICATE":h=e.certificate.decode(m,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(h||(h=e.PublicKey.decode(m,"der")),r=h.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return e.RSAPublicKey.decode(h.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return h.subjectPrivateKey=h.subjectPublicKey,{type:"ec",data:h};case"1.2.840.10040.4.1":return h.algorithm.params.pub_key=e.DSAparam.decode(h.subjectPublicKey.data,"der"),{type:"dsa",data:h.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":m=function(Z,p){var Y=Z.algorithm.decrypt.kde.kdeparams.salt,R=parseInt(Z.algorithm.decrypt.kde.kdeparams.iters.toString(),10),X=A[Z.algorithm.decrypt.cipher.algo.join(".")],H=Z.algorithm.decrypt.cipher.iv,S=Z.subjectPrivateKey,z=parseInt(X.split("-")[1],10)/8,v=n.pbkdf2Sync(p,Y,R,z,"sha1"),K=l.createDecipheriv(X,v,H),V=[];return V.push(K.update(S)),V.push(K.final()),a.concat(V)}(m=e.EncryptedPrivateKey.decode(m,"der"),c);case"PRIVATE KEY":switch(r=(h=e.PrivateKey.decode(m,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return e.RSAPrivateKey.decode(h.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:h.algorithm.curve,privateKey:e.ECPrivateKey.decode(h.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return h.algorithm.params.priv_key=e.DSAparam.decode(h.subjectPrivateKey,"der"),{type:"dsa",params:h.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return e.RSAPublicKey.decode(m,"der");case"RSA PRIVATE KEY":return e.RSAPrivateKey.decode(m,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:e.DSAPrivateKey.decode(m,"der")};case"EC PRIVATE KEY":return{curve:(m=e.ECPrivateKey.decode(m,"der")).parameters.value,privateKey:m.privateKey};default:throw new Error("unknown key type "+u)}}C.exports=d,d.signature=e.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(g,C,i){i.pbkdf2=g("./lib/async"),i.pbkdf2Sync=g("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(g,C,i){(function(e){(function(){var A,s,l=g("safe-buffer").Buffer,n=g("./precondition"),a=g("./default-encoding"),d=g("./sync"),o=g("./to-buffer"),c=e.crypto&&e.crypto.subtle,r={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function b(){return s||(s=e.process&&e.process.nextTick?e.process.nextTick:e.queueMicrotask?e.queueMicrotask:e.setImmediate?e.setImmediate:e.setTimeout)}function u(m,Z,p,Y,R){return c.importKey("raw",m,{name:"PBKDF2"},!1,["deriveBits"]).then(function(X){return c.deriveBits({name:"PBKDF2",salt:Z,iterations:p,hash:{name:R}},X,Y<<3)}).then(function(X){return l.from(X)})}C.exports=function(m,Z,p,Y,R,X){typeof R=="function"&&(X=R,R=void 0);var H=r[(R=R||"sha1").toLowerCase()];if(H&&typeof e.Promise=="function"){if(n(p,Y),m=o(m,a,"Password"),Z=o(Z,a,"Salt"),typeof X!="function")throw new Error("No callback provided to pbkdf2");(function(S,z){S.then(function(v){b()(function(){z(null,v)})},function(v){b()(function(){z(v)})})})(function(S){if(e.process&&!e.process.browser||!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(h[S]!==void 0)return h[S];var z=u(A=A||l.alloc(8),A,10,128,S).then(function(){return!0}).catch(function(){return!1});return h[S]=z,z}(H).then(function(S){return S?u(m,Z,p,Y,H):d(m,Z,p,Y,R)}),X)}else b()(function(){var S;try{S=d(m,Z,p,Y,R)}catch(z){return X(z)}X(null,S)})}}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(g,C,i){(function(e,A){(function(){var s;A.process&&A.process.browser?s="utf-8":A.process&&A.process.version?s=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":s="utf-8",C.exports=s}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(g,C,i){var e=Math.pow(2,30)-1;C.exports=function(A,s){if(typeof A!="number")throw new TypeError("Iterations not a number");if(A<0)throw new TypeError("Bad iterations");if(typeof s!="number")throw new TypeError("Key length not a number");if(s<0||s>e||s!=s)throw new TypeError("Bad key length")}},{}],464:[function(g,C,i){var e=g("create-hash/md5"),A=g("ripemd160"),s=g("sha.js"),l=g("safe-buffer").Buffer,n=g("./precondition"),a=g("./default-encoding"),d=g("./to-buffer"),o=l.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function r(h,b,u){var m=function(H){function S(z){return s(H).update(z).digest()}return H==="rmd160"||H==="ripemd160"?function(z){return new A().update(z).digest()}:H==="md5"?e:S}(h),Z=h==="sha512"||h==="sha384"?128:64;b.length>Z?b=m(b):b.length<Z&&(b=l.concat([b,o],Z));for(var p=l.allocUnsafe(Z+c[h]),Y=l.allocUnsafe(Z+c[h]),R=0;R<Z;R++)p[R]=54^b[R],Y[R]=92^b[R];var X=l.allocUnsafe(Z+u+4);p.copy(X,0,0,Z),this.ipad1=X,this.ipad2=p,this.opad=Y,this.alg=h,this.blocksize=Z,this.hash=m,this.size=c[h]}r.prototype.run=function(h,b){return h.copy(b,this.blocksize),this.hash(b).copy(this.opad,this.blocksize),this.hash(this.opad)},C.exports=function(h,b,u,m,Z){n(u,m);var p=new r(Z=Z||"sha1",h=d(h,a,"Password"),(b=d(b,a,"Salt")).length),Y=l.allocUnsafe(m),R=l.allocUnsafe(b.length+4);b.copy(R,0,0,b.length);for(var X=0,H=c[Z],S=Math.ceil(m/H),z=1;z<=S;z++){R.writeUInt32BE(z,b.length);for(var v=p.run(R,p.ipad1),K=v,V=1;V<u;V++){K=p.run(K,p.ipad2);for(var N=0;N<H;N++)v[N]^=K[N]}v.copy(Y,X),X+=H}return Y}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(g,C,i){var e=g("safe-buffer").Buffer;C.exports=function(A,s,l){if(e.isBuffer(A))return A;if(typeof A=="string")return e.from(A,s);if(ArrayBuffer.isView(A))return e.from(A.buffer);throw new TypeError(l+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(g,C,i){(function(e){(function(){e===void 0||!e.version||e.version.indexOf("v0.")===0||e.version.indexOf("v1.")===0&&e.version.indexOf("v1.8.")!==0?C.exports={nextTick:function(A,s,l,n){if(typeof A!="function")throw new TypeError('"callback" argument must be a function');var a,d,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(A);case 2:return e.nextTick(function(){A.call(null,s)});case 3:return e.nextTick(function(){A.call(null,s,l)});case 4:return e.nextTick(function(){A.call(null,s,l,n)});default:for(a=new Array(o-1),d=0;d<a.length;)a[d++]=arguments[d];return e.nextTick(function(){A.apply(null,a)})}}}:C.exports=e}).call(this)}).call(this,g("_process"))},{_process:467}],467:[function(g,C,i){var e,A,s=C.exports={};function l(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function a(Z){if(e===setTimeout)return setTimeout(Z,0);if((e===l||!e)&&setTimeout)return e=setTimeout,setTimeout(Z,0);try{return e(Z,0)}catch{try{return e.call(null,Z,0)}catch{return e.call(this,Z,0)}}}(function(){try{e=typeof setTimeout=="function"?setTimeout:l}catch{e=l}try{A=typeof clearTimeout=="function"?clearTimeout:n}catch{A=n}})();var d,o=[],c=!1,r=-1;function h(){c&&d&&(c=!1,d.length?o=d.concat(o):r=-1,o.length&&b())}function b(){if(!c){var Z=a(h);c=!0;for(var p=o.length;p;){for(d=o,o=[];++r<p;)d&&d[r].run();r=-1,p=o.length}d=null,c=!1,function(Y){if(A===clearTimeout)return clearTimeout(Y);if((A===n||!A)&&clearTimeout)return A=clearTimeout,clearTimeout(Y);try{A(Y)}catch{try{return A.call(null,Y)}catch{return A.call(this,Y)}}}(Z)}}function u(Z,p){this.fun=Z,this.array=p}function m(){}s.nextTick=function(Z){var p=new Array(arguments.length-1);if(arguments.length>1)for(var Y=1;Y<arguments.length;Y++)p[Y-1]=arguments[Y];o.push(new u(Z,p)),o.length!==1||c||a(b)},u.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(Z){return[]},s.binding=function(Z){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(Z){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],468:[function(g,C,i){i.publicEncrypt=g("./publicEncrypt"),i.privateDecrypt=g("./privateDecrypt"),i.privateEncrypt=function(e,A){return i.publicEncrypt(e,A,!0)},i.publicDecrypt=function(e,A){return i.privateDecrypt(e,A,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(g,C,i){var e=g("create-hash"),A=g("safe-buffer").Buffer;function s(l){var n=A.allocUnsafe(4);return n.writeUInt32BE(l,0),n}C.exports=function(l,n){for(var a,d=A.alloc(0),o=0;d.length<n;)a=s(o++),d=A.concat([d,e("sha1").update(l).update(a).digest()]);return d.slice(0,n)}},{"create-hash":386,"safe-buffer":494}],470:[function(g,C,i){arguments[4][184][0].apply(i,arguments)},{buffer:188,dup:184}],471:[function(g,C,i){var e=g("parse-asn1"),A=g("./mgf"),s=g("./xor"),l=g("bn.js"),n=g("browserify-rsa"),a=g("create-hash"),d=g("./withPublic"),o=g("safe-buffer").Buffer;C.exports=function(c,r,h){var b;b=c.padding?c.padding:h?1:4;var u,m=e(c),Z=m.modulus.byteLength();if(r.length>Z||new l(r).cmp(m.modulus)>=0)throw new Error("decryption error");u=h?d(new l(r),m):n(r,m);var p=o.alloc(Z-u.length);if(u=o.concat([p,u],Z),b===4)return function(Y,R){var X=Y.modulus.byteLength(),H=a("sha1").update(o.alloc(0)).digest(),S=H.length;if(R[0]!==0)throw new Error("decryption error");var z=R.slice(1,S+1),v=R.slice(S+1),K=s(z,A(v,S)),V=s(v,A(K,X-S-1));if(function(B,G){B=o.from(B),G=o.from(G);var w=0,W=B.length;B.length!==G.length&&(w++,W=Math.min(B.length,G.length));for(var y=-1;++y<W;)w+=B[y]^G[y];return w}(H,V.slice(0,S)))throw new Error("decryption error");for(var N=S;V[N]===0;)N++;if(V[N++]!==1)throw new Error("decryption error");return V.slice(N)}(m,u);if(b===1)return function(Y,R,X){for(var H=R.slice(0,2),S=2,z=0;R[S++]!==0;)if(S>=R.length){z++;break}var v=R.slice(2,S-1);if((H.toString("hex")!=="0002"&&!X||H.toString("hex")!=="0001"&&X)&&z++,v.length<8&&z++,z)throw new Error("decryption error");return R.slice(S)}(0,u,h);if(b===3)return u;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(g,C,i){var e=g("parse-asn1"),A=g("randombytes"),s=g("create-hash"),l=g("./mgf"),n=g("./xor"),a=g("bn.js"),d=g("./withPublic"),o=g("browserify-rsa"),c=g("safe-buffer").Buffer;C.exports=function(r,h,b){var u;u=r.padding?r.padding:b?1:4;var m,Z=e(r);if(u===4)m=function(p,Y){var R=p.modulus.byteLength(),X=Y.length,H=s("sha1").update(c.alloc(0)).digest(),S=H.length,z=2*S;if(X>R-z-2)throw new Error("message too long");var v=c.alloc(R-X-z-2),K=R-S-1,V=A(S),N=n(c.concat([H,v,c.alloc(1,1),Y],K),l(V,K)),B=n(V,l(N,S));return new a(c.concat([c.alloc(1),B,N],R))}(Z,h);else if(u===1)m=function(p,Y,R){var X,H=Y.length,S=p.modulus.byteLength();if(H>S-11)throw new Error("message too long");return X=R?c.alloc(S-H-3,255):function(z){for(var v,K=c.allocUnsafe(z),V=0,N=A(2*z),B=0;V<z;)B===N.length&&(N=A(2*z),B=0),(v=N[B++])&&(K[V++]=v);return K}(S-H-3),new a(c.concat([c.from([0,R?1:2]),X,c.alloc(1),Y],S))}(Z,h,b);else{if(u!==3)throw new Error("unknown padding");if((m=new a(h)).cmp(Z.modulus)>=0)throw new Error("data too long for modulus")}return b?o(m,Z):d(m,Z)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(g,C,i){var e=g("bn.js"),A=g("safe-buffer").Buffer;C.exports=function(s,l){return A.from(s.toRed(e.mont(l.modulus)).redPow(new e(l.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(g,C,i){C.exports=function(e,A){for(var s=e.length,l=-1;++l<s;)e[l]^=A[l];return e}},{}],475:[function(g,C,i){(function(e,A){(function(){var s=g("safe-buffer").Buffer,l=A.crypto||A.msCrypto;l&&l.getRandomValues?C.exports=function(n,a){if(n>4294967295)throw new RangeError("requested too many random bytes");var d=s.allocUnsafe(n);if(n>0)if(n>65536)for(var o=0;o<n;o+=65536)l.getRandomValues(d.slice(o,o+65536));else l.getRandomValues(d);return typeof a=="function"?e.nextTick(function(){a(null,d)}):d}:C.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(g,C,i){(function(e,A){(function(){function s(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var l=g("safe-buffer"),n=g("randombytes"),a=l.Buffer,d=l.kMaxLength,o=A.crypto||A.msCrypto,c=Math.pow(2,32)-1;function r(u,m){if(typeof u!="number"||u!=u)throw new TypeError("offset must be a number");if(u>c||u<0)throw new TypeError("offset must be a uint32");if(u>d||u>m)throw new RangeError("offset out of range")}function h(u,m,Z){if(typeof u!="number"||u!=u)throw new TypeError("size must be a number");if(u>c||u<0)throw new TypeError("size must be a uint32");if(u+m>Z||u>d)throw new RangeError("buffer too small")}function b(u,m,Z,p){if(e.browser){var Y=u.buffer,R=new Uint8Array(Y,m,Z);return o.getRandomValues(R),p?void e.nextTick(function(){p(null,u)}):u}if(!p)return n(Z).copy(u,m),u;n(Z,function(X,H){if(X)return p(X);H.copy(u,m),p(null,u)})}o&&o.getRandomValues||!e.browser?(i.randomFill=function(u,m,Z,p){if(!(a.isBuffer(u)||u instanceof A.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof m=="function")p=m,m=0,Z=u.length;else if(typeof Z=="function")p=Z,Z=u.length-m;else if(typeof p!="function")throw new TypeError('"cb" argument must be a function');return r(m,u.length),h(Z,m,u.length),b(u,m,Z,p)},i.randomFillSync=function(u,m,Z){if(m===void 0&&(m=0),!(a.isBuffer(u)||u instanceof A.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return r(m,u.length),Z===void 0&&(Z=u.length-m),h(Z,m,u.length),b(u,m,Z)}):(i.randomFill=s,i.randomFillSync=s)}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(g,C,i){var e={};function A(l,n,a){a||(a=Error);var d=function(o){var c,r;function h(b,u,m){return o.call(this,function(Z,p,Y){return typeof n=="string"?n:n(Z,p,Y)}(b,u,m))||this}return r=o,(c=h).prototype=Object.create(r.prototype),c.prototype.constructor=c,c.__proto__=r,h}(a);d.prototype.name=a.name,d.prototype.code=l,e[l]=d}function s(l,n){if(Array.isArray(l)){var a=l.length;return l=l.map(function(d){return String(d)}),a>2?"one of ".concat(n," ").concat(l.slice(0,a-1).join(", "),", or ")+l[a-1]:a===2?"one of ".concat(n," ").concat(l[0]," or ").concat(l[1]):"of ".concat(n," ").concat(l[0])}return"of ".concat(n," ").concat(String(l))}A("ERR_INVALID_OPT_VALUE",function(l,n){return'The value "'+n+'" is invalid for option "'+l+'"'},TypeError),A("ERR_INVALID_ARG_TYPE",function(l,n,a){var d,o,c;if(typeof n=="string"&&(o="not ",n.substr(0,o.length)===o)?(d="must not be",n=n.replace(/^not /,"")):d="must be",function(h,b,u){return(u===void 0||u>h.length)&&(u=h.length),h.substring(u-b.length,u)===b}(l," argument"))c="The ".concat(l," ").concat(d," ").concat(s(n,"type"));else{var r=function(h,b,u){return typeof u!="number"&&(u=0),!(u+b.length>h.length)&&h.indexOf(b,u)!==-1}(l,".")?"property":"argument";c='The "'.concat(l,'" ').concat(r," ").concat(d," ").concat(s(n,"type"))}return c+=". Received type ".concat(typeof a)},TypeError),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),A("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),A("ERR_STREAM_PREMATURE_CLOSE","Premature close"),A("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),A("ERR_STREAM_WRITE_AFTER_END","write after end"),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),C.exports.codes=e},{}],478:[function(g,C,i){(function(e){(function(){var A=Object.keys||function(h){var b=[];for(var u in h)b.push(u);return b};C.exports=o;var s=g("./_stream_readable"),l=g("./_stream_writable");g("inherits")(o,s);for(var n=A(l.prototype),a=0;a<n.length;a++){var d=n[a];o.prototype[d]||(o.prototype[d]=l.prototype[d])}function o(h){if(!(this instanceof o))return new o(h);s.call(this,h),l.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||e.nextTick(r,this)}function r(h){h.end()}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}})}).call(this)}).call(this,g("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(g,C,i){C.exports=A;var e=g("./_stream_transform");function A(s){if(!(this instanceof A))return new A(s);e.call(this,s)}g("inherits")(A,e),A.prototype._transform=function(s,l,n){n(null,s)}},{"./_stream_transform":481,inherits:440}],480:[function(g,C,i){(function(e,A){(function(){var s;C.exports=K,K.ReadableState=v,g("events").EventEmitter;var l=function(J,k){return J.listeners(k).length},n=g("./internal/streams/stream"),a=g("buffer").Buffer,d=(A!==void 0?A:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},o,c=g("util");o=c&&c.debuglog?c.debuglog("stream"):function(){};var r,h,b,u=g("./internal/streams/buffer_list"),m=g("./internal/streams/destroy"),Z=g("./internal/streams/state").getHighWaterMark,p=g("../errors").codes,Y=p.ERR_INVALID_ARG_TYPE,R=p.ERR_STREAM_PUSH_AFTER_EOF,X=p.ERR_METHOD_NOT_IMPLEMENTED,H=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;g("inherits")(K,n);var S=m.errorOrDestroy,z=["error","close","destroy","pause","resume"];function v(J,k,j){s=s||g("./_stream_duplex"),J=J||{},typeof j!="boolean"&&(j=k instanceof s),this.objectMode=!!J.objectMode,j&&(this.objectMode=this.objectMode||!!J.readableObjectMode),this.highWaterMark=Z(this,J,"readableHighWaterMark",j),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.destroyed=!1,this.defaultEncoding=J.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,J.encoding&&(r||(r=g("string_decoder/").StringDecoder),this.decoder=new r(J.encoding),this.encoding=J.encoding)}function K(J){if(s=s||g("./_stream_duplex"),!(this instanceof K))return new K(J);var k=this instanceof s;this._readableState=new v(J,this,k),this.readable=!0,J&&(typeof J.read=="function"&&(this._read=J.read),typeof J.destroy=="function"&&(this._destroy=J.destroy)),n.call(this)}function V(J,k,j,q,tg){o("readableAddChunk",k);var Cg,x=J._readableState;if(k===null)x.reading=!1,function(sg,Ag){if(o("onEofChunk"),!Ag.ended){if(Ag.decoder){var O=Ag.decoder.end();O&&O.length&&(Ag.buffer.push(O),Ag.length+=Ag.objectMode?1:O.length)}Ag.ended=!0,Ag.sync?G(sg):(Ag.needReadable=!1,Ag.emittedReadable||(Ag.emittedReadable=!0,w(sg)))}}(J,x);else if(tg||(Cg=function(sg,Ag){var O;_=Ag,a.isBuffer(_)||_ instanceof d||typeof Ag=="string"||Ag===void 0||sg.objectMode||(O=new Y("chunk",["string","Buffer","Uint8Array"],Ag));var _;return O}(x,k)),Cg)S(J,Cg);else if(x.objectMode||k&&k.length>0)if(typeof k=="string"||x.objectMode||Object.getPrototypeOf(k)===a.prototype||(k=function(sg){return a.from(sg)}(k)),q)x.endEmitted?S(J,new H):N(J,x,k,!0);else if(x.ended)S(J,new R);else{if(x.destroyed)return!1;x.reading=!1,x.decoder&&!j?(k=x.decoder.write(k),x.objectMode||k.length!==0?N(J,x,k,!1):W(J,x)):N(J,x,k,!1)}else q||(x.reading=!1,W(J,x));return!x.ended&&(x.length<x.highWaterMark||x.length===0)}function N(J,k,j,q){k.flowing&&k.length===0&&!k.sync?(k.awaitDrain=0,J.emit("data",j)):(k.length+=k.objectMode?1:j.length,q?k.buffer.unshift(j):k.buffer.push(j),k.needReadable&&G(J)),W(J,k)}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(J){this._readableState&&(this._readableState.destroyed=J)}}),K.prototype.destroy=m.destroy,K.prototype._undestroy=m.undestroy,K.prototype._destroy=function(J,k){k(J)},K.prototype.push=function(J,k){var j,q=this._readableState;return q.objectMode?j=!0:typeof J=="string"&&((k=k||q.defaultEncoding)!==q.encoding&&(J=a.from(J,k),k=""),j=!0),V(this,J,k,!1,j)},K.prototype.unshift=function(J){return V(this,J,null,!0,!1)},K.prototype.isPaused=function(){return this._readableState.flowing===!1},K.prototype.setEncoding=function(J){r||(r=g("string_decoder/").StringDecoder);var k=new r(J);this._readableState.decoder=k,this._readableState.encoding=this._readableState.decoder.encoding;for(var j=this._readableState.buffer.head,q="";j!==null;)q+=k.write(j.data),j=j.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};function B(J,k){return J<=0||k.length===0&&k.ended?0:k.objectMode?1:J!=J?k.flowing&&k.length?k.buffer.head.data.length:k.length:(J>k.highWaterMark&&(k.highWaterMark=function(j){return j>=1073741824?j=1073741824:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}(J)),J<=k.length?J:k.ended?k.length:(k.needReadable=!0,0))}function G(J){var k=J._readableState;o("emitReadable",k.needReadable,k.emittedReadable),k.needReadable=!1,k.emittedReadable||(o("emitReadable",k.flowing),k.emittedReadable=!0,e.nextTick(w,J))}function w(J){var k=J._readableState;o("emitReadable_",k.destroyed,k.length,k.ended),k.destroyed||!k.length&&!k.ended||(J.emit("readable"),k.emittedReadable=!1),k.needReadable=!k.flowing&&!k.ended&&k.length<=k.highWaterMark,T(J)}function W(J,k){k.readingMore||(k.readingMore=!0,e.nextTick(y,J,k))}function y(J,k){for(;!k.reading&&!k.ended&&(k.length<k.highWaterMark||k.flowing&&k.length===0);){var j=k.length;if(o("maybeReadMore read 0"),J.read(0),j===k.length)break}k.readingMore=!1}function f(J){var k=J._readableState;k.readableListening=J.listenerCount("readable")>0,k.resumeScheduled&&!k.paused?k.flowing=!0:J.listenerCount("data")>0&&J.resume()}function D(J){o("readable nexttick read 0"),J.read(0)}function F(J,k){o("resume",k.reading),k.reading||J.read(0),k.resumeScheduled=!1,J.emit("resume"),T(J),k.flowing&&!k.reading&&J.read(0)}function T(J){var k=J._readableState;for(o("flow",k.flowing);k.flowing&&J.read()!==null;);}function Q(J,k){return k.length===0?null:(k.objectMode?j=k.buffer.shift():!J||J>=k.length?(j=k.decoder?k.buffer.join(""):k.buffer.length===1?k.buffer.first():k.buffer.concat(k.length),k.buffer.clear()):j=k.buffer.consume(J,k.decoder),j);var j}function P(J){var k=J._readableState;o("endReadable",k.endEmitted),k.endEmitted||(k.ended=!0,e.nextTick(L,k,J))}function L(J,k){if(o("endReadableNT",J.endEmitted,J.length),!J.endEmitted&&J.length===0&&(J.endEmitted=!0,k.readable=!1,k.emit("end"),J.autoDestroy)){var j=k._writableState;(!j||j.autoDestroy&&j.finished)&&k.destroy()}}function E(J,k){for(var j=0,q=J.length;j<q;j++)if(J[j]===k)return j;return-1}K.prototype.read=function(J){o("read",J),J=parseInt(J,10);var k=this._readableState,j=J;if(J!==0&&(k.emittedReadable=!1),J===0&&k.needReadable&&((k.highWaterMark!==0?k.length>=k.highWaterMark:k.length>0)||k.ended))return o("read: emitReadable",k.length,k.ended),k.length===0&&k.ended?P(this):G(this),null;if((J=B(J,k))===0&&k.ended)return k.length===0&&P(this),null;var q,tg=k.needReadable;return o("need readable",tg),(k.length===0||k.length-J<k.highWaterMark)&&o("length less than watermark",tg=!0),k.ended||k.reading?o("reading or ended",tg=!1):tg&&(o("do read"),k.reading=!0,k.sync=!0,k.length===0&&(k.needReadable=!0),this._read(k.highWaterMark),k.sync=!1,k.reading||(J=B(j,k))),(q=J>0?Q(J,k):null)===null?(k.needReadable=k.length<=k.highWaterMark,J=0):(k.length-=J,k.awaitDrain=0),k.length===0&&(k.ended||(k.needReadable=!0),j!==J&&k.ended&&P(this)),q!==null&&this.emit("data",q),q},K.prototype._read=function(J){S(this,new X("_read()"))},K.prototype.pipe=function(J,k){var j=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=J;break;case 1:q.pipes=[q.pipes,J];break;default:q.pipes.push(J)}q.pipesCount+=1,o("pipe count=%d opts=%j",q.pipesCount,k);var tg=(!k||k.end!==!1)&&J!==e.stdout&&J!==e.stderr?x:ag;function Cg(lg,cg){o("onunpipe"),lg===j&&cg&&cg.hasUnpiped===!1&&(cg.hasUnpiped=!0,o("cleanup"),J.removeListener("close",Ig),J.removeListener("finish",ng),J.removeListener("drain",sg),J.removeListener("error",_),J.removeListener("unpipe",Cg),j.removeListener("end",x),j.removeListener("end",ag),j.removeListener("data",O),Ag=!0,!q.awaitDrain||J._writableState&&!J._writableState.needDrain||sg())}function x(){o("onend"),J.end()}q.endEmitted?e.nextTick(tg):j.once("end",tg),J.on("unpipe",Cg);var sg=function(lg){return function(){var cg=lg._readableState;o("pipeOnDrain",cg.awaitDrain),cg.awaitDrain&&cg.awaitDrain--,cg.awaitDrain===0&&l(lg,"data")&&(cg.flowing=!0,T(lg))}}(j);J.on("drain",sg);var Ag=!1;function O(lg){o("ondata");var cg=J.write(lg);o("dest.write",cg),cg===!1&&((q.pipesCount===1&&q.pipes===J||q.pipesCount>1&&E(q.pipes,J)!==-1)&&!Ag&&(o("false write response, pause",q.awaitDrain),q.awaitDrain++),j.pause())}function _(lg){o("onerror",lg),ag(),J.removeListener("error",_),l(J,"error")===0&&S(J,lg)}function Ig(){J.removeListener("finish",ng),ag()}function ng(){o("onfinish"),J.removeListener("close",Ig),ag()}function ag(){o("unpipe"),j.unpipe(J)}return j.on("data",O),function(lg,cg,dg){if(typeof lg.prependListener=="function")return lg.prependListener(cg,dg);lg._events&&lg._events[cg]?Array.isArray(lg._events[cg])?lg._events[cg].unshift(dg):lg._events[cg]=[dg,lg._events[cg]]:lg.on(cg,dg)}(J,"error",_),J.once("close",Ig),J.once("finish",ng),J.emit("pipe",j),q.flowing||(o("pipe resume"),j.resume()),J},K.prototype.unpipe=function(J){var k=this._readableState,j={hasUnpiped:!1};if(k.pipesCount===0)return this;if(k.pipesCount===1)return J&&J!==k.pipes||(J||(J=k.pipes),k.pipes=null,k.pipesCount=0,k.flowing=!1,J&&J.emit("unpipe",this,j)),this;if(!J){var q=k.pipes,tg=k.pipesCount;k.pipes=null,k.pipesCount=0,k.flowing=!1;for(var Cg=0;Cg<tg;Cg++)q[Cg].emit("unpipe",this,{hasUnpiped:!1});return this}var x=E(k.pipes,J);return x===-1||(k.pipes.splice(x,1),k.pipesCount-=1,k.pipesCount===1&&(k.pipes=k.pipes[0]),J.emit("unpipe",this,j)),this},K.prototype.on=function(J,k){var j=n.prototype.on.call(this,J,k),q=this._readableState;return J==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):J==="readable"&&(q.endEmitted||q.readableListening||(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,o("on readable",q.length,q.reading),q.length?G(this):q.reading||e.nextTick(D,this))),j},K.prototype.addListener=K.prototype.on,K.prototype.removeListener=function(J,k){var j=n.prototype.removeListener.call(this,J,k);return J==="readable"&&e.nextTick(f,this),j},K.prototype.removeAllListeners=function(J){var k=n.prototype.removeAllListeners.apply(this,arguments);return J!=="readable"&&J!==void 0||e.nextTick(f,this),k},K.prototype.resume=function(){var J=this._readableState;return J.flowing||(o("resume"),J.flowing=!J.readableListening,function(k,j){j.resumeScheduled||(j.resumeScheduled=!0,e.nextTick(F,k,j))}(this,J)),J.paused=!1,this},K.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},K.prototype.wrap=function(J){var k=this,j=this._readableState,q=!1;for(var tg in J.on("end",function(){if(o("wrapped end"),j.decoder&&!j.ended){var x=j.decoder.end();x&&x.length&&k.push(x)}k.push(null)}),J.on("data",function(x){o("wrapped data"),j.decoder&&(x=j.decoder.write(x)),j.objectMode&&x==null||(j.objectMode||x&&x.length)&&(k.push(x)||(q=!0,J.pause()))}),J)this[tg]===void 0&&typeof J[tg]=="function"&&(this[tg]=function(x){return function(){return J[x].apply(J,arguments)}}(tg));for(var Cg=0;Cg<z.length;Cg++)J.on(z[Cg],this.emit.bind(this,z[Cg]));return this._read=function(x){o("wrapped _read",x),q&&(q=!1,J.resume())},this},typeof Symbol=="function"&&(K.prototype[Symbol.asyncIterator]=function(){return h===void 0&&(h=g("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(K.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(K.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(K.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(J){this._readableState&&(this._readableState.flowing=J)}}),K._fromList=Q,Object.defineProperty(K.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(K.from=function(J,k){return b===void 0&&(b=g("./internal/streams/from")),b(K,J,k)})}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(g,C,i){C.exports=o;var e=g("../errors").codes,A=e.ERR_METHOD_NOT_IMPLEMENTED,s=e.ERR_MULTIPLE_CALLBACK,l=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,a=g("./_stream_duplex");function d(h,b){var u=this._transformState;u.transforming=!1;var m=u.writecb;if(m===null)return this.emit("error",new s);u.writechunk=null,u.writecb=null,b!=null&&this.push(b),m(h);var Z=this._readableState;Z.reading=!1,(Z.needReadable||Z.length<Z.highWaterMark)&&this._read(Z.highWaterMark)}function o(h){if(!(this instanceof o))return new o(h);a.call(this,h),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",c)}function c(){var h=this;typeof this._flush!="function"||this._readableState.destroyed?r(this,null,null):this._flush(function(b,u){r(h,b,u)})}function r(h,b,u){if(b)return h.emit("error",b);if(u!=null&&h.push(u),h._writableState.length)throw new n;if(h._transformState.transforming)throw new l;return h.push(null)}g("inherits")(o,a),o.prototype.push=function(h,b){return this._transformState.needTransform=!1,a.prototype.push.call(this,h,b)},o.prototype._transform=function(h,b,u){u(new A("_transform()"))},o.prototype._write=function(h,b,u){var m=this._transformState;if(m.writecb=u,m.writechunk=h,m.writeencoding=b,!m.transforming){var Z=this._readableState;(m.needTransform||Z.needReadable||Z.length<Z.highWaterMark)&&this._read(Z.highWaterMark)}},o.prototype._read=function(h){var b=this._transformState;b.writechunk===null||b.transforming?b.needTransform=!0:(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform))},o.prototype._destroy=function(h,b){a.prototype._destroy.call(this,h,function(u){b(u)})}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(g,C,i){(function(e,A){(function(){function s(y){var f=this;this.next=null,this.entry=null,this.finish=function(){(function(D,F,T){var Q=D.entry;for(D.entry=null;Q;){var P=Q.callback;F.pendingcb--,P(T),Q=Q.next}F.corkedRequestsFree.next=D})(f,y)}}var l;C.exports=K,K.WritableState=v;var n={deprecate:g("util-deprecate")},a=g("./internal/streams/stream"),d=g("buffer").Buffer,o=(A!==void 0?A:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},c,r=g("./internal/streams/destroy"),h=g("./internal/streams/state").getHighWaterMark,b=g("../errors").codes,u=b.ERR_INVALID_ARG_TYPE,m=b.ERR_METHOD_NOT_IMPLEMENTED,Z=b.ERR_MULTIPLE_CALLBACK,p=b.ERR_STREAM_CANNOT_PIPE,Y=b.ERR_STREAM_DESTROYED,R=b.ERR_STREAM_NULL_VALUES,X=b.ERR_STREAM_WRITE_AFTER_END,H=b.ERR_UNKNOWN_ENCODING,S=r.errorOrDestroy;function z(){}function v(y,f,D){l=l||g("./_stream_duplex"),y=y||{},typeof D!="boolean"&&(D=f instanceof l),this.objectMode=!!y.objectMode,D&&(this.objectMode=this.objectMode||!!y.writableObjectMode),this.highWaterMark=h(this,y,"writableHighWaterMark",D),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var F=y.decodeStrings===!1;this.decodeStrings=!F,this.defaultEncoding=y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(T){(function(Q,P){var L=Q._writableState,E=L.sync,J=L.writecb;if(typeof J!="function")throw new Z;if(function(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}(L),P)(function(j,q,tg,Cg,x){--q.pendingcb,tg?(e.nextTick(x,Cg),e.nextTick(W,j,q),j._writableState.errorEmitted=!0,S(j,Cg)):(x(Cg),j._writableState.errorEmitted=!0,S(j,Cg),W(j,q))})(Q,L,E,P,J);else{var k=G(L)||Q.destroyed;k||L.corked||L.bufferProcessing||!L.bufferedRequest||B(Q,L),E?e.nextTick(N,Q,L,k,J):N(Q,L,k,J)}})(f,T)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=y.emitClose!==!1,this.autoDestroy=!!y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function K(y){var f=this instanceof(l=l||g("./_stream_duplex"));if(!f&&!c.call(K,this))return new K(y);this._writableState=new v(y,this,f),this.writable=!0,y&&(typeof y.write=="function"&&(this._write=y.write),typeof y.writev=="function"&&(this._writev=y.writev),typeof y.destroy=="function"&&(this._destroy=y.destroy),typeof y.final=="function"&&(this._final=y.final)),a.call(this)}function V(y,f,D,F,T,Q,P){f.writelen=F,f.writecb=P,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new Y("write")):D?y._writev(T,f.onwrite):y._write(T,Q,f.onwrite),f.sync=!1}function N(y,f,D,F){D||function(T,Q){Q.length===0&&Q.needDrain&&(Q.needDrain=!1,T.emit("drain"))}(y,f),f.pendingcb--,F(),W(y,f)}function B(y,f){f.bufferProcessing=!0;var D=f.bufferedRequest;if(y._writev&&D&&D.next){var F=f.bufferedRequestCount,T=new Array(F),Q=f.corkedRequestsFree;Q.entry=D;for(var P=0,L=!0;D;)T[P]=D,D.isBuf||(L=!1),D=D.next,P+=1;T.allBuffers=L,V(y,f,!0,f.length,T,"",Q.finish),f.pendingcb++,f.lastBufferedRequest=null,Q.next?(f.corkedRequestsFree=Q.next,Q.next=null):f.corkedRequestsFree=new s(f),f.bufferedRequestCount=0}else{for(;D;){var E=D.chunk,J=D.encoding,k=D.callback;if(V(y,f,!1,f.objectMode?1:E.length,E,J,k),D=D.next,f.bufferedRequestCount--,f.writing)break}D===null&&(f.lastBufferedRequest=null)}f.bufferedRequest=D,f.bufferProcessing=!1}function G(y){return y.ending&&y.length===0&&y.bufferedRequest===null&&!y.finished&&!y.writing}function w(y,f){y._final(function(D){f.pendingcb--,D&&S(y,D),f.prefinished=!0,y.emit("prefinish"),W(y,f)})}function W(y,f){var D=G(f);if(D&&(function(T,Q){Q.prefinished||Q.finalCalled||(typeof T._final!="function"||Q.destroyed?(Q.prefinished=!0,T.emit("prefinish")):(Q.pendingcb++,Q.finalCalled=!0,e.nextTick(w,T,Q)))}(y,f),f.pendingcb===0&&(f.finished=!0,y.emit("finish"),f.autoDestroy))){var F=y._readableState;(!F||F.autoDestroy&&F.endEmitted)&&y.destroy()}return D}g("inherits")(K,a),v.prototype.getBuffer=function(){for(var y=this.bufferedRequest,f=[];y;)f.push(y),y=y.next;return f},function(){try{Object.defineProperty(v.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(y){return!!c.call(this,y)||this===K&&y&&y._writableState instanceof v}})):c=function(y){return y instanceof this},K.prototype.pipe=function(){S(this,new p)},K.prototype.write=function(y,f,D){var F,T=this._writableState,Q=!1,P=!T.objectMode&&(F=y,d.isBuffer(F)||F instanceof o);return P&&!d.isBuffer(y)&&(y=function(L){return d.from(L)}(y)),typeof f=="function"&&(D=f,f=null),P?f="buffer":f||(f=T.defaultEncoding),typeof D!="function"&&(D=z),T.ending?function(L,E){var J=new X;S(L,J),e.nextTick(E,J)}(this,D):(P||function(L,E,J,k){var j;return J===null?j=new R:typeof J=="string"||E.objectMode||(j=new u("chunk",["string","Buffer"],J)),!j||(S(L,j),e.nextTick(k,j),!1)}(this,T,y,D))&&(T.pendingcb++,Q=function(L,E,J,k,j,q){if(!J){var tg=function(Ag,O,_){return Ag.objectMode||Ag.decodeStrings===!1||typeof O!="string"||(O=d.from(O,_)),O}(E,k,j);k!==tg&&(J=!0,j="buffer",k=tg)}var Cg=E.objectMode?1:k.length;E.length+=Cg;var x=E.length<E.highWaterMark;if(x||(E.needDrain=!0),E.writing||E.corked){var sg=E.lastBufferedRequest;E.lastBufferedRequest={chunk:k,encoding:j,isBuf:J,callback:q,next:null},sg?sg.next=E.lastBufferedRequest:E.bufferedRequest=E.lastBufferedRequest,E.bufferedRequestCount+=1}else V(L,E,!1,Cg,k,j,q);return x}(this,T,P,y,f,D)),Q},K.prototype.cork=function(){this._writableState.corked++},K.prototype.uncork=function(){var y=this._writableState;y.corked&&(y.corked--,y.writing||y.corked||y.bufferProcessing||!y.bufferedRequest||B(this,y))},K.prototype.setDefaultEncoding=function(y){if(typeof y=="string"&&(y=y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((y+"").toLowerCase())>-1))throw new H(y);return this._writableState.defaultEncoding=y,this},Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),K.prototype._write=function(y,f,D){D(new m("_write()"))},K.prototype._writev=null,K.prototype.end=function(y,f,D){var F=this._writableState;return typeof y=="function"?(D=y,y=null,f=null):typeof f=="function"&&(D=f,f=null),y!=null&&this.write(y,f),F.corked&&(F.corked=1,this.uncork()),F.ending||function(T,Q,P){Q.ending=!0,W(T,Q),P&&(Q.finished?e.nextTick(P):T.once("finish",P)),Q.ended=!0,T.writable=!1}(this,F,D),this},Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(y){this._writableState&&(this._writableState.destroyed=y)}}),K.prototype.destroy=r.destroy,K.prototype._undestroy=r.undestroy,K.prototype._destroy=function(y,f){f(y)}}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(g,C,i){(function(e){(function(){var A;function s(Y,R,X){return(R=function(H){var S=function(z,v){if(typeof z!="object"||z===null)return z;var K=z[Symbol.toPrimitive];if(K!==void 0){var V=K.call(z,v);if(typeof V!="object")return V;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(z)}(H,"string");return typeof S=="symbol"?S:String(S)}(R))in Y?Object.defineProperty(Y,R,{value:X,enumerable:!0,configurable:!0,writable:!0}):Y[R]=X,Y}var l=g("./end-of-stream"),n=Symbol("lastResolve"),a=Symbol("lastReject"),d=Symbol("error"),o=Symbol("ended"),c=Symbol("lastPromise"),r=Symbol("handlePromise"),h=Symbol("stream");function b(Y,R){return{value:Y,done:R}}function u(Y){var R=Y[n];if(R!==null){var X=Y[h].read();X!==null&&(Y[c]=null,Y[n]=null,Y[a]=null,R(b(X,!1)))}}function m(Y){e.nextTick(u,Y)}var Z=Object.getPrototypeOf(function(){}),p=Object.setPrototypeOf((s(A={get stream(){return this[h]},next:function(){var Y=this,R=this[d];if(R!==null)return Promise.reject(R);if(this[o])return Promise.resolve(b(void 0,!0));if(this[h].destroyed)return new Promise(function(z,v){e.nextTick(function(){Y[d]?v(Y[d]):z(b(void 0,!0))})});var X,H=this[c];if(H)X=new Promise(function(z,v){return function(K,V){z.then(function(){v[o]?K(b(void 0,!0)):v[r](K,V)},V)}}(H,this));else{var S=this[h].read();if(S!==null)return Promise.resolve(b(S,!1));X=new Promise(this[r])}return this[c]=X,X}},Symbol.asyncIterator,function(){return this}),s(A,"return",function(){var Y=this;return new Promise(function(R,X){Y[h].destroy(null,function(H){H?X(H):R(b(void 0,!0))})})}),A),Z);C.exports=function(Y){var R,X=Object.create(p,(s(R={},h,{value:Y,writable:!0}),s(R,n,{value:null,writable:!0}),s(R,a,{value:null,writable:!0}),s(R,d,{value:null,writable:!0}),s(R,o,{value:Y._readableState.endEmitted,writable:!0}),s(R,r,{value:function(H,S){var z=X[h].read();z?(X[c]=null,X[n]=null,X[a]=null,H(b(z,!1))):(X[n]=H,X[a]=S)},writable:!0}),R));return X[c]=null,l(Y,function(H){if(H&&H.code!=="ERR_STREAM_PREMATURE_CLOSE"){var S=X[a];return S!==null&&(X[c]=null,X[n]=null,X[a]=null,S(H)),void(X[d]=H)}var z=X[n];z!==null&&(X[c]=null,X[n]=null,X[a]=null,z(b(void 0,!0))),X[o]=!0}),Y.on("readable",m.bind(null,X)),X}}).call(this)}).call(this,g("_process"))},{"./end-of-stream":486,_process:467}],484:[function(g,C,i){function e(c,r){var h=Object.keys(c);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(c);r&&(b=b.filter(function(u){return Object.getOwnPropertyDescriptor(c,u).enumerable})),h.push.apply(h,b)}return h}function A(c){for(var r=1;r<arguments.length;r++){var h=arguments[r]!=null?arguments[r]:{};r%2?e(Object(h),!0).forEach(function(b){s(c,b,h[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(h)):e(Object(h)).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(h,b))})}return c}function s(c,r,h){return(r=n(r))in c?Object.defineProperty(c,r,{value:h,enumerable:!0,configurable:!0,writable:!0}):c[r]=h,c}function l(c,r){for(var h=0;h<r.length;h++){var b=r[h];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(c,n(b.key),b)}}function n(c){var r=function(h,b){if(typeof h!="object"||h===null)return h;var u=h[Symbol.toPrimitive];if(u!==void 0){var m=u.call(h,b);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(h)}(c,"string");return typeof r=="symbol"?r:String(r)}var a=g("buffer").Buffer,d=g("util").inspect,o=d&&d.custom||"inspect";C.exports=function(){function c(){(function(b,u){if(!(b instanceof u))throw new TypeError("Cannot call a class as a function")})(this,c),this.head=null,this.tail=null,this.length=0}var r,h;return r=c,(h=[{key:"push",value:function(b){var u={data:b,next:null};this.length>0?this.tail.next=u:this.head=u,this.tail=u,++this.length}},{key:"unshift",value:function(b){var u={data:b,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var u=this.head,m=""+u.data;u=u.next;)m+=b+u.data;return m}},{key:"concat",value:function(b){if(this.length===0)return a.alloc(0);for(var u,m,Z,p=a.allocUnsafe(b>>>0),Y=this.head,R=0;Y;)u=Y.data,m=p,Z=R,a.prototype.copy.call(u,m,Z),R+=Y.data.length,Y=Y.next;return p}},{key:"consume",value:function(b,u){var m;return b<this.head.data.length?(m=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):m=b===this.head.data.length?this.shift():u?this._getString(b):this._getBuffer(b),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var u=this.head,m=1,Z=u.data;for(b-=Z.length;u=u.next;){var p=u.data,Y=b>p.length?p.length:b;if(Y===p.length?Z+=p:Z+=p.slice(0,b),(b-=Y)==0){Y===p.length?(++m,u.next?this.head=u.next:this.head=this.tail=null):(this.head=u,u.data=p.slice(Y));break}++m}return this.length-=m,Z}},{key:"_getBuffer",value:function(b){var u=a.allocUnsafe(b),m=this.head,Z=1;for(m.data.copy(u),b-=m.data.length;m=m.next;){var p=m.data,Y=b>p.length?p.length:b;if(p.copy(u,u.length-b,0,Y),(b-=Y)==0){Y===p.length?(++Z,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=p.slice(Y));break}++Z}return this.length-=Z,u}},{key:o,value:function(b,u){return d(this,A(A({},u),{},{depth:0,customInspect:!1}))}}])&&l(r.prototype,h),Object.defineProperty(r,"prototype",{writable:!1}),c}()},{buffer:220,util:188}],485:[function(g,C,i){(function(e){(function(){function A(n,a){l(n,a),s(n)}function s(n){n._writableState&&!n._writableState.emitClose||n._readableState&&!n._readableState.emitClose||n.emit("close")}function l(n,a){n.emit("error",a)}C.exports={destroy:function(n,a){var d=this,o=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return o||c?(a?a(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(l,this,n)):e.nextTick(l,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(r){!a&&r?d._writableState?d._writableState.errorEmitted?e.nextTick(s,d):(d._writableState.errorEmitted=!0,e.nextTick(A,d,r)):e.nextTick(A,d,r):a?(e.nextTick(s,d),a(r)):e.nextTick(s,d)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(n,a){var d=n._readableState,o=n._writableState;d&&d.autoDestroy||o&&o.autoDestroy?n.destroy(a):n.emit("error",a)}}}).call(this)}).call(this,g("_process"))},{_process:467}],486:[function(g,C,i){var e=g("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function A(){}C.exports=function s(l,n,a){if(typeof n=="function")return s(l,null,n);n||(n={}),a=function(Y){var R=!1;return function(){if(!R){R=!0;for(var X=arguments.length,H=new Array(X),S=0;S<X;S++)H[S]=arguments[S];Y.apply(this,H)}}}(a||A);var d=n.readable||n.readable!==!1&&l.readable,o=n.writable||n.writable!==!1&&l.writable,c=function(){l.writable||h()},r=l._writableState&&l._writableState.finished,h=function(){o=!1,r=!0,d||a.call(l)},b=l._readableState&&l._readableState.endEmitted,u=function(){d=!1,b=!0,o||a.call(l)},m=function(Y){a.call(l,Y)},Z=function(){var Y;return d&&!b?(l._readableState&&l._readableState.ended||(Y=new e),a.call(l,Y)):o&&!r?(l._writableState&&l._writableState.ended||(Y=new e),a.call(l,Y)):void 0},p=function(){l.req.on("finish",h)};return function(Y){return Y.setHeader&&typeof Y.abort=="function"}(l)?(l.on("complete",h),l.on("abort",Z),l.req?p():l.on("request",p)):o&&!l._writableState&&(l.on("end",c),l.on("close",c)),l.on("end",u),l.on("finish",h),n.error!==!1&&l.on("error",m),l.on("close",Z),function(){l.removeListener("complete",h),l.removeListener("abort",Z),l.removeListener("request",p),l.req&&l.req.removeListener("finish",h),l.removeListener("end",c),l.removeListener("close",c),l.removeListener("finish",h),l.removeListener("end",u),l.removeListener("error",m),l.removeListener("close",Z)}}},{"../../../errors":477}],487:[function(g,C,i){C.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(g,C,i){var e,A=g("../../../errors").codes,s=A.ERR_MISSING_ARGS,l=A.ERR_STREAM_DESTROYED;function n(r){if(r)throw r}function a(r,h,b,u){u=function(p){var Y=!1;return function(){Y||(Y=!0,p.apply(void 0,arguments))}}(u);var m=!1;r.on("close",function(){m=!0}),e===void 0&&(e=g("./end-of-stream")),e(r,{readable:h,writable:b},function(p){if(p)return u(p);m=!0,u()});var Z=!1;return function(p){if(!m&&!Z)return Z=!0,function(Y){return Y.setHeader&&typeof Y.abort=="function"}(r)?r.abort():typeof r.destroy=="function"?r.destroy():void u(p||new l("pipe"))}}function d(r){r()}function o(r,h){return r.pipe(h)}function c(r){return r.length?typeof r[r.length-1]!="function"?n:r.pop():n}C.exports=function(){for(var r=arguments.length,h=new Array(r),b=0;b<r;b++)h[b]=arguments[b];var u,m=c(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new s("streams");var Z=h.map(function(p,Y){var R=Y<h.length-1;return a(p,R,Y>0,function(X){u||(u=X),X&&Z.forEach(d),R||(Z.forEach(d),m(u))})});return h.reduce(o)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(g,C,i){var e=g("../../../errors").codes.ERR_INVALID_OPT_VALUE;C.exports={getHighWaterMark:function(A,s,l,n){var a=function(d,o,c){return d.highWaterMark!=null?d.highWaterMark:o?d[c]:null}(s,n,l);if(a!=null){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new e(n?l:"highWaterMark",a);return Math.floor(a)}return A.objectMode?16:16384}}},{"../../../errors":477}],490:[function(g,C,i){C.exports=g("events").EventEmitter},{events:422}],491:[function(g,C,i){(i=C.exports=g("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=g("./lib/_stream_writable.js"),i.Duplex=g("./lib/_stream_duplex.js"),i.Transform=g("./lib/_stream_transform.js"),i.PassThrough=g("./lib/_stream_passthrough.js"),i.finished=g("./lib/internal/streams/end-of-stream.js"),i.pipeline=g("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(g,C,i){var e=function(A){var s=Object.prototype,l=s.hasOwnProperty,n=Object.defineProperty||function(W,y,f){W[y]=f.value},a=typeof Symbol=="function"?Symbol:{},d=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function r(W,y,f){return Object.defineProperty(W,y,{value:f,enumerable:!0,configurable:!0,writable:!0}),W[y]}try{r({},"")}catch{r=function(y,f,D){return y[f]=D}}function h(W,y,f,D){var F=y&&y.prototype instanceof m?y:m,T=Object.create(F.prototype),Q=new B(D||[]);return n(T,"_invoke",{value:v(W,f,Q)}),T}function b(W,y,f){try{return{type:"normal",arg:W.call(y,f)}}catch(D){return{type:"throw",arg:D}}}A.wrap=h;var u={};function m(){}function Z(){}function p(){}var Y={};r(Y,d,function(){return this});var R=Object.getPrototypeOf,X=R&&R(R(G([])));X&&X!==s&&l.call(X,d)&&(Y=X);var H=p.prototype=m.prototype=Object.create(Y);function S(W){["next","throw","return"].forEach(function(y){r(W,y,function(f){return this._invoke(y,f)})})}function z(W,y){var f;n(this,"_invoke",{value:function(D,F){function T(){return new y(function(Q,P){(function L(E,J,k,j){var q=b(W[E],W,J);if(q.type!=="throw"){var tg=q.arg,Cg=tg.value;return Cg&&typeof Cg=="object"&&l.call(Cg,"__await")?y.resolve(Cg.__await).then(function(x){L("next",x,k,j)},function(x){L("throw",x,k,j)}):y.resolve(Cg).then(function(x){tg.value=x,k(tg)},function(x){return L("throw",x,k,j)})}j(q.arg)})(D,F,Q,P)})}return f=f?f.then(T,T):T()}})}function v(W,y,f){var D="suspendedStart";return function(F,T){if(D==="executing")throw new Error("Generator is already running");if(D==="completed"){if(F==="throw")throw T;return w()}for(f.method=F,f.arg=T;;){var Q=f.delegate;if(Q){var P=K(Q,f);if(P){if(P===u)continue;return P}}if(f.method==="next")f.sent=f._sent=f.arg;else if(f.method==="throw"){if(D==="suspendedStart")throw D="completed",f.arg;f.dispatchException(f.arg)}else f.method==="return"&&f.abrupt("return",f.arg);D="executing";var L=b(W,y,f);if(L.type==="normal"){if(D=f.done?"completed":"suspendedYield",L.arg===u)continue;return{value:L.arg,done:f.done}}L.type==="throw"&&(D="completed",f.method="throw",f.arg=L.arg)}}}function K(W,y){var f=y.method,D=W.iterator[f];if(D===void 0)return y.delegate=null,f==="throw"&&W.iterator.return&&(y.method="return",y.arg=void 0,K(W,y),y.method==="throw")||f!=="return"&&(y.method="throw",y.arg=new TypeError("The iterator does not provide a '"+f+"' method")),u;var F=b(D,W.iterator,y.arg);if(F.type==="throw")return y.method="throw",y.arg=F.arg,y.delegate=null,u;var T=F.arg;return T?T.done?(y[W.resultName]=T.value,y.next=W.nextLoc,y.method!=="return"&&(y.method="next",y.arg=void 0),y.delegate=null,u):T:(y.method="throw",y.arg=new TypeError("iterator result is not an object"),y.delegate=null,u)}function V(W){var y={tryLoc:W[0]};1 in W&&(y.catchLoc=W[1]),2 in W&&(y.finallyLoc=W[2],y.afterLoc=W[3]),this.tryEntries.push(y)}function N(W){var y=W.completion||{};y.type="normal",delete y.arg,W.completion=y}function B(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(V,this),this.reset(!0)}function G(W){if(W){var y=W[d];if(y)return y.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var f=-1,D=function F(){for(;++f<W.length;)if(l.call(W,f))return F.value=W[f],F.done=!1,F;return F.value=void 0,F.done=!0,F};return D.next=D}}return{next:w}}function w(){return{value:void 0,done:!0}}return Z.prototype=p,n(H,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:Z,configurable:!0}),Z.displayName=r(p,c,"GeneratorFunction"),A.isGeneratorFunction=function(W){var y=typeof W=="function"&&W.constructor;return!!y&&(y===Z||(y.displayName||y.name)==="GeneratorFunction")},A.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,p):(W.__proto__=p,r(W,c,"GeneratorFunction")),W.prototype=Object.create(H),W},A.awrap=function(W){return{__await:W}},S(z.prototype),r(z.prototype,o,function(){return this}),A.AsyncIterator=z,A.async=function(W,y,f,D,F){F===void 0&&(F=Promise);var T=new z(h(W,y,f,D),F);return A.isGeneratorFunction(y)?T:T.next().then(function(Q){return Q.done?Q.value:T.next()})},S(H),r(H,c,"Generator"),r(H,d,function(){return this}),r(H,"toString",function(){return"[object Generator]"}),A.keys=function(W){var y=Object(W),f=[];for(var D in y)f.push(D);return f.reverse(),function F(){for(;f.length;){var T=f.pop();if(T in y)return F.value=T,F.done=!1,F}return F.done=!0,F}},A.values=G,B.prototype={constructor:B,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!W)for(var y in this)y.charAt(0)==="t"&&l.call(this,y)&&!isNaN(+y.slice(1))&&(this[y]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var y=this;function f(L,E){return T.type="throw",T.arg=W,y.next=L,E&&(y.method="next",y.arg=void 0),!!E}for(var D=this.tryEntries.length-1;D>=0;--D){var F=this.tryEntries[D],T=F.completion;if(F.tryLoc==="root")return f("end");if(F.tryLoc<=this.prev){var Q=l.call(F,"catchLoc"),P=l.call(F,"finallyLoc");if(Q&&P){if(this.prev<F.catchLoc)return f(F.catchLoc,!0);if(this.prev<F.finallyLoc)return f(F.finallyLoc)}else if(Q){if(this.prev<F.catchLoc)return f(F.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<F.finallyLoc)return f(F.finallyLoc)}}}},abrupt:function(W,y){for(var f=this.tryEntries.length-1;f>=0;--f){var D=this.tryEntries[f];if(D.tryLoc<=this.prev&&l.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var F=D;break}}F&&(W==="break"||W==="continue")&&F.tryLoc<=y&&y<=F.finallyLoc&&(F=null);var T=F?F.completion:{};return T.type=W,T.arg=y,F?(this.method="next",this.next=F.finallyLoc,u):this.complete(T)},complete:function(W,y){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&y&&(this.next=y),u},finish:function(W){for(var y=this.tryEntries.length-1;y>=0;--y){var f=this.tryEntries[y];if(f.finallyLoc===W)return this.complete(f.completion,f.afterLoc),N(f),u}},catch:function(W){for(var y=this.tryEntries.length-1;y>=0;--y){var f=this.tryEntries[y];if(f.tryLoc===W){var D=f.completion;if(D.type==="throw"){var F=D.arg;N(f)}return F}}throw new Error("illegal catch attempt")},delegateYield:function(W,y,f){return this.delegate={iterator:G(W),resultName:y,nextLoc:f},this.method==="next"&&(this.arg=void 0),u}},A}(typeof C=="object"?C.exports:{});try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},{}],493:[function(g,C,i){var e=g("buffer").Buffer,A=g("inherits"),s=g("hash-base"),l=new Array(16),n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],a=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],o=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],r=[1352829926,1548603684,1836072691,2053994217,0];function h(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function b(R,X){return R<<X|R>>>32-X}function u(R,X,H,S,z,v,K,V){return b(R+(X^H^S)+v+K|0,V)+z|0}function m(R,X,H,S,z,v,K,V){return b(R+(X&H|~X&S)+v+K|0,V)+z|0}function Z(R,X,H,S,z,v,K,V){return b(R+((X|~H)^S)+v+K|0,V)+z|0}function p(R,X,H,S,z,v,K,V){return b(R+(X&S|H&~S)+v+K|0,V)+z|0}function Y(R,X,H,S,z,v,K,V){return b(R+(X^(H|~S))+v+K|0,V)+z|0}A(h,s),h.prototype._update=function(){for(var R=l,X=0;X<16;++X)R[X]=this._block.readInt32LE(4*X);for(var H=0|this._a,S=0|this._b,z=0|this._c,v=0|this._d,K=0|this._e,V=0|this._a,N=0|this._b,B=0|this._c,G=0|this._d,w=0|this._e,W=0;W<80;W+=1){var y,f;W<16?(y=u(H,S,z,v,K,R[n[W]],c[0],d[W]),f=Y(V,N,B,G,w,R[a[W]],r[0],o[W])):W<32?(y=m(H,S,z,v,K,R[n[W]],c[1],d[W]),f=p(V,N,B,G,w,R[a[W]],r[1],o[W])):W<48?(y=Z(H,S,z,v,K,R[n[W]],c[2],d[W]),f=Z(V,N,B,G,w,R[a[W]],r[2],o[W])):W<64?(y=p(H,S,z,v,K,R[n[W]],c[3],d[W]),f=m(V,N,B,G,w,R[a[W]],r[3],o[W])):(y=Y(H,S,z,v,K,R[n[W]],c[4],d[W]),f=u(V,N,B,G,w,R[a[W]],r[4],o[W])),H=K,K=v,v=b(z,10),z=S,S=y,V=w,w=G,G=b(B,10),B=N,N=f}var D=this._b+z+G|0;this._b=this._c+v+w|0,this._c=this._d+K+V|0,this._d=this._e+H+N|0,this._e=this._a+S+B|0,this._a=D},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var R=e.alloc?e.alloc(20):new e(20);return R.writeInt32LE(this._a,0),R.writeInt32LE(this._b,4),R.writeInt32LE(this._c,8),R.writeInt32LE(this._d,12),R.writeInt32LE(this._e,16),R},C.exports=h},{buffer:220,"hash-base":425,inherits:440}],494:[function(g,C,i){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var e=g("buffer"),A=e.Buffer;function s(n,a){for(var d in n)a[d]=n[d]}function l(n,a,d){return A(n,a,d)}A.from&&A.alloc&&A.allocUnsafe&&A.allocUnsafeSlow?C.exports=e:(s(e,i),i.Buffer=l),l.prototype=Object.create(A.prototype),s(A,l),l.from=function(n,a,d){if(typeof n=="number")throw new TypeError("Argument must not be a number");return A(n,a,d)},l.alloc=function(n,a,d){if(typeof n!="number")throw new TypeError("Argument must be a number");var o=A(n);return a!==void 0?typeof d=="string"?o.fill(a,d):o.fill(a):o.fill(0),o},l.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return A(n)},l.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(n)}},{buffer:220}],495:[function(g,C,i){(function(e){(function(){var A,s=g("buffer"),l=s.Buffer,n={};for(A in s)s.hasOwnProperty(A)&&A!=="SlowBuffer"&&A!=="Buffer"&&(n[A]=s[A]);var a=n.Buffer={};for(A in l)l.hasOwnProperty(A)&&A!=="allocUnsafe"&&A!=="allocUnsafeSlow"&&(a[A]=l[A]);if(n.Buffer.prototype=l.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(d,o,c){if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof d);if(d&&d.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);return l(d,o,c)}),a.alloc||(a.alloc=function(d,o,c){if(typeof d!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof d);if(d<0||d>=2*(1<<30))throw new RangeError('The value "'+d+'" is invalid for option "size"');var r=l(d);return o&&o.length!==0?typeof c=="string"?r.fill(o,c):r.fill(o):r.fill(0),r}),!n.kStringMaxLength)try{n.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch{}n.constants||(n.constants={MAX_LENGTH:n.kMaxLength},n.kStringMaxLength&&(n.constants.MAX_STRING_LENGTH=n.kStringMaxLength)),C.exports=n}).call(this)}).call(this,g("_process"))},{_process:467,buffer:220}],496:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0});const e=g("xmlchars/xml/1.0/ed5"),A=g("xmlchars/xml/1.1/ed2"),s=g("xmlchars/xmlns/1.0/ed3");var l=e.isS,n=e.isChar,a=e.isNameStartChar,d=e.isNameChar,o=e.S_LIST,c=e.NAME_RE,r=A.isChar,h=s.isNCNameStartChar,b=s.isNCNameChar,u=s.NC_NAME_RE;const m="http://www.w3.org/XML/1998/namespace",Z="http://www.w3.org/2000/xmlns/",p={__proto__:null,xml:m,xmlns:Z},Y={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},R=G=>G===34||G===39,X=[34,39],H=[...X,91,62],S=[...X,60,93],z=[61,63,...o],v=[...o,62,38,60];function K(G,w,W){switch(w){case"xml":W!==m&&G.fail(`xml prefix must be bound to ${m}.`);break;case"xmlns":W!==Z&&G.fail(`xmlns prefix must be bound to ${Z}.`)}switch(W){case Z:G.fail(w===""?`the default namespace may not be set to ${W}.`:`may not assign a prefix (even "xmlns") to the URI ${Z}.`);break;case m:switch(w){case"xml":break;case"":G.fail(`the default namespace may not be set to ${W}.`);break;default:G.fail("may not assign the xml namespace to another prefix.")}}}const V=G=>u.test(G),N=G=>c.test(G);i.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const B={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};i.SaxesParser=class{constructor(G){this.opt=G??{},this.fragmentOpt=!!this.opt.fragment;const w=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,w){this.nameStartCheck=h,this.nameCheck=b,this.isName=V,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},p);const W=this.opt.additionalNamespaces;W!=null&&(function(y,f){for(const D of Object.keys(f))K(y,D,f[D])}(this,W),Object.assign(this.ns,W))}else this.nameStartCheck=a,this.nameCheck=d,this.isName=N,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var G;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:w}=this;this.state=w?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=w,this.xmlDeclPossible=!w,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:W}=this.opt;if(W===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");W="1.0"}this.setXMLVersion(W),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Y),(G=this.readyHandler)===null||G===void 0||G.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(G,w){this[B[G]]=w}off(G){this[B[G]]=void 0}makeError(G){var w;let W=(w=this.fileName)!==null&&w!==void 0?w:"";return this.trackPosition&&(W.length>0&&(W+=":"),W+=`${this.line}:${this.column}`),W.length>0&&(W+=": "),new Error(W+G)}fail(G){const w=this.makeError(G),W=this.errorHandler;if(W===void 0)throw w;return W(w),this}write(G){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let w=!1;G===null?(w=!0,G=""):typeof G=="object"&&(G=G.toString()),this.carriedFromPrevious!==void 0&&(G=`${this.carriedFromPrevious}${G}`,this.carriedFromPrevious=void 0);let W=G.length;const y=G.charCodeAt(W-1);!w&&(y===13||y>=55296&&y<=56319)&&(this.carriedFromPrevious=G[W-1],W--,G=G.slice(0,W));const{stateTable:f}=this;for(this.chunk=G,this.i=0;this.i<W;)f[this.state].call(this);return this.chunkPosition+=W,w?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:G,i:w}=this;if(this.prevI=w,this.i=w+1,w>=G.length)return-1;const W=G.charCodeAt(w);if(this.column++,W<55296){if(W>=32||W===9)return W;switch(W){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return G.charCodeAt(w+1)===10&&(this.i=w+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),W}}if(W>56319)return W>=57344&&W<=65533||this.fail("disallowed character."),W;const y=65536+1024*(W-55296)+(G.charCodeAt(w+1)-56320);return this.i=w+2,y>1114111&&this.fail("disallowed character."),y}getCode11(){const{chunk:G,i:w}=this;if(this.prevI=w,this.i=w+1,w>=G.length)return-1;const W=G.charCodeAt(w);if(this.column++,W<55296){if(W>31&&W<127||W>159&&W!==8232||W===9)return W;switch(W){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const f=G.charCodeAt(w+1);f!==10&&f!==133||(this.i=w+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),W}}if(W>56319)return W>=57344&&W<=65533||this.fail("disallowed character."),W;const y=65536+1024*(W-55296)+(G.charCodeAt(w+1)-56320);return this.i=w+2,y>1114111&&this.fail("disallowed character."),y}getCodeNorm(){const G=this.getCode();return G===-2?10:G}unget(){this.i=this.prevI,this.column--}captureTo(G){let{i:w}=this;const{chunk:W}=this;for(;;){const y=this.getCode(),f=y===-2,D=f?10:y;if(D===-1||G.includes(D))return this.text+=W.slice(w,this.prevI),D;f&&(this.text+=W.slice(w,this.prevI)+`
`,w=this.i)}}captureToChar(G){let{i:w}=this;const{chunk:W}=this;for(;;){let y=this.getCode();switch(y){case-2:this.text+=W.slice(w,this.prevI)+`
`,w=this.i,y=10;break;case-1:return this.text+=W.slice(w),!1}if(y===G)return this.text+=W.slice(w,this.prevI),!0}}captureNameChars(){const{chunk:G,i:w}=this;for(;;){const W=this.getCode();if(W===-1)return this.name+=G.slice(w),-1;if(!d(W))return this.name+=G.slice(w,this.prevI),W===-2?10:W}}skipSpaces(){for(;;){const G=this.getCodeNorm();if(G===-1||!l(G))return G}}setXMLVersion(G){this.currentXMLVersion=G,G==="1.0"?(this.isChar=n,this.getCode=this.getCode10):(this.isChar=r,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const G=this.i,w=this.skipSpaces();switch(this.prevI!==G&&(this.xmlDeclPossible=!1),w){case 60:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var G;const w=this.captureTo(H);switch(w){case 62:(G=this.doctypeHandler)===null||G===void 0||G.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(w),w===91?this.state=4:R(w)&&(this.state=3,this.q=w)}}sDoctypeQuote(){const G=this.q;this.captureToChar(G)&&(this.text+=String.fromCodePoint(G),this.q=null,this.state=2)}sDTD(){const G=this.captureTo(S);G!==-1&&(this.text+=String.fromCodePoint(G),G===93?this.state=2:G===60?this.state=6:R(G)&&(this.state=5,this.q=G))}sDTDQuoted(){const G=this.q;this.captureToChar(G)&&(this.text+=String.fromCodePoint(G),this.state=4,this.q=null)}sDTDOpenWaka(){const G=this.getCodeNorm();switch(this.text+=String.fromCodePoint(G),G){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const G=String.fromCodePoint(this.getCodeNorm()),w=this.openWakaBang+=G;this.text+=G,w!=="-"&&(this.state=w==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const G=this.getCodeNorm();this.text+=String.fromCodePoint(G),this.state=G===45?10:8}sDTDCommentEnded(){const G=this.getCodeNorm();this.text+=String.fromCodePoint(G),G===62?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const G=this.getCodeNorm();this.text+=String.fromCodePoint(G),G===62&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:G}=this;const{chunk:w}=this;g:for(;;)switch(this.getCode()){case-2:this.entity+=w.slice(G,this.prevI)+`
`,G=this.i;break;case 59:{const{entityReturnState:W}=this,y=this.entity+w.slice(G,this.prevI);let f;this.state=W,y===""?(this.fail("empty entity name."),f="&;"):(f=this.parseEntity(y),this.entity=""),W===13&&this.textHandler===void 0||(this.text+=f);break g}case-1:this.entity+=w.slice(G);break g}}sOpenWaka(){const G=this.getCode();if(a(G))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(G){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var G;const w=this.getCodeNorm();w===45?(this.state=19,(G=this.commentHandler)===null||G===void 0||G.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(w),this.state=17)}sCommentEnded(){const G=this.getCodeNorm();G!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(G),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const G=this.getCodeNorm();G===93?this.state=22:(this.text+="]"+String.fromCodePoint(G),this.state=20)}sCDataEnding2(){var G;const w=this.getCodeNorm();switch(w){case 62:(G=this.cdataHandler)===null||G===void 0||G.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(w),this.state=20}}sPIFirstChar(){const G=this.getCodeNorm();this.nameStartCheck(G)?(this.piTarget+=String.fromCodePoint(G),this.state=24):G===63||l(G)?(this.fail("processing instruction without a target."),this.state=G===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(G),this.state=24)}sPIRest(){const{chunk:G,i:w}=this;for(;;){const W=this.getCodeNorm();if(W===-1)return void(this.piTarget+=G.slice(w));if(!this.nameCheck(W)){this.piTarget+=G.slice(w,this.prevI);const y=W===63;y||l(W)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=y?33:27):this.state=y?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(W));break}}}sPIBody(){if(this.text.length===0){const G=this.getCodeNorm();G===63?this.state=26:l(G)||(this.text=String.fromCodePoint(G))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var G;const w=this.getCodeNorm();if(w===62){const{piTarget:W}=this;W.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(G=this.piHandler)===null||G===void 0||G.call(this,{target:W,body:this.text}),this.piTarget=this.text="",this.state=13}else w===63?this.text+="?":(this.text+="?"+String.fromCodePoint(w),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const G=this.skipSpaces();G!==63?G!==-1&&(this.state=28,this.name=String.fromCodePoint(G)):this.state=33}sXMLDeclName(){const G=this.captureTo(z);if(G===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(l(G)||G===61){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "))}this.state=G===61?30:29}}sXMLDeclEq(){const G=this.getCodeNorm();if(G===63)return this.state=33,void this.fail("XML declaration is incomplete.");l(G)||(G!==61&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const G=this.getCodeNorm();if(G===63)return this.state=33,void this.fail("XML declaration is incomplete.");l(G)||(R(G)?this.q=G:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const G=this.captureTo([this.q,63]);if(G===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(G===-1)return;const w=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const W=w;this.xmlDecl.version=W,/^1\.[0-9]+$/.test(W)?this.opt.forceXMLVersion||this.setXMLVersion(W):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(w)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=w;break;case"standalone":w!=="yes"&&w!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=w}this.name="",this.state=32}sXMLDeclSeparator(){const G=this.getCodeNorm();G!==63?(l(G)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var G;this.getCodeNorm()===62?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(G=this.xmldeclHandler)===null||G===void 0||G.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var G;const w=this.captureNameChars();if(w===-1)return;const W=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=W.ns=Object.create(null)),(G=this.openTagStartHandler)===null||G===void 0||G.call(this,W),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),w){case 62:this.openTag();break;case 47:this.state=35;break;default:l(w)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===62?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const G=this.skipSpaces();G!==-1&&(a(G)?(this.unget(),this.state=37):G===62?this.openTag():G===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const G=this.captureNameChars();G===61?this.state=39:l(G)?this.state=38:G===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):G!==-1&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const G=this.skipSpaces();switch(G){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",G===62?this.openTag():a(G)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const G=this.getCodeNorm();R(G)?(this.q=G,this.state=40):l(G)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:G,chunk:w}=this;let{i:W}=this;for(;;)switch(this.getCode()){case G:return this.pushAttrib(this.name,this.text+w.slice(W,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=w.slice(W,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=w.slice(W,this.prevI)+" ",W=this.i;break;case 60:return this.text+=w.slice(W,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=w.slice(W))}}sAttribValueClosed(){const G=this.getCodeNorm();l(G)?this.state=36:G===62?this.openTag():G===47?this.state=35:a(G)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const G=this.captureTo(v);switch(G){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",G===62?this.openTag():this.state=36}}sCloseTag(){const G=this.captureNameChars();G===62?this.closeTag():l(G)?this.state=44:G!==-1&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:G,forbiddenState:w}=this;const{chunk:W,textHandler:y}=this;g:for(;;)switch(this.getCode()){case 60:if(this.state=15,y!==void 0){const{text:f}=this,D=W.slice(G,this.prevI);f.length!==0?(y(f+D),this.text=""):D.length!==0&&y(D)}w=0;break g;case 38:this.state=14,this.entityReturnState=13,y!==void 0&&(this.text+=W.slice(G,this.prevI)),w=0;break g;case 93:switch(w){case 0:w=1;break;case 1:w=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:w===2&&this.fail('the string "]]>" is disallowed in char data.'),w=0;break;case-2:y!==void 0&&(this.text+=W.slice(G,this.prevI)+`
`),G=this.i,w=0;break;case-1:y!==void 0&&(this.text+=W.slice(G));break g;default:w=0}this.forbiddenState=w}handleTextOutsideRoot(){let{i:G}=this;const{chunk:w,textHandler:W}=this;let y=!1;g:for(;;){const f=this.getCode();switch(f){case 60:if(this.state=15,W!==void 0){const{text:D}=this,F=w.slice(G,this.prevI);D.length!==0?(W(D+F),this.text=""):F.length!==0&&W(F)}break g;case 38:this.state=14,this.entityReturnState=13,W!==void 0&&(this.text+=w.slice(G,this.prevI)),y=!0;break g;case-2:W!==void 0&&(this.text+=w.slice(G,this.prevI)+`
`),G=this.i;break;case-1:W!==void 0&&(this.text+=w.slice(G));break g;default:l(f)||(y=!0)}}y&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(G,w){var W;const{prefix:y,local:f}=this.qname(G),D={name:G,prefix:y,local:f,value:w};if(this.attribList.push(D),(W=this.attributeHandler)===null||W===void 0||W.call(this,D),y==="xmlns"){const F=w.trim();this.currentXMLVersion==="1.0"&&F===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[f]=F,K(this,f,F)}else if(G==="xmlns"){const F=w.trim();this.topNS[""]=F,K(this,"",F)}}pushAttribPlain(G,w){var W;const y={name:G,value:w};this.attribList.push(y),(W=this.attributeHandler)===null||W===void 0||W.call(this,y)}end(){var G,w;this.sawRoot||this.fail("document must contain a root element.");const{tags:W}=this;for(;W.length>0;){const f=W.pop();this.fail("unclosed tag: "+f.name)}this.state!==0&&this.state!==13&&this.fail("unexpected end.");const{text:y}=this;return y.length!==0&&((G=this.textHandler)===null||G===void 0||G.call(this,y),this.text=""),this._closed=!0,(w=this.endHandler)===null||w===void 0||w.call(this),this._init(),this}resolve(G){var w,W;let y=this.topNS[G];if(y!==void 0)return y;const{tags:f}=this;for(let D=f.length-1;D>=0;D--)if(y=f[D].ns[G],y!==void 0)return y;return y=this.ns[G],y!==void 0?y:(W=(w=this.opt).resolvePrefix)===null||W===void 0?void 0:W.call(w,G)}qname(G){const w=G.indexOf(":");if(w===-1)return{prefix:"",local:G};const W=G.slice(w+1),y=G.slice(0,w);return(y===""||W===""||W.includes(":"))&&this.fail(`malformed name: ${G}.`),{prefix:y,local:W}}processAttribsNS(){var G;const{attribList:w}=this,W=this.tag;{const{prefix:D,local:F}=this.qname(W.name);W.prefix=D,W.local=F;const T=W.uri=(G=this.resolve(D))!==null&&G!==void 0?G:"";D!==""&&(D==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(D)}.`),W.uri=D))}if(w.length===0)return;const{attributes:y}=W,f=new Set;for(const D of w){const{name:F,prefix:T,local:Q}=D;let P,L;T===""?(P=F==="xmlns"?Z:"",L=F):(P=this.resolve(T),P===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),P=T),L=`{${P}}${Q}`),f.has(L)&&this.fail(`duplicate attribute: ${L}.`),f.add(L),D.uri=P,y[F]=D}this.attribList=[]}processAttribsPlain(){const{attribList:G}=this,w=this.tag.attributes;for(const{name:W,value:y}of G)w[W]!==void 0&&this.fail(`duplicate attribute: ${W}.`),w[W]=y;this.attribList=[]}openTag(){var G;this.processAttribs();const{tags:w}=this,W=this.tag;W.isSelfClosing=!1,(G=this.openTagHandler)===null||G===void 0||G.call(this,W),w.push(W),this.state=13,this.name=""}openSelfClosingTag(){var G,w,W;this.processAttribs();const{tags:y}=this,f=this.tag;f.isSelfClosing=!0,(G=this.openTagHandler)===null||G===void 0||G.call(this,f),(w=this.closeTagHandler)===null||w===void 0||w.call(this,f),(this.tag=(W=y[y.length-1])!==null&&W!==void 0?W:null)===null&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:G,name:w}=this;if(this.state=13,this.name="",w==="")return this.fail("weird empty close tag."),void(this.text+="</>");const W=this.closeTagHandler;let y=G.length;for(;y-- >0;){const f=this.tag=G.pop();if(this.topNS=f.ns,W==null||W(f),f.name===w)break;this.fail("unexpected close tag.")}y===0?this.closedRoot=!0:y<0&&(this.fail(`unmatched closing tag: ${w}.`),this.text+=`</${w}>`)}parseEntity(G){if(G[0]!=="#"){const W=this.ENTITIES[G];return W!==void 0?W:(this.fail(this.isName(G)?"undefined entity.":"disallowed character in entity name."),`&${G};`)}let w=NaN;return G[1]==="x"&&/^#x[0-9a-f]+$/i.test(G)?w=parseInt(G.slice(2),16):/^#[0-9]+$/.test(G)&&(w=parseInt(G.slice(1),10)),this.isChar(w)?String.fromCodePoint(w):(this.fail("malformed character entity."),`&${G};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(g,C,i){var e=g("safe-buffer").Buffer;function A(s,l){this._block=e.alloc(s),this._finalSize=l,this._blockSize=s,this._len=0}A.prototype.update=function(s,l){typeof s=="string"&&(l=l||"utf8",s=e.from(s,l));for(var n=this._block,a=this._blockSize,d=s.length,o=this._len,c=0;c<d;){for(var r=o%a,h=Math.min(d-c,a-r),b=0;b<h;b++)n[r+b]=s[c+b];c+=h,(o+=h)%a==0&&this._update(n)}return this._len+=d,this},A.prototype.digest=function(s){var l=this._len%this._blockSize;this._block[l]=128,this._block.fill(0,l+1),l>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var a=(4294967295&n)>>>0,d=(n-a)/4294967296;this._block.writeUInt32BE(d,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var o=this._hash();return s?o.toString(s):o},A.prototype._update=function(){throw new Error("_update must be implemented by subclass")},C.exports=A},{"safe-buffer":494}],498:[function(g,C,i){var e=C.exports=function(A){A=A.toLowerCase();var s=e[A];if(!s)throw new Error(A+" is not supported (we accept pull requests)");return new s};e.sha=g("./sha"),e.sha1=g("./sha1"),e.sha224=g("./sha224"),e.sha256=g("./sha256"),e.sha384=g("./sha384"),e.sha512=g("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(g,C,i){var e=g("inherits"),A=g("./hash"),s=g("safe-buffer").Buffer,l=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function a(){this.init(),this._w=n,A.call(this,64,56)}function d(c){return c<<30|c>>>2}function o(c,r,h,b){return c===0?r&h|~r&b:c===2?r&h|r&b|h&b:r^h^b}e(a,A),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(c){for(var r,h=this._w,b=0|this._a,u=0|this._b,m=0|this._c,Z=0|this._d,p=0|this._e,Y=0;Y<16;++Y)h[Y]=c.readInt32BE(4*Y);for(;Y<80;++Y)h[Y]=h[Y-3]^h[Y-8]^h[Y-14]^h[Y-16];for(var R=0;R<80;++R){var X=~~(R/20),H=0|((r=b)<<5|r>>>27)+o(X,u,m,Z)+p+h[R]+l[X];p=Z,Z=m,m=d(u),u=b,b=H}this._a=b+this._a|0,this._b=u+this._b|0,this._c=m+this._c|0,this._d=Z+this._d|0,this._e=p+this._e|0},a.prototype._hash=function(){var c=s.allocUnsafe(20);return c.writeInt32BE(0|this._a,0),c.writeInt32BE(0|this._b,4),c.writeInt32BE(0|this._c,8),c.writeInt32BE(0|this._d,12),c.writeInt32BE(0|this._e,16),c},C.exports=a},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(g,C,i){var e=g("inherits"),A=g("./hash"),s=g("safe-buffer").Buffer,l=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function a(){this.init(),this._w=n,A.call(this,64,56)}function d(r){return r<<5|r>>>27}function o(r){return r<<30|r>>>2}function c(r,h,b,u){return r===0?h&b|~h&u:r===2?h&b|h&u|b&u:h^b^u}e(a,A),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(r){for(var h,b=this._w,u=0|this._a,m=0|this._b,Z=0|this._c,p=0|this._d,Y=0|this._e,R=0;R<16;++R)b[R]=r.readInt32BE(4*R);for(;R<80;++R)b[R]=(h=b[R-3]^b[R-8]^b[R-14]^b[R-16])<<1|h>>>31;for(var X=0;X<80;++X){var H=~~(X/20),S=d(u)+c(H,m,Z,p)+Y+b[X]+l[H]|0;Y=p,p=Z,Z=o(m),m=u,u=S}this._a=u+this._a|0,this._b=m+this._b|0,this._c=Z+this._c|0,this._d=p+this._d|0,this._e=Y+this._e|0},a.prototype._hash=function(){var r=s.allocUnsafe(20);return r.writeInt32BE(0|this._a,0),r.writeInt32BE(0|this._b,4),r.writeInt32BE(0|this._c,8),r.writeInt32BE(0|this._d,12),r.writeInt32BE(0|this._e,16),r},C.exports=a},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(g,C,i){var e=g("inherits"),A=g("./sha256"),s=g("./hash"),l=g("safe-buffer").Buffer,n=new Array(64);function a(){this.init(),this._w=n,s.call(this,64,56)}e(a,A),a.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},a.prototype._hash=function(){var d=l.allocUnsafe(28);return d.writeInt32BE(this._a,0),d.writeInt32BE(this._b,4),d.writeInt32BE(this._c,8),d.writeInt32BE(this._d,12),d.writeInt32BE(this._e,16),d.writeInt32BE(this._f,20),d.writeInt32BE(this._g,24),d},C.exports=a},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(g,C,i){var e=g("inherits"),A=g("./hash"),s=g("safe-buffer").Buffer,l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=new Array(64);function a(){this.init(),this._w=n,A.call(this,64,56)}function d(b,u,m){return m^b&(u^m)}function o(b,u,m){return b&u|m&(b|u)}function c(b){return(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10)}function r(b){return(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7)}function h(b){return(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3}e(a,A),a.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},a.prototype._update=function(b){for(var u,m=this._w,Z=0|this._a,p=0|this._b,Y=0|this._c,R=0|this._d,X=0|this._e,H=0|this._f,S=0|this._g,z=0|this._h,v=0;v<16;++v)m[v]=b.readInt32BE(4*v);for(;v<64;++v)m[v]=0|(((u=m[v-2])>>>17|u<<15)^(u>>>19|u<<13)^u>>>10)+m[v-7]+h(m[v-15])+m[v-16];for(var K=0;K<64;++K){var V=z+r(X)+d(X,H,S)+l[K]+m[K]|0,N=c(Z)+o(Z,p,Y)|0;z=S,S=H,H=X,X=R+V|0,R=Y,Y=p,p=Z,Z=V+N|0}this._a=Z+this._a|0,this._b=p+this._b|0,this._c=Y+this._c|0,this._d=R+this._d|0,this._e=X+this._e|0,this._f=H+this._f|0,this._g=S+this._g|0,this._h=z+this._h|0},a.prototype._hash=function(){var b=s.allocUnsafe(32);return b.writeInt32BE(this._a,0),b.writeInt32BE(this._b,4),b.writeInt32BE(this._c,8),b.writeInt32BE(this._d,12),b.writeInt32BE(this._e,16),b.writeInt32BE(this._f,20),b.writeInt32BE(this._g,24),b.writeInt32BE(this._h,28),b},C.exports=a},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(g,C,i){var e=g("inherits"),A=g("./sha512"),s=g("./hash"),l=g("safe-buffer").Buffer,n=new Array(160);function a(){this.init(),this._w=n,s.call(this,128,112)}e(a,A),a.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},a.prototype._hash=function(){var d=l.allocUnsafe(48);function o(c,r,h){d.writeInt32BE(c,h),d.writeInt32BE(r,h+4)}return o(this._ah,this._al,0),o(this._bh,this._bl,8),o(this._ch,this._cl,16),o(this._dh,this._dl,24),o(this._eh,this._el,32),o(this._fh,this._fl,40),d},C.exports=a},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(g,C,i){var e=g("inherits"),A=g("./hash"),s=g("safe-buffer").Buffer,l=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],n=new Array(160);function a(){this.init(),this._w=n,A.call(this,128,112)}function d(p,Y,R){return R^p&(Y^R)}function o(p,Y,R){return p&Y|R&(p|Y)}function c(p,Y){return(p>>>28|Y<<4)^(Y>>>2|p<<30)^(Y>>>7|p<<25)}function r(p,Y){return(p>>>14|Y<<18)^(p>>>18|Y<<14)^(Y>>>9|p<<23)}function h(p,Y){return(p>>>1|Y<<31)^(p>>>8|Y<<24)^p>>>7}function b(p,Y){return(p>>>1|Y<<31)^(p>>>8|Y<<24)^(p>>>7|Y<<25)}function u(p,Y){return(p>>>19|Y<<13)^(Y>>>29|p<<3)^p>>>6}function m(p,Y){return(p>>>19|Y<<13)^(Y>>>29|p<<3)^(p>>>6|Y<<26)}function Z(p,Y){return p>>>0<Y>>>0?1:0}e(a,A),a.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},a.prototype._update=function(p){for(var Y=this._w,R=0|this._ah,X=0|this._bh,H=0|this._ch,S=0|this._dh,z=0|this._eh,v=0|this._fh,K=0|this._gh,V=0|this._hh,N=0|this._al,B=0|this._bl,G=0|this._cl,w=0|this._dl,W=0|this._el,y=0|this._fl,f=0|this._gl,D=0|this._hl,F=0;F<32;F+=2)Y[F]=p.readInt32BE(4*F),Y[F+1]=p.readInt32BE(4*F+4);for(;F<160;F+=2){var T=Y[F-30],Q=Y[F-30+1],P=h(T,Q),L=b(Q,T),E=u(T=Y[F-4],Q=Y[F-4+1]),J=m(Q,T),k=Y[F-14],j=Y[F-14+1],q=Y[F-32],tg=Y[F-32+1],Cg=L+j|0,x=P+k+Z(Cg,L)|0;x=(x=x+E+Z(Cg=Cg+J|0,J)|0)+q+Z(Cg=Cg+tg|0,tg)|0,Y[F]=x,Y[F+1]=Cg}for(var sg=0;sg<160;sg+=2){x=Y[sg],Cg=Y[sg+1];var Ag=o(R,X,H),O=o(N,B,G),_=c(R,N),Ig=c(N,R),ng=r(z,W),ag=r(W,z),lg=l[sg],cg=l[sg+1],dg=d(z,v,K),hg=d(W,y,f),rg=D+ag|0,Wg=V+ng+Z(rg,D)|0;Wg=(Wg=(Wg=Wg+dg+Z(rg=rg+hg|0,hg)|0)+lg+Z(rg=rg+cg|0,cg)|0)+x+Z(rg=rg+Cg|0,Cg)|0;var Gg=Ig+O|0,Sg=_+Ag+Z(Gg,Ig)|0;V=K,D=f,K=v,f=y,v=z,y=W,z=S+Wg+Z(W=w+rg|0,w)|0,S=H,w=G,H=X,G=B,X=R,B=N,R=Wg+Sg+Z(N=rg+Gg|0,rg)|0}this._al=this._al+N|0,this._bl=this._bl+B|0,this._cl=this._cl+G|0,this._dl=this._dl+w|0,this._el=this._el+W|0,this._fl=this._fl+y|0,this._gl=this._gl+f|0,this._hl=this._hl+D|0,this._ah=this._ah+R+Z(this._al,N)|0,this._bh=this._bh+X+Z(this._bl,B)|0,this._ch=this._ch+H+Z(this._cl,G)|0,this._dh=this._dh+S+Z(this._dl,w)|0,this._eh=this._eh+z+Z(this._el,W)|0,this._fh=this._fh+v+Z(this._fl,y)|0,this._gh=this._gh+K+Z(this._gl,f)|0,this._hh=this._hh+V+Z(this._hl,D)|0},a.prototype._hash=function(){var p=s.allocUnsafe(64);function Y(R,X,H){p.writeInt32BE(R,H),p.writeInt32BE(X,H+4)}return Y(this._ah,this._al,0),Y(this._bh,this._bl,8),Y(this._ch,this._cl,16),Y(this._dh,this._dl,24),Y(this._eh,this._el,32),Y(this._fh,this._fl,40),Y(this._gh,this._gl,48),Y(this._hh,this._hl,56),p},C.exports=a},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(g,C,i){C.exports=A;var e=g("events").EventEmitter;function A(){e.call(this)}g("inherits")(A,e),A.Readable=g("readable-stream/readable.js"),A.Writable=g("readable-stream/writable.js"),A.Duplex=g("readable-stream/duplex.js"),A.Transform=g("readable-stream/transform.js"),A.PassThrough=g("readable-stream/passthrough.js"),A.Stream=A,A.prototype.pipe=function(s,l){var n=this;function a(u){s.writable&&s.write(u)===!1&&n.pause&&n.pause()}function d(){n.readable&&n.resume&&n.resume()}n.on("data",a),s.on("drain",d),s._isStdio||l&&l.end===!1||(n.on("end",c),n.on("close",r));var o=!1;function c(){o||(o=!0,s.end())}function r(){o||(o=!0,typeof s.destroy=="function"&&s.destroy())}function h(u){if(b(),e.listenerCount(this,"error")===0)throw u}function b(){n.removeListener("data",a),s.removeListener("drain",d),n.removeListener("end",c),n.removeListener("close",r),n.removeListener("error",h),s.removeListener("error",h),n.removeListener("end",b),n.removeListener("close",b),s.removeListener("close",b)}return n.on("error",h),s.on("error",h),n.on("end",b),n.on("close",b),s.on("close",b),s.emit("pipe",n),s}},{events:422,inherits:440,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],506:[function(g,C,i){var e={}.toString;C.exports=Array.isArray||function(A){return e.call(A)=="[object Array]"}},{}],507:[function(g,C,i){C.exports=g("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(g,C,i){var e=g("process-nextick-args"),A=Object.keys||function(b){var u=[];for(var m in b)u.push(m);return u};C.exports=c;var s=Object.create(g("core-util-is"));s.inherits=g("inherits");var l=g("./_stream_readable"),n=g("./_stream_writable");s.inherits(c,l);for(var a=A(n.prototype),d=0;d<a.length;d++){var o=a[d];c.prototype[o]||(c.prototype[o]=n.prototype[o])}function c(b){if(!(this instanceof c))return new c(b);l.call(this,b),n.call(this,b),b&&b.readable===!1&&(this.readable=!1),b&&b.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,b&&b.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",r)}function r(){this.allowHalfOpen||this._writableState.ended||e.nextTick(h,this)}function h(b){b.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),c.prototype._destroy=function(b,u){this.push(null),this.end(),e.nextTick(u,b)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(g,C,i){C.exports=s;var e=g("./_stream_transform"),A=Object.create(g("core-util-is"));function s(l){if(!(this instanceof s))return new s(l);e.call(this,l)}A.inherits=g("inherits"),A.inherits(s,e),s.prototype._transform=function(l,n,a){a(null,l)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(g,C,i){(function(e,A){(function(){var s=g("process-nextick-args");C.exports=R;var l,n=g("isarray");R.ReadableState=Y,g("events").EventEmitter;var a=function(D,F){return D.listeners(F).length},d=g("./internal/streams/stream"),o=g("safe-buffer").Buffer,c=(A!==void 0?A:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},r=Object.create(g("core-util-is"));r.inherits=g("inherits");var h=g("util"),b=void 0;b=h&&h.debuglog?h.debuglog("stream"):function(){};var u,m=g("./internal/streams/BufferList"),Z=g("./internal/streams/destroy");r.inherits(R,d);var p=["error","close","destroy","pause","resume"];function Y(D,F){D=D||{};var T=F instanceof(l=l||g("./_stream_duplex"));this.objectMode=!!D.objectMode,T&&(this.objectMode=this.objectMode||!!D.readableObjectMode);var Q=D.highWaterMark,P=D.readableHighWaterMark,L=this.objectMode?16:16384;this.highWaterMark=Q||Q===0?Q:T&&(P||P===0)?P:L,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(u||(u=g("string_decoder/").StringDecoder),this.decoder=new u(D.encoding),this.encoding=D.encoding)}function R(D){if(l=l||g("./_stream_duplex"),!(this instanceof R))return new R(D);this._readableState=new Y(D,this),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),d.call(this)}function X(D,F,T,Q,P){var L,E=D._readableState;return F===null?(E.reading=!1,function(J,k){if(!k.ended){if(k.decoder){var j=k.decoder.end();j&&j.length&&(k.buffer.push(j),k.length+=k.objectMode?1:j.length)}k.ended=!0,z(J)}}(D,E)):(P||(L=function(J,k){var j;q=k,o.isBuffer(q)||q instanceof c||typeof k=="string"||k===void 0||J.objectMode||(j=new TypeError("Invalid non-string/buffer chunk"));var q;return j}(E,F)),L?D.emit("error",L):E.objectMode||F&&F.length>0?(typeof F=="string"||E.objectMode||Object.getPrototypeOf(F)===o.prototype||(F=function(J){return o.from(J)}(F)),Q?E.endEmitted?D.emit("error",new Error("stream.unshift() after end event")):H(D,E,F,!0):E.ended?D.emit("error",new Error("stream.push() after EOF")):(E.reading=!1,E.decoder&&!T?(F=E.decoder.write(F),E.objectMode||F.length!==0?H(D,E,F,!1):K(D,E)):H(D,E,F,!1))):Q||(E.reading=!1)),function(J){return!J.ended&&(J.needReadable||J.length<J.highWaterMark||J.length===0)}(E)}function H(D,F,T,Q){F.flowing&&F.length===0&&!F.sync?(D.emit("data",T),D.read(0)):(F.length+=F.objectMode?1:T.length,Q?F.buffer.unshift(T):F.buffer.push(T),F.needReadable&&z(D)),K(D,F)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),R.prototype.destroy=Z.destroy,R.prototype._undestroy=Z.undestroy,R.prototype._destroy=function(D,F){this.push(null),F(D)},R.prototype.push=function(D,F){var T,Q=this._readableState;return Q.objectMode?T=!0:typeof D=="string"&&((F=F||Q.defaultEncoding)!==Q.encoding&&(D=o.from(D,F),F=""),T=!0),X(this,D,F,!1,T)},R.prototype.unshift=function(D){return X(this,D,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(D){return u||(u=g("string_decoder/").StringDecoder),this._readableState.decoder=new u(D),this._readableState.encoding=D,this};function S(D,F){return D<=0||F.length===0&&F.ended?0:F.objectMode?1:D!=D?F.flowing&&F.length?F.buffer.head.data.length:F.length:(D>F.highWaterMark&&(F.highWaterMark=function(T){return T>=8388608?T=8388608:(T--,T|=T>>>1,T|=T>>>2,T|=T>>>4,T|=T>>>8,T|=T>>>16,T++),T}(D)),D<=F.length?D:F.ended?F.length:(F.needReadable=!0,0))}function z(D){var F=D._readableState;F.needReadable=!1,F.emittedReadable||(b("emitReadable",F.flowing),F.emittedReadable=!0,F.sync?s.nextTick(v,D):v(D))}function v(D){b("emit readable"),D.emit("readable"),G(D)}function K(D,F){F.readingMore||(F.readingMore=!0,s.nextTick(V,D,F))}function V(D,F){for(var T=F.length;!F.reading&&!F.flowing&&!F.ended&&F.length<F.highWaterMark&&(b("maybeReadMore read 0"),D.read(0),T!==F.length);)T=F.length;F.readingMore=!1}function N(D){b("readable nexttick read 0"),D.read(0)}function B(D,F){F.reading||(b("resume read 0"),D.read(0)),F.resumeScheduled=!1,F.awaitDrain=0,D.emit("resume"),G(D),F.flowing&&!F.reading&&D.read(0)}function G(D){var F=D._readableState;for(b("flow",F.flowing);F.flowing&&D.read()!==null;);}function w(D,F){return F.length===0?null:(F.objectMode?T=F.buffer.shift():!D||D>=F.length?(T=F.decoder?F.buffer.join(""):F.buffer.length===1?F.buffer.head.data:F.buffer.concat(F.length),F.buffer.clear()):T=function(Q,P,L){var E;return Q<P.head.data.length?(E=P.head.data.slice(0,Q),P.head.data=P.head.data.slice(Q)):E=Q===P.head.data.length?P.shift():L?function(J,k){var j=k.head,q=1,tg=j.data;for(J-=tg.length;j=j.next;){var Cg=j.data,x=J>Cg.length?Cg.length:J;if(x===Cg.length?tg+=Cg:tg+=Cg.slice(0,J),(J-=x)===0){x===Cg.length?(++q,j.next?k.head=j.next:k.head=k.tail=null):(k.head=j,j.data=Cg.slice(x));break}++q}return k.length-=q,tg}(Q,P):function(J,k){var j=o.allocUnsafe(J),q=k.head,tg=1;for(q.data.copy(j),J-=q.data.length;q=q.next;){var Cg=q.data,x=J>Cg.length?Cg.length:J;if(Cg.copy(j,j.length-J,0,x),(J-=x)===0){x===Cg.length?(++tg,q.next?k.head=q.next:k.head=k.tail=null):(k.head=q,q.data=Cg.slice(x));break}++tg}return k.length-=tg,j}(Q,P),E}(D,F.buffer,F.decoder),T);var T}function W(D){var F=D._readableState;if(F.length>0)throw new Error('"endReadable()" called on non-empty stream');F.endEmitted||(F.ended=!0,s.nextTick(y,F,D))}function y(D,F){D.endEmitted||D.length!==0||(D.endEmitted=!0,F.readable=!1,F.emit("end"))}function f(D,F){for(var T=0,Q=D.length;T<Q;T++)if(D[T]===F)return T;return-1}R.prototype.read=function(D){b("read",D),D=parseInt(D,10);var F=this._readableState,T=D;if(D!==0&&(F.emittedReadable=!1),D===0&&F.needReadable&&(F.length>=F.highWaterMark||F.ended))return b("read: emitReadable",F.length,F.ended),F.length===0&&F.ended?W(this):z(this),null;if((D=S(D,F))===0&&F.ended)return F.length===0&&W(this),null;var Q,P=F.needReadable;return b("need readable",P),(F.length===0||F.length-D<F.highWaterMark)&&b("length less than watermark",P=!0),F.ended||F.reading?b("reading or ended",P=!1):P&&(b("do read"),F.reading=!0,F.sync=!0,F.length===0&&(F.needReadable=!0),this._read(F.highWaterMark),F.sync=!1,F.reading||(D=S(T,F))),(Q=D>0?w(D,F):null)===null?(F.needReadable=!0,D=0):F.length-=D,F.length===0&&(F.ended||(F.needReadable=!0),T!==D&&F.ended&&W(this)),Q!==null&&this.emit("data",Q),Q},R.prototype._read=function(D){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(D,F){var T=this,Q=this._readableState;switch(Q.pipesCount){case 0:Q.pipes=D;break;case 1:Q.pipes=[Q.pipes,D];break;default:Q.pipes.push(D)}Q.pipesCount+=1,b("pipe count=%d opts=%j",Q.pipesCount,F);var P=(!F||F.end!==!1)&&D!==e.stdout&&D!==e.stderr?E:sg;function L(Ag,O){b("onunpipe"),Ag===T&&O&&O.hasUnpiped===!1&&(O.hasUnpiped=!0,b("cleanup"),D.removeListener("close",Cg),D.removeListener("finish",x),D.removeListener("drain",J),D.removeListener("error",tg),D.removeListener("unpipe",L),T.removeListener("end",E),T.removeListener("end",sg),T.removeListener("data",q),k=!0,!Q.awaitDrain||D._writableState&&!D._writableState.needDrain||J())}function E(){b("onend"),D.end()}Q.endEmitted?s.nextTick(P):T.once("end",P),D.on("unpipe",L);var J=function(Ag){return function(){var O=Ag._readableState;b("pipeOnDrain",O.awaitDrain),O.awaitDrain&&O.awaitDrain--,O.awaitDrain===0&&a(Ag,"data")&&(O.flowing=!0,G(Ag))}}(T);D.on("drain",J);var k=!1,j=!1;function q(Ag){b("ondata"),j=!1,D.write(Ag)!==!1||j||((Q.pipesCount===1&&Q.pipes===D||Q.pipesCount>1&&f(Q.pipes,D)!==-1)&&!k&&(b("false write response, pause",Q.awaitDrain),Q.awaitDrain++,j=!0),T.pause())}function tg(Ag){b("onerror",Ag),sg(),D.removeListener("error",tg),a(D,"error")===0&&D.emit("error",Ag)}function Cg(){D.removeListener("finish",x),sg()}function x(){b("onfinish"),D.removeListener("close",Cg),sg()}function sg(){b("unpipe"),T.unpipe(D)}return T.on("data",q),function(Ag,O,_){if(typeof Ag.prependListener=="function")return Ag.prependListener(O,_);Ag._events&&Ag._events[O]?n(Ag._events[O])?Ag._events[O].unshift(_):Ag._events[O]=[_,Ag._events[O]]:Ag.on(O,_)}(D,"error",tg),D.once("close",Cg),D.once("finish",x),D.emit("pipe",T),Q.flowing||(b("pipe resume"),T.resume()),D},R.prototype.unpipe=function(D){var F=this._readableState,T={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1)return D&&D!==F.pipes||(D||(D=F.pipes),F.pipes=null,F.pipesCount=0,F.flowing=!1,D&&D.emit("unpipe",this,T)),this;if(!D){var Q=F.pipes,P=F.pipesCount;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var L=0;L<P;L++)Q[L].emit("unpipe",this,{hasUnpiped:!1});return this}var E=f(F.pipes,D);return E===-1||(F.pipes.splice(E,1),F.pipesCount-=1,F.pipesCount===1&&(F.pipes=F.pipes[0]),D.emit("unpipe",this,T)),this},R.prototype.on=function(D,F){var T=d.prototype.on.call(this,D,F);if(D==="data")this._readableState.flowing!==!1&&this.resume();else if(D==="readable"){var Q=this._readableState;Q.endEmitted||Q.readableListening||(Q.readableListening=Q.needReadable=!0,Q.emittedReadable=!1,Q.reading?Q.length&&z(this):s.nextTick(N,this))}return T},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var D=this._readableState;return D.flowing||(b("resume"),D.flowing=!0,function(F,T){T.resumeScheduled||(T.resumeScheduled=!0,s.nextTick(B,F,T))}(this,D)),this},R.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(D){var F=this,T=this._readableState,Q=!1;for(var P in D.on("end",function(){if(b("wrapped end"),T.decoder&&!T.ended){var E=T.decoder.end();E&&E.length&&F.push(E)}F.push(null)}),D.on("data",function(E){b("wrapped data"),T.decoder&&(E=T.decoder.write(E)),T.objectMode&&E==null||(T.objectMode||E&&E.length)&&(F.push(E)||(Q=!0,D.pause()))}),D)this[P]===void 0&&typeof D[P]=="function"&&(this[P]=function(E){return function(){return D[E].apply(D,arguments)}}(P));for(var L=0;L<p.length;L++)D.on(p[L],this.emit.bind(this,p[L]));return this._read=function(E){b("wrapped _read",E),Q&&(Q=!1,D.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=w}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{"./_stream_duplex":508,"./internal/streams/BufferList":513,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,events:422,inherits:440,isarray:506,"process-nextick-args":466,"safe-buffer":520,"string_decoder/":521,util:188}],511:[function(g,C,i){C.exports=l;var e=g("./_stream_duplex"),A=Object.create(g("core-util-is"));function s(d,o){var c=this._transformState;c.transforming=!1;var r=c.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,o!=null&&this.push(o),r(d);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function l(d){if(!(this instanceof l))return new l(d);e.call(this,d),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",n)}function n(){var d=this;typeof this._flush=="function"?this._flush(function(o,c){a(d,o,c)}):a(this,null,null)}function a(d,o,c){if(o)return d.emit("error",o);if(c!=null&&d.push(c),d._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(d._transformState.transforming)throw new Error("Calling transform done when still transforming");return d.push(null)}A.inherits=g("inherits"),A.inherits(l,e),l.prototype.push=function(d,o){return this._transformState.needTransform=!1,e.prototype.push.call(this,d,o)},l.prototype._transform=function(d,o,c){throw new Error("_transform() is not implemented")},l.prototype._write=function(d,o,c){var r=this._transformState;if(r.writecb=c,r.writechunk=d,r.writeencoding=o,!r.transforming){var h=this._readableState;(r.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},l.prototype._read=function(d){var o=this._transformState;o.writechunk!==null&&o.writecb&&!o.transforming?(o.transforming=!0,this._transform(o.writechunk,o.writeencoding,o.afterTransform)):o.needTransform=!0},l.prototype._destroy=function(d,o){var c=this;e.prototype._destroy.call(this,d,function(r){o(r),c.emit("close")})}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(g,C,i){(function(e,A,s){(function(){var l=g("process-nextick-args");function n(K){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(N,B,G){var w=N.entry;for(N.entry=null;w;){var W=w.callback;B.pendingcb--,W(G),w=w.next}B.corkedRequestsFree.next=N})(V,K)}}C.exports=Y;var a,d=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?s:l.nextTick;Y.WritableState=p;var o=Object.create(g("core-util-is"));o.inherits=g("inherits");var c={deprecate:g("util-deprecate")},r=g("./internal/streams/stream"),h=g("safe-buffer").Buffer,b=(A!==void 0?A:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},u,m=g("./internal/streams/destroy");function Z(){}function p(K,V){a=a||g("./_stream_duplex"),K=K||{};var N=V instanceof a;this.objectMode=!!K.objectMode,N&&(this.objectMode=this.objectMode||!!K.writableObjectMode);var B=K.highWaterMark,G=K.writableHighWaterMark,w=this.objectMode?16:16384;this.highWaterMark=B||B===0?B:N&&(G||G===0)?G:w,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=K.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=K.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(y){(function(f,D){var F=f._writableState,T=F.sync,Q=F.writecb;if(function(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}(F),D)(function(L,E,J,k,j){--E.pendingcb,J?(l.nextTick(j,k),l.nextTick(v,L,E),L._writableState.errorEmitted=!0,L.emit("error",k)):(j(k),L._writableState.errorEmitted=!0,L.emit("error",k),v(L,E))})(f,F,T,D,Q);else{var P=S(F);P||F.corked||F.bufferProcessing||!F.bufferedRequest||H(f,F),T?d(X,f,F,P,Q):X(f,F,P,Q)}})(V,y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function Y(K){if(a=a||g("./_stream_duplex"),!(u.call(Y,this)||this instanceof a))return new Y(K);this._writableState=new p(K,this),this.writable=!0,K&&(typeof K.write=="function"&&(this._write=K.write),typeof K.writev=="function"&&(this._writev=K.writev),typeof K.destroy=="function"&&(this._destroy=K.destroy),typeof K.final=="function"&&(this._final=K.final)),r.call(this)}function R(K,V,N,B,G,w,W){V.writelen=B,V.writecb=W,V.writing=!0,V.sync=!0,N?K._writev(G,V.onwrite):K._write(G,w,V.onwrite),V.sync=!1}function X(K,V,N,B){N||function(G,w){w.length===0&&w.needDrain&&(w.needDrain=!1,G.emit("drain"))}(K,V),V.pendingcb--,B(),v(K,V)}function H(K,V){V.bufferProcessing=!0;var N=V.bufferedRequest;if(K._writev&&N&&N.next){var B=V.bufferedRequestCount,G=new Array(B),w=V.corkedRequestsFree;w.entry=N;for(var W=0,y=!0;N;)G[W]=N,N.isBuf||(y=!1),N=N.next,W+=1;G.allBuffers=y,R(K,V,!0,V.length,G,"",w.finish),V.pendingcb++,V.lastBufferedRequest=null,w.next?(V.corkedRequestsFree=w.next,w.next=null):V.corkedRequestsFree=new n(V),V.bufferedRequestCount=0}else{for(;N;){var f=N.chunk,D=N.encoding,F=N.callback;if(R(K,V,!1,V.objectMode?1:f.length,f,D,F),N=N.next,V.bufferedRequestCount--,V.writing)break}N===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=N,V.bufferProcessing=!1}function S(K){return K.ending&&K.length===0&&K.bufferedRequest===null&&!K.finished&&!K.writing}function z(K,V){K._final(function(N){V.pendingcb--,N&&K.emit("error",N),V.prefinished=!0,K.emit("prefinish"),v(K,V)})}function v(K,V){var N=S(V);return N&&(function(B,G){G.prefinished||G.finalCalled||(typeof B._final=="function"?(G.pendingcb++,G.finalCalled=!0,l.nextTick(z,B,G)):(G.prefinished=!0,B.emit("prefinish")))}(K,V),V.pendingcb===0&&(V.finished=!0,K.emit("finish"))),N}o.inherits(Y,r),p.prototype.getBuffer=function(){for(var K=this.bufferedRequest,V=[];K;)V.push(K),K=K.next;return V},function(){try{Object.defineProperty(p.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(K){return!!u.call(this,K)||this===Y&&K&&K._writableState instanceof p}})):u=function(K){return K instanceof this},Y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Y.prototype.write=function(K,V,N){var B,G=this._writableState,w=!1,W=!G.objectMode&&(B=K,h.isBuffer(B)||B instanceof b);return W&&!h.isBuffer(K)&&(K=function(y){return h.from(y)}(K)),typeof V=="function"&&(N=V,V=null),W?V="buffer":V||(V=G.defaultEncoding),typeof N!="function"&&(N=Z),G.ended?function(y,f){var D=new Error("write after end");y.emit("error",D),l.nextTick(f,D)}(this,N):(W||function(y,f,D,F){var T=!0,Q=!1;return D===null?Q=new TypeError("May not write null values to stream"):typeof D=="string"||D===void 0||f.objectMode||(Q=new TypeError("Invalid non-string/buffer chunk")),Q&&(y.emit("error",Q),l.nextTick(F,Q),T=!1),T}(this,G,K,N))&&(G.pendingcb++,w=function(y,f,D,F,T,Q){if(!D){var P=function(k,j,q){return k.objectMode||k.decodeStrings===!1||typeof j!="string"||(j=h.from(j,q)),j}(f,F,T);F!==P&&(D=!0,T="buffer",F=P)}var L=f.objectMode?1:F.length;f.length+=L;var E=f.length<f.highWaterMark;if(E||(f.needDrain=!0),f.writing||f.corked){var J=f.lastBufferedRequest;f.lastBufferedRequest={chunk:F,encoding:T,isBuf:D,callback:Q,next:null},J?J.next=f.lastBufferedRequest:f.bufferedRequest=f.lastBufferedRequest,f.bufferedRequestCount+=1}else R(y,f,!1,L,F,T,Q);return E}(this,G,W,K,V,N)),w},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var K=this._writableState;K.corked&&(K.corked--,K.writing||K.corked||K.bufferProcessing||!K.bufferedRequest||H(this,K))},Y.prototype.setDefaultEncoding=function(K){if(typeof K=="string"&&(K=K.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((K+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+K);return this._writableState.defaultEncoding=K,this},Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Y.prototype._write=function(K,V,N){N(new Error("_write() is not implemented"))},Y.prototype._writev=null,Y.prototype.end=function(K,V,N){var B=this._writableState;typeof K=="function"?(N=K,K=null,V=null):typeof V=="function"&&(N=V,V=null),K!=null&&this.write(K,V),B.corked&&(B.corked=1,this.uncork()),B.ending||function(G,w,W){w.ending=!0,v(G,w),W&&(w.finished?l.nextTick(W):G.once("finish",W)),w.ended=!0,G.writable=!1}(this,B,N)},Object.defineProperty(Y.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(K){this._writableState&&(this._writableState.destroyed=K)}}),Y.prototype.destroy=m.destroy,Y.prototype._undestroy=m.undestroy,Y.prototype._destroy=function(K,V){this.end(),V(K)}}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{},g("timers").setImmediate)},{"./_stream_duplex":508,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,inherits:440,"process-nextick-args":466,"safe-buffer":520,timers:523,"util-deprecate":524}],513:[function(g,C,i){var e=g("safe-buffer").Buffer,A=g("util");C.exports=function(){function s(){(function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(l){var n={data:l,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},s.prototype.unshift=function(l){var n={data:l,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},s.prototype.shift=function(){if(this.length!==0){var l=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(l){if(this.length===0)return"";for(var n=this.head,a=""+n.data;n=n.next;)a+=l+n.data;return a},s.prototype.concat=function(l){if(this.length===0)return e.alloc(0);for(var n,a,d,o=e.allocUnsafe(l>>>0),c=this.head,r=0;c;)n=c.data,a=o,d=r,n.copy(a,d),r+=c.data.length,c=c.next;return o},s}(),A&&A.inspect&&A.inspect.custom&&(C.exports.prototype[A.inspect.custom]=function(){var s=A.inspect({length:this.length});return this.constructor.name+" "+s})},{"safe-buffer":520,util:188}],514:[function(g,C,i){var e=g("process-nextick-args");function A(s,l){s.emit("error",l)}C.exports={destroy:function(s,l){var n=this,a=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return a||d?(l?l(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(A,this,s)):e.nextTick(A,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(o){!l&&o?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,e.nextTick(A,n,o)):e.nextTick(A,n,o):l&&l(o)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":466}],515:[function(g,C,i){arguments[4][490][0].apply(i,arguments)},{dup:490,events:422}],516:[function(g,C,i){C.exports=g("./readable").PassThrough},{"./readable":517}],517:[function(g,C,i){(i=C.exports=g("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=g("./lib/_stream_writable.js"),i.Duplex=g("./lib/_stream_duplex.js"),i.Transform=g("./lib/_stream_transform.js"),i.PassThrough=g("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(g,C,i){C.exports=g("./readable").Transform},{"./readable":517}],519:[function(g,C,i){C.exports=g("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(g,C,i){arguments[4][217][0].apply(i,arguments)},{buffer:220,dup:217}],521:[function(g,C,i){arguments[4][218][0].apply(i,arguments)},{dup:218,"safe-buffer":520}],522:[function(g,C,i){arguments[4][218][0].apply(i,arguments)},{dup:218,"safe-buffer":494}],523:[function(g,C,i){(function(e,A){(function(){var s=g("process/browser.js").nextTick,l=Function.prototype.apply,n=Array.prototype.slice,a={},d=0;function o(c,r){this._id=c,this._clearFn=r}i.setTimeout=function(){return new o(l.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new o(l.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(c){c.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(c,r){clearTimeout(c._idleTimeoutId),c._idleTimeout=r},i.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},i._unrefActive=i.active=function(c){clearTimeout(c._idleTimeoutId);var r=c._idleTimeout;r>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},r))},i.setImmediate=typeof e=="function"?e:function(c){var r=d++,h=!(arguments.length<2)&&n.call(arguments,1);return a[r]=!0,s(function(){a[r]&&(h?c.apply(null,h):c.call(null),i.clearImmediate(r))}),r},i.clearImmediate=typeof A=="function"?A:function(c){delete a[c]}}).call(this)}).call(this,g("timers").setImmediate,g("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(g,C,i){(function(e){(function(){function A(s){try{if(!e.localStorage)return!1}catch{return!1}var l=e.localStorage[s];return l!=null&&String(l).toLowerCase()==="true"}C.exports=function(s,l){if(A("noDeprecation"))return s;var n=!1;return function(){if(!n){if(A("throwDeprecation"))throw new Error(l);A("traceDeprecation")?console.trace(l):console.warn(l),n=!0}return s.apply(this,arguments)}}}).call(this)}).call(this,typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(g,C,i){typeof Object.create=="function"?C.exports=function(e,A){e.super_=A,e.prototype=Object.create(A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:C.exports=function(e,A){e.super_=A;var s=function(){};s.prototype=A.prototype,e.prototype=new s,e.prototype.constructor=e}},{}],526:[function(g,C,i){C.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}},{}],527:[function(g,C,i){(function(e,A){(function(){var s=/%[sdj%]/g;i.format=function(G){if(!p(G)){for(var w=[],W=0;W<arguments.length;W++)w.push(a(arguments[W]));return w.join(" ")}W=1;for(var y=arguments,f=y.length,D=String(G).replace(s,function(T){if(T==="%%")return"%";if(W>=f)return T;switch(T){case"%s":return String(y[W++]);case"%d":return Number(y[W++]);case"%j":try{return JSON.stringify(y[W++])}catch{return"[Circular]"}default:return T}}),F=y[W];W<f;F=y[++W])m(F)||!X(F)?D+=" "+F:D+=" "+a(F);return D},i.deprecate=function(G,w){if(Y(A.process))return function(){return i.deprecate(G,w).apply(this,arguments)};if(e.noDeprecation===!0)return G;var W=!1;return function(){if(!W){if(e.throwDeprecation)throw new Error(w);e.traceDeprecation?console.trace(w):console.error(w),W=!0}return G.apply(this,arguments)}};var l,n={};function a(G,w){var W={seen:[],stylize:o};return arguments.length>=3&&(W.depth=arguments[2]),arguments.length>=4&&(W.colors=arguments[3]),u(w)?W.showHidden=w:w&&i._extend(W,w),Y(W.showHidden)&&(W.showHidden=!1),Y(W.depth)&&(W.depth=2),Y(W.colors)&&(W.colors=!1),Y(W.customInspect)&&(W.customInspect=!0),W.colors&&(W.stylize=d),c(W,G,W.depth)}function d(G,w){var W=a.styles[w];return W?"\x1B["+a.colors[W][0]+"m"+G+"\x1B["+a.colors[W][1]+"m":G}function o(G,w){return G}function c(G,w,W){if(G.customInspect&&w&&z(w.inspect)&&w.inspect!==i.inspect&&(!w.constructor||w.constructor.prototype!==w)){var y=w.inspect(W,G);return p(y)||(y=c(G,y,W)),y}var f=function(J,k){if(Y(k))return J.stylize("undefined","undefined");if(p(k)){var j="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return J.stylize(j,"string")}if(Z(k))return J.stylize(""+k,"number");if(u(k))return J.stylize(""+k,"boolean");if(m(k))return J.stylize("null","null")}(G,w);if(f)return f;var D=Object.keys(w),F=function(J){var k={};return J.forEach(function(j,q){k[j]=!0}),k}(D);if(G.showHidden&&(D=Object.getOwnPropertyNames(w)),S(w)&&(D.indexOf("message")>=0||D.indexOf("description")>=0))return r(w);if(D.length===0){if(z(w)){var T=w.name?": "+w.name:"";return G.stylize("[Function"+T+"]","special")}if(R(w))return G.stylize(RegExp.prototype.toString.call(w),"regexp");if(H(w))return G.stylize(Date.prototype.toString.call(w),"date");if(S(w))return r(w)}var Q,P="",L=!1,E=["{","}"];return b(w)&&(L=!0,E=["[","]"]),z(w)&&(P=" [Function"+(w.name?": "+w.name:"")+"]"),R(w)&&(P=" "+RegExp.prototype.toString.call(w)),H(w)&&(P=" "+Date.prototype.toUTCString.call(w)),S(w)&&(P=" "+r(w)),D.length!==0||L&&w.length!=0?W<0?R(w)?G.stylize(RegExp.prototype.toString.call(w),"regexp"):G.stylize("[Object]","special"):(G.seen.push(w),Q=L?function(J,k,j,q,tg){for(var Cg=[],x=0,sg=k.length;x<sg;++x)B(k,String(x))?Cg.push(h(J,k,j,q,String(x),!0)):Cg.push("");return tg.forEach(function(Ag){Ag.match(/^\d+$/)||Cg.push(h(J,k,j,q,Ag,!0))}),Cg}(G,w,W,F,D):D.map(function(J){return h(G,w,W,F,J,L)}),G.seen.pop(),function(J,k,j){return J.reduce(function(q,tg){return tg.indexOf(`
`)>=0,q+tg.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?j[0]+(k===""?"":k+`
 `)+" "+J.join(`,
  `)+" "+j[1]:j[0]+k+" "+J.join(", ")+" "+j[1]}(Q,P,E)):E[0]+P+E[1]}function r(G){return"["+Error.prototype.toString.call(G)+"]"}function h(G,w,W,y,f,D){var F,T,Q;if((Q=Object.getOwnPropertyDescriptor(w,f)||{value:w[f]}).get?T=Q.set?G.stylize("[Getter/Setter]","special"):G.stylize("[Getter]","special"):Q.set&&(T=G.stylize("[Setter]","special")),B(y,f)||(F="["+f+"]"),T||(G.seen.indexOf(Q.value)<0?(T=m(W)?c(G,Q.value,null):c(G,Q.value,W-1)).indexOf(`
`)>-1&&(T=D?T.split(`
`).map(function(P){return"  "+P}).join(`
`).substr(2):`
`+T.split(`
`).map(function(P){return"   "+P}).join(`
`)):T=G.stylize("[Circular]","special")),Y(F)){if(D&&f.match(/^\d+$/))return T;(F=JSON.stringify(""+f)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(F=F.substr(1,F.length-2),F=G.stylize(F,"name")):(F=F.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),F=G.stylize(F,"string"))}return F+": "+T}function b(G){return Array.isArray(G)}function u(G){return typeof G=="boolean"}function m(G){return G===null}function Z(G){return typeof G=="number"}function p(G){return typeof G=="string"}function Y(G){return G===void 0}function R(G){return X(G)&&v(G)==="[object RegExp]"}function X(G){return typeof G=="object"&&G!==null}function H(G){return X(G)&&v(G)==="[object Date]"}function S(G){return X(G)&&(v(G)==="[object Error]"||G instanceof Error)}function z(G){return typeof G=="function"}function v(G){return Object.prototype.toString.call(G)}function K(G){return G<10?"0"+G.toString(10):G.toString(10)}i.debuglog=function(G){if(Y(l)&&(l=e.env.NODE_DEBUG||""),G=G.toUpperCase(),!n[G])if(new RegExp("\\b"+G+"\\b","i").test(l)){var w=e.pid;n[G]=function(){var W=i.format.apply(i,arguments);console.error("%s %d: %s",G,w,W)}}else n[G]=function(){};return n[G]},i.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},i.isArray=b,i.isBoolean=u,i.isNull=m,i.isNullOrUndefined=function(G){return G==null},i.isNumber=Z,i.isString=p,i.isSymbol=function(G){return typeof G=="symbol"},i.isUndefined=Y,i.isRegExp=R,i.isObject=X,i.isDate=H,i.isError=S,i.isFunction=z,i.isPrimitive=function(G){return G===null||typeof G=="boolean"||typeof G=="number"||typeof G=="string"||typeof G=="symbol"||G===void 0},i.isBuffer=g("./support/isBuffer");var V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var G=new Date,w=[K(G.getHours()),K(G.getMinutes()),K(G.getSeconds())].join(":");return[G.getDate(),V[G.getMonth()],w].join(" ")}function B(G,w){return Object.prototype.hasOwnProperty.call(G,w)}i.log=function(){console.log("%s - %s",N(),i.format.apply(i,arguments))},i.inherits=g("inherits"),i._extend=function(G,w){if(!w||!X(w))return G;for(var W=Object.keys(w),y=W.length;y--;)G[W[y]]=w[W[y]];return G}}).call(this)}).call(this,g("_process"),typeof FI<"u"?FI:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(i,"v3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(i,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(i,"v5",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(i,"NIL",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(i,"version",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(i,"validate",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(i,"parse",{enumerable:!0,get:function(){return c.default}});var e=r(g("./v1.js")),A=r(g("./v3.js")),s=r(g("./v4.js")),l=r(g("./v5.js")),n=r(g("./nil.js")),a=r(g("./version.js")),d=r(g("./validate.js")),o=r(g("./stringify.js")),c=r(g("./parse.js"));function r(h){return h&&h.__esModule?h:{default:h}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(g,C,i){function e(c){return 14+(c+64>>>9<<4)+1}function A(c,r){const h=(65535&c)+(65535&r);return(c>>16)+(r>>16)+(h>>16)<<16|65535&h}function s(c,r,h,b,u,m){return A((Z=A(A(r,c),A(b,m)))<<(p=u)|Z>>>32-p,h);var Z,p}function l(c,r,h,b,u,m,Z){return s(r&h|~r&b,c,r,u,m,Z)}function n(c,r,h,b,u,m,Z){return s(r&b|h&~b,c,r,u,m,Z)}function a(c,r,h,b,u,m,Z){return s(r^h^b,c,r,u,m,Z)}function d(c,r,h,b,u,m,Z){return s(h^(r|~b),c,r,u,m,Z)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var o=function(c){if(typeof c=="string"){const r=unescape(encodeURIComponent(c));c=new Uint8Array(r.length);for(let h=0;h<r.length;++h)c[h]=r.charCodeAt(h)}return function(r){const h=[],b=32*r.length;for(let u=0;u<b;u+=8){const m=r[u>>5]>>>u%32&255,Z=parseInt("0123456789abcdef".charAt(m>>>4&15)+"0123456789abcdef".charAt(15&m),16);h.push(Z)}return h}(function(r,h){r[h>>5]|=128<<h%32,r[e(h)-1]=h;let b=1732584193,u=-271733879,m=-1732584194,Z=271733878;for(let p=0;p<r.length;p+=16){const Y=b,R=u,X=m,H=Z;b=l(b,u,m,Z,r[p],7,-680876936),Z=l(Z,b,u,m,r[p+1],12,-389564586),m=l(m,Z,b,u,r[p+2],17,606105819),u=l(u,m,Z,b,r[p+3],22,-1044525330),b=l(b,u,m,Z,r[p+4],7,-176418897),Z=l(Z,b,u,m,r[p+5],12,1200080426),m=l(m,Z,b,u,r[p+6],17,-1473231341),u=l(u,m,Z,b,r[p+7],22,-45705983),b=l(b,u,m,Z,r[p+8],7,1770035416),Z=l(Z,b,u,m,r[p+9],12,-1958414417),m=l(m,Z,b,u,r[p+10],17,-42063),u=l(u,m,Z,b,r[p+11],22,-1990404162),b=l(b,u,m,Z,r[p+12],7,1804603682),Z=l(Z,b,u,m,r[p+13],12,-40341101),m=l(m,Z,b,u,r[p+14],17,-1502002290),u=l(u,m,Z,b,r[p+15],22,1236535329),b=n(b,u,m,Z,r[p+1],5,-165796510),Z=n(Z,b,u,m,r[p+6],9,-1069501632),m=n(m,Z,b,u,r[p+11],14,643717713),u=n(u,m,Z,b,r[p],20,-373897302),b=n(b,u,m,Z,r[p+5],5,-701558691),Z=n(Z,b,u,m,r[p+10],9,38016083),m=n(m,Z,b,u,r[p+15],14,-660478335),u=n(u,m,Z,b,r[p+4],20,-405537848),b=n(b,u,m,Z,r[p+9],5,568446438),Z=n(Z,b,u,m,r[p+14],9,-1019803690),m=n(m,Z,b,u,r[p+3],14,-187363961),u=n(u,m,Z,b,r[p+8],20,1163531501),b=n(b,u,m,Z,r[p+13],5,-1444681467),Z=n(Z,b,u,m,r[p+2],9,-51403784),m=n(m,Z,b,u,r[p+7],14,1735328473),u=n(u,m,Z,b,r[p+12],20,-1926607734),b=a(b,u,m,Z,r[p+5],4,-378558),Z=a(Z,b,u,m,r[p+8],11,-2022574463),m=a(m,Z,b,u,r[p+11],16,1839030562),u=a(u,m,Z,b,r[p+14],23,-35309556),b=a(b,u,m,Z,r[p+1],4,-1530992060),Z=a(Z,b,u,m,r[p+4],11,1272893353),m=a(m,Z,b,u,r[p+7],16,-155497632),u=a(u,m,Z,b,r[p+10],23,-1094730640),b=a(b,u,m,Z,r[p+13],4,681279174),Z=a(Z,b,u,m,r[p],11,-358537222),m=a(m,Z,b,u,r[p+3],16,-722521979),u=a(u,m,Z,b,r[p+6],23,76029189),b=a(b,u,m,Z,r[p+9],4,-640364487),Z=a(Z,b,u,m,r[p+12],11,-421815835),m=a(m,Z,b,u,r[p+15],16,530742520),u=a(u,m,Z,b,r[p+2],23,-995338651),b=d(b,u,m,Z,r[p],6,-198630844),Z=d(Z,b,u,m,r[p+7],10,1126891415),m=d(m,Z,b,u,r[p+14],15,-1416354905),u=d(u,m,Z,b,r[p+5],21,-57434055),b=d(b,u,m,Z,r[p+12],6,1700485571),Z=d(Z,b,u,m,r[p+3],10,-1894986606),m=d(m,Z,b,u,r[p+10],15,-1051523),u=d(u,m,Z,b,r[p+1],21,-2054922799),b=d(b,u,m,Z,r[p+8],6,1873313359),Z=d(Z,b,u,m,r[p+15],10,-30611744),m=d(m,Z,b,u,r[p+6],15,-1560198380),u=d(u,m,Z,b,r[p+13],21,1309151649),b=d(b,u,m,Z,r[p+4],6,-145523070),Z=d(Z,b,u,m,r[p+11],10,-1120210379),m=d(m,Z,b,u,r[p+2],15,718787259),u=d(u,m,Z,b,r[p+9],21,-343485551),b=A(b,Y),u=A(u,R),m=A(m,X),Z=A(Z,H)}return[b,u,m,Z]}(function(r){if(r.length===0)return[];const h=8*r.length,b=new Uint32Array(e(h));for(let u=0;u<h;u+=8)b[u>>5]|=(255&r[u/8])<<u%32;return b}(c),8*c.length))};i.default=o},{}],530:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,i.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e,A=(e=g("./validate.js"))&&e.__esModule?e:{default:e},s=function(l){if(!(0,A.default)(l))throw TypeError("Invalid UUID");let n;const a=new Uint8Array(16);return a[0]=(n=parseInt(l.slice(0,8),16))>>>24,a[1]=n>>>16&255,a[2]=n>>>8&255,a[3]=255&n,a[4]=(n=parseInt(l.slice(9,13),16))>>>8,a[5]=255&n,a[6]=(n=parseInt(l.slice(14,18),16))>>>8,a[7]=255&n,a[8]=(n=parseInt(l.slice(19,23),16))>>>8,a[9]=255&n,a[10]=(n=parseInt(l.slice(24,36),16))/1099511627776&255,a[11]=n/4294967296&255,a[12]=n>>>24&255,a[13]=n>>>16&255,a[14]=n>>>8&255,a[15]=255&n,a};i.default=s},{"./validate.js":541}],532:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,i.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],533:[function(g,C,i){let e;Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(A)};const A=new Uint8Array(16)},{}],534:[function(g,C,i){function e(l,n,a,d){switch(l){case 0:return n&a^~n&d;case 1:return n^a^d;case 2:return n&a^n&d^a&d;case 3:return n^a^d}}function A(l,n){return l<<n|l>>>32-n}Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var s=function(l){const n=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof l=="string"){const r=unescape(encodeURIComponent(l));l=[];for(let h=0;h<r.length;++h)l.push(r.charCodeAt(h))}else Array.isArray(l)||(l=Array.prototype.slice.call(l));l.push(128);const d=l.length/4+2,o=Math.ceil(d/16),c=new Array(o);for(let r=0;r<o;++r){const h=new Uint32Array(16);for(let b=0;b<16;++b)h[b]=l[64*r+4*b]<<24|l[64*r+4*b+1]<<16|l[64*r+4*b+2]<<8|l[64*r+4*b+3];c[r]=h}c[o-1][14]=8*(l.length-1)/Math.pow(2,32),c[o-1][14]=Math.floor(c[o-1][14]),c[o-1][15]=8*(l.length-1)&4294967295;for(let r=0;r<o;++r){const h=new Uint32Array(80);for(let Y=0;Y<16;++Y)h[Y]=c[r][Y];for(let Y=16;Y<80;++Y)h[Y]=A(h[Y-3]^h[Y-8]^h[Y-14]^h[Y-16],1);let b=a[0],u=a[1],m=a[2],Z=a[3],p=a[4];for(let Y=0;Y<80;++Y){const R=Math.floor(Y/20),X=A(b,5)+e(R,u,m,Z)+p+n[R]+h[Y]>>>0;p=Z,Z=m,m=A(u,30)>>>0,u=b,b=X}a[0]=a[0]+b>>>0,a[1]=a[1]+u>>>0,a[2]=a[2]+m>>>0,a[3]=a[3]+Z>>>0,a[4]=a[4]+p>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]};i.default=s},{}],535:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e,A=(e=g("./validate.js"))&&e.__esModule?e:{default:e};const s=[];for(let n=0;n<256;++n)s.push((n+256).toString(16).substr(1));var l=function(n){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const d=(s[n[a+0]]+s[n[a+1]]+s[n[a+2]]+s[n[a+3]]+"-"+s[n[a+4]]+s[n[a+5]]+"-"+s[n[a+6]]+s[n[a+7]]+"-"+s[n[a+8]]+s[n[a+9]]+"-"+s[n[a+10]]+s[n[a+11]]+s[n[a+12]]+s[n[a+13]]+s[n[a+14]]+s[n[a+15]]).toLowerCase();if(!(0,A.default)(d))throw TypeError("Stringified UUID is invalid");return d};i.default=l},{"./validate.js":541}],536:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=s(g("./rng.js")),A=s(g("./stringify.js"));function s(c){return c&&c.__esModule?c:{default:c}}let l,n,a=0,d=0;var o=function(c,r,h){let b=r&&h||0;const u=r||new Array(16);let m=(c=c||{}).node||l,Z=c.clockseq!==void 0?c.clockseq:n;if(m==null||Z==null){const S=c.random||(c.rng||e.default)();m==null&&(m=l=[1|S[0],S[1],S[2],S[3],S[4],S[5]]),Z==null&&(Z=n=16383&(S[6]<<8|S[7]))}let p=c.msecs!==void 0?c.msecs:Date.now(),Y=c.nsecs!==void 0?c.nsecs:d+1;const R=p-a+(Y-d)/1e4;if(R<0&&c.clockseq===void 0&&(Z=Z+1&16383),(R<0||p>a)&&c.nsecs===void 0&&(Y=0),Y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,d=Y,n=Z,p+=122192928e5;const X=(1e4*(268435455&p)+Y)%4294967296;u[b++]=X>>>24&255,u[b++]=X>>>16&255,u[b++]=X>>>8&255,u[b++]=255&X;const H=p/4294967296*1e4&268435455;u[b++]=H>>>8&255,u[b++]=255&H,u[b++]=H>>>24&15|16,u[b++]=H>>>16&255,u[b++]=Z>>>8|128,u[b++]=255&Z;for(let S=0;S<6;++S)u[b+S]=m[S];return r||(0,A.default)(u)};i.default=o},{"./rng.js":533,"./stringify.js":535}],537:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=s(g("./v35.js")),A=s(g("./md5.js"));function s(n){return n&&n.__esModule?n:{default:n}}var l=(0,e.default)("v3",48,A.default);i.default=l},{"./md5.js":529,"./v35.js":538}],538:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(a,d,o){function c(r,h,b,u){if(typeof r=="string"&&(r=function(Z){Z=unescape(encodeURIComponent(Z));const p=[];for(let Y=0;Y<Z.length;++Y)p.push(Z.charCodeAt(Y));return p}(r)),typeof h=="string"&&(h=(0,A.default)(h)),h.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+r.length);if(m.set(h),m.set(r,h.length),m=o(m),m[6]=15&m[6]|d,m[8]=63&m[8]|128,b){u=u||0;for(let Z=0;Z<16;++Z)b[u+Z]=m[Z];return b}return(0,e.default)(m)}try{c.name=a}catch{}return c.DNS=l,c.URL=n,c},i.URL=i.DNS=void 0;var e=s(g("./stringify.js")),A=s(g("./parse.js"));function s(a){return a&&a.__esModule?a:{default:a}}const l="6ba7b810-9dad-11d1-80b4-00c04fd430c8";i.DNS=l;const n="6ba7b811-9dad-11d1-80b4-00c04fd430c8";i.URL=n},{"./parse.js":531,"./stringify.js":535}],539:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=s(g("./rng.js")),A=s(g("./stringify.js"));function s(n){return n&&n.__esModule?n:{default:n}}var l=function(n,a,d){const o=(n=n||{}).random||(n.rng||e.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,a){d=d||0;for(let c=0;c<16;++c)a[d+c]=o[c];return a}return(0,A.default)(o)};i.default=l},{"./rng.js":533,"./stringify.js":535}],540:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=s(g("./v35.js")),A=s(g("./sha1.js"));function s(n){return n&&n.__esModule?n:{default:n}}var l=(0,e.default)("v5",80,A.default);i.default=l},{"./sha1.js":534,"./v35.js":538}],541:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e,A=(e=g("./regex.js"))&&e.__esModule?e:{default:e},s=function(l){return typeof l=="string"&&A.default.test(l)};i.default=s},{"./regex.js":532}],542:[function(g,C,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e,A=(e=g("./validate.js"))&&e.__esModule?e:{default:e},s=function(l){if(!(0,A.default)(l))throw TypeError("Invalid UUID");return parseInt(l.substr(14,1),16)};i.default=s},{"./validate.js":541}],543:[function(g,C,i){/**
* Character classes and associated utilities for the 5th edition of XML 1.0.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/Object.defineProperty(i,"__esModule",{value:!0}),i.CHAR=`	
\r -퟿-�𐀀-􏿿`,i.S=` 	\r
`,i.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",i.NAME_CHAR="-"+i.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",i.CHAR_RE=new RegExp("^["+i.CHAR+"]$","u"),i.S_RE=new RegExp("^["+i.S+"]+$","u"),i.NAME_START_CHAR_RE=new RegExp("^["+i.NAME_START_CHAR+"]$","u"),i.NAME_CHAR_RE=new RegExp("^["+i.NAME_CHAR+"]$","u"),i.NAME_RE=new RegExp("^["+i.NAME_START_CHAR+"]["+i.NAME_CHAR+"]*$","u"),i.NMTOKEN_RE=new RegExp("^["+i.NAME_CHAR+"]+$","u");function e(A){return A>=65&&A<=90||A>=97&&A<=122||A===58||A===95||A===8204||A===8205||A>=192&&A<=214||A>=216&&A<=246||A>=248&&A<=767||A>=880&&A<=893||A>=895&&A<=8191||A>=8304&&A<=8591||A>=11264&&A<=12271||A>=12289&&A<=55295||A>=63744&&A<=64975||A>=65008&&A<=65533||A>=65536&&A<=983039}i.S_LIST=[32,10,13,9],i.isChar=function(A){return A>=32&&A<=55295||A===10||A===13||A===9||A>=57344&&A<=65533||A>=65536&&A<=1114111},i.isS=function(A){return A===32||A===10||A===13||A===9},i.isNameStartChar=e,i.isNameChar=function(A){return e(A)||A>=48&&A<=57||A===45||A===46||A===183||A>=768&&A<=879||A>=8255&&A<=8256}},{}],544:[function(g,C,i){/**
* Character classes and associated utilities for the 2nd edition of XML 1.1.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/Object.defineProperty(i,"__esModule",{value:!0}),i.CHAR="-퟿-�𐀀-􏿿",i.RESTRICTED_CHAR="-\b\v\f---",i.S=` 	\r
`,i.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",i.NAME_CHAR="-"+i.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",i.CHAR_RE=new RegExp("^["+i.CHAR+"]$","u"),i.RESTRICTED_CHAR_RE=new RegExp("^["+i.RESTRICTED_CHAR+"]$","u"),i.S_RE=new RegExp("^["+i.S+"]+$","u"),i.NAME_START_CHAR_RE=new RegExp("^["+i.NAME_START_CHAR+"]$","u"),i.NAME_CHAR_RE=new RegExp("^["+i.NAME_CHAR+"]$","u"),i.NAME_RE=new RegExp("^["+i.NAME_START_CHAR+"]["+i.NAME_CHAR+"]*$","u"),i.NMTOKEN_RE=new RegExp("^["+i.NAME_CHAR+"]+$","u");function e(A){return A>=65&&A<=90||A>=97&&A<=122||A===58||A===95||A===8204||A===8205||A>=192&&A<=214||A>=216&&A<=246||A>=248&&A<=767||A>=880&&A<=893||A>=895&&A<=8191||A>=8304&&A<=8591||A>=11264&&A<=12271||A>=12289&&A<=55295||A>=63744&&A<=64975||A>=65008&&A<=65533||A>=65536&&A<=983039}i.S_LIST=[32,10,13,9],i.isChar=function(A){return A>=1&&A<=55295||A>=57344&&A<=65533||A>=65536&&A<=1114111},i.isRestrictedChar=function(A){return A>=1&&A<=8||A===11||A===12||A>=14&&A<=31||A>=127&&A<=132||A>=134&&A<=159},i.isCharAndNotRestricted=function(A){return A===9||A===10||A===13||A>31&&A<127||A===133||A>159&&A<=55295||A>=57344&&A<=65533||A>=65536&&A<=1114111},i.isS=function(A){return A===32||A===10||A===13||A===9},i.isNameStartChar=e,i.isNameChar=function(A){return e(A)||A>=48&&A<=57||A===45||A===46||A===183||A>=768&&A<=879||A>=8255&&A<=8256}},{}],545:[function(g,C,i){/**
* Character class utilities for XML NS 1.0 edition 3.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/function e(A){return A>=65&&A<=90||A===95||A>=97&&A<=122||A>=192&&A<=214||A>=216&&A<=246||A>=248&&A<=767||A>=880&&A<=893||A>=895&&A<=8191||A>=8204&&A<=8205||A>=8304&&A<=8591||A>=11264&&A<=12271||A>=12289&&A<=55295||A>=63744&&A<=64975||A>=65008&&A<=65533||A>=65536&&A<=983039}Object.defineProperty(i,"__esModule",{value:!0}),i.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",i.NC_NAME_CHAR="-"+i.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",i.NC_NAME_START_CHAR_RE=new RegExp("^["+i.NC_NAME_START_CHAR+"]$","u"),i.NC_NAME_CHAR_RE=new RegExp("^["+i.NC_NAME_CHAR+"]$","u"),i.NC_NAME_RE=new RegExp("^["+i.NC_NAME_START_CHAR+"]["+i.NC_NAME_CHAR+"]*$","u"),i.isNCNameStartChar=e,i.isNCNameChar=function(A){return e(A)||A===45||A===46||A>=48&&A<=57||A===183||A>=768&&A<=879||A>=8255&&A<=8256}},{}]},{},[15])(15)})}(BX)),BX.exports}var Rbg=Mbg();const fbg=qq(Rbg);class ed{constructor(I,g=""){typeof I=="string"?(this.el=document.createElement(I),this.el.className=g):this.el=I,this.data={}}data(I,g){return g!==void 0?(this.data[I]=g,this):this.data[I]}on(I,g){const[C,...i]=I.split(".");let e=C;return e==="mousewheel"&&/Firefox/i.test(window.navigator.userAgent)&&(e="DOMMouseScroll"),this.el.addEventListener(e,A=>{g(A);for(let s=0;s<i.length;s+=1){const l=i[s];if(l==="left"&&A.button!==0||l==="right"&&A.button!==2)return;l==="stop"&&A.stopPropagation()}}),this}offset(I){if(I!==void 0)return Object.keys(I).forEach(A=>{this.css(A,`${I[A]}px`)}),this;const{offsetTop:g,offsetLeft:C,offsetHeight:i,offsetWidth:e}=this.el;return{top:g,left:C,height:i,width:e}}scroll(I){const{el:g}=this;return I!==void 0&&(I.left!==void 0&&(g.scrollLeft=I.left),I.top!==void 0&&(g.scrollTop=I.top)),{left:g.scrollLeft,top:g.scrollTop}}box(){return this.el.getBoundingClientRect()}parent(){return new ed(this.el.parentNode)}children(...I){return arguments.length===0?this.el.childNodes:(I.forEach(g=>this.child(g)),this)}removeChild(I){this.el.removeChild(I)}child(I){let g=I;return typeof I=="string"?g=document.createTextNode(I):I instanceof ed&&(g=I.el),this.el.appendChild(g),this}contains(I){return this.el.contains(I)}className(I){return I!==void 0?(this.el.className=I,this):this.el.className}addClass(I){return this.el.classList.add(I),this}hasClass(I){return this.el.classList.contains(I)}removeClass(I){return this.el.classList.remove(I),this}toggle(I="active"){return this.toggleClass(I)}toggleClass(I){return this.el.classList.toggle(I)}active(I=!0,g="active"){return I?this.addClass(g):this.removeClass(g),this}checked(I=!0){return this.active(I,"checked"),this}disabled(I=!0){return I?this.addClass("disabled"):this.removeClass("disabled"),this}attr(I,g){if(g!==void 0)this.el.setAttribute(I,g);else{if(typeof I=="string")return this.el.getAttribute(I);Object.keys(I).forEach(C=>{this.el.setAttribute(C,I[C])})}return this}removeAttr(I){return this.el.removeAttribute(I),this}html(I){return I!==void 0?(this.el.innerHTML=I,this):this.el.innerHTML}val(I){return I!==void 0?(this.el.value=I,this):this.el.value}focus(){this.el.focus()}cssRemoveKeys(...I){return I.forEach(g=>this.el.style.removeProperty(g)),this}css(I,g){return g===void 0&&typeof I!="string"?(Object.keys(I).forEach(C=>{this.el.style[C]=I[C]}),this):g!==void 0?(this.el.style[I]=g,this):this.el.style[I]}computedStyle(){return window.getComputedStyle(this.el,null)}show(){return this.css("display","block"),this}hide(){return this.css("display","none"),this}}const Yg=(t,I="")=>new ed(t,I),_n=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Jtg(t){let I="",g=t;for(;g>=_n.length;)g/=_n.length,g-=1,I+=_n[parseInt(g,10)%_n.length];const C=t%_n.length;return I+=_n[C],I}function Hbg(t){let I=0;for(let g=0;g<t.length-1;g+=1){const C=t.charCodeAt(g)-65,i=t.length-1-g;I+=_n.length**i+_n.length*C}return I+=t.charCodeAt(t.length-1)-65,I}function ka(t){let I="",g="";for(let C=0;C<t.length;C+=1)t.charAt(C)>="0"&&t.charAt(C)<="9"?g+=t.charAt(C):I+=t.charAt(C);return[Hbg(I),parseInt(g,10)-1]}function zl(t,I){return`${Jtg(t)}${I+1}`}function fu(t,I,g,C=()=>!0){if(I===0&&g===0)return t;const[i,e]=ka(t);return C(i,e)?zl(i+I,e+g):t}class it{constructor(I,g,C,i,e=0,A=0){this.sri=I,this.sci=g,this.eri=C,this.eci=i,this.w=e,this.h=A}set(I,g,C,i){this.sri=I,this.sci=g,this.eri=C,this.eci=i}multiple(){return this.eri-this.sri>0||this.eci-this.sci>0}includes(...I){let[g,C]=[0,0];I.length===1?[C,g]=ka(I[0]):I.length===2&&([g,C]=I);const{sri:i,sci:e,eri:A,eci:s}=this;return i<=g&&g<=A&&e<=C&&C<=s}each(I,g=()=>!0){const{sri:C,sci:i,eri:e,eci:A}=this;for(let s=C;s<=e;s+=1)if(g(s))for(let l=i;l<=A;l+=1)I(s,l)}contains(I){return this.sri<=I.sri&&this.sci<=I.sci&&this.eri>=I.eri&&this.eci>=I.eci}within(I){return this.sri>=I.sri&&this.sci>=I.sci&&this.eri<=I.eri&&this.eci<=I.eci}disjoint(I){return this.sri>I.eri||this.sci>I.eci||I.sri>this.eri||I.sci>this.eci}intersects(I){return this.sri<=I.eri&&this.sci<=I.eci&&I.sri<=this.eri&&I.sci<=this.eci}union(I){const{sri:g,sci:C,eri:i,eci:e}=this;return new it(I.sri<g?I.sri:g,I.sci<C?I.sci:C,I.eri>i?I.eri:i,I.eci>e?I.eci:e)}difference(I){const g=[],C=(o,c,r,h)=>{g.push(new it(o,c,r,h))},{sri:i,sci:e,eri:A,eci:s}=this,l=I.sri-i,n=I.sci-e,a=A-I.eri,d=s-I.eci;return l>0?(C(i,e,I.sri-1,s),a>0?(C(I.eri+1,e,A,s),n>0&&C(I.sri,e,I.eri,I.sci-1),d>0&&C(I.sri,I.eci+1,I.eri,s)):(n>0&&C(I.sri,e,A,I.sci-1),d>0&&C(I.sri,I.eci+1,A,s))):a>0&&(C(I.eri+1,e,A,s),n>0&&C(i,e,I.eri,I.sci-1),d>0&&C(i,I.eci+1,I.eri,s)),n>0?(C(i,e,A,I.sci-1),d>0?(C(i,I.eri+1,A,s),l>0&&C(i,I.sci,I.sri-1,I.eci),a>0&&C(I.sri+1,I.sci,A,I.eci)):(l>0&&C(i,I.sci,I.sri-1,s),a>0&&C(I.sri+1,I.sci,A,s))):d>0&&(C(A,I.eci+1,A,s),l>0&&C(i,e,I.sri-1,I.eci),a>0&&C(I.eri+1,e,A,I.eci)),g}size(){return[this.eri-this.sri+1,this.eci-this.sci+1]}toString(){const{sri:I,sci:g,eri:C,eci:i}=this;let e=zl(g,I);return this.multiple()&&(e=`${e}:${zl(i,C)}`),e}clone(){const{sri:I,sci:g,eri:C,eci:i,w:e,h:A}=this;return new it(I,g,C,i,e,A)}equals(I){return this.eri===I.eri&&this.eci===I.eci&&this.sri===I.sri&&this.sci===I.sci}static valueOf(I){const g=I.split(":"),[C,i]=ka(g[0]);let[e,A]=[i,C];return g.length>1&&([A,e]=ka(g[1])),new it(i,C,e,A)}}let Xbg=class{constructor(){this.range=new it(0,0,0,0),this.ri=0,this.ci=0}multiple(){return this.range.multiple()}setIndexes(I,g){this.ri=I,this.ci=g}size(){return this.range.size()}};class Sbg{constructor(){this.x=0,this.y=0,this.ri=0,this.ci=0}}class Dbg{constructor(){this.undoItems=[],this.redoItems=[]}add(I){this.undoItems.push(JSON.stringify(I)),this.redoItems=[]}canUndo(){return this.undoItems.length>0}canRedo(){return this.redoItems.length>0}undo(I,g){const{undoItems:C,redoItems:i}=this;this.canUndo()&&(i.push(JSON.stringify(I)),g(JSON.parse(C.pop())))}redo(I,g){const{undoItems:C,redoItems:i}=this;this.canRedo()&&(C.push(JSON.stringify(I)),g(JSON.parse(i.pop())))}}class Kbg{constructor(){this.range=null,this.state="clear"}copy(I){return this.range=I,this.state="copy",this}cut(I){return this.range=I,this.state="cut",this}isCopy(){return this.state==="copy"}isCut(){return this.state==="cut"}isClear(){return this.state==="clear"}clear(){this.range=null,this.state="clear"}}class hq{constructor(I,g,C){this.ci=I,this.operator=g,this.value=C}set(I,g){this.operator=I,this.value=g}includes(I){const{operator:g,value:C}=this;return g==="all"?!0:g==="in"?C.includes(I):!1}vlength(){const{operator:I,value:g}=this;return I==="in"?g.length:0}getData(){const{ci:I,operator:g,value:C}=this;return{ci:I,operator:g,value:C}}}class bq{constructor(I,g){this.ci=I,this.order=g}asc(){return this.order==="asc"}desc(){return this.order==="desc"}}class Fbg{constructor(){this.ref=null,this.filters=[],this.sort=null}setData({ref:I,filters:g,sort:C}){I!=null&&(this.ref=I,this.filters=g.map(i=>new hq(i.ci,i.operator,i.value)),C&&(this.sort=new bq(C.ci,C.order)))}getData(){if(this.active()){const{ref:I,filters:g,sort:C}=this;return{ref:I,filters:g.map(i=>i.getData()),sort:C}}return{}}addFilter(I,g,C){const i=this.getFilter(I);i==null?this.filters.push(new hq(I,g,C)):i.set(g,C)}setSort(I,g){this.sort=g?new bq(I,g):null}includes(I,g){return this.active()?this.hrange().includes(I,g):!1}getSort(I){const{sort:g}=this;return g&&g.ci===I?g:null}getFilter(I){const{filters:g}=this;for(let C=0;C<g.length;C+=1)if(g[C].ci===I)return g[C];return null}filteredRows(I){const g=new Set,C=new Set;if(this.active()){const{sri:i,eri:e}=this.range(),{filters:A}=this;for(let s=i+1;s<=e;s+=1)for(let l=0;l<A.length;l+=1){const n=A[l],a=I(s,n.ci),d=a?a.text:"";if(n.includes(d))C.add(s);else{g.add(s);break}}}return{rset:g,fset:C}}items(I,g){const C={};if(this.active()){const{sri:i,eri:e}=this.range();for(let A=i+1;A<=e;A+=1){const s=g(A,I);if(s!==null&&!/^\s*$/.test(s.text)){const l=s.text,n=(C[l]||0)+1;C[l]=n}else C[""]=(C[""]||0)+1}}return C}range(){return it.valueOf(this.ref)}hrange(){const I=this.range();return I.eri=I.sri,I}clear(){this.ref=null,this.filters=[],this.sort=null}active(){return this.ref!==null}}class R9{constructor(I=[]){this._=I}forEach(I){this._.forEach(I)}deleteWithin(I){this._=this._.filter(g=>!g.within(I))}getFirstIncludes(I,g){for(let C=0;C<this._.length;C+=1){const i=this._[C];if(i.includes(I,g))return i}return null}filterIntersects(I){return new R9(this._.filter(g=>g.intersects(I)))}intersects(I){for(let g=0;g<this._.length;g+=1)if(this._[g].intersects(I))return!0;return!1}union(I){let g=I;return this._.forEach(C=>{C.intersects(g)&&(g=C.union(g))}),g}add(I){this.deleteWithin(I),this._.push(I)}shift(I,g,C,i){this._.forEach(e=>{const{sri:A,sci:s,eri:l,eci:n}=e,a=e;I==="row"?A>=g?(a.sri+=C,a.eri+=C):A<g&&g<=l&&(a.eri+=C,i(A,s,C,0)):I==="column"&&(s>=g?(a.sci+=C,a.eci+=C):s<g&&g<=n&&(a.eci+=C,i(A,s,0,C)))})}move(I,g,C){this._.forEach(i=>{const e=i;e.within(I)&&(e.eri+=g,e.sri+=g,e.sci+=C,e.eci+=C)})}setData(I){return this._=I.map(g=>it.valueOf(g)),this}getData(){return this._.map(I=>I.toString())}}function kbg(t){return JSON.parse(JSON.stringify(t))}const Ltg=(t={},...I)=>(I.forEach(g=>{Object.keys(g).forEach(C=>{const i=g[C];typeof i=="string"||typeof i=="number"||typeof i=="boolean"?t[C]=i:typeof i!="function"&&!Array.isArray(i)&&i instanceof Object?(t[C]=t[C]||{},Ltg(t[C],i)):t[C]=i})}),t);function KD(t,I){const g=Object.keys(t);if(g.length!==Object.keys(I).length)return!1;for(let C=0;C<g.length;C+=1){const i=g[C],e=t[i],A=I[i];if(A===void 0)return!1;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean"){if(e!==A)return!1}else if(Array.isArray(e)){if(e.length!==A.length)return!1;for(let s=0;s<e.length;s+=1)if(!KD(e[s],A[s]))return!1}else if(typeof e!="function"&&!Array.isArray(e)&&e instanceof Object&&!KD(e,A))return!1}return!0}const zbg=(t,I=g=>g)=>{let g=0,C=0;return Object.keys(t).forEach(i=>{g+=I(t[i],i),C+=1}),[g,C]};function Jbg(t,I){const g=t[`${I}`];return delete t[`${I}`],g}function Lbg(t,I,g,C,i,e){let A=g,s=C,l=t;for(;l<I&&!(A>i);l+=1)s=e(l),A+=s;return[l,A-s,s]}function vbg(t,I,g){let C=0;for(let i=t;i<I;i+=1)C+=g(i);return C}function Tbg(t,I,g){for(let C=t;C<I;C+=1)g(C)}function xbg(t,I){if(t.length===I.length){for(let g=0;g<t.length;g+=1)if(t[g]!==I[g])return!1}else return!1;return!0}function WX(t){const I=`${t}`;let g=0,C=!1;for(let i=0;i<I.length;i+=1)C===!0&&(g+=1),I.charAt(i)==="."&&(C=!0);return g}function Jo(t,I,g){if(Number.isNaN(I)||Number.isNaN(g))return I+t+g;const C=WX(I),i=WX(g),e=Number(I),A=Number(g);let s=0;if(t==="-")s=e-A;else if(t==="+")s=e+A;else if(t==="*")s=e*A;else if(t==="/")return s=e/A,WX(s)>5?s.toFixed(2):s;return s.toFixed(Math.max(C,i))}const Ti={cloneDeep:kbg,merge:(...t)=>Ltg({},...t),equals:KD,arrayEquals:xbg,sum:zbg,rangeEach:Tbg,rangeSum:vbg,rangeReduceIf:Lbg,deleteProperty:Jbg,numberCalc:Jo};class jbg{constructor({len:I,height:g}){this._={},this.len=I,this.height=g}getHeight(I){if(this.isHide(I))return 0;const g=this.get(I);return g&&g.height?g.height:this.height}setHeight(I,g){const C=this.getOrNew(I);C.height=g}unhide(I){let g=I;for(;g>0&&(g-=1,this.isHide(g));)this.setHide(g,!1)}isHide(I){const g=this.get(I);return g&&g.hide}setHide(I,g){const C=this.getOrNew(I);g===!0?C.hide=!0:delete C.hide}setStyle(I,g){const C=this.getOrNew(I);C.style=g}sumHeight(I,g,C){return Ti.rangeSum(I,g,i=>C&&C.has(i)?0:this.getHeight(i))}totalHeight(){return this.sumHeight(0,this.len)}get(I){return this._[I]}getOrNew(I){return this._[I]=this._[I]||{cells:{}},this._[I]}getCell(I,g){const C=this.get(I);return C!==void 0&&C.cells!==void 0&&C.cells[g]!==void 0?C.cells[g]:null}getCellMerge(I,g){const C=this.getCell(I,g);return C&&C.merge?C.merge:[0,0]}getCellOrNew(I,g){const C=this.getOrNew(I);return C.cells[g]=C.cells[g]||{},C.cells[g]}setCell(I,g,C,i="all"){const e=this.getOrNew(I);i==="all"?e.cells[g]=C:i==="text"?(e.cells[g]=e.cells[g]||{},e.cells[g].text=C.text):i==="format"&&(e.cells[g]=e.cells[g]||{},e.cells[g].style=C.style,C.merge&&(e.cells[g].merge=C.merge))}setCellText(I,g,C){const i=this.getCellOrNew(I,g);i.editable!==!1&&(i.text=C)}copyPaste(I,g,C,i=!1,e=()=>{}){const{sri:A,sci:s,eri:l,eci:n}=I,a=g.sri,d=g.sci,o=g.eri,c=g.eci,[r,h]=I.size(),[b,u]=g.size();let m=!0,Z=0;(o<A||c<s)&&(m=!1,o<A?Z=b:Z=u);for(let p=A;p<=l;p+=1)if(this._[p]){for(let Y=s;Y<=n;Y+=1)if(this._[p].cells&&this._[p].cells[Y])for(let R=a;R<=o;R+=r)for(let X=d;X<=c;X+=h){const H=R+(p-A),S=X+(Y-s),z=Ti.cloneDeep(this._[p].cells[Y]);if(i&&z&&z.text&&z.text.length>0){const{text:v}=z;let K=X-d+(R-a)+2;if(m||(K-=Z+1),v[0]==="=")z.text=v.replace(/[a-zA-Z]{1,3}\d+/g,V=>{let[N,B]=[0,0];return A===a?N=K-1:B=K-1,/^\d+$/.test(V)?V:fu(V,N,B)});else if(r<=1&&h>1&&(a>l||o<A)||h<=1&&r>1&&(d>n||c<s)||r<=1&&h<=1){const V=/[\\.\d]+$/.exec(v);if(V!==null){const N=Number(V[0])+K-1;z.text=v.substring(0,V.index)+N}}}this.setCell(H,S,z,C),e(H,S,z)}}}cutPaste(I,g){const C={};this.each(i=>{this.eachCells(i,e=>{let A=parseInt(i,10),s=parseInt(e,10);I.includes(i,e)&&(A=g.sri+(A-I.sri),s=g.sci+(s-I.sci)),C[A]=C[A]||{cells:{}},C[A].cells[s]=this._[i].cells[e]})}),this._=C}paste(I,g){if(I.length<=0)return;const{sri:C,sci:i}=g;I.forEach((e,A)=>{const s=C+A;e.forEach((l,n)=>{const a=i+n;this.setCellText(s,a,l)})})}insert(I,g=1){const C={};this.each((i,e)=>{let A=parseInt(i,10);A>=I&&(A+=g,this.eachCells(i,(s,l)=>{l.text&&l.text[0]==="="&&(l.text=l.text.replace(/[a-zA-Z]{1,3}\d+/g,n=>fu(n,0,g,(a,d)=>d>=I)))})),C[A]=e}),this._=C,this.len+=g}delete(I,g){const C=g-I+1,i={};this.each((e,A)=>{const s=parseInt(e,10);s<I?i[s]=A:e>g&&(i[s-C]=A,this.eachCells(e,(l,n)=>{n.text&&n.text[0]==="="&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,a=>fu(a,0,-C,(d,o)=>o>g)))}))}),this._=i,this.len-=C}insertColumn(I,g=1){this.each((C,i)=>{const e={};this.eachCells(C,(A,s)=>{let l=parseInt(A,10);l>=I&&(l+=g,s.text&&s.text[0]==="="&&(s.text=s.text.replace(/[a-zA-Z]{1,3}\d+/g,n=>fu(n,g,0,a=>a>=I)))),e[l]=s}),i.cells=e})}deleteColumn(I,g){const C=g-I+1;this.each((i,e)=>{const A={};this.eachCells(i,(s,l)=>{const n=parseInt(s,10);n<I?A[n]=l:n>g&&(A[n-C]=l,l.text&&l.text[0]==="="&&(l.text=l.text.replace(/[a-zA-Z]{1,3}\d+/g,a=>fu(a,-C,0,d=>d>g))))}),e.cells=A})}deleteCells(I,g="all"){I.each((C,i)=>{this.deleteCell(C,i,g)})}deleteCell(I,g,C="all"){const i=this.get(I);if(i!==null){const e=this.getCell(I,g);e!==null&&e.editable!==!1&&(C==="all"?delete i.cells[g]:C==="text"?(e.text&&delete e.text,e.value&&delete e.value):C==="format"?(e.style!==void 0&&delete e.style,e.merge&&delete e.merge):C==="merge"&&e.merge&&delete e.merge)}}maxCell(){const I=Object.keys(this._),g=I[I.length-1],C=this._[g];if(C){const{cells:i}=C,e=Object.keys(i),A=e[e.length-1];return[parseInt(g,10),parseInt(A,10)]}return[0,0]}each(I){Object.entries(this._).forEach(([g,C])=>{I(g,C)})}eachCells(I,g){this._[I]&&this._[I].cells&&Object.entries(this._[I].cells).forEach(([C,i])=>{g(C,i)})}setData(I){I.len&&(this.len=I.len,delete I.len),this._=I}getData(){const{len:I}=this;return Object.assign({len:I},this._)}}class Qbg{constructor({len:I,width:g,indexWidth:C,minWidth:i}){this._={},this.len=I,this.width=g,this.indexWidth=C,this.minWidth=i}setData(I){I.len&&(this.len=I.len,delete I.len),this._=I}getData(){const{len:I}=this;return Object.assign({len:I},this._)}getWidth(I){if(this.isHide(I))return 0;const g=this._[I];return g&&g.width?g.width:this.width}getOrNew(I){return this._[I]=this._[I]||{},this._[I]}setWidth(I,g){const C=this.getOrNew(I);C.width=g}unhide(I){let g=I;for(;g>0&&(g-=1,this.isHide(g));)this.setHide(g,!1)}isHide(I){const g=this._[I];return g&&g.hide}setHide(I,g){const C=this.getOrNew(I);g===!0?C.hide=!0:delete C.hide}setStyle(I,g){const C=this.getOrNew(I);C.style=g}sumWidth(I,g){return Ti.rangeSum(I,g,C=>this.getWidth(C))}totalWidth(){return this.sumWidth(0,this.len)}}const Obg={toolbar:{undo:"Undo",redo:"Redo",print:"Print",paintformat:"Paint format",clearformat:"Clear format",format:"Format",fontName:"Font",fontSize:"Font size",fontBold:"Font bold",fontItalic:"Font italic",underline:"Underline",strike:"Strike",color:"Text color",bgcolor:"Fill color",border:"Borders",merge:"Merge cells",align:"Horizontal align",valign:"Vertical align",textwrap:"Text wrapping",freeze:"Freeze cell",autofilter:"Filter",formula:"Functions",more:"More"},contextmenu:{copy:"Copy",cut:"Cut",paste:"Paste",pasteValue:"Paste values only",pasteFormat:"Paste format only",hide:"Hide",insertRow:"Insert row",insertColumn:"Insert column",deleteSheet:"Delete",deleteRow:"Delete row",deleteColumn:"Delete column",deleteCell:"Delete cell",deleteCellText:"Delete cell text",validation:"Data validations",cellprintable:"Enable export",cellnonprintable:"Disable export",celleditable:"Enable editing",cellnoneditable:"Disable editing"},print:{size:"Paper size",orientation:"Page orientation",orientations:["Landscape","Portrait"]},format:{normal:"Normal",text:"Plain Text",number:"Number",percent:"Percent",rmb:"RMB",usd:"USD",eur:"EUR",date:"Date",time:"Time",datetime:"Date time",duration:"Duration"},formula:{sum:"Sum",average:"Average",max:"Max",min:"Min",_if:"IF",and:"AND",or:"OR",concat:"Concat"},validation:{required:"it must be required",notMatch:"it not match its validation rule",between:"it is between {} and {}",notBetween:"it is not between {} and {}",notIn:"it is not in list",equal:"it equal to {}",notEqual:"it not equal to {}",lessThan:"it less than {}",lessThanEqual:"it less than or equal to {}",greaterThan:"it greater than {}",greaterThanEqual:"it greater than or equal to {}"},error:{pasteForMergedCell:"Unable to do this for merged cells"},calendar:{weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},button:{next:"Next",cancel:"Cancel",remove:"Remove",save:"Save",ok:"OK"},sort:{desc:"Sort Z -> A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}};let FD=["en"];const vtg={en:Obg};function uq(t,I){if(I)for(const g of FD){if(!I[g])break;let C=I[g];const i=t.match(/(?:\\.|[^.])+/g);for(let e=0;e<i.length;e+=1){const A=i[e],s=C[A];if(!s)break;if(e===i.length-1)return s;C=s}}}function ot(t){let I=uq(t,vtg);return!I&&window&&window.x_spreadsheet&&window.x_spreadsheet.$messages&&(I=uq(t,window.x_spreadsheet.$messages)),I||""}function PI(t){return()=>ot(t)}function Ttg(t,I,g=!1){g?FD=[t]:FD.unshift(t),I&&(vtg[t]=I)}const mq={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function AA(t,I,...g){let C="";return t||(C=ot(`validation.${I}`,...g)),[t,C]}class xtg{constructor(I,g,C,i){this.required=g,this.value=C,this.type=I,this.operator=i,this.message=""}parseValue(I){const{type:g}=this;return g==="date"?new Date(I):g==="number"?Number(I):I}equals(I){let g=this.type===I.type&&this.required===I.required&&this.operator===I.operator;return g&&(Array.isArray(this.value)?g=Ti.arrayEquals(this.value,I.value):g=this.value===I.value),g}values(){return this.value.split(",")}validate(I){const{required:g,operator:C,value:i,type:e}=this;if(g&&/^\s*$/.test(I))return AA(!1,"required");if(/^\s*$/.test(I))return[!0];if(mq[e]&&!mq[e].test(I))return AA(!1,"notMatch");if(e==="list")return AA(this.values().includes(I),"notIn");if(C){const A=this.parseValue(I);if(C==="be"){const[s,l]=i;return AA(A>=this.parseValue(s)&&A<=this.parseValue(l),"between",s,l)}if(C==="nbe"){const[s,l]=i;return AA(A<this.parseValue(s)||A>this.parseValue(l),"notBetween",s,l)}if(C==="eq")return AA(A===this.parseValue(i),"equal",i);if(C==="neq")return AA(A!==this.parseValue(i),"notEqual",i);if(C==="lt")return AA(A<this.parseValue(i),"lessThan",i);if(C==="lte")return AA(A<=this.parseValue(i),"lessThanEqual",i);if(C==="gt")return AA(A>this.parseValue(i),"greaterThan",i);if(C==="gte")return AA(A>=this.parseValue(i),"greaterThanEqual",i)}return[!0]}}class nV{constructor(I,g,C){this.refs=g,this.mode=I,this.validator=C}includes(I,g){const{refs:C}=this;for(let i=0;i<C.length;i+=1)if(it.valueOf(C[i]).includes(I,g))return!0;return!1}addRef(I){this.remove(it.valueOf(I)),this.refs.push(I)}remove(I){const g=[];this.refs.forEach(C=>{const i=it.valueOf(C);i.intersects(I)?i.difference(I).forEach(A=>g.push(A.toString())):g.push(C)}),this.refs=g}getData(){const{refs:I,mode:g,validator:C}=this,{type:i,required:e,operator:A,value:s}=C;return{refs:I,mode:g,type:i,required:e,operator:A,value:s}}static valueOf({refs:I,mode:g,type:C,required:i,operator:e,value:A}){return new nV(g,I,new xtg(C,i,A,e))}}class Ubg{constructor(){this._=[],this.errors=new Map}getError(I,g){return this.errors.get(`${I}_${g}`)}validate(I,g,C){const i=this.get(I,g),e=`${I}_${g}`,{errors:A}=this;if(i!==null){const[s,l]=i.validator.validate(C);s?A.delete(e):A.set(e,l)}else A.delete(e);return!0}add(I,g,{type:C,required:i,value:e,operator:A}){const s=new xtg(C,i,e,A),l=this.getByValidator(s);l!==null?l.addRef(g):this._.push(new nV(I,[g],s))}getByValidator(I){for(let g=0;g<this._.length;g+=1){const C=this._[g];if(C.validator.equals(I))return C}return null}get(I,g){for(let C=0;C<this._.length;C+=1){const i=this._[C];if(i.includes(I,g))return i}return null}remove(I){this.each(g=>{g.remove(I)})}each(I){this._.forEach(g=>I(g))}getData(){return this._.filter(I=>I.refs.length>0).map(I=>I.getData())}setData(I){this._=I.map(g=>nV.valueOf(g))}}const Ebg={mode:"edit",view:{height:()=>document.documentElement.clientHeight,width:()=>document.documentElement.clientWidth},showGrid:!0,showToolbar:!0,showContextmenu:!0,showBottomBar:!0,row:{len:100,height:25},col:{len:26,width:100,indexWidth:60,minWidth:60},style:{bgcolor:"#ffffff",align:"left",valign:"middle",textwrap:!1,strike:!1,underline:!1,color:"#0a0a0a",font:{name:"Arial",size:10,bold:!1,italic:!1},format:"normal"}},Pbg=41,_bg=41,Zq=(t,I)=>Object.prototype.hasOwnProperty.call(t,I);function Gq(t,I,g=()=>{}){const{merges:C}=this,i=I.clone(),[e,A]=t.size(),[s,l]=I.size();return e>s&&(i.eri=I.sri+e-1),A>l&&(i.eci=I.sci+A-1),C.intersects(i)?(g(ot("error.pasteForMergedCell")),!1):!0}function wq(t,I,g,C=!1){const{rows:i,merges:e}=this;(g==="all"||g==="format")&&(i.deleteCells(I,g),e.deleteWithin(I)),i.copyPaste(t,I,g,C,(A,s,l)=>{if(l&&l.merge){const[n,a]=l.merge;if(n<=0&&a<=0)return;e.add(new it(A,s,A+n,s+a))}})}function qbg(t,I){const{clipboard:g,rows:C,merges:i}=this;C.cutPaste(t,I),i.move(t,I.sri-t.sri,I.sci-t.sci),g.clear()}function Hr(t,I,g){const{styles:C,rows:i}=this,e=i.getCellOrNew(t,I);let A={};e.style!==void 0&&(A=Ti.cloneDeep(C[e.style])),A=Ti.merge(A,{border:g}),e.style=this.addStyle(A)}function $bg({mode:t,style:I,color:g}){const{styles:C,selector:i,rows:e}=this,{sri:A,sci:s,eri:l,eci:n}=i.range,a=!this.isSignleSelected();if(!(!a&&(t==="inside"||t==="horizontal"||t==="vertical"))){if(t==="outside"&&!a)Hr.call(this,A,s,{top:[I,g],bottom:[I,g],left:[I,g],right:[I,g]});else if(t==="none")i.range.each((d,o)=>{const c=e.getCell(d,o);if(c&&c.style!==void 0){const r=Ti.cloneDeep(C[c.style]);delete r.border,c.style=this.addStyle(r)}});else if(t==="all"||t==="inside"||t==="outside"||t==="horizontal"||t==="vertical"){const d=[];for(let o=A;o<=l;o+=1)for(let c=s;c<=n;c+=1){const r=[];for(let Y=0;Y<d.length;Y+=1){const[R,X,H,S]=d[Y];if(o===R+H+1&&r.push(Y),R<=o&&o<=R+H&&c===X){c+=S+1;break}}if(r.forEach(Y=>d.splice(Y,1)),c>n)break;const h=e.getCell(o,c);let[b,u]=[0,0];h&&h.merge&&([b,u]=h.merge,d.push([o,c,b,u]));const m=b>0&&o+b===l,Z=u>0&&c+u===n;let p={};t==="all"?p={bottom:[I,g],top:[I,g],left:[I,g],right:[I,g]}:t==="inside"?(!Z&&c<n&&(p.right=[I,g]),!m&&o<l&&(p.bottom=[I,g])):t==="horizontal"?!m&&o<l&&(p.bottom=[I,g]):t==="vertical"?!Z&&c<n&&(p.right=[I,g]):t==="outside"&&a&&(A===o&&(p.top=[I,g]),(m||l===o)&&(p.bottom=[I,g]),s===c&&(p.left=[I,g]),(Z||n===c)&&(p.right=[I,g])),Object.keys(p).length>0&&Hr.call(this,o,c,p),c+=u}}else if(t==="top"||t==="bottom")for(let d=s;d<=n;d+=1)t==="top"&&(Hr.call(this,A,d,{top:[I,g]}),d+=e.getCellMerge(A,d)[1]),t==="bottom"&&(Hr.call(this,l,d,{bottom:[I,g]}),d+=e.getCellMerge(l,d)[1]);else if(t==="left"||t==="right")for(let d=A;d<=l;d+=1)t==="left"&&(Hr.call(this,d,s,{left:[I,g]}),d+=e.getCellMerge(d,s)[0]),t==="right"&&(Hr.call(this,d,n,{right:[I,g]}),d+=e.getCellMerge(d,n)[0])}}function gug(t,I){const{rows:g}=this,C=this.freezeTotalHeight();let i=g.height;C+g.height<t&&(i-=I);const e=this.exceptRowSet;let A=0,s=i,{height:l}=g;for(;A<g.len&&!(s>t);A+=1)e.has(A)||(l=g.getHeight(A),s+=l);return s-=l,s<=0?{ri:-1,top:0,height:l}:{ri:A-1,top:s,height:l}}function Iug(t,I){const{cols:g}=this,C=this.freezeTotalWidth();let i=g.indexWidth;C+g.indexWidth<t&&(i-=I);const[e,A,s]=Ti.rangeReduceIf(0,g.len,i,g.indexWidth,t,l=>g.getWidth(l));return A<=0?{ci:-1,left:0,width:g.indexWidth}:{ci:e-1,left:A,width:s}}class Cug{constructor(I,g){this.settings=Ti.merge(Ebg,g||{}),this.name=I||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new R9,this.rows=new jbg(this.settings.row),this.cols=new Qbg(this.settings.col),this.validations=new Ubg,this.hyperlinks={},this.comments={},this.selector=new Xbg,this.scroll=new Sbg,this.history=new Dbg,this.clipboard=new Kbg,this.autoFilter=new Fbg,this.change=()=>{},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map}addValidation(I,g,C){this.changeData(()=>{this.validations.add(I,g,C)})}removeValidation(){const{range:I}=this.selector;this.changeData(()=>{this.validations.remove(I)})}getSelectedValidator(){const{ri:I,ci:g}=this.selector,C=this.validations.get(I,g);return C?C.validator:null}getSelectedValidation(){const{ri:I,ci:g,range:C}=this.selector,i=this.validations.get(I,g),e={ref:C.toString()};return i!==null&&(e.mode=i.mode,e.validator=i.validator),e}canUndo(){return this.history.canUndo()}canRedo(){return this.history.canRedo()}undo(){this.history.undo(this.getData(),I=>{this.setData(I)})}redo(){this.history.redo(this.getData(),I=>{this.setData(I)})}copy(){this.clipboard.copy(this.selector.range)}copyToSystemClipboard(){if(navigator.clipboard===void 0)return;let I="";const g=this.rows.getData();for(let C=this.selector.range.sri;C<=this.selector.range.eri;C+=1){if(Zq(g,C)){for(let i=this.selector.range.sci;i<=this.selector.range.eci;i+=1)if(i>this.selector.range.sci&&(I+="	"),Zq(g[C].cells,i)){const e=String(g[C].cells[i].text);e.indexOf(`
`)===-1&&e.indexOf("	")===-1&&e.indexOf('"')===-1?I+=e:I+=`"${e}"`}}else for(let i=this.selector.range.sci;i<=this.selector.range.eci;i+=1)I+="	";I+=`
`}navigator.clipboard.writeText(I).then(()=>{},C=>{console.log("text copy to the system clipboard error  ",I,C)})}cut(){this.clipboard.cut(this.selector.range)}paste(I="all",g=()=>{}){const{clipboard:C,selector:i}=this;return C.isClear()||!Gq.call(this,C.range,i.range,g)?!1:(this.changeData(()=>{C.isCopy()?wq.call(this,C.range,i.range,I):C.isCut()&&qbg.call(this,C.range,i.range)}),!0)}pasteFromText(I){const g=I.split(`\r
`).map(e=>e.replace(/"/g,"").split("	"));g.length>0&&(g.length-=1);const{rows:C,selector:i}=this;this.changeData(()=>{C.paste(g,i.range)})}autofill(I,g,C=()=>{}){const i=this.selector.range;return Gq.call(this,i,I,C)?(this.changeData(()=>{wq.call(this,i,I,g,!0)}),!0):!1}clearClipboard(){this.clipboard.clear()}calSelectedRangeByEnd(I,g){const{selector:C,rows:i,cols:e,merges:A}=this;let{sri:s,sci:l,eri:n,eci:a}=C.range;const d=C.ri,o=C.ci;let[c,r]=[I,g];return I<0&&(c=i.len-1),g<0&&(r=e.len-1),c>d?[s,n]=[d,c]:[s,n]=[c,d],r>o?[l,a]=[o,r]:[l,a]=[r,o],C.range=A.union(new it(s,l,n,a)),C.range=A.union(C.range),C.range}calSelectedRangeByStart(I,g){const{selector:C,rows:i,cols:e,merges:A}=this;let s=A.getFirstIncludes(I,g);return s===null&&(s=new it(I,g,I,g),I===-1&&(s.sri=0,s.eri=i.len-1),g===-1&&(s.sci=0,s.eci=e.len-1)),C.range=s,s}setSelectedCellAttr(I,g){this.changeData(()=>{const{selector:C,styles:i,rows:e}=this;if(I==="merge")g?this.merge():this.unmerge();else if(I==="border")$bg.call(this,g);else if(I==="formula"){const{ri:A,ci:s,range:l}=C;if(C.multiple()){const[n,a]=C.size(),{sri:d,sci:o,eri:c,eci:r}=l;if(n>1)for(let h=o;h<=r;h+=1){const b=e.getCellOrNew(c+1,h);b.text=`=${g}(${zl(h,d)}:${zl(h,c)})`}else if(a>1){const h=e.getCellOrNew(A,r+1);h.text=`=${g}(${zl(o,A)}:${zl(r,A)})`}}else{const n=e.getCellOrNew(A,s);n.text=`=${g}()`}}else C.range.each((A,s)=>{const l=e.getCellOrNew(A,s);let n={};if(l.style!==void 0&&(n=Ti.cloneDeep(i[l.style])),I==="format")n.format=g,l.style=this.addStyle(n);else if(I==="font-bold"||I==="font-italic"||I==="font-name"||I==="font-size"){const a={};a[I.split("-")[1]]=g,n.font=Object.assign(n.font||{},a),l.style=this.addStyle(n)}else I==="strike"||I==="textwrap"||I==="underline"||I==="align"||I==="valign"||I==="color"||I==="bgcolor"?(n[I]=g,l.style=this.addStyle(n)):l[I]=g})})}setSelectedCellText(I,g="input"){const{autoFilter:C,selector:i,rows:e}=this,{ri:A,ci:s}=i;let l=A;this.unsortedRowMap.has(A)&&(l=this.unsortedRowMap.get(A));const n=e.getCell(l,s),a=n?n.text:"";if(this.setCellText(l,s,I,g),C.active()){const d=C.getFilter(s);if(d){const o=d.value.findIndex(c=>c===a);o>=0&&d.value.splice(o,1,I)}}}getSelectedCell(){const{ri:I,ci:g}=this.selector;let C=I;return this.unsortedRowMap.has(I)&&(C=this.unsortedRowMap.get(I)),this.rows.getCell(C,g)}xyInSelectedRect(I,g){const{left:C,top:i,width:e,height:A}=this.getSelectedRect(),s=I-this.cols.indexWidth,l=g-this.rows.height;return s>C&&s<C+e&&l>i&&l<i+A}getSelectedRect(){return this.getRect(this.selector.range)}getClipboardRect(){const{clipboard:I}=this;return I.isClear()?{left:-100,top:-100}:this.getRect(I.range)}getRect(I){const{scroll:g,rows:C,cols:i,exceptRowSet:e}=this,{sri:A,sci:s,eri:l,eci:n}=I;if(A<0&&s<0)return{left:0,l:0,top:0,t:0,scroll:g};const a=i.sumWidth(0,s),d=C.sumHeight(0,A,e),o=C.sumHeight(A,l+1,e),c=i.sumWidth(s,n+1);let r=a-g.x,h=d-g.y;const b=this.freezeTotalHeight(),u=this.freezeTotalWidth();return u>0&&u>a&&(r=a),b>0&&b>d&&(h=d),{l:a,t:d,left:r,top:h,height:o,width:c,scroll:g}}getCellRectByXY(I,g){const{scroll:C,merges:i,rows:e,cols:A}=this;let{ri:s,top:l,height:n}=gug.call(this,g,C.y),{ci:a,left:d,width:o}=Iug.call(this,I,C.x);if(a===-1&&(o=A.totalWidth()),s===-1&&(n=e.totalHeight()),s>=0||a>=0){const c=i.getFirstIncludes(s,a);c&&(s=c.sri,a=c.sci,{left:d,top:l,width:o,height:n}=this.cellRect(s,a))}return{ri:s,ci:a,left:d,top:l,width:o,height:n}}isSignleSelected(){const{sri:I,sci:g,eri:C,eci:i}=this.selector.range,e=this.getCell(I,g);if(e&&e.merge){const[A,s]=e.merge;if(I+A===C&&g+s===i)return!0}return!this.selector.multiple()}canUnmerge(){const{sri:I,sci:g,eri:C,eci:i}=this.selector.range,e=this.getCell(I,g);if(e&&e.merge){const[A,s]=e.merge;if(I+A===C&&g+s===i)return!0}return!1}merge(){const{selector:I,rows:g}=this;if(this.isSignleSelected())return;const[C,i]=I.size();if(C>1||i>1){const{sri:e,sci:A}=I.range;this.changeData(()=>{const s=g.getCellOrNew(e,A);s.merge=[C-1,i-1],this.merges.add(I.range),this.rows.deleteCells(I.range),this.rows.setCell(e,A,s)})}}unmerge(){const{selector:I}=this;if(!this.isSignleSelected())return;const{sri:g,sci:C}=I.range;this.changeData(()=>{this.rows.deleteCell(g,C,"merge"),this.merges.deleteWithin(I.range)})}canAutofilter(){return!this.autoFilter.active()}autofilter(){const{autoFilter:I,selector:g}=this;this.changeData(()=>{I.active()?(I.clear(),this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map):I.ref=g.range.toString()})}setAutoFilter(I,g,C,i){const{autoFilter:e}=this;e.addFilter(I,C,i),e.setSort(I,g),this.resetAutoFilter()}resetAutoFilter(){const{autoFilter:I,rows:g}=this;if(!I.active())return;const{sort:C}=I,{rset:i,fset:e}=I.filteredRows((l,n)=>g.getCell(l,n)),A=Array.from(e),s=Array.from(e);C&&A.sort((l,n)=>C.order==="asc"?l-n:C.order==="desc"?n-l:0),this.exceptRowSet=i,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,A.forEach((l,n)=>{this.sortedRowMap.set(s[n],l),this.unsortedRowMap.set(l,s[n])})}deleteCell(I="all"){const{selector:g}=this;this.changeData(()=>{this.rows.deleteCells(g.range,I),(I==="all"||I==="format")&&this.merges.deleteWithin(g.range)})}insert(I,g=1){this.changeData(()=>{const{sri:C,sci:i}=this.selector.range,{rows:e,merges:A,cols:s}=this;let l=C;I==="row"?e.insert(C,g):I==="column"&&(e.insertColumn(i,g),l=i,s.len+=1),A.shift(I,l,g,(n,a,d,o)=>{const c=e.getCell(n,a);c.merge[0]+=d,c.merge[1]+=o})})}delete(I){this.changeData(()=>{const{rows:g,merges:C,selector:i,cols:e}=this,{range:A}=i,{sri:s,sci:l,eri:n,eci:a}=i.range,[d,o]=i.range.size();let c=s,r=d;I==="row"?g.delete(s,n):I==="column"&&(g.deleteColumn(l,a),c=A.sci,r=o,e.len-=1),C.shift(I,c,-r,(h,b,u,m)=>{const Z=g.getCell(h,b);Z.merge[0]+=u,Z.merge[1]+=m,Z.merge[0]===0&&Z.merge[1]===0&&delete Z.merge})})}scrollx(I,g){const{scroll:C,freeze:i,cols:e}=this,[,A]=i,[s,l,n]=Ti.rangeReduceIf(A,e.len,0,0,I,d=>e.getWidth(d));let a=l;I>0&&(a+=n),C.x!==a&&(C.ci=I>0?s:0,C.x=a,g())}scrolly(I,g){const{scroll:C,freeze:i,rows:e}=this,[A]=i,[s,l,n]=Ti.rangeReduceIf(A,e.len,0,0,I,d=>e.getHeight(d));let a=l;I>0&&(a+=n),C.y!==a&&(C.ri=I>0?s:0,C.y=a,g())}cellRect(I,g){const{rows:C,cols:i}=this,e=i.sumWidth(0,g),A=C.sumHeight(0,I),s=C.getCell(I,g);let l=i.getWidth(g),n=C.getHeight(I);if(s!==null&&s.merge){const[a,d]=s.merge;if(a>0)for(let o=1;o<=a;o+=1)n+=C.getHeight(I+o);if(d>0)for(let o=1;o<=d;o+=1)l+=i.getWidth(g+o)}return{left:e,top:A,width:l,height:n,cell:s}}getCell(I,g){return this.rows.getCell(I,g)}getCellTextOrDefault(I,g){const C=this.getCell(I,g);return C&&C.text?C.text:""}getCellStyle(I,g){const C=this.getCell(I,g);return C&&C.style!==void 0?this.styles[C.style]:null}getCellStyleOrDefault(I,g){const{styles:C,rows:i}=this,e=i.getCell(I,g),A=e&&e.style!==void 0?C[e.style]:{};return Ti.merge(this.defaultStyle(),A)}getSelectedCellStyle(){const{ri:I,ci:g}=this.selector;return this.getCellStyleOrDefault(I,g)}setCellText(I,g,C,i){const{rows:e,history:A,validations:s}=this;i==="finished"?(e.setCellText(I,g,""),A.add(this.getData()),e.setCellText(I,g,C)):(e.setCellText(I,g,C),this.change(this.getData())),s.validate(I,g,C)}freezeIsActive(){const[I,g]=this.freeze;return I>0||g>0}setFreeze(I,g){this.changeData(()=>{this.freeze=[I,g]})}freezeTotalWidth(){return this.cols.sumWidth(0,this.freeze[1])}freezeTotalHeight(){return this.rows.sumHeight(0,this.freeze[0])}setRowHeight(I,g){this.changeData(()=>{this.rows.setHeight(I,g)})}setColWidth(I,g){this.changeData(()=>{this.cols.setWidth(I,g)})}viewHeight(){const{view:I,showToolbar:g,showBottomBar:C}=this.settings;let i=I.height();return C&&(i-=_bg),g&&(i-=Pbg),i}viewWidth(){return this.settings.view.width()}freezeViewRange(){const[I,g]=this.freeze;return new it(0,0,I-1,g-1,this.freezeTotalWidth(),this.freezeTotalHeight())}contentRange(){const{rows:I,cols:g}=this,[C,i]=I.maxCell(),e=I.sumHeight(0,C+1),A=g.sumWidth(0,i+1);return new it(0,0,C,i,A,e)}exceptRowTotalHeight(I,g){const{exceptRowSet:C,rows:i}=this,e=Array.from(C);let A=0;return e.forEach(s=>{if(s<I||s>g){const l=i.getHeight(s);A+=l}}),A}viewRange(){const{scroll:I,rows:g,cols:C,freeze:i,exceptRowSet:e}=this;let{ri:A,ci:s}=I;A<=0&&([A]=i),s<=0&&([,s]=i);let[l,n]=[0,0],[a,d]=[g.len,C.len];for(let o=A;o<g.len&&(e.has(o)||(n+=g.getHeight(o),a=o),!(n>this.viewHeight()));o+=1);for(let o=s;o<C.len&&(l+=C.getWidth(o),d=o,!(l>this.viewWidth()));o+=1);return new it(A,s,a,d,l,n)}eachMergesInView(I,g){this.merges.filterIntersects(I).forEach(C=>g(C))}hideRowsOrCols(){const{rows:I,cols:g,selector:C}=this,[i,e]=C.size(),{sri:A,sci:s,eri:l,eci:n}=C.range;if(i===I.len)for(let a=s;a<=n;a+=1)g.setHide(a,!0);else if(e===g.len)for(let a=A;a<=l;a+=1)I.setHide(a,!0)}unhideRowsOrCols(I,g){this[`${I}s`].unhide(g)}rowEach(I,g,C){let i=0;const{rows:e}=this,A=this.exceptRowSet,s=[...A];let l=0;for(let n=0;n<s.length;n+=1)s[n]<I&&(l+=1);for(let n=I+l;n<=g+l;n+=1)if(A.has(n))l+=1;else{const a=e.getHeight(n);if(a>0&&(C(n,i,a),i+=a,i>this.viewHeight()))break}}colEach(I,g,C){let i=0;const{cols:e}=this;for(let A=I;A<=g;A+=1){const s=e.getWidth(A);if(s>0&&(C(A,i,s),i+=s,i>this.viewWidth()))break}}defaultStyle(){return this.settings.style}addStyle(I){const{styles:g}=this;for(let C=0;C<g.length;C+=1){const i=g[C];if(Ti.equals(i,I))return C}return g.push(I),g.length-1}changeData(I){this.history.add(this.getData()),I(),this.change(this.getData())}setData(I){return Object.keys(I).forEach(g=>{if(g==="merges"||g==="rows"||g==="cols"||g==="validations")this[g].setData(I[g]);else if(g==="freeze"){const[C,i]=ka(I[g]);this.freeze=[i,C]}else g==="autofilter"?this.autoFilter.setData(I[g]):I[g]!==void 0&&(this[g]=I[g])}),this}getData(){const{name:I,freeze:g,styles:C,merges:i,rows:e,cols:A,validations:s,autoFilter:l}=this;return{name:I,freeze:zl(g[1],g[0]),styles:C,merges:i.getData(),rows:e.getData(),cols:A.getData(),validations:s.getData(),autofilter:l.getData()}}}function ji(t,I,g){t.addEventListener(I,g)}function aV(t,I,g){t.removeEventListener(I,g)}function B0(t){t.xclickoutside&&(aV(window.document.body,"click",t.xclickoutside),delete t.xclickoutside)}function AG(t,I){t.xclickoutside=g=>{g.detail===2||t.contains(g.target)||(I?I(t):(t.hide(),B0(t)))},ji(window.document.body,"click",t.xclickoutside)}function jtg(t,I,g){ji(t,"mousemove",I);const C=t;C.xEvtUp=i=>{aV(t,"mousemove",I),aV(t,"mouseup",t.xEvtUp),g(i)},ji(t,"mouseup",t.xEvtUp)}function pq(t,I,g,C){let i="";Math.abs(t)>Math.abs(I)?(i=t>0?"right":"left",C(i,t,g)):(i=I>0?"down":"up",C(i,I,g))}function tug(t,{move:I,end:g}){let C=0,i=0;ji(t,"touchstart",e=>{const{pageX:A,pageY:s}=e.touches[0];C=A,i=s}),ji(t,"touchmove",e=>{if(!I)return;const{pageX:A,pageY:s}=e.changedTouches[0],l=A-C,n=s-i;(Math.abs(l)>10||Math.abs(n)>10)&&(pq(l,n,e,I),C=A,i=s),e.preventDefault()}),ji(t,"touchend",e=>{if(!g)return;const{pageX:A,pageY:s}=e.changedTouches[0],l=A-C,n=s-i;pq(l,n,e,g)})}function iug(){const t=new Map;function I(A,s){const l=()=>{const a=t.get(A);return Array.isArray(a)&&a.push(s)||!1},n=()=>t.set(A,[].concat(s));return t.has(A)&&l()||n()}function g(A,s){const l=()=>{const n=t.get(A);for(const a of n)a.call(null,...s)};return t.has(A)&&l()}function C(A,s){const l=()=>{const n=t.get(A),a=n.indexOf(s);return a>=0&&n.splice(a,1)&&t.get(A).length===0&&t.delete(A)};return t.has(A)&&l()}function i(A,s){const l=(...n)=>{s.call(null,...n),C(A,l)};return I(A,l)}function e(){t.clear()}return{get current(){return t},on:I,once:i,fire:g,removeListener:C,removeAllListeners:e}}const Lg="x-spreadsheet";class Bq{constructor(I=!1,g){this.moving=!1,this.vertical=I,this.el=Yg("div",`${Lg}-resizer ${I?"vertical":"horizontal"}`).children(this.unhideHoverEl=Yg("div",`${Lg}-resizer-hover`).on("dblclick.stop",C=>this.mousedblclickHandler(C)).css("position","absolute").hide(),this.hoverEl=Yg("div",`${Lg}-resizer-hover`).on("mousedown.stop",C=>this.mousedownHandler(C)),this.lineEl=Yg("div",`${Lg}-resizer-line`).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=g,this.unhideFn=()=>{}}showUnhide(I){this.unhideIndex=I,this.unhideHoverEl.show()}hideUnhide(){this.unhideHoverEl.hide()}show(I,g){const{moving:C,vertical:i,hoverEl:e,lineEl:A,el:s,unhideHoverEl:l}=this;if(C)return;this.cRect=I;const{left:n,top:a,width:d,height:o}=I;s.offset({left:i?n+d-5:n,top:i?a:a+o-5}).show(),e.offset({width:i?5:d,height:i?o:5}),A.offset({width:i?0:g.width,height:i?g.height:0}),l.offset({left:i?5-d:n,top:i?a:5-o,width:i?5:d,height:i?o:5})}hide(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}mousedblclickHandler(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}mousedownHandler(I){let g=I;const{el:C,lineEl:i,cRect:e,vertical:A,minDistance:s}=this;let l=A?e.width:e.height;i.show(),jtg(window,n=>{this.moving=!0,g!==null&&n.buttons===1&&(A?(l+=n.movementX,l>s&&C.css("left",`${e.left+l}px`)):(l+=n.movementY,l>s&&C.css("top",`${e.top+l}px`)),g=n)},()=>{g=null,i.hide(),this.moving=!1,this.hide(),this.finishedFn&&(l<s&&(l=s),this.finishedFn(e,l))})}}class Wq{constructor(I){this.vertical=I,this.moveFn=null,this.el=Yg("div",`${Lg}-scrollbar ${I?"vertical":"horizontal"}`).child(this.contentEl=Yg("div","")).on("mousemove.stop",()=>{}).on("scroll.stop",g=>{const{scrollTop:C,scrollLeft:i}=g.target;this.moveFn&&this.moveFn(this.vertical?C:i,g)})}move(I){return this.el.scroll(I),this}scroll(){return this.el.scroll()}set(I,g){const C=I-1;if(g>C){const i=this.vertical?"height":"width";this.el.css(i,`${C-15}px`).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(i,`${g}px`)}else this.el.hide();return this}}const LY=2*2-1;let kD=10;class vY{constructor(I=!1){this.useHideInput=I,this.inputChange=()=>{},this.cornerEl=Yg("div",`${Lg}-selector-corner`),this.areaEl=Yg("div",`${Lg}-selector-area`).child(this.cornerEl).hide(),this.clipboardEl=Yg("div",`${Lg}-selector-clipboard`).hide(),this.autofillEl=Yg("div",`${Lg}-selector-autofill`).hide(),this.el=Yg("div",`${Lg}-selector`).css("z-index",`${kD}`).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),I&&(this.hideInput=Yg("input","").on("compositionend",g=>{this.inputChange(g.target.value)}),this.el.child(this.hideInputDiv=Yg("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=Yg("div","hide-input").child(this.hideInput))),kD+=1}setOffset(I){return this.el.offset(I).show(),this}hide(){return this.el.hide(),this}setAreaOffset(I){const{left:g,top:C,width:i,height:e}=I,A={width:i-LY+.8,height:e-LY+.8,left:g-.8,top:C-.8};this.areaEl.offset(A).show(),this.useHideInput&&(this.hideInputDiv.offset(A),this.hideInput.val("").focus())}setClipboardOffset(I){const{left:g,top:C,width:i,height:e}=I;this.clipboardEl.offset({left:g,top:C,width:i-5,height:e-5})}showAutofill(I){const{left:g,top:C,width:i,height:e}=I;this.autofillEl.offset({width:i-LY,height:e-LY,left:g,top:C}).show()}hideAutofill(){this.autofillEl.hide()}showClipboard(){this.clipboardEl.show()}hideClipboard(){this.clipboardEl.hide()}}function f9(t){const{data:I}=this,{left:g,top:C,width:i,height:e,scroll:A,l:s,t:l}=t,n=I.freezeTotalWidth(),a=I.freezeTotalHeight();let d=g-n;n>s&&(d-=A.x);let o=C-a;return a>l&&(o-=A.y),{left:d,top:o,width:i,height:e}}function H9(t){const{data:I}=this,{left:g,width:C,height:i,l:e,t:A,scroll:s}=t,l=I.freezeTotalWidth();let n=g-l;return l>e&&(n-=s.x),{left:n,top:A,width:C,height:i}}function X9(t){const{data:I}=this,{top:g,width:C,height:i,l:e,t:A,scroll:s}=t,l=I.freezeTotalHeight();let n=g-l;return l>A&&(n-=s.y),{left:e,top:n,width:C,height:i}}function zD(t){const{br:I}=this;I.setAreaOffset(f9.call(this,t))}function eug(t){const{tl:I}=this;I.setAreaOffset(t)}function Qtg(t){const{t:I}=this;I.setAreaOffset(H9.call(this,t))}function Otg(t){const{l:I}=this;I.setAreaOffset(X9.call(this,t))}function Utg(t){const{l:I}=this;I.setClipboardOffset(X9.call(this,t))}function JD(t){const{br:I}=this;I.setClipboardOffset(f9.call(this,t))}function Aug(t){const{tl:I}=this;I.setClipboardOffset(t)}function Etg(t){const{t:I}=this;I.setClipboardOffset(H9.call(this,t))}function yq(t){zD.call(this,t),eug.call(this,t),Qtg.call(this,t),Otg.call(this,t)}function Yq(t){JD.call(this,t),Aug.call(this,t),Etg.call(this,t),Utg.call(this,t)}class sug{constructor(I){this.inputChange=()=>{},this.data=I,this.br=new vY(!0),this.t=new vY,this.l=new vY,this.tl=new vY,this.br.inputChange=g=>{this.inputChange(g)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=Yg("div",`${Lg}-selectors`).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,kD+=1}resetData(I){this.data=I,this.range=I.selector.range,this.resetAreaOffset()}hide(){this.el.hide()}resetOffset(){const{data:I,tl:g,t:C,l:i,br:e}=this,A=I.freezeTotalHeight(),s=I.freezeTotalWidth();A>0||s>0?(g.setOffset({width:s,height:A}),C.setOffset({left:s,height:A}),i.setOffset({top:A,width:s}),e.setOffset({left:s,top:A})):(g.hide(),C.hide(),i.hide(),e.setOffset({left:0,top:0}))}resetAreaOffset(){const I=this.data.getSelectedRect(),g=this.data.getClipboardRect();yq.call(this,I),Yq.call(this,g),this.resetOffset()}resetBRTAreaOffset(){const I=this.data.getSelectedRect(),g=this.data.getClipboardRect();zD.call(this,I),Qtg.call(this,I),JD.call(this,g),Etg.call(this,g),this.resetOffset()}resetBRLAreaOffset(){const I=this.data.getSelectedRect(),g=this.data.getClipboardRect();zD.call(this,I),Otg.call(this,I),JD.call(this,g),Utg.call(this,g),this.resetOffset()}set(I,g,C=!0){const{data:i}=this,e=i.calSelectedRangeByStart(I,g),{sri:A,sci:s}=e;if(C){let[l,n]=[I,g];I<0&&(l=0),g<0&&(n=0),i.selector.setIndexes(l,n),this.indexes=[l,n]}this.moveIndexes=[A,s],this.range=e,this.resetAreaOffset(),this.el.show()}setEnd(I,g,C=!0){const{data:i,lastri:e,lastci:A}=this;if(C){if(I===e&&g===A)return;this.lastri=I,this.lastci=g}this.range=i.calSelectedRangeByEnd(I,g),yq.call(this,this.data.getSelectedRect())}reset(){const{eri:I,eci:g}=this.data.selector.range;this.setEnd(I,g)}showAutofill(I,g){if(I===-1&&g===-1)return;const{sri:C,sci:i,eri:e,eci:A}=this.range,[s,l]=[I,g],n=C-I,a=i-g,d=e-I,o=A-g;if(a>0)this.arange=new it(C,l,e,i-1);else if(n>0)this.arange=new it(s,i,C-1,A);else if(o<0)this.arange=new it(C,A+1,e,l);else if(d<0)this.arange=new it(e+1,i,s,A);else{this.arange=null;return}if(this.arange!==null){const c=this.data.getRect(this.arange);c.width+=2,c.height+=2;const{br:r,l:h,t:b,tl:u}=this;r.showAutofill(f9.call(this,c)),h.showAutofill(X9.call(this,c)),b.showAutofill(H9.call(this,c)),u.showAutofill(c)}}hideAutofill(){["br","l","t","tl"].forEach(I=>{this[I].hideAutofill()})}showClipboard(){const I=this.data.getClipboardRect();Yq.call(this,I),["br","l","t","tl"].forEach(g=>{this[g].showClipboard()})}hideClipboard(){["br","l","t","tl"].forEach(I=>{this[I].hideClipboard()})}}function lug(t){t.preventDefault(),t.stopPropagation();const{filterItems:I}=this;I.length<=0||(this.itemIndex>=0&&I[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=I.length-1),I[this.itemIndex].toggle())}function nug(t){t.stopPropagation();const{filterItems:I}=this;I.length<=0||(this.itemIndex>=0&&I[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>I.length-1&&(this.itemIndex=0),I[this.itemIndex].toggle())}function Nq(t){t.preventDefault();const{filterItems:I}=this;I.length<=0||(t.stopPropagation(),this.itemIndex<0&&(this.itemIndex=0),I[this.itemIndex].el.click(),this.hide())}function aug(t){const{keyCode:I}=t;switch(t.ctrlKey&&t.stopPropagation(),I){case 37:t.stopPropagation();break;case 38:lug.call(this,t);break;case 39:t.stopPropagation();break;case 40:nug.call(this,t);break;case 13:Nq.call(this,t);break;case 9:Nq.call(this,t);break;default:t.stopPropagation();break}}class Ptg{constructor(I,g,C="200px"){this.filterItems=[],this.items=I,this.el=Yg("div",`${Lg}-suggest`).css("width",C).hide(),this.itemClick=g,this.itemIndex=-1}setOffset(I){this.el.cssRemoveKeys("top","bottom").offset(I)}hide(){const{el:I}=this;this.filterItems=[],this.itemIndex=-1,I.hide(),B0(this.el.parent())}setItems(I){this.items=I}search(I){let{items:g}=this;if(/^\s*$/.test(I)||(g=g.filter(i=>(i.key||i).startsWith(I.toUpperCase()))),g=g.map(i=>{let{title:e}=i;e?typeof e=="function"&&(e=e()):e=i;const A=Yg("div",`${Lg}-item`).child(e).on("click.stop",()=>{this.itemClick(i),this.hide()});return i.label&&A.child(Yg("div","label").html(i.label)),A}),this.filterItems=g,g.length<=0)return;const{el:C}=this;C.html("").children(...g).show(),AG(C.parent(),()=>{this.hide()})}bindInputEvents(I){I.on("keydown",g=>aug.call(this,g))}}class hi extends ed{constructor(I){super("div",`${Lg}-icon`),this.iconNameEl=Yg("div",`${Lg}-icon-img ${I}`),this.child(this.iconNameEl)}setName(I){this.iconNameEl.className(`${Lg}-icon-img ${I}`)}}function Vq(t,I){t.setMonth(t.getMonth()+I)}function oug(t,I){const g=new Date(t);return g.setDate(I-t.getDay()+1),g}function cug(t,I,g){const C=new Date(t,I,1,23,59,59),i=[[],[],[],[],[],[]];for(let e=0;e<6;e+=1)for(let A=0;A<7;A+=1){const s=e*7+A,l=oug(C,s),n=l.getMonth()!==I,a=l.getMonth()===g.getMonth()&&l.getDate()===g.getDate();i[e][A]={d:l,disabled:n,active:a}}return i}class dug{constructor(I){this.value=I,this.cvalue=new Date(I),this.headerLeftEl=Yg("div","calendar-header-left"),this.bodyEl=Yg("tbody",""),this.buildAll(),this.el=Yg("div","x-spreadsheet-calendar").children(Yg("div","calendar-header").children(this.headerLeftEl,Yg("div","calendar-header-right").children(Yg("a","calendar-prev").on("click.stop",()=>this.prev()).child(new hi("chevron-left")),Yg("a","calendar-next").on("click.stop",()=>this.next()).child(new hi("chevron-right")))),Yg("table","calendar-body").children(Yg("thead","").child(Yg("tr","").children(...ot("calendar.weeks").map(g=>Yg("th","cell").child(g)))),this.bodyEl)),this.selectChange=()=>{}}setValue(I){this.value=I,this.cvalue=new Date(I),this.buildAll()}prev(){const{value:I}=this;Vq(I,-1),this.buildAll()}next(){const{value:I}=this;Vq(I,1),this.buildAll()}buildAll(){this.buildHeaderLeft(),this.buildBody()}buildHeaderLeft(){const{value:I}=this;this.headerLeftEl.html(`${ot("calendar.months")[I.getMonth()]} ${I.getFullYear()}`)}buildBody(){const{value:I,cvalue:g,bodyEl:C}=this,e=cug(I.getFullYear(),I.getMonth(),g).map(A=>{const s=A.map(l=>{let n="cell";return l.disabled&&(n+=" disabled"),l.active&&(n+=" active"),Yg("td","").child(Yg("div",n).on("click.stop",()=>{this.selectChange(l.d)}).child(l.d.getDate().toString()))});return Yg("tr","").children(...s)});C.html("").children(...e)}}class rug{constructor(){this.calendar=new dug(new Date),this.el=Yg("div",`${Lg}-datepicker`).child(this.calendar.el).hide()}setValue(I){const{calendar:g}=this;return typeof I=="string"?/^\d{4}-\d{1,2}-\d{1,2}$/.test(I)&&g.setValue(new Date(I.replace(new RegExp("-","g"),"/"))):I instanceof Date&&g.setValue(I),this}change(I){this.calendar.selectChange=g=>{I(g),this.hide()}}show(){this.el.show()}hide(){this.el.hide()}}function oV(){const{inputText:t}=this;if(!/^\s*$/.test(t)){const{textlineEl:I,textEl:g,areaOffset:C}=this,i=t.split(`
`),e=Math.max(...i.map(d=>d.length)),s=I.offset().width/t.length,l=(e+1)*s+5,n=this.viewFn().width-C.left-s;let a=i.length;if(l>C.width){let d=l;l>n&&(d=n,a+=parseInt(l/n,10),a+=l%n>0?1:0),g.css("width",`${d}px`)}a*=this.rowHeight,a>C.height&&g.css("height",`${a}px`)}}function hug({target:t},I){const{value:g,selectionEnd:C}=t,i=`${g.slice(0,C)}${I}${g.slice(C)}`;t.value=i,t.setSelectionRange(C+1,C+1),this.inputText=i,this.textlineEl.html(i),oV.call(this)}function bug(t){const{keyCode:I,altKey:g}=t;I!==13&&I!==9&&t.stopPropagation(),I===13&&g&&(hug.call(this,t,`
`),t.stopPropagation()),I===13&&!g&&t.preventDefault()}function uug(t){const I=t.target.value,{suggest:g,textlineEl:C,validator:i}=this,{cell:e}=this;if(e!==null)if("editable"in e&&e.editable===!0||e.editable===void 0){if(this.inputText=I,i)i.type==="list"?g.search(I):g.hide();else{const A=I.lastIndexOf("=");A!==-1?g.search(I.substring(A+1)):g.hide()}C.html(I),oV.call(this),this.change("input",I)}else t.target.value=e.text;else{if(this.inputText=I,i)i.type==="list"?g.search(I):g.hide();else{const A=I.lastIndexOf("=");A!==-1?g.search(I.substring(A+1)):g.hide()}C.html(I),oV.call(this),this.change("input",I)}}function mug(t){const{el:I}=this.textEl;setTimeout(()=>{I.focus(),I.setSelectionRange(t,t)},0)}function _tg(t,I){const{textEl:g,textlineEl:C}=this;g.el.blur(),g.val(t),C.html(t),mug.call(this,I)}function Zug(t){const{inputText:I,validator:g}=this;let C=0;if(g&&g.type==="list")this.inputText=t,C=this.inputText.length;else{const i=I.lastIndexOf("="),e=I.substring(0,i+1);let A=I.substring(i+1);A.indexOf(")")!==-1?A=A.substring(A.indexOf(")")):A="",this.inputText=`${e+t.key}(`,C=this.inputText.length,this.inputText+=`)${A}`}_tg.call(this,this.inputText,C)}function Gug(){this.suggest.setItems(this.formulas)}function wug(t){let I=t.getMonth()+1,g=t.getDate();return I<10&&(I=`0${I}`),g<10&&(g=`0${g}`),`${t.getFullYear()}-${I}-${g}`}class pug{constructor(I,g,C){this.viewFn=g,this.rowHeight=C,this.formulas=I,this.suggest=new Ptg(I,i=>{Zug.call(this,i)}),this.datepicker=new rug,this.datepicker.change(i=>{this.setText(wug(i)),this.clear()}),this.areaEl=Yg("div",`${Lg}-editor-area`).children(this.textEl=Yg("textarea","").on("input",i=>uug.call(this,i)).on("paste.stop",()=>{}).on("keydown",i=>bug.call(this,i)),this.textlineEl=Yg("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",()=>{}).on("mousedown.stop",()=>{}),this.el=Yg("div",`${Lg}-editor`).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=()=>{}}setFreezeLengths(I,g){this.freeze.w=I,this.freeze.h=g}clear(){this.inputText!==""&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),Gug.call(this),this.datepicker.hide()}setOffset(I,g="top"){const{textEl:C,areaEl:i,suggest:e,freeze:A,el:s}=this;if(I){this.areaOffset=I;const{left:l,top:n,width:a,height:d,l:o,t:c}=I,r={left:0,top:0};A.w>o&&A.h>c||(A.w<o&&A.h<c?(r.left=A.w,r.top=A.h):A.w>o?r.top=A.h:A.h>c&&(r.left=A.w)),s.offset(r),i.offset({left:l-r.left-.8,top:n-r.top-.8}),C.offset({width:a-9+.8,height:d-3+.8});const h={left:0};h[g]=d,e.setOffset(h),e.hide()}}setCell(I,g){const{el:C,datepicker:i,suggest:e}=this;C.show(),this.cell=I;const A=I&&I.text||"";if(this.setText(A),this.validator=g,g){const{type:s}=g;s==="date"&&(i.show(),/^\s*$/.test(A)||i.setValue(A)),s==="list"&&(e.setItems(g.values()),e.search(""))}}setText(I){this.inputText=I,_tg.call(this,I,I.length),oV.call(this)}}class gd extends ed{constructor(I,g=""){super("div",`${Lg}-button ${g}`),this.child(ot(`button.${I}`))}}function cV(){return window.devicePixelRatio||1}function S9(){return cV()-.5}function SI(t){return parseInt(t*cV(),10)}function Xr(t){const I=SI(t);return I>0?I-.5:.5}class Bug{constructor(I,g,C,i,e=0){this.x=I,this.y=g,this.width=C,this.height=i,this.padding=e,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}setBorders({top:I,bottom:g,left:C,right:i}){I&&(this.borderTop=I),i&&(this.borderRight=i),g&&(this.borderBottom=g),C&&(this.borderLeft=C)}innerWidth(){return this.width-this.padding*2-2}innerHeight(){return this.height-this.padding*2-2}textx(I){const{width:g,padding:C}=this;let{x:i}=this;return I==="left"?i+=C:I==="center"?i+=g/2:I==="right"&&(i+=g-C),i}texty(I,g){const{height:C,padding:i}=this;let{y:e}=this;return I==="top"?e+=i:I==="middle"?e+=C/2-g/2:I==="bottom"&&(e+=C-i-g),e}topxys(){const{x:I,y:g,width:C}=this;return[[I,g],[I+C,g]]}rightxys(){const{x:I,y:g,width:C,height:i}=this;return[[I+C,g],[I+C,g+i]]}bottomxys(){const{x:I,y:g,width:C,height:i}=this;return[[I,g+i],[I+C,g+i]]}leftxys(){const{x:I,y:g,height:C}=this;return[[I,g],[I,g+C]]}}function Mq(t,I,g,C,i,e,A){const s={x:0,y:0};t==="underline"?i==="bottom"?s.y=0:i==="top"?s.y=-(e+2):s.y=-e/2:t==="strike"&&(i==="bottom"?s.y=e/2:i==="top"&&(s.y=-(e/2+2))),C==="center"?s.x=A/2:C==="right"&&(s.x=A),this.line([I-s.x,g-s.y],[I-s.x+A,g-s.y])}class qtg{constructor(I,g,C){this.el=I,this.ctx=I.getContext("2d"),this.resize(g,C),this.ctx.scale(cV(),cV())}resize(I,g){this.el.style.width=`${I}px`,this.el.style.height=`${g}px`,this.el.width=SI(I),this.el.height=SI(g)}clear(){const{width:I,height:g}=this.el;return this.ctx.clearRect(0,0,I,g),this}attr(I){return Object.assign(this.ctx,I),this}save(){return this.ctx.save(),this.ctx.beginPath(),this}restore(){return this.ctx.restore(),this}beginPath(){return this.ctx.beginPath(),this}translate(I,g){return this.ctx.translate(SI(I),SI(g)),this}scale(I,g){return this.ctx.scale(I,g),this}clearRect(I,g,C,i){return this.ctx.clearRect(I,g,C,i),this}fillRect(I,g,C,i){return this.ctx.fillRect(SI(I)-.5,SI(g)-.5,SI(C),SI(i)),this}fillText(I,g,C){return this.ctx.fillText(I,SI(g),SI(C)),this}text(I,g,C={},i=!0){const{ctx:e}=this,{align:A,valign:s,font:l,color:n,strike:a,underline:d}=C,o=g.textx(A);e.save(),e.beginPath(),this.attr({textAlign:A,textBaseline:s,font:`${l.italic?"italic":""} ${l.bold?"bold":""} ${SI(l.size)}px ${l.name}`,fillStyle:n,strokeStyle:n});const c=`${I}`.split(`
`),r=g.innerWidth(),h=[];c.forEach(m=>{const Z=e.measureText(m).width;if(i&&Z>SI(r)){let p={w:0,len:0,start:0};for(let Y=0;Y<m.length;Y+=1)p.w>=SI(r)&&(h.push(m.substr(p.start,p.len)),p={w:0,len:0,start:Y}),p.len+=1,p.w+=e.measureText(m[Y]).width+1;p.len>0&&h.push(m.substr(p.start,p.len))}else h.push(m)});const b=(h.length-1)*(l.size+2);let u=g.texty(s,b);return h.forEach(m=>{const Z=e.measureText(m).width;this.fillText(m,o,u),a&&Mq.call(this,"strike",o,u,A,s,l.size,Z),d&&Mq.call(this,"underline",o,u,A,s,l.size,Z),u+=l.size+2}),e.restore(),this}border(I,g){const{ctx:C}=this;return C.lineWidth=S9,C.strokeStyle=g,I==="medium"?C.lineWidth=SI(2)-.5:I==="thick"?C.lineWidth=SI(3):I==="dashed"?C.setLineDash([SI(3),SI(2)]):I==="dotted"?C.setLineDash([SI(1),SI(1)]):I==="double"&&C.setLineDash([SI(2),0]),this}line(...I){const{ctx:g}=this;if(I.length>1){g.beginPath();const[C,i]=I[0];g.moveTo(Xr(C),Xr(i));for(let e=1;e<I.length;e+=1){const[A,s]=I[e];g.lineTo(Xr(A),Xr(s))}g.stroke()}return this}strokeBorders(I){const{ctx:g}=this;g.save();const{borderTop:C,borderRight:i,borderBottom:e,borderLeft:A}=I;C&&(this.border(...C),this.line(...I.topxys())),i&&(this.border(...i),this.line(...I.rightxys())),e&&(this.border(...e),this.line(...I.bottomxys())),A&&(this.border(...A),this.line(...I.leftxys())),g.restore()}dropdown(I){const{ctx:g}=this,{x:C,y:i,width:e,height:A}=I,s=C+e-15,l=i+A-15;g.save(),g.beginPath(),g.moveTo(SI(s),SI(l)),g.lineTo(SI(s+8),SI(l)),g.lineTo(SI(s+4),SI(l+6)),g.closePath(),g.fillStyle="rgba(0, 0, 0, .45)",g.fill(),g.restore()}error(I){const{ctx:g}=this,{x:C,y:i,width:e}=I,A=C+e-1;g.save(),g.beginPath(),g.moveTo(SI(A-8),SI(i-1)),g.lineTo(SI(A),SI(i-1)),g.lineTo(SI(A),SI(i+8)),g.closePath(),g.fillStyle="rgba(255, 0, 0, .65)",g.fill(),g.restore()}frozen(I){const{ctx:g}=this,{x:C,y:i,width:e}=I,A=C+e-1;g.save(),g.beginPath(),g.moveTo(SI(A-8),SI(i-1)),g.lineTo(SI(A),SI(i-1)),g.lineTo(SI(A),SI(i+8)),g.closePath(),g.fillStyle="rgba(0, 255, 0, .85)",g.fill(),g.restore()}rect(I,g){const{ctx:C}=this,{x:i,y:e,width:A,height:s,bgcolor:l}=I;C.save(),C.beginPath(),C.fillStyle=l||"#fff",C.rect(Xr(i+1),Xr(e+1),SI(A-2),SI(s-2)),C.clip(),C.fill(),g(),C.restore()}}const Rq=[{key:"Arial",title:"Arial"},{key:"Helvetica",title:"Helvetica"},{key:"Source Sans Pro",title:"Source Sans Pro"},{key:"Comic Sans MS",title:"Comic Sans MS"},{key:"Courier New",title:"Courier New"},{key:"Verdana",title:"Verdana"},{key:"Lato",title:"Lato"}],LD=[{pt:7.5,px:10},{pt:8,px:11},{pt:9,px:12},{pt:10,px:13},{pt:10.5,px:14},{pt:11,px:15},{pt:12,px:16},{pt:14,px:18.7},{pt:15,px:20},{pt:16,px:21.3},{pt:18,px:24},{pt:22,px:29.3},{pt:24,px:32},{pt:26,px:34.7},{pt:36,px:48},{pt:42,px:56}];function Wug(t){for(let I=0;I<LD.length;I+=1){const g=LD[I];if(g.pt===t)return g.px}return t}const yug=t=>{const I=[],g=[];let C=[],i=0,e="",A=1,s="";for(let l=0;l<t.length;l+=1){const n=t.charAt(l);if(n!==" "){if(n>="a"&&n<="z")C.push(n.toUpperCase());else if(n>="0"&&n<="9"||n>="A"&&n<="Z"||n===".")C.push(n);else if(n==='"'){for(l+=1;t.charAt(l)!=='"';)C.push(t.charAt(l)),l+=1;g.push(`"${C.join("")}`),C=[]}else if(n==="-"&&/[+\-*/,(]/.test(s))C.push(n);else{if(n!=="("&&C.length>0&&g.push(C.join("")),n===")"){let a=I.pop();if(i===2)try{const[d,o]=ka(g.pop()),[c,r]=ka(g.pop());let h=0;for(let b=c;b<=d;b+=1)for(let u=r;u<=o;u+=1)g.push(zl(b,u)),h+=1;g.push([a,h])}catch{}else if(i===1||i===3)i===3&&g.push(e),g.push([a,A]),A=1;else for(;a!=="("&&(g.push(a),!(I.length<=0));)a=I.pop();i=0}else if(n==="="||n===">"||n==="<"){const a=t.charAt(l+1);e=n,(a==="="||a==="-")&&(e+=a,l+=1),i=3}else if(n===":")i=2;else if(n===",")i===3&&g.push(e),i=1,A+=1;else if(n==="("&&C.length>0)I.push(C.join(""));else{if(I.length>0&&(n==="+"||n==="-")){let a=I[I.length-1];if(a!=="("&&g.push(I.pop()),a==="*"||a==="/")for(;I.length>0&&(a=I[I.length-1],a!=="(");)g.push(I.pop())}else if(I.length>0){const a=I[I.length-1];(a==="*"||a==="/")&&g.push(I.pop())}I.push(n)}C=[]}s=n}}for(C.length>0&&g.push(C.join(""));I.length>0;)g.push(I.pop());return g},Yug=(t,I)=>{const[g]=t;let C=t;if(g==='"')return t.substring(1);let i=1;if(g==="-"&&(C=t.substring(1),i=-1),C[0]>="0"&&C[0]<="9")return i*Number(C);const[e,A]=ka(C);return i*I(e,A)},Nug=(t,I,g,C)=>{const i=[];for(let e=0;e<t.length;e+=1){const A=t[e],s=A[0];if(A==="+"){const l=i.pop();i.push(Jo("+",i.pop(),l))}else if(A==="-")if(i.length===1){const l=i.pop();i.push(Jo("*",l,-1))}else{const l=i.pop();i.push(Jo("-",i.pop(),l))}else if(A==="*")i.push(Jo("*",i.pop(),i.pop()));else if(A==="/"){const l=i.pop();i.push(Jo("/",i.pop(),l))}else if(s==="="||s===">"||s==="<"){let l=i.pop();Number.isNaN(l)||(l=Number(l));let n=i.pop();Number.isNaN(n)||(n=Number(n));let a=!1;s==="="?a=n===l:A===">"?a=n>l:A===">="?a=n>=l:A==="<"?a=n<l:A==="<="&&(a=n<=l),i.push(a)}else if(Array.isArray(A)){const[l,n]=A,a=[];for(let d=0;d<n;d+=1)a.push(i.pop());i.push(I[l].render(a.reverse()))}else{if(C.includes(A))return 0;(s>="a"&&s<="z"||s>="A"&&s<="Z")&&C.push(A),i.push(Yug(A,g)),C.pop()}}return i[0]},$tg=(t,I,g,C=[])=>{if(t[0]==="="){const i=yug(t.substring(1));return i.length<=0?t:Nug(i,I,(e,A)=>$tg(g(e,A),I,g,C),C)}return t},Vug={render:$tg},D9=[{key:"SUM",title:PI("formula.sum"),render:t=>t.reduce((I,g)=>Jo("+",I,g),0)},{key:"AVERAGE",title:PI("formula.average"),render:t=>t.reduce((I,g)=>Number(I)+Number(g),0)/t.length},{key:"MAX",title:PI("formula.max"),render:t=>Math.max(...t.map(I=>Number(I)))},{key:"MIN",title:PI("formula.min"),render:t=>Math.min(...t.map(I=>Number(I)))},{key:"IF",title:PI("formula._if"),render:([t,I,g])=>t?I:g},{key:"AND",title:PI("formula.and"),render:t=>t.every(I=>I)},{key:"OR",title:PI("formula.or"),render:t=>t.some(I=>I)},{key:"CONCAT",title:PI("formula.concat"),render:t=>t.join("")}],Mug=D9,gig={};D9.forEach(t=>{gig[t.key]=t});const Sr=t=>t,TY=t=>{if(/^(-?\d*.?\d*)$/.test(t)){const I=Number(t).toFixed(2).toString(),[g,...C]=I.split("\\.");return[g.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),...C]}return t},tm=[{key:"normal",title:PI("format.normal"),type:"string",render:Sr},{key:"text",title:PI("format.text"),type:"string",render:Sr},{key:"number",title:PI("format.number"),type:"number",label:"1,000.12",render:TY},{key:"percent",title:PI("format.percent"),type:"number",label:"10.12%",render:t=>`${t}%`},{key:"rmb",title:PI("format.rmb"),type:"number",label:"￥10.00",render:t=>`￥${TY(t)}`},{key:"usd",title:PI("format.usd"),type:"number",label:"$10.00",render:t=>`$${TY(t)}`},{key:"eur",title:PI("format.eur"),type:"number",label:"€10.00",render:t=>`€${TY(t)}`},{key:"date",title:PI("format.date"),type:"date",label:"26/09/2008",render:Sr},{key:"time",title:PI("format.time"),type:"date",label:"15:59:00",render:Sr},{key:"datetime",title:PI("format.datetime"),type:"date",label:"26/09/2008 15:59:00",render:Sr},{key:"duration",title:PI("format.duration"),type:"date",label:"24:01:00",render:Sr}],Iig={};tm.forEach(t=>{Iig[t.key]=t});const Rug=5,fug={fillStyle:"#f4f5f8"},Hug={fillStyle:"#fff",lineWidth:S9,strokeStyle:"#e6e6e6"};function Xug(){return{textAlign:"center",textBaseline:"middle",font:`500 ${SI(12)}px Source Sans Pro`,fillStyle:"#585757",lineWidth:S9(),strokeStyle:"#e6e6e6"}}function Cig(t,I,g,C=0){const{left:i,top:e,width:A,height:s}=t.cellRect(I,g);return new Bug(i,e+C,A,s,Rug)}function dV(t,I,g,C,i=0){const{sortedRowMap:e,rows:A,cols:s}=I;if(A.isHide(g)||s.isHide(C))return;let l=g;e.has(g)&&(l=e.get(g));const n=I.getCell(l,C);if(n===null)return;let a=!1;"editable"in n&&n.editable===!1&&(a=!0);const d=I.getCellStyleOrDefault(l,C),o=Cig(I,g,C,i);o.bgcolor=d.bgcolor,d.border!==void 0&&(o.setBorders(d.border),t.strokeBorders(o)),t.rect(o,()=>{let c="";I.settings.evalPaused?c=n.text||"":c=Vug.render(n.text||"",gig,(b,u)=>I.getCellTextOrDefault(u,b)),d.format&&(c=Iig[d.format].render(c));const r=Object.assign({},d.font);r.size=Wug(r.size),t.text(c,o,{align:d.align,valign:d.valign,font:r,color:d.color,strike:d.strike,underline:d.underline},d.textwrap),I.validations.getError(g,C)&&t.error(o),a&&t.frozen(o)})}function Sug(t){const{data:I,draw:g}=this;if(t){const{autoFilter:C}=I;if(!C.active())return;const i=C.hrange();t.intersects(i)&&i.each((e,A)=>{const s=Cig(I,e,A);g.dropdown(s)})}}function xY(t,I,g,C,i){const{draw:e,data:A}=this;e.save(),e.translate(I,g).translate(C,i);const{exceptRowSet:s}=A,l=d=>{const o=s.has(d);if(o){const c=A.rows.getHeight(d);e.translate(0,-c)}return!o},n=A.exceptRowTotalHeight(t.sri,t.eri);e.save(),e.translate(0,-n),t.each((d,o)=>{dV(e,A,d,o)},d=>l(d)),e.restore();const a=new Set;e.save(),e.translate(0,-n),A.eachMergesInView(t,({sri:d,sci:o,eri:c})=>{if(!s.has(d))dV(e,A,d,o);else if(!a.has(d)){a.add(d);const r=A.rows.sumHeight(d,c+1);e.translate(0,-r)}}),e.restore(),Sug.call(this,t),e.restore()}function fq(t,I,g,C){const{draw:i}=this;i.save(),i.attr({fillStyle:"rgba(75, 137, 255, 0.08)"}).fillRect(t,I,g,C),i.restore()}function jY(t,I,g,C,i,e){const{draw:A,data:s}=this,l=I.h,n=I.w,a=e+C,d=i+g;A.save(),A.attr(fug),(t==="all"||t==="left")&&A.fillRect(0,a,g,l),(t==="all"||t==="top")&&A.fillRect(d,0,n,C);const{sri:o,sci:c,eri:r,eci:h}=s.selector.range;A.attr(Xug()),(t==="all"||t==="left")&&(s.rowEach(I.sri,I.eri,(b,u,m)=>{const Z=a+u,p=b;A.line([0,Z],[g,Z]),o<=p&&p<r+1&&fq.call(this,0,Z,g,m),A.fillText(p+1,g/2,Z+m/2),b>0&&s.rows.isHide(b-1)&&(A.save(),A.attr({strokeStyle:"#c6c6c6"}),A.line([5,Z+5],[g-5,Z+5]),A.restore())}),A.line([0,l+a],[g,l+a]),A.line([g,a],[g,l+a])),(t==="all"||t==="top")&&(s.colEach(I.sci,I.eci,(b,u,m)=>{const Z=d+u,p=b;A.line([Z,0],[Z,C]),c<=p&&p<h+1&&fq.call(this,Z,0,m,C),A.fillText(Jtg(p),Z+m/2,C/2),b>0&&s.cols.isHide(b-1)&&(A.save(),A.attr({strokeStyle:"#c6c6c6"}),A.line([Z+5,5],[Z+5,C-5]),A.restore())}),A.line([n+d,0],[n+d,C]),A.line([0,C],[n+d,C])),A.restore()}function Dug(t,I){const{draw:g}=this;g.save(),g.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,t,I),g.restore()}function QY({sri:t,sci:I,eri:g,eci:C,w:i,h:e},A,s,l,n){const{draw:a,data:d}=this,{settings:o}=d;if(a.save(),a.attr(Hug).translate(A+l,s+n),!o.showGrid){a.restore();return}d.rowEach(t,g,(c,r,h)=>{c!==t&&a.line([0,r],[i,r]),c===g&&a.line([0,r+h],[i,r+h])}),d.colEach(I,C,(c,r,h)=>{c!==I&&a.line([r,0],[r,e]),c===C&&a.line([r+h,0],[r+h,e])}),a.restore()}function Kug(t,I,g,C){const{draw:i,data:e}=this,A=e.viewWidth()-t,s=e.viewHeight()-I;i.save().translate(t,I).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),i.line([0,C],[A,C]),i.line([g,0],[g,s]),i.restore()}class Fug{constructor(I,g){this.el=I,this.draw=new qtg(I,g.viewWidth(),g.viewHeight()),this.data=g}resetData(I){this.data=I,this.render()}render(){const{data:I}=this,{rows:g,cols:C}=I,i=C.indexWidth,e=g.height;this.draw.resize(I.viewWidth(),I.viewHeight()),this.clear();const A=I.viewRange(),s=I.freezeTotalWidth(),l=I.freezeTotalHeight(),{x:n,y:a}=I.scroll;QY.call(this,A,i,e,s,l),xY.call(this,A,i,e,-n,-a),jY.call(this,"all",A,i,e,s,l),Dug.call(this,i,e);const[d,o]=I.freeze;if(d>0||o>0){if(d>0){const r=A.clone();r.sri=0,r.eri=d-1,r.h=l,QY.call(this,r,i,e,s,0),xY.call(this,r,i,e,-n,0),jY.call(this,"top",r,i,e,s,0)}if(o>0){const r=A.clone();r.sci=0,r.eci=o-1,r.w=s,QY.call(this,r,i,e,0,l),jY.call(this,"left",r,i,e,0,l),xY.call(this,r,i,e,0,-a)}const c=I.freezeViewRange();QY.call(this,c,i,e,0,0),jY.call(this,"all",c,i,e,0,0),xY.call(this,c,i,e,0,0),Kug.call(this,i,e,s,l)}}clear(){this.draw.clear()}}const FN=[["A3",11.69,16.54],["A4",8.27,11.69],["A5",5.83,8.27],["B4",9.84,13.9],["B5",6.93,9.84]],vD=["landscape","portrait"];function rV(t){return parseInt(96*t,10)}function Hq(t){t==="cancel"?this.el.hide():this.toPrint()}function kug(t){const{paper:I}=this,{value:g}=t.target,C=FN[g];I.w=rV(C[1]),I.h=rV(C[2]),this.preview()}function zug(t){const{paper:I}=this,{value:g}=t.target,C=vD[g];I.orientation=C,this.preview()}let Jug=class{constructor(I){this.paper={w:rV(FN[0][1]),h:rV(FN[0][2]),padding:50,orientation:vD[0],get width(){return this.orientation==="landscape"?this.h:this.w},get height(){return this.orientation==="landscape"?this.w:this.h}},this.data=I,this.el=Yg("div",`${Lg}-print`).children(Yg("div",`${Lg}-print-bar`).children(Yg("div","-title").child("Print settings"),Yg("div","-right").children(Yg("div",`${Lg}-buttons`).children(new gd("cancel").on("click",Hq.bind(this,"cancel")),new gd("next","primary").on("click",Hq.bind(this,"next"))))),Yg("div",`${Lg}-print-content`).children(this.contentEl=Yg("div","-content"),Yg("div","-sider").child(Yg("form","").children(Yg("fieldset","").children(Yg("label","").child(`${ot("print.size")}`),Yg("select","").children(...FN.map((g,C)=>Yg("option","").attr("value",C).child(`${g[0]} ( ${g[1]}''x${g[2]}'' )`))).on("change",kug.bind(this))),Yg("fieldset","").children(Yg("label","").child(`${ot("print.orientation")}`),Yg("select","").children(...vD.map((g,C)=>Yg("option","").attr("value",C).child(`${ot("print.orientations")[C]}`))).on("change",zug.bind(this))))))).hide()}resetData(I){this.data=I}preview(){const{data:I,paper:g}=this,{width:C,height:i,padding:e}=g,A=C-e*2,s=i-e*2,l=I.contentRange(),n=parseInt(l.h/s,10)+1,a=A/l.w;let d=e;const o=e;a>1&&(d+=(A-l.w)/2);let c=0,r=0;this.contentEl.html(""),this.canvases=[];const h={sri:0,sci:0,eri:0,eci:0};for(let b=0;b<n;b+=1){let u=0,m=0;const Z=Yg("div",`${Lg}-canvas-card`),p=Yg("canvas",`${Lg}-canvas`);this.canvases.push(p.el);const Y=new qtg(p.el,C,i);for(Y.save(),Y.translate(d,o),a<1&&Y.scale(a,a);c<=l.eri;c+=1){const X=I.rows.getHeight(c);if(u+=X,u<s)for(let H=0;H<=l.eci;H+=1)dV(Y,I,c,H,r),h.eci=H;else{m=-(u-X);break}}h.eri=c,Y.restore(),Y.save(),Y.translate(d,o),a<1&&Y.scale(a,a);const R=r;I.eachMergesInView(h,({sri:X,sci:H})=>{dV(Y,I,X,H,R)}),Y.restore(),h.sri=h.eri,h.sci=h.eci,r+=m,this.contentEl.child(Yg("div",`${Lg}-canvas-card-wraper`).child(Z.child(p)))}this.el.show()}toPrint(){this.el.hide();const{paper:I}=this,g=Yg("iframe","").hide(),{el:C}=g;window.document.body.appendChild(C);const{contentWindow:i}=C,e=i.document,A=document.createElement("style");A.innerHTML=`
      @page { size: ${I.width}px ${I.height}px; };
      canvas {
        page-break-before: auto;        
        page-break-after: always;
        image-rendering: pixelated;
      };
    `,e.head.appendChild(A),this.canvases.forEach(s=>{const l=s.cloneNode(!1);l.getContext("2d").drawImage(s,0,0),e.body.appendChild(l)}),i.print()}};const Lug=[{key:"copy",title:PI("contextmenu.copy"),label:"Ctrl+C"},{key:"cut",title:PI("contextmenu.cut"),label:"Ctrl+X"},{key:"paste",title:PI("contextmenu.paste"),label:"Ctrl+V"},{key:"paste-value",title:PI("contextmenu.pasteValue"),label:"Ctrl+Shift+V"},{key:"paste-format",title:PI("contextmenu.pasteFormat"),label:"Ctrl+Alt+V"},{key:"divider"},{key:"insert-row",title:PI("contextmenu.insertRow")},{key:"insert-column",title:PI("contextmenu.insertColumn")},{key:"divider"},{key:"delete-row",title:PI("contextmenu.deleteRow")},{key:"delete-column",title:PI("contextmenu.deleteColumn")},{key:"delete-cell-text",title:PI("contextmenu.deleteCellText")},{key:"hide",title:PI("contextmenu.hide")},{key:"divider"},{key:"validation",title:PI("contextmenu.validation")},{key:"divider"},{key:"cell-printable",title:PI("contextmenu.cellprintable")},{key:"cell-non-printable",title:PI("contextmenu.cellnonprintable")},{key:"divider"},{key:"cell-editable",title:PI("contextmenu.celleditable")},{key:"cell-non-editable",title:PI("contextmenu.cellnoneditable")}];function vug(t){return t.key==="divider"?Yg("div",`${Lg}-item divider`):Yg("div",`${Lg}-item`).on("click",()=>{this.itemClick(t.key),this.hide()}).children(t.title(),Yg("div","label").child(t.label||""))}function Tug(){return Lug.map(t=>vug.call(this,t))}let xug=class{constructor(I,g=!1){this.menuItems=Tug.call(this),this.el=Yg("div",`${Lg}-contextmenu`).children(...this.menuItems).hide(),this.viewFn=I,this.itemClick=()=>{},this.isHide=g,this.setMode("range")}setMode(I){const g=this.menuItems[12];I==="row-col"?g.show():g.hide()}hide(){const{el:I}=this;I.hide(),B0(I)}setPosition(I,g){if(this.isHide)return;const{el:C}=this,{width:i}=C.show().offset(),e=this.viewFn(),A=e.height/2;let s=I;e.width-I<=i&&(s-=i),C.css("left",`${s}px`),g>A?C.css("bottom",`${e.height-g}px`).css("max-height",`${g}px`).css("top","auto"):C.css("top",`${g}px`).css("max-height",`${e.height-g}px`).css("bottom","auto"),AG(C)}};function jug(t,I){if(I.classList.contains("active"))return;const{left:g,top:C,width:i,height:e}=I.getBoundingClientRect(),A=Yg("div",`${Lg}-tooltip`).html(t).show();document.body.appendChild(A.el);const s=A.box();A.css("left",`${g+i/2-s.width/2}px`).css("top",`${C+e+2}px`),ji(I,"mouseleave",()=>{document.body.contains(A.el)&&document.body.removeChild(A.el)}),ji(I,"click",()=>{document.body.contains(A.el)&&document.body.removeChild(A.el)})}class K9{constructor(I,g,C){this.tip=ot(`toolbar.${I.replace(/-[a-z]/g,i=>i[1].toUpperCase())}`),g&&(this.tip+=` (${g})`),this.tag=I,this.shortcut=g,this.value=C,this.el=this.element(),this.change=()=>{}}element(){const{tip:I}=this;return Yg("div",`${Lg}-toolbar-btn`).on("mouseenter",g=>{jug(I,g.target)}).attr("data-tooltip",I)}setState(){}}class Rs extends K9{dropdown(){}getValue(I){return I}element(){const{tag:I}=this;return this.dd=this.dropdown(),this.dd.change=g=>this.change(I,this.getValue(g)),super.element().child(this.dd)}setState(I){I&&(this.value=I,this.dd.setTitle(I))}}class fs extends ed{constructor(I,g,C,i,...e){super("div",`${Lg}-dropdown ${i}`),this.title=I,this.change=()=>{},this.headerClick=()=>{},typeof I=="string"?this.title=Yg("div",`${Lg}-dropdown-title`).child(I):C&&this.title.addClass("arrow-left"),this.contentEl=Yg("div",`${Lg}-dropdown-content`).css("width",g).hide(),this.setContentChildren(...e),this.headerEl=Yg("div",`${Lg}-dropdown-header`),this.headerEl.on("click",()=>{this.contentEl.css("display")!=="block"?this.show():this.hide()}).children(this.title,C?Yg("div",`${Lg}-icon arrow-right`).child(Yg("div",`${Lg}-icon-img arrow-down`)):""),this.children(this.headerEl,this.contentEl)}setContentChildren(...I){this.contentEl.html(""),I.length>0&&this.contentEl.children(...I)}setTitle(I){this.title.html(I),this.hide()}show(){const{contentEl:I}=this;I.show(),this.parent().active(),AG(this.parent(),()=>{this.hide()})}hide(){this.parent().active(!1),this.contentEl.hide(),B0(this.parent())}}function Qug(t){return Yg("div",`${Lg}-item`).child(new hi(t))}class tig extends fs{constructor(I,g){const C=new hi(`align-${g}`),i=I.map(e=>Qug(`align-${e}`).on("click",()=>{this.setTitle(e),this.change(e)}));super(C,"auto",!0,"bottom-left",...i)}setTitle(I){this.title.setName(`align-${I}`),this.hide()}}class Oug extends Rs{constructor(I){super("align","",I)}dropdown(){const{value:I}=this;return new tig(["left","center","right"],I)}}class Uug extends Rs{constructor(I){super("valign","",I)}dropdown(){const{value:I}=this;return new tig(["top","middle","bottom"],I)}}class Ul extends K9{element(){const{tag:I}=this;return super.element().child(new hi(I)).on("click",()=>this.click())}click(){this.change(this.tag,this.toggle())}setState(I){this.el.active(I)}toggle(){return this.el.toggle()}active(){return this.el.hasClass("active")}}class Eug extends Ul{constructor(){super("autofilter")}setState(){}}class Pug extends Ul{constructor(){super("font-bold","Ctrl+B")}}class _ug extends Ul{constructor(){super("font-italic","Ctrl+I")}}class qug extends Ul{constructor(){super("strike","Ctrl+U")}}class $ug extends Ul{constructor(){super("underline","Ctrl+U")}}const gmg=["#ffffff","#000100","#e7e5e6","#445569","#5b9cd6","#ed7d31","#a5a5a5","#ffc001","#4371c6","#71ae47"],Img=[["#f2f2f2","#7f7f7f","#d0cecf","#d5dce4","#deeaf6","#fce5d5","#ededed","#fff2cd","#d9e2f3","#e3efd9"],["#d8d8d8","#595959","#afabac","#adb8ca","#bdd7ee","#f7ccac","#dbdbdb","#ffe59a","#b3c6e7","#c5e0b3"],["#bfbfbf","#3f3f3f","#756f6f","#8596b0","#9cc2e6","#f4b184","#c9c9c9","#fed964","#8eaada","#a7d08c"],["#a5a5a5","#262626","#3a3839","#333f4f","#2e75b5","#c45a10","#7b7b7b","#bf8e01","#2f5596","#538136"],["#7f7f7f","#0c0c0c","#171516","#222a35","#1f4e7a","#843c0a","#525252","#7e6000","#203864","#365624"]],Cmg=["#c00000","#fe0000","#fdc101","#ffff01","#93d051","#00b04e","#01b0f1","#0170c1","#012060","#7030a0"];function yX(t){return Yg("td","").child(Yg("div",`${Lg}-color-palette-cell`).on("click.stop",()=>this.change(t)).css("background-color",t))}class tmg{constructor(){this.el=Yg("div",`${Lg}-color-palette`),this.change=()=>{};const I=Yg("table","").children(Yg("tbody","").children(Yg("tr",`${Lg}-theme-color-placeholders`).children(...gmg.map(g=>yX.call(this,g))),...Img.map(g=>Yg("tr",`${Lg}-theme-colors`).children(...g.map(C=>yX.call(this,C)))),Yg("tr",`${Lg}-standard-colors`).children(...Cmg.map(g=>yX.call(this,g)))));this.el.child(I)}}class F9 extends fs{constructor(I,g){const C=new hi(I).css("height","16px").css("border-bottom",`3px solid ${g}`),i=new tmg;i.change=e=>{this.setTitle(e),this.change(e)},super(C,"auto",!1,"bottom-left",i.el)}setTitle(I){this.title.css("border-color",I),this.hide()}}const img=[["thin",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" style="user-select: none;"></line></svg>'],["medium",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="2" style="user-select: none;"><line x1="0" y1="1.0" x2="50" y2="1.0" stroke-width="2" stroke="black" style="user-select: none;"></line></svg>'],["thick",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="3" style="user-select: none;"><line x1="0" y1="1.5" x2="50" y2="1.5" stroke-width="3" stroke="black" style="user-select: none;"></line></svg>'],["dashed",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" stroke-dasharray="2" style="user-select: none;"></line></svg>'],["dotted",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" stroke-dasharray="1" style="user-select: none;"></line></svg>']];class emg extends fs{constructor(I){const g=new hi("line-type");let C=0;const i=img.map((e,A)=>Yg("div",`${Lg}-item state ${I===e[0]?"checked":""}`).on("click",()=>{i[C].toggle("checked"),i[A].toggle("checked"),C=A,this.hide(),this.change(e)}).child(Yg("div",`${Lg}-line-type`).html(e[1])));super(g,"auto",!1,"bottom-left",...i)}}function Xq(...t){return Yg("table","").child(Yg("tbody","").children(...t))}function Sq(t){return Yg("td","").child(Yg("div",`${Lg}-border-palette-cell`).child(new hi(`border-${t}`)).on("click",()=>{this.mode=t;const{mode:I,style:g,color:C}=this;this.change({mode:I,style:g,color:C})}))}class Amg{constructor(){this.color="#000",this.style="thin",this.mode="all",this.change=()=>{},this.ddColor=new F9("line-color",this.color),this.ddColor.change=g=>{this.color=g},this.ddType=new emg(this.style),this.ddType.change=([g])=>{this.style=g},this.el=Yg("div",`${Lg}-border-palette`);const I=Xq(Yg("tr","").children(Yg("td",`${Lg}-border-palette-left`).child(Xq(Yg("tr","").children(...["all","inside","horizontal","vertical","outside"].map(g=>Sq.call(this,g))),Yg("tr","").children(...["left","top","right","bottom","none"].map(g=>Sq.call(this,g))))),Yg("td",`${Lg}-border-palette-right`).children(Yg("div",`${Lg}-toolbar-btn`).child(this.ddColor.el),Yg("div",`${Lg}-toolbar-btn`).child(this.ddType.el))));this.el.child(I)}}class smg extends fs{constructor(){const I=new hi("border-all"),g=new Amg;g.change=C=>{this.change(C),this.hide()},super(I,"auto",!1,"bottom-left",g.el)}}class lmg extends Rs{constructor(){super("border")}dropdown(){return new smg}}class gM extends K9{element(){return super.element().child(new hi(this.tag)).on("click",()=>this.change(this.tag))}setState(I){this.el.disabled(I)}}class nmg extends gM{constructor(){super("clearformat")}}class amg extends Ul{constructor(){super("paintformat")}setState(){}}class omg extends Rs{constructor(I){super("color",void 0,I)}dropdown(){const{tag:I,value:g}=this;return new F9(I,g)}}class cmg extends Rs{constructor(I){super("bgcolor",void 0,I)}dropdown(){const{tag:I,value:g}=this;return new F9(I,g)}}class dmg extends fs{constructor(){const I=LD.map(g=>Yg("div",`${Lg}-item`).on("click",()=>{this.setTitle(`${g.pt}`),this.change(g)}).child(`${g.pt}`));super("10","60px",!0,"bottom-left",...I)}}let rmg=class extends Rs{constructor(){super("font-size")}getValue(I){return I.pt}dropdown(){return new dmg}};class hmg extends fs{constructor(){const I=Rq.map(g=>Yg("div",`${Lg}-item`).on("click",()=>{this.setTitle(g.title),this.change(g)}).child(g.title));super(Rq[0].title,"160px",!0,"bottom-left",...I)}}class bmg extends Rs{constructor(){super("font-name")}getValue(I){return I.key}dropdown(){return new hmg}}class umg extends fs{constructor(){let I=tm.slice(0);I.splice(2,0,{key:"divider"}),I.splice(8,0,{key:"divider"}),I=I.map(g=>{const C=Yg("div",`${Lg}-item`);return g.key==="divider"?C.addClass("divider"):(C.child(g.title()).on("click",()=>{this.setTitle(g.title()),this.change(g)}),g.label&&C.child(Yg("div","label").html(g.label))),C}),super("Normal","220px",!0,"bottom-left",...I)}setTitle(I){for(let g=0;g<tm.length;g+=1)tm[g].key===I&&this.title.html(tm[g].title());this.hide()}}let mmg=class extends Rs{constructor(){super("format")}getValue(I){return I.key}dropdown(){return new umg}};class Zmg extends fs{constructor(){const I=D9.map(g=>Yg("div",`${Lg}-item`).on("click",()=>{this.hide(),this.change(g)}).child(g.key));super(new hi("formula"),"180px",!0,"bottom-left",...I)}}class Gmg extends Rs{constructor(){super("formula")}getValue(I){return I.key}dropdown(){return new Zmg}}class wmg extends Ul{constructor(){super("freeze")}}class pmg extends Ul{constructor(){super("merge")}setState(I,g){this.el.active(I).disabled(g)}}class Bmg extends gM{constructor(){super("redo","Ctrl+Y")}}class Wmg extends gM{constructor(){super("undo","Ctrl+Z")}}class ymg extends gM{constructor(){super("print","Ctrl+P")}}class Ymg extends Ul{constructor(){super("textwrap")}}let Nmg=class extends fs{constructor(){const I=new hi("ellipsis"),g=Yg("div",`${Lg}-toolbar-more`);super(I,"auto",!1,"bottom-right",g),this.moreBtns=g,this.contentEl.css("max-width","420px")}};class Vmg extends Rs{constructor(){super("more"),this.el.hide()}dropdown(){return new Nmg}show(){this.el.show()}hide(){this.el.hide()}}function Dr(){return Yg("div",`${Lg}-toolbar-divider`)}function Mmg(){this.btns2=[],this.items.forEach(t=>{if(Array.isArray(t))t.forEach(({el:I})=>{const g=I.box(),{marginLeft:C,marginRight:i}=I.computedStyle();this.btns2.push([I,g.width+parseInt(C,10)+parseInt(i,10)])});else{const I=t.box(),{marginLeft:g,marginRight:C}=t.computedStyle();this.btns2.push([t,I.width+parseInt(g,10)+parseInt(C,10)])}})}function Dq(){const{el:t,btns:I,moreEl:g,btns2:C}=this,{moreBtns:i,contentEl:e}=g.dd;t.css("width",`${this.widthFn()-60}px`);const A=t.box();let s=160,l=12;const n=[],a=[];C.forEach(([d,o],c)=>{s+=o,c===C.length-1||s<A.width?n.push(d):(l+=o,a.push(d))}),I.html("").children(...n),i.html("").children(...a),e.css("width",`${l}px`),a.length>0?g.show():g.hide()}class Rmg{constructor(I,g,C=!1){this.data=I,this.change=()=>{},this.widthFn=g,this.isHide=C;const i=I.defaultStyle();this.items=[[this.undoEl=new Wmg,this.redoEl=new Bmg,new ymg,this.paintformatEl=new amg,this.clearformatEl=new nmg],Dr(),[this.formatEl=new mmg],Dr(),[this.fontEl=new bmg,this.fontSizeEl=new rmg],Dr(),[this.boldEl=new Pug,this.italicEl=new _ug,this.underlineEl=new $ug,this.strikeEl=new qug,this.textColorEl=new omg(i.color)],Dr(),[this.fillColorEl=new cmg(i.bgcolor),this.borderEl=new lmg,this.mergeEl=new pmg],Dr(),[this.alignEl=new Oug(i.align),this.valignEl=new Uug(i.valign),this.textwrapEl=new Ymg],Dr(),[this.freezeEl=new wmg,this.autofilterEl=new Eug,this.formulaEl=new Gmg,this.moreEl=new Vmg]],this.el=Yg("div",`${Lg}-toolbar`),this.btns=Yg("div",`${Lg}-toolbar-btns`),this.items.forEach(e=>{Array.isArray(e)?e.forEach(A=>{this.btns.child(A.el),A.change=(...s)=>{this.change(...s)}}):this.btns.child(e.el)}),this.el.child(this.btns),C?this.el.hide():(this.reset(),setTimeout(()=>{Mmg.call(this),Dq.call(this)},0),ji(window,"resize",()=>{Dq.call(this)}))}paintformatActive(){return this.paintformatEl.active()}paintformatToggle(){this.paintformatEl.toggle()}trigger(I){this[`${I}El`].click()}resetData(I){this.data=I,this.reset()}reset(){if(this.isHide)return;const{data:I}=this,g=I.getSelectedCellStyle();this.undoEl.setState(!I.canUndo()),this.redoEl.setState(!I.canRedo()),this.mergeEl.setState(I.canUnmerge(),!I.selector.multiple()),this.autofilterEl.setState(!I.canAutofilter());const{font:C,format:i}=g;this.formatEl.setState(i),this.fontEl.setState(C.name),this.fontSizeEl.setState(C.size),this.boldEl.setState(C.bold),this.italicEl.setState(C.italic),this.underlineEl.setState(g.underline),this.strikeEl.setState(g.strike),this.textColorEl.setState(g.color),this.fillColorEl.setState(g.bgcolor),this.alignEl.setState(g.align),this.valignEl.setState(g.valign),this.textwrapEl.setState(g.textwrap),this.freezeEl.setState(I.freezeIsActive())}}class fmg{constructor(I,g,C="600px"){this.title=I,this.el=Yg("div",`${Lg}-modal`).css("width",C).children(Yg("div",`${Lg}-modal-header`).children(new hi("close").on("click.stop",()=>this.hide()),this.title),Yg("div",`${Lg}-modal-content`).children(...g)).hide()}show(){this.dimmer=Yg("div",`${Lg}-dimmer active`),document.body.appendChild(this.dimmer.el);const{width:I,height:g}=this.el.show().box(),{clientHeight:C,clientWidth:i}=document.documentElement;this.el.offset({left:(i-I)/2,top:(C-g)/3}),window.xkeydownEsc=e=>{e.keyCode===27&&this.hide()},ji(window,"keydown",window.xkeydownEsc)}hide(){this.el.hide(),document.body.removeChild(this.dimmer.el),aV(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}class Er{constructor(I,g){this.vchange=()=>{},this.el=Yg("div",`${Lg}-form-input`),this.input=Yg("input","").css("width",I).on("input",C=>this.vchange(C)).attr("placeholder",g),this.el.child(this.input)}focus(){setTimeout(()=>{this.input.el.focus()},10)}hint(I){this.input.attr("placeholder",I)}val(I){return this.input.val(I)}}class YX{constructor(I,g,C,i=A=>A,e=()=>{}){this.key=I,this.getTitle=i,this.vchange=()=>{},this.el=Yg("div",`${Lg}-form-select`),this.suggest=new Ptg(g.map(A=>({key:A,title:this.getTitle(A)})),A=>{this.itemClick(A.key),e(A.key),this.vchange(A.key)},C,this.el),this.el.children(this.itemEl=Yg("div","input-text").html(this.getTitle(I)),this.suggest.el).on("click",()=>this.show())}show(){this.suggest.search("")}itemClick(I){this.key=I,this.itemEl.html(this.getTitle(I))}val(I){return I!==void 0?(this.key=I,this.itemEl.html(this.getTitle(I)),this):this.key}}const Hmg={number:/(^\d+$)|(^\d+(\.\d{0,4})?$)/,date:/^\d{4}-\d{1,2}-\d{1,2}$/};class vn{constructor(I,g,C,i){this.label="",this.rule=g,C&&(this.label=Yg("label","label").css("width",`${i}px`).html(C)),this.tip=Yg("div","tip").child("tip").hide(),this.input=I,this.input.vchange=()=>this.validate(),this.el=Yg("div",`${Lg}-form-field`).children(this.label,I.el,this.tip)}isShow(){return this.el.css("display")!=="none"}show(){this.el.show()}hide(){return this.el.hide(),this}val(I){return this.input.val(I)}hint(I){this.input.hint(I)}validate(){const{input:I,rule:g,tip:C,el:i}=this,e=I.val();return g.required&&/^\s*$/.test(e)?(C.html(ot("validation.required")),i.addClass("error"),!1):(g.type||g.pattern)&&!(g.pattern||Hmg[g.type]).test(e)?(C.html(ot("validation.notMatch")),i.addClass("error"),!1):(i.removeClass("error"),!0)}}const Kq=100;class Xmg extends fmg{constructor(){const I=new vn(new YX("cell",["cell"],"100%",n=>ot(`dataValidation.modeType.${n}`)),{required:!0},`${ot("dataValidation.range")}:`,Kq),g=new vn(new Er("120px","E3 or E3:F12"),{required:!0,pattern:/^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/}),C=new vn(new YX("list",["list","number","date","phone","email"],"100%",n=>ot(`dataValidation.type.${n}`),n=>this.criteriaSelected(n)),{required:!0},`${ot("dataValidation.criteria")}:`,Kq),i=new vn(new YX("be",["be","nbe","eq","neq","lt","lte","gt","gte"],"160px",n=>ot(`dataValidation.operator.${n}`),n=>this.criteriaOperatorSelected(n)),{required:!0}).hide(),e=new vn(new Er("70px","10"),{required:!0}).hide(),A=new vn(new Er("70px","100"),{required:!0,type:"number"}).hide(),s=new vn(new Er("120px","a,b,c"),{required:!0}),l=new vn(new Er("70px","10"),{required:!0,type:"number"}).hide();super(ot("contextmenu.validation"),[Yg("div",`${Lg}-form-fields`).children(I.el,g.el),Yg("div",`${Lg}-form-fields`).children(C.el,i.el,e.el,A.el,l.el,s.el),Yg("div",`${Lg}-buttons`).children(new gd("cancel").on("click",()=>this.btnClick("cancel")),new gd("remove").on("click",()=>this.btnClick("remove")),new gd("save","primary").on("click",()=>this.btnClick("save")))]),this.mf=I,this.rf=g,this.cf=C,this.of=i,this.minvf=e,this.maxvf=A,this.vf=l,this.svf=s,this.change=()=>{}}showVf(I){const g=I==="date"?"2018-11-12":"10",{vf:C}=this;C.input.hint(g),C.show()}criteriaSelected(I){const{of:g,minvf:C,maxvf:i,vf:e,svf:A}=this;I==="date"||I==="number"?(g.show(),C.rule.type=I,i.rule.type=I,I==="date"?(C.hint("2018-11-12"),i.hint("2019-11-12")):(C.hint("10"),i.hint("100")),C.show(),i.show(),e.hide(),A.hide()):(I==="list"?A.show():A.hide(),e.hide(),g.hide(),C.hide(),i.hide())}criteriaOperatorSelected(I){if(!I)return;const{minvf:g,maxvf:C,vf:i}=this;if(I==="be"||I==="nbe")g.show(),C.show(),i.hide();else{const e=this.cf.val();i.rule.type=e,e==="date"?i.hint("2018-11-12"):i.hint("10"),i.show(),g.hide(),C.hide()}}btnClick(I){if(I==="cancel")this.hide();else if(I==="remove")this.change("remove"),this.hide();else if(I==="save"){const g=["mf","rf","cf","of","svf","vf","minvf","maxvf"];for(let l=0;l<g.length;l+=1){const n=this[g[l]];if(n.isShow()&&!n.validate())return}const C=this.mf.val(),i=this.rf.val(),e=this.cf.val(),A=this.of.val();let s=this.svf.val();(e==="number"||e==="date")&&(A==="be"||A==="nbe"?s=[this.minvf.val(),this.maxvf.val()]:s=this.vf.val()),this.change("save",C,i,{type:e,operator:A,required:!1,value:s}),this.hide()}}setValue(I){if(I){const{mf:g,rf:C,cf:i,of:e,svf:A,vf:s,minvf:l,maxvf:n}=this,{mode:a,ref:d,validator:o}=I,{type:c,operator:r,value:h}=o||{type:"list"};g.val(a||"cell"),C.val(d),i.val(c),e.val(r),Array.isArray(h)?(l.val(h[0]),n.val(h[1])):(A.val(h||""),s.val(h||"")),this.criteriaSelected(c),this.criteriaOperatorSelected(r)}this.show()}}function iig(t){return Yg("div",`${Lg}-item ${t}`)}function Fq(t){return iig("state").child(ot(`sort.${t}`)).on("click.stop",()=>this.itemClick(t))}function Smg(t){const{filterbEl:I,filterValues:g}=this;I.html(""),Object.keys(t).forEach((i,e)=>{const A=t[i],s=g.includes(i)?"checked":"";I.child(Yg("div",`${Lg}-item state ${s}`).on("click.stop",()=>this.filterClick(e,i)).children(i===""?ot("filter.empty"):i,Yg("div","label").html(`(${A})`)))})}function kq(){const{filterhEl:t,filterValues:I,values:g}=this;t.html(`${I.length} / ${g.length}`),t.checked(I.length===g.length)}class Dmg{constructor(){this.filterbEl=Yg("div",`${Lg}-body`),this.filterhEl=Yg("div",`${Lg}-header state`).on("click.stop",()=>this.filterClick(0,"all")),this.el=Yg("div",`${Lg}-sort-filter`).children(this.sortAscEl=Fq.call(this,"asc"),this.sortDescEl=Fq.call(this,"desc"),iig("divider"),Yg("div",`${Lg}-filter`).children(this.filterhEl,this.filterbEl),Yg("div",`${Lg}-buttons`).children(new gd("cancel").on("click",()=>this.btnClick("cancel")),new gd("ok","primary").on("click",()=>this.btnClick("ok")))).hide(),this.ci=null,this.sortDesc=null,this.values=null,this.filterValues=[]}btnClick(I){if(I==="ok"){const{ci:g,sort:C,filterValues:i}=this;this.ok&&this.ok(g,C,"in",i)}this.hide()}itemClick(I){this.sort=I;const{sortAscEl:g,sortDescEl:C}=this;g.checked(I==="asc"),C.checked(I==="desc")}filterClick(I,g){const{filterbEl:C,filterValues:i,values:e}=this,A=C.children();g==="all"?A.length===i.length?(this.filterValues=[],A.forEach(s=>Yg(s).checked(!1))):(this.filterValues=Array.from(e),A.forEach(s=>Yg(s).checked(!0))):Yg(A[I]).toggle("checked")?i.push(g):i.splice(i.findIndex(l=>l===g),1),kq.call(this)}set(I,g,C,i){this.ci=I;const{sortAscEl:e,sortDescEl:A}=this;i!==null?(this.sort=i.order,e.checked(i.asc()),A.checked(i.desc())):(this.sortDesc=null,e.checked(!1),A.checked(!1)),this.values=Object.keys(g),this.filterValues=C?Array.from(C.value):Object.keys(g),Smg.call(this,g,C),kq.call(this)}setOffset(I){this.el.offset(I).show();let g=1;AG(this.el,()=>{g<=0&&this.hide(),g-=1})}show(){this.el.show()}hide(){this.el.hide(),B0(this.el)}}function eig(t,I){const g=Yg("div",`${Lg}-toast`),C=Yg("div",`${Lg}-dimmer active`),i=()=>{document.body.removeChild(g.el),document.body.removeChild(C.el)};g.children(Yg("div",`${Lg}-toast-header`).children(new hi("close").on("click.stop",()=>i()),t),Yg("div",`${Lg}-toast-content`).html(I)),document.body.appendChild(g.el),document.body.appendChild(C.el);const{width:e,height:A}=g.box(),{clientHeight:s,clientWidth:l}=document.documentElement;g.offset({left:(l-e)/2,top:(s-A)/3})}function NX(t,I){let g;return(...C)=>{const i=this,e=C;g||(g=setTimeout(()=>{g=null,t.apply(i,e)},I))}}function Kmg(){const{data:t,verticalScrollbar:I,horizontalScrollbar:g}=this,{l:C,t:i,left:e,top:A,width:s,height:l}=t.getSelectedRect(),n=this.getTableOffset();if(Math.abs(e)+s>n.width)g.move({left:C+s-n.width});else{const a=t.freezeTotalWidth();e<a&&g.move({left:C-1-a})}if(Math.abs(A)+l>n.height)I.move({top:i+l-n.height-1});else{const a=t.freezeTotalHeight();A<a&&I.move({top:i-1-a})}}function Id(t,I,g,C=!0,i=!1){if(I===-1&&g===-1)return;const{table:e,selector:A,toolbar:s,data:l,contextMenu:n}=this;n.setMode(I===-1||g===-1?"row-col":"range");const a=l.getCell(I,g);t?(A.setEnd(I,g,i),this.trigger("cells-selected",a,A.range)):(A.set(I,g,C),this.trigger("cell-selected",a,I,g)),s.reset(),e.render()}function Cs(t,I){const{selector:g,data:C}=this,{rows:i,cols:e}=C;let[A,s]=g.indexes;const{eri:l,eci:n}=g.range;t&&([A,s]=g.moveIndexes),I==="left"?s>0&&(s-=1):I==="right"?(n!==s&&(s=n),s<e.len-1&&(s+=1)):I==="up"?A>0&&(A-=1):I==="down"?(l!==A&&(A=l),A<i.len-1&&(A+=1)):I==="row-first"?s=0:I==="row-last"?s=e.len-1:I==="col-first"?A=0:I==="col-last"&&(A=i.len-1),t&&(g.moveIndexes=[A,s]),Id.call(this,t,A,s),Kmg.call(this)}function Fmg(t){if(t.buttons!==0||t.target.className===`${Lg}-resizer-hover`)return;const{offsetX:I,offsetY:g}=t,{rowResizer:C,colResizer:i,tableEl:e,data:A}=this,{rows:s,cols:l}=A;if(I>l.indexWidth&&g>s.height){C.hide(),i.hide();return}const n=e.box(),a=A.getCellRectByXY(t.offsetX,t.offsetY);a.ri>=0&&a.ci===-1?(a.width=l.indexWidth,C.show(a,{width:n.width}),s.isHide(a.ri-1)?C.showUnhide(a.ri):C.hideUnhide()):C.hide(),a.ri===-1&&a.ci>=0?(a.height=s.height,i.show(a,{height:n.height}),l.isHide(a.ci-1)?i.showUnhide(a.ci):i.hideUnhide()):i.hide()}function kmg(t){const{verticalScrollbar:I,horizontalScrollbar:g,data:C}=this,{top:i}=I.scroll(),{left:e}=g.scroll(),{rows:A,cols:s}=C,{deltaY:l,deltaX:n}=t,a=(b,u)=>{let m=b,Z=0;do Z=u(m),m+=1;while(Z<=0);return Z},d=b=>{if(b>0){const u=C.scroll.ri+1;if(u<A.len){const m=a(u,Z=>A.getHeight(Z));I.move({top:i+m-1})}}else{const u=C.scroll.ri-1;if(u>=0){const m=a(u,Z=>A.getHeight(Z));I.move({top:u===0?0:i-m})}}},o=b=>{if(b>0){const u=C.scroll.ci+1;if(u<s.len){const m=a(u,Z=>s.getWidth(Z));g.move({left:e+m-1})}}else{const u=C.scroll.ci-1;if(u>=0){const m=a(u,Z=>s.getWidth(Z));g.move({left:u===0?0:e-m})}}},c=Math.abs(l),r=Math.abs(n),h=Math.max(c,r);/Firefox/i.test(window.navigator.userAgent)&&NX(d(t.detail),50),h===r&&NX(o(n),50),h===c&&NX(d(l),50)}function zmg(t,I){const{verticalScrollbar:g,horizontalScrollbar:C}=this,{top:i}=g.scroll(),{left:e}=C.scroll();t==="left"||t==="right"?C.move({left:e-I}):(t==="up"||t==="down")&&g.move({top:i-I})}function k9(){const{data:t,verticalScrollbar:I}=this,{height:g}=this.getTableOffset(),C=t.exceptRowTotalHeight(0,-1);I.set(g,t.rows.totalHeight()-C)}function z9(){const{data:t,horizontalScrollbar:I}=this,{width:g}=this.getTableOffset();t&&I.set(g,t.cols.totalWidth())}function Jmg(){const{selector:t,data:I,editor:g}=this,[C,i]=I.freeze;if(C>0||i>0){const e=I.freezeTotalWidth(),A=I.freezeTotalHeight();g.setFreezeLengths(e,A)}t.resetAreaOffset()}function xi(){const{tableEl:t,overlayerEl:I,overlayerCEl:g,table:C,toolbar:i,selector:e,el:A}=this,s=this.getTableOffset(),l=this.getRect();t.attr(l),I.offset(l),g.offset(s),A.css("width",`${l.width}px`),k9.call(this),z9.call(this),Jmg.call(this),C.render(),i.reset(),e.reset()}function sG(){const{data:t,selector:I}=this;t.clearClipboard(),I.hideClipboard()}function TD(){const{data:t,selector:I}=this;t.copy(),t.copyToSystemClipboard(),I.showClipboard()}function zq(){const{data:t,selector:I}=this;t.cut(),I.showClipboard()}function im(t,I){const{data:g}=this;if(g.settings.mode!=="read"){if(g.paste(t,C=>eig("Tip",C)))xi.call(this);else if(I){const C=I.clipboardData.getData("text/plain");this.data.pasteFromText(C),xi.call(this)}}}function Lmg(){this.data.hideRowsOrCols(),xi.call(this)}function Jq(t,I){this.data.unhideRowsOrCols(t,I),xi.call(this)}function vmg(){const{data:t}=this;t.autofilter(),xi.call(this)}function Tmg(){const{toolbar:t}=this;t.paintformatActive()&&(im.call(this,"format"),sG.call(this),t.paintformatToggle())}function Lq(t){const{selector:I,data:g,table:C,sortFilter:i}=this,{offsetX:e,offsetY:A}=t,s=t.target.className===`${Lg}-selector-corner`,l=g.getCellRectByXY(e,A),{left:n,top:a,width:d,height:o}=l;let{ri:c,ci:r}=l;const{autoFilter:h}=g;if(h.includes(c,r)&&n+d-20<e&&a+o-20<A){const b=h.items(r,(u,m)=>g.rows.getCell(u,m));i.hide(),i.set(r,b,h.getFilter(r),h.getSort(r)),i.setOffset({left:n,top:a+o+2});return}t.shiftKey||(s?I.showAutofill(c,r):Id.call(this,!1,c,r),jtg(window,b=>{({ri:c,ci:r}=g.getCellRectByXY(b.offsetX,b.offsetY)),s?I.showAutofill(c,r):b.buttons===1&&!b.shiftKey&&Id.call(this,!0,c,r,!0,!0)},()=>{s&&I.arange&&g.settings.mode!=="read"&&g.autofill(I.arange,"all",b=>eig("Tip",b))&&C.render(),I.hideAutofill(),Tmg.call(this)})),!s&&t.buttons===1&&t.shiftKey&&Id.call(this,!0,c,r)}function lG(){const{editor:t,data:I}=this,g=I.getSelectedRect(),C=this.getTableOffset();let i="top";g.top>C.height/2&&(i="bottom"),t.setOffset(g,i)}function em(){const{editor:t,data:I}=this;I.settings.mode!=="read"&&(lG.call(this),t.setCell(I.getSelectedCell(),I.getSelectedValidator()),sG.call(this))}function xmg(t){const{data:I,table:g,selector:C}=this;I.scrolly(t,()=>{C.resetBRLAreaOffset(),lG.call(this),g.render()})}function jmg(t){const{data:I,table:g,selector:C}=this;I.scrollx(t,()=>{C.resetBRTAreaOffset(),lG.call(this),g.render()})}function Qmg(t,I){const{ri:g}=t,{table:C,selector:i,data:e}=this;e.rows.setHeight(g,I),C.render(),i.resetAreaOffset(),k9.call(this),lG.call(this)}function Omg(t,I){const{ci:g}=t,{table:C,selector:i,data:e}=this;e.cols.setWidth(g,I),C.render(),i.resetAreaOffset(),z9.call(this),lG.call(this)}function VX(t,I="finished"){const{data:g,table:C}=this;if(g.settings.mode==="read")return;g.setSelectedCellText(t,I);const{ri:i,ci:e}=g.selector;I==="finished"?C.render():this.trigger("cell-edited",t,i,e)}function kN(t){const{data:I}=this;I.settings.mode!=="read"&&(t==="insert-row"?I.insert("row"):t==="delete-row"?I.delete("row"):t==="insert-column"?I.insert("column"):t==="delete-column"?I.delete("column"):t==="delete-cell"?I.deleteCell():t==="delete-cell-format"?I.deleteCell("format"):t==="delete-cell-text"?I.deleteCell("text"):t==="cell-printable"?I.setSelectedCellAttr("printable",!0):t==="cell-non-printable"?I.setSelectedCellAttr("printable",!1):t==="cell-editable"?I.setSelectedCellAttr("editable",!0):t==="cell-non-editable"&&I.setSelectedCellAttr("editable",!1),sG.call(this),xi.call(this))}function Umg(t,I){const{data:g}=this;if(t==="undo")this.undo();else if(t==="redo")this.redo();else if(t==="print")this.print.preview();else if(t==="paintformat")I===!0?TD.call(this):sG.call(this);else if(t==="clearformat")kN.call(this,"delete-cell-format");else if(t!=="link"){if(t!=="chart")if(t==="autofilter")vmg.call(this);else if(t==="freeze")if(I){const{ri:C,ci:i}=g.selector;this.freeze(C,i)}else this.freeze(0,0);else g.setSelectedCellAttr(t,I),t==="formula"&&!g.selector.multiple()&&em.call(this),xi.call(this)}}function Emg(t,I,g,C){this.data.setAutoFilter(t,I,g,C),xi.call(this)}function Pmg(){const{selector:t,overlayerEl:I,rowResizer:g,colResizer:C,verticalScrollbar:i,horizontalScrollbar:e,editor:A,contextMenu:s,toolbar:l,modalValidation:n,sortFilter:a}=this;I.on("mousemove",d=>{Fmg.call(this,d)}).on("mousedown",d=>{A.clear(),s.hide(),d.buttons===2?(this.data.xyInSelectedRect(d.offsetX,d.offsetY)||Lq.call(this,d),s.setPosition(d.offsetX,d.offsetY),d.stopPropagation()):d.detail===2?em.call(this):Lq.call(this,d)}).on("mousewheel.stop",d=>{kmg.call(this,d)}).on("mouseout",d=>{const{offsetX:o,offsetY:c}=d;c<=0&&C.hide(),o<=0&&g.hide()}),t.inputChange=d=>{VX.call(this,d,"input"),em.call(this)},tug(I.el,{move:(d,o)=>{zmg.call(this,d,o)}}),l.change=(d,o)=>Umg.call(this,d,o),a.ok=(d,o,c,r)=>Emg.call(this,d,o,c,r),g.finishedFn=(d,o)=>{Qmg.call(this,d,o)},C.finishedFn=(d,o)=>{Omg.call(this,d,o)},g.unhideFn=d=>{Jq.call(this,"row",d)},C.unhideFn=d=>{Jq.call(this,"col",d)},i.moveFn=(d,o)=>{xmg.call(this,d,o)},e.moveFn=(d,o)=>{jmg.call(this,d,o)},A.change=(d,o)=>{VX.call(this,o,d)},n.change=(d,...o)=>{d==="save"?this.data.addValidation(...o):this.data.removeValidation()},s.itemClick=d=>{d==="validation"?n.setValue(this.data.getSelectedValidation()):d==="copy"?TD.call(this):d==="cut"?zq.call(this):d==="paste"?im.call(this,"all"):d==="paste-value"?im.call(this,"text"):d==="paste-format"?im.call(this,"format"):d==="hide"?Lmg.call(this):kN.call(this,d)},ji(window,"resize",()=>{this.reload()}),ji(window,"click",d=>{this.focusing=I.contains(d.target)}),ji(window,"paste",d=>{this.focusing&&(im.call(this,"all",d),d.preventDefault())}),ji(window,"keydown",d=>{if(!this.focusing)return;const o=d.keyCode||d.which,{key:c,ctrlKey:r,shiftKey:h,metaKey:b}=d;if(r||b)switch(o){case 90:this.undo(),d.preventDefault();break;case 89:this.redo(),d.preventDefault();break;case 67:TD.call(this),d.preventDefault();break;case 88:zq.call(this),d.preventDefault();break;case 85:l.trigger("underline"),d.preventDefault();break;case 86:break;case 37:Cs.call(this,h,"row-first"),d.preventDefault();break;case 38:Cs.call(this,h,"col-first"),d.preventDefault();break;case 39:Cs.call(this,h,"row-last"),d.preventDefault();break;case 40:Cs.call(this,h,"col-last"),d.preventDefault();break;case 32:Id.call(this,!1,-1,this.data.selector.ci,!1),d.preventDefault();break;case 66:l.trigger("bold");break;case 73:l.trigger("italic");break}else{switch(o){case 32:h&&Id.call(this,!1,this.data.selector.ri,-1,!1);break;case 27:s.hide(),sG.call(this);break;case 37:Cs.call(this,h,"left"),d.preventDefault();break;case 38:Cs.call(this,h,"up"),d.preventDefault();break;case 39:Cs.call(this,h,"right"),d.preventDefault();break;case 40:Cs.call(this,h,"down"),d.preventDefault();break;case 9:A.clear(),Cs.call(this,!1,h?"left":"right"),d.preventDefault();break;case 13:A.clear(),Cs.call(this,!1,h?"up":"down"),d.preventDefault();break;case 8:kN.call(this,"delete-cell-text"),d.preventDefault();break}c==="Delete"?(kN.call(this,"delete-cell-text"),d.preventDefault()):o>=65&&o<=90||o>=48&&o<=57||o>=96&&o<=105||d.key==="="?(VX.call(this,d.key,"input"),em.call(this)):o===113&&em.call(this)}})}class _mg{constructor(I,g){this.eventMap=iug();const{view:C,showToolbar:i,showContextmenu:e}=g.settings;this.el=Yg("div",`${Lg}-sheet`),this.toolbar=new Rmg(g,C.width,!i),this.print=new Jug(g),I.children(this.toolbar.el,this.el,this.print.el),this.data=g,this.tableEl=Yg("canvas",`${Lg}-table`),this.rowResizer=new Bq(!1,g.rows.height),this.colResizer=new Bq(!0,g.cols.minWidth),this.verticalScrollbar=new Wq(!0),this.horizontalScrollbar=new Wq(!1),this.editor=new pug(Mug,()=>this.getTableOffset(),g.rows.height),this.modalValidation=new Xmg,this.contextMenu=new xug(()=>this.getRect(),!e),this.selector=new sug(g),this.overlayerCEl=Yg("div",`${Lg}-overlayer-content`).children(this.editor.el,this.selector.el),this.overlayerEl=Yg("div",`${Lg}-overlayer`).child(this.overlayerCEl),this.sortFilter=new Dmg,this.el.children(this.tableEl,this.overlayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el),this.table=new Fug(this.tableEl.el,g),Pmg.call(this),xi.call(this),Id.call(this,!1,0,0)}on(I,g){return this.eventMap.on(I,g),this}trigger(I,...g){const{eventMap:C}=this;C.fire(I,g)}resetData(I){this.editor.clear(),this.data=I,k9.call(this),z9.call(this),this.toolbar.resetData(I),this.print.resetData(I),this.selector.resetData(I),this.table.resetData(I)}loadData(I){return this.data.setData(I),xi.call(this),this}freeze(I,g){const{data:C}=this;return C.setFreeze(I,g),xi.call(this),this}undo(){this.data.undo(),xi.call(this)}redo(){this.data.redo(),xi.call(this)}reload(){return xi.call(this),this}getRect(){const{data:I}=this;return{width:I.viewWidth(),height:I.viewHeight()}}getTableOffset(){const{rows:I,cols:g}=this.data,{width:C,height:i}=this.getRect();return{width:C-g.indexWidth,height:i-I.height,left:g.indexWidth,top:I.height}}}class qmg extends fs{constructor(I){const g=new hi("ellipsis");super(g,"auto",!1,"top-left"),this.contentClick=I}reset(I){const g=I.map((C,i)=>Yg("div",`${Lg}-item`).css("width","150px").css("font-weight","normal").on("click",()=>{this.contentClick(i),this.hide()}).child(C));this.setContentChildren(...g)}setTitle(){}}const $mg=[{key:"delete",title:PI("contextmenu.deleteSheet")}];function gZg(t){return Yg("div",`${Lg}-item`).child(t.title()).on("click",()=>{this.itemClick(t.key),this.hide()})}function IZg(){return $mg.map(t=>gZg.call(this,t))}class CZg{constructor(){this.el=Yg("div",`${Lg}-contextmenu`).css("width","160px").children(...IZg.call(this)).hide(),this.itemClick=()=>{}}hide(){const{el:I}=this;I.hide(),B0(I)}setOffset(I){const{el:g}=this;g.offset(I),g.show(),AG(g)}}class tZg{constructor(I=()=>{},g=()=>{},C=()=>{},i=()=>{}){this.swapFunc=g,this.updateFunc=i,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new qmg(e=>{this.clickSwap2(this.items[e])}),this.contextMenu=new CZg,this.contextMenu.itemClick=C,this.el=Yg("div",`${Lg}-bottombar`).children(this.contextMenu.el,this.menuEl=Yg("ul",`${Lg}-menu`).child(Yg("li","").children(new hi("add").on("click",()=>{I()}),Yg("span","").child(this.moreEl))))}addItem(I,g){this.dataNames.push(I);const C=Yg("li",g?"active":"").child(I);C.on("click",()=>{this.clickSwap2(C)}).on("contextmenu",i=>{const{offsetLeft:e,offsetHeight:A}=i.target;this.contextMenu.setOffset({left:e,bottom:A+1}),this.deleteEl=C}).on("dblclick",()=>{const i=C.html(),e=new Er("auto","");e.val(i),e.input.on("blur",({target:A})=>{const{value:s}=A,l=this.dataNames.findIndex(n=>n===i);this.renameItem(l,s)}),C.html("").child(e.el),e.focus()}),g&&this.clickSwap(C),this.items.push(C),this.menuEl.child(C),this.moreEl.reset(this.dataNames)}renameItem(I,g){this.dataNames.splice(I,1,g),this.moreEl.reset(this.dataNames),this.items[I].html("").child(g),this.updateFunc(I,g)}clear(){this.items.forEach(I=>{this.menuEl.removeChild(I.el)}),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}deleteItem(){const{activeEl:I,deleteEl:g}=this;if(this.items.length>1){const C=this.items.findIndex(i=>i===g);if(this.items.splice(C,1),this.dataNames.splice(C,1),this.menuEl.removeChild(g.el),this.moreEl.reset(this.dataNames),I===g){const[i]=this.items;return this.activeEl=i,this.activeEl.toggle(),[C,0]}return[C,-1]}return[-1]}clickSwap2(I){const g=this.items.findIndex(C=>C===I);this.clickSwap(I),this.activeEl.toggle(),this.swapFunc(g)}clickSwap(I){this.activeEl!==null&&this.activeEl.toggle(),this.activeEl=I}}class xD{constructor(I,g={}){let C=I;this.options={showBottomBar:!0,...g},this.sheetIndex=1,this.datas=[],typeof I=="string"&&(C=document.querySelector(I)),this.bottombar=this.options.showBottomBar?new tZg(()=>{const e=this.addSheet();this.sheet.resetData(e)},e=>{const A=this.datas[e];this.sheet.resetData(A)},()=>{this.deleteSheet()},(e,A)=>{this.datas[e].name=A}):null,this.data=this.addSheet();const i=Yg("div",`${Lg}`).on("contextmenu",e=>e.preventDefault());C.appendChild(i.el),this.sheet=new _mg(i,this.data),this.bottombar!==null&&i.child(this.bottombar.el)}addSheet(I,g=!0){const C=I||`sheet${this.sheetIndex}`,i=new Cug(C,this.options);return i.change=(...e)=>{this.sheet.trigger("change",...e)},this.datas.push(i),this.bottombar!==null&&this.bottombar.addItem(C,g),this.sheetIndex+=1,i}deleteSheet(){if(this.bottombar===null)return;const[I,g]=this.bottombar.deleteItem();I>=0&&(this.datas.splice(I,1),g>=0&&this.sheet.resetData(this.datas[g]))}loadData(I){const g=Array.isArray(I)?I:[I];if(this.bottombar!==null&&this.bottombar.clear(),this.datas=[],g.length>0)for(let C=0;C<g.length;C+=1){const i=g[C],e=this.addSheet(i.name,C===0);e.setData(i),C===0&&this.sheet.resetData(e)}return this}getData(){return this.datas.map(I=>I.getData())}cellText(I,g,C,i=0){return this.datas[i].setCellText(I,g,C,"finished"),this}cell(I,g,C=0){return this.datas[C].getCell(I,g)}cellStyle(I,g,C=0){return this.datas[C].getCellStyle(I,g)}reRender(){return this.sheet.table.render(),this}on(I,g){return this.sheet.on(I,g),this}validate(){const{validations:I}=this.data;return I.errors.size<=0}change(I){return this.sheet.on("change",I),this}static locale(I,g){Ttg(I,g)}}const iZg=(t,I={})=>new xD(t,I);window&&(window.x_spreadsheet=iZg,window.x_spreadsheet.locale=(t,I)=>Ttg(t,I));const vq=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","800000","008000","000080","808000","800080","008080","C0C0C0","808080","9999FF","993366","FFFFCC","CCFFFF","660066","FF8080","0066CC","CCCCFF","000080","FF00FF","FFFF00","00FFFF","800080","800000","008080","0000FF","00CCFF","CCFFFF","CCFFCC","FFFF99","99CCFF","FF99CC","CC99FF","FFCC99","3366FF","33CCCC","99CC00","FFCC00","FF9900","FF6600","666699","969696","003366","339966","003300","333300","993300","993366","333399","333333","b7e0ff","00CCFF"];function hV(t){"@babel/helpers - typeof";return hV=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},hV(t)}var eZg=/^\s+/,AZg=/\s+$/;function AI(t,I){if(t=t||"",I=I||{},t instanceof AI)return t;if(!(this instanceof AI))return new AI(t,I);var g=sZg(t);this._originalInput=t,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=Math.round(100*this._a)/100,this._format=I.format||g.format,this._gradientType=I.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=g.ok}AI.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var I=this.toRgb();return(I.r*299+I.g*587+I.b*114)/1e3},getLuminance:function(){var I=this.toRgb(),g,C,i,e,A,s;return g=I.r/255,C=I.g/255,i=I.b/255,g<=.03928?e=g/12.92:e=Math.pow((g+.055)/1.055,2.4),C<=.03928?A=C/12.92:A=Math.pow((C+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*e+.7152*A+.0722*s},setAlpha:function(I){return this._a=Aig(I),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var I=xq(this._r,this._g,this._b);return{h:I.h*360,s:I.s,v:I.v,a:this._a}},toHsvString:function(){var I=xq(this._r,this._g,this._b),g=Math.round(I.h*360),C=Math.round(I.s*100),i=Math.round(I.v*100);return this._a==1?"hsv("+g+", "+C+"%, "+i+"%)":"hsva("+g+", "+C+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var I=Tq(this._r,this._g,this._b);return{h:I.h*360,s:I.s,l:I.l,a:this._a}},toHslString:function(){var I=Tq(this._r,this._g,this._b),g=Math.round(I.h*360),C=Math.round(I.s*100),i=Math.round(I.l*100);return this._a==1?"hsl("+g+", "+C+"%, "+i+"%)":"hsla("+g+", "+C+"%, "+i+"%, "+this._roundA+")"},toHex:function(I){return jq(this._r,this._g,this._b,I)},toHexString:function(I){return"#"+this.toHex(I)},toHex8:function(I){return oZg(this._r,this._g,this._b,this._a,I)},toHex8String:function(I){return"#"+this.toHex8(I)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(FC(this._r,255)*100)+"%",g:Math.round(FC(this._g,255)*100)+"%",b:Math.round(FC(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(FC(this._r,255)*100)+"%, "+Math.round(FC(this._g,255)*100)+"%, "+Math.round(FC(this._b,255)*100)+"%)":"rgba("+Math.round(FC(this._r,255)*100)+"%, "+Math.round(FC(this._g,255)*100)+"%, "+Math.round(FC(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:BZg[jq(this._r,this._g,this._b,!0)]||!1},toFilter:function(I){var g="#"+Qq(this._r,this._g,this._b,this._a),C=g,i=this._gradientType?"GradientType = 1, ":"";if(I){var e=AI(I);C="#"+Qq(e._r,e._g,e._b,e._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+g+",endColorstr="+C+")"},toString:function(I){var g=!!I;I=I||this._format;var C=!1,i=this._a<1&&this._a>=0,e=!g&&i&&(I==="hex"||I==="hex6"||I==="hex3"||I==="hex4"||I==="hex8"||I==="name");return e?I==="name"&&this._a===0?this.toName():this.toRgbString():(I==="rgb"&&(C=this.toRgbString()),I==="prgb"&&(C=this.toPercentageRgbString()),(I==="hex"||I==="hex6")&&(C=this.toHexString()),I==="hex3"&&(C=this.toHexString(!0)),I==="hex4"&&(C=this.toHex8String(!0)),I==="hex8"&&(C=this.toHex8String()),I==="name"&&(C=this.toName()),I==="hsl"&&(C=this.toHslString()),I==="hsv"&&(C=this.toHsvString()),C||this.toHexString())},clone:function(){return AI(this.toString())},_applyModification:function(I,g){var C=I.apply(null,[this].concat([].slice.call(g)));return this._r=C._r,this._g=C._g,this._b=C._b,this.setAlpha(C._a),this},lighten:function(){return this._applyModification(hZg,arguments)},brighten:function(){return this._applyModification(bZg,arguments)},darken:function(){return this._applyModification(uZg,arguments)},desaturate:function(){return this._applyModification(cZg,arguments)},saturate:function(){return this._applyModification(dZg,arguments)},greyscale:function(){return this._applyModification(rZg,arguments)},spin:function(){return this._applyModification(mZg,arguments)},_applyCombination:function(I,g){return I.apply(null,[this].concat([].slice.call(g)))},analogous:function(){return this._applyCombination(wZg,arguments)},complement:function(){return this._applyCombination(ZZg,arguments)},monochromatic:function(){return this._applyCombination(pZg,arguments)},splitcomplement:function(){return this._applyCombination(GZg,arguments)},triad:function(){return this._applyCombination(Oq,[3])},tetrad:function(){return this._applyCombination(Oq,[4])}};AI.fromRatio=function(t,I){if(hV(t)=="object"){var g={};for(var C in t)t.hasOwnProperty(C)&&(C==="a"?g[C]=t[C]:g[C]=Am(t[C]));t=g}return AI(t,I)};function sZg(t){var I={r:0,g:0,b:0},g=1,C=null,i=null,e=null,A=!1,s=!1;return typeof t=="string"&&(t=NZg(t)),hV(t)=="object"&&(Cl(t.r)&&Cl(t.g)&&Cl(t.b)?(I=lZg(t.r,t.g,t.b),A=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Cl(t.h)&&Cl(t.s)&&Cl(t.v)?(C=Am(t.s),i=Am(t.v),I=aZg(t.h,C,i),A=!0,s="hsv"):Cl(t.h)&&Cl(t.s)&&Cl(t.l)&&(C=Am(t.s),e=Am(t.l),I=nZg(t.h,C,e),A=!0,s="hsl"),t.hasOwnProperty("a")&&(g=t.a)),g=Aig(g),{ok:A,format:t.format||s,r:Math.min(255,Math.max(I.r,0)),g:Math.min(255,Math.max(I.g,0)),b:Math.min(255,Math.max(I.b,0)),a:g}}function lZg(t,I,g){return{r:FC(t,255)*255,g:FC(I,255)*255,b:FC(g,255)*255}}function Tq(t,I,g){t=FC(t,255),I=FC(I,255),g=FC(g,255);var C=Math.max(t,I,g),i=Math.min(t,I,g),e,A,s=(C+i)/2;if(C==i)e=A=0;else{var l=C-i;switch(A=s>.5?l/(2-C-i):l/(C+i),C){case t:e=(I-g)/l+(I<g?6:0);break;case I:e=(g-t)/l+2;break;case g:e=(t-I)/l+4;break}e/=6}return{h:e,s:A,l:s}}function nZg(t,I,g){var C,i,e;t=FC(t,360),I=FC(I,100),g=FC(g,100);function A(n,a,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?n+(a-n)*6*d:d<1/2?a:d<2/3?n+(a-n)*(2/3-d)*6:n}if(I===0)C=i=e=g;else{var s=g<.5?g*(1+I):g+I-g*I,l=2*g-s;C=A(l,s,t+1/3),i=A(l,s,t),e=A(l,s,t-1/3)}return{r:C*255,g:i*255,b:e*255}}function xq(t,I,g){t=FC(t,255),I=FC(I,255),g=FC(g,255);var C=Math.max(t,I,g),i=Math.min(t,I,g),e,A,s=C,l=C-i;if(A=C===0?0:l/C,C==i)e=0;else{switch(C){case t:e=(I-g)/l+(I<g?6:0);break;case I:e=(g-t)/l+2;break;case g:e=(t-I)/l+4;break}e/=6}return{h:e,s:A,v:s}}function aZg(t,I,g){t=FC(t,360)*6,I=FC(I,100),g=FC(g,100);var C=Math.floor(t),i=t-C,e=g*(1-I),A=g*(1-i*I),s=g*(1-(1-i)*I),l=C%6,n=[g,A,e,e,s,g][l],a=[s,g,g,A,e,e][l],d=[e,e,s,g,g,A][l];return{r:n*255,g:a*255,b:d*255}}function jq(t,I,g,C){var i=[NA(Math.round(t).toString(16)),NA(Math.round(I).toString(16)),NA(Math.round(g).toString(16))];return C&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function oZg(t,I,g,C,i){var e=[NA(Math.round(t).toString(16)),NA(Math.round(I).toString(16)),NA(Math.round(g).toString(16)),NA(sig(C))];return i&&e[0].charAt(0)==e[0].charAt(1)&&e[1].charAt(0)==e[1].charAt(1)&&e[2].charAt(0)==e[2].charAt(1)&&e[3].charAt(0)==e[3].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0)+e[3].charAt(0):e.join("")}function Qq(t,I,g,C){var i=[NA(sig(C)),NA(Math.round(t).toString(16)),NA(Math.round(I).toString(16)),NA(Math.round(g).toString(16))];return i.join("")}AI.equals=function(t,I){return!t||!I?!1:AI(t).toRgbString()==AI(I).toRgbString()};AI.random=function(){return AI.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function cZg(t,I){I=I===0?0:I||10;var g=AI(t).toHsl();return g.s-=I/100,g.s=IM(g.s),AI(g)}function dZg(t,I){I=I===0?0:I||10;var g=AI(t).toHsl();return g.s+=I/100,g.s=IM(g.s),AI(g)}function rZg(t){return AI(t).desaturate(100)}function hZg(t,I){I=I===0?0:I||10;var g=AI(t).toHsl();return g.l+=I/100,g.l=IM(g.l),AI(g)}function bZg(t,I){I=I===0?0:I||10;var g=AI(t).toRgb();return g.r=Math.max(0,Math.min(255,g.r-Math.round(255*-(I/100)))),g.g=Math.max(0,Math.min(255,g.g-Math.round(255*-(I/100)))),g.b=Math.max(0,Math.min(255,g.b-Math.round(255*-(I/100)))),AI(g)}function uZg(t,I){I=I===0?0:I||10;var g=AI(t).toHsl();return g.l-=I/100,g.l=IM(g.l),AI(g)}function mZg(t,I){var g=AI(t).toHsl(),C=(g.h+I)%360;return g.h=C<0?360+C:C,AI(g)}function ZZg(t){var I=AI(t).toHsl();return I.h=(I.h+180)%360,AI(I)}function Oq(t,I){if(isNaN(I)||I<=0)throw new Error("Argument to polyad must be a positive number");for(var g=AI(t).toHsl(),C=[AI(t)],i=360/I,e=1;e<I;e++)C.push(AI({h:(g.h+e*i)%360,s:g.s,l:g.l}));return C}function GZg(t){var I=AI(t).toHsl(),g=I.h;return[AI(t),AI({h:(g+72)%360,s:I.s,l:I.l}),AI({h:(g+216)%360,s:I.s,l:I.l})]}function wZg(t,I,g){I=I||6,g=g||30;var C=AI(t).toHsl(),i=360/g,e=[AI(t)];for(C.h=(C.h-(i*I>>1)+720)%360;--I;)C.h=(C.h+i)%360,e.push(AI(C));return e}function pZg(t,I){I=I||6;for(var g=AI(t).toHsv(),C=g.h,i=g.s,e=g.v,A=[],s=1/I;I--;)A.push(AI({h:C,s:i,v:e})),e=(e+s)%1;return A}AI.mix=function(t,I,g){g=g===0?0:g||50;var C=AI(t).toRgb(),i=AI(I).toRgb(),e=g/100,A={r:(i.r-C.r)*e+C.r,g:(i.g-C.g)*e+C.g,b:(i.b-C.b)*e+C.b,a:(i.a-C.a)*e+C.a};return AI(A)};AI.readability=function(t,I){var g=AI(t),C=AI(I);return(Math.max(g.getLuminance(),C.getLuminance())+.05)/(Math.min(g.getLuminance(),C.getLuminance())+.05)};AI.isReadable=function(t,I,g){var C=AI.readability(t,I),i,e;switch(e=!1,i=VZg(g),i.level+i.size){case"AAsmall":case"AAAlarge":e=C>=4.5;break;case"AAlarge":e=C>=3;break;case"AAAsmall":e=C>=7;break}return e};AI.mostReadable=function(t,I,g){var C=null,i=0,e,A,s,l;g=g||{},A=g.includeFallbackColors,s=g.level,l=g.size;for(var n=0;n<I.length;n++)e=AI.readability(t,I[n]),e>i&&(i=e,C=AI(I[n]));return AI.isReadable(t,C,{level:s,size:l})||!A?C:(g.includeFallbackColors=!1,AI.mostReadable(t,["#fff","#000"],g))};var jD=AI.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},BZg=AI.hexNames=WZg(jD);function WZg(t){var I={};for(var g in t)t.hasOwnProperty(g)&&(I[t[g]]=g);return I}function Aig(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function FC(t,I){yZg(t)&&(t="100%");var g=YZg(t);return t=Math.min(I,Math.max(0,parseFloat(t))),g&&(t=parseInt(t*I,10)/100),Math.abs(t-I)<1e-6?1:t%I/parseFloat(I)}function IM(t){return Math.min(1,Math.max(0,t))}function $i(t){return parseInt(t,16)}function yZg(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function YZg(t){return typeof t=="string"&&t.indexOf("%")!=-1}function NA(t){return t.length==1?"0"+t:""+t}function Am(t){return t<=1&&(t=t*100+"%"),t}function sig(t){return Math.round(parseFloat(t)*255).toString(16)}function Uq(t){return $i(t)/255}var aA=function(){var t="[-\\+]?\\d+%?",I="[-\\+]?\\d*\\.\\d+%?",g="(?:"+I+")|(?:"+t+")",C="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",i="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?";return{CSS_UNIT:new RegExp(g),rgb:new RegExp("rgb"+C),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+C),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+C),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Cl(t){return!!aA.CSS_UNIT.exec(t)}function NZg(t){t=t.replace(eZg,"").replace(AZg,"").toLowerCase();var I=!1;if(jD[t])t=jD[t],I=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var g;return(g=aA.rgb.exec(t))?{r:g[1],g:g[2],b:g[3]}:(g=aA.rgba.exec(t))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=aA.hsl.exec(t))?{h:g[1],s:g[2],l:g[3]}:(g=aA.hsla.exec(t))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=aA.hsv.exec(t))?{h:g[1],s:g[2],v:g[3]}:(g=aA.hsva.exec(t))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=aA.hex8.exec(t))?{r:$i(g[1]),g:$i(g[2]),b:$i(g[3]),a:Uq(g[4]),format:I?"name":"hex8"}:(g=aA.hex6.exec(t))?{r:$i(g[1]),g:$i(g[2]),b:$i(g[3]),format:I?"name":"hex"}:(g=aA.hex4.exec(t))?{r:$i(g[1]+""+g[1]),g:$i(g[2]+""+g[2]),b:$i(g[3]+""+g[3]),a:Uq(g[4]+""+g[4]),format:I?"name":"hex8"}:(g=aA.hex3.exec(t))?{r:$i(g[1]+""+g[1]),g:$i(g[2]+""+g[2]),b:$i(g[3]+""+g[3]),format:I?"name":"hex"}:!1}function VZg(t){var I,g;return t=t||{level:"AA",size:"small"},I=(t.level||"AA").toUpperCase(),g=(t.size||"small").toLowerCase(),I!=="AA"&&I!=="AAA"&&(I="AA"),g!=="small"&&g!=="large"&&(g="small"),{level:I,size:g}}const MZg={__name:"Table",props:{workbook:Object},setup(t){const I=t,g=gg.ref(null),C=gg.ref([]),i=gg.ref(null),e=gg.computed(()=>I.workbook.worksheets?I.workbook.worksheets.filter(Z=>Z._rows.length):[]),A=()=>{g.value=new xD(i.value,{view:{height:()=>document.documentElement.clientHeight-120,width:()=>document.documentElement.clientWidth-40},mode:"read",showToolbar:!1,showGrid:!0,showContextmenu:!1,multipleSheets:!0,rpx:1,row:{len:100,height:25,autoHeight:!0},col:{len:26,width:50,indexWidth:60,minWidth:30,autoWidth:!0},style:{bgcolor:"#ffffff",color:"#333333",align:"left",valign:"middle",textwrap:!1,strike:!1,underline:!1,italic:!1,bold:!1,fontSize:12}}).loadData({}),m()},s=()=>{if(g.value){i.value.classList.add("loading");try{const Z=l();g.value&&(i.value.innerHTML=""),g.value=new xD(i.value,{view:{height:()=>document.documentElement.clientHeight-120,width:()=>document.documentElement.clientWidth-40},mode:"read",showToolbar:!1,showGrid:!0,showContextmenu:!1,multipleSheets:!0,rpx:1,row:{len:100,height:25,autoHeight:!0},col:{len:26,width:50,indexWidth:60,minWidth:30,autoWidth:!0}}).loadData(Z)}finally{i.value.classList.remove("loading")}}},l=()=>{let Z=[];return e.value.forEach(p=>{const Y=p.id,R={name:p._name,freeze:"A1",styles:[{bgcolor:"#ffffff",color:"#000000",align:"left",valign:"middle",fontSize:12}],merges:[],rows:{},cols:{}};try{n(p,R),a(p,R,new Map),r(p,R),Z.push(R)}catch{Z[Y]={name:p._name||"Sheet1",rows:{},cols:{}}}}),Z},n=(Z,p)=>{Z._merges&&Object.values(Z._merges).forEach(Y=>{const{top:R,left:X,bottom:H,right:S}=Y;p.merges.push(`${h(X-1)}${R}:${h(S-1)}${H}`)})},a=(Z,p,Y)=>{const R=Math.min(Z.rowCount||50,100);for(let X=0;X<R;X++){const H=Z.getRow(X+1);let S=25;if(p.rows[X]={cells:{},height:S},!H||!H.cellCount)continue;const z=Math.min(Z.columnCount||26,100);for(let v=0;v<z;v++)try{const K=H.getCell(v+1);if(!K||K.type==="null"&&!K.style){p.rows[X].cells[v]={text:"",style:0};continue}const{text:V,height:N}=d(K),B=o(K,Y,p.styles);S=Math.max(S,N);const G=Object.values(Z._merges||{}).find(w=>w.top===H.number&&w.left===v+1);G?p.rows[X].cells[v]={text:V,style:B,merge:[G.bottom-G.top,G.right-G.left]}:p.rows[X].cells[v]={text:V,style:B}}catch{p.rows[X].cells[v]={text:"",style:0}}p.rows[X].height=S}},d=Z=>{let p="";try{if(!Z||Z.value===null||Z.value===void 0)p="";else if(Z.type==="date"||Z.numFmt&&(Z.numFmt.includes("yy")||Z.numFmt.includes("mm")||Z.numFmt.includes("dd")||Z.numFmt.includes("h")||Z.numFmt.includes("m:s")))try{let S;if(Z.value instanceof Date)S=Z.value;else if(typeof Z.value=="number"){const z=new Date(1899,11,30);S=new Date(z.getTime()+Z.value*24*60*60*1e3)}else S=new Date(Z.value);if(isNaN(S.getTime()))p=String(Z.text||Z.value||"");else{const z=S.getFullYear(),v=(S.getMonth()+1).toString().padStart(2,"0"),K=S.getDate().toString().padStart(2,"0");if(Z.numFmt&&(Z.numFmt.includes("h")||Z.numFmt.includes("s"))){const V=S.getHours().toString().padStart(2,"0"),N=S.getMinutes().toString().padStart(2,"0"),B=S.getSeconds().toString().padStart(2,"0");p=`${z}/${v}/${K} ${V}:${N}:${B}`}else p=`${z}/${v}/${K}`}}catch{p=String(Z.text||Z.value||"")}else if(typeof Z.value=="object"&&Z.value!==null)Z.value.hyperlink?p="[链接]":Z.value.image?p="[图片]":Z.value.richText?p=Z.value.richText.map(S=>String((S==null?void 0:S.text)||"")).join(""):p=String(Z.text||"");else if(Z.formula)if(Z.numFmt&&(Z.numFmt.includes("yy")||Z.numFmt.includes("mm")||Z.numFmt.includes("dd")))try{const S=new Date(1899,11,30),z=new Date(S.getTime()+Z.result*24*60*60*1e3);if(isNaN(z.getTime()))p=String(Z.result||Z.value||"");else{const v=z.getFullYear(),K=(z.getMonth()+1).toString().padStart(2,"0"),V=z.getDate().toString().padStart(2,"0");p=`${v}-${K}-${V}`}}catch{p=String(Z.result||Z.value||"")}else p=Z.result!==void 0&&Z.result!==null?String(Z.result):String(Z.value||"");else p=Z.text!==void 0&&Z.text!==null?String(Z.text):Z.value!==void 0&&Z.value!==null?String(Z.value):""}catch{p="[格式错误]"}const Y=((p||"").match(/\n/g)||[]).length+1,R=[...p||""],X=Math.ceil(R.length/40),H=Math.max(Y,X)*20;return{text:p,height:H}},o=(Z,p,Y)=>{var S,z,v,K,V;const R={bgcolor:"#ffffff",color:"#000000",align:((S=Z.alignment)==null?void 0:S.horizontal)||"left",valign:((z=Z.alignment)==null?void 0:z.vertical)||"middle",fontSize:((v=Z.font)==null?void 0:v.size)||12,textwrap:!0,bold:(K=Z.font)==null?void 0:K.bold,italic:(V=Z.font)==null?void 0:V.italic,underline:!1,strike:!1};if(Z.fill&&Z.fill.type==="pattern"){const N=Z.fill.fgColor||{};if(typeof N.indexed=="number"){const B=vq[N.indexed];B&&(R.bgcolor=`#${B}`)}else if(typeof N.theme=="number"){const B={0:1,1:0,2:3,3:2,4:4,5:5,6:6,7:7,8:8,9:9},G=B[N.theme]!==void 0?B[N.theme]:N.theme;if(C.value[G]){let w=`#${C.value[G]}`;typeof N.tint=="number"&&N.tint!==0&&(w=c(w,N.tint)),R.bgcolor=w}}else if(N.rgb)R.bgcolor=`#${N.rgb.substring(N.rgb.length-6)}`;else if(N.argb){const B=u(N.argb);B&&(R.bgcolor=B)}}if(Z.font&&Z.font.color){const N=Z.font.color;if(typeof N.indexed=="number"){const B=vq[N.indexed];B&&(R.color=`#${B}`)}else if(typeof N.theme=="number"){const B={0:1,1:0,2:3,3:2,4:4,5:5,6:6,7:7,8:8,9:9},G=B[N.theme]!==void 0?B[N.theme]:N.theme;if(C.value[G]){let w=`#${C.value[G]}`;typeof N.tint=="number"&&N.tint!==0&&(w=c(w,N.tint)),R.color=w}}else if(N.rgb)R.color=`#${N.rgb.substring(N.rgb.length-6)}`;else if(N.argb){const B=u(N.argb);B&&(R.color=B)}}const X=JSON.stringify(R);if(p.has(X))return p.get(X);Y.push(R);const H=Y.length-1;return p.set(X,H),H},c=(Z,p)=>{try{const R=AI(Z).toRgb(),X=(v,K)=>{let V;return K<0?V=v*(1+K):V=v+(255-v)*K,Math.max(0,Math.min(255,Math.round(V)))},H=X(R.r,p),S=X(R.g,p),z=X(R.b,p);return AI({r:H,g:S,b:z}).toHexString()}catch{return Z}},r=(Z,p)=>{const Y=Math.min(Z.columnCount||26,50),R=new Map,X=new Set;Z._merges&&Object.values(Z._merges).forEach(H=>{for(let S=H.left;S<=H.right;S++)X.add(S-1)}),Z.eachRow(H=>{var S,z,v;for(let K=0;K<Y;K++)try{const V=H.getCell(K+1);if(!V)continue;let N="";try{V.text!==void 0&&V.text!==null?N=String(V.text):V.value!==void 0&&V.value!==null&&(typeof V.value=="object"?N=(S=V.value)!=null&&S.richText?V.value.richText.map(B=>String((B==null?void 0:B.text)||"")).join(""):(z=V.value)!=null&&z.hyperlink?"[链接]":(v=V.value)!=null&&v.image?"[图片]":"":N=String(V.value))}catch{N=""}if(N)if(Object.values(Z._merges||{}).some(G=>H.number>=G.top&&H.number<=G.bottom&&K+1>=G.left&&K+1<=G.right)){const G=Object.values(Z._merges||{}).find(w=>H.number>=w.top&&H.number<=w.bottom&&K+1>=w.left&&K+1<=w.right);if(G&&K+1===G.left){const w=G.right-G.left+1,W=[...N].reduce((f,D)=>f+(/[\u4e00-\u9fa5]/.test(D)?2:1),0),y=Math.ceil(W/w);R.set(K,Math.max(R.get(K)||0,y))}}else{const G=[...N].reduce((w,W)=>w+(/[\u4e00-\u9fa5]/.test(W)?2:1),0);R.set(K,Math.max(R.get(K)||0,G))}}catch{}});for(let H=0;H<Y;H++){const S=R.get(H);if(S){const z=Math.min(Math.max(S*8+10,50),300);p.cols[H]={width:z}}}},h=Z=>{let p,Y="";for(;Z>=0;)p=Z%26,Y=String.fromCharCode(p+65)+Y,Z=(Z-p)/26-1;return Y},b=()=>{var p;const Z=(p=I.workbook._themes)==null?void 0:p.theme1;if(!Z){C.value=["FFFFFF","000000","EEECE1","1F497D","4F81BD","C0504D","9BBB59","8064A2","4BACC6","F79646"];return}try{const X=new DOMParser().parseFromString(Z,"text/xml").getElementsByTagName("a:clrScheme")[0];if(!X)throw new Error("找不到颜色方案元素");C.value=[];const H=Array.from(X.children);for(const S of H){let z=null;const v=S.getElementsByTagName("a:srgbClr")[0],K=S.getElementsByTagName("a:sysClr")[0];v?z=v.getAttribute("val"):K&&(z=K.getAttribute("lastClr")||K.getAttribute("val")),C.value.push(z||"FFFFFF")}}catch(Y){console.error("解析主题颜色出错:",Y),C.value=["FFFFFF","000000","EEECE1","1F497D","4F81BD","C0504D","9BBB59","8064A2","4BACC6","F79646"]}},u=Z=>!Z||Z.length<8?null:`#${Z.substring(2)}`,m=()=>{b(),s()};return gg.onMounted(()=>{A()}),gg.watch(()=>I.workbook,()=>{m()}),(Z,p)=>(gg.openBlock(),gg.createElementBlock("div",null,[gg.createElementVNode("div",{ref_key:"spreadsheetRef",ref:i,class:"spreadsheet-container",id:"spreadsheet"},null,512)]))}};async function RZg(t,I){const g=await new fbg.Workbook().xlsx.load(t),C=gg.createApp(MZg,{workbook:g});return C.mount(I),{$el:I,$destroy(){C.unmount()}}}const Eq=t=>({$el:t,$destroy(){}}),fZg=[{accepts:["docx"],handler:async(t,I)=>{const g={...ED,debug:!0,experimental:!0};return await hog(t,I,null,g),Eq(I)}},{accepts:["pptx"],handler:async(t,I)=>Vbg(t,I)},{accepts:["xlsx"],handler:async(t,I)=>RZg(t,I)},{accepts:["pdf"],handler:async(t,I)=>rdg(t,I)},{accepts:["gif","jpg","jpeg","bmp","tiff","tif","png","svg"],handler:async(t,I)=>Zdg(t,I)},{accepts:["txt","json","js","css","java","py","html","jsx","ts","tsx","xml","md","log"],handler:async(t,I)=>Bdg(t,I)},{accepts:["error"],handler:async(t,I,g)=>(I.innerHTML=`<div style="text-align: center margin-top: 80px">不支持.${g}格式的在线预览，请下载后预览或转换为支持的格式</div>
<div style="text-align: center">支持docx, xlsx, pptx, pdf, 以及纯文本格式和各种图片格式的在线预览</div>`,Eq(I))}],Pq=fZg.reduce((t,{accepts:I,handler:g})=>(I.forEach(C=>t[C]=g),t),{});async function HZg(t){return new Promise((I,g)=>{const C=new FileReader;C.onload=i=>I(i.target.result),C.onerror=i=>g(i),C.readAsArrayBuffer(t)})}async function J9(t){return new Promise((I,g)=>{const C=new FileReader;C.onload=i=>I(i.target.result),C.onerror=i=>g(i),C.readAsDataURL(new Blob([t]))})}async function lig(t){return new Promise((I,g)=>{const C=new FileReader;C.onload=i=>I(i.target.result),C.onerror=i=>g(i),C.readAsText(new Blob([t]),"utf-8")})}function XZg(t){const I=t.lastIndexOf(".");return t.substr(I+1)}async function nig(t,I,g){const C=Pq[I];return C?C(t,g):Pq.error(t,g,I)}const SZg="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1623827680993'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6860'%20width='128'%20height='128'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c/style%3e%3c/defs%3e%3cpath%20d='M971.232%2041.216l0.768%200.768a32%2032%200%200%201%200%2044.96L88.512%20982.496a31.808%2031.808%200%200%201-41.952%202.944l-3.808-3.424a32%2032%200%200%201%200-44.96l169.12-171.36c-58.08-49.28-112.256-114.4-162.592-195.36l-7.84-12.8a65.664%2065.664%200%200%201%200-67.84c130.176-215.392%20286.656-323.104%20469.44-323.104%2081.312%200%20157.6%2021.312%20228.8%2064l186.56-189.088a31.808%2031.808%200%200%201%2044.992-0.32zM828.576%20297.28c51.584%2047.04%20100.16%20106.72%20145.728%20179.104l8.096%2013.024c12.8%2020.96%2012.8%2047.488%200%2068.448-131.68%20215.2-288.864%20322.784-471.52%20322.784-73.152%200-142.08-17.248-206.784-51.712l47.84-48.48a369.888%20369.888%200%200%200%20158.944%2035.296c158.144%200%20296.192-94.528%20417.088-292.096l-7.68-12.352c-43.424-69.056-89.088-124.96-137.024-168.128l45.312-45.888z%20m-317.696-65.792c-158.112%200-295.392%2094.496-414.848%20292.16l7.424%2012.064c48.32%2077.76%2099.552%20138.88%20153.856%20183.904l91.008-92.256a195.776%20195.776%200%200%201-29.504-103.744c0-107.552%2086.016-194.752%20192.128-194.752%2037.6%200%2072.704%2010.976%20102.336%2029.92l79.424-80.544a373.76%20373.76%200%200%200-181.824-46.72z%20m174.656%20210.784c11.264%2024.768%2017.504%2052.32%2017.504%2081.344%200%20107.552-85.984%20194.752-192.096%20194.752a189.248%20189.248%200%200%201-80.256-17.76l50.08-50.784c9.696%202.368%2019.776%203.616%2030.176%203.616%2070.72%200%20128.064-58.112%20128.064-129.824a131.84%20131.84%200%200%200-3.552-30.56l50.08-50.784z%20m-174.592-48.48c-70.72%200-128.096%2058.112-128.096%20129.824%200%2020.064%204.48%2039.04%2012.48%2056l170.88-173.152a126.144%20126.144%200%200%200-55.264-12.672z'%20fill='%23bfbfbf'%20p-id='6861'%3e%3c/path%3e%3c/svg%3e",DZg={class:"view-other"},KZg=["src"],FZg={class:"size-item"},kZg={__name:"index",props:{file:{type:Object,default:()=>({})}},setup(t){const I=t,g=gg.computed(()=>{const C=Number(I.file.size);if(!Number.isFinite(C)||!C)return"0KB";const i=1024,e=1048576,A=Math.abs(C),s=C<0?"-":"";return A>=e?`${s}${Math.floor(A/e*100)/100} GB`:A>=i?`${s}${Math.floor(A/i*100)/100} MB`:`${s}${A} KB`});return(C,i)=>{const e=gg.resolveComponent("big");return gg.openBlock(),gg.createElementBlock("div",DZg,[gg.createElementVNode("img",{class:"view-off-icon",src:gg.unref(SZg),alt:""},null,8,KZg),gg.createElementVNode("p",null,[gg.createTextVNode(gg.toDisplayString(t.file.name)+"."+gg.toDisplayString(t.file.type),1),gg.createElementVNode("span",FZg,gg.toDisplayString(g.value),1)]),gg.createElementVNode("p",null,[gg.createVNode(e,null,{default:gg.withCtx(()=>i[0]||(i[0]=[gg.createElementVNode("strong",null,"该类型文件不支持在线预览，请下载后查看。",-1)])),_:1})])])}}},zZg=m0(kZg,[["__scopeId","data-v-d007bf31"]]),JZg={class:"container"},LZg={class:"modal-height"},vZg={class:"file-box"},TZg={class:"view-wrapper"},xZg={key:0,class:"preview-wrapper",ref:"wrapper"},jZg={class:"preview-inner",ref:"preview-inner"},QZg={class:"preview-mark",ref:"bg-mark",id:"bg-mark"},OZg={class:"loading-container"},UZg={key:0,class:"viewfile-image"},EZg=["src","alt"],PZg=["src"],_Zg={__name:"index",props:{file:{type:Object,default:()=>({})}},setup(t){const I=t,g=gg.ref(!1),C=gg.ref(null),i=gg.ref(""),e=gg.ref(!1),A=gg.ref(0),s=gg.computed(()=>{const u=(I.file.type||"").toLowerCase();return Object.values({doc:["docx"],xlsx:["xlsx"],pdf:["pdf"],ppt:["pptx"],image:["gif","jpg","jpeg","bmp","tiff","tif","png","svg"],text:["txt","json","js","css","java","py","html","jsx","ts","tsx","xml","md","log"]}).flat().includes(u)}),l=gg.computed(()=>{const u=(I.file.type||"").toLowerCase();return["gif","jpg","jpeg","bmp","tiff","tif","png","svg"].includes(u)}),n=gg.computed(()=>{const u=String(i.value||"");return u?[u]:[]}),a=gg.computed(()=>({visible:e.value,open:d,close:o,next:c,prev:r}));function d(u=0){n.value.length&&(A.value=Math.max(0,Math.min(n.value.length-1,Number(u)||0)),e.value=!0)}function o(){e.value=!1}function c(){const u=n.value;u.length<=1||(A.value=(A.value+1)%u.length)}function r(){const u=n.value;u.length<=1||(A.value=(A.value-1+u.length)%u.length)}function h(u){e.value&&(u.key==="Escape"&&o(),u.key==="ArrowRight"&&c(),u.key==="ArrowLeft"&&r())}gg.onMounted(()=>{window.addEventListener("keydown",h)}),gg.onBeforeUnmount(()=>{window.removeEventListener("keydown",h)});const b=(u,m)=>{if(!C.value)return Promise.reject(new Error("Output element not found"));C.value.innerHTML="";const Z=document.createElement("div"),p=C.value.appendChild(Z);return new Promise((Y,R)=>nig(u,m,p).then(Y).catch(R))};return gg.watch(()=>I.file,u=>{if(u&&u.type)try{g.value=!0,gg.nextTick(()=>{if(l.value){i.value="",e.value=!1,A.value=0,C.value&&(C.value.innerHTML=""),J9(u.fileBuffer).then(m=>{i.value=String(m||"")}).finally(()=>{g.value=!1});return}i.value="",e.value=!1,A.value=0,b(u.fileBuffer,u.type).finally(()=>{g.value=!1})})}catch(m){console.warn(m)}},{immediate:!0,deep:!0}),(u,m)=>(gg.openBlock(),gg.createElementBlock("div",JZg,[gg.createElementVNode("div",LZg,[gg.createElementVNode("div",vZg,[gg.withDirectives(gg.createElementVNode("p",{class:"file-name"},gg.toDisplayString(t.file.filename),513),[[gg.vShow,!g.value]]),gg.createElementVNode("div",TZg,[s.value?(gg.openBlock(),gg.createElementBlock("div",xZg,[gg.createElementVNode("div",jZg,[gg.createElementVNode("div",QZg,null,512),gg.withDirectives(gg.createElementVNode("div",OZg,m[1]||(m[1]=[gg.createElementVNode("div",{class:"loading-spinner"},[gg.createElementVNode("svg",{viewBox:"0 0 50 50",class:"circular"},[gg.createElementVNode("circle",{cx:"25",cy:"25",r:"20",fill:"none",class:"path"})])],-1)]),512),[[gg.vShow,g.value]]),l.value?gg.withDirectives((gg.openBlock(),gg.createElementBlock("div",UZg,[gg.renderSlot(u.$slots,"image",{src:i.value,srcList:n.value,index:A.value,file:t.file,preview:a.value},()=>[gg.createElementVNode("img",{class:"viewfile-image-inner",src:i.value,alt:t.file.filename||"",onClick:m[0]||(m[0]=Z=>d(0))},null,8,EZg)],!0),e.value?(gg.openBlock(),gg.createElementBlock("div",{key:0,class:"viewfile-image-preview",onClick:gg.withModifiers(o,["self"])},[gg.createElementVNode("button",{class:"viewfile-image-preview-close",type:"button",onClick:o},"×"),n.value.length>1?(gg.openBlock(),gg.createElementBlock("button",{key:0,class:"viewfile-image-preview-prev",type:"button",onClick:gg.withModifiers(r,["stop"])}," ‹ ")):gg.createCommentVNode("",!0),gg.createElementVNode("img",{class:"viewfile-image-preview-img",src:n.value[A.value],alt:""},null,8,PZg),n.value.length>1?(gg.openBlock(),gg.createElementBlock("button",{key:1,class:"viewfile-image-preview-next",type:"button",onClick:gg.withModifiers(c,["stop"])}," › ")):gg.createCommentVNode("",!0)])):gg.createCommentVNode("",!0)],512)),[[gg.vShow,!g.value]]):gg.withDirectives((gg.openBlock(),gg.createElementBlock("div",{key:1,class:"output",ref_key:"output",ref:C},null,512)),[[gg.vShow,!g.value]])],512)],512)):t.file.type&&!s.value?(gg.openBlock(),gg.createBlock(zZg,{key:1,file:t.file},null,8,["file"])):gg.createCommentVNode("",!0)])])])]))}},aig=m0(_Zg,[["__scopeId","data-v-3eb932b1"]]),qZg={install(t){t.component("ViewFile",aig)}};exports.ViewFile=aig;exports.default=qZg;exports.getExtend=XZg;exports.readBuffer=HZg;exports.readDataURL=J9;exports.readText=lig;exports.render=nig;
