const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./html2canvas-Csps4_cl.js","./chunk-jRWAZmH_.js","./index.es-KDfAzJSG.js","./asyncToGenerator-BFc9W-7V.js","./typeof-C6uZ2mkP.js"])))=>i.map(i=>d[i]); import{o as e}from"./chunk-jRWAZmH_.js";import{d as t,f as n,n as r,t as i}from"./slicedToArray-BjCmY1mt.js";import{n as a,t as o}from"./typeof-C6uZ2mkP.js";import{t as s}from"./preload-helper-DZmVH3u5.js";a();var c=Uint8Array,l=Uint16Array,u=Int32Array,d=new c([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),f=new c([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,0,0]),p=new c([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),m=function(e,t){for(var n=new l(31),r=0;r<31;++r)n[r]=t+=1<>1|(x&21845)<<1;S=(S&52428)>>2|(S&13107)<<2,S=(S&61680)>>4|(S&3855)<<4,b[x]=((S&65280)>>8|(S&255)<<8)>>1}for(var C=(function(e,t,n){for(var r=e.length,i=0,a=new l(t);i>c]=u}else for(s=new l(r),i=0;i>15-e[i]);return s}),w=new c(288),x=0;x<144;++x)w[x]=8;for(var x=144;x<256;++x)w[x]=9;for(var x=256;x<280;++x)w[x]=7;for(var x=280;x<288;++x)w[x]=8;for(var T=new c(32),x=0;x<32;++x)T[x]=5;var E=C(w,9,0),D=C(T,5,0),O=function(e){return(e+7)/8|0},k=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new c(e.subarray(t,n))},A=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},j=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},M=function(e,t){for(var n=[],r=0;rm&&(m=a[r].s);var h=new l(m+1),g=N(n[f-1],h,0);if(g>t){var r=0,_=0,v=g-t,y=1<t)_+=y-(1<>=v;_>0;){var x=a[r].s;h[x]=0&&_;--r){var S=a[r].s;h[S]==t&&(--h[S],++_)}g=t}return{t:new c(h),l:g}},N=function(e,t,n){return e.s==-1?Math.max(N(e.l,t,n+1),N(e.r,t,n+1)):t[e.s]=n},P=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new l(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},F=function(e,t){for(var n=0,r=0;r>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a4&&!B[p[V-1]];--V);var H=u+5<<3,U=F(i,w)+F(a,T)+o,ne=F(i,g)+F(a,y)+o+14+3*V+F(ee,B)+2*ee[16]+3*ee[17]+7*ee[18];if(c>=0&&H<=U&&H<=ne)return I(t,m,e.subarray(c,c+u));var W,re,ie,ae;if(A(t,m,1+(ne15&&(A(t,m,ce[R]>>5&127),m+=ce[R]>>12)}}else W=E,re=w,ie=D,ae=T;for(var R=0;R255){var le=ue>>18&31;j(t,m,W[le+257]),m+=re[le+257],le>7&&(A(t,m,ue>>23&31),m+=d[le]);var de=ue&31;j(t,m,ie[de]),m+=ae[de],de>3&&(j(t,m,ue>>5&8191),m+=f[de])}else j(t,m,W[ue]),m+=re[ue]}return j(t,m,W[256]),m+re[256]},ee=new u([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),R=new c(0),z=function(e,t,n,r,i,a){var o=a.z||e.length,s=new c(r+o+5*(1+Math.ceil(o/7e3))+i),p=s.subarray(r,s.length-i),m=a.l,h=(a.r||0)&7;if(t){h&&(p[0]=a.r>>3);for(var g=ee[t-1],v=g>>13,b=g&8191,x=(1<7e3||F>24576)&&(H>423||!m)){h=L(e,p,0,D,A,j,N,F,z,P-z,h),F=M=N=0,z=P;for(var U=0;U<286;++U)A[U]=0;for(var U=0;U<30;++U)j[U]=0}var ne=2,W=0,re=b,ie=te-V&32767;if(H>2&&B==E(P-ie))for(var ae=Math.min(v,H)-1,oe=Math.min(32767,P),G=Math.min(258,H);ie<=oe&&--re&&te!=V;){if(e[P+ne]==e[P+ne-ie]){for(var se=0;sene){if(ne=se,W=ie,se>ae)break;for(var ce=Math.min(ie,se-2),le=0,U=0;Ule&&(le=de,V=ue)}}}te=V,V=S[te],ie+=te-V&32767}if(W){D[F++]=268435456|_[ne]<<18|y[W];var fe=_[ne]&31,pe=y[W]&31;N+=d[fe]+f[pe],++A[257+fe],++j[pe],R=P+ne,++M}else D[F++]=e[P],++A[e[P]]}}for(P=Math.max(P,R);P=o&&(p[h/8|0]=m,me=o),h=I(p,h+1,e.subarray(P,me))}a.i=o}return k(s,0,r+O(h)+i)},B=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},te=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new c(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return z(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},V=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},H=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=B();i.p(t.dictionary),V(e,2,i.d())}};function U(e,t){t||={};var n=B();n.p(e);var r=te(e,t,t.dictionary?6:2,4);return H(r,t),V(r,r.length-4,n.d()),r}var ne=typeof TextDecoder<`u`&&new TextDecoder;try{ne.decode(R,{stream:!0})}catch{}r();function W(e,t=`utf8`){return new TextDecoder(t).decode(e)}var re=new TextEncoder;function ie(e){return re.encode(e)}var ae=1024*8,oe=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),G={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},se=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=ae,n={}){let r=!1;typeof t==`number`?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);let i=n.offset?n.offset>>>0:0,a=t.byteLength-i,o=i;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw Error(`Mark stack empty`);return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let t=(this.offset+e)*2,n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,`uint8`)}readArray(e,t){let n=G[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===oe&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new G[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new G[t](i);return this.offset+=n,a}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){let e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){let e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t=``;for(let n=0;nthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}},ce=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t>>>=1;ce[e]=t}var le=4294967295;function ue(e,t,n){let r=e;for(let e=0;e>>8;return r}function de(e,t){return(ue(le,e,t)^le)>>>0}function fe(e,t,n){let r=e.readUint32(),i=de(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function pe(e,t,n){for(let r=0;r>1)&255}else{for(;a>1)&255;for(;a>1)&255}}function _e(e,t,n,r,i){let a=0;if(n.length===0){for(;a=n||o>=r))for(let e=0;e>8&255}var we=new Uint16Array([255]),Te=new Uint8Array(we.buffer)[0]===255,Ee=new Uint8Array;function De(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),c=new Uint8Array(r*s),l=Ee,u=0,d,f;for(let e=0;e>8&255}var ke=Uint8Array.of(137,80,78,71,13,10,26,10);function Ae(e){if(!je(e.readBytes(ke.length)))throw Error(`wrong PNG signature`)}function je(e){if(e.length79)throw Error(`keyword length must be between 1 and 79`)}var Fe=/^[\u0000-\u00FF]*$/;function Ie(e){if(!Fe.test(e))throw Error(`invalid latin1 text`)}function Le(e,t,n){let r=Re(t);e[r]=q(t,n-r.length-1)}function Re(e){for(e.mark();e.readByte()!==Ne;);let t=e.offset;e.reset();let n=K.decode(e.readBytes(t-e.offset-1));return e.skip(1),Pe(n),n}function q(e,t){return K.decode(e.readBytes(t))}var ze={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Be={UNKNOWN:-1,DEFLATE:0},Ve={UNKNOWN:-1,ADAPTIVE:0},He={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Ue={NONE:0,BACKGROUND:1,PREVIOUS:2},We={SOURCE:0,OVER:1},Ge=class extends se{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,n={}){super(e);let{checkCrc:r=!1}=n;this._checkCrc=r,this._inflator=new t,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array,depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array,this._compressionMethod=Be.UNKNOWN,this._filterMethod=Ve.UNKNOWN,this._interlaceMethod=He.UNKNOWN,this._colorType=ze.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Ae(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(Ae(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){let n=this.offset;switch(t){case`IHDR`:this.decodeIHDR();break;case`PLTE`:this.decodePLTE(e);break;case`IDAT`:this.decodeIDAT(e);break;case`IEND`:this._end=!0;break;case`tRNS`:this.decodetRNS(e);break;case`iCCP`:this.decodeiCCP(e);break;case Me:Le(this._png.text,this,e);break;case`pHYs`:this.decodepHYs();break;default:this.skip(e);break}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?fe(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){let n=this.offset;switch(t!==`fdAT`&&t!==`IDAT`&&this._writingDataChunks&&this.pushDataToFrame(),t){case`acTL`:this.decodeACTL();break;case`fcTL`:this.decodeFCTL();break;case`fdAT`:this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e;break}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?fe(this,e+4,t):this.skip(4)}decodeIHDR(){let e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=Ke(this.readUint8());let t=this.readUint8();this._colorType=t;let n;switch(t){case ze.GREYSCALE:n=1;break;case ze.TRUECOLOUR:n=3;break;case ze.INDEXED_COLOUR:n=1;break;case ze.GREYSCALE_ALPHA:n=2;break;case ze.TRUECOLOUR_ALPHA:n=4;break;case ze.UNKNOWN:default:throw Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==Be.DEFLATE)throw Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array};this._frames.push(e)}decodePLTE(e){if(e%3!=0)throw RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);let t=e/3;this._hasPalette=!0;let n=[];this._palette=n;for(let e=0;ethis._png.width*this._png.height)throw Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;tthis._palette.length)throw Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t({index:((e+t.yOffset)*this._png.width+t.xOffset+n)*this._png.channels,frameIndex:(e*t.width+n)*this._png.channels});switch(t.blendOp){case We.SOURCE:for(let n=0;n=200&&t.status<=299}function Qe(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{var t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var $e=J.saveAs||((typeof window>`u`?`undefined`:o(window))!==`object`||window!==J?function(){}:typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype?function(e,t,n){var r=J.URL||J.webkitURL,i=document.createElement(`a`);t=t||e.name||`download`,i.download=t,i.rel=`noopener`,typeof e==`string`?(i.href=e,i.origin===location.origin?Qe(i):Ze(i.href)?Xe(e,t,n):Qe(i,i.target=`_blank`)):(i.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){Qe(i)},0))}:`msSaveOrOpenBlob`in navigator?function(e,t,n){if(t=t||e.name||`download`,typeof e==`string`)if(Ze(e))Xe(e,t,n);else{var r=document.createElement(`a`);r.href=e,r.target=`_blank`,setTimeout(function(){Qe(r)})}else navigator.msSaveOrOpenBlob(function(e,t){return t===void 0?t={autoBom:!1}:o(t)!==`object`&&(Y.warn(`Deprecated: Expected third argument to be a object`),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}(e,n),t)}:function(e,t,n,r){if((r||=open(``,`_blank`))&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Xe(e,t,n);var i=e.type===`application/octet-stream`,a=/constructor/i.test(J.HTMLElement)||J.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||i&&a)&&(typeof FileReader>`u`?`undefined`:o(FileReader))===`object`){var c=new FileReader;c.onloadend=function(){var e=c.result;e=s?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location=e,r=null},c.readAsDataURL(e)}else{var l=J.URL||J.webkitURL,u=l.createObjectURL(e);r?r.location=u:location.href=u,r=null,setTimeout(function(){l.revokeObjectURL(u)},4e4)}});function et(e){var t;e||=``,this.ok=!1,e.charAt(0)==`#`&&(e=e.substr(1,6)),e={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`00ffff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000000`,blanchedalmond:`ffebcd`,blue:`0000ff`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dodgerblue:`1e90ff`,feldspar:`d19275`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`ff00ff`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,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`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslateblue:`8470ff`,lightslategray:`778899`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370d8`,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:`d87093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,red:`ff0000`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,violetred:`d02090`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`}[e=(e=e.replace(/ /g,``)).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:[`rgb(123, 234, 45)`,`rgb(255,234,245)`],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:[`#00ff00`,`336699`],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:[`#fb0`,`f0f`],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return`rgb(`+this.r+`, `+this.g+`, `+this.b+`)`},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return e.length==1&&(e=`0`+e),t.length==1&&(t=`0`+t),n.length==1&&(n=`0`+n),`#`+e+t+n}}var tt=J.atob.bind(J),nt=J.btoa.bind(J);function rt(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n=at(n,r,i,a,t[0],7,-680876936),a=at(a,n,r,i,t[1],12,-389564586),i=at(i,a,n,r,t[2],17,606105819),r=at(r,i,a,n,t[3],22,-1044525330),n=at(n,r,i,a,t[4],7,-176418897),a=at(a,n,r,i,t[5],12,1200080426),i=at(i,a,n,r,t[6],17,-1473231341),r=at(r,i,a,n,t[7],22,-45705983),n=at(n,r,i,a,t[8],7,1770035416),a=at(a,n,r,i,t[9],12,-1958414417),i=at(i,a,n,r,t[10],17,-42063),r=at(r,i,a,n,t[11],22,-1990404162),n=at(n,r,i,a,t[12],7,1804603682),a=at(a,n,r,i,t[13],12,-40341101),i=at(i,a,n,r,t[14],17,-1502002290),n=ot(n,r=at(r,i,a,n,t[15],22,1236535329),i,a,t[1],5,-165796510),a=ot(a,n,r,i,t[6],9,-1069501632),i=ot(i,a,n,r,t[11],14,643717713),r=ot(r,i,a,n,t[0],20,-373897302),n=ot(n,r,i,a,t[5],5,-701558691),a=ot(a,n,r,i,t[10],9,38016083),i=ot(i,a,n,r,t[15],14,-660478335),r=ot(r,i,a,n,t[4],20,-405537848),n=ot(n,r,i,a,t[9],5,568446438),a=ot(a,n,r,i,t[14],9,-1019803690),i=ot(i,a,n,r,t[3],14,-187363961),r=ot(r,i,a,n,t[8],20,1163531501),n=ot(n,r,i,a,t[13],5,-1444681467),a=ot(a,n,r,i,t[2],9,-51403784),i=ot(i,a,n,r,t[7],14,1735328473),n=st(n,r=ot(r,i,a,n,t[12],20,-1926607734),i,a,t[5],4,-378558),a=st(a,n,r,i,t[8],11,-2022574463),i=st(i,a,n,r,t[11],16,1839030562),r=st(r,i,a,n,t[14],23,-35309556),n=st(n,r,i,a,t[1],4,-1530992060),a=st(a,n,r,i,t[4],11,1272893353),i=st(i,a,n,r,t[7],16,-155497632),r=st(r,i,a,n,t[10],23,-1094730640),n=st(n,r,i,a,t[13],4,681279174),a=st(a,n,r,i,t[0],11,-358537222),i=st(i,a,n,r,t[3],16,-722521979),r=st(r,i,a,n,t[6],23,76029189),n=st(n,r,i,a,t[9],4,-640364487),a=st(a,n,r,i,t[12],11,-421815835),i=st(i,a,n,r,t[15],16,530742520),n=ct(n,r=st(r,i,a,n,t[2],23,-995338651),i,a,t[0],6,-198630844),a=ct(a,n,r,i,t[7],10,1126891415),i=ct(i,a,n,r,t[14],15,-1416354905),r=ct(r,i,a,n,t[5],21,-57434055),n=ct(n,r,i,a,t[12],6,1700485571),a=ct(a,n,r,i,t[3],10,-1894986606),i=ct(i,a,n,r,t[10],15,-1051523),r=ct(r,i,a,n,t[1],21,-2054922799),n=ct(n,r,i,a,t[8],6,1873313359),a=ct(a,n,r,i,t[15],10,-30611744),i=ct(i,a,n,r,t[6],15,-1560198380),r=ct(r,i,a,n,t[13],21,1309151649),n=ct(n,r,i,a,t[4],6,-145523070),a=ct(a,n,r,i,t[11],10,-1120210379),i=ct(i,a,n,r,t[2],15,718787259),r=ct(r,i,a,n,t[9],21,-343485551),e[0]=gt(n,e[0]),e[1]=gt(r,e[1]),e[2]=gt(i,e[2]),e[3]=gt(a,e[3])}function it(e,t,n,r,i,a){return t=gt(gt(t,e),gt(r,a)),gt(t<>>32-i,n)}function at(e,t,n,r,i,a,o){return it(t&n|~t&r,e,t,i,a,o)}function ot(e,t,n,r,i,a,o){return it(t&r|n&~r,e,t,i,a,o)}function st(e,t,n,r,i,a,o){return it(t^n^r,e,t,i,a,o)}function ct(e,t,n,r,i,a,o){return it(n^(t|~r),e,t,i,a,o)}function lt(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)rt(r,ut(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(rt(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,rt(r,i),r}function ut(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var dt=`0123456789abcdef`.split(``);function ft(e){for(var t=``,n=0;n<4;n++)t+=dt[e>>8*n+4&15]+dt[e>>8*n&15];return t}function pt(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function mt(e){return lt(e).map(pt).join(``)}var ht=function(e){for(var t=0;t>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}function _t(e,t){var n,r,i,a;if(e!==n){for(var o=(i=e,a=1+(256/e.length|0),Array(a+1).join(i)),s=[],c=0;c<256;c++)s[c]=c;var l=0;for(c=0;c<256;c++){var u=s[c];l=(l+u+o.charCodeAt(c))%256,s[c]=s[l],s[l]=u}n=e,r=s}else s=r;var d=t.length,f=0,p=0,m=``;for(c=0;c€/\f©þdSiz`;var a=(t+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=mt(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=_t(this.encryptionKey,this.padding)}function bt(e){if(/[^\u0000-\u00ff]/.test(e))throw Error(`Invalid PDF Name Object: `+e+`, Only accept ASCII characters.`);for(var t=``,n=e.length,r=0;r126?`#`+(`0`+i.toString(16)).slice(-2):e[r]}return t}function xt(e){if(o(e)!==`object`)throw Error(`Invalid Context passed to initialize PubSub (jsPDF-module)`);var t={};this.subscribe=function(e,n,r){if(r||=!1,typeof e!=`string`||typeof n!=`function`||typeof r!=`boolean`)throw Error(`Invalid arguments passed to PubSub.subscribe (jsPDF-module)`);t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[n,!!r],i},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[n]){var o=t[n][a];try{o[0].apply(e,r)}catch(e){J.console&&Y.error(`jsPDF PubSub Error`,e.message,e)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function St(e){if(!(this instanceof St))return new St(e);var t=`opacity,stroke-opacity`.split(`,`);for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id=``,this.objectNumber=-1}function Ct(e,t){this.gState=e,this.matrix=t,this.id=``,this.objectNumber=-1}function X(e,t,n,r,i){if(!(this instanceof X))return new X(e,t,n,r,i);this.type=e===`axial`?2:3,this.coords=t,this.colors=n,Ct.call(this,r,i)}function wt(e,t,n,r,i){if(!(this instanceof wt))return new wt(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream=``,this.cloneIndex=0,Ct.call(this,r,i)}function Z(e){var t,n=typeof arguments[0]==`string`?arguments[0]:`p`,r=arguments[1],i=arguments[2],a=arguments[3],s=[],c=1,l=16,u=`S`,d=null;o(e||={})===`object`&&(n=e.orientation,r=e.unit||r,i=e.format||i,a=e.compress||e.compressPdf||a,(d=e.encryption||null)!==null&&(d.userPassword=d.userPassword||``,d.ownerPassword=d.ownerPassword||``,d.userPermissions=d.userPermissions||[]),c=typeof e.userUnit==`number`?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(l=e.floatPrecision),u=e.defaultPathOperation||`S`),s=e.filters||(!0===a?[`FlateEncode`]:s),r||=`mm`,n=(``+(n||`P`)).toLowerCase();var f=e.putOnlyUsedFonts||!1,p={},m={internal:{},__private__:{}};m.__private__.PubSub=xt;var h=`1.3`,g=m.__private__.getPdfVersion=function(){return h};m.__private__.setPdfVersion=function(e){h=e};var _={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};m.__private__.getPageFormats=function(){return _};var v=m.__private__.getPageFormat=function(e){return _[e]};i||=`a4`;var y=`compat`,b=`advanced`,x=y;function S(){this.saveGraphicsState(),G(new q(xe,0,0,-xe,0,On()*xe).toString()+` cm`),this.setFontSize(this.getFontSize()/xe),u=`n`,x=b}function C(){this.restoreGraphicsState(),u=`S`,x=y}var w=m.__private__.combineFontStyleAndFontWeight=function(e,t){if(e==`bold`&&t==`normal`||e==`bold`&&t==400||e==`normal`&&t==`italic`||e==`bold`&&t==`italic`)throw Error(`Invalid Combination of fontweight and fontstyle`);return t&&(e=t==400||t===`normal`?e===`italic`?`italic`:`normal`:t!=700&&t!==`bold`||e!==`normal`?(t==700?`bold`:t)+``+e:`bold`),e};m.advancedAPI=function(e){var t=x===y;return t&&S.call(this),typeof e!=`function`||(e(this),t&&C.call(this)),this},m.compatAPI=function(e){var t=x===b;return t&&C.call(this),typeof e!=`function`||(e(this),t&&S.call(this)),this},m.isAdvancedAPI=function(){return x===b};var T,E=function(e){if(x!==b)throw Error(e+` is only available in 'advanced' API mode. You need to call advancedAPI() first.`)},D=m.roundToPrecision=m.__private__.roundToPrecision=function(e,n){var r=t||n;if(isNaN(e)||isNaN(r))throw Error(`Invalid argument passed to jsPDF.roundToPrecision`);return e.toFixed(r).replace(/0+$/,``)};T=m.hpf=m.__private__.hpf=typeof l==`number`?function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.hpf`);return D(e,l)}:l===`smart`?function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.hpf`);return D(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.hpf`);return D(e,16)};var O=m.f2=m.__private__.f2=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.f2`);return D(e,2)},k=m.__private__.f3=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.f3`);return D(e,3)},A=m.scale=m.__private__.scale=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.scale`);return x===y?e*xe:x===b?e:void 0},j=function(e){return A(function(e){return x===y?On()-e:x===b?e:void 0}(e))};m.__private__.setPrecision=m.setPrecision=function(e){typeof parseInt(e,10)==`number`&&(t=parseInt(e,10))};var M,N=`00000000000000000000000000000000`,P=m.__private__.getFileId=function(){return N},F=m.__private__.setFileId=function(e){return N=e!==void 0&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():N.split(``).map(function(){return`ABCDEF0123456789`.charAt(Math.floor(16*Math.random()))}).join(``),d!==null&&(Pt=new yt(d.userPermissions,d.userPassword,d.ownerPassword,N)),N};m.setFileId=function(e){return F(e),this},m.getFileId=function(){return P()};var I=m.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),n=t<0?`+`:`-`,r=Math.floor(Math.abs(t/60)),i=Math.abs(t%60),a=[n,B(r),`'`,B(i),`'`].join(``);return[`D:`,e.getFullYear(),B(e.getMonth()+1),B(e.getDate()),B(e.getHours()),B(e.getMinutes()),B(e.getSeconds()),a].join(``)},L=m.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),o=parseInt(e.substr(14,2),10);return new Date(t,n,r,i,a,o,0)},ee=m.__private__.setCreationDate=function(e){var t;if(e===void 0&&(e=new Date),e instanceof Date)t=I(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw Error(`Invalid argument passed to jsPDF.setCreationDate`);t=e}return M=t},R=m.__private__.getCreationDate=function(e){var t=M;return e===`jsDate`&&(t=L(M)),t};m.setCreationDate=function(e){return ee(e),this},m.getCreationDate=function(e){return R(e)};var z,B=m.__private__.padd2=function(e){return(`0`+parseInt(e)).slice(-2)},te=m.__private__.padd2Hex=function(e){return(`00`+(e=e.toString())).substr(e.length)},V=0,H=[],U=[],ne=0,W=[],re=[],ie=!1,ae=U;m.__private__.setCustomOutputDestination=function(e){ie=!0,ae=e};var oe=function(e){ie||(ae=e)};m.__private__.resetCustomOutputDestination=function(){ie=!1,ae=U};var G=m.__private__.out=function(e){return e=e.toString(),ne+=e.length+1,ae.push(e),ae},se=m.__private__.write=function(e){return G(arguments.length===1?e.toString():Array.prototype.join.call(arguments,` `))},ce=m.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},le=[[`Helvetica`,`helvetica`,`normal`,`WinAnsiEncoding`],[`Helvetica-Bold`,`helvetica`,`bold`,`WinAnsiEncoding`],[`Helvetica-Oblique`,`helvetica`,`italic`,`WinAnsiEncoding`],[`Helvetica-BoldOblique`,`helvetica`,`bolditalic`,`WinAnsiEncoding`],[`Courier`,`courier`,`normal`,`WinAnsiEncoding`],[`Courier-Bold`,`courier`,`bold`,`WinAnsiEncoding`],[`Courier-Oblique`,`courier`,`italic`,`WinAnsiEncoding`],[`Courier-BoldOblique`,`courier`,`bolditalic`,`WinAnsiEncoding`],[`Times-Roman`,`times`,`normal`,`WinAnsiEncoding`],[`Times-Bold`,`times`,`bold`,`WinAnsiEncoding`],[`Times-Italic`,`times`,`italic`,`WinAnsiEncoding`],[`Times-BoldItalic`,`times`,`bolditalic`,`WinAnsiEncoding`],[`ZapfDingbats`,`zapfdingbats`,`normal`,null],[`Symbol`,`symbol`,`normal`,null]];m.__private__.getStandardFonts=function(){return le};var ue=e.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(e){return ue=x===b?e/xe:e,this};var de,fe=m.__private__.getFontSize=m.getFontSize=function(){return x===y?ue:ue*xe},pe=e.R2L||!1;m.__private__.setR2L=m.setR2L=function(e){return pe=e,this},m.__private__.getR2L=m.getR2L=function(){return pe};var me,he=m.__private__.setZoomMode=function(e){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(e))de=e;else if(isNaN(e)){if([void 0,null,`fullwidth`,`fullheight`,`fullpage`,`original`].indexOf(e)===-1)throw Error(`zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "`+e+`" is not recognized.`);de=e}else de=parseInt(e,10)};m.__private__.getZoomMode=function(){return de};var ge,_e=m.__private__.setPageMode=function(e){if([void 0,null,`UseNone`,`UseOutlines`,`UseThumbs`,`FullScreen`].indexOf(e)==-1)throw Error(`Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "`+e+`" is not recognized.`);me=e};m.__private__.getPageMode=function(){return me};var ve=m.__private__.setLayoutMode=function(e){if([void 0,null,`continuous`,`single`,`twoleft`,`tworight`,`two`].indexOf(e)==-1)throw Error(`Layout mode must be one of continuous, single, twoleft, tworight. "`+e+`" is not recognized.`);ge=e};m.__private__.getLayoutMode=function(){return ge},m.__private__.setDisplayMode=m.setDisplayMode=function(e,t,n){return he(e),ve(t),_e(n),this};var ye={title:``,subject:``,author:``,keywords:``,creator:``};m.__private__.getDocumentProperty=function(e){if(Object.keys(ye).indexOf(e)===-1)throw Error(`Invalid argument passed to jsPDF.getDocumentProperty`);return ye[e]},m.__private__.getDocumentProperties=function(){return ye},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(e){for(var t in ye)ye.hasOwnProperty(t)&&e[t]&&(ye[t]=e[t]);return this},m.__private__.setDocumentProperty=function(e,t){if(Object.keys(ye).indexOf(e)===-1)throw Error(`Invalid arguments passed to jsPDF.setDocumentProperty`);return ye[e]=t};var be,xe,Se,Ce,we,Te={},Ee={},De=[],Oe={},ke={},Ae={},je={},Me=null,Ne=0,K=[],Pe=new xt(m),Fe=e.hotfixes||[],Ie={},Le={},Re=[],q=function e(t,n,r,i,a,o){if(!(this instanceof e))return new e(t,n,r,i,a,o);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[t,n,r,i,a,o]};Object.defineProperty(q.prototype,`sx`,{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(q.prototype,`shy`,{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(q.prototype,`shx`,{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(q.prototype,`sy`,{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(q.prototype,`tx`,{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(q.prototype,`ty`,{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(q.prototype,`a`,{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(q.prototype,`b`,{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(q.prototype,`c`,{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(q.prototype,`d`,{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(q.prototype,`e`,{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(q.prototype,`f`,{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(q.prototype,`rotation`,{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(q.prototype,`scaleX`,{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(q.prototype,`scaleY`,{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(q.prototype,`isIdentity`,{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),q.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(T).join(e)},q.prototype.multiply=function(e){return new q(e.sx*this.sx+e.shy*this.shx,e.sx*this.shy+e.shy*this.sy,e.shx*this.sx+e.sy*this.shx,e.shx*this.shy+e.sy*this.sy,e.tx*this.sx+e.ty*this.shx+this.tx,e.tx*this.shy+e.ty*this.sy+this.ty)},q.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(e*e+t*t),s=(e/=o)*n+(t/=o)*r;n-=e*s,r-=t*s;var c=Math.sqrt(n*n+r*r);return s/=c,e*(r/=c)>16&255,r=l>>8&255,i=255&l}if(r===void 0||a===void 0&&n===r&&r===i)t=typeof n==`string`?n+` `+s[0]:e.precision===2?O(n/255)+` `+s[0]:k(n/255)+` `+s[0];else if(a===void 0||o(a)===`object`){if(a&&!isNaN(a.a)&&a.a===0)return[`1.`,`1.`,`1.`,s[1]].join(` `);t=typeof n==`string`?[n,r,i,s[1]].join(` `):e.precision===2?[O(n/255),O(r/255),O(i/255),s[1]].join(` `):[k(n/255),k(r/255),k(i/255),s[1]].join(` `)}else t=typeof n==`string`?[n,r,i,a,s[2]].join(` `):e.precision===2?[O(n),O(r),O(i),O(a),s[2]].join(` `):[k(n),k(r),k(i),k(a),s[2]].join(` `);return t},Ze=m.__private__.getFilters=function(){return s},Qe=m.__private__.putStream=function(e){var t=(e||={}).data||``,n=e.filters||Ze(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,a=t.length,o=e.objectId,s=function(e){return e};if(d!==null&&o===void 0)throw Error(`ObjectId must be passed to putStream for file encryption`);d!==null&&(s=Pt.encryptor(o,0));var c={};!0===n&&(n=[`FlateEncode`]);var l=e.additionalKeyValues||[],u=(c=Z.API.processDataByFilters===void 0?{data:t,reverseChain:[]}:Z.API.processDataByFilters(t,n)).reverseChain+(Array.isArray(r)?r.join(` `):r.toString());if(c.data.length!==0&&(l.push({key:`Length`,value:c.data.length}),!0===i&&l.push({key:`Length1`,value:a})),u.length!=0)if(u.split(`/`).length-1==1)l.push({key:`Filter`,value:u});else{l.push({key:`Filter`,value:`[`+u+`]`});for(var f=0;f>`),c.data.length!==0&&(G(`stream`),G(s(c.data)),G(`endstream`))},tt=m.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;Ge(r,!0),G(`<>`),G(`endobj`);var a=n.join(` `);return x===b&&(a+=` Q`),Ge(i,!0),Qe({data:a,filters:Ze(),objectId:i}),G(`endobj`),r},rt=m.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Ne;e++)K[e].objId=We(),K[e].contentsObjId=We();for(e=1;e<=Ne;e++)n.push(tt({number:e,data:re[e],objId:K[e].objId,contentsObjId:K[e].contentsObjId,mediaBox:K[e].mediaBox,cropBox:K[e].cropBox,bleedBox:K[e].bleedBox,trimBox:K[e].trimBox,artBox:K[e].artBox,userUnit:K[e].userUnit,rootDictionaryObjId:qe,resourceDictionaryObjId:Je}));Ge(qe,!0),G(`<>`),G(`endobj`),Pe.publish(`postPutPages`)},it=function(e){Pe.publish(`putFont`,{font:e,out:G,newObject:Ue,putStream:Qe}),!0!==e.isAlreadyPutted&&(e.objectNumber=Ue(),G(`<<`),G(`/Type /Font`),G(`/BaseFont /`+bt(e.postScriptName)),G(`/Subtype /Type1`),typeof e.encoding==`string`&&G(`/Encoding /`+e.encoding),G(`/FirstChar 32`),G(`/LastChar 255`),G(`>>`),G(`endobj`))},at=function(e){e.objectNumber=Ue();var t=[];t.push({key:`Type`,value:`/XObject`}),t.push({key:`Subtype`,value:`/Form`}),t.push({key:`BBox`,value:`[`+[T(e.x),T(e.y),T(e.x+e.width),T(e.y+e.height)].join(` `)+`]`}),t.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),Qe({data:e.pages[1].join(` `),additionalKeyValues:t,objectId:e.objectNumber}),G(`endobj`)},ot=function(e,t){t||=21;var n=Ue(),r=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),e[0].offset!=0){var a={offset:0,color:e[0].color};e.unshift(a)}if(e[e.length-1].offset!=1){var o={offset:1,color:e[e.length-1].color};e.push(o)}for(var s=``,c=0,l=0;le[c+1].offset;)c++;var u=e[c].offset,d=(n-u)/(e[c+1].offset-u),f=e[c].color,p=e[c+1].color;s+=te(Math.round((1-d)*f[0]+d*p[0]).toString(16))+te(Math.round((1-d)*f[1]+d*p[1]).toString(16))+te(Math.round((1-d)*f[2]+d*p[2]).toString(16))}return s.trim()}(e.colors,t),i=[];i.push({key:`FunctionType`,value:`0`}),i.push({key:`Domain`,value:`[0.0 1.0]`}),i.push({key:`Size`,value:`[`+t+`]`}),i.push({key:`BitsPerSample`,value:`8`}),i.push({key:`Range`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),i.push({key:`Decode`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),Qe({data:r,additionalKeyValues:i,alreadyAppliedFilters:[`/ASCIIHexDecode`],objectId:n}),G(`endobj`),e.objectNumber=Ue(),G(`<< /ShadingType `+e.type),G(`/ColorSpace /DeviceRGB`);var a=`/Coords [`+T(parseFloat(e.coords[0]))+` `+T(parseFloat(e.coords[1]))+` `;e.type===2?a+=T(parseFloat(e.coords[2]))+` `+T(parseFloat(e.coords[3])):a+=T(parseFloat(e.coords[2]))+` `+T(parseFloat(e.coords[3]))+` `+T(parseFloat(e.coords[4]))+` `+T(parseFloat(e.coords[5])),G(a+=`]`),e.matrix&&G(`/Matrix [`+e.matrix.toString()+`]`),G(`/Function `+n+` 0 R`),G(`/Extend [true true]`),G(`>>`),G(`endobj`)},st=function(e,t){var n=We(),r=Ue();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:`Type`,value:`/Pattern`}),i.push({key:`PatternType`,value:`1`}),i.push({key:`PaintType`,value:`1`}),i.push({key:`TilingType`,value:`1`}),i.push({key:`BBox`,value:`[`+e.boundingBox.map(T).join(` `)+`]`}),i.push({key:`XStep`,value:T(e.xStep)}),i.push({key:`YStep`,value:T(e.yStep)}),i.push({key:`Resources`,value:n+` 0 R`}),e.matrix&&i.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),Qe({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),G(`endobj`)},ct=function(e){for(var t in e.objectNumber=Ue(),G(`<<`),e)switch(t){case`opacity`:G(`/ca `+O(e[t]));break;case`stroke-opacity`:G(`/CA `+O(e[t]))}G(`>>`),G(`endobj`)},lt=function(e){Ge(e.resourcesOid,!0),G(`<<`),G(`/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]`),function(){for(var e in G(`/Font <<`),Te)Te.hasOwnProperty(e)&&(!1===f||!0===f&&p.hasOwnProperty(e))&&G(`/`+e+` `+Te[e].objectNumber+` 0 R`);G(`>>`)}(),function(){if(Object.keys(Oe).length>0){for(var e in G(`/Shading <<`),Oe)Oe.hasOwnProperty(e)&&Oe[e]instanceof X&&Oe[e].objectNumber>=0&&G(`/`+e+` `+Oe[e].objectNumber+` 0 R`);Pe.publish(`putShadingPatternDict`),G(`>>`)}}(),function(e){if(Object.keys(Oe).length>0){for(var t in G(`/Pattern <<`),Oe)Oe.hasOwnProperty(t)&&Oe[t]instanceof m.TilingPattern&&Oe[t].objectNumber>=0&&Oe[t].objectNumber>`)}}(e.objectOid),function(){if(Object.keys(Ae).length>0){for(var e in G(`/ExtGState <<`),Ae)Ae.hasOwnProperty(e)&&Ae[e].objectNumber>=0&&G(`/`+e+` `+Ae[e].objectNumber+` 0 R`);Pe.publish(`putGStateDict`),G(`>>`)}}(),function(){for(var e in G(`/XObject <<`),Ie)Ie.hasOwnProperty(e)&&Ie[e].objectNumber>=0&&G(`/`+e+` `+Ie[e].objectNumber+` 0 R`);Pe.publish(`putXobjectDict`),G(`>>`)}(),G(`>>`),G(`endobj`)},ut=function(e){Ee[e.fontName]=Ee[e.fontName]||{},Ee[e.fontName][e.fontStyle]=e.id},dt=function(e,t,n,r,i){var a={id:`F`+(Object.keys(Te).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return Pe.publish(`addFont`,{font:a,instance:this}),Te[a.id]=a,ut(a),a.id},ft=m.__private__.pdfEscape=m.pdfEscape=function(e,t){return function(e,t){var n,r,i,a,o,s,c,l,u;if(i=(t||={}).sourceEncoding||`Unicode`,o=t.outputEncoding,(t.autoencode||o)&&Te[be].metadata&&Te[be].metadata[i]&&Te[be].metadata[i].encoding&&(a=Te[be].metadata[i].encoding,!o&&Te[be].encoding&&(o=Te[be].encoding),!o&&a.codePages&&(o=a.codePages[0]),typeof o==`string`&&(o=a[o]),o)){for(c=!1,s=[],n=0,r=e.length;n>8&&(c=!0);e=s.join(``)}for(n=e.length;c===void 0&&n!==0;)e.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n>8)>>8)throw Error(`Character at position `+n+` of string '`+e+`' exceeds 16bits. Cannot be encoded into UCS-2 BE`);s.push(u),s.push(l-(u<<8))}return String.fromCharCode.apply(void 0,s)}(e,t).replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)},pt=m.__private__.beginPage=function(e){re[++Ne]=[],K[Ne]={objId:0,contentsObjId:0,userUnit:Number(c),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},gt(Ne),oe(re[z])},mt=function(e,t){var r,a,o;switch(n=t||n,typeof e==`string`&&(r=v(e.toLowerCase()),Array.isArray(r)&&(a=r[0],o=r[1])),Array.isArray(e)&&(a=e[0]*xe,o=e[1]*xe),isNaN(a)&&(a=i[0],o=i[1]),(a>14400||o>14400)&&(Y.warn(`A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400`),a=Math.min(14400,a),o=Math.min(14400,o)),i=[a,o],n.substr(0,1)){case`l`:o>a&&(i=[o,a]);break;case`p`:a>o&&(i=[o,a])}pt(i),en(Qt),G(ln),mn!==0&&G(mn+` J`),hn!==0&&G(hn+` j`),Pe.publish(`addPage`,{pageNumber:Ne})},ht=function(e){e>0&&e<=Ne&&(re.splice(e,1),K.splice(e,1),Ne--,z>Ne&&(z=Ne),this.setPage(z))},gt=function(e){e>0&&e<=Ne&&(z=e)},_t=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return re.length-1},vt=function(e,t,n){var r,i=void 0;return n||={},e=e===void 0?Te[be].fontName:e,t=t===void 0?Te[be].fontStyle:t,r=e.toLowerCase(),Ee[r]!==void 0&&Ee[r][t]!==void 0?i=Ee[r][t]:Ee[e]!==void 0&&Ee[e][t]!==void 0?i=Ee[e][t]:!1===n.disableWarning&&Y.warn(`Unable to look up font label for font '`+e+`', '`+t+`'. Refer to getFontList() for available fonts.`),i||n.noFallback||((i=Ee.times[t])??(i=Ee.times.normal)),i},Ct=m.__private__.putInfo=function(){var e=Ue(),t=function(e){return e};for(var n in d!==null&&(t=Pt.encryptor(e,0)),G(`<<`),G(`/Producer (`+ft(t(`jsPDF `+Z.version))+`)`),ye)ye.hasOwnProperty(n)&&ye[n]&&G(`/`+n.substr(0,1).toUpperCase()+n.substr(1)+` (`+ft(t(ye[n]))+`)`);G(`/CreationDate (`+ft(t(M))+`)`),G(`>>`),G(`endobj`)},Tt=m.__private__.putCatalog=function(e){var t=(e||={}).rootDictionaryObjId||qe;switch(Ue(),G(`<<`),G(`/Type /Catalog`),G(`/Pages `+t+` 0 R`),de||=`fullwidth`,de){case`fullwidth`:G(`/OpenAction [3 0 R /FitH null]`);break;case`fullheight`:G(`/OpenAction [3 0 R /FitV null]`);break;case`fullpage`:G(`/OpenAction [3 0 R /Fit]`);break;case`original`:G(`/OpenAction [3 0 R /XYZ null null 1]`);break;default:var n=``+de;n.substr(n.length-1)===`%`&&(de=parseInt(de)/100),typeof de==`number`&&G(`/OpenAction [3 0 R /XYZ null null `+O(de)+`]`)}switch(ge||=`continuous`,ge){case`continuous`:G(`/PageLayout /OneColumn`);break;case`single`:G(`/PageLayout /SinglePage`);break;case`two`:case`twoleft`:G(`/PageLayout /TwoColumnLeft`);break;case`tworight`:G(`/PageLayout /TwoColumnRight`)}me&&G(`/PageMode /`+me),Pe.publish(`putCatalog`),G(`>>`),G(`endobj`)},Et=m.__private__.putTrailer=function(){G(`trailer`),G(`<<`),G(`/Size `+(V+1)),G(`/Root `+V+` 0 R`),G(`/Info `+(V-1)+` 0 R`),d!==null&&G(`/Encrypt `+Pt.oid+` 0 R`),G(`/ID [ <`+N+`> <`+N+`> ]`),G(`>>`)},Dt=m.__private__.putHeader=function(){G(`%PDF-`+h),G(`%ºß¬à`)},Ot=m.__private__.putXRef=function(){var e=`0000000000`;G(`xref`),G(`0 `+(V+1)),G(`0000000000 65535 f `);for(var t=1;t<=V;t++)typeof H[t]==`function`?G((e+H[t]()).slice(-10)+` 00000 n `):H[t]===void 0?G(`0000000000 00000 n `):G((e+H[t]).slice(-10)+` 00000 n `)},kt=m.__private__.buildDocument=function(){var e;V=0,ne=0,U=[],H=[],W=[],qe=We(),Je=We(),oe(U),Pe.publish(`buildDocument`),Dt(),rt(),function(){Pe.publish(`putAdditionalObjects`);for(var e=0;e`),G(`/O <`+Pt.toHexString(Pt.O)+`>`),G(`/P `+Pt.P),G(`>>`),G(`endobj`)),Ct(),Tt();var t=ne;return Ot(),Et(),G(`startxref`),G(``+t),G(`%%EOF`),oe(re[z]),U.join(` `)},Q=m.__private__.getBlob=function(e){return new Blob([ce(e)],{type:`application/pdf`})},At=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},jt=function(e){var t,n=e.document,r=n.documentElement,i=n.head,a=n.body;return i||(i=n.createElement(`head`),r.appendChild(i)),a||(a=n.createElement(`body`),r.appendChild(a)),At(i),At(a),(t=n.createElement(`style`)).appendChild(n.createTextNode(`html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}`)),i.appendChild(t),{document:n,body:a}},Mt=m.output=m.__private__.output=(He=function(e,t){switch(typeof(t||={})==`string`?t={filename:t}:t.filename=t.filename||`generated.pdf`,e){case void 0:return kt();case`save`:m.save(t.filename);break;case`arraybuffer`:return ce(kt());case`blob`:return Q(kt());case`bloburi`:case`bloburl`:if(J.URL!==void 0&&typeof J.URL.createObjectURL==`function`)return J.URL&&J.URL.createObjectURL(Q(kt()))||void 0;Y.warn(`bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.`);break;case`datauristring`:case`dataurlstring`:var n=``,r=kt();try{n=nt(r)}catch{n=nt(unescape(encodeURIComponent(r)))}return`data:application/pdf;filename=`+encodeURIComponent(t.filename)+`;base64,`+n;case`pdfobjectnewwindow`:if(Object.prototype.toString.call(J)===`[object Window]`){var i=`https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js`,a=!t.pdfObjectUrl;a||(i=t.pdfObjectUrl);var o=J.open();if(o!==null){var s=jt(o),c=s.document.createElement(`script`),l=this;c.src=i,a&&(c.integrity=`sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==`,c.crossOrigin=`anonymous`),c.onload=function(){o.PDFObject.embed(l.output(`dataurlstring`),t)},s.body.appendChild(c)}return o}throw Error(`The option pdfobjectnewwindow just works in a browser-environment.`);case`pdfjsnewwindow`:if(Object.prototype.toString.call(J)===`[object Window]`){var u=t.pdfJsUrl||`examples/PDF.js/web/viewer.html`,d=J.open();if(d!==null){var f=jt(d),p=f.document.createElement(`iframe`),h=u.indexOf(`?`)===-1?`?`:`&`;l=this,p.id=`pdfViewer`,p.width=`500px`,p.height=`400px`,p.src=u+h+`file=&downloadName=`+encodeURIComponent(t.filename),p.onload=function(){d.document.title=t.filename,p.contentWindow.PDFViewerApplication.open(l.output(`bloburl`))},f.body.appendChild(p)}return d}throw Error(`The option pdfjsnewwindow just works in a browser-environment.`);case`dataurlnewwindow`:if(Object.prototype.toString.call(J)!==`[object Window]`)throw Error(`The option dataurlnewwindow just works in a browser-environment.`);var g=J.open();if(g!==null){var _=jt(g),v=_.document.createElement(`iframe`);v.src=this.output(`datauristring`,t),_.body.appendChild(v),g.document.title=t.filename}if(g||typeof safari>`u`)return g;break;case`datauri`:case`dataurl`:return J.document.location.href=this.output(`datauristring`,t);default:return null}},He.foo=function(){try{return He.apply(this,arguments)}catch(n){var e=n.stack||``;~e.indexOf(` at `)&&(e=e.split(` at `)[1]);var t=`Error in function `+e.split(` `)[0].split(`<`)[0]+`: `+n.message;if(!J.console)throw Error(t);J.console.error(t,n),J.alert&&alert(t)}},He.foo.bar=He,He.foo),Nt=function(e){return!0===Array.isArray(Fe)&&Fe.indexOf(e)>-1};switch(r){case`pt`:xe=1;break;case`mm`:xe=72/25.4;break;case`cm`:xe=72/2.54;break;case`in`:xe=72;break;case`px`:xe=Nt(`px_scaling`)==1?.75:96/72;break;case`pc`:case`em`:xe=12;break;case`ex`:xe=6;break;default:if(typeof r!=`number`)throw Error(`Invalid unit: `+r);xe=r}var Pt=null;ee(),F();var Ft=m.__private__.getPageInfo=m.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfo`);return{objId:K[e].objId,pageNumber:e,pageContext:K[e]}},It=m.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfoByObjId`);for(var t in K)if(K[t].objId===e)break;return Ft(t)},Lt=m.__private__.getCurrentPageInfo=m.getCurrentPageInfo=function(){return{objId:K[z].objId,pageNumber:z,pageContext:K[z]}};m.addPage=function(){return mt.apply(this,arguments),this},m.setPage=function(){return gt.apply(this,arguments),oe.call(this,re[z]),this},m.insertPage=function(e){return this.addPage(),this.movePage(z,e),this},m.movePage=function(e,t){var n,r;if(e>t){n=re[e],r=K[e];for(var i=e;i>t;i--)re[i]=re[i-1],K[i]=K[i-1];re[t]=n,K[t]=r,this.setPage(t)}else if(e0&&(typeof e==`string`?e=g.splitTextToSize(e,d):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(g.splitTextToSize(t,d))},[]))),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ft,activeFontKey:be,fonts:Te,activeFontSize:ue}},Pe.publish(`preProcessText`,a),e=a.text,c=(r=a.options).angle,h instanceof q==0&&c&&typeof c==`number`){c*=Math.PI/180,r.rotationDirection===0&&(c=-c),x===b&&(c=-c);var L=Math.cos(c),ee=Math.sin(c);h=new q(L,ee,-ee,L,0,0)}else c&&c instanceof q&&(h=c);x!==b||h||(h=Be),(u=r.charSpace||fn)!==void 0&&(y+=T(A(u))+` Tc `,this.setCharSpace(this.getCharSpace()||0)),(m=r.horizontalScale)!==void 0&&(y+=T(100*m)+` Tz `),r.lang;var R=-1,z=r.renderingMode===void 0?r.stroke:r.renderingMode,B=g.internal.getCurrentPageInfo().pageContext;switch(z){case 0:case!1:case`fill`:R=0;break;case 1:case!0:case`stroke`:R=1;break;case 2:case`fillThenStroke`:R=2;break;case 3:case`invisible`:R=3;break;case 4:case`fillAndAddForClipping`:R=4;break;case 5:case`strokeAndAddPathForClipping`:R=5;break;case 6:case`fillThenStrokeAndAddToPathForClipping`:R=6;break;case 7:case`addToPathForClipping`:R=7}var te=B.usedRenderingMode===void 0?-1:B.usedRenderingMode;R===-1?te!==-1&&(y+=`0 Tr `):y+=R+` Tr `,R!==-1&&(B.usedRenderingMode=R),l=r.align||`left`;var V,H=ue*S,U=g.internal.pageSize.getWidth(),ne=Te[be];u=r.charSpace||fn,d=r.maxWidth||0,f=Object.assign({autoencode:!0,noBOM:!0},r.flags);var W=[],re=function(e){return g.getStringUnitWidth(e,{font:ne,charSpace:u,fontSize:ue,doKerning:!1})*ue/C};if(Object.prototype.toString.call(e)===`[object Array]`){var ie;s=D(e),l!==`left`&&(V=s.map(re));var ae,oe=0;if(l===`right`){t-=V[0],e=[],P=s.length;for(var se=0;se0?(d-V[fe])/ve:0;fe`:`)`),Se=parseFloat(s[ke][1]),Ce=parseFloat(s[ke][2]);break;case 0:we=(v?`<`:`(`)+s[ke]+(v?`>`:`)`),Se=an(t),Ce=on(n)}W!==void 0&&W[ke]!==void 0&&(De=W[ke]+` Tw `),ke===0?e.push(De+Oe(Se,Ce,h)+we):Ee===0?e.push(De+we):Ee===1&&e.push(De+Oe(Se,Ce,h)+we)}e=Ee===0?e.join(` Tj T* `):e.join(` Tj `),e+=` Tj `;var Ae=`BT /`;return Ae+=be+` `+ue+` Tf `,Ae+=T(ue*S)+` TL `,Ae+=$+` `,Ae+=y,Ae+=e,G(Ae+=`ET`),p[be]=!0,g};var Rt=m.__private__.clip=m.clip=function(e){return G(e===`evenodd`?`W*`:`W`),this};m.clipEvenOdd=function(){return Rt(`evenodd`)},m.__private__.discardPath=m.discardPath=function(){return G(`n`),this};var zt=m.__private__.isValidStyle=function(e){var t=!1;return[void 0,null,`S`,`D`,`F`,`DF`,`FD`,`f`,`f*`,`B`,`B*`,`n`].indexOf(e)!==-1&&(t=!0),t};m.__private__.setDefaultPathOperation=m.setDefaultPathOperation=function(e){return zt(e)&&(u=e),this};var Bt=m.__private__.getStyle=m.getStyle=function(e){var t=u;switch(e){case`D`:case`S`:t=`S`;break;case`F`:t=`f`;break;case`FD`:case`DF`:t=`B`;break;case`f`:case`f*`:case`B`:case`B*`:t=e}return t},Vt=m.close=function(){return G(`h`),this};m.stroke=function(){return G(`S`),this},m.fill=function(e){return Ht(`f`,e),this},m.fillEvenOdd=function(e){return Ht(`f*`,e),this},m.fillStroke=function(e){return Ht(`B`,e),this},m.fillStrokeEvenOdd=function(e){return Ht(`B*`,e),this};var Ht=function(e,t){o(t)===`object`?Gt(t,e):G(e)},Ut=function(e){e===null||x===b&&e===void 0||(e=Bt(e),G(e))};function Wt(e,t,n,r,i){var a=new wt(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix);return a.stream=this.stream,Ve(e+`$$`+ this.cloneIndex+++`$$`,a),a}var Gt=function(e,t){var n=ke[e.key],r=Oe[n];if(r instanceof X)G(`q`),G(Kt(t)),r.gState&&m.setGState(r.gState),G(e.matrix.toString()+` cm`),G(`/`+n+` sh`),G(`Q`);else if(r instanceof wt){var i=new q(1,0,0,-1,0,On());e.matrix&&(i=i.multiply(e.matrix||Be),n=Wt.call(r,e.key,e.boundingBox,e.xStep,e.yStep,i).id),G(`q`),G(`/Pattern cs`),G(`/`+n+` scn`),r.gState&&m.setGState(r.gState),G(t),G(`Q`)}},Kt=function(e){switch(e){case`f`:case`F`:case`n`:return`W n`;case`f*`:return`W* n`;case`B`:case`S`:return`W S`;case`B*`:return`W* S`}},qt=m.moveTo=function(e,t){return G(T(A(e))+` `+T(j(t))+` m`),this},Jt=m.lineTo=function(e,t){return G(T(A(e))+` `+T(j(t))+` l`),this},Yt=m.curveTo=function(e,t,n,r,i,a){return G([T(A(e)),T(j(t)),T(A(n)),T(j(r)),T(A(i)),T(j(a)),`c`].join(` `)),this};m.__private__.line=m.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!zt(i))throw Error(`Invalid arguments passed to jsPDF.line`);return x===y?this.lines([[n-e,r-t]],e,t,[1,1],i||`S`):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},m.__private__.lines=m.lines=function(e,t,n,r,i,a){var o,s,c,l,u,d,f,p,m,h,g,_;if(typeof e==`number`&&(_=n,n=t,t=e,e=_),r||=[1,1],a||=!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!zt(i)||typeof a!=`boolean`)throw Error(`Invalid arguments passed to jsPDF.lines`);for(qt(t,n),o=r[0],s=r[1],l=e.length,h=t,g=n,c=0;c>8&255,e>>16&255,e>>24&255)},yt.prototype.toHexString=function(e){return e.split(``).map(function(e){return(`0`+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join(``)},yt.prototype.hexToBytes=function(e){for(var t=[],n=0;n>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return _t(n,e)}},St.prototype.equals=function(e){var t,n=`id,objectNumber,equals`;if(!e||o(e)!==o(this))return!1;var r=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return r===0},Z.API={events:[]},Z.version=`4.2.1`;var Tt=Z.API,Et=1,Dt=function(e){return e.replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)},Ot=function(e){return e.replace(/\\\\/g,`\\`).replace(/\\\(/g,`(`).replace(/\\\)/g,`)`)},kt=function(e){return e.toString().replace(/#/g,`#23`).replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return`#`+(t.length===1?`0`+t:t)})},Q=function(e){return e.toFixed(2)},At=function(e){return e.toFixed(5)};Tt.__acroform__={};var jt=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Mt=function(e){return e*Et},Nt=function(e){var t=new Xt,n=$.internal.getHeight(e)||0,r=$.internal.getWidth(e)||0;return t.BBox=[0,0,Number(Q(r)),Number(Q(n))],t},Pt=Tt.__acroform__.setBit=function(e,t){if(e||=0,t||=0,isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.setBit`);return e|1<0;){t=``,a--;var l,u,d=Ut(`3`,e,a).height,f=e.multiline?o-a:(o-d)/2,p=f+=2,m=0,h=0,g=0;if(a<=0){t=`(...) Tj `,t+=`% Width of Text: `+Ut(t,e,a=12).width+`, FieldWidth:`+s+` `;break}for(var _=``,v=0,y=0;yo)continue t;_+=i[y][g],b=!0,h=y,y--}else{_=(_+=i[y][g]+` `).substr(_.length-1)==` `?_.substr(0,_.length-1):_;var x=parseInt(y),S=c(x,_,a),C=y>=i.length-1;if(S&&!C){_+=` `,g=0;continue}if(S||C){if(C)h=x;else if(e.multiline&&(d+2)*(v+2)+2>o)continue t}else{if(!e.multiline||(d+2)*(v+2)+2>o)continue t;h=x}}for(var w=``,T=m;T<=h;T++){var E=i[T];if(e.multiline){if(T===h){w+=E[g]+` `,g=(g+1)%E.length;continue}if(T===m){w+=E[E.length-1]+` `;continue}}w+=E[0]+` `}switch(w=w.substr(w.length-1)==` `?w.substr(0,w.length-1):w,u=Ut(w,e,a).width,e.textAlign){case`right`:l=s-u-2;break;case`center`:l=(s-u)/2;break;default:l=2}t+=Q(l)+` `+Q(p)+` Td `,t+=`(`+Dt(w)+`) Tj `,t+=-Q(l)+` 0 Td `,p=-(a+2),u=0,m=b?h:h+1,v++,_=``}break}return r.text=t,r.fontSize=a,r},Ut=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth(`3`,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},Wt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Gt=function(e,t){var n={type:`reference`,object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===n.type&&e.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},Kt=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||!1===e.internal.acroformPlugin.isInitialized)){if(Qt.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(Wt)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw Error(`Exception while creating AcroformDictionary`);Et=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new Zt,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe(`postPutResources`,function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe(`buildDocument`,function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&Gt(r,e)}})(e)}),e.internal.events.subscribe(`putCatalog`,function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw Error(`putCatalogCallback: Root missing.`);e.internal.write(`/AcroForm `+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+` 0 R`)})(e)}),e.internal.events.subscribe(`postPutPages`,function(t){(function(e,t){var n=!e;for(var r in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e||=t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var i=e[r],a=[],s=i.Rect;if(i.Rect&&=Bt(i.Rect,t),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=$.createDefaultAppearanceStream(i),o(i)===`object`&&typeof i.getKeyValueListForStream==`function`&&(a=i.getKeyValueListForStream()),i.Rect=s,i.hasAppearanceStream&&!i.appearanceStreamContent){var c=Vt(i);a.push({key:`AP`,value:`<>`}),t.internal.acroformPlugin.xForms.push(c)}if(i.appearanceStreamContent){var l=``;for(var u in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(u)){var d=i.appearanceStreamContent[u];if(l+=`/`+u+` `,l+=`<<`,Object.keys(d).length>=1||Array.isArray(d)){for(var r in d)if(d.hasOwnProperty(r)){var f=d[r];typeof f==`function`&&(f=f.call(t,i)),l+=`/`+r+` `+f+` `,t.internal.acroformPlugin.xForms.indexOf(f)>=0||t.internal.acroformPlugin.xForms.push(f)}}else typeof(f=d)==`function`&&(f=f.call(t,i)),l+=`/`+r+` `+f,t.internal.acroformPlugin.xForms.indexOf(f)>=0||t.internal.acroformPlugin.xForms.push(f);l+=`>>`}a.push({key:`AP`,value:`<< `+l+`>>`})}t.internal.putStream({additionalKeyValues:a,objectId:i.objId}),t.internal.out(`endobj`)}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=n,i=e[n];t.internal.newObjectDeferredBegin(i.objId,!0),o(i)===`object`&&typeof i.putStream==`function`&&i.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},qt=Tt.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var i=`[`,a=0;a0?t:void 0}}),Object.defineProperty(this,`Fields`,{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,`DA`,{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+Dt(t(e))+`)`}},set:function(t){e=t}})};jt(Zt,Yt);var Qt=function e(){Yt.call(this);var t=4;Object.defineProperty(this,`F`,{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute F supplied.`);t=e}}),Object.defineProperty(this,`showWhenPrinted`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(t,3)},set:function(e){!!e==1?this.F=Rt(t,3):this.F=zt(t,3)}});var n=0;Object.defineProperty(this,`Ff`,{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute Ff supplied.`);n=e}});var r=[];Object.defineProperty(this,`Rect`,{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(e){r=e===void 0?[]:e}}),Object.defineProperty(this,`x`,{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,`y`,{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,`width`,{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,`height`,{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var i=``;Object.defineProperty(this,`FT`,{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case`/Btn`:case`/Tx`:case`/Ch`:case`/Sig`:i=e;break;default:throw Error(`Invalid value "`+e+`" for attribute FT supplied.`)}}});var a=null;Object.defineProperty(this,`T`,{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof sn)return;a=`FieldObject`+ e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+Dt(t(a))+`)`},set:function(e){a=e.toString()}}),Object.defineProperty(this,`fieldName`,{configurable:!0,enumerable:!0,get:function(){return a},set:function(e){a=e}});var o=`helvetica`;Object.defineProperty(this,`fontName`,{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}});var s=`normal`;Object.defineProperty(this,`fontStyle`,{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){s=e}});var c=0;Object.defineProperty(this,`fontSize`,{enumerable:!0,configurable:!0,get:function(){return c},set:function(e){c=e}});var l=void 0;Object.defineProperty(this,`maxFontSize`,{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/Et:l},set:function(e){l=e}});var u=`black`;Object.defineProperty(this,`color`,{enumerable:!0,configurable:!0,get:function(){return u},set:function(e){u=e}});var d=`/F1 0 Tf 0 g`;Object.defineProperty(this,`DA`,{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof sn||this instanceof ln))return Jt(d,this.objId,this.scope)},set:function(e){e=e.toString(),d=e}});var f=null;Object.defineProperty(this,`DV`,{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof rn==0?Jt(f,this.objId,this.scope):f},set:function(e){e=e.toString(),f=this instanceof rn==0?e.substr(0,1)===`(`?Ot(e.substr(1,e.length-2)):Ot(e):e}}),Object.defineProperty(this,`defaultValue`,{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?Ot(f.substr(1,f.length-1)):f},set:function(e){e=e.toString(),f=this instanceof rn==1?`/`+kt(e):e}});var p=null;Object.defineProperty(this,`_V`,{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(e){this.V=e}}),Object.defineProperty(this,`V`,{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof rn==0?Jt(p,this.objId,this.scope):p},set:function(e){e=e.toString(),p=this instanceof rn==0?e.substr(0,1)===`(`?Ot(e.substr(1,e.length-2)):Ot(e):e}}),Object.defineProperty(this,`value`,{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?Ot(p.substr(1,p.length-1)):p},set:function(e){e=e.toString(),p=this instanceof rn==1?`/`+kt(e):e}}),Object.defineProperty(this,`hasAnnotation`,{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,`Type`,{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?`/Annot`:null}}),Object.defineProperty(this,`Subtype`,{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?`/Widget`:null}});var m,h=!1;Object.defineProperty(this,`hasAppearanceStream`,{enumerable:!0,configurable:!0,get:function(){return h},set:function(e){e=!!e,h=e}}),Object.defineProperty(this,`page`,{enumerable:!0,configurable:!0,get:function(){if(m)return m},set:function(e){m=e}}),Object.defineProperty(this,`readOnly`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,1)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,1):this.Ff=zt(this.Ff,1)}}),Object.defineProperty(this,`required`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,2)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,2):this.Ff=zt(this.Ff,2)}}),Object.defineProperty(this,`noExport`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,3)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,3):this.Ff=zt(this.Ff,3)}});var g=null;Object.defineProperty(this,`Q`,{enumerable:!0,configurable:!1,get:function(){if(g!==null)return g},set:function(e){if([0,1,2].indexOf(e)===-1)throw Error(`Invalid value "`+e+`" for attribute Q supplied.`);g=e}}),Object.defineProperty(this,`textAlign`,{get:function(){var e;switch(g){case 0:default:e=`left`;break;case 1:e=`center`;break;case 2:e=`right`}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case`right`:case 2:g=2;break;case`center`:case 1:g=1;break;default:g=0}}})};jt(Qt,Yt);var $t=function(){Qt.call(this),this.FT=`/Ch`,this.V=`()`,this.fontName=`zapfdingbats`;var e=0;Object.defineProperty(this,`TI`,{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,`topIndex`,{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var t=[];Object.defineProperty(this,`Opt`,{enumerable:!0,configurable:!1,get:function(){return qt(t,this.objId,this.scope)},set:function(e){var n,r=[];typeof(n=e)==`string`&&(r=function(e,t,n){n||=1;for(var r,i=[];r=t.exec(e);)i.push(r[n]);return i}(n,/\((.*?)\)/g)),t=r}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e||=``).toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,n){for(n||=!1,e=(e||=``).toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),!1!==n););},Object.defineProperty(this,`combo`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,18)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,18):this.Ff=zt(this.Ff,18)}}),Object.defineProperty(this,`edit`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,19)},set:function(e){!0===this.combo&&(!!e==1?this.Ff=Rt(this.Ff,19):this.Ff=zt(this.Ff,19))}}),Object.defineProperty(this,`sort`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,20)},set:function(e){!!e==1?(this.Ff=Rt(this.Ff,20),t.sort()):this.Ff=zt(this.Ff,20)}}),Object.defineProperty(this,`multiSelect`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,22)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,22):this.Ff=zt(this.Ff,22)}}),Object.defineProperty(this,`doNotSpellCheck`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,23)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,23):this.Ff=zt(this.Ff,23)}}),Object.defineProperty(this,`commitOnSelChange`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,27)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,27):this.Ff=zt(this.Ff,27)}}),this.hasAppearanceStream=!1};jt($t,Qt);var en=function(){$t.call(this),this.fontName=`helvetica`,this.combo=!1};jt(en,$t);var tn=function(){en.call(this),this.combo=!0};jt(tn,en);var nn=function(){tn.call(this),this.edit=!0};jt(nn,tn);var rn=function(){Qt.call(this),this.FT=`/Btn`,Object.defineProperty(this,`noToggleToOff`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,15)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,15):this.Ff=zt(this.Ff,15)}}),Object.defineProperty(this,`radio`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,16)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,16):this.Ff=zt(this.Ff,16)}}),Object.defineProperty(this,`pushButton`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,17)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,17):this.Ff=zt(this.Ff,17)}}),Object.defineProperty(this,`radioIsUnison`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,26)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,26):this.Ff=zt(this.Ff,26)}});var e,t={};Object.defineProperty(this,`MK`,{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,r=[];for(n in r.push(`<<`),t)r.push(`/`+n+` (`+Dt(e(t[n]))+`)`);return r.push(`>>`),r.join(` `)}},set:function(e){o(e)===`object`&&(t=e)}}),Object.defineProperty(this,`caption`,{enumerable:!0,configurable:!0,get:function(){return t.CA||``},set:function(e){typeof e==`string`&&(t.CA=e)}}),Object.defineProperty(this,`AS`,{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){var n=t==null?``:t.toString();n.substr(0,1)===`/`&&(n=n.substr(1)),e=`/`+kt(n)}}),Object.defineProperty(this,`appearanceState`,{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e=`/`+kt(t)}})};jt(rn,Qt);var an=function(){rn.call(this),this.pushButton=!0};jt(an,rn);var on=function(){rn.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,`Kids`,{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t===void 0?[]:t}})};jt(on,rn);var sn=function(){var e,t;Qt.call(this),Object.defineProperty(this,`Parent`,{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,`optionName`,{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,`MK`,{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push(`<<`),r)n.push(`/`+t+` (`+Dt(e(r[t]))+`)`);return n.push(`>>`),n.join(` `)},set:function(e){o(e)===`object`&&(r=e)}}),Object.defineProperty(this,`caption`,{enumerable:!0,configurable:!0,get:function(){return r.CA||``},set:function(e){typeof e==`string`&&(r.CA=e)}}),Object.defineProperty(this,`AS`,{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+kt(t)}}),Object.defineProperty(this,`appearanceState`,{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+kt(t)}}),this.caption=`l`,this.appearanceState=`Off`,this._AppearanceType=$.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};jt(sn,Qt),on.prototype.setAppearance=function(e){if(!(`createAppearanceStream`in e)||!(`getCA`in e))throw Error(`Couldn't assign Appearance to RadioButton. Appearance was Invalid!`);for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},on.prototype.createOption=function(e){var t=new sn;return t.Parent=this,t.optionName=e,this.Kids.push(t),dn.call(this.scope,t),t};var cn=function(){rn.call(this),this.fontName=`zapfdingbats`,this.caption=`3`,this.appearanceState=`On`,this.value=`On`,this.textAlign=`center`,this.appearanceStreamContent=$.CheckBox.createAppearanceStream()};jt(cn,rn);var ln=function(){Qt.call(this),this.FT=`/Tx`,Object.defineProperty(this,`multiline`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,13)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,13):this.Ff=zt(this.Ff,13)}}),Object.defineProperty(this,`fileSelect`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,21)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,21):this.Ff=zt(this.Ff,21)}}),Object.defineProperty(this,`doNotSpellCheck`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,23)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,23):this.Ff=zt(this.Ff,23)}}),Object.defineProperty(this,`doNotScroll`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,24)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,24):this.Ff=zt(this.Ff,24)}}),Object.defineProperty(this,`comb`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,25)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,25):this.Ff=zt(this.Ff,25)}}),Object.defineProperty(this,`richText`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,26)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,26):this.Ff=zt(this.Ff,26)}});var e=null;Object.defineProperty(this,`MaxLen`,{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,`maxLength`,{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,`hasAppearanceStream`,{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};jt(ln,Qt);var un=function(){ln.call(this),Object.defineProperty(this,`password`,{enumerable:!0,configurable:!0,get:function(){return!!Lt(this.Ff,14)},set:function(e){!!e==1?this.Ff=Rt(this.Ff,14):this.Ff=zt(this.Ff,14)}}),this.password=!0};jt(un,ln);var $={CheckBox:{createAppearanceStream:function(){return{N:{On:$.CheckBox.YesNormal},D:{On:$.CheckBox.YesPushDown,Off:$.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=Nt(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=Ht(e,e.caption);return n.push(`0.749023 g`),n.push(`0 0 `+Q($.internal.getWidth(e))+` `+Q($.internal.getHeight(e))+` re`),n.push(`f`),n.push(`BMC`),n.push(`q`),n.push(`0 0 1 rg`),n.push(`/`+r+` `+Q(a.fontSize)+` Tf `+i),n.push(`BT`),n.push(a.text),n.push(`ET`),n.push(`Q`),n.push(`EMC`),t.stream=n.join(` `),t},YesNormal:function(e){var t=Nt(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],a=$.internal.getHeight(e),o=$.internal.getWidth(e),s=Ht(e,e.caption);return i.push(`1 g`),i.push(`0 0 `+Q(o)+` `+Q(a)+` re`),i.push(`f`),i.push(`q`),i.push(`0 0 1 rg`),i.push(`0 0 `+Q(o-1)+` `+Q(a-1)+` re`),i.push(`W`),i.push(`n`),i.push(`0 g`),i.push(`BT`),i.push(`/`+n+` `+Q(s.fontSize)+` Tf `+r),i.push(s.text),i.push(`ET`),i.push(`Q`),t.stream=i.join(` `),t},OffPushDown:function(e){var t=Nt(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+Q($.internal.getWidth(e))+` `+Q($.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(` `),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:$.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=$.RadioButton.Circle.YesNormal,t.D[e]=$.RadioButton.Circle.YesPushDown,t},getCA:function(){return`l`},YesNormal:function(e){var t=Nt(e);t.scope=e.scope;var n=[],r=$.internal.getWidth(e)<=$.internal.getHeight(e)?$.internal.getWidth(e)/4:$.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=$.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push(`q`),n.push(`1 0 0 1 `+At($.internal.getWidth(e)/2)+` `+At($.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+a+` `+a+` `+r+` 0 `+r+` c`),n.push(`-`+a+` `+r+` -`+r+` `+a+` -`+r+` 0 c`),n.push(`-`+r+` -`+a+` -`+a+` -`+r+` 0 -`+r+` c`),n.push(a+` -`+r+` `+r+` -`+a+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(` `),t},YesPushDown:function(e){var t=Nt(e);t.scope=e.scope;var n=[],r=$.internal.getWidth(e)<=$.internal.getHeight(e)?$.internal.getWidth(e)/4:$.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*$.internal.Bezier_C).toFixed(5)),o=Number((r*$.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+At($.internal.getWidth(e)/2)+` `+At($.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),n.push(`0 g`),n.push(`q`),n.push(`1 0 0 1 `+At($.internal.getWidth(e)/2)+` `+At($.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+o+` `+o+` `+r+` 0 `+r+` c`),n.push(`-`+o+` `+r+` -`+r+` `+o+` -`+r+` 0 c`),n.push(`-`+r+` -`+o+` -`+o+` -`+r+` 0 -`+r+` c`),n.push(o+` -`+r+` `+r+` -`+o+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(` `),t},OffPushDown:function(e){var t=Nt(e);t.scope=e.scope;var n=[],r=$.internal.getWidth(e)<=$.internal.getHeight(e)?$.internal.getWidth(e)/4:$.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*$.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+At($.internal.getWidth(e)/2)+` `+At($.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(` `),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:$.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=$.RadioButton.Cross.YesNormal,t.D[e]=$.RadioButton.Cross.YesPushDown,t},getCA:function(){return`8`},YesNormal:function(e){var t=Nt(e);t.scope=e.scope;var n=[],r=$.internal.calculateCross(e);return n.push(`q`),n.push(`1 1 `+Q($.internal.getWidth(e)-2)+` `+Q($.internal.getHeight(e)-2)+` re`),n.push(`W`),n.push(`n`),n.push(Q(r.x1.x)+` `+Q(r.x1.y)+` m`),n.push(Q(r.x2.x)+` `+Q(r.x2.y)+` l`),n.push(Q(r.x4.x)+` `+Q(r.x4.y)+` m`),n.push(Q(r.x3.x)+` `+Q(r.x3.y)+` l`),n.push(`s`),n.push(`Q`),t.stream=n.join(` `),t},YesPushDown:function(e){var t=Nt(e);t.scope=e.scope;var n=$.internal.calculateCross(e),r=[];return r.push(`0.749023 g`),r.push(`0 0 `+Q($.internal.getWidth(e))+` `+Q($.internal.getHeight(e))+` re`),r.push(`f`),r.push(`q`),r.push(`1 1 `+Q($.internal.getWidth(e)-2)+` `+Q($.internal.getHeight(e)-2)+` re`),r.push(`W`),r.push(`n`),r.push(Q(n.x1.x)+` `+Q(n.x1.y)+` m`),r.push(Q(n.x2.x)+` `+Q(n.x2.y)+` l`),r.push(Q(n.x4.x)+` `+Q(n.x4.y)+` m`),r.push(Q(n.x3.x)+` `+Q(n.x3.y)+` l`),r.push(`s`),r.push(`Q`),t.stream=r.join(` `),t},OffPushDown:function(e){var t=Nt(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+Q($.internal.getWidth(e))+` `+Q($.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(` `),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return`/`+t+` `+e.fontSize+` Tf `+n}};$.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=$.internal.getWidth(e),n=$.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},$.internal.getWidth=function(e){var t=0;return o(e)===`object`&&(t=Mt(e.Rect[2])),t},$.internal.getHeight=function(e){var t=0;return o(e)===`object`&&(t=Mt(e.Rect[3])),t};var dn=Tt.addField=function(e){if(Kt(this,e),!(e instanceof Qt))throw Error(`Invalid argument passed to jsPDF.addField.`);var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Tt.AcroFormChoiceField=$t,Tt.AcroFormListBox=en,Tt.AcroFormComboBox=tn,Tt.AcroFormEditBox=nn,Tt.AcroFormButton=rn,Tt.AcroFormPushButton=an,Tt.AcroFormRadioButton=on,Tt.AcroFormCheckBox=cn,Tt.AcroFormTextField=ln,Tt.AcroFormPasswordField=un,Tt.AcroFormAppearance=$,Tt.AcroForm={ChoiceField:$t,ListBox:en,ComboBox:tn,EditBox:nn,Button:rn,PushButton:an,RadioButton:on,CheckBox:cn,TextField:ln,PasswordField:un,Appearance:$},Z.AcroForm={ChoiceField:$t,ListBox:en,ComboBox:tn,EditBox:nn,Button:rn,PushButton:an,RadioButton:on,CheckBox:cn,TextField:ln,PasswordField:un,Appearance:$},Z.AcroForm;function fn(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}(function(e){var t=`addImage_`;e.__addimage__={};var n=`UNKNOWN`,r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(e,t){var i,a,o,s,c,l=n;if((t||=n)===`RGBA`||e.data!==void 0&&e.data instanceof Uint8ClampedArray&&`height`in e&&`width`in e)return`RGBA`;if(C(e))for(c in r)for(o=r[c],i=0;i>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,c=t.transparency.length;s>`,m.content=i;var v=m.objId+` 0 R`;i=`<>`,h.content=i,this.internal.write(m.objId,`0 R`,h.objId,`0 R`);break;case`freetext`:r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y+n.bounds.h)+`] `;var y=`font: Helvetica,sans-serif 12.0pt; text-align:left; color:#`+(n.color||`#000000`);i=`<>`,this.internal.write(i);break;case`link`:if(n.options.name){var b=this.annotations._nameMap[n.options.name];n.options.pageNumber=b.page,n.options.top=b.y}else n.options.top||(n.options.top=0);if(r=`/Rect [`+n.finalBounds.x+` `+n.finalBounds.y+` `+n.finalBounds.w+` `+n.finalBounds.h+`] `,i=``,n.options.url)i=`<>`;else if(n.options.pageNumber)switch(i=`<>`,this.internal.write(i))}}this.internal.write(`]`)}}]),e.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case`link`:this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case`text`:case`freetext`:t.pageContext.annotations.push(e)}},e.link=function(e,t,n,r,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:s(t),w:o(e+n),h:s(t+r)},options:i,type:`link`})},e.textWithLink=function(e,t,n,r){var i,a,o=this.getTextWidth(e),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(r.maxWidth!==void 0){a=r.maxWidth;var c=this.splitTextToSize(e,a).length;i=Math.ceil(s*c)}else a=o,i=s;return this.text(e,t,n,r),n+=.2*s,r.align===`center`&&(t-=o/2),r.align===`right`&&(t-=o),this.link(t,n-s,a,i,r),o},e.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}}(Z.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(e){return t[e.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(e){return typeof e==`string`&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length<=2},c=e.__arabicParser__.isArabicAlfLetter=function(e){return o(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=1};var l=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=3};var u=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length==4},d=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,i=``,a=0;for(t=0;t>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){this.internal.out(`/OpenAction `+t+` 0 R`)})),this},function(e){var t=function(){var e=void 0;Object.defineProperty(this,`pdf`,{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,`width`,{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext(`2d`).pageWrapXEnabled&&(this.getContext(`2d`).pageWrapX=t+1)}});var n=300;Object.defineProperty(this,`height`,{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext(`2d`).pageWrapYEnabled&&(this.getContext(`2d`).pageWrapY=n+1)}});var r=[];Object.defineProperty(this,`childNodes`,{get:function(){return r},set:function(e){r=e}});var i={};Object.defineProperty(this,`style`,{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,`parentNode`,{})};t.prototype.getContext=function(e,t){var n;if((e||=`2d`)!==`2d`)return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw Error(`toDataURL is not implemented.`)},e.events.push([`initialized`,function(){this.canvas=new t,this.canvas.pdf=this}])}(Z.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var e=arguments[0];Object.defineProperty(this,`x`,{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,`y`,{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,`width`,{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,`height`,{enumerable:!0,get:function(){return r},set:function(e){r=e}});var i=arguments[4];Object.defineProperty(this,`text`,{enumerable:!0,get:function(){return i},set:function(e){i=e}});var a=arguments[5];Object.defineProperty(this,`lineNumber`,{enumerable:!0,get:function(){return a},set:function(e){a=e}});var o=arguments[6];return Object.defineProperty(this,`align`,{enumerable:!0,get:function(){return o},set:function(e){o=e}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return r.call(this),this.internal.__cell__.headerFunction=typeof e==`function`?e:void 0,this},e.getTextDimensions=function(e,t){r.call(this);var n=(t||={}).fontSize||this.getFontSize(),i=t.font||this.getFont(),a=t.scaleFactor||this.internal.scaleFactor,o=0,s=0,c=0,l=this;if(!Array.isArray(e)&&typeof e!=`string`){if(typeof e!=`number`)throw Error(`getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.`);e=String(e)}var u=t.maxWidth;u>0?typeof e==`string`?e=this.splitTextToSize(e,u):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(l.splitTextToSize(t,u))},[])):e=Array.isArray(e)?e:[e];for(var d=0;dthis.getPageHeight()?(this.cellAddPage(),e.y=s.top,l&&c&&(this.printHeaderRow(e.lineNumber,!0),e.y+=c[0].height)):e.y=i.y+i.height||e.y),e.text[0]!==void 0&&(this.rect(e.x,e.y,e.width,e.height,!0===n?`FD`:void 0),e.align===`right`?this.text(e.text,e.x+e.width-o,e.y+o,{align:`right`,baseline:`top`}):e.align===`center`?this.text(e.text,e.x+e.width/2,e.y+o,{align:`center`,baseline:`top`,maxWidth:e.width-o-o}):this.text(e.text,e.x+o,e.y+o,{align:`left`,baseline:`top`,maxWidth:e.width-o-o})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,l,u,d){if(r.call(this),!l)throw Error(`No data for PDF table.`);var f,p,m,h,g=[],_=[],v=[],y={},b={},x=[],S=[],C=(d||={}).autoSize||!1,w=!1!==d.printHeaders,T=d.css&&d.css[`font-size`]!==void 0?16*d.css[`font-size`]:d.fontSize||12,E=d.margins||Object.assign({width:this.getPageWidth()},t),D=typeof d.padding==`number`?d.padding:3,O=d.headerBackgroundColor||`#c8c8c8`,k=d.headerTextColor||`#000`;if(i.call(this),this.internal.__cell__.printHeaders=w,this.internal.__cell__.margins=E,this.internal.__cell__.table_font_size=T,this.internal.__cell__.padding=D,this.internal.__cell__.headerBackgroundColor=O,this.internal.__cell__.headerTextColor=k,this.setFontSize(T),u==null)_=g=Object.keys(l[0]),v=g.map(function(){return`left`});else if(Array.isArray(u)&&o(u[0])===`object`)for(g=u.map(function(e){return e.name}),_=u.map(function(e){return e.prompt||e.name||``}),v=u.map(function(e){return e.align||`left`}),f=0;f0&&this.setTableHeaderRow(c),this.setFont(void 0,`normal`),n=!1}}(Z.API);var pn={italic:[`italic`,`oblique`,`normal`],oblique:[`oblique`,`italic`,`normal`],normal:[`normal`,`oblique`,`italic`]},mn=[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`],hn=fn(mn),gn=[100,200,300,400,500,600,700,800,900],_n=fn(gn);function vn(e){var t=e.family.replace(/"|'/g,``).toLowerCase(),n=function(e){return pn[e||=`normal`]?e:`normal`}(e.style),r=function(e){return e?typeof e==`number`?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):e===`bold`?700:400:400}(e.weight),i=function(e){return typeof hn[e||=`normal`]==`number`?e:`normal`}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(` `)}}}function yn(e,t,n,r){var i;for(i=n;i>=0&&i=0&&i>>1)&255}return i}function Ln(e,t,n){var r=e.length,i=[];i[0]=4;for(var a=0;a>a&o}function Vn(e,t,n,r){var i=n*r,a=Math.floor(i/8),o=16-(i-8*a+r),s=(1<>8&255;e.setUint8(t,r)}})(e,a,Hn(e,a)&~(s<>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,c=null;a&&(s=t,c=o,t+=3*o);var l=!0,u=[],d=0,f=null,p=0,m=null;for(this.width=n,this.height=r;l&&t=0))throw Error(`Invalid block size`);if(D===0)break;t+=D}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw Error(`Invalid graphics extension block.`);var h=e[t++];d=e[t++]|e[t++]<<8,f=e[t++],1&h||(f=null),p=h>>2&7,t++;break;case 254:for(;;){if(!((D=e[t++])>=0))throw Error(`Invalid block size`);if(D===0)break;t+=D}break;default:throw Error(`Unknown graphic control label: 0x`+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,_=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,b=e[t++],x=b>>6&1,S=1<<1+(7&b),C=s,w=c,T=!1;b>>7&&(T=!0,C=t,w=S,t+=3*S);var E=t;for(t++;;){var D;if(!((D=e[t++])>=0))throw Error(`Invalid block size`);if(D===0)break;t+=D}u.push({x:g,y:_,width:v,height:y,has_local_palette:T,palette_offset:C,palette_size:w,data_offset:E,data_length:t-E,transparent_index:f,interlaced:!!x,delay:d,disposal:p});break;case 59:l=!1;break;default:throw Error(`Unknown gif block: 0x`+e[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return m},this.frameInfo=function(e){if(e<0||e>=u.length)throw Error(`Frame index out of range.`);return u[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);Wn(e,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;c===null&&(c=256);var l=i.width,u=n-l,d=l,f=4*(i.y*n+i.x),p=4*((i.y+i.height)*n+i.x),m=f,h=4*u;!0===i.interlaced&&(h+=4*n*7);for(var g=8,_=0,v=o.length;_=p&&(h=4*u+4*n*(g-1),m=f+(l+u)*(g<<1),g>>=1)),y===c)m+=4;else{var b=e[s+3*y],x=e[s+3*y+1],S=e[s+3*y+2];r[m++]=S,r[m++]=x,r[m++]=b,r[m++]=255}--d}},this.decodeAndBlitFrameRGBA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);Wn(e,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;c===null&&(c=256);var l=i.width,u=n-l,d=l,f=4*(i.y*n+i.x),p=4*((i.y+i.height)*n+i.x),m=f,h=4*u;!0===i.interlaced&&(h+=4*n*7);for(var g=8,_=0,v=o.length;_=p&&(h=4*u+4*n*(g-1),m=f+(l+u)*(g<<1),g>>=1)),y===c)m+=4;else{var b=e[s+3*y],x=e[s+3*y+1],S=e[s+3*y+2];r[m++]=b,r[m++]=x,r[m++]=S,r[m++]=255}--d}}}function Wn(e,t,n,r){for(var i=e[t++],a=1<>=c,u-=c,g!==a){if(g===o)break;for(var _=ga;)y=m[y]>>8,++v;var b=y;if(f+v+(_===g?0:1)>r)return void Y.log(`Warning, gif stream longer than expected.`);n[f++]=b;var x=f+=v;for(_!==g&&(n[f++]=b),y=_;v--;)y=m[y],n[--x]=255&y,y>>=8;h!==null&&s<4096&&(m[s++]=h<<8|b,s>=l+1&&c<12&&(++c,l=l<<1|1)),h=g}else s=o+1,l=(1<<(c=i+1))-1,h=null}return f!==r&&Y.log(`Warning, gif stream shorter than expected.`),n}function Gn(e){var t,n,r,i,a,o=Math.floor,s=Array(64),c=Array(64),l=Array(64),u=Array(64),d=Array(65535),f=Array(65535),p=Array(64),m=Array(64),h=[],g=0,_=7,v=Array(64),y=Array(64),b=Array(64),x=Array(256),S=Array(2048),C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],w=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],E=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],O=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],k=[0,1,2,3,4,5,6,7,8,9,10,11],A=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],j=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function M(e,t){for(var n=0,r=0,i=[],a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=a,r++,n++;n*=2}return i}function N(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<>8&255),P(255&e)}function I(e,t,n,r,i){for(var a,o=i[0],s=i[240],c=function(e,t){var n,r,i,a,o,s,c,l,u,d,f=0;for(u=0;u<8;++u){n=e[f],r=e[f+1],i=e[f+2],a=e[f+3],o=e[f+4],s=e[f+5],c=e[f+6];var m=n+(l=e[f+7]),h=n-l,g=r+c,_=r-c,v=i+s,y=i-s,b=a+o,x=a-o,S=m+b,C=m-b,w=g+v,T=g-v;e[f]=S+w,e[f+4]=S-w;var E=.707106781*(T+C);e[f+2]=C+E,e[f+6]=C-E;var D=.382683433*((S=x+y)-(T=_+h)),O=.5411961*S+D,k=1.306562965*T+D,A=.707106781*(w=y+_),j=h+A,M=h-A;e[f+5]=M+O,e[f+3]=M-O,e[f+1]=j+k,e[f+7]=j-k,f+=8}for(f=0,u=0;u<8;++u){n=e[f],r=e[f+8],i=e[f+16],a=e[f+24],o=e[f+32],s=e[f+40],c=e[f+48];var N=n+(l=e[f+56]),P=n-l,F=r+c,I=r-c,L=i+s,ee=i-s,R=a+o,z=a-o,B=N+R,te=N-R,V=F+L,H=F-L;e[f]=B+V,e[f+32]=B-V;var U=.707106781*(H+te);e[f+16]=te+U,e[f+48]=te-U;var ne=.382683433*((B=z+ee)-(H=I+P)),W=.5411961*B+ne,re=1.306562965*H+ne,ie=.707106781*(V=ee+I),ae=P+ie,oe=P-ie;e[f+40]=oe+W,e[f+24]=oe-W,e[f+8]=ae+re,e[f+56]=ae-re,f++}for(u=0;u<64;++u)d=e[u]*t[u],p[u]=d>0?d+.5|0:d-.5|0;return p}(e,t),l=0;l<64;++l)m[C[l]]=c[l];var u=m[0]-n;n=m[0],u==0?N(r[0]):(N(r[f[a=32767+u]]),N(d[a]));for(var h=63;h>0&&m[h]==0;)h--;if(h==0)return N(o),n;for(var g,_=1;_<=h;){for(var v=_;m[_]==0&&_<=h;)++_;var y=_-v;if(y>=16){g=y>>4;for(var b=1;b<=g;++b)N(s);y&=15}a=32767+m[_],N(i[(y<<4)+f[a]]),N(d[a]),_++}return h!=63&&N(o),n}function L(e){e=Math.min(Math.max(e,1),100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=o((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),s[C[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var d=o((i[a]*e+50)/100);d=Math.min(Math.max(d,1),255),c[C[a]]=d}for(var f=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],p=0,m=0;m<8;m++)for(var h=0;h<8;h++)l[p]=1/(s[C[p]]*f[m]*f[h]*8),u[p]=1/(c[C[p]]*f[m]*f[h]*8),p++}(Math.floor(e<50?5e3/e:200-2*e)),a=e)}this.encode=function(e,a){a&&L(a),h=[],g=0,_=7,F(65496),F(65504),F(16),P(74),P(70),P(73),P(70),P(0),P(1),P(1),P(0),F(1),F(1),P(0),P(0),function(){F(65499),F(132),P(0);for(var e=0;e<64;e++)P(s[e]);P(1);for(var t=0;t<64;t++)P(c[t])}(),function(e,t){F(65472),F(17),P(8),F(t),F(e),P(3),P(1),P(17),P(0),P(2),P(17),P(1),P(3),P(17),P(1)}(e.width,e.height),function(){F(65476),F(418),P(0);for(var e=0;e<16;e++)P(w[e+1]);for(var t=0;t<=11;t++)P(T[t]);P(16);for(var n=0;n<16;n++)P(E[n+1]);for(var r=0;r<=161;r++)P(D[r]);P(1);for(var i=0;i<16;i++)P(O[i+1]);for(var a=0;a<=11;a++)P(k[a]);P(17);for(var o=0;o<16;o++)P(A[o+1]);for(var s=0;s<=161;s++)P(j[s])}(),F(65498),F(12),P(3),P(1),P(0),P(2),P(17),P(3),P(17),P(0),P(63),P(0);var o=0,d=0,f=0;g=0,_=7,this.encode.displayName=`_encode_`;for(var p,m,x,C,M,ee,R,z,B,te=e.data,V=e.width,H=e.height,U=4*V,ne=0;ne>3)*U+(R=4*(7&B)),ne+z>=H&&(ee-=U*(ne+1+z-H)),p+R>=U&&(ee-=p+R-U+4),m=te[ee++],x=te[ee++],C=te[ee++],v[B]=(S[m]+S[x+256|0]+S[C+512|0]>>16)-128,y[B]=(S[m+768|0]+S[x+1024|0]+S[C+1280|0]>>16)-128,b[B]=(S[m+1280|0]+S[x+1536|0]+S[C+1792|0]>>16)-128;o=I(v,l,o,t,r),d=I(y,u,d,n,i),f=I(b,u,f,n,i),p+=32}ne+=8}if(_>=0){var W=[];W[1]=_+1,W[0]=(1<<_+1)-1,N(W)}return F(65497),new Uint8Array(h)},e||=50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)x[t]=e(t)}(),t=M(w,T),n=M(O,k),r=M(E,D),i=M(A,j),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;rr;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var a=0;ar+1?[]:new t),!(i.length>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function l(e,n,r,i,a){t(!(i%r));do e[n+(i-=r)]=a;while(0=o),512>=o)var s=a(512);else if((s=a(o))==null)return 0;return function(e,n,r,i,o,s){var u,f,p=n,m=1<u;++u){if(h[u]>1<(S-=h[u]))return 0;for(;0=u;++u,o<<=1){if(x+=S<<=1,0>(S-=h[u]))return 0;for(;0v&&!(0>=(_-=h[v]));)++v,_<<=1;m+=C=1<<(_=v-r),e[n+(v=b&y)].g=_+r,e[n+v].value=p-n-v}i.g=u-r,i.value=s[f++],l(e,p+(b>>r),o,C,i),b=c(b,u)}}return x==2*g[15]-1?m:0}(e,n,r,i,o,s)}function d(){this.value=this.g=0}function f(){this.value=this.g=0}function p(){this.G=o(5,d),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Rn,f)}function m(e,n,r,i){t(e!=null),t(n!=null),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,E(e)}function h(e,t){for(var n=0;0i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4>>=8,e.Ra+=e.oa[e.pa+e.bb]<>>0,++e.bb,e.u-=8;C(e)&&(e.h=1,e.u=0)}function y(e,n){if(t(0<=n),!e.h&&n<=Bn){var r=S(e)&zn[n];return e.u+=n,v(e),r}return e.h=1,e.u=0}function b(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function x(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function S(e){return e.Ra>>>(e.u&Vn-1)>>>0}function C(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>Vn}function w(e,t){e.u=t,e.h=C(e)}function T(e){e.u>=Hn&&(t(e.u>=Hn),v(e))}function E(e){t(e!=null&&e.oa!=null),e.pa>>0,e.b+=8):(t(e!=null&&e.oa!=null),e.pae.b&&E(e);var r=e.b,i=n*t>>>8,a=(e.I>>>r>i)+0;for(a?(n-=i,e.I-=i+1<>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return r=7^i+Un[r],e.b-=r,e.Ca=(n<>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function A(e,t){return e[t+0]|e[t+1]<<8}function j(e,t){return A(e,t)|e[t+2]<<16}function M(e,t){return A(e,t)|A(e,t+2)<<16}function N(e,n){var r=1<=a||0>=o?0:(r[0]=a,i[0]=o,1)}function L(e,t){return e+(1<>>t}function ee(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function R(t,n){e[n]=function(n,r,i,a,o,s,c){var l;for(l=0;l>>1)+(e&t)>>>0}function te(e){return 0<=e&&256>e?e:0>e?0:255>1))}function H(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function U(e,t,n,r,i,a,o){for(r=a[o-1],n=0;n>8&255,c=16711935&(c=(c=16711935&o)+((s<<16)+s));r[i+a]=(4278255360&o)+c>>>0}}function W(e,t){t.jd=255&e,t.hd=e>>8&255,t.ud=e>>16&255}function re(e,t,n,r,i,a){var o;for(o=0;o>>8,l=s,u=255&(u=(u=s>>>16)+((e.jd<<24>>24)*(c<<24>>24)>>>5));l=255&(l=(l+=(e.hd<<24>>24)*(c<<24>>24)>>>5)+((e.ud<<24>>24)*(u<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(u<<16)+l}}function ie(t,n,r,i,a){e[n]=function(e,t,n,r,o,s,c,l,u){for(r=c;r>t.b,f=t.Ea,p=t.K[0],m=t.w;if(8>d)for(t=(1<>=d}else e[`VP8LMapColor`+r](s,c,p,m,l,u,n,o,f)}}function ae(e,t,n,r,i){for(n=t+n;t>16&255,r[i++]=a>>8&255,r[i++]=255&a}}function oe(e,t,n,r,i){for(n=t+n;t>16&255,r[i++]=a>>8&255,r[i++]=255&a,r[i++]=a>>24&255}}function G(e,t,n,r,i){for(n=t+n;t>16&240|o>>12&15,o=240&o|o>>28&15;r[i++]=a,r[i++]=o}}function se(e,t,n,r,i){for(n=t+n;t>16&248|o>>13&7,o=o>>5&224|o>>3&31;r[i++]=a,r[i++]=o}}function ce(e,t,n,r,i){for(n=t+n;t>8&255,r[i++]=a>>16&255}}function le(e,t,n,i,a,o){if(o==0)for(n=t+n;t>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else r(i,a,e,t,n)}function ue(t,n){e[n][0]=e[t+`0`],e[n][1]=e[t+`1`],e[n][2]=e[t+`2`],e[n][3]=e[t+`3`],e[n][4]=e[t+`4`],e[n][5]=e[t+`5`],e[n][6]=e[t+`6`],e[n][7]=e[t+`7`],e[n][8]=e[t+`8`],e[n][9]=e[t+`9`],e[n][10]=e[t+`10`],e[n][11]=e[t+`11`],e[n][12]=e[t+`12`],e[n][13]=e[t+`13`],e[n][14]=e[t+`0`],e[n][15]=e[t+`0`]}function de(e){return e==Hr||e==Ur||e==Wr||e==Gr}function fe(){this.eb=[],this.size=this.A=this.fb=0}function pe(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function me(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new fe,this.f.kb=new pe,this.sd=null}function he(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ge(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function _e(e){return alert(`todo:WebPSamplerProcessPlane`),e.T}function ve(e,t){var n=e.T,i=t.ba.f.RGBA,a=i.eb,o=i.fb+e.ka*i.A,s=gi[t.ba.S],c=e.y,l=e.O,u=e.f,d=e.N,f=e.ea,p=e.W,m=t.cc,h=t.dc,g=t.Mc,_=t.Nc,v=e.ka,y=e.ka+e.T,b=e.U,x=b+1>>1;for(v==0?s(c,l,null,null,u,d,f,p,u,d,f,p,a,o,null,null,b):(s(t.ec,t.fc,c,l,m,h,g,_,u,d,f,p,a,o-i.A,a,o,b),++n);v+2n,i=n==Ir||n==Rr||n==zr||n==Br||n==12||de(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Fn(t.Oa,e,i?11:12))return 0;if(i&&de(n)&&vn(),e.da)alert(`todo:use_scaling`);else{if(r){if(t.Ib=_e,e.Kb){if(n=e.U+1>>1,t.memory=a(e.U+2*n),t.memory==null)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=ve,vn()}}else alert(`todo:EmitYUV`);i&&(t.Jb=ye,r&&gn())}if(r&&!Ai){for(e=0;256>e;++e)ji[e]=89858*(e-128)+Ti>>wi,Pi[e]=-22014*(e-128)+Ti,Ni[e]=-45773*(e-128),Mi[e]=113618*(e-128)+Ti>>wi;for(e=Ei;e>wi,Fi[e-Ei]=Y(t,255),Ii[e-Ei]=Y(t+8>>4,15);Ai=1}return 1}function xe(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),0>=r||0>=i?0:(r=n.Ib(e,n),n.Jb!=null&&n.Jb(e,n,r),n.Dc+=r,1)}function Se(e){e.ma.memory=null}function Ce(e,t,n,r){return y(e,8)==47?(t[0]=y(e,14)+1,n[0]=y(e,14)+1,r[0]=y(e,1),y(e,3)==0?!e.h:0):0}function we(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<>4)*e+(8-(15&n)))?n:1;var n}function Ee(e,t,n){var r=S(n),i=e[t+=255&r].g-8;return 0>>0,t(8>=r.g),e.g}function Oe(e,n,r){var i=e.xc;return t((n=i==0?0:e.vc[e.md*(r>>i)+(n>>i)])>E.b)*w;_x&&(A=x),(0,Zn[D[O++]>>8&15])(m,h+ +k,y,b+k-x,A-k,y,b+k),k=A}h+=x,b+=x,++_&C||(E+=w)}p!=d.nc&&r(u,l-g,u,l+(p-f-1)*g,g);break;case 1:for(g=m,v=h,x=(m=d.Ea)-(b=m&~(y=(h=1<>d.b)*_;f=a),0o.o&&(i=o.o),r=i?r=0:(a[0]+=4*o.v,o.ka=r-o.j,o.U=o.va-o.v,o.T=i-r,r=1),r){if(c=c[0],11>(r=e.ca).S){var d=r.f.RGBA,f=(i=r.S,a=o.U,o=o.T,u=d.eb,d.A),p=o;for(d=d.fb+e.Ma*d.A;0i){var a=e.l.width,o=r.ca,s=r.tb+a*i,c=e.V,l=e.Ba+e.c*i,u=e.gc;t(e.ab==1),t(u[0].hc==3),Yn(u[0],i,n,c,l,o,s),Me(r,i,n,o,s,a)}e.C=e.Ma=n}function K(e,n,r,i,a,o,s){var c=e.$/i,l=e.$%i,u=e.m,d=e.s,f=r+e.$,p=f;a=r+i*a;var m=r+i*o,h=280+d.ua,g=e.Pb?c:16777216,_=0=g){var E=f-r;t((g=e).Pb),g.wd=g.m,g.xd=E,0O.g?(w(x,x.u+O.g),E[D]=O.value,x=0):(w(x,x.u+O.g-256),t(256<=O.value),x=O.value),x==0&&(b=!0)}else x=Ee(y.G[0],y.H[0],u);if(u.h)break;if(b||256>x){if(!b)if(y.nd)n[f]=(y.qb|x<<8)>>>0;else{if(T(u),b=Ee(y.G[1],y.H[1],u),T(u),E=Ee(y.G[2],y.H[2],u),D=Ee(y.G[3],y.H[3],u),u.h)break;n[f]=(D<<24|b<<16|x<<8|E)>>>0}if(b=!1,++f,++l>=i&&(l=0,++c,s!=null&&c<=o&&!(c%16)&&s(e,c),_!=null))for(;p>>_.Mb]=x}else if(280>x){if(x=we(x-256,u),E=Ee(y.G[4],y.H[4],u),T(u),E=Te(i,E=we(E,u)),u.h)break;if(f-r=i;)l-=i,++c,s!=null&&c<=o&&!(c%16)&&s(e,c);if(t(f<=a),l&v&&(y=Oe(d,l,c)),_!=null)for(;p>>_.Mb]=x}else{if(!(x>>_.Mb]=x;x=f,t(!(b>>>(E=_).Xa)),n[x]=E.X[b],b=!0}b||t(u.h==C(u))}if(e.Pb&&u.h&&fo?o:c),e.a=0,e.$=f-r}return 1}return e.a=3,0}function Pe(e){t(e!=null),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;n!=null&&(n.X=null),e.vb=null,t(e!=null)}function Fe(){var t=new sn;return t==null?null:(t.a=0,t.xb=mi,ue(`Predictor`,`VP8LPredictors`),ue(`Predictor`,`VP8LPredictors_C`),ue(`PredictorAdd`,`VP8LPredictorsAdd`),ue(`PredictorAdd`,`VP8LPredictorsAdd_C`),Kn=ne,Qn=re,$n=ae,er=oe,tr=G,nr=se,rr=ce,e.VP8LMapColor32b=Jn,e.VP8LMapColor8b=Xn,t)}function Ie(e,n,r,s,c){var l=1,f=[e],m=[n],h=s.m,g=s.s,_=null,v=0;t:for(;;){if(r)for(;l&&y(h,1);){var b=f,x=m,C=s,E=1,D=C.m,O=C.gc[C.ab],k=y(D,2);if(C.Oc&1<=C.ab),k){case 0:case 1:O.b=y(D,3)+2,E=Ie(L(O.Ea,O.b),L(O.nc,O.b),0,C,O.K),O.K=O.K[0];break;case 3:var A,j=y(D,8)+1,M=16>I.b),z=a(R);if(z==null)A=0;else{var B=I.K[0],te=I.w;for(z[0]=I.K[0][0],P=1;P<1*F;++P)z[P]=ee(B[te+P],z[P-1]);for(;P<4*R;++P)z[P]=0;I.K[0]=null,I.K[0]=z,A=1}}E=A;break;case 2:break;default:t(0)}l=E}}if(f=f[0],m=m[0],l&&y(h,1)&&!(l=1<=(v=y(h,4))&&11>=v)){s.a=3;break t}var V;if(V=l)e:{var H,U,ne,W=s,re=f,ie=m,ae=v,oe=r,G=W.m,se=W.s,ce=[null],le=1,ue=0,de=Qr[ae];r:for(;;){if(oe&&y(G,1)){var fe=y(G,3)+2,pe=L(re,fe),me=L(ie,fe),he=pe*me;if(!Ie(pe,me,0,W,ce))break r;for(ce=ce[0],se.xc=fe,H=0;H>8&65535;ce[H]=ge,ge>=le&&(le=ge+1)}}if(G.h)break r;for(U=0;5>U;++U){var _e=Jr[U];!U&&0=ye),xe=be;var Se=a(ue);if(xe==null||Se==null||ve==null){W.a=1;break r}var Ce=ve;for(H=ne=0;HU;++U){_e=Jr[U],Te[U]=Ce,Ee[U]=ne,!U&&0Y)break i}else qe=Y;for(Je=0;Jent)Xe[Je++]=nt,nt!=0&&($e=nt);else{var rt=nt==16,it=nt-16,at=qr[it],ot=y(Qe,Kr[it])+at;if(Je+ot>Y)break i;for(var st=rt?$e:0;0=U){var ct,lt=Se[0];for(ct=1;ct<_e;++ct)Se[ct]>lt&&(lt=Se[ct]);Ae+=lt}}if(we.nd=ke,we.Qb=0,ke&&(we.qb=(Te[3][Ee[3]+0].value<<24|Te[1][Ee[1]+0].value<<16|Te[2][Ee[2]+0].value)>>>0,Oe==0&&256>Te[0][Ee[0]+0].value&&(we.Qb=1,we.qb+=Te[0][Ee[0]+0].value<<8)),we.jc=!we.Qb&&6>Ae,we.jc){var ut,dt=we;for(ut=0;ut>=De(mt,8,pt),ft>>=De(dt.G[1][dt.H[1]+ft],16,pt),ft>>=De(dt.G[2][dt.H[2]+ft],0,pt),De(dt.G[3][dt.H[3]+ft],24,pt))}}}se.vc=ce,se.Wb=le,se.Ya=xe,se.yc=ve,V=1;break e}V=0}if(!(l=V)){s.a=3;break t}if(0n+1?[]:0),!(r.lengthe?0:e>t?t:e}function Xe(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma=`void`,this.put=`VP8IoPutHook`,this.ac=`VP8IoSetupHook`,this.bc=`VP8IoTeardownHook`,this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ze(){var e=new Ye;return e!=null&&(e.a=0,e.sc=`OK`,e.cb=0,e.Xb=0,ni||=tt),e}function Qe(e,t,n){return e.a==0&&(e.a=t,e.sc=n,e.cb=0),0}function $e(e,t,n){return 3<=n&&e[t+0]==157&&e[t+1]==1&&e[t+2]==42}function et(e,n){if(e==null)return 0;if(e.a=0,e.sc=`OK`,n==null)return Qe(e,2,`null VP8Io passed to VP8GetHeaders()`);var r=n.data,a=n.w,o=n.ha;if(4>o)return Qe(e,7,`Truncated header.`);var s=r[a+0]|r[a+1]<<8|r[a+2]<<16,c=e.Od;if(c.Rb=!(1&s),c.td=s>>1&7,c.yd=s>>4&1,c.ub=s>>5,3o)return Qe(e,7,`cannot parse picture header`);if(!$e(r,a,o))return Qe(e,3,`Bad code word`);l.c=16383&(r[a+4]<<8|r[a+3]),l.Td=r[a+4]>>6,l.i=16383&(r[a+6]<<8|r[a+5]),l.Ud=r[a+6]>>6,a+=7,o-=7,e.za=l.c+15>>4,e.Ub=l.i+15>>4,n.width=l.c,n.height=l.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((s=e.Pa).jb,0,255,s.jb.length),t((s=e.Qa)!=null),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(c.ub>o)return Qe(e,7,`bad partition length`);m(s=e.m,r,a,c.ub),a+=c.ub,o-=c.ub,c.Rb&&(l.Ld=D(s),l.Kd=D(s)),l=e.Qa;var u,d=e.Pa;if(t(s!=null),t(l!=null),l.Cb=D(s),l.Cb){if(l.Bb=D(s),D(s)){for(l.Fb=D(s),u=0;4>u;++u)l.Zb[u]=D(s)?g(s,7):0;for(u=0;4>u;++u)l.Lb[u]=D(s)?g(s,6):0}if(l.Bb)for(u=0;3>u;++u)d.jb[u]=D(s)?h(s,8):255}else l.Bb=0;if(s.Ka)return Qe(e,3,`cannot parse segment header`);if((l=e.ed).zd=D(s),l.Tb=h(s,6),l.wb=h(s,3),l.Pc=D(s),l.Pc&&D(s)){for(d=0;4>d;++d)D(s)&&(l.vd[d]=g(s,6));for(d=0;4>d;++d)D(s)&&(l.od[d]=g(s,6))}if(e.L=l.Tb==0?0:l.zd?1:2,s.Ka)return Qe(e,3,`cannot parse filter header`);var f=o;if(o=u=a,a=u+f,l=f,e.Xb=(1<l&&(p=l),m(e.Jc[+f],r,u,p),u+=p,l-=p,o+=3}m(e.Jc[+d],r,u,l),r=up;++p){if(f.Cb){var _=f.Zb[p];f.Fb||(_+=r)}else{if(0>16,8>v.Eb[1]&&(v.Eb[1]=8),v.Qc[0]=ei[Y(_+d,117)],v.Qc[1]=ti[Y(_+u,127)],v.lc=_+u}if(!c.Rb)return Qe(e,4,`Not a key frame.`);for(D(s),c=e.Pa,r=0;4>r;++r){for(o=0;8>o;++o)for(a=0;3>a;++a)for(l=0;11>l;++l)d=O(s,ci[r][o][a][l])?h(s,8):oi[r][o][a][l],c.Wc[r][o].Yb[a][l]=d;for(o=0;17>o;++o)c.Xc[r][o]=c.Wc[r][li[o]]}return e.kc=D(s),e.kc&&(e.Bd=h(s,8)),e.cb=1}function tt(e,t,n,r,i,a,o){var s=t[i].Yb[n];for(n=0;16>i;++i){if(!O(e,s[n+0]))return i;for(;!O(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,i==16)return 16;var c=t[i+1].Yb;if(O(e,s[n+2])){var l=e,u=0;if(O(l,(f=s)[(d=n)+3]))if(O(l,f[d+6])){for(s=0,d=2*(u=O(l,f[d+8]))+(f=O(l,f[d+9+u])),u=0,f=ri[d];f[s];++s)u+=u+O(l,f[s]);u+=3+(8<(l=e).b&&E(l);var d,f=l.b,p=(d=l.Ca>>1)-(l.I>>f)>>31;--l.b,l.Ca+=p,l.Ca|=1,l.I-=(d+1&p)<>3),e[t+n+32*r]=-256&i?0>i?0:255:i}function it(e,t,n,r,i,a){rt(e,t,0,n,r+i),rt(e,t,1,n,r+a),rt(e,t,2,n,r-a),rt(e,t,3,n,r-i)}function at(e){return(20091*e>>16)+e}function ot(e,t,n,r){var i,o=0,s=a(16);for(i=0;4>i;++i){var c=e[t+0]+e[t+8],l=e[t+0]-e[t+8],u=(35468*e[t+4]>>16)-at(e[t+12]),d=at(e[t+4])+(35468*e[t+12]>>16);s[o+0]=c+d,s[o+1]=l+u,s[o+2]=l-u,s[o+3]=c-d,o+=4,t++}for(i=o=0;4>i;++i)c=(e=s[o+0]+4)+s[o+8],l=e-s[o+8],u=(35468*s[o+4]>>16)-at(s[o+12]),rt(n,r,0,0,c+(d=at(s[o+4])+(35468*s[o+12]>>16))),rt(n,r,1,0,l+u),rt(n,r,2,0,l-u),rt(n,r,3,0,c-d),o++,r+=32}function st(e,t,n,r){var i=e[t+0]+4,a=35468*e[t+4]>>16,o=at(e[t+4]),s=35468*e[t+1]>>16;it(n,r,0,i+o,e=at(e[t+1]),s),it(n,r,1,i+a,e,s),it(n,r,2,i-a,e,s),it(n,r,3,i-o,e,s)}function ct(e,t,n,r,i){ot(e,t,n,r),i&&ot(e,t+16,n,r+4)}function lt(e,t,n,r){ar(e,t+0,n,r,1),ar(e,t+32,n,r+128,1)}function ut(e,t,n,r){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)rt(n,r,t,i,e)}function dt(e,t,n,r){e[t+0]&&cr(e,t+0,n,r),e[t+16]&&cr(e,t+16,n,r+4),e[t+32]&&cr(e,t+32,n,r+128),e[t+48]&&cr(e,t+48,n,r+128+4)}function ft(e,t,n,r){var i,o=a(16);for(i=0;4>i;++i){var s=e[t+0+i]+e[t+12+i],c=e[t+4+i]+e[t+8+i],l=e[t+4+i]-e[t+8+i],u=e[t+0+i]-e[t+12+i];o[0+i]=s+c,o[8+i]=s-c,o[4+i]=u+l,o[12+i]=u-l}for(i=0;4>i;++i)s=(e=o[0+4*i]+3)+o[3+4*i],c=o[1+4*i]+o[2+4*i],l=o[1+4*i]-o[2+4*i],u=e-o[3+4*i],n[r+0]=s+c>>3,n[r+16]=u+l>>3,n[r+32]=s-c>>3,n[r+48]=u-l>>3,r+=64}function pt(e,t,n){var r,i=t-32,a=Nr,o=255-e[i-1];for(r=0;rn;++n)r(e,t+32*n,e,t-32,16)}function vt(e,t){var n;for(n=16;0r;++r)i(t,n+32*r,e,16)}function bt(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];yt(r>>5,e,t)}function xt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];yt(r>>4,e,t)}function St(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];yt(r>>4,e,t)}function Ct(e,t){yt(128,e,t)}function X(e,t,n){return e+2*t+n+2>>2}function wt(e,t){var n,i=t-32;for(i=new Uint8Array([X(e[i-1],e[i+0],e[i+1]),X(e[i+0],e[i+1],e[i+2]),X(e[i+1],e[i+2],e[i+3]),X(e[i+2],e[i+3],e[i+4])]),n=0;4>n;++n)r(e,t+32*n,i,0,i.length)}function Z(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];k(e,t+0,16843009*X(e[t-1-32],n,r)),k(e,t+32,16843009*X(n,r,i)),k(e,t+64,16843009*X(r,i,a)),k(e,t+96,16843009*X(i,a,a))}function Tt(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)i(e,t+32*n,r,4)}function Et(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],c=e[t+2-32],l=e[t+3-32];e[t+0+96]=X(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=X(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=X(a,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=X(o,a,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=X(s,o,a),e[t+3+32]=e[t+2+0]=X(c,s,o),e[t+3+0]=X(l,c,s)}function Dt(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],a=e[t+4-32],o=e[t+5-32],s=e[t+6-32],c=e[t+7-32];e[t+0+0]=X(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=X(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=X(r,i,a),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=X(i,a,o),e[t+3+32]=e[t+2+64]=e[t+1+96]=X(a,o,s),e[t+3+64]=e[t+2+96]=X(o,s,c),e[t+3+96]=X(s,c,c)}function Ot(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],c=e[t+2-32],l=e[t+3-32];e[t+0+0]=e[t+1+64]=a+o+1>>1,e[t+1+0]=e[t+2+64]=o+s+1>>1,e[t+2+0]=e[t+3+64]=s+c+1>>1,e[t+3+0]=c+l+1>>1,e[t+0+96]=X(i,r,n),e[t+0+64]=X(r,n,a),e[t+0+32]=e[t+1+96]=X(n,a,o),e[t+1+32]=e[t+2+96]=X(a,o,s),e[t+2+32]=e[t+3+96]=X(o,s,c),e[t+3+32]=X(s,c,l)}function kt(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],a=e[t+3-32],o=e[t+4-32],s=e[t+5-32],c=e[t+6-32],l=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+a+1>>1,e[t+3+0]=e[t+2+64]=a+o+1>>1,e[t+0+32]=X(n,r,i),e[t+1+32]=e[t+0+96]=X(r,i,a),e[t+2+32]=e[t+1+96]=X(i,a,o),e[t+3+32]=e[t+2+96]=X(a,o,s),e[t+3+64]=X(o,s,c),e[t+3+96]=X(s,c,l)}function Q(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+a+1>>1,e[t+1+0]=X(n,r,i),e[t+3+0]=e[t+1+32]=X(r,i,a),e[t+3+32]=e[t+1+64]=X(i,a,a),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=a}function At(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96],o=e[t-1-32],s=e[t+0-32],c=e[t+1-32],l=e[t+2-32];e[t+0+0]=e[t+2+32]=n+o+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=a+i+1>>1,e[t+3+0]=X(s,c,l),e[t+2+0]=X(o,s,c),e[t+1+0]=e[t+3+32]=X(n,o,s),e[t+1+32]=e[t+3+64]=X(r,n,o),e[t+1+64]=e[t+3+96]=X(i,r,n),e[t+1+96]=X(a,i,r)}function jt(e,t){var n;for(n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Mt(e,t){var n;for(n=0;8>n;++n)i(e,t,e[t-1],8),t+=32}function Nt(e,t,n){var r;for(r=0;8>r;++r)i(t,n+32*r,e,8)}function Pt(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Nt(r>>4,e,t)}function Ft(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Nt(r>>3,e,t)}function It(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Nt(r>>3,e,t)}function Lt(e,t){Nt(128,e,t)}function Rt(e,t,n){var r=e[t-n],i=e[t+0],a=3*(i-r)+jr[1020+e[t-2*n]-e[t+n]],o=Mr[112+(a+4>>3)];e[t-n]=Nr[255+r+Mr[112+(a+3>>3)]],e[t+0]=Nr[255+i-o]}function zt(e,t,n,r){var i=e[t+0],a=e[t+n];return Pr[255+e[t-2*n]-e[t-n]]>r||Pr[255+a-i]>r}function Bt(e,t,n,r){return 4*Pr[255+e[t-n]-e[t+0]]+Pr[255+e[t-2*n]-e[t+n]]<=r}function Vt(e,t,n,r,i){var a=e[t-3*n],o=e[t-2*n],s=e[t-n],c=e[t+0],l=e[t+n],u=e[t+2*n],d=e[t+3*n];return 4*Pr[255+s-c]+Pr[255+o-l]>r?0:Pr[255+e[t-4*n]-a]<=i&&Pr[255+a-o]<=i&&Pr[255+o-s]<=i&&Pr[255+d-u]<=i&&Pr[255+u-l]<=i&&Pr[255+l-c]<=i}function Ht(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Bt(e,t+r,n,i)&&Rt(e,t+r,n)}function Ut(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Bt(e,t+r*n,1,i)&&Rt(e,t+r*n,1)}function Wt(e,t,n,r){var i;for(i=3;0>7,_=18*v+63>>7,v=9*v+63>>7;c[l-3*u]=Nr[255+c[l-3*u]+v],c[l-2*u]=Nr[255+d+_],c[l-u]=Nr[255+f+g],c[l+0]=Nr[255+p-g],c[l+u]=Nr[255+m-_],c[l+2*u]=Nr[255+h-v]}t+=r}}function qt(e,t,n,r,i,a,o,s){for(a=2*a+1;0>3)],h=Mr[112+(h+3>>3)],g=m+1>>1;c[l-2*u]=Nr[255+c[l-2*u]+g],c[l-u]=Nr[255+d+h],c[l+0]=Nr[255+f-m],c[l+u]=Nr[255+p-g]}t+=r}}function Jt(e,t,n,r,i,a){Kt(e,t,n,1,16,r,i,a)}function Yt(e,t,n,r,i,a){Kt(e,t,1,n,16,r,i,a)}function Xt(e,t,n,r,i,a){var o;for(o=3;0l?0:255:l)&255,l=c,i[a+s]=u}}function dn(e,n,i,o){var s=n.width,c=n.o;if(t(e!=null&&n!=null),0>i||0>=o||i+o>c)return null;if(!e.Cc){if(e.ga==null){var l;if(e.ga=new cn,(l=e.ga==null)||(l=n.width*n.o,t(e.Gb.length==0),e.Gb=a(l),e.Uc=0,e.Gb==null?l=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,l=1),l=!l),!l){l=e.ga;var u=e.Fa,d=e.P,f=e.qc,p=e.mb,m=e.nb,h=d+1,g=f-1,v=l.l;if(t(u!=null&&p!=null&&n!=null),hi[0]=null,hi[1]=ln,hi[2]=un,hi[3]=$,l.ca=p,l.tb=m,l.c=n.width,l.i=n.height,t(0=f)n=0;else if(l.$a=3&u[d+0],l.Z=u[d+0]>>2&3,l.Lc=u[d+0]>>4&3,d=u[d+0]>>6&3,0>l.$a||1=l.c*l.i;l=!n}if(l)return null;e.ga.Lc==1?o=c-i:e.Ga=0}t(e.ga!=null),t(i+o<=c);t:{if(n=(u=e.ga).c,c=u.l.o,u.$a==0){if(h=e.rc,g=e.Vc,v=e.Fa,d=e.P+1+i*n,f=e.mb,p=e.nb+i*n,t(d<=e.P+e.qc),u.Z!=0)for(t(hi[u.Z]!=null),l=0;l=n)n=1;else if(u.ic||gn(),u.ic){u=l.V,h=l.Ba,g=l.c;var y=l.i,b=(v=1,d=l.$/g,f=l.$%g,p=l.m,m=l.s,l.$),x=g*y,S=g*n,w=m.wc,E=b(y=Ee(E.G[0],E.H[0],p)))u[h+b]=y,++b,++f>=g&&(f=0,++d<=n&&!(d%16)&&Ne(l,d));else{if(!(280>y)){v=0;break e}y=we(y-256,p);var D,O=Ee(E.G[4],E.H[4],p);if(T(p),!(b>=(O=Te(g,O=we(O,p)))&&x-b>=y)){v=0;break e}for(D=0;D=g;)f-=g,++d<=n&&!(d%16)&&Ne(l,d);bn?n:d);break e}!v||p.h&&b=c&&(e.Cc=1),o=1}if(!o)return null;if(e.Cc&&((o=e.ga)!=null&&(o.mc=null),e.ga=null,0>23,s[c+4*o+1]=s[c+4*o+1]*d>>23,s[c+4*o+2]=s[c+4*o+2]*d>>23)}t+=a}}function pn(e,t,n,r,i){for(;0>4)*c>>16;e[t+2*a+0]=(240&o|o>>4)*c>>16&240|(15&o|o<<4)*c>>16>>4&15,e[t+2*a+1]=240&l|s}t+=i}}function mn(e,t,n,r,i,a,o,s){var c,l,u=255;for(l=0;l>8}function gn(){Sr=fn,Cr=pn,wr=mn,Tr=hn}function _n(n,r,i){e[n]=function(e,n,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){var b,x=y-1>>1,S=s[c+0]|l[u+0]<<16,C=d[f+0]|p[m+0]<<16;t(e!=null);var w=3*S+C+131074>>2;for(r(e[n+0],255&w,w>>16,h,g),a!=null&&(w=3*C+S+131074>>2,r(a[o+0],255&w,w>>16,_,v)),b=1;b<=x;++b){var T=s[c+b]|l[u+b]<<16,E=d[f+b]|p[m+b]<<16,D=S+T+C+E+524296,O=D+2*(T+C)>>3;w=O+S>>1,S=(D=D+2*(S+E)>>3)+T>>1,r(e[n+2*b-1],255&w,w>>16,h,g+(2*b-1)*i),r(e[n+2*b-0],255&S,S>>16,h,g+(2*b-0)*i),a!=null&&(w=D+C>>1,S=O+E>>1,r(a[o+2*b-1],255&w,w>>16,_,v+(2*b-1)*i),r(a[o+2*b+0],255&S,S>>16,_,v+(2*b+0)*i)),S=T,C=E}1&y||(w=3*S+C+131074>>2,r(e[n+y-1],255&w,w>>16,h,g+(y-1)*i),a!=null&&(w=3*C+S+131074>>2,r(a[o+y-1],255&w,w>>16,_,v+(y-1)*i)))}}function vn(){gi[Fr]=_i,gi[Ir]=yi,gi[Lr]=vi,gi[Rr]=bi,gi[zr]=xi,gi[Br]=Si,gi[Vr]=Ci,gi[Hr]=yi,gi[Ur]=bi,gi[Wr]=xi,gi[Gr]=Si}function yn(e){return e&~ki?0>e?0:255:e>>Oi}function bn(e,t){return yn((19077*e>>8)+(26149*t>>8)-14234)}function xn(e,t,n){return yn((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function Sn(e,t){return yn((19077*e>>8)+(33050*t>>8)-17685)}function Cn(e,t,n,r,i){r[i+0]=bn(e,n),r[i+1]=xn(e,t,n),r[i+2]=Sn(e,t)}function wn(e,t,n,r,i){r[i+0]=Sn(e,t),r[i+1]=xn(e,t,n),r[i+2]=bn(e,n)}function Tn(e,t,n,r,i){var a=xn(e,t,n);t=a<<3&224|Sn(e,t)>>3,r[i+0]=248&bn(e,n)|a>>5,r[i+1]=t}function En(e,t,n,r,i){var a=240&Sn(e,t)|15;r[i+0]=240&bn(e,n)|xn(e,t,n)>>4,r[i+1]=a}function Dn(e,t,n,r,i){r[i+0]=255,Cn(e,t,n,r,i+1)}function On(e,t,n,r,i){wn(e,t,n,r,i),r[i+3]=255}function kn(e,t,n,r,i){Cn(e,t,n,r,i),r[i+3]=255}function An(t,n,r){e[t]=function(e,t,i,a,o,s,c,l,u){for(var d=l+(-2&u)*r;l!=d;)n(e[t+0],i[a+0],o[s+0],c,l),n(e[t+1],i[a+0],o[s+0],c,l+r),t+=2,++a,++s,l+=2*r;1&u&&n(e[t+0],i[a+0],o[s+0],c,l)}}function jn(e,t,n){return n==0?e==0?t==0?6:5:t==0?4:0:n}function Mn(e,t,n,r,i){switch(e>>>30){case 3:ar(t,n,r,i,0);break;case 2:or(t,n,r,i);break;case 1:cr(t,n,r,i)}}function Nn(e,t){var n,a,o=t.M,s=t.Nb,c=e.oc,l=e.pc+40,u=e.oc,d=e.pc+584,f=e.oc,p=e.pc+600;for(n=0;16>n;++n)c[l+32*n-1]=129;for(n=0;8>n;++n)u[d+32*n-1]=129,f[p+32*n-1]=129;for(0n;++n)r(c,l+32*n-4,c,l+32*n+12,4);for(n=-1;8>n;++n)r(u,d+32*n-4,u,d+32*n+4,4),r(f,p+32*n-4,f,p+32*n+4,4)}var h=e.Gd,g=e.Hd+a,_=m.ad,v=m.Hc;if(0=e.za-1?i(y,b,h[g].y[15],4):r(y,b,h[g+1].y,0,4)),n=0;4>n;n++)y[b+128+n]=y[b+256+n]=y[b+384+n]=y[b+0+n];for(n=0;16>n;++n,v<<=2)y=c,b=l+Li[n],di[m.Ob[n]](y,b),Mn(v,_,16*n,y,b)}else if(y=jn(a,o,m.Ob[0]),ui[y](c,l),v!=0)for(n=0;16>n;++n,v<<=2)Mn(v,_,16*n,c,l+Li[n]);for(n=m.Gc,y=jn(a,o,m.Dd),fi[y](u,d),fi[y](f,p),v=_,y=u,b=d,255&(m=0|n)&&(170&m?sr(v,256,y,b):lr(v,256,y,b)),m=f,v=p,255&(n>>=8)&&(170&n?sr(_,320,m,v):lr(_,320,m,v)),on;++n)r(h,g+n*e.R,c,l+32*n,16);for(n=0;8>n;++n)r(_,m+n*e.B,u,d+32*n,8),r(v,y+n*e.B,f,p+32*n,8)}}function Pn(e,r,i,a,o,s,c,l,u){var d=[0],f=[0],p=0,m=u==null?0:u.kd,h=u??new rn;if(e==null||12>i)return 7;h.data=e,h.w=r,h.ha=i,r=[r],i=[i],h.gb=[h.gb];t:{var g=r,v=i,y=h.gb;if(t(e!=null),t(v!=null),t(y!=null),y[0]=0,12<=v[0]&&!n(e,g[0],`RIFF`)){if(n(e,g[0]+8,`WEBP`)){y=3;break t}var b=M(e,g[0]+4);if(12>b||4294967286v[0]-8){y=7;break t}y[0]=b,g[0]+=12,v[0]-=12}y=0}if(y!=0)return y;for(b=0y[0])y=7;else{if(!n(S,v[0],`VP8X`)){if(M(S,v[0]+4)!=10){y=3;break t}if(18>y[0]){y=7;break t}var E=M(S,v[0]+8),D=1+j(S,v[0]+12);if(2147483648<=D*(S=1+j(S,v[0]+15))){y=3;break t}T!=null&&(T[0]=E),C!=null&&(C[0]=D),w!=null&&(w[0]=S),v[0]+=18,y[0]-=18,O[0]=1}y=0}}if(p=p[0],g=g[0],y!=0)return y;if(v=!!(2&g),!b&&p)return 3;if(s!=null&&(s[0]=!!(16&g)),c!=null&&(c[0]=v),l!=null&&(l[0]=0),c=d[0],g=f[0],p&&v&&u==null){y=0;break}if(4>i){y=7;break}if(b&&p||!b&&!p&&!n(e,r[0],`ALPH`)){i=[i],h.na=[h.na],h.P=[h.P],h.Sa=[h.Sa];t:{E=e,y=r,b=i;var O=h.gb;C=h.na,w=h.P,T=h.Sa,D=22,t(E!=null),t(b!=null),S=y[0];var k=b[0];for(t(C!=null),t(T!=null),C[0]=null,w[0]=null,T[0]=0;;){if(y[0]=S,b[0]=k,8>k){y=7;break t}var A=M(E,S+4);if(4294967286O){y=3;break t}if(!n(E,S,`VP8 `)||!n(E,S,`VP8L`)){y=0;break t}if(k[0]b[0])y=7;else{if(S||D){if(O=M(O,E+4),12<=C&&O>C-12){y=3;break t}if(m&&O>b[0]-8){y=7;break t}w[0]=O,y[0]+=8,b[0]-=8,T[0]=D}else T[0]=5<=b[0]&&O[E+0]==47&&!(O[E+4]>>5),w[0]=b[0];y=0}if(i=i[0],h.Ja=h.Ja[0],h.xa=h.xa[0],r=r[0],y!=0)break;if(4294967286i){y=7;break}l=c,m=g,v=s,e==null||5>i?e=0:5<=i&&e[r+0]==47&&!(e[r+4]>>5)?(b=[0],O=[0],C=[0],_(w=new x,e,r,i),Ce(w,b,O,C)?(l!=null&&(l[0]=b[0]),m!=null&&(m[0]=O[0]),v!=null&&(v[0]=C[0]),e=1):e=0):e=0}else{if(10>i){y=7;break}l=g,e==null||10>i||!$e(e,r+3,i-3)?e=0:(m=e[r+0]|e[r+1]<<8|e[r+2]<<16,v=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&m||3<(m>>1&7)||!(m>>4&1)||m>>5>=h.Ja||!v||!e?e=0:(c&&(c[0]=v),l&&(l[0]=e),e=1))}if(!e||(c=c[0],g=g[0],p&&(d[0]!=c||f[0]!=g)))return 3;u!=null&&(u[0]=h,u.offset=r-u.w,t(4294967286>r-u.w),t(u.offset==u.ha-i));break}return y==0||y==7&&p&&u==null?(s!=null&&(s[0]|=h.na!=null&&0n||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=c||a+s>r||o+c>i))return 0;if(t.v=a,t.j=o,t.va=a+s,t.o=o+c,t.U=s,t.T=c,t.da=e!=null&&0e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,t.F!=null&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Ln(e,t,n,r){if(r==null||0>=e||0>=t)return 2;if(n!=null){if(n.Da){var i=n.cd,o=n.bd,s=-2&n.v,c=-2&n.j;if(0>s||0>c||0>=i||0>=o||s+i>e||c+o>t)return 2;e=i,t=o}if(n.da){if(!I(e,t,i=[n.ib],o=[n.hb]))return 2;e=i[0],t=o[0]}}r.width=e,r.height=t;t:{var l=r.width,u=r.height;if(e=r.S,0>=l||0>=u||!(e>=Fr&&13>e))e=2;else{if(0>=r.Rd&&r.sd==null){s=o=i=t=0;var d=(c=l*Vi[e])*u;if(11>e||(o=(u+1)/2*(t=(l+1)/2),e==12&&(s=(i=l)*u)),(u=a(d+2*o+s))==null){e=1;break t}r.sd=u,11>e?((l=r.f.RGBA).eb=u,l.fb=0,l.A=c,l.size=d):((l=r.f.kb).y=u,l.O=0,l.fa=c,l.Fd=d,l.f=u,l.N=0+d,l.Ab=t,l.Cd=o,l.ea=u,l.W=0+d+o,l.Db=t,l.Ed=o,e==12&&(l.F=u,l.J=0+d+2*o),l.Tc=s,l.lb=i)}if(t=1,i=r.S,o=r.width,s=r.height,i>=Fr&&13>i)if(11>i)e=r.f.RGBA,t&=(c=Math.abs(e.A))*(s-1)+o<=e.size,t&=c>=o*Vi[i],t&=e.eb!=null;else{e=r.f.kb,c=(o+1)/2,d=(s+1)/2,l=Math.abs(e.fa),u=Math.abs(e.Ab);var f=Math.abs(e.Db),p=Math.abs(e.lb),m=p*(s-1)+o;t&=l*(s-1)+o<=e.Fd,t&=u*(d-1)+c<=e.Cd,t=(t&=f*(d-1)+c<=e.Ed)&l>=o&u>=c&f>=c,t&=e.y!=null,t&=e.f!=null,t&=e.ea!=null,i==12&&(t&=p>=o,t&=m<=e.Tc,t&=e.F!=null)}else t=0;e=t?0:2}}return e!=0||n!=null&&n.fd&&(e=In(r)),e}var Rn=64,zn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Bn=24,Vn=32,Hn=8,Un=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];R(`Predictor0`,`PredictorAdd0`),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return B(B(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return B(e,t[n-1])},e.Predictor7=function(e,t,n){return B(e,t[n+0])},e.Predictor8=function(e,t,n){return B(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return B(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return B(B(e,t[n-1]),B(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=H(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+H(r>>16&255,e>>16&255,t>>16&255)+H(r>>8&255,e>>8&255,t>>8&255)+H(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(te((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|te((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|te((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|te((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(V((e=B(e,t[n+0]))>>24&255,r>>24&255)<<24|V(e>>16&255,r>>16&255)<<16|V(e>>8&255,r>>8&255)<<8|V(255&e,255&r))>>>0};var Wn=e.PredictorAdd0;e.PredictorAdd1=U,R(`Predictor2`,`PredictorAdd2`),R(`Predictor3`,`PredictorAdd3`),R(`Predictor4`,`PredictorAdd4`),R(`Predictor5`,`PredictorAdd5`),R(`Predictor6`,`PredictorAdd6`),R(`Predictor7`,`PredictorAdd7`),R(`Predictor8`,`PredictorAdd8`),R(`Predictor9`,`PredictorAdd9`),R(`Predictor10`,`PredictorAdd10`),R(`Predictor11`,`PredictorAdd11`),R(`Predictor12`,`PredictorAdd12`),R(`Predictor13`,`PredictorAdd13`);var Gn=e.PredictorAdd2;ie(`ColorIndexInverseTransform`,`MapARGB`,`32b`,function(e){return e>>8&255},function(e){return e}),ie(`VP8LColorIndexInverseTransformAlpha`,`MapAlpha`,`8b`,function(e){return e},function(e){return e>>8&255});var Kn,qn=e.ColorIndexInverseTransform,Jn=e.MapARGB,Yn=e.VP8LColorIndexInverseTransformAlpha,Xn=e.MapAlpha,Zn=e.VP8LPredictorsAdd=[];Zn.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er=a(511),Dr=a(2041),Or=a(225),kr=a(767),Ar=0,jr=Dr,Mr=Or,Nr=kr,Pr=Er,Fr=0,Ir=1,Lr=2,Rr=3,zr=4,Br=5,Vr=6,Hr=7,Ur=8,Wr=9,Gr=10,Kr=[2,3,7],qr=[3,3,11],Jr=[280,256,256,256,40],Yr=[0,1,1,1,0],Xr=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zr=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Qr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],$r=8,ei=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],ti=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ni=null,ri=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],ii=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ai=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],oi=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],si=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],ci=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],li=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ui=[],di=[],fi=[],pi=1,mi=2,hi=[],gi=[];_n(`UpsampleRgbLinePair`,Cn,3),_n(`UpsampleBgrLinePair`,wn,3),_n(`UpsampleRgbaLinePair`,kn,4),_n(`UpsampleBgraLinePair`,On,4),_n(`UpsampleArgbLinePair`,Dn,4),_n(`UpsampleRgba4444LinePair`,En,2),_n(`UpsampleRgb565LinePair`,Tn,2);var _i=e.UpsampleRgbLinePair,vi=e.UpsampleBgrLinePair,yi=e.UpsampleRgbaLinePair,bi=e.UpsampleBgraLinePair,xi=e.UpsampleArgbLinePair,Si=e.UpsampleRgba4444LinePair,Ci=e.UpsampleRgb565LinePair,wi=16,Ti=1<c.ca.S||(alert(`todo:WebPInitConvertARGBToYUV`),c.ca.f.kb.F!=null&&gn()),c.Pb&&0(p=s.Md)?0:100m;++m)12>(g=l.pb[m]).lc&&(g.ia=p*zi[0>g.lc?0:g.lc]>>3),h|=g.ia;h&&(alert(`todo:VP8InitRandom`),l.ia=1)}l.Ga=s.Id,100l.Ga&&(l.Ga=0)}(function(e,n){if(e==null)return 0;if(n==null)return Qe(e,2,`NULL VP8Io parameter in VP8Decode().`);if(!e.cb&&!et(e,n))return 0;if(t(e.cb),n.ac==null||n.ac(n)){n.ob&&(e.L=0);var s=Ri[e.L];if(e.L==2?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0s;++s){var l;if(e.Qa.Cb){var u=e.Qa.Lb[s];e.Qa.Fb||(u+=c.Tb)}else u=c.Tb;for(l=0;1>=l;++l){var d=e.gd[s][l],f=u;if(c.Pc&&(f+=c.vd[0],l&&(f+=c.od[0])),0<(f=0>f?0:63>2:p>>1)>9-c.wb&&(p=9-c.wb),1>p&&(p=1),d.dd=p,d.tc=2*f+p,d.ld=40<=f?2:+(15<=f)}else d.tc=0;d.La=l}}}s=0}else Qe(e,6,`Frame setup failed`),s=e.a;if(s=s==0){if(s){e.$c=0,0e.Vb){if(e.Vb=0,e.Ec=a(d),e.Fc=0,e.Ec==null){s=Qe(e,1,`no memory during frame initialization.`);break e}e.Vb=d}d=e.Ec,f=e.Fc,e.Ac=d,e.Bc=f,f+=c,e.Gd=o(m,J),e.Hd=0,e.rb=o(h+1,Ge),e.sb=1,e.wa=g?o(g,We):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0=s;++s)Er[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)Dr[1020+s]=-128>s?-128:127=s;++s)Or[112+s]=-16>s?-16:15=s;++s)kr[255+s]=0>s?0:255d;++d){var v,y=m[0+d];for(v=0;4>v;++v){y=si[f[p+v]][y];for(var b=ai[O(u,y[0])];0>3;for(b=0;256>b;b+=16)d[g+b]=E}C=1,w=p[0]}var D=15&u.la,k=15&_.la;for(b=0;4>b;++b){var A=1&k;for(E=S=0;4>E;++E)D=D>>1|(A=(T=ni(f,w,T=A+(1&D),h.Sc,C,d,g))>C)<<7,S=S<<2|(3>=4,k=k>>1|A<<7,v=(v<<8|S)>>>0}for(w=D,C=k>>4,x=0;4>x;x+=2){for(S=0,D=u.la>>4+x,k=_.la>>4+x,b=0;2>b;++b){for(A=1&k,E=0;2>E;++E)T=A+(1&D),D=D>>1|(A=0<(T=ni(f,p[2],T,h.Qc,0,d,g)))<<3,S=S<<2|(3>=2,k=k>>1|A<<5}y|=S<<4*x,w|=D<<4<=s.zb&&s.M<=s.Va,s.Aa==0)e:{if(o.M=s.M,o.uc=u,Nn(s,o),l=1,o=(S=s.D).Nb,u=(y=Ri[s.L])*s.R,f=y/2*s.B,b=16*o*s.R,E=8*o*s.B,p=s.sa,m=s.ta-u+b,h=s.qa,d=s.ra-f+E,g=s.Ha,_=s.Ia-f+E,k=(D=S.M)==0,v=D>=s.Va-1,s.Aa==2&&Nn(s,S),S.uc)for(A=(T=s).D.M,t(T.D.uc),S=T.yb;Sc.o&&(D=c.o),c.F=null,c.J=null,s.Fa!=null&&0>1),c.W+=s.B*(y>>1),c.F!=null&&(c.J+=c.width*y)),S>1,c.W+=c.v>>1,c.F!=null&&(c.J+=c.v),c.ka=S-c.j,c.U=c.va-c.v,c.T=D-S,l=c.put(c))}o+1!=s.Ic||v||(r(s.sa,s.ta-u,p,m+16*s.R,u),r(s.qa,s.ra-f,h,d+8*s.B,f),r(s.Ha,s.Ia-f,g,_+8*s.B,f))}if(!l)return Qe(e,6,`Output aborted.`)}return 1}(e,n),n.bc!=null&&n.bc(n),s&=1}return s?(e.cb=0,s):0})(e,c)||(n=e.a)}}else n=e.a}n==0&&d.Oa!=null&&d.Oa.fd&&(n=In(d.ba))}d=n}u=d==0?11>u?f.f.RGBA.eb:f.f.kb.y:null}else u=null;return u};var Vi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(e,t){for(var n=``,r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function u(e,t){return e[t+0]|e[t+1]<<8}function d(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16)>>>0}function f(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new c;var p=[0],m=[0],h=[],g=new c,_=e,v=function(e,t){var n={},r=0,i=!1,a=0,o=0;if(n.frames=[],!function(e,t){for(var n=0;n<4;n++)if(e[t+n]!=`RIFF`.charCodeAt(n))return!0;return!1}(e,t)){for(f(e,t+=4),t+=8;t>1&1}s!=`ANMF`&&(t+=p)}return n}}(_,0);v.response=_,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,b=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,p=[y.canvas_height],m=[y.canvas_width];for(var x=0;x`+n.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)+``,this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write(`<< /Type /Metadata /Subtype /XML /Length `+e.length+` >>`),this.internal.write(`stream`),this.internal.write(e),this.internal.write(`endstream`),this.internal.write(`endobj`)}function Yn(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write(`/Metadata `+this.internal.__metadata__.metadataObjectNumber+` 0 R`)}(function(e){var t,n,r,i,a,s,c,l,u,d=function(e){return e||={},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||`#000000`,this.fillStyle=e.fillStyle||`#000000`,this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||`10px sans-serif`,this.textBaseline=e.textBaseline||`alphabetic`,this.textAlign=e.textAlign||`left`,this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||`miter`,this.lineCap=e.lineCap||`butt`,this.path=e.path||[],this.transform=e.transform===void 0?new l:e.transform.clone(),this.globalCompositeOperation=e.globalCompositeOperation||`normal`,this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new s,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new s,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect=typeof e.ignoreClearRect!=`boolean`||e.ignoreClearRect,this};e.events.push([`initialized`,function(){this.context2d=new f(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,s=this.internal.Point,c=this.internal.Rectangle,l=this.internal.Matrix,u=new d}]);var f=function(e){Object.defineProperty(this,`canvas`,{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,`pdf`,{get:function(){return t}});var n=!1;Object.defineProperty(this,`pageWrapXEnabled`,{get:function(){return n},set:function(e){n=!!e}});var r=!1;Object.defineProperty(this,`pageWrapYEnabled`,{get:function(){return r},set:function(e){r=!!e}});var i=0;Object.defineProperty(this,`posX`,{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var a=0;Object.defineProperty(this,`posY`,{get:function(){return a},set:function(e){isNaN(e)||(a=e)}}),Object.defineProperty(this,`margin`,{get:function(){return u.margin},set:function(e){var t;typeof e==`number`?t=[e,e,e,e]:((t=[,,,,])[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),u.margin=t}});var o=!1;Object.defineProperty(this,`autoPaging`,{get:function(){return o},set:function(e){o=e}});var s=0;Object.defineProperty(this,`lastBreak`,{get:function(){return s},set:function(e){s=e}});var c=[];Object.defineProperty(this,`pageBreaks`,{get:function(){return c},set:function(e){c=e}}),Object.defineProperty(this,`ctx`,{get:function(){return u},set:function(e){e instanceof d&&(u=e)}}),Object.defineProperty(this,`path`,{get:function(){return u.path},set:function(e){u.path=e}});var l=[];Object.defineProperty(this,`ctxStack`,{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,`fillStyle`,{get:function(){return this.ctx.fillStyle},set:function(e){var t=p(e);this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=t.a===0,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,`strokeStyle`,{get:function(){return this.ctx.strokeStyle},set:function(e){var t=p(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=t.a===0,this.ctx.strokeOpacity=t.a,t.a===0?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,`lineCap`,{get:function(){return this.ctx.lineCap},set:function(e){[`butt`,`round`,`square`].indexOf(e)!==-1&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,`lineWidth`,{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,`lineJoin`,{get:function(){return this.ctx.lineJoin},set:function(e){[`bevel`,`round`,`miter`].indexOf(e)!==-1&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,`miterLimit`,{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,`textBaseline`,{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,`textAlign`,{get:function(){return this.ctx.textAlign},set:function(e){[`right`,`end`,`center`,`left`,`start`].indexOf(e)!==-1&&(this.ctx.textAlign=e)}});var f=null,m=null,h=null;Object.defineProperty(this,`fontFaces`,{get:function(){return h},set:function(e){f=null,m=null,h=e}}),Object.defineProperty(this,`font`,{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(e))!==null){var n=t[1];t[2];var r=t[3],i=t[4];t[5];var a=t[6],o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i=Math.floor(o===`px`?parseFloat(i)*this.pdf.internal.scaleFactor:o===`em`?parseFloat(i)*this.pdf.getFontSize():parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(e){var t,n,r=[],i=e.trim();if(i===``)return jn;if(i in xn)return[xn[i]];for(;i!==``;){switch(n=null,t=(i=Cn(i)).charAt(0)){case`"`:case`'`:n=wn(i.substring(1),t);break;default:n=Tn(i)}if(n===null||(r.push(n[0]),(i=Cn(n[1]))!==``&&i.charAt(0)!==`,`))return jn;i=i.replace(/^,/,``)}return r}(a);if(this.fontFaces){var c=function(e,t,n){for(var r=(n||={}).defaultFontFamily||`times`,i=Object.assign({},bn,n.genericFontFamilies||{}),a=null,o=null,s=0;s=700||n===`bold`)&&(l=`bold`),n===`italic`&&(l+=`italic`),l.length===0&&(l=`normal`);for(var u=``,d={arial:`Helvetica`,Arial:`Helvetica`,verdana:`Helvetica`,Verdana:`Helvetica`,helvetica:`Helvetica`,Helvetica:`Helvetica`,"sans-serif":`Helvetica`,fixed:`Courier`,monospace:`Courier`,terminal:`Courier`,cursive:`Times`,fantasy:`Times`,serif:`Times`},p=0;p=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:`arc`,x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:a})},f.prototype.arcTo=function(e,t,n,r,i){throw Error(`arcTo not implemented.`)},f.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Y.error(`jsPDF.context2d.rect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rect`);this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},f.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Y.error(`jsPDF.context2d.fillRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillRect`);if(!m.call(this)){var i={};this.lineCap!==`butt`&&(i.lineCap=this.lineCap,this.lineCap=`butt`),this.lineJoin!==`miter`&&(i.lineJoin=this.lineJoin,this.lineJoin=`miter`),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty(`lineCap`)&&(this.lineCap=i.lineCap),i.hasOwnProperty(`lineJoin`)&&(this.lineJoin=i.lineJoin)}},f.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Y.error(`jsPDF.context2d.strokeRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeRect`);h.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},f.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Y.error(`jsPDF.context2d.clearRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.clearRect`);this.ignoreClearRect||(this.fillStyle=`#ffffff`,this.fillRect(e,t,n,r))},f.prototype.save=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(e,t,n,r,i,a,o,s,u){var d=this.pdf.getImageProperties(e),f=1,p=1,m=1,h=1;r!==void 0&&s!==void 0&&(m=s/r,h=u/i,f=d.width/r*s/r,p=d.height/i*u/i),a===void 0&&(a=t,o=n,t=0,n=0),r!==void 0&&s===void 0&&(s=r,u=i),r===void 0&&s===void 0&&(s=d.width,u=d.height);var v=this.ctx.transform.decompose(),x=F(v.rotate.shx),C=new l,w=(C=(C=(C=C.multiply(v.translate)).multiply(v.skew)).multiply(v.scale)).applyToRectangle(new c(a-t*m,o-n*h,r*f,i*p));if(this.autoPaging){for(var T,E=_.call(this,w),D=[],O=0;Ok||jC||T0)){for(;c>=0;c--)if(!0!==i[c-1].close&&!0!==i[c-1].begin){i[c-1].deltas.push(n),i[c-1].abs.push(s);break}}break;case`bct`:n=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(n);break;case`qct`:var l=a[o-1].x+2/3*(s.x1-a[o-1].x),u=a[o-1].y+2/3*(s.y1-a[o-1].y),d=s.x+2/3*(s.x1-s.x),f=s.y+2/3*(s.y1-s.y),p=s.x,g=s.y;n=[l-a[o-1].x,u-a[o-1].y,d-a[o-1].x,f-a[o-1].y,p-a[o-1].x,g-a[o-1].y],i[i.length-1].deltas.push(n);break;case`arc`:i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}r=t?null:e===`stroke`?`stroke`:`fill`;for(var _=!1,v=0;v=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale);var ee=this.autoPaging!==`text`;if(ee||L.y+L.h<=j){if(ee||L.y>=k&&L.x<=N){var R=ee?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||N-L.x)[0],z=y([JSON.parse(JSON.stringify(m))],this.posX+this.margin[3],-F+k+this.ctx.prevPageLastElemOffset)[0],B=ee&&(O>E||O=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)}}else e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale),this.pdf.text(e.text,d.x+this.posX,d.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)},A=function(e,t,i,a){i||=0,a||=0,this.pdf.internal.out(n(e+i)+` `+r(t+a)+` l`)},j=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},M=function(e,n,r,o,s,c,l,u){this.pdf.internal.out([t(i(r+e)),t(a(o+n)),t(i(s+e)),t(a(c+n)),t(i(l+e)),t(a(u+n)),`c`].join(` `))},N=function(e,t,n,r){for(var i=2*Math.PI,a=Math.PI/2;t>n;)t-=i;var o=Math.abs(n-t);o1e-5;){var u=l+c*Math.min(o,a);s.push(P.call(this,e,l,u)),o-=Math.abs(u-l),l=u}return s},P=function(e,t,n){var r=(n-t)/2,i=e*Math.cos(r),a=e*Math.sin(r),o=i,s=-a,c=o*o+s*s,l=c+o*i+s*a,u=4/3*(Math.sqrt(2*c*l)-l)/(o*a-s*i),d=o-u*s,f=s+u*o,p=d,m=-f,h=r+t,g=Math.cos(h),_=Math.sin(h);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:d*g-f*_,y2:d*_+f*g,x3:p*g-m*_,y3:p*_+m*g,x4:e*Math.cos(n),y4:e*Math.sin(n)}},F=function(e){return 180*e/Math.PI},I=function(e,t,n,r,i,a){var o=e+.5*(n-e),s=t+.5*(r-t),l=i+.5*(n-i),u=a+.5*(r-a),d=Math.min(e,i,o,l),f=Math.max(e,i,o,l),p=Math.min(t,a,s,u),m=Math.max(t,a,s,u);return new c(d,p,f-d,m-p)},L=function(e,t,n,r,i,a,o,s){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C=n-e,w=r-t,T=i-n,E=a-r,D=o-i,O=s-a;for(u=0;u<41;u++)_=(h=(d=e+(l=u/40)*C)+l*((p=n+l*T)-d))+l*(p+l*(i+l*D-p)-h),v=(g=(f=t+l*w)+l*((m=r+l*E)-f))+l*(m+l*(a+l*O-m)-g),u==0?(y=_,b=v,x=_,S=v):(y=Math.min(y,_),b=Math.min(b,v),x=Math.max(x,_),S=Math.max(S,v));return new c(Math.round(y),Math.round(b),Math.round(x-y),Math.round(S-b))},ee=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,n=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==n&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=n)}}})(Z.API),function(e){var t=function(e){var t,n,r,i,a,o,s,c,l,u;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t=`\0\0\0\0`.slice(e.length%4||4)).length;i>r;r+=4)(a=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))===0?n.push(122):(o=(a=((a=((a=((a=(a-(u=a%85))/85)-(l=a%85))/85)-(c=a%85))/85)-(s=a%85))/85)%85,n.push(o+33,s+33,c+33,l+33,u+33));return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+`~>`},n=function(e){var t,n,r,i,a,o=String,s=`length`,c=255,l=`charCodeAt`,u=`slice`,d=`replace`;for(e[u](-2),e=e[u](0,-2)[d](/\s/g,``)[d](`z`,`!!!!!`),r=[],i=0,a=(e+=t=`uuuuu`[u](e[s]%5||5))[s];a>i;i+=5)n=52200625*(e[l](i)-33)+614125*(e[l](i+1)-33)+7225*(e[l](i+2)-33)+85*(e[l](i+3)-33)+(e[l](i+4)-33),r.push(c&n>>24,c&n>>16,c&n>>8,c&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[s]),o.fromCharCode.apply(o,r)},r=function(e){return e.split(``).map(function(e){return(`0`+e.charCodeAt().toString(16)).slice(-2)}).join(``)+`>`},i=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((e=e.replace(/\s/g,``)).indexOf(`>`)!==-1&&(e=e.substr(0,e.indexOf(`>`))),e.length%2&&(e+=`0`),!1===t.test(e))return``;for(var n=``,r=0;rimport(`./html2canvas-Csps4_cl.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url)).catch(function(e){return Promise.reject(Error(`Could not load html2canvas: `+e))}).then(function(e){return e.default?e.default:e})}function r(){return(J.DOMPurify?Promise.resolve(J.DOMPurify):s(()=>import(`./purify.es-B66OrZKW.js`),[],import.meta.url)).catch(function(e){return Promise.reject(Error(`Could not load dompurify: `+e))}).then(function(e){return e.default?e.default:e})}var i=function(e){var t=o(e);return t===`undefined`?`undefined`:t===`string`||e instanceof String?`string`:t===`number`||e instanceof Number?`number`:t===`function`||e instanceof Function?`function`:e&&e.constructor===Array?`array`:e&&e.nodeType===1?`element`:t===`object`?`object`:`unknown`},a=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},c=function e(t,n){for(var r=t.nodeType===3?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&i.nodeType===1&&i.nodeName===`SCRIPT`||r.appendChild(e(i,n));return t.nodeType===1&&(t.nodeName===`CANVAS`?(r.width=t.width,r.height=t.height,r.getContext(`2d`).drawImage(t,0,0)):t.nodeName!==`TEXTAREA`&&t.nodeName!==`SELECT`||(r.value=t.value),r.addEventListener(`load`,function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},l=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(e,t){return e.__proto__=t||l.prototype,e},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:`file.pdf`,margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:`transparent`}},l.prototype.from=function(e,t){return this.then(function(){switch(t||=function(e){switch(i(e)){case`string`:return`string`;case`element`:return e.nodeName.toLowerCase()===`canvas`?`canvas`:`element`;default:return`unknown`}}(e),t){case`string`:return this.then(r).then(function(t){return this.set({src:a(`div`,{innerHTML:e,dompurify:t})})});case`element`:return this.set({src:e});case`canvas`:return this.set({canvas:e});case`img`:return this.set({img:e});default:return this.error(`Unknown source type.`)}})},l.prototype.to=function(e){switch(e){case`container`:return this.toContainer();case`canvas`:return this.toCanvas();case`img`:return this.toImg();case`pdf`:return this.toPdf();default:return this.error(`Invalid target.`)}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error(`Cannot duplicate - no source HTML.`)},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:`relative`,display:`inline-block`,width:(typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+`px`,left:0,right:0,top:0,margin:`auto`,backgroundColor:this.opt.backgroundColor},t=c(this.prop.src,this.opt.html2canvas.javascriptEnabled);t.tagName===`BODY`&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+`px`),this.prop.overlay=a(`div`,{className:`html2pdf__overlay`,style:{position:`fixed`,overflow:`hidden`,zIndex:1e3,left:`-100000px`,right:0,bottom:0,top:0}}),this.prop.container=a(`div`,{className:`html2pdf__container`,style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(a(`div`,{style:{clear:`both`,border:`0 none transparent`,margin:0,padding:0,height:0}})),this.prop.container.style.float=`none`,this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position=`relative`,this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+`px`})},l.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(n).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(n).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r=typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:`#ffffff`,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,t.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var a=0;al&&(c=u,u=l,l=c);else{if(e!==`l`&&e!==`landscape`)throw`Invalid orientation: `+e;e=`l`,l>u&&(c=u,u=l,l=c)}return{width:u,height:l,unit:t,k:i,orientation:e}},t.html=function(e,t){(t||={}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(vn):null;var n=new l(t);return t.worker?n:n.from(e).doCallback()}}(Z.API),Z.API.addJS=function(e){var t,n,r=function(e){for(var t=``,n=0;n=0&&e[a]===`\\`;a--)i++;t+=i%2==0?`\\`+r:r}else t+=r}return t}(e);return this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/Names [(EmbeddedJS) `+(t+1)+` 0 R]`),this.internal.out(`>>`),this.internal.out(`endobj`),n=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /JavaScript`),this.internal.out(`/JS (`+r+`)`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){t!==void 0&&n!==void 0&&this.internal.out(`/Names <>`)}),this},function(e){var t;e.events.push([`postPutResources`,function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),i=0;i> endobj`)}var f=e.internal.newObject();for(e.internal.write(`<< /Names [ `),i=0;i>`,`endobj`),t=e.internal.newObject(),e.internal.write(`<< /Dests `+f+` 0 R`),e.internal.write(`>>`,`endobj`)}}]),e.events.push([`putCatalog`,function(){var e=this;e.outline.root.children.length>0&&(e.internal.write(`/Outlines`,this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write(`/Names `+t+` 0 R`))}]),e.events.push([`initialized`,function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return e??=this.root,e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val=``,this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n0&&(this.line(`/First `+this.makeRef(e.children[0])),this.line(`/Last `+this.makeRef(e.children[e.children.length-1]))),this.line(`/Count `+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r0&&this.line(`/Prev `+this.makeRef(t.children[r-1])),r0&&(this.line(`/First `+this.makeRef(i.children[0])),this.line(`/Last `+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line(`/Count `+a),i.options&&i.options.pageNumber){var o=e.internal.getPageInfo(i.options.pageNumber);this.line(`/Dest [`+o.objId+` 0 R /XYZ 0 `+n(0)+` 0]`)}this.objEnd()}for(var s=0;s> \r endobj\r `},e.outline.count_r=function(e,t){for(var n=0;n1){s=!0,l=void 0;var y=t*n;u=new Uint8Array(y);for(var b=new DataView(r.buffer),x=0;x536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);this.data=new Uint8Array(t);try{this[e]()}catch(e){Y.log(`bit decode error:`+e)}},Kn.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},Kn.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i>4,c=15&a,l=this.palette[s];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*i+1>=this.width)break;l=this.palette[c],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},Kn.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i>5&t)/t*255|0,c=(a>>10&t)/t*255|0,l=a>>15?255:0,u=r*this.width*4+4*i;this.data[u]=c,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=l}this.pos+=e}},Kn.prototype.bit16=function(){for(var e=this.width%3,t=31,n=63,r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a>5&n)/n*255|0,l=(o>>11)/t*255|0,u=i*this.width*4+4*a;this.data[u]=l,this.data[u+1]=c,this.data[u+2]=s,this.data[u+3]=255}this.pos+=e}},Kn.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;nr&&(i.push(e.slice(c,a)),s=0,c=a),s+=t[a],a++;return c!==a&&i.push(e.slice(c,a)),i},An=function(e,t,n){n||={};var r,i,a,o,s,c,l,u=[],d=[u],f=n.textIndent||0,p=0,m=0,h=e.split(` `),g=Dn.apply(this,[` `,n])[0];if(c=n.lineIndent===-1?h[0].length+2:n.lineIndent||0){var _=Array(c).join(` `),v=[];h.map(function(e){(e=e.split(/\s*\n/)).length>1?v=v.concat(e.map(function(e,t){return(t&&e.length?` `:``)+e})):v.push(e[0])}),h=v,c=On.apply(this,[_,n])}for(a=0,o=h.length;at||y){if(m>t){for(s=kn.apply(this,[r,i,t-(f+p),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);m=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[r];d.push(u),f=m+c,p=g}else u.push(r),f+=p+m,p=g}return l=c?function(e,t){return(t?_:``)+e.join(` `)}:function(e){return e.join(` `)},d.map(l)},En.splitTextToSize=function(e,t,n){var r,i=(n||={}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n=`Unicode`;return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,c,l=[];for(s=0,c=r.length;simport(`./index.es-KDfAzJSG.js`),__vite__mapDeps([2,1,3,4]),import.meta.url)).catch(function(e){return Promise.reject(Error(`Could not load canvg: `+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(u,e,d)},function(){return Promise.reject(Error(`Could not load canvg.`))}).then(function(e){return e.render(d)}).then(function(){f.addImage(l.toDataURL(`image/jpeg`,1),t,n,r,i,o,c)})},Z.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,`g`),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),`g`),n=this.pdfEscape16(this.internal.getNumberOfPages()+``,this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i1){for(d=0;d>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},Z.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??`http://jspdf.default.namespaceuri/`,rawXml:typeof t==`boolean`&&t},this.internal.events.subscribe(`putCatalog`,Yn),this.internal.events.subscribe(`postPutResources`,Jn)),this},function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=[``,`0`,`00`,`000`,`0000`],a=[``],o=0,s=e.length;o> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange`,r=[],o=0,s=(n=Object.keys(e).sort(function(e,t){return e-t})).length;o=100&&(a+=` `+r.length+` beginbfchar `+r.join(` `)+` endbfchar`,r=[]),e[t]!==void 0&&e[t]!==null&&typeof e[t].toString==`function`&&(i=(`0000`+e[t].toString(16)).slice(-4),t=(`0000`+(+t).toString(16)).slice(-4),r.push(`<`+t+`><`+i+`>`));return r.length&&(a+=` `+r.length+` beginbfchar `+r.join(` `)+` endbfchar `),a+`endcmap CMapName currentdict /CMap defineresource pop end end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`Identity-H`){for(var s=n.metadata.Unicode.widths,c=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),l=``,u=0;u>`),i(`endobj`);var m=a();i(`<<`),i(`/Type /Font`),i(`/BaseFont /`+bt(n.fontName)),i(`/FontDescriptor `+p+` 0 R`),i(`/W `+e.API.PDFObject.convert(s)),i(`/CIDToGIDMap /Identity`),i(`/DW 1000`),i(`/Subtype /CIDFontType2`),i(`/CIDSystemInfo`),i(`<<`),i(`/Supplement 0`),i(`/Registry (Adobe)`),i(`/Ordering (`+n.encoding+`)`),i(`>>`),i(`>>`),i(`endobj`),n.objectNumber=a(),i(`<<`),i(`/Type /Font`),i(`/Subtype /Type0`),i(`/ToUnicode `+f+` 0 R`),i(`/BaseFont /`+bt(n.fontName)),i(`/Encoding /`+n.encoding),i(`/DescendantFonts [`+m+` 0 R]`),i(`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]),t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`WinAnsiEncoding`){for(var s=n.metadata.rawData,c=``,l=0;l>`),i(`endobj`),n.objectNumber=a();for(var p=0;p>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]);var i=function(e){var t,r=e.text||``,i=e.x,a=e.y,o=e.options||{},s=e.mutex||{},c=s.pdfEscape,l=s.activeFontKey,u=s.fonts,d=l,f=``,p=0,m=``,h=u[d].encoding;if(u[d].encoding!==`Identity-H`)return{text:r,x:i,y:a,options:o,mutex:s};for(m=r,d=l,Array.isArray(r)&&(m=r[0]),p=0;p.<.[.].[.{.}.{.«.».«.‹.›.‹.⁅.⁆.⁅.⁽.⁾.⁽.₍.₎.₍.≤.≥.≤.〈.〉.〈.﹙.﹚.﹙.﹛.﹜.﹛.﹝.﹞.﹝.﹤.﹥.﹤`.split(`.`),h=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,_=0;this.__bidiEngine__={};var v=function(e){var t=e.charCodeAt(),n=t>>8,r=p[n];return r===void 0?n===252||n===253?`AL`:h.test(n)?`L`:n===8?`R`:`N`:l[256*r+(255&t)]},y=function(e){for(var t,n=0;n=t.length||(c=o[s-1])!==`EN`&&c!==`AN`||(l=t[s+1])!==`EN`&&l!==`AN`?f=`N`:g&&(l=`AN`),f=l===c?l:`N`;break;case`ES`:f=(c=s>0?o[s-1]:`B`)===`EN`&&s+10&&o[s-1]===`EN`){f=`EN`;break}if(g){f=`N`;break}for(u=s+1,d=t.length;u=1425&&p<=2303||p===64286;if(c=t[u],m&&(c===`R`||c===`AL`)){f=`R`;break}}}f=s<1||(c=t[s-1])===`B`?`N`:o[s-1];break;case`B`:g=!1,n=!0,f=_;break;case`S`:r=!0,f=`N`}return f},x=function(e,t,n){var r=e.split(``);return n&&S(r,n,{hiLevel:_}),r.reverse(),t&&t.reverse(),r.join(``)},S=function(e,t,i){var a,o,s,c,l,p=-1,m=e.length,h=0,y=[],x=_?d:u,S=[];for(g=!1,n=!1,r=!1,o=0;o0)if(a===16){for(o=p;o-1){for(o=p;o=0&&e[i]===`WS`;i--)t[i]=_}}(S,t,m)},C=function(e,t,r,i,a){if(!(a.hiLevel=e){for(c=d+1;c=e;)c++;for(l=d,s=c-1;l=0&&(e[i]=m[r+1])}(r,n,i),C(2,r,t,n,i),C(1,r,t,n,i),r.join(``)};return this.__bidiEngine__.doBidiReorder=function(e,t,n){if(function(e,t){if(t)for(var n=0;n>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+`.`+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw Error(`No unicode cmap for font`)},e.prototype.characterToGlyph=function(e){return this.cmap.unicode?.codeMap[e]||0},e.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,n){var r,i,a,o;for(a=0,i=0,o=(e=``+e).length;0<=o?io;i=0<=o?++i:--i)r=e.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(r))+1e3/t*n||0;return t/1e3*a},e.prototype.lineHeight=function(e,t){var n;return t??=!1,n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},e}();var Xn,Zn=function(){function e(e){this.data=e??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?te;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join(``)},e.prototype.writeString=function(e){var t,n,r;for(r=[],t=0,n=e.length;0<=n?tn;t=0<=n?++t:--t)r.push(this.writeByte(e.charCodeAt(t)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e,t,n,r,i,a,o,s;return e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*i+65536*a+256*o+s},e.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?ne;n=0<=e?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(e){var t,n,r,i;for(i=[],n=0,r=e.length;nr;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var n,r,i,a,o,s,c,l,u,d,f,p,m;for(m in f=Object.keys(t).length,s=Math.log(2),u=16*Math.floor(Math.log(f)/s),a=Math.floor(u/s),l=16*f-u,(r=new Zn).writeInt(this.scalarType),r.writeShort(f),r.writeShort(u),r.writeShort(a),r.writeShort(l),i=16*f,c=r.pos+i,o=null,p=[],t)for(d=t[m],r.writeString(m),r.writeInt(e(d)),r.writeInt(c),r.writeInt(d.length),p=p.concat(d),m===`head`&&(o=c),c+=d.length;c%4;)p.push(0),c++;return r.write(p),n=2981146554-e(r.data),r.pos=o+8,r.writeUInt32(n),r.data},e=function(e){var t,n,r,i;for(e=dr.call(e);e.length%4;)e.push(0);for(r=new Zn(e),n=0,t=0,i=e.length;td;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,m=function(){var t,n;for(n=[],s=t=0;0<=d?td;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),c=function(){var t,n;for(n=[],s=t=0;0<=d?td;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n;for(n=[],s=t=0;0<=d?td;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,o=function(){var t,n;for(n=[],s=t=0;0<=r?tr;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=g=0,v=i.length;g=h;n=p<=h?++_:--_)l[s]===0?a=n+c[s]:(a=o[l[s]/2+(n-p)-(d-s)]||0)!==0&&(a+=c[s]),this.codeMap[n]=65535&a}e.pos=u}return e.encode=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,ee,R,z,B,te,V,H,U,ne,W;switch(k=new Zn,a=Object.keys(e).sort(function(e,t){return e-t}),t){case`macroman`:for(m=0,h=function(){var e=[];for(p=0;p<256;++p)e.push(0);return e}(),_={0:0},i={},A=0,P=a.length;A=32768)for(s.push(0),x.push(2*(f.length+w-p)),r=N=E;E<=l?N<=l:N>=l;r=E<=l?++N:--N)f.push(n[r].new);else s.push(O-E),x.push(0)}for(k.writeUInt16(3),k.writeUInt16(1),k.writeUInt32(12),k.writeUInt16(4),k.writeUInt16(16+8*w+2*f.length),k.writeUInt16(0),k.writeUInt16(T),k.writeUInt16(C),k.writeUInt16(d),k.writeUInt16(S),te=0,L=u.length;ter;n=0<=r?++n:--n)t=new nr(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},e.encode=function(e,t){var n,r;return t??=`macroman`,n=nr.encode(e,t),(r=new Zn).writeUInt16(0),r.writeUInt16(1),n.table=r.data.concat(n.subtable),n},e}(),ir=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`hhea`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},e}(),ar=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`OS/2`,e.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n}(),this.charRange=function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},e}(),or=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`post`,e.prototype.parse=function(e){var t,n,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(n=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?in;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.posn;i=0<=n?++t:--t)r.push(e.readUInt32());return r}.call(this)}},e}(),sr=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},cr=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`name`,e.prototype.parse=function(e){var t,n,r,i,a,o,s,c,l,u,d;for(e.pos=this.offset,e.readShort(),t=e.readShort(),o=e.readShort(),n=[],i=0;0<=t?it;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(s={},i=l=0,u=n.length;lo;t=0<=o?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i;for(i=[],t=n=0;0<=r?nr;t=0<=r?++n:--n)i.push(e.readInt16());return i}(),this.widths=function(){var e,t,n,r;for(r=[],e=0,t=(n=this.metrics).length;er;t=0<=r?++a:--a)s.push(this.widths.push(n));return s},e.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},e}(),dr=[].slice,fr=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`glyf`,e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(e){var t,n,r,i,a,o,s,c,l,u;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,n=i.indexOf(e),(r=i.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+n,a=(o=new Zn(t.read(r))).readShort(),c=o.readShort(),u=o.readShort(),s=o.readShort(),l=o.readShort(),this.cache[e]=a===-1?new mr(o,c,u,s,l):new pr(o,a,c,u,s,l),this.cache[e]))},e.prototype.encode=function(e,t,n){var r,i,a,o,s;for(a=[],i=[],o=0,s=t.length;o0&&(r+=s)}for(var c=Array(4*n.length),l=0;l>8,c[4*l+1]=(16711680&n[l])>>16,c[4*l]=(4278190080&n[l])>>24;return c},e}(),gr=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,n,r,i;for(t in r=this.font.cmap.tables[0].codeMap,e={},i=this.subset)n=i[t],e[t]=r[n];return e},e.prototype.glyphsFor=function(e){var t,n,r,i,a,o,s;for(r={},a=0,o=e.length;a0)for(i in s=this.glyphsFor(t))n=s[i],r[i]=n;return r},e.prototype.encode=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;for(r in n=rr.encode(this.generateCmap(),`unicode`),a=this.glyphsFor(e),f={0:0},g=n.charMap)f[(s=g[r]).old]=s.new;for(p in d=n.maxGlyphID,a)p in f||(f[p]=d++);return l=function(e){var t,n;for(t in n={},e)n[e[t]]=t;return n}(f),u=Object.keys(l).sort(function(e,t){return e-t}),m=function(){var e,t,n;for(n=[],e=0,t=u.length;e>`),a.join(` `)}return``+n},t}();export{Z as default,Z as jsPDF};