const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-B1FLOTc-.js","assets/openlayers-D8ReJJOp.js","assets/openlayers-BtPuoxOl.css"])))=>i.map(i=>d[i]); import{_ as _s}from"./openlayers-D8ReJJOp.js";function xe(n){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(n)}var Qn=Uint8Array,Dn=Uint16Array,ul=Int32Array,fl=new Qn([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]),hl=new Qn([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]),Kl=new Qn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),gf=function(n,t){for(var e=new Dn(31),r=0;r<31;++r)e[r]=t+=1<>1|(Ee&21845)<<1;Xr=(Xr&52428)>>2|(Xr&13107)<<2,Xr=(Xr&61680)>>4|(Xr&3855)<<4,Xs[Ee]=((Xr&65280)>>8|(Xr&255)<<8)>>1}var Ea=(function(n,t,e){for(var r=n.length,a=0,i=new Dn(t);a>u]=h}else for(l=new Dn(r),a=0;a>15-n[a]);return l}),Ai=new Qn(288);for(var Ee=0;Ee<144;++Ee)Ai[Ee]=8;for(var Ee=144;Ee<256;++Ee)Ai[Ee]=9;for(var Ee=256;Ee<280;++Ee)Ai[Ee]=7;for(var Ee=280;Ee<288;++Ee)Ai[Ee]=8;var jo=new Qn(32);for(var Ee=0;Ee<32;++Ee)jo[Ee]=5;var rc=Ea(Ai,9,0),ic=Ea(jo,5,0),mf=function(n){return(n+7)/8|0},ac=function(n,t,e){return(e==null||e>n.length)&&(e=n.length),new Qn(n.subarray(t,e))},Fr=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8},Fa=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8,n[r+2]|=e>>16},Ns=function(n,t){for(var e=[],r=0;rx&&(x=i[r].s);var g=new Dn(x+1),P=$s(e[p-1],g,0);if(P>t){var r=0,C=0,B=P-t,S=1<t)C+=S-(1<>=B;C>0;){var V=i[r].s;g[V]=0&&C;--r){var T=i[r].s;g[T]==t&&(--g[T],++C)}P=t}return{t:new Qn(g),l:P}},$s=function(n,t,e){return n.s==-1?Math.max($s(n.l,t,e+1),$s(n.r,t,e+1)):t[n.s]=e},$l=function(n){for(var t=n.length;t&&!n[--t];);for(var e=new Dn(++t),r=0,a=n[0],i=1,f=function(u){e[r++]=u},l=1;l<=t;++l)if(n[l]==a&&l!=t)++i;else{if(!a&&i>2){for(;i>138;i-=138)f(32754);i>2&&(f(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(f(a),--i;i>6;i-=6)f(8304);i>2&&(f(i-3<<5|8208),i=0)}for(;i--;)f(a);i=1,a=n[l]}return{c:e.subarray(0,r),n:t}},Ia=function(n,t){for(var e=0,r=0;r>8,n[a+2]=n[a]^255,n[a+3]=n[a+1]^255;for(var i=0;i4&&!tt[Kl[O-1]];--O);var z=h+5<<3,U=Ia(a,Ai)+Ia(i,jo)+f,rt=Ia(a,x)+Ia(i,C)+f+14+3*O+Ia(dt,tt)+2*dt[16]+3*dt[17]+7*dt[18];if(u>=0&&z<=U&&z<=rt)return bf(t,p,n.subarray(u,u+h));var st,ft,nt,ct;if(Fr(t,p,1+(rt15&&(Fr(t,p,D[X]>>5&127),p+=D[X]>>12)}}else st=rc,ft=Ai,nt=ic,ct=jo;for(var X=0;X255){var M=H>>18&31;Fa(t,p,st[M+257]),p+=ft[M+257],M>7&&(Fr(t,p,H>>23&31),p+=fl[M]);var J=H&31;Fa(t,p,nt[J]),p+=ct[J],J>3&&(Fa(t,p,H>>5&8191),p+=hl[J])}else Fa(t,p,st[H]),p+=ft[H]}return Fa(t,p,st[256]),p+ft[256]},oc=new ul([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),wf=new Qn(0),sc=function(n,t,e,r,a,i){var f=i.z||n.length,l=new Qn(r+f+5*(1+Math.ceil(f/7e3))+a),u=l.subarray(r,l.length-a),h=i.l,p=(i.r||0)&7;if(t){p&&(u[0]=i.r>>3);for(var w=oc[t-1],x=w>>13,g=w&8191,P=(1<7e3||tt>24576)&&(st>423||!h)){p=Zl(n,u,0,T,it,mt,X,tt,O,R-O,p),tt=dt=X=0,O=R;for(var ft=0;ft<286;++ft)it[ft]=0;for(var ft=0;ft<30;++ft)mt[ft]=0}var nt=2,ct=0,_t=g,wt=U-rt&32767;if(st>2&&z==V(R-wt))for(var _=Math.min(x,st)-1,D=Math.min(32767,R),M=Math.min(258,st);wt<=D&&--_t&&U!=rt;){if(n[R+nt]==n[R+nt-wt]){for(var H=0;Hnt){if(nt=H,ct=wt,H>_)break;for(var J=Math.min(wt,H-2),Z=0,ft=0;ftZ&&(Z=gt,rt=at)}}}U=rt,rt=C[U],wt+=U-rt&32767}if(ct){T[tt++]=268435456|Ks[nt]<<18|Xl[ct];var At=Ks[nt]&31,kt=Xl[ct]&31;X+=fl[At]+hl[kt],++it[257+At],++mt[kt],L=R+nt,++dt}else T[tt++]=n[R],++it[n[R]]}}for(R=Math.max(R,L);R=f&&(u[p/8|0]=h,St=f),p=bf(u,p+1,n.subarray(R,St))}i.i=f}return ac(l,0,r+mf(p)+a)},yf=function(){var n=1,t=0;return{p:function(e){for(var r=n,a=t,i=e.length|0,f=0;f!=i;){for(var l=Math.min(f+2655,i);f>16),a=(a&65535)+15*(a>>16)}n=r,t=a},d:function(){return n%=65521,t%=65521,(n&255)<<24|(n&65280)<<8|(t&255)<<8|t>>8}}},lc=function(n,t,e,r,a){if(!a&&(a={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),f=new Qn(i.length+n.length);f.set(i),f.set(n,i.length),n=f,a.w=i.length}return sc(n,t.level==null?6:t.level,t.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+t.mem,e,r,a)},xf=function(n,t,e){for(;e;++t)n[t]=e,e>>>=8},uc=function(n,t){var e=t.level,r=e==0?0:e<6?1:e==9?3:2;if(n[0]=120,n[1]=r<<6|(t.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,t.dictionary){var a=yf();a.p(t.dictionary),xf(n,2,a.d())}};function Zs(n,t){t||(t={});var e=yf();e.p(n);var r=lc(n,t,t.dictionary?6:2,4);return uc(r,t),xf(r,r.length-4,e.d()),r}var fc=typeof TextDecoder<"u"&&new TextDecoder,hc=0;try{fc.decode(wf,{stream:!0}),hc=1}catch{}function cc(n){if(Array.isArray(n))return n}function dc(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,a,i,f,l=[],u=!0,h=!1;try{if(i=(e=e.call(n)).next,t!==0)for(;!(u=(r=i.call(e)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(p){h=!0,a=p}finally{try{if(!u&&e.return!=null&&(f=e.return(),Object(f)!==f))return}finally{if(h)throw a}}return l}}function Ql(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e{const n=new Uint8Array(4),t=new Uint32Array(n.buffer);return!((t[0]=1)&n[0])})(),Ls={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};class cl{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=bc,e={}){let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const a=e.offset?e.offset>>>0:0,i=t.byteLength-a;let f=a;(ArrayBuffer.isView(t)||t instanceof cl)&&(t.byteLength!==t.buffer.byteLength&&(f=t.byteOffset+a),t=t.buffer),r?this.lastWrittenByte=i:this.lastWrittenByte=0,this.buffer=t,this.length=i,this.byteLength=i,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,i),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,a=new Uint8Array(r);a.set(new Uint8Array(this.buffer)),this.buffer=a.buffer,this.length=r,this.byteLength=r,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(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=Ls[e].BYTES_PER_ELEMENT*t,a=this.byteOffset+this.offset,i=this.buffer.slice(a,a+r);if(this.littleEndian===wc&&e!=="uint8"&&e!=="int8"){const l=new Uint8Array(this.buffer.slice(a,a+r));l.reverse();const u=new Ls[e](l.buffer);return this.offset+=r,u.reverse(),u}const f=new Ls[e](i);return this.offset+=r,f}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;rthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function oa(n){let t=n.length;for(;--t>=0;)n[t]=0}const yc=3,xc=258,Af=29,Ac=256,_c=Ac+1+Af,_f=30,Nc=512,Lc=new Array((_c+2)*2);oa(Lc);const Sc=new Array(_f*2);oa(Sc);const kc=new Array(Nc);oa(kc);const Pc=new Array(xc-yc+1);oa(Pc);const Cc=new Array(Af);oa(Cc);const Fc=new Array(_f);oa(Fc);const Ic=(n,t,e,r)=>{let a=n&65535|0,i=n>>>16&65535|0,f=0;for(;e!==0;){f=e>2e3?2e3:e,e-=f;do a=a+t[r++]|0,i=i+a|0;while(--f);a%=65521,i%=65521}return a|i<<16|0};var Qs=Ic;const Ec=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},jc=new Uint32Array(Ec()),Oc=(n,t,e,r)=>{const a=jc,i=r+e;n^=-1;for(let f=r;f>>8^a[(n^t[f])&255];return n^-1};var cr=Oc,tl={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Nf={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const Bc=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var Dc=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)Bc(e,r)&&(n[r]=e[r])}}return n},Rc=n=>{let t=0;for(let r=0,a=n.length;r=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;Ba[254]=Ba[254]=1;var Mc=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,a,i,f=n.length,l=0;for(a=0;a>>6,t[i++]=128|e&63):e<65536?(t[i++]=224|e>>>12,t[i++]=128|e>>>6&63,t[i++]=128|e&63):(t[i++]=240|e>>>18,t[i++]=128|e>>>12&63,t[i++]=128|e>>>6&63,t[i++]=128|e&63);return t};const Tc=(n,t)=>{if(t<65534&&n.subarray&&Sf)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,a;const i=new Array(e*2);for(a=0,r=0;r4){i[a++]=65533,r+=l-1;continue}for(f&=l===2?31:l===3?15:7;l>1&&r1){i[a++]=65533;continue}f<65536?i[a++]=f:(f-=65536,i[a++]=55296|f>>10&1023,i[a++]=56320|f&1023)}return Tc(i,a)},Uc=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+Ba[n[e]]>t?e:t},el={string2buf:Mc,buf2string:qc,utf8border:Uc};function zc(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Hc=zc;const wo=16209,Wc=16191;var Gc=function(t,e){let r,a,i,f,l,u,h,p,w,x,g,P,C,B,S,G,V,T,it,mt,dt,X,R,tt;const L=t.state;r=t.next_in,R=t.input,a=r+(t.avail_in-5),i=t.next_out,tt=t.output,f=i-(e-t.avail_out),l=i+(t.avail_out-257),u=L.dmax,h=L.wsize,p=L.whave,w=L.wnext,x=L.window,g=L.hold,P=L.bits,C=L.lencode,B=L.distcode,S=(1<>>24,g>>>=T,P-=T,T=V>>>16&255,T===0)tt[i++]=V&65535;else if(T&16){it=V&65535,T&=15,T&&(P>>=T,P-=T),P<15&&(g+=R[r++]<>>24,g>>>=T,P-=T,T=V>>>16&255,T&16){if(mt=V&65535,T&=15,Pu){t.msg="invalid distance too far back",L.mode=wo;break t}if(g>>>=T,P-=T,T=i-f,mt>T){if(T=mt-T,T>p&&L.sane){t.msg="invalid distance too far back",L.mode=wo;break t}if(dt=0,X=x,w===0){if(dt+=h-T,T2;)tt[i++]=X[dt++],tt[i++]=X[dt++],tt[i++]=X[dt++],it-=3;it&&(tt[i++]=X[dt++],it>1&&(tt[i++]=X[dt++]))}else{dt=i-mt;do tt[i++]=tt[dt++],tt[i++]=tt[dt++],tt[i++]=tt[dt++],it-=3;while(it>2);it&&(tt[i++]=tt[dt++],it>1&&(tt[i++]=tt[dt++]))}}else if((T&64)===0){V=B[(V&65535)+(g&(1<>3,r-=it,P-=it<<3,g&=(1<{const u=l.bits;let h=0,p=0,w=0,x=0,g=0,P=0,C=0,B=0,S=0,G=0,V,T,it,mt,dt,X=null,R;const tt=new Uint16Array(Ki+1),L=new Uint16Array(Ki+1);let O=null,z,U,rt;for(h=0;h<=Ki;h++)tt[h]=0;for(p=0;p=1&&tt[x]===0;x--);if(g>x&&(g=x),x===0)return a[i++]=1<<24|64<<16|0,a[i++]=1<<24|64<<16|0,l.bits=1,0;for(w=1;w0&&(n===iu||x!==1))return-1;for(L[1]=0,h=1;hnu||n===au&&S>ru)return 1;for(;;){z=h-C,f[p]+1=R?(U=O[f[p]-R],rt=X[f[p]-R]):(U=96,rt=0),V=1<>C)+T]=z<<24|U<<16|rt|0;while(T!==0);for(V=1<>=1;if(V!==0?(G&=V-1,G+=V):G=0,p++,--tt[h]===0){if(h===x)break;h=t[e+f[p]]}if(h>g&&(G&mt)!==it){for(C===0&&(C=g),dt+=w,P=h-C,B=1<nu||n===au&&S>ru)return 1;it=G&mt,a[it]=g<<24|P<<16|dt-i|0}}return G!==0&&(a[dt+G]=h-C<<24|64<<16|0),l.bits=g,0};var ja=Xc;const $c=0,kf=1,Pf=2,{Z_FINISH:ou,Z_BLOCK:Zc,Z_TREES:yo,Z_OK:_i,Z_STREAM_END:Qc,Z_NEED_DICT:t1,Z_STREAM_ERROR:Wn,Z_DATA_ERROR:Cf,Z_MEM_ERROR:Ff,Z_BUF_ERROR:e1,Z_DEFLATED:su}=Nf,To=16180,lu=16181,uu=16182,fu=16183,hu=16184,cu=16185,du=16186,pu=16187,gu=16188,vu=16189,Oo=16190,Ir=16191,ks=16192,mu=16193,Ps=16194,bu=16195,wu=16196,yu=16197,xu=16198,xo=16199,Ao=16200,Au=16201,_u=16202,Nu=16203,Lu=16204,Su=16205,Cs=16206,ku=16207,Pu=16208,Be=16209,If=16210,Ef=16211,n1=852,r1=592,i1=15,a1=i1,Cu=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function o1(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Li=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.modeEf?1:0},jf=n=>{if(Li(n))return Wn;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=To,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(n1),t.distcode=t.distdyn=new Int32Array(r1),t.sane=1,t.back=-1,_i},Of=n=>{if(Li(n))return Wn;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,jf(n)},Bf=(n,t)=>{let e;if(Li(n))return Wn;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Wn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,Of(n))},Df=(n,t)=>{if(!n)return Wn;const e=new o1;n.state=e,e.strm=n,e.window=null,e.mode=To;const r=Bf(n,t);return r!==_i&&(n.state=null),r},s1=n=>Df(n,a1);let Fu=!0,Fs,Is;const l1=n=>{if(Fu){Fs=new Int32Array(512),Is=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(ja(kf,n.lens,0,288,Fs,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;ja(Pf,n.lens,0,32,Is,0,n.work,{bits:5}),Fu=!1}n.lencode=Fs,n.lenbits=9,n.distcode=Is,n.distbits=5},Rf=(n,t,e,r)=>{let a;const i=n.state;return i.window===null&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(e-i.wsize,e),0),i.wnext=0,i.whave=i.wsize):(a=i.wsize-i.wnext,a>r&&(a=r),i.window.set(t.subarray(e-r,e-r+a),i.wnext),r-=a,r?(i.window.set(t.subarray(e-r,e),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave{let e,r,a,i,f,l,u,h,p,w,x,g,P,C,B=0,S,G,V,T,it,mt,dt,X;const R=new Uint8Array(4);let tt,L;const O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Li(n)||!n.output||!n.input&&n.avail_in!==0)return Wn;e=n.state,e.mode===Ir&&(e.mode=ks),f=n.next_out,a=n.output,u=n.avail_out,i=n.next_in,r=n.input,l=n.avail_in,h=e.hold,p=e.bits,w=l,x=u,X=_i;t:for(;;)switch(e.mode){case To:if(e.wrap===0){e.mode=ks;break}for(;p<16;){if(l===0)break t;l--,h+=r[i++]<>>8&255,e.check=cr(e.check,R,2,0),h=0,p=0,e.mode=lu;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((h&255)<<8)+(h>>8))%31){n.msg="incorrect header check",e.mode=Be;break}if((h&15)!==su){n.msg="unknown compression method",e.mode=Be;break}if(h>>>=4,p-=4,dt=(h&15)+8,e.wbits===0&&(e.wbits=dt),dt>15||dt>e.wbits){n.msg="invalid window size",e.mode=Be;break}e.dmax=1<>8&1),e.flags&512&&e.wrap&4&&(R[0]=h&255,R[1]=h>>>8&255,e.check=cr(e.check,R,2,0)),h=0,p=0,e.mode=uu;case uu:for(;p<32;){if(l===0)break t;l--,h+=r[i++]<>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,e.check=cr(e.check,R,4,0)),h=0,p=0,e.mode=fu;case fu:for(;p<16;){if(l===0)break t;l--,h+=r[i++]<>8),e.flags&512&&e.wrap&4&&(R[0]=h&255,R[1]=h>>>8&255,e.check=cr(e.check,R,2,0)),h=0,p=0,e.mode=hu;case hu:if(e.flags&1024){for(;p<16;){if(l===0)break t;l--,h+=r[i++]<>>8&255,e.check=cr(e.check,R,2,0)),h=0,p=0}else e.head&&(e.head.extra=null);e.mode=cu;case cu:if(e.flags&1024&&(g=e.length,g>l&&(g=l),g&&(e.head&&(dt=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(i,i+g),dt)),e.flags&512&&e.wrap&4&&(e.check=cr(e.check,r,g,i)),l-=g,i+=g,e.length-=g),e.length))break t;e.length=0,e.mode=du;case du:if(e.flags&2048){if(l===0)break t;g=0;do dt=r[i+g++],e.head&&dt&&e.length<65536&&(e.head.name+=String.fromCharCode(dt));while(dt&&g>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=Ir;break;case vu:for(;p<32;){if(l===0)break t;l--,h+=r[i++]<>>=p&7,p-=p&7,e.mode=Cs;break}for(;p<3;){if(l===0)break t;l--,h+=r[i++]<>>=1,p-=1,h&3){case 0:e.mode=mu;break;case 1:if(l1(e),e.mode=xo,t===yo){h>>>=2,p-=2;break t}break;case 2:e.mode=wu;break;case 3:n.msg="invalid block type",e.mode=Be}h>>>=2,p-=2;break;case mu:for(h>>>=p&7,p-=p&7;p<32;){if(l===0)break t;l--,h+=r[i++]<>>16^65535)){n.msg="invalid stored block lengths",e.mode=Be;break}if(e.length=h&65535,h=0,p=0,e.mode=Ps,t===yo)break t;case Ps:e.mode=bu;case bu:if(g=e.length,g){if(g>l&&(g=l),g>u&&(g=u),g===0)break t;a.set(r.subarray(i,i+g),f),l-=g,i+=g,u-=g,f+=g,e.length-=g;break}e.mode=Ir;break;case wu:for(;p<14;){if(l===0)break t;l--,h+=r[i++]<>>=5,p-=5,e.ndist=(h&31)+1,h>>>=5,p-=5,e.ncode=(h&15)+4,h>>>=4,p-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Be;break}e.have=0,e.mode=yu;case yu:for(;e.have>>=3,p-=3}for(;e.have<19;)e.lens[O[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,tt={bits:e.lenbits},X=ja($c,e.lens,0,19,e.lencode,0,e.work,tt),e.lenbits=tt.bits,X){n.msg="invalid code lengths set",e.mode=Be;break}e.have=0,e.mode=xu;case xu:for(;e.have>>24,G=B>>>16&255,V=B&65535,!(S<=p);){if(l===0)break t;l--,h+=r[i++]<>>=S,p-=S,e.lens[e.have++]=V;else{if(V===16){for(L=S+2;p>>=S,p-=S,e.have===0){n.msg="invalid bit length repeat",e.mode=Be;break}dt=e.lens[e.have-1],g=3+(h&3),h>>>=2,p-=2}else if(V===17){for(L=S+3;p>>=S,p-=S,dt=0,g=3+(h&7),h>>>=3,p-=3}else{for(L=S+7;p>>=S,p-=S,dt=0,g=11+(h&127),h>>>=7,p-=7}if(e.have+g>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Be;break}for(;g--;)e.lens[e.have++]=dt}}if(e.mode===Be)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Be;break}if(e.lenbits=9,tt={bits:e.lenbits},X=ja(kf,e.lens,0,e.nlen,e.lencode,0,e.work,tt),e.lenbits=tt.bits,X){n.msg="invalid literal/lengths set",e.mode=Be;break}if(e.distbits=6,e.distcode=e.distdyn,tt={bits:e.distbits},X=ja(Pf,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,tt),e.distbits=tt.bits,X){n.msg="invalid distances set",e.mode=Be;break}if(e.mode=xo,t===yo)break t;case xo:e.mode=Ao;case Ao:if(l>=6&&u>=258){n.next_out=f,n.avail_out=u,n.next_in=i,n.avail_in=l,e.hold=h,e.bits=p,Gc(n,x),f=n.next_out,a=n.output,u=n.avail_out,i=n.next_in,r=n.input,l=n.avail_in,h=e.hold,p=e.bits,e.mode===Ir&&(e.back=-1);break}for(e.back=0;B=e.lencode[h&(1<>>24,G=B>>>16&255,V=B&65535,!(S<=p);){if(l===0)break t;l--,h+=r[i++]<>T)],S=B>>>24,G=B>>>16&255,V=B&65535,!(T+S<=p);){if(l===0)break t;l--,h+=r[i++]<>>=T,p-=T,e.back+=T}if(h>>>=S,p-=S,e.back+=S,e.length=V,G===0){e.mode=Su;break}if(G&32){e.back=-1,e.mode=Ir;break}if(G&64){n.msg="invalid literal/length code",e.mode=Be;break}e.extra=G&15,e.mode=Au;case Au:if(e.extra){for(L=e.extra;p>>=e.extra,p-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=_u;case _u:for(;B=e.distcode[h&(1<>>24,G=B>>>16&255,V=B&65535,!(S<=p);){if(l===0)break t;l--,h+=r[i++]<>T)],S=B>>>24,G=B>>>16&255,V=B&65535,!(T+S<=p);){if(l===0)break t;l--,h+=r[i++]<>>=T,p-=T,e.back+=T}if(h>>>=S,p-=S,e.back+=S,G&64){n.msg="invalid distance code",e.mode=Be;break}e.offset=V,e.extra=G&15,e.mode=Nu;case Nu:if(e.extra){for(L=e.extra;p>>=e.extra,p-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Be;break}e.mode=Lu;case Lu:if(u===0)break t;if(g=x-u,e.offset>g){if(g=e.offset-g,g>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Be;break}g>e.wnext?(g-=e.wnext,P=e.wsize-g):P=e.wnext-g,g>e.length&&(g=e.length),C=e.window}else C=a,P=f-e.offset,g=e.length;g>u&&(g=u),u-=g,e.length-=g;do a[f++]=C[P++];while(--g);e.length===0&&(e.mode=Ao);break;case Su:if(u===0)break t;a[f++]=e.length,u--,e.mode=Ao;break;case Cs:if(e.wrap){for(;p<32;){if(l===0)break t;l--,h|=r[i++]<{if(Li(n))return Wn;let t=n.state;return t.window&&(t.window=null),n.state=null,_i},h1=(n,t)=>{if(Li(n))return Wn;const e=n.state;return(e.wrap&2)===0?Wn:(e.head=t,t.done=!1,_i)},c1=(n,t)=>{const e=t.length;let r,a,i;return Li(n)||(r=n.state,r.wrap!==0&&r.mode!==Oo)?Wn:r.mode===Oo&&(a=1,a=Qs(a,t,e,0),a!==r.check)?Cf:(i=Rf(n,t,e,e),i?(r.mode=If,Ff):(r.havedict=1,_i))};var d1=Of,p1=Bf,g1=jf,v1=s1,m1=Df,b1=u1,w1=f1,y1=h1,x1=c1,A1="pako inflate (from Nodeca project)",Er={inflateReset:d1,inflateReset2:p1,inflateResetKeep:g1,inflateInit:v1,inflateInit2:m1,inflate:b1,inflateEnd:w1,inflateGetHeader:y1,inflateSetDictionary:x1,inflateInfo:A1};function _1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var N1=_1;const Mf=Object.prototype.toString,{Z_NO_FLUSH:L1,Z_FINISH:S1,Z_OK:Da,Z_STREAM_END:Es,Z_NEED_DICT:js,Z_STREAM_ERROR:k1,Z_DATA_ERROR:Iu,Z_MEM_ERROR:P1}=Nf;function Ra(n){this.options=Lf.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hc,this.strm.avail_out=0;let e=Er.inflateInit2(this.strm,t.windowBits);if(e!==Da)throw new Error(tl[e]);if(this.header=new N1,Er.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=el.string2buf(t.dictionary):Mf.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=Er.inflateSetDictionary(this.strm,t.dictionary),e!==Da)))throw new Error(tl[e])}Ra.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let i,f,l;if(this.ended)return!1;for(t===~~t?f=t:f=t===!0?S1:L1,Mf.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),i=Er.inflate(e,f),i===js&&a&&(i=Er.inflateSetDictionary(e,a),i===Da?i=Er.inflate(e,f):i===Iu&&(i=js));e.avail_in>0&&i===Es&&e.state.wrap>0&&n[e.next_in]!==0;)Er.inflateReset(e),i=Er.inflate(e,f);switch(i){case k1:case Iu:case js:case P1:return this.onEnd(i),this.ended=!0,!1}if(l=e.avail_out,e.next_out&&(e.avail_out===0||i===Es))if(this.options.to==="string"){let u=el.utf8border(e.output,e.next_out),h=e.next_out-u,p=el.buf2string(e.output,u);e.next_out=h,e.avail_out=r-h,h&&e.output.set(e.output.subarray(u,u+h),0),this.onData(p)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(i===Da&&l===0)){if(i===Es)return i=Er.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};Ra.prototype.onData=function(n){this.chunks.push(n)};Ra.prototype.onEnd=function(n){n===Da&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Lf.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function C1(n,t){const e=new Ra(t);if(e.push(n),e.err)throw e.msg||tl[e.err];return e.result}var F1=Ra,I1=C1,E1={Inflate:F1,inflate:I1};const{Inflate:j1,inflate:O1}=E1;var Eu=j1,B1=O1;const Tf=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t=t>>>1;Tf[n]=t}const ju=4294967295;function D1(n,t,e){let r=n;for(let a=0;a>>8;return r}function R1(n,t){return(D1(ju,n,t)^ju)>>>0}function Ou(n,t,e){const r=n.readUint32(),a=R1(new Uint8Array(n.buffer,n.byteOffset+n.offset-t-4,t),t);if(a!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${a}`)}function qf(n,t,e){for(let r=0;r>1)&255}else{for(;i>1)&255;for(;i>1)&255}}function Wf(n,t,e,r,a){let i=0;if(e.length===0){for(;i=e||mt>=r))for(let dt=0;dt>8&255}const G1=new Uint16Array([255]),V1=new Uint8Array(G1.buffer),Y1=V1[0]===255,J1=new Uint8Array(0);function Bu(n){const{data:t,width:e,height:r,channels:a,depth:i}=n,f=Math.ceil(i/8)*a,l=Math.ceil(i/8*a*e),u=new Uint8Array(r*l);let h=J1,p=0,w,x;for(let g=0;g>8&255}const ko=Uint8Array.of(137,80,78,71,13,10,26,10);function Du(n){if(!X1(n.readBytes(ko.length)))throw new Error("wrong PNG signature")}function X1(n){if(n.length79)throw new Error("keyword length must be between 1 and 79")}const t2=/^[\u0000-\u00FF]*$/;function e2(n){if(!t2.test(n))throw new Error("invalid latin1 text")}function n2(n,t,e){const r=Vf(t);n[r]=r2(t,e-r.length-1)}function Vf(n){for(n.mark();n.readByte()!==Z1;);const t=n.offset;n.reset();const e=Gf.decode(n.readBytes(t-n.offset-1));return n.skip(1),Q1(e),e}function r2(n,t){return Gf.decode(n.readBytes(t))}const Bn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Os={UNKNOWN:-1,DEFLATE:0},Ru={UNKNOWN:-1,ADAPTIVE:0},Bs={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},_o={NONE:0,BACKGROUND:1,PREVIOUS:2},Ds={SOURCE:0,OVER:1};class i2 extends cl{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,e={}){super(t);const{checkCrc:r=!1}=e;this._checkCrc=r,this._inflator=new Eu,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),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(0),this._compressionMethod=Os.UNKNOWN,this._filterMethod=Ru.UNKNOWN,this._interlaceMethod=Bs.UNKNOWN,this._colorType=Bn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Du(this);!this._end;){const t=this.readUint32(),e=this.readChars(4);this.decodeChunk(t,e)}return this.decodeImage(),this._png}decodeApng(){for(Du(this);!this._end;){const t=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(t,e)}return this.decodeApngImage(),this._apng}decodeChunk(t,e){const r=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case $1:n2(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-r!==t)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?Ou(this,t+4,e):this.skip(4)}decodeApngChunk(t,e){const r=this.offset;switch(e!=="fdAT"&&e!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,e),this.offset=r+t;break}if(this.offset-r!==t)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?Ou(this,t+4,e):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=a2(this.readUint8());const e=this.readUint8();this._colorType=e;let r;switch(e){case Bn.GREYSCALE:r=1;break;case Bn.TRUECOLOUR:r=3;break;case Bn.INDEXED_COLOUR:r=1;break;case Bn.GREYSCALE_ALPHA:r=2;break;case Bn.TRUECOLOUR_ALPHA:r=4;break;case Bn.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),this._compressionMethod!==Os.DEFLATE)throw new 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(){const t={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(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const e=t/3;this._hasPalette=!0;const r=[];this._palette=r;for(let a=0;athis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let e=0;ethis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let e=0;for(;e{const l=((i+e.yOffset)*this._png.width+e.xOffset+f)*this._png.channels,u=(i*e.width+f)*this._png.channels;return{index:l,frameIndex:u}};switch(e.blendOp){case Ds.SOURCE:for(let i=0;i=200&&t.status<=299}function No(n){try{n.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),n.dispatchEvent(t)}}var wi=Kt.saveAs||((typeof window>"u"?"undefined":xe(window))!=="object"||window!==Kt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,t,e){var r=Kt.URL||Kt.webkitURL,a=document.createElement("a");t=t||n.name||"download",a.download=t,a.rel="noopener",typeof n=="string"?(a.href=n,a.origin!==location.origin?Tu(a.href)?Ms(n,t,e):No(a,a.target="_blank"):No(a)):(a.href=r.createObjectURL(n),setTimeout(function(){r.revokeObjectURL(a.href)},4e4),setTimeout(function(){No(a)},0))}:"msSaveOrOpenBlob"in navigator?function(n,t,e){if(t=t||n.name||"download",typeof n=="string")if(Tu(n))Ms(n,t,e);else{var r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){No(r)})}else navigator.msSaveOrOpenBlob((function(a,i){return i===void 0?i={autoBom:!1}:xe(i)!=="object"&&(Le.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a})(n,e),t)}:function(n,t,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return Ms(n,t,e);var a=n.type==="application/octet-stream",i=/constructor/i.test(Kt.HTMLElement)||Kt.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||a&&i)&&(typeof FileReader>"u"?"undefined":xe(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var p=l.result;p=f?p:p.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=p:location=p,r=null},l.readAsDataURL(n)}else{var u=Kt.URL||Kt.webkitURL,h=u.createObjectURL(n);r?r.location=h:location.href=h,r=null,setTimeout(function(){u.revokeObjectURL(h)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function Yf(n){var t;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={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"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],r=0;r255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),u=this.g.toString(16),h=this.b.toString(16);return l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),"#"+l+u+h}}var Po=Kt.atob.bind(Kt),qu=Kt.btoa.bind(Kt);/** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */function Ts(n,t){var e=n[0],r=n[1],a=n[2],i=n[3];e=gn(e,r,a,i,t[0],7,-680876936),i=gn(i,e,r,a,t[1],12,-389564586),a=gn(a,i,e,r,t[2],17,606105819),r=gn(r,a,i,e,t[3],22,-1044525330),e=gn(e,r,a,i,t[4],7,-176418897),i=gn(i,e,r,a,t[5],12,1200080426),a=gn(a,i,e,r,t[6],17,-1473231341),r=gn(r,a,i,e,t[7],22,-45705983),e=gn(e,r,a,i,t[8],7,1770035416),i=gn(i,e,r,a,t[9],12,-1958414417),a=gn(a,i,e,r,t[10],17,-42063),r=gn(r,a,i,e,t[11],22,-1990404162),e=gn(e,r,a,i,t[12],7,1804603682),i=gn(i,e,r,a,t[13],12,-40341101),a=gn(a,i,e,r,t[14],17,-1502002290),e=vn(e,r=gn(r,a,i,e,t[15],22,1236535329),a,i,t[1],5,-165796510),i=vn(i,e,r,a,t[6],9,-1069501632),a=vn(a,i,e,r,t[11],14,643717713),r=vn(r,a,i,e,t[0],20,-373897302),e=vn(e,r,a,i,t[5],5,-701558691),i=vn(i,e,r,a,t[10],9,38016083),a=vn(a,i,e,r,t[15],14,-660478335),r=vn(r,a,i,e,t[4],20,-405537848),e=vn(e,r,a,i,t[9],5,568446438),i=vn(i,e,r,a,t[14],9,-1019803690),a=vn(a,i,e,r,t[3],14,-187363961),r=vn(r,a,i,e,t[8],20,1163531501),e=vn(e,r,a,i,t[13],5,-1444681467),i=vn(i,e,r,a,t[2],9,-51403784),a=vn(a,i,e,r,t[7],14,1735328473),e=mn(e,r=vn(r,a,i,e,t[12],20,-1926607734),a,i,t[5],4,-378558),i=mn(i,e,r,a,t[8],11,-2022574463),a=mn(a,i,e,r,t[11],16,1839030562),r=mn(r,a,i,e,t[14],23,-35309556),e=mn(e,r,a,i,t[1],4,-1530992060),i=mn(i,e,r,a,t[4],11,1272893353),a=mn(a,i,e,r,t[7],16,-155497632),r=mn(r,a,i,e,t[10],23,-1094730640),e=mn(e,r,a,i,t[13],4,681279174),i=mn(i,e,r,a,t[0],11,-358537222),a=mn(a,i,e,r,t[3],16,-722521979),r=mn(r,a,i,e,t[6],23,76029189),e=mn(e,r,a,i,t[9],4,-640364487),i=mn(i,e,r,a,t[12],11,-421815835),a=mn(a,i,e,r,t[15],16,530742520),e=bn(e,r=mn(r,a,i,e,t[2],23,-995338651),a,i,t[0],6,-198630844),i=bn(i,e,r,a,t[7],10,1126891415),a=bn(a,i,e,r,t[14],15,-1416354905),r=bn(r,a,i,e,t[5],21,-57434055),e=bn(e,r,a,i,t[12],6,1700485571),i=bn(i,e,r,a,t[3],10,-1894986606),a=bn(a,i,e,r,t[10],15,-1051523),r=bn(r,a,i,e,t[1],21,-2054922799),e=bn(e,r,a,i,t[8],6,1873313359),i=bn(i,e,r,a,t[15],10,-30611744),a=bn(a,i,e,r,t[6],15,-1560198380),r=bn(r,a,i,e,t[13],21,1309151649),e=bn(e,r,a,i,t[4],6,-145523070),i=bn(i,e,r,a,t[11],10,-1120210379),a=bn(a,i,e,r,t[2],15,718787259),r=bn(r,a,i,e,t[9],21,-343485551),n[0]=Zr(e,n[0]),n[1]=Zr(r,n[1]),n[2]=Zr(a,n[2]),n[3]=Zr(i,n[3])}function qo(n,t,e,r,a,i){return t=Zr(Zr(t,n),Zr(r,i)),Zr(t<>>32-a,e)}function gn(n,t,e,r,a,i,f){return qo(t&e|~t&r,n,t,a,i,f)}function vn(n,t,e,r,a,i,f){return qo(t&r|e&~r,n,t,a,i,f)}function mn(n,t,e,r,a,i,f){return qo(t^e^r,n,t,a,i,f)}function bn(n,t,e,r,a,i,f){return qo(e^(t|~r),n,t,a,i,f)}function Jf(n){var t,e=n.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=n.length;t+=64)Ts(r,s2(n.substring(t-64,t)));n=n.substring(t-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=n.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(Ts(r,a),t=0;t<16;t++)a[t]=0;return a[14]=8*e,Ts(r,a),r}function s2(n){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=n.charCodeAt(t)+(n.charCodeAt(t+1)<<8)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+3)<<24);return e}var Uu="0123456789abcdef".split("");function l2(n){for(var t="",e=0;e<4;e++)t+=Uu[n>>8*e+4&15]+Uu[n>>8*e&15];return t}function u2(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function nl(n){return Jf(n).map(u2).join("")}var f2=(function(n){for(var t=0;t>16)+(t>>16)+(e>>16)<<16|65535&e}return n+t&4294967295}/** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function rl(n,t){var e,r,a,i;if(n!==e){for(var f=(a=n,i=1+(256/n.length|0),new Array(i+1).join(a)),l=[],u=0;u<256;u++)l[u]=u;var h=0;for(u=0;u<256;u++){var p=l[u];h=(h+p+f.charCodeAt(u))%256,l[u]=l[h],l[h]=p}e=n,r=l}else l=r;var w=t.length,x=0,g=0,P="";for(u=0;u€/\f©þdSiz";var i=(t+this.padding).substr(0,32),f=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,f),this.P=-(1+(255^a)),this.encryptionKey=nl(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=rl(this.encryptionKey,this.padding)}function Qi(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var t="",e=n.length,r=0;r126?"#"+("0"+a.toString(16)).slice(-2):n[r]}return t}function Hu(n){if(xe(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,a){if(a=a||!1,typeof e!="string"||typeof r!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[r,!!a],i},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),a=[];for(var i in t[e]){var f=t[e][i];try{f[0].apply(n,r)}catch(l){Kt.console&&Le.error("jsPDF PubSub Error",l.message,l)}f[1]&&a.push(i)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function Bo(n){if(!(this instanceof Bo))return new Bo(n);var t="opacity,stroke-opacity".split(",");for(var e in n)n.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=n[e]);this.id="",this.objectNumber=-1}function Kf(n,t){this.gState=n,this.matrix=t,this.id="",this.objectNumber=-1}function yi(n,t,e,r,a){if(!(this instanceof yi))return new yi(n,t,e,r,a);this.type=n==="axial"?2:3,this.coords=t,this.colors=e,Kf.call(this,r,a)}function ta(n,t,e,r,a){if(!(this instanceof ta))return new ta(n,t,e,r,a);this.boundingBox=n,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,Kf.call(this,r,a)}function Mt(n){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],a=arguments[2],i=arguments[3],f=[],l=1,u=16,h="S",p=null;xe(n=n||{})==="object"&&(e=n.orientation,r=n.unit||r,a=n.format||a,i=n.compress||n.compressPdf||i,(p=n.encryption||null)!==null&&(p.userPassword=p.userPassword||"",p.ownerPassword=p.ownerPassword||"",p.userPermissions=p.userPermissions||[]),l=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(t=n.precision),n.floatPrecision!==void 0&&(u=n.floatPrecision),h=n.defaultPathOperation||"S"),f=n.filters||(i===!0?["FlateEncode"]:f),r=r||"mm",e=(""+(e||"P")).toLowerCase();var w=n.putOnlyUsedFonts||!1,x={},g={internal:{},__private__:{}};g.__private__.PubSub=Hu;var P="1.3",C=g.__private__.getPdfVersion=function(){return P};g.__private__.setPdfVersion=function(c){P=c};var B={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]};g.__private__.getPageFormats=function(){return B};var S=g.__private__.getPageFormat=function(c){return B[c]};a=a||"a4";var G="compat",V="advanced",T=G;function it(){this.saveGraphicsState(),F(new Vt(ne,0,0,-ne,0,oi()*ne).toString()+" cm"),this.setFontSize(this.getFontSize()/ne),h="n",T=V}function mt(){this.restoreGraphicsState(),h="S",T=G}var dt=g.__private__.combineFontStyleAndFontWeight=function(c,m){if(c=="bold"&&m=="normal"||c=="bold"&&m==400||c=="normal"&&m=="italic"||c=="bold"&&m=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return m&&(c=m==400||m==="normal"?c==="italic"?"italic":"normal":m!=700&&m!=="bold"||c!=="normal"?(m==700?"bold":m)+""+c:"bold"),c};g.advancedAPI=function(c){var m=T===G;return m&&it.call(this),typeof c!="function"||(c(this),m&&mt.call(this)),this},g.compatAPI=function(c){var m=T===V;return m&&mt.call(this),typeof c!="function"||(c(this),m&&it.call(this)),this},g.isAdvancedAPI=function(){return T===V};var X,R=function(c){if(T!==V)throw new Error(c+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},tt=g.roundToPrecision=g.__private__.roundToPrecision=function(c,m){var I=t||m;if(isNaN(c)||isNaN(I))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return c.toFixed(I).replace(/0+$/,"")};X=g.hpf=g.__private__.hpf=typeof u=="number"?function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(c,u)}:u==="smart"?function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(c,c>-1&&c<1?16:5)}:function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(c,16)};var L=g.f2=g.__private__.f2=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.f2");return tt(c,2)},O=g.__private__.f3=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.f3");return tt(c,3)},z=g.scale=g.__private__.scale=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.scale");return T===G?c*ne:T===V?c:void 0},U=function(c){return z((function(m){return T===G?oi()-m:T===V?m:void 0})(c))};g.__private__.setPrecision=g.setPrecision=function(c){typeof parseInt(c,10)=="number"&&(t=parseInt(c,10))};var rt,st="00000000000000000000000000000000",ft=g.__private__.getFileId=function(){return st},nt=g.__private__.setFileId=function(c){return st=c!==void 0&&/^[a-fA-F0-9]{32}$/.test(c)?c.toUpperCase():st.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),p!==null&&(on=new Zi(p.userPermissions,p.userPassword,p.ownerPassword,st)),st};g.setFileId=function(c){return nt(c),this},g.getFileId=function(){return ft()};var ct=g.__private__.convertDateToPDFDate=function(c){var m=c.getTimezoneOffset(),I=m<0?"+":"-",q=Math.floor(Math.abs(m/60)),K=Math.abs(m%60),lt=[I,M(q),"'",M(K),"'"].join("");return["D:",c.getFullYear(),M(c.getMonth()+1),M(c.getDate()),M(c.getHours()),M(c.getMinutes()),M(c.getSeconds()),lt].join("")},_t=g.__private__.convertPDFDateToDate=function(c){var m=parseInt(c.substr(2,4),10),I=parseInt(c.substr(6,2),10)-1,q=parseInt(c.substr(8,2),10),K=parseInt(c.substr(10,2),10),lt=parseInt(c.substr(12,2),10),vt=parseInt(c.substr(14,2),10);return new Date(m,I,q,K,lt,vt,0)},wt=g.__private__.setCreationDate=function(c){var m;if(c===void 0&&(c=new Date),c instanceof Date)m=ct(c);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(c))throw new Error("Invalid argument passed to jsPDF.setCreationDate");m=c}return rt=m},_=g.__private__.getCreationDate=function(c){var m=rt;return c==="jsDate"&&(m=_t(rt)),m};g.setCreationDate=function(c){return wt(c),this},g.getCreationDate=function(c){return _(c)};var D,M=g.__private__.padd2=function(c){return("0"+parseInt(c)).slice(-2)},H=g.__private__.padd2Hex=function(c){return("00"+(c=c.toString())).substr(c.length)},J=0,Z=[],at=[],ot=0,gt=[],At=[],kt=!1,St=at;g.__private__.setCustomOutputDestination=function(c){kt=!0,St=c};var Tt=function(c){kt||(St=c)};g.__private__.resetCustomOutputDestination=function(){kt=!1,St=at};var F=g.__private__.out=function(c){return c=c.toString(),ot+=c.length+1,St.push(c),St},Lt=g.__private__.write=function(c){return F(arguments.length===1?c.toString():Array.prototype.join.call(arguments," "))},ae=g.__private__.getArrayBuffer=function(c){for(var m=c.length,I=new ArrayBuffer(m),q=new Uint8Array(I);m--;)q[m]=c.charCodeAt(m);return I},Ht=[["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]];g.__private__.getStandardFonts=function(){return Ht};var yt=n.fontSize||16;g.__private__.setFontSize=g.setFontSize=function(c){return yt=T===V?c/ne:c,this};var Wt,Ct=g.__private__.getFontSize=g.getFontSize=function(){return T===G?yt:yt*ne},zt=n.R2L||!1;g.__private__.setR2L=g.setR2L=function(c){return zt=c,this},g.__private__.getR2L=g.getR2L=function(){return zt};var qt,me=g.__private__.setZoomMode=function(c){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(c))Wt=c;else if(isNaN(c)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(c)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+c+'" is not recognized.');Wt=c}else Wt=parseInt(c,10)};g.__private__.getZoomMode=function(){return Wt};var ue,Zt=g.__private__.setPageMode=function(c){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(c)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+c+'" is not recognized.');qt=c};g.__private__.getPageMode=function(){return qt};var he=g.__private__.setLayoutMode=function(c){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(c)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+c+'" is not recognized.');ue=c};g.__private__.getLayoutMode=function(){return ue},g.__private__.setDisplayMode=g.setDisplayMode=function(c,m,I){return me(c),he(m),Zt(I),this};var fe={title:"",subject:"",author:"",keywords:"",creator:""};g.__private__.getDocumentProperty=function(c){if(Object.keys(fe).indexOf(c)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return fe[c]},g.__private__.getDocumentProperties=function(){return fe},g.__private__.setDocumentProperties=g.setProperties=g.setDocumentProperties=function(c){for(var m in fe)fe.hasOwnProperty(m)&&c[m]&&(fe[m]=c[m]);return this},g.__private__.setDocumentProperty=function(c,m){if(Object.keys(fe).indexOf(c)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return fe[c]=m};var Bt,ne,Rt,ze,ge,oe={},se={},je=[],Ut={},Se={},Yt={},Qt={},Oe=null,le=0,Gt=[],be=new Hu(g),ti=n.hotfixes||[],fn={},vr={},nr=[],Vt=function c(m,I,q,K,lt,vt){if(!(this instanceof c))return new c(m,I,q,K,lt,vt);isNaN(m)&&(m=1),isNaN(I)&&(I=0),isNaN(q)&&(q=0),isNaN(K)&&(K=1),isNaN(lt)&&(lt=0),isNaN(vt)&&(vt=0),this._matrix=[m,I,q,K,lt,vt]};Object.defineProperty(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(c){this._matrix[0]=c}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(c){this._matrix[1]=c}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(c){this._matrix[2]=c}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(c){this._matrix[3]=c}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(c){this._matrix[4]=c}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(c){this._matrix[5]=c}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(c){this._matrix[0]=c}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(c){this._matrix[1]=c}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(c){this._matrix[2]=c}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(c){this._matrix[3]=c}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(c){this._matrix[4]=c}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(c){this._matrix[5]=c}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Vt.prototype.join=function(c){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(X).join(c)},Vt.prototype.multiply=function(c){var m=c.sx*this.sx+c.shy*this.shx,I=c.sx*this.shy+c.shy*this.sy,q=c.shx*this.sx+c.sy*this.shx,K=c.shx*this.shy+c.sy*this.sy,lt=c.tx*this.sx+c.ty*this.shx+this.tx,vt=c.tx*this.shy+c.ty*this.sy+this.ty;return new Vt(m,I,q,K,lt,vt)},Vt.prototype.decompose=function(){var c=this.sx,m=this.shy,I=this.shx,q=this.sy,K=this.tx,lt=this.ty,vt=Math.sqrt(c*c+m*m),Et=(c/=vt)*I+(m/=vt)*q;I-=c*Et,q-=m*Et;var It=Math.sqrt(I*I+q*q);return Et/=It,c*(q/=It)>16&255,q=It>>8&255,K=255&It}if(q===void 0||lt===void 0&&I===q&&q===K)m=typeof I=="string"?I+" "+vt[0]:c.precision===2?L(I/255)+" "+vt[0]:O(I/255)+" "+vt[0];else if(lt===void 0||xe(lt)==="object"){if(lt&&!isNaN(lt.a)&<.a===0)return["1.","1.","1.",vt[1]].join(" ");m=typeof I=="string"?[I,q,K,vt[1]].join(" "):c.precision===2?[L(I/255),L(q/255),L(K/255),vt[1]].join(" "):[O(I/255),O(q/255),O(K/255),vt[1]].join(" ")}else m=typeof I=="string"?[I,q,K,lt,vt[2]].join(" "):c.precision===2?[L(I),L(q),L(K),L(lt),vt[2]].join(" "):[O(I),O(q),O(K),O(lt),vt[2]].join(" ");return m},Yn=g.__private__.getFilters=function(){return f},Tn=g.__private__.putStream=function(c){var m=(c=c||{}).data||"",I=c.filters||Yn(),q=c.alreadyAppliedFilters||[],K=c.addLength1||!1,lt=m.length,vt=c.objectId,Et=function(Fe){return Fe};if(p!==null&&vt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");p!==null&&(Et=on.encryptor(vt,0));var It={};I===!0&&(I=["FlateEncode"]);var Xt=c.additionalKeyValues||[],te=(It=Mt.API.processDataByFilters!==void 0?Mt.API.processDataByFilters(m,I):{data:m,reverseChain:[]}).reverseChain+(Array.isArray(q)?q.join(" "):q.toString());if(It.data.length!==0&&(Xt.push({key:"Length",value:It.data.length}),K===!0&&Xt.push({key:"Length1",value:lt})),te.length!=0)if(te.split("/").length-1==1)Xt.push({key:"Filter",value:te});else{Xt.push({key:"Filter",value:"["+te+"]"});for(var de=0;de>"),It.data.length!==0&&(F("stream"),F(Et(It.data)),F("endstream"))},ni=g.__private__.putPage=function(c){var m=c.number,I=c.data,q=c.objId,K=c.contentsObjId;an(q,!0),F("<>"),F("endobj");var lt=I.join(` `);return T===V&&(lt+=` Q`),an(K,!0),Tn({data:lt,filters:Yn(),objectId:K}),F("endobj"),q},ir=g.__private__.putPages=function(){var c,m,I=[];for(c=1;c<=le;c++)Gt[c].objId=nn(),Gt[c].contentsObjId=nn();for(c=1;c<=le;c++)I.push(ni({number:c,data:At[c],objId:Gt[c].objId,contentsObjId:Gt[c].contentsObjId,mediaBox:Gt[c].mediaBox,cropBox:Gt[c].cropBox,bleedBox:Gt[c].bleedBox,trimBox:Gt[c].trimBox,artBox:Gt[c].artBox,userUnit:Gt[c].userUnit,rootDictionaryObjId:Br,resourceDictionaryObjId:Gn}));an(Br,!0),F("<>"),F("endobj"),be.publish("postPutPages")},ri=function(c){be.publish("putFont",{font:c,out:F,newObject:Me,putStream:Tn}),c.isAlreadyPutted!==!0&&(c.objectNumber=Me(),F("<<"),F("/Type /Font"),F("/BaseFont /"+Qi(c.postScriptName)),F("/Subtype /Type1"),typeof c.encoding=="string"&&F("/Encoding /"+c.encoding),F("/FirstChar 32"),F("/LastChar 255"),F(">>"),F("endobj"))},ki=function(c){c.objectNumber=Me();var m=[];m.push({key:"Type",value:"/XObject"}),m.push({key:"Subtype",value:"/Form"}),m.push({key:"BBox",value:"["+[X(c.x),X(c.y),X(c.x+c.width),X(c.y+c.height)].join(" ")+"]"}),m.push({key:"Matrix",value:"["+c.matrix.toString()+"]"});var I=c.pages[1].join(` `);Tn({data:I,additionalKeyValues:m,objectId:c.objectNumber}),F("endobj")},Pi=function(c,m){m||(m=21);var I=Me(),q=(function(vt,Et){var It,Xt=[],te=1/(Et-1);for(It=0;It<1;It+=te)Xt.push(It);if(Xt.push(1),vt[0].offset!=0){var de={offset:0,color:vt[0].color};vt.unshift(de)}if(vt[vt.length-1].offset!=1){var Xe={offset:1,color:vt[vt.length-1].color};vt.push(Xe)}for(var _e="",Ae=0,Fe=0;Fevt[Ae+1].offset;)Ae++;var De=vt[Ae].offset,Re=(It-De)/(vt[Ae+1].offset-De),hn=vt[Ae].color,Nr=vt[Ae+1].color;_e+=H(Math.round((1-Re)*hn[0]+Re*Nr[0]).toString(16))+H(Math.round((1-Re)*hn[1]+Re*Nr[1]).toString(16))+H(Math.round((1-Re)*hn[2]+Re*Nr[2]).toString(16))}return _e.trim()})(c.colors,m),K=[];K.push({key:"FunctionType",value:"0"}),K.push({key:"Domain",value:"[0.0 1.0]"}),K.push({key:"Size",value:"["+m+"]"}),K.push({key:"BitsPerSample",value:"8"}),K.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),K.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Tn({data:q,additionalKeyValues:K,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:I}),F("endobj"),c.objectNumber=Me(),F("<< /ShadingType "+c.type),F("/ColorSpace /DeviceRGB");var lt="/Coords ["+X(parseFloat(c.coords[0]))+" "+X(parseFloat(c.coords[1]))+" ";c.type===2?lt+=X(parseFloat(c.coords[2]))+" "+X(parseFloat(c.coords[3])):lt+=X(parseFloat(c.coords[2]))+" "+X(parseFloat(c.coords[3]))+" "+X(parseFloat(c.coords[4]))+" "+X(parseFloat(c.coords[5])),F(lt+="]"),c.matrix&&F("/Matrix ["+c.matrix.toString()+"]"),F("/Function "+I+" 0 R"),F("/Extend [true true]"),F(">>"),F("endobj")},Ci=function(c,m){var I=nn(),q=Me();m.push({resourcesOid:I,objectOid:q}),c.objectNumber=q;var K=[];K.push({key:"Type",value:"/Pattern"}),K.push({key:"PatternType",value:"1"}),K.push({key:"PaintType",value:"1"}),K.push({key:"TilingType",value:"1"}),K.push({key:"BBox",value:"["+c.boundingBox.map(X).join(" ")+"]"}),K.push({key:"XStep",value:X(c.xStep)}),K.push({key:"YStep",value:X(c.yStep)}),K.push({key:"Resources",value:I+" 0 R"}),c.matrix&&K.push({key:"Matrix",value:"["+c.matrix.toString()+"]"}),Tn({data:c.stream,additionalKeyValues:K,objectId:c.objectNumber}),F("endobj")},zo=function(c){for(var m in c.objectNumber=Me(),F("<<"),c)switch(m){case"opacity":F("/ca "+L(c[m]));break;case"stroke-opacity":F("/CA "+L(c[m]))}F(">>"),F("endobj")},sa=function(c){an(c.resourcesOid,!0),F("<<"),F("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var m in F("/Font <<"),oe)oe.hasOwnProperty(m)&&(w===!1||w===!0&&x.hasOwnProperty(m))&&F("/"+m+" "+oe[m].objectNumber+" 0 R");F(">>")})(),(function(){if(Object.keys(Ut).length>0){for(var m in F("/Shading <<"),Ut)Ut.hasOwnProperty(m)&&Ut[m]instanceof yi&&Ut[m].objectNumber>=0&&F("/"+m+" "+Ut[m].objectNumber+" 0 R");be.publish("putShadingPatternDict"),F(">>")}})(),(function(m){if(Object.keys(Ut).length>0){for(var I in F("/Pattern <<"),Ut)Ut.hasOwnProperty(I)&&Ut[I]instanceof g.TilingPattern&&Ut[I].objectNumber>=0&&Ut[I].objectNumber>")}})(c.objectOid),(function(){if(Object.keys(Yt).length>0){var m;for(m in F("/ExtGState <<"),Yt)Yt.hasOwnProperty(m)&&Yt[m].objectNumber>=0&&F("/"+m+" "+Yt[m].objectNumber+" 0 R");be.publish("putGStateDict"),F(">>")}})(),(function(){for(var m in F("/XObject <<"),fn)fn.hasOwnProperty(m)&&fn[m].objectNumber>=0&&F("/"+m+" "+fn[m].objectNumber+" 0 R");be.publish("putXobjectDict"),F(">>")})(),F(">>"),F("endobj")},Ma=function(c){se[c.fontName]=se[c.fontName]||{},se[c.fontName][c.fontStyle]=c.id},Ta=function(c,m,I,q,K){var lt={id:"F"+(Object.keys(oe).length+1).toString(10),postScriptName:c,fontName:m,fontStyle:I,encoding:q,isStandardFont:K||!1,metadata:{}};return be.publish("addFont",{font:lt,instance:this}),oe[lt.id]=lt,Ma(lt),lt.id},qn=g.__private__.pdfEscape=g.pdfEscape=function(c,m){return(function(I,q){var K,lt,vt,Et,It,Xt,te,de,Xe;if(vt=(q=q||{}).sourceEncoding||"Unicode",It=q.outputEncoding,(q.autoencode||It)&&oe[Bt].metadata&&oe[Bt].metadata[vt]&&oe[Bt].metadata[vt].encoding&&(Et=oe[Bt].metadata[vt].encoding,!It&&oe[Bt].encoding&&(It=oe[Bt].encoding),!It&&Et.codePages&&(It=Et.codePages[0]),typeof It=="string"&&(It=Et[It]),It)){for(te=!1,Xt=[],K=0,lt=I.length;K>8&&(te=!0);I=Xt.join("")}for(K=I.length;te===void 0&&K!==0;)I.charCodeAt(K-1)>>8&&(te=!0),K--;if(!te)return I;for(Xt=q.noBOM?[]:[254,255],K=0,lt=I.length;K>8)>>8)throw new Error("Character at position "+K+" of string '"+I+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Xt.push(Xe),Xt.push(de-(Xe<<8))}return String.fromCharCode.apply(void 0,Xt)})(c,m).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},la=g.__private__.beginPage=function(c){At[++le]=[],Gt[le]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(c[0]),topRightY:Number(c[1])}},Ua(le),Tt(At[D])},qa=function(c,m){var I,q,K;switch(e=m||e,typeof c=="string"&&(I=S(c.toLowerCase()),Array.isArray(I)&&(q=I[0],K=I[1])),Array.isArray(c)&&(q=c[0]*ne,K=c[1]*ne),isNaN(q)&&(q=a[0],K=a[1]),(q>14400||K>14400)&&(Le.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),q=Math.min(14400,q),K=Math.min(14400,K)),a=[q,K],e.substr(0,1)){case"l":K>q&&(a=[K,q]);break;case"p":q>K&&(a=[K,q])}la(a),Zo(Jt),F(Bi),da!==0&&F(da+" J"),Mr!==0&&F(Mr+" j"),be.publish("addPage",{pageNumber:le})},ua=function(c){c>0&&c<=le&&(At.splice(c,1),Gt.splice(c,1),le--,D>le&&(D=le),this.setPage(D))},Ua=function(c){c>0&&c<=le&&(D=c)},za=g.__private__.getNumberOfPages=g.getNumberOfPages=function(){return At.length-1},Ha=function(c,m,I){var q,K=void 0;return I=I||{},c=c!==void 0?c:oe[Bt].fontName,m=m!==void 0?m:oe[Bt].fontStyle,q=c.toLowerCase(),se[q]!==void 0&&se[q][m]!==void 0?K=se[q][m]:se[c]!==void 0&&se[c][m]!==void 0?K=se[c][m]:I.disableWarning===!1&&Le.warn("Unable to look up font label for font '"+c+"', '"+m+"'. Refer to getFontList() for available fonts."),K||I.noFallback||(K=se.times[m])==null&&(K=se.times.normal),K},ar=g.__private__.putInfo=function(){var c=Me(),m=function(q){return q};for(var I in p!==null&&(m=on.encryptor(c,0)),F("<<"),F("/Producer ("+qn(m("jsPDF "+Mt.version))+")"),fe)fe.hasOwnProperty(I)&&fe[I]&&F("/"+I.substr(0,1).toUpperCase()+I.substr(1)+" ("+qn(m(fe[I]))+")");F("/CreationDate ("+qn(m(rt))+")"),F(">>"),F("endobj")},Fi=g.__private__.putCatalog=function(c){var m=(c=c||{}).rootDictionaryObjId||Br;switch(Me(),F("<<"),F("/Type /Catalog"),F("/Pages "+m+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":F("/OpenAction [3 0 R /FitH null]");break;case"fullheight":F("/OpenAction [3 0 R /FitV null]");break;case"fullpage":F("/OpenAction [3 0 R /Fit]");break;case"original":F("/OpenAction [3 0 R /XYZ null null 1]");break;default:var I=""+Wt;I.substr(I.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&F("/OpenAction [3 0 R /XYZ null null "+L(Wt)+"]")}switch(ue||(ue="continuous"),ue){case"continuous":F("/PageLayout /OneColumn");break;case"single":F("/PageLayout /SinglePage");break;case"two":case"twoleft":F("/PageLayout /TwoColumnLeft");break;case"tworight":F("/PageLayout /TwoColumnRight")}qt&&F("/PageMode /"+qt),be.publish("putCatalog"),F(">>"),F("endobj")},Ho=g.__private__.putTrailer=function(){F("trailer"),F("<<"),F("/Size "+(J+1)),F("/Root "+J+" 0 R"),F("/Info "+(J-1)+" 0 R"),p!==null&&F("/Encrypt "+on.oid+" 0 R"),F("/ID [ <"+st+"> <"+st+"> ]"),F(">>")},Ke=g.__private__.putHeader=function(){F("%PDF-"+P),F("%ºß¬à")},Wa=g.__private__.putXRef=function(){var c="0000000000";F("xref"),F("0 "+(J+1)),F("0000000000 65535 f ");for(var m=1;m<=J;m++)typeof Z[m]=="function"?F((c+Z[m]()).slice(-10)+" 00000 n "):Z[m]!==void 0?F((c+Z[m]).slice(-10)+" 00000 n "):F("0000000000 00000 n ")},or=g.__private__.buildDocument=function(){var c;J=0,ot=0,at=[],Z=[],gt=[],Br=nn(),Gn=nn(),Tt(at),be.publish("buildDocument"),Ke(),ir(),(function(){be.publish("putAdditionalObjects");for(var I=0;I"),F("/O <"+on.toHexString(on.O)+">"),F("/P "+on.P),F(">>"),F("endobj")),ar(),Fi();var m=ot;return Wa(),Ho(),F("startxref"),F(""+m),F("%%EOF"),Tt(At[D]),at.join(` `)},Ii=g.__private__.getBlob=function(c){return new Blob([ae(c)],{type:"application/pdf"})},fa=function(c){for(;c.firstChild;)c.removeChild(c.firstChild)},Pn=function(c){var m,I=c.document,q=I.documentElement,K=I.head,lt=I.body;return K||(K=I.createElement("head"),q.appendChild(K)),lt||(lt=I.createElement("body"),q.appendChild(lt)),fa(K),fa(lt),(m=I.createElement("style")).appendChild(I.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),K.appendChild(m),{document:I,body:lt}},Ei=g.output=g.__private__.output=(Mn=function(c,m){switch(typeof(m=m||{})=="string"?m={filename:m}:m.filename=m.filename||"generated.pdf",c){case void 0:return or();case"save":g.save(m.filename);break;case"arraybuffer":return ae(or());case"blob":return Ii(or());case"bloburi":case"bloburl":if(Kt.URL!==void 0&&typeof Kt.URL.createObjectURL=="function")return Kt.URL&&Kt.URL.createObjectURL(Ii(or()))||void 0;Le.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var I="",q=or();try{I=qu(q)}catch{I=qu(unescape(encodeURIComponent(q)))}return"data:application/pdf;filename="+encodeURIComponent(m.filename)+";base64,"+I;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var K="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",lt=!m.pdfObjectUrl;lt||(K=m.pdfObjectUrl);var vt=Kt.open();if(vt!==null){var Et=Pn(vt),It=Et.document.createElement("script"),Xt=this;It.src=K,lt&&(It.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",It.crossOrigin="anonymous"),It.onload=function(){vt.PDFObject.embed(Xt.output("dataurlstring"),m)},Et.body.appendChild(It)}return vt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var te=m.pdfJsUrl||"examples/PDF.js/web/viewer.html",de=Kt.open();if(de!==null){var Xe=Pn(de),_e=Xe.document.createElement("iframe"),Ae=te.indexOf("?")===-1?"?":"&";Xt=this,_e.id="pdfViewer",_e.width="500px",_e.height="400px",_e.src=te+Ae+"file=&downloadName="+encodeURIComponent(m.filename),_e.onload=function(){de.document.title=m.filename,_e.contentWindow.PDFViewerApplication.open(Xt.output("bloburl"))},Xe.body.appendChild(_e)}return de}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Kt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Fe=Kt.open();if(Fe!==null){var De=Pn(Fe),Re=De.document.createElement("iframe");Re.src=this.output("datauristring",m),De.body.appendChild(Re),Fe.document.title=m.filename}if(Fe||typeof safari>"u")return Fe;break;case"datauri":case"dataurl":return Kt.document.location.href=this.output("datauristring",m);default:return null}},Mn.foo=function(){try{return Mn.apply(this,arguments)}catch(I){var c=I.stack||"";~c.indexOf(" at ")&&(c=c.split(" at ")[1]);var m="Error in function "+c.split(` `)[0].split("<")[0]+": "+I.message;if(!Kt.console)throw new Error(m);Kt.console.error(m,I),Kt.alert&&alert(m)}},Mn.foo.bar=Mn,Mn.foo),wr=function(c){return Array.isArray(ti)===!0&&ti.indexOf(c)>-1};switch(r){case"pt":ne=1;break;case"mm":ne=72/25.4;break;case"cm":ne=72/2.54;break;case"in":ne=72;break;case"px":ne=wr("px_scaling")==1?.75:96/72;break;case"pc":case"em":ne=12;break;case"ex":ne=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ne=r}var on=null;wt(),nt();var Ga=g.__private__.getPageInfo=g.getPageInfo=function(c){if(isNaN(c)||c%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Gt[c].objId,pageNumber:c,pageContext:Gt[c]}},Wo=g.__private__.getPageInfoByObjId=function(c){if(isNaN(c)||c%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var m in Gt)if(Gt[m].objId===c)break;return Ga(m)},Go=g.__private__.getCurrentPageInfo=g.getCurrentPageInfo=function(){return{objId:Gt[D].objId,pageNumber:D,pageContext:Gt[D]}};g.addPage=function(){return qa.apply(this,arguments),this},g.setPage=function(){return Ua.apply(this,arguments),Tt.call(this,At[D]),this},g.insertPage=function(c){return this.addPage(),this.movePage(D,c),this},g.movePage=function(c,m){var I,q;if(c>m){I=At[c],q=Gt[c];for(var K=c;K>m;K--)At[K]=At[K-1],Gt[K]=Gt[K-1];At[m]=I,Gt[m]=q,this.setPage(m)}else if(c0&&(typeof c=="string"?c=Ae.splitTextToSize(c,te):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(ke,Pe){return ke.concat(Ae.splitTextToSize(Pe,te))},[]))),lt={text:c,x:m,y:I,options:q,mutex:{pdfEscape:qn,activeFontKey:Bt,fonts:oe,activeFontSize:yt}},be.publish("preProcessText",lt),c=lt.text,Et=(q=lt.options).angle,_e instanceof Vt==0&&Et&&typeof Et=="number"){Et*=Math.PI/180,q.rotationDirection===0&&(Et=-Et),T===V&&(Et=-Et);var ba=Math.cos(Et),ur=Math.sin(Et);_e=new Vt(ba,ur,-ur,ba,0,0)}else Et&&Et instanceof Vt&&(_e=Et);T!==V||_e||(_e=br),(Xt=q.charSpace||Di)!==void 0&&(Re+=X(z(Xt))+` Tc `,this.setCharSpace(this.getCharSpace()||0)),(Xe=q.horizontalScale)!==void 0&&(Re+=X(100*Xe)+` Tz `),q.lang;var wn=-1,Qa=q.renderingMode!==void 0?q.renderingMode:q.stroke,Ui=Ae.internal.getCurrentPageInfo().pageContext;switch(Qa){case 0:case!1:case"fill":wn=0;break;case 1:case!0:case"stroke":wn=1;break;case 2:case"fillThenStroke":wn=2;break;case 3:case"invisible":wn=3;break;case 4:case"fillAndAddForClipping":wn=4;break;case 5:case"strokeAndAddPathForClipping":wn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":wn=6;break;case 7:case"addToPathForClipping":wn=7}var to=Ui.usedRenderingMode!==void 0?Ui.usedRenderingMode:-1;wn!==-1?Re+=wn+` Tr `:to!==-1&&(Re+=`0 Tr `),wn!==-1&&(Ui.usedRenderingMode=wn),It=q.align||"left";var Un,ci=yt*hn,wa=Ae.internal.pageSize.getWidth(),zi=oe[Bt];Xt=q.charSpace||Di,te=q.maxWidth||0,de=Object.assign({autoencode:!0,noBOM:!0},q.flags);var di=[],ya=function(ke){return Ae.getStringUnitWidth(ke,{font:zi,charSpace:Xt,fontSize:yt,doKerning:!1})*yt/Nr};if(Object.prototype.toString.call(c)==="[object Array]"){var yn;vt=si(c),It!=="left"&&(Un=vt.map(ya));var Nn,Hi=0;if(It==="right"){m-=Un[0],c=[],cn=vt.length;for(var qr=0;qr0?(te-Un[$e])/xa:0;$e":")"),vi=parseFloat(vt[dn][1]),mi=parseFloat(vt[dn][2]);break;case 0:zr=(De?"<":"(")+vt[dn]+(De?">":")"),vi=yr(m),mi=xr(I)}di!==void 0&&di[dn]!==void 0&&(Hr=di[dn]+` Tw `),dn===0?c.push(Hr+Vi(vi,mi,_e)+zr):Lr===0?c.push(Hr+zr):Lr===1&&c.push(Hr+Vi(vi,mi,_e)+zr)}c=Lr===0?c.join(` Tj T* `):c.join(` Tj `),c+=` Tj `;var hr=`BT /`;return hr+=Bt+" "+yt+` Tf `,hr+=X(yt*hn)+` TL `,hr+=lr+` `,hr+=Re,hr+=c,F(hr+="ET"),x[Bt]=!0,Ae};var Vo=g.__private__.clip=g.clip=function(c){return F(c==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return Vo("evenodd")},g.__private__.discardPath=g.discardPath=function(){return F("n"),this};var sr=g.__private__.isValidStyle=function(c){var m=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(c)!==-1&&(m=!0),m};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(c){return sr(c)&&(h=c),this};var Va=g.__private__.getStyle=g.getStyle=function(c){var m=h;switch(c){case"D":case"S":m="S";break;case"F":m="f";break;case"FD":case"DF":m="B";break;case"f":case"f*":case"B":case"B*":m=c}return m},ji=g.close=function(){return F("h"),this};g.stroke=function(){return F("S"),this},g.fill=function(c){return Oi("f",c),this},g.fillEvenOdd=function(c){return Oi("f*",c),this},g.fillStroke=function(c){return Oi("B",c),this},g.fillStrokeEvenOdd=function(c){return Oi("B*",c),this};var Oi=function(c,m){xe(m)==="object"?Jo(m,c):F(c)},ha=function(c){c===null||T===V&&c===void 0||(c=Va(c),F(c))};function Yo(c,m,I,q,K){var lt=new ta(m||this.boundingBox,I||this.xStep,q||this.yStep,this.gState,K||this.matrix);lt.stream=this.stream;var vt=c+"$$"+this.cloneIndex+++"$$";return Rn(vt,lt),lt}var Jo=function(c,m){var I=Se[c.key],q=Ut[I];if(q instanceof yi)F("q"),F(Ko(m)),q.gState&&g.setGState(q.gState),F(c.matrix.toString()+" cm"),F("/"+I+" sh"),F("Q");else if(q instanceof ta){var K=new Vt(1,0,0,-1,0,oi());c.matrix&&(K=K.multiply(c.matrix||br),I=Yo.call(q,c.key,c.boundingBox,c.xStep,c.yStep,K).id),F("q"),F("/Pattern cs"),F("/"+I+" scn"),q.gState&&g.setGState(q.gState),F(m),F("Q")}},Ko=function(c){switch(c){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"}},Dr=g.moveTo=function(c,m){return F(X(z(c))+" "+X(U(m))+" m"),this},Ya=g.lineTo=function(c,m){return F(X(z(c))+" "+X(U(m))+" l"),this},Rr=g.curveTo=function(c,m,I,q,K,lt){return F([X(z(c)),X(U(m)),X(z(I)),X(U(q)),X(z(K)),X(U(lt)),"c"].join(" ")),this};g.__private__.line=g.line=function(c,m,I,q,K){if(isNaN(c)||isNaN(m)||isNaN(I)||isNaN(q)||!sr(K))throw new Error("Invalid arguments passed to jsPDF.line");return T===G?this.lines([[I-c,q-m]],c,m,[1,1],K||"S"):this.lines([[I-c,q-m]],c,m,[1,1]).stroke()},g.__private__.lines=g.lines=function(c,m,I,q,K,lt){var vt,Et,It,Xt,te,de,Xe,_e,Ae,Fe,De,Re;if(typeof c=="number"&&(Re=I,I=m,m=c,c=Re),q=q||[1,1],lt=lt||!1,isNaN(m)||isNaN(I)||!Array.isArray(c)||!Array.isArray(q)||!sr(K)||typeof lt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Dr(m,I),vt=q[0],Et=q[1],Xt=c.length,Fe=m,De=I,It=0;It>8&255,n>>16&255,n>>24&255)},Zi.prototype.toHexString=function(n){return n.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Zi.prototype.hexToBytes=function(n){for(var t=[],e=0;e>8&255,n>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return rl(e,r)}},Bo.prototype.equals=function(n){var t,e="id,objectNumber,equals";if(!n||xe(n)!==xe(this))return!1;var r=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!n.hasOwnProperty(t)||this[t]!==n[t])return!1;r++}for(t in n)n.hasOwnProperty(t)&&e.indexOf(t)<0&&r--;return r===0},Mt.API={events:[]},Mt.version="4.2.1";var Ue=Mt.API,dl=1,Si=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Xi=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ni=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},$t=function(n){return n.toFixed(2)},$r=function(n){return n.toFixed(5)};Ue.__acroform__={};var kn=function(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n},Wu=function(n){return n*dl},dr=function(n){var t=new $f,e=Ft.internal.getHeight(n)||0,r=Ft.internal.getWidth(n)||0;return t.BBox=[0,0,Number($t(r)),Number($t(e))],t},h2=Ue.__acroform__.setBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<0;){t="",i--;var h,p,w=Lo("3",n,i).height,x=n.multiline?f-i:(f-w)/2,g=x+=2,P=0,C=0,B=0;if(i<=0){t=`(...) Tj `,t+="% Width of Text: "+Lo(t,n,i=12).width+", FieldWidth:"+l+` `;break}for(var S="",G=0,V=0;Vf)continue t;S+=a[V][B],T=!0,C=V,V--}else{S=(S+=a[V][B]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var it=parseInt(V),mt=u(it,S,i),dt=V>=a.length-1;if(mt&&!dt){S+=" ",B=0;continue}if(mt||dt){if(dt)C=it;else if(n.multiline&&(w+2)*(G+2)+2>f)continue t}else{if(!n.multiline||(w+2)*(G+2)+2>f)continue t;C=it}}for(var X="",R=P;R<=C;R++){var tt=a[R];if(n.multiline){if(R===C){X+=tt[B]+" ",B=(B+1)%tt.length;continue}if(R===P){X+=tt[tt.length-1]+" ";continue}}X+=tt[0]+" "}switch(X=X.substr(X.length-1)==" "?X.substr(0,X.length-1):X,p=Lo(X,n,i).width,n.textAlign){case"right":h=l-p-2;break;case"center":h=(l-p)/2;break;default:h=2}t+=$t(h)+" "+$t(g)+` Td `,t+="("+Si(X)+`) Tj `,t+=-$t(h)+` 0 Td `,g=-(i+2),p=0,P=T?C:C+1,G++,S=""}break}return r.text=t,r.fontSize=i,r},Lo=function(n,t,e){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),a=t.scope.getStringUnitWidth(n,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:a}},v2={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},m2=function(n,t){var e={type:"reference",object:n};t.internal.getPageInfo(n.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&t.internal.getPageInfo(n.page).pageContext.annotations.push(e)},b2=function(n,t){if(t.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(tr.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(v2)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");dl=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new Zf,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.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})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in r)if(r.hasOwnProperty(a)){var i=r[a];i.objId=void 0,i.hasAnnotation&&m2(i,e)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(e){(function(r,a){var i=!r;for(var f in r||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(f)){var l=r[f],u=[],h=l.Rect;if(l.Rect&&(l.Rect=p2(l.Rect,a)),a.internal.newObjectDeferredBegin(l.objId,!0),l.DA=Ft.createDefaultAppearanceStream(l),xe(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(u=l.getKeyValueListForStream()),l.Rect=h,l.hasAppearanceStream&&!l.appearanceStreamContent){var p=g2(l);u.push({key:"AP",value:"<>"}),a.internal.acroformPlugin.xForms.push(p)}if(l.appearanceStreamContent){var w="";for(var x in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(x)){var g=l.appearanceStreamContent[x];if(w+="/"+x+" ",w+="<<",Object.keys(g).length>=1||Array.isArray(g)){for(var f in g)if(g.hasOwnProperty(f)){var P=g[f];typeof P=="function"&&(P=P.call(a,l)),w+="/"+f+" "+P+" ",a.internal.acroformPlugin.xForms.indexOf(P)>=0||a.internal.acroformPlugin.xForms.push(P)}}else typeof(P=g)=="function"&&(P=P.call(a,l)),w+="/"+f+" "+P,a.internal.acroformPlugin.xForms.indexOf(P)>=0||a.internal.acroformPlugin.xForms.push(P);w+=">>"}u.push({key:"AP",value:`<< `+w+">>"})}a.internal.putStream({additionalKeyValues:u,objectId:l.objId}),a.internal.out("endobj")}i&&(function(C,B){for(var S in C)if(C.hasOwnProperty(S)){var G=S,V=C[S];B.internal.newObjectDeferredBegin(V.objId,!0),xe(V)==="object"&&typeof V.putStream=="function"&&V.putStream(),delete C[G]}})(a.internal.acroformPlugin.xForms,a)})(e,n)}),n.internal.acroformPlugin.isInitialized=!0}},Xf=Ue.__acroform__.arrayToPdfArray=function(n,t,e){var r=function(f){return f};if(Array.isArray(n)){for(var a="[",i=0;i0?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(n){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Si(e(n))+")"}},set:function(e){n=e}})};kn(Zf,pr);var tr=function n(){pr.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');t=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ve(t,3)},set:function(S){S?this.F=Ye(t,3):this.F=Je(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');e=S}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(S){r=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(S){r[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(S){r[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(S){r[2]=S}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(S){r[3]=S}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof Do)return;i="FieldObject"+n.FieldNum++}var S=function(G){return G};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+Si(S(i))+")"},set:function(S){i=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(S){i=S}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(S){f=S}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(S){l=S}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(S){u=S}});var h=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h===void 0?50/dl:h},set:function(S){h=S}});var p="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return p},set:function(S){p=S}});var w="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!w||this instanceof Do||this instanceof xi))return qs(w,this.objId,this.scope)},set:function(S){S=S.toString(),w=S}});var x=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(x)return this instanceof rn==0?qs(x,this.objId,this.scope):x},set:function(S){S=S.toString(),x=this instanceof rn==0?S.substr(0,1)==="("?Xi(S.substr(1,S.length-2)):Xi(S):S}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?Xi(x.substr(1,x.length-1)):x},set:function(S){S=S.toString(),x=this instanceof rn==1?"/"+Ni(S):S}});var g=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(g)return g},set:function(S){this.V=S}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof rn==0?qs(g,this.objId,this.scope):g},set:function(S){S=S.toString(),g=this instanceof rn==0?S.substr(0,1)==="("?Xi(S.substr(1,S.length-2)):Xi(S):S}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?Xi(g.substr(1,g.length-1)):g},set:function(S){S=S.toString(),g=this instanceof rn==1?"/"+Ni(S):S}}),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 P,C=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return C},set:function(S){S=!!S,C=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(P)return P},set:function(S){P=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,1)},set:function(S){S?this.Ff=Ye(this.Ff,1):this.Ff=Je(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,2)},set:function(S){S?this.Ff=Ye(this.Ff,2):this.Ff=Je(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,3)},set:function(S){S?this.Ff=Ye(this.Ff,3):this.Ff=Je(this.Ff,3)}});var B=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(B!==null)return B},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');B=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(B){case 0:default:S="left";break;case 1:S="center";break;case 2:S="right"}return S},configurable:!0,enumerable:!0,set:function(S){switch(S){case"right":case 2:B=2;break;case"center":case 1:B=1;break;default:B=0}}})};kn(tr,pr);var ea=function(){tr.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){n=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Xf(t,this.objId,this.scope)},set:function(e){var r,a;a=[],typeof(r=e)=="string"&&(a=(function(i,f,l){l||(l=1);for(var u,h=[];u=f.exec(i);)h.push(u[l]);return h})(r,/\((.*?)\)/g)),t=a}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,18)},set:function(e){e?this.Ff=Ye(this.Ff,18):this.Ff=Je(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=Ye(this.Ff,19):this.Ff=Je(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,20)},set:function(e){e?(this.Ff=Ye(this.Ff,20),t.sort()):this.Ff=Je(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,22)},set:function(e){e?this.Ff=Ye(this.Ff,22):this.Ff=Je(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,23)},set:function(e){e?this.Ff=Ye(this.Ff,23):this.Ff=Je(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,27)},set:function(e){e?this.Ff=Ye(this.Ff,27):this.Ff=Je(this.Ff,27)}}),this.hasAppearanceStream=!1};kn(ea,tr);var na=function(){ea.call(this),this.fontName="helvetica",this.combo=!1};kn(na,ea);var ra=function(){na.call(this),this.combo=!0};kn(ra,na);var Co=function(){ra.call(this),this.edit=!0};kn(Co,ra);var rn=function(){tr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,15)},set:function(e){e?this.Ff=Ye(this.Ff,15):this.Ff=Je(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,16)},set:function(e){e?this.Ff=Ye(this.Ff,16):this.Ff=Je(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,17)},set:function(e){e?this.Ff=Ye(this.Ff,17):this.Ff=Je(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,26)},set:function(e){e?this.Ff=Ye(this.Ff,26):this.Ff=Je(this.Ff,26)}});var n,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(i){return i};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,a=[];for(r in a.push("<<"),t)a.push("/"+r+" ("+Si(e(t[r]))+")");return a.push(">>"),a.join(` `)}},set:function(e){xe(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 n},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),n="/"+Ni(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+Ni(e)}})};kn(rn,tr);var Fo=function(){rn.call(this),this.pushButton=!0};kn(Fo,rn);var ia=function(){rn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t!==void 0?t:[]}})};kn(ia,rn);var Do=function(){var n,t;tr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(a){n=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(a){t=a}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(l){return l};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var i,f=[];for(i in f.push("<<"),r)f.push("/"+i+" ("+Si(a(r[i]))+")");return f.push(">>"),f.join(` `)},set:function(a){xe(a)==="object"&&(r=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(a){typeof a=="string"&&(r.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){var i=a==null?"":a.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),e="/"+Ni(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(a){var i=a==null?"":a.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),e="/"+Ni(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ft.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};kn(Do,tr),ia.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=n.createAppearanceStream(e.optionName),e.caption=n.getCA()}},ia.prototype.createOption=function(n){var t=new Do;return t.Parent=this,t.optionName=n,this.Kids.push(t),w2.call(this.scope,t),t};var Io=function(){rn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ft.CheckBox.createAppearanceStream()};kn(Io,rn);var xi=function(){tr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,13)},set:function(t){t?this.Ff=Ye(this.Ff,13):this.Ff=Je(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,21)},set:function(t){t?this.Ff=Ye(this.Ff,21):this.Ff=Je(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,23)},set:function(t){t?this.Ff=Ye(this.Ff,23):this.Ff=Je(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,24)},set:function(t){t?this.Ff=Ye(this.Ff,24):this.Ff=Je(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,25)},set:function(t){t?this.Ff=Ye(this.Ff,25):this.Ff=Je(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,26)},set:function(t){t?this.Ff=Ye(this.Ff,26):this.Ff=Je(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){Number.isInteger(t)&&(n=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};kn(xi,tr);var Eo=function(){xi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,14)},set:function(n){n?this.Ff=Ye(this.Ff,14):this.Ff=Je(this.Ff,14)}}),this.password=!0};kn(Eo,xi);var Ft={CheckBox:{createAppearanceStream:function(){return{N:{On:Ft.CheckBox.YesNormal},D:{On:Ft.CheckBox.YesPushDown,Off:Ft.CheckBox.OffPushDown}}},YesPushDown:function(n){var t=dr(n);t.scope=n.scope;var e=[],r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,a=n.scope.__private__.encodeColorString(n.color),i=il(n,n.caption);return e.push("0.749023 g"),e.push("0 0 "+$t(Ft.internal.getWidth(n))+" "+$t(Ft.internal.getHeight(n))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+$t(i.fontSize)+" Tf "+a),e.push("BT"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(` `),t},YesNormal:function(n){var t=dr(n);t.scope=n.scope;var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,r=n.scope.__private__.encodeColorString(n.color),a=[],i=Ft.internal.getHeight(n),f=Ft.internal.getWidth(n),l=il(n,n.caption);return a.push("1 g"),a.push("0 0 "+$t(f)+" "+$t(i)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+$t(f-1)+" "+$t(i-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+e+" "+$t(l.fontSize)+" Tf "+r),a.push(l.text),a.push("ET"),a.push("Q"),t.stream=a.join(` `),t},OffPushDown:function(n){var t=dr(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+$t(Ft.internal.getWidth(n))+" "+$t(Ft.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(` `),t}},RadioButton:{Circle:{createAppearanceStream:function(n){var t={D:{Off:Ft.RadioButton.Circle.OffPushDown},N:{}};return t.N[n]=Ft.RadioButton.Circle.YesNormal,t.D[n]=Ft.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(n){var t=dr(n);t.scope=n.scope;var e=[],r=Ft.internal.getWidth(n)<=Ft.internal.getHeight(n)?Ft.internal.getWidth(n)/4:Ft.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var a=Ft.internal.Bezier_C,i=Number((r*a).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+$r(Ft.internal.getWidth(n)/2)+" "+$r(Ft.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),e.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),e.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),e.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(` `),t},YesPushDown:function(n){var t=dr(n);t.scope=n.scope;var e=[],r=Ft.internal.getWidth(n)<=Ft.internal.getHeight(n)?Ft.internal.getWidth(n)/4:Ft.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var a=Number((2*r).toFixed(5)),i=Number((a*Ft.internal.Bezier_C).toFixed(5)),f=Number((r*Ft.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+$r(Ft.internal.getWidth(n)/2)+" "+$r(Ft.internal.getHeight(n)/2)+" cm"),e.push(a+" 0 m"),e.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),e.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),e.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),e.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+$r(Ft.internal.getWidth(n)/2)+" "+$r(Ft.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+f+" "+f+" "+r+" 0 "+r+" c"),e.push("-"+f+" "+r+" -"+r+" "+f+" -"+r+" 0 c"),e.push("-"+r+" -"+f+" -"+f+" -"+r+" 0 -"+r+" c"),e.push(f+" -"+r+" "+r+" -"+f+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(` `),t},OffPushDown:function(n){var t=dr(n);t.scope=n.scope;var e=[],r=Ft.internal.getWidth(n)<=Ft.internal.getHeight(n)?Ft.internal.getWidth(n)/4:Ft.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var a=Number((2*r).toFixed(5)),i=Number((a*Ft.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+$r(Ft.internal.getWidth(n)/2)+" "+$r(Ft.internal.getHeight(n)/2)+" cm"),e.push(a+" 0 m"),e.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),e.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),e.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),e.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(` `),t}},Cross:{createAppearanceStream:function(n){var t={D:{Off:Ft.RadioButton.Cross.OffPushDown},N:{}};return t.N[n]=Ft.RadioButton.Cross.YesNormal,t.D[n]=Ft.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(n){var t=dr(n);t.scope=n.scope;var e=[],r=Ft.internal.calculateCross(n);return e.push("q"),e.push("1 1 "+$t(Ft.internal.getWidth(n)-2)+" "+$t(Ft.internal.getHeight(n)-2)+" re"),e.push("W"),e.push("n"),e.push($t(r.x1.x)+" "+$t(r.x1.y)+" m"),e.push($t(r.x2.x)+" "+$t(r.x2.y)+" l"),e.push($t(r.x4.x)+" "+$t(r.x4.y)+" m"),e.push($t(r.x3.x)+" "+$t(r.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(` `),t},YesPushDown:function(n){var t=dr(n);t.scope=n.scope;var e=Ft.internal.calculateCross(n),r=[];return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(n))+" "+$t(Ft.internal.getHeight(n))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+$t(Ft.internal.getWidth(n)-2)+" "+$t(Ft.internal.getHeight(n)-2)+" re"),r.push("W"),r.push("n"),r.push($t(e.x1.x)+" "+$t(e.x1.y)+" m"),r.push($t(e.x2.x)+" "+$t(e.x2.y)+" l"),r.push($t(e.x4.x)+" "+$t(e.x4.y)+" m"),r.push($t(e.x3.x)+" "+$t(e.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(` `),t},OffPushDown:function(n){var t=dr(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+$t(Ft.internal.getWidth(n))+" "+$t(Ft.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(` `),t}}},createDefaultAppearanceStream:function(n){var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,e=n.scope.__private__.encodeColorString(n.color);return"/"+t+" "+n.fontSize+" Tf "+e}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(n){var t=Ft.internal.getWidth(n),e=Ft.internal.getHeight(n),r=Math.min(t,e);return{x1:{x:(t-r)/2,y:(e-r)/2+r},x2:{x:(t-r)/2+r,y:(e-r)/2},x3:{x:(t-r)/2,y:(e-r)/2},x4:{x:(t-r)/2+r,y:(e-r)/2+r}}}},Ft.internal.getWidth=function(n){var t=0;return xe(n)==="object"&&(t=Wu(n.Rect[2])),t},Ft.internal.getHeight=function(n){var t=0;return xe(n)==="object"&&(t=Wu(n.Rect[3])),t};var w2=Ue.addField=function(n){if(b2(this,n),!(n instanceof tr))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=n).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};Ue.AcroFormChoiceField=ea,Ue.AcroFormListBox=na,Ue.AcroFormComboBox=ra,Ue.AcroFormEditBox=Co,Ue.AcroFormButton=rn,Ue.AcroFormPushButton=Fo,Ue.AcroFormRadioButton=ia,Ue.AcroFormCheckBox=Io,Ue.AcroFormTextField=xi,Ue.AcroFormPasswordField=Eo,Ue.AcroFormAppearance=Ft,Ue.AcroForm={ChoiceField:ea,ListBox:na,ComboBox:ra,EditBox:Co,Button:rn,PushButton:Fo,RadioButton:ia,CheckBox:Io,TextField:xi,PasswordField:Eo,Appearance:Ft},Mt.AcroForm={ChoiceField:ea,ListBox:na,ComboBox:ra,EditBox:Co,Button:rn,PushButton:Fo,RadioButton:ia,CheckBox:Io,TextField:xi,PasswordField:Eo,Appearance:Ft};Mt.AcroForm;function Qf(n){return n.reduce(function(t,e,r){return t[e]=r,t},{})}(function(n){var t="addImage_";n.__addimage__={};var e="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]]},a=n.__addimage__.getImageFileTypeByImageData=function(L,O){var z,U,rt,st,ft,nt=e;if((O=O||e)==="RGBA"||L.data!==void 0&&L.data instanceof Uint8ClampedArray&&"height"in L&&"width"in L)return"RGBA";if(mt(L))for(ft in r)for(rt=r[ft],z=0;z>"}),"transparency"in O&&Array.isArray(O.transparency)&&O.transparency.length>0){for(var ft="",nt=0,ct=O.transparency.length;nt>",C.content=i;var V=C.objId+" 0 R";i="<>";else if(r.options.pageNumber)switch(i="<=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=1};var h=n.__arabicParser__.arabicLetterHasFinalForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=3};var p=n.__arabicParser__.arabicLetterHasMedialForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length==4},w=n.__arabicParser__.resolveLigatures=function(C){var B=0,S=e,G="",V=0;for(B=0;B>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(n){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(l){r=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(l){a=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(l){i=l}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(l){f=l}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,r){var a;if((e=e||"2d")!=="2d")return null;for(a in r)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=r[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Mt.API),(function(n){var t={left:0,top:0,bottom:0,right:0},e=!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(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(C){u=C}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(C){h=C}});var p=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return p},set:function(C){p=C}});var w=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return w},set:function(C){w=C}});var x=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return x},set:function(C){x=C}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(C){g=C}});var P=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return P},set:function(C){P=C}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(u){return r.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},n.getTextDimensions=function(u,h){r.call(this);var p=(h=h||{}).fontSize||this.getFontSize(),w=h.font||this.getFont(),x=h.scaleFactor||this.internal.scaleFactor,g=0,P=0,C=0,B=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var S=h.maxWidth;S>0?typeof u=="string"?u=this.splitTextToSize(u,S):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(V,T){return V.concat(B.splitTextToSize(T,S))},[])):u=Array.isArray(u)?u:[u];for(var G=0;Gthis.getPageHeight()?(this.cellAddPage(),u.y=w.top,g&&x&&(this.printHeaderRow(u.lineNumber,!0),u.y+=x[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,e===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-p,u.y+p,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+p,{align:"center",baseline:"top",maxWidth:u.width-p-p}):this.text(u.text,u.x+p,u.y+p,{align:"left",baseline:"top",maxWidth:u.width-p-p})),this.internal.__cell__.lastCell=u,this};n.table=function(u,h,p,w,x){if(r.call(this),!p)throw new Error("No data for PDF table.");var g,P,C,B,S=[],G=[],V=[],T={},it={},mt=[],dt=[],X=(x=x||{}).autoSize||!1,R=x.printHeaders!==!1,tt=x.css&&x.css["font-size"]!==void 0?16*x.css["font-size"]:x.fontSize||12,L=x.margins||Object.assign({width:this.getPageWidth()},t),O=typeof x.padding=="number"?x.padding:3,z=x.headerBackgroundColor||"#c8c8c8",U=x.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=R,this.internal.__cell__.margins=L,this.internal.__cell__.table_font_size=tt,this.internal.__cell__.padding=O,this.internal.__cell__.headerBackgroundColor=z,this.internal.__cell__.headerTextColor=U,this.setFontSize(tt),w==null)G=S=Object.keys(p[0]),V=S.map(function(){return"left"});else if(Array.isArray(w)&&xe(w[0])==="object")for(S=w.map(function(_t){return _t.name}),G=w.map(function(_t){return _t.prompt||_t.name||""}),V=w.map(function(_t){return _t.align||"left"}),g=0;g0&&this.setTableHeaderRow(x),this.setFont(void 0,"normal"),e=!1}})(Mt.API);var th={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},eh=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],al=Qf(eh),nh=[100,200,300,400,500,600,700,800,900],y2=Qf(nh);function Us(n){var t=n.family.replace(/"|'/g,"").toLowerCase(),e=(function(i){return th[i=i||"normal"]?i:"normal"})(n.style),r=(function(i){return i?typeof i=="number"?i>=100&&i<=900&&i%100==0?i:400:/^\d00$/.test(i)?parseInt(i):i==="bold"?700:400:400})(n.weight),a=(function(i){return typeof al[i=i||"normal"]=="number"?i:"normal"})(n.stretch);return{family:t,style:e,weight:r,stretch:a,src:n.src||[],ref:n.ref||{name:t,style:[a,e,r].join(" ")}}}function Gu(n,t,e,r){var a;for(a=e;a>=0&&a=0&&a>>1)&255}return a}function nf(n,t,e){var r=n.length,a=[];a[0]=4;for(var i=0;i>i&f}function rf(n,t,e,r){var a=e*r,i=Math.floor(a/8),f=16-(a-8*i+r),l=(1<>8&255;h.setUint8(p,x)}})(n,i,rh(n,i)&~(l<>7,f=1<<1+(7&a);n[t++],n[t++];var l=null,u=null;i&&(l=t,u=f,t+=3*f);var h=!0,p=[],w=0,x=null,g=0,P=null;for(this.width=e,this.height=r;h&&t=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;case 249:if(n[t++]!==4||n[t+4]!==0)throw new Error("Invalid graphics extension block.");var C=n[t++];w=n[t++]|n[t++]<<8,x=n[t++],1&C||(x=null),g=C>>2&7,t++;break;case 254:for(;;){if(!((L=n[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;default:throw new Error("Unknown graphic control label: 0x"+n[t-1].toString(16))}break;case 44:var B=n[t++]|n[t++]<<8,S=n[t++]|n[t++]<<8,G=n[t++]|n[t++]<<8,V=n[t++]|n[t++]<<8,T=n[t++],it=T>>6&1,mt=1<<1+(7&T),dt=l,X=u,R=!1;T>>7&&(R=!0,dt=t,X=mt,t+=3*mt);var tt=t;for(t++;;){var L;if(!((L=n[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}p.push({x:B,y:S,width:G,height:V,has_local_palette:R,palette_offset:dt,palette_size:X,data_offset:tt,data_length:t-tt,transparent_index:x,interlaced:!!it,delay:w,disposal:g});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+n[t-1].toString(16))}this.numFrames=function(){return p.length},this.loopCount=function(){return P},this.frameInfo=function(O){if(O<0||O>=p.length)throw new Error("Frame index out of range.");return p[O]},this.decodeAndBlitFrameBGRA=function(O,z){var U=this.frameInfo(O),rt=U.width*U.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var st=new Uint8Array(rt);af(n,U.data_offset,st,rt);var ft=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ct=U.width,_t=e-ct,wt=ct,_=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),M=_,H=4*_t;U.interlaced===!0&&(H+=4*e*7);for(var J=8,Z=0,at=st.length;Z=D&&(H=4*_t+4*e*(J-1),M=_+(ct+_t)*(J<<1),J>>=1)),ot===nt)M+=4;else{var gt=n[ft+3*ot],At=n[ft+3*ot+1],kt=n[ft+3*ot+2];z[M++]=kt,z[M++]=At,z[M++]=gt,z[M++]=255}--wt}},this.decodeAndBlitFrameRGBA=function(O,z){var U=this.frameInfo(O),rt=U.width*U.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var st=new Uint8Array(rt);af(n,U.data_offset,st,rt);var ft=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ct=U.width,_t=e-ct,wt=ct,_=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),M=_,H=4*_t;U.interlaced===!0&&(H+=4*e*7);for(var J=8,Z=0,at=st.length;Z=D&&(H=4*_t+4*e*(J-1),M=_+(ct+_t)*(J<<1),J>>=1)),ot===nt)M+=4;else{var gt=n[ft+3*ot],At=n[ft+3*ot+1],kt=n[ft+3*ot+2];z[M++]=gt,z[M++]=At,z[M++]=kt,z[M++]=255}--wt}}}function af(n,t,e,r){for(var a=n[t++],i=1<>=u,p-=u,B!==i){if(B===f)break;for(var S=Bi;)V=P[V]>>8,++G;var T=V;if(x+G+(S!==B?1:0)>r)return void Le.log("Warning, gif stream longer than expected.");e[x++]=T;var it=x+=G;for(S!==B&&(e[x++]=T),V=S;G--;)V=P[V],e[--it]=255&V,V>>=8;C!==null&&l<4096&&(P[l++]=C<<8|T,l>=h+1&&u<12&&(++u,h=h<<1|1)),C=B}else l=f+1,h=(1<<(u=a+1))-1,C=null}return x!==r&&Le.log("Warning, gif stream shorter than expected."),e}/** * @license Copyright (c) 2008, Adobe Systems Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Adobe Systems Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */function Ws(n){var t,e,r,a,i,f=Math.floor,l=new Array(64),u=new Array(64),h=new Array(64),p=new Array(64),w=new Array(65535),x=new Array(65535),g=new Array(64),P=new Array(64),C=[],B=0,S=7,G=new Array(64),V=new Array(64),T=new Array(64),it=new Array(256),mt=new Array(2048),dt=[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],X=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],tt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[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],z=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],rt=[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 st(_,D){for(var M=0,H=0,J=new Array,Z=1;Z<=16;Z++){for(var at=1;at<=_[Z];at++)J[D[H]]=[],J[D[H]][0]=M,J[D[H]][1]=Z,H++,M++;M*=2}return J}function ft(_){for(var D=_[0],M=_[1]-1;M>=0;)D&1<>8&255),nt(255&_)}function _t(_,D,M,H,J){for(var Z,at=J[0],ot=J[240],gt=(function(yt,Wt){var Ct,zt,qt,me,ue,Zt,he,fe,Bt,ne,Rt=0;for(Bt=0;Bt<8;++Bt){Ct=yt[Rt],zt=yt[Rt+1],qt=yt[Rt+2],me=yt[Rt+3],ue=yt[Rt+4],Zt=yt[Rt+5],he=yt[Rt+6];var ze=Ct+(fe=yt[Rt+7]),ge=Ct-fe,oe=zt+he,se=zt-he,je=qt+Zt,Ut=qt-Zt,Se=me+ue,Yt=me-ue,Qt=ze+Se,Oe=ze-Se,le=oe+je,Gt=oe-je;yt[Rt]=Qt+le,yt[Rt+4]=Qt-le;var be=.707106781*(Gt+Oe);yt[Rt+2]=Oe+be,yt[Rt+6]=Oe-be;var ti=.382683433*((Qt=Yt+Ut)-(Gt=se+ge)),fn=.5411961*Qt+ti,vr=1.306562965*Gt+ti,nr=.707106781*(le=Ut+se),Vt=ge+nr,mr=ge-nr;yt[Rt+5]=mr+fn,yt[Rt+3]=mr-fn,yt[Rt+1]=Vt+vr,yt[Rt+7]=Vt-vr,Rt+=8}for(Rt=0,Bt=0;Bt<8;++Bt){Ct=yt[Rt],zt=yt[Rt+8],qt=yt[Rt+16],me=yt[Rt+24],ue=yt[Rt+32],Zt=yt[Rt+40],he=yt[Rt+48];var br=Ct+(fe=yt[Rt+56]),Rn=Ct-fe,Mn=zt+he,Me=zt-he,nn=qt+Zt,an=qt-Zt,ei=me+ue,Br=me-ue,Gn=br+ei,rr=br-ei,Vn=Mn+nn,Yn=Mn-nn;yt[Rt]=Gn+Vn,yt[Rt+32]=Gn-Vn;var Tn=.707106781*(Yn+rr);yt[Rt+16]=rr+Tn,yt[Rt+48]=rr-Tn;var ni=.382683433*((Gn=Br+an)-(Yn=Me+Rn)),ir=.5411961*Gn+ni,ri=1.306562965*Yn+ni,ki=.707106781*(Vn=an+Me),Pi=Rn+ki,Ci=Rn-ki;yt[Rt+40]=Ci+ir,yt[Rt+24]=Ci-ir,yt[Rt+8]=Pi+ri,yt[Rt+56]=Pi-ri,Rt++}for(Bt=0;Bt<64;++Bt)ne=yt[Bt]*Wt[Bt],g[Bt]=ne>0?ne+.5|0:ne-.5|0;return g})(_,D),At=0;At<64;++At)P[dt[At]]=gt[At];var kt=P[0]-M;M=P[0],kt==0?ft(H[0]):(ft(H[x[Z=32767+kt]]),ft(w[Z]));for(var St=63;St>0&&P[St]==0;)St--;if(St==0)return ft(at),M;for(var Tt,F=1;F<=St;){for(var Lt=F;P[F]==0&&F<=St;)++F;var ae=F-Lt;if(ae>=16){Tt=ae>>4;for(var Ht=1;Ht<=Tt;++Ht)ft(ot);ae&=15}Z=32767+P[F],ft(J[(ae<<4)+x[Z]]),ft(w[Z]),F++}return St!=63&&ft(at),M}function wt(_){_=Math.min(Math.max(_,1),100),i!=_&&((function(D){for(var M=[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],H=0;H<64;H++){var J=f((M[H]*D+50)/100);J=Math.min(Math.max(J,1),255),l[dt[H]]=J}for(var Z=[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],at=0;at<64;at++){var ot=f((Z[at]*D+50)/100);ot=Math.min(Math.max(ot,1),255),u[dt[at]]=ot}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],At=0,kt=0;kt<8;kt++)for(var St=0;St<8;St++)h[At]=1/(l[dt[At]]*gt[kt]*gt[St]*8),p[At]=1/(u[dt[At]]*gt[kt]*gt[St]*8),At++})(_<50?Math.floor(5e3/_):Math.floor(200-2*_)),i=_)}this.encode=function(_,D){D&&wt(D),C=new Array,B=0,S=7,ct(65496),ct(65504),ct(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),ct(1),ct(1),nt(0),nt(0),(function(){ct(65499),ct(132),nt(0);for(var zt=0;zt<64;zt++)nt(l[zt]);nt(1);for(var qt=0;qt<64;qt++)nt(u[qt])})(),(function(zt,qt){ct(65472),ct(17),nt(8),ct(qt),ct(zt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)})(_.width,_.height),(function(){ct(65476),ct(418),nt(0);for(var zt=0;zt<16;zt++)nt(X[zt+1]);for(var qt=0;qt<=11;qt++)nt(R[qt]);nt(16);for(var me=0;me<16;me++)nt(tt[me+1]);for(var ue=0;ue<=161;ue++)nt(L[ue]);nt(1);for(var Zt=0;Zt<16;Zt++)nt(O[Zt+1]);for(var he=0;he<=11;he++)nt(z[he]);nt(17);for(var fe=0;fe<16;fe++)nt(U[fe+1]);for(var Bt=0;Bt<=161;Bt++)nt(rt[Bt])})(),ct(65498),ct(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var M=0,H=0,J=0;B=0,S=7,this.encode.displayName="_encode_";for(var Z,at,ot,gt,At,kt,St,Tt,F,Lt=_.data,ae=_.width,Ht=_.height,yt=4*ae,Wt=0;Wt>3)*yt+(St=4*(7&F)),Wt+Tt>=Ht&&(kt-=yt*(Wt+1+Tt-Ht)),Z+St>=yt&&(kt-=Z+St-yt+4),at=Lt[kt++],ot=Lt[kt++],gt=Lt[kt++],G[F]=(mt[at]+mt[ot+256|0]+mt[gt+512|0]>>16)-128,V[F]=(mt[at+768|0]+mt[ot+1024|0]+mt[gt+1280|0]>>16)-128,T[F]=(mt[at+1280|0]+mt[ot+1536|0]+mt[gt+1792|0]>>16)-128;M=_t(G,h,M,t,r),H=_t(V,p,H,e,a),J=_t(T,p,J,e,a),Z+=32}Wt+=8}if(S>=0){var Ct=[];Ct[1]=S+1,Ct[0]=(1<O;O++)if(R[tt+O]!=L.charCodeAt(O))return!0;return!1}function r(R,tt,L,O,z){for(var U=0;UU+1?[]:new tt),!(rt.length>>0;o&d;)d>>>=1;return d?(o&d-1)+d:o}function L(o,s,d,v,b){t(!(v%d));do o[s+(v-=d)]=b;while(0=b),512>=b)var y=i(512);else if((y=i(b))==null)return 0;return(function(A,N,k,E,W,et){var j,Y,$=N,ut=1<j;++j){if(Q[j]>1<(re-=Q[j]))return 0;for(;0=j;++j,W<<=1){if(Pt+=re<<=1,0>(re-=Q[j]))return 0;for(;0xt&&!(0>=(pt-=Q[xt]));)++xt,pt<<=1;ut+=jt=1<<(pt=xt-k),A[N+(xt=Dt&bt)].g=pt+k,A[N+xt].value=$-N-xt}E.g=j-k,E.value=et[Y++],L(A,$+(Dt>>k),W,jt,E),Dt=tt(Dt,j)}}return Pt!=2*ht[15]-1?0:ut})(o,s,d,v,b,y)}function z(){this.value=this.g=0}function U(){this.value=this.g=0}function rt(){this.G=f(5,z),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(zi,U)}function st(o,s,d,v){t(o!=null),t(s!=null),t(2147483648>v),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=s,o.pa=d,o.Jd=s,o.Yc=d+v,o.Zc=4<=v?d+v-4+1:d,at(o)}function ft(o,s){for(var d=0;0v),o.Sb=v,o.Ra=0,o.u=0,o.h=0,4>>=8,o.Ra+=o.oa[o.pa+o.bb]<>>0,++o.bb,o.u-=8;H(o)&&(o.h=1,o.u=0)}function wt(o,s){if(t(0<=s),!o.h&&s<=ya){var d=M(o)&di[s];return o.u+=s,_t(o),d}return o.h=1,o.u=0}function _(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function D(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function M(o){return o.Ra>>>(o.u&yn-1)>>>0}function H(o){return t(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>yn}function J(o,s){o.u=s,o.h=H(o)}function Z(o){o.u>=Nn&&(t(o.u>=Nn),_t(o))}function at(o){t(o!=null&&o.oa!=null),o.pa>>0,o.b+=8):(t(o!=null&&o.oa!=null),o.pao.b&&at(o);var v=o.b,b=d*s>>>8,y=(o.I>>>v>b)+0;for(y?(d-=b,o.I-=b+1<>>0):d=b+1,v=d,b=0;256<=v;)b+=8,v>>=8;return v=7^b+Hi[v],o.b-=v,o.Ca=(d<>24&255,o[s+1]=d>>16&255,o[s+2]=d>>8&255,o[s+3]=255&d}function kt(o,s){return o[s+0]|o[s+1]<<8}function St(o,s){return kt(o,s)|o[s+2]<<16}function Tt(o,s){return kt(o,s)|kt(o,s+2)<<16}function F(o,s){var d=1<=b||0>=y?0:(d[0]=b,v[0]=y,1)}function yt(o,s){return o+(1<>>s}function Wt(o,s){return((4278255360&o)+(4278255360&s)>>>0&4278255360)+((16711935&o)+(16711935&s)>>>0&16711935)>>>0}function Ct(o,s){R[s]=function(d,v,b,y,A,N,k){var E;for(E=0;E>>1)+(o&s)>>>0}function me(o){return 0<=o&&256>o?o:0>o?0:255>1))}function Zt(o,s,d){return Math.abs(s-d)-Math.abs(o-d)}function he(o,s,d,v,b,y,A){for(v=y[A-1],d=0;d>8&255,k=16711935&(k=(k=16711935&A)+((N<<16)+N));v[b+y]=(4278255360&A)+k>>>0}}function Bt(o,s){s.jd=255&o,s.hd=o>>8&255,s.ud=o>>16&255}function ne(o,s,d,v,b,y){var A;for(A=0;A>>8,E=N,W=255&(W=(W=N>>>16)+((o.jd<<24>>24)*(k<<24>>24)>>>5));E=255&(E=(E+=(o.hd<<24>>24)*(k<<24>>24)>>>5)+((o.ud<<24>>24)*(W<<24>>24)>>>5)),b[y+A]=(4278255360&N)+(W<<16)+E}}function Rt(o,s,d,v,b){R[s]=function(y,A,N,k,E,W,et,j,Y){for(k=et;k>y.b,Y=y.Ea,$=y.K[0],ut=y.w;if(8>j)for(y=(1<>=j}else R["VP8LMapColor"+d](k,E,$,ut,W,et,A,N,Y)}}function ze(o,s,d,v,b){for(d=s+d;s>16&255,v[b++]=y>>8&255,v[b++]=255&y}}function ge(o,s,d,v,b){for(d=s+d;s>16&255,v[b++]=y>>8&255,v[b++]=255&y,v[b++]=y>>24&255}}function oe(o,s,d,v,b){for(d=s+d;s>16&240|A>>12&15,A=240&A|A>>28&15;v[b++]=y,v[b++]=A}}function se(o,s,d,v,b){for(d=s+d;s>16&248|A>>13&7,A=A>>5&224|A>>3&31;v[b++]=y,v[b++]=A}}function je(o,s,d,v,b){for(d=s+d;s>8&255,v[b++]=y>>16&255}}function Ut(o,s,d,v,b,y){if(y==0)for(d=s+d;s>24|y[1]>>8&65280|y[2]<<8&16711680|y[3]<<24)>>>0),b+=32;else r(v,b,o,s,d)}function Se(o,s){R[s][0]=R[o+"0"],R[s][1]=R[o+"1"],R[s][2]=R[o+"2"],R[s][3]=R[o+"3"],R[s][4]=R[o+"4"],R[s][5]=R[o+"5"],R[s][6]=R[o+"6"],R[s][7]=R[o+"7"],R[s][8]=R[o+"8"],R[s][9]=R[o+"9"],R[s][10]=R[o+"10"],R[s][11]=R[o+"11"],R[s][12]=R[o+"12"],R[s][13]=R[o+"13"],R[s][14]=R[o+"0"],R[s][15]=R[o+"0"]}function Yt(o){return o==us||o==fs||o==so||o==hs}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Oe(){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 le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Oe,this.sd=null}function Gt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){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 ti(o){return alert("todo:WebPSamplerProcessPlane"),o.T}function fn(o,s){var d=o.T,v=s.ba.f.RGBA,b=v.eb,y=v.fb+o.ka*v.A,A=Hn[s.ba.S],N=o.y,k=o.O,E=o.f,W=o.N,et=o.ea,j=o.W,Y=s.cc,$=s.dc,ut=s.Mc,Q=s.Nc,ht=o.ka,pt=o.ka+o.T,xt=o.U,bt=xt+1>>1;for(ht==0?A(N,k,null,null,E,W,et,j,E,W,et,j,b,y,null,null,xt):(A(s.ec,s.fc,N,k,Y,$,ut,Q,E,W,et,j,b,y-v.A,b,y,xt),++d);ht+2d,b=d==io||d==ao||d==oo||d==ls||d==12||Yt(d);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!Un(s.Oa,o,b?11:12))return 0;if(b&&Yt(d)&&Nr(),o.da)alert("todo:use_scaling");else{if(v){if(s.Ib=ti,o.Kb){if(d=o.U+1>>1,s.memory=i(o.U+2*d),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+o.U,s.Mc=s.cc,s.Nc=s.dc+d,s.Ib=fn,Nr()}}else alert("todo:EmitYUV");b&&(s.Jb=vr,v&&Re())}if(v&&!Bl){for(o=0;256>o;++o)Dh[o]=89858*(o-128)+uo>>lo,Th[o]=-22014*(o-128)+uo,Mh[o]=-45773*(o-128),Rh[o]=113618*(o-128)+uo>>lo;for(o=Sa;o>lo,qh[o-Sa]=ar(s,255),Uh[o-Sa]=ar(s+8>>4,15);Bl=1}return 1}function Vt(o){var s=o.ma,d=o.U,v=o.T;return t(!(1&o.ka)),0>=d||0>=v?0:(d=s.Ib(o,s),s.Jb!=null&&s.Jb(o,s,d),s.Dc+=d,1)}function mr(o){o.ma.memory=null}function br(o,s,d,v){return wt(o,8)!=47?0:(s[0]=wt(o,14)+1,d[0]=wt(o,14)+1,v[0]=wt(o,1),wt(o,3)!=0?0:!o.h)}function Rn(o,s){if(4>o)return o+1;var d=o-2>>1;return(2+(1&o)<>4)*o+(8-(15&d)))?d:1;var d}function Me(o,s,d){var v=M(d),b=o[s+=255&v].g-8;return 0>>0,t(8>=d.g),o.g}function an(o,s,d){var v=o.xc;return t((s=v==0?0:o.vc[o.md*(d>>v)+(s>>v)])>jt.b)*Pt;utxt&&(Ot=xt),(0,Jn[ce[Qe++]>>8&15])(j,Y+ +ie,ht,pt+ie-xt,Ot-ie,ht,pt+ie),ie=Ot}Y+=xt,pt+=xt,++ut&Dt||(jt+=Pt)}et!=E.nc&&r(k,N-$,k,N+(et-W-1)*$,$);break;case 1:for($=j,Q=Y,xt=(j=E.Ea)-(pt=j&~(ht=(Y=1<>E.b)*ut;W=b),0y.o&&(v=y.o),d=v?d=0:(b[0]+=4*y.v,y.ka=d-y.j,y.U=y.va-y.v,y.T=v-d,d=1),d){if(N=N[0],11>(d=o.ca).S){var W=d.f.RGBA,et=(v=d.S,b=y.U,y=y.T,E=W.eb,W.A),j=y;for(W=W.fb+o.Ma*W.A;0v){var b=o.l.width,y=d.ca,A=d.tb+b*v,N=o.V,k=o.Ba+o.c*v,E=o.gc;t(o.ab==1),t(E[0].hc==3),os(E[0],v,s,N,k,y,A),rr(d,v,s,y,A,b)}o.C=o.Ma=s}function Yn(o,s,d,v,b,y,A){var N=o.$/v,k=o.$%v,E=o.m,W=o.s,et=d+o.$,j=et;b=d+v*b;var Y=d+v*y,$=280+W.ua,ut=o.Pb?N:16777216,Q=0=ut){var Dt=et-d;t((ut=o).Pb),ut.wd=ut.m,ut.xd=Dt,0re.g?(J(bt,bt.u+re.g),Dt[Pt]=re.value,bt=0):(J(bt,bt.u+re.g-256),t(256<=re.value),bt=re.value),bt==0&&(xt=!0)}else bt=Me(pt.G[0],pt.H[0],E);if(E.h)break;if(xt||256>bt){if(!xt)if(pt.nd)s[et]=(pt.qb|bt<<8)>>>0;else{if(Z(E),xt=Me(pt.G[1],pt.H[1],E),Z(E),Dt=Me(pt.G[2],pt.H[2],E),Pt=Me(pt.G[3],pt.H[3],E),E.h)break;s[et]=(Pt<<24|xt<<16|bt<<8|Dt)>>>0}if(xt=!1,++et,++k>=v&&(k=0,++N,A!=null&&N<=y&&!(N%16)&&A(o,N),Q!=null))for(;j>>Q.Mb]=bt}else if(280>bt){if(bt=Rn(bt-256,E),Dt=Me(pt.G[4],pt.H[4],E),Z(E),Dt=Mn(v,Dt=Rn(Dt,E)),E.h)break;if(et-d=v;)k-=v,++N,A!=null&&N<=y&&!(N%16)&&A(o,N);if(t(et<=b),k&ht&&(pt=an(W,k,N)),Q!=null)for(;j>>Q.Mb]=bt}else{if(!(bt<$))break t;for(xt=bt-280,t(Q!=null);j>>Q.Mb]=bt;bt=et,t(!(xt>>>(Dt=Q).Xa)),s[bt]=Dt.X[xt],xt=!0}xt||t(E.h==H(E))}if(o.Pb&&E.h&&ety?y:N),o.a=0,o.$=et-d}return 1}return o.a=3,0}function Tn(o){t(o!=null),o.vc=null,o.yc=null,o.Ya=null;var s=o.Wa;s!=null&&(s.X=null),o.vb=null,t(o!=null)}function ni(){var o=new Et;return o==null?null:(o.a=0,o.xb=Fl,Se("Predictor","VP8LPredictors"),Se("Predictor","VP8LPredictors_C"),Se("PredictorAdd","VP8LPredictorsAdd"),Se("PredictorAdd","VP8LPredictorsAdd_C"),Wi=fe,gi=ne,xa=ze,Aa=ge,Gi=oe,vi=se,mi=je,R.VP8LMapColor32b=$e,R.VP8LMapColor8b=fr,o)}function ir(o,s,d,v,b){var y=1,A=[o],N=[s],k=v.m,E=v.s,W=null,et=0;t:for(;;){if(d)for(;y&&wt(k,1);){var j=A,Y=N,$=v,ut=1,Q=$.m,ht=$.gc[$.ab],pt=wt(Q,2);if($.Oc&1<=$.ab),pt){case 0:case 1:ht.b=wt(Q,3)+2,ut=ir(yt(ht.Ea,ht.b),yt(ht.nc,ht.b),0,$,ht.K),ht.K=ht.K[0];break;case 3:var xt,bt=wt(Q,8)+1,Dt=16>jt.b),Qe=i(ce);if(Qe==null)xt=0;else{var ie=jt.K[0],Ot=jt.w;for(Qe[0]=jt.K[0][0],Pt=1;Pt<1*re;++Pt)Qe[Pt]=Wt(ie[Ot+Pt],Qe[Pt-1]);for(;Pt<4*ce;++Pt)Qe[Pt]=0;jt.K[0]=null,jt.K[0]=Qe,xt=1}}ut=xt;break;case 2:break;default:t(0)}y=ut}}if(A=A[0],N=N[0],y&&wt(k,1)&&!(y=1<=(et=wt(k,4))&&11>=et)){v.a=3;break t}var Nt;if(Nt=y)e:{var We,ee,pe,Ie=v,sn=A,xn=N,Te=et,pn=d,An=Ie.m,tn=Ie.s,ve=[null],we=1,qe=0,ye=_h[Te];n:for(;;){if(pn&&wt(An,1)){var ln=wt(An,3)+2,Xn=yt(sn,ln),Ge=yt(xn,ln),Ln=Xn*Ge;if(!ir(Xn,Ge,0,Ie,ve))break n;for(ve=ve[0],tn.xc=ln,We=0;We>8&65535;ve[We]=Ne,Ne>=we&&(we=Ne+1)}}if(An.h)break n;for(ee=0;5>ee;++ee){var en=Pl[ee];!ee&&0=_n),En=In;var Sn=i(qe);if(En==null||Sn==null||Fn==null){Ie.a=1;break n}var jn=Fn;for(We=pe=0;Weee;++ee){en=Pl[ee],On[ee]=jn,$n[ee]=pe,!ee&&0vo)break r}else ms=vo;for(Pa=0;PaJi)zl[Pa++]=Ji,Ji!=0&&(Hl=Ji);else{var $h=Ji==16,Vl=Ji-16,Zh=wh[Vl],Yl=wt(Yr,bh[Vl])+Zh;if(Pa+Yl>vo)break r;for(var Qh=$h?Hl:0;0=ee){var Ca,ws=Sn[0];for(Ca=1;Caws&&(ws=Sn[Ca]);un+=ws}}if(Ce.nd=Pr,Ce.Qb=0,Pr&&(Ce.qb=(On[3][$n[3]+0].value<<24|On[1][$n[1]+0].value<<16|On[2][$n[2]+0].value)>>>0,bi==0&&256>On[0][$n[0]+0].value&&(Ce.Qb=1,Ce.qb+=On[0][$n[0]+0].value<<8)),Ce.jc=!Ce.Qb&&6>un,Ce.jc){var mo,Cr=Ce;for(mo=0;mo>=nn(bo,8,Kr),Jr>>=nn(Cr.G[1][Cr.H[1]+Jr],16,Kr),Jr>>=nn(Cr.G[2][Cr.H[2]+Jr],0,Kr),nn(Cr.G[3][Cr.H[3]+Jr],24,Kr))}}}tn.vc=ve,tn.Wb=we,tn.Ya=En,tn.yc=Fn,Nt=1;break e}Nt=0}if(!(y=Nt)){v.a=3;break t}if(0v+1?[]:0),!(b.lengtho?0:o>s?s:o}function Fi(){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 Ho(){var o=new Ha;return o!=null&&(o.a=0,o.sc="OK",o.cb=0,o.Xb=0,La||(La=Ii)),o}function Ke(o,s,d){return o.a==0&&(o.a=s,o.sc=d,o.cb=0),0}function Wa(o,s,d){return 3<=d&&o[s+0]==157&&o[s+1]==1&&o[s+2]==42}function or(o,s){if(o==null)return 0;if(o.a=0,o.sc="OK",s==null)return Ke(o,2,"null VP8Io passed to VP8GetHeaders()");var d=s.data,v=s.w,b=s.ha;if(4>b)return Ke(o,7,"Truncated header.");var y=d[v+0]|d[v+1]<<8|d[v+2]<<16,A=o.Od;if(A.Rb=!(1&y),A.td=y>>1&7,A.yd=y>>4&1,A.ub=y>>5,3b)return Ke(o,7,"cannot parse picture header");if(!Wa(d,v,b))return Ke(o,3,"Bad code word");N.c=16383&(d[v+4]<<8|d[v+3]),N.Td=d[v+4]>>6,N.i=16383&(d[v+6]<<8|d[v+5]),N.Ud=d[v+6]>>6,v+=7,b-=7,o.za=N.c+15>>4,o.Ub=N.i+15>>4,s.width=N.c,s.height=N.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,a((y=o.Pa).jb,0,255,y.jb.length),t((y=o.Qa)!=null),y.Cb=0,y.Bb=0,y.Fb=1,a(y.Zb,0,0,y.Zb.length),a(y.Lb,0,0,y.Lb)}if(A.ub>b)return Ke(o,7,"bad partition length");st(y=o.m,d,v,A.ub),v+=A.ub,b-=A.ub,A.Rb&&(N.Ld=ot(y),N.Kd=ot(y)),N=o.Qa;var k,E=o.Pa;if(t(y!=null),t(N!=null),N.Cb=ot(y),N.Cb){if(N.Bb=ot(y),ot(y)){for(N.Fb=ot(y),k=0;4>k;++k)N.Zb[k]=ot(y)?nt(y,7):0;for(k=0;4>k;++k)N.Lb[k]=ot(y)?nt(y,6):0}if(N.Bb)for(k=0;3>k;++k)E.jb[k]=ot(y)?ft(y,8):255}else N.Bb=0;if(y.Ka)return Ke(o,3,"cannot parse segment header");if((N=o.ed).zd=ot(y),N.Tb=ft(y,6),N.wb=ft(y,3),N.Pc=ot(y),N.Pc&&ot(y)){for(E=0;4>E;++E)ot(y)&&(N.vd[E]=nt(y,6));for(E=0;4>E;++E)ot(y)&&(N.od[E]=nt(y,6))}if(o.L=N.Tb==0?0:N.zd?1:2,y.Ka)return Ke(o,3,"cannot parse filter header");var W=b;if(b=k=v,v=k+W,N=W,o.Xb=(1<N&&(et=N),st(o.Jc[+W],d,k,et),k+=et,N-=et,b+=3}st(o.Jc[+E],d,k,N),d=ket;++et){if(W.Cb){var j=W.Zb[et];W.Fb||(j+=d)}else{if(0>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=cs[ar(j+E,117)],Y.Qc[1]=ds[ar(j+k,127)],Y.lc=j+k}if(!A.Rb)return Ke(o,4,"Not a key frame.");for(ot(y),A=o.Pa,d=0;4>d;++d){for(b=0;8>b;++b)for(v=0;3>v;++v)for(N=0;11>N;++N)E=gt(y,Ch[d][b][v][N])?ft(y,8):kh[d][b][v][N],A.Wc[d][b].Yb[v][N]=E;for(b=0;17>b;++b)A.Xc[d][b]=A.Wc[d][Fh[b]]}return o.kc=ot(y),o.kc&&(o.Bd=ft(y,8)),o.cb=1}function Ii(o,s,d,v,b,y,A){var N=s[b].Yb[d];for(d=0;16>b;++b){if(!gt(o,N[d+0]))return b;for(;!gt(o,N[d+1]);)if(N=s[++b].Yb[0],d=0,b==16)return 16;var k=s[b+1].Yb;if(gt(o,N[d+2])){var E=o,W=0;if(gt(E,(j=N)[(et=d)+3]))if(gt(E,j[et+6])){for(N=0,et=2*(W=gt(E,j[et+8]))+(j=gt(E,j[et+9+W])),W=0,j=Lh[et];j[N];++N)W+=W+gt(E,j[N]);W+=3+(8<(E=o).b&&at(E);var et,j=E.b,Y=(et=E.Ca>>1)-(E.I>>j)>>31;--E.b,E.Ca+=Y,E.Ca|=1,E.I-=(et+1&Y)<>3),o[s+d+32*v]=-256&b?0>b?0:255:b}function Ei(o,s,d,v,b,y){Pn(o,s,0,d,v+b),Pn(o,s,1,d,v+y),Pn(o,s,2,d,v-y),Pn(o,s,3,d,v-b)}function wr(o){return(20091*o>>16)+o}function on(o,s,d,v){var b,y=0,A=i(16);for(b=0;4>b;++b){var N=o[s+0]+o[s+8],k=o[s+0]-o[s+8],E=(35468*o[s+4]>>16)-wr(o[s+12]),W=wr(o[s+4])+(35468*o[s+12]>>16);A[y+0]=N+W,A[y+1]=k+E,A[y+2]=k-E,A[y+3]=N-W,y+=4,s++}for(b=y=0;4>b;++b)N=(o=A[y+0]+4)+A[y+8],k=o-A[y+8],E=(35468*A[y+4]>>16)-wr(A[y+12]),Pn(d,v,0,0,N+(W=wr(A[y+4])+(35468*A[y+12]>>16))),Pn(d,v,1,0,k+E),Pn(d,v,2,0,k-E),Pn(d,v,3,0,N-W),y++,v+=32}function Ga(o,s,d,v){var b=o[s+0]+4,y=35468*o[s+4]>>16,A=wr(o[s+4]),N=35468*o[s+1]>>16;Ei(d,v,0,b+A,o=wr(o[s+1]),N),Ei(d,v,1,b+y,o,N),Ei(d,v,2,b-y,o,N),Ei(d,v,3,b-A,o,N)}function Wo(o,s,d,v,b){on(o,s,d,v),b&&on(o,s+16,d,v+4)}function Go(o,s,d,v){Lr(o,s+0,d,v,1),Lr(o,s+32,d,v+128,1)}function Vo(o,s,d,v){var b;for(o=o[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)Pn(d,v,s,b,o)}function sr(o,s,d,v){o[s+0]&&dn(o,s+0,d,v),o[s+16]&&dn(o,s+16,d,v+4),o[s+32]&&dn(o,s+32,d,v+128),o[s+48]&&dn(o,s+48,d,v+128+4)}function Va(o,s,d,v){var b,y=i(16);for(b=0;4>b;++b){var A=o[s+0+b]+o[s+12+b],N=o[s+4+b]+o[s+8+b],k=o[s+4+b]-o[s+8+b],E=o[s+0+b]-o[s+12+b];y[0+b]=A+N,y[8+b]=A-N,y[4+b]=E+k,y[12+b]=E-k}for(b=0;4>b;++b)A=(o=y[0+4*b]+3)+y[3+4*b],N=y[1+4*b]+y[2+4*b],k=y[1+4*b]-y[2+4*b],E=o-y[3+4*b],d[v+0]=A+N>>3,d[v+16]=E+k>>3,d[v+32]=A-N>>3,d[v+48]=E-k>>3,v+=64}function ji(o,s,d){var v,b=s-32,y=Cn,A=255-o[b-1];for(v=0;vd;++d)r(o,s+32*d,o,s-32,16)}function Ko(o,s){var d;for(d=16;0v;++v)a(s,d+32*v,o,16)}function Ya(o,s){var d,v=16;for(d=0;16>d;++d)v+=o[s-1+32*d]+o[s+d-32];Dr(v>>5,o,s)}function Rr(o,s){var d,v=8;for(d=0;16>d;++d)v+=o[s-1+32*d];Dr(v>>4,o,s)}function Xo(o,s){var d,v=8;for(d=0;16>d;++d)v+=o[s+d-32];Dr(v>>4,o,s)}function ii(o,s){Dr(128,o,s)}function Jt(o,s,d){return o+2*s+d+2>>2}function $o(o,s){var d,v=s-32;for(v=new Uint8Array([Jt(o[v-1],o[v+0],o[v+1]),Jt(o[v+0],o[v+1],o[v+2]),Jt(o[v+1],o[v+2],o[v+3]),Jt(o[v+2],o[v+3],o[v+4])]),d=0;4>d;++d)r(o,s+32*d,v,0,v.length)}function Zo(o,s){var d=o[s-1],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96];At(o,s+0,16843009*Jt(o[s-1-32],d,v)),At(o,s+32,16843009*Jt(d,v,b)),At(o,s+64,16843009*Jt(v,b,y)),At(o,s+96,16843009*Jt(b,y,y))}function Qo(o,s){var d,v=4;for(d=0;4>d;++d)v+=o[s+d-32]+o[s-1+32*d];for(v>>=3,d=0;4>d;++d)a(o,s+32*d,v,4)}function ts(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1-32],A=o[s+0-32],N=o[s+1-32],k=o[s+2-32],E=o[s+3-32];o[s+0+96]=Jt(v,b,o[s-1+96]),o[s+1+96]=o[s+0+64]=Jt(d,v,b),o[s+2+96]=o[s+1+64]=o[s+0+32]=Jt(y,d,v),o[s+3+96]=o[s+2+64]=o[s+1+32]=o[s+0+0]=Jt(A,y,d),o[s+3+64]=o[s+2+32]=o[s+1+0]=Jt(N,A,y),o[s+3+32]=o[s+2+0]=Jt(k,N,A),o[s+3+0]=Jt(E,k,N)}function es(o,s){var d=o[s+1-32],v=o[s+2-32],b=o[s+3-32],y=o[s+4-32],A=o[s+5-32],N=o[s+6-32],k=o[s+7-32];o[s+0+0]=Jt(o[s+0-32],d,v),o[s+1+0]=o[s+0+32]=Jt(d,v,b),o[s+2+0]=o[s+1+32]=o[s+0+64]=Jt(v,b,y),o[s+3+0]=o[s+2+32]=o[s+1+64]=o[s+0+96]=Jt(b,y,A),o[s+3+32]=o[s+2+64]=o[s+1+96]=Jt(y,A,N),o[s+3+64]=o[s+2+96]=Jt(A,N,k),o[s+3+96]=Jt(N,k,k)}function yr(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1-32],A=o[s+0-32],N=o[s+1-32],k=o[s+2-32],E=o[s+3-32];o[s+0+0]=o[s+1+64]=y+A+1>>1,o[s+1+0]=o[s+2+64]=A+N+1>>1,o[s+2+0]=o[s+3+64]=N+k+1>>1,o[s+3+0]=k+E+1>>1,o[s+0+96]=Jt(b,v,d),o[s+0+64]=Jt(v,d,y),o[s+0+32]=o[s+1+96]=Jt(d,y,A),o[s+1+32]=o[s+2+96]=Jt(y,A,N),o[s+2+32]=o[s+3+96]=Jt(A,N,k),o[s+3+32]=Jt(N,k,E)}function xr(o,s){var d=o[s+0-32],v=o[s+1-32],b=o[s+2-32],y=o[s+3-32],A=o[s+4-32],N=o[s+5-32],k=o[s+6-32],E=o[s+7-32];o[s+0+0]=d+v+1>>1,o[s+1+0]=o[s+0+64]=v+b+1>>1,o[s+2+0]=o[s+1+64]=b+y+1>>1,o[s+3+0]=o[s+2+64]=y+A+1>>1,o[s+0+32]=Jt(d,v,b),o[s+1+32]=o[s+0+96]=Jt(v,b,y),o[s+2+32]=o[s+1+96]=Jt(b,y,A),o[s+3+32]=o[s+2+96]=Jt(y,A,N),o[s+3+64]=Jt(A,N,k),o[s+3+96]=Jt(N,k,E)}function ns(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96];o[s+0+0]=d+v+1>>1,o[s+2+0]=o[s+0+32]=v+b+1>>1,o[s+2+32]=o[s+0+64]=b+y+1>>1,o[s+1+0]=Jt(d,v,b),o[s+3+0]=o[s+1+32]=Jt(v,b,y),o[s+3+32]=o[s+1+64]=Jt(b,y,y),o[s+3+64]=o[s+2+64]=o[s+0+96]=o[s+1+96]=o[s+2+96]=o[s+3+96]=y}function rs(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96],A=o[s-1-32],N=o[s+0-32],k=o[s+1-32],E=o[s+2-32];o[s+0+0]=o[s+2+32]=d+A+1>>1,o[s+0+32]=o[s+2+64]=v+d+1>>1,o[s+0+64]=o[s+2+96]=b+v+1>>1,o[s+0+96]=y+b+1>>1,o[s+3+0]=Jt(N,k,E),o[s+2+0]=Jt(A,N,k),o[s+1+0]=o[s+3+32]=Jt(d,A,N),o[s+1+32]=o[s+3+64]=Jt(v,d,A),o[s+1+64]=o[s+3+96]=Jt(b,v,d),o[s+1+96]=Jt(y,b,v)}function Bi(o,s){var d;for(d=0;8>d;++d)r(o,s+32*d,o,s-32,8)}function ca(o,s){var d;for(d=0;8>d;++d)a(o,s,o[s-1],8),s+=32}function lr(o,s,d){var v;for(v=0;8>v;++v)a(s,d+32*v,o,8)}function is(o,s){var d,v=8;for(d=0;8>d;++d)v+=o[s+d-32]+o[s-1+32*d];lr(v>>4,o,s)}function Di(o,s){var d,v=4;for(d=0;8>d;++d)v+=o[s+d-32];lr(v>>3,o,s)}function as(o,s){var d,v=4;for(d=0;8>d;++d)v+=o[s-1+32*d];lr(v>>3,o,s)}function da(o,s){lr(128,o,s)}function Mr(o,s,d){var v=o[s-d],b=o[s+0],y=3*(b-v)+ss[1020+o[s-2*d]-o[s+d]],A=no[112+(y+4>>3)];o[s-d]=Cn[255+v+no[112+(y+3>>3)]],o[s+0]=Cn[255+b-A]}function pa(o,s,d,v){var b=o[s+0],y=o[s+d];return zn[255+o[s-2*d]-o[s-d]]>v||zn[255+y-b]>v}function ai(o,s,d,v){return 4*zn[255+o[s-d]-o[s+0]]+zn[255+o[s-2*d]-o[s+d]]<=v}function ga(o,s,d,v,b){var y=o[s-3*d],A=o[s-2*d],N=o[s-d],k=o[s+0],E=o[s+d],W=o[s+2*d],et=o[s+3*d];return 4*zn[255+N-k]+zn[255+A-E]>v?0:zn[255+o[s-4*d]-y]<=b&&zn[255+y-A]<=b&&zn[255+A-N]<=b&&zn[255+et-W]<=b&&zn[255+W-E]<=b&&zn[255+E-k]<=b}function Ri(o,s,d,v){var b=2*v+1;for(v=0;16>v;++v)ai(o,s+v,d,b)&&Mr(o,s+v,d)}function va(o,s,d,v){var b=2*v+1;for(v=0;16>v;++v)ai(o,s+v*d,1,b)&&Mr(o,s+v*d,1)}function Mi(o,s,d,v){var b;for(b=3;0>7,ht=18*pt+63>>7,pt=9*pt+63>>7;k[E-3*W]=Cn[255+k[E-3*W]+pt],k[E-2*W]=Cn[255+et+ht],k[E-W]=Cn[255+j+Q],k[E+0]=Cn[255+Y-Q],k[E+W]=Cn[255+$-ht],k[E+2*W]=Cn[255+ut-pt]}s+=v}}function _r(o,s,d,v,b,y,A,N){for(y=2*y+1;0>3)],ut=no[112+(ut+3>>3)],Q=$+1>>1;k[E-2*W]=Cn[255+k[E-2*W]+Q],k[E-W]=Cn[255+et+ut],k[E+0]=Cn[255+j-$],k[E+W]=Cn[255+Y-Q]}s+=v}}function Ka(o,s,d,v,b,y){Ar(o,s,d,1,16,v,b,y)}function Xa(o,s,d,v,b,y){Ar(o,s,1,d,16,v,b,y)}function $a(o,s,d,v,b,y){var A;for(A=3;0E?0:255:E)&255,E=k,b[y+N]=W}}function Xe(o,s,d,v){var b=s.width,y=s.o;if(t(o!=null&&s!=null),0>d||0>=v||d+v>y)return null;if(!o.Cc){if(o.ga==null){var A;if(o.ga=new It,(A=o.ga==null)||(A=s.width*s.o,t(o.Gb.length==0),o.Gb=i(A),o.Uc=0,o.Gb==null?A=0:(o.mb=o.Gb,o.nb=o.Uc,o.rc=null,A=1),A=!A),!A){A=o.ga;var N=o.Fa,k=o.P,E=o.qc,W=o.mb,et=o.nb,j=k+1,Y=E-1,$=A.l;if(t(N!=null&&W!=null&&s!=null),Gr[0]=null,Gr[1]=Xt,Gr[2]=te,Gr[3]=de,A.ca=W,A.tb=et,A.c=s.width,A.i=s.height,t(0=E)s=0;else if(A.$a=3&N[k+0],A.Z=N[k+0]>>2&3,A.Lc=N[k+0]>>4&3,k=N[k+0]>>6&3,0>A.$a||1=A.c*A.i;A=!s}if(A)return null;o.ga.Lc!=1?o.Ga=0:v=y-d}t(o.ga!=null),t(d+v<=y);t:{if(s=(N=o.ga).c,y=N.l.o,N.$a==0){if(j=o.rc,Y=o.Vc,$=o.Fa,k=o.P+1+d*s,E=o.mb,W=o.nb+d*s,t(k<=o.P+o.qc),N.Z!=0)for(t(Gr[N.Z]!=null),A=0;A=s)s=1;else if(N.ic||Re(),N.ic){N=A.V,j=A.Ba,Y=A.c;var ut=A.i,Q=($=1,k=A.$/Y,E=A.$%Y,W=A.m,et=A.s,A.$),ht=Y*ut,pt=Y*s,xt=et.wc,bt=Q(ut=Me(bt.G[0],bt.H[0],W)))N[j+Q]=ut,++Q,++E>=Y&&(E=0,++k<=s&&!(k%16)&&Vn(A,k));else{if(!(280>ut)){$=0;break e}ut=Rn(ut-256,W);var Dt,Pt=Me(bt.G[4],bt.H[4],W);if(Z(W),!(Q>=(Pt=Mn(Y,Pt=Rn(Pt,W)))&&ht-Q>=ut)){$=0;break e}for(Dt=0;Dt=Y;)E-=Y,++k<=s&&!(k%16)&&Vn(A,k);Qs?s:k);break e}!$||W.h&&Q=y&&(o.Cc=1),v=1}if(!v)return null;if(o.Cc&&((v=o.ga)!=null&&(v.mc=null),o.ga=null,0>23,N[k+4*A+1]=N[k+4*A+1]*et>>23,N[k+4*A+2]=N[k+4*A+2]*et>>23)}s+=y}}function Ae(o,s,d,v,b){for(;0>4)*k>>16;o[s+2*y+0]=(240&A|A>>4)*k>>16&240|(15&A|A<<4)*k>>16>>4&15,o[s+2*y+1]=240&E|N}s+=b}}function Fe(o,s,d,v,b,y,A,N){var k,E,W=255;for(E=0;E>8}function Re(){Na=_e,bl=Ae,wl=Fe,yl=De}function hn(o,s,d){R[o]=function(v,b,y,A,N,k,E,W,et,j,Y,$,ut,Q,ht,pt,xt){var bt,Dt=xt-1>>1,Pt=N[k+0]|E[W+0]<<16,re=et[j+0]|Y[$+0]<<16;t(v!=null);var jt=3*Pt+re+131074>>2;for(s(v[b+0],255&jt,jt>>16,ut,Q),y!=null&&(jt=3*re+Pt+131074>>2,s(y[A+0],255&jt,jt>>16,ht,pt)),bt=1;bt<=Dt;++bt){var ce=N[k+bt]|E[W+bt]<<16,Qe=et[j+bt]|Y[$+bt]<<16,ie=Pt+ce+re+Qe+524296,Ot=ie+2*(ce+re)>>3;jt=Ot+Pt>>1,Pt=(ie=ie+2*(Pt+Qe)>>3)+ce>>1,s(v[b+2*bt-1],255&jt,jt>>16,ut,Q+(2*bt-1)*d),s(v[b+2*bt-0],255&Pt,Pt>>16,ut,Q+(2*bt-0)*d),y!=null&&(jt=ie+re>>1,Pt=Ot+Qe>>1,s(y[A+2*bt-1],255&jt,jt>>16,ht,pt+(2*bt-1)*d),s(y[A+2*bt+0],255&Pt,Pt>>16,ht,pt+(2*bt+0)*d)),Pt=ce,re=Qe}1&xt||(jt=3*Pt+re+131074>>2,s(v[b+xt-1],255&jt,jt>>16,ut,Q+(xt-1)*d),y!=null&&(jt=3*re+Pt+131074>>2,s(y[A+xt-1],255&jt,jt>>16,ht,pt+(xt-1)*d)))}}function Nr(){Hn[ro]=Eh,Hn[io]=Il,Hn[Sl]=jh,Hn[ao]=El,Hn[oo]=jl,Hn[ls]=Ol,Hn[kl]=Oh,Hn[us]=Il,Hn[fs]=El,Hn[so]=jl,Hn[hs]=Ol}function ma(o){return o&-16384?0>o?0:255:o>>Bh}function si(o,s){return ma((19077*o>>8)+(26149*s>>8)-14234)}function li(o,s,d){return ma((19077*o>>8)-(6419*s>>8)-(13320*d>>8)+8708)}function Tr(o,s){return ma((19077*o>>8)+(33050*s>>8)-17685)}function ui(o,s,d,v,b){v[b+0]=si(o,d),v[b+1]=li(o,s,d),v[b+2]=Tr(o,s)}function Ti(o,s,d,v,b){v[b+0]=Tr(o,s),v[b+1]=li(o,s,d),v[b+2]=si(o,d)}function qi(o,s,d,v,b){var y=li(o,s,d);s=y<<3&224|Tr(o,s)>>3,v[b+0]=248&si(o,d)|y>>5,v[b+1]=s}function cn(o,s,d,v,b){var y=240&Tr(o,s)|15;v[b+0]=240&si(o,d)|li(o,s,d)>>4,v[b+1]=y}function fi(o,s,d,v,b){v[b+0]=255,ui(o,s,d,v,b+1)}function hi(o,s,d,v,b){Ti(o,s,d,v,b),v[b+3]=255}function ba(o,s,d,v,b){ui(o,s,d,v,b),v[b+3]=255}function ur(o,s,d){R[o]=function(v,b,y,A,N,k,E,W,et){for(var j=W+(-2&et)*d;W!=j;)s(v[b+0],y[A+0],N[k+0],E,W),s(v[b+1],y[A+0],N[k+0],E,W+d),b+=2,++A,++k,W+=2*d;1&et&&s(v[b+0],y[A+0],N[k+0],E,W)}}function wn(o,s,d){return d==0?o==0?s==0?6:5:s==0?4:0:d}function Qa(o,s,d,v,b){switch(o>>>30){case 3:Lr(s,d,v,b,0);break;case 2:Hr(s,d,v,b);break;case 1:dn(s,d,v,b)}}function Ui(o,s){var d,v,b=s.M,y=s.Nb,A=o.oc,N=o.pc+40,k=o.oc,E=o.pc+584,W=o.oc,et=o.pc+600;for(d=0;16>d;++d)A[N+32*d-1]=129;for(d=0;8>d;++d)k[E+32*d-1]=129,W[et+32*d-1]=129;for(0d;++d)r(A,N+32*d-4,A,N+32*d+12,4);for(d=-1;8>d;++d)r(k,E+32*d-4,k,E+32*d+4,4),r(W,et+32*d-4,W,et+32*d+4,4)}var Y=o.Gd,$=o.Hd+v,ut=j.ad,Q=j.Hc;if(0=o.za-1?a(ht,pt,Y[$].y[15],4):r(ht,pt,Y[$+1].y,0,4)),d=0;4>d;d++)ht[pt+128+d]=ht[pt+256+d]=ht[pt+384+d]=ht[pt+0+d];for(d=0;16>d;++d,Q<<=2)ht=A,pt=N+Dl[d],Kn[j.Ob[d]](ht,pt),Qa(Q,ut,16*+d,ht,pt)}else if(ht=wn(v,b,j.Ob[0]),Wr[ht](A,N),Q!=0)for(d=0;16>d;++d,Q<<=2)Qa(Q,ut,16*+d,A,N+Dl[d]);for(d=j.Gc,ht=wn(v,b,j.Dd),kr[ht](k,E),kr[ht](W,et),Q=ut,ht=k,pt=E,255&(j=0|d)&&(170&j?Vi(Q,256,ht,pt):hr(Q,256,ht,pt)),j=W,Q=et,255&(d>>=8)&&(170&d?Vi(ut,320,j,Q):hr(ut,320,j,Q)),bd;++d)r(Y,$+d*o.R,A,N+32*d,16);for(d=0;8>d;++d)r(ut,j+d*o.B,k,E+32*d,8),r(Q,ht+d*o.B,W,et+32*d,8)}}function to(o,s,d,v,b,y,A,N,k){var E=[0],W=[0],et=0,j=k!=null?k.kd:0,Y=k??new K;if(o==null||12>d)return 7;Y.data=o,Y.w=s,Y.ha=d,s=[s],d=[d],Y.gb=[Y.gb];t:{var $=s,ut=d,Q=Y.gb;if(t(o!=null),t(ut!=null),t(Q!=null),Q[0]=0,12<=ut[0]&&!e(o,$[0],"RIFF")){if(e(o,$[0]+8,"WEBP")){Q=3;break t}var ht=Tt(o,$[0]+4);if(12>ht||4294967286ut[0]-8){Q=7;break t}Q[0]=ht,$[0]+=12,ut[0]-=12}Q=0}if(Q!=0)return Q;for(ht=0Q[0])Q=7;else{if(!e(pt,ut[0],"VP8X")){if(Tt(pt,ut[0]+4)!=10){Q=3;break t}if(18>Q[0]){Q=7;break t}var Pt=Tt(pt,ut[0]+8),re=1+St(pt,ut[0]+12);if(2147483648<=re*(pt=1+St(pt,ut[0]+15))){Q=3;break t}Dt!=null&&(Dt[0]=Pt),xt!=null&&(xt[0]=re),bt!=null&&(bt[0]=pt),ut[0]+=18,Q[0]-=18,jt[0]=1}Q=0}}if(et=et[0],$=$[0],Q!=0)return Q;if(ut=!!(2&$),!ht&&et)return 3;if(y!=null&&(y[0]=!!(16&$)),A!=null&&(A[0]=ut),N!=null&&(N[0]=0),A=E[0],$=W[0],et&&ut&&k==null){Q=0;break}if(4>d){Q=7;break}if(ht&&et||!ht&&!et&&!e(o,s[0],"ALPH")){d=[d],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];t:{Pt=o,Q=s,ht=d;var jt=Y.gb;xt=Y.na,bt=Y.P,Dt=Y.Sa,re=22,t(Pt!=null),t(ht!=null),pt=Q[0];var ce=ht[0];for(t(xt!=null),t(Dt!=null),xt[0]=null,bt[0]=null,Dt[0]=0;;){if(Q[0]=pt,ht[0]=ce,8>ce){Q=7;break t}var Qe=Tt(Pt,pt+4);if(4294967286jt){Q=3;break t}if(!e(Pt,pt,"VP8 ")||!e(Pt,pt,"VP8L")){Q=0;break t}if(ce[0]ht[0])Q=7;else{if(pt||re){if(jt=Tt(jt,Pt+4),12<=xt&&jt>xt-12){Q=3;break t}if(j&&jt>ht[0]-8){Q=7;break t}bt[0]=jt,Q[0]+=8,ht[0]-=8,Dt[0]=re}else Dt[0]=5<=ht[0]&&jt[Pt+0]==47&&!(jt[Pt+4]>>5),bt[0]=ht[0];Q=0}if(d=d[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],s=s[0],Q!=0)break;if(4294967286d){Q=7;break}N=A,j=$,ut=y,o==null||5>d?o=0:5<=d&&o[s+0]==47&&!(o[s+4]>>5)?(ht=[0],jt=[0],xt=[0],ct(bt=new D,o,s,d),br(bt,ht,jt,xt)?(N!=null&&(N[0]=ht[0]),j!=null&&(j[0]=jt[0]),ut!=null&&(ut[0]=xt[0]),o=1):o=0):o=0}else{if(10>d){Q=7;break}N=$,o==null||10>d||!Wa(o,s+3,d-3)?o=0:(j=o[s+0]|o[s+1]<<8|o[s+2]<<16,ut=16383&(o[s+7]<<8|o[s+6]),o=16383&(o[s+9]<<8|o[s+8]),1&j||3<(j>>1&7)||!(j>>4&1)||j>>5>=Y.Ja||!ut||!o?o=0:(A&&(A[0]=ut),N&&(N[0]=o),o=1))}if(!o||(A=A[0],$=$[0],et&&(E[0]!=A||W[0]!=$)))return 3;k!=null&&(k[0]=Y,k.offset=s-k.w,t(4294967286>s-k.w),t(k.offset==k.ha-d));break}return Q==0||Q==7&&et&&k==null?(y!=null&&(y[0]|=Y.na!=null&&0d||(y&=-2,A&=-2),0>y||0>A||0>=N||0>=k||y+N>v||A+k>b))return 0;if(s.v=y,s.j=A,s.va=y+N,s.o=A+k,s.U=N,s.T=k,s.da=o!=null&&0o.S){var s=o.f.RGBA;s.fb+=(o.height-1)*s.A,s.A=-s.A}else s=o.f.kb,o=o.height,s.O+=(o-1)*s.fa,s.fa=-s.fa,s.N+=(o-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(o-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(o-1)*s.lb,s.lb=-s.lb);return 0}function wa(o,s,d,v){if(v==null||0>=o||0>=s)return 2;if(d!=null){if(d.Da){var b=d.cd,y=d.bd,A=-2&d.v,N=-2&d.j;if(0>A||0>N||0>=b||0>=y||A+b>o||N+y>s)return 2;o=b,s=y}if(d.da){if(!Ht(o,s,b=[d.ib],y=[d.hb]))return 2;o=b[0],s=y[0]}}v.width=o,v.height=s;t:{var k=v.width,E=v.height;if(o=v.S,0>=k||0>=E||!(o>=ro&&13>o))o=2;else{if(0>=v.Rd&&v.sd==null){A=y=b=s=0;var W=(N=k*Rl[o])*E;if(11>o||(y=(E+1)/2*(s=(k+1)/2),o==12&&(A=(b=k)*E)),(E=i(W+2*y+A))==null){o=1;break t}v.sd=E,11>o?((k=v.f.RGBA).eb=E,k.fb=0,k.A=N,k.size=W):((k=v.f.kb).y=E,k.O=0,k.fa=N,k.Fd=W,k.f=E,k.N=0+W,k.Ab=s,k.Cd=y,k.ea=E,k.W=0+W+y,k.Db=s,k.Ed=y,o==12&&(k.F=E,k.J=0+W+2*y),k.Tc=A,k.lb=b)}if(s=1,b=v.S,y=v.width,A=v.height,b>=ro&&13>b)if(11>b)o=v.f.RGBA,s&=(N=Math.abs(o.A))*(A-1)+y<=o.size,s&=N>=y*Rl[b],s&=o.eb!=null;else{o=v.f.kb,N=(y+1)/2,W=(A+1)/2,k=Math.abs(o.fa),E=Math.abs(o.Ab);var et=Math.abs(o.Db),j=Math.abs(o.lb),Y=j*(A-1)+y;s&=k*(A-1)+y<=o.Fd,s&=E*(W-1)+N<=o.Cd,s=(s&=et*(W-1)+N<=o.Ed)&k>=y&E>=N&et>=N,s&=o.y!=null,s&=o.f!=null,s&=o.ea!=null,b==12&&(s&=j>=y,s&=Y<=o.Tc,s&=o.F!=null)}else s=0;o=s?0:2}}return o!=0||d!=null&&d.fd&&(o=ci(v)),o}var zi=64,di=[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],ya=24,yn=32,Nn=8,Hi=[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];Ct("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(o){return o},R.Predictor2=function(o,s,d){return s[d+0]},R.Predictor3=function(o,s,d){return s[d+1]},R.Predictor4=function(o,s,d){return s[d-1]},R.Predictor5=function(o,s,d){return qt(qt(o,s[d+1]),s[d+0])},R.Predictor6=function(o,s,d){return qt(o,s[d-1])},R.Predictor7=function(o,s,d){return qt(o,s[d+0])},R.Predictor8=function(o,s,d){return qt(s[d-1],s[d+0])},R.Predictor9=function(o,s,d){return qt(s[d+0],s[d+1])},R.Predictor10=function(o,s,d){return qt(qt(o,s[d-1]),qt(s[d+0],s[d+1]))},R.Predictor11=function(o,s,d){var v=s[d+0];return 0>=Zt(v>>24&255,o>>24&255,(s=s[d-1])>>24&255)+Zt(v>>16&255,o>>16&255,s>>16&255)+Zt(v>>8&255,o>>8&255,s>>8&255)+Zt(255&v,255&o,255&s)?v:o},R.Predictor12=function(o,s,d){var v=s[d+0];return(me((o>>24&255)+(v>>24&255)-((s=s[d-1])>>24&255))<<24|me((o>>16&255)+(v>>16&255)-(s>>16&255))<<16|me((o>>8&255)+(v>>8&255)-(s>>8&255))<<8|me((255&o)+(255&v)-(255&s)))>>>0},R.Predictor13=function(o,s,d){var v=s[d-1];return(ue((o=qt(o,s[d+0]))>>24&255,v>>24&255)<<24|ue(o>>16&255,v>>16&255)<<16|ue(o>>8&255,v>>8&255)<<8|ue(255&o,255&v))>>>0};var qr=R.PredictorAdd0;R.PredictorAdd1=he,Ct("Predictor2","PredictorAdd2"),Ct("Predictor3","PredictorAdd3"),Ct("Predictor4","PredictorAdd4"),Ct("Predictor5","PredictorAdd5"),Ct("Predictor6","PredictorAdd6"),Ct("Predictor7","PredictorAdd7"),Ct("Predictor8","PredictorAdd8"),Ct("Predictor9","PredictorAdd9"),Ct("Predictor10","PredictorAdd10"),Ct("Predictor11","PredictorAdd11"),Ct("Predictor12","PredictorAdd12"),Ct("Predictor13","PredictorAdd13");var Ur=R.PredictorAdd2;Rt("ColorIndexInverseTransform","MapARGB","32b",function(o){return o>>8&255},function(o){return o}),Rt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(o){return o},function(o){return o>>8&255});var Wi,pi=R.ColorIndexInverseTransform,$e=R.MapARGB,os=R.VP8LColorIndexInverseTransformAlpha,fr=R.MapAlpha,Jn=R.VP8LPredictorsAdd=[];Jn.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var gi,xa,Aa,Gi,vi,mi,zr,Lr,Hr,Vi,dn,hr,ke,Pe,He,Ze,Sr,_a,Yi,eo,pl,gl,vl,ml,Na,bl,wl,yl,xl=i(511),Al=i(2041),_l=i(225),Nl=i(767),Ll=0,ss=Al,no=_l,Cn=Nl,zn=xl,ro=0,io=1,Sl=2,ao=3,oo=4,ls=5,kl=6,us=7,fs=8,so=9,hs=10,bh=[2,3,7],wh=[3,3,11],Pl=[280,256,256,256,40],yh=[0,1,1,1,0],xh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Ah=[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],_h=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Nh=8,cs=[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],ds=[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],La=null,Lh=[[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]],Sh=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Cl=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],kh=[[[[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]]]],Ph=[[[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]]],Ch=[[[[255,255,255,255,255,255,255,255,255,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]]]],Fh=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Wr=[],Kn=[],kr=[],Ih=1,Fl=2,Gr=[],Hn=[];hn("UpsampleRgbLinePair",ui,3),hn("UpsampleBgrLinePair",Ti,3),hn("UpsampleRgbaLinePair",ba,4),hn("UpsampleBgraLinePair",hi,4),hn("UpsampleArgbLinePair",fi,4),hn("UpsampleRgba4444LinePair",cn,2),hn("UpsampleRgb565LinePair",qi,2);var Eh=R.UpsampleRgbLinePair,jh=R.UpsampleBgrLinePair,Il=R.UpsampleRgbaLinePair,El=R.UpsampleBgraLinePair,jl=R.UpsampleArgbLinePair,Ol=R.UpsampleRgba4444LinePair,Oh=R.UpsampleRgb565LinePair,lo=16,uo=1<v.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),v.ca.f.kb.F!=null&&Re()),v.Pb&&0(k=d.Md)?0:100E;++E)12>(et=b.pb[E]).lc&&(et.ia=k*zh[0>et.lc?0:et.lc]>>3),W|=et.ia;W&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=d.Id,100b.Ga&&(b.Ga=0)}(function(j,Y){if(j==null)return 0;if(Y==null)return Ke(j,2,"NULL VP8Io parameter in VP8Decode().");if(!j.cb&&!or(j,Y))return 0;if(t(j.cb),Y.ac==null||Y.ac(Y)){Y.ob&&(j.L=0);var $=fo[j.L];if(j.L==2?(j.yb=0,j.zb=0):(j.yb=Y.v-$>>4,j.zb=Y.j-$>>4,0>j.yb&&(j.yb=0),0>j.zb&&(j.zb=0)),j.Va=Y.o+15+$>>4,j.Hb=Y.va+15+$>>4,j.Hb>j.za&&(j.Hb=j.za),j.Va>j.Ub&&(j.Va=j.Ub),0$;++$){var Q;if(j.Qa.Cb){var ht=j.Qa.Lb[$];j.Qa.Fb||(ht+=ut.Tb)}else ht=ut.Tb;for(Q=0;1>=Q;++Q){var pt=j.gd[$][Q],xt=ht;if(ut.Pc&&(xt+=ut.vd[0],Q&&(xt+=ut.od[0])),0<(xt=0>xt?0:63>2:bt>>1)>9-ut.wb&&(bt=9-ut.wb),1>bt&&(bt=1),pt.dd=bt,pt.tc=2*xt+bt,pt.ld=40<=xt?2:15<=xt?1:0}else pt.tc=0;pt.La=Q}}}$=0}else Ke(j,6,"Frame setup failed"),$=j.a;if($=$==0){if($){j.$c=0,0j.Vb){if(j.Vb=0,j.Ec=i(pt),j.Fc=0,j.Ec==null){$=Ke(j,1,"no memory during frame initialization.");break e}j.Vb=pt}pt=j.Ec,xt=j.Fc,j.Ac=pt,j.Bc=xt,xt+=ut,j.Gd=f(Dt,za),j.Hd=0,j.rb=f(Pt+1,la),j.sb=1,j.wa=re?f(re,qn):null,j.Y=0,j.D.Nb=0,j.D.wa=j.wa,j.D.Y=j.Y,0=$;++$)xl[255+$]=0>$?-$:$;for($=-1020;1020>=$;++$)Al[1020+$]=-128>$?-128:127<$?127:$;for($=-112;112>=$;++$)_l[112+$]=-16>$?-16:15<$?15:$;for($=-255;510>=$;++$)Nl[255+$]=0>$?0:255<$?255:$;Ll=1}zr=Va,Lr=Wo,Vi=Go,dn=Vo,hr=sr,Hr=Ga,ke=Ka,Pe=Xa,He=Za,Ze=c,Sr=$a,_a=oi,Yi=m,eo=I,pl=Ri,gl=va,vl=Mi,ml=Ja,Kn[0]=Qo,Kn[1]=Oi,Kn[2]=$o,Kn[3]=Zo,Kn[4]=ts,Kn[5]=yr,Kn[6]=es,Kn[7]=xr,Kn[8]=rs,Kn[9]=ns,Wr[0]=Ya,Wr[1]=Yo,Wr[2]=Jo,Wr[3]=Ko,Wr[4]=Rr,Wr[5]=Xo,Wr[6]=ii,kr[0]=is,kr[1]=ha,kr[2]=Bi,kr[3]=ca,kr[4]=as,kr[5]=Di,kr[6]=da,$=1}else $=0}$&&($=(function(ce,Qe){for(ce.M=0;ce.Mpe;++pe){var tn,ve=xn[0+pe];for(tn=0;4>tn;++tn){ve=Ph[Ie[sn+tn]][ve];for(var we=Cl[gt(ee,ve[0])];0>3;for(we=0;256>we;we+=16)pe[pn+we]=Ln}ln=1,Xn=sn[0]}var Ne=15&ee.la,en=15&An.la;for(we=0;4>we;++we){var Fn=1&en;for(Ln=ye=0;4>Ln;++Ln)Ne=Ne>>1|(Fn=(Ge=La(Ie,Xn,Ge=Fn+(1&Ne),Te.Sc,ln,pe,pn))>ln)<<7,ye=ye<<2|(3>=4,en=en>>1|Fn<<7,tn=(tn<<8|ye)>>>0}for(Xn=Ne,ln=en>>4,qe=0;4>qe;qe+=2){for(ye=0,Ne=ee.la>>4+qe,en=An.la>>4+qe,we=0;2>we;++we){for(Fn=1&en,Ln=0;2>Ln;++Ln)Ge=Fn+(1&Ne),Ne=Ne>>1|(Fn=0<(Ge=La(Ie,sn[2],Ge,Te.Qc,0,pe,pn)))<<3,ye=ye<<2|(3>=2,en=en>>1|Fn<<5}ve|=ye<<4*qe,Xn|=Ne<<4<=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(ie.M=Ot.M,ie.uc=ee,Ui(Ot,ie),We=1,ie=(ye=Ot.D).Nb,ee=(ve=fo[Ot.L])*Ot.R,Ie=ve/2*Ot.B,we=16*ie*Ot.R,Ln=8*ie*Ot.B,sn=Ot.sa,xn=Ot.ta-ee+we,Te=Ot.qa,pe=Ot.ra-Ie+Ln,pn=Ot.Ha,An=Ot.Ia-Ie+Ln,en=(Ne=ye.M)==0,tn=Ne>=Ot.Va-1,Ot.Aa==2&&Ui(Ot,ye),ye.uc)for(Fn=(Ge=Ot).D.M,t(Ge.D.uc),ye=Ge.yb;yeNt.o&&(Ne=Nt.o),Nt.F=null,Nt.J=null,Ot.Fa!=null&&0>1),Nt.W+=Ot.B*(ve>>1),Nt.F!=null&&(Nt.J+=Nt.width*ve)),ye>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=ye-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=Ne-ye,We=Nt.put(Nt))}ie+1!=Ot.Ic||tn||(r(Ot.sa,Ot.ta-ee,sn,xn+16*Ot.R,ee),r(Ot.qa,Ot.ra-Ie,Te,pe+8*Ot.B,Ie),r(Ot.Ha,Ot.Ia-Ie,pn,An+8*Ot.B,Ie))}if(!We)return Ke(ce,6,"Output aborted.")}return 1})(j,Y)),Y.bc!=null&&Y.bc(Y),$&=1}return $?(j.cb=0,$):0})(o,v)||(s=o.a)}}else s=o.a}s==0&&A.Oa!=null&&A.Oa.fd&&(s=ci(A.ba))}A=s}y=A!=0?null:11>y?N.f.RGBA.eb:N.f.kb.y}else y=null;return y};var Rl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(R,tt){for(var L="",O=0;O<4;O++)L+=String.fromCharCode(R[tt++]);return L}function p(R,tt){return R[tt+0]|R[tt+1]<<8}function w(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16)>>>0}function x(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16|R[tt+3]<<24)>>>0}new u;var g=[0],P=[0],C=[],B=new u,S=n,G=(function(R,tt){var L={},O=0,z=!1,U=0,rt=0;if(L.frames=[],!(function(_,D){for(var M=0;M<4;M++)if(_[D+M]!="RIFF".charCodeAt(M))return!0;return!1})(R,tt)){for(x(R,tt+=4),tt+=8;tt>1&1}st!="ANMF"&&(tt+=nt)}return L}})(S,0);G.response=S,G.rgbaoutput=!0,G.dataurl=!1;var V=G.header?G.header:null,T=G.frames?G.frames:null;if(V){V.loop_counter=V.loop_count,g=[V.canvas_height],P=[V.canvas_width];for(var it=0;it'+e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")+"",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function C2(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var t,e,r,a,i,f,l,u,h,p=function(_){return _=_||{},this.isStrokeTransparent=_.isStrokeTransparent||!1,this.strokeOpacity=_.strokeOpacity||1,this.strokeStyle=_.strokeStyle||"#000000",this.fillStyle=_.fillStyle||"#000000",this.isFillTransparent=_.isFillTransparent||!1,this.fillOpacity=_.fillOpacity||1,this.font=_.font||"10px sans-serif",this.textBaseline=_.textBaseline||"alphabetic",this.textAlign=_.textAlign||"left",this.lineWidth=_.lineWidth||1,this.lineJoin=_.lineJoin||"miter",this.lineCap=_.lineCap||"butt",this.path=_.path||[],this.transform=_.transform!==void 0?_.transform.clone():new u,this.globalCompositeOperation=_.globalCompositeOperation||"normal",this.globalAlpha=_.globalAlpha||1,this.clip_path=_.clip_path||[],this.currentPoint=_.currentPoint||new f,this.miterLimit=_.miterLimit||10,this.lastPoint=_.lastPoint||new f,this.lineDashOffset=_.lineDashOffset||0,this.lineDash=_.lineDash||[],this.margin=_.margin||[0,0,0,0],this.prevPageLastElemOffset=_.prevPageLastElemOffset||0,this.ignoreClearRect=typeof _.ignoreClearRect!="boolean"||_.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new w(this),t=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,f=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,h=new p}]);var w=function(_){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var D=_;Object.defineProperty(this,"pdf",{get:function(){return D}});var M=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return M},set:function(F){M=!!F}});var H=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return H},set:function(F){H=!!F}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(F){isNaN(F)||(J=F)}});var Z=0;Object.defineProperty(this,"posY",{get:function(){return Z},set:function(F){isNaN(F)||(Z=F)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(F){var Lt;typeof F=="number"?Lt=[F,F,F,F]:((Lt=new Array(4))[0]=F[0],Lt[1]=F.length>=2?F[1]:Lt[0],Lt[2]=F.length>=3?F[2]:Lt[0],Lt[3]=F.length>=4?F[3]:Lt[1]),h.margin=Lt}});var at=!1;Object.defineProperty(this,"autoPaging",{get:function(){return at},set:function(F){at=F}});var ot=0;Object.defineProperty(this,"lastBreak",{get:function(){return ot},set:function(F){ot=F}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(F){gt=F}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(F){F instanceof p&&(h=F)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(F){h.path=F}});var At=[];Object.defineProperty(this,"ctxStack",{get:function(){return At},set:function(F){At=F}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(F){var Lt;Lt=x(F),this.ctx.fillStyle=Lt.style,this.ctx.isFillTransparent=Lt.a===0,this.ctx.fillOpacity=Lt.a,this.pdf.setFillColor(Lt.r,Lt.g,Lt.b,{a:Lt.a}),this.pdf.setTextColor(Lt.r,Lt.g,Lt.b,{a:Lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(F){var Lt=x(F);this.ctx.strokeStyle=Lt.style,this.ctx.isStrokeTransparent=Lt.a===0,this.ctx.strokeOpacity=Lt.a,Lt.a===0?this.pdf.setDrawColor(255,255,255):(Lt.a,this.pdf.setDrawColor(Lt.r,Lt.g,Lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(F){["butt","round","square"].indexOf(F)!==-1&&(this.ctx.lineCap=F,this.pdf.setLineCap(F))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(F){isNaN(F)||(this.ctx.lineWidth=F,this.pdf.setLineWidth(F))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(F){["bevel","round","miter"].indexOf(F)!==-1&&(this.ctx.lineJoin=F,this.pdf.setLineJoin(F))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(F){isNaN(F)||(this.ctx.miterLimit=F,this.pdf.setMiterLimit(F))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(F){this.ctx.textBaseline=F}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(F){["right","end","center","left","start"].indexOf(F)!==-1&&(this.ctx.textAlign=F)}});var kt=null,St=null,Tt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Tt},set:function(F){kt=null,St=null,Tt=F}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(F){var Lt;if(this.ctx.font=F,(Lt=/^\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(F))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],yt=Lt[4];Lt[5];var Wt=Lt[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];yt=Math.floor(Ct==="px"?parseFloat(yt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(yt)*this.pdf.getFontSize():parseFloat(yt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(yt);var zt=(function(Rt){var ze,ge,oe=[],se=Rt.trim();if(se==="")return zs;if(se in Vu)return[Vu[se]];for(;se!=="";){switch(ge=null,ze=(se=Ju(se)).charAt(0)){case'"':case"'":ge=A2(se.substring(1),ze);break;default:ge=_2(se)}if(ge===null||(oe.push(ge[0]),(se=Ju(ge[1]))!==""&&se.charAt(0)!==","))return zs;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var qt=(function(Rt,ze){var ge=Rt.getFontList(),oe=JSON.stringify(ge);if(kt===null||St!==oe){var se=(function(je){var Ut=[];return Object.keys(je).forEach(function(Se){je[Se].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:Se,weight:"bold"};break;case"italic":Qt={family:Se,style:"italic"};break;case"bolditalic":Qt={family:Se,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:Se}}Qt!==null&&(Qt.ref={name:Se,style:Yt},Ut.push(Qt))})}),Ut})(ge);kt=(function(je){for(var Ut={},Se=0;Se=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var he="",fe={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"},Bt=0;Bt=2*Math.PI&&(H=0,J=2*Math.PI),this.path.push({type:"arc",x:_,y:D,radius:M,startAngle:H,endAngle:J,counterclockwise:Z})},w.prototype.arcTo=function(_,D,M,H,J){throw new Error("arcTo not implemented.")},w.prototype.rect=function(_,D,M,H){if(isNaN(_)||isNaN(D)||isNaN(M)||isNaN(H))throw Le.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(_,D),this.lineTo(_+M,D),this.lineTo(_+M,D+H),this.lineTo(_,D+H),this.lineTo(_,D),this.lineTo(_+M,D),this.lineTo(_,D)},w.prototype.fillRect=function(_,D,M,H){if(isNaN(_)||isNaN(D)||isNaN(M)||isNaN(H))throw Le.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(_,D,M,H),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},w.prototype.strokeRect=function(_,D,M,H){if(isNaN(_)||isNaN(D)||isNaN(M)||isNaN(H))throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");P.call(this)||(this.beginPath(),this.rect(_,D,M,H),this.stroke())},w.prototype.clearRect=function(_,D,M,H){if(isNaN(_)||isNaN(D)||isNaN(M)||isNaN(H))throw Le.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(_,D,M,H))},w.prototype.save=function(_){_=typeof _!="boolean"||_;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,M=0;M0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};w.prototype.drawImage=function(_,D,M,H,J,Z,at,ot,gt){var At=this.pdf.getImageProperties(_),kt=1,St=1,Tt=1,F=1;H!==void 0&&ot!==void 0&&(Tt=ot/H,F=gt/J,kt=At.width/H*ot/H,St=At.height/J*gt/J),Z===void 0&&(Z=D,at=M,D=0,M=0),H!==void 0&&ot===void 0&&(ot=H,gt=J),H===void 0&&ot===void 0&&(ot=At.width,gt=At.height);var Lt=this.ctx.transform.decompose(),ae=nt(Lt.rotate.shx),Ht=new u,yt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(Z-D*Tt,at-M*F,H*kt,J*St));if(this.autoPaging){for(var Wt,Ct=B.call(this,yt),zt=[],qt=0;qtme||Ztyt||Ct0)){for(;gt>=0;gt--)if(J[gt-1].close!==!0&&J[gt-1].begin!==!0){J[gt-1].deltas.push(M),J[gt-1].abs.push(ot);break}}break;case"bct":M=[ot.x1-Z[at-1].x,ot.y1-Z[at-1].y,ot.x2-Z[at-1].x,ot.y2-Z[at-1].y,ot.x-Z[at-1].x,ot.y-Z[at-1].y],J[J.length-1].deltas.push(M);break;case"qct":var At=Z[at-1].x+2/3*(ot.x1-Z[at-1].x),kt=Z[at-1].y+2/3*(ot.y1-Z[at-1].y),St=ot.x+2/3*(ot.x1-ot.x),Tt=ot.y+2/3*(ot.y1-ot.y),F=ot.x,Lt=ot.y;M=[At-Z[at-1].x,kt-Z[at-1].y,St-Z[at-1].x,Tt-Z[at-1].y,F-Z[at-1].x,Lt-Z[at-1].y],J[J.length-1].deltas.push(M);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(ot)}}H=D?null:_==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*_.scale),J=this.lineWidth,this.lineWidth=J*_.scale);var ne=this.autoPaging!=="text";if(ne||Bt.y+Bt.h<=qt){if(ne||Bt.y>=Ct&&Bt.x<=ue){var Rt=ne?_.text:this.pdf.splitTextToSize(_.text,_.maxWidth||ue-Bt.x)[0],ze=G([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-he+Ct+this.ctx.prevPageLastElemOffset)[0],ge=ne&&(Wt>Ht||Wt=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)}}else _.scale>=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*_.scale),J=this.lineWidth,this.lineWidth=J*_.scale),this.pdf.text(_.text,gt.x+this.posX,gt.y+this.posY,{angle:_.angle,align:D,renderingMode:_.renderingMode,maxWidth:_.maxWidth}),_.scale>=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)},z=function(_,D,M,H){M=M||0,H=H||0,this.pdf.internal.out(e(_+M)+" "+r(D+H)+" l")},U=function(_,D,M){return this.pdf.lines(_,D,M,null,null)},rt=function(_,D,M,H,J,Z,at,ot){this.pdf.internal.out([t(a(M+_)),t(i(H+D)),t(a(J+_)),t(i(Z+D)),t(a(at+_)),t(i(ot+D)),"c"].join(" "))},st=function(_,D,M,H){for(var J=2*Math.PI,Z=Math.PI/2;D>M;)D-=J;var at=Math.abs(M-D);at1e-5;){var kt=At+gt*Math.min(at,Z);ot.push(ft.call(this,_,At,kt)),at-=Math.abs(kt-At),At=kt}return ot},ft=function(_,D,M){var H=(M-D)/2,J=_*Math.cos(H),Z=_*Math.sin(H),at=J,ot=-Z,gt=at*at+ot*ot,At=gt+at*J+ot*Z,kt=4/3*(Math.sqrt(2*gt*At)-At)/(at*Z-ot*J),St=at-kt*ot,Tt=ot+kt*at,F=St,Lt=-Tt,ae=H+D,Ht=Math.cos(ae),yt=Math.sin(ae);return{x1:_*Math.cos(D),y1:_*Math.sin(D),x2:St*Ht-Tt*yt,y2:St*yt+Tt*Ht,x3:F*Ht-Lt*yt,y3:F*yt+Lt*Ht,x4:_*Math.cos(M),y4:_*Math.sin(M)}},nt=function(_){return 180*_/Math.PI},ct=function(_,D,M,H,J,Z){var at=_+.5*(M-_),ot=D+.5*(H-D),gt=J+.5*(M-J),At=Z+.5*(H-Z),kt=Math.min(_,J,at,gt),St=Math.max(_,J,at,gt),Tt=Math.min(D,Z,ot,At),F=Math.max(D,Z,ot,At);return new l(kt,Tt,St-kt,F-Tt)},_t=function(_,D,M,H,J,Z,at,ot){var gt,At,kt,St,Tt,F,Lt,ae,Ht,yt,Wt,Ct,zt,qt,me=M-_,ue=H-D,Zt=J-M,he=Z-H,fe=at-J,Bt=ot-Z;for(At=0;At<41;At++)Ht=(Lt=(kt=_+(gt=At/40)*me)+gt*((Tt=M+gt*Zt)-kt))+gt*(Tt+gt*(J+gt*fe-Tt)-Lt),yt=(ae=(St=D+gt*ue)+gt*((F=H+gt*he)-St))+gt*(F+gt*(Z+gt*Bt-F)-ae),At==0?(Wt=Ht,Ct=yt,zt=Ht,qt=yt):(Wt=Math.min(Wt,Ht),Ct=Math.min(Ct,yt),zt=Math.max(zt,Ht),qt=Math.max(qt,yt));return new l(Math.round(Wt),Math.round(Ct),Math.round(zt-Wt),Math.round(qt-Ct))},wt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var _,D,M=(_=this.ctx.lineDash,D=this.ctx.lineDashOffset,JSON.stringify({lineDash:_,lineDashOffset:D}));this.prevLineDash!==M&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=M)}}})(Mt.API),(function(n){var t=function(f){var l,u,h,p,w,x,g,P,C,B;for(u=[],h=0,p=(f+=l="\0\0\0\0".slice(f.length%4||4)).length;p>h;h+=4)(w=(f.charCodeAt(h)<<24)+(f.charCodeAt(h+1)<<16)+(f.charCodeAt(h+2)<<8)+f.charCodeAt(h+3))!==0?(x=(w=((w=((w=((w=(w-(B=w%85))/85)-(C=w%85))/85)-(P=w%85))/85)-(g=w%85))/85)%85,u.push(x+33,g+33,P+33,C+33,B+33)):u.push(122);return(function(S,G){for(var V=G;V>0;V--)S.pop()})(u,l.length),String.fromCharCode.apply(String,u)+"~>"},e=function(f){var l,u,h,p,w,x=String,g="length",P=255,C="charCodeAt",B="slice",S="replace";for(f[B](-2),f=f[B](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),h=[],p=0,w=(f+=l="uuuuu"[B](f[g]%5||5))[g];w>p;p+=5)u=52200625*(f[C](p)-33)+614125*(f[C](p+1)-33)+7225*(f[C](p+2)-33)+85*(f[C](p+3)-33)+(f[C](p+4)-33),h.push(P&u>>24,P&u>>16,P&u>>8,P&u);return(function(G,V){for(var T=V;T>0;T--)G.pop()})(h,l[g]),x.fromCharCode.apply(x,h)},r=function(f){return f.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(f){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),l.test(f)===!1)return"";for(var u="",h=0;himport("./html2canvas.esm-B0tyYwQk.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function e(){return(Kt.DOMPurify?Promise.resolve(Kt.DOMPurify):_s(()=>import("./purify.es-BgtpMKW3.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var r=function(l){var u=xe(l);return u==="undefined"?"undefined":u==="string"||l instanceof String?"string":u==="number"||l instanceof Number?"number":u==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":u==="object"?"object":"unknown"},a=function(l,u){var h=document.createElement(l);for(var p in u.className&&(h.className=u.className),u.innerHTML&&u.dompurify&&(h.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)h.style[p]=u.style[p];return h},i=function l(u,h){for(var p=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),w=u.firstChild;w;w=w.nextSibling)h!==!0&&w.nodeType===1&&w.nodeName==="SCRIPT"||p.appendChild(l(w,h));return u.nodeType===1&&(u.nodeName==="CANVAS"?(p.width=u.width,p.height=u.height,p.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(p.value=u.value),p.addEventListener("load",function(){p.scrollTop=u.scrollTop,p.scrollLeft=u.scrollLeft},!0)),p},f=function l(u){var h=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),p=l.convert(Promise.resolve(),h);return(p=p.setProgress(1,l,1,[l])).set(u)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(l,u){return l.__proto__=u||f.prototype,l},f.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"}},f.prototype.from=function(l,u){return this.then(function(){switch(u=u||(function(h){switch(r(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),u){case"string":return this.then(e).then(function(h){return this.set({src:a("div",{innerHTML:l,dompurify:h})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},f.prototype.to=function(l){switch(l){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.")}},f.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 l={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},u=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(l.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:l}),this.prop.container.appendChild(u),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"})},f.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,u(this.prop.container,h)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var h=this.opt.jsPDF,p=this.opt.fontFaces,w=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,x=Object.assign({async:!0,allowTaint:!0,scale:w,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 x.onrendered,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=p,p)for(var g=0;gC&&(P=B,B=C,C=P);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",C>B&&(P=B,B=C,C=P)}return{width:B,height:C,unit:u,k:w,orientation:l}},n.html=function(l,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(Us):null;var h=new f(u);return u.worker?h:h.from(l).doCallback()}})(Mt.API),Mt.API.addJS=function(n){var t,e,r=(function(a){for(var i="",f=0;f=0&&a[h]==="\\";h--)u++;i+=u%2==0?"\\"+l:l}else i+=l}return i})(n);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"),e=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&&e!==void 0&&this.internal.out("/Names <>")}),this},(function(n){var t;n.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=e.outline.render().split(/\r\n/),i=0;i> endobj")}var g=e.internal.newObject();for(e.internal.write("<< /Names [ "),i=0;i>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+g+" 0 R"),e.internal.write(">>","endobj")}}]),n.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"))}]),n.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,a,i){var f={title:a,options:i,children:[]};return r==null&&(r=this.root),r.children.push(f),f},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(r){r.id=e.internal.newObjectDeferred();for(var a=0;a0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i0&&this.line("/Prev "+this.makeRef(r.children[i-1])),i0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var l=this.count=this.count_r({count:0},f);if(l>0&&this.line("/Count "+l),f.options&&f.options.pageNumber){var u=e.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var h=0;h> \r endobj\r `},e.outline.count_r=function(r,a){for(var i=0;i1){U=!0,st=void 0;var J=R*tt;ft=new Uint8Array(J);for(var Z=new DataView(L.buffer),at=0;at536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[n]()}catch(e){Le.log("bit decode error:"+e)}},Zn.prototype.bit1=function(){var n,t=Math.ceil(this.width/8),e=t%4;for(n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,a=0;a>7-l&1];this.data[f+4*l]=u.blue,this.data[f+4*l+1]=u.green,this.data[f+4*l+2]=u.red,this.data[f+4*l+3]=255}e!==0&&(this.pos+=4-e)}},Zn.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),t=n%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,a=0;a>4,u=15&i,h=this.palette[l];if(this.data[f]=h.blue,this.data[f+1]=h.green,this.data[f+2]=h.red,this.data[f+3]=255,2*a+1>=this.width)break;h=this.palette[u],this.data[f+4]=h.blue,this.data[f+4+1]=h.green,this.data[f+4+2]=h.red,this.data[f+4+3]=255}t!==0&&(this.pos+=4-t)}},Zn.prototype.bit8=function(){for(var n=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r=0;e--){for(var r=this.bottom_up?e:this.height-1-e,a=0;a>5&t)/t*255|0,u=(i>>10&t)/t*255|0,h=i>>15?255:0,p=r*this.width*4+4*a;this.data[p]=u,this.data[p+1]=l,this.data[p+2]=f,this.data[p+3]=h}this.pos+=n}},Zn.prototype.bit16=function(){for(var n=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var a=this.bottom_up?r:this.height-1-r,i=0;i>5&e)/e*255|0,h=(f>>11)/t*255|0,p=a*this.width*4+4*i;this.data[p]=h,this.data[p+1]=u,this.data[p+2]=l,this.data[p+3]=255}this.pos+=n}},Zn.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var t=this.bottom_up?n:this.height-1-n,e=0;e=0;n--)for(var t=this.bottom_up?n:this.height-1-n,e=0;er&&(a.push(n.slice(u,i)),l=0,u=i),l+=t[i],i++;return u!==i&&a.push(n.slice(u,i)),a},$u=function(n,t,e){e||(e={});var r,a,i,f,l,u,h,p=[],w=[p],x=e.textIndent||0,g=0,P=0,C=n.split(" "),B=So.apply(this,[" ",e])[0];if(u=e.lineIndent===-1?C[0].length+2:e.lineIndent||0){var S=Array(u).join(" "),G=[];C.map(function(T){(T=T.split(/\s*\n/)).length>1?G=G.concat(T.map(function(it,mt){return(mt&&it.length?` `:"")+it})):G.push(T[0])}),C=G,u=Ku.apply(this,[S,e])}for(i=0,f=C.length;it||V){if(P>t){for(l=Xu.apply(this,[r,a,t-(x+g),t]),p.push(l.shift()),p=[l.pop()];l.length;)w.push([l.shift()]);P=a.slice(r.length-(p[0]?p[0].length:0)).reduce(function(T,it){return T+it},0)}else p=[r];w.push(p),x=P+u,g=B}else p.push(r),x+=g+P,g=B}return h=u?function(T,it){return(it?S:"")+T.join(" ")}:function(T){return T.join(" ")},w.map(h)},$i.splitTextToSize=function(n,t,e){var r,a=(e=e||{}).fontSize||this.internal.getFontSize(),i=function(p){if(p.widths&&p.kerning)return{widths:p.widths,kerning:p.kerning};var w=this.internal.getFont(p.fontName,p.fontStyle),x="Unicode";return w.metadata[x]?{widths:w.metadata[x].widths||{0:1},kerning:w.metadata[x].kerning||{}}:{font:w.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,e);r=Array.isArray(n)?n:String(n).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/a;i.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/a:0,i.lineIndent=e.lineIndent;var l,u,h=[];for(l=0,u=r.length;limport("./index.es-B1FLOTc-.js"),__vite__mapDeps([0,1,2]))).catch(function(x){return Promise.reject(new Error("Could not load canvg: "+x))}).then(function(x){return x.default?x.default:x}).then(function(x){return x.fromString(h,n,p)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(x){return x.render(p)}).then(function(){w.addImage(u.toDataURL("image/jpeg",1),t,e,r,a,f,l)})},Mt.API.putTotalPages=function(n){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(n,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var a=0;a1){for(p=0;p>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},Mt.API.addMetadata=function(n,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",C2),this.internal.events.subscribe("postPutResources",P2)),this},(function(n){var t=n.API,e=t.pdfEscape16=function(i,f){for(var l,u=f.metadata.Unicode.widths,h=["","0","00","000","0000"],p=[""],w=0,x=i.length;w> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange`,u=[],w=0,x=(l=Object.keys(i).sort(function(g,P){return g-P})).length;w=100&&(p+=` `+u.length+` beginbfchar `+u.join(` `)+` endbfchar`,u=[]),i[f]!==void 0&&i[f]!==null&&typeof i[f].toString=="function"&&(h=("0000"+i[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),u.push("<"+f+"><"+h+">"));return u.length&&(p+=` `+u.length+` beginbfchar `+u.join(` `)+` endbfchar `),p+`endcmap CMapName currentdict /CMap defineresource pop end end`};t.events.push(["putFont",function(i){(function(f){var l=f.font,u=f.out,h=f.newObject,p=f.putStream;if(l.metadata instanceof n.API.TTFFont&&l.encoding==="Identity-H"){for(var w=l.metadata.Unicode.widths,x=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),g="",P=0;P>"),u("endobj");var G=h();u("<<"),u("/Type /Font"),u("/BaseFont /"+Qi(l.fontName)),u("/FontDescriptor "+S+" 0 R"),u("/W "+n.API.PDFObject.convert(w)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+l.encoding+")"),u(">>"),u(">>"),u("endobj"),l.objectNumber=h(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+B+" 0 R"),u("/BaseFont /"+Qi(l.fontName)),u("/Encoding /"+l.encoding),u("/DescendantFonts ["+G+" 0 R]"),u(">>"),u("endobj"),l.isAlreadyPutted=!0}})(i)}]),t.events.push(["putFont",function(i){(function(f){var l=f.font,u=f.out,h=f.newObject,p=f.putStream;if(l.metadata instanceof n.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var w=l.metadata.rawData,x="",g=0;g>"),u("endobj"),l.objectNumber=h();for(var S=0;S>"),u("endobj"),l.isAlreadyPutted=!0}})(i)}]);var a=function(i){var f,l=i.text||"",u=i.x,h=i.y,p=i.options||{},w=i.mutex||{},x=w.pdfEscape,g=w.activeFontKey,P=w.fonts,C=g,B="",S=0,G="",V=P[C].encoding;if(P[C].encoding!=="Identity-H")return{text:l,x:u,y:h,options:p,mutex:w};for(G=l,C=g,Array.isArray(l)&&(G=l[0]),S=0;S","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=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,V=0;this.__bidiEngine__={};var T=function(L){var O=L.charCodeAt(),z=O>>8,U=C[z];return U!==void 0?w[256*U+(255&O)]:z===252||z===253?"AL":S.test(z)?"L":z===8?"R":"N"},it=function(L){for(var O,z=0;z=O.length||(rt=z[U-1])!=="EN"&&rt!=="AN"||(st=O[U+1])!=="EN"&&st!=="AN"?ct="N":G&&(st="AN"),ct=st===rt?st:"N";break;case"ES":ct=(rt=U>0?z[U-1]:"B")==="EN"&&U+10&&z[U-1]==="EN"){ct="EN";break}if(G){ct="N";break}for(ft=U+1,nt=O.length;ft=1425&&_t<=2303||_t===64286;if(rt=O[ft],wt&&(rt==="R"||rt==="AL")){ct="R";break}}}ct=U<1||(rt=O[U-1])==="B"?"N":z[U-1];break;case"B":G=!1,a=!0,ct=V;break;case"S":i=!0,ct="N"}return ct},dt=function(L,O,z){var U=L.split("");return z&&X(U,z,{hiLevel:V}),U.reverse(),O&&O.reverse(),U.join("")},X=function(L,O,z){var U,rt,st,ft,nt,ct=-1,_t=L.length,wt=0,_=[],D=V?g:x,M=[];for(G=!1,a=!1,i=!1,rt=0;rt<_t;rt++)M[rt]=T(L[rt]);for(st=0;st<_t;st++){if(nt=wt,_[st]=mt(L,M,_,st),U=240&(wt=D[nt][P[_[st]]]),wt&=15,O[st]=ft=D[wt][5],U>0)if(U===16){for(rt=ct;rt-1){for(rt=ct;rt=0&&H[ot]==="WS";ot--)J[ot]=V}})(M,O,_t)},R=function(L,O,z,U,rt){if(!(rt.hiLevel=L){for(nt=wt+1;nt<_t&&U[nt]>=L;)nt++;for(ct=wt,ft=nt-1;ct=0&&(st[_t]=B[ct+1])})(U,z,rt),R(2,U,O,z,rt),R(1,U,O,z,rt),U.join("")};return this.__bidiEngine__.doBidiReorder=function(L,O,z){if((function(rt,st){if(st)for(var ft=0;ft>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):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 new Error("No unicode cmap for font")},n.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},n.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},n.prototype.widthOfString=function(t,e,r){var a,i,f,l;for(f=0,i=0,l=(t=""+t).length;0<=l?il;i=0<=l?++i:--i)a=t.charCodeAt(i),f+=this.widthOfGlyph(this.characterToGlyph(a))+r*(1e3/e)||0;return f*(e/1e3)},n.prototype.lineHeight=function(t,e){var r;return e==null&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},n})();var er,Qr=(function(){function n(t){this.data=t??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(t){return this.data[this.pos++]=t},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},n.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},n.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},n.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?et;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(t){var e,r,a;for(a=[],e=0,r=t.length;0<=r?er;e=0<=r?++e:--e)a.push(this.writeByte(t.charCodeAt(e)));return a},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(t){return this.writeInt16(t)},n.prototype.readLongLong=function(){var t,e,r,a,i,f,l,u;return t=this.readByte(),e=this.readByte(),r=this.readByte(),a=this.readByte(),i=this.readByte(),f=this.readByte(),l=this.readByte(),u=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^a)+16777216*(255^i)+65536*(255^f)+256*(255^l)+(255^u)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*a+16777216*i+65536*f+256*l+u},n.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(t){return this.writeInt32(t)},n.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?rt;r=0<=t?++r:--r)e.push(this.readByte());return e},n.prototype.write=function(t){var e,r,a,i;for(i=[],r=0,a=t.length;ri;a=0<=i?++a:--a)r={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(e){var r,a,i,f,l,u,h,p,w,x,g,P,C;for(C in g=Object.keys(e).length,u=Math.log(2),w=16*Math.floor(Math.log(g)/u),f=Math.floor(w/u),p=16*g-w,(a=new Qr).writeInt(this.scalarType),a.writeShort(g),a.writeShort(w),a.writeShort(f),a.writeShort(p),i=16*g,h=a.pos+i,l=null,P=[],e)for(x=e[C],a.writeString(C),a.writeInt(n(x)),a.writeInt(h),a.writeInt(x.length),P=P.concat(x),C==="head"&&(l=h),h+=x.length;h%4;)P.push(0),h++;return a.write(P),r=2981146554-n(a.data),a.pos=l+8,a.writeUInt32(r),a.data},n=function(e){var r,a,i,f;for(e=ah.call(e);e.length%4;)e.push(0);for(i=new Qr(e),a=0,r=0,f=e.length;rx;u=0<=x?++T:--T)it.push(t.readUInt16());return it})(),t.pos+=2,C=(function(){var T,it;for(it=[],u=T=0;0<=x?Tx;u=0<=x?++T:--T)it.push(t.readUInt16());return it})(),h=(function(){var T,it;for(it=[],u=T=0;0<=x?Tx;u=0<=x?++T:--T)it.push(t.readUInt16());return it})(),p=(function(){var T,it;for(it=[],u=T=0;0<=x?Tx;u=0<=x?++T:--T)it.push(t.readUInt16());return it})(),a=(this.length-t.pos+this.offset)/2,l=(function(){var T,it;for(it=[],u=T=0;0<=a?Ta;u=0<=a?++T:--T)it.push(t.readUInt16());return it})(),u=S=0,V=i.length;S=B;r=P<=B?++G:--G)p[u]===0?f=r+h[u]:(f=l[p[u]/2+(r-P)-(x-u)]||0)!==0&&(f+=h[u]),this.codeMap[r]=65535&f}t.pos=w}return n.encode=function(t,e){var r,a,i,f,l,u,h,p,w,x,g,P,C,B,S,G,V,T,it,mt,dt,X,R,tt,L,O,z,U,rt,st,ft,nt,ct,_t,wt,_,D,M,H,J,Z,at,ot,gt,At,kt;switch(U=new Qr,f=Object.keys(t).sort(function(St,Tt){return St-Tt}),e){case"macroman":for(C=0,B=(function(){var St=[];for(P=0;P<256;++P)St.push(0);return St})(),G={0:0},i={},rt=0,ct=f.length;rt=32768)for(u.push(0),mt.push(2*(g.length+R-P)),a=nt=L;L<=p?nt<=p:nt>=p;a=L<=p?++nt:--nt)g.push(r[a].new);else u.push(z-L),mt.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*R+2*g.length),U.writeUInt16(0),U.writeUInt16(tt),U.writeUInt16(X),U.writeUInt16(x),U.writeUInt16(dt),Z=0,_=w.length;Z<_;Z++)a=w[Z],U.writeUInt16(a);for(U.writeUInt16(0),at=0,D=O.length;ata;r=0<=a?++r:--r)e=new sf(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},n.encode=function(t,e){var r,a;return e==null&&(e="macroman"),r=sf.encode(t,e),(a=new Qr).writeUInt16(0),a.writeUInt16(1),r.table=a.data.concat(r.subtable),r},n})(),j2=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return gr(n,er),n.prototype.tag="hhea",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},n})(),O2=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return gr(n,er),n.prototype.tag="OS/2",n.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r})(),this.charRange=(function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},n})(),B2=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return gr(n,er),n.prototype.tag="post",n.prototype.parse=function(t){var e,r,a;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(r=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?ir;i=0<=r?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],a=[];t.posl;i=0<=l?++f:--f)u.push(t.readUInt32());return u}.call(this)}},n})(),D2=function(n,t){this.raw=n,this.length=n.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},R2=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return gr(n,er),n.prototype.tag="name",n.prototype.parse=function(t){var e,r,a,i,f,l,u,h,p,w,x;for(t.pos=this.offset,t.readShort(),e=t.readShort(),l=t.readShort(),r=[],i=0;0<=e?ie;i=0<=e?++i:--i)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+l+t.readShort()});for(u={},i=p=0,w=r.length;pl;e=0<=l?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var h,p;for(p=[],e=h=0;0<=a?ha;e=0<=a?++h:--h)p.push(t.readInt16());return p})(),this.widths=function(){var h,p,w,x;for(x=[],h=0,p=(w=this.metrics).length;ha;e=0<=a?++f:--f)u.push(this.widths.push(r));return u},n.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},n})(),ah=[].slice,q2=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return gr(n,er),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(t){var e,r,a,i,f,l,u,h,p,w;return t in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,r=i.indexOf(t),(a=i.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+r,f=(l=new Qr(e.read(a))).readShort(),h=l.readShort(),w=l.readShort(),u=l.readShort(),p=l.readShort(),this.cache[t]=f===-1?new z2(l,h,w,u,p):new U2(l,f,h,w,u,p),this.cache[t]))},n.prototype.encode=function(t,e,r){var a,i,f,l,u;for(f=[],i=[],l=0,u=e.length;l0&&(a+=u)}for(var h=new Array(4*r.length),p=0;p>8,h[4*p+1]=(16711680&r[p])>>16,h[4*p]=(4278190080&r[p])>>24;return h},n})(),W2=(function(){function n(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var t,e,r,a,i;for(e in a=this.font.cmap.tables[0].codeMap,t={},i=this.subset)r=i[e],t[e]=a[r];return t},n.prototype.glyphsFor=function(t){var e,r,a,i,f,l,u;for(a={},f=0,l=t.length;f0)for(i in u=this.glyphsFor(e))r=u[i],a[i]=r;return a},n.prototype.encode=function(t,e){var r,a,i,f,l,u,h,p,w,x,g,P,C,B,S;for(a in r=ih.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(t),g={0:0},S=r.charMap)g[(u=S[a]).old]=u.new;for(P in x=r.maxGlyphID,f)P in g||(g[P]=x++);return p=(function(G){var V,T;for(V in T={},G)T[G[V]]=V;return T})(g),w=Object.keys(p).sort(function(G,V){return G-V}),C=(function(){var G,V,T;for(T=[],G=0,V=w.length;G>"),i.join(` `)}return""+e},t})();function oh(n,t,e,r,a){r=r||{};var i=1.15,f=a.internal.scaleFactor,l=a.internal.getFontSize()/f,u=a.getLineHeightFactor?a.getLineHeightFactor():i,h=l*u,p=/\r\n|\r|\n/g,w="",x=1;if((r.valign==="middle"||r.valign==="bottom"||r.halign==="center"||r.halign==="right")&&(w=typeof n=="string"?n.split(p):n,x=w.length||1),e+=l*(2-i),r.valign==="middle"?e-=x/2*h:r.valign==="bottom"&&(e-=x*h),r.halign==="center"||r.halign==="right"){var g=l;if(r.halign==="center"&&(g*=.5),w&&x>=1){for(var P=0;P0,r=t||t===0;return e&&r?"DF":e?"S":r?"F":null}function Uo(n,t){var e,r,a,i;if(n=n||t,Array.isArray(n)){if(n.length>=4)return{top:n[0],right:n[1],bottom:n[2],left:n[3]};if(n.length===3)return{top:n[0],right:n[1],bottom:n[2],left:n[1]};if(n.length===2)return{top:n[0],right:n[1],bottom:n[0],left:n[1]};n.length===1?n=n[0]:n=t}return typeof n=="object"?(typeof n.vertical=="number"&&(n.top=n.vertical,n.bottom=n.vertical),typeof n.horizontal=="number"&&(n.right=n.horizontal,n.left=n.horizontal),{left:(e=n.left)!==null&&e!==void 0?e:t,top:(r=n.top)!==null&&r!==void 0?r:t,right:(a=n.right)!==null&&a!==void 0?a:t,bottom:(i=n.bottom)!==null&&i!==void 0?i:t}):(typeof n!="number"&&(n=t),{top:n,right:n,bottom:n,left:n})}function hh(n,t){var e=Uo(t.settings.margin,0);return n.pageSize().width-(e.left+e.right)}function Y2(n,t,e,r,a){var i={},f=1.3333333333333333,l=Gs(t,function(V){return a.getComputedStyle(V).backgroundColor});l!=null&&(i.fillColor=l);var u=Gs(t,function(V){return a.getComputedStyle(V).color});u!=null&&(i.textColor=u);var h=K2(r,e);h&&(i.cellPadding=h);var p="borderTopColor",w=f*e,x=r.borderTopWidth;if(r.borderBottomWidth===x&&r.borderRightWidth===x&&r.borderLeftWidth===x){var g=(parseFloat(x)||0)/w;g&&(i.lineWidth=g)}else i.lineWidth={top:(parseFloat(r.borderTopWidth)||0)/w,right:(parseFloat(r.borderRightWidth)||0)/w,bottom:(parseFloat(r.borderBottomWidth)||0)/w,left:(parseFloat(r.borderLeftWidth)||0)/w},i.lineWidth.top||(i.lineWidth.right?p="borderRightColor":i.lineWidth.bottom?p="borderBottomColor":i.lineWidth.left&&(p="borderLeftColor"));var P=Gs(t,function(V){return a.getComputedStyle(V)[p]});P!=null&&(i.lineColor=P);var C=["left","right","center","justify"];C.indexOf(r.textAlign)!==-1&&(i.halign=r.textAlign),C=["middle","bottom","top"],C.indexOf(r.verticalAlign)!==-1&&(i.valign=r.verticalAlign);var B=parseInt(r.fontSize||"");isNaN(B)||(i.fontSize=B/f);var S=J2(r);S&&(i.fontStyle=S);var G=(r.fontFamily||"").toLowerCase();return n.indexOf(G)!==-1&&(i.font=G),i}function J2(n){var t="";return(n.fontWeight==="bold"||n.fontWeight==="bolder"||parseInt(n.fontWeight)>=700)&&(t="bold"),(n.fontStyle==="italic"||n.fontStyle==="oblique")&&(t+="italic"),t}function Gs(n,t){var e=ch(n,t);if(!e)return null;var r=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!r||!Array.isArray(r))return null;var a=[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])],i=parseInt(r[4]);return i===0||isNaN(a[0])||isNaN(a[1])||isNaN(a[2])?null:a}function ch(n,t){var e=t(n);return e==="rgba(0, 0, 0, 0)"||e==="transparent"||e==="initial"||e==="inherit"?n.parentElement==null?null:ch(n.parentElement,t):e}function K2(n,t){var e=[n.paddingTop,n.paddingRight,n.paddingBottom,n.paddingLeft],r=96/(72/t),a=(parseInt(n.lineHeight)-parseInt(n.fontSize))/t/2,i=e.map(function(l){return parseInt(l||"0")/r}),f=Uo(i,0);return a>f.top&&(f.top=a),a>f.bottom&&(f.bottom=a),f}function dh(n,t,e,r,a){var i,f;r===void 0&&(r=!1),a===void 0&&(a=!1);var l;typeof t=="string"?l=e.document.querySelector(t):l=t;var u=Object.keys(n.getFontList()),h=n.scaleFactor(),p=[],w=[],x=[];if(!l)return console.error("Html table could not be found with input: ",t),{head:p,body:w,foot:x};for(var g=0;g0&&(a||w.display!=="none"))return f}function $2(n){var t=n.cloneNode(!0);return t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(/ +/g," "),t.innerHTML=t.innerHTML.split(//).map(function(e){return e.trim()}).join(` `),t.innerText||t.textContent||""}function Z2(n,t,e){for(var r=0,a=[n,t,e];r0?"_".concat(u):"");var p={dataKey:h};a.push(p)}}),a}var sl=(function(){function n(t,e,r){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=r,this.doc=t.getDocument()}return n})(),o5=(function(n){sh(t,n);function t(e,r,a,i,f,l){var u=n.call(this,e,r,l)||this;return u.cell=a,u.row=i,u.column=f,u.section=i.section,u}return t})(sl),s5=(function(){function n(t,e){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return n.prototype.getHeadHeight=function(t){return this.head.reduce(function(e,r){return e+r.getMaxCellHeight(t)},0)},n.prototype.getFootHeight=function(t){return this.foot.reduce(function(e,r){return e+r.getMaxCellHeight(t)},0)},n.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},n.prototype.callCellHooks=function(t,e,r,a,i,f){for(var l=0,u=e;l1:!1}).length>0},n.prototype.canEntireRowFit=function(t,e){return this.getMaxCellHeight(e)<=t},n.prototype.getMinimumRowHeight=function(t,e){var r=this;return t.reduce(function(a,i){var f=r.cells[i.index];if(!f)return 0;var l=e.getLineHeight(f.styles.fontSize),u=f.padding("vertical"),h=u+l;return h>a?h:a},0)},n})(),gh=(function(){function n(t,e,r){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=r,this.raw=t;var i=t;t!=null&&typeof t=="object"&&!Array.isArray(t)?(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,i=(a=t.content)!==null&&a!==void 0?a:t,t._element&&(this.raw=t._element)):(this.rowSpan=1,this.colSpan=1);var f=i!=null?""+i:"",l=/\r\n|\r|\n/g;this.text=f.split(l)}return n.prototype.getTextPos=function(){var t;if(this.styles.valign==="top")t=this.y+this.padding("top");else if(this.styles.valign==="bottom")t=this.y+this.height-this.padding("bottom");else{var e=this.height-this.padding("vertical");t=this.y+e/2+this.padding("top")}var r;if(this.styles.halign==="right")r=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");r=this.x+a/2+this.padding("left")}else r=this.x+this.padding("left");return{x:r,y:t}},n.prototype.getContentHeight=function(t,e){e===void 0&&(e=1.15);var r=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/t*e,i=r*a+this.padding("vertical");return Math.max(i,this.styles.minCellHeight)},n.prototype.padding=function(t){var e=Uo(this.styles.cellPadding,0);return t==="vertical"?e.top+e.bottom:t==="horizontal"?e.left+e.right:e[t]},n})(),l5=(function(){function n(t,e,r){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=r}return n.prototype.getMaxCustomCellWidth=function(t){for(var e=0,r=0,a=t.allRows();r.1/n.scaleFactor()&&(a=a<1?a:Math.round(a),console.log("Of the table content, ".concat(a," units width could not fit page"))),c5(t),d5(t,n),h5(t)}function f5(n,t){var e=n.scaleFactor(),r=t.settings.horizontalPageBreak,a=hh(n,t);t.allRows().forEach(function(i){for(var f=0,l=t.columns;fa?(h.minWidth=a,h.wrappedWidth=a):(h.minWidth=h.contentWidth,h.wrappedWidth=h.contentWidth);else{var g=10/e;h.minWidth=h.styles.minCellWidth||g,h.wrappedWidth=h.contentWidth,h.minWidth>h.wrappedWidth&&(h.wrappedWidth=h.minWidth)}}}}),t.allRows().forEach(function(i){for(var f=0,l=t.columns;f1&&!u.minWidth&&(u.minWidth=h.minWidth),h.colSpan>1&&!u.wrappedWidth&&(u.wrappedWidth=h.minWidth))}})}function ll(n,t,e){for(var r=t,a=n.reduce(function(g,P){return g+P.wrappedWidth},0),i=0;ie(g):!0});x.length&&(t=ll(x,t,e))}return t}function h5(n){for(var t={},e=1,r=n.allRows(),a=0;a1)e--,delete i.cells[u.index];else if(h)h.cell.height+=i.height,e=h.cell.colSpan,delete i.cells[u.index],h.left--,h.left<=1&&delete t[u.index];else{var p=i.cells[u.index];if(!p)continue;if(p.height=i.height,p.rowSpan>1){var w=r.length-a,x=p.rowSpan>w?w:p.rowSpan;t[u.index]={cell:p,left:x,row:i}}}}}function c5(n){for(var t=n.allRows(),e=0;e1&&n.columns[l+1])i+=u.width,delete r.cells[u.index];else if(a){var h=a;delete r.cells[u.index],a=null,h.width=u.width+i}else{var h=r.cells[u.index];if(!h)continue;if(f=h.colSpan,i=0,h.colSpan>1){a=h,i+=u.width;continue}h.width=u.width+i}}}function d5(n,t){for(var e={count:0,height:0},r=0,a=n.allRows();r1&&e.count*e.height0&&e.height>x&&(x=e.height),x>i.height&&(i.height=x)}}e.count--}}function uf(n,t,e,r,a){return n.map(function(i){return p5(i,t,e,r,a)})}function p5(n,t,e,r,a){var i=1e4*r.scaleFactor();if(t=Math.ceil(t*i)/i,t>=Ro(n,e,r))return n;for(;t0?e:null}function m5(n,t){if(n==="head"){if(typeof t=="object")return t.header||null;if(typeof t=="string"||typeof t=="number")return t}else if(n==="foot"&&typeof t=="object")return t.footer;return null}function b5(n){return n.map(function(t,e){var r,a;return typeof t=="object"?a=(r=t.dataKey)!==null&&r!==void 0?r:e:a=e,new l5(a,t,e)})}function w5(n,t,e,r,a,i,f){var l=V2(r),u;n==="head"?u=a.headStyles:n==="body"?u=a.bodyStyles:n==="foot"&&(u=a.footStyles);var h=jr({},l.table,l[n],a.styles,u),p=a.columnStyles[t.dataKey]||a.columnStyles[t.index]||{},w=n==="body"?p:{},x=n==="body"&&e%2===0?jr({},l.alternateRow,a.alternateRowStyles):{},g=G2(i),P=jr({},g,h,x,w);return jr(P,f)}function y5(n,t,e){var r;e===void 0&&(e={});var a=hh(n,t),i=new Map,f=[],l=[],u=[];Array.isArray(t.settings.horizontalPageBreakRepeat)?u=t.settings.horizontalPageBreakRepeat:(typeof t.settings.horizontalPageBreakRepeat=="string"||typeof t.settings.horizontalPageBreakRepeat=="number")&&(u=[t.settings.horizontalPageBreakRepeat]),u.forEach(function(x){var g=t.columns.find(function(P){return P.dataKey===x||P.index===x});g&&!i.has(g.index)&&(i.set(g.index,!0),f.push(g.index),l.push(t.columns[g.index]),a-=g.wrappedWidth)});for(var h=!0,p=(r=e?.start)!==null&&r!==void 0?r:0;p=w)h=!1,f.push(p),l.push(t.columns[p]),a-=w;else break;p++}return{colIndexes:f,columns:l,lastIndex:p-1}}function x5(n,t){for(var e=[],r=0;rp.pageSize().height)&&(mh(p),i.y=a.top),t.callWillDrawPageHooks(p,i);var w=jr({},i);t.startPageNumber=p.pageNumber(),e.horizontalPageBreak?_5(p,t,w,i):(p.applyStyles(p.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&t.head.forEach(function(x){return Or(p,t,x,i,t.columns)}),p.applyStyles(p.userStyles),t.body.forEach(function(x,g){var P=g===t.body.length-1;Mo(p,t,x,P,w,i,t.columns)}),p.applyStyles(p.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&t.foot.forEach(function(x){return Or(p,t,x,i,t.columns)})),uh(p,t,w,i),t.callEndPageHooks(p,i),t.finalY=i.y,n.lastAutoTable=t,p.applyStyles(p.userStyles)}function _5(n,t,e,r){var a=x5(n,t),i=t.settings;if(i.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(h,p){n.applyStyles(n.userStyles),p>0?Oa(n,t,e,r,h.columns,!0):hf(n,t,r,h.columns),N5(n,t,e,r,h.columns),Ys(n,t,r,h.columns)});else for(var f=-1,l=a[0],u=function(){var h=f;if(l){n.applyStyles(n.userStyles);var p=l.columns;f>=0?Oa(n,t,e,r,p,!0):hf(n,t,r,p),h=cf(n,t,f+1,r,p),Ys(n,t,r,p)}var w=h-f;a.slice(1).forEach(function(x){n.applyStyles(n.userStyles),Oa(n,t,e,r,x.columns,!0),cf(n,t,f+1,r,x.columns,w),Ys(n,t,r,x.columns)}),f=h};fw&&(p.text=h.text.splice(w,h.text.length));var x=r.scaleFactor(),g=r.getLineHeightFactor();h.contentHeight=h.getContentHeight(x,g),h.contentHeight>=t&&(h.contentHeight=t,p.styles.minCellHeight-=t),h.contentHeight>n.height&&(n.height=h.contentHeight),p.contentHeight=p.getContentHeight(x,g),p.contentHeight>i&&(i=p.contentHeight),a[u.index]=p}}var P=new ph(n.raw,-1,n.section,a,!0);P.height=i;for(var C=0,B=e.columns;Cl)return console.log("Will not be able to print row ".concat(t.index," correctly since it's minimum height is larger than page height")),!0;if(!h)return!1;var p=t.hasRowSpan(r.columns),w=t.getMaxCellHeight(r.columns)>l;return w?(p&&console.log("The content of row ".concat(t.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(p||r.settings.rowPageBreak==="avoid")}function Mo(n,t,e,r,a,i,f){var l=vh(n,t,r,i);if(e.canEntireRowFit(l,f))Or(n,t,e,i,f);else if(k5(n,e,l,t)){var u=S5(e,l,t,n);Or(n,t,e,i,f),Oa(n,t,a,i,f),Mo(n,t,u,r,a,i,f)}else Oa(n,t,a,i,f),Mo(n,t,e,r,a,i,f)}function Or(n,t,e,r,a){r.x=t.settings.margin.left;for(var i=0,f=a;i"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new aa(this),i=dh(a,t,window,e,!1),f=i.head,l=i.body,u=((r=f[0])===null||r===void 0?void 0:r.map(function(h){return h.content}))||[];return{columns:u,rows:l,data:l}}}var Js;try{if(typeof window<"u"&&window){var df=window,pf=df.jsPDF||((Js=df.jspdf)===null||Js===void 0?void 0:Js.jsPDF);pf&&F5(pf)}}catch(n){console.error("Could not apply autoTable plugin",n)}export{Mt as E,xe as _,F5 as a}; //# sourceMappingURL=jspdf-BTK_8o8D.js.map