test de déploiement du build depuis gitlab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

78 lines
343 KiB

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-BEjiv6aE.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<<e[r-1];for(var i=new u(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},h=m(d,2),g=h.b,_=h.r;g[28]=258,_[258]=28;var v=m(f,0);v.b;for(var y=v.r,b=new l(32768),x=0;x<32768;++x){var S=(x&43690)>>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<r;++i)e[i]&&++a[e[i]-1];var o=new l(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new l(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],d=t-e[i],f=o[e[i]-1]++<<d,p=f|(1<<d)-1;f<=p;++f)s[b[f]>>c]=u}else for(s=new l(r),i=0;i<r;++i)e[i]&&(s[i]=b[o[e[i]-1]++]>>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;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:R,l:0};if(i==1){var o=new c(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],u=n[1],d=0,f=1,p=2;for(n[0]={s:-1,f:s.f+u.f,l:s,r:u};f!=i-1;)s=n[n[d].f<n[p].f?d++:p++],u=n[d!=f&&n[d].f<n[p].f?d++:p++],n[f++]={s:-1,f:s.f+u.f,l:s,r:u};for(var m=a[0].s,r=1;r<i;++r)a[r].s>m&&(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<<v;for(a.sort(function(e,t){return h[t.s]-h[e.s]||e.f-t.f});r<i;++r){var b=a[r].s;if(h[b]>t)_+=y-(1<<g-h[b]),h[b]=t;else break}for(_>>=v;_>0;){var x=a[r].s;h[x]<t?_-=1<<t-h[x]++-1:++r}for(;r>=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<t.length;++r)n+=e[r]*t[r];return n},I=function(e,t,n){var r=n.length,i=O(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},L=function(e,t,n,r,i,a,o,s,c,u,m){A(t,m++,n),++i[256];for(var h=M(i,15),g=h.t,_=h.l,v=M(a,15),y=v.t,b=v.l,x=P(g),S=x.c,O=x.n,k=P(y),N=k.c,L=k.n,ee=new l(19),R=0;R<S.length;++R)++ee[S[R]&31];for(var R=0;R<N.length;++R)++ee[N[R]&31];for(var z=M(ee,7),B=z.t,te=z.l,V=19;V>4&&!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+(ne<U)),m+=2,ne<U){W=C(g,_,0),re=g,ie=C(y,b,0),ae=y;var oe=C(B,te,0);A(t,m,O-257),A(t,m+5,L-1),A(t,m+10,V-4),m+=14;for(var R=0;R<V;++R)A(t,m+3*R,B[p[R]]);m+=3*V;for(var G=[S,N],se=0;se<2;++se)for(var ce=G[se],R=0;R<ce.length;++R){var le=ce[R]&31;A(t,m,oe[le]),m+=B[le],le>15&&(A(t,m,ce[R]>>5&127),m+=ce[R]>>12)}}else W=E,re=w,ie=D,ae=T;for(var R=0;R<s;++R){var ue=r[R];if(ue>255){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<<n)-1,S=a.p||new l(32768),C=a.h||new l(x+1),w=Math.ceil(n/3),T=2*w,E=function(t){return(e[t]^e[t+1]<<w^e[t+2]<<T)&x},D=new u(25e3),A=new l(288),j=new l(32),M=0,N=0,P=a.i||0,F=0,R=a.w||0,z=0;P+2<o;++P){var B=E(P),te=P&32767,V=C[B];if(S[te]=V,C[B]=te,R<=P){var H=o-P;if((M>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;se<G&&e[P+se]==e[P+se-ie];++se);if(se>ne){if(ne=se,W=ie,se>ae)break;for(var ce=Math.min(ie,se-2),le=0,U=0;U<ce;++U){var ue=P-ie+U&32767,de=ue-S[ue]&32767;de>le&&(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)D[F++]=e[P],++A[e[P]];h=L(e,p,m,D,A,j,N,F,z,P-z,h),m||(a.r=h&7|p[h/8|0]<<3,h-=7,a.h=C,a.p=S,a.i=P,a.w=R)}else{for(var P=a.w||0;P<o+m;P+=65535){var me=P+65535;me>=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<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>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;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return W(this.readBytes(e))}decodeText(e=1,t=`utf8`){return W(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(ie(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.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<n;e++)r=ce[(r^t[e])&255]^r>>>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<n;r++)t[r]=e[r]}function me(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function he(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function ge(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(n[a]>>1)&255;for(;a<r;a++)t[a]=e[a]+(t[a-i]+n[a]>>1)&255}}function _e(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+n[a]&255;for(;a<r;a++)t[a]=e[a]+ve(t[a-i],n[a],n[a-i])&255}}function ve(e,t,n){let r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}function ye(e,t,n,r,i,a){switch(e){case 0:pe(t,n,i);break;case 1:me(t,n,i,a);break;case 2:he(t,n,r,i);break;case 3:ge(t,n,r,i,a);break;case 4:_e(t,n,r,i,a);break;default:throw Error(`Unsupported filter: ${e}`)}}var be=new Uint16Array([255]),xe=new Uint8Array(be.buffer)[0]===255;function Se(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,c=new Uint8Array(r*n*s),l=0;for(let e=0;e<7;e++){let i=o[e],a=Math.ceil((n-i.x)/i.xStep),u=Math.ceil((r-i.y)/i.yStep);if(a<=0||u<=0)continue;let d=a*s,f=new Uint8Array(d);for(let e=0;e<u;e++){let o=t[l++],u=t.subarray(l,l+d);l+=d;let p=new Uint8Array(d);ye(o,u,p,f,d,s),f.set(p);for(let t=0;t<a;t++){let a=i.x+t*i.xStep,o=i.y+e*i.yStep;if(!(a>=n||o>=r))for(let e=0;e<s;e++)c[(o*n+a)*s+e]=p[t*s+e]}}}if(a===16){let e=new Uint16Array(c.buffer);if(xe)for(let t=0;t<e.length;t++)e[t]=Ce(e[t]);return e}else return c}function Ce(e){return(e&255)<<8|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<r;e++){switch(d=t.subarray(u+1,u+1+s),f=c.subarray(e*s,(e+1)*s),t[u]){case 0:pe(d,f,s);break;case 1:me(d,f,s,o);break;case 2:he(d,f,l,s);break;case 3:ge(d,f,l,s,o);break;case 4:_e(d,f,l,s,o);break;default:throw Error(`Unsupported filter: ${t[u]}`)}l=f,u+=s+1}if(a===16){let e=new Uint16Array(c.buffer);if(Te)for(let t=0;t<e.length;t++)e[t]=Oe(e[t]);return e}else return c}function Oe(e){return(e&255)<<8|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.length<ke.length)return!1;for(let t=0;t<ke.length;t++)if(e[t]!==ke[t])return!1;return!0}var Me=`tEXt`,Ne=0,K=new TextDecoder(`latin1`);function Pe(e){if(Ie(e),e.length===0||e.length>79)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;e<t;e++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(n+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case ze.GREYSCALE:case ze.TRUECOLOUR:if(e%2!=0)throw RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._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;t<e/2;t++)this._transparency[t]=this.readUint16();break;case ze.INDEXED_COLOUR:{if(e>this._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<e;t++){let e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case ze.UNKNOWN:case ze.GREYSCALE_ALPHA:case ze.TRUECOLOUR_ALPHA:default:throw Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){let t=Re(this),r=this.readUint8();if(r!==Be.DEFLATE)throw Error(`Unsupported iCCP compression method: ${r}`);let i=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:n(i)}}decodepHYs(){let e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){let t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=De({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{let r=this._apng.frames.at(e-1);this.disposeFrame(n,r,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case Ue.NONE:break;case Ue.BACKGROUND:for(let t=0;t<this._png.height;t++)for(let r=0;r<this._png.width;r++){let i=(t*e.width+r)*this._png.channels;for(let e=0;e<this._png.channels;e++)n.data[i+e]=0}break;case Ue.PREVIOUS:n.data.set(t.data);break;default:throw Error(`Unknown disposeOp`)}}addFrameDataToCanvas(e,t){let n=1<<this._png.depth,r=(e,n)=>({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<t.height;n++)for(let i=0;i<t.width;i++){let{index:a,frameIndex:o}=r(n,i);for(let n=0;n<this._png.channels;n++)e.data[a+n]=t.data[o+n]}break;case We.OVER:for(let i=0;i<t.height;i++)for(let a=0;a<t.width;a++){let{index:o,frameIndex:s}=r(i,a);for(let r=0;r<this._png.channels;r++){let i=t.data[s+this._png.channels-1]/n,a=r%(this._png.channels-1)==0?1:t.data[s+r],c=Math.floor(i*a+(1-i)*e.data[o+r]);e.data[o+r]+=c}}break;default:throw Error(`Unknown blendOp`)}}decodeImage(){if(this._inflator.err)throw Error(`Error while decompressing the data: ${this._inflator.err}`);let e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==Ve.ADAPTIVE)throw Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===He.NO_INTERLACE)this._png.data=De({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===He.ADAM7)this._png.data=Se({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){let e=this._inflator.result,n=this._frames.at(-1);n?n.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Ue.NONE,blendOp:We.SOURCE,data:e}),this._inflator=new t,this._writingDataChunks=!1}};function Ke(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw Error(`invalid bit depth: ${e}`);return e}var qe;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.METRE=1]=`METRE`})(qe||={});function Je(e,t){return new Ge(e,t).decode()}var J=function(){return typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this}();function Ye(){J.console&&typeof J.console.log==`function`&&J.console.log.apply(J.console,arguments)}var Y={log:Ye,warn:function(e){J.console&&(typeof J.console.warn==`function`?J.console.warn.apply(J.console,arguments):Ye.call(null,arguments))},error:function(e){J.console&&(typeof J.console.error==`function`?J.console.error.apply(J.console,arguments):Ye(e))}};function Xe(e,t,n){var r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){$e(r.response,t,n)},r.onerror=function(){Y.error(`could not download file`)},r.send()}function Ze(e){var t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=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;r<n.length;r++){var i=n[r].re,a=n[r].process,o=i.exec(e);o&&(t=a(o),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?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<<i|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<e.length;t++)i[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<e.length;t++)e[t]=ft(e[t]);return e.join(``)}(lt(`hello`))!=`5d41402abc4b2a76b9719d911017c592`;function gt(e,t){if(ht){var n=(65535&e)+(65535&t);return(e>>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<d;c++)p=(p+(u=s[f=(f+1)%256]))%256,s[f]=s[p],s[p]=u,o=s[(s[f]+s[p])%256],m+=String.fromCharCode(t.charCodeAt(c)^o);return m}var vt={print:4,modify:8,copy:16,"annot-forms":32};function yt(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach(function(e){if(vt.perm!==void 0)throw Error(`Invalid permission: `+e);i+=vt[e]}),this.padding=`(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\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;r<n;r++){var i=e.charCodeAt(r);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?`#`+(`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)<t*(n/=c)&&(e=-e,t=-t,s=-s,o=-o),{scale:new q(o,0,0,c,0,0),translate:new q(1,0,0,1,i,a),rotate:new q(e,t,-t,e,0,0),skew:new q(1,0,s,1,0,0)}},q.prototype.toString=function(e){return this.join(` `)},q.prototype.inversed=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=1/(e*r-t*n),s=r*o,c=-t*o,l=-n*o,u=e*o;return new q(s,c,l,u,-s*i-l*a,-c*i-u*a)},q.prototype.applyToPoint=function(e){return new _n(e.x*this.sx+e.y*this.shx+this.tx,e.x*this.shy+e.y*this.sy+this.ty)},q.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e),n=this.applyToPoint(new _n(e.x+e.w,e.y+e.h));return new vn(t.x,t.y,n.x-t.x,n.y-t.y)},q.prototype.clone=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty;return new q(e,t,n,r,i,a)},m.Matrix=q;var ze=m.matrixMult=function(e,t){return t.multiply(e)},Be=new q(1,0,0,1,0,0);m.unitMatrix=m.identityMatrix=Be;var Ve=function(e,t){if(!ke[e]){var n=(t instanceof X?`Sh`:`P`)+(Object.keys(Oe).length+1).toString(10);t.id=n,ke[e]=n,Oe[n]=t,Pe.publish(`addPattern`,t)}};m.ShadingPattern=X,m.TilingPattern=wt,m.addShadingPattern=function(e,t){return E(`addShadingPattern()`),Ve(e,t),this},m.beginTilingPattern=function(e){E(`beginTilingPattern()`),bn(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},m.endTilingPattern=function(e,t){E(`endTilingPattern()`),t.stream=re[z].join(`
`),Ve(e,t),Pe.publish(`endTilingPattern`,t),Re.pop().restore()};var He,Ue=m.__private__.newObject=function(){var e=We();return Ge(e,!0),e},We=m.__private__.newObjectDeferred=function(){return V++,H[V]=function(){return ne},V},Ge=function(e,t){return t=typeof t==`boolean`&&t,H[e]=ne,t&&G(e+` 0 obj`),e},Ke=m.__private__.newAdditionalObject=function(){var e={objId:We(),content:``};return W.push(e),e},qe=We(),Je=We(),Ye=m.__private__.decodeColorString=function(e){var t=e.split(` `);if(t.length!==2||t[1]!==`g`&&t[1]!==`G`)t.length!==5||t[4]!==`k`&&t[4]!==`K`||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),`r`]);else{var n=parseFloat(t[0]);t=[n,n,n,`r`]}for(var r=`#`,i=0;i<3;i++)r+=(`0`+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return r},Xe=m.__private__.encodeColorString=function(e){var t;typeof e==`string`&&(e={ch1:e});var n=e.ch1,r=e.ch2,i=e.ch3,a=e.ch4,s=e.pdfColorType===`draw`?[`G`,`RG`,`K`]:[`g`,`rg`,`k`];if(typeof n==`string`&&n.charAt(0)!==`#`){var c=new et(n);if(c.ok)n=c.toHex();else if(!/^\d*\.?\d*$/.test(n))throw Error(`Invalid color "`+n+`" passed to jsPDF.encodeColorString.`)}if(typeof n==`string`&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n=`#`+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),typeof n==`string`&&/^#[0-9A-Fa-f]{6}$/.test(n)){var l=parseInt(n.substr(1),16);n=l>>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<l.length;f+=1)if(l[f].key===`DecodeParms`){for(var p=[],m=0;m<c.reverseChain.split(`/`).length-1;m+=1)p.push(`null`);p.push(l[f].value),l[f].value=`[`+p.join(` `)+`]`}}G(`<<`);for(var h=0;h<l.length;h++)G(`/`+l[h].key+` `+l[h].value);G(`>>`),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(`<</Type /Page`),G(`/Parent `+e.rootDictionaryObjId+` 0 R`),G(`/Resources `+e.resourceDictionaryObjId+` 0 R`),G(`/MediaBox [`+parseFloat(T(e.mediaBox.bottomLeftX))+` `+parseFloat(T(e.mediaBox.bottomLeftY))+` `+T(e.mediaBox.topRightX)+` `+T(e.mediaBox.topRightY)+`]`),e.cropBox!==null&&G(`/CropBox [`+T(e.cropBox.bottomLeftX)+` `+T(e.cropBox.bottomLeftY)+` `+T(e.cropBox.topRightX)+` `+T(e.cropBox.topRightY)+`]`),e.bleedBox!==null&&G(`/BleedBox [`+T(e.bleedBox.bottomLeftX)+` `+T(e.bleedBox.bottomLeftY)+` `+T(e.bleedBox.topRightX)+` `+T(e.bleedBox.topRightY)+`]`),e.trimBox!==null&&G(`/TrimBox [`+T(e.trimBox.bottomLeftX)+` `+T(e.trimBox.bottomLeftY)+` `+T(e.trimBox.topRightX)+` `+T(e.trimBox.topRightY)+`]`),e.artBox!==null&&G(`/ArtBox [`+T(e.artBox.bottomLeftX)+` `+T(e.artBox.bottomLeftY)+` `+T(e.artBox.topRightX)+` `+T(e.artBox.topRightY)+`]`),typeof e.userUnit==`number`&&e.userUnit!==1&&G(`/UserUnit `+e.userUnit),Pe.publish(`putPage`,{objId:r,pageContext:K[t],pageNumber:t,page:n}),G(`/Contents `+i+` 0 R`),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(`<</Type /Pages`);var r=`/Kids [`;for(t=0;t<Ne;t++)r+=n[t]+` 0 R `;G(r+`]`),G(`/Count `+Ne),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;l<r.length;l++){for(n=r[l];n>e[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&&G(`/`+t+` `+Oe[t].objectNumber+` 0 R`);Pe.publish(`putTilingPatternDict`),G(`>>`)}}(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<r;n++)(l=o[e.charCodeAt(n)])?s.push(String.fromCharCode(l)):s.push(e[n]),s[n].charCodeAt(0)>>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<r;n++){if((u=(l=e.charCodeAt(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<W.length;e++){var t=W[e];Ge(t.objId,!0),G(t.content),G(`endobj`)}Pe.publish(`postPutAdditionalObjects`)}(),e=[],function(){for(var e in Te)Te.hasOwnProperty(e)&&(!1===f||!0===f&&p.hasOwnProperty(e))&&it(Te[e])}(),function(){for(var e in Ae)Ae.hasOwnProperty(e)&&ct(Ae[e])}(),function(){for(var e in Ie)Ie.hasOwnProperty(e)&&at(Ie[e])}(),function(e){for(var t in Oe)Oe.hasOwnProperty(t)&&(Oe[t]instanceof X?ot(Oe[t]):Oe[t]instanceof wt&&st(Oe[t],e))}(e),Pe.publish(`putResources`),e.forEach(lt),lt({resourcesOid:Je,objectOid:2**53-1}),Pe.publish(`postPutResources`),d!==null&&(Pt.oid=Ue(),G(`<<`),G(`/Filter /Standard`),G(`/V `+Pt.v),G(`/R `+Pt.r),G(`/U <`+Pt.toHexString(Pt.U)+`>`),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(e<t){n=re[e],r=K[e];for(var a=e;a<t;a++)re[a]=re[a+1],K[a]=K[a+1];re[t]=n,K[t]=r,this.setPage(t)}return this},m.deletePage=function(){return ht.apply(this,arguments),this},m.__private__.text=m.text=function(e,t,n,r,i){var a,s,c,l,u,d,f,m,h,g=(r||={}).scope||this;if(typeof e==`number`&&typeof t==`number`&&(typeof n==`string`||Array.isArray(n))){var _=n;n=t,t=e,e=_}if(arguments[3]instanceof q==0?(c=arguments[4],l=arguments[5],o(f=arguments[3])===`object`&&f!==null||(typeof c==`string`&&(l=c,c=null),typeof f==`string`&&(l=f,f=null),typeof f==`number`&&(c=f,f=null),r={flags:f,angle:c,align:l})):(E(`The transform parameter of text() with a Matrix value`),h=i),isNaN(t)||isNaN(n)||e==null)throw Error(`Invalid arguments passed to jsPDF.text`);if(e.length===0)return g;var v,y=``,S=typeof r.lineHeightFactor==`number`?r.lineHeightFactor:Zt,C=g.internal.scaleFactor;function w(e){return e=e.split(` `).join(Array(r.TabLen||9).join(` `)),ft(e,f)}function D(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)typeof(t=n.shift())==`string`?r.push(t):Array.isArray(e)&&(t.length===1||t[1]===void 0&&t[2]===void 0)?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function O(e,t){var n;if(typeof e==`string`)n=t(e)[0];else if(Array.isArray(e)){for(var r,i,a=e.concat(),o=[],s=a.length;s--;)typeof(r=a.shift())==`string`?o.push(t(r)[0]):Array.isArray(r)&&typeof r[0]==`string`&&(i=t(r[0],r[1],r[2]),o.push([i[0],i[1],i[2]]));n=o}return n}var k=!1,j=!0;if(typeof e==`string`)k=!0;else if(Array.isArray(e)){var M=e.concat();s=[];for(var N,P=M.length;P--;)(typeof(N=M.shift())!=`string`||Array.isArray(N)&&typeof N[0]!=`string`)&&(j=!1);k=j}if(!1===k)throw Error(`Type of text must be string or Array. "`+e+`" is not recognized.`);typeof e==`string`&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var F=ue/g.internal.scaleFactor,I=F*(S-1);switch(r.baseline){case`bottom`:n-=I;break;case`top`:n+=F-I;break;case`hanging`:n+=F-2*I;break;case`middle`:n+=F/2-I}if((d=r.maxWidth||0)>0&&(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;se<P;se++)se===0?(ae=an(t),ie=on(n)):(ae=A(oe-V[se]),ie=-H),e.push([s[se],ae,ie]),oe=V[se]}else if(l===`center`){t-=V[0]/2,e=[],P=s.length;for(var ce=0;ce<P;ce++)ce===0?(ae=an(t),ie=on(n)):(ae=A((oe-V[ce])/2),ie=-H),e.push([s[ce],ae,ie]),oe=V[ce]}else if(l===`left`){e=[],P=s.length;for(var le=0;le<P;le++)e.push(s[le])}else if(l===`justify`&&ne.encoding===`Identity-H`){e=[],P=s.length,d=d===0?U:d;for(var de=0,fe=0;fe<P;fe++)if(ie=fe===0?on(n):-H,ae=fe===0?an(t):de,fe<P-1){var me=A((d-V[fe])/(s[fe].split(` `).length-1)),he=s[fe].split(` `);e.push([he[0]+` `,ae,ie]),de=0;for(var ge=1;ge<he.length;ge++){var _e=(re(he[ge-1]+` `+he[ge])-re(he[ge]))*C+me;ge==he.length-1?e.push([he[ge],_e,0]):e.push([he[ge]+` `,_e,0]),de-=_e}}else e.push([s[fe],ae,ie]);e.push([``,de,0])}else{if(l!==`justify`)throw Error(`Unrecognized alignment option, use "left", "center", "right" or "justify".`);for(e=[],P=s.length,d=d===0?U:d,fe=0;fe<P;fe++){ie=fe===0?on(n):-H,ae=fe===0?an(t):0;var ve=s[fe].split(` `).length-1,ye=ve>0?(d-V[fe])/ve:0;fe<P-1?W.push(T(A(ye))):W.push(0),e.push([s[fe],ae,ie])}}}!0===(typeof r.R2L==`boolean`?r.R2L:pe)&&(e=O(e,function(e,t,n){return[e.split(``).reverse().join(``),t,n]})),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ft,activeFontKey:be,fonts:Te,activeFontSize:ue}},Pe.publish(`postProcessText`,a),e=a.text,v=a.mutex.isHex||!1;var xe=Te[be].encoding;xe!==`WinAnsiEncoding`&&xe!==`StandardEncoding`||(e=O(e,function(e,t,n){return[w(e),t,n]})),s=D(e),e=[];for(var Se,Ce,we,Ee=+!!Array.isArray(s[0]),De=``,Oe=function(e,t,n){var i=``;return n instanceof q?(n=typeof r.angle==`number`?ze(n,new q(1,0,0,1,e,t)):ze(new q(1,0,0,1,e,t),n),x===b&&(n=ze(new q(1,0,0,-1,0,0),n)),i=n.join(` `)+` Tm
`):i=T(e)+` `+T(t)+` Td
`,i},ke=0;ke<s.length;ke++){switch(De=``,Ee){case 1:we=(v?`<`:`(`)+s[ke][0]+(v?`>`:`)`),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<l;c++)(u=e[c]).length===2?(h=u[0]*o+h,g=u[1]*s+g,Jt(h,g)):(d=u[0]*o+h,f=u[1]*s+g,p=u[2]*o+h,m=u[3]*s+g,h=u[4]*o+h,g=u[5]*s+g,Yt(d,f,p,m,h,g));return a&&Vt(),Ut(i),this},m.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case`m`:qt(r[0],r[1]);break;case`l`:Jt(r[0],r[1]);break;case`c`:Yt.apply(this,r);break;case`h`:Vt()}}return this},m.__private__.rect=m.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!zt(i))throw Error(`Invalid arguments passed to jsPDF.rect`);return x===y&&(r=-r),G([T(A(e)),T(j(t)),T(A(n)),T(A(r)),`re`].join(` `)),Ut(i),this},m.__private__.triangle=m.triangle=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!zt(o))throw Error(`Invalid arguments passed to jsPDF.triangle`);return this.lines([[n-e,r-t],[i-n,a-r],[e-i,t-a]],e,t,[1,1],o,!0),this},m.__private__.roundedRect=m.roundedRect=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!zt(o))throw Error(`Invalid arguments passed to jsPDF.roundedRect`);var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),a=Math.min(a,.5*r),this.lines([[n-2*i,0],[i*s,0,i,a-a*s,i,a],[0,r-2*a],[0,a*s,-i*s,a,-i,a],[2*i-n,0],[-i*s,0,-i,-a*s,-i,-a],[0,2*a-r],[0,-a*s,i*s,-a,i,-a]],e+i,t,[1,1],o,!0),this},m.__private__.ellipse=m.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!zt(i))throw Error(`Invalid arguments passed to jsPDF.ellipse`);var a=4/3*(Math.SQRT2-1)*n,o=4/3*(Math.SQRT2-1)*r;return qt(e+n,t),Yt(e+n,t-o,e+a,t-r,e,t-r),Yt(e-a,t-r,e-n,t-o,e-n,t),Yt(e-n,t+o,e-a,t+r,e,t+r),Yt(e+a,t+r,e+n,t+o,e+n,t),Ut(i),this},m.__private__.circle=m.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!zt(r))throw Error(`Invalid arguments passed to jsPDF.circle`);return this.ellipse(e,t,n,n,r)},m.setFont=function(e,t,n){return n&&(t=w(t,n)),be=vt(e,t,{disableWarning:!1}),this};var Xt=m.__private__.getFont=m.getFont=function(){return Te[vt.apply(m,arguments)]};m.__private__.getFontList=m.getFontList=function(){var e,t,n={};for(e in Ee)if(Ee.hasOwnProperty(e))for(t in n[e]=[],Ee[e])Ee[e].hasOwnProperty(t)&&n[e].push(t);return n},m.addFont=function(e,t,n,r,i){var a=[`StandardEncoding`,`MacRomanEncoding`,`Identity-H`,`WinAnsiEncoding`];return arguments[3]&&a.indexOf(arguments[3])!==-1?i=arguments[3]:arguments[3]&&a.indexOf(arguments[3])==-1&&(n=w(n,r)),dt.call(this,e,t,n,i||=`Identity-H`)};var Zt,Qt=e.lineWidth||.200025,$t=m.__private__.getLineWidth=m.getLineWidth=function(){return Qt},en=m.__private__.setLineWidth=m.setLineWidth=function(e){return Qt=e,G(T(A(e))+` w`),this};m.__private__.setLineDash=Z.API.setLineDash=Z.API.setLineDashPattern=function(e,t){if(e||=[],t||=0,isNaN(t)||!Array.isArray(e))throw Error(`Invalid arguments passed to jsPDF.setLineDash`);return e=e.map(function(e){return T(A(e))}).join(` `),t=T(A(t)),G(`[`+e+`] `+t+` d`),this};var tn=m.__private__.getLineHeight=m.getLineHeight=function(){return ue*Zt};m.__private__.getLineHeight=m.getLineHeight=function(){return ue*Zt};var nn=m.__private__.setLineHeightFactor=m.setLineHeightFactor=function(e){return typeof(e||=1.15)==`number`&&(Zt=e),this},rn=m.__private__.getLineHeightFactor=m.getLineHeightFactor=function(){return Zt};nn(e.lineHeight);var an=m.__private__.getHorizontalCoordinate=function(e){return A(e)},on=m.__private__.getVerticalCoordinate=function(e){return x===b?e:K[z].mediaBox.topRightY-K[z].mediaBox.bottomLeftY-A(e)},sn=m.__private__.getHorizontalCoordinateString=m.getHorizontalCoordinateString=function(e){return T(an(e))},cn=m.__private__.getVerticalCoordinateString=m.getVerticalCoordinateString=function(e){return T(on(e))},ln=e.strokeColor||`0 G`;m.__private__.getStrokeColor=m.getDrawColor=function(){return Ye(ln)},m.__private__.setStrokeColor=m.setDrawColor=function(e,t,n,r){return ln=Xe({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:`draw`,precision:2}),G(ln),this};var un=e.fillColor||`0 g`;m.__private__.getFillColor=m.getFillColor=function(){return Ye(un)},m.__private__.setFillColor=m.setFillColor=function(e,t,n,r){return un=Xe({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:`fill`,precision:2}),G(un),this};var $=e.textColor||`0 g`,dn=m.__private__.getTextColor=m.getTextColor=function(){return Ye($)};m.__private__.setTextColor=m.setTextColor=function(e,t,n,r){return $=Xe({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:`text`,precision:3}),this};var fn=e.charSpace,pn=m.__private__.getCharSpace=m.getCharSpace=function(){return parseFloat(fn||0)};m.__private__.setCharSpace=m.setCharSpace=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.setCharSpace`);return fn=e,this};var mn=0;m.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},m.__private__.setLineCap=m.setLineCap=function(e){var t=m.CapJoinStyles[e];if(t===void 0)throw Error(`Line cap style of '`+e+`' is not recognized. See or extend .CapJoinStyles property for valid styles`);return mn=t,G(t+` J`),this};var hn=0;m.__private__.setLineJoin=m.setLineJoin=function(e){var t=m.CapJoinStyles[e];if(t===void 0)throw Error(`Line join style of '`+e+`' is not recognized. See or extend .CapJoinStyles property for valid styles`);return hn=t,G(t+` j`),this},m.__private__.setLineMiterLimit=m.__private__.setMiterLimit=m.setLineMiterLimit=m.setMiterLimit=function(e){if(e||=0,isNaN(e))throw Error(`Invalid argument passed to jsPDF.setLineMiterLimit`);return G(T(A(e))+` M`),this},m.GState=St,m.setGState=function(e){(e=typeof e==`string`?Ae[je[e]]:gn(null,e)).equals(Me)||(G(`/`+e.id+` gs`),Me=e)};var gn=function(e,t){if(!e||!je[e]){var n=!1;for(var r in Ae)if(Ae.hasOwnProperty(r)&&Ae[r].equals(t)){n=!0;break}if(n)t=Ae[r];else{var i=`GS`+(Object.keys(Ae).length+1).toString(10);Ae[i]=t,t.id=i}return e&&(je[e]=t.id),Pe.publish(`addGState`,t),t}};m.addGState=function(e,t){return gn(e,t),this},m.saveGraphicsState=function(){return G(`q`),De.push({key:be,size:ue,color:$}),this},m.restoreGraphicsState=function(){G(`Q`);var e=De.pop();return be=e.key,ue=e.size,$=e.color,Me=null,this},m.setCurrentTransformationMatrix=function(e){return G(e.toString()+` cm`),this},m.comment=function(e){return G(`#`+e),this};var _n=function(e,t){var n=e||0;Object.defineProperty(this,`x`,{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}});var r=t||0;Object.defineProperty(this,`y`,{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}});var i=`pt`;return Object.defineProperty(this,`type`,{enumerable:!0,get:function(){return i},set:function(e){i=e.toString()}}),this},vn=function(e,t,n,r){_n.call(this,e,t),this.type=`rect`;var i=n||0;Object.defineProperty(this,`w`,{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}});var a=r||0;return Object.defineProperty(this,`h`,{enumerable:!0,get:function(){return a},set:function(e){isNaN(e)||(a=parseFloat(e))}}),this},yn=function(){this.page=Ne,this.currentPage=z,this.pages=re.slice(0),this.pagesContext=K.slice(0),this.x=Se,this.y=Ce,this.matrix=we,this.width=Sn(z),this.height=wn(z),this.outputDestination=ae,this.id=``,this.objectNumber=-1};yn.prototype.restore=function(){Ne=this.page,z=this.currentPage,K=this.pagesContext,re=this.pages,Se=this.x,Ce=this.y,we=this.matrix,Cn(z,this.width),Tn(z,this.height),ae=this.outputDestination};var bn=function(e,t,n,r,i){Re.push(new yn),Ne=z=0,re=[],Se=e,Ce=t,we=i,pt([n,r])};for(var xn in m.beginFormObject=function(e,t,n,r,i){return bn(e,t,n,r,i),this},m.endFormObject=function(e){return function(e){if(Le[e])Re.pop().restore();else{var t=new yn,n=`Xo`+(Object.keys(Ie).length+1).toString(10);t.id=n,Le[e]=n,Ie[n]=t,Pe.publish(`addFormObject`,t),Re.pop().restore()}}(e),this},m.doFormObject=function(e,t){var n=Ie[Le[e]];return G(`q`),G(t.toString()+` cm`),G(`/`+n.id+` Do`),G(`Q`),this},m.getFormObject=function(e){var t=Ie[Le[e]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},m.save=function(e,t){return e||=`generated.pdf`,(t||={}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?($e(Q(kt()),e),typeof $e.unload==`function`&&J.setTimeout&&setTimeout($e.unload,911),this):new Promise(function(t,n){try{var r=$e(Q(kt()),e);typeof $e.unload==`function`&&J.setTimeout&&setTimeout($e.unload,911),t(r)}catch(e){n(e.message)}})},Z.API)Z.API.hasOwnProperty(xn)&&(xn===`events`&&Z.API.events.length?function(e,t){var n,r,i;for(i=t.length-1;i!==-1;i--)n=t[i][0],r=t[i][1],e.subscribe.apply(e,[n].concat(typeof r==`function`?[r]:r))}(Pe,Z.API.events):m[xn]=Z.API[xn]);function Sn(e){return K[e].mediaBox.topRightX-K[e].mediaBox.bottomLeftX}function Cn(e,t){K[e].mediaBox.topRightX=t+K[e].mediaBox.bottomLeftX}function wn(e){return K[e].mediaBox.topRightY-K[e].mediaBox.bottomLeftY}function Tn(e,t){K[e].mediaBox.topRightY=t+K[e].mediaBox.bottomLeftY}var En=m.getPageWidth=function(e){return Sn(e||=z)/xe},Dn=m.setPageWidth=function(e,t){Cn(e,t*xe)},On=m.getPageHeight=function(e){return wn(e||=z)/xe},kn=m.setPageHeight=function(e,t){Tn(e,t*xe)};return m.internal={pdfEscape:ft,getStyle:Bt,getFont:Xt,getFontSize:fe,getCharSpace:pn,getTextColor:dn,getLineHeight:tn,getLineHeightFactor:rn,getLineWidth:$t,write:se,getHorizontalCoordinate:an,getVerticalCoordinate:on,getCoordinateString:sn,getVerticalCoordinateString:cn,collections:{},newObject:Ue,newAdditionalObject:Ke,newObjectDeferred:We,newObjectDeferredBegin:Ge,getFilters:Ze,putStream:Qe,events:Pe,scaleFactor:xe,pageSize:{getWidth:function(){return En(z)},setWidth:function(e){Dn(z,e)},getHeight:function(){return On(z)},setHeight:function(e){kn(z,e)}},encryptionOptions:d,encryption:Pt,getEncryptor:function(e){return d===null?function(e){return e}:Pt.encryptor(e,0)},output:Mt,getNumberOfPages:_t,get pages(){return re},out:G,f2:O,f3:k,getPageInfo:Ft,getPageInfoByObjId:It,getCurrentPageInfo:Lt,getPDFVersion:g,Point:_n,Rectangle:vn,Matrix:q,hasHotfix:Nt},Object.defineProperty(m.internal.pageSize,`width`,{get:function(){return En(z)},set:function(e){Dn(z,e)},enumerable:!0,configurable:!0}),Object.defineProperty(m.internal.pageSize,`height`,{get:function(){return On(z)},set:function(e){kn(z,e)},enumerable:!0,configurable:!0}),function(e){for(var t=0,n=le.length;t<n;t++){var r=dt.call(this,e[t][0],e[t][1],e[t][2],le[t][3],!0);!1===f&&(p[r]=!0);var i=e[t][0].split(`-`);ut({id:r,fontName:i[0],fontStyle:i[1]||``})}Pe.publish(`addFonts`,{fonts:Te,dictionary:Ee})}.call(m,le),be=`F1`,mt(i,n),Pe.publish(`initialized`),m}yt.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>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<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join(``)},yt.prototype.processOwnerPassword=function(e,t){return _t(mt(t).substr(0,5),e)},yt.prototype.encryptor=function(e,t){var n=mt(this.encryptionKey+String.fromCharCode(255&e,e>>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<<t},Ft=Tt.__acroform__.clearBit=function(e,t){if(e||=0,t||=0,isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.clearBit`);return e&~(1<<t)},It=Tt.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.getBit`);return e&1<<t?1:0},Lt=Tt.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf`);return It(e,t-1)},Rt=Tt.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf`);return Pt(e,t-1)},zt=Tt.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf`);return Ft(e,t-1)},Bt=Tt.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=e[0],a=e[1],o=e[2],s=e[3],c={};return c.lowerLeft_X=n(i)||0,c.lowerLeft_Y=r(a+s)||0,c.upperRight_X=n(i+o)||0,c.upperRight_Y=r(a)||0,[Number(Q(c.lowerLeft_X)),Number(Q(c.lowerLeft_Y)),Number(Q(c.upperRight_X)),Number(Q(c.upperRight_Y))]},Vt=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=Ht(e,e._V||e.DV),r=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push(`/Tx BMC`),t.push(`q`),t.push(`BT`),t.push(e.scope.__private__.encodeColorString(e.color)),t.push(`/`+r+` `+Q(n.fontSize)+` Tf`),t.push(`1 0 0 1 0 0 Tm`),t.push(n.text),t.push(`ET`),t.push(`Q`),t.push(`EMC`);var i=Nt(e);return i.scope=e.scope,i.stream=t.join(`
`),i}},Ht=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,r={text:``,fontSize:``},i=(t=(t=t.substr(0,1)==`(`?t.substr(1):t).substr(t.length-1)==`)`?t.substr(0,t.length-1):t).split(` `);i=e.multiline?i.map(function(e){return e.split(`
`)}):i.map(function(e){return[e]});var a=n,o=$.internal.getHeight(e)||0;o=o<0?-o:o;var s=$.internal.getWidth(e)||0;s=s<0?-s:s;var c=function(t,n,r){return t+1<i.length?Ut(n+` `+i[t+1][0],e,r).width<=s-4:!1};a++;t:for(;a>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;y<i.length;y++)if(i.hasOwnProperty(y)){var b=!1;if(i[y].length!==1&&g!==i[y].length-1){if((d+2)*(v+2)+2>o)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:`<</N `+c+`>>`}),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;a<e.length;a++)switch(a!==0&&(i+=` `),o(e[a])){case`boolean`:case`number`:case`object`:i+=e[a].toString();break;case`string`:e[a].substr(0,1)===`/`?i+=`/`+kt(e[a].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+=`(`+Dt(r(e[a].toString()))+`)`)}return i+`]`}throw Error(`Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray`)},Jt=function(e,t,n){var r=function(e){return e};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e||=``).toString(),`(`+Dt(r(e))+`)`},Yt=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,`objId`,{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,`scope`,{value:this._scope,writable:!0})};Yt.prototype.toString=function(){return this.objId+` 0 R`},Yt.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out(`endobj`)},Yt.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return e!=`content`&&e!=`appearanceStreamContent`&&e!=`scope`&&e!=`objId`&&e.substring(0,1)!=`_`});for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:qt(i,this.objId,this.scope)}):i instanceof Yt?(i.scope=this.scope,e.push({key:r,value:i.objId+` 0 R`})):typeof i!=`function`&&e.push({key:r,value:i}))}return e};var Xt=function(){Yt.call(this),Object.defineProperty(this,`Type`,{value:`/XObject`,configurable:!1,writable:!0}),Object.defineProperty(this,`Subtype`,{value:`/Form`,configurable:!1,writable:!0}),Object.defineProperty(this,`FormType`,{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,`BBox`,{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,`Resources`,{value:`2 0 R`,configurable:!1,writable:!0}),Object.defineProperty(this,`stream`,{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};jt(Xt,Yt);var Zt=function(){Yt.call(this);var e,t=[];Object.defineProperty(this,`Kids`,{enumerable:!1,configurable:!0,get:function(){return t.length>0?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<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e[a]){s=!1;break}if(!0===s){l=c;break}}else for(c in r)for(o=r[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){l=c;break}}return l===n&&t!==n&&(l=t),l},a=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();i.indexOf(`FlateEncode`)!==-1;)i.splice(i.indexOf(`FlateEncode`),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:`Type`,value:`/XObject`}),a.push({key:`Subtype`,value:`/Image`}),a.push({key:`Width`,value:t.width}),a.push({key:`Height`,value:t.height}),t.colorSpace===v.INDEXED?a.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(t.palette.length/3-1)+` `+(`sMask`in t&&t.sMask!==void 0?t.objectId+2:t.objectId+1)+` 0 R]`}):(a.push({key:`ColorSpace`,value:`/`+t.colorSpace}),t.colorSpace===v.DEVICE_CMYK&&a.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),a.push({key:`BitsPerComponent`,value:t.bitsPerComponent}),`decodeParameters`in t&&t.decodeParameters!==void 0&&a.push({key:`DecodeParms`,value:`<<`+t.decodeParameters+`>>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,c=t.transparency.length;s<c;s++)o+=t.transparency[s]+` `+t.transparency[s]+` `;a.push({key:`Mask`,value:`[`+o+`]`})}t.sMask!==void 0&&a.push({key:`SMask`,value:t.objectId+1+` 0 R`});var l=t.filter===void 0?void 0:[`/`+t.filter];if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:l,objectId:t.objectId}),n(`endobj`),`sMask`in t&&t.sMask!==void 0){var u=t.sMaskBitsPerComponent??t.bitsPerComponent,d={width:t.width,height:t.height,colorSpace:`DeviceGray`,bitsPerComponent:u,data:t.sMask};`filter`in t&&(d.decodeParameters=`/Predictor ${t.predictor} /Colors 1 /BitsPerComponent ${u} /Columns ${t.width}`,d.filter=t.filter),e.call(this,d)}if(t.colorSpace===v.INDEXED){var f=this.internal.newObject();r({data:T(new Uint8Array(t.palette)),objectId:f}),n(`endobj`)}},s=function(){var e=this.internal.collections[t+`images`];for(var n in e)a.call(this,e[n])},c=function(){var e,n=this.internal.collections[t+`images`],r=this.internal.write;for(var i in n)r(`/I`+(e=n[i]).index,e.objectId,`0`,`R`)},l=function(){this.internal.collections[t+`images`]||(this.internal.collections[t+`images`]={},this.internal.events.subscribe(`putResources`,s),this.internal.events.subscribe(`putXobjectDict`,c))},u=function(){var e=this.internal.collections[t+`images`];return l.call(this),e},d=function(){return Object.keys(this.internal.collections[t+`images`]).length},f=function(t){return typeof e[`process`+t.toUpperCase()]==`function`},p=function(e){return o(e)===`object`&&e.nodeType===1},m=function(t,n){if(t.nodeName===`IMG`&&t.hasAttribute(`src`)){var r=``+t.getAttribute(`src`);if(r.indexOf(`data:image/`)===0)return tt(unescape(r).split(`base64,`).pop());var i=e.loadFile(r,!0);if(i!==void 0)return i}if(t.nodeName===`CANVAS`){if(t.width===0||t.height===0)throw Error(`Given canvas must have data. Canvas width: `+t.width+`, height: `+t.height);var a;switch(n){case`PNG`:a=`image/png`;break;case`WEBP`:a=`image/webp`;break;default:a=`image/jpeg`}return tt(t.toDataURL(a,1).split(`base64,`).pop())}},h=function(e){var n=this.internal.collections[t+`images`];if(n){for(var r in n)if(e===n[r].alias)return n[r]}},g=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),e===0&&(e=t*n.width/n.height),t===0&&(t=e*n.height/n.width),[e,t]},_=function(e,t,n,r,i,a){var o=g.call(this,n,r,i),s=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,l=u.call(this);if(n=o[0],r=o[1],l[i.index]=i,a){a*=Math.PI/180;var d=Math.cos(a),f=Math.sin(a),p=function(e){return e.toFixed(4)},m=[p(d),p(f),p(-1*f),p(d),0,0,`cm`]}this.internal.write(`q`),a?(this.internal.write([1,`0`,`0`,1,s(e),c(t+r),`cm`].join(` `)),this.internal.write(m.join(` `)),this.internal.write([s(n),`0`,`0`,s(r),`0`,`0`,`cm`].join(` `))):this.internal.write([s(n),`0`,`0`,s(r),s(e),c(t+r),`cm`].join(` `)),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,`cm`].join(` `)),this.internal.write(`/I`+i.index+` Do`),this.internal.write(`Q`)},v=e.color_spaces={DEVICE_RGB:`DeviceRGB`,DEVICE_GRAY:`DeviceGray`,DEVICE_CMYK:`DeviceCMYK`,CAL_GREY:`CalGray`,CAL_RGB:`CalRGB`,LAB:`Lab`,ICC_BASED:`ICCBased`,INDEXED:`Indexed`,PATTERN:`Pattern`,SEPARATION:`Separation`,DEVICE_N:`DeviceN`};e.decode={DCT_DECODE:`DCTDecode`,FLATE_DECODE:`FlateDecode`,LZW_DECODE:`LZWDecode`,JPX_DECODE:`JPXDecode`,JBIG2_DECODE:`JBIG2Decode`,ASCII85_DECODE:`ASCII85Decode`,ASCII_HEX_DECODE:`ASCIIHexDecode`,RUN_LENGTH_DECODE:`RunLengthDecode`,CCITT_FAX_DECODE:`CCITTFaxDecode`};var y=e.image_compression={NONE:`NONE`,FAST:`FAST`,MEDIUM:`MEDIUM`,SLOW:`SLOW`},b=e.__addimage__.sHashCode=function(e){var t,n,r=0;if(typeof e==`string`)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(C(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},x=e.__addimage__.validateStringAsBase64=function(e){(e||=``).toString().trim();var t=!0;return e.length===0&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},S=e.__addimage__.extractImageFromDataUrl=function(e){if(e==null||!(e=e.trim()).startsWith(`data:`))return null;var t=e.indexOf(`,`);return t<0?null:e.substring(0,t).trim().endsWith(`base64`)?e.substring(t+1):null};e.__addimage__.isArrayBuffer=function(e){return e instanceof ArrayBuffer};var C=e.__addimage__.isArrayBufferView=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},w=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},T=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t=``,n=C(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,t,r,i,a,s,c,u,d;if(typeof arguments[1]==`number`?(t=n,r=arguments[1],i=arguments[2],a=arguments[3],s=arguments[4],c=arguments[5],u=arguments[6],d=arguments[7]):(t=arguments[1],r=arguments[2],i=arguments[3],a=arguments[4],s=arguments[5],c=arguments[6],u=arguments[7],d=arguments[8]),o(e=arguments[0])===`object`&&!p(e)&&`imageData`in e){var f=e;e=f.imageData,t=f.format||t||n,r=f.x||r||0,i=f.y||i||0,a=f.w||f.width||a,s=f.h||f.height||s,c=f.alias||c,u=f.compression||u,d=f.rotation||f.angle||d}var m=this.internal.getFilters();if(u===void 0&&m.indexOf(`FlateEncode`)!==-1&&(u=`SLOW`),isNaN(r)||isNaN(i))throw Error(`Invalid coordinates passed to jsPDF.addImage`);l.call(this);var h=E.call(this,e,t,c,u);return _.call(this,r,i,a,s,h,d),this};var E=function(t,r,a,o){var s,c,l;if(typeof t==`string`&&i(t)===n){t=unescape(t);var u=D(t,!1);(u!==``||(u=e.loadFile(t,!0))!==void 0)&&(t=u)}if(p(t)&&(t=m(t,r)),r=i(t,r),!f(r))throw Error(`addImage does not support files of type '`+r+`', please ensure that a plugin for '`+r+`' support is added.`);if(((l=a)==null||l.length===0)&&(a=function(e){return typeof e==`string`||C(e)?b(e):C(e.data)?b(e.data):null}(t)),(s=h.call(this,a))||(t instanceof Uint8Array||r===`RGBA`||(c=t,t=w(t)),s=this[`process`+r.toUpperCase()](t,d.call(this),a,function(t){return t&&typeof t==`string`&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(o),c)),!s)throw Error(`An unknown error occurred whilst processing the image.`);return s},D=e.__addimage__.convertBase64ToBinaryString=function(e,t){t=typeof t!=`boolean`||t;var n,r=``;if(typeof e==`string`){n=S(e)??e;try{r=tt(n)}catch(e){if(t)throw x(n)?Error(`atob-Error in jsPDF.convertBase64ToBinaryString `+e.message):Error(`Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString `)}}return r};e.getImageProperties=function(t){var r,a,o=``;if(p(t)&&(t=m(t)),typeof t==`string`&&i(t)===n&&((o=D(t,!1))===``&&(o=e.loadFile(t)||``),t=o),a=i(t),!f(a))throw Error(`addImage does not support files of type '`+a+`', please ensure that a plugin for '`+a+`' support is added.`);if(t instanceof Uint8Array||(t=w(t)),!(r=this[`process`+a.toUpperCase()](t)))throw Error(`An unknown error occurred whilst processing the image`);return r.fileType=a,r}})(Z.API),function(e){var t=function(e){if(e!==void 0&&e!=``)return!0};Z.API.events.push([`addPage`,function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),e.events.push([`putPage`,function(e){for(var n,r,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(e.objId),c=e.pageContext.annotations,l=!1,u=0;u<c.length&&!l;u++)switch((n=c[u]).type){case`link`:(t(n.options.url)||t(n.options.pageNumber))&&(l=!0);break;case`reference`:case`text`:case`freetext`:l=!0}if(l!=0){this.internal.write(`/Annots [`);for(var d=0;d<c.length;d++){n=c[d];var f=this.internal.pdfEscape,p=this.internal.getEncryptor(e.objId);switch(n.type){case`reference`:this.internal.write(` `+n.object.objId+` 0 R `);break;case`text`:var m=this.internal.newAdditionalObject(),h=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(m.objId),_=n.title||`Note`;i=`<</Type /Annot /Subtype /Text `+(r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y)+`] `)+`/Contents (`+f(g(n.contents))+`)`,i+=` /Popup `+h.objId+` 0 R`,i+=` /P `+s.objId+` 0 R`,i+=` /T (`+f(g(_))+`) >>`,m.content=i;var v=m.objId+` 0 R`;i=`<</Type /Annot /Subtype /Popup `+(r=`/Rect [`+a(n.bounds.x+30)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w+30)+` `+o(n.bounds.y)+`] `)+` /Parent `+v,n.open&&(i+=` /Open true`),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=`<</Type /Annot /Subtype /FreeText `+r+`/Contents (`+f(p(n.contents))+`)`,i+=` /DS(`+f(p(y))+`)`,i+=` /Border [0 0 0]`,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=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /A <</S /URI /URI (`+f(p(n.options.url))+`) >>`;else if(n.options.pageNumber)switch(i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /Dest [`+this.internal.getPageInfo(n.options.pageNumber).objId+` 0 R`,n.options.magFactor=n.options.magFactor||`XYZ`,n.options.magFactor){case`Fit`:i+=` /Fit]`;break;case`FitH`:i+=` /FitH `+n.options.top+`]`;break;case`FitV`:n.options.left=n.options.left||0,i+=` /FitV `+n.options.left+`]`;break;default:var x=o(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=` /XYZ `+n.options.left+` `+x+` `+n.options.zoom+`]`}i!=``&&(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<e.length;t+=1)r[e.charCodeAt(t)]===void 0?(r=n,i+=e.charAt(t-a),t-=a,a=0):(a++,typeof(r=r[e.charCodeAt(t)])==`number`&&(i+=String.fromCharCode(r),r=n,a=0),t===e.length-1&&(r=n,i+=e.charAt(t-(a-1)),t-=a-1,a=0));return i};e.__arabicParser__.isArabicDiacritic=function(e){return e!==void 0&&r[e.charCodeAt(0)]!==void 0};var f=e.__arabicParser__.getCorrectForm=function(e,t,n){return o(e)?!1===a(e)?-1:!l(e)||!o(t)&&!o(n)||!o(n)&&s(t)||s(e)&&!o(t)||s(e)&&c(t)||s(e)&&s(t)?0:u(e)&&o(t)&&!s(t)&&o(n)&&l(n)?3:s(e)||!o(n)?1:2:-1},p=function(e){var n=0,r=0,i=0,a=``,s=``,c=``,l=(e||=``).split(`\\s+`),u=[];for(n=0;n<l.length;n+=1){for(u.push(``),r=0;r<l[n].length;r+=1)a=l[n][r],s=l[n][r-1],c=l[n][r+1],o(a)?(i=f(a,s,c),u[n]+=i===-1?a:String.fromCharCode(t[a.charCodeAt(0)][i])):u[n]+=a;u[n]=d(u[n])}return u.join(` `)},m=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t=typeof arguments[0]==`string`?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([p(t[r][0]),t[r][1],t[r][2]]):n.push([p(t[r])]);e=n}else e=p(t);return typeof arguments[0]==`string`?e:(arguments[0].text=e,arguments[0])};e.events.push([`preProcessText`,m])}(Z.API),Z.API.autoPrint=function(e){var t;return(e||={}).variant=e.variant||`non-conform`,e.variant===`javascript`?this.addJS(`print({});`):(this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /Named`),this.internal.out(`/Type /Action`),this.internal.out(`/N /Print`),this.internal.out(`>>`),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;d<e.length;d++)o<(c=this.getStringUnitWidth(e[d],{font:i})*n)&&(o=c);return o!==0&&(s=e.length),{w:o/=a,h:Math.max((s*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/a,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=e.cell=function(){var e=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);r.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||t,c=this.internal.__cell__.tableHeaderRow,l=this.internal.__cell__.printHeaders;return i.lineNumber!==void 0&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+s.bottom>this.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;f<u.length;f+=1)b[u[f].name]=.7499990551181103*u[f].width;else Array.isArray(u)&&typeof u[0]==`string`&&(_=g=u,v=g.map(function(){return`left`}));if(C||Array.isArray(u)&&typeof u[0]==`string`)for(f=0;f<g.length;f+=1){for(y[h=g[f]]=l.map(function(e){return e[h]}),this.setFont(void 0,`bold`),x.push(this.getTextDimensions(_[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=y[h],this.setFont(void 0,`normal`),m=0;m<p.length;m+=1)x.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);b[h]=Math.max.apply(null,x)+D+D,x=[]}if(w){var A={};for(f=0;f<g.length;f+=1)A[g[f]]={},A[g[f]].text=_[f],A[g[f]].align=v[f];var j=c.call(this,A,b);S=g.map(function(t){return new a(e,n,b[t],j,A[t].text,void 0,A[t].align)}),this.setTableHeaderRow(S),this.printHeaderRow(1,!1)}var M=u.reduce(function(e,t){return e[t.name]=t.align,e},{});for(f=0;f<l.length;f+=1){`rowStart`in d&&d.rowStart instanceof Function&&d.rowStart({row:f,data:l[f]},this);var N=c.call(this,l[f],b);for(m=0;m<g.length;m+=1){var P=l[f][g[m]];`cellStart`in d&&d.cellStart instanceof Function&&d.cellStart({row:f,col:m,data:P},this),s.call(this,new a(e,n,b[g[m]],N,P,f+2,M[g[m]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var c=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map(function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty(`text`)?i.text:i,t[r]-n-n)},this).map(function(e){return this.getLineHeightFactor()*e.length*r/i+n+n},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){r.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw Error(`Property tableHeaderRow does not exist.`);var i;if(n=!0,typeof this.internal.__cell__.headerFunction==`function`){var o=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(o[0],o[1],o[2],o[3],void 0,-1)}this.setFont(void 0,`bold`);for(var c=[],l=0;l<this.internal.__cell__.tableHeaderRow.length;l+=1){i=this.internal.__cell__.tableHeaderRow[l].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,c.push(i)),i.lineNumber=e;var u=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,i),this.setTextColor(u)}c.length>0&&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<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var bn={"sans-serif":`helvetica`,fixed:`courier`,monospace:`courier`,terminal:`courier`,cursive:`times`,fantasy:`times`,serif:`times`},xn={caption:`times`,icon:`times`,menu:`times`,"message-box":`times`,"small-caption":`times`,"status-bar":`times`};function Sn(e){return[e.stretch,e.style,e.weight,e.family].join(` `)}function Cn(e){return e.trimLeft()}function wn(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function Tn(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var En,Dn,On,kn,An,jn=[`times`];function Mn(e,t,n,r,i){var a=4,o=Fn;switch(i){case Z.API.image_compression.FAST:a=1,o=Pn;break;case Z.API.image_compression.MEDIUM:a=6,o=In;break;case Z.API.image_compression.SLOW:a=9,o=Ln}e=function(e,t,n,r){for(var i,a=e.length/t,o=new Uint8Array(e.length+a),s=[Nn,Pn,Fn,In,Ln],c=0;c<a;c+=1){var l=c*t,u=e.subarray(l,l+t);if(r)o.set(r(u,n,i),l+c);else{for(var d=s.length,f=[],p=0;p<d;p+=1)f[p]=s[p](u,n,i);var m=zn(f.concat());o.set(f[m],l+c)}i=u}return o}(e,t,Math.ceil(n*r/8),o);var s=U(e,{level:a});return Z.API.__addimage__.arrayBufferToBinaryString(s)}function Nn(e){var t=Array.apply([],e);return t.unshift(0),t}function Pn(e,t){var n=e.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var a=e[i-t]||0;r[i+1]=e[i]-a+256&255}return r}function Fn(e,t,n){var r=e.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var o=n&&n[a]||0;i[a+1]=e[a]-o+256&255}return i}function In(e,t,n){var r=e.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var o=e[a-t]||0,s=n&&n[a]||0;i[a+1]=e[a]+256-(o+s>>>1)&255}return i}function Ln(e,t,n){var r=e.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var o=Rn(e[a-t]||0,n&&n[a]||0,n&&n[a-t]||0);i[a+1]=e[a]-o+256&255}return i}function Rn(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),a=Math.abs(e+t-n-n);return r<=i&&r<=a?e:i<=a?t:n}function zn(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))}function Bn(e,t,n){var r=t*n,i=Math.floor(r/8),a=16-(r-8*i+n),o=(1<<n)-1;return Hn(e,i)>>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<<r)-1,c=(t&s)<<o;(function(e,t,n){if(t+1<e.byteLength)e.setUint16(t,n,!1);else{var r=n>>8&255;e.setUint8(t,r)}})(e,a,Hn(e,a)&~(s<<o)&65535|c)}function Hn(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function Un(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw Error(`Invalid GIF 87a/89a header.`);var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],a=i>>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<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,m=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((D=e[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;_<v;++_){var y=o[_];if(d===0&&(d=l,(m+=h)>=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;_<v;++_){var y=o[_];if(d===0&&(d=l,(m+=h)>=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<<i,o=a+1,s=o+1,c=i+1,l=(1<<c)-1,u=0,d=0,f=0,p=e[t++],m=new Int32Array(4096),h=null;;){for(;u<16&&p!==0;)d|=e[t++]<<u,u+=8,p===1?p=e[t++]:--p;if(u<c)break;var g=d&l;if(d>>=c,u-=c,g!==a){if(g===o)break;for(var _=g<s?g:h,v=0,y=_;y>a;)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<<n&&(g|=1<<_),n--,--_<0&&(g==255?(P(255),P(0)):P(g),_=7,g=0)}function P(e){h.push(e)}function F(e){P(e>>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<H;){for(p=0;p<U;){for(M=U*ne+p,R=-1,z=0,B=0;B<64;B++)ee=M+(z=B>>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;r<t;r++)f[32767+r]=n,d[32767+r]=[],d[32767+r][1]=n,d[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)f[32767+i]=n,d[32767+i]=[],d[32767+i][1]=n,d[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)S[e]=19595*e,S[e+256|0]=38470*e,S[e+512|0]=7471*e+32768,S[e+768|0]=-11059*e,S[e+1024|0]=-21709*e,S[e+1280|0]=32768*e+8421375,S[e+1536|0]=-27439*e,S[e+1792|0]=-5329*e}(),L(e)}function Kn(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,[`BM`,`BA`,`CI`,`CP`,`IC`,`PT`].indexOf(this.flag)===-1)throw Error(`Invalid BMP File`);this.parseHeader(),this.parseBGR()}function qn(e){function t(e){if(!e)throw Error(`assert :P`)}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var a=0;a<i;a++)e[t+a]=n[r+a]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function a(e){return new Int32Array(e)}function o(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var a=i[r],o=0;o<a&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));o++)e(n[o],r+1,i)}(n,0,e),n}var c=function(){var e=this;function c(e,t){for(var n=1<<t-1>>>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<i)}function u(e,n,r,i,o){if(t(2328>=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<<r,h=a(16),g=a(16);for(t(o!=0),t(i!=null),t(e!=null),t(0<r),f=0;f<o;++f){if(15<i[f])return 0;++h[i[f]]}if(h[0]==o)return 0;for(g[1]=0,u=1;15>u;++u){if(h[u]>1<<u)return 0;g[u+1]=g[u]+h[u]}for(f=0;f<o;++f)u=i[f],0<i[f]&&(s[g[u]++]=f);if(g[15]==1)return(i=new d).g=0,i.value=s[0],l(e,p,1,m,i),m;var _,v=-1,y=m-1,b=0,x=1,S=1,C=1<<r;for(f=0,u=1,o=2;u<=r;++u,o<<=1){if(x+=S<<=1,0>(S-=h[u]))return 0;for(;0<h[u];--h[u])(i=new d).g=u,i.value=s[f++],l(e,p+b,o,C,i),b=c(b,u)}for(u=r+1,o=2;15>=u;++u,o<<=1){if(x+=S<<=1,0>(S-=h[u]))return 0;for(;0<h[u];--h[u]){if(i=new d,(b&y)!=v){for(p+=C,_=1<<(v=u)-r;15>v&&!(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;0<t--;)n|=O(e,128)<<t;return n}function g(e,t){var n=h(e,t);return D(e)?-n:n}function _(e,n,r,i){var a,o=0;for(t(e!=null),t(n!=null),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),a=0;a<i;++a)o+=n[r+a]<<8*a;e.Ra=o,e.bb=i,e.oa=n,e.pa=r}function v(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<Vn-8>>>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<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(e!=null&&e.oa!=null),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function D(e){return h(e,1)}function O(e,t){var n=e.Ca;0>e.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<<r>>>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<<r)-1,a}function k(e,t,n){e[t+0]=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<<n;return t(e!=null),t(0<n),e.X=a(r),e.X==null?0:(e.Mb=32-n,e.Xa=n,1)}function P(e,n){t(e!=null),t(n!=null),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function F(){this.X=[],this.Xa=this.Mb=0}function I(e,n,r,i){t(r!=null),t(i!=null);var a=r[0],o=i[0];return a==0&&(a=(e*o+n/2)/n),o==0&&(o=(n*a+e/2)/e),0>=a||0>=o?0:(r[0]=a,i[0]=o,1)}function L(e,t){return e+(1<<t)-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<o;++l){var u=e[t](s[c+l-1],i,a+l);s[c+l]=ee(n[r+l],u)}}}function z(){this.ud=this.hd=this.jd=0}function B(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function te(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function V(e,t){return te(e+(e-t+.5>>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<i;++n)a[o+n]=r=ee(e[t+n],r)}function ne(e,t,n,r,i){var a;for(a=0;a<n;++a){var o=e[t+a],s=o>>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<r;++o){var s=t[n+o],c=s>>>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<l;++r)for(c=0;c<u;++c)o[s++]=a(n[i(e[t++])])},e[t]=function(t,n,o,s,c,l,u){var d=8>>t.b,f=t.Ea,p=t.K[0],m=t.w;if(8>d)for(t=(1<<t.b)-1,m=(1<<d)-1;n<o;++n){var h,g=0;for(h=0;h<f;++h)h&t||(g=i(s[c++])),l[u++]=a(p[g&m]),g>>=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<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a}}function oe(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>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<n;){var a=(o=e[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<n;){var a=(o=e[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<n;){var a=e[t++];r[i++]=255&a,r[i++]=a>>8&255,r[i++]=a>>16&255}}function le(e,t,n,i,a,o){if(o==0)for(n=t+n;t<n;)k(i,((o=e[t++])[0]>>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+2<y;v+=2)m=u,h=d,g=f,_=p,d+=e.Rc,p+=e.Rc,o+=2*i.A,s(c,(l+=2*e.fa)-e.fa,c,l,m,h,g,_,u,d,f,p,a,o-i.A,a,o,b);return l+=e.fa,e.j+y<e.o?(r(t.ec,t.fc,c,l,b),r(t.cc,t.dc,u,d,x),r(t.Mc,t.Nc,f,p,x),n--):1&y||s(c,l,null,null,u,d,f,p,u,d,f,p,a,o+i.A,null,null,b),n}function ye(e,n,r){var i=e.F,a=[e.J];if(i!=null){var o=e.U,s=n.ba.S,c=s==zr||s==Wr;n=n.ba.f.RGBA;var l=[0],u=e.ka;l[0]=e.T,e.Kb&&(u==0?--l[0]:(--u,a[0]-=e.width),e.j+e.ka+e.T==e.o&&(l[0]=e.o-e.j-u));var d=n.eb;u=n.fb+u*n.A,e=wr(i,a[0],e.width,o,l,d,u+(c?0:3),n.A),t(r==l),e&&de(s)&&Sr(d,u,c,o,l,n.A)}return 0}function be(e){var t=e.ma,n=t.ba.S,r=11>n,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<Di;++e)t=76283*(e-16)+Ti>>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)<<n)+y(t,n)+1}function Te(e,t){return 120<t?t-120:1<=(n=((n=Zr[t-1])>>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<i&&(w(n,n.u+8),r=S(n),t+=e[t].value,t+=r&(1<<i)-1),w(n,n.u+e[t].g),e[t].value}function De(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>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.Wb),e.Ya[n]}function ke(e,n,i,a){var o=e.ab,s=e.c*n,c=e.C;n=c+n;var l=i,u=a;for(a=e.Ta,i=e.Ua;0<o--;){var d=e.gc[o],f=c,p=n,m=l,h=u,g=(u=a,l=i,d.Ea);switch(t(f<p),t(p<=d.nc),d.hc){case 2:Kn(m,h,(p-f)*g,u,l);break;case 0:var _=f,v=p,y=u,b=l,x=(E=d).Ea;_==0&&(Wn(m,h,null,null,1,y,b),U(m,h+1,0,0,x-1,y,b+1),h+=x,b+=x,++_);for(var S=1<<E.b,C=S-1,w=L(x,E.b),T=E.K,E=E.w+(_>>E.b)*w;_<v;){var D=T,O=E,k=1;for(Gn(m,h,y,b-x,1,y,b);k<x;){var A=(k&~C)+S;A>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)-1)),_=L(m,d.b),S=d.K,d=d.w+(f>>d.b)*_;f<p;){for(C=S,w=d,T=new z,E=v+b,D=v+m;v<E;)W(C[w++],T),Qn(T,g,v,h,u,l),v+=h,l+=h;v<D&&(W(C[w++],T),Qn(T,g,v,x,u,l),v+=x,l+=x),++f&y||(d+=_)}break;case 3:if(m==u&&h==l&&0<d.b){for(v=u,m=g=l+(p-f)*g-(b=(p-f)*L(d.Ea,d.b)),h=u,y=l,_=[],b=(x=b)-1;0<=b;--b)_[b]=h[y+b];for(b=x-1;0<=b;--b)v[m+b]=_[b];qn(d,f,p,u,g,u,l)}else qn(d,f,p,m,h,u,l)}l=a,u=i}u!=i&&r(a,i,l,u,s)}function Ae(e,n){var r=e.V,i=e.Ba+e.c*e.C,a=n-e.C;if(t(n<=e.l.o),t(16>=a),0<a){var o=e.l,s=e.Ta,c=e.Ua,l=o.width;if(ke(e,a,r,i),a=c=[c],t((r=e.C)<(i=n)),t(o.v<o.va),i>o.o&&(i=o.o),r<o.j){var u=o.j-r;r=o.j,a[0]+=u*l}if(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;0<p--;){var m=s,h=c,g=a,_=u,v=d;switch(i){case Fr:$n(m,h,g,_,v);break;case Ir:er(m,h,g,_,v);break;case Hr:er(m,h,g,_,v),Sr(_,v,0,g,1,0);break;case Lr:rr(m,h,g,_,v);break;case Rr:le(m,h,g,_,v,1);break;case Ur:le(m,h,g,_,v,1),Sr(_,v,0,g,1,0);break;case zr:le(m,h,g,_,v,0);break;case Wr:le(m,h,g,_,v,0),Sr(_,v,1,g,1,0);break;case Br:tr(m,h,g,_,v);break;case Gr:tr(m,h,g,_,v),Cr(_,v,g,1,0);break;case Vr:nr(m,h,g,_,v);break;default:t(0)}c+=l,d+=f}e.Ma+=o}else alert(`todo:EmitRescaledRowsYUVA`);t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function je(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Me(e,n,r,i,a,o){if(e.Z!=0){var s=e.qd,c=e.rd;for(t(hi[e.Z]!=null);n<r;++n)hi[e.Z](s,c,i,a,i,a,o),s=i,c=a,a+=o;e.qd=s,e.rd=c}}function Ne(e,n){var r=e.l.ma,i=r.Z==0||r.Z==1?e.l.j:e.C;if(i=e.C<i?i:e.C,t(n<=e.l.o),n>i){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<d.ua?d.Wa:null,v=d.wc,y=f<m?Oe(d,l,c):null;t(e.C<o),t(m<=a);var b=!1;t:for(;;){for(;b||f<m;){var x=0;if(c>=g){var E=f-r;t((g=e).Pb),g.wd=g.m,g.xd=E,0<g.s.ua&&P(g.s.Wa,g.s.vb),g=c+$r}if(l&v||(y=Oe(d,l,c)),t(y!=null),y.Qb&&(n[f]=y.qb,b=!0),!b)if(T(u),y.jc){x=u,E=n;var D=f,O=y.pd[S(x)&Rn-1];t(y.jc),256>O.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<f;)x=n[p++],_.X[(506832829*x&4294967295)>>>_.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<E||a-f<x)break t;for(D=0;D<x;++D)n[f+D]=n[f+D-E];for(f+=x,l+=x;l>=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<f;)x=n[p++],_.X[(506832829*x&4294967295)>>>_.Mb]=x}else{if(!(x<h))break t;for(b=x-280,t(_!=null);p<f;)x=n[p++],_.X[(506832829*x&4294967295)>>>_.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&&f<a)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&P(e.s.vb,e.s.Wa);else{if(u.h)break t;s?.(e,c>o?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<<k)l=0;else{switch(C.Oc|=1<<k,O.hc=k,O.Ea=b[0],O.nc=x[0],O.K=[null],++C.ab,t(4>=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<j?0:4<j?1:2<j?2:3;if(b[0]=L(O.Ea,M),O.b=M,A=E=Ie(j,1,0,C,O.K)){var P,F=j,I=O,R=1<<(8>>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<he;++H){var ge=ce[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<ae&&(_e+=1<<ae),ue<_e&&(ue=_e)}var ve=o(le*de,d),ye=le,be=o(ye,p);if(be==null)var xe=null;else t(65536>=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;H<le;++H){var we=xe[H],Te=we.G,Ee=we.H,Oe=0,ke=1,Ae=0;for(U=0;5>U;++U){_e=Jr[U],Te[U]=Ce,Ee[U]=ne,!U&&0<ae&&(_e+=1<<ae);n:{var je,Me=_e,Ne=W,Fe=Se,Le=Ce,Re=ne,q=0,ze=Ne.m,Be=y(ze,1);if(i(Fe,0,0,Me),Be){var Ve=y(ze,1)+1,He=y(ze,y(ze,1)==0?1:8);Fe[He]=1,Ve==2&&(Fe[He=y(ze,8)]=1);var Ue=1}else{var We=a(19),Ge=y(ze,4)+4;if(19<Ge){Ne.a=3;var Ke=0;break n}for(je=0;je<Ge;++je)We[Xr[je]]=y(ze,3);var qe=void 0,Je=void 0,J=Ne,Ye=We,Y=Me,Xe=Fe,Ze=0,Qe=J.m,$e=8,et=o(128,d);i:for(;u(et,0,7,Ye,19);){if(y(Qe,1)){if((qe=2+y(Qe,2+2*y(Qe,3)))>Y)break i}else qe=Y;for(Je=0;Je<Y&&qe--;){T(Qe);var tt=et[0+(127&S(Qe))];w(Qe,Qe.u+tt.g);var nt=tt.value;if(16>nt)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<ot--;)Xe[Je++]=st}}Ze=1;break i}Ze||(J.a=3),Ue=Ze}(Ue&&=!ze.h)&&(q=u(Le,Re,8,Fe,Me)),Ue&&q!=0?Ke=q:(Ne.a=3,Ke=0)}if(Ke==0)break r;if(ke&&Yr[U]==1&&(ke=Ce[ne].g==0),Oe+=Ce[ne].g,ne+=Ke,3>=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<Rn;++ut){var ft=ut,pt=dt.pd[ft],mt=dt.G[0][dt.H[0]+ft];256<=mt.value?(pt.g=mt.g+256,pt.value=mt.value):(pt.g=0,pt.value=0,ft>>=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(0<v){if(g.ua=1<<v,!N(g.Wa,v)){s.a=1,l=0;break t}}else g.ua=0;var ht=s,gt=f,_t=m,vt=ht.s,yt=vt.xc;if(ht.c=gt,ht.i=_t,vt.md=L(gt,yt),vt.wc=yt==0?-1:(1<<yt)-1,r){s.xb=pi;break t}if((_=a(f*m))==null){s.a=1,l=0;break t}l=(l=K(s,_,0,f,m,m,null))&&!h.h;break t}return l?(c==null?(t(_==null),t(r)):c[0]=_,s.$=0,r||Pe(g)):Pe(g),l}function Le(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=a(i),e.V==null?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Re(e,n){var r=e.C,i=n-r,a=e.V,o=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,c=e.l.ma,l=e.l.width,u=l*s,d=c.ca,f=c.tb+l*r,p=e.Ta,m=e.Ua;ke(e,s,a,o),Tr(p,m,d,f,u),Me(c,r,r+s,d,f,l),i-=s,a+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function q(){this.ub=this.yd=this.td=this.Rb=0}function ze(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Be(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Ve(){this.Yb=function(){var e=[];return function e(t,n,r){for(var i=r[n],a=0;a<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));a++)e(t[a],n+1,r)}(e,0,[3,11]),e}()}function He(){this.jb=a(3),this.Wc=s([4,8],Ve),this.Xc=s([4,17],Ve)}function Ue(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function We(){this.ld=this.La=this.dd=this.tc=0}function Ge(){this.Na=this.la=0}function Ke(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qe(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Je(){this.uc=this.M=this.Nb=0,this.wa=Array(new We),this.Y=0,this.ya=Array(new qe),this.aa=0,this.l=new Xe}function J(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Ye(){this.cb=this.a=0,this.sc=``,this.m=new b,this.Od=new q,this.Kc=new ze,this.ed=new Ue,this.Qa=new Be,this.Ic=this.$c=this.Aa=0,this.D=new Je,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,b),this.ia=0,this.pb=o(4,Ke),this.Pa=new He,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new J),this.Hd=0,this.rb=Array(new Ge),this.sb=0,this.wa=Array(new We),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new qe),this.L=this.aa=0,this.gd=s([4,2],We),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Y(e,t){return 0>e?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,3<c.td)return Qe(e,3,`Incorrect keyframe parameters.`);if(!c.yd)return Qe(e,4,`Frame not displayable.`);a+=3,o-=3;var l=e.Kc;if(c.Rb){if(7>o)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<<h(e.m,2))-1,f<3*(d=e.Xb))r=7;else{for(u+=3*d,l-=3*d,f=0;f<d;++f){var p=r[o+0]|r[o+1]<<8|r[o+2]<<16;p>l&&(p=l),m(e.Jc[+f],r,u,p),u+=p,l-=p,o+=3}m(e.Jc[+d],r,u,l),r=u<a?0:5}if(r!=0)return Qe(e,r,`cannot parse partitions`);for(r=h(u=e.m,7),o=D(u)?g(u,4):0,a=D(u)?g(u,4):0,l=D(u)?g(u,4):0,d=D(u)?g(u,4):0,u=D(u)?g(u,4):0,f=e.Qa,p=0;4>p;++p){if(f.Cb){var _=f.Zb[p];f.Fb||(_+=r)}else{if(0<p){e.pb[p]=e.pb[0];continue}_=r}var v=e.pb[p];v.Sc[0]=ei[Y(_+o,127)],v.Sc[1]=ti[Y(_+0,127)],v.Eb[0]=2*ei[Y(_+a,127)],v.Eb[1]=101581*ti[Y(_+l,127)]>>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<<d)}else O(l,f[d+7])?(u=7+2*O(l,165),u+=O(l,145)):u=5+O(l,159);else u=O(l,f[d+4])?3+O(l,f[d+5]):2;s=c[2]}else u=1,s=c[1];c=o+ii[i],0>(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)<<f,a[c]=((u^p)-p)*r[(0<i)+0]}return 16}function nt(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function rt(e,t,n,r,i){i=e[t+n+32*r]+(i>>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;r<n;++r){var s,c=a,l=o+e[t-1];for(s=0;s<n;++s)e[t+s]=c[l+e[i+s]];t+=32}}function mt(e,t){pt(e,t,4)}function ht(e,t){pt(e,t,8)}function gt(e,t){pt(e,t,16)}function _t(e,t){var n;for(n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function vt(e,t){var n;for(n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function yt(e,t,n){var r;for(r=0;16>r;++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<i;--i)Ht(e,t+=4*n,n,r)}function Gt(e,t,n,r){var i;for(i=3;0<i;--i)Ut(e,t+=4,n,r)}function Kt(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Vt(e,t,n,a,o))if(zt(e,t,n,s))Rt(e,t,n);else{var c=e,l=t,u=n,d=c[l-2*u],f=c[l-u],p=c[l+0],m=c[l+u],h=c[l+2*u],g=27*(v=jr[1020+3*(p-f)+jr[1020+d-m]])+63>>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<i--;){if(Vt(e,t,n,a,o))if(zt(e,t,n,s))Rt(e,t,n);else{var c=e,l=t,u=n,d=c[l-u],f=c[l+0],p=c[l+u],m=Mr[112+(4+(h=3*(f-d))>>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;0<o;--o)qt(e,t+=4*n,n,1,16,r,i,a)}function Zt(e,t,n,r,i,a){var o;for(o=3;0<o;--o)qt(e,t+=4,1,n,16,r,i,a)}function Qt(e,t,n,r,i,a,o,s){Kt(e,t,i,1,8,a,o,s),Kt(n,r,i,1,8,a,o,s)}function $t(e,t,n,r,i,a,o,s){Kt(e,t,1,i,8,a,o,s),Kt(n,r,1,i,8,a,o,s)}function en(e,t,n,r,i,a,o,s){qt(e,t+4*i,i,1,8,a,o,s),qt(n,r+4*i,i,1,8,a,o,s)}function tn(e,t,n,r,i,a,o,s){qt(e,t+4,1,i,8,a,o,s),qt(n,r+4,1,i,8,a,o,s)}function nn(){this.ba=new me,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ge,this.memory=0,this.Ib=`OutputFunc`,this.Jb=`OutputAlphaFunc`,this.Nd=`OutputRowFunc`}function rn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function an(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function on(){this.ua=0,this.Wa=new F,this.vb=new F,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new p,this.yc=new d}function sn(){this.xb=this.a=0,this.l=new Xe,this.ca=new me,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new x,this.Pb=0,this.wd=new x,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new on,this.ab=0,this.gc=o(4,an),this.Oc=0}function cn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Xe,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ln(e,t,n,r,i,a,o){for(e=e==null?0:e[t+0],t=0;t<o;++t)i[a+t]=e+n[r+t]&255,e=i[a+t]}function un(e,t,n,r,i,a,o){var s;if(e==null)ln(null,null,n,r,i,a,o);else for(s=0;s<o;++s)i[a+s]=e[t+s]+n[r+s]&255}function $(e,t,n,r,i,a,o){if(e==null)ln(null,null,n,r,i,a,o);else{var s,c=e[t+0],l=c,u=c;for(s=0;s<o;++s)l=u+(c=e[t+s])-l,u=n[r+s]+(-256&l?0>l?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<l.c&&0<l.i),1>=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.$a||4<=l.Z||1<l.Lc||d)n=0;else if(v.put=xe,v.ac=be,v.bc=Se,v.ma=l,v.width=n.width,v.height=n.height,v.Da=n.Da,v.v=n.v,v.va=n.va,v.j=n.j,v.o=n.o,l.$a)t:{t(l.$a==1),n=Fe();e:for(;;){if(n==null){n=0;break t}if(t(l!=null),l.mc=n,n.c=l.c,n.i=l.i,n.l=l.l,n.l.ma=l,n.l.width=l.c,n.l.height=l.i,n.a=0,_(n.m,u,h,g),!Ie(l.c,l.i,1,n,null)||(n.ab==1&&n.gc[0].hc==3&&je(n.s)?(l.ic=1,u=n.c*n.i,n.Ta=null,n.Ua=0,n.V=a(u),n.Ba=0,n.V==null?(n.a=1,n=0):n=1):(l.ic=0,n=Le(n,l.c)),!n))break e;n=1;break t}l.mc=null,n=0}else n=g>=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<o;++l)hi[u.Z](h,g,v,d,f,p,n),h=f,g=p,p+=n,d+=n;else for(l=0;l<o;++l)r(f,p,v,d,n),h=f,g=p,p+=n,d+=n;e.rc=h,e.Vc=g}else{if(t(u.mc!=null),n=i+o,t((l=u.mc)!=null),t(n<=l.i),l.C>=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<S?Oe(m,f,d):null;t(b<=x),t(n<=y),t(je(m));e:for(;;){for(;!p.h&&b<S;){if(f&w||(E=Oe(m,f,d)),t(E!=null),T(p),256>(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<y;++D)u[h+b+D]=u[h+b+D-O];for(b+=y,f+=y;f>=g;)f-=g,++d<=n&&!(d%16)&&Ne(l,d);b<S&&f&w&&(E=Oe(m,f,d))}t(p.h==C(p))}Ne(l,d>n?n:d);break e}!v||p.h&&b<x?(v=0,l.a=p.h?5:3):l.$=b,n=v}else n=K(l,l.V,l.Ba,l.c,l.i,n,Re);if(!n){o=0;break t}}i+o>=c&&(e.Cc=1),o=1}if(!o)return null;if(e.Cc&&((o=e.ga)!=null&&(o.mc=null),e.ga=null,0<e.Ga))return alert(`todo:WebPDequantizeLevels`),null}return e.nb+i*s}function fn(e,t,n,r,i,a){for(;0<i--;){var o,s=e,c=t+ +!!n,l=e,u=t+(n?0:3);for(o=0;o<r;++o){var d=l[u+4*o];d!=255&&(d*=32897,s[c+4*o+0]=s[c+4*o+0]*d>>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<r--;){var a;for(a=0;a<n;++a){var o=e[t+2*a+0],s=15&(l=e[t+2*a+1]),c=4369*s,l=(240&l|l>>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<i;++l){for(c=0;c<r;++c){var d=e[t+c];a[o+4*c]=d,u&=d}t+=n,o+=s}return u!=255}function hn(e,t,n,r,i){var a;for(a=0;a<i;++a)n[r+a]=e[t+a]>>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(0<o?c[l-1-32]=u[d-1-32]=f[p-1-32]=129:(i(c,l-32-1,127,21),i(u,d-32-1,127,9),i(f,p-32-1,127,9)),a=0;a<e.za;++a){var m=t.ya[t.aa+a];if(0<a){for(n=-1;16>n;++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<o&&(r(c,l-32,h[g].y,0,16),r(u,d-32,h[g].f,0,8),r(f,p-32,h[g].ea,0,8)),m.Za){var y=c,b=l-32+16;for(0<o&&(a>=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)),o<e.Ub-1&&(r(h[g].y,0,c,l+480,16),r(h[g].f,0,u,d+224,8),r(h[g].ea,0,f,p+224,8)),n=8*s*e.B,h=e.sa,g=e.ta+16*a+16*s*e.R,_=e.qa,m=e.ra+8*a+n,v=e.Ha,y=e.Ia+8*a+n,n=0;16>n;++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||4294967286<b){y=3;break t}if(m&&b>v[0]-8){y=7;break t}y[0]=b,g[0]+=12,v[0]-=12}y=0}if(y!=0)return y;for(b=0<h.gb[0],i=i[0];;){t:{var S=e;v=r,y=i;var C=d,w=f,T=g=[0];if((O=p=[p])[0]=0,8>y[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(4294967286<A){y=3;break t}var N=8+A+1&-2;if(D+=N,0<O&&D>O){y=3;break t}if(!n(E,S,`VP8 `)||!n(E,S,`VP8L`)){y=0;break t}if(k[0]<N){y=7;break t}n(E,S,`ALPH`)||(C[0]=E,w[0]=S+8,T[0]=A),S+=N,k-=N}}if(i=i[0],h.na=h.na[0],h.P=h.P[0],h.Sa=h.Sa[0],y!=0)break}i=[i],h.Ja=[h.Ja],h.xa=[h.xa];t:if(O=e,y=r,b=i,C=h.gb[0],w=h.Ja,T=h.xa,E=y[0],S=!n(O,E,`VP8 `),D=!n(O,E,`VP8L`),t(O!=null),t(b!=null),t(w!=null),t(T!=null),8>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(4294967286<h.Ja)return 3;if(l==null||v||(l[0]=h.xa?2:1),c=[c],g=[g],h.xa){if(5>i){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&&0<h.na.length),a!=null&&(a[0]=c),o!=null&&(o[0]=g),0):y}function Fn(e,t,n){var r=t.width,i=t.height,a=0,o=0,s=r,c=i;if(t.Da=e!=null&&0<e.Da,t.Da&&(s=e.cd,c=e.bd,a=e.v,o=e.j,11>n||(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&&0<e.da,t.da){if(!I(s,c,n=[e.ib],a=[e.hb]))return 0;t.ib=n[0],t.hb=a[0]}return t.ob=e!=null&&e.ob,t.Kb=e==null||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}function In(e){if(e==null)return 2;if(11>e.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<<wi-1,Ei=-227,Di=482,Oi=6,ki=(256<<Oi)-1,Ai=0,ji=a(256),Mi=a(256),Ni=a(256),Pi=a(256),Fi=a(Di-Ei),Ii=a(Di-Ei);An(`YuvToRgbRow`,Cn,3),An(`YuvToBgrRow`,wn,3),An(`YuvToRgbaRow`,kn,4),An(`YuvToBgraRow`,On,4),An(`YuvToArgbRow`,Dn,4),An(`YuvToRgba4444Row`,En,2),An(`YuvToRgb565Row`,Tn,2);var Li=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ri=[0,2,8],zi=[8,7,6,4,4,2,2,2,1,1,1,1],Bi=1;this.WebPDecodeRGBA=function(e,n,s,c,l){var u=Ir,d=new nn,f=new me;d.ba=f,f.S=u,f.width=[f.width],f.height=[f.height];var p=f.width,m=f.height,h=new he;if(h==null||e==null)var g=2;else t(h!=null),g=Pn(e,n,s,h.width,h.height,h.Pd,h.Qd,h.format,null);if(g==0?(p!=null&&(p[0]=h.width[0]),m!=null&&(m[0]=h.height[0]),p=1):p=0,p){f.width=f.width[0],f.height=f.height[0],c!=null&&(c[0]=f.width),l!=null&&(l[0]=f.height);t:{if(c=new Xe,(l=new rn).data=e,l.w=n,l.ha=s,l.kd=1,n=[0],t(l!=null),((e=Pn(l.data,l.w,l.ha,null,null,null,n,null,l))==0||e==7)&&n[0]&&(e=4),(n=e)==0){if(t(d!=null),c.data=l.data,c.w=l.w+l.offset,c.ha=l.ha-l.offset,c.put=xe,c.ac=be,c.bc=Se,c.ma=d,l.xa){if((e=Fe())==null){d=1;break t}if(function(e,n){var r=[0],i=[0],a=[0];e:for(;;){if(e==null)return 0;if(n==null)return e.a=2,0;if(e.l=n,e.a=0,_(e.m,n.data,n.w,n.ha),!Ce(e.m,r,i,a)){e.a=3;break e}if(e.xb=mi,n.width=r[0],n.height=i[0],!Ie(r[0],i[0],1,e,null))break e;return 1}return t(e.a!=0),0}(e,c)){if(c=(n=Ln(c.width,c.height,d.Oa,d.ba))==0){e:{c=e;r:for(;;){if(c==null){c=0;break e}if(t(c.s.yc!=null),t(c.s.Ya!=null),t(0<c.s.Wb),t((s=c.l)!=null),t((l=s.ma)!=null),c.xb!=0){if(c.ca=l.ba,c.tb=l.tb,t(c.ca!=null),!Fn(l.Oa,s,Rr)){c.a=2;break r}if(!Le(c,s.width)||s.da)break r;if((s.da||de(c.ca.S))&&gn(),11>c.ca.S||(alert(`todo:WebPInitConvertARGBToYUV`),c.ca.f.kb.F!=null&&gn()),c.Pb&&0<c.s.ua&&c.s.vb.X==null&&!N(c.s.vb,c.s.Wa.Xa)){c.a=1;break r}c.xb=0}if(!K(c,c.V,c.Ba,c.c,c.i,s.o,Ae))break r;l.Dc=c.Ma,c=1;break e}t(c.a!=0),c=0}c=!c}c&&(n=e.a)}else n=e.a}else{if((e=new Ze)==null){d=1;break t}if(e.Fa=l.na,e.P=l.P,e.qc=l.Sa,et(e,c)){if((n=Ln(c.width,c.height,d.Oa,d.ba))==0){if(e.Aa=0,s=d.Oa,t((l=e)!=null),s!=null){if(0<(p=0>(p=s.Md)?0:100<p?255:255*p/100)){for(m=h=0;4>m;++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,100<l.Ga?l.Ga=100:0>l.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),0<e.L){var c=e.ed;for(s=0;4>s;++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<f?63:f)){var p=f;0<c.wb&&(p=4<c.wb?p>>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,0<e.Aa||(e.Ic=Bi);e:{s=e.Ic,c=4*(p=e.za);var m=32*p,h=p+1,g=0<e.L?p*(0<e.Aa?2:1):0,_=(e.Aa==2?2:1)*p;if((d=c+832+(l=3*(16*s+Ri[e.L])/2*m)+(u=e.Fa!=null&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=d)s=0;else{if(d>e.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<e.Aa&&(e.D.Y+=p),t(!0),e.oc=d,e.pc=f,f+=832,e.ya=o(_,qe),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,e.Aa==2&&(e.D.aa+=p),e.R=16*p,e.B=8*p,p=(m=Ri[e.L])*e.R,m=m/2*e.B,e.sa=d,e.ta=f+p,e.qa=e.sa,e.ra=e.ta+16*s*e.R+m,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+m,e.$c=0,f+=l,e.mb=u?d:null,e.nb=u?f:null,t(f+u<=e.Fc+e.Vb),nt(e),i(e.Ac,e.Bc,0,c),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Ar){for(s=-255;255>=s;++s)Er[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)Dr[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Or[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)kr[255+s]=0>s?0:255<s?255:s;Ar=1}ir=ft,ar=ct,sr=lt,cr=ut,lr=dt,or=st,ur=Jt,dr=Yt,fr=Qt,pr=$t,mr=Xt,hr=Zt,gr=en,_r=tn,vr=Ht,yr=Ut,br=Wt,xr=Gt,di[0]=Tt,di[1]=mt,di[2]=wt,di[3]=Z,di[4]=Et,di[5]=Ot,di[6]=Dt,di[7]=kt,di[8]=At,di[9]=Q,ui[0]=bt,ui[1]=gt,ui[2]=_t,ui[3]=vt,ui[4]=xt,ui[5]=St,ui[6]=Ct,fi[0]=Pt,fi[1]=ht,fi[2]=jt,fi[3]=Mt,fi[4]=It,fi[5]=Ft,fi[6]=Lt,s=1}else s=0}s&&=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var o,s=e.Jc[e.M&e.Xb],c=e.m,l=e;for(o=0;o<l.za;++o){var u=c,d=l,f=d.Ac,p=d.Bc+4*o,m=d.zc,h=d.ya[d.aa+o];if(d.Qa.Bb?h.$b=O(u,d.Pa.jb[0])?2+O(u,d.Pa.jb[2]):O(u,d.Pa.jb[1]):h.$b=0,d.kc&&(h.Ad=O(u,d.Bd)),h.Za=!O(u,145)+0,h.Za){var g=h.Ob,_=0;for(d=0;4>d;++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<b;)b=ai[2*b+O(u,y[b])];y=-b,f[p+v]=y}r(g,_,f,p,4),_+=4,m[0+d]=y}}else y=O(u,156)?O(u,128)?1:3:O(u,163)?2:0,h.Ob[0]=y,i(f,p,y,4),i(m,0,y,4);h.Dd=O(u,142)?O(u,114)?O(u,183)?1:3:2:0}if(l.m.Ka)return Qe(e,7,`Premature end-of-partition0 encountered.`);for(;e.ja<e.za;++e.ja){if(l=s,u=(c=e).rb[c.sb-1],f=c.rb[c.sb+c.ja],o=c.ya[c.aa+c.ja],p=c.kc?o.Ad:0)u.la=f.la=0,o.Za||(u.Na=f.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var x,S;if(u=f,f=l,p=c.Pa.Xc,m=c.ya[c.aa+c.ja],h=c.pb[m.$b],d=m.ad,g=0,_=c.rb[c.sb-1],y=v=0,i(d,g,0,384),m.Za)var C=0,w=p[3];else{b=a(16);var T=u.Na+_.Na;if(T=ni(f,p[1],T,h.Eb,0,b,0),u.Na=_.Na=(0<T)+0,1<T)ir(b,0,d,g);else{var E=b[0]+3>>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<T?3:1<T?2:d[g+0]!=0),g+=16;D>>=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<T?3:1<T?2:d[g+0]!=0),g+=16;D>>=2,k=k>>1|A<<5}y|=S<<4*x,w|=D<<4<<x,C|=(240&k)<<x}u.la=w,_.la=C,m.Hc=v,m.Gc=y,m.ia=43690&y?0:h.ia,p=!(v|y)}if(0<c.L&&(c.wa[c.Y+c.ja]=c.gd[o.$b][o.Za],c.wa[c.Y+c.ja].La|=!p),l.Ka)return Qe(e,7,`Premature end-of-file encountered.`)}if(nt(e),c=n,l=1,o=(s=e).D,u=0<s.L&&s.M>=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;S<T.Hb;++S){C=S,w=A;var j=(M=(B=T).D).Nb;x=B.R;var M=M.wa[M.Y+C],N=B.sa,P=B.ta+16*j*x+16*C,F=M.dd,I=M.tc;if(I!=0)if(t(3<=I),B.L==1)0<C&&yr(N,P,x,I+4),M.La&&xr(N,P,x,I),0<w&&vr(N,P,x,I+4),M.La&&br(N,P,x,I);else{var L=B.B,ee=B.qa,R=B.ra+8*j*L+8*C,z=B.Ha,B=B.Ia+8*j*L+8*C;j=M.ld,0<C&&(dr(N,P,x,I+4,F,j),pr(ee,R,z,B,L,I+4,F,j)),M.La&&(hr(N,P,x,I,F,j),_r(ee,R,z,B,L,I,F,j)),0<w&&(ur(N,P,x,I+4,F,j),fr(ee,R,z,B,L,I+4,F,j)),M.La&&(mr(N,P,x,I,F,j),gr(ee,R,z,B,L,I,F,j))}}if(s.ia&&alert(`todo:DitherRow`),c.put!=null){if(S=16*D,D=16*(D+1),k?(c.y=s.sa,c.O=s.ta+b,c.f=s.qa,c.N=s.ra+E,c.ea=s.Ha,c.W=s.Ia+E):(S-=y,c.y=p,c.O=m,c.f=h,c.N=d,c.ea=g,c.W=_),v||(D-=y),D>c.o&&(D=c.o),c.F=null,c.J=null,s.Fa!=null&&0<s.Fa.length&&S<D&&(c.J=dn(s,c,S,D-S),c.F=s.mb,c.F==null&&c.F.length==0)){l=Qe(s,3,`Could not decode alpha data.`);break e}S<c.j&&(y=c.j-S,S=c.j,t(!(1&y)),c.O+=s.R*y,c.N+=s.B*(y>>1),c.W+=s.B*(y>>1),c.F!=null&&(c.J+=c.width*y)),S<D&&(c.O+=c.v,c.N+=c.v>>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<e.length;){var s=l(e,t),c=f(e,t+=4);t+=4;var p=c+(1&c);switch(s){case`VP8 `:case`VP8L`:n.frames[r]===void 0&&(n.frames[r]={}),(g=n.frames[r]).src_off=i?o:t-8,g.src_size=a+c+8,r++,i&&(i=!1,a=0,o=0);break;case`VP8X`:(g=n.header={}).feature_flags=e[t];var m=t+4;g.canvas_width=1+d(e,m),m+=3,g.canvas_height=1+d(e,m),m+=3;break;case`ALPH`:i=!0,a=p+8,o=t-8;break;case`ANIM`:(g=n.header).bgcolor=f(e,t),m=t+4,g.loop_count=u(e,m),m+=2;break;case`ANMF`:var h,g;(g=n.frames[r]={}).offset_x=2*d(e,t),t+=3,g.offset_y=2*d(e,t),t+=3,g.width=1+d(e,t),t+=3,g.height=1+d(e,t),t+=3,g.duration=d(e,t),t+=3,h=e[t++],g.dispose=1&h,g.blend=h>>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<b.length&&b[x].blend!=0;x++);}var S=b[0],C=g.WebPDecodeRGBA(_,S.src_off,S.src_size,m,p);S.rgba=C,S.imgwidth=m[0],S.imgheight=p[0];for(var w=0;w<m[0]*p[0]*4;w++)h[w]=C[w];return this.width=m,this.height=p,this.data=h,this}function Jn(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:`<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="`+this.internal.__metadata__.namespaceUri+`"><jspdf:metadata>`+n.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)+`</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>`,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<t.length;++s)if(i[(a=vn(t[s])).family]&&(a.family=i[a.family]),e.hasOwnProperty(a.family)){o=e[a.family];break}if(!(o||=e[r]))throw Error(`Could not find a font-family for the rule '`+Sn(a)+`' and default family '`+r+`'.`);if(o=function(e,t){if(t[e])return t[e];var n=hn[e],r=yn(t,mn,n,n<=hn.normal?-1:1);if(!r)throw Error(`Could not find a matching font-stretch value for `+e);return r}(a.stretch,o),o=function(e,t){if(t[e])return t[e];for(var n=pn[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw Error(`Could not find a matching font-style for `+e)}(a.style,o),!(o=function(e,t){if(t[e])return t[e];if(e===400&&t[500])return t[500];if(e===500&&t[400])return t[400];var n=_n[e],r=yn(t,gn,n,e<400?-1:1);if(!r)throw Error(`Could not find a matching font-weight for value `+e);return r}(a.weight,o)))throw Error(`Failed to resolve a font for the rule '`+Sn(a)+`'.`);return o}(function(e,t){var n=e.getFontList(),r=JSON.stringify(n);return(f===null||m!==r)&&(f=function(e){for(var t={},n=0;n<e.length;++n){var r=vn(e[n]),i=r.family,a=r.stretch,o=r.style,s=r.weight;t[i]=t[i]||{},t[i][a]=t[i][a]||{},t[i][a][o]=t[i][a][o]||{},t[i][a][o][s]=r}return t}(function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=null;switch(e){case`bold`:r={family:n,weight:`bold`};break;case`italic`:r={family:n,style:`italic`};break;case`bolditalic`:r={family:n,weight:`bold`,style:`italic`};break;case``:case`normal`:r={family:n}}r!==null&&(r.ref={name:n,style:e},t.push(r))})}),t}(n).concat(t)),m=r),f}(this.pdf,this.fontFaces),s.map(function(e){return{family:e,stretch:`normal`,weight:r,style:n}}));this.pdf.setFont(c.ref.name,c.ref.style)}else{var l=``;(r===`bold`||parseInt(r,10)>=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<s.length;p++){if(this.pdf.internal.getFont(s[p],l,{noFallback:!0,disableWarning:!0})!==void 0){u=s[p];break}if(l===`bolditalic`&&this.pdf.internal.getFont(s[p],`bold`,{noFallback:!0,disableWarning:!0})!==void 0)u=s[p],l=`bold`;else if(this.pdf.internal.getFont(s[p],`normal`,{noFallback:!0,disableWarning:!0})!==void 0){u=s[p],l=`normal`;break}}if(u===``){for(var h=0;h<s.length;h++)if(d[s[h]]){u=d[s[h]];break}}u=u===``?`Times`:u,this.pdf.setFont(u,l)}}}}),Object.defineProperty(this,`globalCompositeOperation`,{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,`globalAlpha`,{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,`lineDashOffset`,{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,ee.call(this)}}),Object.defineProperty(this,`lineDash`,{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,ee.call(this)}}),Object.defineProperty(this,`ignoreClearRect`,{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=!!e}})};f.prototype.setLineDash=function(e){this.lineDash=e},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){x.call(this,`fill`,!1)},f.prototype.stroke=function(){x.call(this,`stroke`,!1)},f.prototype.beginPath=function(){this.path=[{type:`begin`}]},f.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw Y.error(`jsPDF.context2d.moveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.moveTo`);var n=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:`mt`,x:n.x,y:n.y}),this.ctx.lastPoint=new s(e,t)},f.prototype.closePath=function(){var e=new s(0,0),t=0;for(t=this.path.length-1;t!==-1;t--)if(this.path[t].type===`begin`&&o(this.path[t+1])===`object`&&typeof this.path[t+1].x==`number`){e=new s(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:`close`}),this.ctx.lastPoint=new s(e.x,e.y)},f.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw Y.error(`jsPDF.context2d.lineTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.lineTo`);var n=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:`lt`,x:n.x,y:n.y}),this.ctx.lastPoint=new s(n.x,n.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),x.call(this,null,!0)},f.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw Y.error(`jsPDF.context2d.quadraticCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.quadraticCurveTo`);var i=this.ctx.transform.applyToPoint(new s(n,r)),a=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:`qct`,x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new s(i.x,i.y)},f.prototype.bezierCurveTo=function(e,t,n,r,i,a){if(isNaN(i)||isNaN(a)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Y.error(`jsPDF.context2d.bezierCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.bezierCurveTo`);var o=this.ctx.transform.applyToPoint(new s(i,a)),c=this.ctx.transform.applyToPoint(new s(e,t)),l=this.ctx.transform.applyToPoint(new s(n,r));this.path.push({type:`bct`,x1:c.x,y1:c.y,x2:l.x,y2:l.y,x:o.x,y:o.y}),this.ctx.lastPoint=new s(o.x,o.y)},f.prototype.arc=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw Y.error(`jsPDF.context2d.arc: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.arc`);if(a=!!a,!this.ctx.transform.isIdentity){var o=this.ctx.transform.applyToPoint(new s(e,t));e=o.x,t=o.y;var c=this.ctx.transform.applyToPoint(new s(0,n)),l=this.ctx.transform.applyToPoint(new s(0,0));n=Math.sqrt((c.x-l.x)**2+(c.y-l.y)**2)}Math.abs(i-r)>=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;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`q`);if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},f.prototype.restore=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`Q`);this.pdf.setPage(t),e&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw Error(`toDataUrl not implemented.`)};var p=function(e){var t,n,r,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,i=0;else{var a=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(a!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=1;else if((a=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e))!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=parseFloat(a[4]);else{if(i=1,typeof e==`string`&&e.charAt(0)!==`#`){var o=new et(e);e=o.ok?o.toHex():`#000000`}e.length===4?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:i,style:e}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},h=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};f.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw Y.error(`jsPDF.context2d.fillText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillText`);if(r=isNaN(r)?void 0:r,!m.call(this)){var i=F(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;k.call(this,{text:e,x:t,y:n,scale:a,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw Y.error(`jsPDF.context2d.strokeText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeText`);if(!h.call(this)){r=isNaN(r)?void 0:r;var i=F(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;k.call(this,{text:e,x:t,y:n,scale:a,renderingMode:`stroke`,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.measureText=function(e){if(typeof e!=`string`)throw Y.error(`jsPDF.context2d.measureText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.measureText`);var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*r/t.internal.scaleFactor;return new function(e){var t=(e||={}).width||0;return Object.defineProperty(this,`width`,{get:function(){return t}}),this}({width:i*=Math.round(96*n/72*1e4)/1e4})},f.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw Y.error(`jsPDF.context2d.scale: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.scale`);var n=new l(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.rotate=function(e){if(isNaN(e))throw Y.error(`jsPDF.context2d.rotate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rotate`);var t=new l(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},f.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw Y.error(`jsPDF.context2d.translate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.translate`);var n=new l(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.transform=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a))throw Y.error(`jsPDF.context2d.transform: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.transform`);var o=new l(e,t,n,r,i,a);this.ctx.transform=this.ctx.transform.multiply(o)},f.prototype.setTransform=function(e,t,n,r,i,a){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,a=isNaN(a)?0:a,this.ctx.transform=new l(e,t,n,r,i,a)};var g=function(){return this.margin[0]>0||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;O<E.length;O+=1)D.indexOf(E[O])===-1&&D.push(E[O]);b(D);for(var k=D[0],A=D[D.length-1],j=k;j<A+1;j++){this.pdf.setPage(j);var M=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],N=j===1?this.posY+this.margin[0]:this.margin[0],P=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],I=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],L=j===1?0:P+(j-2)*I;if(this.ctx.clip_path.length!==0){var ee=this.path;T=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(T,this.posX+this.margin[3],-L+N+this.ctx.prevPageLastElemOffset),S.call(this,`fill`,!0),this.path=ee}var R=JSON.parse(JSON.stringify(w));R=y([R],this.posX+this.margin[3],-L+N+this.ctx.prevPageLastElemOffset)[0];var z=(j>k||j<A)&&g.call(this);z&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],M,I,null).clip().discardPath()),this.pdf.addImage(e,`JPEG`,R.x,R.y,R.w,R.h,null,null,x),z&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(e,`JPEG`,w.x,w.y,w.w,w.h,null,null,x)};var _=function(e,t,n){var r=[];t||=this.pdf.internal.pageSize.width,n||=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case`mt`:case`lt`:r.push(Math.floor((e.y+i)/n)+1);break;case`arc`:r.push(Math.floor((e.y+i-e.radius)/n)+1),r.push(Math.floor((e.y+i+e.radius)/n)+1);break;case`qct`:var a=I(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((a.y+i)/n)+1),r.push(Math.floor((a.y+a.h+i)/n)+1);break;case`bct`:var o=L(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((o.y+i)/n)+1),r.push(Math.floor((o.y+o.h+i)/n)+1);break;case`rect`:r.push(Math.floor((e.y+i)/n)+1),r.push(Math.floor((e.y+e.h+i)/n)+1)}for(var s=0;s<r.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<r[s];)v.call(this);return r},v=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,a=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=a},y=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case`bct`:e[r].x2+=t,e[r].y2+=n;case`qct`:e[r].x1+=t,e[r].y1+=n;default:e[r].x+=t,e[r].y+=n}return e},b=function(e){return e.sort(function(e,t){return e-t})},x=function(e,t){var n=this.fillStyle,r=this.strokeStyle,i=this.lineCap,a=this.lineWidth,o=Math.abs(a*this.ctx.transform.scaleX),s=this.lineJoin;if(this.autoPaging){for(var c,l,u=JSON.parse(JSON.stringify(this.path)),d=JSON.parse(JSON.stringify(this.path)),f=[],p=0;p<d.length;p++)if(d[p].x!==void 0)for(var m=_.call(this,d[p]),h=0;h<m.length;h+=1)f.indexOf(m[h])===-1&&f.push(m[h]);for(var x=0;x<f.length;x++)for(;this.pdf.internal.getNumberOfPages()<f[x];)v.call(this);b(f);for(var C=f[0],w=f[f.length-1],T=C;T<w+1;T++){this.pdf.setPage(T),this.fillStyle=n,this.strokeStyle=r,this.lineCap=i,this.lineWidth=o,this.lineJoin=s;var E=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],D=T===1?this.posY+this.margin[0]:this.margin[0],O=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],k=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],A=T===1?0:O+(T-2)*k;if(this.ctx.clip_path.length!==0){var j=this.path;c=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(c,this.posX+this.margin[3],-A+D+this.ctx.prevPageLastElemOffset),S.call(this,e,!0),this.path=j}if(l=JSON.parse(JSON.stringify(u)),this.path=y(l,this.posX+this.margin[3],-A+D+this.ctx.prevPageLastElemOffset),!1===t||T===0){var M=(T>C||T<w)&&g.call(this);M&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],E,k,null).clip().discardPath()),S.call(this,e,t),M&&this.pdf.restoreGraphicsState()}this.lineWidth=a}this.path=u}else this.lineWidth=o,S.call(this,e,t),this.lineWidth=a},S=function(e,t){if((e!==`stroke`||t||!h.call(this))&&(e===`stroke`||t||!m.call(this))){for(var n,r,i=[],a=this.path,o=0;o<a.length;o++){var s=a[o];switch(s.type){case`begin`:i.push({begin:!0});break;case`close`:i.push({close:!0});break;case`mt`:i.push({start:s,deltas:[],abs:[]});break;case`lt`:var c=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(n=[s.x-a[o-1].x,s.y-a[o-1].y],c>0)){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<i.length;v++)if(i[v].arc)for(var y=i[v].abs,b=0;b<y.length;b++){var x=y[b];x.type===`arc`?T.call(this,x.x,x.y,x.radius,x.startAngle,x.endAngle,x.counterclockwise,void 0,t,!_):A.call(this,x.x,x.y),_=!0}else if(!0===i[v].close)this.pdf.internal.out(`h`),_=!1;else if(!0!==i[v].begin){var S=i[v].start.x,C=i[v].start.y;j.call(this,i[v].deltas,S,C),_=!0}r&&E.call(this,r),t&&D.call(this)}},C=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case`bottom`:return e-n;case`top`:return e+t-n;case`hanging`:return e+t-2*n;case`middle`:return e+t/2-n;default:return e}},w=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return this.colorStops.length===0?`#000000`:this.colorStops[0][1]},e.isCanvasGradient=!0,e},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(e,t,n,r,i,a,o,s,c){for(var l=N.call(this,n,r,i,a),u=0;u<l.length;u++){var d=l[u];u===0&&(c?O.call(this,d.x1+e,d.y1+t):A.call(this,d.x1+e,d.y1+t)),M.call(this,e,t,d.x2,d.y2,d.x3,d.y3,d.x4,d.y4)}s?D.call(this):E.call(this,o)},E=function(e){switch(e){case`stroke`:this.pdf.internal.out(`S`);break;case`fill`:this.pdf.internal.out(`f`)}},D=function(){this.pdf.clip(),this.pdf.discardPath()},O=function(e,t){this.pdf.internal.out(n(e)+` `+r(t)+` m`)},k=function(e){var t;switch(e.align){case`right`:case`end`:t=`right`;break;case`center`:t=`center`;break;default:t=`left`}var n,r,i,a=this.pdf.getTextDimensions(e.text),o=C.call(this,e.y),u=w.call(this,o)-a.h,d=this.ctx.transform.applyToPoint(new s(e.x,o));if(this.autoPaging){var f=this.ctx.transform.decompose(),p=new l;p=(p=(p=p.multiply(f.translate)).multiply(f.skew)).multiply(f.scale);for(var m=this.ctx.transform.applyToRectangle(new c(e.x,o,a.w,a.h)),h=p.applyToRectangle(new c(e.x,u,a.w,a.h)),v=_.call(this,h),x=[],T=0;T<v.length;T+=1)x.indexOf(v[T])===-1&&x.push(v[T]);b(x);for(var E=x[0],D=x[x.length-1],O=E;O<D+1;O++){this.pdf.setPage(O);var k=O===1?this.posY+this.margin[0]:this.margin[0],A=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],j=this.pdf.internal.pageSize.height-this.margin[2],M=j-this.margin[0],N=this.pdf.internal.pageSize.width-this.margin[1],P=N-this.margin[3],F=O===1?0:A+(O-2)*M;if(this.ctx.clip_path.length!==0){var I=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(n,this.posX+this.margin[3],-1*F+k),S.call(this,`fill`,!0),this.path=I}var L=y([JSON.parse(JSON.stringify(h))],this.posX+this.margin[3],-F+k+this.ctx.prevPageLastElemOffset)[0];e.scale>=.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<D)&&g.call(this);B&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],P,M,null).clip().discardPath()),this.pdf.text(R,z.x,z.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),B&&this.pdf.restoreGraphicsState()}}else L.y<j&&(this.ctx.prevPageLastElemOffset+=j-L.y);e.scale>=.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);o<i&&r&&(o=i-o);for(var s=[],c=r?-1:1,l=t;o>1e-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;r<e.length;r+=2)n+=String.fromCharCode(`0x`+(e[r]+e[r+1]));return n},a=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=U(t)).reduce(function(e,t){return e+String.fromCharCode(t)},``)};e.processDataByFilters=function(e,o){var s=0,c=e||``,l=[];for(typeof(o||=[])==`string`&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case`ASCII85Decode`:case`/ASCII85Decode`:c=n(c),l.push(`/ASCII85Encode`);break;case`ASCII85Encode`:case`/ASCII85Encode`:c=t(c),l.push(`/ASCII85Decode`);break;case`ASCIIHexDecode`:case`/ASCIIHexDecode`:c=i(c),l.push(`/ASCIIHexEncode`);break;case`ASCIIHexEncode`:case`/ASCIIHexEncode`:c=r(c),l.push(`/ASCIIHexDecode`);break;case`FlateEncode`:case`/FlateEncode`:c=a(c),l.push(`/FlateDecode`);break;default:throw Error(`The filter: "`+o[s]+`" is not implemented`)}return{data:c,reverseChain:l.reverse().join(` `)}}}(Z.API),function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n=typeof n==`function`?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,i=0,a=function(e){var t=e.length,n=[],r=String.fromCharCode;for(i=0;i<t;i+=1)n.push(r(255&e.charCodeAt(i)));return n.join(``)};if(r.open(`GET`,e,!t),r.overrideMimeType(`text/plain; charset=x-user-defined`),!1===t&&(r.onload=function(){r.status===200?n(a(this.responseText)):n(void 0)}),r.send(null),t&&r.status===200)return a(r.responseText)}(e,t,n)}catch{}return r}(e,t,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(Z.API),function(t){function n(){return(J.html2canvas?Promise.resolve(J.html2canvas):s(()=>import(`./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-Dvusk5RS.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;a<n.length;++a){var o=n[a],s=o.src.find(function(e){return e.format===`truetype`});s&&t.addFont(s.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=i.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL(`image/`+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement(`img`),this.prop.img.src=e})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(e,t,n){return(n||=`pdf`).toLowerCase()===`img`||n.toLowerCase()===`image`?this.outputImg(e,t):this.outputPdf(e,t)},l.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},l.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case`img`:return this.prop.img;case`datauristring`:case`dataurlstring`:return this.prop.img.src;case`datauri`:case`dataurl`:return document.location.href=this.prop.img.src;default:throw`Image output type "`+e+`" is not supported.`}})},l.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(e){if(i(e)!==`object`)return this;var t=Object.keys(e||{}).map(function(t){if(t in l.template.prop)return function(){this.prop[t]=e[t]};switch(t){case`margin`:return this.setMargin.bind(this,e.margin);case`jsPDF`:return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case`pageSize`:return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},l.prototype.get=function(e,t){return this.then(function(){var n=e in l.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},l.prototype.setMargin=function(e){return this.then(function(){switch(i(e)){case`number`:e=[e,e,e,e];case`array`:if(e.length===2&&(e=[e[0],e[1],e[0],e[1]]),e.length===4)break;default:return this.error(`Invalid margin array.`)}this.opt.margin=e}).then(this.setPageSize)},l.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e||=Z.getPageSize(this.opt.jsPDF)).hasOwnProperty(`inner`)||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},l.prototype.setProgress=function(e,t,n,r){return e!=null&&(this.progress.val=e),t!=null&&(this.progress.state=t),n!=null&&(this.progress.n=n),r!=null&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},l.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},l.prototype.thenCore=function(e,t,n){n||=Promise.prototype.then;var r=this;e&&=e.bind(r),t&&=t.bind(r);var i=Promise.toString().indexOf(`[native code]`)!==-1&&Promise.name===`Promise`?r:l.convert(Object.assign({},r),Promise.prototype),a=n.call(i,e,t);return l.convert(a,r.__proto__)},l.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},l.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},l.prototype.catch=function(e){e&&=e.bind(this);var t=Promise.prototype.catch.call(this,e);return l.convert(t,this)},l.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},l.prototype.error=function(e){return this.then(function(){throw Error(e)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,Z.getPageSize=function(e,t,n){if(o(e)===`object`){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t||=`mm`,n||=`a4`,e=(``+(e||`P`)).toLowerCase();var i,a=(``+n).toLowerCase(),s={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]};switch(t){case`pt`:i=1;break;case`mm`:i=72/25.4;break;case`cm`:i=72/2.54;break;case`in`:i=72;break;case`px`:i=.75;break;case`pc`:case`em`:i=12;break;case`ex`:i=6;break;default:throw`Invalid unit: `+t}var c,l=0,u=0;if(s.hasOwnProperty(a))l=s[a][1]/i,u=s[a][0]/i;else try{l=n[1],u=n[0]}catch{throw Error(`Invalid format: `+n)}if(e===`p`||e===`portrait`)e=`p`,u>l&&(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<e.length;n++){var r=e[n];if(r===`(`||r===`)`){for(var i=0,a=n-1;a>=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 <</JavaScript `+t+` 0 R>>`)}),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<r.length;i++){var a=r[i],o=n.exec(a);if(o!=null){var s=o[1];e.internal.newObjectDeferredBegin(s,!1)}e.internal.write(a)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,l=[];for(i=0;i<c;i++){var u=e.internal.newObject();l.push(u);var d=e.internal.getPageInfo(i+1);e.internal.write(`<< /D[`+d.objId+` 0 R /XYZ null null null]>> endobj`)}var f=e.internal.newObject();for(e.internal.write(`<< /Names [ `),i=0;i<l.length;i++)e.internal.write(`(page_`+(i+1)+`)`+l[i]+` 0 R`);e.internal.write(` ] >>`,`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;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line(`/Type /Outlines`),e.children.length>0&&(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;r<t.children.length;r++){var i=t.children[r];this.objStart(i),this.line(`/Title `+this.makeString(i.title)),this.line(`/Parent `+this.makeRef(t)),r>0&&this.line(`/Prev `+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line(`/Next `+this.makeRef(t.children[r+1])),i.children.length>0&&(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<t.children.length;s++)this.renderItems(t.children[s])},e.outline.line=function(e){this.ctx.val+=e+`\r
`},e.outline.makeRef=function(e){return e.id+` 0 R`},e.outline.makeString=function(t){return`(`+e.internal.pdfEscape(t)+`)`},e.outline.objStart=function(e){this.ctx.val+=`\r
`+e.id+` 0 obj\r
<<\r
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(Z.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,a,o){var s,c=this.decode.DCT_DECODE,l=null;if(typeof e==`string`||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=r,t.indexOf(e.charCodeAt(o+1))!==-1){n=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),a={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:n,numcomponents:e.charCodeAt(o+9)};break}r=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return a}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),s.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}l={data:e,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:n,alias:r}}return l}}(Z.API),Z.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var a,o=Je(e,{checkCrc:!0}),s=o.width,c=o.height,l=o.channels,u=o.palette,d=o.depth;a=u&&l===1?function(e){for(var t=e.width,n=e.height,r=e.data,a=e.palette,o=e.depth,s=!1,c=[],l=[],u=void 0,d=!1,f=0,p=0;p<a.length;p++){var m=i(a[p],4),h=m[0],g=m[1],_=m[2],v=m[3];c.push(h,g,_),v!=null&&(v===0?(f++,l.length<1&&l.push(p)):v<255&&(d=!0))}if(d||f>1){s=!0,l=void 0;var y=t*n;u=new Uint8Array(y);for(var b=new DataView(r.buffer),x=0;x<y;x++){var S=i(a[Bn(b,x,o)],4)[3];u[x]=S}}else f===0&&(l=void 0);return{colorSpace:`Indexed`,colorsPerPixel:1,sMaskBitsPerComponent:s?8:void 0,colorBytes:r,alphaBytes:u,needSMask:s,palette:c,mask:l}}(o):l===2||l===4?function(e){for(var t=e.data,n=e.width,r=e.height,i=e.channels,a=e.depth,o=i===2?`DeviceGray`:`DeviceRGB`,s=i-1,c=n*r,l=s,u=c*l,d=1*c,f=Math.ceil(u*a/8),p=Math.ceil(d*a/8),m=new Uint8Array(f),h=new Uint8Array(p),g=new DataView(t.buffer),_=new DataView(m.buffer),v=new DataView(h.buffer),y=!1,b=0;b<c;b++){for(var x=b*i,S=0;S<l;S++)Vn(_,Bn(g,x+S,a),b*l+S,a);var C=Bn(g,x+l,a);C<(1<<a)-1&&(y=!0),Vn(v,C,1*b,a)}return{colorSpace:o,colorsPerPixel:s,sMaskBitsPerComponent:y?a:void 0,colorBytes:m,alphaBytes:h,needSMask:y}}(o):function(e){var t=e.data,n=e.channels===1?`DeviceGray`:`DeviceRGB`;return{colorSpace:n,colorsPerPixel:n===`DeviceGray`?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,n=new Uint8Array(2*t),r=new DataView(n.buffer,n.byteOffset,n.byteLength),i=0;i<t;i++)r.setUint16(2*i,e[i],!1);return n}(t):t,needSMask:!1}}(o);var f,p,m,h=a,g=h.colorSpace,_=h.colorsPerPixel,v=h.sMaskBitsPerComponent,y=h.colorBytes,b=h.alphaBytes,x=h.needSMask,S=h.palette,C=h.mask,w=null;return r!==Z.API.image_compression.NONE&&typeof U==`function`?(w=function(e){var t;switch(e){case Z.API.image_compression.FAST:t=11;break;case Z.API.image_compression.MEDIUM:t=13;break;case Z.API.image_compression.SLOW:t=14;break;default:t=12}return t}(r),f=this.decode.FLATE_DECODE,p=`/Predictor ${w} /Colors ${_} /BitsPerComponent ${d} /Columns ${s}`,e=Mn(y,Math.ceil(s*_*d/8),_,d,r),x&&(m=Mn(b,Math.ceil(s*v/8),1,v,r))):(f=void 0,p=void 0,e=y,x&&(m=b)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:n,data:e,index:t,filter:f,decodeParameters:p,transparency:C,palette:S,sMask:m,predictor:w,width:s,height:c,bitsPerComponent:d,sMaskBitsPerComponent:v,colorSpace:g}}},function(e){e.processGIF89A=function(t,n,r,i){var a=new Un(t),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var l={data:c,width:o,height:s},u=new Gn(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(Z.API),Kn.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Kn.prototype.parseBGR=function(){this.pos=this.offset;var e=`bit`+this.bitPP,t=this.width*this.height*4;if(t>536870912)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<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var c=this.palette[a>>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<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>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<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},Kn.prototype.bit15=function(){for(var e=this.width%3,t=31,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>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<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,c=(o>>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<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},Kn.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},Kn.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var a=new Kn(t,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},l=new Gn(100).encode(c,100);return e.processJPEG.call(this,l,n,r,i)}}(Z.API),qn.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var a=new qn(t),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},l=new Gn(100).encode(c,100);return e.processJPEG.call(this,l,n,r,i)}}(Z.API),Z.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,c=0,l=0;l<i;l+=4){var u=r[l],d=r[l+1],f=r[l+2],p=r[l+3];a[s++]=u,a[s++]=d,a[s++]=f,o[c++]=p}var m=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:m,index:t,alias:n,colorSpace:`DeviceRGB`,bitsPerComponent:8,width:e.width,height:e.height}},Z.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:`Afrikaans`,sq:`Albanian`,ar:`Arabic (Standard)`,"ar-DZ":`Arabic (Algeria)`,"ar-BH":`Arabic (Bahrain)`,"ar-EG":`Arabic (Egypt)`,"ar-IQ":`Arabic (Iraq)`,"ar-JO":`Arabic (Jordan)`,"ar-KW":`Arabic (Kuwait)`,"ar-LB":`Arabic (Lebanon)`,"ar-LY":`Arabic (Libya)`,"ar-MA":`Arabic (Morocco)`,"ar-OM":`Arabic (Oman)`,"ar-QA":`Arabic (Qatar)`,"ar-SA":`Arabic (Saudi Arabia)`,"ar-SY":`Arabic (Syria)`,"ar-TN":`Arabic (Tunisia)`,"ar-AE":`Arabic (U.A.E.)`,"ar-YE":`Arabic (Yemen)`,an:`Aragonese`,hy:`Armenian`,as:`Assamese`,ast:`Asturian`,az:`Azerbaijani`,eu:`Basque`,be:`Belarusian`,bn:`Bengali`,bs:`Bosnian`,br:`Breton`,bg:`Bulgarian`,my:`Burmese`,ca:`Catalan`,ch:`Chamorro`,ce:`Chechen`,zh:`Chinese`,"zh-HK":`Chinese (Hong Kong)`,"zh-CN":`Chinese (PRC)`,"zh-SG":`Chinese (Singapore)`,"zh-TW":`Chinese (Taiwan)`,cv:`Chuvash`,co:`Corsican`,cr:`Cree`,hr:`Croatian`,cs:`Czech`,da:`Danish`,nl:`Dutch (Standard)`,"nl-BE":`Dutch (Belgian)`,en:`English`,"en-AU":`English (Australia)`,"en-BZ":`English (Belize)`,"en-CA":`English (Canada)`,"en-IE":`English (Ireland)`,"en-JM":`English (Jamaica)`,"en-NZ":`English (New Zealand)`,"en-PH":`English (Philippines)`,"en-ZA":`English (South Africa)`,"en-TT":`English (Trinidad & Tobago)`,"en-GB":`English (United Kingdom)`,"en-US":`English (United States)`,"en-ZW":`English (Zimbabwe)`,eo:`Esperanto`,et:`Estonian`,fo:`Faeroese`,fj:`Fijian`,fi:`Finnish`,fr:`French (Standard)`,"fr-BE":`French (Belgium)`,"fr-CA":`French (Canada)`,"fr-FR":`French (France)`,"fr-LU":`French (Luxembourg)`,"fr-MC":`French (Monaco)`,"fr-CH":`French (Switzerland)`,fy:`Frisian`,fur:`Friulian`,gd:`Gaelic (Scots)`,"gd-IE":`Gaelic (Irish)`,gl:`Galacian`,ka:`Georgian`,de:`German (Standard)`,"de-AT":`German (Austria)`,"de-DE":`German (Germany)`,"de-LI":`German (Liechtenstein)`,"de-LU":`German (Luxembourg)`,"de-CH":`German (Switzerland)`,el:`Greek`,gu:`Gujurati`,ht:`Haitian`,he:`Hebrew`,hi:`Hindi`,hu:`Hungarian`,is:`Icelandic`,id:`Indonesian`,iu:`Inuktitut`,ga:`Irish`,it:`Italian (Standard)`,"it-CH":`Italian (Switzerland)`,ja:`Japanese`,kn:`Kannada`,ks:`Kashmiri`,kk:`Kazakh`,km:`Khmer`,ky:`Kirghiz`,tlh:`Klingon`,ko:`Korean`,"ko-KP":`Korean (North Korea)`,"ko-KR":`Korean (South Korea)`,la:`Latin`,lv:`Latvian`,lt:`Lithuanian`,lb:`Luxembourgish`,mk:`North Macedonia`,ms:`Malay`,ml:`Malayalam`,mt:`Maltese`,mi:`Maori`,mr:`Marathi`,mo:`Moldavian`,nv:`Navajo`,ng:`Ndonga`,ne:`Nepali`,no:`Norwegian`,nb:`Norwegian (Bokmal)`,nn:`Norwegian (Nynorsk)`,oc:`Occitan`,or:`Oriya`,om:`Oromo`,fa:`Persian`,"fa-IR":`Persian/Iran`,pl:`Polish`,pt:`Portuguese`,"pt-BR":`Portuguese (Brazil)`,pa:`Punjabi`,"pa-IN":`Punjabi (India)`,"pa-PK":`Punjabi (Pakistan)`,qu:`Quechua`,rm:`Rhaeto-Romanic`,ro:`Romanian`,"ro-MO":`Romanian (Moldavia)`,ru:`Russian`,"ru-MO":`Russian (Moldavia)`,sz:`Sami (Lappish)`,sg:`Sango`,sa:`Sanskrit`,sc:`Sardinian`,sd:`Sindhi`,si:`Singhalese`,sr:`Serbian`,sk:`Slovak`,sl:`Slovenian`,so:`Somani`,sb:`Sorbian`,es:`Spanish`,"es-AR":`Spanish (Argentina)`,"es-BO":`Spanish (Bolivia)`,"es-CL":`Spanish (Chile)`,"es-CO":`Spanish (Colombia)`,"es-CR":`Spanish (Costa Rica)`,"es-DO":`Spanish (Dominican Republic)`,"es-EC":`Spanish (Ecuador)`,"es-SV":`Spanish (El Salvador)`,"es-GT":`Spanish (Guatemala)`,"es-HN":`Spanish (Honduras)`,"es-MX":`Spanish (Mexico)`,"es-NI":`Spanish (Nicaragua)`,"es-PA":`Spanish (Panama)`,"es-PY":`Spanish (Paraguay)`,"es-PE":`Spanish (Peru)`,"es-PR":`Spanish (Puerto Rico)`,"es-ES":`Spanish (Spain)`,"es-UY":`Spanish (Uruguay)`,"es-VE":`Spanish (Venezuela)`,sx:`Sutu`,sw:`Swahili`,sv:`Swedish`,"sv-FI":`Swedish (Finland)`,"sv-SV":`Swedish (Sweden)`,ta:`Tamil`,tt:`Tatar`,te:`Teluga`,th:`Thai`,tig:`Tigre`,ts:`Tsonga`,tn:`Tswana`,tr:`Turkish`,tk:`Turkmen`,uk:`Ukrainian`,hsb:`Upper Sorbian`,ur:`Urdu`,ve:`Venda`,vi:`Vietnamese`,vo:`Volapuk`,wa:`Walloon`,cy:`Welsh`,xh:`Xhosa`,ji:`Yiddish`,zu:`Zulu`}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){this.internal.write(`/Lang (`+this.internal.languageSettings.languageCode+`)`)}),this.internal.languageSettings.isSubscribed=!0)),this},En=Z.API,Dn=En.getCharWidthsArray=function(e,t){var n,r,i=(t||={}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),s=t.charSpace||this.internal.getCharSpace(),c=t.widths?t.widths:i.metadata.Unicode.widths,l=c.fof?c.fof:1,u=t.kerning?t.kerning:i.metadata.Unicode.kerning,d=u.fof?u.fof:1,f=!1!==t.doKerning,p=0,m=e.length,h=0,g=c[0]||l,_=[];for(n=0;n<m;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString==`function`?_.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+1e3/a*s||0)/1e3):(p=f&&o(u[r])===`object`&&!isNaN(parseInt(u[r][h],10))?u[r][h]/d:0,_.push((c[r]||g)/l+p)),h=r;return _},On=En.getStringUnitWidth=function(e,t){var n=(t||={}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return En.processArabic&&(e=En.processArabic(e)),typeof r.metadata.widthOfString==`function`?r.metadata.widthOfString(e,n,i)/n:Dn.apply(this,arguments).reduce(function(e,t){return e+t},0)},kn=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var c=a;for(s=0;a!==o;)s+t[a]>r&&(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;a<o;a++){var y=0;if(r=h[a],c&&r[0]==`
`&&(r=r.substr(1),y=1),f+p+(m=(i=Dn.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||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;s<c;s++)l=l.concat(An.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t=`0123456789abcdef`,n=`klmnopqrstuvwxyz`,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var s=function(e){return`0x`+parseInt(e,10).toString(16)},c=e.__fontmetrics__.compress=function(e){var t,n,r,a,l=[`{`];for(var u in e){if(t=e[u],isNaN(parseInt(u,10))?n=`'`+u+`'`:(u=parseInt(u,10),n=(n=s(u).slice(2)).slice(0,-1)+i[n.slice(-1)]),typeof t==`number`)t<0?(r=s(t).slice(3),a=`-`):(r=s(t).slice(2),a=``),r=a+r.slice(0,-1)+i[r.slice(-1)];else{if(o(t)!==`object`)throw Error(`Don't know what to do with value type `+o(t)+`.`);r=c(t)}l.push(n+r)}return l.push(`}`),l.join(``)},l=e.__fontmetrics__.uncompress=function(e){if(typeof e!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var t,n,i,a,o={},s=1,c=o,l=[],u=``,d=``,f=e.length-1,p=1;p<f;p+=1)(a=e[p])==`'`?t?(i=t.join(``),t=void 0):t=[]:t?t.push(a):a==`{`?(l.push([c,i]),c={},i=void 0):a==`}`?((n=l.pop())[0][n[1]]=c,i=void 0,c=n[0]):a==`-`?s=-1:i===void 0?r.hasOwnProperty(a)?(u+=r[a],i=parseInt(u,16)*s,s=1,u=``):u+=a:r.hasOwnProperty(a)?(d+=r[a],c[i]=parseInt(d,16)*s,s=1,i=void 0,d=``):d+=a;return o},u={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:l(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},d={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},f={Unicode:{"Courier-Oblique":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":l(`{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}`),"Helvetica-Bold":l(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),Courier:l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-BoldOblique":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Bold":l(`{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}`),Symbol:l(`{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}`),Helvetica:l(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`),"Helvetica-BoldOblique":l(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),ZapfDingbats:l(`{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-Bold":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Italic":l(`{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}`),"Times-Roman":l(`{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}`),"Helvetica-Oblique":l(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`)}};e.events.push([`addFont`,function(e){var t=e.font,n=f.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=d.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(Z.API),function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push([`addFont`,function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw Error(`Font does not exist in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);if(typeof(r=!1===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!=`string`)throw Error(`Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);(function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(tt(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]})(i,r)}}])}(Z),Z.API.addSvgAsImage=function(e,t,n,r,i,a,o,c){if(isNaN(t)||isNaN(n))throw Y.error(`jsPDF.addSvgAsImage: Invalid coordinates`,arguments),Error(`Invalid coordinates passed to jsPDF.addSvgAsImage`);if(isNaN(r)||isNaN(i))throw Y.error(`jsPDF.addSvgAsImage: Invalid measurements`,arguments),Error(`Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage`);var l=document.createElement(`canvas`);l.width=r,l.height=i;var u=l.getContext(`2d`);u.fillStyle=`#fff`,u.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(J.canvg?Promise.resolve(J.canvg):s(()=>import(`./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;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},Z.API.viewerPreferences=function(e,t){var n;e||={},t||=!1;var r,i,a,s={HideToolbar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:`UseNone`,value:`UseNone`,type:`name`,explicitSet:!1,valueSet:[`UseNone`,`UseOutlines`,`UseThumbs`,`UseOC`],pdfVersion:1.3},Direction:{defaultValue:`L2R`,value:`L2R`,type:`name`,explicitSet:!1,valueSet:[`L2R`,`R2L`],pdfVersion:1.3},ViewArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},ViewClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintScaling:{defaultValue:`AppDefault`,value:`AppDefault`,type:`name`,explicitSet:!1,valueSet:[`AppDefault`,`None`],pdfVersion:1.6},Duplex:{defaultValue:``,value:`none`,type:`name`,explicitSet:!1,valueSet:[`Simplex`,`DuplexFlipShortEdge`,`DuplexFlipLongEdge`,`none`],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:``,value:``,type:`array`,explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:`integer`,explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),l=[],u=0,d=0,f=0;function p(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e===`reset`||!0===t){var m=c.length;for(f=0;f<m;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1}if(o(e)===`object`){for(i in e)if(a=e[i],p(c,i)&&a!==void 0){if(n[i].type===`boolean`&&typeof a==`boolean`)n[i].value=a;else if(n[i].type===`name`&&p(n[i].valueSet,a))n[i].value=a;else if(n[i].type===`integer`&&Number.isInteger(a))n[i].value=a;else if(n[i].type===`array`){for(u=0;u<a.length;u+=1)if(r=!0,a[u].length===1&&typeof a[u][0]==`number`)l.push(String(a[u]-1));else if(a[u].length>1){for(d=0;d<a[u].length;d+=1)typeof a[u][d]!=`number`&&(r=!1);!0===r&&l.push([a[u][0]-1,a[u][1]-1].join(` `))}n[i].value=`[`+l.join(` `)+`]`}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&(n[e].type===`name`?t.push(`/`+e+` /`+n[e].value):t.push(`/`+e+` `+n[e].value));t.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+t.join(`
`)+`
>>`)}),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<s;++o){if(n=t.metadata.characterToGlyph(e.charCodeAt(o)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(o),r.indexOf(n)==-1&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),n==`0`)return a.join(``);n=n.toString(16),a.push(i[4-n.length],n)}return a.join(``)},r=function(e){var t,n,r,i,a,o,s;for(a=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,r=[],o=0,s=(n=Object.keys(e).sort(function(e,t){return e-t})).length;o<s;o++)t=n[o],r.length>=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<c.length;u++)l+=String.fromCharCode(c[u]);var d=a();o({data:l,addLength1:!0,objectId:d}),i(`endobj`);var f=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:f}),i(`endobj`);var p=a();i(`<<`),i(`/Type /FontDescriptor`),i(`/FontName /`+bt(n.fontName)),i(`/FontFile2 `+d+` 0 R`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/Flags `+n.metadata.flags),i(`/StemV `+n.metadata.stemV),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`>>`),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<s.length;l++)c+=String.fromCharCode(s[l]);var u=a();o({data:c,addLength1:!0,objectId:u}),i(`endobj`);var d=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),i(`endobj`);var f=a();i(`<<`),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`/StemV `+n.metadata.stemV),i(`/Type /FontDescriptor`),i(`/FontFile2 `+u+` 0 R`),i(`/Flags 96`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/FontName /`+bt(n.fontName)),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`>>`),i(`endobj`),n.objectNumber=a();for(var p=0;p<n.metadata.hmtx.widths.length;p++)n.metadata.hmtx.widths[p]=parseInt(n.metadata.hmtx.widths[p]*(1e3/n.metadata.head.unitsPerEm));i(`<</Subtype/TrueType/Type/Font/ToUnicode `+d+` 0 R/BaseFont/`+bt(n.fontName)+`/FontDescriptor `+f+` 0 R/Encoding/`+n.encoding+` /FirstChar 29 /LastChar 255 /Widths `+e.API.PDFObject.convert(n.metadata.hmtx.widths)+`>>`),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<m.length;p+=1)u[d].metadata.hasOwnProperty(`cmap`)&&(t=u[d].metadata.cmap.unicode.codeMap[m[p].charCodeAt(0)]),t||m[p].charCodeAt(0)<256&&u[d].metadata.hasOwnProperty(`Unicode`)?f+=m[p]:f+=``;var g=``;return parseInt(d.slice(1))<14||h===`WinAnsiEncoding`?g=c(f,d).split(``).map(function(e){return e.charCodeAt(0).toString(16)}).join(``):h===`Identity-H`&&(g=n(f,u[d])),s.isHex=!0,{text:g,x:i,y:a,options:o,mutex:s}};t.events.push([`postProcessText`,function(e){var t=e.text||``,n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var a=0;for(a=0;a<t.length;a+=1)Array.isArray(t[a])&&t[a].length===3?n.push([i(Object.assign({},r,{text:t[a][0]})).text,t[a][1],t[a][2]]):n.push(i(Object.assign({},r,{text:t[a]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(Z),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]===void 0?null:this.internal.vFS[e]}}(Z.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,a,o,s,c,l=t,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=`(.).(.<.>.<.[.].[.{.}.{.«.».«.‹.›.‹.⁅.⁆.⁅.⁽.⁾.⁽.₍.₎.₍.≤.≥.≤.〈.〉.〈.﹙.﹚.﹙.﹛.﹜.﹛.﹝.﹞.﹝.﹤.﹥.﹤`.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<e.length;n++){if((t=v(e.charAt(n)))===`L`)return!1;if(t===`R`)return!0}return!1},b=function(e,t,o,s){var c,l,u,d,f=t[s];switch(f){case`L`:case`R`:case`LRE`:case`RLE`:case`LRO`:case`RLO`:case`PDF`:g=!1;break;case`N`:case`AN`:break;case`EN`:g&&(f=`AN`);break;case`AL`:g=!0,f=`R`;break;case`WS`:case`BN`:f=`N`;break;case`CS`:s<1||s+1>=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+1<t.length&&t[s+1]===`EN`?`EN`:`N`;break;case`ET`:if(s>0&&o[s-1]===`EN`){f=`EN`;break}if(g){f=`N`;break}for(u=s+1,d=t.length;u<d&&t[u]===`ET`;)u++;f=u<d&&t[u]===`EN`?`EN`:`N`;break;case`NSM`:if(i&&!a){for(d=t.length,u=s+1;u<d&&t[u]===`NSM`;)u++;if(u<d){var p=e[s],m=p>=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;o<m;o++)S[o]=v(e[o]);for(s=0;s<m;s++){if(l=h,y[s]=b(e,S,y,s),a=240&(h=x[l][f[y[s]]]),h&=15,t[s]=c=x[h][5],a>0)if(a===16){for(o=p;o<s;o++)t[o]=1;p=-1}else p=-1;if(x[h][6])p===-1&&(p=s);else if(p>-1){for(o=p;o<s;o++)t[o]=c;p=-1}S[s]===`B`&&(t[s]=0),i.hiLevel|=c}r&&function(e,t,n){for(var r=0;r<n;r++)if(e[r]===`S`){t[r]=_;for(var i=r-1;i>=0&&e[i]===`WS`;i--)t[i]=_}}(S,t,m)},C=function(e,t,r,i,a){if(!(a.hiLevel<e)){if(e===1&&_===1&&!n)return t.reverse(),void(r&&r.reverse());for(var o,s,c,l,u=t.length,d=0;d<u;){if(i[d]>=e){for(c=d+1;c<u&&i[c]>=e;)c++;for(l=d,s=c-1;l<s;l++,s--)o=t[l],t[l]=t[s],t[s]=o,r&&(o=r[l],r[l]=r[s],r[s]=o);d=c}d++}}},w=function(e,t,n){var r=e.split(``),i={hiLevel:_};return n||=[],S(r,n,i),function(e,t,n){if(n.hiLevel!==0&&c)for(var r,i=0;i<e.length;i++)t[i]===1&&(r=m.indexOf(e[i]))>=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<e.length;n++)t[n]=n;a===void 0&&(a=y(e)),s===void 0&&(s=y(e))}(e,t),i||!o||s)if(i&&o&&a^s)_=+!!a,e=x(e,t,n);else if(!i&&o&&s)_=+!!a,e=w(e,t,n),e=x(e,t);else if(!i||a||o||s){if(i&&!o&&a^s)e=x(e,t),a?(_=0,e=w(e,t,n)):(_=1,e=w(e,t,n),e=x(e,t));else if(i&&a&&!o&&s)_=1,e=w(e,t,n),e=x(e,t);else if(!i&&!o&&a^s){var r=c;a?(_=1,e=w(e,t,n),_=0,c=!1,e=w(e,t,n),c=r):(_=0,e=w(e,t,n),e=x(e,t),_=1,c=!1,e=w(e,t,n),c=r,e=x(e,t))}}else _=0,e=w(e,t,n);else _=+!!a,e=w(e,t,n);return e},this.__bidiEngine__.setOptions=function(e){e&&(i=e.isInputVisual,o=e.isOutputVisual,a=e.isInputRtl,s=e.isOutputRtl,c=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.N.N.ET.ET.ET.N.N.N.N.N.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.N.ET.ET.ET.ET.N.N.N.N.L.N.N.BN.N.N.ET.ET.EN.EN.N.L.N.N.N.EN.L.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.N.N.N.N.N.ET.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.R.NSM.R.NSM.NSM.R.NSM.NSM.R.NSM.N.N.N.N.N.N.N.N.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.N.N.N.N.N.R.R.R.R.R.N.N.N.N.N.N.N.N.N.N.N.AN.AN.AN.AN.AN.AN.N.N.AL.ET.ET.AL.CS.AL.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AL.AL.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AN.AN.AN.AN.AN.AN.AN.AN.AN.AN.ET.AN.AN.AL.AL.AL.NSM.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AN.N.NSM.NSM.NSM.NSM.NSM.NSM.AL.AL.NSM.NSM.N.NSM.NSM.NSM.NSM.AL.AL.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.AL.AL.NSM.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AL.N.N.N.N.N.N.N.N.N.N.N.N.N.N.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.R.R.N.N.N.N.R.N.N.N.N.N.WS.WS.WS.WS.WS.WS.WS.WS.WS.WS.WS.BN.BN.BN.L.R.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.WS.B.LRE.RLE.PDF.LRO.RLO.CS.ET.ET.ET.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.CS.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.WS.BN.BN.BN.BN.BN.N.LRI.RLI.FSI.PDI.BN.BN.BN.BN.BN.BN.EN.L.N.N.EN.EN.EN.EN.EN.EN.ES.ES.N.N.N.L.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.ES.ES.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.L.L.N.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.N.N.N.N.N.R.NSM.R.R.R.R.R.R.R.R.R.R.ES.R.R.R.R.R.R.R.R.R.R.R.R.R.N.R.R.R.R.R.N.R.N.R.R.N.R.R.N.R.R.R.R.R.R.R.R.R.R.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.CS.N.CS.N.N.CS.N.N.N.N.N.N.N.N.N.ET.N.N.ES.ES.N.N.N.N.N.ET.ET.N.N.N.N.N.AL.AL.AL.AL.AL.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.N.BN.N.N.N.ET.ET.ET.N.N.N.N.N.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.L.L.L.L.L.L.N.N.L.L.L.L.L.L.N.N.L.L.L.L.L.L.N.N.L.L.L.N.N.N.ET.ET.N.N.N.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N`.split(`.`),n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push([`postProcessText`,function(e){var t=e.text;e.x,e.y;var r=e.options||{};e.mutex,r.lang;var i=[];if(r.isInputVisual=typeof r.isInputVisual!=`boolean`||r.isInputVisual,n.setOptions(r),Object.prototype.toString.call(t)===`[object Array]`){var a=0;for(i=[],a=0;a<t.length;a+=1)Object.prototype.toString.call(t[a])===`[object Array]`?i.push([n.doBidiReorder(t[a][0]),t[a][1],t[a][2]]):i.push([n.doBidiReorder(t[a])]);e.text=i}else e.text=n.doBidiReorder(t);n.setOptions({isInputVisual:!0})}])}(Z),Z.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new Zn(e),this.contents.pos=4,t.readString(4)===`ttcf`)throw Error(`TTCF not supported.`);t.pos=0,this.parse(),this.subset=new gr(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new Qn(this.contents),this.head=new tr(this),this.name=new cr(this),this.cmap=new rr(this),this.toUnicode={},this.hhea=new ir(this),this.maxp=new lr(this),this.hmtx=new ur(this),this.post=new or(this),this.os2=new ar(this),this.loca=new hr(this),this.glyf=new fr(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var e,t,n,r,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,r,i;for(i=[],t=0,n=(r=this.bbox).length;t<n;t++)e=r[t],i.push(Math.round(e*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(n=255&(r=this.post.italic_angle),32768&(t=r>>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?i<o:i>o;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?t<e:t>e;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?t<n:t>n;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?n<e:n>e;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;n<r;n++)t=e[n],i.push(this.writeByte(t));return i},e}(),Qn=function(){var e;function t(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:n>r;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;t<i;t=t+=4)n+=r.readUInt32();return 4294967295&n},t}(),$n={}.hasOwnProperty,er=function(e,t){for(var n in t)$n.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};Xn=function(){function e(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var tr=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`head`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},e.prototype.encode=function(e){var t;return(t=new Zn).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},e}(),nr=function(){function e(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),u=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(f=e.readUInt16(),d=f/2,e.pos+=6,i=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;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?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),c=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;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?t<r:t>r;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=g=0,v=i.length;g<v;s=++g)for(h=i[s],n=_=p=m[s];p<=h?_<=h:_>=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<P;A++)_[H=e[r=a[A]]]??(_[H]=++m),i[r]={old:e[r],new:_[e[r]]},h[r]=_[e[r]];return k.writeUInt16(1),k.writeUInt16(0),k.writeUInt32(12),k.writeUInt16(0),k.writeUInt16(262),k.writeUInt16(0),k.write(h),{charMap:i,subtable:k.data,maxGlyphID:m+1};case`unicode`:for(D=[],u=[],v=0,_={},n={},g=c=null,j=0,F=a.length;j<F;j++)_[b=e[r=a[j]]]??(_[b]=++v),n[r]={old:b,new:_[b]},o=_[b]-r,g!=null&&o===c||(g&&u.push(g),D.push(r),c=o),g=r;for(g&&u.push(g),u.push(65535),D.push(65535),T=2*(w=D.length),C=2*(Math.log(w)/Math.LN2)**2,d=Math.log(C/2)/Math.LN2,S=2*w-C,s=[],x=[],f=[],p=M=0,I=D.length;M<I;p=++M){if(E=D[p],l=u[p],E===65535){s.push(0),x.push(0);break}if(E-(O=n[E].new)>=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;te<L;te++)r=u[te],k.writeUInt16(r);for(k.writeUInt16(0),V=0,ee=D.length;V<ee;V++)r=D[V],k.writeUInt16(r);for(U=0,R=s.length;U<R;U++)o=s[U],k.writeUInt16(o);for(ne=0,z=x.length;ne<z;ne++)y=x[ne],k.writeUInt16(y);for(W=0,B=f.length;W<B;W++)m=f[W],k.writeUInt16(m);return{charMap:n,subtable:k.data,maxGlyphID:v+1}}},e}(),rr=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`cmap`,e.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:n>r;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?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)t=e.readByte(),r.push(this.names.push(e.readString(t)));return r;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 262144:return this.map=function(){var t,n,r;for(r=[],i=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:t>n;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?i<t:i>t;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;l<u;i=++l)r=n[i],e.pos=r.offset,c=e.readString(r.length),a=new sr(c,r),s[d=r.nameID]??(s[d]=[]),s[r.nameID].push(a);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,``)}catch{this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,``)}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},e}(),lr=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`maxp`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},e}(),ur=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`hmtx`,e.prototype.parse=function(e){var t,n,r,i,a,o,s;for(e.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;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?n<r:n>r;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;e<t;e++)i=n[e],r.push(i.advance);return r}.call(this),n=this.widths[this.widths.length-1],s=[],t=a=0;0<=r?a<r:a>r;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;o<s;o++)r=e[t[o]],i.push(a.length),r&&(a=a.concat(r.encode(n)));return i.push(a.length),{table:a,offsets:i}},e}(),pr=function(){function e(e,t,n,r,i,a){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),mr=function(){function e(e,t,n,r,i){var a,o;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return e.prototype.encode=function(){var e,t,n;for(t=new Zn(dr.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),hr=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return er(e,Xn),e.prototype.tag=`loca`,e.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=2)r.push(2*e.readUInt16());return r}.call(this):function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=4)r.push(e.readUInt32());return r}.call(this)},e.prototype.indexOf=function(e){return this.offsets[e]},e.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},e.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),r=0,i=0,a=0;a<n.length;++a)if(n[a]=r,i<t.length&&t[i]==a){++i,n[a]=r;var o=this.offsets[a],s=this.offsets[a+1]-o;s>0&&(r+=s)}for(var c=Array(4*n.length),l=0;l<n.length;++l)c[4*l+3]=255&n[l],c[4*l+2]=(65280&n[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;a<o;a++)r[i=e[a]]=this.font.glyf.glyphFor(i);for(i in t=[],r)(n=r[i])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)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<t;e++)o=u[e],n.push(l[o]);return n}(),i=this.font.glyf.encode(a,m,f),c=this.font.loca.encode(i.offsets,m),h={cmap:this.font.cmap.raw(),glyf:i.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(h[`OS/2`]=this.font.os2.raw()),this.font.directory.encode(h)},e}();Z.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join(`0`)+e).slice(-t)},t.convert=function(n){var r,i,a,o;if(Array.isArray(n))return`[`+function(){var e,i,a;for(a=[],e=0,i=n.length;e<i;e++)r=n[e],a.push(t.convert(r));return a}().join(` `)+`]`;if(typeof n==`string`)return`/`+n;if(n?.isString)return`(`+n+`)`;if(n instanceof Date)return`(D:`+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+`Z)`;if({}.toString.call(n)===`[object Object]`){for(i in a=[`<<`],n)o=n[i],a.push(`/`+i+` `+t.convert(o));return a.push(`>>`),a.join(`
`)}return``+n},t}();export{Z as default,Z as jsPDF};