var MB=Object.defineProperty;var RB=(A,e,t)=>e in A?MB(A,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):A[e]=t;var xe=(A,e,t)=>(RB(A,typeof e!="symbol"?e+"":e,t),t);import{bT as Dc,bU as KB,b4 as jB,l as GB,c as VB,a as qB,h as zB,bP as WB,r as pt,bV as Ch,bW as XB,bX as JB,j as yA,y as kc,T as Xe,M as Hr,B as No,bY as YB,br as ZB}from"./index-7414fd54.js";import{G as $B}from"./GoBack-069f986f.js";import{T as A2}from"./index-04819da2.js";import{S as e2}from"./Buttons-8bf4fd07.js";import{_ as Ne}from"./typeof-7fd5df1e.js";import{_ as bh}from"./slicedToArray-f5e6f6d2.js";import{C as Fh}from"./Checkbox-8a9dfdf4.js";import{C as t2}from"./CardContent-8ed30fb2.js";import{T as Tc}from"./Tooltip-395a1541.js";import{L as Oc}from"./LoadingButton-75c9b57b.js";import{D as Qh}from"./Download-28b57182.js";import{T as r2}from"./ThumbUp-ae9433d5.js";import"./TableCell-3cadf061.js";import"./TableRow-34be244e.js";import"./index-aa118901.js";import"./useMediaQuery-c16b4b9b.js";import"./TableHead-4965c3b4.js";import"./createSvgIcon-76207f66.js";import"./TablePagination-748823c3.js";import"./Toolbar-1aeab16d.js";import"./Select-48086034.js";import"./Menu-1900bd36.js";import"./isHostComponent-73d6e646.js";import"./Grow-2a8f811c.js";import"./List-5ed8845c.js";import"./useSlotProps-60b9b089.js";import"./OutlinedInput-dd801d4f.js";import"./useFormControl-99b033b3.js";import"./useControlled-dcaff400.js";import"./MenuItem-a928b422.js";import"./dividerClasses-5fe46a73.js";import"./listItemTextClasses-aec56de0.js";import"./KeyboardArrowRight-13711303.js";import"./LastPage-4b7b4114.js";import"./Zoom-e24b333b.js";import"./SwitchBase-c8eea343.js";import"./popper-f3391c26.js";import"./index-b7f52b29.js";import"./index-89446b48.js";import"./resolveProps-3552295b.js";import"./composeClasses-b42b2e69.js";/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Hu=function(A,e){return Hu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},Hu(A,e)};function Tr(A,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Hu(A,e);function t(){this.constructor=A}A.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Nu=function(){return Nu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Nu.apply(this,arguments)};function zt(A,e,t,r){function n(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function s(f){try{u(r.next(f))}catch(p){o(p)}}function l(f){try{u(r.throw(f))}catch(p){o(p)}}function u(f){f.done?i(f.value):n(f.value).then(s,l)}u((r=r.apply(A,e||[])).next())})}function Mt(A,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;t;)try{if(r=1,n&&(i=u[0]&2?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,n=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1],i=u;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(u);break}i[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(A,t)}catch(f){u=[6,f],n=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Do(A,e,t){if(t||arguments.length===2)for(var r=0,n=e.length,i;r<n;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return A.concat(i||e)}var xn=function(){function A(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n}return A.prototype.add=function(e,t,r,n){return new A(this.left+e,this.top+t,this.width+r,this.height+n)},A.fromClientRect=function(e,t){return new A(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},A.fromDOMRectList=function(e,t){var r=Array.from(t).find(function(n){return n.width!==0});return r?new A(r.left+e.windowBounds.left,r.top+e.windowBounds.top,r.width,r.height):A.EMPTY},A.EMPTY=new A(0,0,0,0),A}(),Ml=function(A,e){return xn.fromClientRect(A,e.getBoundingClientRect())},n2=function(A){var e=A.body,t=A.documentElement;if(!e||!t)throw new Error("Unable to get document size");var r=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),n=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new xn(0,0,r,n)},Rl=function(A){for(var e=[],t=0,r=A.length;t<r;){var n=A.charCodeAt(t++);if(n>=55296&&n<=56319&&t<r){var i=A.charCodeAt(t++);(i&64512)===56320?e.push(((n&1023)<<10)+(i&1023)+65536):(e.push(n),t--)}else e.push(n)}return e},it=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],n=-1,i="";++n<t;){var o=A[n];o<=65535?r.push(o):(o-=65536,r.push((o>>10)+55296,o%1024+56320)),(n+1===t||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ko=0;ko<yh.length;ko++)i2[yh.charCodeAt(ko)]=ko;var Uh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ws=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var To=0;To<Uh.length;To++)ws[Uh.charCodeAt(To)]=To;var a2=function(A){var e=A.length*.75,t=A.length,r,n=0,i,o,s,l;A[A.length-1]==="="&&(e--,A[A.length-2]==="="&&e--);var u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),f=Array.isArray(u)?u:new Uint8Array(u);for(r=0;r<t;r+=4)i=ws[A.charCodeAt(r)],o=ws[A.charCodeAt(r+1)],s=ws[A.charCodeAt(r+2)],l=ws[A.charCodeAt(r+3)],f[n++]=i<<2|o>>4,f[n++]=(o&15)<<4|s>>2,f[n++]=(s&3)<<6|l&63;return u},s2=function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t},o2=function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t},Di=5,mf=6+5,Pc=2,l2=mf-Di,Gd=65536>>Di,c2=1<<Di,Mc=c2-1,u2=1024>>Di,f2=Gd+u2,h2=f2,d2=32,g2=h2+d2,B2=65536>>mf,p2=1<<l2,w2=p2-1,_h=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},v2=function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))},m2=function(A,e){var t=a2(A),r=Array.isArray(t)?o2(t):new Uint32Array(t),n=Array.isArray(t)?s2(t):new Uint16Array(t),i=24,o=_h(n,i/2,r[4]/2),s=r[5]===2?_h(n,(i+r[4])/2):v2(r,Math.ceil((i+r[4])/4));return new C2(r[0],r[1],r[2],r[3],o,s)},C2=function(){function A(e,t,r,n,i,o){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=n,this.index=i,this.data=o}return A.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Di],t=(t<<Pc)+(e&Mc),this.data[t];if(e<=65535)return t=this.index[Gd+(e-55296>>Di)],t=(t<<Pc)+(e&Mc),this.data[t];if(e<this.highStart)return t=g2-B2+(e>>mf),t=this.index[t],t+=e>>Di&w2,t=this.index[t],t=(t<<Pc)+(e&Mc),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),xh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Oo=0;Oo<xh.length;Oo++)b2[xh.charCodeAt(Oo)]=Oo;var F2=" ",Eh=50,Q2=1,Vd=2,qd=3,y2=4,U2=5,Lh=7,zd=8,Ih=9,Jn=10,Du=11,Sh=12,ku=13,_2=14,vs=15,Tu=16,Po=17,us=18,x2=19,Hh=20,Ou=21,fs=22,Rc=23,fa=24,lr=25,ms=26,Cs=27,ha=28,E2=29,Ei=30,L2=31,Mo=32,Ro=33,Pu=34,Mu=35,Ru=36,ks=37,Ku=38,hl=39,dl=40,Kc=41,Wd=42,I2=43,S2=[9001,65288],Xd="!",de="×",Ko="÷",ju=m2(F2),Cn=[Ei,Ru],Gu=[Q2,Vd,qd,U2],Jd=[Jn,zd],Nh=[Cs,ms],H2=Gu.concat(Jd),Dh=[Ku,hl,dl,Pu,Mu],N2=[vs,ku],D2=function(A,e){e===void 0&&(e="strict");var t=[],r=[],n=[];return A.forEach(function(i,o){var s=ju.get(i);if(s>Eh?(n.push(!0),s-=Eh):n.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return r.push(o),t.push(Tu);if(s===y2||s===Du){if(o===0)return r.push(o),t.push(Ei);var l=t[o-1];return H2.indexOf(l)===-1?(r.push(r[o-1]),t.push(l)):(r.push(o),t.push(Ei))}if(r.push(o),s===L2)return t.push(e==="strict"?Ou:ks);if(s===Wd||s===E2)return t.push(Ei);if(s===I2)return i>=131072&&i<=196605||i>=196608&&i<=262141?t.push(ks):t.push(Ei);t.push(s)}),[r,t,n]},jc=function(A,e,t,r){var n=r[t];if(Array.isArray(A)?A.indexOf(n)!==-1:A===n)for(var i=t;i<=r.length;){i++;var o=r[i];if(o===e)return!0;if(o!==Jn)break}if(n===Jn)for(var i=t;i>0;){i--;var s=r[i];if(Array.isArray(A)?A.indexOf(s)!==-1:A===s)for(var l=t;l<=r.length;){l++;var o=r[l];if(o===e)return!0;if(o!==Jn)break}if(s!==Jn)break}return!1},kh=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r===Jn)t--;else return r}return 0},k2=function(A,e,t,r,n){if(t[r]===0)return de;var i=r-1;if(Array.isArray(n)&&n[i]===!0)return de;var o=i-1,s=i+1,l=e[i],u=o>=0?e[o]:0,f=e[s];if(l===Vd&&f===qd)return de;if(Gu.indexOf(l)!==-1)return Xd;if(Gu.indexOf(f)!==-1||Jd.indexOf(f)!==-1)return de;if(kh(i,e)===zd)return Ko;if(ju.get(A[i])===Du||(l===Mo||l===Ro)&&ju.get(A[s])===Du||l===Lh||f===Lh||l===Ih||[Jn,ku,vs].indexOf(l)===-1&&f===Ih||[Po,us,x2,fa,ha].indexOf(f)!==-1||kh(i,e)===fs||jc(Rc,fs,i,e)||jc([Po,us],Ou,i,e)||jc(Sh,Sh,i,e))return de;if(l===Jn)return Ko;if(l===Rc||f===Rc)return de;if(f===Tu||l===Tu)return Ko;if([ku,vs,Ou].indexOf(f)!==-1||l===_2||u===Ru&&N2.indexOf(l)!==-1||l===ha&&f===Ru||f===Hh||Cn.indexOf(f)!==-1&&l===lr||Cn.indexOf(l)!==-1&&f===lr||l===Cs&&[ks,Mo,Ro].indexOf(f)!==-1||[ks,Mo,Ro].indexOf(l)!==-1&&f===ms||Cn.indexOf(l)!==-1&&Nh.indexOf(f)!==-1||Nh.indexOf(l)!==-1&&Cn.indexOf(f)!==-1||[Cs,ms].indexOf(l)!==-1&&(f===lr||[fs,vs].indexOf(f)!==-1&&e[s+1]===lr)||[fs,vs].indexOf(l)!==-1&&f===lr||l===lr&&[lr,ha,fa].indexOf(f)!==-1)return de;if([lr,ha,fa,Po,us].indexOf(f)!==-1)for(var p=i;p>=0;){var w=e[p];if(w===lr)return de;if([ha,fa].indexOf(w)!==-1)p--;else break}if([Cs,ms].indexOf(f)!==-1)for(var p=[Po,us].indexOf(l)!==-1?o:i;p>=0;){var w=e[p];if(w===lr)return de;if([ha,fa].indexOf(w)!==-1)p--;else break}if(Ku===l&&[Ku,hl,Pu,Mu].indexOf(f)!==-1||[hl,Pu].indexOf(l)!==-1&&[hl,dl].indexOf(f)!==-1||[dl,Mu].indexOf(l)!==-1&&f===dl||Dh.indexOf(l)!==-1&&[Hh,ms].indexOf(f)!==-1||Dh.indexOf(f)!==-1&&l===Cs||Cn.indexOf(l)!==-1&&Cn.indexOf(f)!==-1||l===fa&&Cn.indexOf(f)!==-1||Cn.concat(lr).indexOf(l)!==-1&&f===fs&&S2.indexOf(A[s])===-1||Cn.concat(lr).indexOf(f)!==-1&&l===us)return de;if(l===Kc&&f===Kc){for(var g=t[i],F=1;g>0&&(g--,e[g]===Kc);)F++;if(F%2!==0)return de}return l===Mo&&f===Ro?de:Ko},T2=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=D2(A,e.lineBreak),r=t[0],n=t[1],i=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(n=n.map(function(s){return[lr,Ei,Wd].indexOf(s)!==-1?ks:s}));var o=e.wordBreak==="keep-all"?i.map(function(s,l){return s&&A[l]>=19968&&A[l]<=40959}):void 0;return[r,n,o]},O2=function(){function A(e,t,r,n){this.codePoints=e,this.required=t===Xd,this.start=r,this.end=n}return A.prototype.slice=function(){return it.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),P2=function(A,e){var t=Rl(A),r=T2(t,e),n=r[0],i=r[1],o=r[2],s=t.length,l=0,u=0;return{next:function(){if(u>=s)return{done:!0,value:null};for(var f=de;u<s&&(f=k2(t,i,n,++u,o))===de;);if(f!==de||u===s){var p=new O2(t,f,l,u);return l=u,{value:p,done:!1}}return{done:!0,value:null}}}},M2=1,R2=2,zs=4,Th=8,Ql=10,Oh=47,_s=92,K2=9,j2=32,jo=34,hs=61,G2=35,V2=36,q2=37,Go=39,Vo=40,ds=41,z2=95,Zt=45,W2=33,X2=60,J2=62,Y2=64,Z2=91,$2=93,Ap=61,ep=123,qo=63,tp=125,Ph=124,rp=126,np=128,Mh=65533,Gc=42,Ii=43,ip=44,ap=58,sp=59,Ts=46,op=0,lp=8,cp=11,up=14,fp=31,hp=127,Jr=-1,Yd=48,Zd=97,$d=101,dp=102,gp=117,Bp=122,A1=65,e1=69,t1=70,pp=85,wp=90,Rt=function(A){return A>=Yd&&A<=57},vp=function(A){return A>=55296&&A<=57343},da=function(A){return Rt(A)||A>=A1&&A<=t1||A>=Zd&&A<=dp},mp=function(A){return A>=Zd&&A<=Bp},Cp=function(A){return A>=A1&&A<=wp},bp=function(A){return mp(A)||Cp(A)},Fp=function(A){return A>=np},zo=function(A){return A===Ql||A===K2||A===j2},yl=function(A){return bp(A)||Fp(A)||A===z2},Rh=function(A){return yl(A)||Rt(A)||A===Zt},Qp=function(A){return A>=op&&A<=lp||A===cp||A>=up&&A<=fp||A===hp},Wn=function(A,e){return A!==_s?!1:e!==Ql},Wo=function(A,e,t){return A===Zt?yl(e)||Wn(e,t):yl(A)?!0:!!(A===_s&&Wn(A,e))},Vc=function(A,e,t){return A===Ii||A===Zt?Rt(e)?!0:e===Ts&&Rt(t):Rt(A===Ts?e:A)},yp=function(A){var e=0,t=1;(A[e]===Ii||A[e]===Zt)&&(A[e]===Zt&&(t=-1),e++);for(var r=[];Rt(A[e]);)r.push(A[e++]);var n=r.length?parseInt(it.apply(void 0,r),10):0;A[e]===Ts&&e++;for(var i=[];Rt(A[e]);)i.push(A[e++]);var o=i.length,s=o?parseInt(it.apply(void 0,i),10):0;(A[e]===e1||A[e]===$d)&&e++;var l=1;(A[e]===Ii||A[e]===Zt)&&(A[e]===Zt&&(l=-1),e++);for(var u=[];Rt(A[e]);)u.push(A[e++]);var f=u.length?parseInt(it.apply(void 0,u),10):0;return t*(n+s*Math.pow(10,-o))*Math.pow(10,l*f)},Up={type:2},_p={type:3},xp={type:4},Ep={type:13},Lp={type:8},Ip={type:21},Sp={type:9},Hp={type:10},Np={type:11},Dp={type:12},kp={type:14},Xo={type:23},Tp={type:1},Op={type:25},Pp={type:24},Mp={type:26},Rp={type:27},Kp={type:28},jp={type:29},Gp={type:31},Vu={type:32},r1=function(){function A(){this._value=[]}return A.prototype.write=function(e){this._value=this._value.concat(Rl(e))},A.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Vu;)e.push(t),t=this.consumeToken();return e},A.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case jo:return this.consumeStringToken(jo);case G2:var t=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Rh(t)||Wn(r,n)){var i=Wo(t,r,n)?R2:M2,o=this.consumeName();return{type:5,value:o,flags:i}}break;case V2:if(this.peekCodePoint(0)===hs)return this.consumeCodePoint(),Ep;break;case Go:return this.consumeStringToken(Go);case Vo:return Up;case ds:return _p;case Gc:if(this.peekCodePoint(0)===hs)return this.consumeCodePoint(),kp;break;case Ii:if(Vc(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case ip:return xp;case Zt:var s=e,l=this.peekCodePoint(0),u=this.peekCodePoint(1);if(Vc(s,l,u))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Wo(s,l,u))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(l===Zt&&u===J2)return this.consumeCodePoint(),this.consumeCodePoint(),Pp;break;case Ts:if(Vc(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Oh:if(this.peekCodePoint(0)===Gc)for(this.consumeCodePoint();;){var f=this.consumeCodePoint();if(f===Gc&&(f=this.consumeCodePoint(),f===Oh))return this.consumeToken();if(f===Jr)return this.consumeToken()}break;case ap:return Mp;case sp:return Rp;case X2:if(this.peekCodePoint(0)===W2&&this.peekCodePoint(1)===Zt&&this.peekCodePoint(2)===Zt)return this.consumeCodePoint(),this.consumeCodePoint(),Op;break;case Y2:var p=this.peekCodePoint(0),w=this.peekCodePoint(1),g=this.peekCodePoint(2);if(Wo(p,w,g)){var o=this.consumeName();return{type:7,value:o}}break;case Z2:return Kp;case _s:if(Wn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case $2:return jp;case Ap:if(this.peekCodePoint(0)===hs)return this.consumeCodePoint(),Lp;break;case ep:return Np;case tp:return Dp;case gp:case pp:var F=this.peekCodePoint(0),y=this.peekCodePoint(1);return F===Ii&&(da(y)||y===qo)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case Ph:if(this.peekCodePoint(0)===hs)return this.consumeCodePoint(),Sp;if(this.peekCodePoint(0)===Ph)return this.consumeCodePoint(),Ip;break;case rp:if(this.peekCodePoint(0)===hs)return this.consumeCodePoint(),Hp;break;case Jr:return Vu}return zo(e)?(this.consumeWhiteSpace(),Gp):Rt(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):yl(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:it(e)}},A.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},A.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},A.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},A.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();da(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var r=!1;t===qo&&e.length<6;)e.push(t),t=this.consumeCodePoint(),r=!0;if(r){var n=parseInt(it.apply(void 0,e.map(function(l){return l===qo?Yd:l})),16),i=parseInt(it.apply(void 0,e.map(function(l){return l===qo?t1:l})),16);return{type:30,start:n,end:i}}var o=parseInt(it.apply(void 0,e),16);if(this.peekCodePoint(0)===Zt&&da(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];da(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();var i=parseInt(it.apply(void 0,s),16);return{type:30,start:o,end:i}}else return{type:30,start:o,end:o}},A.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===Vo?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Vo?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},A.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Jr)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===Go||t===jo){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Jr||this.peekCodePoint(0)===ds)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),Xo)}for(;;){var n=this.consumeCodePoint();if(n===Jr||n===ds)return{type:22,value:it.apply(void 0,e)};if(zo(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Jr||this.peekCodePoint(0)===ds?(this.consumeCodePoint(),{type:22,value:it.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Xo);if(n===jo||n===Go||n===Vo||Qp(n))return this.consumeBadUrlRemnants(),Xo;if(n===_s)if(Wn(n,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Xo;else e.push(n)}},A.prototype.consumeWhiteSpace=function(){for(;zo(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===ds||e===Jr)return;Wn(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(e){for(var t=5e4,r="";e>0;){var n=Math.min(t,e);r+=it.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),r},A.prototype.consumeStringToken=function(e){var t="",r=0;do{var n=this._value[r];if(n===Jr||n===void 0||n===e)return t+=this.consumeStringSlice(r),{type:0,value:t};if(n===Ql)return this._value.splice(0,r),Tp;if(n===_s){var i=this._value[r+1];i!==Jr&&i!==void 0&&(i===Ql?(t+=this.consumeStringSlice(r),r=-1,this._value.shift()):Wn(n,i)&&(t+=this.consumeStringSlice(r),t+=it(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},A.prototype.consumeNumber=function(){var e=[],t=zs,r=this.peekCodePoint(0);for((r===Ii||r===Zt)&&e.push(this.consumeCodePoint());Rt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(r===Ts&&Rt(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Th;Rt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((r===e1||r===$d)&&((n===Ii||n===Zt)&&Rt(i)||Rt(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Th;Rt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[yp(e),t]},A.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],r=e[1],n=this.peekCodePoint(0),i=this.peekCodePoint(1),o=this.peekCodePoint(2);if(Wo(n,i,o)){var s=this.consumeName();return{type:15,number:t,flags:r,unit:s}}return n===q2?(this.consumeCodePoint(),{type:16,number:t,flags:r}):{type:17,number:t,flags:r}},A.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(da(e)){for(var t=it(e);da(this.peekCodePoint(0))&&t.length<6;)t+=it(this.consumeCodePoint());zo(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return r===0||vp(r)||r>1114111?Mh:r}return e===Jr?Mh:e},A.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Rh(t))e+=it(t);else if(Wn(t,this.peekCodePoint(0)))e+=it(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},A}(),n1=function(){function A(e){this._tokens=e}return A.create=function(e){var t=new r1;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},A.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},A.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},r=this.consumeToken();;){if(r.type===32||qp(r,e))return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue()),r=this.consumeToken()}},A.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?Vu:e},A.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},A}(),Ws=function(A){return A.type===15},Oa=function(A){return A.type===17},Le=function(A){return A.type===20},Vp=function(A){return A.type===0},qu=function(A,e){return Le(A)&&A.value===e},i1=function(A){return A.type!==31},Na=function(A){return A.type!==31&&A.type!==4},rn=function(A){var e=[],t=[];return A.forEach(function(r){if(r.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(t),t=[];return}r.type!==31&&t.push(r)}),t.length&&e.push(t),e},qp=function(A,e){return e===11&&A.type===12||e===28&&A.type===29?!0:e===2&&A.type===3},ai=function(A){return A.type===17||A.type===15},ft=function(A){return A.type===16||ai(A)},a1=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},Lt={type:17,number:0,flags:zs},Cf={type:16,number:50,flags:zs},Yn={type:16,number:100,flags:zs},bs=function(A,e,t){var r=A[0],n=A[1];return[Pe(r,e),Pe(typeof n<"u"?n:r,t)]},Pe=function(A,e){if(A.type===16)return A.number/100*e;if(Ws(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},s1="deg",o1="grad",l1="rad",c1="turn",Kl={name:"angle",parse:function(A,e){if(e.type===15)switch(e.unit){case s1:return Math.PI*e.number/180;case o1:return Math.PI/200*e.number;case l1:return e.number;case c1:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},u1=function(A){return A.type===15&&(A.unit===s1||A.unit===o1||A.unit===l1||A.unit===c1)},f1=function(A){var e=A.filter(Le).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Lt,Lt];case"to top":case"bottom":return Fr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Lt,Yn];case"to right":case"left":return Fr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Yn,Yn];case"to bottom":case"top":return Fr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Yn,Lt];case"to left":case"right":return Fr(270)}return 0},Fr=function(A){return Math.PI*A/180},ei={name:"color",parse:function(A,e){if(e.type===18){var t=zp[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(A,e.values)}if(e.type===5){if(e.value.length===3){var r=e.value.substring(0,1),n=e.value.substring(1,2),i=e.value.substring(2,3);return Zn(parseInt(r+r,16),parseInt(n+n,16),parseInt(i+i,16),1)}if(e.value.length===4){var r=e.value.substring(0,1),n=e.value.substring(1,2),i=e.value.substring(2,3),o=e.value.substring(3,4);return Zn(parseInt(r+r,16),parseInt(n+n,16),parseInt(i+i,16),parseInt(o+o,16)/255)}if(e.value.length===6){var r=e.value.substring(0,2),n=e.value.substring(2,4),i=e.value.substring(4,6);return Zn(parseInt(r,16),parseInt(n,16),parseInt(i,16),1)}if(e.value.length===8){var r=e.value.substring(0,2),n=e.value.substring(2,4),i=e.value.substring(4,6),o=e.value.substring(6,8);return Zn(parseInt(r,16),parseInt(n,16),parseInt(i,16),parseInt(o,16)/255)}}if(e.type===20){var s=_n[e.value.toUpperCase()];if(typeof s<"u")return s}return _n.TRANSPARENT}},ti=function(A){return(255&A)===0},mt=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,n=255&A>>24;return e<255?"rgba("+n+","+r+","+t+","+e/255+")":"rgb("+n+","+r+","+t+")"},Zn=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(r*255)<<0)>>>0},Kh=function(A,e){if(A.type===17)return A.number;if(A.type===16){var t=e===3?1:255;return e===3?A.number/100*t:Math.round(A.number/100*t)}return 0},jh=function(A,e){var t=e.filter(Na);if(t.length===3){var r=t.map(Kh),n=r[0],i=r[1],o=r[2];return Zn(n,i,o,1)}if(t.length===4){var s=t.map(Kh),n=s[0],i=s[1],o=s[2],l=s[3];return Zn(n,i,o,l)}return 0};function qc(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<1/2?e:t<2/3?(e-A)*6*(2/3-t)+A:A}var Gh=function(A,e){var t=e.filter(Na),r=t[0],n=t[1],i=t[2],o=t[3],s=(r.type===17?Fr(r.number):Kl.parse(A,r))/(Math.PI*2),l=ft(n)?n.number/100:0,u=ft(i)?i.number/100:0,f=typeof o<"u"&&ft(o)?Pe(o,1):1;if(l===0)return Zn(u*255,u*255,u*255,1);var p=u<=.5?u*(l+1):u+l-u*l,w=u*2-p,g=qc(w,p,s+1/3),F=qc(w,p,s),y=qc(w,p,s-1/3);return Zn(g*255,F*255,y*255,f)},zp={hsl:Gh,hsla:Gh,rgb:jh,rgba:jh},xs=function(A,e){return ei.parse(A,n1.create(e).parseComponentValue())},_n={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Wp={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(t){if(Le(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Xp={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},jl=function(A,e){var t=ei.parse(A,e[0]),r=e[1];return r&&ft(r)?{color:t,stop:r}:{color:t,stop:null}},Vh=function(A,e){var t=A[0],r=A[A.length-1];t.stop===null&&(t.stop=Lt),r.stop===null&&(r.stop=Yn);for(var n=[],i=0,o=0;o<A.length;o++){var s=A[o].stop;if(s!==null){var l=Pe(s,e);l>i?n.push(l):n.push(i),i=l}else n.push(null)}for(var u=null,o=0;o<n.length;o++){var f=n[o];if(f===null)u===null&&(u=o);else if(u!==null){for(var p=o-u,w=n[u-1],g=(f-w)/(p+1),F=1;F<=p;F++)n[u+F-1]=g*F;u=null}}return A.map(function(y,S){var b=y.color;return{color:b,stop:Math.max(Math.min(1,n[S]/e),0)}})},Jp=function(A,e,t){var r=e/2,n=t/2,i=Pe(A[0],e)-r,o=n-Pe(A[1],t);return(Math.atan2(o,i)+Math.PI*2)%(Math.PI*2)},Yp=function(A,e,t){var r=typeof A=="number"?A:Jp(A,e,t),n=Math.abs(e*Math.sin(r))+Math.abs(t*Math.cos(r)),i=e/2,o=t/2,s=n/2,l=Math.sin(r-Math.PI/2)*s,u=Math.cos(r-Math.PI/2)*s;return[n,i-u,i+u,o-l,o+l]},Dr=function(A,e){return Math.sqrt(A*A+e*e)},qh=function(A,e,t,r,n){var i=[[0,0],[0,e],[A,0],[A,e]];return i.reduce(function(o,s){var l=s[0],u=s[1],f=Dr(t-l,r-u);return(n?f<o.optimumDistance:f>o.optimumDistance)?{optimumCorner:s,optimumDistance:f}:o},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Zp=function(A,e,t,r,n){var i=0,o=0;switch(A.size){case 0:A.shape===0?i=o=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===1&&(i=Math.min(Math.abs(e),Math.abs(e-r)),o=Math.min(Math.abs(t),Math.abs(t-n)));break;case 2:if(A.shape===0)i=o=Math.min(Dr(e,t),Dr(e,t-n),Dr(e-r,t),Dr(e-r,t-n));else if(A.shape===1){var s=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),l=qh(r,n,e,t,!0),u=l[0],f=l[1];i=Dr(u-e,(f-t)/s),o=s*i}break;case 1:A.shape===0?i=o=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===1&&(i=Math.max(Math.abs(e),Math.abs(e-r)),o=Math.max(Math.abs(t),Math.abs(t-n)));break;case 3:if(A.shape===0)i=o=Math.max(Dr(e,t),Dr(e,t-n),Dr(e-r,t),Dr(e-r,t-n));else if(A.shape===1){var s=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r)),p=qh(r,n,e,t,!1),u=p[0],f=p[1];i=Dr(u-e,(f-t)/s),o=s*i}break}return Array.isArray(A.size)&&(i=Pe(A.size[0],r),o=A.size.length===2?Pe(A.size[1],n):i),[i,o]},$p=function(A,e){var t=Fr(180),r=[];return rn(e).forEach(function(n,i){if(i===0){var o=n[0];if(o.type===20&&o.value==="to"){t=f1(n);return}else if(u1(o)){t=Kl.parse(A,o);return}}var s=jl(A,n);r.push(s)}),{angle:t,stops:r,type:1}},Jo=function(A,e){var t=Fr(180),r=[];return rn(e).forEach(function(n,i){if(i===0){var o=n[0];if(o.type===20&&["top","left","right","bottom"].indexOf(o.value)!==-1){t=f1(n);return}else if(u1(o)){t=(Kl.parse(A,o)+Fr(270))%Fr(360);return}}var s=jl(A,n);r.push(s)}),{angle:t,stops:r,type:1}},Aw=function(A,e){var t=Fr(180),r=[],n=1,i=0,o=3,s=[];return rn(e).forEach(function(l,u){var f=l[0];if(u===0){if(Le(f)&&f.value==="linear"){n=1;return}else if(Le(f)&&f.value==="radial"){n=2;return}}if(f.type===18){if(f.name==="from"){var p=ei.parse(A,f.values[0]);r.push({stop:Lt,color:p})}else if(f.name==="to"){var p=ei.parse(A,f.values[0]);r.push({stop:Yn,color:p})}else if(f.name==="color-stop"){var w=f.values.filter(Na);if(w.length===2){var p=ei.parse(A,w[1]),g=w[0];Oa(g)&&r.push({stop:{type:16,number:g.number*100,flags:g.flags},color:p})}}}}),n===1?{angle:(t+Fr(180))%Fr(360),stops:r,type:n}:{size:o,shape:i,stops:r,position:s,type:n}},h1="closest-side",d1="farthest-side",g1="closest-corner",B1="farthest-corner",p1="circle",w1="ellipse",v1="cover",m1="contain",ew=function(A,e){var t=0,r=3,n=[],i=[];return rn(e).forEach(function(o,s){var l=!0;if(s===0){var u=!1;l=o.reduce(function(p,w){if(u)if(Le(w))switch(w.value){case"center":return i.push(Cf),p;case"top":case"left":return i.push(Lt),p;case"right":case"bottom":return i.push(Yn),p}else(ft(w)||ai(w))&&i.push(w);else if(Le(w))switch(w.value){case p1:return t=0,!1;case w1:return t=1,!1;case"at":return u=!0,!1;case h1:return r=0,!1;case v1:case d1:return r=1,!1;case m1:case g1:return r=2,!1;case B1:return r=3,!1}else if(ai(w)||ft(w))return Array.isArray(r)||(r=[]),r.push(w),!1;return p},l)}if(l){var f=jl(A,o);n.push(f)}}),{size:r,shape:t,stops:n,position:i,type:2}},Yo=function(A,e){var t=0,r=3,n=[],i=[];return rn(e).forEach(function(o,s){var l=!0;if(s===0?l=o.reduce(function(f,p){if(Le(p))switch(p.value){case"center":return i.push(Cf),!1;case"top":case"left":return i.push(Lt),!1;case"right":case"bottom":return i.push(Yn),!1}else if(ft(p)||ai(p))return i.push(p),!1;return f},l):s===1&&(l=o.reduce(function(f,p){if(Le(p))switch(p.value){case p1:return t=0,!1;case w1:return t=1,!1;case m1:case h1:return r=0,!1;case d1:return r=1,!1;case g1:return r=2,!1;case v1:case B1:return r=3,!1}else if(ai(p)||ft(p))return Array.isArray(r)||(r=[]),r.push(p),!1;return f},l)),l){var u=jl(A,o);n.push(u)}}),{size:r,shape:t,stops:n,position:i,type:2}},tw=function(A){return A.type===1},rw=function(A){return A.type===2},bf={name:"image",parse:function(A,e){if(e.type===22){var t={url:e.value,type:0};return A.cache.addImage(e.value),t}if(e.type===18){var r=C1[e.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(A,e.values)}throw new Error("Unsupported image type "+e.type)}};function nw(A){return!(A.type===20&&A.value==="none")&&(A.type!==18||!!C1[A.name])}var C1={"linear-gradient":$p,"-moz-linear-gradient":Jo,"-ms-linear-gradient":Jo,"-o-linear-gradient":Jo,"-webkit-linear-gradient":Jo,"radial-gradient":ew,"-moz-radial-gradient":Yo,"-ms-radial-gradient":Yo,"-o-radial-gradient":Yo,"-webkit-radial-gradient":Yo,"-webkit-gradient":Aw},iw={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(function(r){return Na(r)&&nw(r)}).map(function(r){return bf.parse(A,r)})}},aw={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(t){if(Le(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},sw={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return rn(e).map(function(t){return t.filter(ft)}).map(a1)}},ow={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return rn(e).map(function(t){return t.filter(Le).map(function(r){return r.value}).join(" ")}).map(lw)}},lw=function(A){switch(A){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},xa;(function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"})(xa||(xa={}));var cw={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(A,e){return rn(e).map(function(t){return t.filter(uw)})}},uw=function(A){return Le(A)||ft(A)},Gl=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},fw=Gl("top"),hw=Gl("right"),dw=Gl("bottom"),gw=Gl("left"),Vl=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return a1(t.filter(ft))}}},Bw=Vl("top-left"),pw=Vl("top-right"),ww=Vl("bottom-right"),vw=Vl("bottom-left"),ql=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},mw=ql("top"),Cw=ql("right"),bw=ql("bottom"),Fw=ql("left"),zl=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Ws(t)?t.number:0}}},Qw=zl("top"),yw=zl("right"),Uw=zl("bottom"),_w=zl("left"),xw={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ew={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},Lw={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(Le).reduce(function(t,r){return t|Iw(r.value)},0)}},Iw=function(A){switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Sw={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Hw={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(A,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},Ul;(function(A){A.NORMAL="normal",A.STRICT="strict"})(Ul||(Ul={}));var Nw={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"strict":return Ul.STRICT;case"normal":default:return Ul.NORMAL}}},Dw={name:"line-height",initialValue:"normal",prefix:!1,type:4},zh=function(A,e){return Le(A)&&A.value==="normal"?1.2*e:A.type===17?e*A.number:ft(A)?Pe(A,e):e},kw={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(A,e){return e.type===20&&e.value==="none"?null:bf.parse(A,e)}},Tw={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},zu={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Wl=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}},Ow=Wl("top"),Pw=Wl("right"),Mw=Wl("bottom"),Rw=Wl("left"),Kw={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(Le).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},jw={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},Xl=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Gw=Xl("top"),Vw=Xl("right"),qw=Xl("bottom"),zw=Xl("left"),Ww={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(A,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Xw={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(A,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Jw={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.length===1&&qu(e[0],"none")?[]:rn(e).map(function(t){for(var r={color:_n.TRANSPARENT,offsetX:Lt,offsetY:Lt,blur:Lt},n=0,i=0;i<t.length;i++){var o=t[i];ai(o)?(n===0?r.offsetX=o:n===1?r.offsetY=o:r.blur=o,n++):r.color=ei.parse(A,o)}return r})}},Yw={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Zw={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(A,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var t=e5[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},$w=function(A){var e=A.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},A5=function(A){var e=A.filter(function(l){return l.type===17}).map(function(l){return l.number}),t=e[0],r=e[1];e[2],e[3];var n=e[4],i=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var o=e[12],s=e[13];return e[14],e[15],e.length===16?[t,r,n,i,o,s]:null},e5={matrix:$w,matrix3d:A5},Wh={type:16,number:50,flags:zs},t5=[Wh,Wh],r5={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(A,e){var t=e.filter(ft);return t.length!==2?t5:[t[0],t[1]]}},n5={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Es;(function(A){A.NORMAL="normal",A.BREAK_ALL="break-all",A.KEEP_ALL="keep-all"})(Es||(Es={}));var i5={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-all":return Es.BREAK_ALL;case"keep-all":return Es.KEEP_ALL;case"normal":default:return Es.NORMAL}}},a5={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(A,e){if(e.type===20)return{auto:!0,order:0};if(Oa(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},b1={name:"time",parse:function(A,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},s5={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(A,e){return Oa(e)?e.number:1}},o5={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},l5={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(A,e){return e.filter(Le).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},c5={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(A,e){var t=[],r=[];return e.forEach(function(n){switch(n.type){case 20:case 0:t.push(n.value);break;case 17:t.push(n.number.toString());break;case 4:r.push(t.join(" ")),t.length=0;break}}),t.length&&r.push(t.join(" ")),r.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},u5={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},f5={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(A,e){if(Oa(e))return e.number;if(Le(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},h5={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.filter(Le).map(function(t){return t.value})}},d5={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},wt=function(A,e){return(A&e)!==0},g5={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e}},B5={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;for(var r=[],n=e.filter(i1),i=0;i<n.length;i++){var o=n[i],s=n[i+1];if(o.type===20){var l=s&&Oa(s)?s.number:1;r.push({counter:o.value,increment:l})}}return r}},p5={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(e.length===0)return[];for(var t=[],r=e.filter(i1),n=0;n<r.length;n++){var i=r[n],o=r[n+1];if(Le(i)&&i.value!=="none"){var s=o&&Oa(o)?o.number:0;t.push({counter:i.value,reset:s})}}return t}},w5={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(A,e){return e.filter(Ws).map(function(t){return b1.parse(A,t)})}},v5={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;var r=[],n=e.filter(Vp);if(n.length%2!==0)return null;for(var i=0;i<n.length;i+=2){var o=n[i].value,s=n[i+1].value;r.push({open:o,close:s})}return r}},Xh=function(A,e,t){if(!A)return"";var r=A[Math.min(e,A.length-1)];return r?t?r.open:r.close:""},m5={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.length===1&&qu(e[0],"none")?[]:rn(e).map(function(t){for(var r={color:255,offsetX:Lt,offsetY:Lt,blur:Lt,spread:Lt,inset:!1},n=0,i=0;i<t.length;i++){var o=t[i];qu(o,"inset")?r.inset=!0:ai(o)?(n===0?r.offsetX=o:n===1?r.offsetY=o:n===2?r.blur=o:r.spread=o,n++):r.color=ei.parse(A,o)}return r})}},C5={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(A,e){var t=[0,1,2],r=[];return e.filter(Le).forEach(function(n){switch(n.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),t.forEach(function(n){r.indexOf(n)===-1&&r.push(n)}),r}},b5={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},F5={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return Ws(e)?e.number:0}},Q5=function(){function A(e,t){var r,n;this.animationDuration=LA(e,w5,t.animationDuration),this.backgroundClip=LA(e,Wp,t.backgroundClip),this.backgroundColor=LA(e,Xp,t.backgroundColor),this.backgroundImage=LA(e,iw,t.backgroundImage),this.backgroundOrigin=LA(e,aw,t.backgroundOrigin),this.backgroundPosition=LA(e,sw,t.backgroundPosition),this.backgroundRepeat=LA(e,ow,t.backgroundRepeat),this.backgroundSize=LA(e,cw,t.backgroundSize),this.borderTopColor=LA(e,fw,t.borderTopColor),this.borderRightColor=LA(e,hw,t.borderRightColor),this.borderBottomColor=LA(e,dw,t.borderBottomColor),this.borderLeftColor=LA(e,gw,t.borderLeftColor),this.borderTopLeftRadius=LA(e,Bw,t.borderTopLeftRadius),this.borderTopRightRadius=LA(e,pw,t.borderTopRightRadius),this.borderBottomRightRadius=LA(e,ww,t.borderBottomRightRadius),this.borderBottomLeftRadius=LA(e,vw,t.borderBottomLeftRadius),this.borderTopStyle=LA(e,mw,t.borderTopStyle),this.borderRightStyle=LA(e,Cw,t.borderRightStyle),this.borderBottomStyle=LA(e,bw,t.borderBottomStyle),this.borderLeftStyle=LA(e,Fw,t.borderLeftStyle),this.borderTopWidth=LA(e,Qw,t.borderTopWidth),this.borderRightWidth=LA(e,yw,t.borderRightWidth),this.borderBottomWidth=LA(e,Uw,t.borderBottomWidth),this.borderLeftWidth=LA(e,_w,t.borderLeftWidth),this.boxShadow=LA(e,m5,t.boxShadow),this.color=LA(e,xw,t.color),this.direction=LA(e,Ew,t.direction),this.display=LA(e,Lw,t.display),this.float=LA(e,Sw,t.cssFloat),this.fontFamily=LA(e,c5,t.fontFamily),this.fontSize=LA(e,u5,t.fontSize),this.fontStyle=LA(e,d5,t.fontStyle),this.fontVariant=LA(e,h5,t.fontVariant),this.fontWeight=LA(e,f5,t.fontWeight),this.letterSpacing=LA(e,Hw,t.letterSpacing),this.lineBreak=LA(e,Nw,t.lineBreak),this.lineHeight=LA(e,Dw,t.lineHeight),this.listStyleImage=LA(e,kw,t.listStyleImage),this.listStylePosition=LA(e,Tw,t.listStylePosition),this.listStyleType=LA(e,zu,t.listStyleType),this.marginTop=LA(e,Ow,t.marginTop),this.marginRight=LA(e,Pw,t.marginRight),this.marginBottom=LA(e,Mw,t.marginBottom),this.marginLeft=LA(e,Rw,t.marginLeft),this.opacity=LA(e,s5,t.opacity);var i=LA(e,Kw,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=LA(e,jw,t.overflowWrap),this.paddingTop=LA(e,Gw,t.paddingTop),this.paddingRight=LA(e,Vw,t.paddingRight),this.paddingBottom=LA(e,qw,t.paddingBottom),this.paddingLeft=LA(e,zw,t.paddingLeft),this.paintOrder=LA(e,C5,t.paintOrder),this.position=LA(e,Xw,t.position),this.textAlign=LA(e,Ww,t.textAlign),this.textDecorationColor=LA(e,o5,(r=t.textDecorationColor)!==null&&r!==void 0?r:t.color),this.textDecorationLine=LA(e,l5,(n=t.textDecorationLine)!==null&&n!==void 0?n:t.textDecoration),this.textShadow=LA(e,Jw,t.textShadow),this.textTransform=LA(e,Yw,t.textTransform),this.transform=LA(e,Zw,t.transform),this.transformOrigin=LA(e,r5,t.transformOrigin),this.visibility=LA(e,n5,t.visibility),this.webkitTextStrokeColor=LA(e,b5,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=LA(e,F5,t.webkitTextStrokeWidth),this.wordBreak=LA(e,i5,t.wordBreak),this.zIndex=LA(e,a5,t.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},A.prototype.isTransparent=function(){return ti(this.backgroundColor)},A.prototype.isTransformed=function(){return this.transform!==null},A.prototype.isPositioned=function(){return this.position!==0},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this.float!==0},A.prototype.isInlineLevel=function(){return wt(this.display,4)||wt(this.display,33554432)||wt(this.display,268435456)||wt(this.display,536870912)||wt(this.display,67108864)||wt(this.display,134217728)},A}(),y5=function(){function A(e,t){this.content=LA(e,g5,t.content),this.quotes=LA(e,v5,t.quotes)}return A}(),Jh=function(){function A(e,t){this.counterIncrement=LA(e,B5,t.counterIncrement),this.counterReset=LA(e,p5,t.counterReset)}return A}(),LA=function(A,e,t){var r=new r1,n=t!==null&&typeof t<"u"?t.toString():e.initialValue;r.write(n);var i=new n1(r.read());switch(e.type){case 2:var o=i.parseComponentValue();return e.parse(A,Le(o)?o.value:e.initialValue);case 0:return e.parse(A,i.parseComponentValue());case 1:return e.parse(A,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(e.format){case"angle":return Kl.parse(A,i.parseComponentValue());case"color":return ei.parse(A,i.parseComponentValue());case"image":return bf.parse(A,i.parseComponentValue());case"length":var s=i.parseComponentValue();return ai(s)?s:Lt;case"length-percentage":var l=i.parseComponentValue();return ft(l)?l:Lt;case"time":return b1.parse(A,i.parseComponentValue())}break}},U5="data-html2canvas-debug",_5=function(A){var e=A.getAttribute(U5);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Wu=function(A,e){var t=_5(A);return t===1||e===t},nn=function(){function A(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Wu(t,3))debugger;this.styles=new Q5(e,window.getComputedStyle(t,null)),Yu(t)&&(this.styles.animationDuration.some(function(r){return r>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Ml(this.context,t),Wu(t,4)&&(this.flags|=16)}return A}(),x5=" ",Yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Zo=0;Zo<Yh.length;Zo++)Fs[Yh.charCodeAt(Zo)]=Zo;var E5=function(A){var e=A.length*.75,t=A.length,r,n=0,i,o,s,l;A[A.length-1]==="="&&(e--,A[A.length-2]==="="&&e--);var u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),f=Array.isArray(u)?u:new Uint8Array(u);for(r=0;r<t;r+=4)i=Fs[A.charCodeAt(r)],o=Fs[A.charCodeAt(r+1)],s=Fs[A.charCodeAt(r+2)],l=Fs[A.charCodeAt(r+3)],f[n++]=i<<2|o>>4,f[n++]=(o&15)<<4|s>>2,f[n++]=(s&3)<<6|l&63;return u},L5=function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t},I5=function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t},ki=5,Ff=6+5,zc=2,S5=Ff-ki,F1=65536>>ki,H5=1<<ki,Wc=H5-1,N5=1024>>ki,D5=F1+N5,k5=D5,T5=32,O5=k5+T5,P5=65536>>Ff,M5=1<<S5,R5=M5-1,Zh=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},K5=function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))},j5=function(A,e){var t=E5(A),r=Array.isArray(t)?I5(t):new Uint32Array(t),n=Array.isArray(t)?L5(t):new Uint16Array(t),i=24,o=Zh(n,i/2,r[4]/2),s=r[5]===2?Zh(n,(i+r[4])/2):K5(r,Math.ceil((i+r[4])/4));return new G5(r[0],r[1],r[2],r[3],o,s)},G5=function(){function A(e,t,r,n,i,o){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=n,this.index=i,this.data=o}return A.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>ki],t=(t<<zc)+(e&Wc),this.data[t];if(e<=65535)return t=this.index[F1+(e-55296>>ki)],t=(t<<zc)+(e&Wc),this.data[t];if(e<this.highStart)return t=O5-P5+(e>>Ff),t=this.index[t],t+=e>>ki&R5,t=this.index[t],t=(t<<zc)+(e&Wc),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),$h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",V5=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $o=0;$o<$h.length;$o++)V5[$h.charCodeAt($o)]=$o;var q5=1,Xc=2,Jc=3,A0=4,e0=5,z5=7,t0=8,Yc=9,Zc=10,r0=11,n0=12,i0=13,a0=14,$c=15,W5=function(A){for(var e=[],t=0,r=A.length;t<r;){var n=A.charCodeAt(t++);if(n>=55296&&n<=56319&&t<r){var i=A.charCodeAt(t++);(i&64512)===56320?e.push(((n&1023)<<10)+(i&1023)+65536):(e.push(n),t--)}else e.push(n)}return e},X5=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],n=-1,i="";++n<t;){var o=A[n];o<=65535?r.push(o):(o-=65536,r.push((o>>10)+55296,o%1024+56320)),(n+1===t||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},J5=j5(x5),mr="×",Au="÷",Y5=function(A){return J5.get(A)},Z5=function(A,e,t){var r=t-2,n=e[r],i=e[t-1],o=e[t];if(i===Xc&&o===Jc)return mr;if(i===Xc||i===Jc||i===A0||o===Xc||o===Jc||o===A0)return Au;if(i===t0&&[t0,Yc,r0,n0].indexOf(o)!==-1||(i===r0||i===Yc)&&(o===Yc||o===Zc)||(i===n0||i===Zc)&&o===Zc||o===i0||o===e0||o===z5||i===q5)return mr;if(i===i0&&o===a0){for(;n===e0;)n=e[--r];if(n===a0)return mr}if(i===$c&&o===$c){for(var s=0;n===$c;)s++,n=e[--r];if(s%2===0)return mr}return Au},$5=function(A){var e=W5(A),t=e.length,r=0,n=0,i=e.map(Y5);return{next:function(){if(r>=t)return{done:!0,value:null};for(var o=mr;r<t&&(o=Z5(e,i,++r))===mr;);if(o!==mr||r===t){var s=X5.apply(null,e.slice(n,r));return n=r,{value:s,done:!1}}return{done:!0,value:null}}}},Av=function(A){for(var e=$5(A),t=[],r;!(r=e.next()).done;)r.value&&t.push(r.value.slice());return t},ev=function(A){var e=123;if(A.createRange){var t=A.createRange();if(t.getBoundingClientRect){var r=A.createElement("boundtest");r.style.height=e+"px",r.style.display="block",A.body.appendChild(r),t.selectNode(r);var n=t.getBoundingClientRect(),i=Math.round(n.height);if(A.body.removeChild(r),i===e)return!0}}return!1},tv=function(A){var e=A.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",A.body.appendChild(e);var t=A.createRange();e.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var r=e.firstChild,n=Rl(r.data).map(function(l){return it(l)}),i=0,o={},s=n.every(function(l,u){t.setStart(r,i),t.setEnd(r,i+l.length);var f=t.getBoundingClientRect();i+=l.length;var p=f.x>o.x||f.y>o.y;return o=f,u===0?!0:p});return A.body.removeChild(e),s},rv=function(){return typeof new Image().crossOrigin<"u"},nv=function(){return typeof new XMLHttpRequest().responseType=="string"},iv=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},s0=function(A){return A[0]===0&&A[1]===255&&A[2]===0&&A[3]===255},av=function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var n=new Image,i=e.toDataURL();n.src=i;var o=Xu(t,t,0,0,n);return r.fillStyle="red",r.fillRect(0,0,t,t),o0(o).then(function(s){r.drawImage(s,0,0);var l=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var u=A.createElement("div");return u.style.backgroundImage="url("+i+")",u.style.height=t+"px",s0(l)?o0(Xu(t,t,0,0,u)):Promise.reject(!1)}).then(function(s){return r.drawImage(s,0,0),s0(r.getImageData(0,0,t,t).data)}).catch(function(){return!1})},Xu=function(A,e,t,r,n){var i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),s=document.createElementNS(i,"foreignObject");return o.setAttributeNS(null,"width",A.toString()),o.setAttributeNS(null,"height",e.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",t.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(n),o},o0=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(A))})},Et={get SUPPORT_RANGE_BOUNDS(){var A=ev(document);return Object.defineProperty(Et,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){var A=Et.SUPPORT_RANGE_BOUNDS&&tv(document);return Object.defineProperty(Et,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=iv(document);return Object.defineProperty(Et,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A=typeof Array.from=="function"&&typeof window.fetch=="function"?av(document):Promise.resolve(!1);return Object.defineProperty(Et,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=rv();return Object.defineProperty(Et,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=nv();return Object.defineProperty(Et,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Et,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Et,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},Ls=function(){function A(e,t){this.text=e,this.bounds=t}return A}(),sv=function(A,e,t,r){var n=cv(e,t),i=[],o=0;return n.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(Et.SUPPORT_RANGE_BOUNDS){var l=l0(r,o,s.length).getClientRects();if(l.length>1){var u=Qf(s),f=0;u.forEach(function(w){i.push(new Ls(w,xn.fromDOMRectList(A,l0(r,f+o,w.length).getClientRects()))),f+=w.length})}else i.push(new Ls(s,xn.fromDOMRectList(A,l)))}else{var p=r.splitText(s.length);i.push(new Ls(s,ov(A,r))),r=p}else Et.SUPPORT_RANGE_BOUNDS||(r=r.splitText(s.length));o+=s.length}),i},ov=function(A,e){var t=e.ownerDocument;if(t){var r=t.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var n=e.parentNode;if(n){n.replaceChild(r,e);var i=Ml(A,r);return r.firstChild&&n.replaceChild(r.firstChild,r),i}}return xn.EMPTY},l0=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(A,e),n.setEnd(A,e+t),n},Qf=function(A){if(Et.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map(function(t){return t.segment})}return Av(A)},lv=function(A,e){if(Et.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map(function(r){return r.segment})}return fv(A,e)},cv=function(A,e){return e.letterSpacing!==0?Qf(A):lv(A,e)},uv=[32,160,4961,65792,65793,4153,4241],fv=function(A,e){for(var t=P2(A,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),r=[],n,i=function(){if(n.value){var o=n.value.slice(),s=Rl(o),l="";s.forEach(function(u){uv.indexOf(u)===-1?l+=it(u):(l.length&&r.push(l),r.push(it(u)),l="")}),l.length&&r.push(l)}};!(n=t.next()).done;)i();return r},hv=function(){function A(e,t,r){this.text=dv(t.data,r.textTransform),this.textBounds=sv(e,this.text,r,t)}return A}(),dv=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(gv,Bv);case 2:return A.toUpperCase();default:return A}},gv=/(^|\s|:|-|\(|\))([a-z])/g,Bv=function(A,e,t){return A.length>0?e+t.toUpperCase():A},Q1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.src=r.currentSrc||r.src,n.intrinsicWidth=r.naturalWidth,n.intrinsicHeight=r.naturalHeight,n.context.cache.addImage(n.src),n}return e}(nn),y1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.canvas=r,n.intrinsicWidth=r.width,n.intrinsicHeight=r.height,n}return e}(nn),U1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this,i=new XMLSerializer,o=Ml(t,r);return r.setAttribute("width",o.width+"px"),r.setAttribute("height",o.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(r)),n.intrinsicWidth=r.width.baseVal.value,n.intrinsicHeight=r.height.baseVal.value,n.context.cache.addImage(n.svg),n}return e}(nn),_1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.value=r.value,n}return e}(nn),Ju=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.start=r.start,n.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,n}return e}(nn),pv=[{type:15,flags:0,unit:"px",number:3}],wv=[{type:16,flags:0,number:50}],vv=function(A){return A.width>A.height?new xn(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width<A.height?new xn(A.left,A.top+(A.height-A.width)/2,A.width,A.width):A},mv=function(A){var e=A.type===Cv?new Array(A.value.length+1).join("•"):A.value;return e.length===0?A.placeholder||"":e},_l="checkbox",xl="radio",Cv="password",c0=707406591,yf=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;switch(n.type=r.type.toLowerCase(),n.checked=r.checked,n.value=mv(r),(n.type===_l||n.type===xl)&&(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=vv(n.bounds)),n.type){case _l:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=pv;break;case xl:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=wv;break}return n}return e}(nn),x1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this,i=r.options[r.selectedIndex||0];return n.value=i&&i.text||"",n}return e}(nn),E1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.value=r.value,n}return e}(nn),L1=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;n.src=r.src,n.width=parseInt(r.width,10)||0,n.height=parseInt(r.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){n.tree=S1(t,r.contentWindow.document.documentElement);var i=r.contentWindow.document.documentElement?xs(t,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):_n.TRANSPARENT,o=r.contentWindow.document.body?xs(t,getComputedStyle(r.contentWindow.document.body).backgroundColor):_n.TRANSPARENT;n.backgroundColor=ti(i)?ti(o)?n.styles.backgroundColor:o:i}}catch{}return n}return e}(nn),bv=["OL","UL","MENU"],gl=function(A,e,t,r){for(var n=e.firstChild,i=void 0;n;n=i)if(i=n.nextSibling,H1(n)&&n.data.trim().length>0)t.textNodes.push(new hv(A,n,t.styles));else if(Ua(n))if(T1(n)&&n.assignedNodes)n.assignedNodes().forEach(function(s){return gl(A,s,t,r)});else{var o=I1(A,n);o.styles.isVisible()&&(Fv(n,o,r)?o.flags|=4:Qv(o.styles)&&(o.flags|=2),bv.indexOf(n.tagName)!==-1&&(o.flags|=8),t.elements.push(o),n.slot,n.shadowRoot?gl(A,n.shadowRoot,o,r):!El(n)&&!N1(n)&&!Ll(n)&&gl(A,n,o,r))}},I1=function(A,e){return Zu(e)?new Q1(A,e):D1(e)?new y1(A,e):N1(e)?new U1(A,e):yv(e)?new _1(A,e):Uv(e)?new Ju(A,e):_v(e)?new yf(A,e):Ll(e)?new x1(A,e):El(e)?new E1(A,e):k1(e)?new L1(A,e):new nn(A,e)},S1=function(A,e){var t=I1(A,e);return t.flags|=4,gl(A,e,t,t),t},Fv=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Uf(A)&&t.styles.isTransparent()},Qv=function(A){return A.isPositioned()||A.isFloating()},H1=function(A){return A.nodeType===Node.TEXT_NODE},Ua=function(A){return A.nodeType===Node.ELEMENT_NODE},Yu=function(A){return Ua(A)&&typeof A.style<"u"&&!Bl(A)},Bl=function(A){return typeof A.className=="object"},yv=function(A){return A.tagName==="LI"},Uv=function(A){return A.tagName==="OL"},_v=function(A){return A.tagName==="INPUT"},xv=function(A){return A.tagName==="HTML"},N1=function(A){return A.tagName==="svg"},Uf=function(A){return A.tagName==="BODY"},D1=function(A){return A.tagName==="CANVAS"},u0=function(A){return A.tagName==="VIDEO"},Zu=function(A){return A.tagName==="IMG"},k1=function(A){return A.tagName==="IFRAME"},f0=function(A){return A.tagName==="STYLE"},Ev=function(A){return A.tagName==="SCRIPT"},El=function(A){return A.tagName==="TEXTAREA"},Ll=function(A){return A.tagName==="SELECT"},T1=function(A){return A.tagName==="SLOT"},h0=function(A){return A.tagName.indexOf("-")>0},Lv=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},A.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},A.prototype.pop=function(e){var t=this;e.forEach(function(r){return t.counters[r].pop()})},A.prototype.parse=function(e){var t=this,r=e.counterIncrement,n=e.counterReset,i=!0;r!==null&&r.forEach(function(s){var l=t.counters[s.counter];l&&s.increment!==0&&(i=!1,l.length||l.push(1),l[Math.max(0,l.length-1)]+=s.increment)});var o=[];return i&&n.forEach(function(s){var l=t.counters[s.counter];o.push(s.counter),l||(l=t.counters[s.counter]=[]),l.push(s.reset)}),o},A}(),d0={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},g0={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Iv={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Sv={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ga=function(A,e,t,r,n,i){return A<e||A>t?Os(A,n,i.length>0):r.integers.reduce(function(o,s,l){for(;A>=s;)A-=s,o+=r.values[l];return o},"")+i},O1=function(A,e,t,r){var n="";do t||A--,n=r(A)+n,A/=e;while(A*e>=e);return n},nt=function(A,e,t,r,n){var i=t-e+1;return(A<0?"-":"")+(O1(Math.abs(A),i,r,function(o){return it(Math.floor(o%i)+e)})+n)},_i=function(A,e,t){t===void 0&&(t=". ");var r=e.length;return O1(Math.abs(A),r,!1,function(n){return e[Math.floor(n%r)]})+t},ba=1,qn=2,zn=4,Qs=8,bn=function(A,e,t,r,n,i){if(A<-9999||A>9999)return Os(A,4,n.length>0);var o=Math.abs(A),s=n;if(o===0)return e[0]+s;for(var l=0;o>0&&l<=4;l++){var u=o%10;u===0&&wt(i,ba)&&s!==""?s=e[u]+s:u>1||u===1&&l===0||u===1&&l===1&&wt(i,qn)||u===1&&l===1&&wt(i,zn)&&A>100||u===1&&l>1&&wt(i,Qs)?s=e[u]+(l>0?t[l-1]:"")+s:u===1&&l>0&&(s=t[l-1]+s),o=Math.floor(o/10)}return(A<0?r:"")+s},B0="十百千萬",p0="拾佰仟萬",w0="マイナス",eu="마이너스",Os=function(A,e,t){var r=t?". ":"",n=t?"、":"",i=t?", ":"",o=t?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=nt(A,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return _i(A,"〇一二三四五六七八九",n);case 6:return ga(A,1,3999,d0,3,r).toLowerCase();case 7:return ga(A,1,3999,d0,3,r);case 8:return nt(A,945,969,!1,r);case 9:return nt(A,97,122,!1,r);case 10:return nt(A,65,90,!1,r);case 11:return nt(A,1632,1641,!0,r);case 12:case 49:return ga(A,1,9999,g0,3,r);case 35:return ga(A,1,9999,g0,3,r).toLowerCase();case 13:return nt(A,2534,2543,!0,r);case 14:case 30:return nt(A,6112,6121,!0,r);case 15:return _i(A,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return _i(A,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return bn(A,"零一二三四五六七八九",B0,"負",n,qn|zn|Qs);case 47:return bn(A,"零壹貳參肆伍陸柒捌玖",p0,"負",n,ba|qn|zn|Qs);case 42:return bn(A,"零一二三四五六七八九",B0,"负",n,qn|zn|Qs);case 41:return bn(A,"零壹贰叁肆伍陆柒捌玖",p0,"负",n,ba|qn|zn|Qs);case 26:return bn(A,"〇一二三四五六七八九","十百千万",w0,n,0);case 25:return bn(A,"零壱弐参四伍六七八九","拾百千万",w0,n,ba|qn|zn);case 31:return bn(A,"영일이삼사오육칠팔구","십백천만",eu,i,ba|qn|zn);case 33:return bn(A,"零一二三四五六七八九","十百千萬",eu,i,0);case 32:return bn(A,"零壹貳參四五六七八九","拾百千",eu,i,ba|qn|zn);case 18:return nt(A,2406,2415,!0,r);case 20:return ga(A,1,19999,Sv,3,r);case 21:return nt(A,2790,2799,!0,r);case 22:return nt(A,2662,2671,!0,r);case 22:return ga(A,1,10999,Iv,3,r);case 23:return _i(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return _i(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return nt(A,3302,3311,!0,r);case 28:return _i(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return _i(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return nt(A,3792,3801,!0,r);case 37:return nt(A,6160,6169,!0,r);case 38:return nt(A,4160,4169,!0,r);case 39:return nt(A,2918,2927,!0,r);case 40:return nt(A,1776,1785,!0,r);case 43:return nt(A,3046,3055,!0,r);case 44:return nt(A,3174,3183,!0,r);case 45:return nt(A,3664,3673,!0,r);case 46:return nt(A,3872,3881,!0,r);case 3:default:return nt(A,48,57,!0,r)}},P1="data-html2canvas-ignore",v0=function(){function A(e,t,r){if(this.context=e,this.options=r,this.scrolledElements=[],this.referenceElement=t,this.counters=new Lv,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return A.prototype.toIFrame=function(e,t){var r=this,n=Hv(e,t);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var i=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,s=n.contentWindow,l=s.document,u=kv(n).then(function(){return zt(r,void 0,void 0,function(){var f,p;return Mt(this,function(w){switch(w.label){case 0:return this.scrolledElements.forEach(Mv),s&&(s.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(s.scrollY!==t.top||s.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-t.left,s.scrollY-t.top,0,0))),f=this.options.onclone,p=this.clonedReferenceElement,typeof p>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:w.sent(),w.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Dv(l)]:[3,4];case 3:w.sent(),w.label=4;case 4:return typeof f=="function"?[2,Promise.resolve().then(function(){return f(l,p)}).then(function(){return n})]:[2,n]}})})});return l.open(),l.write(Ov(document.doctype)+"<html></html>"),Pv(this.referenceElement.ownerDocument,i,o),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},A.prototype.createElementClone=function(e){if(Wu(e,2))debugger;if(D1(e))return this.createCanvasClone(e);if(u0(e))return this.createVideoClone(e);if(f0(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Zu(t)&&(Zu(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),h0(t)?this.createCustomElementClone(t):t},A.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return tu(e.style,t),t},A.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var r=[].slice.call(t.cssRules,0).reduce(function(i,o){return o&&typeof o.cssText=="string"?i+o.cssText:i},""),n=e.cloneNode(!1);return n.textContent=r,n}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return e.cloneNode(!1)},A.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var r=e.ownerDocument.createElement("img");try{return r.src=e.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var i=e.getContext("2d"),o=n.getContext("2d");if(o)if(!this.options.allowTaint&&i)o.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var s=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(s){var l=s.getContextAttributes();(l==null?void 0:l.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},A.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var r=t.getContext("2d");try{return r&&(r.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||r.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},A.prototype.appendChildNode=function(e,t,r){(!Ua(t)||!Ev(t)&&!t.hasAttribute(P1)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!Ua(t)||!f0(t))&&e.appendChild(this.cloneNode(t,r))},A.prototype.cloneChildNodes=function(e,t,r){for(var n=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(Ua(i)&&T1(i)&&typeof i.assignedNodes=="function"){var o=i.assignedNodes();o.length&&o.forEach(function(s){return n.appendChildNode(t,s,r)})}else this.appendChildNode(t,i,r)},A.prototype.cloneNode=function(e,t){if(H1(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var r=e.ownerDocument.defaultView;if(r&&Ua(e)&&(Yu(e)||Bl(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var i=r.getComputedStyle(e),o=r.getComputedStyle(e,":before"),s=r.getComputedStyle(e,":after");this.referenceElement===e&&Yu(n)&&(this.clonedReferenceElement=n),Uf(n)&&jv(n);var l=this.counters.parse(new Jh(this.context,i)),u=this.resolvePseudoContent(e,n,o,Is.BEFORE);h0(e)&&(t=!0),u0(e)||this.cloneChildNodes(e,n,t),u&&n.insertBefore(u,n.firstChild);var f=this.resolvePseudoContent(e,n,s,Is.AFTER);return f&&n.appendChild(f),this.counters.pop(l),(i&&(this.options.copyStyles||Bl(e))&&!k1(e)||t)&&tu(i,n),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(El(e)||Ll(e))&&(El(n)||Ll(n))&&(n.value=e.value),n}return e.cloneNode(!1)},A.prototype.resolvePseudoContent=function(e,t,r,n){var i=this;if(r){var o=r.content,s=t.ownerDocument;if(!(!s||!o||o==="none"||o==="-moz-alt-content"||r.display==="none")){this.counters.parse(new Jh(this.context,r));var l=new y5(this.context,r),u=s.createElement("html2canvaspseudoelement");tu(r,u),l.content.forEach(function(p){if(p.type===0)u.appendChild(s.createTextNode(p.value));else if(p.type===22){var w=s.createElement("img");w.src=p.value,w.style.opacity="1",u.appendChild(w)}else if(p.type===18){if(p.name==="attr"){var g=p.values.filter(Le);g.length&&u.appendChild(s.createTextNode(e.getAttribute(g[0].value)||""))}else if(p.name==="counter"){var F=p.values.filter(Na),y=F[0],S=F[1];if(y&&Le(y)){var b=i.counters.getCounterValue(y.value),P=S&&Le(S)?zu.parse(i.context,S.value):3;u.appendChild(s.createTextNode(Os(b,P,!1)))}}else if(p.name==="counters"){var G=p.values.filter(Na),y=G[0],O=G[1],S=G[2];if(y&&Le(y)){var J=i.counters.getCounterValues(y.value),Z=S&&Le(S)?zu.parse(i.context,S.value):3,nA=O&&O.type===0?O.value:"",q=J.map(function(_){return Os(_,Z,!1)}).join(nA);u.appendChild(s.createTextNode(q))}}}else if(p.type===20)switch(p.value){case"open-quote":u.appendChild(s.createTextNode(Xh(l.quotes,i.quoteDepth++,!0)));break;case"close-quote":u.appendChild(s.createTextNode(Xh(l.quotes,--i.quoteDepth,!1)));break;default:u.appendChild(s.createTextNode(p.value))}}),u.className=$u+" "+Af;var f=n===Is.BEFORE?" "+$u:" "+Af;return Bl(t)?t.className.baseValue+=f:t.className+=f,u}}},A.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},A}(),Is;(function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"})(Is||(Is={}));var Hv=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(P1,"true"),A.body.appendChild(t),t},Nv=function(A){return new Promise(function(e){if(A.complete){e();return}if(!A.src){e();return}A.onload=e,A.onerror=e})},Dv=function(A){return Promise.all([].slice.call(A.images,0).map(Nv))},kv=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var n=r.document;r.onload=A.onload=function(){r.onload=A.onload=null;var i=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(i),e(A))},50)}})},Tv=["all","d","content"],tu=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);Tv.indexOf(r)===-1&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Ov=function(A){var e="";return A&&(e+="<!DOCTYPE ",A.name&&(e+=A.name),A.internalSubset&&(e+=A.internalSubset),A.publicId&&(e+='"'+A.publicId+'"'),A.systemId&&(e+='"'+A.systemId+'"'),e+=">"),e},Pv=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},Mv=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},Rv=":before",Kv=":after",$u="___html2canvas___pseudoelement_before",Af="___html2canvas___pseudoelement_after",m0=`{
    content: "" !important;
    display: none !important;
}`,jv=function(A){Gv(A,"."+$u+Rv+m0+`
         .`+Af+Kv+m0)},Gv=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},M1=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),Vv=function(){function A(e,t){this.context=e,this._options=t,this._cache={}}return A.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(nu(e)||Xv(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},A.prototype.match=function(e){return this._cache[e]},A.prototype.loadImage=function(e){return zt(this,void 0,void 0,function(){var t,r,n,i,o=this;return Mt(this,function(s){switch(s.label){case 0:return t=M1.isSameOrigin(e),r=!ru(e)&&this._options.useCORS===!0&&Et.SUPPORT_CORS_IMAGES&&!t,n=!ru(e)&&!t&&!nu(e)&&typeof this._options.proxy=="string"&&Et.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!ru(e)&&!nu(e)&&!n&&!r?[2]:(i=e,n?[4,this.proxy(i)]:[3,2]);case 1:i=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(l,u){var f=new Image;f.onload=function(){return l(f)},f.onerror=u,(Jv(i)||r)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return l(f)},500),o._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},A.prototype.has=function(e){return typeof this._cache[e]<"u"},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,o){var s=Et.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(s==="text")i(l.response);else{var p=new FileReader;p.addEventListener("load",function(){return i(p.result)},!1),p.addEventListener("error",function(w){return o(w)},!1),p.readAsDataURL(l.response)}else o("Failed to proxy resource "+n+" with status code "+l.status)},l.onerror=o;var u=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+u+"url="+encodeURIComponent(e)+"&responseType="+s),s!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=s),t._options.imageTimeout){var f=t._options.imageTimeout;l.timeout=f,l.ontimeout=function(){return o("Timed out ("+f+"ms) proxying "+n)}}l.send()})},A}(),qv=/^data:image\/svg\+xml/i,zv=/^data:image\/.*;base64,/i,Wv=/^data:image\/.*/i,Xv=function(A){return Et.SUPPORT_SVG_DRAWING||!Yv(A)},ru=function(A){return Wv.test(A)},Jv=function(A){return zv.test(A)},nu=function(A){return A.substr(0,4)==="blob"},Yv=function(A){return A.substr(-3).toLowerCase()==="svg"||qv.test(A)},EA=function(){function A(e,t){this.type=0,this.x=e,this.y=t}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),Ba=function(A,e,t){return new EA(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},Al=function(){function A(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return A.prototype.subdivide=function(e,t){var r=Ba(this.start,this.startControl,e),n=Ba(this.startControl,this.endControl,e),i=Ba(this.endControl,this.end,e),o=Ba(r,n,e),s=Ba(n,i,e),l=Ba(o,s,e);return t?new A(this.start,r,o,l):new A(l,s,i,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),Cr=function(A){return A.type===1},Zv=function(){function A(e){var t=e.styles,r=e.bounds,n=bs(t.borderTopLeftRadius,r.width,r.height),i=n[0],o=n[1],s=bs(t.borderTopRightRadius,r.width,r.height),l=s[0],u=s[1],f=bs(t.borderBottomRightRadius,r.width,r.height),p=f[0],w=f[1],g=bs(t.borderBottomLeftRadius,r.width,r.height),F=g[0],y=g[1],S=[];S.push((i+l)/r.width),S.push((F+p)/r.width),S.push((o+y)/r.height),S.push((u+w)/r.height);var b=Math.max.apply(Math,S);b>1&&(i/=b,o/=b,l/=b,u/=b,p/=b,w/=b,F/=b,y/=b);var P=r.width-l,G=r.height-w,O=r.width-p,J=r.height-y,Z=t.borderTopWidth,nA=t.borderRightWidth,q=t.borderBottomWidth,H=t.borderLeftWidth,AA=Pe(t.paddingTop,e.bounds.width),_=Pe(t.paddingRight,e.bounds.width),I=Pe(t.paddingBottom,e.bounds.width),K=Pe(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?Ve(r.left+H/3,r.top+Z/3,i-H/3,o-Z/3,ye.TOP_LEFT):new EA(r.left+H/3,r.top+Z/3),this.topRightBorderDoubleOuterBox=i>0||o>0?Ve(r.left+P,r.top+Z/3,l-nA/3,u-Z/3,ye.TOP_RIGHT):new EA(r.left+r.width-nA/3,r.top+Z/3),this.bottomRightBorderDoubleOuterBox=p>0||w>0?Ve(r.left+O,r.top+G,p-nA/3,w-q/3,ye.BOTTOM_RIGHT):new EA(r.left+r.width-nA/3,r.top+r.height-q/3),this.bottomLeftBorderDoubleOuterBox=F>0||y>0?Ve(r.left+H/3,r.top+J,F-H/3,y-q/3,ye.BOTTOM_LEFT):new EA(r.left+H/3,r.top+r.height-q/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?Ve(r.left+H*2/3,r.top+Z*2/3,i-H*2/3,o-Z*2/3,ye.TOP_LEFT):new EA(r.left+H*2/3,r.top+Z*2/3),this.topRightBorderDoubleInnerBox=i>0||o>0?Ve(r.left+P,r.top+Z*2/3,l-nA*2/3,u-Z*2/3,ye.TOP_RIGHT):new EA(r.left+r.width-nA*2/3,r.top+Z*2/3),this.bottomRightBorderDoubleInnerBox=p>0||w>0?Ve(r.left+O,r.top+G,p-nA*2/3,w-q*2/3,ye.BOTTOM_RIGHT):new EA(r.left+r.width-nA*2/3,r.top+r.height-q*2/3),this.bottomLeftBorderDoubleInnerBox=F>0||y>0?Ve(r.left+H*2/3,r.top+J,F-H*2/3,y-q*2/3,ye.BOTTOM_LEFT):new EA(r.left+H*2/3,r.top+r.height-q*2/3),this.topLeftBorderStroke=i>0||o>0?Ve(r.left+H/2,r.top+Z/2,i-H/2,o-Z/2,ye.TOP_LEFT):new EA(r.left+H/2,r.top+Z/2),this.topRightBorderStroke=i>0||o>0?Ve(r.left+P,r.top+Z/2,l-nA/2,u-Z/2,ye.TOP_RIGHT):new EA(r.left+r.width-nA/2,r.top+Z/2),this.bottomRightBorderStroke=p>0||w>0?Ve(r.left+O,r.top+G,p-nA/2,w-q/2,ye.BOTTOM_RIGHT):new EA(r.left+r.width-nA/2,r.top+r.height-q/2),this.bottomLeftBorderStroke=F>0||y>0?Ve(r.left+H/2,r.top+J,F-H/2,y-q/2,ye.BOTTOM_LEFT):new EA(r.left+H/2,r.top+r.height-q/2),this.topLeftBorderBox=i>0||o>0?Ve(r.left,r.top,i,o,ye.TOP_LEFT):new EA(r.left,r.top),this.topRightBorderBox=l>0||u>0?Ve(r.left+P,r.top,l,u,ye.TOP_RIGHT):new EA(r.left+r.width,r.top),this.bottomRightBorderBox=p>0||w>0?Ve(r.left+O,r.top+G,p,w,ye.BOTTOM_RIGHT):new EA(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=F>0||y>0?Ve(r.left,r.top+J,F,y,ye.BOTTOM_LEFT):new EA(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||o>0?Ve(r.left+H,r.top+Z,Math.max(0,i-H),Math.max(0,o-Z),ye.TOP_LEFT):new EA(r.left+H,r.top+Z),this.topRightPaddingBox=l>0||u>0?Ve(r.left+Math.min(P,r.width-nA),r.top+Z,P>r.width+nA?0:Math.max(0,l-nA),Math.max(0,u-Z),ye.TOP_RIGHT):new EA(r.left+r.width-nA,r.top+Z),this.bottomRightPaddingBox=p>0||w>0?Ve(r.left+Math.min(O,r.width-H),r.top+Math.min(G,r.height-q),Math.max(0,p-nA),Math.max(0,w-q),ye.BOTTOM_RIGHT):new EA(r.left+r.width-nA,r.top+r.height-q),this.bottomLeftPaddingBox=F>0||y>0?Ve(r.left+H,r.top+Math.min(J,r.height-q),Math.max(0,F-H),Math.max(0,y-q),ye.BOTTOM_LEFT):new EA(r.left+H,r.top+r.height-q),this.topLeftContentBox=i>0||o>0?Ve(r.left+H+K,r.top+Z+AA,Math.max(0,i-(H+K)),Math.max(0,o-(Z+AA)),ye.TOP_LEFT):new EA(r.left+H+K,r.top+Z+AA),this.topRightContentBox=l>0||u>0?Ve(r.left+Math.min(P,r.width+H+K),r.top+Z+AA,P>r.width+H+K?0:l-H+K,u-(Z+AA),ye.TOP_RIGHT):new EA(r.left+r.width-(nA+_),r.top+Z+AA),this.bottomRightContentBox=p>0||w>0?Ve(r.left+Math.min(O,r.width-(H+K)),r.top+Math.min(G,r.height+Z+AA),Math.max(0,p-(nA+_)),w-(q+I),ye.BOTTOM_RIGHT):new EA(r.left+r.width-(nA+_),r.top+r.height-(q+I)),this.bottomLeftContentBox=F>0||y>0?Ve(r.left+H+K,r.top+J,Math.max(0,F-(H+K)),y-(q+I),ye.BOTTOM_LEFT):new EA(r.left+H+K,r.top+r.height-(q+I))}return A}(),ye;(function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(ye||(ye={}));var Ve=function(A,e,t,r,n){var i=4*((Math.sqrt(2)-1)/3),o=t*i,s=r*i,l=A+t,u=e+r;switch(n){case ye.TOP_LEFT:return new Al(new EA(A,u),new EA(A,u-s),new EA(l-o,e),new EA(l,e));case ye.TOP_RIGHT:return new Al(new EA(A,e),new EA(A+o,e),new EA(l,u-s),new EA(l,u));case ye.BOTTOM_RIGHT:return new Al(new EA(l,e),new EA(l,e+s),new EA(A+o,u),new EA(A,u));case ye.BOTTOM_LEFT:default:return new Al(new EA(l,u),new EA(l-o,u),new EA(A,e+s),new EA(A,e))}},Il=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},$v=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Sl=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},Am=function(){function A(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}return A}(),el=function(){function A(e,t){this.path=e,this.target=t,this.type=1}return A}(),em=function(){function A(e){this.opacity=e,this.type=2,this.target=6}return A}(),tm=function(A){return A.type===0},R1=function(A){return A.type===1},rm=function(A){return A.type===2},C0=function(A,e){return A.length===e.length?A.some(function(t,r){return t===e[r]}):!1},nm=function(A,e,t,r,n){return A.map(function(i,o){switch(o){case 0:return i.add(e,t);case 1:return i.add(e+r,t);case 2:return i.add(e+r,t+n);case 3:return i.add(e,t+n)}return i})},K1=function(){function A(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),j1=function(){function A(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Zv(this.container),this.container.styles.opacity<1&&this.effects.push(new em(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Am(r,n,i))}if(this.container.styles.overflowX!==0){var o=Il(this.curves),s=Sl(this.curves);C0(o,s)?this.effects.push(new el(o,6)):(this.effects.push(new el(o,2)),this.effects.push(new el(s,4)))}}return A.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var i=r.effects.filter(function(l){return!R1(l)});if(t||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,i),t=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var o=Il(r.curves),s=Sl(r.curves);C0(o,s)||n.unshift(new el(s,6))}}else n.unshift.apply(n,i);r=r.parent}return n.filter(function(l){return wt(l.target,e)})},A}(),ef=function(A,e,t,r){A.container.elements.forEach(function(n){var i=wt(n.flags,4),o=wt(n.flags,2),s=new j1(n,A);wt(n.styles.display,2048)&&r.push(s);var l=wt(n.flags,8)?[]:r;if(i||o){var u=i||n.styles.isPositioned()?t:e,f=new K1(s);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var p=n.styles.zIndex.order;if(p<0){var w=0;u.negativeZIndex.some(function(F,y){return p>F.element.container.styles.zIndex.order?(w=y,!1):w>0}),u.negativeZIndex.splice(w,0,f)}else if(p>0){var g=0;u.positiveZIndex.some(function(F,y){return p>=F.element.container.styles.zIndex.order?(g=y+1,!1):g>0}),u.positiveZIndex.splice(g,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else n.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);ef(s,f,i?f:t,l)}else n.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),ef(s,e,t,l);wt(n.flags,8)&&G1(n,l)})},G1=function(A,e){for(var t=A instanceof Ju?A.start:1,r=A instanceof Ju?A.reversed:!1,n=0;n<e.length;n++){var i=e[n];i.container instanceof _1&&typeof i.container.value=="number"&&i.container.value!==0&&(t=i.container.value),i.listValue=Os(t,i.container.styles.listStyleType,!0),t+=r?-1:1}},im=function(A){var e=new j1(A,null),t=new K1(e),r=[];return ef(e,t,t,r),G1(e.container,r),t},b0=function(A,e){switch(e){case 0:return Qr(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return Qr(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return Qr(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return Qr(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},am=function(A,e){switch(e){case 0:return Qr(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return Qr(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return Qr(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return Qr(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},sm=function(A,e){switch(e){case 0:return Qr(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return Qr(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return Qr(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return Qr(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},om=function(A,e){switch(e){case 0:return tl(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return tl(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return tl(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return tl(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},tl=function(A,e){var t=[];return Cr(A)?t.push(A.subdivide(.5,!1)):t.push(A),Cr(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Qr=function(A,e,t,r){var n=[];return Cr(A)?n.push(A.subdivide(.5,!1)):n.push(A),Cr(t)?n.push(t.subdivide(.5,!0)):n.push(t),Cr(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),Cr(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},V1=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Hl=function(A){var e=A.styles,t=A.bounds,r=Pe(e.paddingLeft,t.width),n=Pe(e.paddingRight,t.width),i=Pe(e.paddingTop,t.width),o=Pe(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,i+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+i+o))},lm=function(A,e){return A===0?e.bounds:A===2?Hl(e):V1(e)},cm=function(A,e){return A===0?e.bounds:A===2?Hl(e):V1(e)},iu=function(A,e,t){var r=lm(Fa(A.styles.backgroundOrigin,e),A),n=cm(Fa(A.styles.backgroundClip,e),A),i=um(Fa(A.styles.backgroundSize,e),t,r),o=i[0],s=i[1],l=bs(Fa(A.styles.backgroundPosition,e),r.width-o,r.height-s),u=fm(Fa(A.styles.backgroundRepeat,e),l,i,r,n),f=Math.round(r.left+l[0]),p=Math.round(r.top+l[1]);return[u,f,p,o,s]},pa=function(A){return Le(A)&&A.value===xa.AUTO},rl=function(A){return typeof A=="number"},um=function(A,e,t){var r=e[0],n=e[1],i=e[2],o=A[0],s=A[1];if(!o)return[0,0];if(ft(o)&&s&&ft(s))return[Pe(o,t.width),Pe(s,t.height)];var l=rl(i);if(Le(o)&&(o.value===xa.CONTAIN||o.value===xa.COVER)){if(rl(i)){var u=t.width/t.height;return u<i!=(o.value===xa.COVER)?[t.width,t.width/i]:[t.height*i,t.height]}return[t.width,t.height]}var f=rl(r),p=rl(n),w=f||p;if(pa(o)&&(!s||pa(s))){if(f&&p)return[r,n];if(!l&&!w)return[t.width,t.height];if(w&&l){var g=f?r:n*i,F=p?n:r/i;return[g,F]}var y=f?r:t.width,S=p?n:t.height;return[y,S]}if(l){var b=0,P=0;return ft(o)?b=Pe(o,t.width):ft(s)&&(P=Pe(s,t.height)),pa(o)?b=P*i:(!s||pa(s))&&(P=b/i),[b,P]}var G=null,O=null;if(ft(o)?G=Pe(o,t.width):s&&ft(s)&&(O=Pe(s,t.height)),G!==null&&(!s||pa(s))&&(O=f&&p?G/r*n:t.height),O!==null&&pa(o)&&(G=f&&p?O/n*r:t.width),G!==null&&O!==null)return[G,O];throw new Error("Unable to calculate background-size for element")},Fa=function(A,e){var t=A[e];return typeof t>"u"?A[0]:t},fm=function(A,e,t,r,n){var i=e[0],o=e[1],s=t[0],l=t[1];switch(A){case 2:return[new EA(Math.round(r.left),Math.round(r.top+o)),new EA(Math.round(r.left+r.width),Math.round(r.top+o)),new EA(Math.round(r.left+r.width),Math.round(l+r.top+o)),new EA(Math.round(r.left),Math.round(l+r.top+o))];case 3:return[new EA(Math.round(r.left+i),Math.round(r.top)),new EA(Math.round(r.left+i+s),Math.round(r.top)),new EA(Math.round(r.left+i+s),Math.round(r.height+r.top)),new EA(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new EA(Math.round(r.left+i),Math.round(r.top+o)),new EA(Math.round(r.left+i+s),Math.round(r.top+o)),new EA(Math.round(r.left+i+s),Math.round(r.top+o+l)),new EA(Math.round(r.left+i),Math.round(r.top+o+l))];default:return[new EA(Math.round(n.left),Math.round(n.top)),new EA(Math.round(n.left+n.width),Math.round(n.top)),new EA(Math.round(n.left+n.width),Math.round(n.height+n.top)),new EA(Math.round(n.left),Math.round(n.height+n.top))]}},hm="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",F0="Hidden Text",dm=function(){function A(e){this._data={},this._document=e}return A.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",o.appendChild(r),n.src=hm,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(F0)),r.appendChild(i),r.appendChild(n);var s=n.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(F0)),r.style.lineHeight="normal",n.style.verticalAlign="super";var l=n.offsetTop-r.offsetTop+2;return o.removeChild(r),{baseline:s,middle:l}},A.prototype.getMetrics=function(e,t){var r=e+" "+t;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},A}(),q1=function(){function A(e,t){this.context=e,this.options=t}return A}(),gm=1e4,Bm=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new dm(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(t){for(var r=this;this._activeEffects.length;)this.popEffect();t.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(t){this.ctx.save(),rm(t)&&(this.ctx.globalAlpha=t.opacity),tm(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),R1(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return zt(this,void 0,void 0,function(){var r;return Mt(this,function(n){switch(n.label){case 0:return r=t.element.container.styles,r.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return zt(this,void 0,void 0,function(){return Mt(this,function(r){switch(r.label){case 0:if(wt(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,r,n){var i=this;if(r===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+n);else{var o=Qf(t.text);o.reduce(function(s,l){return i.ctx.fillText(l,s,t.bounds.top+n),s+i.ctx.measureText(l).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),n=Cm(t.fontFamily).join(", "),i=Ws(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,r,t.fontWeight,i,n].join(" "),n,i]},e.prototype.renderTextNode=function(t,r){return zt(this,void 0,void 0,function(){var n,i,o,s,l,u,f,p,w=this;return Mt(this,function(g){return n=this.createFontStyle(r),i=n[0],o=n[1],s=n[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(o,s),u=l.baseline,f=l.middle,p=r.paintOrder,t.textBounds.forEach(function(F){p.forEach(function(y){switch(y){case 0:w.ctx.fillStyle=mt(r.color),w.renderTextWithLetterSpacing(F,r.letterSpacing,u);var S=r.textShadow;S.length&&F.text.trim().length&&(S.slice(0).reverse().forEach(function(b){w.ctx.shadowColor=mt(b.color),w.ctx.shadowOffsetX=b.offsetX.number*w.options.scale,w.ctx.shadowOffsetY=b.offsetY.number*w.options.scale,w.ctx.shadowBlur=b.blur.number,w.renderTextWithLetterSpacing(F,r.letterSpacing,u)}),w.ctx.shadowColor="",w.ctx.shadowOffsetX=0,w.ctx.shadowOffsetY=0,w.ctx.shadowBlur=0),r.textDecorationLine.length&&(w.ctx.fillStyle=mt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(b){switch(b){case 1:w.ctx.fillRect(F.bounds.left,Math.round(F.bounds.top+u),F.bounds.width,1);break;case 2:w.ctx.fillRect(F.bounds.left,Math.round(F.bounds.top),F.bounds.width,1);break;case 3:w.ctx.fillRect(F.bounds.left,Math.ceil(F.bounds.top+f),F.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&F.text.trim().length&&(w.ctx.strokeStyle=mt(r.webkitTextStrokeColor),w.ctx.lineWidth=r.webkitTextStrokeWidth,w.ctx.lineJoin=window.chrome?"miter":"round",w.ctx.strokeText(F.text,F.bounds.left,F.bounds.top+u)),w.ctx.strokeStyle="",w.ctx.lineWidth=0,w.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,r,n){if(n&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var i=Hl(t),o=Sl(r);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return zt(this,void 0,void 0,function(){var r,n,i,o,s,l,P,P,u,f,p,w,O,g,F,J,y,S,b,P,G,O,J;return Mt(this,function(Z){switch(Z.label){case 0:this.applyEffects(t.getEffects(4)),r=t.container,n=t.curves,i=r.styles,o=0,s=r.textNodes,Z.label=1;case 1:return o<s.length?(l=s[o],[4,this.renderTextNode(l,i)]):[3,4];case 2:Z.sent(),Z.label=3;case 3:return o++,[3,1];case 4:if(!(r instanceof Q1))return[3,8];Z.label=5;case 5:return Z.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return P=Z.sent(),this.renderReplacedElement(r,n,P),[3,8];case 7:return Z.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof y1&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof U1))return[3,12];Z.label=9;case 9:return Z.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return P=Z.sent(),this.renderReplacedElement(r,n,P),[3,12];case 11:return Z.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof L1&&r.tree?(u=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,u.render(r.tree)]):[3,14];case 13:f=Z.sent(),r.width&&r.height&&this.ctx.drawImage(f,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),Z.label=14;case 14:if(r instanceof yf&&(p=Math.min(r.bounds.width,r.bounds.height),r.type===_l?r.checked&&(this.ctx.save(),this.path([new EA(r.bounds.left+p*.39363,r.bounds.top+p*.79),new EA(r.bounds.left+p*.16,r.bounds.top+p*.5549),new EA(r.bounds.left+p*.27347,r.bounds.top+p*.44071),new EA(r.bounds.left+p*.39694,r.bounds.top+p*.5649),new EA(r.bounds.left+p*.72983,r.bounds.top+p*.23),new EA(r.bounds.left+p*.84,r.bounds.top+p*.34085),new EA(r.bounds.left+p*.39363,r.bounds.top+p*.79)]),this.ctx.fillStyle=mt(c0),this.ctx.fill(),this.ctx.restore()):r.type===xl&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+p/2,r.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=mt(c0),this.ctx.fill(),this.ctx.restore())),pm(r)&&r.value.length){switch(w=this.createFontStyle(i),O=w[0],g=w[1],F=this.fontMetrics.getMetrics(O,g).baseline,this.ctx.font=O,this.ctx.fillStyle=mt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=vm(r.styles.textAlign),J=Hl(r),y=0,r.styles.textAlign){case 1:y+=J.width/2;break;case 2:y+=J.width;break}S=J.add(y,0,0,-J.height/2+1),this.ctx.save(),this.path([new EA(J.left,J.top),new EA(J.left+J.width,J.top),new EA(J.left+J.width,J.top+J.height),new EA(J.left,J.top+J.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ls(r.value,S),i.letterSpacing,F),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!wt(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(b=r.styles.listStyleImage,b.type!==0)return[3,18];P=void 0,G=b.url,Z.label=15;case 15:return Z.trys.push([15,17,,18]),[4,this.context.cache.match(G)];case 16:return P=Z.sent(),this.ctx.drawImage(P,r.bounds.left-(P.width+10),r.bounds.top),[3,18];case 17:return Z.sent(),this.context.logger.error("Error loading list-style-image "+G),[3,18];case 18:return[3,20];case 19:t.listValue&&r.styles.listStyleType!==-1&&(O=this.createFontStyle(i)[0],this.ctx.font=O,this.ctx.fillStyle=mt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",J=new xn(r.bounds.left,r.bounds.top+Pe(r.styles.paddingTop,r.bounds.width),r.bounds.width,zh(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ls(t.listValue,J),i.letterSpacing,zh(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Z.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return zt(this,void 0,void 0,function(){var r,n,b,i,o,b,s,l,b,u,f,b,p,w,b,g,F,b,y,S,b;return Mt(this,function(P){switch(P.label){case 0:if(wt(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:P.sent(),r=0,n=t.negativeZIndex,P.label=2;case 2:return r<n.length?(b=n[r],[4,this.renderStack(b)]):[3,5];case 3:P.sent(),P.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:P.sent(),i=0,o=t.nonInlineLevel,P.label=7;case 7:return i<o.length?(b=o[i],[4,this.renderNode(b)]):[3,10];case 8:P.sent(),P.label=9;case 9:return i++,[3,7];case 10:s=0,l=t.nonPositionedFloats,P.label=11;case 11:return s<l.length?(b=l[s],[4,this.renderStack(b)]):[3,14];case 12:P.sent(),P.label=13;case 13:return s++,[3,11];case 14:u=0,f=t.nonPositionedInlineLevel,P.label=15;case 15:return u<f.length?(b=f[u],[4,this.renderStack(b)]):[3,18];case 16:P.sent(),P.label=17;case 17:return u++,[3,15];case 18:p=0,w=t.inlineLevel,P.label=19;case 19:return p<w.length?(b=w[p],[4,this.renderNode(b)]):[3,22];case 20:P.sent(),P.label=21;case 21:return p++,[3,19];case 22:g=0,F=t.zeroOrAutoZIndexOrTransformedOrOpacity,P.label=23;case 23:return g<F.length?(b=F[g],[4,this.renderStack(b)]):[3,26];case 24:P.sent(),P.label=25;case 25:return g++,[3,23];case 26:y=0,S=t.positiveZIndex,P.label=27;case 27:return y<S.length?(b=S[y],[4,this.renderStack(b)]):[3,30];case 28:P.sent(),P.label=29;case 29:return y++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var r=this;t.forEach(function(n,i){var o=Cr(n)?n.start:n;i===0?r.ctx.moveTo(o.x,o.y):r.ctx.lineTo(o.x,o.y),Cr(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(t,r,n,i){this.path(t),this.ctx.fillStyle=r,this.ctx.translate(n,i),this.ctx.fill(),this.ctx.translate(-n,-i)},e.prototype.resizeImage=function(t,r,n){var i;if(t.width===r&&t.height===n)return t;var o=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,s=o.createElement("canvas");s.width=Math.max(1,r),s.height=Math.max(1,n);var l=s.getContext("2d");return l.drawImage(t,0,0,t.width,t.height,0,0,r,n),s},e.prototype.renderBackgroundImage=function(t){return zt(this,void 0,void 0,function(){var r,n,i,o,s,l;return Mt(this,function(u){switch(u.label){case 0:r=t.styles.backgroundImage.length-1,n=function(f){var p,w,g,AA,lA,cA,K,j,q,F,AA,lA,cA,K,j,y,S,b,P,G,O,J,Z,nA,q,H,AA,_,I,K,j,sA,lA,cA,tA,uA,QA,pA,Q,T,R,z;return Mt(this,function(X){switch(X.label){case 0:if(f.type!==0)return[3,5];p=void 0,w=f.url,X.label=1;case 1:return X.trys.push([1,3,,4]),[4,i.context.cache.match(w)];case 2:return p=X.sent(),[3,4];case 3:return X.sent(),i.context.logger.error("Error loading background-image "+w),[3,4];case 4:return p&&(g=iu(t,r,[p.width,p.height,p.width/p.height]),AA=g[0],lA=g[1],cA=g[2],K=g[3],j=g[4],q=i.ctx.createPattern(i.resizeImage(p,K,j),"repeat"),i.renderRepeat(AA,q,lA,cA)),[3,6];case 5:tw(f)?(F=iu(t,r,[null,null,null]),AA=F[0],lA=F[1],cA=F[2],K=F[3],j=F[4],y=Yp(f.angle,K,j),S=y[0],b=y[1],P=y[2],G=y[3],O=y[4],J=document.createElement("canvas"),J.width=K,J.height=j,Z=J.getContext("2d"),nA=Z.createLinearGradient(b,G,P,O),Vh(f.stops,S).forEach(function(M){return nA.addColorStop(M.stop,mt(M.color))}),Z.fillStyle=nA,Z.fillRect(0,0,K,j),K>0&&j>0&&(q=i.ctx.createPattern(J,"repeat"),i.renderRepeat(AA,q,lA,cA))):rw(f)&&(H=iu(t,r,[null,null,null]),AA=H[0],_=H[1],I=H[2],K=H[3],j=H[4],sA=f.position.length===0?[Cf]:f.position,lA=Pe(sA[0],K),cA=Pe(sA[sA.length-1],j),tA=Zp(f,lA,cA,K,j),uA=tA[0],QA=tA[1],uA>0&&QA>0&&(pA=i.ctx.createRadialGradient(_+lA,I+cA,0,_+lA,I+cA,uA),Vh(f.stops,uA*2).forEach(function(M){return pA.addColorStop(M.stop,mt(M.color))}),i.path(AA),i.ctx.fillStyle=pA,uA!==QA?(Q=t.bounds.left+.5*t.bounds.width,T=t.bounds.top+.5*t.bounds.height,R=QA/uA,z=1/R,i.ctx.save(),i.ctx.translate(Q,T),i.ctx.transform(1,0,0,R,0,0),i.ctx.translate(-Q,-T),i.ctx.fillRect(_,z*(I-T)+T,K,j*z),i.ctx.restore()):i.ctx.fill())),X.label=6;case 6:return r--,[2]}})},i=this,o=0,s=t.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return o<s.length?(l=s[o],[5,n(l)]):[3,4];case 2:u.sent(),u.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,r,n){return zt(this,void 0,void 0,function(){return Mt(this,function(i){return this.path(b0(n,r)),this.ctx.fillStyle=mt(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,r,n,i){return zt(this,void 0,void 0,function(){var o,s;return Mt(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(t,n,i)]:[3,2];case 1:return l.sent(),[2];case 2:return o=am(i,n),this.path(o),this.ctx.fillStyle=mt(t),this.ctx.fill(),s=sm(i,n),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return zt(this,void 0,void 0,function(){var r,n,i,o,s,l,u,f,p=this;return Mt(this,function(w){switch(w.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,n=!ti(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],o=wm(Fa(r.backgroundClip,0),t.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),ti(r.backgroundColor)||(this.ctx.fillStyle=mt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:w.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(g){p.ctx.save();var F=Il(t.curves),y=g.inset?0:gm,S=nm(F,-y+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(p.path(F),p.ctx.clip(),p.mask(S)):(p.mask(F),p.ctx.clip(),p.path(S)),p.ctx.shadowOffsetX=g.offsetX.number+y,p.ctx.shadowOffsetY=g.offsetY.number,p.ctx.shadowColor=mt(g.color),p.ctx.shadowBlur=g.blur.number,p.ctx.fillStyle=g.inset?mt(g.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),w.label=2;case 2:s=0,l=0,u=i,w.label=3;case 3:return l<u.length?(f=u[l],f.style!==0&&!ti(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,s,t.curves,2)]:[3,11]):[3,13];case 4:return w.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,s,t.curves,3)];case 6:return w.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,s,t.curves)];case 8:return w.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,s,t.curves)];case 10:w.sent(),w.label=11;case 11:s++,w.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,r,n,i,o){return zt(this,void 0,void 0,function(){var s,l,u,f,p,w,g,F,y,S,b,P,G,O,J,Z,J,Z;return Mt(this,function(nA){return this.ctx.save(),s=om(i,n),l=b0(i,n),o===2&&(this.path(l),this.ctx.clip()),Cr(l[0])?(u=l[0].start.x,f=l[0].start.y):(u=l[0].x,f=l[0].y),Cr(l[1])?(p=l[1].end.x,w=l[1].end.y):(p=l[1].x,w=l[1].y),n===0||n===2?g=Math.abs(u-p):g=Math.abs(f-w),this.ctx.beginPath(),o===3?this.formatPath(s):this.formatPath(l.slice(0,2)),F=r<3?r*3:r*2,y=r<3?r*2:r,o===3&&(F=r,y=r),S=!0,g<=F*2?S=!1:g<=F*2+y?(b=g/(2*F+y),F*=b,y*=b):(P=Math.floor((g+y)/(F+y)),G=(g-P*F)/(P-1),O=(g-(P+1)*F)/P,y=O<=0||Math.abs(y-G)<Math.abs(y-O)?G:O),S&&(o===3?this.ctx.setLineDash([0,F+y]):this.ctx.setLineDash([F,y])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=mt(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Cr(l[0])&&(J=l[3],Z=l[0],this.ctx.beginPath(),this.formatPath([new EA(J.end.x,J.end.y),new EA(Z.start.x,Z.start.y)]),this.ctx.stroke()),Cr(l[1])&&(J=l[1],Z=l[2],this.ctx.beginPath(),this.formatPath([new EA(J.end.x,J.end.y),new EA(Z.start.x,Z.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return zt(this,void 0,void 0,function(){var r;return Mt(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=mt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=im(t),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(q1),pm=function(A){return A instanceof E1||A instanceof x1?!0:A instanceof yf&&A.type!==xl&&A.type!==_l},wm=function(A,e){switch(A){case 0:return Il(e);case 2:return $v(e);case 1:default:return Sl(e)}},vm=function(A){switch(A){case 1:return"center";case 2:return"right";case 0:default:return"left"}},mm=["-apple-system","system-ui"],Cm=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(e){return mm.indexOf(e)===-1}):A},bm=function(A){Tr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(t){return zt(this,void 0,void 0,function(){var r,n;return Mt(this,function(i){switch(i.label){case 0:return r=Xu(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Fm(r)];case 1:return n=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=mt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(q1),Fm=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(A))})},Qm=function(){function A(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return A.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Do([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Do([this.id,this.getTime()+"ms"],e))},A.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Do([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Do([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.instances={},A}(),ym=function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new Qm({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new Vv(this,e)}return A.instanceCount=1,A}(),z1=function(A,e){return e===void 0&&(e={}),Um(A,e)};typeof window<"u"&&M1.setContext(window);var Um=function(A,e){return zt(void 0,void 0,void 0,function(){var t,r,n,i,o,s,l,u,f,p,w,g,F,y,S,b,P,G,O,J,nA,Z,nA,q,H,AA,_,I,K,j,sA,lA,cA,tA,uA,QA,pA,Q,T,R;return Mt(this,function(z){switch(z.label){case 0:if(!A||typeof A!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=A.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(r=t.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(q=e.allowTaint)!==null&&q!==void 0?q:!1,imageTimeout:(H=e.imageTimeout)!==null&&H!==void 0?H:15e3,proxy:e.proxy,useCORS:(AA=e.useCORS)!==null&&AA!==void 0?AA:!1},i=Nu({logging:(_=e.logging)!==null&&_!==void 0?_:!0,cache:e.cache},n),o={windowWidth:(I=e.windowWidth)!==null&&I!==void 0?I:r.innerWidth,windowHeight:(K=e.windowHeight)!==null&&K!==void 0?K:r.innerHeight,scrollX:(j=e.scrollX)!==null&&j!==void 0?j:r.pageXOffset,scrollY:(sA=e.scrollY)!==null&&sA!==void 0?sA:r.pageYOffset},s=new xn(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),l=new ym(i,s),u=(lA=e.foreignObjectRendering)!==null&&lA!==void 0?lA:!1,f={allowTaint:(cA=e.allowTaint)!==null&&cA!==void 0?cA:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),p=new v0(l,A,f),w=p.clonedReferenceElement,w?[4,p.toIFrame(t,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=z.sent(),F=Uf(w)||xv(w)?n2(w.ownerDocument):Ml(l,w),y=F.width,S=F.height,b=F.left,P=F.top,G=_m(l,w,e.backgroundColor),O={canvas:e.canvas,backgroundColor:G,scale:(uA=(tA=e.scale)!==null&&tA!==void 0?tA:r.devicePixelRatio)!==null&&uA!==void 0?uA:1,x:((QA=e.x)!==null&&QA!==void 0?QA:0)+b,y:((pA=e.y)!==null&&pA!==void 0?pA:0)+P,width:(Q=e.width)!==null&&Q!==void 0?Q:Math.ceil(y),height:(T=e.height)!==null&&T!==void 0?T:Math.ceil(S)},u?(l.logger.debug("Document cloned, using foreign object rendering"),nA=new bm(l,O),[4,nA.render(w)]):[3,3];case 2:return J=z.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+b+","+P+" with size "+y+"x"+S+" using computed rendering"),l.logger.debug("Starting DOM parsing"),Z=S1(l,w),G===Z.styles.backgroundColor&&(Z.styles.backgroundColor=_n.TRANSPARENT),l.logger.debug("Starting renderer for element at "+O.x+","+O.y+" with size "+O.width+"x"+O.height),nA=new Bm(l,O),[4,nA.render(Z)];case 4:J=z.sent(),z.label=5;case 5:return(!((R=e.removeContainer)!==null&&R!==void 0)||R)&&(v0.destroy(g)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,J]}})})},_m=function(A,e,t){var r=e.ownerDocument,n=r.documentElement?xs(A,getComputedStyle(r.documentElement).backgroundColor):_n.TRANSPARENT,i=r.body?xs(A,getComputedStyle(r.body).backgroundColor):_n.TRANSPARENT,o=typeof t=="string"?xs(A,t):t===null?_n.TRANSPARENT:4294967295;return e===r.documentElement?ti(n)?ti(i)?o:i:n:o};const xm=Object.freeze(Object.defineProperty({__proto__:null,default:z1},Symbol.toStringTag,{value:"Module"}));var kr=Uint8Array,ur=Uint16Array,_f=Int32Array,xf=new kr([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]),Ef=new kr([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]),Q0=new kr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W1=function(A,e){for(var t=new ur(31),r=0;r<31;++r)t[r]=e+=1<<A[r-1];for(var n=new _f(t[30]),r=1;r<30;++r)for(var i=t[r];i<t[r+1];++i)n[i]=i-t[r]<<5|r;return{b:t,r:n}},X1=W1(xf,2),Em=X1.b,tf=X1.r;Em[28]=258,tf[258]=28;var Lm=W1(Ef,0),y0=Lm.r,rf=new ur(32768);for(var Ke=0;Ke<32768;++Ke){var Gn=(Ke&43690)>>1|(Ke&21845)<<1;Gn=(Gn&52428)>>2|(Gn&13107)<<2,Gn=(Gn&61680)>>4|(Gn&3855)<<4,rf[Ke]=((Gn&65280)>>8|(Gn&255)<<8)>>1}var Ss=function(A,e,t){for(var r=A.length,n=0,i=new ur(e);n<r;++n)A[n]&&++i[A[n]-1];var o=new ur(e);for(n=1;n<e;++n)o[n]=o[n-1]+i[n-1]<<1;var s;if(t){s=new ur(1<<e);var l=15-e;for(n=0;n<r;++n)if(A[n])for(var u=n<<4|A[n],f=e-A[n],p=o[A[n]-1]++<<f,w=p|(1<<f)-1;p<=w;++p)s[rf[p]>>l]=u}else for(s=new ur(r),n=0;n<r;++n)A[n]&&(s[n]=rf[o[A[n]-1]++]>>15-A[n]);return s},Oi=new kr(288);for(var Ke=0;Ke<144;++Ke)Oi[Ke]=8;for(var Ke=144;Ke<256;++Ke)Oi[Ke]=9;for(var Ke=256;Ke<280;++Ke)Oi[Ke]=7;for(var Ke=280;Ke<288;++Ke)Oi[Ke]=8;var Nl=new kr(32);for(var Ke=0;Ke<32;++Ke)Nl[Ke]=5;var Im=Ss(Oi,9,0),Sm=Ss(Nl,5,0),J1=function(A){return(A+7)/8|0},Hm=function(A,e,t){return(e==null||e<0)&&(e=0),(t==null||t>A.length)&&(t=A.length),new kr(A.subarray(e,t))},Fn=function(A,e,t){t<<=e&7;var r=e/8|0;A[r]|=t,A[r+1]|=t>>8},gs=function(A,e,t){t<<=e&7;var r=e/8|0;A[r]|=t,A[r+1]|=t>>8,A[r+2]|=t>>16},au=function(A,e){for(var t=[],r=0;r<A.length;++r)A[r]&&t.push({s:r,f:A[r]});var n=t.length,i=t.slice();if(!n)return{t:Z1,l:0};if(n==1){var o=new kr(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(J,Z){return J.f-Z.f}),t.push({s:-1,f:25001});var s=t[0],l=t[1],u=0,f=1,p=2;for(t[0]={s:-1,f:s.f+l.f,l:s,r:l};f!=n-1;)s=t[t[u].f<t[p].f?u++:p++],l=t[u!=f&&t[u].f<t[p].f?u++:p++],t[f++]={s:-1,f:s.f+l.f,l:s,r:l};for(var w=i[0].s,r=1;r<n;++r)i[r].s>w&&(w=i[r].s);var g=new ur(w+1),F=nf(t[f-1],g,0);if(F>e){var r=0,y=0,S=F-e,b=1<<S;for(i.sort(function(Z,nA){return g[nA.s]-g[Z.s]||Z.f-nA.f});r<n;++r){var P=i[r].s;if(g[P]>e)y+=b-(1<<F-g[P]),g[P]=e;else break}for(y>>=S;y>0;){var G=i[r].s;g[G]<e?y-=1<<e-g[G]++-1:++r}for(;r>=0&&y;--r){var O=i[r].s;g[O]==e&&(--g[O],++y)}F=e}return{t:new kr(g),l:F}},nf=function(A,e,t){return A.s==-1?Math.max(nf(A.l,e,t+1),nf(A.r,e,t+1)):e[A.s]=t},U0=function(A){for(var e=A.length;e&&!A[--e];);for(var t=new ur(++e),r=0,n=A[0],i=1,o=function(l){t[r++]=l},s=1;s<=e;++s)if(A[s]==n&&s!=e)++i;else{if(!n&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(n),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(n);i=1,n=A[s]}return{c:t.subarray(0,r),n:e}},Bs=function(A,e){for(var t=0,r=0;r<e.length;++r)t+=A[r]*e[r];return t},Y1=function(A,e,t){var r=t.length,n=J1(e+2);A[n]=r&255,A[n+1]=r>>8,A[n+2]=A[n]^255,A[n+3]=A[n+1]^255;for(var i=0;i<r;++i)A[n+i+4]=t[i];return(n+4+r)*8},_0=function(A,e,t,r,n,i,o,s,l,u,f){Fn(e,f++,t),++n[256];for(var p=au(n,15),w=p.t,g=p.l,F=au(i,15),y=F.t,S=F.l,b=U0(w),P=b.c,G=b.n,O=U0(y),J=O.c,Z=O.n,nA=new ur(19),q=0;q<P.length;++q)++nA[P[q]&31];for(var q=0;q<J.length;++q)++nA[J[q]&31];for(var H=au(nA,7),AA=H.t,_=H.l,I=19;I>4&&!AA[Q0[I-1]];--I);var K=u+5<<3,j=Bs(n,Oi)+Bs(i,Nl)+o,sA=Bs(n,w)+Bs(i,y)+o+14+3*I+Bs(nA,AA)+2*nA[16]+3*nA[17]+7*nA[18];if(l>=0&&K<=j&&K<=sA)return Y1(e,f,A.subarray(l,l+u));var lA,cA,tA,uA;if(Fn(e,f,1+(sA<j)),f+=2,sA<j){lA=Ss(w,g,0),cA=w,tA=Ss(y,S,0),uA=y;var QA=Ss(AA,_,0);Fn(e,f,G-257),Fn(e,f+5,Z-1),Fn(e,f+10,I-4),f+=14;for(var q=0;q<I;++q)Fn(e,f+3*q,AA[Q0[q]]);f+=3*I;for(var pA=[P,J],Q=0;Q<2;++Q)for(var T=pA[Q],q=0;q<T.length;++q){var R=T[q]&31;Fn(e,f,QA[R]),f+=AA[R],R>15&&(Fn(e,f,T[q]>>5&127),f+=T[q]>>12)}}else lA=Im,cA=Oi,tA=Sm,uA=Nl;for(var q=0;q<s;++q){var z=r[q];if(z>255){var R=z>>18&31;gs(e,f,lA[R+257]),f+=cA[R+257],R>7&&(Fn(e,f,z>>23&31),f+=xf[R]);var X=z&31;gs(e,f,tA[X]),f+=uA[X],X>3&&(gs(e,f,z>>5&8191),f+=Ef[X])}else gs(e,f,lA[z]),f+=cA[z]}return gs(e,f,lA[256]),f+cA[256]},Nm=new _f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Z1=new kr(0),Dm=function(A,e,t,r,n,i){var o=i.z||A.length,s=new kr(r+o+5*(1+Math.ceil(o/7e3))+n),l=s.subarray(r,s.length-n),u=i.l,f=(i.r||0)&7;if(e){f&&(l[0]=i.r>>3);for(var p=Nm[e-1],w=p>>13,g=p&8191,F=(1<<t)-1,y=i.p||new ur(32768),S=i.h||new ur(F+1),b=Math.ceil(t/3),P=2*b,G=function(SA){return(A[SA]^A[SA+1]<<b^A[SA+2]<<P)&F},O=new _f(25e3),J=new ur(288),Z=new ur(32),nA=0,q=0,H=i.i||0,AA=0,_=i.w||0,I=0;H+2<o;++H){var K=G(H),j=H&32767,sA=S[K];if(y[j]=sA,S[K]=j,_<=H){var lA=o-H;if((nA>7e3||AA>24576)&&(lA>423||!u)){f=_0(A,l,0,O,J,Z,q,AA,I,H-I,f),AA=nA=q=0,I=H;for(var cA=0;cA<286;++cA)J[cA]=0;for(var cA=0;cA<30;++cA)Z[cA]=0}var tA=2,uA=0,QA=g,pA=j-sA&32767;if(lA>2&&K==G(H-pA))for(var Q=Math.min(w,lA)-1,T=Math.min(32767,H),R=Math.min(258,lA);pA<=T&&--QA&&j!=sA;){if(A[H+tA]==A[H+tA-pA]){for(var z=0;z<R&&A[H+z]==A[H+z-pA];++z);if(z>tA){if(tA=z,uA=pA,z>Q)break;for(var X=Math.min(pA,z-2),M=0,cA=0;cA<X;++cA){var rA=H-pA+cA&32767,oA=y[rA],fA=rA-oA&32767;fA>M&&(M=fA,sA=rA)}}}j=sA,sA=y[j],pA+=j-sA&32767}if(uA){O[AA++]=268435456|tf[tA]<<18|y0[uA];var bA=tf[tA]&31,xA=y0[uA]&31;q+=xf[bA]+Ef[xA],++J[257+bA],++Z[xA],_=H+tA,++nA}else O[AA++]=A[H],++J[A[H]]}}for(H=Math.max(H,_);H<o;++H)O[AA++]=A[H],++J[A[H]];f=_0(A,l,u,O,J,Z,q,AA,I,H-I,f),u||(i.r=f&7|l[f/8|0]<<3,f-=7,i.h=S,i.p=y,i.i=H,i.w=_)}else{for(var H=i.w||0;H<o+u;H+=65535){var UA=H+65535;UA>=o&&(l[f/8|0]=u,UA=o),f=Y1(l,f+1,A.subarray(H,UA))}i.i=o}return Hm(s,0,r+J1(f)+n)},$1=function(){var A=1,e=0;return{p:function(t){for(var r=A,n=e,i=t.length|0,o=0;o!=i;){for(var s=Math.min(o+2655,i);o<s;++o)n+=r+=t[o];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}A=r,e=n},d:function(){return A%=65521,e%=65521,(A&255)<<24|(A&65280)<<8|(e&255)<<8|e>>8}}},km=function(A,e,t,r,n){if(!n&&(n={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),o=new kr(i.length+A.length);o.set(i),o.set(A,i.length),A=o,n.w=i.length}return Dm(A,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(A.length)))*1.5):20:12+e.mem,t,r,n)},Ag=function(A,e,t){for(;t;++e)A[e]=t,t>>>=8},Tm=function(A,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;if(A[0]=120,A[1]=r<<6|(e.dictionary&&32),A[1]|=31-(A[0]<<8|A[1])%31,e.dictionary){var n=$1();n.p(e.dictionary),Ag(A,2,n.d())}};function af(A,e){e||(e={});var t=$1();t.p(A);var r=km(A,e,e.dictionary?6:2,4);return Tm(r,e),Ag(r,r.length-4,t.d()),r}var Om=typeof TextDecoder<"u"&&new TextDecoder,Pm=0;try{Om.decode(Z1,{stream:!0}),Pm=1}catch{}function x0(A,e="utf8"){return new TextDecoder(e).decode(A)}const Mm=new TextEncoder;function Rm(A){return Mm.encode(A)}const Km=1024*8,jm=(()=>{const A=new Uint8Array(4),e=new Uint32Array(A.buffer);return!((e[0]=1)&A[0])})(),su={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 Lf{constructor(e=Km,t={}){xe(this,"buffer");xe(this,"byteLength");xe(this,"byteOffset");xe(this,"length");xe(this,"offset");xe(this,"lastWrittenByte");xe(this,"littleEndian");xe(this,"_data");xe(this,"_mark");xe(this,"_marks");let r=!1;typeof e=="number"?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const n=t.offset?t.offset>>>0:0,i=e.byteLength-n;let o=n;(ArrayBuffer.isView(e)||e instanceof Lf)&&(e.byteLength!==e.buffer.byteLength&&(o=e.byteOffset+n),e=e.buffer),r?this.lastWrittenByte=i:this.lastWrittenByte=0,this.buffer=e,this.length=i,this.byteLength=i,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,i),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const r=(this.offset+e)*2,n=new Uint8Array(r);n.set(new Uint8Array(this.buffer)),this.buffer=n.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(e=1){return this.readArray(e,"uint8")}readArray(e,t){const r=su[t].BYTES_PER_ELEMENT*e,n=this.byteOffset+this.offset,i=this.buffer.slice(n,n+r);if(this.littleEndian===jm&&t!=="uint8"&&t!=="int8"){const s=new Uint8Array(this.buffer.slice(n,n+r));s.reverse();const l=new su[t](s.buffer);return this.offset+=r,l.reverse(),l}const o=new su[t](i);return this.offset+=r,o}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let r=0;r<e;r++)t+=this.readChar();return t}readUtf8(e=1){return x0(this.readBytes(e))}decodeText(e=1,t="utf8"){return x0(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(Rm(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Gm=4,E0=0,L0=1,Vm=2;function Pa(A){let e=A.length;for(;--e>=0;)A[e]=0}const qm=0,eg=1,zm=2,Wm=3,Xm=258,If=29,Xs=256,Ps=Xs+1+If,Ea=30,Sf=19,tg=2*Ps+1,Si=15,ou=16,Jm=7,Hf=256,rg=16,ng=17,ig=18,sf=new Uint8Array([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]),pl=new Uint8Array([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]),Ym=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ag=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zm=512,yn=new Array((Ps+2)*2);Pa(yn);const Hs=new Array(Ea*2);Pa(Hs);const Ms=new Array(Zm);Pa(Ms);const Rs=new Array(Xm-Wm+1);Pa(Rs);const Nf=new Array(If);Pa(Nf);const Dl=new Array(Ea);Pa(Dl);function lu(A,e,t,r,n){this.static_tree=A,this.extra_bits=e,this.extra_base=t,this.elems=r,this.max_length=n,this.has_stree=A&&A.length}let sg,og,lg;function cu(A,e){this.dyn_tree=A,this.max_code=0,this.stat_desc=e}const cg=A=>A<256?Ms[A]:Ms[256+(A>>>7)],Ks=(A,e)=>{A.pending_buf[A.pending++]=e&255,A.pending_buf[A.pending++]=e>>>8&255},$t=(A,e,t)=>{A.bi_valid>ou-t?(A.bi_buf|=e<<A.bi_valid&65535,Ks(A,A.bi_buf),A.bi_buf=e>>ou-A.bi_valid,A.bi_valid+=t-ou):(A.bi_buf|=e<<A.bi_valid&65535,A.bi_valid+=t)},$r=(A,e,t)=>{$t(A,t[e*2],t[e*2+1])},ug=(A,e)=>{let t=0;do t|=A&1,A>>>=1,t<<=1;while(--e>0);return t>>>1},$m=A=>{A.bi_valid===16?(Ks(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=A.bi_buf&255,A.bi_buf>>=8,A.bi_valid-=8)},A4=(A,e)=>{const t=e.dyn_tree,r=e.max_code,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length;let u,f,p,w,g,F,y=0;for(w=0;w<=Si;w++)A.bl_count[w]=0;for(t[A.heap[A.heap_max]*2+1]=0,u=A.heap_max+1;u<tg;u++)f=A.heap[u],w=t[t[f*2+1]*2+1]+1,w>l&&(w=l,y++),t[f*2+1]=w,!(f>r)&&(A.bl_count[w]++,g=0,f>=s&&(g=o[f-s]),F=t[f*2],A.opt_len+=F*(w+g),i&&(A.static_len+=F*(n[f*2+1]+g)));if(y!==0){do{for(w=l-1;A.bl_count[w]===0;)w--;A.bl_count[w]--,A.bl_count[w+1]+=2,A.bl_count[l]--,y-=2}while(y>0);for(w=l;w!==0;w--)for(f=A.bl_count[w];f!==0;)p=A.heap[--u],!(p>r)&&(t[p*2+1]!==w&&(A.opt_len+=(w-t[p*2+1])*t[p*2],t[p*2+1]=w),f--)}},fg=(A,e,t)=>{const r=new Array(Si+1);let n=0,i,o;for(i=1;i<=Si;i++)n=n+t[i-1]<<1,r[i]=n;for(o=0;o<=e;o++){let s=A[o*2+1];s!==0&&(A[o*2]=ug(r[s]++,s))}},e4=()=>{let A,e,t,r,n;const i=new Array(Si+1);for(t=0,r=0;r<If-1;r++)for(Nf[r]=t,A=0;A<1<<sf[r];A++)Rs[t++]=r;for(Rs[t-1]=r,n=0,r=0;r<16;r++)for(Dl[r]=n,A=0;A<1<<pl[r];A++)Ms[n++]=r;for(n>>=7;r<Ea;r++)for(Dl[r]=n<<7,A=0;A<1<<pl[r]-7;A++)Ms[256+n++]=r;for(e=0;e<=Si;e++)i[e]=0;for(A=0;A<=143;)yn[A*2+1]=8,A++,i[8]++;for(;A<=255;)yn[A*2+1]=9,A++,i[9]++;for(;A<=279;)yn[A*2+1]=7,A++,i[7]++;for(;A<=287;)yn[A*2+1]=8,A++,i[8]++;for(fg(yn,Ps+1,i),A=0;A<Ea;A++)Hs[A*2+1]=5,Hs[A*2]=ug(A,5);sg=new lu(yn,sf,Xs+1,Ps,Si),og=new lu(Hs,pl,0,Ea,Si),lg=new lu(new Array(0),Ym,0,Sf,Jm)},hg=A=>{let e;for(e=0;e<Ps;e++)A.dyn_ltree[e*2]=0;for(e=0;e<Ea;e++)A.dyn_dtree[e*2]=0;for(e=0;e<Sf;e++)A.bl_tree[e*2]=0;A.dyn_ltree[Hf*2]=1,A.opt_len=A.static_len=0,A.sym_next=A.matches=0},dg=A=>{A.bi_valid>8?Ks(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0},I0=(A,e,t,r)=>{const n=e*2,i=t*2;return A[n]<A[i]||A[n]===A[i]&&r[e]<=r[t]},uu=(A,e,t)=>{const r=A.heap[t];let n=t<<1;for(;n<=A.heap_len&&(n<A.heap_len&&I0(e,A.heap[n+1],A.heap[n],A.depth)&&n++,!I0(e,r,A.heap[n],A.depth));)A.heap[t]=A.heap[n],t=n,n<<=1;A.heap[t]=r},S0=(A,e,t)=>{let r,n,i=0,o,s;if(A.sym_next!==0)do r=A.pending_buf[A.sym_buf+i++]&255,r+=(A.pending_buf[A.sym_buf+i++]&255)<<8,n=A.pending_buf[A.sym_buf+i++],r===0?$r(A,n,e):(o=Rs[n],$r(A,o+Xs+1,e),s=sf[o],s!==0&&(n-=Nf[o],$t(A,n,s)),r--,o=cg(r),$r(A,o,t),s=pl[o],s!==0&&(r-=Dl[o],$t(A,r,s)));while(i<A.sym_next);$r(A,Hf,e)},of=(A,e)=>{const t=e.dyn_tree,r=e.stat_desc.static_tree,n=e.stat_desc.has_stree,i=e.stat_desc.elems;let o,s,l=-1,u;for(A.heap_len=0,A.heap_max=tg,o=0;o<i;o++)t[o*2]!==0?(A.heap[++A.heap_len]=l=o,A.depth[o]=0):t[o*2+1]=0;for(;A.heap_len<2;)u=A.heap[++A.heap_len]=l<2?++l:0,t[u*2]=1,A.depth[u]=0,A.opt_len--,n&&(A.static_len-=r[u*2+1]);for(e.max_code=l,o=A.heap_len>>1;o>=1;o--)uu(A,t,o);u=i;do o=A.heap[1],A.heap[1]=A.heap[A.heap_len--],uu(A,t,1),s=A.heap[1],A.heap[--A.heap_max]=o,A.heap[--A.heap_max]=s,t[u*2]=t[o*2]+t[s*2],A.depth[u]=(A.depth[o]>=A.depth[s]?A.depth[o]:A.depth[s])+1,t[o*2+1]=t[s*2+1]=u,A.heap[1]=u++,uu(A,t,1);while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],A4(A,e),fg(t,l,A.bl_count)},H0=(A,e,t)=>{let r,n=-1,i,o=e[0*2+1],s=0,l=7,u=4;for(o===0&&(l=138,u=3),e[(t+1)*2+1]=65535,r=0;r<=t;r++)i=o,o=e[(r+1)*2+1],!(++s<l&&i===o)&&(s<u?A.bl_tree[i*2]+=s:i!==0?(i!==n&&A.bl_tree[i*2]++,A.bl_tree[rg*2]++):s<=10?A.bl_tree[ng*2]++:A.bl_tree[ig*2]++,s=0,n=i,o===0?(l=138,u=3):i===o?(l=6,u=3):(l=7,u=4))},N0=(A,e,t)=>{let r,n=-1,i,o=e[0*2+1],s=0,l=7,u=4;for(o===0&&(l=138,u=3),r=0;r<=t;r++)if(i=o,o=e[(r+1)*2+1],!(++s<l&&i===o)){if(s<u)do $r(A,i,A.bl_tree);while(--s!==0);else i!==0?(i!==n&&($r(A,i,A.bl_tree),s--),$r(A,rg,A.bl_tree),$t(A,s-3,2)):s<=10?($r(A,ng,A.bl_tree),$t(A,s-3,3)):($r(A,ig,A.bl_tree),$t(A,s-11,7));s=0,n=i,o===0?(l=138,u=3):i===o?(l=6,u=3):(l=7,u=4)}},t4=A=>{let e;for(H0(A,A.dyn_ltree,A.l_desc.max_code),H0(A,A.dyn_dtree,A.d_desc.max_code),of(A,A.bl_desc),e=Sf-1;e>=3&&A.bl_tree[ag[e]*2+1]===0;e--);return A.opt_len+=3*(e+1)+5+5+4,e},r4=(A,e,t,r)=>{let n;for($t(A,e-257,5),$t(A,t-1,5),$t(A,r-4,4),n=0;n<r;n++)$t(A,A.bl_tree[ag[n]*2+1],3);N0(A,A.dyn_ltree,e-1),N0(A,A.dyn_dtree,t-1)},n4=A=>{let e=4093624447,t;for(t=0;t<=31;t++,e>>>=1)if(e&1&&A.dyn_ltree[t*2]!==0)return E0;if(A.dyn_ltree[9*2]!==0||A.dyn_ltree[10*2]!==0||A.dyn_ltree[13*2]!==0)return L0;for(t=32;t<Xs;t++)if(A.dyn_ltree[t*2]!==0)return L0;return E0};let D0=!1;const i4=A=>{D0||(e4(),D0=!0),A.l_desc=new cu(A.dyn_ltree,sg),A.d_desc=new cu(A.dyn_dtree,og),A.bl_desc=new cu(A.bl_tree,lg),A.bi_buf=0,A.bi_valid=0,hg(A)},gg=(A,e,t,r)=>{$t(A,(qm<<1)+(r?1:0),3),dg(A),Ks(A,t),Ks(A,~t),t&&A.pending_buf.set(A.window.subarray(e,e+t),A.pending),A.pending+=t},a4=A=>{$t(A,eg<<1,3),$r(A,Hf,yn),$m(A)},s4=(A,e,t,r)=>{let n,i,o=0;A.level>0?(A.strm.data_type===Vm&&(A.strm.data_type=n4(A)),of(A,A.l_desc),of(A,A.d_desc),o=t4(A),n=A.opt_len+3+7>>>3,i=A.static_len+3+7>>>3,i<=n&&(n=i)):n=i=t+5,t+4<=n&&e!==-1?gg(A,e,t,r):A.strategy===Gm||i===n?($t(A,(eg<<1)+(r?1:0),3),S0(A,yn,Hs)):($t(A,(zm<<1)+(r?1:0),3),r4(A,A.l_desc.max_code+1,A.d_desc.max_code+1,o+1),S0(A,A.dyn_ltree,A.dyn_dtree)),hg(A),r&&dg(A)},o4=(A,e,t)=>(A.pending_buf[A.sym_buf+A.sym_next++]=e,A.pending_buf[A.sym_buf+A.sym_next++]=e>>8,A.pending_buf[A.sym_buf+A.sym_next++]=t,e===0?A.dyn_ltree[t*2]++:(A.matches++,e--,A.dyn_ltree[(Rs[t]+Xs+1)*2]++,A.dyn_dtree[cg(e)*2]++),A.sym_next===A.sym_end);var l4=i4,c4=gg,u4=s4,f4=o4,h4=a4,d4={_tr_init:l4,_tr_stored_block:c4,_tr_flush_block:u4,_tr_tally:f4,_tr_align:h4};const g4=(A,e,t,r)=>{let n=A&65535|0,i=A>>>16&65535|0,o=0;for(;t!==0;){o=t>2e3?2e3:t,t-=o;do n=n+e[r++]|0,i=i+n|0;while(--o);n%=65521,i%=65521}return n|i<<16|0};var js=g4;const B4=()=>{let A,e=[];for(var t=0;t<256;t++){A=t;for(var r=0;r<8;r++)A=A&1?3988292384^A>>>1:A>>>1;e[t]=A}return e},p4=new Uint32Array(B4()),w4=(A,e,t,r)=>{const n=p4,i=r+t;A^=-1;for(let o=r;o<i;o++)A=A>>>8^n[(A^e[o])&255];return A^-1};var Ct=w4,Da={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"},Js={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:v4,_tr_stored_block:lf,_tr_flush_block:m4,_tr_tally:ri,_tr_align:C4}=d4,{Z_NO_FLUSH:ni,Z_PARTIAL_FLUSH:b4,Z_FULL_FLUSH:F4,Z_FINISH:br,Z_BLOCK:k0,Z_OK:xt,Z_STREAM_END:T0,Z_STREAM_ERROR:en,Z_DATA_ERROR:Q4,Z_BUF_ERROR:fu,Z_DEFAULT_COMPRESSION:y4,Z_FILTERED:U4,Z_HUFFMAN_ONLY:nl,Z_RLE:_4,Z_FIXED:x4,Z_DEFAULT_STRATEGY:E4,Z_UNKNOWN:L4,Z_DEFLATED:Jl}=Js,I4=9,S4=15,H4=8,N4=29,D4=256,cf=D4+1+N4,k4=30,T4=19,O4=2*cf+1,P4=15,pe=3,$n=258,tn=$n+pe+1,M4=32,ka=42,Df=57,uf=69,ff=73,hf=91,df=103,Hi=113,ys=666,Wt=1,Ma=2,Pi=3,Ra=4,R4=3,Ni=(A,e)=>(A.msg=Da[e],e),O0=A=>A*2-(A>4?9:0),Xn=A=>{let e=A.length;for(;--e>=0;)A[e]=0},K4=A=>{let e,t,r,n=A.w_size;e=A.hash_size,r=e;do t=A.head[--r],A.head[r]=t>=n?t-n:0;while(--e);e=n,r=e;do t=A.prev[--r],A.prev[r]=t>=n?t-n:0;while(--e)};let j4=(A,e,t)=>(e<<A.hash_shift^t)&A.hash_mask,ii=j4;const cr=A=>{const e=A.state;let t=e.pending;t>A.avail_out&&(t=A.avail_out),t!==0&&(A.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+t),A.next_out),A.next_out+=t,e.pending_out+=t,A.total_out+=t,A.avail_out-=t,e.pending-=t,e.pending===0&&(e.pending_out=0))},fr=(A,e)=>{m4(A,A.block_start>=0?A.block_start:-1,A.strstart-A.block_start,e),A.block_start=A.strstart,cr(A.strm)},be=(A,e)=>{A.pending_buf[A.pending++]=e},ps=(A,e)=>{A.pending_buf[A.pending++]=e>>>8&255,A.pending_buf[A.pending++]=e&255},gf=(A,e,t,r)=>{let n=A.avail_in;return n>r&&(n=r),n===0?0:(A.avail_in-=n,e.set(A.input.subarray(A.next_in,A.next_in+n),t),A.state.wrap===1?A.adler=js(A.adler,e,n,t):A.state.wrap===2&&(A.adler=Ct(A.adler,e,n,t)),A.next_in+=n,A.total_in+=n,n)},Bg=(A,e)=>{let t=A.max_chain_length,r=A.strstart,n,i,o=A.prev_length,s=A.nice_match;const l=A.strstart>A.w_size-tn?A.strstart-(A.w_size-tn):0,u=A.window,f=A.w_mask,p=A.prev,w=A.strstart+$n;let g=u[r+o-1],F=u[r+o];A.prev_length>=A.good_match&&(t>>=2),s>A.lookahead&&(s=A.lookahead);do if(n=e,!(u[n+o]!==F||u[n+o-1]!==g||u[n]!==u[r]||u[++n]!==u[r+1])){r+=2,n++;do;while(u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&u[++r]===u[++n]&&r<w);if(i=$n-(w-r),r=w-$n,i>o){if(A.match_start=e,o=i,i>=s)break;g=u[r+o-1],F=u[r+o]}}while((e=p[e&f])>l&&--t!==0);return o<=A.lookahead?o:A.lookahead},Ta=A=>{const e=A.w_size;let t,r,n;do{if(r=A.window_size-A.lookahead-A.strstart,A.strstart>=e+(e-tn)&&(A.window.set(A.window.subarray(e,e+e-r),0),A.match_start-=e,A.strstart-=e,A.block_start-=e,A.insert>A.strstart&&(A.insert=A.strstart),K4(A),r+=e),A.strm.avail_in===0)break;if(t=gf(A.strm,A.window,A.strstart+A.lookahead,r),A.lookahead+=t,A.lookahead+A.insert>=pe)for(n=A.strstart-A.insert,A.ins_h=A.window[n],A.ins_h=ii(A,A.ins_h,A.window[n+1]);A.insert&&(A.ins_h=ii(A,A.ins_h,A.window[n+pe-1]),A.prev[n&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=n,n++,A.insert--,!(A.lookahead+A.insert<pe)););}while(A.lookahead<tn&&A.strm.avail_in!==0)},pg=(A,e)=>{let t=A.pending_buf_size-5>A.w_size?A.w_size:A.pending_buf_size-5,r,n,i,o=0,s=A.strm.avail_in;do{if(r=65535,i=A.bi_valid+42>>3,A.strm.avail_out<i||(i=A.strm.avail_out-i,n=A.strstart-A.block_start,r>n+A.strm.avail_in&&(r=n+A.strm.avail_in),r>i&&(r=i),r<t&&(r===0&&e!==br||e===ni||r!==n+A.strm.avail_in)))break;o=e===br&&r===n+A.strm.avail_in?1:0,lf(A,0,0,o),A.pending_buf[A.pending-4]=r,A.pending_buf[A.pending-3]=r>>8,A.pending_buf[A.pending-2]=~r,A.pending_buf[A.pending-1]=~r>>8,cr(A.strm),n&&(n>r&&(n=r),A.strm.output.set(A.window.subarray(A.block_start,A.block_start+n),A.strm.next_out),A.strm.next_out+=n,A.strm.avail_out-=n,A.strm.total_out+=n,A.block_start+=n,r-=n),r&&(gf(A.strm,A.strm.output,A.strm.next_out,r),A.strm.next_out+=r,A.strm.avail_out-=r,A.strm.total_out+=r)}while(o===0);return s-=A.strm.avail_in,s&&(s>=A.w_size?(A.matches=2,A.window.set(A.strm.input.subarray(A.strm.next_in-A.w_size,A.strm.next_in),0),A.strstart=A.w_size,A.insert=A.strstart):(A.window_size-A.strstart<=s&&(A.strstart-=A.w_size,A.window.set(A.window.subarray(A.w_size,A.w_size+A.strstart),0),A.matches<2&&A.matches++,A.insert>A.strstart&&(A.insert=A.strstart)),A.window.set(A.strm.input.subarray(A.strm.next_in-s,A.strm.next_in),A.strstart),A.strstart+=s,A.insert+=s>A.w_size-A.insert?A.w_size-A.insert:s),A.block_start=A.strstart),A.high_water<A.strstart&&(A.high_water=A.strstart),o?Ra:e!==ni&&e!==br&&A.strm.avail_in===0&&A.strstart===A.block_start?Ma:(i=A.window_size-A.strstart,A.strm.avail_in>i&&A.block_start>=A.w_size&&(A.block_start-=A.w_size,A.strstart-=A.w_size,A.window.set(A.window.subarray(A.w_size,A.w_size+A.strstart),0),A.matches<2&&A.matches++,i+=A.w_size,A.insert>A.strstart&&(A.insert=A.strstart)),i>A.strm.avail_in&&(i=A.strm.avail_in),i&&(gf(A.strm,A.window,A.strstart,i),A.strstart+=i,A.insert+=i>A.w_size-A.insert?A.w_size-A.insert:i),A.high_water<A.strstart&&(A.high_water=A.strstart),i=A.bi_valid+42>>3,i=A.pending_buf_size-i>65535?65535:A.pending_buf_size-i,t=i>A.w_size?A.w_size:i,n=A.strstart-A.block_start,(n>=t||(n||e===br)&&e!==ni&&A.strm.avail_in===0&&n<=i)&&(r=n>i?i:n,o=e===br&&A.strm.avail_in===0&&r===n?1:0,lf(A,A.block_start,r,o),A.block_start+=r,cr(A.strm)),o?Pi:Wt)},hu=(A,e)=>{let t,r;for(;;){if(A.lookahead<tn){if(Ta(A),A.lookahead<tn&&e===ni)return Wt;if(A.lookahead===0)break}if(t=0,A.lookahead>=pe&&(A.ins_h=ii(A,A.ins_h,A.window[A.strstart+pe-1]),t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),t!==0&&A.strstart-t<=A.w_size-tn&&(A.match_length=Bg(A,t)),A.match_length>=pe)if(r=ri(A,A.strstart-A.match_start,A.match_length-pe),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=pe){A.match_length--;do A.strstart++,A.ins_h=ii(A,A.ins_h,A.window[A.strstart+pe-1]),t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart;while(--A.match_length!==0);A.strstart++}else A.strstart+=A.match_length,A.match_length=0,A.ins_h=A.window[A.strstart],A.ins_h=ii(A,A.ins_h,A.window[A.strstart+1]);else r=ri(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(r&&(fr(A,!1),A.strm.avail_out===0))return Wt}return A.insert=A.strstart<pe-1?A.strstart:pe-1,e===br?(fr(A,!0),A.strm.avail_out===0?Pi:Ra):A.sym_next&&(fr(A,!1),A.strm.avail_out===0)?Wt:Ma},wa=(A,e)=>{let t,r,n;for(;;){if(A.lookahead<tn){if(Ta(A),A.lookahead<tn&&e===ni)return Wt;if(A.lookahead===0)break}if(t=0,A.lookahead>=pe&&(A.ins_h=ii(A,A.ins_h,A.window[A.strstart+pe-1]),t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),A.prev_length=A.match_length,A.prev_match=A.match_start,A.match_length=pe-1,t!==0&&A.prev_length<A.max_lazy_match&&A.strstart-t<=A.w_size-tn&&(A.match_length=Bg(A,t),A.match_length<=5&&(A.strategy===U4||A.match_length===pe&&A.strstart-A.match_start>4096)&&(A.match_length=pe-1)),A.prev_length>=pe&&A.match_length<=A.prev_length){n=A.strstart+A.lookahead-pe,r=ri(A,A.strstart-1-A.prev_match,A.prev_length-pe),A.lookahead-=A.prev_length-1,A.prev_length-=2;do++A.strstart<=n&&(A.ins_h=ii(A,A.ins_h,A.window[A.strstart+pe-1]),t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart);while(--A.prev_length!==0);if(A.match_available=0,A.match_length=pe-1,A.strstart++,r&&(fr(A,!1),A.strm.avail_out===0))return Wt}else if(A.match_available){if(r=ri(A,0,A.window[A.strstart-1]),r&&fr(A,!1),A.strstart++,A.lookahead--,A.strm.avail_out===0)return Wt}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(r=ri(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<pe-1?A.strstart:pe-1,e===br?(fr(A,!0),A.strm.avail_out===0?Pi:Ra):A.sym_next&&(fr(A,!1),A.strm.avail_out===0)?Wt:Ma},G4=(A,e)=>{let t,r,n,i;const o=A.window;for(;;){if(A.lookahead<=$n){if(Ta(A),A.lookahead<=$n&&e===ni)return Wt;if(A.lookahead===0)break}if(A.match_length=0,A.lookahead>=pe&&A.strstart>0&&(n=A.strstart-1,r=o[n],r===o[++n]&&r===o[++n]&&r===o[++n])){i=A.strstart+$n;do;while(r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&n<i);A.match_length=$n-(i-n),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=pe?(t=ri(A,1,A.match_length-pe),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=ri(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(fr(A,!1),A.strm.avail_out===0))return Wt}return A.insert=0,e===br?(fr(A,!0),A.strm.avail_out===0?Pi:Ra):A.sym_next&&(fr(A,!1),A.strm.avail_out===0)?Wt:Ma},V4=(A,e)=>{let t;for(;;){if(A.lookahead===0&&(Ta(A),A.lookahead===0)){if(e===ni)return Wt;break}if(A.match_length=0,t=ri(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(fr(A,!1),A.strm.avail_out===0))return Wt}return A.insert=0,e===br?(fr(A,!0),A.strm.avail_out===0?Pi:Ra):A.sym_next&&(fr(A,!1),A.strm.avail_out===0)?Wt:Ma};function Yr(A,e,t,r,n){this.good_length=A,this.max_lazy=e,this.nice_length=t,this.max_chain=r,this.func=n}const Us=[new Yr(0,0,0,0,pg),new Yr(4,4,8,4,hu),new Yr(4,5,16,8,hu),new Yr(4,6,32,32,hu),new Yr(4,4,16,16,wa),new Yr(8,16,32,32,wa),new Yr(8,16,128,128,wa),new Yr(8,32,128,256,wa),new Yr(32,128,258,1024,wa),new Yr(32,258,258,4096,wa)],q4=A=>{A.window_size=2*A.w_size,Xn(A.head),A.max_lazy_match=Us[A.level].max_lazy,A.good_match=Us[A.level].good_length,A.nice_match=Us[A.level].nice_length,A.max_chain_length=Us[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=pe-1,A.match_available=0,A.ins_h=0};function z4(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Jl,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(O4*2),this.dyn_dtree=new Uint16Array((2*k4+1)*2),this.bl_tree=new Uint16Array((2*T4+1)*2),Xn(this.dyn_ltree),Xn(this.dyn_dtree),Xn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(P4+1),this.heap=new Uint16Array(2*cf+1),Xn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*cf+1),Xn(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ys=A=>{if(!A)return 1;const e=A.state;return!e||e.strm!==A||e.status!==ka&&e.status!==Df&&e.status!==uf&&e.status!==ff&&e.status!==hf&&e.status!==df&&e.status!==Hi&&e.status!==ys?1:0},wg=A=>{if(Ys(A))return Ni(A,en);A.total_in=A.total_out=0,A.data_type=L4;const e=A.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?Df:e.wrap?ka:Hi,A.adler=e.wrap===2?0:1,e.last_flush=-2,v4(e),xt},vg=A=>{const e=wg(A);return e===xt&&q4(A.state),e},W4=(A,e)=>Ys(A)||A.state.wrap!==2?en:(A.state.gzhead=e,xt),mg=(A,e,t,r,n,i)=>{if(!A)return en;let o=1;if(e===y4&&(e=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>I4||t!==Jl||r<8||r>15||e<0||e>9||i<0||i>x4||r===8&&o!==1)return Ni(A,en);r===8&&(r=9);const s=new z4;return A.state=s,s.strm=A,s.status=ka,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+pe-1)/pe),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=e,s.strategy=i,s.method=t,vg(A)},X4=(A,e)=>mg(A,e,Jl,S4,H4,E4),J4=(A,e)=>{if(Ys(A)||e>k0||e<0)return A?Ni(A,en):en;const t=A.state;if(!A.output||A.avail_in!==0&&!A.input||t.status===ys&&e!==br)return Ni(A,A.avail_out===0?fu:en);const r=t.last_flush;if(t.last_flush=e,t.pending!==0){if(cr(A),A.avail_out===0)return t.last_flush=-1,xt}else if(A.avail_in===0&&O0(e)<=O0(r)&&e!==br)return Ni(A,fu);if(t.status===ys&&A.avail_in!==0)return Ni(A,fu);if(t.status===ka&&t.wrap===0&&(t.status=Hi),t.status===ka){let n=Jl+(t.w_bits-8<<4)<<8,i=-1;if(t.strategy>=nl||t.level<2?i=0:t.level<6?i=1:t.level===6?i=2:i=3,n|=i<<6,t.strstart!==0&&(n|=M4),n+=31-n%31,ps(t,n),t.strstart!==0&&(ps(t,A.adler>>>16),ps(t,A.adler&65535)),A.adler=1,t.status=Hi,cr(A),t.pending!==0)return t.last_flush=-1,xt}if(t.status===Df){if(A.adler=0,be(t,31),be(t,139),be(t,8),t.gzhead)be(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),be(t,t.gzhead.time&255),be(t,t.gzhead.time>>8&255),be(t,t.gzhead.time>>16&255),be(t,t.gzhead.time>>24&255),be(t,t.level===9?2:t.strategy>=nl||t.level<2?4:0),be(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(be(t,t.gzhead.extra.length&255),be(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(A.adler=Ct(A.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=uf;else if(be(t,0),be(t,0),be(t,0),be(t,0),be(t,0),be(t,t.level===9?2:t.strategy>=nl||t.level<2?4:0),be(t,R4),t.status=Hi,cr(A),t.pending!==0)return t.last_flush=-1,xt}if(t.status===uf){if(t.gzhead.extra){let n=t.pending,i=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+i>t.pending_buf_size;){let s=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+s),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>n&&(A.adler=Ct(A.adler,t.pending_buf,t.pending-n,n)),t.gzindex+=s,cr(A),t.pending!==0)return t.last_flush=-1,xt;n=0,i-=s}let o=new Uint8Array(t.gzhead.extra);t.pending_buf.set(o.subarray(t.gzindex,t.gzindex+i),t.pending),t.pending+=i,t.gzhead.hcrc&&t.pending>n&&(A.adler=Ct(A.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=ff}if(t.status===ff){if(t.gzhead.name){let n=t.pending,i;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>n&&(A.adler=Ct(A.adler,t.pending_buf,t.pending-n,n)),cr(A),t.pending!==0)return t.last_flush=-1,xt;n=0}t.gzindex<t.gzhead.name.length?i=t.gzhead.name.charCodeAt(t.gzindex++)&255:i=0,be(t,i)}while(i!==0);t.gzhead.hcrc&&t.pending>n&&(A.adler=Ct(A.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=hf}if(t.status===hf){if(t.gzhead.comment){let n=t.pending,i;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>n&&(A.adler=Ct(A.adler,t.pending_buf,t.pending-n,n)),cr(A),t.pending!==0)return t.last_flush=-1,xt;n=0}t.gzindex<t.gzhead.comment.length?i=t.gzhead.comment.charCodeAt(t.gzindex++)&255:i=0,be(t,i)}while(i!==0);t.gzhead.hcrc&&t.pending>n&&(A.adler=Ct(A.adler,t.pending_buf,t.pending-n,n))}t.status=df}if(t.status===df){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(cr(A),t.pending!==0))return t.last_flush=-1,xt;be(t,A.adler&255),be(t,A.adler>>8&255),A.adler=0}if(t.status=Hi,cr(A),t.pending!==0)return t.last_flush=-1,xt}if(A.avail_in!==0||t.lookahead!==0||e!==ni&&t.status!==ys){let n=t.level===0?pg(t,e):t.strategy===nl?V4(t,e):t.strategy===_4?G4(t,e):Us[t.level].func(t,e);if((n===Pi||n===Ra)&&(t.status=ys),n===Wt||n===Pi)return A.avail_out===0&&(t.last_flush=-1),xt;if(n===Ma&&(e===b4?C4(t):e!==k0&&(lf(t,0,0,!1),e===F4&&(Xn(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),cr(A),A.avail_out===0))return t.last_flush=-1,xt}return e!==br?xt:t.wrap<=0?T0:(t.wrap===2?(be(t,A.adler&255),be(t,A.adler>>8&255),be(t,A.adler>>16&255),be(t,A.adler>>24&255),be(t,A.total_in&255),be(t,A.total_in>>8&255),be(t,A.total_in>>16&255),be(t,A.total_in>>24&255)):(ps(t,A.adler>>>16),ps(t,A.adler&65535)),cr(A),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?xt:T0)},Y4=A=>{if(Ys(A))return en;const e=A.state.status;return A.state=null,e===Hi?Ni(A,Q4):xt},Z4=(A,e)=>{let t=e.length;if(Ys(A))return en;const r=A.state,n=r.wrap;if(n===2||n===1&&r.status!==ka||r.lookahead)return en;if(n===1&&(A.adler=js(A.adler,e,t,0)),r.wrap=0,t>=r.w_size){n===0&&(Xn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(e.subarray(t-r.w_size,t),0),e=l,t=r.w_size}const i=A.avail_in,o=A.next_in,s=A.input;for(A.avail_in=t,A.next_in=0,A.input=e,Ta(r);r.lookahead>=pe;){let l=r.strstart,u=r.lookahead-(pe-1);do r.ins_h=ii(r,r.ins_h,r.window[l+pe-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--u);r.strstart=l,r.lookahead=pe-1,Ta(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=pe-1,r.match_available=0,A.next_in=o,A.input=s,A.avail_in=i,r.wrap=n,xt};var $4=X4,AC=mg,eC=vg,tC=wg,rC=W4,nC=J4,iC=Y4,aC=Z4,sC="pako deflate (from Nodeca project)",Ns={deflateInit:$4,deflateInit2:AC,deflateReset:eC,deflateResetKeep:tC,deflateSetHeader:rC,deflate:nC,deflateEnd:iC,deflateSetDictionary:aC,deflateInfo:sC};const oC=(A,e)=>Object.prototype.hasOwnProperty.call(A,e);var lC=function(A){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const r in t)oC(t,r)&&(A[r]=t[r])}}return A},cC=A=>{let e=0;for(let r=0,n=A.length;r<n;r++)e+=A[r].length;const t=new Uint8Array(e);for(let r=0,n=0,i=A.length;r<i;r++){let o=A[r];t.set(o,n),n+=o.length}return t},Yl={assign:lC,flattenChunks:cC};let Cg=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Cg=!1}const Gs=new Uint8Array(256);for(let A=0;A<256;A++)Gs[A]=A>=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;Gs[254]=Gs[254]=1;var uC=A=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(A);let e,t,r,n,i,o=A.length,s=0;for(n=0;n<o;n++)t=A.charCodeAt(n),(t&64512)===55296&&n+1<o&&(r=A.charCodeAt(n+1),(r&64512)===56320&&(t=65536+(t-55296<<10)+(r-56320),n++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(s),i=0,n=0;i<s;n++)t=A.charCodeAt(n),(t&64512)===55296&&n+1<o&&(r=A.charCodeAt(n+1),(r&64512)===56320&&(t=65536+(t-55296<<10)+(r-56320),n++)),t<128?e[i++]=t:t<2048?(e[i++]=192|t>>>6,e[i++]=128|t&63):t<65536?(e[i++]=224|t>>>12,e[i++]=128|t>>>6&63,e[i++]=128|t&63):(e[i++]=240|t>>>18,e[i++]=128|t>>>12&63,e[i++]=128|t>>>6&63,e[i++]=128|t&63);return e};const fC=(A,e)=>{if(e<65534&&A.subarray&&Cg)return String.fromCharCode.apply(null,A.length===e?A:A.subarray(0,e));let t="";for(let r=0;r<e;r++)t+=String.fromCharCode(A[r]);return t};var hC=(A,e)=>{const t=e||A.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(A.subarray(0,e));let r,n;const i=new Array(t*2);for(n=0,r=0;r<t;){let o=A[r++];if(o<128){i[n++]=o;continue}let s=Gs[o];if(s>4){i[n++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<t;)o=o<<6|A[r++]&63,s--;if(s>1){i[n++]=65533;continue}o<65536?i[n++]=o:(o-=65536,i[n++]=55296|o>>10&1023,i[n++]=56320|o&1023)}return fC(i,n)},dC=(A,e)=>{e=e||A.length,e>A.length&&(e=A.length);let t=e-1;for(;t>=0&&(A[t]&192)===128;)t--;return t<0||t===0?e:t+Gs[A[t]]>e?t:e},Vs={string2buf:uC,buf2string:hC,utf8border:dC};function gC(){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 bg=gC;const Fg=Object.prototype.toString,{Z_NO_FLUSH:BC,Z_SYNC_FLUSH:pC,Z_FULL_FLUSH:wC,Z_FINISH:vC,Z_OK:kl,Z_STREAM_END:mC,Z_DEFAULT_COMPRESSION:CC,Z_DEFAULT_STRATEGY:bC,Z_DEFLATED:FC}=Js;function kf(A){this.options=Yl.assign({level:CC,method:FC,chunkSize:16384,windowBits:15,memLevel:8,strategy:bC},A||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bg,this.strm.avail_out=0;let t=Ns.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==kl)throw new Error(Da[t]);if(e.header&&Ns.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=Vs.string2buf(e.dictionary):Fg.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,t=Ns.deflateSetDictionary(this.strm,r),t!==kl)throw new Error(Da[t]);this._dict_set=!0}}kf.prototype.push=function(A,e){const t=this.strm,r=this.options.chunkSize;let n,i;if(this.ended)return!1;for(e===~~e?i=e:i=e===!0?vC:BC,typeof A=="string"?t.input=Vs.string2buf(A):Fg.call(A)==="[object ArrayBuffer]"?t.input=new Uint8Array(A):t.input=A,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(r),t.next_out=0,t.avail_out=r),(i===pC||i===wC)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(n=Ns.deflate(t,i),n===mC)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),n=Ns.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===kl;if(t.avail_out===0){this.onData(t.output);continue}if(i>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};kf.prototype.onData=function(A){this.chunks.push(A)};kf.prototype.onEnd=function(A){A===kl&&(this.result=Yl.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};const il=16209,QC=16191;var yC=function(e,t){let r,n,i,o,s,l,u,f,p,w,g,F,y,S,b,P,G,O,J,Z,nA,q,H,AA;const _=e.state;r=e.next_in,H=e.input,n=r+(e.avail_in-5),i=e.next_out,AA=e.output,o=i-(t-e.avail_out),s=i+(e.avail_out-257),l=_.dmax,u=_.wsize,f=_.whave,p=_.wnext,w=_.window,g=_.hold,F=_.bits,y=_.lencode,S=_.distcode,b=(1<<_.lenbits)-1,P=(1<<_.distbits)-1;A:do{F<15&&(g+=H[r++]<<F,F+=8,g+=H[r++]<<F,F+=8),G=y[g&b];e:for(;;){if(O=G>>>24,g>>>=O,F-=O,O=G>>>16&255,O===0)AA[i++]=G&65535;else if(O&16){J=G&65535,O&=15,O&&(F<O&&(g+=H[r++]<<F,F+=8),J+=g&(1<<O)-1,g>>>=O,F-=O),F<15&&(g+=H[r++]<<F,F+=8,g+=H[r++]<<F,F+=8),G=S[g&P];t:for(;;){if(O=G>>>24,g>>>=O,F-=O,O=G>>>16&255,O&16){if(Z=G&65535,O&=15,F<O&&(g+=H[r++]<<F,F+=8,F<O&&(g+=H[r++]<<F,F+=8)),Z+=g&(1<<O)-1,Z>l){e.msg="invalid distance too far back",_.mode=il;break A}if(g>>>=O,F-=O,O=i-o,Z>O){if(O=Z-O,O>f&&_.sane){e.msg="invalid distance too far back",_.mode=il;break A}if(nA=0,q=w,p===0){if(nA+=u-O,O<J){J-=O;do AA[i++]=w[nA++];while(--O);nA=i-Z,q=AA}}else if(p<O){if(nA+=u+p-O,O-=p,O<J){J-=O;do AA[i++]=w[nA++];while(--O);if(nA=0,p<J){O=p,J-=O;do AA[i++]=w[nA++];while(--O);nA=i-Z,q=AA}}}else if(nA+=p-O,O<J){J-=O;do AA[i++]=w[nA++];while(--O);nA=i-Z,q=AA}for(;J>2;)AA[i++]=q[nA++],AA[i++]=q[nA++],AA[i++]=q[nA++],J-=3;J&&(AA[i++]=q[nA++],J>1&&(AA[i++]=q[nA++]))}else{nA=i-Z;do AA[i++]=AA[nA++],AA[i++]=AA[nA++],AA[i++]=AA[nA++],J-=3;while(J>2);J&&(AA[i++]=AA[nA++],J>1&&(AA[i++]=AA[nA++]))}}else if(O&64){e.msg="invalid distance code",_.mode=il;break A}else{G=S[(G&65535)+(g&(1<<O)-1)];continue t}break}}else if(O&64)if(O&32){_.mode=QC;break A}else{e.msg="invalid literal/length code",_.mode=il;break A}else{G=y[(G&65535)+(g&(1<<O)-1)];continue e}break}}while(r<n&&i<s);J=F>>3,r-=J,F-=J<<3,g&=(1<<F)-1,e.next_in=r,e.next_out=i,e.avail_in=r<n?5+(n-r):5-(r-n),e.avail_out=i<s?257+(s-i):257-(i-s),_.hold=g,_.bits=F};const va=15,P0=852,M0=592,R0=0,du=1,K0=2,UC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),_C=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),xC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),EC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),LC=(A,e,t,r,n,i,o,s)=>{const l=s.bits;let u=0,f=0,p=0,w=0,g=0,F=0,y=0,S=0,b=0,P=0,G,O,J,Z,nA,q=null,H;const AA=new Uint16Array(va+1),_=new Uint16Array(va+1);let I=null,K,j,sA;for(u=0;u<=va;u++)AA[u]=0;for(f=0;f<r;f++)AA[e[t+f]]++;for(g=l,w=va;w>=1&&AA[w]===0;w--);if(g>w&&(g=w),w===0)return n[i++]=1<<24|64<<16|0,n[i++]=1<<24|64<<16|0,s.bits=1,0;for(p=1;p<w&&AA[p]===0;p++);for(g<p&&(g=p),S=1,u=1;u<=va;u++)if(S<<=1,S-=AA[u],S<0)return-1;if(S>0&&(A===R0||w!==1))return-1;for(_[1]=0,u=1;u<va;u++)_[u+1]=_[u]+AA[u];for(f=0;f<r;f++)e[t+f]!==0&&(o[_[e[t+f]]++]=f);if(A===R0?(q=I=o,H=20):A===du?(q=UC,I=_C,H=257):(q=xC,I=EC,H=0),P=0,f=0,u=p,nA=i,F=g,y=0,J=-1,b=1<<g,Z=b-1,A===du&&b>P0||A===K0&&b>M0)return 1;for(;;){K=u-y,o[f]+1<H?(j=0,sA=o[f]):o[f]>=H?(j=I[o[f]-H],sA=q[o[f]-H]):(j=32+64,sA=0),G=1<<u-y,O=1<<F,p=O;do O-=G,n[nA+(P>>y)+O]=K<<24|j<<16|sA|0;while(O!==0);for(G=1<<u-1;P&G;)G>>=1;if(G!==0?(P&=G-1,P+=G):P=0,f++,--AA[u]===0){if(u===w)break;u=e[t+o[f]]}if(u>g&&(P&Z)!==J){for(y===0&&(y=g),nA+=p,F=u-y,S=1<<F;F+y<w&&(S-=AA[F+y],!(S<=0));)F++,S<<=1;if(b+=1<<F,A===du&&b>P0||A===K0&&b>M0)return 1;J=P&Z,n[J]=g<<24|F<<16|nA-i|0}}return P!==0&&(n[nA+P]=u-y<<24|64<<16|0),s.bits=g,0};var Ds=LC;const IC=0,Qg=1,yg=2,{Z_FINISH:j0,Z_BLOCK:SC,Z_TREES:al,Z_OK:Mi,Z_STREAM_END:HC,Z_NEED_DICT:NC,Z_STREAM_ERROR:yr,Z_DATA_ERROR:Ug,Z_MEM_ERROR:_g,Z_BUF_ERROR:DC,Z_DEFLATED:G0}=Js,Zl=16180,V0=16181,q0=16182,z0=16183,W0=16184,X0=16185,J0=16186,Y0=16187,Z0=16188,$0=16189,Tl=16190,Qn=16191,gu=16192,Ad=16193,Bu=16194,ed=16195,td=16196,rd=16197,nd=16198,sl=16199,ol=16200,id=16201,ad=16202,sd=16203,od=16204,ld=16205,pu=16206,cd=16207,ud=16208,qe=16209,xg=16210,Eg=16211,kC=852,TC=592,OC=15,PC=OC,fd=A=>(A>>>24&255)+(A>>>8&65280)+((A&65280)<<8)+((A&255)<<24);function MC(){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 Ki=A=>{if(!A)return 1;const e=A.state;return!e||e.strm!==A||e.mode<Zl||e.mode>Eg?1:0},Lg=A=>{if(Ki(A))return yr;const e=A.state;return A.total_in=A.total_out=e.total=0,A.msg="",e.wrap&&(A.adler=e.wrap&1),e.mode=Zl,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(kC),e.distcode=e.distdyn=new Int32Array(TC),e.sane=1,e.back=-1,Mi},Ig=A=>{if(Ki(A))return yr;const e=A.state;return e.wsize=0,e.whave=0,e.wnext=0,Lg(A)},Sg=(A,e)=>{let t;if(Ki(A))return yr;const r=A.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?yr:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=t,r.wbits=e,Ig(A))},Hg=(A,e)=>{if(!A)return yr;const t=new MC;A.state=t,t.strm=A,t.window=null,t.mode=Zl;const r=Sg(A,e);return r!==Mi&&(A.state=null),r},RC=A=>Hg(A,PC);let hd=!0,wu,vu;const KC=A=>{if(hd){wu=new Int32Array(512),vu=new Int32Array(32);let e=0;for(;e<144;)A.lens[e++]=8;for(;e<256;)A.lens[e++]=9;for(;e<280;)A.lens[e++]=7;for(;e<288;)A.lens[e++]=8;for(Ds(Qg,A.lens,0,288,wu,0,A.work,{bits:9}),e=0;e<32;)A.lens[e++]=5;Ds(yg,A.lens,0,32,vu,0,A.work,{bits:5}),hd=!1}A.lencode=wu,A.lenbits=9,A.distcode=vu,A.distbits=5},Ng=(A,e,t,r)=>{let n;const i=A.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(e.subarray(t-i.wsize,t),0),i.wnext=0,i.whave=i.wsize):(n=i.wsize-i.wnext,n>r&&(n=r),i.window.set(e.subarray(t-r,t-r+n),i.wnext),r-=n,r?(i.window.set(e.subarray(t-r,t),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=n,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=n))),0},jC=(A,e)=>{let t,r,n,i,o,s,l,u,f,p,w,g,F,y,S=0,b,P,G,O,J,Z,nA,q;const H=new Uint8Array(4);let AA,_;const I=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ki(A)||!A.output||!A.input&&A.avail_in!==0)return yr;t=A.state,t.mode===Qn&&(t.mode=gu),o=A.next_out,n=A.output,l=A.avail_out,i=A.next_in,r=A.input,s=A.avail_in,u=t.hold,f=t.bits,p=s,w=l,q=Mi;A:for(;;)switch(t.mode){case Zl:if(t.wrap===0){t.mode=gu;break}for(;f<16;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(t.wrap&2&&u===35615){t.wbits===0&&(t.wbits=15),t.check=0,H[0]=u&255,H[1]=u>>>8&255,t.check=Ct(t.check,H,2,0),u=0,f=0,t.mode=V0;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((u&255)<<8)+(u>>8))%31){A.msg="incorrect header check",t.mode=qe;break}if((u&15)!==G0){A.msg="unknown compression method",t.mode=qe;break}if(u>>>=4,f-=4,nA=(u&15)+8,t.wbits===0&&(t.wbits=nA),nA>15||nA>t.wbits){A.msg="invalid window size",t.mode=qe;break}t.dmax=1<<t.wbits,t.flags=0,A.adler=t.check=1,t.mode=u&512?$0:Qn,u=0,f=0;break;case V0:for(;f<16;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(t.flags=u,(t.flags&255)!==G0){A.msg="unknown compression method",t.mode=qe;break}if(t.flags&57344){A.msg="unknown header flags set",t.mode=qe;break}t.head&&(t.head.text=u>>8&1),t.flags&512&&t.wrap&4&&(H[0]=u&255,H[1]=u>>>8&255,t.check=Ct(t.check,H,2,0)),u=0,f=0,t.mode=q0;case q0:for(;f<32;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.head&&(t.head.time=u),t.flags&512&&t.wrap&4&&(H[0]=u&255,H[1]=u>>>8&255,H[2]=u>>>16&255,H[3]=u>>>24&255,t.check=Ct(t.check,H,4,0)),u=0,f=0,t.mode=z0;case z0:for(;f<16;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.head&&(t.head.xflags=u&255,t.head.os=u>>8),t.flags&512&&t.wrap&4&&(H[0]=u&255,H[1]=u>>>8&255,t.check=Ct(t.check,H,2,0)),u=0,f=0,t.mode=W0;case W0:if(t.flags&1024){for(;f<16;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.length=u,t.head&&(t.head.extra_len=u),t.flags&512&&t.wrap&4&&(H[0]=u&255,H[1]=u>>>8&255,t.check=Ct(t.check,H,2,0)),u=0,f=0}else t.head&&(t.head.extra=null);t.mode=X0;case X0:if(t.flags&1024&&(g=t.length,g>s&&(g=s),g&&(t.head&&(nA=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(r.subarray(i,i+g),nA)),t.flags&512&&t.wrap&4&&(t.check=Ct(t.check,r,g,i)),s-=g,i+=g,t.length-=g),t.length))break A;t.length=0,t.mode=J0;case J0:if(t.flags&2048){if(s===0)break A;g=0;do nA=r[i+g++],t.head&&nA&&t.length<65536&&(t.head.name+=String.fromCharCode(nA));while(nA&&g<s);if(t.flags&512&&t.wrap&4&&(t.check=Ct(t.check,r,g,i)),s-=g,i+=g,nA)break A}else t.head&&(t.head.name=null);t.length=0,t.mode=Y0;case Y0:if(t.flags&4096){if(s===0)break A;g=0;do nA=r[i+g++],t.head&&nA&&t.length<65536&&(t.head.comment+=String.fromCharCode(nA));while(nA&&g<s);if(t.flags&512&&t.wrap&4&&(t.check=Ct(t.check,r,g,i)),s-=g,i+=g,nA)break A}else t.head&&(t.head.comment=null);t.mode=Z0;case Z0:if(t.flags&512){for(;f<16;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(t.wrap&4&&u!==(t.check&65535)){A.msg="header crc mismatch",t.mode=qe;break}u=0,f=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=Qn;break;case $0:for(;f<32;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}A.adler=t.check=fd(u),u=0,f=0,t.mode=Tl;case Tl:if(t.havedict===0)return A.next_out=o,A.avail_out=l,A.next_in=i,A.avail_in=s,t.hold=u,t.bits=f,NC;A.adler=t.check=1,t.mode=Qn;case Qn:if(e===SC||e===al)break A;case gu:if(t.last){u>>>=f&7,f-=f&7,t.mode=pu;break}for(;f<3;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}switch(t.last=u&1,u>>>=1,f-=1,u&3){case 0:t.mode=Ad;break;case 1:if(KC(t),t.mode=sl,e===al){u>>>=2,f-=2;break A}break;case 2:t.mode=td;break;case 3:A.msg="invalid block type",t.mode=qe}u>>>=2,f-=2;break;case Ad:for(u>>>=f&7,f-=f&7;f<32;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if((u&65535)!==(u>>>16^65535)){A.msg="invalid stored block lengths",t.mode=qe;break}if(t.length=u&65535,u=0,f=0,t.mode=Bu,e===al)break A;case Bu:t.mode=ed;case ed:if(g=t.length,g){if(g>s&&(g=s),g>l&&(g=l),g===0)break A;n.set(r.subarray(i,i+g),o),s-=g,i+=g,l-=g,o+=g,t.length-=g;break}t.mode=Qn;break;case td:for(;f<14;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(t.nlen=(u&31)+257,u>>>=5,f-=5,t.ndist=(u&31)+1,u>>>=5,f-=5,t.ncode=(u&15)+4,u>>>=4,f-=4,t.nlen>286||t.ndist>30){A.msg="too many length or distance symbols",t.mode=qe;break}t.have=0,t.mode=rd;case rd:for(;t.have<t.ncode;){for(;f<3;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.lens[I[t.have++]]=u&7,u>>>=3,f-=3}for(;t.have<19;)t.lens[I[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,AA={bits:t.lenbits},q=Ds(IC,t.lens,0,19,t.lencode,0,t.work,AA),t.lenbits=AA.bits,q){A.msg="invalid code lengths set",t.mode=qe;break}t.have=0,t.mode=nd;case nd:for(;t.have<t.nlen+t.ndist;){for(;S=t.lencode[u&(1<<t.lenbits)-1],b=S>>>24,P=S>>>16&255,G=S&65535,!(b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(G<16)u>>>=b,f-=b,t.lens[t.have++]=G;else{if(G===16){for(_=b+2;f<_;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(u>>>=b,f-=b,t.have===0){A.msg="invalid bit length repeat",t.mode=qe;break}nA=t.lens[t.have-1],g=3+(u&3),u>>>=2,f-=2}else if(G===17){for(_=b+3;f<_;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}u>>>=b,f-=b,nA=0,g=3+(u&7),u>>>=3,f-=3}else{for(_=b+7;f<_;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}u>>>=b,f-=b,nA=0,g=11+(u&127),u>>>=7,f-=7}if(t.have+g>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=qe;break}for(;g--;)t.lens[t.have++]=nA}}if(t.mode===qe)break;if(t.lens[256]===0){A.msg="invalid code -- missing end-of-block",t.mode=qe;break}if(t.lenbits=9,AA={bits:t.lenbits},q=Ds(Qg,t.lens,0,t.nlen,t.lencode,0,t.work,AA),t.lenbits=AA.bits,q){A.msg="invalid literal/lengths set",t.mode=qe;break}if(t.distbits=6,t.distcode=t.distdyn,AA={bits:t.distbits},q=Ds(yg,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,AA),t.distbits=AA.bits,q){A.msg="invalid distances set",t.mode=qe;break}if(t.mode=sl,e===al)break A;case sl:t.mode=ol;case ol:if(s>=6&&l>=258){A.next_out=o,A.avail_out=l,A.next_in=i,A.avail_in=s,t.hold=u,t.bits=f,yC(A,w),o=A.next_out,n=A.output,l=A.avail_out,i=A.next_in,r=A.input,s=A.avail_in,u=t.hold,f=t.bits,t.mode===Qn&&(t.back=-1);break}for(t.back=0;S=t.lencode[u&(1<<t.lenbits)-1],b=S>>>24,P=S>>>16&255,G=S&65535,!(b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(P&&!(P&240)){for(O=b,J=P,Z=G;S=t.lencode[Z+((u&(1<<O+J)-1)>>O)],b=S>>>24,P=S>>>16&255,G=S&65535,!(O+b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}u>>>=O,f-=O,t.back+=O}if(u>>>=b,f-=b,t.back+=b,t.length=G,P===0){t.mode=ld;break}if(P&32){t.back=-1,t.mode=Qn;break}if(P&64){A.msg="invalid literal/length code",t.mode=qe;break}t.extra=P&15,t.mode=id;case id:if(t.extra){for(_=t.extra;f<_;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.length+=u&(1<<t.extra)-1,u>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=ad;case ad:for(;S=t.distcode[u&(1<<t.distbits)-1],b=S>>>24,P=S>>>16&255,G=S&65535,!(b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(!(P&240)){for(O=b,J=P,Z=G;S=t.distcode[Z+((u&(1<<O+J)-1)>>O)],b=S>>>24,P=S>>>16&255,G=S&65535,!(O+b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}u>>>=O,f-=O,t.back+=O}if(u>>>=b,f-=b,t.back+=b,P&64){A.msg="invalid distance code",t.mode=qe;break}t.offset=G,t.extra=P&15,t.mode=sd;case sd:if(t.extra){for(_=t.extra;f<_;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.offset+=u&(1<<t.extra)-1,u>>>=t.extra,f-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=qe;break}t.mode=od;case od:if(l===0)break A;if(g=w-l,t.offset>g){if(g=t.offset-g,g>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=qe;break}g>t.wnext?(g-=t.wnext,F=t.wsize-g):F=t.wnext-g,g>t.length&&(g=t.length),y=t.window}else y=n,F=o-t.offset,g=t.length;g>l&&(g=l),l-=g,t.length-=g;do n[o++]=y[F++];while(--g);t.length===0&&(t.mode=ol);break;case ld:if(l===0)break A;n[o++]=t.length,l--,t.mode=ol;break;case pu:if(t.wrap){for(;f<32;){if(s===0)break A;s--,u|=r[i++]<<f,f+=8}if(w-=l,A.total_out+=w,t.total+=w,t.wrap&4&&w&&(A.adler=t.check=t.flags?Ct(t.check,n,w,o-w):js(t.check,n,w,o-w)),w=l,t.wrap&4&&(t.flags?u:fd(u))!==t.check){A.msg="incorrect data check",t.mode=qe;break}u=0,f=0}t.mode=cd;case cd:if(t.wrap&&t.flags){for(;f<32;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(t.wrap&4&&u!==(t.total&4294967295)){A.msg="incorrect length check",t.mode=qe;break}u=0,f=0}t.mode=ud;case ud:q=HC;break A;case qe:q=Ug;break A;case xg:return _g;case Eg:default:return yr}return A.next_out=o,A.avail_out=l,A.next_in=i,A.avail_in=s,t.hold=u,t.bits=f,(t.wsize||w!==A.avail_out&&t.mode<qe&&(t.mode<pu||e!==j0))&&Ng(A,A.output,A.next_out,w-A.avail_out),p-=A.avail_in,w-=A.avail_out,A.total_in+=p,A.total_out+=w,t.total+=w,t.wrap&4&&w&&(A.adler=t.check=t.flags?Ct(t.check,n,w,A.next_out-w):js(t.check,n,w,A.next_out-w)),A.data_type=t.bits+(t.last?64:0)+(t.mode===Qn?128:0)+(t.mode===sl||t.mode===Bu?256:0),(p===0&&w===0||e===j0)&&q===Mi&&(q=DC),q},GC=A=>{if(Ki(A))return yr;let e=A.state;return e.window&&(e.window=null),A.state=null,Mi},VC=(A,e)=>{if(Ki(A))return yr;const t=A.state;return t.wrap&2?(t.head=e,e.done=!1,Mi):yr},qC=(A,e)=>{const t=e.length;let r,n,i;return Ki(A)||(r=A.state,r.wrap!==0&&r.mode!==Tl)?yr:r.mode===Tl&&(n=1,n=js(n,e,t,0),n!==r.check)?Ug:(i=Ng(A,e,t,t),i?(r.mode=xg,_g):(r.havedict=1,Mi))};var zC=Ig,WC=Sg,XC=Lg,JC=RC,YC=Hg,ZC=jC,$C=GC,Ab=VC,eb=qC,tb="pako inflate (from Nodeca project)",Un={inflateReset:zC,inflateReset2:WC,inflateResetKeep:XC,inflateInit:JC,inflateInit2:YC,inflate:ZC,inflateEnd:$C,inflateGetHeader:Ab,inflateSetDictionary:eb,inflateInfo:tb};function rb(){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 nb=rb;const Dg=Object.prototype.toString,{Z_NO_FLUSH:ib,Z_FINISH:ab,Z_OK:qs,Z_STREAM_END:mu,Z_NEED_DICT:Cu,Z_STREAM_ERROR:sb,Z_DATA_ERROR:dd,Z_MEM_ERROR:ob}=Js;function Zs(A){this.options=Yl.assign({chunkSize:1024*64,windowBits:15,to:""},A||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(A&&A.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bg,this.strm.avail_out=0;let t=Un.inflateInit2(this.strm,e.windowBits);if(t!==qs)throw new Error(Da[t]);if(this.header=new nb,Un.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Vs.string2buf(e.dictionary):Dg.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=Un.inflateSetDictionary(this.strm,e.dictionary),t!==qs)))throw new Error(Da[t])}Zs.prototype.push=function(A,e){const t=this.strm,r=this.options.chunkSize,n=this.options.dictionary;let i,o,s;if(this.ended)return!1;for(e===~~e?o=e:o=e===!0?ab:ib,Dg.call(A)==="[object ArrayBuffer]"?t.input=new Uint8Array(A):t.input=A,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(r),t.next_out=0,t.avail_out=r),i=Un.inflate(t,o),i===Cu&&n&&(i=Un.inflateSetDictionary(t,n),i===qs?i=Un.inflate(t,o):i===dd&&(i=Cu));t.avail_in>0&&i===mu&&t.state.wrap>0&&A[t.next_in]!==0;)Un.inflateReset(t),i=Un.inflate(t,o);switch(i){case sb:case dd:case Cu:case ob:return this.onEnd(i),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||i===mu))if(this.options.to==="string"){let l=Vs.utf8border(t.output,t.next_out),u=t.next_out-l,f=Vs.buf2string(t.output,l);t.next_out=u,t.avail_out=r-u,u&&t.output.set(t.output.subarray(l,l+u),0),this.onData(f)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(i===qs&&s===0)){if(i===mu)return i=Un.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Zs.prototype.onData=function(A){this.chunks.push(A)};Zs.prototype.onEnd=function(A){A===qs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Yl.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function Tf(A,e){const t=new Zs(e);if(t.push(A),t.err)throw t.msg||Da[t.err];return t.result}function lb(A,e){return e=e||{},e.raw=!0,Tf(A,e)}var cb=Zs,ub=Tf,fb=lb,hb=Tf,db=Js,gb={Inflate:cb,inflate:ub,inflateRaw:fb,ungzip:hb,constants:db};const{Inflate:Bb,inflate:pb,inflateRaw:pQ,ungzip:wQ}=gb;var gd=Bb,wb=pb;const kg=[];for(let A=0;A<256;A++){let e=A;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;kg[A]=e}const Bd=4294967295;function vb(A,e,t){let r=A;for(let n=0;n<t;n++)r=kg[(r^e[n])&255]^r>>>8;return r}function mb(A,e){return(vb(Bd,A,e)^Bd)>>>0}function pd(A,e,t){const r=A.readUint32(),n=mb(new Uint8Array(A.buffer,A.byteOffset+A.offset-e-4,e),e);if(n!==r)throw new Error(`CRC mismatch for chunk ${t}. Expected ${r}, found ${n}`)}function Tg(A,e,t){for(let r=0;r<t;r++)e[r]=A[r]}function Og(A,e,t,r){let n=0;for(;n<r;n++)e[n]=A[n];for(;n<t;n++)e[n]=A[n]+e[n-r]&255}function Pg(A,e,t,r){let n=0;if(t.length===0)for(;n<r;n++)e[n]=A[n];else for(;n<r;n++)e[n]=A[n]+t[n]&255}function Mg(A,e,t,r,n){let i=0;if(t.length===0){for(;i<n;i++)e[i]=A[i];for(;i<r;i++)e[i]=A[i]+(e[i-n]>>1)&255}else{for(;i<n;i++)e[i]=A[i]+(t[i]>>1)&255;for(;i<r;i++)e[i]=A[i]+(e[i-n]+t[i]>>1)&255}}function Rg(A,e,t,r,n){let i=0;if(t.length===0){for(;i<n;i++)e[i]=A[i];for(;i<r;i++)e[i]=A[i]+e[i-n]&255}else{for(;i<n;i++)e[i]=A[i]+t[i]&255;for(;i<r;i++)e[i]=A[i]+Cb(e[i-n],t[i],t[i-n])&255}}function Cb(A,e,t){const r=A+e-t,n=Math.abs(r-A),i=Math.abs(r-e),o=Math.abs(r-t);return n<=i&&n<=o?A:i<=o?e:t}function bb(A,e,t,r,n,i){switch(A){case 0:Tg(e,t,n);break;case 1:Og(e,t,n,i);break;case 2:Pg(e,t,r,n);break;case 3:Mg(e,t,r,n,i);break;case 4:Rg(e,t,r,n,i);break;default:throw new Error(`Unsupported filter: ${A}`)}}const Fb=new Uint16Array([255]),Qb=new Uint8Array(Fb.buffer),yb=Qb[0]===255;function Ub(A){const{data:e,width:t,height:r,channels:n,depth:i}=A,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(i/8)*n,l=new Uint8Array(r*t*s);let u=0;for(let f=0;f<7;f++){const p=o[f],w=Math.ceil((t-p.x)/p.xStep),g=Math.ceil((r-p.y)/p.yStep);if(w<=0||g<=0)continue;const F=w*s,y=new Uint8Array(F);for(let S=0;S<g;S++){const b=e[u++],P=e.subarray(u,u+F);u+=F;const G=new Uint8Array(F);bb(b,P,G,y,F,s),y.set(G);for(let O=0;O<w;O++){const J=p.x+O*p.xStep,Z=p.y+S*p.yStep;if(!(J>=t||Z>=r))for(let nA=0;nA<s;nA++)l[(Z*t+J)*s+nA]=G[O*s+nA]}}}if(i===16){const f=new Uint16Array(l.buffer);if(yb)for(let p=0;p<f.length;p++)f[p]=_b(f[p]);return f}else return l}function _b(A){return(A&255)<<8|A>>8&255}const xb=new Uint16Array([255]),Eb=new Uint8Array(xb.buffer),Lb=Eb[0]===255,Ib=new Uint8Array(0);function wd(A){const{data:e,width:t,height:r,channels:n,depth:i}=A,o=Math.ceil(i/8)*n,s=Math.ceil(i/8*n*t),l=new Uint8Array(r*s);let u=Ib,f=0,p,w;for(let g=0;g<r;g++){switch(p=e.subarray(f+1,f+1+s),w=l.subarray(g*s,(g+1)*s),e[f]){case 0:Tg(p,w,s);break;case 1:Og(p,w,s,o);break;case 2:Pg(p,w,u,s);break;case 3:Mg(p,w,u,s,o);break;case 4:Rg(p,w,u,s,o);break;default:throw new Error(`Unsupported filter: ${e[f]}`)}u=w,f+=s+1}if(i===16){const g=new Uint16Array(l.buffer);if(Lb)for(let F=0;F<g.length;F++)g[F]=Sb(g[F]);return g}else return l}function Sb(A){return(A&255)<<8|A>>8&255}const wl=Uint8Array.of(137,80,78,71,13,10,26,10);function vd(A){if(!Hb(A.readBytes(wl.length)))throw new Error("wrong PNG signature")}function Hb(A){if(A.length<wl.length)return!1;for(let e=0;e<wl.length;e++)if(A[e]!==wl[e])return!1;return!0}const Nb="tEXt",Db=0,Kg=new TextDecoder("latin1");function kb(A){if(Ob(A),A.length===0||A.length>79)throw new Error("keyword length must be between 1 and 79")}const Tb=/^[\u0000-\u00FF]*$/;function Ob(A){if(!Tb.test(A))throw new Error("invalid latin1 text")}function Pb(A,e,t){const r=jg(e);A[r]=Mb(e,t-r.length-1)}function jg(A){for(A.mark();A.readByte()!==Db;);const e=A.offset;A.reset();const t=Kg.decode(A.readBytes(e-A.offset-1));return A.skip(1),kb(t),t}function Mb(A,e){return Kg.decode(A.readBytes(e))}const or={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},bu={UNKNOWN:-1,DEFLATE:0},md={UNKNOWN:-1,ADAPTIVE:0},Fu={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},ll={NONE:0,BACKGROUND:1,PREVIOUS:2},Qu={SOURCE:0,OVER:1};class Rb extends Lf{constructor(t,r={}){super(t);xe(this,"_checkCrc");xe(this,"_inflator");xe(this,"_png");xe(this,"_apng");xe(this,"_end");xe(this,"_hasPalette");xe(this,"_palette");xe(this,"_hasTransparency");xe(this,"_transparency");xe(this,"_compressionMethod");xe(this,"_filterMethod");xe(this,"_interlaceMethod");xe(this,"_colorType");xe(this,"_isAnimated");xe(this,"_numberOfFrames");xe(this,"_numberOfPlays");xe(this,"_frames");xe(this,"_writingDataChunks");const{checkCrc:n=!1}=r;this._checkCrc=n,this._inflator=new gd,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=bu.UNKNOWN,this._filterMethod=md.UNKNOWN,this._interlaceMethod=Fu.UNKNOWN,this._colorType=or.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(vd(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeChunk(t,r)}return this.decodeImage(),this._png}decodeApng(){for(vd(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(t,r)}return this.decodeApngImage(),this._apng}decodeChunk(t,r){const n=this.offset;switch(r){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 Nb:Pb(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?pd(this,t+4,r):this.skip(4)}decodeApngChunk(t,r){const n=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,r),this.offset=n+t;break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?pd(this,t+4,r):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=Kb(this.readUint8());const r=this.readUint8();this._colorType=r;let n;switch(r){case or.GREYSCALE:n=1;break;case or.TRUECOLOUR:n=3;break;case or.INDEXED_COLOUR:n=1;break;case or.GREYSCALE_ALPHA:n=2;break;case or.TRUECOLOUR_ALPHA:n=4;break;case or.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==bu.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 r=t/3;this._hasPalette=!0;const n=[];this._palette=n;for(let i=0;i<r;i++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const r=t,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let r=t,n=this.offset+this.byteOffset;if(n+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,n,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case or.GREYSCALE:case or.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._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 r=0;r<t/2;r++)this._transparency[r]=this.readUint16();break}case or.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let r=0;for(;r<t;r++){const n=this.readByte();this._palette[r].push(n)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case or.UNKNOWN:case or.GREYSCALE_ALPHA:case or.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const r=jg(this),n=this.readUint8();if(n!==bu.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${n}`);const i=this.readBytes(t-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:wb(i)}}decodepHYs(){const t=this.readUint32(),r=this.readUint32(),n=this.readByte();this._png.resolution={x:t,y:r,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const r={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(t);if(n){if(n.data=wd({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)r.data=n.data;else{const i=this._apng.frames.at(t-1);this.disposeFrame(n,i,r),this.addFrameDataToCanvas(r,n)}this._apng.frames.push(r)}}return this._apng}disposeFrame(t,r,n){switch(t.disposeOp){case ll.NONE:break;case ll.BACKGROUND:for(let i=0;i<this._png.height;i++)for(let o=0;o<this._png.width;o++){const s=(i*t.width+o)*this._png.channels;for(let l=0;l<this._png.channels;l++)n.data[s+l]=0}break;case ll.PREVIOUS:n.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,r){const n=1<<this._png.depth,i=(o,s)=>{const l=((o+r.yOffset)*this._png.width+r.xOffset+s)*this._png.channels,u=(o*r.width+s)*this._png.channels;return{index:l,frameIndex:u}};switch(r.blendOp){case Qu.SOURCE:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:l,frameIndex:u}=i(o,s);for(let f=0;f<this._png.channels;f++)t.data[l+f]=r.data[u+f]}break;case Qu.OVER:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:l,frameIndex:u}=i(o,s);for(let f=0;f<this._png.channels;f++){const p=r.data[u+this._png.channels-1]/n,w=f%(this._png.channels-1)===0?1:r.data[u+f],g=Math.floor(p*w+(1-p)*t.data[l+f]);t.data[l+f]+=g}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==md.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Fu.NO_INTERLACE)this._png.data=wd({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Fu.ADAM7)this._png.data=Ub({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,r=this._frames.at(-1);r?r.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:ll.NONE,blendOp:Qu.SOURCE,data:t}),this._inflator=new gd,this._writingDataChunks=!1}}function Kb(A){if(A!==1&&A!==2&&A!==4&&A!==8&&A!==16)throw new Error(`invalid bit depth: ${A}`);return A}var Cd;(function(A){A[A.UNKNOWN=0]="UNKNOWN",A[A.METRE=1]="METRE"})(Cd||(Cd={}));function jb(A,e){return new Rb(A,e).decode()}var $A=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function yu(){$A.console&&typeof $A.console.log=="function"&&$A.console.log.apply($A.console,arguments)}var He={log:yu,warn:function(A){$A.console&&(typeof $A.console.warn=="function"?$A.console.warn.apply($A.console,arguments):yu.call(null,arguments))},error:function(A){$A.console&&(typeof $A.console.error=="function"?$A.console.error.apply($A.console,arguments):yu(A))}};function Uu(A,e,t){var r=new XMLHttpRequest;r.open("GET",A),r.responseType="blob",r.onload=function(){xi(r.response,e,t)},r.onerror=function(){He.error("could not download file")},r.send()}function bd(A){var e=new XMLHttpRequest;e.open("HEAD",A,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function cl(A){try{A.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),A.dispatchEvent(e)}}var xi=$A.saveAs||((typeof window>"u"?"undefined":Ne(window))!=="object"||window!==$A?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(A,e,t){var r=$A.URL||$A.webkitURL,n=document.createElement("a");e=e||A.name||"download",n.download=e,n.rel="noopener",typeof A=="string"?(n.href=A,n.origin!==location.origin?bd(n.href)?Uu(A,e,t):cl(n,n.target="_blank"):cl(n)):(n.href=r.createObjectURL(A),setTimeout(function(){r.revokeObjectURL(n.href)},4e4),setTimeout(function(){cl(n)},0))}:"msSaveOrOpenBlob"in navigator?function(A,e,t){if(e=e||A.name||"download",typeof A=="string")if(bd(A))Uu(A,e,t);else{var r=document.createElement("a");r.href=A,r.target="_blank",setTimeout(function(){cl(r)})}else navigator.msSaveOrOpenBlob(function(n,i){return i===void 0?i={autoBom:!1}:Ne(i)!=="object"&&(He.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(n.type)?new Blob([String.fromCharCode(65279),n],{type:n.type}):n}(A,t),e)}:function(A,e,t,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof A=="string")return Uu(A,e,t);var n=A.type==="application/octet-stream",i=/constructor/i.test($A.HTMLElement)||$A.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||n&&i)&&(typeof FileReader>"u"?"undefined":Ne(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var f=s.result;f=o?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=f:location=f,r=null},s.readAsDataURL(A)}else{var l=$A.URL||$A.webkitURL,u=l.createObjectURL(A);r?r.location=u:location.href=u,r=null,setTimeout(function(){l.revokeObjectURL(u)},4e4)}});/**
 * A class to parse color values
 * @author Stoyan Stefanov <sstoo@gmail.com>
 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
 * @license Use it if you like it
 */function Gg(A){var e;A=A||"",this.ok=!1,A.charAt(0)=="#"&&(A=A.substr(1,6)),A={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"}[A=(A=A.replace(/ /g,"")).toLowerCase()]||A;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],r=0;r<t.length;r++){var n=t[r].re,i=t[r].process,o=n.exec(A);o&&(e=i(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return s.length==1&&(s="0"+s),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+s+l+u}}var vl=$A.atob.bind($A),Fd=$A.btoa.bind($A);/**
 * @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 _u(A,e){var t=A[0],r=A[1],n=A[2],i=A[3];t=kt(t,r,n,i,e[0],7,-680876936),i=kt(i,t,r,n,e[1],12,-389564586),n=kt(n,i,t,r,e[2],17,606105819),r=kt(r,n,i,t,e[3],22,-1044525330),t=kt(t,r,n,i,e[4],7,-176418897),i=kt(i,t,r,n,e[5],12,1200080426),n=kt(n,i,t,r,e[6],17,-1473231341),r=kt(r,n,i,t,e[7],22,-45705983),t=kt(t,r,n,i,e[8],7,1770035416),i=kt(i,t,r,n,e[9],12,-1958414417),n=kt(n,i,t,r,e[10],17,-42063),r=kt(r,n,i,t,e[11],22,-1990404162),t=kt(t,r,n,i,e[12],7,1804603682),i=kt(i,t,r,n,e[13],12,-40341101),n=kt(n,i,t,r,e[14],17,-1502002290),t=Tt(t,r=kt(r,n,i,t,e[15],22,1236535329),n,i,e[1],5,-165796510),i=Tt(i,t,r,n,e[6],9,-1069501632),n=Tt(n,i,t,r,e[11],14,643717713),r=Tt(r,n,i,t,e[0],20,-373897302),t=Tt(t,r,n,i,e[5],5,-701558691),i=Tt(i,t,r,n,e[10],9,38016083),n=Tt(n,i,t,r,e[15],14,-660478335),r=Tt(r,n,i,t,e[4],20,-405537848),t=Tt(t,r,n,i,e[9],5,568446438),i=Tt(i,t,r,n,e[14],9,-1019803690),n=Tt(n,i,t,r,e[3],14,-187363961),r=Tt(r,n,i,t,e[8],20,1163531501),t=Tt(t,r,n,i,e[13],5,-1444681467),i=Tt(i,t,r,n,e[2],9,-51403784),n=Tt(n,i,t,r,e[7],14,1735328473),t=Ot(t,r=Tt(r,n,i,t,e[12],20,-1926607734),n,i,e[5],4,-378558),i=Ot(i,t,r,n,e[8],11,-2022574463),n=Ot(n,i,t,r,e[11],16,1839030562),r=Ot(r,n,i,t,e[14],23,-35309556),t=Ot(t,r,n,i,e[1],4,-1530992060),i=Ot(i,t,r,n,e[4],11,1272893353),n=Ot(n,i,t,r,e[7],16,-155497632),r=Ot(r,n,i,t,e[10],23,-1094730640),t=Ot(t,r,n,i,e[13],4,681279174),i=Ot(i,t,r,n,e[0],11,-358537222),n=Ot(n,i,t,r,e[3],16,-722521979),r=Ot(r,n,i,t,e[6],23,76029189),t=Ot(t,r,n,i,e[9],4,-640364487),i=Ot(i,t,r,n,e[12],11,-421815835),n=Ot(n,i,t,r,e[15],16,530742520),t=Pt(t,r=Ot(r,n,i,t,e[2],23,-995338651),n,i,e[0],6,-198630844),i=Pt(i,t,r,n,e[7],10,1126891415),n=Pt(n,i,t,r,e[14],15,-1416354905),r=Pt(r,n,i,t,e[5],21,-57434055),t=Pt(t,r,n,i,e[12],6,1700485571),i=Pt(i,t,r,n,e[3],10,-1894986606),n=Pt(n,i,t,r,e[10],15,-1051523),r=Pt(r,n,i,t,e[1],21,-2054922799),t=Pt(t,r,n,i,e[8],6,1873313359),i=Pt(i,t,r,n,e[15],10,-30611744),n=Pt(n,i,t,r,e[6],15,-1560198380),r=Pt(r,n,i,t,e[13],21,1309151649),t=Pt(t,r,n,i,e[4],6,-145523070),i=Pt(i,t,r,n,e[11],10,-1120210379),n=Pt(n,i,t,r,e[2],15,718787259),r=Pt(r,n,i,t,e[9],21,-343485551),A[0]=Ai(t,A[0]),A[1]=Ai(r,A[1]),A[2]=Ai(n,A[2]),A[3]=Ai(i,A[3])}function $l(A,e,t,r,n,i){return e=Ai(Ai(e,A),Ai(r,i)),Ai(e<<n|e>>>32-n,t)}function kt(A,e,t,r,n,i,o){return $l(e&t|~e&r,A,e,n,i,o)}function Tt(A,e,t,r,n,i,o){return $l(e&r|t&~r,A,e,n,i,o)}function Ot(A,e,t,r,n,i,o){return $l(e^t^r,A,e,n,i,o)}function Pt(A,e,t,r,n,i,o){return $l(t^(e|~r),A,e,n,i,o)}function Vg(A){var e,t=A.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=A.length;e+=64)_u(r,Gb(A.substring(e-64,e)));A=A.substring(e-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<A.length;e++)n[e>>2]|=A.charCodeAt(e)<<(e%4<<3);if(n[e>>2]|=128<<(e%4<<3),e>55)for(_u(r,n),e=0;e<16;e++)n[e]=0;return n[14]=8*t,_u(r,n),r}function Gb(A){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=A.charCodeAt(e)+(A.charCodeAt(e+1)<<8)+(A.charCodeAt(e+2)<<16)+(A.charCodeAt(e+3)<<24);return t}var Qd="0123456789abcdef".split("");function Vb(A){for(var e="",t=0;t<4;t++)e+=Qd[A>>8*t+4&15]+Qd[A>>8*t&15];return e}function qb(A){return String.fromCharCode(255&A,(65280&A)>>8,(16711680&A)>>16,(4278190080&A)>>24)}function Bf(A){return Vg(A).map(qb).join("")}var zb=function(A){for(var e=0;e<A.length;e++)A[e]=Vb(A[e]);return A.join("")}(Vg("hello"))!="5d41402abc4b2a76b9719d911017c592";function Ai(A,e){if(zb){var t=(65535&A)+(65535&e);return(A>>16)+(e>>16)+(t>>16)<<16|65535&t}return A+e&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 pf(A,e){var t,r,n,i;if(A!==t){for(var o=(n=A,i=1+(256/A.length|0),new Array(i+1).join(n)),s=[],l=0;l<256;l++)s[l]=l;var u=0;for(l=0;l<256;l++){var f=s[l];u=(u+f+o.charCodeAt(l))%256,s[l]=s[u],s[u]=f}t=A,r=s}else s=r;var p=e.length,w=0,g=0,F="";for(l=0;l<p;l++)g=(g+(f=s[w=(w+1)%256]))%256,s[w]=s[g],s[g]=f,o=s[(s[w]+s[g])%256],F+=String.fromCharCode(e.charCodeAt(l)^o);return F}/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 * Author: Owen Leong (@owenl131)
 * Date: 15 Oct 2020
 * References:
 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
 * http://www.fpdf.org/en/script/script37.php
 */var yd={print:4,modify:8,copy:16,"annot-forms":32};function Qa(A,e,t,r){this.v=1,this.r=2;var n=192;A.forEach(function(s){if(yd.perm!==void 0)throw new Error("Invalid permission: "+s);n+=yd[s]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(e+this.padding).substr(0,32),o=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,o),this.P=-(1+(255^n)),this.encryptionKey=Bf(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=pf(this.encryptionKey,this.padding)}function ya(A){if(/[^\u0000-\u00ff]/.test(A))throw new Error("Invalid PDF Name Object: "+A+", Only accept ASCII characters.");for(var e="",t=A.length,r=0;r<t;r++){var n=A.charCodeAt(r);e+=n<33||n===35||n===37||n===40||n===41||n===47||n===60||n===62||n===91||n===93||n===123||n===125||n>126?"#"+("0"+n.toString(16)).slice(-2):A[r]}return e}function Ud(A){if(Ne(A)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,n){if(n=n||!1,typeof t!="string"||typeof r!="function"||typeof n!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[r,!!n],i},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],Object.keys(e[r]).length===0&&delete e[r],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var r=Array.prototype.slice.call(arguments,1),n=[];for(var i in e[t]){var o=e[t][i];try{o[0].apply(A,r)}catch(s){$A.console&&He.error("jsPDF PubSub Error",s.message,s)}o[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Ol(A){if(!(this instanceof Ol))return new Ol(A);var e="opacity,stroke-opacity".split(",");for(var t in A)A.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=A[t]);this.id="",this.objectNumber=-1}function qg(A,e){this.gState=A,this.matrix=e,this.id="",this.objectNumber=-1}function Li(A,e,t,r,n){if(!(this instanceof Li))return new Li(A,e,t,r,n);this.type=A==="axial"?2:3,this.coords=e,this.colors=t,qg.call(this,r,n)}function _a(A,e,t,r,n){if(!(this instanceof _a))return new _a(A,e,t,r,n);this.boundingBox=A,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,qg.call(this,r,n)}function KA(A){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],n=arguments[2],i=arguments[3],o=[],s=1,l=16,u="S",f=null;Ne(A=A||{})==="object"&&(t=A.orientation,r=A.unit||r,n=A.format||n,i=A.compress||A.compressPdf||i,(f=A.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),s=typeof A.userUnit=="number"?Math.abs(A.userUnit):1,A.precision!==void 0&&(e=A.precision),A.floatPrecision!==void 0&&(l=A.floatPrecision),u=A.defaultPathOperation||"S"),o=A.filters||(i===!0?["FlateEncode"]:o),r=r||"mm",t=(""+(t||"P")).toLowerCase();var p=A.putOnlyUsedFonts||!1,w={},g={internal:{},__private__:{}};g.__private__.PubSub=Ud;var F="1.3",y=g.__private__.getPdfVersion=function(){return F};g.__private__.setPdfVersion=function(h){F=h};var S={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};g.__private__.getPageFormats=function(){return S};var b=g.__private__.getPageFormat=function(h){return S[h]};n=n||"a4";var P="compat",G="advanced",O=P;function J(){this.saveGraphicsState(),L(new JA(ae,0,0,-ae,0,di()*ae).toString()+" cm"),this.setFontSize(this.getFontSize()/ae),u="n",O=G}function Z(){this.restoreGraphicsState(),u="S",O=P}var nA=g.__private__.combineFontStyleAndFontWeight=function(h,v){if(h=="bold"&&v=="normal"||h=="bold"&&v==400||h=="normal"&&v=="italic"||h=="bold"&&v=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return v&&(h=v==400||v==="normal"?h==="italic"?"italic":"normal":v!=700&&v!=="bold"||h!=="normal"?(v==700?"bold":v)+""+h:"bold"),h};g.advancedAPI=function(h){var v=O===P;return v&&J.call(this),typeof h!="function"||(h(this),v&&Z.call(this)),this},g.compatAPI=function(h){var v=O===G;return v&&Z.call(this),typeof h!="function"||(h(this),v&&J.call(this)),this},g.isAdvancedAPI=function(){return O===G};var q,H=function(h){if(O!==G)throw new Error(h+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},AA=g.roundToPrecision=g.__private__.roundToPrecision=function(h,v){var N=e||v;if(isNaN(h)||isNaN(N))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return h.toFixed(N).replace(/0+$/,"")};q=g.hpf=g.__private__.hpf=typeof l=="number"?function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return AA(h,l)}:l==="smart"?function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return AA(h,h>-1&&h<1?16:5)}:function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return AA(h,16)};var _=g.f2=g.__private__.f2=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.f2");return AA(h,2)},I=g.__private__.f3=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.f3");return AA(h,3)},K=g.scale=g.__private__.scale=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.scale");return O===P?h*ae:O===G?h:void 0},j=function(h){return K(function(v){return O===P?di()-v:O===G?v:void 0}(h))};g.__private__.setPrecision=g.setPrecision=function(h){typeof parseInt(h,10)=="number"&&(e=parseInt(h,10))};var sA,lA="00000000000000000000000000000000",cA=g.__private__.getFileId=function(){return lA},tA=g.__private__.setFileId=function(h){return lA=h!==void 0&&/^[a-fA-F0-9]{32}$/.test(h)?h.toUpperCase():lA.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(Qt=new Qa(f.userPermissions,f.userPassword,f.ownerPassword,lA)),lA};g.setFileId=function(h){return tA(h),this},g.getFileId=function(){return cA()};var uA=g.__private__.convertDateToPDFDate=function(h){var v=h.getTimezoneOffset(),N=v<0?"+":"-",V=Math.floor(Math.abs(v/60)),$=Math.abs(v%60),hA=[N,R(V),"'",R($),"'"].join("");return["D:",h.getFullYear(),R(h.getMonth()+1),R(h.getDate()),R(h.getHours()),R(h.getMinutes()),R(h.getSeconds()),hA].join("")},QA=g.__private__.convertPDFDateToDate=function(h){var v=parseInt(h.substr(2,4),10),N=parseInt(h.substr(6,2),10)-1,V=parseInt(h.substr(8,2),10),$=parseInt(h.substr(10,2),10),hA=parseInt(h.substr(12,2),10),vA=parseInt(h.substr(14,2),10);return new Date(v,N,V,$,hA,vA,0)},pA=g.__private__.setCreationDate=function(h){var v;if(h===void 0&&(h=new Date),h instanceof Date)v=uA(h);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(h))throw new Error("Invalid argument passed to jsPDF.setCreationDate");v=h}return sA=v},Q=g.__private__.getCreationDate=function(h){var v=sA;return h==="jsDate"&&(v=QA(sA)),v};g.setCreationDate=function(h){return pA(h),this},g.getCreationDate=function(h){return Q(h)};var T,R=g.__private__.padd2=function(h){return("0"+parseInt(h)).slice(-2)},z=g.__private__.padd2Hex=function(h){return("00"+(h=h.toString())).substr(h.length)},X=0,M=[],rA=[],oA=0,fA=[],bA=[],xA=!1,UA=rA;g.__private__.setCustomOutputDestination=function(h){xA=!0,UA=h};var SA=function(h){xA||(UA=h)};g.__private__.resetCustomOutputDestination=function(){xA=!1,UA=rA};var L=g.__private__.out=function(h){return h=h.toString(),oA+=h.length+1,UA.push(h),UA},wA=g.__private__.write=function(h){return L(arguments.length===1?h.toString():Array.prototype.join.call(arguments," "))},WA=g.__private__.getArrayBuffer=function(h){for(var v=h.length,N=new ArrayBuffer(v),V=new Uint8Array(N);v--;)V[v]=h.charCodeAt(v);return N},jA=[["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 jA};var CA=A.fontSize||16;g.__private__.setFontSize=g.setFontSize=function(h){return CA=O===G?h/ae:h,this};var zA,HA=g.__private__.getFontSize=g.getFontSize=function(){return O===P?CA:CA*ae},qA=A.R2L||!1;g.__private__.setR2L=g.setR2L=function(h){return qA=h,this},g.__private__.getR2L=g.getR2L=function(){return qA};var GA,Fe=g.__private__.setZoomMode=function(h){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(h))zA=h;else if(isNaN(h)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(h)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+h+'" is not recognized.');zA=h}else zA=parseInt(h,10)};g.__private__.getZoomMode=function(){return zA};var fe,te=g.__private__.setPageMode=function(h){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(h)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+h+'" is not recognized.');GA=h};g.__private__.getPageMode=function(){return GA};var ge=g.__private__.setLayoutMode=function(h){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(h)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+h+'" is not recognized.');fe=h};g.__private__.getLayoutMode=function(){return fe},g.__private__.setDisplayMode=g.setDisplayMode=function(h,v,N){return Fe(h),ge(v),te(N),this};var he={title:"",subject:"",author:"",keywords:"",creator:""};g.__private__.getDocumentProperty=function(h){if(Object.keys(he).indexOf(h)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return he[h]},g.__private__.getDocumentProperties=function(){return he},g.__private__.setDocumentProperties=g.setProperties=g.setDocumentProperties=function(h){for(var v in he)he.hasOwnProperty(v)&&h[v]&&(he[v]=h[v]);return this},g.__private__.setDocumentProperty=function(h,v){if(Object.keys(he).indexOf(h)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return he[h]=v};var PA,ae,RA,At,me,le={},ce={},je=[],VA={},De={},YA={},re={},Ge=null,ue=0,XA=[],Qe=new Ud(g),oi=A.hotfixes||[],It={},sn={},Mr=[],JA=function h(v,N,V,$,hA,vA){if(!(this instanceof h))return new h(v,N,V,$,hA,vA);isNaN(v)&&(v=1),isNaN(N)&&(N=0),isNaN(V)&&(V=0),isNaN($)&&($=1),isNaN(hA)&&(hA=0),isNaN(vA)&&(vA=0),this._matrix=[v,N,V,$,hA,vA]};Object.defineProperty(JA.prototype,"sx",{get:function(){return this._matrix[0]},set:function(h){this._matrix[0]=h}}),Object.defineProperty(JA.prototype,"shy",{get:function(){return this._matrix[1]},set:function(h){this._matrix[1]=h}}),Object.defineProperty(JA.prototype,"shx",{get:function(){return this._matrix[2]},set:function(h){this._matrix[2]=h}}),Object.defineProperty(JA.prototype,"sy",{get:function(){return this._matrix[3]},set:function(h){this._matrix[3]=h}}),Object.defineProperty(JA.prototype,"tx",{get:function(){return this._matrix[4]},set:function(h){this._matrix[4]=h}}),Object.defineProperty(JA.prototype,"ty",{get:function(){return this._matrix[5]},set:function(h){this._matrix[5]=h}}),Object.defineProperty(JA.prototype,"a",{get:function(){return this._matrix[0]},set:function(h){this._matrix[0]=h}}),Object.defineProperty(JA.prototype,"b",{get:function(){return this._matrix[1]},set:function(h){this._matrix[1]=h}}),Object.defineProperty(JA.prototype,"c",{get:function(){return this._matrix[2]},set:function(h){this._matrix[2]=h}}),Object.defineProperty(JA.prototype,"d",{get:function(){return this._matrix[3]},set:function(h){this._matrix[3]=h}}),Object.defineProperty(JA.prototype,"e",{get:function(){return this._matrix[4]},set:function(h){this._matrix[4]=h}}),Object.defineProperty(JA.prototype,"f",{get:function(){return this._matrix[5]},set:function(h){this._matrix[5]=h}}),Object.defineProperty(JA.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(JA.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(JA.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(JA.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),JA.prototype.join=function(h){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(q).join(h)},JA.prototype.multiply=function(h){var v=h.sx*this.sx+h.shy*this.shx,N=h.sx*this.shy+h.shy*this.sy,V=h.shx*this.sx+h.sy*this.shx,$=h.shx*this.shy+h.sy*this.sy,hA=h.tx*this.sx+h.ty*this.shx+this.tx,vA=h.tx*this.shy+h.ty*this.sy+this.ty;return new JA(v,N,V,$,hA,vA)},JA.prototype.decompose=function(){var h=this.sx,v=this.shy,N=this.shx,V=this.sy,$=this.tx,hA=this.ty,vA=Math.sqrt(h*h+v*v),kA=(h/=vA)*N+(v/=vA)*V;N-=h*kA,V-=v*kA;var DA=Math.sqrt(N*N+V*V);return kA/=DA,h*(V/=DA)<v*(N/=DA)&&(h=-h,v=-v,kA=-kA,vA=-vA),{scale:new JA(vA,0,0,DA,0,0),translate:new JA(1,0,0,1,$,hA),rotate:new JA(h,v,-v,h,0,0),skew:new JA(1,0,kA,1,0,0)}},JA.prototype.toString=function(h){return this.join(" ")},JA.prototype.inversed=function(){var h=this.sx,v=this.shy,N=this.shx,V=this.sy,$=this.tx,hA=this.ty,vA=1/(h*V-v*N),kA=V*vA,DA=-v*vA,Ae=-N*vA,ne=h*vA;return new JA(kA,DA,Ae,ne,-kA*$-Ae*hA,-DA*$-ne*hA)},JA.prototype.applyToPoint=function(h){var v=h.x*this.sx+h.y*this.shx+this.tx,N=h.x*this.shy+h.y*this.sy+this.ty;return new hi(v,N)},JA.prototype.applyToRectangle=function(h){var v=this.applyToPoint(h),N=this.applyToPoint(new hi(h.x+h.w,h.y+h.h));return new Ja(v.x,v.y,N.x-v.x,N.y-v.y)},JA.prototype.clone=function(){var h=this.sx,v=this.shy,N=this.shx,V=this.sy,$=this.tx,hA=this.ty;return new JA(h,v,N,V,$,hA)},g.Matrix=JA;var on=g.matrixMult=function(h,v){return v.multiply(h)},ln=new JA(1,0,0,1,0,0);g.unitMatrix=g.identityMatrix=ln;var hr=function(h,v){if(!De[h]){var N=(v instanceof Li?"Sh":"P")+(Object.keys(VA).length+1).toString(10);v.id=N,De[h]=N,VA[N]=v,Qe.publish("addPattern",v)}};g.ShadingPattern=Li,g.TilingPattern=_a,g.addShadingPattern=function(h,v){return H("addShadingPattern()"),hr(h,v),this},g.beginTilingPattern=function(h){H("beginTilingPattern()"),Ya(h.boundingBox[0],h.boundingBox[1],h.boundingBox[2]-h.boundingBox[0],h.boundingBox[3]-h.boundingBox[1],h.matrix)},g.endTilingPattern=function(h,v){H("endTilingPattern()"),v.stream=bA[T].join(`
`),hr(h,v),Qe.publish("endTilingPattern",v),Mr.pop().restore()};var dr,Je=g.__private__.newObject=function(){var h=vt();return Ft(h,!0),h},vt=g.__private__.newObjectDeferred=function(){return X++,M[X]=function(){return oA},X},Ft=function(h,v){return v=typeof v=="boolean"&&v,M[h]=oA,v&&L(h+" 0 obj"),h},li=g.__private__.newAdditionalObject=function(){var h={objId:vt(),content:""};return fA.push(h),h},En=vt(),Ur=vt(),Rr=g.__private__.decodeColorString=function(h){var v=h.split(" ");if(v.length!==2||v[1]!=="g"&&v[1]!=="G")v.length!==5||v[4]!=="k"&&v[4]!=="K"||(v=[(1-v[0])*(1-v[3]),(1-v[1])*(1-v[3]),(1-v[2])*(1-v[3]),"r"]);else{var N=parseFloat(v[0]);v=[N,N,N,"r"]}for(var V="#",$=0;$<3;$++)V+=("0"+Math.floor(255*parseFloat(v[$])).toString(16)).slice(-2);return V},_r=g.__private__.encodeColorString=function(h){var v;typeof h=="string"&&(h={ch1:h});var N=h.ch1,V=h.ch2,$=h.ch3,hA=h.ch4,vA=h.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof N=="string"&&N.charAt(0)!=="#"){var kA=new Gg(N);if(kA.ok)N=kA.toHex();else if(!/^\d*\.?\d*$/.test(N))throw new Error('Invalid color "'+N+'" passed to jsPDF.encodeColorString.')}if(typeof N=="string"&&/^#[0-9A-Fa-f]{3}$/.test(N)&&(N="#"+N[1]+N[1]+N[2]+N[2]+N[3]+N[3]),typeof N=="string"&&/^#[0-9A-Fa-f]{6}$/.test(N)){var DA=parseInt(N.substr(1),16);N=DA>>16&255,V=DA>>8&255,$=255&DA}if(V===void 0||hA===void 0&&N===V&&V===$)v=typeof N=="string"?N+" "+vA[0]:h.precision===2?_(N/255)+" "+vA[0]:I(N/255)+" "+vA[0];else if(hA===void 0||Ne(hA)==="object"){if(hA&&!isNaN(hA.a)&&hA.a===0)return["1.","1.","1.",vA[1]].join(" ");v=typeof N=="string"?[N,V,$,vA[1]].join(" "):h.precision===2?[_(N/255),_(V/255),_($/255),vA[1]].join(" "):[I(N/255),I(V/255),I($/255),vA[1]].join(" ")}else v=typeof N=="string"?[N,V,$,hA,vA[2]].join(" "):h.precision===2?[_(N),_(V),_($),_(hA),vA[2]].join(" "):[I(N),I(V),I($),I(hA),vA[2]].join(" ");return v},xr=g.__private__.getFilters=function(){return o},gr=g.__private__.putStream=function(h){var v=(h=h||{}).data||"",N=h.filters||xr(),V=h.alreadyAppliedFilters||[],$=h.addLength1||!1,hA=v.length,vA=h.objectId,kA=function(Me){return Me};if(f!==null&&vA===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(kA=Qt.encryptor(vA,0));var DA={};N===!0&&(N=["FlateEncode"]);var Ae=h.additionalKeyValues||[],ne=(DA=KA.API.processDataByFilters!==void 0?KA.API.processDataByFilters(v,N):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(V)?V.join(" "):V.toString());if(DA.data.length!==0&&(Ae.push({key:"Length",value:DA.data.length}),$===!0&&Ae.push({key:"Length1",value:hA})),ne.length!=0)if(ne.split("/").length-1==1)Ae.push({key:"Filter",value:ne});else{Ae.push({key:"Filter",value:"["+ne+"]"});for(var we=0;we<Ae.length;we+=1)if(Ae[we].key==="DecodeParms"){for(var ct=[],Ie=0;Ie<DA.reverseChain.split("/").length-1;Ie+=1)ct.push("null");ct.push(Ae[we].value),Ae[we].value="["+ct.join(" ")+"]"}}L("<<");for(var Ee=0;Ee<Ae.length;Ee++)L("/"+Ae[Ee].key+" "+Ae[Ee].value);L(">>"),DA.data.length!==0&&(L("stream"),L(kA(DA.data)),L("endstream"))},ci=g.__private__.putPage=function(h){var v=h.number,N=h.data,V=h.objId,$=h.contentsObjId;Ft(V,!0),L("<</Type /Page"),L("/Parent "+h.rootDictionaryObjId+" 0 R"),L("/Resources "+h.resourceDictionaryObjId+" 0 R"),L("/MediaBox ["+parseFloat(q(h.mediaBox.bottomLeftX))+" "+parseFloat(q(h.mediaBox.bottomLeftY))+" "+q(h.mediaBox.topRightX)+" "+q(h.mediaBox.topRightY)+"]"),h.cropBox!==null&&L("/CropBox ["+q(h.cropBox.bottomLeftX)+" "+q(h.cropBox.bottomLeftY)+" "+q(h.cropBox.topRightX)+" "+q(h.cropBox.topRightY)+"]"),h.bleedBox!==null&&L("/BleedBox ["+q(h.bleedBox.bottomLeftX)+" "+q(h.bleedBox.bottomLeftY)+" "+q(h.bleedBox.topRightX)+" "+q(h.bleedBox.topRightY)+"]"),h.trimBox!==null&&L("/TrimBox ["+q(h.trimBox.bottomLeftX)+" "+q(h.trimBox.bottomLeftY)+" "+q(h.trimBox.topRightX)+" "+q(h.trimBox.topRightY)+"]"),h.artBox!==null&&L("/ArtBox ["+q(h.artBox.bottomLeftX)+" "+q(h.artBox.bottomLeftY)+" "+q(h.artBox.topRightX)+" "+q(h.artBox.topRightY)+"]"),typeof h.userUnit=="number"&&h.userUnit!==1&&L("/UserUnit "+h.userUnit),Qe.publish("putPage",{objId:V,pageContext:XA[v],pageNumber:v,page:N}),L("/Contents "+$+" 0 R"),L(">>"),L("endobj");var hA=N.join(`
`);return O===G&&(hA+=`
Q`),Ft($,!0),gr({data:hA,filters:xr(),objectId:$}),L("endobj"),V},Kr=g.__private__.putPages=function(){var h,v,N=[];for(h=1;h<=ue;h++)XA[h].objId=vt(),XA[h].contentsObjId=vt();for(h=1;h<=ue;h++)N.push(ci({number:h,data:bA[h],objId:XA[h].objId,contentsObjId:XA[h].contentsObjId,mediaBox:XA[h].mediaBox,cropBox:XA[h].cropBox,bleedBox:XA[h].bleedBox,trimBox:XA[h].trimBox,artBox:XA[h].artBox,userUnit:XA[h].userUnit,rootDictionaryObjId:En,resourceDictionaryObjId:Ur}));Ft(En,!0),L("<</Type /Pages");var V="/Kids [";for(v=0;v<ue;v++)V+=N[v]+" 0 R ";L(V+"]"),L("/Count "+ue),L(">>"),L("endobj"),Qe.publish("postPutPages")},ui=function(h){Qe.publish("putFont",{font:h,out:L,newObject:Je,putStream:gr}),h.isAlreadyPutted!==!0&&(h.objectNumber=Je(),L("<<"),L("/Type /Font"),L("/BaseFont /"+ya(h.postScriptName)),L("/Subtype /Type1"),typeof h.encoding=="string"&&L("/Encoding /"+h.encoding),L("/FirstChar 32"),L("/LastChar 255"),L(">>"),L("endobj"))},Gi=function(h){h.objectNumber=Je();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[q(h.x),q(h.y),q(h.x+h.width),q(h.y+h.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+h.matrix.toString()+"]"});var N=h.pages[1].join(`
`);gr({data:N,additionalKeyValues:v,objectId:h.objectNumber}),L("endobj")},Vi=function(h,v){v||(v=21);var N=Je(),V=function(vA,kA){var DA,Ae=[],ne=1/(kA-1);for(DA=0;DA<1;DA+=ne)Ae.push(DA);if(Ae.push(1),vA[0].offset!=0){var we={offset:0,color:vA[0].color};vA.unshift(we)}if(vA[vA.length-1].offset!=1){var ct={offset:1,color:vA[vA.length-1].color};vA.push(ct)}for(var Ie="",Ee=0,Me=0;Me<Ae.length;Me++){for(DA=Ae[Me];DA>vA[Ee+1].offset;)Ee++;var ze=vA[Ee].offset,We=(DA-ze)/(vA[Ee+1].offset-ze),St=vA[Ee].color,gn=vA[Ee+1].color;Ie+=z(Math.round((1-We)*St[0]+We*gn[0]).toString(16))+z(Math.round((1-We)*St[1]+We*gn[1]).toString(16))+z(Math.round((1-We)*St[2]+We*gn[2]).toString(16))}return Ie.trim()}(h.colors,v),$=[];$.push({key:"FunctionType",value:"0"}),$.push({key:"Domain",value:"[0.0 1.0]"}),$.push({key:"Size",value:"["+v+"]"}),$.push({key:"BitsPerSample",value:"8"}),$.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),$.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),gr({data:V,additionalKeyValues:$,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:N}),L("endobj"),h.objectNumber=Je(),L("<< /ShadingType "+h.type),L("/ColorSpace /DeviceRGB");var hA="/Coords ["+q(parseFloat(h.coords[0]))+" "+q(parseFloat(h.coords[1]))+" ";h.type===2?hA+=q(parseFloat(h.coords[2]))+" "+q(parseFloat(h.coords[3])):hA+=q(parseFloat(h.coords[2]))+" "+q(parseFloat(h.coords[3]))+" "+q(parseFloat(h.coords[4]))+" "+q(parseFloat(h.coords[5])),L(hA+="]"),h.matrix&&L("/Matrix ["+h.matrix.toString()+"]"),L("/Function "+N+" 0 R"),L("/Extend [true true]"),L(">>"),L("endobj")},qi=function(h,v){var N=vt(),V=Je();v.push({resourcesOid:N,objectOid:V}),h.objectNumber=V;var $=[];$.push({key:"Type",value:"/Pattern"}),$.push({key:"PatternType",value:"1"}),$.push({key:"PaintType",value:"1"}),$.push({key:"TilingType",value:"1"}),$.push({key:"BBox",value:"["+h.boundingBox.map(q).join(" ")+"]"}),$.push({key:"XStep",value:q(h.xStep)}),$.push({key:"YStep",value:q(h.yStep)}),$.push({key:"Resources",value:N+" 0 R"}),h.matrix&&$.push({key:"Matrix",value:"["+h.matrix.toString()+"]"}),gr({data:h.stream,additionalKeyValues:$,objectId:h.objectNumber}),L("endobj")},Ac=function(h){for(var v in h.objectNumber=Je(),L("<<"),h)switch(v){case"opacity":L("/ca "+_(h[v]));break;case"stroke-opacity":L("/CA "+_(h[v]))}L(">>"),L("endobj")},Ka=function(h){Ft(h.resourcesOid,!0),L("<<"),L("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var v in L("/Font <<"),le)le.hasOwnProperty(v)&&(p===!1||p===!0&&w.hasOwnProperty(v))&&L("/"+v+" "+le[v].objectNumber+" 0 R");L(">>")}(),function(){if(Object.keys(VA).length>0){for(var v in L("/Shading <<"),VA)VA.hasOwnProperty(v)&&VA[v]instanceof Li&&VA[v].objectNumber>=0&&L("/"+v+" "+VA[v].objectNumber+" 0 R");Qe.publish("putShadingPatternDict"),L(">>")}}(),function(v){if(Object.keys(VA).length>0){for(var N in L("/Pattern <<"),VA)VA.hasOwnProperty(N)&&VA[N]instanceof g.TilingPattern&&VA[N].objectNumber>=0&&VA[N].objectNumber<v&&L("/"+N+" "+VA[N].objectNumber+" 0 R");Qe.publish("putTilingPatternDict"),L(">>")}}(h.objectOid),function(){if(Object.keys(YA).length>0){var v;for(v in L("/ExtGState <<"),YA)YA.hasOwnProperty(v)&&YA[v].objectNumber>=0&&L("/"+v+" "+YA[v].objectNumber+" 0 R");Qe.publish("putGStateDict"),L(">>")}}(),function(){for(var v in L("/XObject <<"),It)It.hasOwnProperty(v)&&It[v].objectNumber>=0&&L("/"+v+" "+It[v].objectNumber+" 0 R");Qe.publish("putXobjectDict"),L(">>")}(),L(">>"),L("endobj")},$s=function(h){ce[h.fontName]=ce[h.fontName]||{},ce[h.fontName][h.fontStyle]=h.id},Ao=function(h,v,N,V,$){var hA={id:"F"+(Object.keys(le).length+1).toString(10),postScriptName:h,fontName:v,fontStyle:N,encoding:V,isStandardFont:$||!1,metadata:{}};return Qe.publish("addFont",{font:hA,instance:this}),le[hA.id]=hA,$s(hA),hA.id},Br=g.__private__.pdfEscape=g.pdfEscape=function(h,v){return function(N,V){var $,hA,vA,kA,DA,Ae,ne,we,ct;if(vA=(V=V||{}).sourceEncoding||"Unicode",DA=V.outputEncoding,(V.autoencode||DA)&&le[PA].metadata&&le[PA].metadata[vA]&&le[PA].metadata[vA].encoding&&(kA=le[PA].metadata[vA].encoding,!DA&&le[PA].encoding&&(DA=le[PA].encoding),!DA&&kA.codePages&&(DA=kA.codePages[0]),typeof DA=="string"&&(DA=kA[DA]),DA)){for(ne=!1,Ae=[],$=0,hA=N.length;$<hA;$++)(we=DA[N.charCodeAt($)])?Ae.push(String.fromCharCode(we)):Ae.push(N[$]),Ae[$].charCodeAt(0)>>8&&(ne=!0);N=Ae.join("")}for($=N.length;ne===void 0&&$!==0;)N.charCodeAt($-1)>>8&&(ne=!0),$--;if(!ne)return N;for(Ae=V.noBOM?[]:[254,255],$=0,hA=N.length;$<hA;$++){if((ct=(we=N.charCodeAt($))>>8)>>8)throw new Error("Character at position "+$+" of string '"+N+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ae.push(ct),Ae.push(we-(ct<<8))}return String.fromCharCode.apply(void 0,Ae)}(h,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ja=g.__private__.beginPage=function(h){bA[++ue]=[],XA[ue]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(h[0]),topRightY:Number(h[1])}},to(ue),SA(bA[T])},eo=function(h,v){var N,V,$;switch(t=v||t,typeof h=="string"&&(N=b(h.toLowerCase()),Array.isArray(N)&&(V=N[0],$=N[1])),Array.isArray(h)&&(V=h[0]*ae,$=h[1]*ae),isNaN(V)&&(V=n[0],$=n[1]),(V>14400||$>14400)&&(He.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),V=Math.min(14400,V),$=Math.min(14400,$)),n=[V,$],t.substr(0,1)){case"l":$>V&&(n=[$,V]);break;case"p":V>$&&(n=[$,V])}ja(n),cc(ZA),L(Zi),Wa!==0&&L(Wa+" J"),Sn!==0&&L(Sn+" j"),Qe.publish("addPage",{pageNumber:ue})},Ga=function(h){h>0&&h<=ue&&(bA.splice(h,1),XA.splice(h,1),ue--,T>ue&&(T=ue),this.setPage(T))},to=function(h){h>0&&h<=ue&&(T=h)},ro=g.__private__.getNumberOfPages=g.getNumberOfPages=function(){return bA.length-1},no=function(h,v,N){var V,$=void 0;return N=N||{},h=h!==void 0?h:le[PA].fontName,v=v!==void 0?v:le[PA].fontStyle,V=h.toLowerCase(),ce[V]!==void 0&&ce[V][v]!==void 0?$=ce[V][v]:ce[h]!==void 0&&ce[h][v]!==void 0?$=ce[h][v]:N.disableWarning===!1&&He.warn("Unable to look up font label for font '"+h+"', '"+v+"'. Refer to getFontList() for available fonts."),$||N.noFallback||($=ce.times[v])==null&&($=ce.times.normal),$},jr=g.__private__.putInfo=function(){var h=Je(),v=function(V){return V};for(var N in f!==null&&(v=Qt.encryptor(h,0)),L("<<"),L("/Producer ("+Br(v("jsPDF "+KA.version))+")"),he)he.hasOwnProperty(N)&&he[N]&&L("/"+N.substr(0,1).toUpperCase()+N.substr(1)+" ("+Br(v(he[N]))+")");L("/CreationDate ("+Br(v(sA))+")"),L(">>"),L("endobj")},zi=g.__private__.putCatalog=function(h){var v=(h=h||{}).rootDictionaryObjId||En;switch(Je(),L("<<"),L("/Type /Catalog"),L("/Pages "+v+" 0 R"),zA||(zA="fullwidth"),zA){case"fullwidth":L("/OpenAction [3 0 R /FitH null]");break;case"fullheight":L("/OpenAction [3 0 R /FitV null]");break;case"fullpage":L("/OpenAction [3 0 R /Fit]");break;case"original":L("/OpenAction [3 0 R /XYZ null null 1]");break;default:var N=""+zA;N.substr(N.length-1)==="%"&&(zA=parseInt(zA)/100),typeof zA=="number"&&L("/OpenAction [3 0 R /XYZ null null "+_(zA)+"]")}switch(fe||(fe="continuous"),fe){case"continuous":L("/PageLayout /OneColumn");break;case"single":L("/PageLayout /SinglePage");break;case"two":case"twoleft":L("/PageLayout /TwoColumnLeft");break;case"tworight":L("/PageLayout /TwoColumnRight")}GA&&L("/PageMode /"+GA),Qe.publish("putCatalog"),L(">>"),L("endobj")},ec=g.__private__.putTrailer=function(){L("trailer"),L("<<"),L("/Size "+(X+1)),L("/Root "+X+" 0 R"),L("/Info "+(X-1)+" 0 R"),f!==null&&L("/Encrypt "+Qt.oid+" 0 R"),L("/ID [ <"+lA+"> <"+lA+"> ]"),L(">>")},lt=g.__private__.putHeader=function(){L("%PDF-"+F),L("%ºß¬à")},io=g.__private__.putXRef=function(){var h="0000000000";L("xref"),L("0 "+(X+1)),L("0000000000 65535 f ");for(var v=1;v<=X;v++)typeof M[v]=="function"?L((h+M[v]()).slice(-10)+" 00000 n "):M[v]!==void 0?L((h+M[v]).slice(-10)+" 00000 n "):L("0000000000 00000 n ")},Gr=g.__private__.buildDocument=function(){var h;X=0,oA=0,rA=[],M=[],fA=[],En=vt(),Ur=vt(),SA(rA),Qe.publish("buildDocument"),lt(),Kr(),function(){Qe.publish("putAdditionalObjects");for(var N=0;N<fA.length;N++){var V=fA[N];Ft(V.objId,!0),L(V.content),L("endobj")}Qe.publish("postPutAdditionalObjects")}(),h=[],function(){for(var N in le)le.hasOwnProperty(N)&&(p===!1||p===!0&&w.hasOwnProperty(N))&&ui(le[N])}(),function(){var N;for(N in YA)YA.hasOwnProperty(N)&&Ac(YA[N])}(),function(){for(var N in It)It.hasOwnProperty(N)&&Gi(It[N])}(),function(N){var V;for(V in VA)VA.hasOwnProperty(V)&&(VA[V]instanceof Li?Vi(VA[V]):VA[V]instanceof _a&&qi(VA[V],N))}(h),Qe.publish("putResources"),h.forEach(Ka),Ka({resourcesOid:Ur,objectOid:Number.MAX_SAFE_INTEGER}),Qe.publish("postPutResources"),f!==null&&(Qt.oid=Je(),L("<<"),L("/Filter /Standard"),L("/V "+Qt.v),L("/R "+Qt.r),L("/U <"+Qt.toHexString(Qt.U)+">"),L("/O <"+Qt.toHexString(Qt.O)+">"),L("/P "+Qt.P),L(">>"),L("endobj")),jr(),zi();var v=oA;return io(),ec(),L("startxref"),L(""+v),L("%%EOF"),SA(bA[T]),rA.join(`
`)},Wi=g.__private__.getBlob=function(h){return new Blob([WA(h)],{type:"application/pdf"})},Va=function(h){for(;h.firstChild;)h.removeChild(h.firstChild)},er=function(h){var v,N=h.document,V=N.documentElement,$=N.head,hA=N.body;return $||($=N.createElement("head"),V.appendChild($)),hA||(hA=N.createElement("body"),V.appendChild(hA)),Va($),Va(hA),(v=N.createElement("style")).appendChild(N.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),$.appendChild(v),{document:N,body:hA}},Xi=g.output=g.__private__.output=(dr=function(h,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",h){case void 0:return Gr();case"save":g.save(v.filename);break;case"arraybuffer":return WA(Gr());case"blob":return Wi(Gr());case"bloburi":case"bloburl":if($A.URL!==void 0&&typeof $A.URL.createObjectURL=="function")return $A.URL&&$A.URL.createObjectURL(Wi(Gr()))||void 0;He.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var N="",V=Gr();try{N=Fd(V)}catch{N=Fd(unescape(encodeURIComponent(V)))}return"data:application/pdf;filename="+encodeURIComponent(v.filename)+";base64,"+N;case"pdfobjectnewwindow":if(Object.prototype.toString.call($A)==="[object Window]"){var $="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",hA=!v.pdfObjectUrl;hA||($=v.pdfObjectUrl);var vA=$A.open();if(vA!==null){var kA=er(vA),DA=kA.document.createElement("script"),Ae=this;DA.src=$,hA&&(DA.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",DA.crossOrigin="anonymous"),DA.onload=function(){vA.PDFObject.embed(Ae.output("dataurlstring"),v)},kA.body.appendChild(DA)}return vA}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call($A)==="[object Window]"){var ne=v.pdfJsUrl||"examples/PDF.js/web/viewer.html",we=$A.open();if(we!==null){var ct=er(we),Ie=ct.document.createElement("iframe"),Ee=ne.indexOf("?")===-1?"?":"&";Ae=this,Ie.id="pdfViewer",Ie.width="500px",Ie.height="400px",Ie.src=ne+Ee+"file=&downloadName="+encodeURIComponent(v.filename),Ie.onload=function(){we.document.title=v.filename,Ie.contentWindow.PDFViewerApplication.open(Ae.output("bloburl"))},ct.body.appendChild(Ie)}return we}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call($A)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Me=$A.open();if(Me!==null){var ze=er(Me),We=ze.document.createElement("iframe");We.src=this.output("datauristring",v),ze.body.appendChild(We),Me.document.title=v.filename}if(Me||typeof safari>"u")return Me;break;case"datauri":case"dataurl":return $A.document.location.href=this.output("datauristring",v);default:return null}},dr.foo=function(){try{return dr.apply(this,arguments)}catch(N){var h=N.stack||"";~h.indexOf(" at ")&&(h=h.split(" at ")[1]);var v="Error in function "+h.split(`
`)[0].split("<")[0]+": "+N.message;if(!$A.console)throw new Error(v);$A.console.error(v,N),$A.alert&&alert(v)}},dr.foo.bar=dr,dr.foo),cn=function(h){return Array.isArray(oi)===!0&&oi.indexOf(h)>-1};switch(r){case"pt":ae=1;break;case"mm":ae=72/25.4;break;case"cm":ae=72/2.54;break;case"in":ae=72;break;case"px":ae=cn("px_scaling")==1?.75:96/72;break;case"pc":case"em":ae=12;break;case"ex":ae=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ae=r}var Qt=null;pA(),tA();var ao=g.__private__.getPageInfo=g.getPageInfo=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:XA[h].objId,pageNumber:h,pageContext:XA[h]}},tc=g.__private__.getPageInfoByObjId=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in XA)if(XA[v].objId===h)break;return ao(v)},rc=g.__private__.getCurrentPageInfo=g.getCurrentPageInfo=function(){return{objId:XA[T].objId,pageNumber:T,pageContext:XA[T]}};g.addPage=function(){return eo.apply(this,arguments),this},g.setPage=function(){return to.apply(this,arguments),SA.call(this,bA[T]),this},g.insertPage=function(h){return this.addPage(),this.movePage(T,h),this},g.movePage=function(h,v){var N,V;if(h>v){N=bA[h],V=XA[h];for(var $=h;$>v;$--)bA[$]=bA[$-1],XA[$]=XA[$-1];bA[v]=N,XA[v]=V,this.setPage(v)}else if(h<v){N=bA[h],V=XA[h];for(var hA=h;hA<v;hA++)bA[hA]=bA[hA+1],XA[hA]=XA[hA+1];bA[v]=N,XA[v]=V,this.setPage(v)}return this},g.deletePage=function(){return Ga.apply(this,arguments),this},g.__private__.text=g.text=function(h,v,N,V,$){var hA,vA,kA,DA,Ae,ne,we,ct,Ie,Ee=(V=V||{}).scope||this;if(typeof h=="number"&&typeof v=="number"&&(typeof N=="string"||Array.isArray(N))){var Me=N;N=v,v=h,h=Me}if(arguments[3]instanceof JA==0?(kA=arguments[4],DA=arguments[5],Ne(we=arguments[3])==="object"&&we!==null||(typeof kA=="string"&&(DA=kA,kA=null),typeof we=="string"&&(DA=we,we=null),typeof we=="number"&&(kA=we,we=null),V={flags:we,angle:kA,align:DA})):(H("The transform parameter of text() with a Matrix value"),Ie=$),isNaN(v)||isNaN(N)||h==null)throw new Error("Invalid arguments passed to jsPDF.text");if(h.length===0)return Ee;var ze,We="",St=typeof V.lineHeightFactor=="number"?V.lineHeightFactor:fi,gn=Ee.internal.scaleFactor;function Za(ke){return ke=ke.split("	").join(Array(V.TabLen||9).join(" ")),Br(ke,we)}function gi(ke){for(var Te,et=ke.concat(),ht=[],pn=et.length;pn--;)typeof(Te=et.shift())=="string"?ht.push(Te):Array.isArray(ke)&&(Te.length===1||Te[1]===void 0&&Te[2]===void 0)?ht.push(Te[0]):ht.push([Te[0],Te[1],Te[2]]);return ht}function Bi(ke,Te){var et;if(typeof ke=="string")et=Te(ke)[0];else if(Array.isArray(ke)){for(var ht,pn,ns=ke.concat(),ca=[],po=ns.length;po--;)typeof(ht=ns.shift())=="string"?ca.push(Te(ht)[0]):Array.isArray(ht)&&typeof ht[0]=="string"&&(pn=Te(ht[0],ht[1],ht[2]),ca.push([pn[0],pn[1],pn[2]]));et=ca}return et}var Hn=!1,pi=!0;if(typeof h=="string")Hn=!0;else if(Array.isArray(h)){var ta=h.concat();vA=[];for(var ra,Ht=ta.length;Ht--;)(typeof(ra=ta.shift())!="string"||Array.isArray(ra)&&typeof ra[0]!="string")&&(pi=!1);Hn=pi}if(Hn===!1)throw new Error('Type of text must be string or Array. "'+h+'" is not recognized.');typeof h=="string"&&(h=h.match(/[\r?\n]/)?h.split(/\r\n|\r|\n/g):[h]);var wi=CA/Ee.internal.scaleFactor,vi=wi*(St-1);switch(V.baseline){case"bottom":N-=vi;break;case"top":N+=wi-vi;break;case"hanging":N+=wi-2*vi;break;case"middle":N+=wi/2-vi}if((ne=V.maxWidth||0)>0&&(typeof h=="string"?h=Ee.splitTextToSize(h,ne):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(ke,Te){return ke.concat(Ee.splitTextToSize(Te,ne))},[]))),hA={text:h,x:v,y:N,options:V,mutex:{pdfEscape:Br,activeFontKey:PA,fonts:le,activeFontSize:CA}},Qe.publish("preProcessText",hA),h=hA.text,kA=(V=hA.options).angle,Ie instanceof JA==0&&kA&&typeof kA=="number"){kA*=Math.PI/180,V.rotationDirection===0&&(kA=-kA),O===G&&(kA=-kA);var $a=Math.cos(kA),zr=Math.sin(kA);Ie=new JA($a,zr,-zr,$a,0,0)}else kA&&kA instanceof JA&&(Ie=kA);O!==G||Ie||(Ie=ln),(Ae=V.charSpace||$i)!==void 0&&(We+=q(K(Ae))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(ct=V.horizontalScale)!==void 0&&(We+=q(100*ct)+` Tz
`),V.lang;var Kt=-1,go=V.renderingMode!==void 0?V.renderingMode:V.stroke,na=Ee.internal.getCurrentPageInfo().pageContext;switch(go){case 0:case!1:case"fill":Kt=0;break;case 1:case!0:case"stroke":Kt=1;break;case 2:case"fillThenStroke":Kt=2;break;case 3:case"invisible":Kt=3;break;case 4:case"fillAndAddForClipping":Kt=4;break;case 5:case"strokeAndAddPathForClipping":Kt=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Kt=6;break;case 7:case"addToPathForClipping":Kt=7}var Bo=na.usedRenderingMode!==void 0?na.usedRenderingMode:-1;Kt!==-1?We+=Kt+` Tr
`:Bo!==-1&&(We+=`0 Tr
`),Kt!==-1&&(na.usedRenderingMode=Kt),DA=V.align||"left";var pr,mi=CA*St,As=Ee.internal.pageSize.getWidth(),ia=le[PA];Ae=V.charSpace||$i,ne=V.maxWidth||0,we=Object.assign({autoencode:!0,noBOM:!0},V.flags);var Ci=[],es=function(ke){return Ee.getStringUnitWidth(ke,{font:ia,charSpace:Ae,fontSize:CA,doKerning:!1})*CA/gn};if(Object.prototype.toString.call(h)==="[object Array]"){var jt;vA=gi(h),DA!=="left"&&(pr=vA.map(es));var Xt,aa=0;if(DA==="right"){v-=pr[0],h=[],Ht=vA.length;for(var Nn=0;Nn<Ht;Nn++)Nn===0?(Xt=un(v),jt=fn(N)):(Xt=K(aa-pr[Nn]),jt=-mi),h.push([vA[Nn],Xt,jt]),aa=pr[Nn]}else if(DA==="center"){v-=pr[0]/2,h=[],Ht=vA.length;for(var Dn=0;Dn<Ht;Dn++)Dn===0?(Xt=un(v),jt=fn(N)):(Xt=K((aa-pr[Dn])/2),jt=-mi),h.push([vA[Dn],Xt,jt]),aa=pr[Dn]}else if(DA==="left"){h=[],Ht=vA.length;for(var sa=0;sa<Ht;sa++)h.push(vA[sa])}else if(DA==="justify"&&ia.encoding==="Identity-H"){h=[],Ht=vA.length,ne=ne!==0?ne:As;for(var bi=0,ut=0;ut<Ht;ut++)if(jt=ut===0?fn(N):-mi,Xt=ut===0?un(v):bi,ut<Ht-1){var wc=K((ne-pr[ut])/(vA[ut].split(" ").length-1)),Wr=vA[ut].split(" ");h.push([Wr[0]+" ",Xt,jt]),bi=0;for(var Er=1;Er<Wr.length;Er++){var Fi=(es(Wr[Er-1]+" "+Wr[Er])-es(Wr[Er]))*gn+wc;Er==Wr.length-1?h.push([Wr[Er],Fi,0]):h.push([Wr[Er]+" ",Fi,0]),bi-=Fi}}else h.push([vA[ut],Xt,jt]);h.push(["",bi,0])}else{if(DA!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(h=[],Ht=vA.length,ne=ne!==0?ne:As,ut=0;ut<Ht;ut++){jt=ut===0?fn(N):-mi,Xt=ut===0?un(v):0;var ts=vA[ut].split(" ").length-1,rs=ts>0?(ne-pr[ut])/ts:0;ut<Ht-1?Ci.push(q(K(rs))):Ci.push(0),h.push([vA[ut],Xt,jt])}}}(typeof V.R2L=="boolean"?V.R2L:qA)===!0&&(h=Bi(h,function(ke,Te,et){return[ke.split("").reverse().join(""),Te,et]})),hA={text:h,x:v,y:N,options:V,mutex:{pdfEscape:Br,activeFontKey:PA,fonts:le,activeFontSize:CA}},Qe.publish("postProcessText",hA),h=hA.text,ze=hA.mutex.isHex||!1;var oa=le[PA].encoding;oa!=="WinAnsiEncoding"&&oa!=="StandardEncoding"||(h=Bi(h,function(ke,Te,et){return[Za(ke),Te,et]})),vA=gi(h),h=[];for(var Qi,yi,kn,Bn=Array.isArray(vA[0])?1:0,Tn="",la=function(ke,Te,et){var ht="";return et instanceof JA?(et=typeof V.angle=="number"?on(et,new JA(1,0,0,1,ke,Te)):on(new JA(1,0,0,1,ke,Te),et),O===G&&(et=on(new JA(1,0,0,-1,0,0),et)),ht=et.join(" ")+` Tm
`):ht=q(ke)+" "+q(Te)+` Td
`,ht},Nt=0;Nt<vA.length;Nt++){switch(Tn="",Bn){case 1:kn=(ze?"<":"(")+vA[Nt][0]+(ze?">":")"),Qi=parseFloat(vA[Nt][1]),yi=parseFloat(vA[Nt][2]);break;case 0:kn=(ze?"<":"(")+vA[Nt]+(ze?">":")"),Qi=un(v),yi=fn(N)}Ci!==void 0&&Ci[Nt]!==void 0&&(Tn=Ci[Nt]+` Tw
`),Nt===0?h.push(Tn+la(Qi,yi,Ie)+kn):Bn===0?h.push(Tn+kn):Bn===1&&h.push(Tn+la(Qi,yi,Ie)+kn)}h=Bn===0?h.join(` Tj
T* `):h.join(` Tj
`),h+=` Tj
`;var Xr=`BT
/`;return Xr+=PA+" "+CA+` Tf
`,Xr+=q(CA*St)+` TL
`,Xr+=qr+`
`,Xr+=We,Xr+=h,L(Xr+="ET"),w[PA]=!0,Ee};var nc=g.__private__.clip=g.clip=function(h){return L(h==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return nc("evenodd")},g.__private__.discardPath=g.discardPath=function(){return L("n"),this};var Vr=g.__private__.isValidStyle=function(h){var v=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(h)!==-1&&(v=!0),v};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(h){return Vr(h)&&(u=h),this};var so=g.__private__.getStyle=g.getStyle=function(h){var v=u;switch(h){case"D":case"S":v="S";break;case"F":v="f";break;case"FD":case"DF":v="B";break;case"f":case"f*":case"B":case"B*":v=h}return v},Ji=g.close=function(){return L("h"),this};g.stroke=function(){return L("S"),this},g.fill=function(h){return Yi("f",h),this},g.fillEvenOdd=function(h){return Yi("f*",h),this},g.fillStroke=function(h){return Yi("B",h),this},g.fillStrokeEvenOdd=function(h){return Yi("B*",h),this};var Yi=function(h,v){Ne(v)==="object"?ac(v,h):L(h)},qa=function(h){h===null||O===G&&h===void 0||(h=so(h),L(h))};function ic(h,v,N,V,$){var hA=new _a(v||this.boundingBox,N||this.xStep,V||this.yStep,this.gState,$||this.matrix);hA.stream=this.stream;var vA=h+"$$"+this.cloneIndex+++"$$";return hr(vA,hA),hA}var ac=function(h,v){var N=De[h.key],V=VA[N];if(V instanceof Li)L("q"),L(sc(v)),V.gState&&g.setGState(V.gState),L(h.matrix.toString()+" cm"),L("/"+N+" sh"),L("Q");else if(V instanceof _a){var $=new JA(1,0,0,-1,0,di());h.matrix&&($=$.multiply(h.matrix||ln),N=ic.call(V,h.key,h.boundingBox,h.xStep,h.yStep,$).id),L("q"),L("/Pattern cs"),L("/"+N+" scn"),V.gState&&g.setGState(V.gState),L(v),L("Q")}},sc=function(h){switch(h){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"}},Ln=g.moveTo=function(h,v){return L(q(K(h))+" "+q(j(v))+" m"),this},oo=g.lineTo=function(h,v){return L(q(K(h))+" "+q(j(v))+" l"),this},In=g.curveTo=function(h,v,N,V,$,hA){return L([q(K(h)),q(j(v)),q(K(N)),q(j(V)),q(K($)),q(j(hA)),"c"].join(" ")),this};g.__private__.line=g.line=function(h,v,N,V,$){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||!Vr($))throw new Error("Invalid arguments passed to jsPDF.line");return O===P?this.lines([[N-h,V-v]],h,v,[1,1],$||"S"):this.lines([[N-h,V-v]],h,v,[1,1]).stroke()},g.__private__.lines=g.lines=function(h,v,N,V,$,hA){var vA,kA,DA,Ae,ne,we,ct,Ie,Ee,Me,ze,We;if(typeof h=="number"&&(We=N,N=v,v=h,h=We),V=V||[1,1],hA=hA||!1,isNaN(v)||isNaN(N)||!Array.isArray(h)||!Array.isArray(V)||!Vr($)||typeof hA!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ln(v,N),vA=V[0],kA=V[1],Ae=h.length,Me=v,ze=N,DA=0;DA<Ae;DA++)(ne=h[DA]).length===2?(Me=ne[0]*vA+Me,ze=ne[1]*kA+ze,oo(Me,ze)):(we=ne[0]*vA+Me,ct=ne[1]*kA+ze,Ie=ne[2]*vA+Me,Ee=ne[3]*kA+ze,Me=ne[4]*vA+Me,ze=ne[5]*kA+ze,In(we,ct,Ie,Ee,Me,ze));return hA&&Ji(),qa($),this},g.path=function(h){for(var v=0;v<h.length;v++){var N=h[v],V=N.c;switch(N.op){case"m":Ln(V[0],V[1]);break;case"l":oo(V[0],V[1]);break;case"c":In.apply(this,V);break;case"h":Ji()}}return this},g.__private__.rect=g.rect=function(h,v,N,V,$){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||!Vr($))throw new Error("Invalid arguments passed to jsPDF.rect");return O===P&&(V=-V),L([q(K(h)),q(j(v)),q(K(N)),q(K(V)),"re"].join(" ")),qa($),this},g.__private__.triangle=g.triangle=function(h,v,N,V,$,hA,vA){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||isNaN($)||isNaN(hA)||!Vr(vA))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[N-h,V-v],[$-N,hA-V],[h-$,v-hA]],h,v,[1,1],vA,!0),this},g.__private__.roundedRect=g.roundedRect=function(h,v,N,V,$,hA,vA){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||isNaN($)||isNaN(hA)||!Vr(vA))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var kA=4/3*(Math.SQRT2-1);return $=Math.min($,.5*N),hA=Math.min(hA,.5*V),this.lines([[N-2*$,0],[$*kA,0,$,hA-hA*kA,$,hA],[0,V-2*hA],[0,hA*kA,-$*kA,hA,-$,hA],[2*$-N,0],[-$*kA,0,-$,-hA*kA,-$,-hA],[0,2*hA-V],[0,-hA*kA,$*kA,-hA,$,-hA]],h+$,v,[1,1],vA,!0),this},g.__private__.ellipse=g.ellipse=function(h,v,N,V,$){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||!Vr($))throw new Error("Invalid arguments passed to jsPDF.ellipse");var hA=4/3*(Math.SQRT2-1)*N,vA=4/3*(Math.SQRT2-1)*V;return Ln(h+N,v),In(h+N,v-vA,h+hA,v-V,h,v-V),In(h-hA,v-V,h-N,v-vA,h-N,v),In(h-N,v+vA,h-hA,v+V,h,v+V),In(h+hA,v+V,h+N,v+vA,h+N,v),qa($),this},g.__private__.circle=g.circle=function(h,v,N,V){if(isNaN(h)||isNaN(v)||isNaN(N)||!Vr(V))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(h,v,N,N,V)},g.setFont=function(h,v,N){return N&&(v=nA(v,N)),PA=no(h,v,{disableWarning:!1}),this};var oc=g.__private__.getFont=g.getFont=function(){return le[no.apply(g,arguments)]};g.__private__.getFontList=g.getFontList=function(){var h,v,N={};for(h in ce)if(ce.hasOwnProperty(h))for(v in N[h]=[],ce[h])ce[h].hasOwnProperty(v)&&N[h].push(v);return N},g.addFont=function(h,v,N,V,$){var hA=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&hA.indexOf(arguments[3])!==-1?$=arguments[3]:arguments[3]&&hA.indexOf(arguments[3])==-1&&(N=nA(N,V)),Ao.call(this,h,v,N,$=$||"Identity-H")};var fi,ZA=A.lineWidth||.200025,lc=g.__private__.getLineWidth=g.getLineWidth=function(){return ZA},cc=g.__private__.setLineWidth=g.setLineWidth=function(h){return ZA=h,L(q(K(h))+" w"),this};g.__private__.setLineDash=KA.API.setLineDash=KA.API.setLineDashPattern=function(h,v){if(h=h||[],v=v||0,isNaN(v)||!Array.isArray(h))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return h=h.map(function(N){return q(K(N))}).join(" "),v=q(K(v)),L("["+h+"] "+v+" d"),this};var uc=g.__private__.getLineHeight=g.getLineHeight=function(){return CA*fi};g.__private__.getLineHeight=g.getLineHeight=function(){return CA*fi};var fc=g.__private__.setLineHeightFactor=g.setLineHeightFactor=function(h){return typeof(h=h||1.15)=="number"&&(fi=h),this},hc=g.__private__.getLineHeightFactor=g.getLineHeightFactor=function(){return fi};fc(A.lineHeight);var un=g.__private__.getHorizontalCoordinate=function(h){return K(h)},fn=g.__private__.getVerticalCoordinate=function(h){return O===G?h:XA[T].mediaBox.topRightY-XA[T].mediaBox.bottomLeftY-K(h)},dc=g.__private__.getHorizontalCoordinateString=g.getHorizontalCoordinateString=function(h){return q(un(h))},gc=g.__private__.getVerticalCoordinateString=g.getVerticalCoordinateString=function(h){return q(fn(h))},Zi=A.strokeColor||"0 G";g.__private__.getStrokeColor=g.getDrawColor=function(){return Rr(Zi)},g.__private__.setStrokeColor=g.setDrawColor=function(h,v,N,V){return Zi=_r({ch1:h,ch2:v,ch3:N,ch4:V,pdfColorType:"draw",precision:2}),L(Zi),this};var za=A.fillColor||"0 g";g.__private__.getFillColor=g.getFillColor=function(){return Rr(za)},g.__private__.setFillColor=g.setFillColor=function(h,v,N,V){return za=_r({ch1:h,ch2:v,ch3:N,ch4:V,pdfColorType:"fill",precision:2}),L(za),this};var qr=A.textColor||"0 g",Bc=g.__private__.getTextColor=g.getTextColor=function(){return Rr(qr)};g.__private__.setTextColor=g.setTextColor=function(h,v,N,V){return qr=_r({ch1:h,ch2:v,ch3:N,ch4:V,pdfColorType:"text",precision:3}),this};var $i=A.charSpace,pc=g.__private__.getCharSpace=g.getCharSpace=function(){return parseFloat($i||0)};g.__private__.setCharSpace=g.setCharSpace=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return $i=h,this};var Wa=0;g.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},g.__private__.setLineCap=g.setLineCap=function(h){var v=g.CapJoinStyles[h];if(v===void 0)throw new Error("Line cap style of '"+h+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Wa=v,L(v+" J"),this};var Sn=0;g.__private__.setLineJoin=g.setLineJoin=function(h){var v=g.CapJoinStyles[h];if(v===void 0)throw new Error("Line join style of '"+h+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Sn=v,L(v+" j"),this},g.__private__.setLineMiterLimit=g.__private__.setMiterLimit=g.setLineMiterLimit=g.setMiterLimit=function(h){if(h=h||0,isNaN(h))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return L(q(K(h))+" M"),this},g.GState=Ol,g.setGState=function(h){(h=typeof h=="string"?YA[re[h]]:Xa(null,h)).equals(Ge)||(L("/"+h.id+" gs"),Ge=h)};var Xa=function(h,v){if(!h||!re[h]){var N=!1;for(var V in YA)if(YA.hasOwnProperty(V)&&YA[V].equals(v)){N=!0;break}if(N)v=YA[V];else{var $="GS"+(Object.keys(YA).length+1).toString(10);YA[$]=v,v.id=$}return h&&(re[h]=v.id),Qe.publish("addGState",v),v}};g.addGState=function(h,v){return Xa(h,v),this},g.saveGraphicsState=function(){return L("q"),je.push({key:PA,size:CA,color:qr}),this},g.restoreGraphicsState=function(){L("Q");var h=je.pop();return PA=h.key,CA=h.size,qr=h.color,Ge=null,this},g.setCurrentTransformationMatrix=function(h){return L(h.toString()+" cm"),this},g.comment=function(h){return L("#"+h),this};var hi=function(h,v){var N=h||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return N},set:function(hA){isNaN(hA)||(N=parseFloat(hA))}});var V=v||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return V},set:function(hA){isNaN(hA)||(V=parseFloat(hA))}});var $="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return $},set:function(hA){$=hA.toString()}}),this},Ja=function(h,v,N,V){hi.call(this,h,v),this.type="rect";var $=N||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return $},set:function(vA){isNaN(vA)||($=parseFloat(vA))}});var hA=V||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return hA},set:function(vA){isNaN(vA)||(hA=parseFloat(vA))}}),this},Aa=function(){this.page=ue,this.currentPage=T,this.pages=bA.slice(0),this.pagesContext=XA.slice(0),this.x=RA,this.y=At,this.matrix=me,this.width=lo(T),this.height=dn(T),this.outputDestination=UA,this.id="",this.objectNumber=-1};Aa.prototype.restore=function(){ue=this.page,T=this.currentPage,XA=this.pagesContext,bA=this.pages,RA=this.x,At=this.y,me=this.matrix,hn(T,this.width),co(T,this.height),UA=this.outputDestination};var Ya=function(h,v,N,V,$){Mr.push(new Aa),ue=T=0,bA=[],RA=h,At=v,me=$,ja([N,V])};for(var ea in g.beginFormObject=function(h,v,N,V,$){return Ya(h,v,N,V,$),this},g.endFormObject=function(h){return function(v){if(sn[v])Mr.pop().restore();else{var N=new Aa,V="Xo"+(Object.keys(It).length+1).toString(10);N.id=V,sn[v]=V,It[V]=N,Qe.publish("addFormObject",N),Mr.pop().restore()}}(h),this},g.doFormObject=function(h,v){var N=It[sn[h]];return L("q"),L(v.toString()+" cm"),L("/"+N.id+" Do"),L("Q"),this},g.getFormObject=function(h){var v=It[sn[h]];return{x:v.x,y:v.y,width:v.width,height:v.height,matrix:v.matrix}},g.save=function(h,v){return h=h||"generated.pdf",(v=v||{}).returnPromise=v.returnPromise||!1,v.returnPromise===!1?(xi(Wi(Gr()),h),typeof xi.unload=="function"&&$A.setTimeout&&setTimeout(xi.unload,911),this):new Promise(function(N,V){try{var $=xi(Wi(Gr()),h);typeof xi.unload=="function"&&$A.setTimeout&&setTimeout(xi.unload,911),N($)}catch(hA){V(hA.message)}})},KA.API)KA.API.hasOwnProperty(ea)&&(ea==="events"&&KA.API.events.length?function(h,v){var N,V,$;for($=v.length-1;$!==-1;$--)N=v[$][0],V=v[$][1],h.subscribe.apply(h,[N].concat(typeof V=="function"?[V]:V))}(Qe,KA.API.events):g[ea]=KA.API[ea]);function lo(h){return XA[h].mediaBox.topRightX-XA[h].mediaBox.bottomLeftX}function hn(h,v){XA[h].mediaBox.topRightX=v+XA[h].mediaBox.bottomLeftX}function dn(h){return XA[h].mediaBox.topRightY-XA[h].mediaBox.bottomLeftY}function co(h,v){XA[h].mediaBox.topRightY=v+XA[h].mediaBox.bottomLeftY}var uo=g.getPageWidth=function(h){return lo(h=h||T)/ae},fo=g.setPageWidth=function(h,v){hn(h,v*ae)},di=g.getPageHeight=function(h){return dn(h=h||T)/ae},ho=g.setPageHeight=function(h,v){co(h,v*ae)};return g.internal={pdfEscape:Br,getStyle:so,getFont:oc,getFontSize:HA,getCharSpace:pc,getTextColor:Bc,getLineHeight:uc,getLineHeightFactor:hc,getLineWidth:lc,write:wA,getHorizontalCoordinate:un,getVerticalCoordinate:fn,getCoordinateString:dc,getVerticalCoordinateString:gc,collections:{},newObject:Je,newAdditionalObject:li,newObjectDeferred:vt,newObjectDeferredBegin:Ft,getFilters:xr,putStream:gr,events:Qe,scaleFactor:ae,pageSize:{getWidth:function(){return uo(T)},setWidth:function(h){fo(T,h)},getHeight:function(){return di(T)},setHeight:function(h){ho(T,h)}},encryptionOptions:f,encryption:Qt,getEncryptor:function(h){return f!==null?Qt.encryptor(h,0):function(v){return v}},output:Xi,getNumberOfPages:ro,get pages(){return bA},out:L,f2:_,f3:I,getPageInfo:ao,getPageInfoByObjId:tc,getCurrentPageInfo:rc,getPDFVersion:y,Point:hi,Rectangle:Ja,Matrix:JA,hasHotfix:cn},Object.defineProperty(g.internal.pageSize,"width",{get:function(){return uo(T)},set:function(h){fo(T,h)},enumerable:!0,configurable:!0}),Object.defineProperty(g.internal.pageSize,"height",{get:function(){return di(T)},set:function(h){ho(T,h)},enumerable:!0,configurable:!0}),(function(h){for(var v=0,N=jA.length;v<N;v++){var V=Ao.call(this,h[v][0],h[v][1],h[v][2],jA[v][3],!0);p===!1&&(w[V]=!0);var $=h[v][0].split("-");$s({id:V,fontName:$[0],fontStyle:$[1]||""})}Qe.publish("addFonts",{fonts:le,dictionary:ce})}).call(g,jA),PA="F1",eo(n,t),Qe.publish("initialized"),g}Qa.prototype.lsbFirstWord=function(A){return String.fromCharCode(255&A,A>>8&255,A>>16&255,A>>24&255)},Qa.prototype.toHexString=function(A){return A.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Qa.prototype.hexToBytes=function(A){for(var e=[],t=0;t<A.length;t+=2)e.push(String.fromCharCode(parseInt(A.substr(t,2),16)));return e.join("")},Qa.prototype.processOwnerPassword=function(A,e){return pf(Bf(e).substr(0,5),A)},Qa.prototype.encryptor=function(A,e){var t=Bf(this.encryptionKey+String.fromCharCode(255&A,A>>8&255,A>>16&255,255&e,e>>8&255)).substr(0,10);return function(r){return pf(t,r)}},Ol.prototype.equals=function(A){var e,t="id,objectNumber,equals";if(!A||Ne(A)!==Ne(this))return!1;var r=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!A.hasOwnProperty(e)||this[e]!==A[e])return!1;r++}for(e in A)A.hasOwnProperty(e)&&t.indexOf(e)<0&&r--;return r===0},KA.API={events:[]},KA.version="4.2.1";var $e=KA.API,Of=1,ji=function(A){return A.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ma=function(A){return A.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ri=function(A){return A.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},ee=function(A){return A.toFixed(2)},Vn=function(A){return A.toFixed(5)};$e.__acroform__={};var Ar=function(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A},_d=function(A){return A*Of},Zr=function(A){var e=new Wg,t=NA.internal.getHeight(A)||0,r=NA.internal.getWidth(A)||0;return e.BBox=[0,0,Number(ee(r)),Number(ee(t))],e},Wb=$e.__acroform__.setBit=function(A,e){if(A=A||0,e=e||0,isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return A|1<<e},Xb=$e.__acroform__.clearBit=function(A,e){if(A=A||0,e=e||0,isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return A&~(1<<e)},Jb=$e.__acroform__.getBit=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return A&1<<e?1:0},at=$e.__acroform__.getBitForPdf=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Jb(A,e-1)},st=$e.__acroform__.setBitForPdf=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Wb(A,e-1)},ot=$e.__acroform__.clearBitForPdf=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Xb(A,e-1)},Yb=$e.__acroform__.calculateCoordinates=function(A,e){var t=e.internal.getHorizontalCoordinate,r=e.internal.getVerticalCoordinate,n=A[0],i=A[1],o=A[2],s=A[3],l={};return l.lowerLeft_X=t(n)||0,l.lowerLeft_Y=r(i+s)||0,l.upperRight_X=t(n+o)||0,l.upperRight_Y=r(i)||0,[Number(ee(l.lowerLeft_X)),Number(ee(l.lowerLeft_Y)),Number(ee(l.upperRight_X)),Number(ee(l.upperRight_Y))]},Zb=function(A){if(A.appearanceStreamContent)return A.appearanceStreamContent;if(A.V||A.DV){var e=[],t=A._V||A.DV,r=wf(A,t),n=A.scope.internal.getFont(A.fontName,A.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(A.scope.__private__.encodeColorString(A.color)),e.push("/"+n+" "+ee(r.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(r.text),e.push("ET"),e.push("Q"),e.push("EMC");var i=Zr(A);return i.scope=A.scope,i.stream=e.join(`
`),i}},wf=function(A,e){var t=A.fontSize===0?A.maxFontSize:A.fontSize,r={text:"",fontSize:""},n=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");n=A.multiline?n.map(function(_){return _.split(`
`)}):n.map(function(_){return[_]});var i=t,o=NA.internal.getHeight(A)||0;o=o<0?-o:o;var s=NA.internal.getWidth(A)||0;s=s<0?-s:s;var l=function(_,I,K){if(_+1<n.length){var j=I+" "+n[_+1][0];return ul(j,A,K).width<=s-4}return!1};i++;A:for(;i>0;){e="",i--;var u,f,p=ul("3",A,i).height,w=A.multiline?o-i:(o-p)/2,g=w+=2,F=0,y=0,S=0;if(i<=0){e=`(...) Tj
`,e+="% Width of Text: "+ul(e,A,i=12).width+", FieldWidth:"+s+`
`;break}for(var b="",P=0,G=0;G<n.length;G++)if(n.hasOwnProperty(G)){var O=!1;if(n[G].length!==1&&S!==n[G].length-1){if((p+2)*(P+2)+2>o)continue A;b+=n[G][S],O=!0,y=G,G--}else{b=(b+=n[G][S]+" ").substr(b.length-1)==" "?b.substr(0,b.length-1):b;var J=parseInt(G),Z=l(J,b,i),nA=G>=n.length-1;if(Z&&!nA){b+=" ",S=0;continue}if(Z||nA){if(nA)y=J;else if(A.multiline&&(p+2)*(P+2)+2>o)continue A}else{if(!A.multiline||(p+2)*(P+2)+2>o)continue A;y=J}}for(var q="",H=F;H<=y;H++){var AA=n[H];if(A.multiline){if(H===y){q+=AA[S]+" ",S=(S+1)%AA.length;continue}if(H===F){q+=AA[AA.length-1]+" ";continue}}q+=AA[0]+" "}switch(q=q.substr(q.length-1)==" "?q.substr(0,q.length-1):q,f=ul(q,A,i).width,A.textAlign){case"right":u=s-f-2;break;case"center":u=(s-f)/2;break;default:u=2}e+=ee(u)+" "+ee(g)+` Td
`,e+="("+ji(q)+`) Tj
`,e+=-ee(u)+` 0 Td
`,g=-(i+2),f=0,F=O?y:y+1,P++,b=""}break}return r.text=e,r.fontSize=i,r},ul=function(A,e,t){var r=e.scope.internal.getFont(e.fontName,e.fontStyle),n=e.scope.getStringUnitWidth(A,{font:r,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:n}},$b={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},AF=function(A,e){var t={type:"reference",object:A};e.internal.getPageInfo(A.page).pageContext.annotations.find(function(r){return r.type===t.type&&r.object===t.object})===void 0&&e.internal.getPageInfo(A.page).pageContext.annotations.push(t)},eF=function(A,e){if(e.scope=A,A.internal!==void 0&&(A.internal.acroformPlugin===void 0||A.internal.acroformPlugin.isInitialized===!1)){if(Or.FieldNum=0,A.internal.acroformPlugin=JSON.parse(JSON.stringify($b)),A.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Of=A.internal.scaleFactor,A.internal.acroformPlugin.acroFormDictionaryRoot=new Xg,A.internal.acroformPlugin.acroFormDictionaryRoot.scope=A,A.internal.acroformPlugin.acroFormDictionaryRoot._eventID=A.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(A)}),A.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in r)if(r.hasOwnProperty(n)){var i=r[n];i.objId=void 0,i.hasAnnotation&&AF(i,t)}})(A)}),A.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(A)}),A.internal.events.subscribe("postPutPages",function(t){(function(r,n){var i=!r;for(var o in r||(n.internal.newObjectDeferredBegin(n.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),n.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||n.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(o)){var s=r[o],l=[],u=s.Rect;if(s.Rect&&(s.Rect=Yb(s.Rect,n)),n.internal.newObjectDeferredBegin(s.objId,!0),s.DA=NA.createDefaultAppearanceStream(s),Ne(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(l=s.getKeyValueListForStream()),s.Rect=u,s.hasAppearanceStream&&!s.appearanceStreamContent){var f=Zb(s);l.push({key:"AP",value:"<</N "+f+">>"}),n.internal.acroformPlugin.xForms.push(f)}if(s.appearanceStreamContent){var p="";for(var w in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(w)){var g=s.appearanceStreamContent[w];if(p+="/"+w+" ",p+="<<",Object.keys(g).length>=1||Array.isArray(g)){for(var o in g)if(g.hasOwnProperty(o)){var F=g[o];typeof F=="function"&&(F=F.call(n,s)),p+="/"+o+" "+F+" ",n.internal.acroformPlugin.xForms.indexOf(F)>=0||n.internal.acroformPlugin.xForms.push(F)}}else typeof(F=g)=="function"&&(F=F.call(n,s)),p+="/"+o+" "+F,n.internal.acroformPlugin.xForms.indexOf(F)>=0||n.internal.acroformPlugin.xForms.push(F);p+=">>"}l.push({key:"AP",value:`<<
`+p+">>"})}n.internal.putStream({additionalKeyValues:l,objectId:s.objId}),n.internal.out("endobj")}i&&function(y,S){for(var b in y)if(y.hasOwnProperty(b)){var P=b,G=y[b];S.internal.newObjectDeferredBegin(G.objId,!0),Ne(G)==="object"&&typeof G.putStream=="function"&&G.putStream(),delete y[P]}}(n.internal.acroformPlugin.xForms,n)})(t,A)}),A.internal.acroformPlugin.isInitialized=!0}},zg=$e.__acroform__.arrayToPdfArray=function(A,e,t){var r=function(o){return o};if(Array.isArray(A)){for(var n="[",i=0;i<A.length;i++)switch(i!==0&&(n+=" "),Ne(A[i])){case"boolean":case"number":case"object":n+=A[i].toString();break;case"string":A[i].substr(0,1)==="/"?n+="/"+Ri(A[i].substr(1)):(e!==void 0&&t&&(r=t.internal.getEncryptor(e)),n+="("+ji(r(A[i].toString()))+")")}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},xu=function(A,e,t){var r=function(n){return n};return e!==void 0&&t&&(r=t.internal.getEncryptor(e)),(A=A||"").toString(),"("+ji(r(A))+")"},An=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(A){this._objId=A}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};An.prototype.toString=function(){return this.objId+" 0 R"},An.prototype.putStream=function(){var A=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:A,objectId:this.objId}),this.scope.internal.out("endobj")},An.prototype.getKeyValueListForStream=function(){var A=[],e=Object.getOwnPropertyNames(this).filter(function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var r=e[t],n=this[r];n&&(Array.isArray(n)?A.push({key:r,value:zg(n,this.objId,this.scope)}):n instanceof An?(n.scope=this.scope,A.push({key:r,value:n.objId+" 0 R"})):typeof n!="function"&&A.push({key:r,value:n}))}return A};var Wg=function(){An.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var A,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){A=t.trim()},get:function(){return A||null}})};Ar(Wg,An);var Xg=function(){An.call(this);var A,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(A){var t=function(r){return r};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+ji(t(A))+")"}},set:function(t){A=t}})};Ar(Xg,An);var Or=function A(){An.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(b){if(isNaN(b))throw new Error('Invalid value "'+b+'" for attribute F supplied.');e=b}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!at(e,3)},set:function(b){b?this.F=st(e,3):this.F=ot(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(b){if(isNaN(b))throw new Error('Invalid value "'+b+'" for attribute Ff supplied.');t=b}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(b){r=b!==void 0?b:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(b){r[0]=b}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(b){r[1]=b}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(b){r[2]=b}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(b){r[3]=b}});var n="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return n},set:function(b){switch(b){case"/Btn":case"/Tx":case"/Ch":case"/Sig":n=b;break;default:throw new Error('Invalid value "'+b+'" 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 Pl)return;i="FieldObject"+A.FieldNum++}var b=function(P){return P};return this.scope&&(b=this.scope.internal.getEncryptor(this.objId)),"("+ji(b(i))+")"},set:function(b){i=b.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(b){i=b}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(b){o=b}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(b){s=b}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(b){l=b}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return u===void 0?50/Of:u},set:function(b){u=b}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(b){f=b}});var p="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!p||this instanceof Pl||this instanceof Ti))return xu(p,this.objId,this.scope)},set:function(b){b=b.toString(),p=b}});var w=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(w)return this instanceof bt==0?xu(w,this.objId,this.scope):w},set:function(b){b=b.toString(),w=this instanceof bt==0?b.substr(0,1)==="("?ma(b.substr(1,b.length-2)):ma(b):b}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof bt==1?ma(w.substr(1,w.length-1)):w},set:function(b){b=b.toString(),w=this instanceof bt==1?"/"+Ri(b):b}});var g=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(g)return g},set:function(b){this.V=b}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof bt==0?xu(g,this.objId,this.scope):g},set:function(b){b=b.toString(),g=this instanceof bt==0?b.substr(0,1)==="("?ma(b.substr(1,b.length-2)):ma(b):b}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof bt==1?ma(g.substr(1,g.length-1)):g},set:function(b){b=b.toString(),g=this instanceof bt==1?"/"+Ri(b):b}}),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 F,y=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return y},set:function(b){b=!!b,y=b}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(F)return F},set:function(b){F=b}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,1)},set:function(b){b?this.Ff=st(this.Ff,1):this.Ff=ot(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,2)},set:function(b){b?this.Ff=st(this.Ff,2):this.Ff=ot(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,3)},set:function(b){b?this.Ff=st(this.Ff,3):this.Ff=ot(this.Ff,3)}});var S=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(S!==null)return S},set:function(b){if([0,1,2].indexOf(b)===-1)throw new Error('Invalid value "'+b+'" for attribute Q supplied.');S=b}}),Object.defineProperty(this,"textAlign",{get:function(){var b;switch(S){case 0:default:b="left";break;case 1:b="center";break;case 2:b="right"}return b},configurable:!0,enumerable:!0,set:function(b){switch(b){case"right":case 2:S=2;break;case"center":case 1:S=1;break;default:S=0}}})};Ar(Or,An);var La=function(){Or.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var A=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return A},set:function(t){A=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return A},set:function(t){A=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return zg(e,this.objId,this.scope)},set:function(t){var r,n;n=[],typeof(r=t)=="string"&&(n=function(i,o,s){s||(s=1);for(var l,u=[];l=o.exec(i);)u.push(l[s]);return u}(r,/\((.*?)\)/g)),e=n}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,r){for(r=r||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,18)},set:function(t){t?this.Ff=st(this.Ff,18):this.Ff=ot(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=st(this.Ff,19):this.Ff=ot(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,20)},set:function(t){t?(this.Ff=st(this.Ff,20),e.sort()):this.Ff=ot(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,22)},set:function(t){t?this.Ff=st(this.Ff,22):this.Ff=ot(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,23)},set:function(t){t?this.Ff=st(this.Ff,23):this.Ff=ot(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,27)},set:function(t){t?this.Ff=st(this.Ff,27):this.Ff=ot(this.Ff,27)}}),this.hasAppearanceStream=!1};Ar(La,Or);var Ia=function(){La.call(this),this.fontName="helvetica",this.combo=!1};Ar(Ia,La);var Sa=function(){Ia.call(this),this.combo=!0};Ar(Sa,Ia);var ml=function(){Sa.call(this),this.edit=!0};Ar(ml,Sa);var bt=function(){Or.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,15)},set:function(t){t?this.Ff=st(this.Ff,15):this.Ff=ot(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,16)},set:function(t){t?this.Ff=st(this.Ff,16):this.Ff=ot(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,17)},set:function(t){t?this.Ff=st(this.Ff,17):this.Ff=ot(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,26)},set:function(t){t?this.Ff=st(this.Ff,26):this.Ff=ot(this.Ff,26)}});var A,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(i){return i};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var r,n=[];for(r in n.push("<<"),e)n.push("/"+r+" ("+ji(t(e[r]))+")");return n.push(">>"),n.join(`
`)}},set:function(t){Ne(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return A},set:function(t){var r=t==null?"":t.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),A="/"+Ri(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return A.substr(1,A.length-1)},set:function(t){A="/"+Ri(t)}})};Ar(bt,Or);var Cl=function(){bt.call(this),this.pushButton=!0};Ar(Cl,bt);var Ha=function(){bt.call(this),this.radio=!0,this.pushButton=!1;var A=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return A},set:function(e){A=e!==void 0?e:[]}})};Ar(Ha,bt);var Pl=function(){var A,e;Or.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return A},set:function(n){A=n}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(n){e=n}});var t,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(s){return s};this.scope&&(n=this.scope.internal.getEncryptor(this.objId));var i,o=[];for(i in o.push("<<"),r)o.push("/"+i+" ("+ji(n(r[i]))+")");return o.push(">>"),o.join(`
`)},set:function(n){Ne(n)==="object"&&(r=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(n){typeof n=="string"&&(r.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),t="/"+Ri(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),t="/"+Ri(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=NA.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ar(Pl,Or),Ha.prototype.setAppearance=function(A){if(!("createAppearanceStream"in A)||!("getCA"in A))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=A.createAppearanceStream(t.optionName),t.caption=A.getCA()}},Ha.prototype.createOption=function(A){var e=new Pl;return e.Parent=this,e.optionName=A,this.Kids.push(e),tF.call(this.scope,e),e};var bl=function(){bt.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=NA.CheckBox.createAppearanceStream()};Ar(bl,bt);var Ti=function(){Or.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,13)},set:function(e){e?this.Ff=st(this.Ff,13):this.Ff=ot(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,21)},set:function(e){e?this.Ff=st(this.Ff,21):this.Ff=ot(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,23)},set:function(e){e?this.Ff=st(this.Ff,23):this.Ff=ot(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,24)},set:function(e){e?this.Ff=st(this.Ff,24):this.Ff=ot(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,25)},set:function(e){e?this.Ff=st(this.Ff,25):this.Ff=ot(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,26)},set:function(e){e?this.Ff=st(this.Ff,26):this.Ff=ot(this.Ff,26)}});var A=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return A},set:function(e){A=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return A},set:function(e){Number.isInteger(e)&&(A=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Ar(Ti,Or);var Fl=function(){Ti.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!at(this.Ff,14)},set:function(A){A?this.Ff=st(this.Ff,14):this.Ff=ot(this.Ff,14)}}),this.password=!0};Ar(Fl,Ti);var NA={CheckBox:{createAppearanceStream:function(){return{N:{On:NA.CheckBox.YesNormal},D:{On:NA.CheckBox.YesPushDown,Off:NA.CheckBox.OffPushDown}}},YesPushDown:function(A){var e=Zr(A);e.scope=A.scope;var t=[],r=A.scope.internal.getFont(A.fontName,A.fontStyle).id,n=A.scope.__private__.encodeColorString(A.color),i=wf(A,A.caption);return t.push("0.749023 g"),t.push("0 0 "+ee(NA.internal.getWidth(A))+" "+ee(NA.internal.getHeight(A))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+r+" "+ee(i.fontSize)+" Tf "+n),t.push("BT"),t.push(i.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
`),e},YesNormal:function(A){var e=Zr(A);e.scope=A.scope;var t=A.scope.internal.getFont(A.fontName,A.fontStyle).id,r=A.scope.__private__.encodeColorString(A.color),n=[],i=NA.internal.getHeight(A),o=NA.internal.getWidth(A),s=wf(A,A.caption);return n.push("1 g"),n.push("0 0 "+ee(o)+" "+ee(i)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+ee(o-1)+" "+ee(i-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+t+" "+ee(s.fontSize)+" Tf "+r),n.push(s.text),n.push("ET"),n.push("Q"),e.stream=n.join(`
`),e},OffPushDown:function(A){var e=Zr(A);e.scope=A.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+ee(NA.internal.getWidth(A))+" "+ee(NA.internal.getHeight(A))+" re"),t.push("f"),e.stream=t.join(`
`),e}},RadioButton:{Circle:{createAppearanceStream:function(A){var e={D:{Off:NA.RadioButton.Circle.OffPushDown},N:{}};return e.N[A]=NA.RadioButton.Circle.YesNormal,e.D[A]=NA.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(A){var e=Zr(A);e.scope=A.scope;var t=[],r=NA.internal.getWidth(A)<=NA.internal.getHeight(A)?NA.internal.getWidth(A)/4:NA.internal.getHeight(A)/4;r=Number((.9*r).toFixed(5));var n=NA.internal.Bezier_C,i=Number((r*n).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Vn(NA.internal.getWidth(A)/2)+" "+Vn(NA.internal.getHeight(A)/2)+" cm"),t.push(r+" 0 m"),t.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),t.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),t.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),t.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(A){var e=Zr(A);e.scope=A.scope;var t=[],r=NA.internal.getWidth(A)<=NA.internal.getHeight(A)?NA.internal.getWidth(A)/4:NA.internal.getHeight(A)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*NA.internal.Bezier_C).toFixed(5)),o=Number((r*NA.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Vn(NA.internal.getWidth(A)/2)+" "+Vn(NA.internal.getHeight(A)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),t.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),t.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),t.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Vn(NA.internal.getWidth(A)/2)+" "+Vn(NA.internal.getHeight(A)/2)+" cm"),t.push(r+" 0 m"),t.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),t.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),t.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),t.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e},OffPushDown:function(A){var e=Zr(A);e.scope=A.scope;var t=[],r=NA.internal.getWidth(A)<=NA.internal.getHeight(A)?NA.internal.getWidth(A)/4:NA.internal.getHeight(A)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*NA.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Vn(NA.internal.getWidth(A)/2)+" "+Vn(NA.internal.getHeight(A)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),t.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),t.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),t.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e}},Cross:{createAppearanceStream:function(A){var e={D:{Off:NA.RadioButton.Cross.OffPushDown},N:{}};return e.N[A]=NA.RadioButton.Cross.YesNormal,e.D[A]=NA.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(A){var e=Zr(A);e.scope=A.scope;var t=[],r=NA.internal.calculateCross(A);return t.push("q"),t.push("1 1 "+ee(NA.internal.getWidth(A)-2)+" "+ee(NA.internal.getHeight(A)-2)+" re"),t.push("W"),t.push("n"),t.push(ee(r.x1.x)+" "+ee(r.x1.y)+" m"),t.push(ee(r.x2.x)+" "+ee(r.x2.y)+" l"),t.push(ee(r.x4.x)+" "+ee(r.x4.y)+" m"),t.push(ee(r.x3.x)+" "+ee(r.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(A){var e=Zr(A);e.scope=A.scope;var t=NA.internal.calculateCross(A),r=[];return r.push("0.749023 g"),r.push("0 0 "+ee(NA.internal.getWidth(A))+" "+ee(NA.internal.getHeight(A))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+ee(NA.internal.getWidth(A)-2)+" "+ee(NA.internal.getHeight(A)-2)+" re"),r.push("W"),r.push("n"),r.push(ee(t.x1.x)+" "+ee(t.x1.y)+" m"),r.push(ee(t.x2.x)+" "+ee(t.x2.y)+" l"),r.push(ee(t.x4.x)+" "+ee(t.x4.y)+" m"),r.push(ee(t.x3.x)+" "+ee(t.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
`),e},OffPushDown:function(A){var e=Zr(A);e.scope=A.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+ee(NA.internal.getWidth(A))+" "+ee(NA.internal.getHeight(A))+" re"),t.push("f"),e.stream=t.join(`
`),e}}},createDefaultAppearanceStream:function(A){var e=A.scope.internal.getFont(A.fontName,A.fontStyle).id,t=A.scope.__private__.encodeColorString(A.color);return"/"+e+" "+A.fontSize+" Tf "+t}};NA.internal={Bezier_C:.551915024494,calculateCross:function(A){var e=NA.internal.getWidth(A),t=NA.internal.getHeight(A),r=Math.min(e,t);return{x1:{x:(e-r)/2,y:(t-r)/2+r},x2:{x:(e-r)/2+r,y:(t-r)/2},x3:{x:(e-r)/2,y:(t-r)/2},x4:{x:(e-r)/2+r,y:(t-r)/2+r}}}},NA.internal.getWidth=function(A){var e=0;return Ne(A)==="object"&&(e=_d(A.Rect[2])),e},NA.internal.getHeight=function(A){var e=0;return Ne(A)==="object"&&(e=_d(A.Rect[3])),e};var tF=$e.addField=function(A){if(eF(this,A),!(A instanceof Or))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=A).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),A.page=A.scope.internal.getCurrentPageInfo().pageNumber,this};$e.AcroFormChoiceField=La,$e.AcroFormListBox=Ia,$e.AcroFormComboBox=Sa,$e.AcroFormEditBox=ml,$e.AcroFormButton=bt,$e.AcroFormPushButton=Cl,$e.AcroFormRadioButton=Ha,$e.AcroFormCheckBox=bl,$e.AcroFormTextField=Ti,$e.AcroFormPasswordField=Fl,$e.AcroFormAppearance=NA,$e.AcroForm={ChoiceField:La,ListBox:Ia,ComboBox:Sa,EditBox:ml,Button:bt,PushButton:Cl,RadioButton:Ha,CheckBox:bl,TextField:Ti,PasswordField:Fl,Appearance:NA},KA.AcroForm={ChoiceField:La,ListBox:Ia,ComboBox:Sa,EditBox:ml,Button:bt,PushButton:Cl,RadioButton:Ha,CheckBox:bl,TextField:Ti,PasswordField:Fl,Appearance:NA};function Jg(A){return A.reduce(function(e,t,r){return e[t]=r,e},{})}(function(A){var e="addImage_";A.__addimage__={};var t="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]]},n=A.__addimage__.getImageFileTypeByImageData=function(_,I){var K,j,sA,lA,cA,tA=t;if((I=I||t)==="RGBA"||_.data!==void 0&&_.data instanceof Uint8ClampedArray&&"height"in _&&"width"in _)return"RGBA";if(Z(_))for(cA in r)for(sA=r[cA],K=0;K<sA.length;K+=1){for(lA=!0,j=0;j<sA[K].length;j+=1)if(sA[K][j]!==void 0&&sA[K][j]!==_[j]){lA=!1;break}if(lA===!0){tA=cA;break}}else for(cA in r)for(sA=r[cA],K=0;K<sA.length;K+=1){for(lA=!0,j=0;j<sA[K].length;j+=1)if(sA[K][j]!==void 0&&sA[K][j]!==_.charCodeAt(j)){lA=!1;break}if(lA===!0){tA=cA;break}}return tA===t&&I!==t&&(tA=I),tA},i=function _(I){for(var K=this.internal.write,j=this.internal.putStream,sA=(0,this.internal.getFilters)();sA.indexOf("FlateEncode")!==-1;)sA.splice(sA.indexOf("FlateEncode"),1);I.objectId=this.internal.newObject();var lA=[];if(lA.push({key:"Type",value:"/XObject"}),lA.push({key:"Subtype",value:"/Image"}),lA.push({key:"Width",value:I.width}),lA.push({key:"Height",value:I.height}),I.colorSpace===b.INDEXED?lA.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(I.palette.length/3-1)+" "+("sMask"in I&&I.sMask!==void 0?I.objectId+2:I.objectId+1)+" 0 R]"}):(lA.push({key:"ColorSpace",value:"/"+I.colorSpace}),I.colorSpace===b.DEVICE_CMYK&&lA.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),lA.push({key:"BitsPerComponent",value:I.bitsPerComponent}),"decodeParameters"in I&&I.decodeParameters!==void 0&&lA.push({key:"DecodeParms",value:"<<"+I.decodeParameters+">>"}),"transparency"in I&&Array.isArray(I.transparency)&&I.transparency.length>0){for(var cA="",tA=0,uA=I.transparency.length;tA<uA;tA++)cA+=I.transparency[tA]+" "+I.transparency[tA]+" ";lA.push({key:"Mask",value:"["+cA+"]"})}I.sMask!==void 0&&lA.push({key:"SMask",value:I.objectId+1+" 0 R"});var QA=I.filter!==void 0?["/"+I.filter]:void 0;if(j({data:I.data,additionalKeyValues:lA,alreadyAppliedFilters:QA,objectId:I.objectId}),K("endobj"),"sMask"in I&&I.sMask!==void 0){var pA,Q=(pA=I.sMaskBitsPerComponent)!==null&&pA!==void 0?pA:I.bitsPerComponent,T={width:I.width,height:I.height,colorSpace:"DeviceGray",bitsPerComponent:Q,data:I.sMask};"filter"in I&&(T.decodeParameters="/Predictor ".concat(I.predictor," /Colors 1 /BitsPerComponent ").concat(Q," /Columns ").concat(I.width),T.filter=I.filter),_.call(this,T)}if(I.colorSpace===b.INDEXED){var R=this.internal.newObject();j({data:q(new Uint8Array(I.palette)),objectId:R}),K("endobj")}},o=function(){var _=this.internal.collections[e+"images"];for(var I in _)i.call(this,_[I])},s=function(){var _,I=this.internal.collections[e+"images"],K=this.internal.write;for(var j in I)K("/I"+(_=I[j]).index,_.objectId,"0","R")},l=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s))},u=function(){var _=this.internal.collections[e+"images"];return l.call(this),_},f=function(){return Object.keys(this.internal.collections[e+"images"]).length},p=function(_){return typeof A["process"+_.toUpperCase()]=="function"},w=function(_){return Ne(_)==="object"&&_.nodeType===1},g=function(_,I){if(_.nodeName==="IMG"&&_.hasAttribute("src")){var K=""+_.getAttribute("src");if(K.indexOf("data:image/")===0)return vl(unescape(K).split("base64,").pop());var j=A.loadFile(K,!0);if(j!==void 0)return j}if(_.nodeName==="CANVAS"){if(_.width===0||_.height===0)throw new Error("Given canvas must have data. Canvas width: "+_.width+", height: "+_.height);var sA;switch(I){case"PNG":sA="image/png";break;case"WEBP":sA="image/webp";break;default:sA="image/jpeg"}return vl(_.toDataURL(sA,1).split("base64,").pop())}},F=function(_){var I=this.internal.collections[e+"images"];if(I){for(var K in I)if(_===I[K].alias)return I[K]}},y=function(_,I,K){return _||I||(_=-96,I=-96),_<0&&(_=-1*K.width*72/_/this.internal.scaleFactor),I<0&&(I=-1*K.height*72/I/this.internal.scaleFactor),_===0&&(_=I*K.width/K.height),I===0&&(I=_*K.height/K.width),[_,I]},S=function(_,I,K,j,sA,lA){var cA=y.call(this,K,j,sA),tA=this.internal.getCoordinateString,uA=this.internal.getVerticalCoordinateString,QA=u.call(this);if(K=cA[0],j=cA[1],QA[sA.index]=sA,lA){lA*=Math.PI/180;var pA=Math.cos(lA),Q=Math.sin(lA),T=function(z){return z.toFixed(4)},R=[T(pA),T(Q),T(-1*Q),T(pA),0,0,"cm"]}this.internal.write("q"),lA?(this.internal.write([1,"0","0",1,tA(_),uA(I+j),"cm"].join(" ")),this.internal.write(R.join(" ")),this.internal.write([tA(K),"0","0",tA(j),"0","0","cm"].join(" "))):this.internal.write([tA(K),"0","0",tA(j),tA(_),uA(I+j),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+sA.index+" Do"),this.internal.write("Q")},b=A.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};A.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var P=A.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},G=A.__addimage__.sHashCode=function(_){var I,K,j=0;if(typeof _=="string")for(K=_.length,I=0;I<K;I++)j=(j<<5)-j+_.charCodeAt(I),j|=0;else if(Z(_))for(K=_.byteLength/2,I=0;I<K;I++)j=(j<<5)-j+_[I],j|=0;return j},O=A.__addimage__.validateStringAsBase64=function(_){(_=_||"").toString().trim();var I=!0;return _.length===0&&(I=!1),_.length%4!=0&&(I=!1),/^[A-Za-z0-9+/]+$/.test(_.substr(0,_.length-2))===!1&&(I=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(_.substr(-2))===!1&&(I=!1),I},J=A.__addimage__.extractImageFromDataUrl=function(_){if(_==null||!(_=_.trim()).startsWith("data:"))return null;var I=_.indexOf(",");return I<0?null:_.substring(0,I).trim().endsWith("base64")?_.substring(I+1):null};A.__addimage__.isArrayBuffer=function(_){return _ instanceof ArrayBuffer};var Z=A.__addimage__.isArrayBufferView=function(_){return _ instanceof Int8Array||_ instanceof Uint8Array||_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array},nA=A.__addimage__.binaryStringToUint8Array=function(_){for(var I=_.length,K=new Uint8Array(I),j=0;j<I;j++)K[j]=_.charCodeAt(j);return K},q=A.__addimage__.arrayBufferToBinaryString=function(_){for(var I="",K=Z(_)?_:new Uint8Array(_),j=0;j<K.length;j+=8192)I+=String.fromCharCode.apply(null,K.subarray(j,j+8192));return I};A.addImage=function(){var _,I,K,j,sA,lA,cA,tA,uA;if(typeof arguments[1]=="number"?(I=t,K=arguments[1],j=arguments[2],sA=arguments[3],lA=arguments[4],cA=arguments[5],tA=arguments[6],uA=arguments[7]):(I=arguments[1],K=arguments[2],j=arguments[3],sA=arguments[4],lA=arguments[5],cA=arguments[6],tA=arguments[7],uA=arguments[8]),Ne(_=arguments[0])==="object"&&!w(_)&&"imageData"in _){var QA=_;_=QA.imageData,I=QA.format||I||t,K=QA.x||K||0,j=QA.y||j||0,sA=QA.w||QA.width||sA,lA=QA.h||QA.height||lA,cA=QA.alias||cA,tA=QA.compression||tA,uA=QA.rotation||QA.angle||uA}var pA=this.internal.getFilters();if(tA===void 0&&pA.indexOf("FlateEncode")!==-1&&(tA="SLOW"),isNaN(K)||isNaN(j))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var Q=H.call(this,_,I,cA,tA);return S.call(this,K,j,sA,lA,Q,uA),this};var H=function(_,I,K,j){var sA,lA,cA;if(typeof _=="string"&&n(_)===t){_=unescape(_);var tA=AA(_,!1);(tA!==""||(tA=A.loadFile(_,!0))!==void 0)&&(_=tA)}if(w(_)&&(_=g(_,I)),I=n(_,I),!p(I))throw new Error("addImage does not support files of type '"+I+"', please ensure that a plugin for '"+I+"' support is added.");if(((cA=K)==null||cA.length===0)&&(K=function(uA){return typeof uA=="string"||Z(uA)?G(uA):Z(uA.data)?G(uA.data):null}(_)),(sA=F.call(this,K))||(_ instanceof Uint8Array||I==="RGBA"||(lA=_,_=nA(_)),sA=this["process"+I.toUpperCase()](_,f.call(this),K,function(uA){return uA&&typeof uA=="string"&&(uA=uA.toUpperCase()),uA in A.image_compression?uA:P.NONE}(j),lA)),!sA)throw new Error("An unknown error occurred whilst processing the image.");return sA},AA=A.__addimage__.convertBase64ToBinaryString=function(_,I){I=typeof I!="boolean"||I;var K,j="";if(typeof _=="string"){var sA;K=(sA=J(_))!==null&&sA!==void 0?sA:_;try{j=vl(K)}catch(lA){if(I)throw O(K)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+lA.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return j};A.getImageProperties=function(_){var I,K,j="";if(w(_)&&(_=g(_)),typeof _=="string"&&n(_)===t&&((j=AA(_,!1))===""&&(j=A.loadFile(_)||""),_=j),K=n(_),!p(K))throw new Error("addImage does not support files of type '"+K+"', please ensure that a plugin for '"+K+"' support is added.");if(_ instanceof Uint8Array||(_=nA(_)),!(I=this["process"+K.toUpperCase()](_)))throw new Error("An unknown error occurred whilst processing the image");return I.fileType=K,I}})(KA.API),function(A){var e=function(t){if(t!==void 0&&t!="")return!0};KA.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),A.events.push(["putPage",function(t){for(var r,n,i,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(t.objId),u=t.pageContext.annotations,f=!1,p=0;p<u.length&&!f;p++)switch((r=u[p]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(f=!0);break;case"reference":case"text":case"freetext":f=!0}if(f!=0){this.internal.write("/Annots [");for(var w=0;w<u.length;w++){r=u[w];var g=this.internal.pdfEscape,F=this.internal.getEncryptor(t.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var y=this.internal.newAdditionalObject(),S=this.internal.newAdditionalObject(),b=this.internal.getEncryptor(y.objId),P=r.title||"Note";i="<</Type /Annot /Subtype /Text "+(n="/Rect ["+o(r.bounds.x)+" "+s(r.bounds.y+r.bounds.h)+" "+o(r.bounds.x+r.bounds.w)+" "+s(r.bounds.y)+"] ")+"/Contents ("+g(b(r.contents))+")",i+=" /Popup "+S.objId+" 0 R",i+=" /P "+l.objId+" 0 R",i+=" /T ("+g(b(P))+") >>",y.content=i;var G=y.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+o(r.bounds.x+30)+" "+s(r.bounds.y+r.bounds.h)+" "+o(r.bounds.x+r.bounds.w+30)+" "+s(r.bounds.y)+"] ")+" /Parent "+G,r.open&&(i+=" /Open true"),i+=" >>",S.content=i,this.internal.write(y.objId,"0 R",S.objId,"0 R");break;case"freetext":n="/Rect ["+o(r.bounds.x)+" "+s(r.bounds.y)+" "+o(r.bounds.x+r.bounds.w)+" "+s(r.bounds.y+r.bounds.h)+"] ";var O="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");i="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+g(F(r.contents))+")",i+=" /DS("+g(F(O))+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(r.options.name){var J=this.annotations._nameMap[r.options.name];r.options.pageNumber=J.page,r.options.top=J.y}else r.options.top||(r.options.top=0);if(n="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",i="",r.options.url)i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+g(F(r.options.url))+") >>";else if(r.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,i+=" /FitV "+r.options.left+"]";break;default:var Z=s(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),i+=" /XYZ "+r.options.left+" "+Z+" "+r.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),A.createAnnotation=function(t){var r=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":r.pageContext.annotations.push(t)}},A.link=function(t,r,n,i,o){var s=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:l(t),y:u(r),w:l(t+n),h:u(r+i)},options:o,type:"link"})},A.textWithLink=function(t,r,n,i){var o,s,l=this.getTextWidth(t),u=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){s=i.maxWidth;var f=this.splitTextToSize(t,s).length;o=Math.ceil(u*f)}else s=l,o=u;return this.text(t,r,n,i),n+=.2*u,i.align==="center"&&(r-=l/2),i.align==="right"&&(r-=l),this.link(r,n-u,s,o,i),l},A.getTextWidth=function(t){var r=this.internal.getFontSize();return this.getStringUnitWidth(t)*r/this.internal.scaleFactor}}(KA.API),function(A){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];A.__arabicParser__={};var i=A.__arabicParser__.isInArabicSubstitutionA=function(y){return e[y.charCodeAt(0)]!==void 0},o=A.__arabicParser__.isArabicLetter=function(y){return typeof y=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(y)},s=A.__arabicParser__.isArabicEndLetter=function(y){return o(y)&&i(y)&&e[y.charCodeAt(0)].length<=2},l=A.__arabicParser__.isArabicAlfLetter=function(y){return o(y)&&n.indexOf(y.charCodeAt(0))>=0};A.__arabicParser__.arabicLetterHasIsolatedForm=function(y){return o(y)&&i(y)&&e[y.charCodeAt(0)].length>=1};var u=A.__arabicParser__.arabicLetterHasFinalForm=function(y){return o(y)&&i(y)&&e[y.charCodeAt(0)].length>=2};A.__arabicParser__.arabicLetterHasInitialForm=function(y){return o(y)&&i(y)&&e[y.charCodeAt(0)].length>=3};var f=A.__arabicParser__.arabicLetterHasMedialForm=function(y){return o(y)&&i(y)&&e[y.charCodeAt(0)].length==4},p=A.__arabicParser__.resolveLigatures=function(y){var S=0,b=t,P="",G=0;for(S=0;S<y.length;S+=1)b[y.charCodeAt(S)]!==void 0?(G++,typeof(b=b[y.charCodeAt(S)])=="number"&&(P+=String.fromCharCode(b),b=t,G=0),S===y.length-1&&(b=t,P+=y.charAt(S-(G-1)),S-=G-1,G=0)):(b=t,P+=y.charAt(S-G),S-=G,G=0);return P};A.__arabicParser__.isArabicDiacritic=function(y){return y!==void 0&&r[y.charCodeAt(0)]!==void 0};var w=A.__arabicParser__.getCorrectForm=function(y,S,b){return o(y)?i(y)===!1?-1:!u(y)||!o(S)&&!o(b)||!o(b)&&s(S)||s(y)&&!o(S)||s(y)&&l(S)||s(y)&&s(S)?0:f(y)&&o(S)&&!s(S)&&o(b)&&u(b)?3:s(y)||!o(b)?1:2:-1},g=function(y){var S=0,b=0,P=0,G="",O="",J="",Z=(y=y||"").split("\\s+"),nA=[];for(S=0;S<Z.length;S+=1){for(nA.push(""),b=0;b<Z[S].length;b+=1)G=Z[S][b],O=Z[S][b-1],J=Z[S][b+1],o(G)?(P=w(G,O,J),nA[S]+=P!==-1?String.fromCharCode(e[G.charCodeAt(0)][P]):G):nA[S]+=G;nA[S]=p(nA[S])}return nA.join(" ")},F=A.__arabicParser__.processArabic=A.processArabic=function(){var y,S=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,b=[];if(Array.isArray(S)){var P=0;for(b=[],P=0;P<S.length;P+=1)Array.isArray(S[P])?b.push([g(S[P][0]),S[P][1],S[P][2]]):b.push([g(S[P])]);y=b}else y=g(S);return typeof arguments[0]=="string"?y:(arguments[0].text=y,arguments[0])};A.events.push(["preProcessText",F])}(KA.API),KA.API.autoPrint=function(A){var e;return(A=A||{}).variant=A.variant||"non-conform",A.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(A){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(s){t=s}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(s){r=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(s){i=s}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(s){o=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,r){var n;if((t=t||"2d")!=="2d")return null;for(n in r)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=r[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},A.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(KA.API),function(A){var e={left:0,top:0,bottom:0,right:0},t=!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({},e),this.internal.__cell__.margins.width=this.getPageWidth(),n.call(this))},n=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(y){l=y}});var u=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return u},set:function(y){u=y}});var f=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return f},set:function(y){f=y}});var p=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return p},set:function(y){p=y}});var w=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return w},set:function(y){w=y}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(y){g=y}});var F=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return F},set:function(y){F=y}}),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]},A.setHeaderFunction=function(l){return r.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},A.getTextDimensions=function(l,u){r.call(this);var f=(u=u||{}).fontSize||this.getFontSize(),p=u.font||this.getFont(),w=u.scaleFactor||this.internal.scaleFactor,g=0,F=0,y=0,S=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var b=u.maxWidth;b>0?typeof l=="string"?l=this.splitTextToSize(l,b):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(G,O){return G.concat(S.splitTextToSize(O,b))},[])):l=Array.isArray(l)?l:[l];for(var P=0;P<l.length;P++)g<(y=this.getStringUnitWidth(l[P],{font:p})*f)&&(g=y);return g!==0&&(F=l.length),{w:g/=w,h:Math.max((F*f*this.getLineHeightFactor()-f*(this.getLineHeightFactor()-1))/w,0)}},A.cellAddPage=function(){r.call(this),this.addPage();var l=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new i(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=A.cell=function(){var l;l=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var u=this.internal.__cell__.lastCell,f=this.internal.__cell__.padding,p=this.internal.__cell__.margins||e,w=this.internal.__cell__.tableHeaderRow,g=this.internal.__cell__.printHeaders;return u.lineNumber!==void 0&&(u.lineNumber===l.lineNumber?(l.x=(u.x||0)+(u.width||0),l.y=u.y||0):u.y+u.height+l.height+p.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=p.top,g&&w&&(this.printHeaderRow(l.lineNumber,!0),l.y+=w[0].height)):l.y=u.y+u.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,t===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-f,l.y+f,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+f,{align:"center",baseline:"top",maxWidth:l.width-f-f}):this.text(l.text,l.x+f,l.y+f,{align:"left",baseline:"top",maxWidth:l.width-f-f})),this.internal.__cell__.lastCell=l,this};A.table=function(l,u,f,p,w){if(r.call(this),!f)throw new Error("No data for PDF table.");var g,F,y,S,b=[],P=[],G=[],O={},J={},Z=[],nA=[],q=(w=w||{}).autoSize||!1,H=w.printHeaders!==!1,AA=w.css&&w.css["font-size"]!==void 0?16*w.css["font-size"]:w.fontSize||12,_=w.margins||Object.assign({width:this.getPageWidth()},e),I=typeof w.padding=="number"?w.padding:3,K=w.headerBackgroundColor||"#c8c8c8",j=w.headerTextColor||"#000";if(n.call(this),this.internal.__cell__.printHeaders=H,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=AA,this.internal.__cell__.padding=I,this.internal.__cell__.headerBackgroundColor=K,this.internal.__cell__.headerTextColor=j,this.setFontSize(AA),p==null)P=b=Object.keys(f[0]),G=b.map(function(){return"left"});else if(Array.isArray(p)&&Ne(p[0])==="object")for(b=p.map(function(QA){return QA.name}),P=p.map(function(QA){return QA.prompt||QA.name||""}),G=p.map(function(QA){return QA.align||"left"}),g=0;g<p.length;g+=1)J[p[g].name]=.7499990551181103*p[g].width;else Array.isArray(p)&&typeof p[0]=="string"&&(P=b=p,G=b.map(function(){return"left"}));if(q||Array.isArray(p)&&typeof p[0]=="string")for(g=0;g<b.length;g+=1){for(O[S=b[g]]=f.map(function(QA){return QA[S]}),this.setFont(void 0,"bold"),Z.push(this.getTextDimensions(P[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),F=O[S],this.setFont(void 0,"normal"),y=0;y<F.length;y+=1)Z.push(this.getTextDimensions(F[y],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);J[S]=Math.max.apply(null,Z)+I+I,Z=[]}if(H){var sA={};for(g=0;g<b.length;g+=1)sA[b[g]]={},sA[b[g]].text=P[g],sA[b[g]].align=G[g];var lA=s.call(this,sA,J);nA=b.map(function(QA){return new i(l,u,J[QA],lA,sA[QA].text,void 0,sA[QA].align)}),this.setTableHeaderRow(nA),this.printHeaderRow(1,!1)}var cA=p.reduce(function(QA,pA){return QA[pA.name]=pA.align,QA},{});for(g=0;g<f.length;g+=1){"rowStart"in w&&w.rowStart instanceof Function&&w.rowStart({row:g,data:f[g]},this);var tA=s.call(this,f[g],J);for(y=0;y<b.length;y+=1){var uA=f[g][b[y]];"cellStart"in w&&w.cellStart instanceof Function&&w.cellStart({row:g,col:y,data:uA},this),o.call(this,new i(l,u,J[b[y]],tA,uA,g+2,cA[b[y]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=u,this};var s=function(l,u){var f=this.internal.__cell__.padding,p=this.internal.__cell__.table_font_size,w=this.internal.scaleFactor;return Object.keys(l).map(function(g){var F=l[g];return this.splitTextToSize(F.hasOwnProperty("text")?F.text:F,u[g]-f-f)},this).map(function(g){return this.getLineHeightFactor()*g.length*p/w+f+f},this).reduce(function(g,F){return Math.max(g,F)},0)};A.setTableHeaderRow=function(l){r.call(this),this.internal.__cell__.tableHeaderRow=l},A.printHeaderRow=function(l,u){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var f;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var p=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(p[0],p[1],p[2],p[3],void 0,-1)}this.setFont(void 0,"bold");for(var w=[],g=0;g<this.internal.__cell__.tableHeaderRow.length;g+=1){f=this.internal.__cell__.tableHeaderRow[g].clone(),u&&(f.y=this.internal.__cell__.margins.top||0,w.push(f)),f.lineNumber=l;var F=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,f),this.setTextColor(F)}w.length>0&&this.setTableHeaderRow(w),this.setFont(void 0,"normal"),t=!1}}(KA.API);var Yg={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Zg=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],vf=Jg(Zg),$g=[100,200,300,400,500,600,700,800,900],rF=Jg($g);function Eu(A){var e=A.family.replace(/"|'/g,"").toLowerCase(),t=function(i){return Yg[i=i||"normal"]?i:"normal"}(A.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}(A.weight),n=function(i){return typeof vf[i=i||"normal"]=="number"?i:"normal"}(A.stretch);return{family:e,style:t,weight:r,stretch:n,src:A.src||[],ref:A.ref||{name:e,style:[n,t,r].join(" ")}}}function xd(A,e,t,r){var n;for(n=t;n>=0&&n<e.length;n+=r)if(A[e[n]])return A[e[n]];for(n=t;n>=0&&n<e.length;n-=r)if(A[e[n]])return A[e[n]]}var nF={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Ed={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Ld(A){return[A.stretch,A.style,A.weight,A.family].join(" ")}function Id(A){return A.trimLeft()}function iF(A,e){for(var t=0;t<A.length;){if(A.charAt(t)===e)return[A.substring(0,t),A.substring(t+1)];t+=1}return null}function aF(A){var e=A.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],A.substring(e[0].length)]}var Ca,fl,Sd,Hd,Nd,Lu=["times"];function Dd(A,e,t,r,n){var i=4,o=Td;switch(n){case KA.API.image_compression.FAST:i=1,o=kd;break;case KA.API.image_compression.MEDIUM:i=6,o=Od;break;case KA.API.image_compression.SLOW:i=9,o=Pd}A=function(l,u,f,p){for(var w,g=l.length/u,F=new Uint8Array(l.length+g),y=[sF,kd,Td,Od,Pd],S=0;S<g;S+=1){var b=S*u,P=l.subarray(b,b+u);if(p)F.set(p(P,f,w),b+S);else{for(var G=y.length,O=[],J=0;J<G;J+=1)O[J]=y[J](P,f,w);var Z=lF(O.concat());F.set(O[Z],b+S)}w=P}return F}(A,e,Math.ceil(t*r/8),o);var s=af(A,{level:i});return KA.API.__addimage__.arrayBufferToBinaryString(s)}function sF(A){var e=Array.apply([],A);return e.unshift(0),e}function kd(A,e){var t=A.length,r=[];r[0]=1;for(var n=0;n<t;n+=1){var i=A[n-e]||0;r[n+1]=A[n]-i+256&255}return r}function Td(A,e,t){var r=A.length,n=[];n[0]=2;for(var i=0;i<r;i+=1){var o=t&&t[i]||0;n[i+1]=A[i]-o+256&255}return n}function Od(A,e,t){var r=A.length,n=[];n[0]=3;for(var i=0;i<r;i+=1){var o=A[i-e]||0,s=t&&t[i]||0;n[i+1]=A[i]+256-(o+s>>>1)&255}return n}function Pd(A,e,t){var r=A.length,n=[];n[0]=4;for(var i=0;i<r;i+=1){var o=oF(A[i-e]||0,t&&t[i]||0,t&&t[i-e]||0);n[i+1]=A[i]-o+256&255}return n}function oF(A,e,t){if(A===e&&e===t)return A;var r=Math.abs(e-t),n=Math.abs(A-t),i=Math.abs(A+e-t-t);return r<=n&&r<=i?A:n<=i?e:t}function lF(A){var e=A.map(function(t){return t.reduce(function(r,n){return r+Math.abs(n)},0)});return e.indexOf(Math.min.apply(null,e))}function Iu(A,e,t){var r=e*t,n=Math.floor(r/8),i=16-(r-8*n+t),o=(1<<t)-1;return AB(A,n)>>i&o}function Md(A,e,t,r){var n=t*r,i=Math.floor(n/8),o=16-(n-8*i+r),s=(1<<r)-1,l=(e&s)<<o;(function(u,f,p){if(f+1<u.byteLength)u.setUint16(f,p,!1);else{var w=p>>8&255;u.setUint8(f,w)}})(A,i,AB(A,i)&~(s<<o)&65535|l)}function AB(A,e){return e+1<A.byteLength?A.getUint16(e,!1):A.getUint8(e)<<8}function cF(A){var e=0;if(A[e++]!==71||A[e++]!==73||A[e++]!==70||A[e++]!==56||(A[e++]+1&253)!=56||A[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=A[e++]|A[e++]<<8,r=A[e++]|A[e++]<<8,n=A[e++],i=n>>7,o=1<<1+(7&n);A[e++],A[e++];var s=null,l=null;i&&(s=e,l=o,e+=3*o);var u=!0,f=[],p=0,w=null,g=0,F=null;for(this.width=t,this.height=r;u&&e<A.length;)switch(A[e++]){case 33:switch(A[e++]){case 255:if(A[e]!==11||A[e+1]==78&&A[e+2]==69&&A[e+3]==84&&A[e+4]==83&&A[e+5]==67&&A[e+6]==65&&A[e+7]==80&&A[e+8]==69&&A[e+9]==50&&A[e+10]==46&&A[e+11]==48&&A[e+12]==3&&A[e+13]==1&&A[e+16]==0)e+=14,F=A[e++]|A[e++]<<8,e++;else for(e+=12;;){if(!((_=A[e++])>=0))throw Error("Invalid block size");if(_===0)break;e+=_}break;case 249:if(A[e++]!==4||A[e+4]!==0)throw new Error("Invalid graphics extension block.");var y=A[e++];p=A[e++]|A[e++]<<8,w=A[e++],1&y||(w=null),g=y>>2&7,e++;break;case 254:for(;;){if(!((_=A[e++])>=0))throw Error("Invalid block size");if(_===0)break;e+=_}break;default:throw new Error("Unknown graphic control label: 0x"+A[e-1].toString(16))}break;case 44:var S=A[e++]|A[e++]<<8,b=A[e++]|A[e++]<<8,P=A[e++]|A[e++]<<8,G=A[e++]|A[e++]<<8,O=A[e++],J=O>>6&1,Z=1<<1+(7&O),nA=s,q=l,H=!1;O>>7&&(H=!0,nA=e,q=Z,e+=3*Z);var AA=e;for(e++;;){var _;if(!((_=A[e++])>=0))throw Error("Invalid block size");if(_===0)break;e+=_}f.push({x:S,y:b,width:P,height:G,has_local_palette:H,palette_offset:nA,palette_size:q,data_offset:AA,data_length:e-AA,transparent_index:w,interlaced:!!J,delay:p,disposal:g});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+A[e-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return F},this.frameInfo=function(I){if(I<0||I>=f.length)throw new Error("Frame index out of range.");return f[I]},this.decodeAndBlitFrameBGRA=function(I,K){var j=this.frameInfo(I),sA=j.width*j.height;if(sA>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var lA=new Uint8Array(sA);Rd(A,j.data_offset,lA,sA);var cA=j.palette_offset,tA=j.transparent_index;tA===null&&(tA=256);var uA=j.width,QA=t-uA,pA=uA,Q=4*(j.y*t+j.x),T=4*((j.y+j.height)*t+j.x),R=Q,z=4*QA;j.interlaced===!0&&(z+=4*t*7);for(var X=8,M=0,rA=lA.length;M<rA;++M){var oA=lA[M];if(pA===0&&(pA=uA,(R+=z)>=T&&(z=4*QA+4*t*(X-1),R=Q+(uA+QA)*(X<<1),X>>=1)),oA===tA)R+=4;else{var fA=A[cA+3*oA],bA=A[cA+3*oA+1],xA=A[cA+3*oA+2];K[R++]=xA,K[R++]=bA,K[R++]=fA,K[R++]=255}--pA}},this.decodeAndBlitFrameRGBA=function(I,K){var j=this.frameInfo(I),sA=j.width*j.height;if(sA>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var lA=new Uint8Array(sA);Rd(A,j.data_offset,lA,sA);var cA=j.palette_offset,tA=j.transparent_index;tA===null&&(tA=256);var uA=j.width,QA=t-uA,pA=uA,Q=4*(j.y*t+j.x),T=4*((j.y+j.height)*t+j.x),R=Q,z=4*QA;j.interlaced===!0&&(z+=4*t*7);for(var X=8,M=0,rA=lA.length;M<rA;++M){var oA=lA[M];if(pA===0&&(pA=uA,(R+=z)>=T&&(z=4*QA+4*t*(X-1),R=Q+(uA+QA)*(X<<1),X>>=1)),oA===tA)R+=4;else{var fA=A[cA+3*oA],bA=A[cA+3*oA+1],xA=A[cA+3*oA+2];K[R++]=fA,K[R++]=bA,K[R++]=xA,K[R++]=255}--pA}}}function Rd(A,e,t,r){for(var n=A[e++],i=1<<n,o=i+1,s=o+1,l=n+1,u=(1<<l)-1,f=0,p=0,w=0,g=A[e++],F=new Int32Array(4096),y=null;;){for(;f<16&&g!==0;)p|=A[e++]<<f,f+=8,g===1?g=A[e++]:--g;if(f<l)break;var S=p&u;if(p>>=l,f-=l,S!==i){if(S===o)break;for(var b=S<s?S:y,P=0,G=b;G>i;)G=F[G]>>8,++P;var O=G;if(w+P+(b!==S?1:0)>r)return void He.log("Warning, gif stream longer than expected.");t[w++]=O;var J=w+=P;for(b!==S&&(t[w++]=O),G=b;P--;)G=F[G],t[--J]=255&G,G>>=8;y!==null&&s<4096&&(F[s++]=y<<8|O,s>=u+1&&l<12&&(++l,u=u<<1|1)),y=S}else s=o+1,u=(1<<(l=n+1))-1,y=null}return w!==r&&He.log("Warning, gif stream shorter than expected."),t}/**
 * @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 Su(A){var e,t,r,n,i,o=Math.floor,s=new Array(64),l=new Array(64),u=new Array(64),f=new Array(64),p=new Array(65535),w=new Array(65535),g=new Array(64),F=new Array(64),y=[],S=0,b=7,P=new Array(64),G=new Array(64),O=new Array(64),J=new Array(256),Z=new Array(2048),nA=[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],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],AA=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],_=[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],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],K=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],sA=[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 lA(Q,T){for(var R=0,z=0,X=new Array,M=1;M<=16;M++){for(var rA=1;rA<=Q[M];rA++)X[T[z]]=[],X[T[z]][0]=R,X[T[z]][1]=M,z++,R++;R*=2}return X}function cA(Q){for(var T=Q[0],R=Q[1]-1;R>=0;)T&1<<R&&(S|=1<<b),R--,--b<0&&(S==255?(tA(255),tA(0)):tA(S),b=7,S=0)}function tA(Q){y.push(Q)}function uA(Q){tA(Q>>8&255),tA(255&Q)}function QA(Q,T,R,z,X){for(var M,rA=X[0],oA=X[240],fA=function(CA,zA){var HA,qA,GA,Fe,fe,te,ge,he,PA,ae,RA=0;for(PA=0;PA<8;++PA){HA=CA[RA],qA=CA[RA+1],GA=CA[RA+2],Fe=CA[RA+3],fe=CA[RA+4],te=CA[RA+5],ge=CA[RA+6];var At=HA+(he=CA[RA+7]),me=HA-he,le=qA+ge,ce=qA-ge,je=GA+te,VA=GA-te,De=Fe+fe,YA=Fe-fe,re=At+De,Ge=At-De,ue=le+je,XA=le-je;CA[RA]=re+ue,CA[RA+4]=re-ue;var Qe=.707106781*(XA+Ge);CA[RA+2]=Ge+Qe,CA[RA+6]=Ge-Qe;var oi=.382683433*((re=YA+VA)-(XA=ce+me)),It=.5411961*re+oi,sn=1.306562965*XA+oi,Mr=.707106781*(ue=VA+ce),JA=me+Mr,on=me-Mr;CA[RA+5]=on+It,CA[RA+3]=on-It,CA[RA+1]=JA+sn,CA[RA+7]=JA-sn,RA+=8}for(RA=0,PA=0;PA<8;++PA){HA=CA[RA],qA=CA[RA+8],GA=CA[RA+16],Fe=CA[RA+24],fe=CA[RA+32],te=CA[RA+40],ge=CA[RA+48];var ln=HA+(he=CA[RA+56]),hr=HA-he,dr=qA+ge,Je=qA-ge,vt=GA+te,Ft=GA-te,li=Fe+fe,En=Fe-fe,Ur=ln+li,Rr=ln-li,_r=dr+vt,xr=dr-vt;CA[RA]=Ur+_r,CA[RA+32]=Ur-_r;var gr=.707106781*(xr+Rr);CA[RA+16]=Rr+gr,CA[RA+48]=Rr-gr;var ci=.382683433*((Ur=En+Ft)-(xr=Je+hr)),Kr=.5411961*Ur+ci,ui=1.306562965*xr+ci,Gi=.707106781*(_r=Ft+Je),Vi=hr+Gi,qi=hr-Gi;CA[RA+40]=qi+Kr,CA[RA+24]=qi-Kr,CA[RA+8]=Vi+ui,CA[RA+56]=Vi-ui,RA++}for(PA=0;PA<64;++PA)ae=CA[PA]*zA[PA],g[PA]=ae>0?ae+.5|0:ae-.5|0;return g}(Q,T),bA=0;bA<64;++bA)F[nA[bA]]=fA[bA];var xA=F[0]-R;R=F[0],xA==0?cA(z[0]):(cA(z[w[M=32767+xA]]),cA(p[M]));for(var UA=63;UA>0&&F[UA]==0;)UA--;if(UA==0)return cA(rA),R;for(var SA,L=1;L<=UA;){for(var wA=L;F[L]==0&&L<=UA;)++L;var WA=L-wA;if(WA>=16){SA=WA>>4;for(var jA=1;jA<=SA;++jA)cA(oA);WA&=15}M=32767+F[L],cA(X[(WA<<4)+w[M]]),cA(p[M]),L++}return UA!=63&&cA(rA),R}function pA(Q){Q=Math.min(Math.max(Q,1),100),i!=Q&&(function(T){for(var R=[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],z=0;z<64;z++){var X=o((R[z]*T+50)/100);X=Math.min(Math.max(X,1),255),s[nA[z]]=X}for(var M=[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],rA=0;rA<64;rA++){var oA=o((M[rA]*T+50)/100);oA=Math.min(Math.max(oA,1),255),l[nA[rA]]=oA}for(var fA=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],bA=0,xA=0;xA<8;xA++)for(var UA=0;UA<8;UA++)u[bA]=1/(s[nA[bA]]*fA[xA]*fA[UA]*8),f[bA]=1/(l[nA[bA]]*fA[xA]*fA[UA]*8),bA++}(Q<50?Math.floor(5e3/Q):Math.floor(200-2*Q)),i=Q)}this.encode=function(Q,T){T&&pA(T),y=new Array,S=0,b=7,uA(65496),uA(65504),uA(16),tA(74),tA(70),tA(73),tA(70),tA(0),tA(1),tA(1),tA(0),uA(1),uA(1),tA(0),tA(0),function(){uA(65499),uA(132),tA(0);for(var qA=0;qA<64;qA++)tA(s[qA]);tA(1);for(var GA=0;GA<64;GA++)tA(l[GA])}(),function(qA,GA){uA(65472),uA(17),tA(8),uA(GA),uA(qA),tA(3),tA(1),tA(17),tA(0),tA(2),tA(17),tA(1),tA(3),tA(17),tA(1)}(Q.width,Q.height),function(){uA(65476),uA(418),tA(0);for(var qA=0;qA<16;qA++)tA(q[qA+1]);for(var GA=0;GA<=11;GA++)tA(H[GA]);tA(16);for(var Fe=0;Fe<16;Fe++)tA(AA[Fe+1]);for(var fe=0;fe<=161;fe++)tA(_[fe]);tA(1);for(var te=0;te<16;te++)tA(I[te+1]);for(var ge=0;ge<=11;ge++)tA(K[ge]);tA(17);for(var he=0;he<16;he++)tA(j[he+1]);for(var PA=0;PA<=161;PA++)tA(sA[PA])}(),uA(65498),uA(12),tA(3),tA(1),tA(0),tA(2),tA(17),tA(3),tA(17),tA(0),tA(63),tA(0);var R=0,z=0,X=0;S=0,b=7,this.encode.displayName="_encode_";for(var M,rA,oA,fA,bA,xA,UA,SA,L,wA=Q.data,WA=Q.width,jA=Q.height,CA=4*WA,zA=0;zA<jA;){for(M=0;M<CA;){for(bA=CA*zA+M,UA=-1,SA=0,L=0;L<64;L++)xA=bA+(SA=L>>3)*CA+(UA=4*(7&L)),zA+SA>=jA&&(xA-=CA*(zA+1+SA-jA)),M+UA>=CA&&(xA-=M+UA-CA+4),rA=wA[xA++],oA=wA[xA++],fA=wA[xA++],P[L]=(Z[rA]+Z[oA+256|0]+Z[fA+512|0]>>16)-128,G[L]=(Z[rA+768|0]+Z[oA+1024|0]+Z[fA+1280|0]>>16)-128,O[L]=(Z[rA+1280|0]+Z[oA+1536|0]+Z[fA+1792|0]>>16)-128;R=QA(P,u,R,e,r),z=QA(G,f,z,t,n),X=QA(O,f,X,t,n),M+=32}zA+=8}if(b>=0){var HA=[];HA[1]=b+1,HA[0]=(1<<b+1)-1,cA(HA)}return uA(65497),new Uint8Array(y)},A=A||50,function(){for(var Q=String.fromCharCode,T=0;T<256;T++)J[T]=Q(T)}(),e=lA(q,H),t=lA(I,K),r=lA(AA,_),n=lA(j,sA),function(){for(var Q=1,T=2,R=1;R<=15;R++){for(var z=Q;z<T;z++)w[32767+z]=R,p[32767+z]=[],p[32767+z][1]=R,p[32767+z][0]=z;for(var X=-(T-1);X<=-Q;X++)w[32767+X]=R,p[32767+X]=[],p[32767+X][1]=R,p[32767+X][0]=T-1+X;Q<<=1,T<<=1}}(),function(){for(var Q=0;Q<256;Q++)Z[Q]=19595*Q,Z[Q+256|0]=38470*Q,Z[Q+512|0]=7471*Q+32768,Z[Q+768|0]=-11059*Q,Z[Q+1024|0]=-21709*Q,Z[Q+1280|0]=32768*Q+8421375,Z[Q+1536|0]=-27439*Q,Z[Q+1792|0]=-5329*Q}(),pA(A)}/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */function Nr(A,e){if(this.pos=0,this.buffer=A,this.datav=new DataView(A.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Kd(A){function e(H){if(!H)throw Error("assert :P")}function t(H,AA,_){for(var I=0;4>I;I++)if(H[AA+I]!=_.charCodeAt(I))return!0;return!1}function r(H,AA,_,I,K){for(var j=0;j<K;j++)H[AA+j]=_[I+j]}function n(H,AA,_,I){for(var K=0;K<I;K++)H[AA+K]=_}function i(H){return new Int32Array(H)}function o(H,AA){for(var _=[],I=0;I<H;I++)_.push(new AA);return _}function s(H,AA){var _=[];return function I(K,j,sA){for(var lA=sA[j],cA=0;cA<lA&&(K.push(sA.length>j+1?[]:new AA),!(sA.length<j+1));cA++)I(K[cA],j+1,sA)}(_,0,H),_}var l=function(){var H=this;function AA(a,c){for(var d=1<<c-1>>>0;a&d;)d>>>=1;return d?(a&d-1)+d:a}function _(a,c,d,B,m){e(!(B%d));do a[c+(B-=d)]=m;while(0<B)}function I(a,c,d,B,m){if(e(2328>=m),512>=m)var C=i(512);else if((C=i(m))==null)return 0;return function(U,x,E,D,W,aA){var k,Y,eA=x,dA=1<<E,iA=i(16),gA=i(16);for(e(W!=0),e(D!=null),e(U!=null),e(0<E),Y=0;Y<W;++Y){if(15<D[Y])return 0;++iA[D[Y]]}if(iA[0]==W)return 0;for(gA[1]=0,k=1;15>k;++k){if(iA[k]>1<<k)return 0;gA[k+1]=gA[k]+iA[k]}for(Y=0;Y<W;++Y)k=D[Y],0<D[Y]&&(aA[gA[k]++]=Y);if(gA[15]==1)return(D=new K).g=0,D.value=aA[0],_(U,eA,1,dA,D),dA;var BA,FA=-1,mA=dA-1,MA=0,IA=1,se=1,TA=1<<E;for(Y=0,k=1,W=2;k<=E;++k,W<<=1){if(IA+=se<<=1,0>(se-=iA[k]))return 0;for(;0<iA[k];--iA[k])(D=new K).g=k,D.value=aA[Y++],_(U,eA+MA,W,TA,D),MA=AA(MA,k)}for(k=E+1,W=2;15>=k;++k,W<<=1){if(IA+=se<<=1,0>(se-=iA[k]))return 0;for(;0<iA[k];--iA[k]){if(D=new K,(MA&mA)!=FA){for(eA+=TA,BA=1<<(FA=k)-E;15>FA&&!(0>=(BA-=iA[FA]));)++FA,BA<<=1;dA+=TA=1<<(BA=FA-E),U[x+(FA=MA&mA)].g=BA+E,U[x+FA].value=eA-x-FA}D.g=k-E,D.value=aA[Y++],_(U,eA+(MA>>E),W,TA,D),MA=AA(MA,k)}}return IA!=2*gA[15]-1?0:dA}(a,c,d,B,m,C)}function K(){this.value=this.g=0}function j(){this.value=this.g=0}function sA(){this.G=o(5,K),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(ia,j)}function lA(a,c,d,B){e(a!=null),e(c!=null),e(2147483648>B),a.Ca=254,a.I=0,a.b=-8,a.Ka=0,a.oa=c,a.pa=d,a.Jd=c,a.Yc=d+B,a.Zc=4<=B?d+B-4+1:d,rA(a)}function cA(a,c){for(var d=0;0<c--;)d|=fA(a,128)<<c;return d}function tA(a,c){var d=cA(a,c);return oA(a)?-d:d}function uA(a,c,d,B){var m,C=0;for(e(a!=null),e(c!=null),e(4294967288>B),a.Sb=B,a.Ra=0,a.u=0,a.h=0,4<B&&(B=4),m=0;m<B;++m)C+=c[d+m]<<8*m;a.Ra=C,a.bb=B,a.oa=c,a.pa=d}function QA(a){for(;8<=a.u&&a.bb<a.Sb;)a.Ra>>>=8,a.Ra+=a.oa[a.pa+a.bb]<<jt-8>>>0,++a.bb,a.u-=8;z(a)&&(a.h=1,a.u=0)}function pA(a,c){if(e(0<=c),!a.h&&c<=es){var d=R(a)&Ci[c];return a.u+=c,QA(a),d}return a.h=1,a.u=0}function Q(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function T(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function R(a){return a.Ra>>>(a.u&jt-1)>>>0}function z(a){return e(a.bb<=a.Sb),a.h||a.bb==a.Sb&&a.u>jt}function X(a,c){a.u=c,a.h=z(a)}function M(a){a.u>=Xt&&(e(a.u>=Xt),QA(a))}function rA(a){e(a!=null&&a.oa!=null),a.pa<a.Zc?(a.I=(a.oa[a.pa++]|a.I<<8)>>>0,a.b+=8):(e(a!=null&&a.oa!=null),a.pa<a.Yc?(a.b+=8,a.I=a.oa[a.pa++]|a.I<<8):a.Ka?a.b=0:(a.I<<=8,a.b+=8,a.Ka=1))}function oA(a){return cA(a,1)}function fA(a,c){var d=a.Ca;0>a.b&&rA(a);var B=a.b,m=d*c>>>8,C=(a.I>>>B>m)+0;for(C?(d-=m,a.I-=m+1<<B>>>0):d=m+1,B=d,m=0;256<=B;)m+=8,B>>=8;return B=7^m+aa[B],a.b-=B,a.Ca=(d<<B)-1,C}function bA(a,c,d){a[c+0]=d>>24&255,a[c+1]=d>>16&255,a[c+2]=d>>8&255,a[c+3]=255&d}function xA(a,c){return a[c+0]|a[c+1]<<8}function UA(a,c){return xA(a,c)|a[c+2]<<16}function SA(a,c){return xA(a,c)|xA(a,c+2)<<16}function L(a,c){var d=1<<c;return e(a!=null),e(0<c),a.X=i(d),a.X==null?0:(a.Mb=32-c,a.Xa=c,1)}function wA(a,c){e(a!=null),e(c!=null),e(a.Xa==c.Xa),r(c.X,0,a.X,0,1<<c.Xa)}function WA(){this.X=[],this.Xa=this.Mb=0}function jA(a,c,d,B){e(d!=null),e(B!=null);var m=d[0],C=B[0];return m==0&&(m=(a*C+c/2)/c),C==0&&(C=(c*m+a/2)/a),0>=m||0>=C?0:(d[0]=m,B[0]=C,1)}function CA(a,c){return a+(1<<c)-1>>>c}function zA(a,c){return((4278255360&a)+(4278255360&c)>>>0&4278255360)+((16711935&a)+(16711935&c)>>>0&16711935)>>>0}function HA(a,c){H[c]=function(d,B,m,C,U,x,E){var D;for(D=0;D<U;++D){var W=H[a](x[E+D-1],m,C+D);x[E+D]=zA(d[B+D],W)}}}function qA(){this.ud=this.hd=this.jd=0}function GA(a,c){return((4278124286&(a^c))>>>1)+(a&c)>>>0}function Fe(a){return 0<=a&&256>a?a:0>a?0:255<a?255:void 0}function fe(a,c){return Fe(a+(a-c+.5>>1))}function te(a,c,d){return Math.abs(c-d)-Math.abs(a-d)}function ge(a,c,d,B,m,C,U){for(B=C[U-1],d=0;d<m;++d)C[U+d]=B=zA(a[c+d],B)}function he(a,c,d,B,m){var C;for(C=0;C<d;++C){var U=a[c+C],x=U>>8&255,E=16711935&(E=(E=16711935&U)+((x<<16)+x));B[m+C]=(4278255360&U)+E>>>0}}function PA(a,c){c.jd=255&a,c.hd=a>>8&255,c.ud=a>>16&255}function ae(a,c,d,B,m,C){var U;for(U=0;U<B;++U){var x=c[d+U],E=x>>>8,D=x,W=255&(W=(W=x>>>16)+((a.jd<<24>>24)*(E<<24>>24)>>>5));D=255&(D=(D+=(a.hd<<24>>24)*(E<<24>>24)>>>5)+((a.ud<<24>>24)*(W<<24>>24)>>>5)),m[C+U]=(4278255360&x)+(W<<16)+D}}function RA(a,c,d,B,m){H[c]=function(C,U,x,E,D,W,aA,k,Y){for(E=aA;E<k;++E)for(aA=0;aA<Y;++aA)D[W++]=m(x[B(C[U++])])},H[a]=function(C,U,x,E,D,W,aA){var k=8>>C.b,Y=C.Ea,eA=C.K[0],dA=C.w;if(8>k)for(C=(1<<C.b)-1,dA=(1<<k)-1;U<x;++U){var iA,gA=0;for(iA=0;iA<Y;++iA)iA&C||(gA=B(E[D++])),W[aA++]=m(eA[gA&dA]),gA>>=k}else H["VP8LMapColor"+d](E,D,eA,dA,W,aA,U,x,Y)}}function At(a,c,d,B,m){for(d=c+d;c<d;){var C=a[c++];B[m++]=C>>16&255,B[m++]=C>>8&255,B[m++]=255&C}}function me(a,c,d,B,m){for(d=c+d;c<d;){var C=a[c++];B[m++]=C>>16&255,B[m++]=C>>8&255,B[m++]=255&C,B[m++]=C>>24&255}}function le(a,c,d,B,m){for(d=c+d;c<d;){var C=(U=a[c++])>>16&240|U>>12&15,U=240&U|U>>28&15;B[m++]=C,B[m++]=U}}function ce(a,c,d,B,m){for(d=c+d;c<d;){var C=(U=a[c++])>>16&248|U>>13&7,U=U>>5&224|U>>3&31;B[m++]=C,B[m++]=U}}function je(a,c,d,B,m){for(d=c+d;c<d;){var C=a[c++];B[m++]=255&C,B[m++]=C>>8&255,B[m++]=C>>16&255}}function VA(a,c,d,B,m,C){if(C==0)for(d=c+d;c<d;)bA(B,((C=a[c++])[0]>>24|C[1]>>8&65280|C[2]<<8&16711680|C[3]<<24)>>>0),m+=32;else r(B,m,a,c,d)}function De(a,c){H[c][0]=H[a+"0"],H[c][1]=H[a+"1"],H[c][2]=H[a+"2"],H[c][3]=H[a+"3"],H[c][4]=H[a+"4"],H[c][5]=H[a+"5"],H[c][6]=H[a+"6"],H[c][7]=H[a+"7"],H[c][8]=H[a+"8"],H[c][9]=H[a+"9"],H[c][10]=H[a+"10"],H[c][11]=H[a+"11"],H[c][12]=H[a+"12"],H[c][13]=H[a+"13"],H[c][14]=H[a+"0"],H[c][15]=H[a+"0"]}function YA(a){return a==Cc||a==bc||a==Fo||a==Fc}function re(){this.eb=[],this.size=this.A=this.fb=0}function Ge(){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 ue(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new re,this.f.kb=new Ge,this.sd=null}function XA(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Qe(){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 oi(a){return alert("todo:WebPSamplerProcessPlane"),a.T}function It(a,c){var d=a.T,B=c.ba.f.RGBA,m=B.eb,C=B.fb+a.ka*B.A,U=vr[c.ba.S],x=a.y,E=a.O,D=a.f,W=a.N,aA=a.ea,k=a.W,Y=c.cc,eA=c.dc,dA=c.Mc,iA=c.Nc,gA=a.ka,BA=a.ka+a.T,FA=a.U,mA=FA+1>>1;for(gA==0?U(x,E,null,null,D,W,aA,k,D,W,aA,k,m,C,null,null,FA):(U(c.ec,c.fc,x,E,Y,eA,dA,iA,D,W,aA,k,m,C-B.A,m,C,FA),++d);gA+2<BA;gA+=2)Y=D,eA=W,dA=aA,iA=k,W+=a.Rc,k+=a.Rc,C+=2*B.A,U(x,(E+=2*a.fa)-a.fa,x,E,Y,eA,dA,iA,D,W,aA,k,m,C-B.A,m,C,FA);return E+=a.fa,a.j+BA<a.o?(r(c.ec,c.fc,x,E,FA),r(c.cc,c.dc,D,W,mA),r(c.Mc,c.Nc,aA,k,mA),d--):1&BA||U(x,E,null,null,D,W,aA,k,D,W,aA,k,m,C+B.A,null,null,FA),d}function sn(a,c,d){var B=a.F,m=[a.J];if(B!=null){var C=a.U,U=c.ba.S,x=U==bo||U==Fo;c=c.ba.f.RGBA;var E=[0],D=a.ka;E[0]=a.T,a.Kb&&(D==0?--E[0]:(--D,m[0]-=a.width),a.j+a.ka+a.T==a.o&&(E[0]=a.o-a.j-D));var W=c.eb;D=c.fb+D*c.A,a=Gf(B,m[0],a.width,C,E,W,D+(x?0:3),c.A),e(d==E),a&&YA(U)&&is(W,D,x,C,E,c.A)}return 0}function Mr(a){var c=a.ma,d=c.ba.S,B=11>d,m=d==mo||d==Co||d==bo||d==mc||d==12||YA(d);if(c.memory=null,c.Ib=null,c.Jb=null,c.Nd=null,!pr(c.Oa,a,m?11:12))return 0;if(m&&YA(d)&&gn(),a.da)alert("todo:use_scaling");else{if(B){if(c.Ib=oi,a.Kb){if(d=a.U+1>>1,c.memory=i(a.U+2*d),c.memory==null)return 0;c.ec=c.memory,c.fc=0,c.cc=c.ec,c.dc=c.fc+a.U,c.Mc=c.cc,c.Nc=c.dc+d,c.Ib=It,gn()}}else alert("todo:EmitYUV");m&&(c.Jb=sn,B&&We())}if(B&&!sh){for(a=0;256>a;++a)CB[a]=89858*(a-128)+yo>>Qo,QB[a]=-22014*(a-128)+yo,FB[a]=-45773*(a-128),bB[a]=113618*(a-128)+yo>>Qo;for(a=ss;a<Uc;++a)c=76283*(a-16)+yo>>Qo,yB[a-ss]=jr(c,255),UB[a-ss]=jr(c+8>>4,15);sh=1}return 1}function JA(a){var c=a.ma,d=a.U,B=a.T;return e(!(1&a.ka)),0>=d||0>=B?0:(d=c.Ib(a,c),c.Jb!=null&&c.Jb(a,c,d),c.Dc+=d,1)}function on(a){a.ma.memory=null}function ln(a,c,d,B){return pA(a,8)!=47?0:(c[0]=pA(a,14)+1,d[0]=pA(a,14)+1,B[0]=pA(a,1),pA(a,3)!=0?0:!a.h)}function hr(a,c){if(4>a)return a+1;var d=a-2>>1;return(2+(1&a)<<d)+pA(c,d)+1}function dr(a,c){return 120<c?c-120:1<=(d=((d=sB[c-1])>>4)*a+(8-(15&d)))?d:1;var d}function Je(a,c,d){var B=R(d),m=a[c+=255&B].g-8;return 0<m&&(X(d,d.u+8),B=R(d),c+=a[c].value,c+=B&(1<<m)-1),X(d,d.u+a[c].g),a[c].value}function vt(a,c,d){return d.g+=a.g,d.value+=a.value<<c>>>0,e(8>=d.g),a.g}function Ft(a,c,d){var B=a.xc;return e((c=B==0?0:a.vc[a.md*(d>>B)+(c>>B)])<a.Wb),a.Ya[c]}function li(a,c,d,B){var m=a.ab,C=a.c*c,U=a.C;c=U+c;var x=d,E=B;for(B=a.Ta,d=a.Ua;0<m--;){var D=a.gc[m],W=U,aA=c,k=x,Y=E,eA=(E=B,x=d,D.Ea);switch(e(W<aA),e(aA<=D.nc),D.hc){case 2:sa(k,Y,(aA-W)*eA,E,x);break;case 0:var dA=W,iA=aA,gA=E,BA=x,FA=(TA=D).Ea;dA==0&&(Nn(k,Y,null,null,1,gA,BA),ge(k,Y+1,0,0,FA-1,gA,BA+1),Y+=FA,BA+=FA,++dA);for(var mA=1<<TA.b,MA=mA-1,IA=CA(FA,TA.b),se=TA.K,TA=TA.w+(dA>>TA.b)*IA;dA<iA;){var Be=se,dt=TA,oe=1;for(Dn(k,Y,gA,BA-FA,1,gA,BA);oe<FA;){var OA=(oe&~MA)+mA;OA>FA&&(OA=FA),(0,Er[Be[dt++]>>8&15])(k,Y+ +oe,gA,BA+oe-FA,OA-oe,gA,BA+oe),oe=OA}Y+=FA,BA+=FA,++dA&MA||(TA+=IA)}aA!=D.nc&&r(E,x-eA,E,x+(aA-W-1)*eA,eA);break;case 1:for(eA=k,iA=Y,FA=(k=D.Ea)-(BA=k&~(gA=(Y=1<<D.b)-1)),dA=CA(k,D.b),mA=D.K,D=D.w+(W>>D.b)*dA;W<aA;){for(MA=mA,IA=D,se=new qA,TA=iA+BA,Be=iA+k;iA<TA;)PA(MA[IA++],se),Fi(se,eA,iA,Y,E,x),iA+=Y,x+=Y;iA<Be&&(PA(MA[IA++],se),Fi(se,eA,iA,FA,E,x),iA+=FA,x+=FA),++W&gA||(D+=dA)}break;case 3:if(k==E&&Y==x&&0<D.b){for(iA=E,k=eA=x+(aA-W)*eA-(BA=(aA-W)*CA(D.Ea,D.b)),Y=E,gA=x,dA=[],BA=(FA=BA)-1;0<=BA;--BA)dA[BA]=Y[gA+BA];for(BA=FA-1;0<=BA;--BA)iA[k+BA]=dA[BA];bi(D,W,aA,E,eA,E,x)}else bi(D,W,aA,k,Y,E,x)}x=B,E=d}E!=d&&r(B,d,x,E,C)}function En(a,c){var d=a.V,B=a.Ba+a.c*a.C,m=c-a.C;if(e(c<=a.l.o),e(16>=m),0<m){var C=a.l,U=a.Ta,x=a.Ua,E=C.width;if(li(a,m,d,B),m=x=[x],e((d=a.C)<(B=c)),e(C.v<C.va),B>C.o&&(B=C.o),d<C.j){var D=C.j-d;d=C.j,m[0]+=D*E}if(d>=B?d=0:(m[0]+=4*C.v,C.ka=d-C.j,C.U=C.va-C.v,C.T=B-d,d=1),d){if(x=x[0],11>(d=a.ca).S){var W=d.f.RGBA,aA=(B=d.S,m=C.U,C=C.T,D=W.eb,W.A),k=C;for(W=W.fb+a.Ma*W.A;0<k--;){var Y=U,eA=x,dA=m,iA=D,gA=W;switch(B){case vo:ts(Y,eA,dA,iA,gA);break;case mo:rs(Y,eA,dA,iA,gA);break;case Cc:rs(Y,eA,dA,iA,gA),is(iA,gA,0,dA,1,0);break;case Yf:yi(Y,eA,dA,iA,gA);break;case Co:VA(Y,eA,dA,iA,gA,1);break;case bc:VA(Y,eA,dA,iA,gA,1),is(iA,gA,0,dA,1,0);break;case bo:VA(Y,eA,dA,iA,gA,0);break;case Fo:VA(Y,eA,dA,iA,gA,0),is(iA,gA,1,dA,1,0);break;case mc:oa(Y,eA,dA,iA,gA);break;case Fc:oa(Y,eA,dA,iA,gA),jf(iA,gA,dA,1,0);break;case Zf:Qi(Y,eA,dA,iA,gA);break;default:e(0)}x+=E,W+=aA}a.Ma+=C}else alert("todo:EmitRescaledRowsYUVA");e(a.Ma<=d.height)}}a.C=c,e(a.C<=a.i)}function Ur(a){var c;if(0<a.ua)return 0;for(c=0;c<a.Wb;++c){var d=a.Ya[c].G,B=a.Ya[c].H;if(0<d[1][B[1]+0].g||0<d[2][B[2]+0].g||0<d[3][B[3]+0].g)return 0}return 1}function Rr(a,c,d,B,m,C){if(a.Z!=0){var U=a.qd,x=a.rd;for(e(Pn[a.Z]!=null);c<d;++c)Pn[a.Z](U,x,B,m,B,m,C),U=B,x=m,m+=C;a.qd=U,a.rd=x}}function _r(a,c){var d=a.l.ma,B=d.Z==0||d.Z==1?a.l.j:a.C;if(B=a.C<B?B:a.C,e(c<=a.l.o),c>B){var m=a.l.width,C=d.ca,U=d.tb+m*B,x=a.V,E=a.Ba+a.c*B,D=a.gc;e(a.ab==1),e(D[0].hc==3),wc(D[0],B,c,x,E,C,U),Rr(d,B,c,C,U,m)}a.C=a.Ma=c}function xr(a,c,d,B,m,C,U){var x=a.$/B,E=a.$%B,D=a.m,W=a.s,aA=d+a.$,k=aA;m=d+B*m;var Y=d+B*C,eA=280+W.ua,dA=a.Pb?x:16777216,iA=0<W.ua?W.Wa:null,gA=W.wc,BA=aA<Y?Ft(W,E,x):null;e(a.C<C),e(Y<=m);var FA=!1;A:for(;;){for(;FA||aA<Y;){var mA=0;if(x>=dA){var MA=aA-d;e((dA=a).Pb),dA.wd=dA.m,dA.xd=MA,0<dA.s.ua&&wA(dA.s.Wa,dA.s.vb),dA=x+lB}if(E&gA||(BA=Ft(W,E,x)),e(BA!=null),BA.Qb&&(c[aA]=BA.qb,FA=!0),!FA)if(M(D),BA.jc){mA=D,MA=c;var IA=aA,se=BA.pd[R(mA)&ia-1];e(BA.jc),256>se.g?(X(mA,mA.u+se.g),MA[IA]=se.value,mA=0):(X(mA,mA.u+se.g-256),e(256<=se.value),mA=se.value),mA==0&&(FA=!0)}else mA=Je(BA.G[0],BA.H[0],D);if(D.h)break;if(FA||256>mA){if(!FA)if(BA.nd)c[aA]=(BA.qb|mA<<8)>>>0;else{if(M(D),FA=Je(BA.G[1],BA.H[1],D),M(D),MA=Je(BA.G[2],BA.H[2],D),IA=Je(BA.G[3],BA.H[3],D),D.h)break;c[aA]=(IA<<24|FA<<16|mA<<8|MA)>>>0}if(FA=!1,++aA,++E>=B&&(E=0,++x,U!=null&&x<=C&&!(x%16)&&U(a,x),iA!=null))for(;k<aA;)mA=c[k++],iA.X[(506832829*mA&4294967295)>>>iA.Mb]=mA}else if(280>mA){if(mA=hr(mA-256,D),MA=Je(BA.G[4],BA.H[4],D),M(D),MA=dr(B,MA=hr(MA,D)),D.h)break;if(aA-d<MA||m-aA<mA)break A;for(IA=0;IA<mA;++IA)c[aA+IA]=c[aA+IA-MA];for(aA+=mA,E+=mA;E>=B;)E-=B,++x,U!=null&&x<=C&&!(x%16)&&U(a,x);if(e(aA<=m),E&gA&&(BA=Ft(W,E,x)),iA!=null)for(;k<aA;)mA=c[k++],iA.X[(506832829*mA&4294967295)>>>iA.Mb]=mA}else{if(!(mA<eA))break A;for(FA=mA-280,e(iA!=null);k<aA;)mA=c[k++],iA.X[(506832829*mA&4294967295)>>>iA.Mb]=mA;mA=aA,e(!(FA>>>(MA=iA).Xa)),c[mA]=MA.X[FA],FA=!0}FA||e(D.h==z(D))}if(a.Pb&&D.h&&aA<m)e(a.m.h),a.a=5,a.m=a.wd,a.$=a.xd,0<a.s.ua&&wA(a.s.vb,a.s.Wa);else{if(D.h)break A;U!=null&&U(a,x>C?C:x),a.a=0,a.$=aA-d}return 1}return a.a=3,0}function gr(a){e(a!=null),a.vc=null,a.yc=null,a.Ya=null;var c=a.Wa;c!=null&&(c.X=null),a.vb=null,e(a!=null)}function ci(){var a=new kA;return a==null?null:(a.a=0,a.xb=eh,De("Predictor","VP8LPredictors"),De("Predictor","VP8LPredictors_C"),De("PredictorAdd","VP8LPredictorsAdd"),De("PredictorAdd","VP8LPredictorsAdd_C"),sa=he,Fi=ae,ts=At,rs=me,oa=le,Qi=ce,yi=je,H.VP8LMapColor32b=ut,H.VP8LMapColor8b=Wr,a)}function Kr(a,c,d,B,m){var C=1,U=[a],x=[c],E=B.m,D=B.s,W=null,aA=0;A:for(;;){if(d)for(;C&&pA(E,1);){var k=U,Y=x,eA=B,dA=1,iA=eA.m,gA=eA.gc[eA.ab],BA=pA(iA,2);if(eA.Oc&1<<BA)C=0;else{switch(eA.Oc|=1<<BA,gA.hc=BA,gA.Ea=k[0],gA.nc=Y[0],gA.K=[null],++eA.ab,e(4>=eA.ab),BA){case 0:case 1:gA.b=pA(iA,3)+2,dA=Kr(CA(gA.Ea,gA.b),CA(gA.nc,gA.b),0,eA,gA.K),gA.K=gA.K[0];break;case 3:var FA,mA=pA(iA,8)+1,MA=16<mA?0:4<mA?1:2<mA?2:3;if(k[0]=CA(gA.Ea,MA),gA.b=MA,FA=dA=Kr(mA,1,0,eA,gA.K)){var IA,se=mA,TA=gA,Be=1<<(8>>TA.b),dt=i(Be);if(dt==null)FA=0;else{var oe=TA.K[0],OA=TA.w;for(dt[0]=TA.K[0][0],IA=1;IA<1*se;++IA)dt[IA]=zA(oe[OA+IA],dt[IA-1]);for(;IA<4*Be;++IA)dt[IA]=0;TA.K[0]=null,TA.K[0]=dt,FA=1}}dA=FA;break;case 2:break;default:e(0)}C=dA}}if(U=U[0],x=x[0],C&&pA(E,1)&&!(C=1<=(aA=pA(E,4))&&11>=aA)){B.a=3;break A}var _A;if(_A=C)e:{var tt,ie,ve,Re=B,yt=U,Gt=x,Ye=aA,Dt=d,Vt=Re.m,gt=Re.s,Ce=[null],Ue=1,Ze=0,_e=oB[Ye];t:for(;;){if(Dt&&pA(Vt,1)){var Ut=pA(Vt,3)+2,Ir=CA(yt,Ut),rt=CA(Gt,Ut),Jt=Ir*rt;if(!Kr(Ir,rt,0,Re,Ce))break t;for(Ce=Ce[0],gt.xc=Ut,tt=0;tt<Jt;++tt){var Se=Ce[tt]>>8&65535;Ce[tt]=Se,Se>=Ue&&(Ue=Se+1)}}if(Vt.h)break t;for(ie=0;5>ie;++ie){var Bt=$f[ie];!ie&&0<Ye&&(Bt+=1<<Ye),Ze<Bt&&(Ze=Bt)}var rr=o(Ue*_e,K),qt=Ue,nr=o(qt,sA);if(nr==null)var ir=null;else e(65536>=qt),ir=nr;var Yt=i(Ze);if(ir==null||Yt==null||rr==null){Re.a=1;break t}var ar=rr;for(tt=ve=0;tt<Ue;++tt){var Oe=ir[tt],sr=Oe.G,Sr=Oe.H,Ui=0,vn=1,_t=0;for(ie=0;5>ie;++ie){Bt=$f[ie],sr[ie]=ar,Sr[ie]=ve,!ie&&0<Ye&&(Bt+=1<<Ye);n:{var _o,_c=Bt,xo=Re,os=Yt,EB=ar,LB=ve,xc=0,Mn=xo.m,IB=pA(Mn,1);if(n(os,0,0,_c),IB){var SB=pA(Mn,1)+1,HB=pA(Mn,1),ch=pA(Mn,HB==0?1:8);os[ch]=1,SB==2&&(os[ch=pA(Mn,8)]=1);var Eo=1}else{var uh=i(19),fh=pA(Mn,4)+4;if(19<fh){xo.a=3;var Lo=0;break n}for(_o=0;_o<fh;++_o)uh[aB[_o]]=pA(Mn,3);var Ec=void 0,ls=void 0,hh=xo,NB=uh,Io=_c,dh=os,Lc=0,Rn=hh.m,gh=8,Bh=o(128,K);r:for(;I(Bh,0,7,NB,19);){if(pA(Rn,1)){var DB=2+2*pA(Rn,3);if((Ec=2+pA(Rn,DB))>Io)break r}else Ec=Io;for(ls=0;ls<Io&&Ec--;){M(Rn);var ph=Bh[0+(127&R(Rn))];X(Rn,Rn.u+ph.g);var ua=ph.value;if(16>ua)dh[ls++]=ua,ua!=0&&(gh=ua);else{var kB=ua==16,wh=ua-16,TB=nB[wh],vh=pA(Rn,rB[wh])+TB;if(ls+vh>Io)break r;for(var OB=kB?gh:0;0<vh--;)dh[ls++]=OB}}Lc=1;break r}Lc||(hh.a=3),Eo=Lc}(Eo=Eo&&!Mn.h)&&(xc=I(EB,LB,8,os,_c)),Eo&&xc!=0?Lo=xc:(xo.a=3,Lo=0)}if(Lo==0)break t;if(vn&&iB[ie]==1&&(vn=ar[ve].g==0),Ui+=ar[ve].g,ve+=Lo,3>=ie){var cs,Ic=Yt[0];for(cs=1;cs<Bt;++cs)Yt[cs]>Ic&&(Ic=Yt[cs]);_t+=Ic}}if(Oe.nd=vn,Oe.Qb=0,vn&&(Oe.qb=(sr[3][Sr[3]+0].value<<24|sr[1][Sr[1]+0].value<<16|sr[2][Sr[2]+0].value)>>>0,Ui==0&&256>sr[0][Sr[0]+0].value&&(Oe.Qb=1,Oe.qb+=sr[0][Sr[0]+0].value<<8)),Oe.jc=!Oe.Qb&&6>_t,Oe.jc){var So,mn=Oe;for(So=0;So<ia;++So){var Kn=So,jn=mn.pd[Kn],Ho=mn.G[0][mn.H[0]+Kn];256<=Ho.value?(jn.g=Ho.g+256,jn.value=Ho.value):(jn.g=0,jn.value=0,Kn>>=vt(Ho,8,jn),Kn>>=vt(mn.G[1][mn.H[1]+Kn],16,jn),Kn>>=vt(mn.G[2][mn.H[2]+Kn],0,jn),vt(mn.G[3][mn.H[3]+Kn],24,jn))}}}gt.vc=Ce,gt.Wb=Ue,gt.Ya=ir,gt.yc=rr,_A=1;break e}_A=0}if(!(C=_A)){B.a=3;break A}if(0<aA){if(D.ua=1<<aA,!L(D.Wa,aA)){B.a=1,C=0;break A}}else D.ua=0;var Sc=B,mh=U,PB=x,Hc=Sc.s,Nc=Hc.xc;if(Sc.c=mh,Sc.i=PB,Hc.md=CA(mh,Nc),Hc.wc=Nc==0?-1:(1<<Nc)-1,d){B.xb=BB;break A}if((W=i(U*x))==null){B.a=1,C=0;break A}C=(C=xr(B,W,0,U,x,x,null))&&!E.h;break A}return C?(m!=null?m[0]=W:(e(W==null),e(d)),B.$=0,d||gr(D)):gr(D),C}function ui(a,c){var d=a.c*a.i,B=d+c+16*c;return e(a.c<=c),a.V=i(B),a.V==null?(a.Ta=null,a.Ua=0,a.a=1,0):(a.Ta=a.V,a.Ua=a.Ba+d+c,1)}function Gi(a,c){var d=a.C,B=c-d,m=a.V,C=a.Ba+a.c*d;for(e(c<=a.l.o);0<B;){var U=16<B?16:B,x=a.l.ma,E=a.l.width,D=E*U,W=x.ca,aA=x.tb+E*d,k=a.Ta,Y=a.Ua;li(a,U,m,C),Vf(k,Y,W,aA,D),Rr(x,d,d+U,W,aA,E),B-=U,m+=U*a.c,d+=U}e(d==c),a.C=a.Ma=c}function Vi(){this.ub=this.yd=this.td=this.Rb=0}function qi(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ac(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function Ka(){this.Yb=function(){var a=[];return function c(d,B,m){for(var C=m[B],U=0;U<C&&(d.push(m.length>B+1?[]:0),!(m.length<B+1));U++)c(d[U],B+1,m)}(a,0,[3,11]),a}()}function $s(){this.jb=i(3),this.Wc=s([4,8],Ka),this.Xc=s([4,17],Ka)}function Ao(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function Br(){this.ld=this.La=this.dd=this.tc=0}function ja(){this.Na=this.la=0}function eo(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ga(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function to(){this.uc=this.M=this.Nb=0,this.wa=Array(new Br),this.Y=0,this.ya=Array(new Ga),this.aa=0,this.l=new zi}function ro(){this.y=i(16),this.f=i(8),this.ea=i(8)}function no(){this.cb=this.a=0,this.sc="",this.m=new Q,this.Od=new Vi,this.Kc=new qi,this.ed=new Ao,this.Qa=new Ac,this.Ic=this.$c=this.Aa=0,this.D=new to,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,Q),this.ia=0,this.pb=o(4,eo),this.Pa=new $s,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ro),this.Hd=0,this.rb=Array(new ja),this.sb=0,this.wa=Array(new Br),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ga),this.L=this.aa=0,this.gd=s([4,2],Br),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function jr(a,c){return 0>a?0:a>c?c:a}function zi(){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 ec(){var a=new no;return a!=null&&(a.a=0,a.sc="OK",a.cb=0,a.Xb=0,as||(as=Wi)),a}function lt(a,c,d){return a.a==0&&(a.a=c,a.sc=d,a.cb=0),0}function io(a,c,d){return 3<=d&&a[c+0]==157&&a[c+1]==1&&a[c+2]==42}function Gr(a,c){if(a==null)return 0;if(a.a=0,a.sc="OK",c==null)return lt(a,2,"null VP8Io passed to VP8GetHeaders()");var d=c.data,B=c.w,m=c.ha;if(4>m)return lt(a,7,"Truncated header.");var C=d[B+0]|d[B+1]<<8|d[B+2]<<16,U=a.Od;if(U.Rb=!(1&C),U.td=C>>1&7,U.yd=C>>4&1,U.ub=C>>5,3<U.td)return lt(a,3,"Incorrect keyframe parameters.");if(!U.yd)return lt(a,4,"Frame not displayable.");B+=3,m-=3;var x=a.Kc;if(U.Rb){if(7>m)return lt(a,7,"cannot parse picture header");if(!io(d,B,m))return lt(a,3,"Bad code word");x.c=16383&(d[B+4]<<8|d[B+3]),x.Td=d[B+4]>>6,x.i=16383&(d[B+6]<<8|d[B+5]),x.Ud=d[B+6]>>6,B+=7,m-=7,a.za=x.c+15>>4,a.Ub=x.i+15>>4,c.width=x.c,c.height=x.i,c.Da=0,c.j=0,c.v=0,c.va=c.width,c.o=c.height,c.da=0,c.ib=c.width,c.hb=c.height,c.U=c.width,c.T=c.height,n((C=a.Pa).jb,0,255,C.jb.length),e((C=a.Qa)!=null),C.Cb=0,C.Bb=0,C.Fb=1,n(C.Zb,0,0,C.Zb.length),n(C.Lb,0,0,C.Lb)}if(U.ub>m)return lt(a,7,"bad partition length");lA(C=a.m,d,B,U.ub),B+=U.ub,m-=U.ub,U.Rb&&(x.Ld=oA(C),x.Kd=oA(C)),x=a.Qa;var E,D=a.Pa;if(e(C!=null),e(x!=null),x.Cb=oA(C),x.Cb){if(x.Bb=oA(C),oA(C)){for(x.Fb=oA(C),E=0;4>E;++E)x.Zb[E]=oA(C)?tA(C,7):0;for(E=0;4>E;++E)x.Lb[E]=oA(C)?tA(C,6):0}if(x.Bb)for(E=0;3>E;++E)D.jb[E]=oA(C)?cA(C,8):255}else x.Bb=0;if(C.Ka)return lt(a,3,"cannot parse segment header");if((x=a.ed).zd=oA(C),x.Tb=cA(C,6),x.wb=cA(C,3),x.Pc=oA(C),x.Pc&&oA(C)){for(D=0;4>D;++D)oA(C)&&(x.vd[D]=tA(C,6));for(D=0;4>D;++D)oA(C)&&(x.od[D]=tA(C,6))}if(a.L=x.Tb==0?0:x.zd?1:2,C.Ka)return lt(a,3,"cannot parse filter header");var W=m;if(m=E=B,B=E+W,x=W,a.Xb=(1<<cA(a.m,2))-1,W<3*(D=a.Xb))d=7;else{for(E+=3*D,x-=3*D,W=0;W<D;++W){var aA=d[m+0]|d[m+1]<<8|d[m+2]<<16;aA>x&&(aA=x),lA(a.Jc[+W],d,E,aA),E+=aA,x-=aA,m+=3}lA(a.Jc[+D],d,E,x),d=E<B?0:5}if(d!=0)return lt(a,d,"cannot parse partitions");for(d=cA(E=a.m,7),m=oA(E)?tA(E,4):0,B=oA(E)?tA(E,4):0,x=oA(E)?tA(E,4):0,D=oA(E)?tA(E,4):0,E=oA(E)?tA(E,4):0,W=a.Qa,aA=0;4>aA;++aA){if(W.Cb){var k=W.Zb[aA];W.Fb||(k+=d)}else{if(0<aA){a.pb[aA]=a.pb[0];continue}k=d}var Y=a.pb[aA];Y.Sc[0]=Qc[jr(k+m,127)],Y.Sc[1]=yc[jr(k+0,127)],Y.Eb[0]=2*Qc[jr(k+B,127)],Y.Eb[1]=101581*yc[jr(k+x,127)]>>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=Qc[jr(k+D,117)],Y.Qc[1]=yc[jr(k+E,127)],Y.lc=k+E}if(!U.Rb)return lt(a,4,"Not a key frame.");for(oA(C),U=a.Pa,d=0;4>d;++d){for(m=0;8>m;++m)for(B=0;3>B;++B)for(x=0;11>x;++x)D=fA(C,dB[d][m][B][x])?cA(C,8):fB[d][m][B][x],U.Wc[d][m].Yb[B][x]=D;for(m=0;17>m;++m)U.Xc[d][m]=U.Wc[d][gB[m]]}return a.kc=oA(C),a.kc&&(a.Bd=cA(C,8)),a.cb=1}function Wi(a,c,d,B,m,C,U){var x=c[m].Yb[d];for(d=0;16>m;++m){if(!fA(a,x[d+0]))return m;for(;!fA(a,x[d+1]);)if(x=c[++m].Yb[0],d=0,m==16)return 16;var E=c[m+1].Yb;if(fA(a,x[d+2])){var D=a,W=0;if(fA(D,(k=x)[(aA=d)+3]))if(fA(D,k[aA+6])){for(x=0,aA=2*(W=fA(D,k[aA+8]))+(k=fA(D,k[aA+9+W])),W=0,k=cB[aA];k[x];++x)W+=W+fA(D,k[x]);W+=3+(8<<aA)}else fA(D,k[aA+7])?(W=7+2*fA(D,165),W+=fA(D,145)):W=5+fA(D,159);else W=fA(D,k[aA+4])?3+fA(D,k[aA+5]):2;x=E[2]}else W=1,x=E[1];E=U+uB[m],0>(D=a).b&&rA(D);var aA,k=D.b,Y=(aA=D.Ca>>1)-(D.I>>k)>>31;--D.b,D.Ca+=Y,D.Ca|=1,D.I-=(aA+1&Y)<<k,C[E]=((W^Y)-Y)*B[(0<m)+0]}return 16}function Va(a){var c=a.rb[a.sb-1];c.la=0,c.Na=0,n(a.zc,0,0,a.zc.length),a.ja=0}function er(a,c,d,B,m){m=a[c+d+32*B]+(m>>3),a[c+d+32*B]=-256&m?0>m?0:255:m}function Xi(a,c,d,B,m,C){er(a,c,0,d,B+m),er(a,c,1,d,B+C),er(a,c,2,d,B-C),er(a,c,3,d,B-m)}function cn(a){return(20091*a>>16)+a}function Qt(a,c,d,B){var m,C=0,U=i(16);for(m=0;4>m;++m){var x=a[c+0]+a[c+8],E=a[c+0]-a[c+8],D=(35468*a[c+4]>>16)-cn(a[c+12]),W=cn(a[c+4])+(35468*a[c+12]>>16);U[C+0]=x+W,U[C+1]=E+D,U[C+2]=E-D,U[C+3]=x-W,C+=4,c++}for(m=C=0;4>m;++m)x=(a=U[C+0]+4)+U[C+8],E=a-U[C+8],D=(35468*U[C+4]>>16)-cn(U[C+12]),er(d,B,0,0,x+(W=cn(U[C+4])+(35468*U[C+12]>>16))),er(d,B,1,0,E+D),er(d,B,2,0,E-D),er(d,B,3,0,x-W),C++,B+=32}function ao(a,c,d,B){var m=a[c+0]+4,C=35468*a[c+4]>>16,U=cn(a[c+4]),x=35468*a[c+1]>>16;Xi(d,B,0,m+U,a=cn(a[c+1]),x),Xi(d,B,1,m+C,a,x),Xi(d,B,2,m-C,a,x),Xi(d,B,3,m-U,a,x)}function tc(a,c,d,B,m){Qt(a,c,d,B),m&&Qt(a,c+16,d,B+4)}function rc(a,c,d,B){Bn(a,c+0,d,B,1),Bn(a,c+32,d,B+128,1)}function nc(a,c,d,B){var m;for(a=a[c+0]+4,m=0;4>m;++m)for(c=0;4>c;++c)er(d,B,c,m,a)}function Vr(a,c,d,B){a[c+0]&&Nt(a,c+0,d,B),a[c+16]&&Nt(a,c+16,d,B+4),a[c+32]&&Nt(a,c+32,d,B+128),a[c+48]&&Nt(a,c+48,d,B+128+4)}function so(a,c,d,B){var m,C=i(16);for(m=0;4>m;++m){var U=a[c+0+m]+a[c+12+m],x=a[c+4+m]+a[c+8+m],E=a[c+4+m]-a[c+8+m],D=a[c+0+m]-a[c+12+m];C[0+m]=U+x,C[8+m]=U-x,C[4+m]=D+E,C[12+m]=D-E}for(m=0;4>m;++m)U=(a=C[0+4*m]+3)+C[3+4*m],x=C[1+4*m]+C[2+4*m],E=C[1+4*m]-C[2+4*m],D=a-C[3+4*m],d[B+0]=U+x>>3,d[B+16]=D+E>>3,d[B+32]=U-x>>3,d[B+48]=D-E>>3,B+=64}function Ji(a,c,d){var B,m=c-32,C=tr,U=255-a[m-1];for(B=0;B<d;++B){var x,E=C,D=U+a[c-1];for(x=0;x<d;++x)a[c+x]=E[D+a[m+x]];c+=32}}function Yi(a,c){Ji(a,c,4)}function qa(a,c){Ji(a,c,8)}function ic(a,c){Ji(a,c,16)}function ac(a,c){var d;for(d=0;16>d;++d)r(a,c+32*d,a,c-32,16)}function sc(a,c){var d;for(d=16;0<d;--d)n(a,c,a[c-1],16),c+=32}function Ln(a,c,d){var B;for(B=0;16>B;++B)n(c,d+32*B,a,16)}function oo(a,c){var d,B=16;for(d=0;16>d;++d)B+=a[c-1+32*d]+a[c+d-32];Ln(B>>5,a,c)}function In(a,c){var d,B=8;for(d=0;16>d;++d)B+=a[c-1+32*d];Ln(B>>4,a,c)}function oc(a,c){var d,B=8;for(d=0;16>d;++d)B+=a[c+d-32];Ln(B>>4,a,c)}function fi(a,c){Ln(128,a,c)}function ZA(a,c,d){return a+2*c+d+2>>2}function lc(a,c){var d,B=c-32;for(B=new Uint8Array([ZA(a[B-1],a[B+0],a[B+1]),ZA(a[B+0],a[B+1],a[B+2]),ZA(a[B+1],a[B+2],a[B+3]),ZA(a[B+2],a[B+3],a[B+4])]),d=0;4>d;++d)r(a,c+32*d,B,0,B.length)}function cc(a,c){var d=a[c-1],B=a[c-1+32],m=a[c-1+64],C=a[c-1+96];bA(a,c+0,16843009*ZA(a[c-1-32],d,B)),bA(a,c+32,16843009*ZA(d,B,m)),bA(a,c+64,16843009*ZA(B,m,C)),bA(a,c+96,16843009*ZA(m,C,C))}function uc(a,c){var d,B=4;for(d=0;4>d;++d)B+=a[c+d-32]+a[c-1+32*d];for(B>>=3,d=0;4>d;++d)n(a,c+32*d,B,4)}function fc(a,c){var d=a[c-1+0],B=a[c-1+32],m=a[c-1+64],C=a[c-1-32],U=a[c+0-32],x=a[c+1-32],E=a[c+2-32],D=a[c+3-32];a[c+0+96]=ZA(B,m,a[c-1+96]),a[c+1+96]=a[c+0+64]=ZA(d,B,m),a[c+2+96]=a[c+1+64]=a[c+0+32]=ZA(C,d,B),a[c+3+96]=a[c+2+64]=a[c+1+32]=a[c+0+0]=ZA(U,C,d),a[c+3+64]=a[c+2+32]=a[c+1+0]=ZA(x,U,C),a[c+3+32]=a[c+2+0]=ZA(E,x,U),a[c+3+0]=ZA(D,E,x)}function hc(a,c){var d=a[c+1-32],B=a[c+2-32],m=a[c+3-32],C=a[c+4-32],U=a[c+5-32],x=a[c+6-32],E=a[c+7-32];a[c+0+0]=ZA(a[c+0-32],d,B),a[c+1+0]=a[c+0+32]=ZA(d,B,m),a[c+2+0]=a[c+1+32]=a[c+0+64]=ZA(B,m,C),a[c+3+0]=a[c+2+32]=a[c+1+64]=a[c+0+96]=ZA(m,C,U),a[c+3+32]=a[c+2+64]=a[c+1+96]=ZA(C,U,x),a[c+3+64]=a[c+2+96]=ZA(U,x,E),a[c+3+96]=ZA(x,E,E)}function un(a,c){var d=a[c-1+0],B=a[c-1+32],m=a[c-1+64],C=a[c-1-32],U=a[c+0-32],x=a[c+1-32],E=a[c+2-32],D=a[c+3-32];a[c+0+0]=a[c+1+64]=C+U+1>>1,a[c+1+0]=a[c+2+64]=U+x+1>>1,a[c+2+0]=a[c+3+64]=x+E+1>>1,a[c+3+0]=E+D+1>>1,a[c+0+96]=ZA(m,B,d),a[c+0+64]=ZA(B,d,C),a[c+0+32]=a[c+1+96]=ZA(d,C,U),a[c+1+32]=a[c+2+96]=ZA(C,U,x),a[c+2+32]=a[c+3+96]=ZA(U,x,E),a[c+3+32]=ZA(x,E,D)}function fn(a,c){var d=a[c+0-32],B=a[c+1-32],m=a[c+2-32],C=a[c+3-32],U=a[c+4-32],x=a[c+5-32],E=a[c+6-32],D=a[c+7-32];a[c+0+0]=d+B+1>>1,a[c+1+0]=a[c+0+64]=B+m+1>>1,a[c+2+0]=a[c+1+64]=m+C+1>>1,a[c+3+0]=a[c+2+64]=C+U+1>>1,a[c+0+32]=ZA(d,B,m),a[c+1+32]=a[c+0+96]=ZA(B,m,C),a[c+2+32]=a[c+1+96]=ZA(m,C,U),a[c+3+32]=a[c+2+96]=ZA(C,U,x),a[c+3+64]=ZA(U,x,E),a[c+3+96]=ZA(x,E,D)}function dc(a,c){var d=a[c-1+0],B=a[c-1+32],m=a[c-1+64],C=a[c-1+96];a[c+0+0]=d+B+1>>1,a[c+2+0]=a[c+0+32]=B+m+1>>1,a[c+2+32]=a[c+0+64]=m+C+1>>1,a[c+1+0]=ZA(d,B,m),a[c+3+0]=a[c+1+32]=ZA(B,m,C),a[c+3+32]=a[c+1+64]=ZA(m,C,C),a[c+3+64]=a[c+2+64]=a[c+0+96]=a[c+1+96]=a[c+2+96]=a[c+3+96]=C}function gc(a,c){var d=a[c-1+0],B=a[c-1+32],m=a[c-1+64],C=a[c-1+96],U=a[c-1-32],x=a[c+0-32],E=a[c+1-32],D=a[c+2-32];a[c+0+0]=a[c+2+32]=d+U+1>>1,a[c+0+32]=a[c+2+64]=B+d+1>>1,a[c+0+64]=a[c+2+96]=m+B+1>>1,a[c+0+96]=C+m+1>>1,a[c+3+0]=ZA(x,E,D),a[c+2+0]=ZA(U,x,E),a[c+1+0]=a[c+3+32]=ZA(d,U,x),a[c+1+32]=a[c+3+64]=ZA(B,d,U),a[c+1+64]=a[c+3+96]=ZA(m,B,d),a[c+1+96]=ZA(C,m,B)}function Zi(a,c){var d;for(d=0;8>d;++d)r(a,c+32*d,a,c-32,8)}function za(a,c){var d;for(d=0;8>d;++d)n(a,c,a[c-1],8),c+=32}function qr(a,c,d){var B;for(B=0;8>B;++B)n(c,d+32*B,a,8)}function Bc(a,c){var d,B=8;for(d=0;8>d;++d)B+=a[c+d-32]+a[c-1+32*d];qr(B>>4,a,c)}function $i(a,c){var d,B=4;for(d=0;8>d;++d)B+=a[c+d-32];qr(B>>3,a,c)}function pc(a,c){var d,B=4;for(d=0;8>d;++d)B+=a[c-1+32*d];qr(B>>3,a,c)}function Wa(a,c){qr(128,a,c)}function Sn(a,c,d){var B=a[c-d],m=a[c+0],C=3*(m-B)+vc[1020+a[c-2*d]-a[c+d]],U=wo[112+(C+4>>3)];a[c-d]=tr[255+B+wo[112+(C+3>>3)]],a[c+0]=tr[255+m-U]}function Xa(a,c,d,B){var m=a[c+0],C=a[c+d];return wr[255+a[c-2*d]-a[c-d]]>B||wr[255+C-m]>B}function hi(a,c,d,B){return 4*wr[255+a[c-d]-a[c+0]]+wr[255+a[c-2*d]-a[c+d]]<=B}function Ja(a,c,d,B,m){var C=a[c-3*d],U=a[c-2*d],x=a[c-d],E=a[c+0],D=a[c+d],W=a[c+2*d],aA=a[c+3*d];return 4*wr[255+x-E]+wr[255+U-D]>B?0:wr[255+a[c-4*d]-C]<=m&&wr[255+C-U]<=m&&wr[255+U-x]<=m&&wr[255+aA-W]<=m&&wr[255+W-D]<=m&&wr[255+D-E]<=m}function Aa(a,c,d,B){var m=2*B+1;for(B=0;16>B;++B)hi(a,c+B,d,m)&&Sn(a,c+B,d)}function Ya(a,c,d,B){var m=2*B+1;for(B=0;16>B;++B)hi(a,c+B*d,1,m)&&Sn(a,c+B*d,1)}function ea(a,c,d,B){var m;for(m=3;0<m;--m)Aa(a,c+=4*d,d,B)}function lo(a,c,d,B){var m;for(m=3;0<m;--m)Ya(a,c+=4,d,B)}function hn(a,c,d,B,m,C,U,x){for(C=2*C+1;0<m--;){if(Ja(a,c,d,C,U))if(Xa(a,c,d,x))Sn(a,c,d);else{var E=a,D=c,W=d,aA=E[D-2*W],k=E[D-W],Y=E[D+0],eA=E[D+W],dA=E[D+2*W],iA=27*(BA=vc[1020+3*(Y-k)+vc[1020+aA-eA]])+63>>7,gA=18*BA+63>>7,BA=9*BA+63>>7;E[D-3*W]=tr[255+E[D-3*W]+BA],E[D-2*W]=tr[255+aA+gA],E[D-W]=tr[255+k+iA],E[D+0]=tr[255+Y-iA],E[D+W]=tr[255+eA-gA],E[D+2*W]=tr[255+dA-BA]}c+=B}}function dn(a,c,d,B,m,C,U,x){for(C=2*C+1;0<m--;){if(Ja(a,c,d,C,U))if(Xa(a,c,d,x))Sn(a,c,d);else{var E=a,D=c,W=d,aA=E[D-W],k=E[D+0],Y=E[D+W],eA=wo[112+(4+(dA=3*(k-aA))>>3)],dA=wo[112+(dA+3>>3)],iA=eA+1>>1;E[D-2*W]=tr[255+E[D-2*W]+iA],E[D-W]=tr[255+aA+dA],E[D+0]=tr[255+k-eA],E[D+W]=tr[255+Y-iA]}c+=B}}function co(a,c,d,B,m,C){hn(a,c,d,1,16,B,m,C)}function uo(a,c,d,B,m,C){hn(a,c,1,d,16,B,m,C)}function fo(a,c,d,B,m,C){var U;for(U=3;0<U;--U)dn(a,c+=4*d,d,1,16,B,m,C)}function di(a,c,d,B,m,C){var U;for(U=3;0<U;--U)dn(a,c+=4,1,d,16,B,m,C)}function ho(a,c,d,B,m,C,U,x){hn(a,c,m,1,8,C,U,x),hn(d,B,m,1,8,C,U,x)}function h(a,c,d,B,m,C,U,x){hn(a,c,1,m,8,C,U,x),hn(d,B,1,m,8,C,U,x)}function v(a,c,d,B,m,C,U,x){dn(a,c+4*m,m,1,8,C,U,x),dn(d,B+4*m,m,1,8,C,U,x)}function N(a,c,d,B,m,C,U,x){dn(a,c+4,1,m,8,C,U,x),dn(d,B+4,1,m,8,C,U,x)}function V(){this.ba=new ue,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Qe,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function $(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function hA(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function vA(){this.ua=0,this.Wa=new WA,this.vb=new WA,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new sA,this.yc=new K}function kA(){this.xb=this.a=0,this.l=new zi,this.ca=new ue,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new T,this.Pb=0,this.wd=new T,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new vA,this.ab=0,this.gc=o(4,hA),this.Oc=0}function DA(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new zi,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Ae(a,c,d,B,m,C,U){for(a=a==null?0:a[c+0],c=0;c<U;++c)m[C+c]=a+d[B+c]&255,a=m[C+c]}function ne(a,c,d,B,m,C,U){var x;if(a==null)Ae(null,null,d,B,m,C,U);else for(x=0;x<U;++x)m[C+x]=a[c+x]+d[B+x]&255}function we(a,c,d,B,m,C,U){if(a==null)Ae(null,null,d,B,m,C,U);else{var x,E=a[c+0],D=E,W=E;for(x=0;x<U;++x)D=W+(E=a[c+x])-D,W=d[B+x]+(-256&D?0>D?0:255:D)&255,D=E,m[C+x]=W}}function ct(a,c,d,B){var m=c.width,C=c.o;if(e(a!=null&&c!=null),0>d||0>=B||d+B>C)return null;if(!a.Cc){if(a.ga==null){var U;if(a.ga=new DA,(U=a.ga==null)||(U=c.width*c.o,e(a.Gb.length==0),a.Gb=i(U),a.Uc=0,a.Gb==null?U=0:(a.mb=a.Gb,a.nb=a.Uc,a.rc=null,U=1),U=!U),!U){U=a.ga;var x=a.Fa,E=a.P,D=a.qc,W=a.mb,aA=a.nb,k=E+1,Y=D-1,eA=U.l;if(e(x!=null&&W!=null&&c!=null),Pn[0]=null,Pn[1]=Ae,Pn[2]=ne,Pn[3]=we,U.ca=W,U.tb=aA,U.c=c.width,U.i=c.height,e(0<U.c&&0<U.i),1>=D)c=0;else if(U.$a=3&x[E+0],U.Z=x[E+0]>>2&3,U.Lc=x[E+0]>>4&3,E=x[E+0]>>6&3,0>U.$a||1<U.$a||4<=U.Z||1<U.Lc||E)c=0;else if(eA.put=JA,eA.ac=Mr,eA.bc=on,eA.ma=U,eA.width=c.width,eA.height=c.height,eA.Da=c.Da,eA.v=c.v,eA.va=c.va,eA.j=c.j,eA.o=c.o,U.$a)A:{e(U.$a==1),c=ci();e:for(;;){if(c==null){c=0;break A}if(e(U!=null),U.mc=c,c.c=U.c,c.i=U.i,c.l=U.l,c.l.ma=U,c.l.width=U.c,c.l.height=U.i,c.a=0,uA(c.m,x,k,Y),!Kr(U.c,U.i,1,c,null)||(c.ab==1&&c.gc[0].hc==3&&Ur(c.s)?(U.ic=1,x=c.c*c.i,c.Ta=null,c.Ua=0,c.V=i(x),c.Ba=0,c.V==null?(c.a=1,c=0):c=1):(U.ic=0,c=ui(c,U.c)),!c))break e;c=1;break A}U.mc=null,c=0}else c=Y>=U.c*U.i;U=!c}if(U)return null;a.ga.Lc!=1?a.Ga=0:B=C-d}e(a.ga!=null),e(d+B<=C);A:{if(c=(x=a.ga).c,C=x.l.o,x.$a==0){if(k=a.rc,Y=a.Vc,eA=a.Fa,E=a.P+1+d*c,D=a.mb,W=a.nb+d*c,e(E<=a.P+a.qc),x.Z!=0)for(e(Pn[x.Z]!=null),U=0;U<B;++U)Pn[x.Z](k,Y,eA,E,D,W,c),k=D,Y=W,W+=c,E+=c;else for(U=0;U<B;++U)r(D,W,eA,E,c),k=D,Y=W,W+=c,E+=c;a.rc=k,a.Vc=Y}else{if(e(x.mc!=null),c=d+B,e((U=x.mc)!=null),e(c<=U.i),U.C>=c)c=1;else if(x.ic||We(),x.ic){x=U.V,k=U.Ba,Y=U.c;var dA=U.i,iA=(eA=1,E=U.$/Y,D=U.$%Y,W=U.m,aA=U.s,U.$),gA=Y*dA,BA=Y*c,FA=aA.wc,mA=iA<BA?Ft(aA,D,E):null;e(iA<=gA),e(c<=dA),e(Ur(aA));e:for(;;){for(;!W.h&&iA<BA;){if(D&FA||(mA=Ft(aA,D,E)),e(mA!=null),M(W),256>(dA=Je(mA.G[0],mA.H[0],W)))x[k+iA]=dA,++iA,++D>=Y&&(D=0,++E<=c&&!(E%16)&&_r(U,E));else{if(!(280>dA)){eA=0;break e}dA=hr(dA-256,W);var MA,IA=Je(mA.G[4],mA.H[4],W);if(M(W),!(iA>=(IA=dr(Y,IA=hr(IA,W)))&&gA-iA>=dA)){eA=0;break e}for(MA=0;MA<dA;++MA)x[k+iA+MA]=x[k+iA+MA-IA];for(iA+=dA,D+=dA;D>=Y;)D-=Y,++E<=c&&!(E%16)&&_r(U,E);iA<BA&&D&FA&&(mA=Ft(aA,D,E))}e(W.h==z(W))}_r(U,E>c?c:E);break e}!eA||W.h&&iA<gA?(eA=0,U.a=W.h?5:3):U.$=iA,c=eA}else c=xr(U,U.V,U.Ba,U.c,U.i,c,Gi);if(!c){B=0;break A}}d+B>=C&&(a.Cc=1),B=1}if(!B)return null;if(a.Cc&&((B=a.ga)!=null&&(B.mc=null),a.ga=null,0<a.Ga))return alert("todo:WebPDequantizeLevels"),null}return a.nb+d*m}function Ie(a,c,d,B,m,C){for(;0<m--;){var U,x=a,E=c+(d?1:0),D=a,W=c+(d?0:3);for(U=0;U<B;++U){var aA=D[W+4*U];aA!=255&&(aA*=32897,x[E+4*U+0]=x[E+4*U+0]*aA>>23,x[E+4*U+1]=x[E+4*U+1]*aA>>23,x[E+4*U+2]=x[E+4*U+2]*aA>>23)}c+=C}}function Ee(a,c,d,B,m){for(;0<B--;){var C;for(C=0;C<d;++C){var U=a[c+2*C+0],x=15&(D=a[c+2*C+1]),E=4369*x,D=(240&D|D>>4)*E>>16;a[c+2*C+0]=(240&U|U>>4)*E>>16&240|(15&U|U<<4)*E>>16>>4&15,a[c+2*C+1]=240&D|x}c+=m}}function Me(a,c,d,B,m,C,U,x){var E,D,W=255;for(D=0;D<m;++D){for(E=0;E<B;++E){var aA=a[c+E];C[U+4*E]=aA,W&=aA}c+=d,U+=x}return W!=255}function ze(a,c,d,B,m){var C;for(C=0;C<m;++C)d[B+C]=a[c+C]>>8}function We(){is=Ie,jf=Ee,Gf=Me,Vf=ze}function St(a,c,d){H[a]=function(B,m,C,U,x,E,D,W,aA,k,Y,eA,dA,iA,gA,BA,FA){var mA,MA=FA-1>>1,IA=x[E+0]|D[W+0]<<16,se=aA[k+0]|Y[eA+0]<<16;e(B!=null);var TA=3*IA+se+131074>>2;for(c(B[m+0],255&TA,TA>>16,dA,iA),C!=null&&(TA=3*se+IA+131074>>2,c(C[U+0],255&TA,TA>>16,gA,BA)),mA=1;mA<=MA;++mA){var Be=x[E+mA]|D[W+mA]<<16,dt=aA[k+mA]|Y[eA+mA]<<16,oe=IA+Be+se+dt+524296,OA=oe+2*(Be+se)>>3;TA=OA+IA>>1,IA=(oe=oe+2*(IA+dt)>>3)+Be>>1,c(B[m+2*mA-1],255&TA,TA>>16,dA,iA+(2*mA-1)*d),c(B[m+2*mA-0],255&IA,IA>>16,dA,iA+(2*mA-0)*d),C!=null&&(TA=oe+se>>1,IA=OA+dt>>1,c(C[U+2*mA-1],255&TA,TA>>16,gA,BA+(2*mA-1)*d),c(C[U+2*mA+0],255&IA,IA>>16,gA,BA+(2*mA+0)*d)),IA=Be,se=dt}1&FA||(TA=3*IA+se+131074>>2,c(B[m+FA-1],255&TA,TA>>16,dA,iA+(FA-1)*d),C!=null&&(TA=3*se+IA+131074>>2,c(C[U+FA-1],255&TA,TA>>16,gA,BA+(FA-1)*d)))}}function gn(){vr[vo]=pB,vr[mo]=th,vr[Yf]=wB,vr[Co]=rh,vr[bo]=nh,vr[mc]=ih,vr[Zf]=vB,vr[Cc]=th,vr[bc]=rh,vr[Fo]=nh,vr[Fc]=ih}function Za(a){return a&~mB?0>a?0:255:a>>ah}function gi(a,c){return Za((19077*a>>8)+(26149*c>>8)-14234)}function Bi(a,c,d){return Za((19077*a>>8)-(6419*c>>8)-(13320*d>>8)+8708)}function Hn(a,c){return Za((19077*a>>8)+(33050*c>>8)-17685)}function pi(a,c,d,B,m){B[m+0]=gi(a,d),B[m+1]=Bi(a,c,d),B[m+2]=Hn(a,c)}function ta(a,c,d,B,m){B[m+0]=Hn(a,c),B[m+1]=Bi(a,c,d),B[m+2]=gi(a,d)}function ra(a,c,d,B,m){var C=Bi(a,c,d);c=C<<3&224|Hn(a,c)>>3,B[m+0]=248&gi(a,d)|C>>5,B[m+1]=c}function Ht(a,c,d,B,m){var C=240&Hn(a,c)|15;B[m+0]=240&gi(a,d)|Bi(a,c,d)>>4,B[m+1]=C}function wi(a,c,d,B,m){B[m+0]=255,pi(a,c,d,B,m+1)}function vi(a,c,d,B,m){ta(a,c,d,B,m),B[m+3]=255}function $a(a,c,d,B,m){pi(a,c,d,B,m),B[m+3]=255}function zr(a,c,d){H[a]=function(B,m,C,U,x,E,D,W,aA){for(var k=W+(-2&aA)*d;W!=k;)c(B[m+0],C[U+0],x[E+0],D,W),c(B[m+1],C[U+0],x[E+0],D,W+d),m+=2,++U,++E,W+=2*d;1&aA&&c(B[m+0],C[U+0],x[E+0],D,W)}}function Kt(a,c,d){return d==0?a==0?c==0?6:5:c==0?4:0:d}function go(a,c,d,B,m){switch(a>>>30){case 3:Bn(c,d,B,m,0);break;case 2:Tn(c,d,B,m);break;case 1:Nt(c,d,B,m)}}function na(a,c){var d,B,m=c.M,C=c.Nb,U=a.oc,x=a.pc+40,E=a.oc,D=a.pc+584,W=a.oc,aA=a.pc+600;for(d=0;16>d;++d)U[x+32*d-1]=129;for(d=0;8>d;++d)E[D+32*d-1]=129,W[aA+32*d-1]=129;for(0<m?U[x-1-32]=E[D-1-32]=W[aA-1-32]=129:(n(U,x-32-1,127,21),n(E,D-32-1,127,9),n(W,aA-32-1,127,9)),B=0;B<a.za;++B){var k=c.ya[c.aa+B];if(0<B){for(d=-1;16>d;++d)r(U,x+32*d-4,U,x+32*d+12,4);for(d=-1;8>d;++d)r(E,D+32*d-4,E,D+32*d+4,4),r(W,aA+32*d-4,W,aA+32*d+4,4)}var Y=a.Gd,eA=a.Hd+B,dA=k.ad,iA=k.Hc;if(0<m&&(r(U,x-32,Y[eA].y,0,16),r(E,D-32,Y[eA].f,0,8),r(W,aA-32,Y[eA].ea,0,8)),k.Za){var gA=U,BA=x-32+16;for(0<m&&(B>=a.za-1?n(gA,BA,Y[eA].y[15],4):r(gA,BA,Y[eA+1].y,0,4)),d=0;4>d;d++)gA[BA+128+d]=gA[BA+256+d]=gA[BA+384+d]=gA[BA+0+d];for(d=0;16>d;++d,iA<<=2)gA=U,BA=x+oh[d],Lr[k.Ob[d]](gA,BA),go(iA,dA,16*+d,gA,BA)}else if(gA=Kt(B,m,k.Ob[0]),On[gA](U,x),iA!=0)for(d=0;16>d;++d,iA<<=2)go(iA,dA,16*+d,U,x+oh[d]);for(d=k.Gc,gA=Kt(B,m,k.Dd),wn[gA](E,D),wn[gA](W,aA),iA=dA,gA=E,BA=D,255&(k=0|d)&&(170&k?la(iA,256,gA,BA):Xr(iA,256,gA,BA)),k=W,iA=aA,255&(d>>=8)&&(170&d?la(dA,320,k,iA):Xr(dA,320,k,iA)),m<a.Ub-1&&(r(Y[eA].y,0,U,x+480,16),r(Y[eA].f,0,E,D+224,8),r(Y[eA].ea,0,W,aA+224,8)),d=8*C*a.B,Y=a.sa,eA=a.ta+16*B+16*C*a.R,dA=a.qa,k=a.ra+8*B+d,iA=a.Ha,gA=a.Ia+8*B+d,d=0;16>d;++d)r(Y,eA+d*a.R,U,x+32*d,16);for(d=0;8>d;++d)r(dA,k+d*a.B,E,D+32*d,8),r(iA,gA+d*a.B,W,aA+32*d,8)}}function Bo(a,c,d,B,m,C,U,x,E){var D=[0],W=[0],aA=0,k=E!=null?E.kd:0,Y=E??new $;if(a==null||12>d)return 7;Y.data=a,Y.w=c,Y.ha=d,c=[c],d=[d],Y.gb=[Y.gb];A:{var eA=c,dA=d,iA=Y.gb;if(e(a!=null),e(dA!=null),e(iA!=null),iA[0]=0,12<=dA[0]&&!t(a,eA[0],"RIFF")){if(t(a,eA[0]+8,"WEBP")){iA=3;break A}var gA=SA(a,eA[0]+4);if(12>gA||4294967286<gA){iA=3;break A}if(k&&gA>dA[0]-8){iA=7;break A}iA[0]=gA,eA[0]+=12,dA[0]-=12}iA=0}if(iA!=0)return iA;for(gA=0<Y.gb[0],d=d[0];;){A:{var BA=a;dA=c,iA=d;var FA=D,mA=W,MA=eA=[0];if((TA=aA=[aA])[0]=0,8>iA[0])iA=7;else{if(!t(BA,dA[0],"VP8X")){if(SA(BA,dA[0]+4)!=10){iA=3;break A}if(18>iA[0]){iA=7;break A}var IA=SA(BA,dA[0]+8),se=1+UA(BA,dA[0]+12);if(2147483648<=se*(BA=1+UA(BA,dA[0]+15))){iA=3;break A}MA!=null&&(MA[0]=IA),FA!=null&&(FA[0]=se),mA!=null&&(mA[0]=BA),dA[0]+=18,iA[0]-=18,TA[0]=1}iA=0}}if(aA=aA[0],eA=eA[0],iA!=0)return iA;if(dA=!!(2&eA),!gA&&aA)return 3;if(C!=null&&(C[0]=!!(16&eA)),U!=null&&(U[0]=dA),x!=null&&(x[0]=0),U=D[0],eA=W[0],aA&&dA&&E==null){iA=0;break}if(4>d){iA=7;break}if(gA&&aA||!gA&&!aA&&!t(a,c[0],"ALPH")){d=[d],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];A:{IA=a,iA=c,gA=d;var TA=Y.gb;FA=Y.na,mA=Y.P,MA=Y.Sa,se=22,e(IA!=null),e(gA!=null),BA=iA[0];var Be=gA[0];for(e(FA!=null),e(MA!=null),FA[0]=null,mA[0]=null,MA[0]=0;;){if(iA[0]=BA,gA[0]=Be,8>Be){iA=7;break A}var dt=SA(IA,BA+4);if(4294967286<dt){iA=3;break A}var oe=8+dt+1&-2;if(se+=oe,0<TA&&se>TA){iA=3;break A}if(!t(IA,BA,"VP8 ")||!t(IA,BA,"VP8L")){iA=0;break A}if(Be[0]<oe){iA=7;break A}t(IA,BA,"ALPH")||(FA[0]=IA,mA[0]=BA+8,MA[0]=dt),BA+=oe,Be-=oe}}if(d=d[0],Y.na=Y.na[0],Y.P=Y.P[0],Y.Sa=Y.Sa[0],iA!=0)break}d=[d],Y.Ja=[Y.Ja],Y.xa=[Y.xa];A:if(TA=a,iA=c,gA=d,FA=Y.gb[0],mA=Y.Ja,MA=Y.xa,IA=iA[0],BA=!t(TA,IA,"VP8 "),se=!t(TA,IA,"VP8L"),e(TA!=null),e(gA!=null),e(mA!=null),e(MA!=null),8>gA[0])iA=7;else{if(BA||se){if(TA=SA(TA,IA+4),12<=FA&&TA>FA-12){iA=3;break A}if(k&&TA>gA[0]-8){iA=7;break A}mA[0]=TA,iA[0]+=8,gA[0]-=8,MA[0]=se}else MA[0]=5<=gA[0]&&TA[IA+0]==47&&!(TA[IA+4]>>5),mA[0]=gA[0];iA=0}if(d=d[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],c=c[0],iA!=0)break;if(4294967286<Y.Ja)return 3;if(x==null||dA||(x[0]=Y.xa?2:1),U=[U],eA=[eA],Y.xa){if(5>d){iA=7;break}x=U,k=eA,dA=C,a==null||5>d?a=0:5<=d&&a[c+0]==47&&!(a[c+4]>>5)?(gA=[0],TA=[0],FA=[0],uA(mA=new T,a,c,d),ln(mA,gA,TA,FA)?(x!=null&&(x[0]=gA[0]),k!=null&&(k[0]=TA[0]),dA!=null&&(dA[0]=FA[0]),a=1):a=0):a=0}else{if(10>d){iA=7;break}x=eA,a==null||10>d||!io(a,c+3,d-3)?a=0:(k=a[c+0]|a[c+1]<<8|a[c+2]<<16,dA=16383&(a[c+7]<<8|a[c+6]),a=16383&(a[c+9]<<8|a[c+8]),1&k||3<(k>>1&7)||!(k>>4&1)||k>>5>=Y.Ja||!dA||!a?a=0:(U&&(U[0]=dA),x&&(x[0]=a),a=1))}if(!a||(U=U[0],eA=eA[0],aA&&(D[0]!=U||W[0]!=eA)))return 3;E!=null&&(E[0]=Y,E.offset=c-E.w,e(4294967286>c-E.w),e(E.offset==E.ha-d));break}return iA==0||iA==7&&aA&&E==null?(C!=null&&(C[0]|=Y.na!=null&&0<Y.na.length),B!=null&&(B[0]=U),m!=null&&(m[0]=eA),0):iA}function pr(a,c,d){var B=c.width,m=c.height,C=0,U=0,x=B,E=m;if(c.Da=a!=null&&0<a.Da,c.Da&&(x=a.cd,E=a.bd,C=a.v,U=a.j,11>d||(C&=-2,U&=-2),0>C||0>U||0>=x||0>=E||C+x>B||U+E>m))return 0;if(c.v=C,c.j=U,c.va=C+x,c.o=U+E,c.U=x,c.T=E,c.da=a!=null&&0<a.da,c.da){if(!jA(x,E,d=[a.ib],C=[a.hb]))return 0;c.ib=d[0],c.hb=C[0]}return c.ob=a!=null&&a.ob,c.Kb=a==null||!a.Sd,c.da&&(c.ob=c.ib<3*B/4&&c.hb<3*m/4,c.Kb=0),1}function mi(a){if(a==null)return 2;if(11>a.S){var c=a.f.RGBA;c.fb+=(a.height-1)*c.A,c.A=-c.A}else c=a.f.kb,a=a.height,c.O+=(a-1)*c.fa,c.fa=-c.fa,c.N+=(a-1>>1)*c.Ab,c.Ab=-c.Ab,c.W+=(a-1>>1)*c.Db,c.Db=-c.Db,c.F!=null&&(c.J+=(a-1)*c.lb,c.lb=-c.lb);return 0}function As(a,c,d,B){if(B==null||0>=a||0>=c)return 2;if(d!=null){if(d.Da){var m=d.cd,C=d.bd,U=-2&d.v,x=-2&d.j;if(0>U||0>x||0>=m||0>=C||U+m>a||x+C>c)return 2;a=m,c=C}if(d.da){if(!jA(a,c,m=[d.ib],C=[d.hb]))return 2;a=m[0],c=C[0]}}B.width=a,B.height=c;A:{var E=B.width,D=B.height;if(a=B.S,0>=E||0>=D||!(a>=vo&&13>a))a=2;else{if(0>=B.Rd&&B.sd==null){U=C=m=c=0;var W=(x=E*lh[a])*D;if(11>a||(C=(D+1)/2*(c=(E+1)/2),a==12&&(U=(m=E)*D)),(D=i(W+2*C+U))==null){a=1;break A}B.sd=D,11>a?((E=B.f.RGBA).eb=D,E.fb=0,E.A=x,E.size=W):((E=B.f.kb).y=D,E.O=0,E.fa=x,E.Fd=W,E.f=D,E.N=0+W,E.Ab=c,E.Cd=C,E.ea=D,E.W=0+W+C,E.Db=c,E.Ed=C,a==12&&(E.F=D,E.J=0+W+2*C),E.Tc=U,E.lb=m)}if(c=1,m=B.S,C=B.width,U=B.height,m>=vo&&13>m)if(11>m)a=B.f.RGBA,c&=(x=Math.abs(a.A))*(U-1)+C<=a.size,c&=x>=C*lh[m],c&=a.eb!=null;else{a=B.f.kb,x=(C+1)/2,W=(U+1)/2,E=Math.abs(a.fa),D=Math.abs(a.Ab);var aA=Math.abs(a.Db),k=Math.abs(a.lb),Y=k*(U-1)+C;c&=E*(U-1)+C<=a.Fd,c&=D*(W-1)+x<=a.Cd,c=(c&=aA*(W-1)+x<=a.Ed)&E>=C&D>=x&aA>=x,c&=a.y!=null,c&=a.f!=null,c&=a.ea!=null,m==12&&(c&=k>=C,c&=Y<=a.Tc,c&=a.F!=null)}else c=0;a=c?0:2}}return a!=0||d!=null&&d.fd&&(a=mi(B)),a}var ia=64,Ci=[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],es=24,jt=32,Xt=8,aa=[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];HA("Predictor0","PredictorAdd0"),H.Predictor0=function(){return 4278190080},H.Predictor1=function(a){return a},H.Predictor2=function(a,c,d){return c[d+0]},H.Predictor3=function(a,c,d){return c[d+1]},H.Predictor4=function(a,c,d){return c[d-1]},H.Predictor5=function(a,c,d){return GA(GA(a,c[d+1]),c[d+0])},H.Predictor6=function(a,c,d){return GA(a,c[d-1])},H.Predictor7=function(a,c,d){return GA(a,c[d+0])},H.Predictor8=function(a,c,d){return GA(c[d-1],c[d+0])},H.Predictor9=function(a,c,d){return GA(c[d+0],c[d+1])},H.Predictor10=function(a,c,d){return GA(GA(a,c[d-1]),GA(c[d+0],c[d+1]))},H.Predictor11=function(a,c,d){var B=c[d+0];return 0>=te(B>>24&255,a>>24&255,(c=c[d-1])>>24&255)+te(B>>16&255,a>>16&255,c>>16&255)+te(B>>8&255,a>>8&255,c>>8&255)+te(255&B,255&a,255&c)?B:a},H.Predictor12=function(a,c,d){var B=c[d+0];return(Fe((a>>24&255)+(B>>24&255)-((c=c[d-1])>>24&255))<<24|Fe((a>>16&255)+(B>>16&255)-(c>>16&255))<<16|Fe((a>>8&255)+(B>>8&255)-(c>>8&255))<<8|Fe((255&a)+(255&B)-(255&c)))>>>0},H.Predictor13=function(a,c,d){var B=c[d-1];return(fe((a=GA(a,c[d+0]))>>24&255,B>>24&255)<<24|fe(a>>16&255,B>>16&255)<<16|fe(a>>8&255,B>>8&255)<<8|fe(255&a,255&B))>>>0};var Nn=H.PredictorAdd0;H.PredictorAdd1=ge,HA("Predictor2","PredictorAdd2"),HA("Predictor3","PredictorAdd3"),HA("Predictor4","PredictorAdd4"),HA("Predictor5","PredictorAdd5"),HA("Predictor6","PredictorAdd6"),HA("Predictor7","PredictorAdd7"),HA("Predictor8","PredictorAdd8"),HA("Predictor9","PredictorAdd9"),HA("Predictor10","PredictorAdd10"),HA("Predictor11","PredictorAdd11"),HA("Predictor12","PredictorAdd12"),HA("Predictor13","PredictorAdd13");var Dn=H.PredictorAdd2;RA("ColorIndexInverseTransform","MapARGB","32b",function(a){return a>>8&255},function(a){return a}),RA("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(a){return a},function(a){return a>>8&255});var sa,bi=H.ColorIndexInverseTransform,ut=H.MapARGB,wc=H.VP8LColorIndexInverseTransformAlpha,Wr=H.MapAlpha,Er=H.VP8LPredictorsAdd=[];Er.length=16,(H.VP8LPredictors=[]).length=16,(H.VP8LPredictorsAdd_C=[]).length=16,(H.VP8LPredictors_C=[]).length=16;var Fi,ts,rs,oa,Qi,yi,kn,Bn,Tn,la,Nt,Xr,ke,Te,et,ht,pn,ns,ca,po,Pf,Mf,Rf,Kf,is,jf,Gf,Vf,qf=i(511),zf=i(2041),Wf=i(225),Xf=i(767),Jf=0,vc=zf,wo=Wf,tr=Xf,wr=qf,vo=0,mo=1,Yf=2,Co=3,bo=4,mc=5,Zf=6,Cc=7,bc=8,Fo=9,Fc=10,rB=[2,3,7],nB=[3,3,11],$f=[280,256,256,256,40],iB=[0,1,1,1,0],aB=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],sB=[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],oB=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],lB=8,Qc=[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],yc=[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],as=null,cB=[[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]],uB=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Ah=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],fB=[[[[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]]]],hB=[[[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]]],dB=[[[[255,255,255,255,255,255,255,255,255,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]]]],gB=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],On=[],Lr=[],wn=[],BB=1,eh=2,Pn=[],vr=[];St("UpsampleRgbLinePair",pi,3),St("UpsampleBgrLinePair",ta,3),St("UpsampleRgbaLinePair",$a,4),St("UpsampleBgraLinePair",vi,4),St("UpsampleArgbLinePair",wi,4),St("UpsampleRgba4444LinePair",Ht,2),St("UpsampleRgb565LinePair",ra,2);var pB=H.UpsampleRgbLinePair,wB=H.UpsampleBgrLinePair,th=H.UpsampleRgbaLinePair,rh=H.UpsampleBgraLinePair,nh=H.UpsampleArgbLinePair,ih=H.UpsampleRgba4444LinePair,vB=H.UpsampleRgb565LinePair,Qo=16,yo=1<<Qo-1,ss=-227,Uc=482,ah=6,mB=(256<<ah)-1,sh=0,CB=i(256),bB=i(256),FB=i(256),QB=i(256),yB=i(Uc-ss),UB=i(Uc-ss);zr("YuvToRgbRow",pi,3),zr("YuvToBgrRow",ta,3),zr("YuvToRgbaRow",$a,4),zr("YuvToBgraRow",vi,4),zr("YuvToArgbRow",wi,4),zr("YuvToRgba4444Row",Ht,2),zr("YuvToRgb565Row",ra,2);var oh=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Uo=[0,2,8],_B=[8,7,6,4,4,2,2,2,1,1,1,1],xB=1;this.WebPDecodeRGBA=function(a,c,d,B,m){var C=mo,U=new V,x=new ue;U.ba=x,x.S=C,x.width=[x.width],x.height=[x.height];var E=x.width,D=x.height,W=new XA;if(W==null||a==null)var aA=2;else e(W!=null),aA=Bo(a,c,d,W.width,W.height,W.Pd,W.Qd,W.format,null);if(aA!=0?E=0:(E!=null&&(E[0]=W.width[0]),D!=null&&(D[0]=W.height[0]),E=1),E){x.width=x.width[0],x.height=x.height[0],B!=null&&(B[0]=x.width),m!=null&&(m[0]=x.height);A:{if(B=new zi,(m=new $).data=a,m.w=c,m.ha=d,m.kd=1,c=[0],e(m!=null),((a=Bo(m.data,m.w,m.ha,null,null,null,c,null,m))==0||a==7)&&c[0]&&(a=4),(c=a)==0){if(e(U!=null),B.data=m.data,B.w=m.w+m.offset,B.ha=m.ha-m.offset,B.put=JA,B.ac=Mr,B.bc=on,B.ma=U,m.xa){if((a=ci())==null){U=1;break A}if(function(k,Y){var eA=[0],dA=[0],iA=[0];e:for(;;){if(k==null)return 0;if(Y==null)return k.a=2,0;if(k.l=Y,k.a=0,uA(k.m,Y.data,Y.w,Y.ha),!ln(k.m,eA,dA,iA)){k.a=3;break e}if(k.xb=eh,Y.width=eA[0],Y.height=dA[0],!Kr(eA[0],dA[0],1,k,null))break e;return 1}return e(k.a!=0),0}(a,B)){if(B=(c=As(B.width,B.height,U.Oa,U.ba))==0){e:{B=a;t:for(;;){if(B==null){B=0;break e}if(e(B.s.yc!=null),e(B.s.Ya!=null),e(0<B.s.Wb),e((d=B.l)!=null),e((m=d.ma)!=null),B.xb!=0){if(B.ca=m.ba,B.tb=m.tb,e(B.ca!=null),!pr(m.Oa,d,Co)){B.a=2;break t}if(!ui(B,d.width)||d.da)break t;if((d.da||YA(B.ca.S))&&We(),11>B.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),B.ca.f.kb.F!=null&&We()),B.Pb&&0<B.s.ua&&B.s.vb.X==null&&!L(B.s.vb,B.s.Wa.Xa)){B.a=1;break t}B.xb=0}if(!xr(B,B.V,B.Ba,B.c,B.i,d.o,En))break t;m.Dc=B.Ma,B=1;break e}e(B.a!=0),B=0}B=!B}B&&(c=a.a)}else c=a.a}else{if((a=new ec)==null){U=1;break A}if(a.Fa=m.na,a.P=m.P,a.qc=m.Sa,Gr(a,B)){if((c=As(B.width,B.height,U.Oa,U.ba))==0){if(a.Aa=0,d=U.Oa,e((m=a)!=null),d!=null){if(0<(E=0>(E=d.Md)?0:100<E?255:255*E/100)){for(D=W=0;4>D;++D)12>(aA=m.pb[D]).lc&&(aA.ia=E*_B[0>aA.lc?0:aA.lc]>>3),W|=aA.ia;W&&(alert("todo:VP8InitRandom"),m.ia=1)}m.Ga=d.Id,100<m.Ga?m.Ga=100:0>m.Ga&&(m.Ga=0)}(function(k,Y){if(k==null)return 0;if(Y==null)return lt(k,2,"NULL VP8Io parameter in VP8Decode().");if(!k.cb&&!Gr(k,Y))return 0;if(e(k.cb),Y.ac==null||Y.ac(Y)){Y.ob&&(k.L=0);var eA=Uo[k.L];if(k.L==2?(k.yb=0,k.zb=0):(k.yb=Y.v-eA>>4,k.zb=Y.j-eA>>4,0>k.yb&&(k.yb=0),0>k.zb&&(k.zb=0)),k.Va=Y.o+15+eA>>4,k.Hb=Y.va+15+eA>>4,k.Hb>k.za&&(k.Hb=k.za),k.Va>k.Ub&&(k.Va=k.Ub),0<k.L){var dA=k.ed;for(eA=0;4>eA;++eA){var iA;if(k.Qa.Cb){var gA=k.Qa.Lb[eA];k.Qa.Fb||(gA+=dA.Tb)}else gA=dA.Tb;for(iA=0;1>=iA;++iA){var BA=k.gd[eA][iA],FA=gA;if(dA.Pc&&(FA+=dA.vd[0],iA&&(FA+=dA.od[0])),0<(FA=0>FA?0:63<FA?63:FA)){var mA=FA;0<dA.wb&&(mA=4<dA.wb?mA>>2:mA>>1)>9-dA.wb&&(mA=9-dA.wb),1>mA&&(mA=1),BA.dd=mA,BA.tc=2*FA+mA,BA.ld=40<=FA?2:15<=FA?1:0}else BA.tc=0;BA.La=iA}}}eA=0}else lt(k,6,"Frame setup failed"),eA=k.a;if(eA=eA==0){if(eA){k.$c=0,0<k.Aa||(k.Ic=xB);e:{eA=k.Ic,dA=4*(mA=k.za);var MA=32*mA,IA=mA+1,se=0<k.L?mA*(0<k.Aa?2:1):0,TA=(k.Aa==2?2:1)*mA;if((BA=dA+832+(iA=3*(16*eA+Uo[k.L])/2*MA)+(gA=k.Fa!=null&&0<k.Fa.length?k.Kc.c*k.Kc.i:0))!=BA)eA=0;else{if(BA>k.Vb){if(k.Vb=0,k.Ec=i(BA),k.Fc=0,k.Ec==null){eA=lt(k,1,"no memory during frame initialization.");break e}k.Vb=BA}BA=k.Ec,FA=k.Fc,k.Ac=BA,k.Bc=FA,FA+=dA,k.Gd=o(MA,ro),k.Hd=0,k.rb=o(IA+1,ja),k.sb=1,k.wa=se?o(se,Br):null,k.Y=0,k.D.Nb=0,k.D.wa=k.wa,k.D.Y=k.Y,0<k.Aa&&(k.D.Y+=mA),e(!0),k.oc=BA,k.pc=FA,FA+=832,k.ya=o(TA,Ga),k.aa=0,k.D.ya=k.ya,k.D.aa=k.aa,k.Aa==2&&(k.D.aa+=mA),k.R=16*mA,k.B=8*mA,mA=(MA=Uo[k.L])*k.R,MA=MA/2*k.B,k.sa=BA,k.ta=FA+mA,k.qa=k.sa,k.ra=k.ta+16*eA*k.R+MA,k.Ha=k.qa,k.Ia=k.ra+8*eA*k.B+MA,k.$c=0,FA+=iA,k.mb=gA?BA:null,k.nb=gA?FA:null,e(FA+gA<=k.Fc+k.Vb),Va(k),n(k.Ac,k.Bc,0,dA),eA=1}}if(eA){if(Y.ka=0,Y.y=k.sa,Y.O=k.ta,Y.f=k.qa,Y.N=k.ra,Y.ea=k.Ha,Y.Vd=k.Ia,Y.fa=k.R,Y.Rc=k.B,Y.F=null,Y.J=0,!Jf){for(eA=-255;255>=eA;++eA)qf[255+eA]=0>eA?-eA:eA;for(eA=-1020;1020>=eA;++eA)zf[1020+eA]=-128>eA?-128:127<eA?127:eA;for(eA=-112;112>=eA;++eA)Wf[112+eA]=-16>eA?-16:15<eA?15:eA;for(eA=-255;510>=eA;++eA)Xf[255+eA]=0>eA?0:255<eA?255:eA;Jf=1}kn=so,Bn=tc,la=rc,Nt=nc,Xr=Vr,Tn=ao,ke=co,Te=uo,et=ho,ht=h,pn=fo,ns=di,ca=v,po=N,Pf=Aa,Mf=Ya,Rf=ea,Kf=lo,Lr[0]=uc,Lr[1]=Yi,Lr[2]=lc,Lr[3]=cc,Lr[4]=fc,Lr[5]=un,Lr[6]=hc,Lr[7]=fn,Lr[8]=gc,Lr[9]=dc,On[0]=oo,On[1]=ic,On[2]=ac,On[3]=sc,On[4]=In,On[5]=oc,On[6]=fi,wn[0]=Bc,wn[1]=qa,wn[2]=Zi,wn[3]=za,wn[4]=pc,wn[5]=$i,wn[6]=Wa,eA=1}else eA=0}eA&&(eA=function(Be,dt){for(Be.M=0;Be.M<Be.Va;++Be.M){var oe,OA=Be.Jc[Be.M&Be.Xb],_A=Be.m,tt=Be;for(oe=0;oe<tt.za;++oe){var ie=_A,ve=tt,Re=ve.Ac,yt=ve.Bc+4*oe,Gt=ve.zc,Ye=ve.ya[ve.aa+oe];if(ve.Qa.Bb?Ye.$b=fA(ie,ve.Pa.jb[0])?2+fA(ie,ve.Pa.jb[2]):fA(ie,ve.Pa.jb[1]):Ye.$b=0,ve.kc&&(Ye.Ad=fA(ie,ve.Bd)),Ye.Za=!fA(ie,145)+0,Ye.Za){var Dt=Ye.Ob,Vt=0;for(ve=0;4>ve;++ve){var gt,Ce=Gt[0+ve];for(gt=0;4>gt;++gt){Ce=hB[Re[yt+gt]][Ce];for(var Ue=Ah[fA(ie,Ce[0])];0<Ue;)Ue=Ah[2*Ue+fA(ie,Ce[Ue])];Ce=-Ue,Re[yt+gt]=Ce}r(Dt,Vt,Re,yt,4),Vt+=4,Gt[0+ve]=Ce}}else Ce=fA(ie,156)?fA(ie,128)?1:3:fA(ie,163)?2:0,Ye.Ob[0]=Ce,n(Re,yt,Ce,4),n(Gt,0,Ce,4);Ye.Dd=fA(ie,142)?fA(ie,114)?fA(ie,183)?1:3:2:0}if(tt.m.Ka)return lt(Be,7,"Premature end-of-partition0 encountered.");for(;Be.ja<Be.za;++Be.ja){if(tt=OA,ie=(_A=Be).rb[_A.sb-1],Re=_A.rb[_A.sb+_A.ja],oe=_A.ya[_A.aa+_A.ja],yt=_A.kc?oe.Ad:0)ie.la=Re.la=0,oe.Za||(ie.Na=Re.Na=0),oe.Hc=0,oe.Gc=0,oe.ia=0;else{var Ze,_e;if(ie=Re,Re=tt,yt=_A.Pa.Xc,Gt=_A.ya[_A.aa+_A.ja],Ye=_A.pb[Gt.$b],ve=Gt.ad,Dt=0,Vt=_A.rb[_A.sb-1],Ce=gt=0,n(ve,Dt,0,384),Gt.Za)var Ut=0,Ir=yt[3];else{Ue=i(16);var rt=ie.Na+Vt.Na;if(rt=as(Re,yt[1],rt,Ye.Eb,0,Ue,0),ie.Na=Vt.Na=(0<rt)+0,1<rt)kn(Ue,0,ve,Dt);else{var Jt=Ue[0]+3>>3;for(Ue=0;256>Ue;Ue+=16)ve[Dt+Ue]=Jt}Ut=1,Ir=yt[0]}var Se=15&ie.la,Bt=15&Vt.la;for(Ue=0;4>Ue;++Ue){var rr=1&Bt;for(Jt=_e=0;4>Jt;++Jt)Se=Se>>1|(rr=(rt=as(Re,Ir,rt=rr+(1&Se),Ye.Sc,Ut,ve,Dt))>Ut)<<7,_e=_e<<2|(3<rt?3:1<rt?2:ve[Dt+0]!=0),Dt+=16;Se>>=4,Bt=Bt>>1|rr<<7,gt=(gt<<8|_e)>>>0}for(Ir=Se,Ut=Bt>>4,Ze=0;4>Ze;Ze+=2){for(_e=0,Se=ie.la>>4+Ze,Bt=Vt.la>>4+Ze,Ue=0;2>Ue;++Ue){for(rr=1&Bt,Jt=0;2>Jt;++Jt)rt=rr+(1&Se),Se=Se>>1|(rr=0<(rt=as(Re,yt[2],rt,Ye.Qc,0,ve,Dt)))<<3,_e=_e<<2|(3<rt?3:1<rt?2:ve[Dt+0]!=0),Dt+=16;Se>>=2,Bt=Bt>>1|rr<<5}Ce|=_e<<4*Ze,Ir|=Se<<4<<Ze,Ut|=(240&Bt)<<Ze}ie.la=Ir,Vt.la=Ut,Gt.Hc=gt,Gt.Gc=Ce,Gt.ia=43690&Ce?0:Ye.ia,yt=!(gt|Ce)}if(0<_A.L&&(_A.wa[_A.Y+_A.ja]=_A.gd[oe.$b][oe.Za],_A.wa[_A.Y+_A.ja].La|=!yt),tt.Ka)return lt(Be,7,"Premature end-of-file encountered.")}if(Va(Be),_A=dt,tt=1,oe=(OA=Be).D,ie=0<OA.L&&OA.M>=OA.zb&&OA.M<=OA.Va,OA.Aa==0)e:{if(oe.M=OA.M,oe.uc=ie,na(OA,oe),tt=1,oe=(_e=OA.D).Nb,ie=(Ce=Uo[OA.L])*OA.R,Re=Ce/2*OA.B,Ue=16*oe*OA.R,Jt=8*oe*OA.B,yt=OA.sa,Gt=OA.ta-ie+Ue,Ye=OA.qa,ve=OA.ra-Re+Jt,Dt=OA.Ha,Vt=OA.Ia-Re+Jt,Bt=(Se=_e.M)==0,gt=Se>=OA.Va-1,OA.Aa==2&&na(OA,_e),_e.uc)for(rr=(rt=OA).D.M,e(rt.D.uc),_e=rt.yb;_e<rt.Hb;++_e){Ut=_e,Ir=rr;var qt=(nr=(_t=rt).D).Nb;Ze=_t.R;var nr=nr.wa[nr.Y+Ut],ir=_t.sa,Yt=_t.ta+16*qt*Ze+16*Ut,ar=nr.dd,Oe=nr.tc;if(Oe!=0)if(e(3<=Oe),_t.L==1)0<Ut&&Mf(ir,Yt,Ze,Oe+4),nr.La&&Kf(ir,Yt,Ze,Oe),0<Ir&&Pf(ir,Yt,Ze,Oe+4),nr.La&&Rf(ir,Yt,Ze,Oe);else{var sr=_t.B,Sr=_t.qa,Ui=_t.ra+8*qt*sr+8*Ut,vn=_t.Ha,_t=_t.Ia+8*qt*sr+8*Ut;qt=nr.ld,0<Ut&&(Te(ir,Yt,Ze,Oe+4,ar,qt),ht(Sr,Ui,vn,_t,sr,Oe+4,ar,qt)),nr.La&&(ns(ir,Yt,Ze,Oe,ar,qt),po(Sr,Ui,vn,_t,sr,Oe,ar,qt)),0<Ir&&(ke(ir,Yt,Ze,Oe+4,ar,qt),et(Sr,Ui,vn,_t,sr,Oe+4,ar,qt)),nr.La&&(pn(ir,Yt,Ze,Oe,ar,qt),ca(Sr,Ui,vn,_t,sr,Oe,ar,qt))}}if(OA.ia&&alert("todo:DitherRow"),_A.put!=null){if(_e=16*Se,Se=16*(Se+1),Bt?(_A.y=OA.sa,_A.O=OA.ta+Ue,_A.f=OA.qa,_A.N=OA.ra+Jt,_A.ea=OA.Ha,_A.W=OA.Ia+Jt):(_e-=Ce,_A.y=yt,_A.O=Gt,_A.f=Ye,_A.N=ve,_A.ea=Dt,_A.W=Vt),gt||(Se-=Ce),Se>_A.o&&(Se=_A.o),_A.F=null,_A.J=null,OA.Fa!=null&&0<OA.Fa.length&&_e<Se&&(_A.J=ct(OA,_A,_e,Se-_e),_A.F=OA.mb,_A.F==null&&_A.F.length==0)){tt=lt(OA,3,"Could not decode alpha data.");break e}_e<_A.j&&(Ce=_A.j-_e,_e=_A.j,e(!(1&Ce)),_A.O+=OA.R*Ce,_A.N+=OA.B*(Ce>>1),_A.W+=OA.B*(Ce>>1),_A.F!=null&&(_A.J+=_A.width*Ce)),_e<Se&&(_A.O+=_A.v,_A.N+=_A.v>>1,_A.W+=_A.v>>1,_A.F!=null&&(_A.J+=_A.v),_A.ka=_e-_A.j,_A.U=_A.va-_A.v,_A.T=Se-_e,tt=_A.put(_A))}oe+1!=OA.Ic||gt||(r(OA.sa,OA.ta-ie,yt,Gt+16*OA.R,ie),r(OA.qa,OA.ra-Re,Ye,ve+8*OA.B,Re),r(OA.Ha,OA.Ia-Re,Dt,Vt+8*OA.B,Re))}if(!tt)return lt(Be,6,"Output aborted.")}return 1}(k,Y)),Y.bc!=null&&Y.bc(Y),eA&=1}return eA?(k.cb=0,eA):0})(a,B)||(c=a.a)}}else c=a.a}c==0&&U.Oa!=null&&U.Oa.fd&&(c=mi(U.ba))}U=c}C=U!=0?null:11>C?x.f.RGBA.eb:x.f.kb.y}else C=null;return C};var lh=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(H,AA){for(var _="",I=0;I<4;I++)_+=String.fromCharCode(H[AA++]);return _}function f(H,AA){return H[AA+0]|H[AA+1]<<8}function p(H,AA){return(H[AA+0]|H[AA+1]<<8|H[AA+2]<<16)>>>0}function w(H,AA){return(H[AA+0]|H[AA+1]<<8|H[AA+2]<<16|H[AA+3]<<24)>>>0}new l;var g=[0],F=[0],y=[],S=new l,b=A,P=function(H,AA){var _={},I=0,K=!1,j=0,sA=0;if(_.frames=[],!function(Q,T){for(var R=0;R<4;R++)if(Q[T+R]!="RIFF".charCodeAt(R))return!0;return!1}(H,AA)){for(w(H,AA+=4),AA+=8;AA<H.length;){var lA=u(H,AA),cA=w(H,AA+=4);AA+=4;var tA=cA+(1&cA);switch(lA){case"VP8 ":case"VP8L":_.frames[I]===void 0&&(_.frames[I]={}),(pA=_.frames[I]).src_off=K?sA:AA-8,pA.src_size=j+cA+8,I++,K&&(K=!1,j=0,sA=0);break;case"VP8X":(pA=_.header={}).feature_flags=H[AA];var uA=AA+4;pA.canvas_width=1+p(H,uA),uA+=3,pA.canvas_height=1+p(H,uA),uA+=3;break;case"ALPH":K=!0,j=tA+8,sA=AA-8;break;case"ANIM":(pA=_.header).bgcolor=w(H,AA),uA=AA+4,pA.loop_count=f(H,uA),uA+=2;break;case"ANMF":var QA,pA;(pA=_.frames[I]={}).offset_x=2*p(H,AA),AA+=3,pA.offset_y=2*p(H,AA),AA+=3,pA.width=1+p(H,AA),AA+=3,pA.height=1+p(H,AA),AA+=3,pA.duration=p(H,AA),AA+=3,QA=H[AA++],pA.dispose=1&QA,pA.blend=QA>>1&1}lA!="ANMF"&&(AA+=tA)}return _}}(b,0);P.response=b,P.rgbaoutput=!0,P.dataurl=!1;var G=P.header?P.header:null,O=P.frames?P.frames:null;if(G){G.loop_counter=G.loop_count,g=[G.canvas_height],F=[G.canvas_width];for(var J=0;J<O.length&&O[J].blend!=0;J++);}var Z=O[0],nA=S.WebPDecodeRGBA(b,Z.src_off,Z.src_size,F,g);Z.rgba=nA,Z.imgwidth=F[0],Z.imgheight=g[0];for(var q=0;q<F[0]*g[0]*4;q++)y[q]=nA[q];return this.width=F,this.height=g,this.data=y,this}/** ====================================================================
 * @license
 * jsPDF XMP metadata plugin
 * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * ====================================================================
 */function uF(){var A,e=this.internal.__metadata__.metadata,t=unescape(encodeURIComponent(e));A=this.internal.__metadata__.rawXml?t:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+A.length+" >>"),this.internal.write("stream"),this.internal.write(A),this.internal.write("endstream"),this.internal.write("endobj")}function fF(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(A){var e,t,r,n,i,o,s,l,u,f=function(Q){return Q=Q||{},this.isStrokeTransparent=Q.isStrokeTransparent||!1,this.strokeOpacity=Q.strokeOpacity||1,this.strokeStyle=Q.strokeStyle||"#000000",this.fillStyle=Q.fillStyle||"#000000",this.isFillTransparent=Q.isFillTransparent||!1,this.fillOpacity=Q.fillOpacity||1,this.font=Q.font||"10px sans-serif",this.textBaseline=Q.textBaseline||"alphabetic",this.textAlign=Q.textAlign||"left",this.lineWidth=Q.lineWidth||1,this.lineJoin=Q.lineJoin||"miter",this.lineCap=Q.lineCap||"butt",this.path=Q.path||[],this.transform=Q.transform!==void 0?Q.transform.clone():new l,this.globalCompositeOperation=Q.globalCompositeOperation||"normal",this.globalAlpha=Q.globalAlpha||1,this.clip_path=Q.clip_path||[],this.currentPoint=Q.currentPoint||new o,this.miterLimit=Q.miterLimit||10,this.lastPoint=Q.lastPoint||new o,this.lineDashOffset=Q.lineDashOffset||0,this.lineDash=Q.lineDash||[],this.margin=Q.margin||[0,0,0,0],this.prevPageLastElemOffset=Q.prevPageLastElemOffset||0,this.ignoreClearRect=typeof Q.ignoreClearRect!="boolean"||Q.ignoreClearRect,this};A.events.push(["initialized",function(){this.context2d=new p(this),e=this.internal.f2,t=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,l=this.internal.Matrix,u=new f}]);var p=function(Q){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var T=Q;Object.defineProperty(this,"pdf",{get:function(){return T}});var R=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return R},set:function(L){R=!!L}});var z=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return z},set:function(L){z=!!L}});var X=0;Object.defineProperty(this,"posX",{get:function(){return X},set:function(L){isNaN(L)||(X=L)}});var M=0;Object.defineProperty(this,"posY",{get:function(){return M},set:function(L){isNaN(L)||(M=L)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(L){var wA;typeof L=="number"?wA=[L,L,L,L]:((wA=new Array(4))[0]=L[0],wA[1]=L.length>=2?L[1]:wA[0],wA[2]=L.length>=3?L[2]:wA[0],wA[3]=L.length>=4?L[3]:wA[1]),u.margin=wA}});var rA=!1;Object.defineProperty(this,"autoPaging",{get:function(){return rA},set:function(L){rA=L}});var oA=0;Object.defineProperty(this,"lastBreak",{get:function(){return oA},set:function(L){oA=L}});var fA=[];Object.defineProperty(this,"pageBreaks",{get:function(){return fA},set:function(L){fA=L}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(L){L instanceof f&&(u=L)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(L){u.path=L}});var bA=[];Object.defineProperty(this,"ctxStack",{get:function(){return bA},set:function(L){bA=L}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(L){var wA;wA=w(L),this.ctx.fillStyle=wA.style,this.ctx.isFillTransparent=wA.a===0,this.ctx.fillOpacity=wA.a,this.pdf.setFillColor(wA.r,wA.g,wA.b,{a:wA.a}),this.pdf.setTextColor(wA.r,wA.g,wA.b,{a:wA.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(L){var wA=w(L);this.ctx.strokeStyle=wA.style,this.ctx.isStrokeTransparent=wA.a===0,this.ctx.strokeOpacity=wA.a,wA.a===0?this.pdf.setDrawColor(255,255,255):(wA.a,this.pdf.setDrawColor(wA.r,wA.g,wA.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(L){["butt","round","square"].indexOf(L)!==-1&&(this.ctx.lineCap=L,this.pdf.setLineCap(L))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(L){isNaN(L)||(this.ctx.lineWidth=L,this.pdf.setLineWidth(L))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(L){["bevel","round","miter"].indexOf(L)!==-1&&(this.ctx.lineJoin=L,this.pdf.setLineJoin(L))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(L){isNaN(L)||(this.ctx.miterLimit=L,this.pdf.setMiterLimit(L))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(L){this.ctx.textBaseline=L}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(L){["right","end","center","left","start"].indexOf(L)!==-1&&(this.ctx.textAlign=L)}});var xA=null,UA=null,SA=null;Object.defineProperty(this,"fontFaces",{get:function(){return SA},set:function(L){xA=null,UA=null,SA=L}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(L){var wA;if(this.ctx.font=L,(wA=/^\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(L))!==null){var WA=wA[1];wA[2];var jA=wA[3],CA=wA[4];wA[5];var zA=wA[6],HA=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(CA)[2];CA=Math.floor(HA==="px"?parseFloat(CA)*this.pdf.internal.scaleFactor:HA==="em"?parseFloat(CA)*this.pdf.getFontSize():parseFloat(CA)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(CA);var qA=function(RA){var At,me,le=[],ce=RA.trim();if(ce==="")return Lu;if(ce in Ed)return[Ed[ce]];for(;ce!=="";){switch(me=null,At=(ce=Id(ce)).charAt(0)){case'"':case"'":me=iF(ce.substring(1),At);break;default:me=aF(ce)}if(me===null||(le.push(me[0]),(ce=Id(me[1]))!==""&&ce.charAt(0)!==","))return Lu;ce=ce.replace(/^,/,"")}return le}(zA);if(this.fontFaces){var GA=function(RA,At){var me=RA.getFontList(),le=JSON.stringify(me);if(xA===null||UA!==le){var ce=function(je){var VA=[];return Object.keys(je).forEach(function(De){je[De].forEach(function(YA){var re=null;switch(YA){case"bold":re={family:De,weight:"bold"};break;case"italic":re={family:De,style:"italic"};break;case"bolditalic":re={family:De,weight:"bold",style:"italic"};break;case"":case"normal":re={family:De}}re!==null&&(re.ref={name:De,style:YA},VA.push(re))})}),VA}(me);xA=function(je){for(var VA={},De=0;De<je.length;++De){var YA=Eu(je[De]),re=YA.family,Ge=YA.stretch,ue=YA.style,XA=YA.weight;VA[re]=VA[re]||{},VA[re][Ge]=VA[re][Ge]||{},VA[re][Ge][ue]=VA[re][Ge][ue]||{},VA[re][Ge][ue][XA]=YA}return VA}(ce.concat(At)),UA=le}return xA}(this.pdf,this.fontFaces),Fe=qA.map(function(RA){return{family:RA,stretch:"normal",weight:jA,style:WA}}),fe=function(RA,At,me){for(var le=(me=me||{}).defaultFontFamily||"times",ce=Object.assign({},nF,me.genericFontFamilies||{}),je=null,VA=null,De=0;De<At.length;++De)if(ce[(je=Eu(At[De])).family]&&(je.family=ce[je.family]),RA.hasOwnProperty(je.family)){VA=RA[je.family];break}if(!(VA=VA||RA[le]))throw new Error("Could not find a font-family for the rule '"+Ld(je)+"' and default family '"+le+"'.");if(VA=function(YA,re){if(re[YA])return re[YA];var Ge=vf[YA],ue=Ge<=vf.normal?-1:1,XA=xd(re,Zg,Ge,ue);if(!XA)throw new Error("Could not find a matching font-stretch value for "+YA);return XA}(je.stretch,VA),VA=function(YA,re){if(re[YA])return re[YA];for(var Ge=Yg[YA],ue=0;ue<Ge.length;++ue)if(re[Ge[ue]])return re[Ge[ue]];throw new Error("Could not find a matching font-style for "+YA)}(je.style,VA),!(VA=function(YA,re){if(re[YA])return re[YA];if(YA===400&&re[500])return re[500];if(YA===500&&re[400])return re[400];var Ge=rF[YA],ue=xd(re,$g,Ge,YA<400?-1:1);if(!ue)throw new Error("Could not find a matching font-weight for value "+YA);return ue}(je.weight,VA)))throw new Error("Failed to resolve a font for the rule '"+Ld(je)+"'.");return VA}(GA,Fe);this.pdf.setFont(fe.ref.name,fe.ref.style)}else{var te="";(jA==="bold"||parseInt(jA,10)>=700||WA==="bold")&&(te="bold"),WA==="italic"&&(te+="italic"),te.length===0&&(te="normal");for(var ge="",he={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"},PA=0;PA<qA.length;PA++){if(this.pdf.internal.getFont(qA[PA],te,{noFallback:!0,disableWarning:!0})!==void 0){ge=qA[PA];break}if(te==="bolditalic"&&this.pdf.internal.getFont(qA[PA],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ge=qA[PA],te="bold";else if(this.pdf.internal.getFont(qA[PA],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ge=qA[PA],te="normal";break}}if(ge===""){for(var ae=0;ae<qA.length;ae++)if(he[qA[ae]]){ge=he[qA[ae]];break}}ge=ge===""?"Times":ge,this.pdf.setFont(ge,te)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(L){this.ctx.globalCompositeOperation=L}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(L){this.ctx.globalAlpha=L}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(L){this.ctx.lineDashOffset=L,pA.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(L){this.ctx.lineDash=L,pA.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(L){this.ctx.ignoreClearRect=!!L}})};p.prototype.setLineDash=function(Q){this.lineDash=Q},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){O.call(this,"fill",!1)},p.prototype.stroke=function(){O.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(Q,T){if(isNaN(Q)||isNaN(T))throw He.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var R=this.ctx.transform.applyToPoint(new o(Q,T));this.path.push({type:"mt",x:R.x,y:R.y}),this.ctx.lastPoint=new o(Q,T)},p.prototype.closePath=function(){var Q=new o(0,0),T=0;for(T=this.path.length-1;T!==-1;T--)if(this.path[T].type==="begin"&&Ne(this.path[T+1])==="object"&&typeof this.path[T+1].x=="number"){Q=new o(this.path[T+1].x,this.path[T+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(Q.x,Q.y)},p.prototype.lineTo=function(Q,T){if(isNaN(Q)||isNaN(T))throw He.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var R=this.ctx.transform.applyToPoint(new o(Q,T));this.path.push({type:"lt",x:R.x,y:R.y}),this.ctx.lastPoint=new o(R.x,R.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),O.call(this,null,!0)},p.prototype.quadraticCurveTo=function(Q,T,R,z){if(isNaN(R)||isNaN(z)||isNaN(Q)||isNaN(T))throw He.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var X=this.ctx.transform.applyToPoint(new o(R,z)),M=this.ctx.transform.applyToPoint(new o(Q,T));this.path.push({type:"qct",x1:M.x,y1:M.y,x:X.x,y:X.y}),this.ctx.lastPoint=new o(X.x,X.y)},p.prototype.bezierCurveTo=function(Q,T,R,z,X,M){if(isNaN(X)||isNaN(M)||isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z))throw He.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var rA=this.ctx.transform.applyToPoint(new o(X,M)),oA=this.ctx.transform.applyToPoint(new o(Q,T)),fA=this.ctx.transform.applyToPoint(new o(R,z));this.path.push({type:"bct",x1:oA.x,y1:oA.y,x2:fA.x,y2:fA.y,x:rA.x,y:rA.y}),this.ctx.lastPoint=new o(rA.x,rA.y)},p.prototype.arc=function(Q,T,R,z,X,M){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z)||isNaN(X))throw He.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(M=!!M,!this.ctx.transform.isIdentity){var rA=this.ctx.transform.applyToPoint(new o(Q,T));Q=rA.x,T=rA.y;var oA=this.ctx.transform.applyToPoint(new o(0,R)),fA=this.ctx.transform.applyToPoint(new o(0,0));R=Math.sqrt(Math.pow(oA.x-fA.x,2)+Math.pow(oA.y-fA.y,2))}Math.abs(X-z)>=2*Math.PI&&(z=0,X=2*Math.PI),this.path.push({type:"arc",x:Q,y:T,radius:R,startAngle:z,endAngle:X,counterclockwise:M})},p.prototype.arcTo=function(Q,T,R,z,X){throw new Error("arcTo not implemented.")},p.prototype.rect=function(Q,T,R,z){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z))throw He.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(Q,T),this.lineTo(Q+R,T),this.lineTo(Q+R,T+z),this.lineTo(Q,T+z),this.lineTo(Q,T),this.lineTo(Q+R,T),this.lineTo(Q,T)},p.prototype.fillRect=function(Q,T,R,z){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z))throw He.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var X={};this.lineCap!=="butt"&&(X.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(X.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(Q,T,R,z),this.fill(),X.hasOwnProperty("lineCap")&&(this.lineCap=X.lineCap),X.hasOwnProperty("lineJoin")&&(this.lineJoin=X.lineJoin)}},p.prototype.strokeRect=function(Q,T,R,z){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z))throw He.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");F.call(this)||(this.beginPath(),this.rect(Q,T,R,z),this.stroke())},p.prototype.clearRect=function(Q,T,R,z){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z))throw He.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(Q,T,R,z))},p.prototype.save=function(Q){Q=typeof Q!="boolean"||Q;for(var T=this.pdf.internal.getCurrentPageInfo().pageNumber,R=0;R<this.pdf.internal.getNumberOfPages();R++)this.pdf.setPage(R+1),this.pdf.internal.out("q");if(this.pdf.setPage(T),Q){this.ctx.fontSize=this.pdf.internal.getFontSize();var z=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=z}},p.prototype.restore=function(Q){Q=typeof Q!="boolean"||Q;for(var T=this.pdf.internal.getCurrentPageInfo().pageNumber,R=0;R<this.pdf.internal.getNumberOfPages();R++)this.pdf.setPage(R+1),this.pdf.internal.out("Q");this.pdf.setPage(T),Q&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var w=function(Q){var T,R,z,X;if(Q.isCanvasGradient===!0&&(Q=Q.getColor()),!Q)return{r:0,g:0,b:0,a:0,style:Q};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(Q))T=0,R=0,z=0,X=0;else{var M=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(Q);if(M!==null)T=parseInt(M[1]),R=parseInt(M[2]),z=parseInt(M[3]),X=1;else if((M=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(Q))!==null)T=parseInt(M[1]),R=parseInt(M[2]),z=parseInt(M[3]),X=parseFloat(M[4]);else{if(X=1,typeof Q=="string"&&Q.charAt(0)!=="#"){var rA=new Gg(Q);Q=rA.ok?rA.toHex():"#000000"}Q.length===4?(T=Q.substring(1,2),T+=T,R=Q.substring(2,3),R+=R,z=Q.substring(3,4),z+=z):(T=Q.substring(1,3),R=Q.substring(3,5),z=Q.substring(5,7)),T=parseInt(T,16),R=parseInt(R,16),z=parseInt(z,16)}}return{r:T,g:R,b:z,a:X,style:Q}},g=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},F=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};p.prototype.fillText=function(Q,T,R,z){if(isNaN(T)||isNaN(R)||typeof Q!="string")throw He.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(z=isNaN(z)?void 0:z,!g.call(this)){var X=tA(this.ctx.transform.rotation),M=this.ctx.transform.scaleX;I.call(this,{text:Q,x:T,y:R,scale:M,angle:X,align:this.textAlign,maxWidth:z})}},p.prototype.strokeText=function(Q,T,R,z){if(isNaN(T)||isNaN(R)||typeof Q!="string")throw He.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!F.call(this)){z=isNaN(z)?void 0:z;var X=tA(this.ctx.transform.rotation),M=this.ctx.transform.scaleX;I.call(this,{text:Q,x:T,y:R,scale:M,renderingMode:"stroke",angle:X,align:this.textAlign,maxWidth:z})}},p.prototype.measureText=function(Q){if(typeof Q!="string")throw He.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var T=this.pdf,R=this.pdf.internal.scaleFactor,z=T.internal.getFontSize(),X=T.getStringUnitWidth(Q)*z/T.internal.scaleFactor;return new function(M){var rA=(M=M||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return rA}}),this}({width:X*=Math.round(96*R/72*1e4)/1e4})},p.prototype.scale=function(Q,T){if(isNaN(Q)||isNaN(T))throw He.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var R=new l(Q,0,0,T,0,0);this.ctx.transform=this.ctx.transform.multiply(R)},p.prototype.rotate=function(Q){if(isNaN(Q))throw He.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var T=new l(Math.cos(Q),Math.sin(Q),-Math.sin(Q),Math.cos(Q),0,0);this.ctx.transform=this.ctx.transform.multiply(T)},p.prototype.translate=function(Q,T){if(isNaN(Q)||isNaN(T))throw He.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var R=new l(1,0,0,1,Q,T);this.ctx.transform=this.ctx.transform.multiply(R)},p.prototype.transform=function(Q,T,R,z,X,M){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(z)||isNaN(X)||isNaN(M))throw He.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var rA=new l(Q,T,R,z,X,M);this.ctx.transform=this.ctx.transform.multiply(rA)},p.prototype.setTransform=function(Q,T,R,z,X,M){Q=isNaN(Q)?1:Q,T=isNaN(T)?0:T,R=isNaN(R)?0:R,z=isNaN(z)?1:z,X=isNaN(X)?0:X,M=isNaN(M)?0:M,this.ctx.transform=new l(Q,T,R,z,X,M)};var y=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.prototype.drawImage=function(Q,T,R,z,X,M,rA,oA,fA){var bA=this.pdf.getImageProperties(Q),xA=1,UA=1,SA=1,L=1;z!==void 0&&oA!==void 0&&(SA=oA/z,L=fA/X,xA=bA.width/z*oA/z,UA=bA.height/X*fA/X),M===void 0&&(M=T,rA=R,T=0,R=0),z!==void 0&&oA===void 0&&(oA=z,fA=X),z===void 0&&oA===void 0&&(oA=bA.width,fA=bA.height);var wA=this.ctx.transform.decompose(),WA=tA(wA.rotate.shx),jA=new l,CA=(jA=(jA=(jA=jA.multiply(wA.translate)).multiply(wA.skew)).multiply(wA.scale)).applyToRectangle(new s(M-T*SA,rA-R*L,z*xA,X*UA));if(this.autoPaging){for(var zA,HA=S.call(this,CA),qA=[],GA=0;GA<HA.length;GA+=1)qA.indexOf(HA[GA])===-1&&qA.push(HA[GA]);G(qA);for(var Fe=qA[0],fe=qA[qA.length-1],te=Fe;te<fe+1;te++){this.pdf.setPage(te);var ge=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],he=te===1?this.posY+this.margin[0]:this.margin[0],PA=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ae=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],RA=te===1?0:PA+(te-2)*ae;if(this.ctx.clip_path.length!==0){var At=this.path;zA=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=P(zA,this.posX+this.margin[3],-RA+he+this.ctx.prevPageLastElemOffset),J.call(this,"fill",!0),this.path=At}var me=JSON.parse(JSON.stringify(CA));me=P([me],this.posX+this.margin[3],-RA+he+this.ctx.prevPageLastElemOffset)[0];var le=(te>Fe||te<fe)&&y.call(this);le&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ge,ae,null).clip().discardPath()),this.pdf.addImage(Q,"JPEG",me.x,me.y,me.w,me.h,null,null,WA),le&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(Q,"JPEG",CA.x,CA.y,CA.w,CA.h,null,null,WA)};var S=function(Q,T,R){var z=[];T=T||this.pdf.internal.pageSize.width,R=R||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var X=this.posY+this.ctx.prevPageLastElemOffset;switch(Q.type){default:case"mt":case"lt":z.push(Math.floor((Q.y+X)/R)+1);break;case"arc":z.push(Math.floor((Q.y+X-Q.radius)/R)+1),z.push(Math.floor((Q.y+X+Q.radius)/R)+1);break;case"qct":var M=uA(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Q.x1,Q.y1,Q.x,Q.y);z.push(Math.floor((M.y+X)/R)+1),z.push(Math.floor((M.y+M.h+X)/R)+1);break;case"bct":var rA=QA(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Q.x1,Q.y1,Q.x2,Q.y2,Q.x,Q.y);z.push(Math.floor((rA.y+X)/R)+1),z.push(Math.floor((rA.y+rA.h+X)/R)+1);break;case"rect":z.push(Math.floor((Q.y+X)/R)+1),z.push(Math.floor((Q.y+Q.h+X)/R)+1)}for(var oA=0;oA<z.length;oA+=1)for(;this.pdf.internal.getNumberOfPages()<z[oA];)b.call(this);return z},b=function(){var Q=this.fillStyle,T=this.strokeStyle,R=this.font,z=this.lineCap,X=this.lineWidth,M=this.lineJoin;this.pdf.addPage(),this.fillStyle=Q,this.strokeStyle=T,this.font=R,this.lineCap=z,this.lineWidth=X,this.lineJoin=M},P=function(Q,T,R){for(var z=0;z<Q.length;z++)switch(Q[z].type){case"bct":Q[z].x2+=T,Q[z].y2+=R;case"qct":Q[z].x1+=T,Q[z].y1+=R;default:Q[z].x+=T,Q[z].y+=R}return Q},G=function(Q){return Q.sort(function(T,R){return T-R})},O=function(Q,T){var R=this.fillStyle,z=this.strokeStyle,X=this.lineCap,M=this.lineWidth,rA=Math.abs(M*this.ctx.transform.scaleX),oA=this.lineJoin;if(this.autoPaging){for(var fA,bA,xA=JSON.parse(JSON.stringify(this.path)),UA=JSON.parse(JSON.stringify(this.path)),SA=[],L=0;L<UA.length;L++)if(UA[L].x!==void 0)for(var wA=S.call(this,UA[L]),WA=0;WA<wA.length;WA+=1)SA.indexOf(wA[WA])===-1&&SA.push(wA[WA]);for(var jA=0;jA<SA.length;jA++)for(;this.pdf.internal.getNumberOfPages()<SA[jA];)b.call(this);G(SA);for(var CA=SA[0],zA=SA[SA.length-1],HA=CA;HA<zA+1;HA++){this.pdf.setPage(HA),this.fillStyle=R,this.strokeStyle=z,this.lineCap=X,this.lineWidth=rA,this.lineJoin=oA;var qA=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],GA=HA===1?this.posY+this.margin[0]:this.margin[0],Fe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],fe=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],te=HA===1?0:Fe+(HA-2)*fe;if(this.ctx.clip_path.length!==0){var ge=this.path;fA=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=P(fA,this.posX+this.margin[3],-te+GA+this.ctx.prevPageLastElemOffset),J.call(this,Q,!0),this.path=ge}if(bA=JSON.parse(JSON.stringify(xA)),this.path=P(bA,this.posX+this.margin[3],-te+GA+this.ctx.prevPageLastElemOffset),T===!1||HA===0){var he=(HA>CA||HA<zA)&&y.call(this);he&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qA,fe,null).clip().discardPath()),J.call(this,Q,T),he&&this.pdf.restoreGraphicsState()}this.lineWidth=M}this.path=xA}else this.lineWidth=rA,J.call(this,Q,T),this.lineWidth=M},J=function(Q,T){if((Q!=="stroke"||T||!F.call(this))&&(Q==="stroke"||T||!g.call(this))){for(var R,z,X=[],M=this.path,rA=0;rA<M.length;rA++){var oA=M[rA];switch(oA.type){case"begin":X.push({begin:!0});break;case"close":X.push({close:!0});break;case"mt":X.push({start:oA,deltas:[],abs:[]});break;case"lt":var fA=X.length;if(M[rA-1]&&!isNaN(M[rA-1].x)&&(R=[oA.x-M[rA-1].x,oA.y-M[rA-1].y],fA>0)){for(;fA>=0;fA--)if(X[fA-1].close!==!0&&X[fA-1].begin!==!0){X[fA-1].deltas.push(R),X[fA-1].abs.push(oA);break}}break;case"bct":R=[oA.x1-M[rA-1].x,oA.y1-M[rA-1].y,oA.x2-M[rA-1].x,oA.y2-M[rA-1].y,oA.x-M[rA-1].x,oA.y-M[rA-1].y],X[X.length-1].deltas.push(R);break;case"qct":var bA=M[rA-1].x+2/3*(oA.x1-M[rA-1].x),xA=M[rA-1].y+2/3*(oA.y1-M[rA-1].y),UA=oA.x+2/3*(oA.x1-oA.x),SA=oA.y+2/3*(oA.y1-oA.y),L=oA.x,wA=oA.y;R=[bA-M[rA-1].x,xA-M[rA-1].y,UA-M[rA-1].x,SA-M[rA-1].y,L-M[rA-1].x,wA-M[rA-1].y],X[X.length-1].deltas.push(R);break;case"arc":X.push({deltas:[],abs:[],arc:!0}),Array.isArray(X[X.length-1].abs)&&X[X.length-1].abs.push(oA)}}z=T?null:Q==="stroke"?"stroke":"fill";for(var WA=!1,jA=0;jA<X.length;jA++)if(X[jA].arc)for(var CA=X[jA].abs,zA=0;zA<CA.length;zA++){var HA=CA[zA];HA.type==="arc"?q.call(this,HA.x,HA.y,HA.radius,HA.startAngle,HA.endAngle,HA.counterclockwise,void 0,T,!WA):K.call(this,HA.x,HA.y),WA=!0}else if(X[jA].close===!0)this.pdf.internal.out("h"),WA=!1;else if(X[jA].begin!==!0){var qA=X[jA].start.x,GA=X[jA].start.y;j.call(this,X[jA].deltas,qA,GA),WA=!0}z&&H.call(this,z),T&&AA.call(this)}},Z=function(Q){var T=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,R=T*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return Q-R;case"top":return Q+T-R;case"hanging":return Q+T-2*R;case"middle":return Q+T/2-R;default:return Q}},nA=function(Q){return Q+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.prototype.createLinearGradient=function(){var Q=function(){};return Q.colorStops=[],Q.addColorStop=function(T,R){this.colorStops.push([T,R])},Q.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},Q.isCanvasGradient=!0,Q},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var q=function(Q,T,R,z,X,M,rA,oA,fA){for(var bA=lA.call(this,R,z,X,M),xA=0;xA<bA.length;xA++){var UA=bA[xA];xA===0&&(fA?_.call(this,UA.x1+Q,UA.y1+T):K.call(this,UA.x1+Q,UA.y1+T)),sA.call(this,Q,T,UA.x2,UA.y2,UA.x3,UA.y3,UA.x4,UA.y4)}oA?AA.call(this):H.call(this,rA)},H=function(Q){switch(Q){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},AA=function(){this.pdf.clip(),this.pdf.discardPath()},_=function(Q,T){this.pdf.internal.out(t(Q)+" "+r(T)+" m")},I=function(Q){var T;switch(Q.align){case"right":case"end":T="right";break;case"center":T="center";break;default:T="left"}var R,z,X,M=this.pdf.getTextDimensions(Q.text),rA=Z.call(this,Q.y),oA=nA.call(this,rA)-M.h,fA=this.ctx.transform.applyToPoint(new o(Q.x,rA));if(this.autoPaging){var bA=this.ctx.transform.decompose(),xA=new l;xA=(xA=(xA=xA.multiply(bA.translate)).multiply(bA.skew)).multiply(bA.scale);for(var UA=this.ctx.transform.applyToRectangle(new s(Q.x,rA,M.w,M.h)),SA=xA.applyToRectangle(new s(Q.x,oA,M.w,M.h)),L=S.call(this,SA),wA=[],WA=0;WA<L.length;WA+=1)wA.indexOf(L[WA])===-1&&wA.push(L[WA]);G(wA);for(var jA=wA[0],CA=wA[wA.length-1],zA=jA;zA<CA+1;zA++){this.pdf.setPage(zA);var HA=zA===1?this.posY+this.margin[0]:this.margin[0],qA=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],GA=this.pdf.internal.pageSize.height-this.margin[2],Fe=GA-this.margin[0],fe=this.pdf.internal.pageSize.width-this.margin[1],te=fe-this.margin[3],ge=zA===1?0:qA+(zA-2)*Fe;if(this.ctx.clip_path.length!==0){var he=this.path;R=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=P(R,this.posX+this.margin[3],-1*ge+HA),J.call(this,"fill",!0),this.path=he}var PA=P([JSON.parse(JSON.stringify(SA))],this.posX+this.margin[3],-ge+HA+this.ctx.prevPageLastElemOffset)[0];Q.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*Q.scale),X=this.lineWidth,this.lineWidth=X*Q.scale);var ae=this.autoPaging!=="text";if(ae||PA.y+PA.h<=GA){if(ae||PA.y>=HA&&PA.x<=fe){var RA=ae?Q.text:this.pdf.splitTextToSize(Q.text,Q.maxWidth||fe-PA.x)[0],At=P([JSON.parse(JSON.stringify(UA))],this.posX+this.margin[3],-ge+HA+this.ctx.prevPageLastElemOffset)[0],me=ae&&(zA>jA||zA<CA)&&y.call(this);me&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],te,Fe,null).clip().discardPath()),this.pdf.text(RA,At.x,At.y,{angle:Q.angle,align:T,renderingMode:Q.renderingMode}),me&&this.pdf.restoreGraphicsState()}}else PA.y<GA&&(this.ctx.prevPageLastElemOffset+=GA-PA.y);Q.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=X)}}else Q.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*Q.scale),X=this.lineWidth,this.lineWidth=X*Q.scale),this.pdf.text(Q.text,fA.x+this.posX,fA.y+this.posY,{angle:Q.angle,align:T,renderingMode:Q.renderingMode,maxWidth:Q.maxWidth}),Q.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=X)},K=function(Q,T,R,z){R=R||0,z=z||0,this.pdf.internal.out(t(Q+R)+" "+r(T+z)+" l")},j=function(Q,T,R){return this.pdf.lines(Q,T,R,null,null)},sA=function(Q,T,R,z,X,M,rA,oA){this.pdf.internal.out([e(n(R+Q)),e(i(z+T)),e(n(X+Q)),e(i(M+T)),e(n(rA+Q)),e(i(oA+T)),"c"].join(" "))},lA=function(Q,T,R,z){for(var X=2*Math.PI,M=Math.PI/2;T>R;)T-=X;var rA=Math.abs(R-T);rA<X&&z&&(rA=X-rA);for(var oA=[],fA=z?-1:1,bA=T;rA>1e-5;){var xA=bA+fA*Math.min(rA,M);oA.push(cA.call(this,Q,bA,xA)),rA-=Math.abs(xA-bA),bA=xA}return oA},cA=function(Q,T,R){var z=(R-T)/2,X=Q*Math.cos(z),M=Q*Math.sin(z),rA=X,oA=-M,fA=rA*rA+oA*oA,bA=fA+rA*X+oA*M,xA=4/3*(Math.sqrt(2*fA*bA)-bA)/(rA*M-oA*X),UA=rA-xA*oA,SA=oA+xA*rA,L=UA,wA=-SA,WA=z+T,jA=Math.cos(WA),CA=Math.sin(WA);return{x1:Q*Math.cos(T),y1:Q*Math.sin(T),x2:UA*jA-SA*CA,y2:UA*CA+SA*jA,x3:L*jA-wA*CA,y3:L*CA+wA*jA,x4:Q*Math.cos(R),y4:Q*Math.sin(R)}},tA=function(Q){return 180*Q/Math.PI},uA=function(Q,T,R,z,X,M){var rA=Q+.5*(R-Q),oA=T+.5*(z-T),fA=X+.5*(R-X),bA=M+.5*(z-M),xA=Math.min(Q,X,rA,fA),UA=Math.max(Q,X,rA,fA),SA=Math.min(T,M,oA,bA),L=Math.max(T,M,oA,bA);return new s(xA,SA,UA-xA,L-SA)},QA=function(Q,T,R,z,X,M,rA,oA){var fA,bA,xA,UA,SA,L,wA,WA,jA,CA,zA,HA,qA,GA,Fe=R-Q,fe=z-T,te=X-R,ge=M-z,he=rA-X,PA=oA-M;for(bA=0;bA<41;bA++)jA=(wA=(xA=Q+(fA=bA/40)*Fe)+fA*((SA=R+fA*te)-xA))+fA*(SA+fA*(X+fA*he-SA)-wA),CA=(WA=(UA=T+fA*fe)+fA*((L=z+fA*ge)-UA))+fA*(L+fA*(M+fA*PA-L)-WA),bA==0?(zA=jA,HA=CA,qA=jA,GA=CA):(zA=Math.min(zA,jA),HA=Math.min(HA,CA),qA=Math.max(qA,jA),GA=Math.max(GA,CA));return new s(Math.round(zA),Math.round(HA),Math.round(qA-zA),Math.round(GA-HA))},pA=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var Q,T,R=(Q=this.ctx.lineDash,T=this.ctx.lineDashOffset,JSON.stringify({lineDash:Q,lineDashOffset:T}));this.prevLineDash!==R&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=R)}}})(KA.API),function(A){var e=function(o){var s,l,u,f,p,w,g,F,y,S;for(l=[],u=0,f=(o+=s="\0\0\0\0".slice(o.length%4||4)).length;f>u;u+=4)(p=(o.charCodeAt(u)<<24)+(o.charCodeAt(u+1)<<16)+(o.charCodeAt(u+2)<<8)+o.charCodeAt(u+3))!==0?(w=(p=((p=((p=((p=(p-(S=p%85))/85)-(y=p%85))/85)-(F=p%85))/85)-(g=p%85))/85)%85,l.push(w+33,g+33,F+33,y+33,S+33)):l.push(122);return function(b,P){for(var G=P;G>0;G--)b.pop()}(l,s.length),String.fromCharCode.apply(String,l)+"~>"},t=function(o){var s,l,u,f,p,w=String,g="length",F=255,y="charCodeAt",S="slice",b="replace";for(o[S](-2),o=o[S](0,-2)[b](/\s/g,"")[b]("z","!!!!!"),u=[],f=0,p=(o+=s="uuuuu"[S](o[g]%5||5))[g];p>f;f+=5)l=52200625*(o[y](f)-33)+614125*(o[y](f+1)-33)+7225*(o[y](f+2)-33)+85*(o[y](f+3)-33)+(o[y](f+4)-33),u.push(F&l>>24,F&l>>16,F&l>>8,F&l);return function(P,G){for(var O=G;O>0;O--)P.pop()}(u,s[g]),w.fromCharCode.apply(w,u)},r=function(o){return o.split("").map(function(s){return("0"+s.charCodeAt().toString(16)).slice(-2)}).join("")+">"},n=function(o){var s=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((o=o.replace(/\s/g,"")).indexOf(">")!==-1&&(o=o.substr(0,o.indexOf(">"))),o.length%2&&(o+="0"),s.test(o)===!1)return"";for(var l="",u=0;u<o.length;u+=2)l+=String.fromCharCode("0x"+(o[u]+o[u+1]));return l},i=function(o){for(var s=new Uint8Array(o.length),l=o.length;l--;)s[l]=o.charCodeAt(l);return(s=af(s)).reduce(function(u,f){return u+String.fromCharCode(f)},"")};A.processDataByFilters=function(o,s){var l=0,u=o||"",f=[];for(typeof(s=s||[])=="string"&&(s=[s]),l=0;l<s.length;l+=1)switch(s[l]){case"ASCII85Decode":case"/ASCII85Decode":u=t(u),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=e(u),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=n(u),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=r(u),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=i(u),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+s[l]+'" is not implemented')}return{data:u,reverseChain:f.reverse().join(" ")}}}(KA.API),function(A){A.loadFile=function(e,t,r){return function(n,i,o){i=i!==!1,o=typeof o=="function"?o:function(){};var s=void 0;try{s=function(l,u,f){var p=new XMLHttpRequest,w=0,g=function(F){var y=F.length,S=[],b=String.fromCharCode;for(w=0;w<y;w+=1)S.push(b(255&F.charCodeAt(w)));return S.join("")};if(p.open("GET",l,!u),p.overrideMimeType("text/plain; charset=x-user-defined"),u===!1&&(p.onload=function(){p.status===200?f(g(this.responseText)):f(void 0)}),p.send(null),u&&p.status===200)return g(p.responseText)}(n,i,o)}catch{}return s}(e,t,r)},A.allowFsRead=void 0,A.loadImageFile=A.loadFile}(KA.API),function(A){function e(){return($A.html2canvas?Promise.resolve($A.html2canvas):Dc(()=>Promise.resolve().then(()=>xm),void 0)).catch(function(s){return Promise.reject(new Error("Could not load html2canvas: "+s))}).then(function(s){return s.default?s.default:s})}function t(){return($A.DOMPurify?Promise.resolve($A.DOMPurify):Dc(()=>import("./purify.es-2a6231f9.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load dompurify: "+s))}).then(function(s){return s.default?s.default:s})}var r=function(s){var l=Ne(s);return l==="undefined"?"undefined":l==="string"||s instanceof String?"string":l==="number"||s instanceof Number?"number":l==="function"||s instanceof Function?"function":s&&s.constructor===Array?"array":s&&s.nodeType===1?"element":l==="object"?"object":"unknown"},n=function(s,l){var u=document.createElement(s);for(var f in l.className&&(u.className=l.className),l.innerHTML&&l.dompurify&&(u.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)u.style[f]=l.style[f];return u},i=function s(l,u){for(var f=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),p=l.firstChild;p;p=p.nextSibling)u!==!0&&p.nodeType===1&&p.nodeName==="SCRIPT"||f.appendChild(s(p,u));return l.nodeType===1&&(l.nodeName==="CANVAS"?(f.width=l.width,f.height=l.height,f.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(f.value=l.value),f.addEventListener("load",function(){f.scrollTop=l.scrollTop,f.scrollLeft=l.scrollLeft},!0)),f},o=function s(l){var u=Object.assign(s.convert(Promise.resolve()),JSON.parse(JSON.stringify(s.template))),f=s.convert(Promise.resolve(),u);return(f=f.setProgress(1,s,1,[s])).set(l)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(s,l){return s.__proto__=l||o.prototype,s},o.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"}},o.prototype.from=function(s,l){return this.then(function(){switch(l=l||function(u){switch(r(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(s),l){case"string":return this.then(t).then(function(u){return this.set({src:n("div",{innerHTML:s,dompurify:u})})});case"element":return this.set({src:s});case"canvas":return this.set({canvas:s});case"img":return this.set({img:s});default:return this.error("Unknown source type.")}})},o.prototype.to=function(s){switch(s){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.")}},o.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 s={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},l=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(s.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:s}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(n("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"})},o.prototype.toCanvas=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(e).then(function(l){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,l(this.prop.container,u)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},o.prototype.toContext2d=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(e).then(function(l){var u=this.opt.jsPDF,f=this.opt.fontFaces,p=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,w=Object.assign({async:!0,allowTaint:!0,scale:p,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 w.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=f,f)for(var g=0;g<f.length;++g){var F=f[g],y=F.src.find(function(S){return S.format==="truetype"});y&&u.addFont(y.url,F.ref.name,F.ref.style)}return w.windowHeight=w.windowHeight||0,w.windowHeight=w.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):w.windowHeight,u.context2d.save(!0),l(this.prop.container,w)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var s=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=s})},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},o.prototype.output=function(s,l,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(s,l):this.outputPdf(s,l)},o.prototype.outputPdf=function(s,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(s,l)})},o.prototype.outputImg=function(s){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(s){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+s+'" is not supported.'}})},o.prototype.save=function(s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(s?{filename:s}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},o.prototype.set=function(s){if(r(s)!=="object")return this;var l=Object.keys(s||{}).map(function(u){if(u in o.template.prop)return function(){this.prop[u]=s[u]};switch(u){case"margin":return this.setMargin.bind(this,s.margin);case"jsPDF":return function(){return this.opt.jsPDF=s.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,s.pageSize);default:return function(){this.opt[u]=s[u]}}},this);return this.then(function(){return this.thenList(l)})},o.prototype.get=function(s,l){return this.then(function(){var u=s in o.template.prop?this.prop[s]:this.opt[s];return l?l(u):u})},o.prototype.setMargin=function(s){return this.then(function(){switch(r(s)){case"number":s=[s,s,s,s];case"array":if(s.length===2&&(s=[s[0],s[1],s[0],s[1]]),s.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=s}).then(this.setPageSize)},o.prototype.setPageSize=function(s){function l(u,f){return Math.floor(u*f/72*96)}return this.then(function(){(s=s||KA.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(s.inner={width:s.width-this.opt.margin[1]-this.opt.margin[3],height:s.height-this.opt.margin[0]-this.opt.margin[2]},s.inner.px={width:l(s.inner.width,s.k),height:l(s.inner.height,s.k)},s.inner.ratio=s.inner.height/s.inner.width),this.prop.pageSize=s})},o.prototype.setProgress=function(s,l,u,f){return s!=null&&(this.progress.val=s),l!=null&&(this.progress.state=l),u!=null&&(this.progress.n=u),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(s,l,u,f){return this.setProgress(s?this.progress.val+s:null,l||null,u?this.progress.n+u:null,f?this.progress.stack.concat(f):null)},o.prototype.then=function(s,l){var u=this;return this.thenCore(s,l,function(f,p){return u.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(w){return u.updateProgress(null,f),w}).then(f,p).then(function(w){return u.updateProgress(1),w})})},o.prototype.thenCore=function(s,l,u){u=u||Promise.prototype.then;var f=this;s&&(s=s.bind(f)),l&&(l=l.bind(f));var p=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:o.convert(Object.assign({},f),Promise.prototype),w=u.call(p,s,l);return o.convert(w,f.__proto__)},o.prototype.thenExternal=function(s,l){return Promise.prototype.then.call(this,s,l)},o.prototype.thenList=function(s){var l=this;return s.forEach(function(u){l=l.thenCore(u)}),l},o.prototype.catch=function(s){s&&(s=s.bind(this));var l=Promise.prototype.catch.call(this,s);return o.convert(l,this)},o.prototype.catchExternal=function(s){return Promise.prototype.catch.call(this,s)},o.prototype.error=function(s){return this.then(function(){throw new Error(s)})},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.export=o.prototype.output,o.prototype.run=o.prototype.then,KA.getPageSize=function(s,l,u){if(Ne(s)==="object"){var f=s;s=f.orientation,l=f.unit||l,u=f.format||u}l=l||"mm",u=u||"a4",s=(""+(s||"P")).toLowerCase();var p,w=(""+u).toLowerCase(),g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(l){case"pt":p=1;break;case"mm":p=72/25.4;break;case"cm":p=72/2.54;break;case"in":p=72;break;case"px":p=.75;break;case"pc":case"em":p=12;break;case"ex":p=6;break;default:throw"Invalid unit: "+l}var F,y=0,S=0;if(g.hasOwnProperty(w))y=g[w][1]/p,S=g[w][0]/p;else try{y=u[1],S=u[0]}catch{throw new Error("Invalid format: "+u)}if(s==="p"||s==="portrait")s="p",S>y&&(F=S,S=y,y=F);else{if(s!=="l"&&s!=="landscape")throw"Invalid orientation: "+s;s="l",y>S&&(F=S,S=y,y=F)}return{width:S,height:y,unit:l,k:p,orientation:s}},A.html=function(s,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(Eu):null;var u=new o(l);return l.worker?u:u.from(s).doCallback()}}(KA.API),KA.API.addJS=function(A){var e,t,r=function(n){for(var i="",o=0;o<n.length;o++){var s=n[o];if(s==="("||s===")"){for(var l=0,u=o-1;u>=0&&n[u]==="\\";u--)l++;i+=l%2==0?"\\"+s:s}else i+=s}return i}(A);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=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(){e!==void 0&&t!==void 0&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},function(A){var e;A.events.push(["postPutResources",function(){var t=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),i=0;i<n.length;i++){var o=n[i],s=r.exec(o);if(s!=null){var l=s[1];t.internal.newObjectDeferredBegin(l,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,f=[];for(i=0;i<u;i++){var p=t.internal.newObject();f.push(p);var w=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+w.objId+" 0 R /XYZ null null null]>> endobj")}var g=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i<f.length;i++)t.internal.write("(page_"+(i+1)+")"+f[i]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+g+" 0 R"),t.internal.write(">>","endobj")}}]),A.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),A.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(r,n,i){var o={title:n,options:i,children:[]};return r==null&&(r=this.root),r.children.push(o),o},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(r){r.id=t.internal.newObjectDeferred();for(var n=0;n<r.children.length;n++)this.genIds_r(r.children[n])},t.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(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()},t.outline.renderItems=function(r){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<r.children.length;i++){var o=r.children[i];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(r)),i>0&&this.line("/Prev "+this.makeRef(r.children[i-1])),i<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[i+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var s=this.count=this.count_r({count:0},o);if(s>0&&this.line("/Count "+s),o.options&&o.options.pageNumber){var l=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var u=0;u<r.children.length;u++)this.renderItems(r.children[u])},t.outline.line=function(r){this.ctx.val+=r+`\r
`},t.outline.makeRef=function(r){return r.id+" 0 R"},t.outline.makeString=function(r){return"("+t.internal.pdfEscape(r)+")"},t.outline.objStart=function(r){this.ctx.val+=`\r
`+r.id+` 0 obj\r
<<\r
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},t.outline.count_r=function(r,n){for(var i=0;i<n.children.length;i++)r.count++,this.count_r(r,n.children[i]);return r.count}}])}(KA.API),function(A){var e=[192,193,194,195,196,197,198,199];A.processJPEG=function(t,r,n,i,o,s){var l,u=this.decode.DCT_DECODE,f=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,l=function(p){for(var w,g=256*p.charCodeAt(4)+p.charCodeAt(5),F=p.length,y={width:0,height:0,numcomponents:1},S=4;S<F;S+=2){if(S+=g,e.indexOf(p.charCodeAt(S+1))!==-1){w=256*p.charCodeAt(S+5)+p.charCodeAt(S+6),y={width:256*p.charCodeAt(S+7)+p.charCodeAt(S+8),height:w,numcomponents:p.charCodeAt(S+9)};break}g=256*p.charCodeAt(S+2)+p.charCodeAt(S+3)}return y}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),l.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}f={data:t,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:u,index:r,alias:n}}return f}}(KA.API),KA.API.processPNG=function(A,e,t,r){if(this.__addimage__.isArrayBuffer(A)&&(A=new Uint8Array(A)),this.__addimage__.isArrayBufferView(A)){var n,i=jb(A,{checkCrc:!0}),o=i.width,s=i.height,l=i.channels,u=i.palette,f=i.depth;n=u&&l===1?function(q){for(var H=q.width,AA=q.height,_=q.data,I=q.palette,K=q.depth,j=!1,sA=[],lA=[],cA=void 0,tA=!1,uA=0,QA=0;QA<I.length;QA++){var pA=bh(I[QA],4),Q=pA[0],T=pA[1],R=pA[2],z=pA[3];sA.push(Q,T,R),z!=null&&(z===0?(uA++,lA.length<1&&lA.push(QA)):z<255&&(tA=!0))}if(tA||uA>1){j=!0,lA=void 0;var X=H*AA;cA=new Uint8Array(X);for(var M=new DataView(_.buffer),rA=0;rA<X;rA++){var oA=Iu(M,rA,K),fA=bh(I[oA],4)[3];cA[rA]=fA}}else uA===0&&(lA=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:j?8:void 0,colorBytes:_,alphaBytes:cA,needSMask:j,palette:sA,mask:lA}}(i):l===2||l===4?function(q){for(var H=q.data,AA=q.width,_=q.height,I=q.channels,K=q.depth,j=I===2?"DeviceGray":"DeviceRGB",sA=I-1,lA=AA*_,cA=sA,tA=lA*cA,uA=1*lA,QA=Math.ceil(tA*K/8),pA=Math.ceil(uA*K/8),Q=new Uint8Array(QA),T=new Uint8Array(pA),R=new DataView(H.buffer),z=new DataView(Q.buffer),X=new DataView(T.buffer),M=!1,rA=0;rA<lA;rA++){for(var oA=rA*I,fA=0;fA<cA;fA++)Md(z,Iu(R,oA+fA,K),rA*cA+fA,K);var bA=Iu(R,oA+cA,K);bA<(1<<K)-1&&(M=!0),Md(X,bA,1*rA,K)}return{colorSpace:j,colorsPerPixel:sA,sMaskBitsPerComponent:M?K:void 0,colorBytes:Q,alphaBytes:T,needSMask:M}}(i):function(q){var H=q.data,AA=q.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:AA,colorsPerPixel:AA==="DeviceGray"?1:3,colorBytes:H instanceof Uint16Array?function(_){for(var I=_.length,K=new Uint8Array(2*I),j=new DataView(K.buffer,K.byteOffset,K.byteLength),sA=0;sA<I;sA++)j.setUint16(2*sA,_[sA],!1);return K}(H):H,needSMask:!1}}(i);var p,w,g,F=n,y=F.colorSpace,S=F.colorsPerPixel,b=F.sMaskBitsPerComponent,P=F.colorBytes,G=F.alphaBytes,O=F.needSMask,J=F.palette,Z=F.mask,nA=null;return r!==KA.API.image_compression.NONE&&typeof af=="function"?(nA=function(q){var H;switch(q){case KA.API.image_compression.FAST:H=11;break;case KA.API.image_compression.MEDIUM:H=13;break;case KA.API.image_compression.SLOW:H=14;break;default:H=12}return H}(r),p=this.decode.FLATE_DECODE,w="/Predictor ".concat(nA," /Colors ").concat(S," /BitsPerComponent ").concat(f," /Columns ").concat(o),A=Dd(P,Math.ceil(o*S*f/8),S,f,r),O&&(g=Dd(G,Math.ceil(o*b/8),1,b,r))):(p=void 0,w=void 0,A=P,O&&(g=G)),(this.__addimage__.isArrayBuffer(A)||this.__addimage__.isArrayBufferView(A))&&(A=this.__addimage__.arrayBufferToBinaryString(A)),(g&&this.__addimage__.isArrayBuffer(g)||this.__addimage__.isArrayBufferView(g))&&(g=this.__addimage__.arrayBufferToBinaryString(g)),{alias:t,data:A,index:e,filter:p,decodeParameters:w,transparency:Z,palette:J,sMask:g,predictor:nA,width:o,height:s,bitsPerComponent:f,sMaskBitsPerComponent:b,colorSpace:y}}},function(A){A.processGIF89A=function(e,t,r,n){var i=new cF(e),o=i.width,s=i.height,l=[];i.decodeAndBlitFrameRGBA(0,l);var u={data:l,width:o,height:s},f=new Su(100).encode(u,100);return A.processJPEG.call(this,f,t,r,n)},A.processGIF87A=A.processGIF89A}(KA.API),Nr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var A=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(A);for(var e=0;e<A;e++){var t=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:n,green:r,blue:t,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Nr.prototype.parseBGR=function(){this.pos=this.offset;var A="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[A]()}catch(t){He.log("bit decode error:"+t)}},Nr.prototype.bit1=function(){var A,e=Math.ceil(this.width/8),t=e%4;for(A=this.height-1;A>=0;A--){for(var r=this.bottom_up?A:this.height-1-A,n=0;n<e;n++)for(var i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*n*4,s=0;s<8&&8*n+s<this.width;s++){var l=this.palette[i>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}t!==0&&(this.pos+=4-t)}},Nr.prototype.bit4=function(){for(var A=Math.ceil(this.width/2),e=A%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<A;n++){var i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*n*4,s=i>>4,l=15&i,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*n+1>=this.width)break;u=this.palette[l],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},Nr.prototype.bit8=function(){for(var A=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=t*this.width*4+4*r;if(n<this.palette.length){var o=this.palette[n];this.data[i]=o.red,this.data[i+1]=o.green,this.data[i+2]=o.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}A!==0&&(this.pos+=4-A)}},Nr.prototype.bit15=function(){for(var A=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(i&e)/e*255|0,s=(i>>5&e)/e*255|0,l=(i>>10&e)/e*255|0,u=i>>15?255:0,f=r*this.width*4+4*n;this.data[f]=l,this.data[f+1]=s,this.data[f+2]=o,this.data[f+3]=u}this.pos+=A}},Nr.prototype.bit16=function(){for(var A=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,l=(o>>5&t)/t*255|0,u=(o>>11)/e*255|0,f=n*this.width*4+4*i;this.data[f]=u,this.data[f+1]=l,this.data[f+2]=s,this.data[f+3]=255}this.pos+=A}},Nr.prototype.bit24=function(){for(var A=this.height-1;A>=0;A--){for(var e=this.bottom_up?A:this.height-1-A,t=0;t<this.width;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*t;this.data[o]=i,this.data[o+1]=n,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},Nr.prototype.bit32=function(){for(var A=this.height-1;A>=0;A--)for(var e=this.bottom_up?A:this.height-1-A,t=0;t<this.width;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*t;this.data[s]=i,this.data[s+1]=n,this.data[s+2]=r,this.data[s+3]=o}},Nr.prototype.getData=function(){return this.data},function(A){A.processBMP=function(e,t,r,n){var i=new Nr(e,!1),o=i.width,s=i.height,l={data:i.getData(),width:o,height:s},u=new Su(100).encode(l,100);return A.processJPEG.call(this,u,t,r,n)}}(KA.API),Kd.prototype.getData=function(){return this.data},function(A){A.processWEBP=function(e,t,r,n){var i=new Kd(e),o=i.width,s=i.height,l={data:i.getData(),width:o,height:s},u=new Su(100).encode(l,100);return A.processJPEG.call(this,u,t,r,n)}}(KA.API),KA.API.processRGBA=function(A,e,t){for(var r=A.data,n=r.length,i=new Uint8Array(n/4*3),o=new Uint8Array(n/4),s=0,l=0,u=0;u<n;u+=4){var f=r[u],p=r[u+1],w=r[u+2],g=r[u+3];i[s++]=f,i[s++]=p,i[s++]=w,o[l++]=g}var F=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:F,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:A.width,height:A.height}},KA.API.setLanguage=function(A){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[A]!==void 0&&(this.internal.languageSettings.languageCode=A,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ca=KA.API,fl=Ca.getCharWidthsArray=function(A,e){var t,r,n=(e=e||{}).font||this.internal.getFont(),i=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:n.metadata.Unicode.widths,l=s.fof?s.fof:1,u=e.kerning?e.kerning:n.metadata.Unicode.kerning,f=u.fof?u.fof:1,p=e.doKerning!==!1,w=0,g=A.length,F=0,y=s[0]||l,S=[];for(t=0;t<g;t++)r=A.charCodeAt(t),typeof n.metadata.widthOfString=="function"?S.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(r))+o*(1e3/i)||0)/1e3):(w=p&&Ne(u[r])==="object"&&!isNaN(parseInt(u[r][F],10))?u[r][F]/f:0,S.push((s[r]||y)/l+w)),F=r;return S},Sd=Ca.getStringUnitWidth=function(A,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),r=e.font||this.internal.getFont(),n=e.charSpace||this.internal.getCharSpace();return Ca.processArabic&&(A=Ca.processArabic(A)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(A,t,n)/t:fl.apply(this,arguments).reduce(function(i,o){return i+o},0)},Hd=function(A,e,t,r){for(var n=[],i=0,o=A.length,s=0;i!==o&&s+e[i]<t;)s+=e[i],i++;n.push(A.slice(0,i));var l=i;for(s=0;i!==o;)s+e[i]>r&&(n.push(A.slice(l,i)),s=0,l=i),s+=e[i],i++;return l!==i&&n.push(A.slice(l,i)),n},Nd=function(A,e,t){t||(t={});var r,n,i,o,s,l,u,f=[],p=[f],w=t.textIndent||0,g=0,F=0,y=A.split(" "),S=fl.apply(this,[" ",t])[0];if(l=t.lineIndent===-1?y[0].length+2:t.lineIndent||0){var b=Array(l).join(" "),P=[];y.map(function(O){(O=O.split(/\s*\n/)).length>1?P=P.concat(O.map(function(J,Z){return(Z&&J.length?`
`:"")+J})):P.push(O[0])}),y=P,l=Sd.apply(this,[b,t])}for(i=0,o=y.length;i<o;i++){var G=0;if(r=y[i],l&&r[0]==`
`&&(r=r.substr(1),G=1),w+g+(F=(n=fl.apply(this,[r,t])).reduce(function(O,J){return O+J},0))>e||G){if(F>e){for(s=Hd.apply(this,[r,n,e-(w+g),e]),f.push(s.shift()),f=[s.pop()];s.length;)p.push([s.shift()]);F=n.slice(r.length-(f[0]?f[0].length:0)).reduce(function(O,J){return O+J},0)}else f=[r];p.push(f),w=F+l,g=S}else f.push(r),w+=g+F,g=S}return u=l?function(O,J){return(J?b:"")+O.join(" ")}:function(O){return O.join(" ")},p.map(u)},Ca.splitTextToSize=function(A,e,t){var r,n=(t=t||{}).fontSize||this.internal.getFontSize(),i=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var p=this.internal.getFont(f.fontName,f.fontStyle),w="Unicode";return p.metadata[w]?{widths:p.metadata[w].widths||{0:1},kerning:p.metadata[w].kerning||{}}:{font:p.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);r=Array.isArray(A)?A:String(A).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/n;i.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/n:0,i.lineIndent=t.lineIndent;var s,l,u=[];for(s=0,l=r.length;s<l;s++)u=u.concat(Nd.apply(this,[r[s],o,i]));return u},function(A){A.__fontmetrics__=A.__fontmetrics__||{};for(var e="0123456789abcdef",t="klmnopqrstuvwxyz",r={},n={},i=0;i<16;i++)r[t[i]]=e[i],n[e[i]]=t[i];var o=function(w){return"0x"+parseInt(w,10).toString(16)},s=A.__fontmetrics__.compress=function(w){var g,F,y,S,b=["{"];for(var P in w){if(g=w[P],isNaN(parseInt(P,10))?F="'"+P+"'":(P=parseInt(P,10),F=(F=o(P).slice(2)).slice(0,-1)+n[F.slice(-1)]),typeof g=="number")g<0?(y=o(g).slice(3),S="-"):(y=o(g).slice(2),S=""),y=S+y.slice(0,-1)+n[y.slice(-1)];else{if(Ne(g)!=="object")throw new Error("Don't know what to do with value type "+Ne(g)+".");y=s(g)}b.push(F+y)}return b.push("}"),b.join("")},l=A.__fontmetrics__.uncompress=function(w){if(typeof w!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,F,y,S,b={},P=1,G=b,O=[],J="",Z="",nA=w.length-1,q=1;q<nA;q+=1)(S=w[q])=="'"?g?(y=g.join(""),g=void 0):g=[]:g?g.push(S):S=="{"?(O.push([G,y]),G={},y=void 0):S=="}"?((F=O.pop())[0][F[1]]=G,y=void 0,G=F[0]):S=="-"?P=-1:y===void 0?r.hasOwnProperty(S)?(J+=r[S],y=parseInt(J,16)*P,P=1,J=""):J+=S:r.hasOwnProperty(S)?(Z+=r[S],G[y]=parseInt(Z,16)*P,P=1,y=void 0,Z=""):Z+=S;return b},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},p={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};A.events.push(["addFont",function(w){var g=w.font,F=p.Unicode[g.postScriptName];F&&(g.metadata.Unicode={},g.metadata.Unicode.widths=F.widths,g.metadata.Unicode.kerning=F.kerning);var y=f.Unicode[g.postScriptName];y&&(g.metadata.Unicode.encoding=y,g.encoding=y.codePages[0])}])}(KA.API),function(A){var e=function(t){for(var r=t.length,n=new Uint8Array(r),i=0;i<r;i++)n[i]=t.charCodeAt(i);return n};A.API.events.push(["addFont",function(t){var r=void 0,n=t.font,i=t.instance;if(!n.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if(typeof(r=i.existsFileInVFS(n.postScriptName)===!1?i.loadFile(n.postScriptName):i.getFileFromVFS(n.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(vl(s)),o.metadata=A.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(n,r)}}])}(KA),KA.API.addSvgAsImage=function(A,e,t,r,n,i,o,s){if(isNaN(e)||isNaN(t))throw He.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(n))throw He.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=n;var u=l.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return($A.canvg?Promise.resolve($A.canvg):Dc(()=>import("./index.es-d1c48ec5.js"),["static/index.es-d1c48ec5.js","static/index-7414fd54.js","static/8035f1c7.css","static/defineProperty-83f36300.js","static/toPropertyKey-d8419463.js","static/typeof-7fd5df1e.js"])).catch(function(w){return Promise.reject(new Error("Could not load canvg: "+w))}).then(function(w){return w.default?w.default:w}).then(function(w){return w.fromString(u,A,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(w){return w.render(f)}).then(function(){p.addImage(l.toDataURL("image/jpeg",1),e,t,r,n,o,s)})},KA.API.putTotalPages=function(A){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(A,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(A,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var n=0;n<this.internal.pages[r].length;n++)this.internal.pages[r][n]=this.internal.pages[r][n].replace(e,t);return this},KA.API.viewerPreferences=function(A,e){var t;A=A||{},e=e||!1;var r,n,i,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],u=0,f=0,p=0;function w(F,y){var S,b=!1;for(S=0;S<F.length;S+=1)F[S]===y&&(b=!0);return b}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,A==="reset"||e===!0){var g=s.length;for(p=0;p<g;p+=1)t[s[p]].value=t[s[p]].defaultValue,t[s[p]].explicitSet=!1}if(Ne(A)==="object"){for(n in A)if(i=A[n],w(s,n)&&i!==void 0){if(t[n].type==="boolean"&&typeof i=="boolean")t[n].value=i;else if(t[n].type==="name"&&w(t[n].valueSet,i))t[n].value=i;else if(t[n].type==="integer"&&Number.isInteger(i))t[n].value=i;else if(t[n].type==="array"){for(u=0;u<i.length;u+=1)if(r=!0,i[u].length===1&&typeof i[u][0]=="number")l.push(String(i[u]-1));else if(i[u].length>1){for(f=0;f<i[u].length;f+=1)typeof i[u][f]!="number"&&(r=!1);r===!0&&l.push([i[u][0]-1,i[u][1]-1].join(" "))}t[n].value="["+l.join(" ")+"]"}else t[n].value=t[n].defaultValue;t[n].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var F,y=[];for(F in t)t[F].explicitSet===!0&&(t[F].type==="name"?y.push("/"+F+" /"+t[F].value):y.push("/"+F+" "+t[F].value));y.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+y.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},KA.API.addMetadata=function(A,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:A,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",fF),this.internal.events.subscribe("postPutResources",uF)),this},function(A){var e=A.API,t=e.pdfEscape16=function(i,o){for(var s,l=o.metadata.Unicode.widths,u=["","0","00","000","0000"],f=[""],p=0,w=i.length;p<w;++p){if(s=o.metadata.characterToGlyph(i.charCodeAt(p)),o.metadata.glyIdsUsed.push(s),o.metadata.toUnicode[s]=i.charCodeAt(p),l.indexOf(s)==-1&&(l.push(s),l.push([parseInt(o.metadata.widthOfGlyph(s),10)])),s=="0")return f.join("");s=s.toString(16),f.push(u[4-s.length],s)}return f.join("")},r=function(i){var o,s,l,u,f,p,w;for(f=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
  /Registry (Adobe)
  /Ordering (UCS)
  /Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,l=[],p=0,w=(s=Object.keys(i).sort(function(g,F){return g-F})).length;p<w;p++)o=s[p],l.length>=100&&(f+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar`,l=[]),i[o]!==void 0&&i[o]!==null&&typeof i[o].toString=="function"&&(u=("0000"+i[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),l.push("<"+o+"><"+u+">"));return l.length&&(f+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar
`),f+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};e.events.push(["putFont",function(i){(function(o){var s=o.font,l=o.out,u=o.newObject,f=o.putStream;if(s.metadata instanceof A.API.TTFFont&&s.encoding==="Identity-H"){for(var p=s.metadata.Unicode.widths,w=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),g="",F=0;F<w.length;F++)g+=String.fromCharCode(w[F]);var y=u();f({data:g,addLength1:!0,objectId:y}),l("endobj");var S=u();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:S}),l("endobj");var b=u();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+ya(s.fontName)),l("/FontFile2 "+y+" 0 R"),l("/FontBBox "+A.API.PDFObject.convert(s.metadata.bbox)),l("/Flags "+s.metadata.flags),l("/StemV "+s.metadata.stemV),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l(">>"),l("endobj");var P=u();l("<<"),l("/Type /Font"),l("/BaseFont /"+ya(s.fontName)),l("/FontDescriptor "+b+" 0 R"),l("/W "+A.API.PDFObject.convert(p)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+s.encoding+")"),l(">>"),l(">>"),l("endobj"),s.objectNumber=u(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+S+" 0 R"),l("/BaseFont /"+ya(s.fontName)),l("/Encoding /"+s.encoding),l("/DescendantFonts ["+P+" 0 R]"),l(">>"),l("endobj"),s.isAlreadyPutted=!0}})(i)}]),e.events.push(["putFont",function(i){(function(o){var s=o.font,l=o.out,u=o.newObject,f=o.putStream;if(s.metadata instanceof A.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var p=s.metadata.rawData,w="",g=0;g<p.length;g++)w+=String.fromCharCode(p[g]);var F=u();f({data:w,addLength1:!0,objectId:F}),l("endobj");var y=u();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:y}),l("endobj");var S=u();l("<<"),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l("/StemV "+s.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+F+" 0 R"),l("/Flags 96"),l("/FontBBox "+A.API.PDFObject.convert(s.metadata.bbox)),l("/FontName /"+ya(s.fontName)),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l(">>"),l("endobj"),s.objectNumber=u();for(var b=0;b<s.metadata.hmtx.widths.length;b++)s.metadata.hmtx.widths[b]=parseInt(s.metadata.hmtx.widths[b]*(1e3/s.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+y+" 0 R/BaseFont/"+ya(s.fontName)+"/FontDescriptor "+S+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+A.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),l("endobj"),s.isAlreadyPutted=!0}})(i)}]);var n=function(i){var o,s=i.text||"",l=i.x,u=i.y,f=i.options||{},p=i.mutex||{},w=p.pdfEscape,g=p.activeFontKey,F=p.fonts,y=g,S="",b=0,P="",G=F[y].encoding;if(F[y].encoding!=="Identity-H")return{text:s,x:l,y:u,options:f,mutex:p};for(P=s,y=g,Array.isArray(s)&&(P=s[0]),b=0;b<P.length;b+=1)F[y].metadata.hasOwnProperty("cmap")&&(o=F[y].metadata.cmap.unicode.codeMap[P[b].charCodeAt(0)]),o||P[b].charCodeAt(0)<256&&F[y].metadata.hasOwnProperty("Unicode")?S+=P[b]:S+="";var O="";return parseInt(y.slice(1))<14||G==="WinAnsiEncoding"?O=w(S,y).split("").map(function(J){return J.charCodeAt(0).toString(16)}).join(""):G==="Identity-H"&&(O=t(S,F[y])),p.isHex=!0,{text:O,x:l,y:u,options:f,mutex:p}};e.events.push(["postProcessText",function(i){var o=i.text||"",s=[],l={text:o,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(o)){var u=0;for(u=0;u<o.length;u+=1)Array.isArray(o[u])&&o[u].length===3?s.push([n(Object.assign({},l,{text:o[u][0]})).text,o[u][1],o[u][2]]):s.push(n(Object.assign({},l,{text:o[u]})).text);i.text=s}else i.text=n(Object.assign({},l,{text:o})).text}])}(KA),function(A){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};A.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},A.addFileToVFS=function(t,r){return e.call(this),this.internal.vFS[t]=r,this},A.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(KA.API),function(A){A.__bidiEngine__=A.prototype.__bidiEngine__=function(r){var n,i,o,s,l,u,f,p=e,w=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],F={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},y={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},S=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],b=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)$/),P=!1,G=0;this.__bidiEngine__={};var O=function(_){var I=_.charCodeAt(),K=I>>8,j=y[K];return j!==void 0?p[256*j+(255&I)]:K===252||K===253?"AL":b.test(K)?"L":K===8?"R":"N"},J=function(_){for(var I,K=0;K<_.length;K++){if((I=O(_.charAt(K)))==="L")return!1;if(I==="R")return!0}return!1},Z=function(_,I,K,j){var sA,lA,cA,tA,uA=I[j];switch(uA){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":P=!1;break;case"N":case"AN":break;case"EN":P&&(uA="AN");break;case"AL":P=!0,uA="R";break;case"WS":case"BN":uA="N";break;case"CS":j<1||j+1>=I.length||(sA=K[j-1])!=="EN"&&sA!=="AN"||(lA=I[j+1])!=="EN"&&lA!=="AN"?uA="N":P&&(lA="AN"),uA=lA===sA?lA:"N";break;case"ES":uA=(sA=j>0?K[j-1]:"B")==="EN"&&j+1<I.length&&I[j+1]==="EN"?"EN":"N";break;case"ET":if(j>0&&K[j-1]==="EN"){uA="EN";break}if(P){uA="N";break}for(cA=j+1,tA=I.length;cA<tA&&I[cA]==="ET";)cA++;uA=cA<tA&&I[cA]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(tA=I.length,cA=j+1;cA<tA&&I[cA]==="NSM";)cA++;if(cA<tA){var QA=_[j],pA=QA>=1425&&QA<=2303||QA===64286;if(sA=I[cA],pA&&(sA==="R"||sA==="AL")){uA="R";break}}}uA=j<1||(sA=I[j-1])==="B"?"N":K[j-1];break;case"B":P=!1,n=!0,uA=G;break;case"S":i=!0,uA="N"}return uA},nA=function(_,I,K){var j=_.split("");return K&&q(j,K,{hiLevel:G}),j.reverse(),I&&I.reverse(),j.join("")},q=function(_,I,K){var j,sA,lA,cA,tA,uA=-1,QA=_.length,pA=0,Q=[],T=G?g:w,R=[];for(P=!1,n=!1,i=!1,sA=0;sA<QA;sA++)R[sA]=O(_[sA]);for(lA=0;lA<QA;lA++){if(tA=pA,Q[lA]=Z(_,R,Q,lA),j=240&(pA=T[tA][F[Q[lA]]]),pA&=15,I[lA]=cA=T[pA][5],j>0)if(j===16){for(sA=uA;sA<lA;sA++)I[sA]=1;uA=-1}else uA=-1;if(T[pA][6])uA===-1&&(uA=lA);else if(uA>-1){for(sA=uA;sA<lA;sA++)I[sA]=cA;uA=-1}R[lA]==="B"&&(I[lA]=0),K.hiLevel|=cA}i&&function(z,X,M){for(var rA=0;rA<M;rA++)if(z[rA]==="S"){X[rA]=G;for(var oA=rA-1;oA>=0&&z[oA]==="WS";oA--)X[oA]=G}}(R,I,QA)},H=function(_,I,K,j,sA){if(!(sA.hiLevel<_)){if(_===1&&G===1&&!n)return I.reverse(),void(K&&K.reverse());for(var lA,cA,tA,uA,QA=I.length,pA=0;pA<QA;){if(j[pA]>=_){for(tA=pA+1;tA<QA&&j[tA]>=_;)tA++;for(uA=pA,cA=tA-1;uA<cA;uA++,cA--)lA=I[uA],I[uA]=I[cA],I[cA]=lA,K&&(lA=K[uA],K[uA]=K[cA],K[cA]=lA);pA=tA}pA++}}},AA=function(_,I,K){var j=_.split(""),sA={hiLevel:G};return K||(K=[]),q(j,K,sA),function(lA,cA,tA){if(tA.hiLevel!==0&&f)for(var uA,QA=0;QA<lA.length;QA++)cA[QA]===1&&(uA=S.indexOf(lA[QA]))>=0&&(lA[QA]=S[uA+1])}(j,K,sA),H(2,j,I,K,sA),H(1,j,I,K,sA),j.join("")};return this.__bidiEngine__.doBidiReorder=function(_,I,K){if(function(sA,lA){if(lA)for(var cA=0;cA<sA.length;cA++)lA[cA]=cA;s===void 0&&(s=J(sA)),u===void 0&&(u=J(sA))}(_,I),o||!l||u)if(o&&l&&s^u)G=s?1:0,_=nA(_,I,K);else if(!o&&l&&u)G=s?1:0,_=AA(_,I,K),_=nA(_,I);else if(!o||s||l||u){if(o&&!l&&s^u)_=nA(_,I),s?(G=0,_=AA(_,I,K)):(G=1,_=AA(_,I,K),_=nA(_,I));else if(o&&s&&!l&&u)G=1,_=AA(_,I,K),_=nA(_,I);else if(!o&&!l&&s^u){var j=f;s?(G=1,_=AA(_,I,K),G=0,f=!1,_=AA(_,I,K),f=j):(G=0,_=AA(_,I,K),_=nA(_,I),G=1,f=!1,_=AA(_,I,K),f=j,_=nA(_,I))}}else G=0,_=AA(_,I,K);else G=s?1:0,_=AA(_,I,K);return _},this.__bidiEngine__.setOptions=function(_){_&&(o=_.isInputVisual,l=_.isOutputVisual,s=_.isInputRtl,u=_.isOutputRtl,f=_.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new A.__bidiEngine__({isInputVisual:!0});A.API.events.push(["postProcessText",function(r){var n=r.text;r.x,r.y;var i=r.options||{};r.mutex,i.lang;var o=[];if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,t.setOptions(i),Object.prototype.toString.call(n)==="[object Array]"){var s=0;for(o=[],s=0;s<n.length;s+=1)Object.prototype.toString.call(n[s])==="[object Array]"?o.push([t.doBidiReorder(n[s][0]),n[s][1],n[s][2]]):o.push([t.doBidiReorder(n[s])]);r.text=o}else r.text=t.doBidiReorder(n);t.setOptions({isInputVisual:!0})}])}(KA),KA.API.TTFFont=function(){function A(e){var t;if(this.rawData=e,t=this.contents=new si(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new _F(this),this.registerTTF()}return A.open=function(e){return new A(e)},A.prototype.parse=function(){return this.directory=new hF(this.contents),this.head=new gF(this),this.name=new mF(this),this.cmap=new eB(this),this.toUnicode={},this.hhea=new BF(this),this.maxp=new CF(this),this.hmtx=new bF(this),this.post=new wF(this),this.os2=new pF(this),this.loca=new UF(this),this.glyf=new FF(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},A.prototype.registerTTF=function(){var e,t,r,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,s,l,u;for(u=[],o=0,s=(l=this.bbox).length;o<s;o++)e=l[o],u.push(Math.round(e*this.scaleFactor));return u}).call(this),this.stemV=0,this.post.exists?(r=255&(n=this.post.italic_angle),32768&(t=n>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+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")},A.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},A.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},A.prototype.widthOfString=function(e,t,r){var n,i,o,s;for(o=0,i=0,s=(e=""+e).length;0<=s?i<s:i>s;i=0<=s?++i:--i)n=e.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/t)||0;return o*(t/1e3)},A.prototype.lineHeight=function(e,t){var r;return t==null&&(t=!1),r=t?this.lineGap:0,(this.ascender+r-this.decender)/1e3*e},A}();var Pr,si=function(){function A(e){this.data=e??[],this.pos=0,this.length=this.data.length}return A.prototype.readByte=function(){return this.data[this.pos++]},A.prototype.writeByte=function(e){return this.data[this.pos++]=e},A.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},A.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},A.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},A.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},A.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},A.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},A.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},A.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},A.prototype.readString=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)r[t]=String.fromCharCode(this.readByte());return r.join("")},A.prototype.writeString=function(e){var t,r,n;for(n=[],t=0,r=e.length;0<=r?t<r:t>r;t=0<=r?++t:--t)n.push(this.writeByte(e.charCodeAt(t)));return n},A.prototype.readShort=function(){return this.readInt16()},A.prototype.writeShort=function(e){return this.writeInt16(e)},A.prototype.readLongLong=function(){var e,t,r,n,i,o,s,l;return e=this.readByte(),t=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),l=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^o)+256*(255^s)+(255^l)+1):72057594037927940*e+281474976710656*t+1099511627776*r+4294967296*n+16777216*i+65536*o+256*s+l},A.prototype.writeLongLong=function(e){var t,r;return t=Math.floor(e/4294967296),r=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},A.prototype.readInt=function(){return this.readInt32()},A.prototype.writeInt=function(e){return this.writeInt32(e)},A.prototype.read=function(e){var t,r;for(t=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)t.push(this.readByte());return t},A.prototype.write=function(e){var t,r,n,i;for(i=[],r=0,n=e.length;r<n;r++)t=e[r],i.push(this.writeByte(t));return i},A}(),hF=function(){var A;function e(t){var r,n,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},n=0,i=this.tableCount;0<=i?n<i:n>i;n=0<=i?++n:--n)r={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[r.tag]=r}return e.prototype.encode=function(t){var r,n,i,o,s,l,u,f,p,w,g,F,y;for(y in g=Object.keys(t).length,l=Math.log(2),p=16*Math.floor(Math.log(g)/l),o=Math.floor(p/l),f=16*g-p,(n=new si).writeInt(this.scalarType),n.writeShort(g),n.writeShort(p),n.writeShort(o),n.writeShort(f),i=16*g,u=n.pos+i,s=null,F=[],t)for(w=t[y],n.writeString(y),n.writeInt(A(w)),n.writeInt(u),n.writeInt(w.length),F=F.concat(w),y==="head"&&(s=u),u+=w.length;u%4;)F.push(0),u++;return n.write(F),r=2981146554-A(n.data),n.pos=s+8,n.writeUInt32(r),n.data},A=function(t){var r,n,i,o;for(t=tB.call(t);t.length%4;)t.push(0);for(i=new si(t),n=0,r=0,o=t.length;r<o;r=r+=4)n+=i.readUInt32();return 4294967295&n},e}(),dF={}.hasOwnProperty,an=function(A,e){for(var t in e)dF.call(e,t)&&(A[t]=e[t]);function r(){this.constructor=A}return r.prototype=e.prototype,A.prototype=new r,A.__super__=e.prototype,A};Pr=function(){function A(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return A.prototype.parse=function(){},A.prototype.encode=function(){},A.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},A}();var gF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="head",A.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},A.prototype.encode=function(e){var t;return(t=new si).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},A}(),jd=function(){function A(e,t){var r,n,i,o,s,l,u,f,p,w,g,F,y,S,b,P,G;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),p=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=e.readByte();break;case 4:for(g=e.readUInt16(),w=g/2,e.pos+=6,i=function(){var O,J;for(J=[],l=O=0;0<=w?O<w:O>w;l=0<=w?++O:--O)J.push(e.readUInt16());return J}(),e.pos+=2,y=function(){var O,J;for(J=[],l=O=0;0<=w?O<w:O>w;l=0<=w?++O:--O)J.push(e.readUInt16());return J}(),u=function(){var O,J;for(J=[],l=O=0;0<=w?O<w:O>w;l=0<=w?++O:--O)J.push(e.readUInt16());return J}(),f=function(){var O,J;for(J=[],l=O=0;0<=w?O<w:O>w;l=0<=w?++O:--O)J.push(e.readUInt16());return J}(),n=(this.length-e.pos+this.offset)/2,s=function(){var O,J;for(J=[],l=O=0;0<=n?O<n:O>n;l=0<=n?++O:--O)J.push(e.readUInt16());return J}(),l=b=0,G=i.length;b<G;l=++b)for(S=i[l],r=P=F=y[l];F<=S?P<=S:P>=S;r=F<=S?++P:--P)f[l]===0?o=r+u[l]:(o=s[f[l]/2+(r-F)-(w-l)]||0)!==0&&(o+=u[l]),this.codeMap[r]=65535&o}e.pos=p}return A.encode=function(e,t){var r,n,i,o,s,l,u,f,p,w,g,F,y,S,b,P,G,O,J,Z,nA,q,H,AA,_,I,K,j,sA,lA,cA,tA,uA,QA,pA,Q,T,R,z,X,M,rA,oA,fA,bA,xA;switch(j=new si,o=Object.keys(e).sort(function(UA,SA){return UA-SA}),t){case"macroman":for(y=0,S=function(){var UA=[];for(F=0;F<256;++F)UA.push(0);return UA}(),P={0:0},i={},sA=0,uA=o.length;sA<uA;sA++)P[oA=e[n=o[sA]]]==null&&(P[oA]=++y),i[n]={old:e[n],new:P[e[n]]},S[n]=P[e[n]];return j.writeUInt16(1),j.writeUInt16(0),j.writeUInt32(12),j.writeUInt16(0),j.writeUInt16(262),j.writeUInt16(0),j.write(S),{charMap:i,subtable:j.data,maxGlyphID:y+1};case"unicode":for(I=[],p=[],G=0,P={},r={},b=u=null,lA=0,QA=o.length;lA<QA;lA++)P[J=e[n=o[lA]]]==null&&(P[J]=++G),r[n]={old:J,new:P[J]},s=P[J]-n,b!=null&&s===u||(b&&p.push(b),I.push(n),u=s),b=n;for(b&&p.push(b),p.push(65535),I.push(65535),AA=2*(H=I.length),q=2*Math.pow(Math.log(H)/Math.LN2,2),w=Math.log(q/2)/Math.LN2,nA=2*H-q,l=[],Z=[],g=[],F=cA=0,pA=I.length;cA<pA;F=++cA){if(_=I[F],f=p[F],_===65535){l.push(0),Z.push(0);break}if(_-(K=r[_].new)>=32768)for(l.push(0),Z.push(2*(g.length+H-F)),n=tA=_;_<=f?tA<=f:tA>=f;n=_<=f?++tA:--tA)g.push(r[n].new);else l.push(K-_),Z.push(0)}for(j.writeUInt16(3),j.writeUInt16(1),j.writeUInt32(12),j.writeUInt16(4),j.writeUInt16(16+8*H+2*g.length),j.writeUInt16(0),j.writeUInt16(AA),j.writeUInt16(q),j.writeUInt16(w),j.writeUInt16(nA),M=0,Q=p.length;M<Q;M++)n=p[M],j.writeUInt16(n);for(j.writeUInt16(0),rA=0,T=I.length;rA<T;rA++)n=I[rA],j.writeUInt16(n);for(fA=0,R=l.length;fA<R;fA++)s=l[fA],j.writeUInt16(s);for(bA=0,z=Z.length;bA<z;bA++)O=Z[bA],j.writeUInt16(O);for(xA=0,X=g.length;xA<X;xA++)y=g[xA],j.writeUInt16(y);return{charMap:r,subtable:j.data,maxGlyphID:G+1}}},A}(),eB=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="cmap",A.prototype.parse=function(e){var t,r,n;for(e.pos=this.offset,this.version=e.readUInt16(),n=e.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=n?r<n:r>n;r=0<=n?++r:--r)t=new jd(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},A.encode=function(e,t){var r,n;return t==null&&(t="macroman"),r=jd.encode(e,t),(n=new si).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},A}(),BF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="hhea",A.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},A}(),pF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="OS/2",A.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,r;for(r=[],t=0;t<10;++t)r.push(e.readByte());return r}(),this.charRange=function(){var t,r;for(r=[],t=0;t<4;++t)r.push(e.readInt());return r}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,r;for(r=[],t=0;t<2;t=++t)r.push(e.readInt());return r}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},A}(),wF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="post",A.prototype.parse=function(e){var t,r,n;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(r=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],n=[];e.pos<this.offset+this.length;)t=e.readByte(),n.push(this.names.push(e.readString(t)));return n;case 151552:return r=e.readUInt16(),this.offsets=e.read(r);case 262144:return this.map=(function(){var o,s,l;for(l=[],i=o=0,s=this.file.maxp.numGlyphs;0<=s?o<s:o>s;i=0<=s?++o:--o)l.push(e.readUInt32());return l}).call(this)}},A}(),vF=function(A,e){this.raw=A,this.length=A.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},mF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="name",A.prototype.parse=function(e){var t,r,n,i,o,s,l,u,f,p,w;for(e.pos=this.offset,e.readShort(),t=e.readShort(),s=e.readShort(),r=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)r.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+s+e.readShort()});for(l={},i=f=0,p=r.length;f<p;i=++f)n=r[i],e.pos=n.offset,u=e.readString(n.length),o=new vF(u,n),l[w=n.nameID]==null&&(l[w]=[]),l[n.nameID].push(o);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},A}(),CF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="maxp",A.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},A}(),bF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="hmtx",A.prototype.parse=function(e){var t,r,n,i,o,s,l;for(e.pos=this.offset,this.metrics=[],t=0,s=this.file.hhea.numberOfMetrics;0<=s?t<s:t>s;t=0<=s?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,f;for(f=[],t=u=0;0<=n?u<n:u>n;t=0<=n?++u:--u)f.push(e.readInt16());return f}(),this.widths=(function(){var u,f,p,w;for(w=[],u=0,f=(p=this.metrics).length;u<f;u++)i=p[u],w.push(i.advance);return w}).call(this),r=this.widths[this.widths.length-1],l=[],t=o=0;0<=n?o<n:o>n;t=0<=n?++o:--o)l.push(this.widths.push(r));return l},A.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},A}(),tB=[].slice,FF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="glyf",A.prototype.parse=function(){return this.cache={}},A.prototype.glyphFor=function(e){var t,r,n,i,o,s,l,u,f,p;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,r=i.indexOf(e),(n=i.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+r,o=(s=new si(t.read(n))).readShort(),u=s.readShort(),p=s.readShort(),l=s.readShort(),f=s.readShort(),this.cache[e]=o===-1?new yF(s,u,p,l,f):new QF(s,o,u,p,l,f),this.cache[e]))},A.prototype.encode=function(e,t,r){var n,i,o,s,l;for(o=[],i=[],s=0,l=t.length;s<l;s++)n=e[t[s]],i.push(o.length),n&&(o=o.concat(n.encode(r)));return i.push(o.length),{table:o,offsets:i}},A}(),QF=function(){function A(e,t,r,n,i,o){this.raw=e,this.numberOfContours=t,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=o,this.compound=!1}return A.prototype.encode=function(){return this.raw.data},A}(),yF=function(){function A(e,t,r,n,i){var o,s;for(this.raw=e,this.xMin=t,this.yMin=r,this.xMax=n,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return A.prototype.encode=function(){var e,t,r;for(t=new si(tB.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)t.pos=this.glyphOffsets[e];return t.data},A}(),UF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return an(A,Pr),A.prototype.tag="loca",A.prototype.parse=function(e){var t,r;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?(function(){var n,i;for(i=[],r=0,n=this.length;r<n;r+=2)i.push(2*e.readUInt16());return i}).call(this):(function(){var n,i;for(i=[],r=0,n=this.length;r<n;r+=4)i.push(e.readUInt32());return i}).call(this)},A.prototype.indexOf=function(e){return this.offsets[e]},A.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},A.prototype.encode=function(e,t){for(var r=new Uint32Array(this.offsets.length),n=0,i=0,o=0;o<r.length;++o)if(r[o]=n,i<t.length&&t[i]==o){++i,r[o]=n;var s=this.offsets[o],l=this.offsets[o+1]-s;l>0&&(n+=l)}for(var u=new Array(4*r.length),f=0;f<r.length;++f)u[4*f+3]=255&r[f],u[4*f+2]=(65280&r[f])>>8,u[4*f+1]=(16711680&r[f])>>16,u[4*f]=(4278190080&r[f])>>24;return u},A}(),_F=function(){function A(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return A.prototype.generateCmap=function(){var e,t,r,n,i;for(t in n=this.font.cmap.tables[0].codeMap,e={},i=this.subset)r=i[t],e[t]=n[r];return e},A.prototype.glyphsFor=function(e){var t,r,n,i,o,s,l;for(n={},o=0,s=e.length;o<s;o++)n[i=e[o]]=this.font.glyf.glyphFor(i);for(i in t=[],n)(r=n[i])!=null&&r.compound&&t.push.apply(t,r.glyphIDs);if(t.length>0)for(i in l=this.glyphsFor(t))r=l[i],n[i]=r;return n},A.prototype.encode=function(e,t){var r,n,i,o,s,l,u,f,p,w,g,F,y,S,b;for(n in r=eB.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),g={0:0},b=r.charMap)g[(l=b[n]).old]=l.new;for(F in w=r.maxGlyphID,o)F in g||(g[F]=w++);return f=function(P){var G,O;for(G in O={},P)O[P[G]]=G;return O}(g),p=Object.keys(f).sort(function(P,G){return P-G}),y=function(){var P,G,O;for(O=[],P=0,G=p.length;P<G;P++)s=p[P],O.push(f[s]);return O}(),i=this.font.glyf.encode(o,y,g),u=this.font.loca.encode(i.offsets,y),S={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(S["OS/2"]=this.font.os2.raw()),this.font.directory.encode(S)},A}();KA.API.PDFObject=function(){var A;function e(){}return A=function(t,r){return(Array(r+1).join("0")+t).slice(-r)},e.convert=function(t){var r,n,i,o;if(Array.isArray(t))return"["+function(){var s,l,u;for(u=[],s=0,l=t.length;s<l;s++)r=t[s],u.push(e.convert(r));return u}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+A(t.getUTCFullYear(),4)+A(t.getUTCMonth(),2)+A(t.getUTCDate(),2)+A(t.getUTCHours(),2)+A(t.getUTCMinutes(),2)+A(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(n in i=["<<"],t)o=t[n],i.push("/"+n+" "+e.convert(o));return i.push(">>"),i.join(`
`)}return""+t},e}();const xF=KB`
	0% { background-color: #4caf50; color: #fff; }
	100% { background-color: transparent; color: inherit; }
`,vQ=()=>{var Q,T,R,z,X;const{id:A}=jB(),e=GB(),t=VB();qB(M=>zB(M));const{Statement:{selectedData:r,loading:n,ledger:i,ledgerLoading:o,authorizationCheck:s,authorizationCheckLoading:l}}=WB();pt.useEffect(()=>{A&&(t(Ch({id:A})),t(XB({id:A})),t(JB({id:A})))},[A]);const u=((r==null?void 0:r.payments)||[]).filter(M=>M.authorized_status!==3),[f,p]=pt.useState([]),[w,g]=pt.useState(1),[F,y]=pt.useState(10),S=pt.useRef(null),[b,P]=pt.useState(!1),G=pt.useCallback(async()=>{if(S.current){P(!0);try{const M=await z1(S.current,{scale:2,useCORS:!0}),rA=M.toDataURL("image/png"),oA=new KA({orientation:"portrait",unit:"mm",format:"a4"}),fA=oA.internal.pageSize.getWidth(),bA=M.height*fA/M.width;oA.addImage(rA,"PNG",0,0,fA,bA),oA.save(`Statement_${(i==null?void 0:i.statement_code)||(r==null?void 0:r.code)||"details"}.pdf`)}finally{P(!1)}}},[i==null?void 0:i.statement_code,r==null?void 0:r.code]),O=pt.useCallback(()=>{var L;if(!((L=i==null?void 0:i.ledger)!=null&&L.length))return;const M=["S.No","Date","Code","Project","Cost Center","Expense Type","Description","Type","Amount"],rA=wA=>{const WA=String(wA??"---");return WA.includes(",")||WA.includes('"')||WA.includes(`
`)?`"${WA.replace(/"/g,'""')}"`:WA},oA=i.ledger.map((wA,WA)=>{var jA,CA;return[WA+1,wA.date||"---",wA.code||"---",wA!=null&&wA.location?typeof wA.location=="object"?`${((jA=wA.location)==null?void 0:jA[wA.location_code])??"---"}[${wA.location_code??""}]`:`${wA.location}[${wA.location_code??""}]`:"---",wA!=null&&wA.costcenter?typeof wA.costcenter=="object"?`${((CA=wA.costcenter)==null?void 0:CA[wA.costcenter_code])??"---"}[${wA.costcenter_code??""}]`:`${wA.costcenter}[${wA.costcenter_code??""}]`:"---",wA.expensetype==="Transfer Money"?`${wA.expensetype}[${wA.to_user}]`:wA.expensetype||"---",wA.description||"---",wA.type||"---",wA.amount??"---"].map(rA).join(",")}),bA=[`Code: ${i.statement_code||"---"}`,`User: ${i.user||"---"}`,`Opening Balance: ${i.opening_balance??"---"}`,`Closing Balance: ${i.closing_balance??"---"}`].join(`
`)+`

`+M.join(",")+`
`+oA.join(`
`)+`
,,,,,,Closing Balance,${i.closing_balance??"---"}

Project,Spent
`+J.map(wA=>[rA(wA.project),wA.spent].join(",")).join(`
`),xA=new Blob([bA],{type:"text/csv;charset=utf-8;"}),UA=URL.createObjectURL(xA),SA=document.createElement("a");SA.href=UA,SA.download=`Statement_${i.statement_code||(r==null?void 0:r.code)||"details"}.csv`,SA.click(),URL.revokeObjectURL(UA)},[i,r==null?void 0:r.code]),J=pt.useMemo(()=>{const M={};return((i==null?void 0:i.ledger)||[]).forEach(rA=>{if(rA.type==="Debit"){const oA=rA.location||"No Project";M[oA]=(M[oA]||0)+(rA.amount||0)}}),Object.entries(M).map(([rA,oA])=>({project:rA,spent:oA}))},[i]),Z=pt.useMemo(()=>u.map(M=>M.id).filter(Boolean),[u]);pt.useEffect(()=>{p(Z)},[Z.length]);const nA=Z.length>0&&Z.every(M=>f.includes(M)),q=pt.useMemo(()=>u.some(M=>M.authorized_status===1),[u]),H=pt.useMemo(()=>u.filter(M=>M.authorized_status===2),[u]);pt.useMemo(()=>H.reduce((M,rA)=>M+(parseFloat(rA.amount)||0),0).toFixed(2),[H]);const AA=()=>{p(nA?[]:Z)},_=M=>{p(rA=>rA.includes(M)?rA.filter(oA=>oA!==M):[...rA,M])},I=[{title:yA.jsx(Fh,{checked:nA,indeterminate:f.length>0&&!nA,onChange:AA,color:"success",size:"small"}),width:50},{title:"S.No",width:100},{title:"Date",width:100},{title:"Code",width:100},{title:"User",width:200},{title:"Project",width:200},{title:"Expense Type",width:200},{title:"Cost Center",width:200},{title:"Type",width:100},{title:"Amount",width:100},{title:"Status",width:100},{title:"Actions",width:100}];function K(M,rA,oA,fA,bA,xA,UA,SA,L,wA,WA,jA){return{checkbox:M,index:rA,date:oA,code:fA,from_user:bA,location:xA,expansetype:UA,costcenter:SA,type_name:L,amount:wA,status:WA,actions:jA}}const j=pt.useMemo(()=>u.filter(M=>f.includes(M.id)).reduce((M,rA)=>M+(parseFloat(rA.amount)||0),0).toFixed(2),[u,f]),[sA,lA]=pt.useState(0),cA=pt.useRef(j);pt.useEffect(()=>{cA.current!==j&&(lA(M=>M+1),cA.current=j)},[j]);const tA=(M,rA)=>{g(rA+1)},uA=M=>{y(parseInt(M.target.value)),g(1)},pA=[...pt.useMemo(()=>{const M=(w-1)*F;return u.slice(M,M+F)},[u,w,F]).map((M,rA)=>{var UA,SA,L,wA;const fA=yA.jsx(Fh,{checked:f.includes(M.id),onChange:()=>_(M.id),color:"success",size:"small",disabled:!1}),bA=yA.jsx(e2,{authorized_status:M.authorized_status??"",authorized_status_name:M.authorized_status_name??""}),xA=yA.jsx(No,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:2,minHeight:36},children:yA.jsx(ZB,{style:{cursor:"pointer",color:"#fc6f03"},onClick:()=>e(`/pages/Expenses/${M.id}`)})});return K(fA,(w-1)*F+rA+1,M.date?kc(M.date).format("DD/MM/YYYY"):"---",M.code||"---",((UA=M.from_user)==null?void 0:UA.fullname)||"---",((SA=M.location)==null?void 0:SA.name)||"---",((L=M.expansetype)==null?void 0:L.name)||"---",((wA=M.costcenter)==null?void 0:wA.name)||"---",M.type_name||"---",M.amount||"---",bA,xA)}),K("","","","","","","","",yA.jsx(Xe,{fontWeight:600,children:"Total"}),yA.jsx(Xe,{fontWeight:600,sx:{animation:`${xF} 0.8s ease`,borderRadius:1,px:1},children:j},sA),"","")];return yA.jsx($B,{title:"Statement Details",is_goback:!0,showSaveButton:!1,children:yA.jsx(t2,{children:n?yA.jsx(Xe,{children:"Loading..."}):yA.jsxs(yA.Fragment,{children:[yA.jsxs(Hr,{direction:"row",spacing:4,flexWrap:"wrap",mb:2,p:1,children:[yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Code:"}),yA.jsx(Xe,{children:(r==null?void 0:r.code)||"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Date:"}),yA.jsx(Xe,{children:r!=null&&r.date?kc(r.date).format("DD/MM/YYYY"):"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"User:"}),yA.jsx(Xe,{children:((Q=r==null?void 0:r.user)==null?void 0:Q.fullname)||(r==null?void 0:r.user_name)||"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Total Amount:"}),yA.jsx(Xe,{children:(r==null?void 0:r.total_amount)??"---"})]})]}),yA.jsxs(No,{display:"flex",justifyContent:"flex-end",gap:2,mb:2,children:[yA.jsx(Tc,{title:(T=i==null?void 0:i.ledger)!=null&&T.length?"":"No ledger data to download",arrow:!0,placement:"top",children:yA.jsx("span",{children:yA.jsx(Oc,{variant:"outlined",color:"primary",startIcon:yA.jsx(Qh,{}),onClick:G,disabled:!((R=i==null?void 0:i.ledger)!=null&&R.length),loading:b||o,children:"Download PDF"})})}),yA.jsx(Tc,{title:(z=i==null?void 0:i.ledger)!=null&&z.length?"":"No ledger data to download",arrow:!0,placement:"top",children:yA.jsx("span",{children:yA.jsx(Oc,{variant:"outlined",color:"success",startIcon:yA.jsx(Qh,{}),onClick:O,disabled:!((X=i==null?void 0:i.ledger)!=null&&X.length),loading:o,children:"Download CSV"})})}),(s==null?void 0:s.can_authorize)&&yA.jsx(Tc,{title:q?"":"Only pending records can update the status",arrow:!0,placement:"top",children:yA.jsx("span",{children:yA.jsx(Oc,{variant:"contained",color:"success",disabled:!q,startIcon:yA.jsx(r2,{}),loading:n,onClick:()=>{const M=Z.filter(fA=>!f.includes(fA)),oA={app_label:"Payments",model_name:"payments",instances:[...f.map(fA=>({instance_id:fA,authorized_status:2,description:""})),...M.map(fA=>({instance_id:fA,authorized_status:3,description:""}))]};t(YB({pageParams:{},obj:oA,callback:()=>{A&&t(Ch({id:A}))}}))},children:"Save"})})})]}),yA.jsx(No,{sx:{position:"fixed",left:"-9999px",top:0,width:"297mm",overflow:"hidden"},children:yA.jsxs(No,{ref:S,sx:{p:"10mm",width:"100%",boxSizing:"border-box"},children:[yA.jsx(Xe,{variant:"h5",fontWeight:700,mb:2,textAlign:"center",children:"Statement Ledger"}),yA.jsxs(Hr,{direction:"row",spacing:4,flexWrap:"wrap",mb:3,children:[yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Date:"}),yA.jsx(Xe,{children:kc(i==null?void 0:i.date).format("DD-MM-YYYY")||"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Code:"}),yA.jsx(Xe,{children:(i==null?void 0:i.statement_code)||"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"User:"}),yA.jsx(Xe,{children:i!=null&&i.user?`${i==null?void 0:i.user}[${i==null?void 0:i.user_code}]`:"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Opening Balance:"}),yA.jsx(Xe,{children:(i==null?void 0:i.opening_balance)??"---"})]}),yA.jsxs(Hr,{direction:"row",spacing:1,children:[yA.jsx(Xe,{fontWeight:600,children:"Closing Balance:"}),yA.jsx(Xe,{children:(i==null?void 0:i.closing_balance)??"---"})]})]}),yA.jsxs("table",{style:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse",fontSize:"12px"},children:[yA.jsx("thead",{children:yA.jsxs("tr",{style:{backgroundColor:"#f5f5f5"},children:[yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"5%",textAlign:"left"},children:"S.No"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"10%",textAlign:"left"},children:"Date"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"10%",textAlign:"left"},children:"Code"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"15%",textAlign:"left"},children:"Project"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"12%",textAlign:"left"},children:"Cost Center"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"14%",textAlign:"left"},children:"Expense Type"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"12%",textAlign:"left"},children:"Description"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"8%",textAlign:"left"},children:"Type"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",width:"8%",textAlign:"right"},children:"Amount"})]})}),yA.jsxs("tbody",{children:[((i==null?void 0:i.ledger)||[]).map((M,rA)=>yA.jsxs("tr",{children:[yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px"},children:rA+1}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px"},children:M.date||"---"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px"},children:M.code||"---"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",wordBreak:"break-word"},children:M!=null&&M.location?`${M.location}[${M.location_code}]`:"---"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",wordBreak:"break-word"},children:M.costcenter?`${M.costcenter}[${M.costcenter_code}]`:"---"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",wordBreak:"break-word"},children:M.expensetype==="Transfer Money"?`${M.expensetype}[${M.to_user}]`:M.expensetype||"---"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",wordBreak:"break-word"},children:M.description||"---"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",color:M.type==="Credit"?"green":"red"},children:M.type||"---"}),yA.jsxs("td",{style:{border:"1px solid #ccc",padding:"6px",textAlign:"right"},children:[M.type==="Credit"?"+ ":"- ",M.amount??"---"]})]},M.id)),yA.jsxs("tr",{style:{backgroundColor:"#f5f5f5"},children:[yA.jsx("td",{colSpan:8,style:{border:"1px solid #ccc",padding:"6px",textAlign:"right",fontWeight:600},children:"Closing Balance"}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",textAlign:"right",fontWeight:600},children:(i==null?void 0:i.closing_balance)??"---"})]})]})]}),J.length>0&&yA.jsxs(yA.Fragment,{children:[yA.jsx(Xe,{fontWeight:600,mt:3,mb:1,children:"Project Summary"}),yA.jsxs("table",{style:{width:"40%",borderCollapse:"collapse",fontSize:"12px"},children:[yA.jsx("thead",{children:yA.jsxs("tr",{style:{backgroundColor:"#f5f5f5"},children:[yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",textAlign:"left"},children:"Project"}),yA.jsx("th",{style:{border:"1px solid #ccc",padding:"6px",textAlign:"right"},children:"Spent"})]})}),yA.jsx("tbody",{children:J.map(M=>yA.jsxs("tr",{children:[yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px"},children:M.project}),yA.jsx("td",{style:{border:"1px solid #ccc",padding:"6px",textAlign:"right"},children:M.spent})]},M.project))})]})]})]})}),yA.jsx(A2,{count:u.length,columns:I,rows:pA,loading:n,page:w,pageSize:F,handleChangePage:tA,handleChangeRowsPerPage:uA})]})})})};export{vQ as default};
