var KB=Object.defineProperty;var jB=(A,e,t)=>e in A?KB(A,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):A[e]=t;var Se=(A,e,t)=>(jB(A,typeof e!="symbol"?e+"":e,t),t);import{bU as Tl,bV as GB,b5 as VB,l as qB,c as WB,a as zB,h as XB,bQ as JB,r as Ft,bW as Ol,bX as Fh,bY as YB,bZ as An,y as ko,j as bA,B as fs,bs as ZB,bf as $B,b_ as A2,b$ as e2,c0 as t2,T as Ze,M as Or,c1 as r2}from"./index-7d3dbb9c.js";import{A as n2}from"./add.expenses-fb8a4f85.js";import{G as i2}from"./GoBack-3bb20b9f.js";import{T as a2}from"./index-7a00ca34.js";import{S as s2}from"./Buttons-c712a6b2.js";import{_ as Oe}from"./toPropertyKey-720374c3.js";import{_ as Qh}from"./objectSpread2-947328ce.js";import{C as yh}from"./Checkbox-4b8e4bb1.js";import{C as o2}from"./CardContent-184f4e92.js";import{T as Ml}from"./Tooltip-d767de94.js";import{L as Pl}from"./LoadingButton-323cc52e.js";import{D as Uh}from"./Download-bbc28bb1.js";import{T as c2}from"./ThumbUp-b9d772b2.js";import"./index.esm-9d396c5f.js";import"./yup-55e79238.js";import"./index.esm-12cc9f7b.js";import"./CustomDatepicker-6d5ad1ab.js";import"./floating-ui.dom-cd6c919d.js";import"./OutlinedInput-e6d419ce.js";import"./useFormControl-7314cc67.js";import"./isHostComponent-73d6e646.js";import"./InputAdornment-bbfa18ee.js";import"./index-7976e00d.js";import"./index-e9cb9551.js";import"./useMediaQuery-77b67f07.js";import"./useControlled-338e346b.js";import"./InputLabel-ade41a0b.js";import"./FormInput-602ae51d.js";import"./FormControlLabel-4a3a4313.js";import"./index-499136ab.js";import"./SectionDivider-be0a23cf.js";import"./index-b5c17d61.js";import"./TableCell-26014f2c.js";import"./TableRow-23a8435a.js";import"./resolveProps-4b8623f7.js";import"./composeClasses-b42b2e69.js";import"./popper-f3391c26.js";import"./styled-446e5583.js";import"./Avatar-4afe3b6a.js";import"./createSvgIcon-25cfe1a8.js";import"./TableContainer-ead8a3e6.js";import"./TableHead-ec26fced.js";import"./Close-40a26896.js";import"./ScrollableList-ffeab0b0.js";import"./List-d7c020ab.js";import"./SelectComponent-b1bc4bdd.js";import"./TextArea-4d76f175.js";import"./TextField-a362d747.js";import"./FormControl-f3d9cdb4.js";import"./Select-762ec619.js";import"./Menu-5245abf0.js";import"./Grow-1b15246b.js";import"./useSlotProps-f2e72ab1.js";import"./Dialog-d125aee1.js";import"./DialogTitle-a3176c12.js";import"./DialogContent-d34f4ba4.js";import"./DialogActions-99629c3a.js";import"./index-3cd7bbe9.js";import"./TablePagination-f03db3c2.js";import"./Toolbar-b85f9581.js";import"./MenuItem-02b6c30e.js";import"./dividerClasses-59256fce.js";import"./listItemTextClasses-626eaddb.js";import"./KeyboardArrowRight-ff7c065c.js";import"./LastPage-7938a031.js";import"./Zoom-5361b2cc.js";import"./SwitchBase-d834be30.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 Du=function(A,e){return Du=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])},Du(A,e)};function Kr(A,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Du(A,e);function t(){this.constructor=A}A.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ku=function(){return ku=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},ku.apply(this,arguments)};function Jt(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 c(f){try{u(r.throw(f))}catch(p){o(p)}}function u(f){f.done?i(f.value):n(f.value).then(s,c)}u((r=r.apply(A,e||[])).next())})}function jt(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 c([u,f])}}function c(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 To(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 Ln=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}(),Kc=function(A,e){return Ln.fromClientRect(A,e.getBoundingClientRect())},l2=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 Ln(0,0,r,n)},jc=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},ot=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},_h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Oo=0;Oo<_h.length;Oo++)u2[_h.charCodeAt(Oo)]=Oo;var xh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ms=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Mo=0;Mo<xh.length;Mo++)ms[xh.charCodeAt(Mo)]=Mo;var f2=function(A){var e=A.length*.75,t=A.length,r,n=0,i,o,s,c;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=ms[A.charCodeAt(r)],o=ms[A.charCodeAt(r+1)],s=ms[A.charCodeAt(r+2)],c=ms[A.charCodeAt(r+3)],f[n++]=i<<2|o>>4,f[n++]=(o&15)<<4|s>>2,f[n++]=(s&3)<<6|c&63;return u},h2=function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t},d2=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,bf=6+5,Rl=2,g2=bf-ki,qd=65536>>ki,B2=1<<ki,Kl=B2-1,p2=1024>>ki,w2=qd+p2,v2=w2,m2=32,C2=v2+m2,b2=65536>>bf,F2=1<<g2,Q2=F2-1,Eh=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},y2=function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))},U2=function(A,e){var t=f2(A),r=Array.isArray(t)?d2(t):new Uint32Array(t),n=Array.isArray(t)?h2(t):new Uint16Array(t),i=24,o=Eh(n,i/2,r[4]/2),s=r[5]===2?Eh(n,(i+r[4])/2):y2(r,Math.ceil((i+r[4])/4));return new _2(r[0],r[1],r[2],r[3],o,s)},_2=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<<Rl)+(e&Kl),this.data[t];if(e<=65535)return t=this.index[qd+(e-55296>>ki)],t=(t<<Rl)+(e&Kl),this.data[t];if(e<this.highStart)return t=C2-b2+(e>>bf),t=this.index[t],t+=e>>ki&Q2,t=this.index[t],t=(t<<Rl)+(e&Kl),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),Lh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Po=0;Po<Lh.length;Po++)x2[Lh.charCodeAt(Po)]=Po;var E2=" ",Ih=50,L2=1,Wd=2,zd=3,I2=4,S2=5,Sh=7,Xd=8,Hh=9,Zn=10,Tu=11,Nh=12,Ou=13,H2=14,Cs=15,Mu=16,Ro=17,hs=18,N2=19,Dh=20,Pu=21,ds=22,jl=23,ha=24,dr=25,bs=26,Fs=27,da=28,D2=29,Li=30,k2=31,Ko=32,jo=33,Ru=34,Ku=35,ju=36,Os=37,Gu=38,gc=39,Bc=40,Gl=41,Jd=42,T2=43,O2=[9001,65288],Yd="!",pe="×",Go="÷",Vu=U2(E2),Fn=[Li,ju],qu=[L2,Wd,zd,S2],Zd=[Zn,Xd],kh=[Fs,bs],M2=qu.concat(Zd),Th=[Gu,gc,Bc,Ru,Ku],P2=[Cs,Ou],R2=function(A,e){e===void 0&&(e="strict");var t=[],r=[],n=[];return A.forEach(function(i,o){var s=Vu.get(i);if(s>Ih?(n.push(!0),s-=Ih):n.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return r.push(o),t.push(Mu);if(s===I2||s===Tu){if(o===0)return r.push(o),t.push(Li);var c=t[o-1];return M2.indexOf(c)===-1?(r.push(r[o-1]),t.push(c)):(r.push(o),t.push(Li))}if(r.push(o),s===k2)return t.push(e==="strict"?Pu:Os);if(s===Jd||s===D2)return t.push(Li);if(s===T2)return i>=131072&&i<=196605||i>=196608&&i<=262141?t.push(Os):t.push(Li);t.push(s)}),[r,t,n]},Vl=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!==Zn)break}if(n===Zn)for(var i=t;i>0;){i--;var s=r[i];if(Array.isArray(A)?A.indexOf(s)!==-1:A===s)for(var c=t;c<=r.length;){c++;var o=r[c];if(o===e)return!0;if(o!==Zn)break}if(s!==Zn)break}return!1},Oh=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r===Zn)t--;else return r}return 0},K2=function(A,e,t,r,n){if(t[r]===0)return pe;var i=r-1;if(Array.isArray(n)&&n[i]===!0)return pe;var o=i-1,s=i+1,c=e[i],u=o>=0?e[o]:0,f=e[s];if(c===Wd&&f===zd)return pe;if(qu.indexOf(c)!==-1)return Yd;if(qu.indexOf(f)!==-1||Zd.indexOf(f)!==-1)return pe;if(Oh(i,e)===Xd)return Go;if(Vu.get(A[i])===Tu||(c===Ko||c===jo)&&Vu.get(A[s])===Tu||c===Sh||f===Sh||c===Hh||[Zn,Ou,Cs].indexOf(c)===-1&&f===Hh||[Ro,hs,N2,ha,da].indexOf(f)!==-1||Oh(i,e)===ds||Vl(jl,ds,i,e)||Vl([Ro,hs],Pu,i,e)||Vl(Nh,Nh,i,e))return pe;if(c===Zn)return Go;if(c===jl||f===jl)return pe;if(f===Mu||c===Mu)return Go;if([Ou,Cs,Pu].indexOf(f)!==-1||c===H2||u===ju&&P2.indexOf(c)!==-1||c===da&&f===ju||f===Dh||Fn.indexOf(f)!==-1&&c===dr||Fn.indexOf(c)!==-1&&f===dr||c===Fs&&[Os,Ko,jo].indexOf(f)!==-1||[Os,Ko,jo].indexOf(c)!==-1&&f===bs||Fn.indexOf(c)!==-1&&kh.indexOf(f)!==-1||kh.indexOf(c)!==-1&&Fn.indexOf(f)!==-1||[Fs,bs].indexOf(c)!==-1&&(f===dr||[ds,Cs].indexOf(f)!==-1&&e[s+1]===dr)||[ds,Cs].indexOf(c)!==-1&&f===dr||c===dr&&[dr,da,ha].indexOf(f)!==-1)return pe;if([dr,da,ha,Ro,hs].indexOf(f)!==-1)for(var p=i;p>=0;){var w=e[p];if(w===dr)return pe;if([da,ha].indexOf(w)!==-1)p--;else break}if([Fs,bs].indexOf(f)!==-1)for(var p=[Ro,hs].indexOf(c)!==-1?o:i;p>=0;){var w=e[p];if(w===dr)return pe;if([da,ha].indexOf(w)!==-1)p--;else break}if(Gu===c&&[Gu,gc,Ru,Ku].indexOf(f)!==-1||[gc,Ru].indexOf(c)!==-1&&[gc,Bc].indexOf(f)!==-1||[Bc,Ku].indexOf(c)!==-1&&f===Bc||Th.indexOf(c)!==-1&&[Dh,bs].indexOf(f)!==-1||Th.indexOf(f)!==-1&&c===Fs||Fn.indexOf(c)!==-1&&Fn.indexOf(f)!==-1||c===ha&&Fn.indexOf(f)!==-1||Fn.concat(dr).indexOf(c)!==-1&&f===ds&&O2.indexOf(A[s])===-1||Fn.concat(dr).indexOf(f)!==-1&&c===hs)return pe;if(c===Gl&&f===Gl){for(var g=t[i],F=1;g>0&&(g--,e[g]===Gl);)F++;if(F%2!==0)return pe}return c===Ko&&f===jo?pe:Go},j2=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=R2(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[dr,Li,Jd].indexOf(s)!==-1?Os:s}));var o=e.wordBreak==="keep-all"?i.map(function(s,c){return s&&A[c]>=19968&&A[c]<=40959}):void 0;return[r,n,o]},G2=function(){function A(e,t,r,n){this.codePoints=e,this.required=t===Yd,this.start=r,this.end=n}return A.prototype.slice=function(){return ot.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),V2=function(A,e){var t=jc(A),r=j2(t,e),n=r[0],i=r[1],o=r[2],s=t.length,c=0,u=0;return{next:function(){if(u>=s)return{done:!0,value:null};for(var f=pe;u<s&&(f=K2(t,i,n,++u,o))===pe;);if(f!==pe||u===s){var p=new G2(t,f,c,u);return c=u,{value:p,done:!1}}return{done:!0,value:null}}}},q2=1,W2=2,Xs=4,Mh=8,Uc=10,Ph=47,Es=92,z2=9,X2=32,Vo=34,gs=61,J2=35,Y2=36,Z2=37,qo=39,Wo=40,Bs=41,$2=95,rr=45,Ap=33,ep=60,tp=62,rp=64,np=91,ip=93,ap=61,sp=123,zo=63,op=125,Rh=124,cp=126,lp=128,Kh=65533,ql=42,Si=43,up=44,fp=58,hp=59,Ms=46,dp=0,gp=8,Bp=11,pp=14,wp=31,vp=127,en=-1,$d=48,A1=97,e1=101,mp=102,Cp=117,bp=122,t1=65,r1=69,n1=70,Fp=85,Qp=90,Gt=function(A){return A>=$d&&A<=57},yp=function(A){return A>=55296&&A<=57343},ga=function(A){return Gt(A)||A>=t1&&A<=n1||A>=A1&&A<=mp},Up=function(A){return A>=A1&&A<=bp},_p=function(A){return A>=t1&&A<=Qp},xp=function(A){return Up(A)||_p(A)},Ep=function(A){return A>=lp},Xo=function(A){return A===Uc||A===z2||A===X2},_c=function(A){return xp(A)||Ep(A)||A===$2},jh=function(A){return _c(A)||Gt(A)||A===rr},Lp=function(A){return A>=dp&&A<=gp||A===Bp||A>=pp&&A<=wp||A===vp},Jn=function(A,e){return A!==Es?!1:e!==Uc},Jo=function(A,e,t){return A===rr?_c(e)||Jn(e,t):_c(A)?!0:!!(A===Es&&Jn(A,e))},Wl=function(A,e,t){return A===Si||A===rr?Gt(e)?!0:e===Ms&&Gt(t):Gt(A===Ms?e:A)},Ip=function(A){var e=0,t=1;(A[e]===Si||A[e]===rr)&&(A[e]===rr&&(t=-1),e++);for(var r=[];Gt(A[e]);)r.push(A[e++]);var n=r.length?parseInt(ot.apply(void 0,r),10):0;A[e]===Ms&&e++;for(var i=[];Gt(A[e]);)i.push(A[e++]);var o=i.length,s=o?parseInt(ot.apply(void 0,i),10):0;(A[e]===r1||A[e]===e1)&&e++;var c=1;(A[e]===Si||A[e]===rr)&&(A[e]===rr&&(c=-1),e++);for(var u=[];Gt(A[e]);)u.push(A[e++]);var f=u.length?parseInt(ot.apply(void 0,u),10):0;return t*(n+s*Math.pow(10,-o))*Math.pow(10,c*f)},Sp={type:2},Hp={type:3},Np={type:4},Dp={type:13},kp={type:8},Tp={type:21},Op={type:9},Mp={type:10},Pp={type:11},Rp={type:12},Kp={type:14},Yo={type:23},jp={type:1},Gp={type:25},Vp={type:24},qp={type:26},Wp={type:27},zp={type:28},Xp={type:29},Jp={type:31},Wu={type:32},i1=function(){function A(){this._value=[]}return A.prototype.write=function(e){this._value=this._value.concat(jc(e))},A.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Wu;)e.push(t),t=this.consumeToken();return e},A.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case Vo:return this.consumeStringToken(Vo);case J2:var t=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(jh(t)||Jn(r,n)){var i=Jo(t,r,n)?W2:q2,o=this.consumeName();return{type:5,value:o,flags:i}}break;case Y2:if(this.peekCodePoint(0)===gs)return this.consumeCodePoint(),Dp;break;case qo:return this.consumeStringToken(qo);case Wo:return Sp;case Bs:return Hp;case ql:if(this.peekCodePoint(0)===gs)return this.consumeCodePoint(),Kp;break;case Si:if(Wl(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case up:return Np;case rr:var s=e,c=this.peekCodePoint(0),u=this.peekCodePoint(1);if(Wl(s,c,u))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Jo(s,c,u))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(c===rr&&u===tp)return this.consumeCodePoint(),this.consumeCodePoint(),Vp;break;case Ms:if(Wl(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Ph:if(this.peekCodePoint(0)===ql)for(this.consumeCodePoint();;){var f=this.consumeCodePoint();if(f===ql&&(f=this.consumeCodePoint(),f===Ph))return this.consumeToken();if(f===en)return this.consumeToken()}break;case fp:return qp;case hp:return Wp;case ep:if(this.peekCodePoint(0)===Ap&&this.peekCodePoint(1)===rr&&this.peekCodePoint(2)===rr)return this.consumeCodePoint(),this.consumeCodePoint(),Gp;break;case rp:var p=this.peekCodePoint(0),w=this.peekCodePoint(1),g=this.peekCodePoint(2);if(Jo(p,w,g)){var o=this.consumeName();return{type:7,value:o}}break;case np:return zp;case Es:if(Jn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case ip:return Xp;case ap:if(this.peekCodePoint(0)===gs)return this.consumeCodePoint(),kp;break;case sp:return Pp;case op:return Rp;case Cp:case Fp:var F=this.peekCodePoint(0),y=this.peekCodePoint(1);return F===Si&&(ga(y)||y===zo)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case Rh:if(this.peekCodePoint(0)===gs)return this.consumeCodePoint(),Op;if(this.peekCodePoint(0)===Rh)return this.consumeCodePoint(),Tp;break;case cp:if(this.peekCodePoint(0)===gs)return this.consumeCodePoint(),Mp;break;case en:return Wu}return Xo(e)?(this.consumeWhiteSpace(),Jp):Gt(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):_c(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:ot(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();ga(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var r=!1;t===zo&&e.length<6;)e.push(t),t=this.consumeCodePoint(),r=!0;if(r){var n=parseInt(ot.apply(void 0,e.map(function(c){return c===zo?$d:c})),16),i=parseInt(ot.apply(void 0,e.map(function(c){return c===zo?n1:c})),16);return{type:30,start:n,end:i}}var o=parseInt(ot.apply(void 0,e),16);if(this.peekCodePoint(0)===rr&&ga(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];ga(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();var i=parseInt(ot.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)===Wo?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Wo?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},A.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===en)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===qo||t===Vo){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===en||this.peekCodePoint(0)===Bs)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),Yo)}for(;;){var n=this.consumeCodePoint();if(n===en||n===Bs)return{type:22,value:ot.apply(void 0,e)};if(Xo(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===en||this.peekCodePoint(0)===Bs?(this.consumeCodePoint(),{type:22,value:ot.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Yo);if(n===Vo||n===qo||n===Wo||Lp(n))return this.consumeBadUrlRemnants(),Yo;if(n===Es)if(Jn(n,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Yo;else e.push(n)}},A.prototype.consumeWhiteSpace=function(){for(;Xo(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===Bs||e===en)return;Jn(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+=ot.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===en||n===void 0||n===e)return t+=this.consumeStringSlice(r),{type:0,value:t};if(n===Uc)return this._value.splice(0,r),jp;if(n===Es){var i=this._value[r+1];i!==en&&i!==void 0&&(i===Uc?(t+=this.consumeStringSlice(r),r=-1,this._value.shift()):Jn(n,i)&&(t+=this.consumeStringSlice(r),t+=ot(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},A.prototype.consumeNumber=function(){var e=[],t=Xs,r=this.peekCodePoint(0);for((r===Si||r===rr)&&e.push(this.consumeCodePoint());Gt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(r===Ms&&Gt(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Mh;Gt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((r===r1||r===e1)&&((n===Si||n===rr)&&Gt(i)||Gt(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Mh;Gt(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Ip(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(Jo(n,i,o)){var s=this.consumeName();return{type:15,number:t,flags:r,unit:s}}return n===Z2?(this.consumeCodePoint(),{type:16,number:t,flags:r}):{type:17,number:t,flags:r}},A.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(ga(e)){for(var t=ot(e);ga(this.peekCodePoint(0))&&t.length<6;)t+=ot(this.consumeCodePoint());Xo(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return r===0||yp(r)||r>1114111?Kh:r}return e===en?Kh:e},A.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(jh(t))e+=ot(t);else if(Jn(t,this.peekCodePoint(0)))e+=ot(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},A}(),a1=function(){function A(e){this._tokens=e}return A.create=function(e){var t=new i1;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||Zp(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"?Wu:e},A.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},A}(),Js=function(A){return A.type===15},Ma=function(A){return A.type===17},Ne=function(A){return A.type===20},Yp=function(A){return A.type===0},zu=function(A,e){return Ne(A)&&A.value===e},s1=function(A){return A.type!==31},Da=function(A){return A.type!==31&&A.type!==4},cn=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},Zp=function(A,e){return e===11&&A.type===12||e===28&&A.type===29?!0:e===2&&A.type===3},oi=function(A){return A.type===17||A.type===15},gt=function(A){return A.type===16||oi(A)},o1=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},Nt={type:17,number:0,flags:Xs},Ff={type:16,number:50,flags:Xs},$n={type:16,number:100,flags:Xs},Qs=function(A,e,t){var r=A[0],n=A[1];return[Ke(r,e),Ke(typeof n<"u"?n:r,t)]},Ke=function(A,e){if(A.type===16)return A.number/100*e;if(Js(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},c1="deg",l1="grad",u1="rad",f1="turn",Gc={name:"angle",parse:function(A,e){if(e.type===15)switch(e.unit){case c1:return Math.PI*e.number/180;case l1:return Math.PI/200*e.number;case u1:return e.number;case f1:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},h1=function(A){return A.type===15&&(A.unit===c1||A.unit===l1||A.unit===u1||A.unit===f1)},d1=function(A){var e=A.filter(Ne).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Nt,Nt];case"to top":case"bottom":return xr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Nt,$n];case"to right":case"left":return xr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[$n,$n];case"to bottom":case"top":return xr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[$n,Nt];case"to left":case"right":return xr(270)}return 0},xr=function(A){return Math.PI*A/180},ri={name:"color",parse:function(A,e){if(e.type===18){var t=$p[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 Ai(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 Ai(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 Ai(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 Ai(parseInt(r,16),parseInt(n,16),parseInt(i,16),parseInt(o,16)/255)}}if(e.type===20){var s=En[e.value.toUpperCase()];if(typeof s<"u")return s}return En.TRANSPARENT}},ni=function(A){return(255&A)===0},Qt=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+")"},Ai=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(r*255)<<0)>>>0},Gh=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},Vh=function(A,e){var t=e.filter(Da);if(t.length===3){var r=t.map(Gh),n=r[0],i=r[1],o=r[2];return Ai(n,i,o,1)}if(t.length===4){var s=t.map(Gh),n=s[0],i=s[1],o=s[2],c=s[3];return Ai(n,i,o,c)}return 0};function zl(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 qh=function(A,e){var t=e.filter(Da),r=t[0],n=t[1],i=t[2],o=t[3],s=(r.type===17?xr(r.number):Gc.parse(A,r))/(Math.PI*2),c=gt(n)?n.number/100:0,u=gt(i)?i.number/100:0,f=typeof o<"u"&&gt(o)?Ke(o,1):1;if(c===0)return Ai(u*255,u*255,u*255,1);var p=u<=.5?u*(c+1):u+c-u*c,w=u*2-p,g=zl(w,p,s+1/3),F=zl(w,p,s),y=zl(w,p,s-1/3);return Ai(g*255,F*255,y*255,f)},$p={hsl:qh,hsla:qh,rgb:Vh,rgba:Vh},Ls=function(A,e){return ri.parse(A,a1.create(e).parseComponentValue())},En={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},Aw={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(t){if(Ne(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ew={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Vc=function(A,e){var t=ri.parse(A,e[0]),r=e[1];return r&&gt(r)?{color:t,stop:r}:{color:t,stop:null}},Wh=function(A,e){var t=A[0],r=A[A.length-1];t.stop===null&&(t.stop=Nt),r.stop===null&&(r.stop=$n);for(var n=[],i=0,o=0;o<A.length;o++){var s=A[o].stop;if(s!==null){var c=Ke(s,e);c>i?n.push(c):n.push(i),i=c}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,I){var b=y.color;return{color:b,stop:Math.max(Math.min(1,n[I]/e),0)}})},tw=function(A,e,t){var r=e/2,n=t/2,i=Ke(A[0],e)-r,o=n-Ke(A[1],t);return(Math.atan2(o,i)+Math.PI*2)%(Math.PI*2)},rw=function(A,e,t){var r=typeof A=="number"?A:tw(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,c=Math.sin(r-Math.PI/2)*s,u=Math.cos(r-Math.PI/2)*s;return[n,i-u,i+u,o-c,o+c]},Pr=function(A,e){return Math.sqrt(A*A+e*e)},zh=function(A,e,t,r,n){var i=[[0,0],[0,e],[A,0],[A,e]];return i.reduce(function(o,s){var c=s[0],u=s[1],f=Pr(t-c,r-u);return(n?f<o.optimumDistance:f>o.optimumDistance)?{optimumCorner:s,optimumDistance:f}:o},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},nw=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(Pr(e,t),Pr(e,t-n),Pr(e-r,t),Pr(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)),c=zh(r,n,e,t,!0),u=c[0],f=c[1];i=Pr(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(Pr(e,t),Pr(e,t-n),Pr(e-r,t),Pr(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=zh(r,n,e,t,!1),u=p[0],f=p[1];i=Pr(u-e,(f-t)/s),o=s*i}break}return Array.isArray(A.size)&&(i=Ke(A.size[0],r),o=A.size.length===2?Ke(A.size[1],n):i),[i,o]},iw=function(A,e){var t=xr(180),r=[];return cn(e).forEach(function(n,i){if(i===0){var o=n[0];if(o.type===20&&o.value==="to"){t=d1(n);return}else if(h1(o)){t=Gc.parse(A,o);return}}var s=Vc(A,n);r.push(s)}),{angle:t,stops:r,type:1}},Zo=function(A,e){var t=xr(180),r=[];return cn(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=d1(n);return}else if(h1(o)){t=(Gc.parse(A,o)+xr(270))%xr(360);return}}var s=Vc(A,n);r.push(s)}),{angle:t,stops:r,type:1}},aw=function(A,e){var t=xr(180),r=[],n=1,i=0,o=3,s=[];return cn(e).forEach(function(c,u){var f=c[0];if(u===0){if(Ne(f)&&f.value==="linear"){n=1;return}else if(Ne(f)&&f.value==="radial"){n=2;return}}if(f.type===18){if(f.name==="from"){var p=ri.parse(A,f.values[0]);r.push({stop:Nt,color:p})}else if(f.name==="to"){var p=ri.parse(A,f.values[0]);r.push({stop:$n,color:p})}else if(f.name==="color-stop"){var w=f.values.filter(Da);if(w.length===2){var p=ri.parse(A,w[1]),g=w[0];Ma(g)&&r.push({stop:{type:16,number:g.number*100,flags:g.flags},color:p})}}}}),n===1?{angle:(t+xr(180))%xr(360),stops:r,type:n}:{size:o,shape:i,stops:r,position:s,type:n}},g1="closest-side",B1="farthest-side",p1="closest-corner",w1="farthest-corner",v1="circle",m1="ellipse",C1="cover",b1="contain",sw=function(A,e){var t=0,r=3,n=[],i=[];return cn(e).forEach(function(o,s){var c=!0;if(s===0){var u=!1;c=o.reduce(function(p,w){if(u)if(Ne(w))switch(w.value){case"center":return i.push(Ff),p;case"top":case"left":return i.push(Nt),p;case"right":case"bottom":return i.push($n),p}else(gt(w)||oi(w))&&i.push(w);else if(Ne(w))switch(w.value){case v1:return t=0,!1;case m1:return t=1,!1;case"at":return u=!0,!1;case g1:return r=0,!1;case C1:case B1:return r=1,!1;case b1:case p1:return r=2,!1;case w1:return r=3,!1}else if(oi(w)||gt(w))return Array.isArray(r)||(r=[]),r.push(w),!1;return p},c)}if(c){var f=Vc(A,o);n.push(f)}}),{size:r,shape:t,stops:n,position:i,type:2}},$o=function(A,e){var t=0,r=3,n=[],i=[];return cn(e).forEach(function(o,s){var c=!0;if(s===0?c=o.reduce(function(f,p){if(Ne(p))switch(p.value){case"center":return i.push(Ff),!1;case"top":case"left":return i.push(Nt),!1;case"right":case"bottom":return i.push($n),!1}else if(gt(p)||oi(p))return i.push(p),!1;return f},c):s===1&&(c=o.reduce(function(f,p){if(Ne(p))switch(p.value){case v1:return t=0,!1;case m1:return t=1,!1;case b1:case g1:return r=0,!1;case B1:return r=1,!1;case p1:return r=2,!1;case C1:case w1:return r=3,!1}else if(oi(p)||gt(p))return Array.isArray(r)||(r=[]),r.push(p),!1;return f},c)),c){var u=Vc(A,o);n.push(u)}}),{size:r,shape:t,stops:n,position:i,type:2}},ow=function(A){return A.type===1},cw=function(A){return A.type===2},Qf={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=F1[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 lw(A){return!(A.type===20&&A.value==="none")&&(A.type!==18||!!F1[A.name])}var F1={"linear-gradient":iw,"-moz-linear-gradient":Zo,"-ms-linear-gradient":Zo,"-o-linear-gradient":Zo,"-webkit-linear-gradient":Zo,"radial-gradient":sw,"-moz-radial-gradient":$o,"-ms-radial-gradient":$o,"-o-radial-gradient":$o,"-webkit-radial-gradient":$o,"-webkit-gradient":aw},uw={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 Da(r)&&lw(r)}).map(function(r){return Qf.parse(A,r)})}},fw={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(t){if(Ne(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},hw={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return cn(e).map(function(t){return t.filter(gt)}).map(o1)}},dw={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return cn(e).map(function(t){return t.filter(Ne).map(function(r){return r.value}).join(" ")}).map(gw)}},gw=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}},Ea;(function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"})(Ea||(Ea={}));var Bw={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(A,e){return cn(e).map(function(t){return t.filter(pw)})}},pw=function(A){return Ne(A)||gt(A)},qc=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},ww=qc("top"),vw=qc("right"),mw=qc("bottom"),Cw=qc("left"),Wc=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return o1(t.filter(gt))}}},bw=Wc("top-left"),Fw=Wc("top-right"),Qw=Wc("bottom-right"),yw=Wc("bottom-left"),zc=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}}},Uw=zc("top"),_w=zc("right"),xw=zc("bottom"),Ew=zc("left"),Xc=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Js(t)?t.number:0}}},Lw=Xc("top"),Iw=Xc("right"),Sw=Xc("bottom"),Hw=Xc("left"),Nw={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Dw={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},kw={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(Ne).reduce(function(t,r){return t|Tw(r.value)},0)}},Tw=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},Ow={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}},Mw={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}},xc;(function(A){A.NORMAL="normal",A.STRICT="strict"})(xc||(xc={}));var Pw={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"strict":return xc.STRICT;case"normal":default:return xc.NORMAL}}},Rw={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xh=function(A,e){return Ne(A)&&A.value==="normal"?1.2*e:A.type===17?e*A.number:gt(A)?Ke(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:Qf.parse(A,e)}},jw={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}}},Xu={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}}},Jc=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}},Gw=Jc("top"),Vw=Jc("right"),qw=Jc("bottom"),Ww=Jc("left"),zw={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(Ne).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}})}},Xw={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"}}},Yc=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Jw=Yc("top"),Yw=Yc("right"),Zw=Yc("bottom"),$w=Yc("left"),A5={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}}},e5={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}},t5={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.length===1&&zu(e[0],"none")?[]:cn(e).map(function(t){for(var r={color:En.TRANSPARENT,offsetX:Nt,offsetY:Nt,blur:Nt},n=0,i=0;i<t.length;i++){var o=t[i];oi(o)?(n===0?r.offsetX=o:n===1?r.offsetY=o:r.blur=o,n++):r.color=ri.parse(A,o)}return r})}},r5={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}},n5={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=s5[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},i5=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(c){return c.type===17}).map(function(c){return c.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},s5={matrix:i5,matrix3d:a5},Jh={type:16,number:50,flags:Xs},o5=[Jh,Jh],c5={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(A,e){var t=e.filter(gt);return t.length!==2?o5:[t[0],t[1]]}},l5={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}}},Is;(function(A){A.NORMAL="normal",A.BREAK_ALL="break-all",A.KEEP_ALL="keep-all"})(Is||(Is={}));var u5={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-all":return Is.BREAK_ALL;case"keep-all":return Is.KEEP_ALL;case"normal":default:return Is.NORMAL}}},f5={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(A,e){if(e.type===20)return{auto:!0,order:0};if(Ma(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},Q1={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")}},h5={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(A,e){return Ma(e)?e.number:1}},d5={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},g5={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(A,e){return e.filter(Ne).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})}},B5={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+"'"})}},p5={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},w5={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(A,e){if(Ma(e))return e.number;if(Ne(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},v5={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.filter(Ne).map(function(t){return t.value})}},m5={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"}}},mt=function(A,e){return(A&e)!==0},C5={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(s1),i=0;i<n.length;i++){var o=n[i],s=n[i+1];if(o.type===20){var c=s&&Ma(s)?s.number:1;r.push({counter:o.value,increment:c})}}return r}},F5={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(e.length===0)return[];for(var t=[],r=e.filter(s1),n=0;n<r.length;n++){var i=r[n],o=r[n+1];if(Ne(i)&&i.value!=="none"){var s=o&&Ma(o)?o.number:0;t.push({counter:i.value,reset:s})}}return t}},Q5={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(A,e){return e.filter(Js).map(function(t){return Q1.parse(A,t)})}},y5={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(Yp);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}},Yh=function(A,e,t){if(!A)return"";var r=A[Math.min(e,A.length-1)];return r?t?r.open:r.close:""},U5={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.length===1&&zu(e[0],"none")?[]:cn(e).map(function(t){for(var r={color:255,offsetX:Nt,offsetY:Nt,blur:Nt,spread:Nt,inset:!1},n=0,i=0;i<t.length;i++){var o=t[i];zu(o,"inset")?r.inset=!0:oi(o)?(n===0?r.offsetX=o:n===1?r.offsetY=o:n===2?r.blur=o:r.spread=o,n++):r.color=ri.parse(A,o)}return r})}},_5={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(A,e){var t=[0,1,2],r=[];return e.filter(Ne).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}},x5={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},E5={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return Js(e)?e.number:0}},L5=function(){function A(e,t){var r,n;this.animationDuration=HA(e,Q5,t.animationDuration),this.backgroundClip=HA(e,Aw,t.backgroundClip),this.backgroundColor=HA(e,ew,t.backgroundColor),this.backgroundImage=HA(e,uw,t.backgroundImage),this.backgroundOrigin=HA(e,fw,t.backgroundOrigin),this.backgroundPosition=HA(e,hw,t.backgroundPosition),this.backgroundRepeat=HA(e,dw,t.backgroundRepeat),this.backgroundSize=HA(e,Bw,t.backgroundSize),this.borderTopColor=HA(e,ww,t.borderTopColor),this.borderRightColor=HA(e,vw,t.borderRightColor),this.borderBottomColor=HA(e,mw,t.borderBottomColor),this.borderLeftColor=HA(e,Cw,t.borderLeftColor),this.borderTopLeftRadius=HA(e,bw,t.borderTopLeftRadius),this.borderTopRightRadius=HA(e,Fw,t.borderTopRightRadius),this.borderBottomRightRadius=HA(e,Qw,t.borderBottomRightRadius),this.borderBottomLeftRadius=HA(e,yw,t.borderBottomLeftRadius),this.borderTopStyle=HA(e,Uw,t.borderTopStyle),this.borderRightStyle=HA(e,_w,t.borderRightStyle),this.borderBottomStyle=HA(e,xw,t.borderBottomStyle),this.borderLeftStyle=HA(e,Ew,t.borderLeftStyle),this.borderTopWidth=HA(e,Lw,t.borderTopWidth),this.borderRightWidth=HA(e,Iw,t.borderRightWidth),this.borderBottomWidth=HA(e,Sw,t.borderBottomWidth),this.borderLeftWidth=HA(e,Hw,t.borderLeftWidth),this.boxShadow=HA(e,U5,t.boxShadow),this.color=HA(e,Nw,t.color),this.direction=HA(e,Dw,t.direction),this.display=HA(e,kw,t.display),this.float=HA(e,Ow,t.cssFloat),this.fontFamily=HA(e,B5,t.fontFamily),this.fontSize=HA(e,p5,t.fontSize),this.fontStyle=HA(e,m5,t.fontStyle),this.fontVariant=HA(e,v5,t.fontVariant),this.fontWeight=HA(e,w5,t.fontWeight),this.letterSpacing=HA(e,Mw,t.letterSpacing),this.lineBreak=HA(e,Pw,t.lineBreak),this.lineHeight=HA(e,Rw,t.lineHeight),this.listStyleImage=HA(e,Kw,t.listStyleImage),this.listStylePosition=HA(e,jw,t.listStylePosition),this.listStyleType=HA(e,Xu,t.listStyleType),this.marginTop=HA(e,Gw,t.marginTop),this.marginRight=HA(e,Vw,t.marginRight),this.marginBottom=HA(e,qw,t.marginBottom),this.marginLeft=HA(e,Ww,t.marginLeft),this.opacity=HA(e,h5,t.opacity);var i=HA(e,zw,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=HA(e,Xw,t.overflowWrap),this.paddingTop=HA(e,Jw,t.paddingTop),this.paddingRight=HA(e,Yw,t.paddingRight),this.paddingBottom=HA(e,Zw,t.paddingBottom),this.paddingLeft=HA(e,$w,t.paddingLeft),this.paintOrder=HA(e,_5,t.paintOrder),this.position=HA(e,e5,t.position),this.textAlign=HA(e,A5,t.textAlign),this.textDecorationColor=HA(e,d5,(r=t.textDecorationColor)!==null&&r!==void 0?r:t.color),this.textDecorationLine=HA(e,g5,(n=t.textDecorationLine)!==null&&n!==void 0?n:t.textDecoration),this.textShadow=HA(e,t5,t.textShadow),this.textTransform=HA(e,r5,t.textTransform),this.transform=HA(e,n5,t.transform),this.transformOrigin=HA(e,c5,t.transformOrigin),this.visibility=HA(e,l5,t.visibility),this.webkitTextStrokeColor=HA(e,x5,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=HA(e,E5,t.webkitTextStrokeWidth),this.wordBreak=HA(e,u5,t.wordBreak),this.zIndex=HA(e,f5,t.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},A.prototype.isTransparent=function(){return ni(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 mt(this.display,4)||mt(this.display,33554432)||mt(this.display,268435456)||mt(this.display,536870912)||mt(this.display,67108864)||mt(this.display,134217728)},A}(),I5=function(){function A(e,t){this.content=HA(e,C5,t.content),this.quotes=HA(e,y5,t.quotes)}return A}(),Zh=function(){function A(e,t){this.counterIncrement=HA(e,b5,t.counterIncrement),this.counterReset=HA(e,F5,t.counterReset)}return A}(),HA=function(A,e,t){var r=new i1,n=t!==null&&typeof t<"u"?t.toString():e.initialValue;r.write(n);var i=new a1(r.read());switch(e.type){case 2:var o=i.parseComponentValue();return e.parse(A,Ne(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 Gc.parse(A,i.parseComponentValue());case"color":return ri.parse(A,i.parseComponentValue());case"image":return Qf.parse(A,i.parseComponentValue());case"length":var s=i.parseComponentValue();return oi(s)?s:Nt;case"length-percentage":var c=i.parseComponentValue();return gt(c)?c:Nt;case"time":return Q1.parse(A,i.parseComponentValue())}break}},S5="data-html2canvas-debug",H5=function(A){var e=A.getAttribute(S5);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Ju=function(A,e){var t=H5(A);return t===1||e===t},ln=function(){function A(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Ju(t,3))debugger;this.styles=new L5(e,window.getComputedStyle(t,null)),$u(t)&&(this.styles.animationDuration.some(function(r){return r>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Kc(this.context,t),Ju(t,4)&&(this.flags|=16)}return A}(),N5=" ",$h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ys=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ac=0;Ac<$h.length;Ac++)ys[$h.charCodeAt(Ac)]=Ac;var D5=function(A){var e=A.length*.75,t=A.length,r,n=0,i,o,s,c;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=ys[A.charCodeAt(r)],o=ys[A.charCodeAt(r+1)],s=ys[A.charCodeAt(r+2)],c=ys[A.charCodeAt(r+3)],f[n++]=i<<2|o>>4,f[n++]=(o&15)<<4|s>>2,f[n++]=(s&3)<<6|c&63;return u},k5=function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t},T5=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},Ti=5,yf=6+5,Xl=2,O5=yf-Ti,y1=65536>>Ti,M5=1<<Ti,Jl=M5-1,P5=1024>>Ti,R5=y1+P5,K5=R5,j5=32,G5=K5+j5,V5=65536>>yf,q5=1<<O5,W5=q5-1,A0=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},z5=function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))},X5=function(A,e){var t=D5(A),r=Array.isArray(t)?T5(t):new Uint32Array(t),n=Array.isArray(t)?k5(t):new Uint16Array(t),i=24,o=A0(n,i/2,r[4]/2),s=r[5]===2?A0(n,(i+r[4])/2):z5(r,Math.ceil((i+r[4])/4));return new J5(r[0],r[1],r[2],r[3],o,s)},J5=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>>Ti],t=(t<<Xl)+(e&Jl),this.data[t];if(e<=65535)return t=this.index[y1+(e-55296>>Ti)],t=(t<<Xl)+(e&Jl),this.data[t];if(e<this.highStart)return t=G5-V5+(e>>yf),t=this.index[t],t+=e>>Ti&W5,t=this.index[t],t=(t<<Xl)+(e&Jl),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),e0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y5=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ec=0;ec<e0.length;ec++)Y5[e0.charCodeAt(ec)]=ec;var Z5=1,Yl=2,Zl=3,t0=4,r0=5,$5=7,n0=8,$l=9,Au=10,i0=11,a0=12,s0=13,o0=14,eu=15,Av=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},ev=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},tv=X5(N5),yr="×",tu="÷",rv=function(A){return tv.get(A)},nv=function(A,e,t){var r=t-2,n=e[r],i=e[t-1],o=e[t];if(i===Yl&&o===Zl)return yr;if(i===Yl||i===Zl||i===t0||o===Yl||o===Zl||o===t0)return tu;if(i===n0&&[n0,$l,i0,a0].indexOf(o)!==-1||(i===i0||i===$l)&&(o===$l||o===Au)||(i===a0||i===Au)&&o===Au||o===s0||o===r0||o===$5||i===Z5)return yr;if(i===s0&&o===o0){for(;n===r0;)n=e[--r];if(n===o0)return yr}if(i===eu&&o===eu){for(var s=0;n===eu;)s++,n=e[--r];if(s%2===0)return yr}return tu},iv=function(A){var e=Av(A),t=e.length,r=0,n=0,i=e.map(rv);return{next:function(){if(r>=t)return{done:!0,value:null};for(var o=yr;r<t&&(o=nv(e,i,++r))===yr;);if(o!==yr||r===t){var s=ev.apply(null,e.slice(n,r));return n=r,{value:s,done:!1}}return{done:!0,value:null}}}},av=function(A){for(var e=iv(A),t=[],r;!(r=e.next()).done;)r.value&&t.push(r.value.slice());return t},sv=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},ov=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=jc(r.data).map(function(c){return ot(c)}),i=0,o={},s=n.every(function(c,u){t.setStart(r,i),t.setEnd(r,i+c.length);var f=t.getBoundingClientRect();i+=c.length;var p=f.x>o.x||f.y>o.y;return o=f,u===0?!0:p});return A.body.removeChild(e),s},cv=function(){return typeof new Image().crossOrigin<"u"},lv=function(){return typeof new XMLHttpRequest().responseType=="string"},uv=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},c0=function(A){return A[0]===0&&A[1]===255&&A[2]===0&&A[3]===255},fv=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=Yu(t,t,0,0,n);return r.fillStyle="red",r.fillRect(0,0,t,t),l0(o).then(function(s){r.drawImage(s,0,0);var c=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",c0(c)?l0(Yu(t,t,0,0,u)):Promise.reject(!1)}).then(function(s){return r.drawImage(s,0,0),c0(r.getImageData(0,0,t,t).data)}).catch(function(){return!1})},Yu=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},l0=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))})},Ht={get SUPPORT_RANGE_BOUNDS(){var A=sv(document);return Object.defineProperty(Ht,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){var A=Ht.SUPPORT_RANGE_BOUNDS&&ov(document);return Object.defineProperty(Ht,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=uv(document);return Object.defineProperty(Ht,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A=typeof Array.from=="function"&&typeof window.fetch=="function"?fv(document):Promise.resolve(!1);return Object.defineProperty(Ht,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=cv();return Object.defineProperty(Ht,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=lv();return Object.defineProperty(Ht,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ht,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Ht,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},Ss=function(){function A(e,t){this.text=e,this.bounds=t}return A}(),hv=function(A,e,t,r){var n=Bv(e,t),i=[],o=0;return n.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(Ht.SUPPORT_RANGE_BOUNDS){var c=u0(r,o,s.length).getClientRects();if(c.length>1){var u=Uf(s),f=0;u.forEach(function(w){i.push(new Ss(w,Ln.fromDOMRectList(A,u0(r,f+o,w.length).getClientRects()))),f+=w.length})}else i.push(new Ss(s,Ln.fromDOMRectList(A,c)))}else{var p=r.splitText(s.length);i.push(new Ss(s,dv(A,r))),r=p}else Ht.SUPPORT_RANGE_BOUNDS||(r=r.splitText(s.length));o+=s.length}),i},dv=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=Kc(A,r);return r.firstChild&&n.replaceChild(r.firstChild,r),i}}return Ln.EMPTY},u0=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},Uf=function(A){if(Ht.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)},gv=function(A,e){if(Ht.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 wv(A,e)},Bv=function(A,e){return e.letterSpacing!==0?Uf(A):gv(A,e)},pv=[32,160,4961,65792,65793,4153,4241],wv=function(A,e){for(var t=V2(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=jc(o),c="";s.forEach(function(u){pv.indexOf(u)===-1?c+=ot(u):(c.length&&r.push(c),r.push(ot(u)),c="")}),c.length&&r.push(c)}};!(n=t.next()).done;)i();return r},vv=function(){function A(e,t,r){this.text=mv(t.data,r.textTransform),this.textBounds=hv(e,this.text,r,t)}return A}(),mv=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(Cv,bv);case 2:return A.toUpperCase();default:return A}},Cv=/(^|\s|:|-|\(|\))([a-z])/g,bv=function(A,e,t){return A.length>0?e+t.toUpperCase():A},U1=function(A){Kr(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}(ln),_1=function(A){Kr(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}(ln),x1=function(A){Kr(e,A);function e(t,r){var n=A.call(this,t,r)||this,i=new XMLSerializer,o=Kc(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}(ln),E1=function(A){Kr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.value=r.value,n}return e}(ln),Zu=function(A){Kr(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}(ln),Fv=[{type:15,flags:0,unit:"px",number:3}],Qv=[{type:16,flags:0,number:50}],yv=function(A){return A.width>A.height?new Ln(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width<A.height?new Ln(A.left,A.top+(A.height-A.width)/2,A.width,A.width):A},Uv=function(A){var e=A.type===_v?new Array(A.value.length+1).join("•"):A.value;return e.length===0?A.placeholder||"":e},Ec="checkbox",Lc="radio",_v="password",f0=707406591,_f=function(A){Kr(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=Uv(r),(n.type===Ec||n.type===Lc)&&(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=yv(n.bounds)),n.type){case Ec:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Fv;break;case Lc:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Qv;break}return n}return e}(ln),L1=function(A){Kr(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}(ln),I1=function(A){Kr(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.value=r.value,n}return e}(ln),S1=function(A){Kr(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=N1(t,r.contentWindow.document.documentElement);var i=r.contentWindow.document.documentElement?Ls(t,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):En.TRANSPARENT,o=r.contentWindow.document.body?Ls(t,getComputedStyle(r.contentWindow.document.body).backgroundColor):En.TRANSPARENT;n.backgroundColor=ni(i)?ni(o)?n.styles.backgroundColor:o:i}}catch{}return n}return e}(ln),xv=["OL","UL","MENU"],pc=function(A,e,t,r){for(var n=e.firstChild,i=void 0;n;n=i)if(i=n.nextSibling,D1(n)&&n.data.trim().length>0)t.textNodes.push(new vv(A,n,t.styles));else if(_a(n))if(M1(n)&&n.assignedNodes)n.assignedNodes().forEach(function(s){return pc(A,s,t,r)});else{var o=H1(A,n);o.styles.isVisible()&&(Ev(n,o,r)?o.flags|=4:Lv(o.styles)&&(o.flags|=2),xv.indexOf(n.tagName)!==-1&&(o.flags|=8),t.elements.push(o),n.slot,n.shadowRoot?pc(A,n.shadowRoot,o,r):!Ic(n)&&!k1(n)&&!Sc(n)&&pc(A,n,o,r))}},H1=function(A,e){return Af(e)?new U1(A,e):T1(e)?new _1(A,e):k1(e)?new x1(A,e):Iv(e)?new E1(A,e):Sv(e)?new Zu(A,e):Hv(e)?new _f(A,e):Sc(e)?new L1(A,e):Ic(e)?new I1(A,e):O1(e)?new S1(A,e):new ln(A,e)},N1=function(A,e){var t=H1(A,e);return t.flags|=4,pc(A,e,t,t),t},Ev=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||xf(A)&&t.styles.isTransparent()},Lv=function(A){return A.isPositioned()||A.isFloating()},D1=function(A){return A.nodeType===Node.TEXT_NODE},_a=function(A){return A.nodeType===Node.ELEMENT_NODE},$u=function(A){return _a(A)&&typeof A.style<"u"&&!wc(A)},wc=function(A){return typeof A.className=="object"},Iv=function(A){return A.tagName==="LI"},Sv=function(A){return A.tagName==="OL"},Hv=function(A){return A.tagName==="INPUT"},Nv=function(A){return A.tagName==="HTML"},k1=function(A){return A.tagName==="svg"},xf=function(A){return A.tagName==="BODY"},T1=function(A){return A.tagName==="CANVAS"},h0=function(A){return A.tagName==="VIDEO"},Af=function(A){return A.tagName==="IMG"},O1=function(A){return A.tagName==="IFRAME"},d0=function(A){return A.tagName==="STYLE"},Dv=function(A){return A.tagName==="SCRIPT"},Ic=function(A){return A.tagName==="TEXTAREA"},Sc=function(A){return A.tagName==="SELECT"},M1=function(A){return A.tagName==="SLOT"},g0=function(A){return A.tagName.indexOf("-")>0},kv=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 c=t.counters[s.counter];c&&s.increment!==0&&(i=!1,c.length||c.push(1),c[Math.max(0,c.length-1)]+=s.increment)});var o=[];return i&&n.forEach(function(s){var c=t.counters[s.counter];o.push(s.counter),c||(c=t.counters[s.counter]=[]),c.push(s.reset)}),o},A}(),B0={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"]},p0={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Tv={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ov={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ba=function(A,e,t,r,n,i){return A<e||A>t?Ps(A,n,i.length>0):r.integers.reduce(function(o,s,c){for(;A>=s;)A-=s,o+=r.values[c];return o},"")+i},P1=function(A,e,t,r){var n="";do t||A--,n=r(A)+n,A/=e;while(A*e>=e);return n},st=function(A,e,t,r,n){var i=t-e+1;return(A<0?"-":"")+(P1(Math.abs(A),i,r,function(o){return ot(Math.floor(o%i)+e)})+n)},xi=function(A,e,t){t===void 0&&(t=". ");var r=e.length;return P1(Math.abs(A),r,!1,function(n){return e[Math.floor(n%r)]})+t},Fa=1,zn=2,Xn=4,Us=8,Qn=function(A,e,t,r,n,i){if(A<-9999||A>9999)return Ps(A,4,n.length>0);var o=Math.abs(A),s=n;if(o===0)return e[0]+s;for(var c=0;o>0&&c<=4;c++){var u=o%10;u===0&&mt(i,Fa)&&s!==""?s=e[u]+s:u>1||u===1&&c===0||u===1&&c===1&&mt(i,zn)||u===1&&c===1&&mt(i,Xn)&&A>100||u===1&&c>1&&mt(i,Us)?s=e[u]+(c>0?t[c-1]:"")+s:u===1&&c>0&&(s=t[c-1]+s),o=Math.floor(o/10)}return(A<0?r:"")+s},w0="十百千萬",v0="拾佰仟萬",m0="マイナス",ru="마이너스",Ps=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=st(A,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return xi(A,"〇一二三四五六七八九",n);case 6:return Ba(A,1,3999,B0,3,r).toLowerCase();case 7:return Ba(A,1,3999,B0,3,r);case 8:return st(A,945,969,!1,r);case 9:return st(A,97,122,!1,r);case 10:return st(A,65,90,!1,r);case 11:return st(A,1632,1641,!0,r);case 12:case 49:return Ba(A,1,9999,p0,3,r);case 35:return Ba(A,1,9999,p0,3,r).toLowerCase();case 13:return st(A,2534,2543,!0,r);case 14:case 30:return st(A,6112,6121,!0,r);case 15:return xi(A,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return xi(A,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return Qn(A,"零一二三四五六七八九",w0,"負",n,zn|Xn|Us);case 47:return Qn(A,"零壹貳參肆伍陸柒捌玖",v0,"負",n,Fa|zn|Xn|Us);case 42:return Qn(A,"零一二三四五六七八九",w0,"负",n,zn|Xn|Us);case 41:return Qn(A,"零壹贰叁肆伍陆柒捌玖",v0,"负",n,Fa|zn|Xn|Us);case 26:return Qn(A,"〇一二三四五六七八九","十百千万",m0,n,0);case 25:return Qn(A,"零壱弐参四伍六七八九","拾百千万",m0,n,Fa|zn|Xn);case 31:return Qn(A,"영일이삼사오육칠팔구","십백천만",ru,i,Fa|zn|Xn);case 33:return Qn(A,"零一二三四五六七八九","十百千萬",ru,i,0);case 32:return Qn(A,"零壹貳參四五六七八九","拾百千",ru,i,Fa|zn|Xn);case 18:return st(A,2406,2415,!0,r);case 20:return Ba(A,1,19999,Ov,3,r);case 21:return st(A,2790,2799,!0,r);case 22:return st(A,2662,2671,!0,r);case 22:return Ba(A,1,10999,Tv,3,r);case 23:return xi(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return xi(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return st(A,3302,3311,!0,r);case 28:return xi(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return xi(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return st(A,3792,3801,!0,r);case 37:return st(A,6160,6169,!0,r);case 38:return st(A,4160,4169,!0,r);case 39:return st(A,2918,2927,!0,r);case 40:return st(A,1776,1785,!0,r);case 43:return st(A,3046,3055,!0,r);case 44:return st(A,3174,3183,!0,r);case 45:return st(A,3664,3673,!0,r);case 46:return st(A,3872,3881,!0,r);case 3:default:return st(A,48,57,!0,r)}},R1="data-html2canvas-ignore",C0=function(){function A(e,t,r){if(this.context=e,this.options=r,this.scrolledElements=[],this.referenceElement=t,this.counters=new kv,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=Mv(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,c=s.document,u=Kv(n).then(function(){return Jt(r,void 0,void 0,function(){var f,p;return jt(this,function(w){switch(w.label){case 0:return this.scrolledElements.forEach(qv),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")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:w.sent(),w.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Rv(c)]:[3,4];case 3:w.sent(),w.label=4;case 4:return typeof f=="function"?[2,Promise.resolve().then(function(){return f(c,p)}).then(function(){return n})]:[2,n]}})})});return c.open(),c.write(Gv(document.doctype)+"<html></html>"),Vv(this.referenceElement.ownerDocument,i,o),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),u},A.prototype.createElementClone=function(e){if(Ju(e,2))debugger;if(T1(e))return this.createCanvasClone(e);if(h0(e))return this.createVideoClone(e);if(d0(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Af(t)&&(Af(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),g0(t)?this.createCustomElementClone(t):t},A.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return nu(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 c=s.getContextAttributes();(c==null?void 0:c.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){(!_a(t)||!Dv(t)&&!t.hasAttribute(R1)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!_a(t)||!d0(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(_a(i)&&M1(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(D1(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var r=e.ownerDocument.defaultView;if(r&&_a(e)&&($u(e)||wc(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&&$u(n)&&(this.clonedReferenceElement=n),xf(n)&&Xv(n);var c=this.counters.parse(new Zh(this.context,i)),u=this.resolvePseudoContent(e,n,o,Hs.BEFORE);g0(e)&&(t=!0),h0(e)||this.cloneChildNodes(e,n,t),u&&n.insertBefore(u,n.firstChild);var f=this.resolvePseudoContent(e,n,s,Hs.AFTER);return f&&n.appendChild(f),this.counters.pop(c),(i&&(this.options.copyStyles||wc(e))&&!O1(e)||t)&&nu(i,n),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(Ic(e)||Sc(e))&&(Ic(n)||Sc(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 Zh(this.context,r));var c=new I5(this.context,r),u=s.createElement("html2canvaspseudoelement");nu(r,u),c.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(Ne);g.length&&u.appendChild(s.createTextNode(e.getAttribute(g[0].value)||""))}else if(p.name==="counter"){var F=p.values.filter(Da),y=F[0],I=F[1];if(y&&Ne(y)){var b=i.counters.getCounterValue(y.value),M=I&&Ne(I)?Xu.parse(i.context,I.value):3;u.appendChild(s.createTextNode(Ps(b,M,!1)))}}else if(p.name==="counters"){var G=p.values.filter(Da),y=G[0],O=G[1],I=G[2];if(y&&Ne(y)){var J=i.counters.getCounterValues(y.value),Z=I&&Ne(I)?Xu.parse(i.context,I.value):3,nA=O&&O.type===0?O.value:"",q=J.map(function(_){return Ps(_,Z,!1)}).join(nA);u.appendChild(s.createTextNode(q))}}}else if(p.type===20)switch(p.value){case"open-quote":u.appendChild(s.createTextNode(Yh(c.quotes,i.quoteDepth++,!0)));break;case"close-quote":u.appendChild(s.createTextNode(Yh(c.quotes,--i.quoteDepth,!1)));break;default:u.appendChild(s.createTextNode(p.value))}}),u.className=ef+" "+tf;var f=n===Hs.BEFORE?" "+ef:" "+tf;return wc(t)?t.className.baseValue+=f:t.className+=f,u}}},A.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},A}(),Hs;(function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"})(Hs||(Hs={}));var Mv=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(R1,"true"),A.body.appendChild(t),t},Pv=function(A){return new Promise(function(e){if(A.complete){e();return}if(!A.src){e();return}A.onload=e,A.onerror=e})},Rv=function(A){return Promise.all([].slice.call(A.images,0).map(Pv))},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)}})},jv=["all","d","content"],nu=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);jv.indexOf(r)===-1&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Gv=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},Vv=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},qv=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},Wv=":before",zv=":after",ef="___html2canvas___pseudoelement_before",tf="___html2canvas___pseudoelement_after",b0=`{
    content: "" !important;
    display: none !important;
}`,Xv=function(A){Jv(A,"."+ef+Wv+b0+`
         .`+tf+zv+b0)},Jv=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},K1=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}(),Yv=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)||(au(e)||em(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 Jt(this,void 0,void 0,function(){var t,r,n,i,o=this;return jt(this,function(s){switch(s.label){case 0:return t=K1.isSameOrigin(e),r=!iu(e)&&this._options.useCORS===!0&&Ht.SUPPORT_CORS_IMAGES&&!t,n=!iu(e)&&!t&&!au(e)&&typeof this._options.proxy=="string"&&Ht.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!iu(e)&&!au(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(c,u){var f=new Image;f.onload=function(){return c(f)},f.onerror=u,(tm(i)||r)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return c(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=Ht.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(s==="text")i(c.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(c.response)}else o("Failed to proxy resource "+n+" with status code "+c.status)},c.onerror=o;var u=r.indexOf("?")>-1?"&":"?";if(c.open("GET",""+r+u+"url="+encodeURIComponent(e)+"&responseType="+s),s!=="text"&&c instanceof XMLHttpRequest&&(c.responseType=s),t._options.imageTimeout){var f=t._options.imageTimeout;c.timeout=f,c.ontimeout=function(){return o("Timed out ("+f+"ms) proxying "+n)}}c.send()})},A}(),Zv=/^data:image\/svg\+xml/i,$v=/^data:image\/.*;base64,/i,Am=/^data:image\/.*/i,em=function(A){return Ht.SUPPORT_SVG_DRAWING||!rm(A)},iu=function(A){return Am.test(A)},tm=function(A){return $v.test(A)},au=function(A){return A.substr(0,4)==="blob"},rm=function(A){return A.substr(-3).toLowerCase()==="svg"||Zv.test(A)},IA=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}(),pa=function(A,e,t){return new IA(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},tc=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=pa(this.start,this.startControl,e),n=pa(this.startControl,this.endControl,e),i=pa(this.endControl,this.end,e),o=pa(r,n,e),s=pa(n,i,e),c=pa(o,s,e);return t?new A(this.start,r,o,c):new A(c,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}(),Ur=function(A){return A.type===1},nm=function(){function A(e){var t=e.styles,r=e.bounds,n=Qs(t.borderTopLeftRadius,r.width,r.height),i=n[0],o=n[1],s=Qs(t.borderTopRightRadius,r.width,r.height),c=s[0],u=s[1],f=Qs(t.borderBottomRightRadius,r.width,r.height),p=f[0],w=f[1],g=Qs(t.borderBottomLeftRadius,r.width,r.height),F=g[0],y=g[1],I=[];I.push((i+c)/r.width),I.push((F+p)/r.width),I.push((o+y)/r.height),I.push((u+w)/r.height);var b=Math.max.apply(Math,I);b>1&&(i/=b,o/=b,c/=b,u/=b,p/=b,w/=b,F/=b,y/=b);var M=r.width-c,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=Ke(t.paddingTop,e.bounds.width),_=Ke(t.paddingRight,e.bounds.width),S=Ke(t.paddingBottom,e.bounds.width),P=Ke(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?ze(r.left+H/3,r.top+Z/3,i-H/3,o-Z/3,Ee.TOP_LEFT):new IA(r.left+H/3,r.top+Z/3),this.topRightBorderDoubleOuterBox=i>0||o>0?ze(r.left+M,r.top+Z/3,c-nA/3,u-Z/3,Ee.TOP_RIGHT):new IA(r.left+r.width-nA/3,r.top+Z/3),this.bottomRightBorderDoubleOuterBox=p>0||w>0?ze(r.left+O,r.top+G,p-nA/3,w-q/3,Ee.BOTTOM_RIGHT):new IA(r.left+r.width-nA/3,r.top+r.height-q/3),this.bottomLeftBorderDoubleOuterBox=F>0||y>0?ze(r.left+H/3,r.top+J,F-H/3,y-q/3,Ee.BOTTOM_LEFT):new IA(r.left+H/3,r.top+r.height-q/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?ze(r.left+H*2/3,r.top+Z*2/3,i-H*2/3,o-Z*2/3,Ee.TOP_LEFT):new IA(r.left+H*2/3,r.top+Z*2/3),this.topRightBorderDoubleInnerBox=i>0||o>0?ze(r.left+M,r.top+Z*2/3,c-nA*2/3,u-Z*2/3,Ee.TOP_RIGHT):new IA(r.left+r.width-nA*2/3,r.top+Z*2/3),this.bottomRightBorderDoubleInnerBox=p>0||w>0?ze(r.left+O,r.top+G,p-nA*2/3,w-q*2/3,Ee.BOTTOM_RIGHT):new IA(r.left+r.width-nA*2/3,r.top+r.height-q*2/3),this.bottomLeftBorderDoubleInnerBox=F>0||y>0?ze(r.left+H*2/3,r.top+J,F-H*2/3,y-q*2/3,Ee.BOTTOM_LEFT):new IA(r.left+H*2/3,r.top+r.height-q*2/3),this.topLeftBorderStroke=i>0||o>0?ze(r.left+H/2,r.top+Z/2,i-H/2,o-Z/2,Ee.TOP_LEFT):new IA(r.left+H/2,r.top+Z/2),this.topRightBorderStroke=i>0||o>0?ze(r.left+M,r.top+Z/2,c-nA/2,u-Z/2,Ee.TOP_RIGHT):new IA(r.left+r.width-nA/2,r.top+Z/2),this.bottomRightBorderStroke=p>0||w>0?ze(r.left+O,r.top+G,p-nA/2,w-q/2,Ee.BOTTOM_RIGHT):new IA(r.left+r.width-nA/2,r.top+r.height-q/2),this.bottomLeftBorderStroke=F>0||y>0?ze(r.left+H/2,r.top+J,F-H/2,y-q/2,Ee.BOTTOM_LEFT):new IA(r.left+H/2,r.top+r.height-q/2),this.topLeftBorderBox=i>0||o>0?ze(r.left,r.top,i,o,Ee.TOP_LEFT):new IA(r.left,r.top),this.topRightBorderBox=c>0||u>0?ze(r.left+M,r.top,c,u,Ee.TOP_RIGHT):new IA(r.left+r.width,r.top),this.bottomRightBorderBox=p>0||w>0?ze(r.left+O,r.top+G,p,w,Ee.BOTTOM_RIGHT):new IA(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=F>0||y>0?ze(r.left,r.top+J,F,y,Ee.BOTTOM_LEFT):new IA(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||o>0?ze(r.left+H,r.top+Z,Math.max(0,i-H),Math.max(0,o-Z),Ee.TOP_LEFT):new IA(r.left+H,r.top+Z),this.topRightPaddingBox=c>0||u>0?ze(r.left+Math.min(M,r.width-nA),r.top+Z,M>r.width+nA?0:Math.max(0,c-nA),Math.max(0,u-Z),Ee.TOP_RIGHT):new IA(r.left+r.width-nA,r.top+Z),this.bottomRightPaddingBox=p>0||w>0?ze(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),Ee.BOTTOM_RIGHT):new IA(r.left+r.width-nA,r.top+r.height-q),this.bottomLeftPaddingBox=F>0||y>0?ze(r.left+H,r.top+Math.min(J,r.height-q),Math.max(0,F-H),Math.max(0,y-q),Ee.BOTTOM_LEFT):new IA(r.left+H,r.top+r.height-q),this.topLeftContentBox=i>0||o>0?ze(r.left+H+P,r.top+Z+AA,Math.max(0,i-(H+P)),Math.max(0,o-(Z+AA)),Ee.TOP_LEFT):new IA(r.left+H+P,r.top+Z+AA),this.topRightContentBox=c>0||u>0?ze(r.left+Math.min(M,r.width+H+P),r.top+Z+AA,M>r.width+H+P?0:c-H+P,u-(Z+AA),Ee.TOP_RIGHT):new IA(r.left+r.width-(nA+_),r.top+Z+AA),this.bottomRightContentBox=p>0||w>0?ze(r.left+Math.min(O,r.width-(H+P)),r.top+Math.min(G,r.height+Z+AA),Math.max(0,p-(nA+_)),w-(q+S),Ee.BOTTOM_RIGHT):new IA(r.left+r.width-(nA+_),r.top+r.height-(q+S)),this.bottomLeftContentBox=F>0||y>0?ze(r.left+H+P,r.top+J,Math.max(0,F-(H+P)),y-(q+S),Ee.BOTTOM_LEFT):new IA(r.left+H+P,r.top+r.height-(q+S))}return A}(),Ee;(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"})(Ee||(Ee={}));var ze=function(A,e,t,r,n){var i=4*((Math.sqrt(2)-1)/3),o=t*i,s=r*i,c=A+t,u=e+r;switch(n){case Ee.TOP_LEFT:return new tc(new IA(A,u),new IA(A,u-s),new IA(c-o,e),new IA(c,e));case Ee.TOP_RIGHT:return new tc(new IA(A,e),new IA(A+o,e),new IA(c,u-s),new IA(c,u));case Ee.BOTTOM_RIGHT:return new tc(new IA(c,e),new IA(c,e+s),new IA(A+o,u),new IA(A,u));case Ee.BOTTOM_LEFT:default:return new tc(new IA(c,u),new IA(c-o,u),new IA(A,e+s),new IA(A,e))}},Hc=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},im=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Nc=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}(),rc=function(){function A(e,t){this.path=e,this.target=t,this.type=1}return A}(),sm=function(){function A(e){this.opacity=e,this.type=2,this.target=6}return A}(),om=function(A){return A.type===0},j1=function(A){return A.type===1},cm=function(A){return A.type===2},F0=function(A,e){return A.length===e.length?A.some(function(t,r){return t===e[r]}):!1},lm=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})},G1=function(){function A(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),V1=function(){function A(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new nm(this.container),this.container.styles.opacity<1&&this.effects.push(new sm(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=Hc(this.curves),s=Nc(this.curves);F0(o,s)?this.effects.push(new rc(o,6)):(this.effects.push(new rc(o,2)),this.effects.push(new rc(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(c){return!j1(c)});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=Hc(r.curves),s=Nc(r.curves);F0(o,s)||n.unshift(new rc(s,6))}}else n.unshift.apply(n,i);r=r.parent}return n.filter(function(c){return mt(c.target,e)})},A}(),rf=function(A,e,t,r){A.container.elements.forEach(function(n){var i=mt(n.flags,4),o=mt(n.flags,2),s=new V1(n,A);mt(n.styles.display,2048)&&r.push(s);var c=mt(n.flags,8)?[]:r;if(i||o){var u=i||n.styles.isPositioned()?t:e,f=new G1(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);rf(s,f,i?f:t,c)}else n.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),rf(s,e,t,c);mt(n.flags,8)&&q1(n,c)})},q1=function(A,e){for(var t=A instanceof Zu?A.start:1,r=A instanceof Zu?A.reversed:!1,n=0;n<e.length;n++){var i=e[n];i.container instanceof E1&&typeof i.container.value=="number"&&i.container.value!==0&&(t=i.container.value),i.listValue=Ps(t,i.container.styles.listStyleType,!0),t+=r?-1:1}},um=function(A){var e=new V1(A,null),t=new G1(e),r=[];return rf(e,t,t,r),q1(e.container,r),t},Q0=function(A,e){switch(e){case 0:return Er(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return Er(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return Er(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return Er(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},fm=function(A,e){switch(e){case 0:return Er(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return Er(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return Er(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return Er(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},hm=function(A,e){switch(e){case 0:return Er(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return Er(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return Er(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return Er(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},dm=function(A,e){switch(e){case 0:return nc(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return nc(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return nc(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return nc(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},nc=function(A,e){var t=[];return Ur(A)?t.push(A.subdivide(.5,!1)):t.push(A),Ur(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Er=function(A,e,t,r){var n=[];return Ur(A)?n.push(A.subdivide(.5,!1)):n.push(A),Ur(t)?n.push(t.subdivide(.5,!0)):n.push(t),Ur(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),Ur(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},W1=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Dc=function(A){var e=A.styles,t=A.bounds,r=Ke(e.paddingLeft,t.width),n=Ke(e.paddingRight,t.width),i=Ke(e.paddingTop,t.width),o=Ke(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))},gm=function(A,e){return A===0?e.bounds:A===2?Dc(e):W1(e)},Bm=function(A,e){return A===0?e.bounds:A===2?Dc(e):W1(e)},su=function(A,e,t){var r=gm(Qa(A.styles.backgroundOrigin,e),A),n=Bm(Qa(A.styles.backgroundClip,e),A),i=pm(Qa(A.styles.backgroundSize,e),t,r),o=i[0],s=i[1],c=Qs(Qa(A.styles.backgroundPosition,e),r.width-o,r.height-s),u=wm(Qa(A.styles.backgroundRepeat,e),c,i,r,n),f=Math.round(r.left+c[0]),p=Math.round(r.top+c[1]);return[u,f,p,o,s]},wa=function(A){return Ne(A)&&A.value===Ea.AUTO},ic=function(A){return typeof A=="number"},pm=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(gt(o)&&s&&gt(s))return[Ke(o,t.width),Ke(s,t.height)];var c=ic(i);if(Ne(o)&&(o.value===Ea.CONTAIN||o.value===Ea.COVER)){if(ic(i)){var u=t.width/t.height;return u<i!=(o.value===Ea.COVER)?[t.width,t.width/i]:[t.height*i,t.height]}return[t.width,t.height]}var f=ic(r),p=ic(n),w=f||p;if(wa(o)&&(!s||wa(s))){if(f&&p)return[r,n];if(!c&&!w)return[t.width,t.height];if(w&&c){var g=f?r:n*i,F=p?n:r/i;return[g,F]}var y=f?r:t.width,I=p?n:t.height;return[y,I]}if(c){var b=0,M=0;return gt(o)?b=Ke(o,t.width):gt(s)&&(M=Ke(s,t.height)),wa(o)?b=M*i:(!s||wa(s))&&(M=b/i),[b,M]}var G=null,O=null;if(gt(o)?G=Ke(o,t.width):s&&gt(s)&&(O=Ke(s,t.height)),G!==null&&(!s||wa(s))&&(O=f&&p?G/r*n:t.height),O!==null&&wa(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")},Qa=function(A,e){var t=A[e];return typeof t>"u"?A[0]:t},wm=function(A,e,t,r,n){var i=e[0],o=e[1],s=t[0],c=t[1];switch(A){case 2:return[new IA(Math.round(r.left),Math.round(r.top+o)),new IA(Math.round(r.left+r.width),Math.round(r.top+o)),new IA(Math.round(r.left+r.width),Math.round(c+r.top+o)),new IA(Math.round(r.left),Math.round(c+r.top+o))];case 3:return[new IA(Math.round(r.left+i),Math.round(r.top)),new IA(Math.round(r.left+i+s),Math.round(r.top)),new IA(Math.round(r.left+i+s),Math.round(r.height+r.top)),new IA(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new IA(Math.round(r.left+i),Math.round(r.top+o)),new IA(Math.round(r.left+i+s),Math.round(r.top+o)),new IA(Math.round(r.left+i+s),Math.round(r.top+o+c)),new IA(Math.round(r.left+i),Math.round(r.top+o+c))];default:return[new IA(Math.round(n.left),Math.round(n.top)),new IA(Math.round(n.left+n.width),Math.round(n.top)),new IA(Math.round(n.left+n.width),Math.round(n.height+n.top)),new IA(Math.round(n.left),Math.round(n.height+n.top))]}},vm="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",y0="Hidden Text",mm=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=vm,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(y0)),r.appendChild(i),r.appendChild(n);var s=n.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(y0)),r.style.lineHeight="normal",n.style.verticalAlign="super";var c=n.offsetTop-r.offsetTop+2;return o.removeChild(r),{baseline:s,middle:c}},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}(),z1=function(){function A(e,t){this.context=e,this.options=t}return A}(),Cm=1e4,bm=function(A){Kr(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 mm(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(),cm(t)&&(this.ctx.globalAlpha=t.opacity),om(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)),j1(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 Jt(this,void 0,void 0,function(){var r;return jt(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 Jt(this,void 0,void 0,function(){return jt(this,function(r){switch(r.label){case 0:if(mt(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=Uf(t.text);o.reduce(function(s,c){return i.ctx.fillText(c,s,t.bounds.top+n),s+i.ctx.measureText(c).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),n=_m(t.fontFamily).join(", "),i=Js(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 Jt(this,void 0,void 0,function(){var n,i,o,s,c,u,f,p,w=this;return jt(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",c=this.fontMetrics.getMetrics(o,s),u=c.baseline,f=c.middle,p=r.paintOrder,t.textBounds.forEach(function(F){p.forEach(function(y){switch(y){case 0:w.ctx.fillStyle=Qt(r.color),w.renderTextWithLetterSpacing(F,r.letterSpacing,u);var I=r.textShadow;I.length&&F.text.trim().length&&(I.slice(0).reverse().forEach(function(b){w.ctx.shadowColor=Qt(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=Qt(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=Qt(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=Dc(t),o=Nc(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 Jt(this,void 0,void 0,function(){var r,n,i,o,s,c,M,M,u,f,p,w,O,g,F,J,y,I,b,M,G,O,J;return jt(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?(c=s[o],[4,this.renderTextNode(c,i)]):[3,4];case 2:Z.sent(),Z.label=3;case 3:return o++,[3,1];case 4:if(!(r instanceof U1))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 M=Z.sent(),this.renderReplacedElement(r,n,M),[3,8];case 7:return Z.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof _1&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof x1))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 M=Z.sent(),this.renderReplacedElement(r,n,M),[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 S1&&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 _f&&(p=Math.min(r.bounds.width,r.bounds.height),r.type===Ec?r.checked&&(this.ctx.save(),this.path([new IA(r.bounds.left+p*.39363,r.bounds.top+p*.79),new IA(r.bounds.left+p*.16,r.bounds.top+p*.5549),new IA(r.bounds.left+p*.27347,r.bounds.top+p*.44071),new IA(r.bounds.left+p*.39694,r.bounds.top+p*.5649),new IA(r.bounds.left+p*.72983,r.bounds.top+p*.23),new IA(r.bounds.left+p*.84,r.bounds.top+p*.34085),new IA(r.bounds.left+p*.39363,r.bounds.top+p*.79)]),this.ctx.fillStyle=Qt(f0),this.ctx.fill(),this.ctx.restore()):r.type===Lc&&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=Qt(f0),this.ctx.fill(),this.ctx.restore())),Fm(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=Qt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=ym(r.styles.textAlign),J=Dc(r),y=0,r.styles.textAlign){case 1:y+=J.width/2;break;case 2:y+=J.width;break}I=J.add(y,0,0,-J.height/2+1),this.ctx.save(),this.path([new IA(J.left,J.top),new IA(J.left+J.width,J.top),new IA(J.left+J.width,J.top+J.height),new IA(J.left,J.top+J.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ss(r.value,I),i.letterSpacing,F),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!mt(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];M=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 M=Z.sent(),this.ctx.drawImage(M,r.bounds.left-(M.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=Qt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",J=new Ln(r.bounds.left,r.bounds.top+Ke(r.styles.paddingTop,r.bounds.width),r.bounds.width,Xh(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ss(t.listValue,J),i.letterSpacing,Xh(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 Jt(this,void 0,void 0,function(){var r,n,b,i,o,b,s,c,b,u,f,b,p,w,b,g,F,b,y,I,b;return jt(this,function(M){switch(M.label){case 0:if(mt(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:M.sent(),r=0,n=t.negativeZIndex,M.label=2;case 2:return r<n.length?(b=n[r],[4,this.renderStack(b)]):[3,5];case 3:M.sent(),M.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:M.sent(),i=0,o=t.nonInlineLevel,M.label=7;case 7:return i<o.length?(b=o[i],[4,this.renderNode(b)]):[3,10];case 8:M.sent(),M.label=9;case 9:return i++,[3,7];case 10:s=0,c=t.nonPositionedFloats,M.label=11;case 11:return s<c.length?(b=c[s],[4,this.renderStack(b)]):[3,14];case 12:M.sent(),M.label=13;case 13:return s++,[3,11];case 14:u=0,f=t.nonPositionedInlineLevel,M.label=15;case 15:return u<f.length?(b=f[u],[4,this.renderStack(b)]):[3,18];case 16:M.sent(),M.label=17;case 17:return u++,[3,15];case 18:p=0,w=t.inlineLevel,M.label=19;case 19:return p<w.length?(b=w[p],[4,this.renderNode(b)]):[3,22];case 20:M.sent(),M.label=21;case 21:return p++,[3,19];case 22:g=0,F=t.zeroOrAutoZIndexOrTransformedOrOpacity,M.label=23;case 23:return g<F.length?(b=F[g],[4,this.renderStack(b)]):[3,26];case 24:M.sent(),M.label=25;case 25:return g++,[3,23];case 26:y=0,I=t.positiveZIndex,M.label=27;case 27:return y<I.length?(b=I[y],[4,this.renderStack(b)]):[3,30];case 28:M.sent(),M.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=Ur(n)?n.start:n;i===0?r.ctx.moveTo(o.x,o.y):r.ctx.lineTo(o.x,o.y),Ur(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 c=s.getContext("2d");return c.drawImage(t,0,0,t.width,t.height,0,0,r,n),s},e.prototype.renderBackgroundImage=function(t){return Jt(this,void 0,void 0,function(){var r,n,i,o,s,c;return jt(this,function(u){switch(u.label){case 0:r=t.styles.backgroundImage.length-1,n=function(f){var p,w,g,AA,cA,lA,P,K,q,F,AA,cA,lA,P,K,y,I,b,M,G,O,J,Z,nA,q,H,AA,_,S,P,K,sA,cA,lA,rA,hA,FA,wA,Q,T,R,W;return jt(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=su(t,r,[p.width,p.height,p.width/p.height]),AA=g[0],cA=g[1],lA=g[2],P=g[3],K=g[4],q=i.ctx.createPattern(i.resizeImage(p,P,K),"repeat"),i.renderRepeat(AA,q,cA,lA)),[3,6];case 5:ow(f)?(F=su(t,r,[null,null,null]),AA=F[0],cA=F[1],lA=F[2],P=F[3],K=F[4],y=rw(f.angle,P,K),I=y[0],b=y[1],M=y[2],G=y[3],O=y[4],J=document.createElement("canvas"),J.width=P,J.height=K,Z=J.getContext("2d"),nA=Z.createLinearGradient(b,G,M,O),Wh(f.stops,I).forEach(function(tA){return nA.addColorStop(tA.stop,Qt(tA.color))}),Z.fillStyle=nA,Z.fillRect(0,0,P,K),P>0&&K>0&&(q=i.ctx.createPattern(J,"repeat"),i.renderRepeat(AA,q,cA,lA))):cw(f)&&(H=su(t,r,[null,null,null]),AA=H[0],_=H[1],S=H[2],P=H[3],K=H[4],sA=f.position.length===0?[Ff]:f.position,cA=Ke(sA[0],P),lA=Ke(sA[sA.length-1],K),rA=nw(f,cA,lA,P,K),hA=rA[0],FA=rA[1],hA>0&&FA>0&&(wA=i.ctx.createRadialGradient(_+cA,S+lA,0,_+cA,S+lA,hA),Wh(f.stops,hA*2).forEach(function(tA){return wA.addColorStop(tA.stop,Qt(tA.color))}),i.path(AA),i.ctx.fillStyle=wA,hA!==FA?(Q=t.bounds.left+.5*t.bounds.width,T=t.bounds.top+.5*t.bounds.height,R=FA/hA,W=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(_,W*(S-T)+T,P,K*W),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?(c=s[o],[5,n(c)]):[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 Jt(this,void 0,void 0,function(){return jt(this,function(i){return this.path(Q0(n,r)),this.ctx.fillStyle=Qt(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,r,n,i){return Jt(this,void 0,void 0,function(){var o,s;return jt(this,function(c){switch(c.label){case 0:return r<3?[4,this.renderSolidBorder(t,n,i)]:[3,2];case 1:return c.sent(),[2];case 2:return o=fm(i,n),this.path(o),this.ctx.fillStyle=Qt(t),this.ctx.fill(),s=hm(i,n),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Jt(this,void 0,void 0,function(){var r,n,i,o,s,c,u,f,p=this;return jt(this,function(w){switch(w.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,n=!ni(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=Qm(Qa(r.backgroundClip,0),t.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),ni(r.backgroundColor)||(this.ctx.fillStyle=Qt(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=Hc(t.curves),y=g.inset?0:Cm,I=lm(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(I)):(p.mask(F),p.ctx.clip(),p.path(I)),p.ctx.shadowOffsetX=g.offsetX.number+y,p.ctx.shadowOffsetY=g.offsetY.number,p.ctx.shadowColor=Qt(g.color),p.ctx.shadowBlur=g.blur.number,p.ctx.fillStyle=g.inset?Qt(g.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),w.label=2;case 2:s=0,c=0,u=i,w.label=3;case 3:return c<u.length?(f=u[c],f.style!==0&&!ni(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 c++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,r,n,i,o){return Jt(this,void 0,void 0,function(){var s,c,u,f,p,w,g,F,y,I,b,M,G,O,J,Z,J,Z;return jt(this,function(nA){return this.ctx.save(),s=dm(i,n),c=Q0(i,n),o===2&&(this.path(c),this.ctx.clip()),Ur(c[0])?(u=c[0].start.x,f=c[0].start.y):(u=c[0].x,f=c[0].y),Ur(c[1])?(p=c[1].end.x,w=c[1].end.y):(p=c[1].x,w=c[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(c.slice(0,2)),F=r<3?r*3:r*2,y=r<3?r*2:r,o===3&&(F=r,y=r),I=!0,g<=F*2?I=!1:g<=F*2+y?(b=g/(2*F+y),F*=b,y*=b):(M=Math.floor((g+y)/(F+y)),G=(g-M*F)/(M-1),O=(g-(M+1)*F)/M,y=O<=0||Math.abs(y-G)<Math.abs(y-O)?G:O),I&&(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=Qt(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Ur(c[0])&&(J=c[3],Z=c[0],this.ctx.beginPath(),this.formatPath([new IA(J.end.x,J.end.y),new IA(Z.start.x,Z.start.y)]),this.ctx.stroke()),Ur(c[1])&&(J=c[1],Z=c[2],this.ctx.beginPath(),this.formatPath([new IA(J.end.x,J.end.y),new IA(Z.start.x,Z.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Jt(this,void 0,void 0,function(){var r;return jt(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Qt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=um(t),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(z1),Fm=function(A){return A instanceof I1||A instanceof L1?!0:A instanceof _f&&A.type!==Lc&&A.type!==Ec},Qm=function(A,e){switch(A){case 0:return Hc(e);case 2:return im(e);case 1:default:return Nc(e)}},ym=function(A){switch(A){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Um=["-apple-system","system-ui"],_m=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(e){return Um.indexOf(e)===-1}):A},xm=function(A){Kr(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 Jt(this,void 0,void 0,function(){var r,n;return jt(this,function(i){switch(i.label){case 0:return r=Yu(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Em(r)];case 1:return n=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Qt(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}(z1),Em=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))})},Lm=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,To([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,To([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,To([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,To([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.instances={},A}(),Im=function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new Lm({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new Yv(this,e)}return A.instanceCount=1,A}(),X1=function(A,e){return e===void 0&&(e={}),Sm(A,e)};typeof window<"u"&&K1.setContext(window);var Sm=function(A,e){return Jt(void 0,void 0,void 0,function(){var t,r,n,i,o,s,c,u,f,p,w,g,F,y,I,b,M,G,O,J,nA,Z,nA,q,H,AA,_,S,P,K,sA,cA,lA,rA,hA,FA,wA,Q,T,R;return jt(this,function(W){switch(W.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=ku({logging:(_=e.logging)!==null&&_!==void 0?_:!0,cache:e.cache},n),o={windowWidth:(S=e.windowWidth)!==null&&S!==void 0?S:r.innerWidth,windowHeight:(P=e.windowHeight)!==null&&P!==void 0?P:r.innerHeight,scrollX:(K=e.scrollX)!==null&&K!==void 0?K:r.pageXOffset,scrollY:(sA=e.scrollY)!==null&&sA!==void 0?sA:r.pageYOffset},s=new Ln(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),c=new Im(i,s),u=(cA=e.foreignObjectRendering)!==null&&cA!==void 0?cA:!1,f={allowTaint:(lA=e.allowTaint)!==null&&lA!==void 0?lA:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:u,copyStyles:u},c.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),p=new C0(c,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=W.sent(),F=xf(w)||Nv(w)?l2(w.ownerDocument):Kc(c,w),y=F.width,I=F.height,b=F.left,M=F.top,G=Hm(c,w,e.backgroundColor),O={canvas:e.canvas,backgroundColor:G,scale:(hA=(rA=e.scale)!==null&&rA!==void 0?rA:r.devicePixelRatio)!==null&&hA!==void 0?hA:1,x:((FA=e.x)!==null&&FA!==void 0?FA:0)+b,y:((wA=e.y)!==null&&wA!==void 0?wA:0)+M,width:(Q=e.width)!==null&&Q!==void 0?Q:Math.ceil(y),height:(T=e.height)!==null&&T!==void 0?T:Math.ceil(I)},u?(c.logger.debug("Document cloned, using foreign object rendering"),nA=new xm(c,O),[4,nA.render(w)]):[3,3];case 2:return J=W.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+b+","+M+" with size "+y+"x"+I+" using computed rendering"),c.logger.debug("Starting DOM parsing"),Z=N1(c,w),G===Z.styles.backgroundColor&&(Z.styles.backgroundColor=En.TRANSPARENT),c.logger.debug("Starting renderer for element at "+O.x+","+O.y+" with size "+O.width+"x"+O.height),nA=new bm(c,O),[4,nA.render(Z)];case 4:J=W.sent(),W.label=5;case 5:return(!((R=e.removeContainer)!==null&&R!==void 0)||R)&&(C0.destroy(g)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,J]}})})},Hm=function(A,e,t){var r=e.ownerDocument,n=r.documentElement?Ls(A,getComputedStyle(r.documentElement).backgroundColor):En.TRANSPARENT,i=r.body?Ls(A,getComputedStyle(r.body).backgroundColor):En.TRANSPARENT,o=typeof t=="string"?Ls(A,t):t===null?En.TRANSPARENT:4294967295;return e===r.documentElement?ni(n)?ni(i)?o:i:n:o};const Nm=Object.freeze(Object.defineProperty({__proto__:null,default:X1},Symbol.toStringTag,{value:"Module"}));var Rr=Uint8Array,Br=Uint16Array,Ef=Int32Array,Lf=new Rr([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]),If=new Rr([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]),U0=new Rr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),J1=function(A,e){for(var t=new Br(31),r=0;r<31;++r)t[r]=e+=1<<A[r-1];for(var n=new Ef(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}},Y1=J1(Lf,2),Dm=Y1.b,nf=Y1.r;Dm[28]=258,nf[258]=28;var km=J1(If,0),_0=km.r,af=new Br(32768);for(var qe=0;qe<32768;++qe){var qn=(qe&43690)>>1|(qe&21845)<<1;qn=(qn&52428)>>2|(qn&13107)<<2,qn=(qn&61680)>>4|(qn&3855)<<4,af[qe]=((qn&65280)>>8|(qn&255)<<8)>>1}var Ns=function(A,e,t){for(var r=A.length,n=0,i=new Br(e);n<r;++n)A[n]&&++i[A[n]-1];var o=new Br(e);for(n=1;n<e;++n)o[n]=o[n-1]+i[n-1]<<1;var s;if(t){s=new Br(1<<e);var c=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[af[p]>>c]=u}else for(s=new Br(r),n=0;n<r;++n)A[n]&&(s[n]=af[o[A[n]-1]++]>>15-A[n]);return s},Mi=new Rr(288);for(var qe=0;qe<144;++qe)Mi[qe]=8;for(var qe=144;qe<256;++qe)Mi[qe]=9;for(var qe=256;qe<280;++qe)Mi[qe]=7;for(var qe=280;qe<288;++qe)Mi[qe]=8;var kc=new Rr(32);for(var qe=0;qe<32;++qe)kc[qe]=5;var Tm=Ns(Mi,9,0),Om=Ns(kc,5,0),Z1=function(A){return(A+7)/8|0},Mm=function(A,e,t){return(e==null||e<0)&&(e=0),(t==null||t>A.length)&&(t=A.length),new Rr(A.subarray(e,t))},yn=function(A,e,t){t<<=e&7;var r=e/8|0;A[r]|=t,A[r+1]|=t>>8},ps=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},ou=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:Ag,l:0};if(n==1){var o=new Rr(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],c=t[1],u=0,f=1,p=2;for(t[0]={s:-1,f:s.f+c.f,l:s,r:c};f!=n-1;)s=t[t[u].f<t[p].f?u++:p++],c=t[u!=f&&t[u].f<t[p].f?u++:p++],t[f++]={s:-1,f:s.f+c.f,l:s,r:c};for(var w=i[0].s,r=1;r<n;++r)i[r].s>w&&(w=i[r].s);var g=new Br(w+1),F=sf(t[f-1],g,0);if(F>e){var r=0,y=0,I=F-e,b=1<<I;for(i.sort(function(Z,nA){return g[nA.s]-g[Z.s]||Z.f-nA.f});r<n;++r){var M=i[r].s;if(g[M]>e)y+=b-(1<<F-g[M]),g[M]=e;else break}for(y>>=I;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 Rr(g),l:F}},sf=function(A,e,t){return A.s==-1?Math.max(sf(A.l,e,t+1),sf(A.r,e,t+1)):e[A.s]=t},x0=function(A){for(var e=A.length;e&&!A[--e];);for(var t=new Br(++e),r=0,n=A[0],i=1,o=function(c){t[r++]=c},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}},ws=function(A,e){for(var t=0,r=0;r<e.length;++r)t+=A[r]*e[r];return t},$1=function(A,e,t){var r=t.length,n=Z1(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},E0=function(A,e,t,r,n,i,o,s,c,u,f){yn(e,f++,t),++n[256];for(var p=ou(n,15),w=p.t,g=p.l,F=ou(i,15),y=F.t,I=F.l,b=x0(w),M=b.c,G=b.n,O=x0(y),J=O.c,Z=O.n,nA=new Br(19),q=0;q<M.length;++q)++nA[M[q]&31];for(var q=0;q<J.length;++q)++nA[J[q]&31];for(var H=ou(nA,7),AA=H.t,_=H.l,S=19;S>4&&!AA[U0[S-1]];--S);var P=u+5<<3,K=ws(n,Mi)+ws(i,kc)+o,sA=ws(n,w)+ws(i,y)+o+14+3*S+ws(nA,AA)+2*nA[16]+3*nA[17]+7*nA[18];if(c>=0&&P<=K&&P<=sA)return $1(e,f,A.subarray(c,c+u));var cA,lA,rA,hA;if(yn(e,f,1+(sA<K)),f+=2,sA<K){cA=Ns(w,g,0),lA=w,rA=Ns(y,I,0),hA=y;var FA=Ns(AA,_,0);yn(e,f,G-257),yn(e,f+5,Z-1),yn(e,f+10,S-4),f+=14;for(var q=0;q<S;++q)yn(e,f+3*q,AA[U0[q]]);f+=3*S;for(var wA=[M,J],Q=0;Q<2;++Q)for(var T=wA[Q],q=0;q<T.length;++q){var R=T[q]&31;yn(e,f,FA[R]),f+=AA[R],R>15&&(yn(e,f,T[q]>>5&127),f+=T[q]>>12)}}else cA=Tm,lA=Mi,rA=Om,hA=kc;for(var q=0;q<s;++q){var W=r[q];if(W>255){var R=W>>18&31;ps(e,f,cA[R+257]),f+=lA[R+257],R>7&&(yn(e,f,W>>23&31),f+=Lf[R]);var X=W&31;ps(e,f,rA[X]),f+=hA[X],X>3&&(ps(e,f,W>>5&8191),f+=If[X])}else ps(e,f,cA[W]),f+=lA[W]}return ps(e,f,cA[256]),f+lA[256]},Pm=new Ef([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ag=new Rr(0),Rm=function(A,e,t,r,n,i){var o=i.z||A.length,s=new Rr(r+o+5*(1+Math.ceil(o/7e3))+n),c=s.subarray(r,s.length-n),u=i.l,f=(i.r||0)&7;if(e){f&&(c[0]=i.r>>3);for(var p=Pm[e-1],w=p>>13,g=p&8191,F=(1<<t)-1,y=i.p||new Br(32768),I=i.h||new Br(F+1),b=Math.ceil(t/3),M=2*b,G=function(NA){return(A[NA]^A[NA+1]<<b^A[NA+2]<<M)&F},O=new Ef(25e3),J=new Br(288),Z=new Br(32),nA=0,q=0,H=i.i||0,AA=0,_=i.w||0,S=0;H+2<o;++H){var P=G(H),K=H&32767,sA=I[P];if(y[K]=sA,I[P]=K,_<=H){var cA=o-H;if((nA>7e3||AA>24576)&&(cA>423||!u)){f=E0(A,c,0,O,J,Z,q,AA,S,H-S,f),AA=nA=q=0,S=H;for(var lA=0;lA<286;++lA)J[lA]=0;for(var lA=0;lA<30;++lA)Z[lA]=0}var rA=2,hA=0,FA=g,wA=K-sA&32767;if(cA>2&&P==G(H-wA))for(var Q=Math.min(w,cA)-1,T=Math.min(32767,H),R=Math.min(258,cA);wA<=T&&--FA&&K!=sA;){if(A[H+rA]==A[H+rA-wA]){for(var W=0;W<R&&A[H+W]==A[H+W-wA];++W);if(W>rA){if(rA=W,hA=wA,W>Q)break;for(var X=Math.min(wA,W-2),tA=0,lA=0;lA<X;++lA){var uA=H-wA+lA&32767,j=y[uA],oA=uA-j&32767;oA>tA&&(tA=oA,sA=uA)}}}K=sA,sA=y[K],wA+=K-sA&32767}if(hA){O[AA++]=268435456|nf[rA]<<18|_0[hA];var CA=nf[rA]&31,yA=_0[hA]&31;q+=Lf[CA]+If[yA],++J[257+CA],++Z[yA],_=H+rA,++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=E0(A,c,u,O,J,Z,q,AA,S,H-S,f),u||(i.r=f&7|c[f/8|0]<<3,f-=7,i.h=I,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&&(c[f/8|0]=u,UA=o),f=$1(c,f+1,A.subarray(H,UA))}i.i=o}return Mm(s,0,r+Z1(f)+n)},eg=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 Rr(i.length+A.length);o.set(i),o.set(A,i.length),A=o,n.w=i.length}return Rm(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)},tg=function(A,e,t){for(;t;++e)A[e]=t,t>>>=8},jm=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=eg();n.p(e.dictionary),tg(A,2,n.d())}};function of(A,e){e||(e={});var t=eg();t.p(A);var r=Km(A,e,e.dictionary?6:2,4);return jm(r,e),tg(r,r.length-4,t.d()),r}var Gm=typeof TextDecoder<"u"&&new TextDecoder,Vm=0;try{Gm.decode(Ag,{stream:!0}),Vm=1}catch{}function L0(A,e="utf8"){return new TextDecoder(e).decode(A)}const qm=new TextEncoder;function Wm(A){return qm.encode(A)}const zm=1024*8,Xm=(()=>{const A=new Uint8Array(4),e=new Uint32Array(A.buffer);return!((e[0]=1)&A[0])})(),cu={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 Sf{constructor(e=zm,t={}){Se(this,"buffer");Se(this,"byteLength");Se(this,"byteOffset");Se(this,"length");Se(this,"offset");Se(this,"lastWrittenByte");Se(this,"littleEndian");Se(this,"_data");Se(this,"_mark");Se(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 Sf)&&(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=cu[t].BYTES_PER_ELEMENT*e,n=this.byteOffset+this.offset,i=this.buffer.slice(n,n+r);if(this.littleEndian===Xm&&t!=="uint8"&&t!=="int8"){const s=new Uint8Array(this.buffer.slice(n,n+r));s.reverse();const c=new cu[t](s.buffer);return this.offset+=r,c.reverse(),c}const o=new cu[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 L0(this.readBytes(e))}decodeText(e=1,t="utf8"){return L0(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(Wm(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 Jm=4,I0=0,S0=1,Ym=2;function Pa(A){let e=A.length;for(;--e>=0;)A[e]=0}const Zm=0,rg=1,$m=2,A4=3,e4=258,Hf=29,Ys=256,Rs=Ys+1+Hf,La=30,Nf=19,ng=2*Rs+1,Hi=15,lu=16,t4=7,Df=256,ig=16,ag=17,sg=18,cf=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]),vc=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]),r4=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),og=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n4=512,_n=new Array((Rs+2)*2);Pa(_n);const Ds=new Array(La*2);Pa(Ds);const Ks=new Array(n4);Pa(Ks);const js=new Array(e4-A4+1);Pa(js);const kf=new Array(Hf);Pa(kf);const Tc=new Array(La);Pa(Tc);function uu(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 cg,lg,ug;function fu(A,e){this.dyn_tree=A,this.max_code=0,this.stat_desc=e}const fg=A=>A<256?Ks[A]:Ks[256+(A>>>7)],Gs=(A,e)=>{A.pending_buf[A.pending++]=e&255,A.pending_buf[A.pending++]=e>>>8&255},nr=(A,e,t)=>{A.bi_valid>lu-t?(A.bi_buf|=e<<A.bi_valid&65535,Gs(A,A.bi_buf),A.bi_buf=e>>lu-A.bi_valid,A.bi_valid+=t-lu):(A.bi_buf|=e<<A.bi_valid&65535,A.bi_valid+=t)},nn=(A,e,t)=>{nr(A,t[e*2],t[e*2+1])},hg=(A,e)=>{let t=0;do t|=A&1,A>>>=1,t<<=1;while(--e>0);return t>>>1},i4=A=>{A.bi_valid===16?(Gs(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,c=e.stat_desc.max_length;let u,f,p,w,g,F,y=0;for(w=0;w<=Hi;w++)A.bl_count[w]=0;for(t[A.heap[A.heap_max]*2+1]=0,u=A.heap_max+1;u<ng;u++)f=A.heap[u],w=t[t[f*2+1]*2+1]+1,w>c&&(w=c,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=c-1;A.bl_count[w]===0;)w--;A.bl_count[w]--,A.bl_count[w+1]+=2,A.bl_count[c]--,y-=2}while(y>0);for(w=c;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--)}},dg=(A,e,t)=>{const r=new Array(Hi+1);let n=0,i,o;for(i=1;i<=Hi;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]=hg(r[s]++,s))}},s4=()=>{let A,e,t,r,n;const i=new Array(Hi+1);for(t=0,r=0;r<Hf-1;r++)for(kf[r]=t,A=0;A<1<<cf[r];A++)js[t++]=r;for(js[t-1]=r,n=0,r=0;r<16;r++)for(Tc[r]=n,A=0;A<1<<vc[r];A++)Ks[n++]=r;for(n>>=7;r<La;r++)for(Tc[r]=n<<7,A=0;A<1<<vc[r]-7;A++)Ks[256+n++]=r;for(e=0;e<=Hi;e++)i[e]=0;for(A=0;A<=143;)_n[A*2+1]=8,A++,i[8]++;for(;A<=255;)_n[A*2+1]=9,A++,i[9]++;for(;A<=279;)_n[A*2+1]=7,A++,i[7]++;for(;A<=287;)_n[A*2+1]=8,A++,i[8]++;for(dg(_n,Rs+1,i),A=0;A<La;A++)Ds[A*2+1]=5,Ds[A*2]=hg(A,5);cg=new uu(_n,cf,Ys+1,Rs,Hi),lg=new uu(Ds,vc,0,La,Hi),ug=new uu(new Array(0),r4,0,Nf,t4)},gg=A=>{let e;for(e=0;e<Rs;e++)A.dyn_ltree[e*2]=0;for(e=0;e<La;e++)A.dyn_dtree[e*2]=0;for(e=0;e<Nf;e++)A.bl_tree[e*2]=0;A.dyn_ltree[Df*2]=1,A.opt_len=A.static_len=0,A.sym_next=A.matches=0},Bg=A=>{A.bi_valid>8?Gs(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0},H0=(A,e,t,r)=>{const n=e*2,i=t*2;return A[n]<A[i]||A[n]===A[i]&&r[e]<=r[t]},hu=(A,e,t)=>{const r=A.heap[t];let n=t<<1;for(;n<=A.heap_len&&(n<A.heap_len&&H0(e,A.heap[n+1],A.heap[n],A.depth)&&n++,!H0(e,r,A.heap[n],A.depth));)A.heap[t]=A.heap[n],t=n,n<<=1;A.heap[t]=r},N0=(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?nn(A,n,e):(o=js[n],nn(A,o+Ys+1,e),s=cf[o],s!==0&&(n-=kf[o],nr(A,n,s)),r--,o=fg(r),nn(A,o,t),s=vc[o],s!==0&&(r-=Tc[o],nr(A,r,s)));while(i<A.sym_next);nn(A,Df,e)},lf=(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,c=-1,u;for(A.heap_len=0,A.heap_max=ng,o=0;o<i;o++)t[o*2]!==0?(A.heap[++A.heap_len]=c=o,A.depth[o]=0):t[o*2+1]=0;for(;A.heap_len<2;)u=A.heap[++A.heap_len]=c<2?++c:0,t[u*2]=1,A.depth[u]=0,A.opt_len--,n&&(A.static_len-=r[u*2+1]);for(e.max_code=c,o=A.heap_len>>1;o>=1;o--)hu(A,t,o);u=i;do o=A.heap[1],A.heap[1]=A.heap[A.heap_len--],hu(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++,hu(A,t,1);while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],a4(A,e),dg(t,c,A.bl_count)},D0=(A,e,t)=>{let r,n=-1,i,o=e[0*2+1],s=0,c=7,u=4;for(o===0&&(c=138,u=3),e[(t+1)*2+1]=65535,r=0;r<=t;r++)i=o,o=e[(r+1)*2+1],!(++s<c&&i===o)&&(s<u?A.bl_tree[i*2]+=s:i!==0?(i!==n&&A.bl_tree[i*2]++,A.bl_tree[ig*2]++):s<=10?A.bl_tree[ag*2]++:A.bl_tree[sg*2]++,s=0,n=i,o===0?(c=138,u=3):i===o?(c=6,u=3):(c=7,u=4))},k0=(A,e,t)=>{let r,n=-1,i,o=e[0*2+1],s=0,c=7,u=4;for(o===0&&(c=138,u=3),r=0;r<=t;r++)if(i=o,o=e[(r+1)*2+1],!(++s<c&&i===o)){if(s<u)do nn(A,i,A.bl_tree);while(--s!==0);else i!==0?(i!==n&&(nn(A,i,A.bl_tree),s--),nn(A,ig,A.bl_tree),nr(A,s-3,2)):s<=10?(nn(A,ag,A.bl_tree),nr(A,s-3,3)):(nn(A,sg,A.bl_tree),nr(A,s-11,7));s=0,n=i,o===0?(c=138,u=3):i===o?(c=6,u=3):(c=7,u=4)}},o4=A=>{let e;for(D0(A,A.dyn_ltree,A.l_desc.max_code),D0(A,A.dyn_dtree,A.d_desc.max_code),lf(A,A.bl_desc),e=Nf-1;e>=3&&A.bl_tree[og[e]*2+1]===0;e--);return A.opt_len+=3*(e+1)+5+5+4,e},c4=(A,e,t,r)=>{let n;for(nr(A,e-257,5),nr(A,t-1,5),nr(A,r-4,4),n=0;n<r;n++)nr(A,A.bl_tree[og[n]*2+1],3);k0(A,A.dyn_ltree,e-1),k0(A,A.dyn_dtree,t-1)},l4=A=>{let e=4093624447,t;for(t=0;t<=31;t++,e>>>=1)if(e&1&&A.dyn_ltree[t*2]!==0)return I0;if(A.dyn_ltree[9*2]!==0||A.dyn_ltree[10*2]!==0||A.dyn_ltree[13*2]!==0)return S0;for(t=32;t<Ys;t++)if(A.dyn_ltree[t*2]!==0)return S0;return I0};let T0=!1;const u4=A=>{T0||(s4(),T0=!0),A.l_desc=new fu(A.dyn_ltree,cg),A.d_desc=new fu(A.dyn_dtree,lg),A.bl_desc=new fu(A.bl_tree,ug),A.bi_buf=0,A.bi_valid=0,gg(A)},pg=(A,e,t,r)=>{nr(A,(Zm<<1)+(r?1:0),3),Bg(A),Gs(A,t),Gs(A,~t),t&&A.pending_buf.set(A.window.subarray(e,e+t),A.pending),A.pending+=t},f4=A=>{nr(A,rg<<1,3),nn(A,Df,_n),i4(A)},h4=(A,e,t,r)=>{let n,i,o=0;A.level>0?(A.strm.data_type===Ym&&(A.strm.data_type=l4(A)),lf(A,A.l_desc),lf(A,A.d_desc),o=o4(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?pg(A,e,t,r):A.strategy===Jm||i===n?(nr(A,(rg<<1)+(r?1:0),3),N0(A,_n,Ds)):(nr(A,($m<<1)+(r?1:0),3),c4(A,A.l_desc.max_code+1,A.d_desc.max_code+1,o+1),N0(A,A.dyn_ltree,A.dyn_dtree)),gg(A),r&&Bg(A)},d4=(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[(js[t]+Ys+1)*2]++,A.dyn_dtree[fg(e)*2]++),A.sym_next===A.sym_end);var g4=u4,B4=pg,p4=h4,w4=d4,v4=f4,m4={_tr_init:g4,_tr_stored_block:B4,_tr_flush_block:p4,_tr_tally:w4,_tr_align:v4};const C4=(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 Vs=C4;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},F4=new Uint32Array(b4()),Q4=(A,e,t,r)=>{const n=F4,i=r+t;A^=-1;for(let o=r;o<i;o++)A=A>>>8^n[(A^e[o])&255];return A^-1};var yt=Q4,ka={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"},Zs={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:y4,_tr_stored_block:uf,_tr_flush_block:U4,_tr_tally:ii,_tr_align:_4}=m4,{Z_NO_FLUSH:ai,Z_PARTIAL_FLUSH:x4,Z_FULL_FLUSH:E4,Z_FINISH:_r,Z_BLOCK:O0,Z_OK:St,Z_STREAM_END:M0,Z_STREAM_ERROR:sn,Z_DATA_ERROR:L4,Z_BUF_ERROR:du,Z_DEFAULT_COMPRESSION:I4,Z_FILTERED:S4,Z_HUFFMAN_ONLY:ac,Z_RLE:H4,Z_FIXED:N4,Z_DEFAULT_STRATEGY:D4,Z_UNKNOWN:k4,Z_DEFLATED:Zc}=Zs,T4=9,O4=15,M4=8,P4=29,R4=256,ff=R4+1+P4,K4=30,j4=19,G4=2*ff+1,V4=15,me=3,ei=258,on=ei+me+1,q4=32,Ta=42,Tf=57,hf=69,df=73,gf=91,Bf=103,Ni=113,_s=666,Yt=1,Ra=2,Pi=3,Ka=4,W4=3,Di=(A,e)=>(A.msg=ka[e],e),P0=A=>A*2-(A>4?9:0),Yn=A=>{let e=A.length;for(;--e>=0;)A[e]=0},z4=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 X4=(A,e,t)=>(e<<A.hash_shift^t)&A.hash_mask,si=X4;const gr=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))},pr=(A,e)=>{U4(A,A.block_start>=0?A.block_start:-1,A.strstart-A.block_start,e),A.block_start=A.strstart,gr(A.strm)},_e=(A,e)=>{A.pending_buf[A.pending++]=e},vs=(A,e)=>{A.pending_buf[A.pending++]=e>>>8&255,A.pending_buf[A.pending++]=e&255},pf=(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=Vs(A.adler,e,n,t):A.state.wrap===2&&(A.adler=yt(A.adler,e,n,t)),A.next_in+=n,A.total_in+=n,n)},wg=(A,e)=>{let t=A.max_chain_length,r=A.strstart,n,i,o=A.prev_length,s=A.nice_match;const c=A.strstart>A.w_size-on?A.strstart-(A.w_size-on):0,u=A.window,f=A.w_mask,p=A.prev,w=A.strstart+ei;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=ei-(w-r),r=w-ei,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])>c&&--t!==0);return o<=A.lookahead?o:A.lookahead},Oa=A=>{const e=A.w_size;let t,r,n;do{if(r=A.window_size-A.lookahead-A.strstart,A.strstart>=e+(e-on)&&(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),z4(A),r+=e),A.strm.avail_in===0)break;if(t=pf(A.strm,A.window,A.strstart+A.lookahead,r),A.lookahead+=t,A.lookahead+A.insert>=me)for(n=A.strstart-A.insert,A.ins_h=A.window[n],A.ins_h=si(A,A.ins_h,A.window[n+1]);A.insert&&(A.ins_h=si(A,A.ins_h,A.window[n+me-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<me)););}while(A.lookahead<on&&A.strm.avail_in!==0)},vg=(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!==_r||e===ai||r!==n+A.strm.avail_in)))break;o=e===_r&&r===n+A.strm.avail_in?1:0,uf(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,gr(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&&(pf(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?Ka:e!==ai&&e!==_r&&A.strm.avail_in===0&&A.strstart===A.block_start?Ra:(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&&(pf(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===_r)&&e!==ai&&A.strm.avail_in===0&&n<=i)&&(r=n>i?i:n,o=e===_r&&A.strm.avail_in===0&&r===n?1:0,uf(A,A.block_start,r,o),A.block_start+=r,gr(A.strm)),o?Pi:Yt)},gu=(A,e)=>{let t,r;for(;;){if(A.lookahead<on){if(Oa(A),A.lookahead<on&&e===ai)return Yt;if(A.lookahead===0)break}if(t=0,A.lookahead>=me&&(A.ins_h=si(A,A.ins_h,A.window[A.strstart+me-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-on&&(A.match_length=wg(A,t)),A.match_length>=me)if(r=ii(A,A.strstart-A.match_start,A.match_length-me),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=me){A.match_length--;do A.strstart++,A.ins_h=si(A,A.ins_h,A.window[A.strstart+me-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=si(A,A.ins_h,A.window[A.strstart+1]);else r=ii(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(r&&(pr(A,!1),A.strm.avail_out===0))return Yt}return A.insert=A.strstart<me-1?A.strstart:me-1,e===_r?(pr(A,!0),A.strm.avail_out===0?Pi:Ka):A.sym_next&&(pr(A,!1),A.strm.avail_out===0)?Yt:Ra},va=(A,e)=>{let t,r,n;for(;;){if(A.lookahead<on){if(Oa(A),A.lookahead<on&&e===ai)return Yt;if(A.lookahead===0)break}if(t=0,A.lookahead>=me&&(A.ins_h=si(A,A.ins_h,A.window[A.strstart+me-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=me-1,t!==0&&A.prev_length<A.max_lazy_match&&A.strstart-t<=A.w_size-on&&(A.match_length=wg(A,t),A.match_length<=5&&(A.strategy===S4||A.match_length===me&&A.strstart-A.match_start>4096)&&(A.match_length=me-1)),A.prev_length>=me&&A.match_length<=A.prev_length){n=A.strstart+A.lookahead-me,r=ii(A,A.strstart-1-A.prev_match,A.prev_length-me),A.lookahead-=A.prev_length-1,A.prev_length-=2;do++A.strstart<=n&&(A.ins_h=si(A,A.ins_h,A.window[A.strstart+me-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=me-1,A.strstart++,r&&(pr(A,!1),A.strm.avail_out===0))return Yt}else if(A.match_available){if(r=ii(A,0,A.window[A.strstart-1]),r&&pr(A,!1),A.strstart++,A.lookahead--,A.strm.avail_out===0)return Yt}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(r=ii(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<me-1?A.strstart:me-1,e===_r?(pr(A,!0),A.strm.avail_out===0?Pi:Ka):A.sym_next&&(pr(A,!1),A.strm.avail_out===0)?Yt:Ra},J4=(A,e)=>{let t,r,n,i;const o=A.window;for(;;){if(A.lookahead<=ei){if(Oa(A),A.lookahead<=ei&&e===ai)return Yt;if(A.lookahead===0)break}if(A.match_length=0,A.lookahead>=me&&A.strstart>0&&(n=A.strstart-1,r=o[n],r===o[++n]&&r===o[++n]&&r===o[++n])){i=A.strstart+ei;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=ei-(i-n),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=me?(t=ii(A,1,A.match_length-me),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=ii(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(pr(A,!1),A.strm.avail_out===0))return Yt}return A.insert=0,e===_r?(pr(A,!0),A.strm.avail_out===0?Pi:Ka):A.sym_next&&(pr(A,!1),A.strm.avail_out===0)?Yt:Ra},Y4=(A,e)=>{let t;for(;;){if(A.lookahead===0&&(Oa(A),A.lookahead===0)){if(e===ai)return Yt;break}if(A.match_length=0,t=ii(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(pr(A,!1),A.strm.avail_out===0))return Yt}return A.insert=0,e===_r?(pr(A,!0),A.strm.avail_out===0?Pi:Ka):A.sym_next&&(pr(A,!1),A.strm.avail_out===0)?Yt:Ra};function tn(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 xs=[new tn(0,0,0,0,vg),new tn(4,4,8,4,gu),new tn(4,5,16,8,gu),new tn(4,6,32,32,gu),new tn(4,4,16,16,va),new tn(8,16,32,32,va),new tn(8,16,128,128,va),new tn(8,32,128,256,va),new tn(32,128,258,1024,va),new tn(32,258,258,4096,va)],Z4=A=>{A.window_size=2*A.w_size,Yn(A.head),A.max_lazy_match=xs[A.level].max_lazy,A.good_match=xs[A.level].good_length,A.nice_match=xs[A.level].nice_length,A.max_chain_length=xs[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=me-1,A.match_available=0,A.ins_h=0};function $4(){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=Zc,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(G4*2),this.dyn_dtree=new Uint16Array((2*K4+1)*2),this.bl_tree=new Uint16Array((2*j4+1)*2),Yn(this.dyn_ltree),Yn(this.dyn_dtree),Yn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(V4+1),this.heap=new Uint16Array(2*ff+1),Yn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*ff+1),Yn(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 $s=A=>{if(!A)return 1;const e=A.state;return!e||e.strm!==A||e.status!==Ta&&e.status!==Tf&&e.status!==hf&&e.status!==df&&e.status!==gf&&e.status!==Bf&&e.status!==Ni&&e.status!==_s?1:0},mg=A=>{if($s(A))return Di(A,sn);A.total_in=A.total_out=0,A.data_type=k4;const e=A.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?Tf:e.wrap?Ta:Ni,A.adler=e.wrap===2?0:1,e.last_flush=-2,y4(e),St},Cg=A=>{const e=mg(A);return e===St&&Z4(A.state),e},AC=(A,e)=>$s(A)||A.state.wrap!==2?sn:(A.state.gzhead=e,St),bg=(A,e,t,r,n,i)=>{if(!A)return sn;let o=1;if(e===I4&&(e=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>T4||t!==Zc||r<8||r>15||e<0||e>9||i<0||i>N4||r===8&&o!==1)return Di(A,sn);r===8&&(r=9);const s=new $4;return A.state=s,s.strm=A,s.status=Ta,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+me-1)/me),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,Cg(A)},eC=(A,e)=>bg(A,e,Zc,O4,M4,D4),tC=(A,e)=>{if($s(A)||e>O0||e<0)return A?Di(A,sn):sn;const t=A.state;if(!A.output||A.avail_in!==0&&!A.input||t.status===_s&&e!==_r)return Di(A,A.avail_out===0?du:sn);const r=t.last_flush;if(t.last_flush=e,t.pending!==0){if(gr(A),A.avail_out===0)return t.last_flush=-1,St}else if(A.avail_in===0&&P0(e)<=P0(r)&&e!==_r)return Di(A,du);if(t.status===_s&&A.avail_in!==0)return Di(A,du);if(t.status===Ta&&t.wrap===0&&(t.status=Ni),t.status===Ta){let n=Zc+(t.w_bits-8<<4)<<8,i=-1;if(t.strategy>=ac||t.level<2?i=0:t.level<6?i=1:t.level===6?i=2:i=3,n|=i<<6,t.strstart!==0&&(n|=q4),n+=31-n%31,vs(t,n),t.strstart!==0&&(vs(t,A.adler>>>16),vs(t,A.adler&65535)),A.adler=1,t.status=Ni,gr(A),t.pending!==0)return t.last_flush=-1,St}if(t.status===Tf){if(A.adler=0,_e(t,31),_e(t,139),_e(t,8),t.gzhead)_e(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)),_e(t,t.gzhead.time&255),_e(t,t.gzhead.time>>8&255),_e(t,t.gzhead.time>>16&255),_e(t,t.gzhead.time>>24&255),_e(t,t.level===9?2:t.strategy>=ac||t.level<2?4:0),_e(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(_e(t,t.gzhead.extra.length&255),_e(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(A.adler=yt(A.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=hf;else if(_e(t,0),_e(t,0),_e(t,0),_e(t,0),_e(t,0),_e(t,t.level===9?2:t.strategy>=ac||t.level<2?4:0),_e(t,W4),t.status=Ni,gr(A),t.pending!==0)return t.last_flush=-1,St}if(t.status===hf){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=yt(A.adler,t.pending_buf,t.pending-n,n)),t.gzindex+=s,gr(A),t.pending!==0)return t.last_flush=-1,St;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=yt(A.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=df}if(t.status===df){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=yt(A.adler,t.pending_buf,t.pending-n,n)),gr(A),t.pending!==0)return t.last_flush=-1,St;n=0}t.gzindex<t.gzhead.name.length?i=t.gzhead.name.charCodeAt(t.gzindex++)&255:i=0,_e(t,i)}while(i!==0);t.gzhead.hcrc&&t.pending>n&&(A.adler=yt(A.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=gf}if(t.status===gf){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=yt(A.adler,t.pending_buf,t.pending-n,n)),gr(A),t.pending!==0)return t.last_flush=-1,St;n=0}t.gzindex<t.gzhead.comment.length?i=t.gzhead.comment.charCodeAt(t.gzindex++)&255:i=0,_e(t,i)}while(i!==0);t.gzhead.hcrc&&t.pending>n&&(A.adler=yt(A.adler,t.pending_buf,t.pending-n,n))}t.status=Bf}if(t.status===Bf){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(gr(A),t.pending!==0))return t.last_flush=-1,St;_e(t,A.adler&255),_e(t,A.adler>>8&255),A.adler=0}if(t.status=Ni,gr(A),t.pending!==0)return t.last_flush=-1,St}if(A.avail_in!==0||t.lookahead!==0||e!==ai&&t.status!==_s){let n=t.level===0?vg(t,e):t.strategy===ac?Y4(t,e):t.strategy===H4?J4(t,e):xs[t.level].func(t,e);if((n===Pi||n===Ka)&&(t.status=_s),n===Yt||n===Pi)return A.avail_out===0&&(t.last_flush=-1),St;if(n===Ra&&(e===x4?_4(t):e!==O0&&(uf(t,0,0,!1),e===E4&&(Yn(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),gr(A),A.avail_out===0))return t.last_flush=-1,St}return e!==_r?St:t.wrap<=0?M0:(t.wrap===2?(_e(t,A.adler&255),_e(t,A.adler>>8&255),_e(t,A.adler>>16&255),_e(t,A.adler>>24&255),_e(t,A.total_in&255),_e(t,A.total_in>>8&255),_e(t,A.total_in>>16&255),_e(t,A.total_in>>24&255)):(vs(t,A.adler>>>16),vs(t,A.adler&65535)),gr(A),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?St:M0)},rC=A=>{if($s(A))return sn;const e=A.state.status;return A.state=null,e===Ni?Di(A,L4):St},nC=(A,e)=>{let t=e.length;if($s(A))return sn;const r=A.state,n=r.wrap;if(n===2||n===1&&r.status!==Ta||r.lookahead)return sn;if(n===1&&(A.adler=Vs(A.adler,e,t,0)),r.wrap=0,t>=r.w_size){n===0&&(Yn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(e.subarray(t-r.w_size,t),0),e=c,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,Oa(r);r.lookahead>=me;){let c=r.strstart,u=r.lookahead-(me-1);do r.ins_h=si(r,r.ins_h,r.window[c+me-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--u);r.strstart=c,r.lookahead=me-1,Oa(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=me-1,r.match_available=0,A.next_in=o,A.input=s,A.avail_in=i,r.wrap=n,St};var iC=eC,aC=bg,sC=Cg,oC=mg,cC=AC,lC=tC,uC=rC,fC=nC,hC="pako deflate (from Nodeca project)",ks={deflateInit:iC,deflateInit2:aC,deflateReset:sC,deflateResetKeep:oC,deflateSetHeader:cC,deflate:lC,deflateEnd:uC,deflateSetDictionary:fC,deflateInfo:hC};const dC=(A,e)=>Object.prototype.hasOwnProperty.call(A,e);var gC=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)dC(t,r)&&(A[r]=t[r])}}return A},BC=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},$c={assign:gC,flattenChunks:BC};let Fg=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Fg=!1}const qs=new Uint8Array(256);for(let A=0;A<256;A++)qs[A]=A>=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;qs[254]=qs[254]=1;var pC=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 wC=(A,e)=>{if(e<65534&&A.subarray&&Fg)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 vC=(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=qs[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 wC(i,n)},mC=(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+qs[A[t]]>e?t:e},Ws={string2buf:pC,buf2string:vC,utf8border:mC};function CC(){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 Qg=CC;const yg=Object.prototype.toString,{Z_NO_FLUSH:bC,Z_SYNC_FLUSH:FC,Z_FULL_FLUSH:QC,Z_FINISH:yC,Z_OK:Oc,Z_STREAM_END:UC,Z_DEFAULT_COMPRESSION:_C,Z_DEFAULT_STRATEGY:xC,Z_DEFLATED:EC}=Zs;function Of(A){this.options=$c.assign({level:_C,method:EC,chunkSize:16384,windowBits:15,memLevel:8,strategy:xC},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 Qg,this.strm.avail_out=0;let t=ks.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==Oc)throw new Error(ka[t]);if(e.header&&ks.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=Ws.string2buf(e.dictionary):yg.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,t=ks.deflateSetDictionary(this.strm,r),t!==Oc)throw new Error(ka[t]);this._dict_set=!0}}Of.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?yC:bC,typeof A=="string"?t.input=Ws.string2buf(A):yg.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===FC||i===QC)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(n=ks.deflate(t,i),n===UC)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),n=ks.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Oc;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};Of.prototype.onData=function(A){this.chunks.push(A)};Of.prototype.onEnd=function(A){A===Oc&&(this.result=$c.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};const sc=16209,LC=16191;var IC=function(e,t){let r,n,i,o,s,c,u,f,p,w,g,F,y,I,b,M,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),c=_.dmax,u=_.wsize,f=_.whave,p=_.wnext,w=_.window,g=_.hold,F=_.bits,y=_.lencode,I=_.distcode,b=(1<<_.lenbits)-1,M=(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=I[g&M];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>c){e.msg="invalid distance too far back",_.mode=sc;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=sc;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=sc;break A}else{G=I[(G&65535)+(g&(1<<O)-1)];continue t}break}}else if(O&64)if(O&32){_.mode=LC;break A}else{e.msg="invalid literal/length code",_.mode=sc;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 ma=15,R0=852,K0=592,j0=0,Bu=1,G0=2,SC=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]),HC=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]),NC=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]),DC=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]),kC=(A,e,t,r,n,i,o,s)=>{const c=s.bits;let u=0,f=0,p=0,w=0,g=0,F=0,y=0,I=0,b=0,M=0,G,O,J,Z,nA,q=null,H;const AA=new Uint16Array(ma+1),_=new Uint16Array(ma+1);let S=null,P,K,sA;for(u=0;u<=ma;u++)AA[u]=0;for(f=0;f<r;f++)AA[e[t+f]]++;for(g=c,w=ma;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),I=1,u=1;u<=ma;u++)if(I<<=1,I-=AA[u],I<0)return-1;if(I>0&&(A===j0||w!==1))return-1;for(_[1]=0,u=1;u<ma;u++)_[u+1]=_[u]+AA[u];for(f=0;f<r;f++)e[t+f]!==0&&(o[_[e[t+f]]++]=f);if(A===j0?(q=S=o,H=20):A===Bu?(q=SC,S=HC,H=257):(q=NC,S=DC,H=0),M=0,f=0,u=p,nA=i,F=g,y=0,J=-1,b=1<<g,Z=b-1,A===Bu&&b>R0||A===G0&&b>K0)return 1;for(;;){P=u-y,o[f]+1<H?(K=0,sA=o[f]):o[f]>=H?(K=S[o[f]-H],sA=q[o[f]-H]):(K=32+64,sA=0),G=1<<u-y,O=1<<F,p=O;do O-=G,n[nA+(M>>y)+O]=P<<24|K<<16|sA|0;while(O!==0);for(G=1<<u-1;M&G;)G>>=1;if(G!==0?(M&=G-1,M+=G):M=0,f++,--AA[u]===0){if(u===w)break;u=e[t+o[f]]}if(u>g&&(M&Z)!==J){for(y===0&&(y=g),nA+=p,F=u-y,I=1<<F;F+y<w&&(I-=AA[F+y],!(I<=0));)F++,I<<=1;if(b+=1<<F,A===Bu&&b>R0||A===G0&&b>K0)return 1;J=M&Z,n[J]=g<<24|F<<16|nA-i|0}}return M!==0&&(n[nA+M]=u-y<<24|64<<16|0),s.bits=g,0};var Ts=kC;const TC=0,Ug=1,_g=2,{Z_FINISH:V0,Z_BLOCK:OC,Z_TREES:oc,Z_OK:Ri,Z_STREAM_END:MC,Z_NEED_DICT:PC,Z_STREAM_ERROR:Lr,Z_DATA_ERROR:xg,Z_MEM_ERROR:Eg,Z_BUF_ERROR:RC,Z_DEFLATED:q0}=Zs,Al=16180,W0=16181,z0=16182,X0=16183,J0=16184,Y0=16185,Z0=16186,$0=16187,Ad=16188,ed=16189,Mc=16190,Un=16191,pu=16192,td=16193,wu=16194,rd=16195,nd=16196,id=16197,ad=16198,cc=16199,lc=16200,sd=16201,od=16202,cd=16203,ld=16204,ud=16205,vu=16206,fd=16207,hd=16208,Xe=16209,Lg=16210,Ig=16211,KC=852,jC=592,GC=15,VC=GC,dd=A=>(A>>>24&255)+(A>>>8&65280)+((A&65280)<<8)+((A&255)<<24);function qC(){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 ji=A=>{if(!A)return 1;const e=A.state;return!e||e.strm!==A||e.mode<Al||e.mode>Ig?1:0},Sg=A=>{if(ji(A))return Lr;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=Al,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(jC),e.sane=1,e.back=-1,Ri},Hg=A=>{if(ji(A))return Lr;const e=A.state;return e.wsize=0,e.whave=0,e.wnext=0,Sg(A)},Ng=(A,e)=>{let t;if(ji(A))return Lr;const r=A.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Lr:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=t,r.wbits=e,Hg(A))},Dg=(A,e)=>{if(!A)return Lr;const t=new qC;A.state=t,t.strm=A,t.window=null,t.mode=Al;const r=Ng(A,e);return r!==Ri&&(A.state=null),r},WC=A=>Dg(A,VC);let gd=!0,mu,Cu;const zC=A=>{if(gd){mu=new Int32Array(512),Cu=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(Ts(Ug,A.lens,0,288,mu,0,A.work,{bits:9}),e=0;e<32;)A.lens[e++]=5;Ts(_g,A.lens,0,32,Cu,0,A.work,{bits:5}),gd=!1}A.lencode=mu,A.lenbits=9,A.distcode=Cu,A.distbits=5},kg=(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},XC=(A,e)=>{let t,r,n,i,o,s,c,u,f,p,w,g,F,y,I=0,b,M,G,O,J,Z,nA,q;const H=new Uint8Array(4);let AA,_;const S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ji(A)||!A.output||!A.input&&A.avail_in!==0)return Lr;t=A.state,t.mode===Un&&(t.mode=pu),o=A.next_out,n=A.output,c=A.avail_out,i=A.next_in,r=A.input,s=A.avail_in,u=t.hold,f=t.bits,p=s,w=c,q=Ri;A:for(;;)switch(t.mode){case Al:if(t.wrap===0){t.mode=pu;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=yt(t.check,H,2,0),u=0,f=0,t.mode=W0;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((u&255)<<8)+(u>>8))%31){A.msg="incorrect header check",t.mode=Xe;break}if((u&15)!==q0){A.msg="unknown compression method",t.mode=Xe;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=Xe;break}t.dmax=1<<t.wbits,t.flags=0,A.adler=t.check=1,t.mode=u&512?ed:Un,u=0,f=0;break;case W0:for(;f<16;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(t.flags=u,(t.flags&255)!==q0){A.msg="unknown compression method",t.mode=Xe;break}if(t.flags&57344){A.msg="unknown header flags set",t.mode=Xe;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=yt(t.check,H,2,0)),u=0,f=0,t.mode=z0;case z0: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=yt(t.check,H,4,0)),u=0,f=0,t.mode=X0;case X0: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=yt(t.check,H,2,0)),u=0,f=0,t.mode=J0;case J0: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=yt(t.check,H,2,0)),u=0,f=0}else t.head&&(t.head.extra=null);t.mode=Y0;case Y0: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=yt(t.check,r,g,i)),s-=g,i+=g,t.length-=g),t.length))break A;t.length=0,t.mode=Z0;case Z0: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=yt(t.check,r,g,i)),s-=g,i+=g,nA)break A}else t.head&&(t.head.name=null);t.length=0,t.mode=$0;case $0: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=yt(t.check,r,g,i)),s-=g,i+=g,nA)break A}else t.head&&(t.head.comment=null);t.mode=Ad;case Ad: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=Xe;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=Un;break;case ed:for(;f<32;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}A.adler=t.check=dd(u),u=0,f=0,t.mode=Mc;case Mc:if(t.havedict===0)return A.next_out=o,A.avail_out=c,A.next_in=i,A.avail_in=s,t.hold=u,t.bits=f,PC;A.adler=t.check=1,t.mode=Un;case Un:if(e===OC||e===oc)break A;case pu:if(t.last){u>>>=f&7,f-=f&7,t.mode=vu;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=td;break;case 1:if(zC(t),t.mode=cc,e===oc){u>>>=2,f-=2;break A}break;case 2:t.mode=nd;break;case 3:A.msg="invalid block type",t.mode=Xe}u>>>=2,f-=2;break;case td: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=Xe;break}if(t.length=u&65535,u=0,f=0,t.mode=wu,e===oc)break A;case wu:t.mode=rd;case rd:if(g=t.length,g){if(g>s&&(g=s),g>c&&(g=c),g===0)break A;n.set(r.subarray(i,i+g),o),s-=g,i+=g,c-=g,o+=g,t.length-=g;break}t.mode=Un;break;case nd: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=Xe;break}t.have=0,t.mode=id;case id:for(;t.have<t.ncode;){for(;f<3;){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}t.lens[S[t.have++]]=u&7,u>>>=3,f-=3}for(;t.have<19;)t.lens[S[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,AA={bits:t.lenbits},q=Ts(TC,t.lens,0,19,t.lencode,0,t.work,AA),t.lenbits=AA.bits,q){A.msg="invalid code lengths set",t.mode=Xe;break}t.have=0,t.mode=ad;case ad:for(;t.have<t.nlen+t.ndist;){for(;I=t.lencode[u&(1<<t.lenbits)-1],b=I>>>24,M=I>>>16&255,G=I&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=Xe;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=Xe;break}for(;g--;)t.lens[t.have++]=nA}}if(t.mode===Xe)break;if(t.lens[256]===0){A.msg="invalid code -- missing end-of-block",t.mode=Xe;break}if(t.lenbits=9,AA={bits:t.lenbits},q=Ts(Ug,t.lens,0,t.nlen,t.lencode,0,t.work,AA),t.lenbits=AA.bits,q){A.msg="invalid literal/lengths set",t.mode=Xe;break}if(t.distbits=6,t.distcode=t.distdyn,AA={bits:t.distbits},q=Ts(_g,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,AA),t.distbits=AA.bits,q){A.msg="invalid distances set",t.mode=Xe;break}if(t.mode=cc,e===oc)break A;case cc:t.mode=lc;case lc:if(s>=6&&c>=258){A.next_out=o,A.avail_out=c,A.next_in=i,A.avail_in=s,t.hold=u,t.bits=f,IC(A,w),o=A.next_out,n=A.output,c=A.avail_out,i=A.next_in,r=A.input,s=A.avail_in,u=t.hold,f=t.bits,t.mode===Un&&(t.back=-1);break}for(t.back=0;I=t.lencode[u&(1<<t.lenbits)-1],b=I>>>24,M=I>>>16&255,G=I&65535,!(b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(M&&!(M&240)){for(O=b,J=M,Z=G;I=t.lencode[Z+((u&(1<<O+J)-1)>>O)],b=I>>>24,M=I>>>16&255,G=I&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,M===0){t.mode=ud;break}if(M&32){t.back=-1,t.mode=Un;break}if(M&64){A.msg="invalid literal/length code",t.mode=Xe;break}t.extra=M&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.length+=u&(1<<t.extra)-1,u>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=od;case od:for(;I=t.distcode[u&(1<<t.distbits)-1],b=I>>>24,M=I>>>16&255,G=I&65535,!(b<=f);){if(s===0)break A;s--,u+=r[i++]<<f,f+=8}if(!(M&240)){for(O=b,J=M,Z=G;I=t.distcode[Z+((u&(1<<O+J)-1)>>O)],b=I>>>24,M=I>>>16&255,G=I&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,M&64){A.msg="invalid distance code",t.mode=Xe;break}t.offset=G,t.extra=M&15,t.mode=cd;case cd: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=Xe;break}t.mode=ld;case ld:if(c===0)break A;if(g=w-c,t.offset>g){if(g=t.offset-g,g>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=Xe;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>c&&(g=c),c-=g,t.length-=g;do n[o++]=y[F++];while(--g);t.length===0&&(t.mode=lc);break;case ud:if(c===0)break A;n[o++]=t.length,c--,t.mode=lc;break;case vu:if(t.wrap){for(;f<32;){if(s===0)break A;s--,u|=r[i++]<<f,f+=8}if(w-=c,A.total_out+=w,t.total+=w,t.wrap&4&&w&&(A.adler=t.check=t.flags?yt(t.check,n,w,o-w):Vs(t.check,n,w,o-w)),w=c,t.wrap&4&&(t.flags?u:dd(u))!==t.check){A.msg="incorrect data check",t.mode=Xe;break}u=0,f=0}t.mode=fd;case fd: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=Xe;break}u=0,f=0}t.mode=hd;case hd:q=MC;break A;case Xe:q=xg;break A;case Lg:return Eg;case Ig:default:return Lr}return A.next_out=o,A.avail_out=c,A.next_in=i,A.avail_in=s,t.hold=u,t.bits=f,(t.wsize||w!==A.avail_out&&t.mode<Xe&&(t.mode<vu||e!==V0))&&kg(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?yt(t.check,n,w,A.next_out-w):Vs(t.check,n,w,A.next_out-w)),A.data_type=t.bits+(t.last?64:0)+(t.mode===Un?128:0)+(t.mode===cc||t.mode===wu?256:0),(p===0&&w===0||e===V0)&&q===Ri&&(q=RC),q},JC=A=>{if(ji(A))return Lr;let e=A.state;return e.window&&(e.window=null),A.state=null,Ri},YC=(A,e)=>{if(ji(A))return Lr;const t=A.state;return t.wrap&2?(t.head=e,e.done=!1,Ri):Lr},ZC=(A,e)=>{const t=e.length;let r,n,i;return ji(A)||(r=A.state,r.wrap!==0&&r.mode!==Mc)?Lr:r.mode===Mc&&(n=1,n=Vs(n,e,t,0),n!==r.check)?xg:(i=kg(A,e,t,t),i?(r.mode=Lg,Eg):(r.havedict=1,Ri))};var $C=Hg,Ab=Ng,eb=Sg,tb=WC,rb=Dg,nb=XC,ib=JC,ab=YC,sb=ZC,ob="pako inflate (from Nodeca project)",xn={inflateReset:$C,inflateReset2:Ab,inflateResetKeep:eb,inflateInit:tb,inflateInit2:rb,inflate:nb,inflateEnd:ib,inflateGetHeader:ab,inflateSetDictionary:sb,inflateInfo:ob};function cb(){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 lb=cb;const Tg=Object.prototype.toString,{Z_NO_FLUSH:ub,Z_FINISH:fb,Z_OK:zs,Z_STREAM_END:bu,Z_NEED_DICT:Fu,Z_STREAM_ERROR:hb,Z_DATA_ERROR:Bd,Z_MEM_ERROR:db}=Zs;function Ao(A){this.options=$c.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 Qg,this.strm.avail_out=0;let t=xn.inflateInit2(this.strm,e.windowBits);if(t!==zs)throw new Error(ka[t]);if(this.header=new lb,xn.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Ws.string2buf(e.dictionary):Tg.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=xn.inflateSetDictionary(this.strm,e.dictionary),t!==zs)))throw new Error(ka[t])}Ao.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?fb:ub,Tg.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=xn.inflate(t,o),i===Fu&&n&&(i=xn.inflateSetDictionary(t,n),i===zs?i=xn.inflate(t,o):i===Bd&&(i=Fu));t.avail_in>0&&i===bu&&t.state.wrap>0&&A[t.next_in]!==0;)xn.inflateReset(t),i=xn.inflate(t,o);switch(i){case hb:case Bd:case Fu:case db:return this.onEnd(i),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||i===bu))if(this.options.to==="string"){let c=Ws.utf8border(t.output,t.next_out),u=t.next_out-c,f=Ws.buf2string(t.output,c);t.next_out=u,t.avail_out=r-u,u&&t.output.set(t.output.subarray(c,c+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===zs&&s===0)){if(i===bu)return i=xn.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Ao.prototype.onData=function(A){this.chunks.push(A)};Ao.prototype.onEnd=function(A){A===zs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=$c.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function Mf(A,e){const t=new Ao(e);if(t.push(A),t.err)throw t.msg||ka[t.err];return t.result}function gb(A,e){return e=e||{},e.raw=!0,Mf(A,e)}var Bb=Ao,pb=Mf,wb=gb,vb=Mf,mb=Zs,Cb={Inflate:Bb,inflate:pb,inflateRaw:wb,ungzip:vb,constants:mb};const{Inflate:bb,inflate:Fb,inflateRaw:XQ,ungzip:JQ}=Cb;var pd=bb,Qb=Fb;const Og=[];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;Og[A]=e}const wd=4294967295;function yb(A,e,t){let r=A;for(let n=0;n<t;n++)r=Og[(r^e[n])&255]^r>>>8;return r}function Ub(A,e){return(yb(wd,A,e)^wd)>>>0}function vd(A,e,t){const r=A.readUint32(),n=Ub(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 Mg(A,e,t){for(let r=0;r<t;r++)e[r]=A[r]}function Pg(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 Rg(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 Kg(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 jg(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]+_b(e[i-n],t[i],t[i-n])&255}}function _b(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 xb(A,e,t,r,n,i){switch(A){case 0:Mg(e,t,n);break;case 1:Pg(e,t,n,i);break;case 2:Rg(e,t,r,n);break;case 3:Kg(e,t,r,n,i);break;case 4:jg(e,t,r,n,i);break;default:throw new Error(`Unsupported filter: ${A}`)}}const Eb=new Uint16Array([255]),Lb=new Uint8Array(Eb.buffer),Ib=Lb[0]===255;function Sb(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,c=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 I=0;I<g;I++){const b=e[u++],M=e.subarray(u,u+F);u+=F;const G=new Uint8Array(F);xb(b,M,G,y,F,s),y.set(G);for(let O=0;O<w;O++){const J=p.x+O*p.xStep,Z=p.y+I*p.yStep;if(!(J>=t||Z>=r))for(let nA=0;nA<s;nA++)c[(Z*t+J)*s+nA]=G[O*s+nA]}}}if(i===16){const f=new Uint16Array(c.buffer);if(Ib)for(let p=0;p<f.length;p++)f[p]=Hb(f[p]);return f}else return c}function Hb(A){return(A&255)<<8|A>>8&255}const Nb=new Uint16Array([255]),Db=new Uint8Array(Nb.buffer),kb=Db[0]===255,Tb=new Uint8Array(0);function md(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),c=new Uint8Array(r*s);let u=Tb,f=0,p,w;for(let g=0;g<r;g++){switch(p=e.subarray(f+1,f+1+s),w=c.subarray(g*s,(g+1)*s),e[f]){case 0:Mg(p,w,s);break;case 1:Pg(p,w,s,o);break;case 2:Rg(p,w,u,s);break;case 3:Kg(p,w,u,s,o);break;case 4:jg(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(c.buffer);if(kb)for(let F=0;F<g.length;F++)g[F]=Ob(g[F]);return g}else return c}function Ob(A){return(A&255)<<8|A>>8&255}const mc=Uint8Array.of(137,80,78,71,13,10,26,10);function Cd(A){if(!Mb(A.readBytes(mc.length)))throw new Error("wrong PNG signature")}function Mb(A){if(A.length<mc.length)return!1;for(let e=0;e<mc.length;e++)if(A[e]!==mc[e])return!1;return!0}const Pb="tEXt",Rb=0,Gg=new TextDecoder("latin1");function Kb(A){if(Gb(A),A.length===0||A.length>79)throw new Error("keyword length must be between 1 and 79")}const jb=/^[\u0000-\u00FF]*$/;function Gb(A){if(!jb.test(A))throw new Error("invalid latin1 text")}function Vb(A,e,t){const r=Vg(e);A[r]=qb(e,t-r.length-1)}function Vg(A){for(A.mark();A.readByte()!==Rb;);const e=A.offset;A.reset();const t=Gg.decode(A.readBytes(e-A.offset-1));return A.skip(1),Kb(t),t}function qb(A,e){return Gg.decode(A.readBytes(e))}const hr={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Qu={UNKNOWN:-1,DEFLATE:0},bd={UNKNOWN:-1,ADAPTIVE:0},yu={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},uc={NONE:0,BACKGROUND:1,PREVIOUS:2},Uu={SOURCE:0,OVER:1};class Wb extends Sf{constructor(t,r={}){super(t);Se(this,"_checkCrc");Se(this,"_inflator");Se(this,"_png");Se(this,"_apng");Se(this,"_end");Se(this,"_hasPalette");Se(this,"_palette");Se(this,"_hasTransparency");Se(this,"_transparency");Se(this,"_compressionMethod");Se(this,"_filterMethod");Se(this,"_interlaceMethod");Se(this,"_colorType");Se(this,"_isAnimated");Se(this,"_numberOfFrames");Se(this,"_numberOfPlays");Se(this,"_frames");Se(this,"_writingDataChunks");const{checkCrc:n=!1}=r;this._checkCrc=n,this._inflator=new pd,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=Qu.UNKNOWN,this._filterMethod=bd.UNKNOWN,this._interlaceMethod=yu.UNKNOWN,this._colorType=hr.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Cd(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeChunk(t,r)}return this.decodeImage(),this._png}decodeApng(){for(Cd(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 Pb:Vb(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?vd(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?vd(this,t+4,r):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=zb(this.readUint8());const r=this.readUint8();this._colorType=r;let n;switch(r){case hr.GREYSCALE:n=1;break;case hr.TRUECOLOUR:n=3;break;case hr.INDEXED_COLOUR:n=1;break;case hr.GREYSCALE_ALPHA:n=2;break;case hr.TRUECOLOUR_ALPHA:n=4;break;case hr.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==Qu.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 hr.GREYSCALE:case hr.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 hr.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 hr.UNKNOWN:case hr.GREYSCALE_ALPHA:case hr.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const r=Vg(this),n=this.readUint8();if(n!==Qu.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${n}`);const i=this.readBytes(t-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:Qb(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=md({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 uc.NONE:break;case uc.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 c=0;c<this._png.channels;c++)n.data[s+c]=0}break;case uc.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 c=((o+r.yOffset)*this._png.width+r.xOffset+s)*this._png.channels,u=(o*r.width+s)*this._png.channels;return{index:c,frameIndex:u}};switch(r.blendOp){case Uu.SOURCE:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:c,frameIndex:u}=i(o,s);for(let f=0;f<this._png.channels;f++)t.data[c+f]=r.data[u+f]}break;case Uu.OVER:for(let o=0;o<r.height;o++)for(let s=0;s<r.width;s++){const{index:c,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[c+f]);t.data[c+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!==bd.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===yu.NO_INTERLACE)this._png.data=md({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===yu.ADAM7)this._png.data=Sb({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:uc.NONE,blendOp:Uu.SOURCE,data:t}),this._inflator=new pd,this._writingDataChunks=!1}}function zb(A){if(A!==1&&A!==2&&A!==4&&A!==8&&A!==16)throw new Error(`invalid bit depth: ${A}`);return A}var Fd;(function(A){A[A.UNKNOWN=0]="UNKNOWN",A[A.METRE=1]="METRE"})(Fd||(Fd={}));function Xb(A,e){return new Wb(A,e).decode()}var te=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function _u(){te.console&&typeof te.console.log=="function"&&te.console.log.apply(te.console,arguments)}var Te={log:_u,warn:function(A){te.console&&(typeof te.console.warn=="function"?te.console.warn.apply(te.console,arguments):_u.call(null,arguments))},error:function(A){te.console&&(typeof te.console.error=="function"?te.console.error.apply(te.console,arguments):_u(A))}};function xu(A,e,t){var r=new XMLHttpRequest;r.open("GET",A),r.responseType="blob",r.onload=function(){Ei(r.response,e,t)},r.onerror=function(){Te.error("could not download file")},r.send()}function Qd(A){var e=new XMLHttpRequest;e.open("HEAD",A,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function fc(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 Ei=te.saveAs||((typeof window>"u"?"undefined":Oe(window))!=="object"||window!==te?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(A,e,t){var r=te.URL||te.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?Qd(n.href)?xu(A,e,t):fc(n,n.target="_blank"):fc(n)):(n.href=r.createObjectURL(A),setTimeout(function(){r.revokeObjectURL(n.href)},4e4),setTimeout(function(){fc(n)},0))}:"msSaveOrOpenBlob"in navigator?function(A,e,t){if(e=e||A.name||"download",typeof A=="string")if(Qd(A))xu(A,e,t);else{var r=document.createElement("a");r.href=A,r.target="_blank",setTimeout(function(){fc(r)})}else navigator.msSaveOrOpenBlob(function(n,i){return i===void 0?i={autoBom:!1}:Oe(i)!=="object"&&(Te.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 xu(A,e,t);var n=A.type==="application/octet-stream",i=/constructor/i.test(te.HTMLElement)||te.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||n&&i)&&(typeof FileReader>"u"?"undefined":Oe(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 c=te.URL||te.webkitURL,u=c.createObjectURL(A);r?r.location=u:location.href=u,r=null,setTimeout(function(){c.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 qg(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),c=this.g.toString(16),u=this.b.toString(16);return s.length==1&&(s="0"+s),c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),"#"+s+c+u}}var Cc=te.atob.bind(te),yd=te.btoa.bind(te);/**
 * @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 Eu(A,e){var t=A[0],r=A[1],n=A[2],i=A[3];t=Mt(t,r,n,i,e[0],7,-680876936),i=Mt(i,t,r,n,e[1],12,-389564586),n=Mt(n,i,t,r,e[2],17,606105819),r=Mt(r,n,i,t,e[3],22,-1044525330),t=Mt(t,r,n,i,e[4],7,-176418897),i=Mt(i,t,r,n,e[5],12,1200080426),n=Mt(n,i,t,r,e[6],17,-1473231341),r=Mt(r,n,i,t,e[7],22,-45705983),t=Mt(t,r,n,i,e[8],7,1770035416),i=Mt(i,t,r,n,e[9],12,-1958414417),n=Mt(n,i,t,r,e[10],17,-42063),r=Mt(r,n,i,t,e[11],22,-1990404162),t=Mt(t,r,n,i,e[12],7,1804603682),i=Mt(i,t,r,n,e[13],12,-40341101),n=Mt(n,i,t,r,e[14],17,-1502002290),t=Pt(t,r=Mt(r,n,i,t,e[15],22,1236535329),n,i,e[1],5,-165796510),i=Pt(i,t,r,n,e[6],9,-1069501632),n=Pt(n,i,t,r,e[11],14,643717713),r=Pt(r,n,i,t,e[0],20,-373897302),t=Pt(t,r,n,i,e[5],5,-701558691),i=Pt(i,t,r,n,e[10],9,38016083),n=Pt(n,i,t,r,e[15],14,-660478335),r=Pt(r,n,i,t,e[4],20,-405537848),t=Pt(t,r,n,i,e[9],5,568446438),i=Pt(i,t,r,n,e[14],9,-1019803690),n=Pt(n,i,t,r,e[3],14,-187363961),r=Pt(r,n,i,t,e[8],20,1163531501),t=Pt(t,r,n,i,e[13],5,-1444681467),i=Pt(i,t,r,n,e[2],9,-51403784),n=Pt(n,i,t,r,e[7],14,1735328473),t=Rt(t,r=Pt(r,n,i,t,e[12],20,-1926607734),n,i,e[5],4,-378558),i=Rt(i,t,r,n,e[8],11,-2022574463),n=Rt(n,i,t,r,e[11],16,1839030562),r=Rt(r,n,i,t,e[14],23,-35309556),t=Rt(t,r,n,i,e[1],4,-1530992060),i=Rt(i,t,r,n,e[4],11,1272893353),n=Rt(n,i,t,r,e[7],16,-155497632),r=Rt(r,n,i,t,e[10],23,-1094730640),t=Rt(t,r,n,i,e[13],4,681279174),i=Rt(i,t,r,n,e[0],11,-358537222),n=Rt(n,i,t,r,e[3],16,-722521979),r=Rt(r,n,i,t,e[6],23,76029189),t=Rt(t,r,n,i,e[9],4,-640364487),i=Rt(i,t,r,n,e[12],11,-421815835),n=Rt(n,i,t,r,e[15],16,530742520),t=Kt(t,r=Rt(r,n,i,t,e[2],23,-995338651),n,i,e[0],6,-198630844),i=Kt(i,t,r,n,e[7],10,1126891415),n=Kt(n,i,t,r,e[14],15,-1416354905),r=Kt(r,n,i,t,e[5],21,-57434055),t=Kt(t,r,n,i,e[12],6,1700485571),i=Kt(i,t,r,n,e[3],10,-1894986606),n=Kt(n,i,t,r,e[10],15,-1051523),r=Kt(r,n,i,t,e[1],21,-2054922799),t=Kt(t,r,n,i,e[8],6,1873313359),i=Kt(i,t,r,n,e[15],10,-30611744),n=Kt(n,i,t,r,e[6],15,-1560198380),r=Kt(r,n,i,t,e[13],21,1309151649),t=Kt(t,r,n,i,e[4],6,-145523070),i=Kt(i,t,r,n,e[11],10,-1120210379),n=Kt(n,i,t,r,e[2],15,718787259),r=Kt(r,n,i,t,e[9],21,-343485551),A[0]=ti(t,A[0]),A[1]=ti(r,A[1]),A[2]=ti(n,A[2]),A[3]=ti(i,A[3])}function el(A,e,t,r,n,i){return e=ti(ti(e,A),ti(r,i)),ti(e<<n|e>>>32-n,t)}function Mt(A,e,t,r,n,i,o){return el(e&t|~e&r,A,e,n,i,o)}function Pt(A,e,t,r,n,i,o){return el(e&r|t&~r,A,e,n,i,o)}function Rt(A,e,t,r,n,i,o){return el(e^t^r,A,e,n,i,o)}function Kt(A,e,t,r,n,i,o){return el(t^(e|~r),A,e,n,i,o)}function Wg(A){var e,t=A.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=A.length;e+=64)Eu(r,Jb(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(Eu(r,n),e=0;e<16;e++)n[e]=0;return n[14]=8*t,Eu(r,n),r}function Jb(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 Ud="0123456789abcdef".split("");function Yb(A){for(var e="",t=0;t<4;t++)e+=Ud[A>>8*t+4&15]+Ud[A>>8*t&15];return e}function Zb(A){return String.fromCharCode(255&A,(65280&A)>>8,(16711680&A)>>16,(4278190080&A)>>24)}function wf(A){return Wg(A).map(Zb).join("")}var $b=function(A){for(var e=0;e<A.length;e++)A[e]=Yb(A[e]);return A.join("")}(Wg("hello"))!="5d41402abc4b2a76b9719d911017c592";function ti(A,e){if($b){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 vf(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=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var f=s[c];u=(u+f+o.charCodeAt(c))%256,s[c]=s[u],s[u]=f}t=A,r=s}else s=r;var p=e.length,w=0,g=0,F="";for(c=0;c<p;c++)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(c)^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 _d={print:4,modify:8,copy:16,"annot-forms":32};function ya(A,e,t,r){this.v=1,this.r=2;var n=192;A.forEach(function(s){if(_d.perm!==void 0)throw new Error("Invalid permission: "+s);n+=_d[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=wf(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=vf(this.encryptionKey,this.padding)}function Ua(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 xd(A){if(Oe(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){te.console&&Te.error("jsPDF PubSub Error",s.message,s)}o[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Pc(A){if(!(this instanceof Pc))return new Pc(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 zg(A,e){this.gState=A,this.matrix=e,this.id="",this.objectNumber=-1}function Ii(A,e,t,r,n){if(!(this instanceof Ii))return new Ii(A,e,t,r,n);this.type=A==="axial"?2:3,this.coords=e,this.colors=t,zg.call(this,r,n)}function xa(A,e,t,r,n){if(!(this instanceof xa))return new xa(A,e,t,r,n);this.boundingBox=A,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,zg.call(this,r,n)}function YA(A){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],n=arguments[2],i=arguments[3],o=[],s=1,c=16,u="S",f=null;Oe(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&&(c=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=xd;var F="1.3",y=g.__private__.getPdfVersion=function(){return F};g.__private__.setPdfVersion=function(h){F=h};var I={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 I};var b=g.__private__.getPageFormat=function(h){return I[h]};n=n||"a4";var M="compat",G="advanced",O=M;function J(){this.saveGraphicsState(),L(new ZA(Ae,0,0,-Ae,0,gi()*Ae).toString()+" cm"),this.setFontSize(this.getFontSize()/Ae),u="n",O=G}function Z(){this.restoreGraphicsState(),u="S",O=M}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===M;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 c=="number"?function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return AA(h,c)}:c==="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)},S=g.__private__.f3=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.f3");return AA(h,3)},P=g.scale=g.__private__.scale=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.scale");return O===M?h*Ae:O===G?h:void 0},K=function(h){return P(function(v){return O===M?gi()-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,cA="00000000000000000000000000000000",lA=g.__private__.getFileId=function(){return cA},rA=g.__private__.setFileId=function(h){return cA=h!==void 0&&/^[a-fA-F0-9]{32}$/.test(h)?h.toUpperCase():cA.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(xt=new ya(f.userPermissions,f.userPassword,f.ownerPassword,cA)),cA};g.setFileId=function(h){return rA(h),this},g.getFileId=function(){return lA()};var hA=g.__private__.convertDateToPDFDate=function(h){var v=h.getTimezoneOffset(),N=v<0?"+":"-",V=Math.floor(Math.abs(v/60)),$=Math.abs(v%60),dA=[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()),dA].join("")},FA=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),dA=parseInt(h.substr(12,2),10),vA=parseInt(h.substr(14,2),10);return new Date(v,N,V,$,dA,vA,0)},wA=g.__private__.setCreationDate=function(h){var v;if(h===void 0&&(h=new Date),h instanceof Date)v=hA(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=FA(sA)),v};g.setCreationDate=function(h){return wA(h),this},g.getCreationDate=function(h){return Q(h)};var T,R=g.__private__.padd2=function(h){return("0"+parseInt(h)).slice(-2)},W=g.__private__.padd2Hex=function(h){return("00"+(h=h.toString())).substr(h.length)},X=0,tA=[],uA=[],j=0,oA=[],CA=[],yA=!1,UA=uA;g.__private__.setCustomOutputDestination=function(h){yA=!0,UA=h};var NA=function(h){yA||(UA=h)};g.__private__.resetCustomOutputDestination=function(){yA=!1,UA=uA};var L=g.__private__.out=function(h){return h=h.toString(),j+=h.length+1,UA.push(h),UA},_A=g.__private__.write=function(h){return L(arguments.length===1?h.toString():Array.prototype.join.call(arguments," "))},xA=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},KA=[["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 KA};var fA=A.fontSize||16;g.__private__.setFontSize=g.setFontSize=function(h){return fA=O===G?h/Ae:h,this};var SA,LA=g.__private__.getFontSize=g.getFontSize=function(){return O===M?fA:fA*Ae},zA=A.R2L||!1;g.__private__.setR2L=g.setR2L=function(h){return zA=h,this},g.__private__.getR2L=g.getR2L=function(){return zA};var JA,Qe=g.__private__.setZoomMode=function(h){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(h))SA=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.');SA=h}else SA=parseInt(h,10)};g.__private__.getZoomMode=function(){return SA};var ie,re=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.');JA=h};g.__private__.getPageMode=function(){return JA};var Be=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.');ie=h};g.__private__.getLayoutMode=function(){return ie},g.__private__.setDisplayMode=g.setDisplayMode=function(h,v,N){return Qe(h),Be(v),re(N),this};var de={title:"",subject:"",author:"",keywords:"",creator:""};g.__private__.getDocumentProperty=function(h){if(Object.keys(de).indexOf(h)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return de[h]},g.__private__.getDocumentProperties=function(){return de},g.__private__.setDocumentProperties=g.setProperties=g.setDocumentProperties=function(h){for(var v in de)de.hasOwnProperty(v)&&h[v]&&(de[v]=h[v]);return this},g.__private__.setDocumentProperty=function(h,v){if(Object.keys(de).indexOf(h)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return de[h]=v};var MA,Ae,WA,Ue,we,ce={},ne={},je=[],jA={},Ce={},GA={},PA={},xe=null,se=0,DA=[],$A=new xd(g),$e=A.hotfixes||[],ge={},We={},Ct=[],ZA=function h(v,N,V,$,dA,vA){if(!(this instanceof h))return new h(v,N,V,$,dA,vA);isNaN(v)&&(v=1),isNaN(N)&&(N=0),isNaN(V)&&(V=0),isNaN($)&&($=1),isNaN(dA)&&(dA=0),isNaN(vA)&&(vA=0),this._matrix=[v,N,V,$,dA,vA]};Object.defineProperty(ZA.prototype,"sx",{get:function(){return this._matrix[0]},set:function(h){this._matrix[0]=h}}),Object.defineProperty(ZA.prototype,"shy",{get:function(){return this._matrix[1]},set:function(h){this._matrix[1]=h}}),Object.defineProperty(ZA.prototype,"shx",{get:function(){return this._matrix[2]},set:function(h){this._matrix[2]=h}}),Object.defineProperty(ZA.prototype,"sy",{get:function(){return this._matrix[3]},set:function(h){this._matrix[3]=h}}),Object.defineProperty(ZA.prototype,"tx",{get:function(){return this._matrix[4]},set:function(h){this._matrix[4]=h}}),Object.defineProperty(ZA.prototype,"ty",{get:function(){return this._matrix[5]},set:function(h){this._matrix[5]=h}}),Object.defineProperty(ZA.prototype,"a",{get:function(){return this._matrix[0]},set:function(h){this._matrix[0]=h}}),Object.defineProperty(ZA.prototype,"b",{get:function(){return this._matrix[1]},set:function(h){this._matrix[1]=h}}),Object.defineProperty(ZA.prototype,"c",{get:function(){return this._matrix[2]},set:function(h){this._matrix[2]=h}}),Object.defineProperty(ZA.prototype,"d",{get:function(){return this._matrix[3]},set:function(h){this._matrix[3]=h}}),Object.defineProperty(ZA.prototype,"e",{get:function(){return this._matrix[4]},set:function(h){this._matrix[4]=h}}),Object.defineProperty(ZA.prototype,"f",{get:function(){return this._matrix[5]},set:function(h){this._matrix[5]=h}}),Object.defineProperty(ZA.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(ZA.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(ZA.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(ZA.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),ZA.prototype.join=function(h){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(q).join(h)},ZA.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,dA=h.tx*this.sx+h.ty*this.shx+this.tx,vA=h.tx*this.shy+h.ty*this.sy+this.ty;return new ZA(v,N,V,$,dA,vA)},ZA.prototype.decompose=function(){var h=this.sx,v=this.shy,N=this.shx,V=this.sy,$=this.tx,dA=this.ty,vA=Math.sqrt(h*h+v*v),RA=(h/=vA)*N+(v/=vA)*V;N-=h*RA,V-=v*RA;var OA=Math.sqrt(N*N+V*V);return RA/=OA,h*(V/=OA)<v*(N/=OA)&&(h=-h,v=-v,RA=-RA,vA=-vA),{scale:new ZA(vA,0,0,OA,0,0),translate:new ZA(1,0,0,1,$,dA),rotate:new ZA(h,v,-v,h,0,0),skew:new ZA(1,0,RA,1,0,0)}},ZA.prototype.toString=function(h){return this.join(" ")},ZA.prototype.inversed=function(){var h=this.sx,v=this.shy,N=this.shx,V=this.sy,$=this.tx,dA=this.ty,vA=1/(h*V-v*N),RA=V*vA,OA=-v*vA,ae=-N*vA,le=h*vA;return new ZA(RA,OA,ae,le,-RA*$-ae*dA,-OA*$-le*dA)},ZA.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 di(v,N)},ZA.prototype.applyToRectangle=function(h){var v=this.applyToPoint(h),N=this.applyToPoint(new di(h.x+h.w,h.y+h.h));return new Ya(v.x,v.y,N.x-v.x,N.y-v.y)},ZA.prototype.clone=function(){var h=this.sx,v=this.shy,N=this.shx,V=this.sy,$=this.tx,dA=this.ty;return new ZA(h,v,N,V,$,dA)},g.Matrix=ZA;var Zt=g.matrixMult=function(h,v){return v.multiply(h)},wr=new ZA(1,0,0,1,0,0);g.unitMatrix=g.identityMatrix=wr;var $t=function(h,v){if(!Ce[h]){var N=(v instanceof Ii?"Sh":"P")+(Object.keys(jA).length+1).toString(10);v.id=N,Ce[h]=N,jA[N]=v,$A.publish("addPattern",v)}};g.ShadingPattern=Ii,g.TilingPattern=xa,g.addShadingPattern=function(h,v){return H("addShadingPattern()"),$t(h,v),this},g.beginTilingPattern=function(h){H("beginTilingPattern()"),Za(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=CA[T].join(`
`),$t(h,v),$A.publish("endTilingPattern",v),Ct.pop().restore()};var vr,At=g.__private__.newObject=function(){var h=bt();return _t(h,!0),h},bt=g.__private__.newObjectDeferred=function(){return X++,tA[X]=function(){return j},X},_t=function(h,v){return v=typeof v=="boolean"&&v,tA[h]=j,v&&L(h+" 0 obj"),h},li=g.__private__.newAdditionalObject=function(){var h={objId:bt(),content:""};return oA.push(h),h},In=bt(),Ir=bt(),Vr=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},Sr=g.__private__.encodeColorString=function(h){var v;typeof h=="string"&&(h={ch1:h});var N=h.ch1,V=h.ch2,$=h.ch3,dA=h.ch4,vA=h.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof N=="string"&&N.charAt(0)!=="#"){var RA=new qg(N);if(RA.ok)N=RA.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 OA=parseInt(N.substr(1),16);N=OA>>16&255,V=OA>>8&255,$=255&OA}if(V===void 0||dA===void 0&&N===V&&V===$)v=typeof N=="string"?N+" "+vA[0]:h.precision===2?_(N/255)+" "+vA[0]:S(N/255)+" "+vA[0];else if(dA===void 0||Oe(dA)==="object"){if(dA&&!isNaN(dA.a)&&dA.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(" "):[S(N/255),S(V/255),S($/255),vA[1]].join(" ")}else v=typeof N=="string"?[N,V,$,dA,vA[2]].join(" "):h.precision===2?[_(N),_(V),_($),_(dA),vA[2]].join(" "):[S(N),S(V),S($),S(dA),vA[2]].join(" ");return v},Hr=g.__private__.getFilters=function(){return o},mr=g.__private__.putStream=function(h){var v=(h=h||{}).data||"",N=h.filters||Hr(),V=h.alreadyAppliedFilters||[],$=h.addLength1||!1,dA=v.length,vA=h.objectId,RA=function(Ge){return Ge};if(f!==null&&vA===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(RA=xt.encryptor(vA,0));var OA={};N===!0&&(N=["FlateEncode"]);var ae=h.additionalKeyValues||[],le=(OA=YA.API.processDataByFilters!==void 0?YA.API.processDataByFilters(v,N):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(V)?V.join(" "):V.toString());if(OA.data.length!==0&&(ae.push({key:"Length",value:OA.data.length}),$===!0&&ae.push({key:"Length1",value:dA})),le.length!=0)if(le.split("/").length-1==1)ae.push({key:"Filter",value:le});else{ae.push({key:"Filter",value:"["+le+"]"});for(var be=0;be<ae.length;be+=1)if(ae[be].key==="DecodeParms"){for(var ht=[],De=0;De<OA.reverseChain.split("/").length-1;De+=1)ht.push("null");ht.push(ae[be].value),ae[be].value="["+ht.join(" ")+"]"}}L("<<");for(var He=0;He<ae.length;He++)L("/"+ae[He].key+" "+ae[He].value);L(">>"),OA.data.length!==0&&(L("stream"),L(RA(OA.data)),L("endstream"))},ui=g.__private__.putPage=function(h){var v=h.number,N=h.data,V=h.objId,$=h.contentsObjId;_t(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),$A.publish("putPage",{objId:V,pageContext:DA[v],pageNumber:v,page:N}),L("/Contents "+$+" 0 R"),L(">>"),L("endobj");var dA=N.join(`
`);return O===G&&(dA+=`
Q`),_t($,!0),mr({data:dA,filters:Hr(),objectId:$}),L("endobj"),V},qr=g.__private__.putPages=function(){var h,v,N=[];for(h=1;h<=se;h++)DA[h].objId=bt(),DA[h].contentsObjId=bt();for(h=1;h<=se;h++)N.push(ui({number:h,data:CA[h],objId:DA[h].objId,contentsObjId:DA[h].contentsObjId,mediaBox:DA[h].mediaBox,cropBox:DA[h].cropBox,bleedBox:DA[h].bleedBox,trimBox:DA[h].trimBox,artBox:DA[h].artBox,userUnit:DA[h].userUnit,rootDictionaryObjId:In,resourceDictionaryObjId:Ir}));_t(In,!0),L("<</Type /Pages");var V="/Kids [";for(v=0;v<se;v++)V+=N[v]+" 0 R ";L(V+"]"),L("/Count "+se),L(">>"),L("endobj"),$A.publish("postPutPages")},fi=function(h){$A.publish("putFont",{font:h,out:L,newObject:At,putStream:mr}),h.isAlreadyPutted!==!0&&(h.objectNumber=At(),L("<<"),L("/Type /Font"),L("/BaseFont /"+Ua(h.postScriptName)),L("/Subtype /Type1"),typeof h.encoding=="string"&&L("/Encoding /"+h.encoding),L("/FirstChar 32"),L("/LastChar 255"),L(">>"),L("endobj"))},Vi=function(h){h.objectNumber=At();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(`
`);mr({data:N,additionalKeyValues:v,objectId:h.objectNumber}),L("endobj")},qi=function(h,v){v||(v=21);var N=At(),V=function(vA,RA){var OA,ae=[],le=1/(RA-1);for(OA=0;OA<1;OA+=le)ae.push(OA);if(ae.push(1),vA[0].offset!=0){var be={offset:0,color:vA[0].color};vA.unshift(be)}if(vA[vA.length-1].offset!=1){var ht={offset:1,color:vA[vA.length-1].color};vA.push(ht)}for(var De="",He=0,Ge=0;Ge<ae.length;Ge++){for(OA=ae[Ge];OA>vA[He+1].offset;)He++;var Je=vA[He].offset,Ye=(OA-Je)/(vA[He+1].offset-Je),Dt=vA[He].color,pn=vA[He+1].color;De+=W(Math.round((1-Ye)*Dt[0]+Ye*pn[0]).toString(16))+W(Math.round((1-Ye)*Dt[1]+Ye*pn[1]).toString(16))+W(Math.round((1-Ye)*Dt[2]+Ye*pn[2]).toString(16))}return De.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]"}),mr({data:V,additionalKeyValues:$,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:N}),L("endobj"),h.objectNumber=At(),L("<< /ShadingType "+h.type),L("/ColorSpace /DeviceRGB");var dA="/Coords ["+q(parseFloat(h.coords[0]))+" "+q(parseFloat(h.coords[1]))+" ";h.type===2?dA+=q(parseFloat(h.coords[2]))+" "+q(parseFloat(h.coords[3])):dA+=q(parseFloat(h.coords[2]))+" "+q(parseFloat(h.coords[3]))+" "+q(parseFloat(h.coords[4]))+" "+q(parseFloat(h.coords[5])),L(dA+="]"),h.matrix&&L("/Matrix ["+h.matrix.toString()+"]"),L("/Function "+N+" 0 R"),L("/Extend [true true]"),L(">>"),L("endobj")},Wi=function(h,v){var N=bt(),V=At();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()+"]"}),mr({data:h.stream,additionalKeyValues:$,objectId:h.objectNumber}),L("endobj")},tl=function(h){for(var v in h.objectNumber=At(),L("<<"),h)switch(v){case"opacity":L("/ca "+_(h[v]));break;case"stroke-opacity":L("/CA "+_(h[v]))}L(">>"),L("endobj")},ja=function(h){_t(h.resourcesOid,!0),L("<<"),L("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var v in L("/Font <<"),ce)ce.hasOwnProperty(v)&&(p===!1||p===!0&&w.hasOwnProperty(v))&&L("/"+v+" "+ce[v].objectNumber+" 0 R");L(">>")}(),function(){if(Object.keys(jA).length>0){for(var v in L("/Shading <<"),jA)jA.hasOwnProperty(v)&&jA[v]instanceof Ii&&jA[v].objectNumber>=0&&L("/"+v+" "+jA[v].objectNumber+" 0 R");$A.publish("putShadingPatternDict"),L(">>")}}(),function(v){if(Object.keys(jA).length>0){for(var N in L("/Pattern <<"),jA)jA.hasOwnProperty(N)&&jA[N]instanceof g.TilingPattern&&jA[N].objectNumber>=0&&jA[N].objectNumber<v&&L("/"+N+" "+jA[N].objectNumber+" 0 R");$A.publish("putTilingPatternDict"),L(">>")}}(h.objectOid),function(){if(Object.keys(GA).length>0){var v;for(v in L("/ExtGState <<"),GA)GA.hasOwnProperty(v)&&GA[v].objectNumber>=0&&L("/"+v+" "+GA[v].objectNumber+" 0 R");$A.publish("putGStateDict"),L(">>")}}(),function(){for(var v in L("/XObject <<"),ge)ge.hasOwnProperty(v)&&ge[v].objectNumber>=0&&L("/"+v+" "+ge[v].objectNumber+" 0 R");$A.publish("putXobjectDict"),L(">>")}(),L(">>"),L("endobj")},eo=function(h){ne[h.fontName]=ne[h.fontName]||{},ne[h.fontName][h.fontStyle]=h.id},to=function(h,v,N,V,$){var dA={id:"F"+(Object.keys(ce).length+1).toString(10),postScriptName:h,fontName:v,fontStyle:N,encoding:V,isStandardFont:$||!1,metadata:{}};return $A.publish("addFont",{font:dA,instance:this}),ce[dA.id]=dA,eo(dA),dA.id},Cr=g.__private__.pdfEscape=g.pdfEscape=function(h,v){return function(N,V){var $,dA,vA,RA,OA,ae,le,be,ht;if(vA=(V=V||{}).sourceEncoding||"Unicode",OA=V.outputEncoding,(V.autoencode||OA)&&ce[MA].metadata&&ce[MA].metadata[vA]&&ce[MA].metadata[vA].encoding&&(RA=ce[MA].metadata[vA].encoding,!OA&&ce[MA].encoding&&(OA=ce[MA].encoding),!OA&&RA.codePages&&(OA=RA.codePages[0]),typeof OA=="string"&&(OA=RA[OA]),OA)){for(le=!1,ae=[],$=0,dA=N.length;$<dA;$++)(be=OA[N.charCodeAt($)])?ae.push(String.fromCharCode(be)):ae.push(N[$]),ae[$].charCodeAt(0)>>8&&(le=!0);N=ae.join("")}for($=N.length;le===void 0&&$!==0;)N.charCodeAt($-1)>>8&&(le=!0),$--;if(!le)return N;for(ae=V.noBOM?[]:[254,255],$=0,dA=N.length;$<dA;$++){if((ht=(be=N.charCodeAt($))>>8)>>8)throw new Error("Character at position "+$+" of string '"+N+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ae.push(ht),ae.push(be-(ht<<8))}return String.fromCharCode.apply(void 0,ae)}(h,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ga=g.__private__.beginPage=function(h){CA[++se]=[],DA[se]={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])}},no(se),NA(CA[T])},ro=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)&&(Te.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])}Ga(n),fl(ee),L($i),Xa!==0&&L(Xa+" J"),Nn!==0&&L(Nn+" j"),$A.publish("addPage",{pageNumber:se})},Va=function(h){h>0&&h<=se&&(CA.splice(h,1),DA.splice(h,1),se--,T>se&&(T=se),this.setPage(T))},no=function(h){h>0&&h<=se&&(T=h)},io=g.__private__.getNumberOfPages=g.getNumberOfPages=function(){return CA.length-1},ao=function(h,v,N){var V,$=void 0;return N=N||{},h=h!==void 0?h:ce[MA].fontName,v=v!==void 0?v:ce[MA].fontStyle,V=h.toLowerCase(),ne[V]!==void 0&&ne[V][v]!==void 0?$=ne[V][v]:ne[h]!==void 0&&ne[h][v]!==void 0?$=ne[h][v]:N.disableWarning===!1&&Te.warn("Unable to look up font label for font '"+h+"', '"+v+"'. Refer to getFontList() for available fonts."),$||N.noFallback||($=ne.times[v])==null&&($=ne.times.normal),$},Wr=g.__private__.putInfo=function(){var h=At(),v=function(V){return V};for(var N in f!==null&&(v=xt.encryptor(h,0)),L("<<"),L("/Producer ("+Cr(v("jsPDF "+YA.version))+")"),de)de.hasOwnProperty(N)&&de[N]&&L("/"+N.substr(0,1).toUpperCase()+N.substr(1)+" ("+Cr(v(de[N]))+")");L("/CreationDate ("+Cr(v(sA))+")"),L(">>"),L("endobj")},zi=g.__private__.putCatalog=function(h){var v=(h=h||{}).rootDictionaryObjId||In;switch(At(),L("<<"),L("/Type /Catalog"),L("/Pages "+v+" 0 R"),SA||(SA="fullwidth"),SA){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=""+SA;N.substr(N.length-1)==="%"&&(SA=parseInt(SA)/100),typeof SA=="number"&&L("/OpenAction [3 0 R /XYZ null null "+_(SA)+"]")}switch(ie||(ie="continuous"),ie){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")}JA&&L("/PageMode /"+JA),$A.publish("putCatalog"),L(">>"),L("endobj")},rl=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 "+xt.oid+" 0 R"),L("/ID [ <"+cA+"> <"+cA+"> ]"),L(">>")},ft=g.__private__.putHeader=function(){L("%PDF-"+F),L("%ºß¬à")},so=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 tA[v]=="function"?L((h+tA[v]()).slice(-10)+" 00000 n "):tA[v]!==void 0?L((h+tA[v]).slice(-10)+" 00000 n "):L("0000000000 00000 n ")},zr=g.__private__.buildDocument=function(){var h;X=0,j=0,uA=[],tA=[],oA=[],In=bt(),Ir=bt(),NA(uA),$A.publish("buildDocument"),ft(),qr(),function(){$A.publish("putAdditionalObjects");for(var N=0;N<oA.length;N++){var V=oA[N];_t(V.objId,!0),L(V.content),L("endobj")}$A.publish("postPutAdditionalObjects")}(),h=[],function(){for(var N in ce)ce.hasOwnProperty(N)&&(p===!1||p===!0&&w.hasOwnProperty(N))&&fi(ce[N])}(),function(){var N;for(N in GA)GA.hasOwnProperty(N)&&tl(GA[N])}(),function(){for(var N in ge)ge.hasOwnProperty(N)&&Vi(ge[N])}(),function(N){var V;for(V in jA)jA.hasOwnProperty(V)&&(jA[V]instanceof Ii?qi(jA[V]):jA[V]instanceof xa&&Wi(jA[V],N))}(h),$A.publish("putResources"),h.forEach(ja),ja({resourcesOid:Ir,objectOid:Number.MAX_SAFE_INTEGER}),$A.publish("postPutResources"),f!==null&&(xt.oid=At(),L("<<"),L("/Filter /Standard"),L("/V "+xt.v),L("/R "+xt.r),L("/U <"+xt.toHexString(xt.U)+">"),L("/O <"+xt.toHexString(xt.O)+">"),L("/P "+xt.P),L(">>"),L("endobj")),Wr(),zi();var v=j;return so(),rl(),L("startxref"),L(""+v),L("%%EOF"),NA(CA[T]),uA.join(`
`)},Xi=g.__private__.getBlob=function(h){return new Blob([xA(h)],{type:"application/pdf"})},qa=function(h){for(;h.firstChild;)h.removeChild(h.firstChild)},ar=function(h){var v,N=h.document,V=N.documentElement,$=N.head,dA=N.body;return $||($=N.createElement("head"),V.appendChild($)),dA||(dA=N.createElement("body"),V.appendChild(dA)),qa($),qa(dA),(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:dA}},Ji=g.output=g.__private__.output=(vr=function(h,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",h){case void 0:return zr();case"save":g.save(v.filename);break;case"arraybuffer":return xA(zr());case"blob":return Xi(zr());case"bloburi":case"bloburl":if(te.URL!==void 0&&typeof te.URL.createObjectURL=="function")return te.URL&&te.URL.createObjectURL(Xi(zr()))||void 0;Te.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=zr();try{N=yd(V)}catch{N=yd(unescape(encodeURIComponent(V)))}return"data:application/pdf;filename="+encodeURIComponent(v.filename)+";base64,"+N;case"pdfobjectnewwindow":if(Object.prototype.toString.call(te)==="[object Window]"){var $="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",dA=!v.pdfObjectUrl;dA||($=v.pdfObjectUrl);var vA=te.open();if(vA!==null){var RA=ar(vA),OA=RA.document.createElement("script"),ae=this;OA.src=$,dA&&(OA.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",OA.crossOrigin="anonymous"),OA.onload=function(){vA.PDFObject.embed(ae.output("dataurlstring"),v)},RA.body.appendChild(OA)}return vA}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(te)==="[object Window]"){var le=v.pdfJsUrl||"examples/PDF.js/web/viewer.html",be=te.open();if(be!==null){var ht=ar(be),De=ht.document.createElement("iframe"),He=le.indexOf("?")===-1?"?":"&";ae=this,De.id="pdfViewer",De.width="500px",De.height="400px",De.src=le+He+"file=&downloadName="+encodeURIComponent(v.filename),De.onload=function(){be.document.title=v.filename,De.contentWindow.PDFViewerApplication.open(ae.output("bloburl"))},ht.body.appendChild(De)}return be}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(te)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Ge=te.open();if(Ge!==null){var Je=ar(Ge),Ye=Je.document.createElement("iframe");Ye.src=this.output("datauristring",v),Je.body.appendChild(Ye),Ge.document.title=v.filename}if(Ge||typeof safari>"u")return Ge;break;case"datauri":case"dataurl":return te.document.location.href=this.output("datauristring",v);default:return null}},vr.foo=function(){try{return vr.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(!te.console)throw new Error(v);te.console.error(v,N),te.alert&&alert(v)}},vr.foo.bar=vr,vr.foo),fn=function(h){return Array.isArray($e)===!0&&$e.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=fn("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 xt=null;wA(),rA();var oo=g.__private__.getPageInfo=g.getPageInfo=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:DA[h].objId,pageNumber:h,pageContext:DA[h]}},nl=g.__private__.getPageInfoByObjId=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in DA)if(DA[v].objId===h)break;return oo(v)},il=g.__private__.getCurrentPageInfo=g.getCurrentPageInfo=function(){return{objId:DA[T].objId,pageNumber:T,pageContext:DA[T]}};g.addPage=function(){return ro.apply(this,arguments),this},g.setPage=function(){return no.apply(this,arguments),NA.call(this,CA[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=CA[h],V=DA[h];for(var $=h;$>v;$--)CA[$]=CA[$-1],DA[$]=DA[$-1];CA[v]=N,DA[v]=V,this.setPage(v)}else if(h<v){N=CA[h],V=DA[h];for(var dA=h;dA<v;dA++)CA[dA]=CA[dA+1],DA[dA]=DA[dA+1];CA[v]=N,DA[v]=V,this.setPage(v)}return this},g.deletePage=function(){return Va.apply(this,arguments),this},g.__private__.text=g.text=function(h,v,N,V,$){var dA,vA,RA,OA,ae,le,be,ht,De,He=(V=V||{}).scope||this;if(typeof h=="number"&&typeof v=="number"&&(typeof N=="string"||Array.isArray(N))){var Ge=N;N=v,v=h,h=Ge}if(arguments[3]instanceof ZA==0?(RA=arguments[4],OA=arguments[5],Oe(be=arguments[3])==="object"&&be!==null||(typeof RA=="string"&&(OA=RA,RA=null),typeof be=="string"&&(OA=be,be=null),typeof be=="number"&&(RA=be,be=null),V={flags:be,angle:RA,align:OA})):(H("The transform parameter of text() with a Matrix value"),De=$),isNaN(v)||isNaN(N)||h==null)throw new Error("Invalid arguments passed to jsPDF.text");if(h.length===0)return He;var Je,Ye="",Dt=typeof V.lineHeightFactor=="number"?V.lineHeightFactor:hi,pn=He.internal.scaleFactor;function $a(Me){return Me=Me.split("	").join(Array(V.TabLen||9).join(" ")),Cr(Me,be)}function Bi(Me){for(var Pe,nt=Me.concat(),Bt=[],vn=nt.length;vn--;)typeof(Pe=nt.shift())=="string"?Bt.push(Pe):Array.isArray(Me)&&(Pe.length===1||Pe[1]===void 0&&Pe[2]===void 0)?Bt.push(Pe[0]):Bt.push([Pe[0],Pe[1],Pe[2]]);return Bt}function pi(Me,Pe){var nt;if(typeof Me=="string")nt=Pe(Me)[0];else if(Array.isArray(Me)){for(var Bt,vn,is=Me.concat(),ua=[],vo=is.length;vo--;)typeof(Bt=is.shift())=="string"?ua.push(Pe(Bt)[0]):Array.isArray(Bt)&&typeof Bt[0]=="string"&&(vn=Pe(Bt[0],Bt[1],Bt[2]),ua.push([vn[0],vn[1],vn[2]]));nt=ua}return nt}var Dn=!1,wi=!0;if(typeof h=="string")Dn=!0;else if(Array.isArray(h)){var ra=h.concat();vA=[];for(var na,kt=ra.length;kt--;)(typeof(na=ra.shift())!="string"||Array.isArray(na)&&typeof na[0]!="string")&&(wi=!1);Dn=wi}if(Dn===!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 vi=fA/He.internal.scaleFactor,mi=vi*(Dt-1);switch(V.baseline){case"bottom":N-=mi;break;case"top":N+=vi-mi;break;case"hanging":N+=vi-2*mi;break;case"middle":N+=vi/2-mi}if((le=V.maxWidth||0)>0&&(typeof h=="string"?h=He.splitTextToSize(h,le):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(Me,Pe){return Me.concat(He.splitTextToSize(Pe,le))},[]))),dA={text:h,x:v,y:N,options:V,mutex:{pdfEscape:Cr,activeFontKey:MA,fonts:ce,activeFontSize:fA}},$A.publish("preProcessText",dA),h=dA.text,RA=(V=dA.options).angle,De instanceof ZA==0&&RA&&typeof RA=="number"){RA*=Math.PI/180,V.rotationDirection===0&&(RA=-RA),O===G&&(RA=-RA);var As=Math.cos(RA),Yr=Math.sin(RA);De=new ZA(As,Yr,-Yr,As,0,0)}else RA&&RA instanceof ZA&&(De=RA);O!==G||De||(De=wr),(ae=V.charSpace||Aa)!==void 0&&(Ye+=q(P(ae))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(ht=V.horizontalScale)!==void 0&&(Ye+=q(100*ht)+` Tz
`),V.lang;var Vt=-1,po=V.renderingMode!==void 0?V.renderingMode:V.stroke,ia=He.internal.getCurrentPageInfo().pageContext;switch(po){case 0:case!1:case"fill":Vt=0;break;case 1:case!0:case"stroke":Vt=1;break;case 2:case"fillThenStroke":Vt=2;break;case 3:case"invisible":Vt=3;break;case 4:case"fillAndAddForClipping":Vt=4;break;case 5:case"strokeAndAddPathForClipping":Vt=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Vt=6;break;case 7:case"addToPathForClipping":Vt=7}var wo=ia.usedRenderingMode!==void 0?ia.usedRenderingMode:-1;Vt!==-1?Ye+=Vt+` Tr
`:wo!==-1&&(Ye+=`0 Tr
`),Vt!==-1&&(ia.usedRenderingMode=Vt),OA=V.align||"left";var br,Ci=fA*Dt,es=He.internal.pageSize.getWidth(),aa=ce[MA];ae=V.charSpace||Aa,le=V.maxWidth||0,be=Object.assign({autoencode:!0,noBOM:!0},V.flags);var bi=[],ts=function(Me){return He.getStringUnitWidth(Me,{font:aa,charSpace:ae,fontSize:fA,doKerning:!1})*fA/pn};if(Object.prototype.toString.call(h)==="[object Array]"){var qt;vA=Bi(h),OA!=="left"&&(br=vA.map(ts));var Ar,sa=0;if(OA==="right"){v-=br[0],h=[],kt=vA.length;for(var kn=0;kn<kt;kn++)kn===0?(Ar=hn(v),qt=dn(N)):(Ar=P(sa-br[kn]),qt=-Ci),h.push([vA[kn],Ar,qt]),sa=br[kn]}else if(OA==="center"){v-=br[0]/2,h=[],kt=vA.length;for(var Tn=0;Tn<kt;Tn++)Tn===0?(Ar=hn(v),qt=dn(N)):(Ar=P((sa-br[Tn])/2),qt=-Ci),h.push([vA[Tn],Ar,qt]),sa=br[Tn]}else if(OA==="left"){h=[],kt=vA.length;for(var oa=0;oa<kt;oa++)h.push(vA[oa])}else if(OA==="justify"&&aa.encoding==="Identity-H"){h=[],kt=vA.length,le=le!==0?le:es;for(var Fi=0,dt=0;dt<kt;dt++)if(qt=dt===0?dn(N):-Ci,Ar=dt===0?hn(v):Fi,dt<kt-1){var ml=P((le-br[dt])/(vA[dt].split(" ").length-1)),Zr=vA[dt].split(" ");h.push([Zr[0]+" ",Ar,qt]),Fi=0;for(var Nr=1;Nr<Zr.length;Nr++){var Qi=(ts(Zr[Nr-1]+" "+Zr[Nr])-ts(Zr[Nr]))*pn+ml;Nr==Zr.length-1?h.push([Zr[Nr],Qi,0]):h.push([Zr[Nr]+" ",Qi,0]),Fi-=Qi}}else h.push([vA[dt],Ar,qt]);h.push(["",Fi,0])}else{if(OA!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(h=[],kt=vA.length,le=le!==0?le:es,dt=0;dt<kt;dt++){qt=dt===0?dn(N):-Ci,Ar=dt===0?hn(v):0;var rs=vA[dt].split(" ").length-1,ns=rs>0?(le-br[dt])/rs:0;dt<kt-1?bi.push(q(P(ns))):bi.push(0),h.push([vA[dt],Ar,qt])}}}(typeof V.R2L=="boolean"?V.R2L:zA)===!0&&(h=pi(h,function(Me,Pe,nt){return[Me.split("").reverse().join(""),Pe,nt]})),dA={text:h,x:v,y:N,options:V,mutex:{pdfEscape:Cr,activeFontKey:MA,fonts:ce,activeFontSize:fA}},$A.publish("postProcessText",dA),h=dA.text,Je=dA.mutex.isHex||!1;var ca=ce[MA].encoding;ca!=="WinAnsiEncoding"&&ca!=="StandardEncoding"||(h=pi(h,function(Me,Pe,nt){return[$a(Me),Pe,nt]})),vA=Bi(h),h=[];for(var yi,Ui,On,wn=Array.isArray(vA[0])?1:0,Mn="",la=function(Me,Pe,nt){var Bt="";return nt instanceof ZA?(nt=typeof V.angle=="number"?Zt(nt,new ZA(1,0,0,1,Me,Pe)):Zt(new ZA(1,0,0,1,Me,Pe),nt),O===G&&(nt=Zt(new ZA(1,0,0,-1,0,0),nt)),Bt=nt.join(" ")+` Tm
`):Bt=q(Me)+" "+q(Pe)+` Td
`,Bt},Tt=0;Tt<vA.length;Tt++){switch(Mn="",wn){case 1:On=(Je?"<":"(")+vA[Tt][0]+(Je?">":")"),yi=parseFloat(vA[Tt][1]),Ui=parseFloat(vA[Tt][2]);break;case 0:On=(Je?"<":"(")+vA[Tt]+(Je?">":")"),yi=hn(v),Ui=dn(N)}bi!==void 0&&bi[Tt]!==void 0&&(Mn=bi[Tt]+` Tw
`),Tt===0?h.push(Mn+la(yi,Ui,De)+On):wn===0?h.push(Mn+On):wn===1&&h.push(Mn+la(yi,Ui,De)+On)}h=wn===0?h.join(` Tj
T* `):h.join(` Tj
`),h+=` Tj
`;var $r=`BT
/`;return $r+=MA+" "+fA+` Tf
`,$r+=q(fA*Dt)+` TL
`,$r+=Jr+`
`,$r+=Ye,$r+=h,L($r+="ET"),w[MA]=!0,He};var al=g.__private__.clip=g.clip=function(h){return L(h==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return al("evenodd")},g.__private__.discardPath=g.discardPath=function(){return L("n"),this};var Xr=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 Xr(h)&&(u=h),this};var co=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},Yi=g.close=function(){return L("h"),this};g.stroke=function(){return L("S"),this},g.fill=function(h){return Zi("f",h),this},g.fillEvenOdd=function(h){return Zi("f*",h),this},g.fillStroke=function(h){return Zi("B",h),this},g.fillStrokeEvenOdd=function(h){return Zi("B*",h),this};var Zi=function(h,v){Oe(v)==="object"?ol(v,h):L(h)},Wa=function(h){h===null||O===G&&h===void 0||(h=co(h),L(h))};function sl(h,v,N,V,$){var dA=new xa(v||this.boundingBox,N||this.xStep,V||this.yStep,this.gState,$||this.matrix);dA.stream=this.stream;var vA=h+"$$"+this.cloneIndex+++"$$";return $t(vA,dA),dA}var ol=function(h,v){var N=Ce[h.key],V=jA[N];if(V instanceof Ii)L("q"),L(cl(v)),V.gState&&g.setGState(V.gState),L(h.matrix.toString()+" cm"),L("/"+N+" sh"),L("Q");else if(V instanceof xa){var $=new ZA(1,0,0,-1,0,gi());h.matrix&&($=$.multiply(h.matrix||wr),N=sl.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")}},cl=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"}},Sn=g.moveTo=function(h,v){return L(q(P(h))+" "+q(K(v))+" m"),this},lo=g.lineTo=function(h,v){return L(q(P(h))+" "+q(K(v))+" l"),this},Hn=g.curveTo=function(h,v,N,V,$,dA){return L([q(P(h)),q(K(v)),q(P(N)),q(K(V)),q(P($)),q(K(dA)),"c"].join(" ")),this};g.__private__.line=g.line=function(h,v,N,V,$){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||!Xr($))throw new Error("Invalid arguments passed to jsPDF.line");return O===M?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,$,dA){var vA,RA,OA,ae,le,be,ht,De,He,Ge,Je,Ye;if(typeof h=="number"&&(Ye=N,N=v,v=h,h=Ye),V=V||[1,1],dA=dA||!1,isNaN(v)||isNaN(N)||!Array.isArray(h)||!Array.isArray(V)||!Xr($)||typeof dA!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Sn(v,N),vA=V[0],RA=V[1],ae=h.length,Ge=v,Je=N,OA=0;OA<ae;OA++)(le=h[OA]).length===2?(Ge=le[0]*vA+Ge,Je=le[1]*RA+Je,lo(Ge,Je)):(be=le[0]*vA+Ge,ht=le[1]*RA+Je,De=le[2]*vA+Ge,He=le[3]*RA+Je,Ge=le[4]*vA+Ge,Je=le[5]*RA+Je,Hn(be,ht,De,He,Ge,Je));return dA&&Yi(),Wa($),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":Sn(V[0],V[1]);break;case"l":lo(V[0],V[1]);break;case"c":Hn.apply(this,V);break;case"h":Yi()}}return this},g.__private__.rect=g.rect=function(h,v,N,V,$){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||!Xr($))throw new Error("Invalid arguments passed to jsPDF.rect");return O===M&&(V=-V),L([q(P(h)),q(K(v)),q(P(N)),q(P(V)),"re"].join(" ")),Wa($),this},g.__private__.triangle=g.triangle=function(h,v,N,V,$,dA,vA){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||isNaN($)||isNaN(dA)||!Xr(vA))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[N-h,V-v],[$-N,dA-V],[h-$,v-dA]],h,v,[1,1],vA,!0),this},g.__private__.roundedRect=g.roundedRect=function(h,v,N,V,$,dA,vA){if(isNaN(h)||isNaN(v)||isNaN(N)||isNaN(V)||isNaN($)||isNaN(dA)||!Xr(vA))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var RA=4/3*(Math.SQRT2-1);return $=Math.min($,.5*N),dA=Math.min(dA,.5*V),this.lines([[N-2*$,0],[$*RA,0,$,dA-dA*RA,$,dA],[0,V-2*dA],[0,dA*RA,-$*RA,dA,-$,dA],[2*$-N,0],[-$*RA,0,-$,-dA*RA,-$,-dA],[0,2*dA-V],[0,-dA*RA,$*RA,-dA,$,-dA]],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)||!Xr($))throw new Error("Invalid arguments passed to jsPDF.ellipse");var dA=4/3*(Math.SQRT2-1)*N,vA=4/3*(Math.SQRT2-1)*V;return Sn(h+N,v),Hn(h+N,v-vA,h+dA,v-V,h,v-V),Hn(h-dA,v-V,h-N,v-vA,h-N,v),Hn(h-N,v+vA,h-dA,v+V,h,v+V),Hn(h+dA,v+V,h+N,v+vA,h+N,v),Wa($),this},g.__private__.circle=g.circle=function(h,v,N,V){if(isNaN(h)||isNaN(v)||isNaN(N)||!Xr(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)),MA=ao(h,v,{disableWarning:!1}),this};var ll=g.__private__.getFont=g.getFont=function(){return ce[ao.apply(g,arguments)]};g.__private__.getFontList=g.getFontList=function(){var h,v,N={};for(h in ne)if(ne.hasOwnProperty(h))for(v in N[h]=[],ne[h])ne[h].hasOwnProperty(v)&&N[h].push(v);return N},g.addFont=function(h,v,N,V,$){var dA=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&dA.indexOf(arguments[3])!==-1?$=arguments[3]:arguments[3]&&dA.indexOf(arguments[3])==-1&&(N=nA(N,V)),to.call(this,h,v,N,$=$||"Identity-H")};var hi,ee=A.lineWidth||.200025,ul=g.__private__.getLineWidth=g.getLineWidth=function(){return ee},fl=g.__private__.setLineWidth=g.setLineWidth=function(h){return ee=h,L(q(P(h))+" w"),this};g.__private__.setLineDash=YA.API.setLineDash=YA.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(P(N))}).join(" "),v=q(P(v)),L("["+h+"] "+v+" d"),this};var hl=g.__private__.getLineHeight=g.getLineHeight=function(){return fA*hi};g.__private__.getLineHeight=g.getLineHeight=function(){return fA*hi};var dl=g.__private__.setLineHeightFactor=g.setLineHeightFactor=function(h){return typeof(h=h||1.15)=="number"&&(hi=h),this},gl=g.__private__.getLineHeightFactor=g.getLineHeightFactor=function(){return hi};dl(A.lineHeight);var hn=g.__private__.getHorizontalCoordinate=function(h){return P(h)},dn=g.__private__.getVerticalCoordinate=function(h){return O===G?h:DA[T].mediaBox.topRightY-DA[T].mediaBox.bottomLeftY-P(h)},Bl=g.__private__.getHorizontalCoordinateString=g.getHorizontalCoordinateString=function(h){return q(hn(h))},pl=g.__private__.getVerticalCoordinateString=g.getVerticalCoordinateString=function(h){return q(dn(h))},$i=A.strokeColor||"0 G";g.__private__.getStrokeColor=g.getDrawColor=function(){return Vr($i)},g.__private__.setStrokeColor=g.setDrawColor=function(h,v,N,V){return $i=Sr({ch1:h,ch2:v,ch3:N,ch4:V,pdfColorType:"draw",precision:2}),L($i),this};var za=A.fillColor||"0 g";g.__private__.getFillColor=g.getFillColor=function(){return Vr(za)},g.__private__.setFillColor=g.setFillColor=function(h,v,N,V){return za=Sr({ch1:h,ch2:v,ch3:N,ch4:V,pdfColorType:"fill",precision:2}),L(za),this};var Jr=A.textColor||"0 g",wl=g.__private__.getTextColor=g.getTextColor=function(){return Vr(Jr)};g.__private__.setTextColor=g.setTextColor=function(h,v,N,V){return Jr=Sr({ch1:h,ch2:v,ch3:N,ch4:V,pdfColorType:"text",precision:3}),this};var Aa=A.charSpace,vl=g.__private__.getCharSpace=g.getCharSpace=function(){return parseFloat(Aa||0)};g.__private__.setCharSpace=g.setCharSpace=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Aa=h,this};var Xa=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 Xa=v,L(v+" J"),this};var Nn=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 Nn=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(P(h))+" M"),this},g.GState=Pc,g.setGState=function(h){(h=typeof h=="string"?GA[PA[h]]:Ja(null,h)).equals(xe)||(L("/"+h.id+" gs"),xe=h)};var Ja=function(h,v){if(!h||!PA[h]){var N=!1;for(var V in GA)if(GA.hasOwnProperty(V)&&GA[V].equals(v)){N=!0;break}if(N)v=GA[V];else{var $="GS"+(Object.keys(GA).length+1).toString(10);GA[$]=v,v.id=$}return h&&(PA[h]=v.id),$A.publish("addGState",v),v}};g.addGState=function(h,v){return Ja(h,v),this},g.saveGraphicsState=function(){return L("q"),je.push({key:MA,size:fA,color:Jr}),this},g.restoreGraphicsState=function(){L("Q");var h=je.pop();return MA=h.key,fA=h.size,Jr=h.color,xe=null,this},g.setCurrentTransformationMatrix=function(h){return L(h.toString()+" cm"),this},g.comment=function(h){return L("#"+h),this};var di=function(h,v){var N=h||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return N},set:function(dA){isNaN(dA)||(N=parseFloat(dA))}});var V=v||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return V},set:function(dA){isNaN(dA)||(V=parseFloat(dA))}});var $="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return $},set:function(dA){$=dA.toString()}}),this},Ya=function(h,v,N,V){di.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 dA=V||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return dA},set:function(vA){isNaN(vA)||(dA=parseFloat(vA))}}),this},ea=function(){this.page=se,this.currentPage=T,this.pages=CA.slice(0),this.pagesContext=DA.slice(0),this.x=WA,this.y=Ue,this.matrix=we,this.width=uo(T),this.height=Bn(T),this.outputDestination=UA,this.id="",this.objectNumber=-1};ea.prototype.restore=function(){se=this.page,T=this.currentPage,DA=this.pagesContext,CA=this.pages,WA=this.x,Ue=this.y,we=this.matrix,gn(T,this.width),fo(T,this.height),UA=this.outputDestination};var Za=function(h,v,N,V,$){Ct.push(new ea),se=T=0,CA=[],WA=h,Ue=v,we=$,Ga([N,V])};for(var ta in g.beginFormObject=function(h,v,N,V,$){return Za(h,v,N,V,$),this},g.endFormObject=function(h){return function(v){if(We[v])Ct.pop().restore();else{var N=new ea,V="Xo"+(Object.keys(ge).length+1).toString(10);N.id=V,We[v]=V,ge[V]=N,$A.publish("addFormObject",N),Ct.pop().restore()}}(h),this},g.doFormObject=function(h,v){var N=ge[We[h]];return L("q"),L(v.toString()+" cm"),L("/"+N.id+" Do"),L("Q"),this},g.getFormObject=function(h){var v=ge[We[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?(Ei(Xi(zr()),h),typeof Ei.unload=="function"&&te.setTimeout&&setTimeout(Ei.unload,911),this):new Promise(function(N,V){try{var $=Ei(Xi(zr()),h);typeof Ei.unload=="function"&&te.setTimeout&&setTimeout(Ei.unload,911),N($)}catch(dA){V(dA.message)}})},YA.API)YA.API.hasOwnProperty(ta)&&(ta==="events"&&YA.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))}($A,YA.API.events):g[ta]=YA.API[ta]);function uo(h){return DA[h].mediaBox.topRightX-DA[h].mediaBox.bottomLeftX}function gn(h,v){DA[h].mediaBox.topRightX=v+DA[h].mediaBox.bottomLeftX}function Bn(h){return DA[h].mediaBox.topRightY-DA[h].mediaBox.bottomLeftY}function fo(h,v){DA[h].mediaBox.topRightY=v+DA[h].mediaBox.bottomLeftY}var ho=g.getPageWidth=function(h){return uo(h=h||T)/Ae},go=g.setPageWidth=function(h,v){gn(h,v*Ae)},gi=g.getPageHeight=function(h){return Bn(h=h||T)/Ae},Bo=g.setPageHeight=function(h,v){fo(h,v*Ae)};return g.internal={pdfEscape:Cr,getStyle:co,getFont:ll,getFontSize:LA,getCharSpace:vl,getTextColor:wl,getLineHeight:hl,getLineHeightFactor:gl,getLineWidth:ul,write:_A,getHorizontalCoordinate:hn,getVerticalCoordinate:dn,getCoordinateString:Bl,getVerticalCoordinateString:pl,collections:{},newObject:At,newAdditionalObject:li,newObjectDeferred:bt,newObjectDeferredBegin:_t,getFilters:Hr,putStream:mr,events:$A,scaleFactor:Ae,pageSize:{getWidth:function(){return ho(T)},setWidth:function(h){go(T,h)},getHeight:function(){return gi(T)},setHeight:function(h){Bo(T,h)}},encryptionOptions:f,encryption:xt,getEncryptor:function(h){return f!==null?xt.encryptor(h,0):function(v){return v}},output:Ji,getNumberOfPages:io,get pages(){return CA},out:L,f2:_,f3:S,getPageInfo:oo,getPageInfoByObjId:nl,getCurrentPageInfo:il,getPDFVersion:y,Point:di,Rectangle:Ya,Matrix:ZA,hasHotfix:fn},Object.defineProperty(g.internal.pageSize,"width",{get:function(){return ho(T)},set:function(h){go(T,h)},enumerable:!0,configurable:!0}),Object.defineProperty(g.internal.pageSize,"height",{get:function(){return gi(T)},set:function(h){Bo(T,h)},enumerable:!0,configurable:!0}),(function(h){for(var v=0,N=KA.length;v<N;v++){var V=to.call(this,h[v][0],h[v][1],h[v][2],KA[v][3],!0);p===!1&&(w[V]=!0);var $=h[v][0].split("-");eo({id:V,fontName:$[0],fontStyle:$[1]||""})}$A.publish("addFonts",{fonts:ce,dictionary:ne})}).call(g,KA),MA="F1",ro(n,t),$A.publish("initialized"),g}ya.prototype.lsbFirstWord=function(A){return String.fromCharCode(255&A,A>>8&255,A>>16&255,A>>24&255)},ya.prototype.toHexString=function(A){return A.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ya.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("")},ya.prototype.processOwnerPassword=function(A,e){return vf(wf(e).substr(0,5),A)},ya.prototype.encryptor=function(A,e){var t=wf(this.encryptionKey+String.fromCharCode(255&A,A>>8&255,A>>16&255,255&e,e>>8&255)).substr(0,10);return function(r){return vf(t,r)}},Pc.prototype.equals=function(A){var e,t="id,objectNumber,equals";if(!A||Oe(A)!==Oe(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},YA.API={events:[]},YA.version="4.2.1";var rt=YA.API,Pf=1,Gi=function(A){return A.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ca=function(A){return A.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ki=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)})},oe=function(A){return A.toFixed(2)},Wn=function(A){return A.toFixed(5)};rt.__acroform__={};var ir=function(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A},Ed=function(A){return A*Pf},rn=function(A){var e=new Jg,t=TA.internal.getHeight(A)||0,r=TA.internal.getWidth(A)||0;return e.BBox=[0,0,Number(oe(r)),Number(oe(t))],e},AF=rt.__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},eF=rt.__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)},tF=rt.__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},ct=rt.__acroform__.getBitForPdf=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return tF(A,e-1)},lt=rt.__acroform__.setBitForPdf=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return AF(A,e-1)},ut=rt.__acroform__.clearBitForPdf=function(A,e){if(isNaN(A)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return eF(A,e-1)},rF=rt.__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],c={};return c.lowerLeft_X=t(n)||0,c.lowerLeft_Y=r(i+s)||0,c.upperRight_X=t(n+o)||0,c.upperRight_Y=r(i)||0,[Number(oe(c.lowerLeft_X)),Number(oe(c.lowerLeft_Y)),Number(oe(c.upperRight_X)),Number(oe(c.upperRight_Y))]},nF=function(A){if(A.appearanceStreamContent)return A.appearanceStreamContent;if(A.V||A.DV){var e=[],t=A._V||A.DV,r=mf(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+" "+oe(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=rn(A);return i.scope=A.scope,i.stream=e.join(`
`),i}},mf=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=TA.internal.getHeight(A)||0;o=o<0?-o:o;var s=TA.internal.getWidth(A)||0;s=s<0?-s:s;var c=function(_,S,P){if(_+1<n.length){var K=S+" "+n[_+1][0];return hc(K,A,P).width<=s-4}return!1};i++;A:for(;i>0;){e="",i--;var u,f,p=hc("3",A,i).height,w=A.multiline?o-i:(o-p)/2,g=w+=2,F=0,y=0,I=0;if(i<=0){e=`(...) Tj
`,e+="% Width of Text: "+hc(e,A,i=12).width+", FieldWidth:"+s+`
`;break}for(var b="",M=0,G=0;G<n.length;G++)if(n.hasOwnProperty(G)){var O=!1;if(n[G].length!==1&&I!==n[G].length-1){if((p+2)*(M+2)+2>o)continue A;b+=n[G][I],O=!0,y=G,G--}else{b=(b+=n[G][I]+" ").substr(b.length-1)==" "?b.substr(0,b.length-1):b;var J=parseInt(G),Z=c(J,b,i),nA=G>=n.length-1;if(Z&&!nA){b+=" ",I=0;continue}if(Z||nA){if(nA)y=J;else if(A.multiline&&(p+2)*(M+2)+2>o)continue A}else{if(!A.multiline||(p+2)*(M+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[I]+" ",I=(I+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=hc(q,A,i).width,A.textAlign){case"right":u=s-f-2;break;case"center":u=(s-f)/2;break;default:u=2}e+=oe(u)+" "+oe(g)+` Td
`,e+="("+Gi(q)+`) Tj
`,e+=-oe(u)+` 0 Td
`,g=-(i+2),f=0,F=O?y:y+1,M++,b=""}break}return r.text=e,r.fontSize=i,r},hc=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}},iF={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)},sF=function(A,e){if(e.scope=A,A.internal!==void 0&&(A.internal.acroformPlugin===void 0||A.internal.acroformPlugin.isInitialized===!1)){if(jr.FieldNum=0,A.internal.acroformPlugin=JSON.parse(JSON.stringify(iF)),A.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Pf=A.internal.scaleFactor,A.internal.acroformPlugin.acroFormDictionaryRoot=new Yg,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],c=[],u=s.Rect;if(s.Rect&&(s.Rect=rF(s.Rect,n)),n.internal.newObjectDeferredBegin(s.objId,!0),s.DA=TA.createDefaultAppearanceStream(s),Oe(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(c=s.getKeyValueListForStream()),s.Rect=u,s.hasAppearanceStream&&!s.appearanceStreamContent){var f=nF(s);c.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+=">>"}c.push({key:"AP",value:`<<
`+p+">>"})}n.internal.putStream({additionalKeyValues:c,objectId:s.objId}),n.internal.out("endobj")}i&&function(y,I){for(var b in y)if(y.hasOwnProperty(b)){var M=b,G=y[b];I.internal.newObjectDeferredBegin(G.objId,!0),Oe(G)==="object"&&typeof G.putStream=="function"&&G.putStream(),delete y[M]}}(n.internal.acroformPlugin.xForms,n)})(t,A)}),A.internal.acroformPlugin.isInitialized=!0}},Xg=rt.__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+=" "),Oe(A[i])){case"boolean":case"number":case"object":n+=A[i].toString();break;case"string":A[i].substr(0,1)==="/"?n+="/"+Ki(A[i].substr(1)):(e!==void 0&&t&&(r=t.internal.getEncryptor(e)),n+="("+Gi(r(A[i].toString()))+")")}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Lu=function(A,e,t){var r=function(n){return n};return e!==void 0&&t&&(r=t.internal.getEncryptor(e)),(A=A||"").toString(),"("+Gi(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:Xg(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 Jg=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}})};ir(Jg,an);var Yg=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)),"("+Gi(t(A))+")"}},set:function(t){A=t}})};ir(Yg,an);var jr=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!!ct(e,3)},set:function(b){b?this.F=lt(e,3):this.F=ut(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 Rc)return;i="FieldObject"+A.FieldNum++}var b=function(M){return M};return this.scope&&(b=this.scope.internal.getEncryptor(this.objId)),"("+Gi(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 c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(b){c=b}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return u===void 0?50/Pf: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 Rc||this instanceof Oi))return Lu(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 Ut==0?Lu(w,this.objId,this.scope):w},set:function(b){b=b.toString(),w=this instanceof Ut==0?b.substr(0,1)==="("?Ca(b.substr(1,b.length-2)):Ca(b):b}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ut==1?Ca(w.substr(1,w.length-1)):w},set:function(b){b=b.toString(),w=this instanceof Ut==1?"/"+Ki(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 Ut==0?Lu(g,this.objId,this.scope):g},set:function(b){b=b.toString(),g=this instanceof Ut==0?b.substr(0,1)==="("?Ca(b.substr(1,b.length-2)):Ca(b):b}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ut==1?Ca(g.substr(1,g.length-1)):g},set:function(b){b=b.toString(),g=this instanceof Ut==1?"/"+Ki(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!!ct(this.Ff,1)},set:function(b){b?this.Ff=lt(this.Ff,1):this.Ff=ut(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,2)},set:function(b){b?this.Ff=lt(this.Ff,2):this.Ff=ut(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,3)},set:function(b){b?this.Ff=lt(this.Ff,3):this.Ff=ut(this.Ff,3)}});var I=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(I!==null)return I},set:function(b){if([0,1,2].indexOf(b)===-1)throw new Error('Invalid value "'+b+'" for attribute Q supplied.');I=b}}),Object.defineProperty(this,"textAlign",{get:function(){var b;switch(I){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:I=2;break;case"center":case 1:I=1;break;default:I=0}}})};ir(jr,an);var Ia=function(){jr.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 Xg(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 c,u=[];c=o.exec(i);)u.push(c[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!!ct(this.Ff,18)},set:function(t){t?this.Ff=lt(this.Ff,18):this.Ff=ut(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=lt(this.Ff,19):this.Ff=ut(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,20)},set:function(t){t?(this.Ff=lt(this.Ff,20),e.sort()):this.Ff=ut(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,22)},set:function(t){t?this.Ff=lt(this.Ff,22):this.Ff=ut(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,23)},set:function(t){t?this.Ff=lt(this.Ff,23):this.Ff=ut(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,27)},set:function(t){t?this.Ff=lt(this.Ff,27):this.Ff=ut(this.Ff,27)}}),this.hasAppearanceStream=!1};ir(Ia,jr);var Sa=function(){Ia.call(this),this.fontName="helvetica",this.combo=!1};ir(Sa,Ia);var Ha=function(){Sa.call(this),this.combo=!0};ir(Ha,Sa);var bc=function(){Ha.call(this),this.edit=!0};ir(bc,Ha);var Ut=function(){jr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,15)},set:function(t){t?this.Ff=lt(this.Ff,15):this.Ff=ut(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,16)},set:function(t){t?this.Ff=lt(this.Ff,16):this.Ff=ut(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,17)},set:function(t){t?this.Ff=lt(this.Ff,17):this.Ff=ut(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,26)},set:function(t){t?this.Ff=lt(this.Ff,26):this.Ff=ut(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+" ("+Gi(t(e[r]))+")");return n.push(">>"),n.join(`
`)}},set:function(t){Oe(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="/"+Ki(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return A.substr(1,A.length-1)},set:function(t){A="/"+Ki(t)}})};ir(Ut,jr);var Fc=function(){Ut.call(this),this.pushButton=!0};ir(Fc,Ut);var Na=function(){Ut.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:[]}})};ir(Na,Ut);var Rc=function(){var A,e;jr.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+" ("+Gi(n(r[i]))+")");return o.push(">>"),o.join(`
`)},set:function(n){Oe(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="/"+Ki(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="/"+Ki(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=TA.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ir(Rc,jr),Na.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()}},Na.prototype.createOption=function(A){var e=new Rc;return e.Parent=this,e.optionName=A,this.Kids.push(e),oF.call(this.scope,e),e};var Qc=function(){Ut.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=TA.CheckBox.createAppearanceStream()};ir(Qc,Ut);var Oi=function(){jr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,13)},set:function(e){e?this.Ff=lt(this.Ff,13):this.Ff=ut(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,21)},set:function(e){e?this.Ff=lt(this.Ff,21):this.Ff=ut(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,23)},set:function(e){e?this.Ff=lt(this.Ff,23):this.Ff=ut(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,24)},set:function(e){e?this.Ff=lt(this.Ff,24):this.Ff=ut(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,25)},set:function(e){e?this.Ff=lt(this.Ff,25):this.Ff=ut(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,26)},set:function(e){e?this.Ff=lt(this.Ff,26):this.Ff=ut(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}})};ir(Oi,jr);var yc=function(){Oi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!ct(this.Ff,14)},set:function(A){A?this.Ff=lt(this.Ff,14):this.Ff=ut(this.Ff,14)}}),this.password=!0};ir(yc,Oi);var TA={CheckBox:{createAppearanceStream:function(){return{N:{On:TA.CheckBox.YesNormal},D:{On:TA.CheckBox.YesPushDown,Off:TA.CheckBox.OffPushDown}}},YesPushDown:function(A){var e=rn(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=mf(A,A.caption);return t.push("0.749023 g"),t.push("0 0 "+oe(TA.internal.getWidth(A))+" "+oe(TA.internal.getHeight(A))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+r+" "+oe(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=rn(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=TA.internal.getHeight(A),o=TA.internal.getWidth(A),s=mf(A,A.caption);return n.push("1 g"),n.push("0 0 "+oe(o)+" "+oe(i)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+oe(o-1)+" "+oe(i-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+t+" "+oe(s.fontSize)+" Tf "+r),n.push(s.text),n.push("ET"),n.push("Q"),e.stream=n.join(`
`),e},OffPushDown:function(A){var e=rn(A);e.scope=A.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+oe(TA.internal.getWidth(A))+" "+oe(TA.internal.getHeight(A))+" re"),t.push("f"),e.stream=t.join(`
`),e}},RadioButton:{Circle:{createAppearanceStream:function(A){var e={D:{Off:TA.RadioButton.Circle.OffPushDown},N:{}};return e.N[A]=TA.RadioButton.Circle.YesNormal,e.D[A]=TA.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(A){var e=rn(A);e.scope=A.scope;var t=[],r=TA.internal.getWidth(A)<=TA.internal.getHeight(A)?TA.internal.getWidth(A)/4:TA.internal.getHeight(A)/4;r=Number((.9*r).toFixed(5));var n=TA.internal.Bezier_C,i=Number((r*n).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Wn(TA.internal.getWidth(A)/2)+" "+Wn(TA.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=rn(A);e.scope=A.scope;var t=[],r=TA.internal.getWidth(A)<=TA.internal.getHeight(A)?TA.internal.getWidth(A)/4:TA.internal.getHeight(A)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*TA.internal.Bezier_C).toFixed(5)),o=Number((r*TA.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Wn(TA.internal.getWidth(A)/2)+" "+Wn(TA.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 "+Wn(TA.internal.getWidth(A)/2)+" "+Wn(TA.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=rn(A);e.scope=A.scope;var t=[],r=TA.internal.getWidth(A)<=TA.internal.getHeight(A)?TA.internal.getWidth(A)/4:TA.internal.getHeight(A)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*TA.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Wn(TA.internal.getWidth(A)/2)+" "+Wn(TA.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:TA.RadioButton.Cross.OffPushDown},N:{}};return e.N[A]=TA.RadioButton.Cross.YesNormal,e.D[A]=TA.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(A){var e=rn(A);e.scope=A.scope;var t=[],r=TA.internal.calculateCross(A);return t.push("q"),t.push("1 1 "+oe(TA.internal.getWidth(A)-2)+" "+oe(TA.internal.getHeight(A)-2)+" re"),t.push("W"),t.push("n"),t.push(oe(r.x1.x)+" "+oe(r.x1.y)+" m"),t.push(oe(r.x2.x)+" "+oe(r.x2.y)+" l"),t.push(oe(r.x4.x)+" "+oe(r.x4.y)+" m"),t.push(oe(r.x3.x)+" "+oe(r.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(A){var e=rn(A);e.scope=A.scope;var t=TA.internal.calculateCross(A),r=[];return r.push("0.749023 g"),r.push("0 0 "+oe(TA.internal.getWidth(A))+" "+oe(TA.internal.getHeight(A))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+oe(TA.internal.getWidth(A)-2)+" "+oe(TA.internal.getHeight(A)-2)+" re"),r.push("W"),r.push("n"),r.push(oe(t.x1.x)+" "+oe(t.x1.y)+" m"),r.push(oe(t.x2.x)+" "+oe(t.x2.y)+" l"),r.push(oe(t.x4.x)+" "+oe(t.x4.y)+" m"),r.push(oe(t.x3.x)+" "+oe(t.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
`),e},OffPushDown:function(A){var e=rn(A);e.scope=A.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+oe(TA.internal.getWidth(A))+" "+oe(TA.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}};TA.internal={Bezier_C:.551915024494,calculateCross:function(A){var e=TA.internal.getWidth(A),t=TA.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}}}},TA.internal.getWidth=function(A){var e=0;return Oe(A)==="object"&&(e=Ed(A.Rect[2])),e},TA.internal.getHeight=function(A){var e=0;return Oe(A)==="object"&&(e=Ed(A.Rect[3])),e};var oF=rt.addField=function(A){if(sF(this,A),!(A instanceof jr))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};rt.AcroFormChoiceField=Ia,rt.AcroFormListBox=Sa,rt.AcroFormComboBox=Ha,rt.AcroFormEditBox=bc,rt.AcroFormButton=Ut,rt.AcroFormPushButton=Fc,rt.AcroFormRadioButton=Na,rt.AcroFormCheckBox=Qc,rt.AcroFormTextField=Oi,rt.AcroFormPasswordField=yc,rt.AcroFormAppearance=TA,rt.AcroForm={ChoiceField:Ia,ListBox:Sa,ComboBox:Ha,EditBox:bc,Button:Ut,PushButton:Fc,RadioButton:Na,CheckBox:Qc,TextField:Oi,PasswordField:yc,Appearance:TA},YA.AcroForm={ChoiceField:Ia,ListBox:Sa,ComboBox:Ha,EditBox:bc,Button:Ut,PushButton:Fc,RadioButton:Na,CheckBox:Qc,TextField:Oi,PasswordField:yc,Appearance:TA};function Zg(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(_,S){var P,K,sA,cA,lA,rA=t;if((S=S||t)==="RGBA"||_.data!==void 0&&_.data instanceof Uint8ClampedArray&&"height"in _&&"width"in _)return"RGBA";if(Z(_))for(lA in r)for(sA=r[lA],P=0;P<sA.length;P+=1){for(cA=!0,K=0;K<sA[P].length;K+=1)if(sA[P][K]!==void 0&&sA[P][K]!==_[K]){cA=!1;break}if(cA===!0){rA=lA;break}}else for(lA in r)for(sA=r[lA],P=0;P<sA.length;P+=1){for(cA=!0,K=0;K<sA[P].length;K+=1)if(sA[P][K]!==void 0&&sA[P][K]!==_.charCodeAt(K)){cA=!1;break}if(cA===!0){rA=lA;break}}return rA===t&&S!==t&&(rA=S),rA},i=function _(S){for(var P=this.internal.write,K=this.internal.putStream,sA=(0,this.internal.getFilters)();sA.indexOf("FlateEncode")!==-1;)sA.splice(sA.indexOf("FlateEncode"),1);S.objectId=this.internal.newObject();var cA=[];if(cA.push({key:"Type",value:"/XObject"}),cA.push({key:"Subtype",value:"/Image"}),cA.push({key:"Width",value:S.width}),cA.push({key:"Height",value:S.height}),S.colorSpace===b.INDEXED?cA.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(S.palette.length/3-1)+" "+("sMask"in S&&S.sMask!==void 0?S.objectId+2:S.objectId+1)+" 0 R]"}):(cA.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===b.DEVICE_CMYK&&cA.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),cA.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&cA.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)&&S.transparency.length>0){for(var lA="",rA=0,hA=S.transparency.length;rA<hA;rA++)lA+=S.transparency[rA]+" "+S.transparency[rA]+" ";cA.push({key:"Mask",value:"["+lA+"]"})}S.sMask!==void 0&&cA.push({key:"SMask",value:S.objectId+1+" 0 R"});var FA=S.filter!==void 0?["/"+S.filter]:void 0;if(K({data:S.data,additionalKeyValues:cA,alreadyAppliedFilters:FA,objectId:S.objectId}),P("endobj"),"sMask"in S&&S.sMask!==void 0){var wA,Q=(wA=S.sMaskBitsPerComponent)!==null&&wA!==void 0?wA:S.bitsPerComponent,T={width:S.width,height:S.height,colorSpace:"DeviceGray",bitsPerComponent:Q,data:S.sMask};"filter"in S&&(T.decodeParameters="/Predictor ".concat(S.predictor," /Colors 1 /BitsPerComponent ").concat(Q," /Columns ").concat(S.width),T.filter=S.filter),_.call(this,T)}if(S.colorSpace===b.INDEXED){var R=this.internal.newObject();K({data:q(new Uint8Array(S.palette)),objectId:R}),P("endobj")}},o=function(){var _=this.internal.collections[e+"images"];for(var S in _)i.call(this,_[S])},s=function(){var _,S=this.internal.collections[e+"images"],P=this.internal.write;for(var K in S)P("/I"+(_=S[K]).index,_.objectId,"0","R")},c=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 c.call(this),_},f=function(){return Object.keys(this.internal.collections[e+"images"]).length},p=function(_){return typeof A["process"+_.toUpperCase()]=="function"},w=function(_){return Oe(_)==="object"&&_.nodeType===1},g=function(_,S){if(_.nodeName==="IMG"&&_.hasAttribute("src")){var P=""+_.getAttribute("src");if(P.indexOf("data:image/")===0)return Cc(unescape(P).split("base64,").pop());var K=A.loadFile(P,!0);if(K!==void 0)return K}if(_.nodeName==="CANVAS"){if(_.width===0||_.height===0)throw new Error("Given canvas must have data. Canvas width: "+_.width+", height: "+_.height);var sA;switch(S){case"PNG":sA="image/png";break;case"WEBP":sA="image/webp";break;default:sA="image/jpeg"}return Cc(_.toDataURL(sA,1).split("base64,").pop())}},F=function(_){var S=this.internal.collections[e+"images"];if(S){for(var P in S)if(_===S[P].alias)return S[P]}},y=function(_,S,P){return _||S||(_=-96,S=-96),_<0&&(_=-1*P.width*72/_/this.internal.scaleFactor),S<0&&(S=-1*P.height*72/S/this.internal.scaleFactor),_===0&&(_=S*P.width/P.height),S===0&&(S=_*P.height/P.width),[_,S]},I=function(_,S,P,K,sA,cA){var lA=y.call(this,P,K,sA),rA=this.internal.getCoordinateString,hA=this.internal.getVerticalCoordinateString,FA=u.call(this);if(P=lA[0],K=lA[1],FA[sA.index]=sA,cA){cA*=Math.PI/180;var wA=Math.cos(cA),Q=Math.sin(cA),T=function(W){return W.toFixed(4)},R=[T(wA),T(Q),T(-1*Q),T(wA),0,0,"cm"]}this.internal.write("q"),cA?(this.internal.write([1,"0","0",1,rA(_),hA(S+K),"cm"].join(" ")),this.internal.write(R.join(" ")),this.internal.write([rA(P),"0","0",rA(K),"0","0","cm"].join(" "))):this.internal.write([rA(P),"0","0",rA(K),rA(_),hA(S+K),"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 M=A.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},G=A.__addimage__.sHashCode=function(_){var S,P,K=0;if(typeof _=="string")for(P=_.length,S=0;S<P;S++)K=(K<<5)-K+_.charCodeAt(S),K|=0;else if(Z(_))for(P=_.byteLength/2,S=0;S<P;S++)K=(K<<5)-K+_[S],K|=0;return K},O=A.__addimage__.validateStringAsBase64=function(_){(_=_||"").toString().trim();var S=!0;return _.length===0&&(S=!1),_.length%4!=0&&(S=!1),/^[A-Za-z0-9+/]+$/.test(_.substr(0,_.length-2))===!1&&(S=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(_.substr(-2))===!1&&(S=!1),S},J=A.__addimage__.extractImageFromDataUrl=function(_){if(_==null||!(_=_.trim()).startsWith("data:"))return null;var S=_.indexOf(",");return S<0?null:_.substring(0,S).trim().endsWith("base64")?_.substring(S+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 S=_.length,P=new Uint8Array(S),K=0;K<S;K++)P[K]=_.charCodeAt(K);return P},q=A.__addimage__.arrayBufferToBinaryString=function(_){for(var S="",P=Z(_)?_:new Uint8Array(_),K=0;K<P.length;K+=8192)S+=String.fromCharCode.apply(null,P.subarray(K,K+8192));return S};A.addImage=function(){var _,S,P,K,sA,cA,lA,rA,hA;if(typeof arguments[1]=="number"?(S=t,P=arguments[1],K=arguments[2],sA=arguments[3],cA=arguments[4],lA=arguments[5],rA=arguments[6],hA=arguments[7]):(S=arguments[1],P=arguments[2],K=arguments[3],sA=arguments[4],cA=arguments[5],lA=arguments[6],rA=arguments[7],hA=arguments[8]),Oe(_=arguments[0])==="object"&&!w(_)&&"imageData"in _){var FA=_;_=FA.imageData,S=FA.format||S||t,P=FA.x||P||0,K=FA.y||K||0,sA=FA.w||FA.width||sA,cA=FA.h||FA.height||cA,lA=FA.alias||lA,rA=FA.compression||rA,hA=FA.rotation||FA.angle||hA}var wA=this.internal.getFilters();if(rA===void 0&&wA.indexOf("FlateEncode")!==-1&&(rA="SLOW"),isNaN(P)||isNaN(K))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var Q=H.call(this,_,S,lA,rA);return I.call(this,P,K,sA,cA,Q,hA),this};var H=function(_,S,P,K){var sA,cA,lA;if(typeof _=="string"&&n(_)===t){_=unescape(_);var rA=AA(_,!1);(rA!==""||(rA=A.loadFile(_,!0))!==void 0)&&(_=rA)}if(w(_)&&(_=g(_,S)),S=n(_,S),!p(S))throw new Error("addImage does not support files of type '"+S+"', please ensure that a plugin for '"+S+"' support is added.");if(((lA=P)==null||lA.length===0)&&(P=function(hA){return typeof hA=="string"||Z(hA)?G(hA):Z(hA.data)?G(hA.data):null}(_)),(sA=F.call(this,P))||(_ instanceof Uint8Array||S==="RGBA"||(cA=_,_=nA(_)),sA=this["process"+S.toUpperCase()](_,f.call(this),P,function(hA){return hA&&typeof hA=="string"&&(hA=hA.toUpperCase()),hA in A.image_compression?hA:M.NONE}(K),cA)),!sA)throw new Error("An unknown error occurred whilst processing the image.");return sA},AA=A.__addimage__.convertBase64ToBinaryString=function(_,S){S=typeof S!="boolean"||S;var P,K="";if(typeof _=="string"){var sA;P=(sA=J(_))!==null&&sA!==void 0?sA:_;try{K=Cc(P)}catch(cA){if(S)throw O(P)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+cA.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return K};A.getImageProperties=function(_){var S,P,K="";if(w(_)&&(_=g(_)),typeof _=="string"&&n(_)===t&&((K=AA(_,!1))===""&&(K=A.loadFile(_)||""),_=K),P=n(_),!p(P))throw new Error("addImage does not support files of type '"+P+"', please ensure that a plugin for '"+P+"' support is added.");if(_ instanceof Uint8Array||(_=nA(_)),!(S=this["process"+P.toUpperCase()](_)))throw new Error("An unknown error occurred whilst processing the image");return S.fileType=P,S}})(YA.API),function(A){var e=function(t){if(t!==void 0&&t!="")return!0};YA.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,c=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(),I=this.internal.newAdditionalObject(),b=this.internal.getEncryptor(y.objId),M=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 "+I.objId+" 0 R",i+=" /P "+c.objId+" 0 R",i+=" /T ("+g(b(M))+") >>",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+=" >>",I.content=i,this.internal.write(y.objId,"0 R",I.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(),c=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:c(t),y:u(r),w:c(t+n),h:u(r+i)},options:o,type:"link"})},A.textWithLink=function(t,r,n,i){var o,s,c=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=c,o=u;return this.text(t,r,n,i),n+=.2*u,i.align==="center"&&(r-=c/2),i.align==="right"&&(r-=c),this.link(r,n-u,s,o,i),c},A.getTextWidth=function(t){var r=this.internal.getFontSize();return this.getStringUnitWidth(t)*r/this.internal.scaleFactor}}(YA.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},c=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 I=0,b=t,M="",G=0;for(I=0;I<y.length;I+=1)b[y.charCodeAt(I)]!==void 0?(G++,typeof(b=b[y.charCodeAt(I)])=="number"&&(M+=String.fromCharCode(b),b=t,G=0),I===y.length-1&&(b=t,M+=y.charAt(I-(G-1)),I-=G-1,G=0)):(b=t,M+=y.charAt(I-G),I-=G,G=0);return M};A.__arabicParser__.isArabicDiacritic=function(y){return y!==void 0&&r[y.charCodeAt(0)]!==void 0};var w=A.__arabicParser__.getCorrectForm=function(y,I,b){return o(y)?i(y)===!1?-1:!u(y)||!o(I)&&!o(b)||!o(b)&&s(I)||s(y)&&!o(I)||s(y)&&c(I)||s(y)&&s(I)?0:f(y)&&o(I)&&!s(I)&&o(b)&&u(b)?3:s(y)||!o(b)?1:2:-1},g=function(y){var I=0,b=0,M=0,G="",O="",J="",Z=(y=y||"").split("\\s+"),nA=[];for(I=0;I<Z.length;I+=1){for(nA.push(""),b=0;b<Z[I].length;b+=1)G=Z[I][b],O=Z[I][b-1],J=Z[I][b+1],o(G)?(M=w(G,O,J),nA[I]+=M!==-1?String.fromCharCode(e[G.charCodeAt(0)][M]):G):nA[I]+=G;nA[I]=p(nA[I])}return nA.join(" ")},F=A.__arabicParser__.processArabic=A.processArabic=function(){var y,I=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,b=[];if(Array.isArray(I)){var M=0;for(b=[],M=0;M<I.length;M+=1)Array.isArray(I[M])?b.push([g(I[M][0]),I[M][1],I[M][2]]):b.push([g(I[M])]);y=b}else y=g(I);return typeof arguments[0]=="string"?y:(arguments[0].text=y,arguments[0])};A.events.push(["preProcessText",F])}(YA.API),YA.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}])}(YA.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 c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(y){c=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(c){return r.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},A.getTextDimensions=function(c,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,I=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var b=u.maxWidth;b>0?typeof c=="string"?c=this.splitTextToSize(c,b):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(G,O){return G.concat(I.splitTextToSize(O,b))},[])):c=Array.isArray(c)?c:[c];for(var M=0;M<c.length;M++)g<(y=this.getStringUnitWidth(c[M],{font:p})*f)&&(g=y);return g!==0&&(F=c.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 c=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new i(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=A.cell=function(){var c;c=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===c.lineNumber?(c.x=(u.x||0)+(u.width||0),c.y=u.y||0):u.y+u.height+c.height+p.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=p.top,g&&w&&(this.printHeaderRow(c.lineNumber,!0),c.y+=w[0].height)):c.y=u.y+u.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-f,c.y+f,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+f,{align:"center",baseline:"top",maxWidth:c.width-f-f}):this.text(c.text,c.x+f,c.y+f,{align:"left",baseline:"top",maxWidth:c.width-f-f})),this.internal.__cell__.lastCell=c,this};A.table=function(c,u,f,p,w){if(r.call(this),!f)throw new Error("No data for PDF table.");var g,F,y,I,b=[],M=[],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),S=typeof w.padding=="number"?w.padding:3,P=w.headerBackgroundColor||"#c8c8c8",K=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=S,this.internal.__cell__.headerBackgroundColor=P,this.internal.__cell__.headerTextColor=K,this.setFontSize(AA),p==null)M=b=Object.keys(f[0]),G=b.map(function(){return"left"});else if(Array.isArray(p)&&Oe(p[0])==="object")for(b=p.map(function(FA){return FA.name}),M=p.map(function(FA){return FA.prompt||FA.name||""}),G=p.map(function(FA){return FA.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"&&(M=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[I=b[g]]=f.map(function(FA){return FA[I]}),this.setFont(void 0,"bold"),Z.push(this.getTextDimensions(M[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),F=O[I],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[I]=Math.max.apply(null,Z)+S+S,Z=[]}if(H){var sA={};for(g=0;g<b.length;g+=1)sA[b[g]]={},sA[b[g]].text=M[g],sA[b[g]].align=G[g];var cA=s.call(this,sA,J);nA=b.map(function(FA){return new i(c,u,J[FA],cA,sA[FA].text,void 0,sA[FA].align)}),this.setTableHeaderRow(nA),this.printHeaderRow(1,!1)}var lA=p.reduce(function(FA,wA){return FA[wA.name]=wA.align,FA},{});for(g=0;g<f.length;g+=1){"rowStart"in w&&w.rowStart instanceof Function&&w.rowStart({row:g,data:f[g]},this);var rA=s.call(this,f[g],J);for(y=0;y<b.length;y+=1){var hA=f[g][b[y]];"cellStart"in w&&w.cellStart instanceof Function&&w.cellStart({row:g,col:y,data:hA},this),o.call(this,new i(c,u,J[b[y]],rA,hA,g+2,lA[b[y]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=u,this};var s=function(c,u){var f=this.internal.__cell__.padding,p=this.internal.__cell__.table_font_size,w=this.internal.scaleFactor;return Object.keys(c).map(function(g){var F=c[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(c){r.call(this),this.internal.__cell__.tableHeaderRow=c},A.printHeaderRow=function(c,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=c;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}}(YA.API);var $g={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},AB=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Cf=Zg(AB),eB=[100,200,300,400,500,600,700,800,900],cF=Zg(eB);function Iu(A){var e=A.family.replace(/"|'/g,"").toLowerCase(),t=function(i){return $g[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 Cf[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 Ld(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 lF={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Id={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Sd(A){return[A.stretch,A.style,A.weight,A.family].join(" ")}function Hd(A){return A.trimLeft()}function uF(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 fF(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 ba,dc,Nd,Dd,kd,Su=["times"];function Td(A,e,t,r,n){var i=4,o=Md;switch(n){case YA.API.image_compression.FAST:i=1,o=Od;break;case YA.API.image_compression.MEDIUM:i=6,o=Pd;break;case YA.API.image_compression.SLOW:i=9,o=Rd}A=function(c,u,f,p){for(var w,g=c.length/u,F=new Uint8Array(c.length+g),y=[hF,Od,Md,Pd,Rd],I=0;I<g;I+=1){var b=I*u,M=c.subarray(b,b+u);if(p)F.set(p(M,f,w),b+I);else{for(var G=y.length,O=[],J=0;J<G;J+=1)O[J]=y[J](M,f,w);var Z=gF(O.concat());F.set(O[Z],b+I)}w=M}return F}(A,e,Math.ceil(t*r/8),o);var s=of(A,{level:i});return YA.API.__addimage__.arrayBufferToBinaryString(s)}function hF(A){var e=Array.apply([],A);return e.unshift(0),e}function Od(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 Md(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 Pd(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 Rd(A,e,t){var r=A.length,n=[];n[0]=4;for(var i=0;i<r;i+=1){var o=dF(A[i-e]||0,t&&t[i]||0,t&&t[i-e]||0);n[i+1]=A[i]-o+256&255}return n}function dF(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 gF(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 Hu(A,e,t){var r=e*t,n=Math.floor(r/8),i=16-(r-8*n+t),o=(1<<t)-1;return tB(A,n)>>i&o}function Kd(A,e,t,r){var n=t*r,i=Math.floor(n/8),o=16-(n-8*i+r),s=(1<<r)-1,c=(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,tB(A,i)&~(s<<o)&65535|c)}function tB(A,e){return e+1<A.byteLength?A.getUint16(e,!1):A.getUint8(e)<<8}function BF(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,c=null;i&&(s=e,c=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 I=A[e++]|A[e++]<<8,b=A[e++]|A[e++]<<8,M=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=c,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:I,y:b,width:M,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(S){if(S<0||S>=f.length)throw new Error("Frame index out of range.");return f[S]},this.decodeAndBlitFrameBGRA=function(S,P){var K=this.frameInfo(S),sA=K.width*K.height;if(sA>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var cA=new Uint8Array(sA);jd(A,K.data_offset,cA,sA);var lA=K.palette_offset,rA=K.transparent_index;rA===null&&(rA=256);var hA=K.width,FA=t-hA,wA=hA,Q=4*(K.y*t+K.x),T=4*((K.y+K.height)*t+K.x),R=Q,W=4*FA;K.interlaced===!0&&(W+=4*t*7);for(var X=8,tA=0,uA=cA.length;tA<uA;++tA){var j=cA[tA];if(wA===0&&(wA=hA,(R+=W)>=T&&(W=4*FA+4*t*(X-1),R=Q+(hA+FA)*(X<<1),X>>=1)),j===rA)R+=4;else{var oA=A[lA+3*j],CA=A[lA+3*j+1],yA=A[lA+3*j+2];P[R++]=yA,P[R++]=CA,P[R++]=oA,P[R++]=255}--wA}},this.decodeAndBlitFrameRGBA=function(S,P){var K=this.frameInfo(S),sA=K.width*K.height;if(sA>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var cA=new Uint8Array(sA);jd(A,K.data_offset,cA,sA);var lA=K.palette_offset,rA=K.transparent_index;rA===null&&(rA=256);var hA=K.width,FA=t-hA,wA=hA,Q=4*(K.y*t+K.x),T=4*((K.y+K.height)*t+K.x),R=Q,W=4*FA;K.interlaced===!0&&(W+=4*t*7);for(var X=8,tA=0,uA=cA.length;tA<uA;++tA){var j=cA[tA];if(wA===0&&(wA=hA,(R+=W)>=T&&(W=4*FA+4*t*(X-1),R=Q+(hA+FA)*(X<<1),X>>=1)),j===rA)R+=4;else{var oA=A[lA+3*j],CA=A[lA+3*j+1],yA=A[lA+3*j+2];P[R++]=oA,P[R++]=CA,P[R++]=yA,P[R++]=255}--wA}}}function jd(A,e,t,r){for(var n=A[e++],i=1<<n,o=i+1,s=o+1,c=n+1,u=(1<<c)-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<c)break;var I=p&u;if(p>>=c,f-=c,I!==i){if(I===o)break;for(var b=I<s?I:y,M=0,G=b;G>i;)G=F[G]>>8,++M;var O=G;if(w+M+(b!==I?1:0)>r)return void Te.log("Warning, gif stream longer than expected.");t[w++]=O;var J=w+=M;for(b!==I&&(t[w++]=O),G=b;M--;)G=F[G],t[--J]=255&G,G>>=8;y!==null&&s<4096&&(F[s++]=y<<8|O,s>=u+1&&c<12&&(++c,u=u<<1|1)),y=I}else s=o+1,u=(1<<(c=n+1))-1,y=null}return w!==r&&Te.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 Nu(A){var e,t,r,n,i,o=Math.floor,s=new Array(64),c=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=[],I=0,b=7,M=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],S=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],K=[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 cA(Q,T){for(var R=0,W=0,X=new Array,tA=1;tA<=16;tA++){for(var uA=1;uA<=Q[tA];uA++)X[T[W]]=[],X[T[W]][0]=R,X[T[W]][1]=tA,W++,R++;R*=2}return X}function lA(Q){for(var T=Q[0],R=Q[1]-1;R>=0;)T&1<<R&&(I|=1<<b),R--,--b<0&&(I==255?(rA(255),rA(0)):rA(I),b=7,I=0)}function rA(Q){y.push(Q)}function hA(Q){rA(Q>>8&255),rA(255&Q)}function FA(Q,T,R,W,X){for(var tA,uA=X[0],j=X[240],oA=function(fA,SA){var LA,zA,JA,Qe,ie,re,Be,de,MA,Ae,WA=0;for(MA=0;MA<8;++MA){LA=fA[WA],zA=fA[WA+1],JA=fA[WA+2],Qe=fA[WA+3],ie=fA[WA+4],re=fA[WA+5],Be=fA[WA+6];var Ue=LA+(de=fA[WA+7]),we=LA-de,ce=zA+Be,ne=zA-Be,je=JA+re,jA=JA-re,Ce=Qe+ie,GA=Qe-ie,PA=Ue+Ce,xe=Ue-Ce,se=ce+je,DA=ce-je;fA[WA]=PA+se,fA[WA+4]=PA-se;var $A=.707106781*(DA+xe);fA[WA+2]=xe+$A,fA[WA+6]=xe-$A;var $e=.382683433*((PA=GA+jA)-(DA=ne+we)),ge=.5411961*PA+$e,We=1.306562965*DA+$e,Ct=.707106781*(se=jA+ne),ZA=we+Ct,Zt=we-Ct;fA[WA+5]=Zt+ge,fA[WA+3]=Zt-ge,fA[WA+1]=ZA+We,fA[WA+7]=ZA-We,WA+=8}for(WA=0,MA=0;MA<8;++MA){LA=fA[WA],zA=fA[WA+8],JA=fA[WA+16],Qe=fA[WA+24],ie=fA[WA+32],re=fA[WA+40],Be=fA[WA+48];var wr=LA+(de=fA[WA+56]),$t=LA-de,vr=zA+Be,At=zA-Be,bt=JA+re,_t=JA-re,li=Qe+ie,In=Qe-ie,Ir=wr+li,Vr=wr-li,Sr=vr+bt,Hr=vr-bt;fA[WA]=Ir+Sr,fA[WA+32]=Ir-Sr;var mr=.707106781*(Hr+Vr);fA[WA+16]=Vr+mr,fA[WA+48]=Vr-mr;var ui=.382683433*((Ir=In+_t)-(Hr=At+$t)),qr=.5411961*Ir+ui,fi=1.306562965*Hr+ui,Vi=.707106781*(Sr=_t+At),qi=$t+Vi,Wi=$t-Vi;fA[WA+40]=Wi+qr,fA[WA+24]=Wi-qr,fA[WA+8]=qi+fi,fA[WA+56]=qi-fi,WA++}for(MA=0;MA<64;++MA)Ae=fA[MA]*SA[MA],g[MA]=Ae>0?Ae+.5|0:Ae-.5|0;return g}(Q,T),CA=0;CA<64;++CA)F[nA[CA]]=oA[CA];var yA=F[0]-R;R=F[0],yA==0?lA(W[0]):(lA(W[w[tA=32767+yA]]),lA(p[tA]));for(var UA=63;UA>0&&F[UA]==0;)UA--;if(UA==0)return lA(uA),R;for(var NA,L=1;L<=UA;){for(var _A=L;F[L]==0&&L<=UA;)++L;var xA=L-_A;if(xA>=16){NA=xA>>4;for(var KA=1;KA<=NA;++KA)lA(j);xA&=15}tA=32767+F[L],lA(X[(xA<<4)+w[tA]]),lA(p[tA]),L++}return UA!=63&&lA(uA),R}function wA(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],W=0;W<64;W++){var X=o((R[W]*T+50)/100);X=Math.min(Math.max(X,1),255),s[nA[W]]=X}for(var tA=[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],uA=0;uA<64;uA++){var j=o((tA[uA]*T+50)/100);j=Math.min(Math.max(j,1),255),c[nA[uA]]=j}for(var oA=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],CA=0,yA=0;yA<8;yA++)for(var UA=0;UA<8;UA++)u[CA]=1/(s[nA[CA]]*oA[yA]*oA[UA]*8),f[CA]=1/(c[nA[CA]]*oA[yA]*oA[UA]*8),CA++}(Q<50?Math.floor(5e3/Q):Math.floor(200-2*Q)),i=Q)}this.encode=function(Q,T){T&&wA(T),y=new Array,I=0,b=7,hA(65496),hA(65504),hA(16),rA(74),rA(70),rA(73),rA(70),rA(0),rA(1),rA(1),rA(0),hA(1),hA(1),rA(0),rA(0),function(){hA(65499),hA(132),rA(0);for(var zA=0;zA<64;zA++)rA(s[zA]);rA(1);for(var JA=0;JA<64;JA++)rA(c[JA])}(),function(zA,JA){hA(65472),hA(17),rA(8),hA(JA),hA(zA),rA(3),rA(1),rA(17),rA(0),rA(2),rA(17),rA(1),rA(3),rA(17),rA(1)}(Q.width,Q.height),function(){hA(65476),hA(418),rA(0);for(var zA=0;zA<16;zA++)rA(q[zA+1]);for(var JA=0;JA<=11;JA++)rA(H[JA]);rA(16);for(var Qe=0;Qe<16;Qe++)rA(AA[Qe+1]);for(var ie=0;ie<=161;ie++)rA(_[ie]);rA(1);for(var re=0;re<16;re++)rA(S[re+1]);for(var Be=0;Be<=11;Be++)rA(P[Be]);rA(17);for(var de=0;de<16;de++)rA(K[de+1]);for(var MA=0;MA<=161;MA++)rA(sA[MA])}(),hA(65498),hA(12),rA(3),rA(1),rA(0),rA(2),rA(17),rA(3),rA(17),rA(0),rA(63),rA(0);var R=0,W=0,X=0;I=0,b=7,this.encode.displayName="_encode_";for(var tA,uA,j,oA,CA,yA,UA,NA,L,_A=Q.data,xA=Q.width,KA=Q.height,fA=4*xA,SA=0;SA<KA;){for(tA=0;tA<fA;){for(CA=fA*SA+tA,UA=-1,NA=0,L=0;L<64;L++)yA=CA+(NA=L>>3)*fA+(UA=4*(7&L)),SA+NA>=KA&&(yA-=fA*(SA+1+NA-KA)),tA+UA>=fA&&(yA-=tA+UA-fA+4),uA=_A[yA++],j=_A[yA++],oA=_A[yA++],M[L]=(Z[uA]+Z[j+256|0]+Z[oA+512|0]>>16)-128,G[L]=(Z[uA+768|0]+Z[j+1024|0]+Z[oA+1280|0]>>16)-128,O[L]=(Z[uA+1280|0]+Z[j+1536|0]+Z[oA+1792|0]>>16)-128;R=FA(M,u,R,e,r),W=FA(G,f,W,t,n),X=FA(O,f,X,t,n),tA+=32}SA+=8}if(b>=0){var LA=[];LA[1]=b+1,LA[0]=(1<<b+1)-1,lA(LA)}return hA(65497),new Uint8Array(y)},A=A||50,function(){for(var Q=String.fromCharCode,T=0;T<256;T++)J[T]=Q(T)}(),e=cA(q,H),t=cA(S,P),r=cA(AA,_),n=cA(K,sA),function(){for(var Q=1,T=2,R=1;R<=15;R++){for(var W=Q;W<T;W++)w[32767+W]=R,p[32767+W]=[],p[32767+W][1]=R,p[32767+W][0]=W;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}(),wA(A)}/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */function Mr(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 Gd(A){function e(H){if(!H)throw Error("assert :P")}function t(H,AA,_){for(var S=0;4>S;S++)if(H[AA+S]!=_.charCodeAt(S))return!0;return!1}function r(H,AA,_,S,P){for(var K=0;K<P;K++)H[AA+K]=_[S+K]}function n(H,AA,_,S){for(var P=0;P<S;P++)H[AA+P]=_}function i(H){return new Int32Array(H)}function o(H,AA){for(var _=[],S=0;S<H;S++)_.push(new AA);return _}function s(H,AA){var _=[];return function S(P,K,sA){for(var cA=sA[K],lA=0;lA<cA&&(P.push(sA.length>K+1?[]:new AA),!(sA.length<K+1));lA++)S(P[lA],K+1,sA)}(_,0,H),_}var c=function(){var H=this;function AA(a,l){for(var d=1<<l-1>>>0;a&d;)d>>>=1;return d?(a&d-1)+d:a}function _(a,l,d,B,m){e(!(B%d));do a[l+(B-=d)]=m;while(0<B)}function S(a,l,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,z,aA){var k,Y,eA=x,gA=1<<E,iA=i(16),BA=i(16);for(e(z!=0),e(D!=null),e(U!=null),e(0<E),Y=0;Y<z;++Y){if(15<D[Y])return 0;++iA[D[Y]]}if(iA[0]==z)return 0;for(BA[1]=0,k=1;15>k;++k){if(iA[k]>1<<k)return 0;BA[k+1]=BA[k]+iA[k]}for(Y=0;Y<z;++Y)k=D[Y],0<D[Y]&&(aA[BA[k]++]=Y);if(BA[15]==1)return(D=new P).g=0,D.value=aA[0],_(U,eA,1,gA,D),gA;var pA,QA=-1,mA=gA-1,XA=0,kA=1,fe=1,VA=1<<E;for(Y=0,k=1,z=2;k<=E;++k,z<<=1){if(kA+=fe<<=1,0>(fe-=iA[k]))return 0;for(;0<iA[k];--iA[k])(D=new P).g=k,D.value=aA[Y++],_(U,eA+XA,z,VA,D),XA=AA(XA,k)}for(k=E+1,z=2;15>=k;++k,z<<=1){if(kA+=fe<<=1,0>(fe-=iA[k]))return 0;for(;0<iA[k];--iA[k]){if(D=new P,(XA&mA)!=QA){for(eA+=VA,pA=1<<(QA=k)-E;15>QA&&!(0>=(pA-=iA[QA]));)++QA,pA<<=1;gA+=VA=1<<(pA=QA-E),U[x+(QA=XA&mA)].g=pA+E,U[x+QA].value=eA-x-QA}D.g=k-E,D.value=aA[Y++],_(U,eA+(XA>>E),z,VA,D),XA=AA(XA,k)}}return kA!=2*BA[15]-1?0:gA}(a,l,d,B,m,C)}function P(){this.value=this.g=0}function K(){this.value=this.g=0}function sA(){this.G=o(5,P),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(aa,K)}function cA(a,l,d,B){e(a!=null),e(l!=null),e(2147483648>B),a.Ca=254,a.I=0,a.b=-8,a.Ka=0,a.oa=l,a.pa=d,a.Jd=l,a.Yc=d+B,a.Zc=4<=B?d+B-4+1:d,uA(a)}function lA(a,l){for(var d=0;0<l--;)d|=oA(a,128)<<l;return d}function rA(a,l){var d=lA(a,l);return j(a)?-d:d}function hA(a,l,d,B){var m,C=0;for(e(a!=null),e(l!=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+=l[d+m]<<8*m;a.Ra=C,a.bb=B,a.oa=l,a.pa=d}function FA(a){for(;8<=a.u&&a.bb<a.Sb;)a.Ra>>>=8,a.Ra+=a.oa[a.pa+a.bb]<<qt-8>>>0,++a.bb,a.u-=8;W(a)&&(a.h=1,a.u=0)}function wA(a,l){if(e(0<=l),!a.h&&l<=ts){var d=R(a)&bi[l];return a.u+=l,FA(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&qt-1)>>>0}function W(a){return e(a.bb<=a.Sb),a.h||a.bb==a.Sb&&a.u>qt}function X(a,l){a.u=l,a.h=W(a)}function tA(a){a.u>=Ar&&(e(a.u>=Ar),FA(a))}function uA(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 j(a){return lA(a,1)}function oA(a,l){var d=a.Ca;0>a.b&&uA(a);var B=a.b,m=d*l>>>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+sa[B],a.b-=B,a.Ca=(d<<B)-1,C}function CA(a,l,d){a[l+0]=d>>24&255,a[l+1]=d>>16&255,a[l+2]=d>>8&255,a[l+3]=255&d}function yA(a,l){return a[l+0]|a[l+1]<<8}function UA(a,l){return yA(a,l)|a[l+2]<<16}function NA(a,l){return yA(a,l)|yA(a,l+2)<<16}function L(a,l){var d=1<<l;return e(a!=null),e(0<l),a.X=i(d),a.X==null?0:(a.Mb=32-l,a.Xa=l,1)}function _A(a,l){e(a!=null),e(l!=null),e(a.Xa==l.Xa),r(l.X,0,a.X,0,1<<l.Xa)}function xA(){this.X=[],this.Xa=this.Mb=0}function KA(a,l,d,B){e(d!=null),e(B!=null);var m=d[0],C=B[0];return m==0&&(m=(a*C+l/2)/l),C==0&&(C=(l*m+a/2)/a),0>=m||0>=C?0:(d[0]=m,B[0]=C,1)}function fA(a,l){return a+(1<<l)-1>>>l}function SA(a,l){return((4278255360&a)+(4278255360&l)>>>0&4278255360)+((16711935&a)+(16711935&l)>>>0&16711935)>>>0}function LA(a,l){H[l]=function(d,B,m,C,U,x,E){var D;for(D=0;D<U;++D){var z=H[a](x[E+D-1],m,C+D);x[E+D]=SA(d[B+D],z)}}}function zA(){this.ud=this.hd=this.jd=0}function JA(a,l){return((4278124286&(a^l))>>>1)+(a&l)>>>0}function Qe(a){return 0<=a&&256>a?a:0>a?0:255<a?255:void 0}function ie(a,l){return Qe(a+(a-l+.5>>1))}function re(a,l,d){return Math.abs(l-d)-Math.abs(a-d)}function Be(a,l,d,B,m,C,U){for(B=C[U-1],d=0;d<m;++d)C[U+d]=B=SA(a[l+d],B)}function de(a,l,d,B,m){var C;for(C=0;C<d;++C){var U=a[l+C],x=U>>8&255,E=16711935&(E=(E=16711935&U)+((x<<16)+x));B[m+C]=(4278255360&U)+E>>>0}}function MA(a,l){l.jd=255&a,l.hd=a>>8&255,l.ud=a>>16&255}function Ae(a,l,d,B,m,C){var U;for(U=0;U<B;++U){var x=l[d+U],E=x>>>8,D=x,z=255&(z=(z=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)*(z<<24>>24)>>>5)),m[C+U]=(4278255360&x)+(z<<16)+D}}function WA(a,l,d,B,m){H[l]=function(C,U,x,E,D,z,aA,k,Y){for(E=aA;E<k;++E)for(aA=0;aA<Y;++aA)D[z++]=m(x[B(C[U++])])},H[a]=function(C,U,x,E,D,z,aA){var k=8>>C.b,Y=C.Ea,eA=C.K[0],gA=C.w;if(8>k)for(C=(1<<C.b)-1,gA=(1<<k)-1;U<x;++U){var iA,BA=0;for(iA=0;iA<Y;++iA)iA&C||(BA=B(E[D++])),z[aA++]=m(eA[BA&gA]),BA>>=k}else H["VP8LMapColor"+d](E,D,eA,gA,z,aA,U,x,Y)}}function Ue(a,l,d,B,m){for(d=l+d;l<d;){var C=a[l++];B[m++]=C>>16&255,B[m++]=C>>8&255,B[m++]=255&C}}function we(a,l,d,B,m){for(d=l+d;l<d;){var C=a[l++];B[m++]=C>>16&255,B[m++]=C>>8&255,B[m++]=255&C,B[m++]=C>>24&255}}function ce(a,l,d,B,m){for(d=l+d;l<d;){var C=(U=a[l++])>>16&240|U>>12&15,U=240&U|U>>28&15;B[m++]=C,B[m++]=U}}function ne(a,l,d,B,m){for(d=l+d;l<d;){var C=(U=a[l++])>>16&248|U>>13&7,U=U>>5&224|U>>3&31;B[m++]=C,B[m++]=U}}function je(a,l,d,B,m){for(d=l+d;l<d;){var C=a[l++];B[m++]=255&C,B[m++]=C>>8&255,B[m++]=C>>16&255}}function jA(a,l,d,B,m,C){if(C==0)for(d=l+d;l<d;)CA(B,((C=a[l++])[0]>>24|C[1]>>8&65280|C[2]<<8&16711680|C[3]<<24)>>>0),m+=32;else r(B,m,a,l,d)}function Ce(a,l){H[l][0]=H[a+"0"],H[l][1]=H[a+"1"],H[l][2]=H[a+"2"],H[l][3]=H[a+"3"],H[l][4]=H[a+"4"],H[l][5]=H[a+"5"],H[l][6]=H[a+"6"],H[l][7]=H[a+"7"],H[l][8]=H[a+"8"],H[l][9]=H[a+"9"],H[l][10]=H[a+"10"],H[l][11]=H[a+"11"],H[l][12]=H[a+"12"],H[l][13]=H[a+"13"],H[l][14]=H[a+"0"],H[l][15]=H[a+"0"]}function GA(a){return a==Fl||a==Ql||a==yo||a==yl}function PA(){this.eb=[],this.size=this.A=this.fb=0}function xe(){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 se(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new PA,this.f.kb=new xe,this.sd=null}function DA(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function $A(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function $e(a){return alert("todo:WebPSamplerProcessPlane"),a.T}function ge(a,l){var d=a.T,B=l.ba.f.RGBA,m=B.eb,C=B.fb+a.ka*B.A,U=Qr[l.ba.S],x=a.y,E=a.O,D=a.f,z=a.N,aA=a.ea,k=a.W,Y=l.cc,eA=l.dc,gA=l.Mc,iA=l.Nc,BA=a.ka,pA=a.ka+a.T,QA=a.U,mA=QA+1>>1;for(BA==0?U(x,E,null,null,D,z,aA,k,D,z,aA,k,m,C,null,null,QA):(U(l.ec,l.fc,x,E,Y,eA,gA,iA,D,z,aA,k,m,C-B.A,m,C,QA),++d);BA+2<pA;BA+=2)Y=D,eA=z,gA=aA,iA=k,z+=a.Rc,k+=a.Rc,C+=2*B.A,U(x,(E+=2*a.fa)-a.fa,x,E,Y,eA,gA,iA,D,z,aA,k,m,C-B.A,m,C,QA);return E+=a.fa,a.j+pA<a.o?(r(l.ec,l.fc,x,E,QA),r(l.cc,l.dc,D,z,mA),r(l.Mc,l.Nc,aA,k,mA),d--):1&pA||U(x,E,null,null,D,z,aA,k,D,z,aA,k,m,C+B.A,null,null,QA),d}function We(a,l,d){var B=a.F,m=[a.J];if(B!=null){var C=a.U,U=l.ba.S,x=U==Qo||U==yo;l=l.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 z=l.eb;D=l.fb+D*l.A,a=qf(B,m[0],a.width,C,E,z,D+(x?0:3),l.A),e(d==E),a&&GA(U)&&as(z,D,x,C,E,l.A)}return 0}function Ct(a){var l=a.ma,d=l.ba.S,B=11>d,m=d==bo||d==Fo||d==Qo||d==bl||d==12||GA(d);if(l.memory=null,l.Ib=null,l.Jb=null,l.Nd=null,!br(l.Oa,a,m?11:12))return 0;if(m&&GA(d)&&pn(),a.da)alert("todo:use_scaling");else{if(B){if(l.Ib=$e,a.Kb){if(d=a.U+1>>1,l.memory=i(a.U+2*d),l.memory==null)return 0;l.ec=l.memory,l.fc=0,l.cc=l.ec,l.dc=l.fc+a.U,l.Mc=l.cc,l.Nc=l.dc+d,l.Ib=ge,pn()}}else alert("todo:EmitYUV");m&&(l.Jb=We,B&&Ye())}if(B&&!ch){for(a=0;256>a;++a)FB[a]=89858*(a-128)+_o>>Uo,UB[a]=-22014*(a-128)+_o,yB[a]=-45773*(a-128),QB[a]=113618*(a-128)+_o>>Uo;for(a=os;a<xl;++a)l=76283*(a-16)+_o>>Uo,_B[a-os]=Wr(l,255),xB[a-os]=Wr(l+8>>4,15);ch=1}return 1}function ZA(a){var l=a.ma,d=a.U,B=a.T;return e(!(1&a.ka)),0>=d||0>=B?0:(d=l.Ib(a,l),l.Jb!=null&&l.Jb(a,l,d),l.Dc+=d,1)}function Zt(a){a.ma.memory=null}function wr(a,l,d,B){return wA(a,8)!=47?0:(l[0]=wA(a,14)+1,d[0]=wA(a,14)+1,B[0]=wA(a,1),wA(a,3)!=0?0:!a.h)}function $t(a,l){if(4>a)return a+1;var d=a-2>>1;return(2+(1&a)<<d)+wA(l,d)+1}function vr(a,l){return 120<l?l-120:1<=(d=((d=cB[l-1])>>4)*a+(8-(15&d)))?d:1;var d}function At(a,l,d){var B=R(d),m=a[l+=255&B].g-8;return 0<m&&(X(d,d.u+8),B=R(d),l+=a[l].value,l+=B&(1<<m)-1),X(d,d.u+a[l].g),a[l].value}function bt(a,l,d){return d.g+=a.g,d.value+=a.value<<l>>>0,e(8>=d.g),a.g}function _t(a,l,d){var B=a.xc;return e((l=B==0?0:a.vc[a.md*(d>>B)+(l>>B)])<a.Wb),a.Ya[l]}function li(a,l,d,B){var m=a.ab,C=a.c*l,U=a.C;l=U+l;var x=d,E=B;for(B=a.Ta,d=a.Ua;0<m--;){var D=a.gc[m],z=U,aA=l,k=x,Y=E,eA=(E=B,x=d,D.Ea);switch(e(z<aA),e(aA<=D.nc),D.hc){case 2:oa(k,Y,(aA-z)*eA,E,x);break;case 0:var gA=z,iA=aA,BA=E,pA=x,QA=(VA=D).Ea;gA==0&&(kn(k,Y,null,null,1,BA,pA),Be(k,Y+1,0,0,QA-1,BA,pA+1),Y+=QA,pA+=QA,++gA);for(var mA=1<<VA.b,XA=mA-1,kA=fA(QA,VA.b),fe=VA.K,VA=VA.w+(gA>>VA.b)*kA;gA<iA;){var ve=fe,pt=VA,he=1;for(Tn(k,Y,BA,pA-QA,1,BA,pA);he<QA;){var qA=(he&~XA)+mA;qA>QA&&(qA=QA),(0,Nr[ve[pt++]>>8&15])(k,Y+ +he,BA,pA+he-QA,qA-he,BA,pA+he),he=qA}Y+=QA,pA+=QA,++gA&XA||(VA+=kA)}aA!=D.nc&&r(E,x-eA,E,x+(aA-z-1)*eA,eA);break;case 1:for(eA=k,iA=Y,QA=(k=D.Ea)-(pA=k&~(BA=(Y=1<<D.b)-1)),gA=fA(k,D.b),mA=D.K,D=D.w+(z>>D.b)*gA;z<aA;){for(XA=mA,kA=D,fe=new zA,VA=iA+pA,ve=iA+k;iA<VA;)MA(XA[kA++],fe),Qi(fe,eA,iA,Y,E,x),iA+=Y,x+=Y;iA<ve&&(MA(XA[kA++],fe),Qi(fe,eA,iA,QA,E,x),iA+=QA,x+=QA),++z&BA||(D+=gA)}break;case 3:if(k==E&&Y==x&&0<D.b){for(iA=E,k=eA=x+(aA-z)*eA-(pA=(aA-z)*fA(D.Ea,D.b)),Y=E,BA=x,gA=[],pA=(QA=pA)-1;0<=pA;--pA)gA[pA]=Y[BA+pA];for(pA=QA-1;0<=pA;--pA)iA[k+pA]=gA[pA];Fi(D,z,aA,E,eA,E,x)}else Fi(D,z,aA,k,Y,E,x)}x=B,E=d}E!=d&&r(B,d,x,E,C)}function In(a,l){var d=a.V,B=a.Ba+a.c*a.C,m=l-a.C;if(e(l<=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=l)),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 z=d.f.RGBA,aA=(B=d.S,m=C.U,C=C.T,D=z.eb,z.A),k=C;for(z=z.fb+a.Ma*z.A;0<k--;){var Y=U,eA=x,gA=m,iA=D,BA=z;switch(B){case Co:rs(Y,eA,gA,iA,BA);break;case bo:ns(Y,eA,gA,iA,BA);break;case Fl:ns(Y,eA,gA,iA,BA),as(iA,BA,0,gA,1,0);break;case $f:Ui(Y,eA,gA,iA,BA);break;case Fo:jA(Y,eA,gA,iA,BA,1);break;case Ql:jA(Y,eA,gA,iA,BA,1),as(iA,BA,0,gA,1,0);break;case Qo:jA(Y,eA,gA,iA,BA,0);break;case yo:jA(Y,eA,gA,iA,BA,0),as(iA,BA,1,gA,1,0);break;case bl:ca(Y,eA,gA,iA,BA);break;case yl:ca(Y,eA,gA,iA,BA),Vf(iA,BA,gA,1,0);break;case Ah:yi(Y,eA,gA,iA,BA);break;default:e(0)}x+=E,z+=aA}a.Ma+=C}else alert("todo:EmitRescaledRowsYUVA");e(a.Ma<=d.height)}}a.C=l,e(a.C<=a.i)}function Ir(a){var l;if(0<a.ua)return 0;for(l=0;l<a.Wb;++l){var d=a.Ya[l].G,B=a.Ya[l].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 Vr(a,l,d,B,m,C){if(a.Z!=0){var U=a.qd,x=a.rd;for(e(Rn[a.Z]!=null);l<d;++l)Rn[a.Z](U,x,B,m,B,m,C),U=B,x=m,m+=C;a.qd=U,a.rd=x}}function Sr(a,l){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(l<=a.l.o),l>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),ml(D[0],B,l,x,E,C,U),Vr(d,B,l,C,U,m)}a.C=a.Ma=l}function Hr(a,l,d,B,m,C,U){var x=a.$/B,E=a.$%B,D=a.m,z=a.s,aA=d+a.$,k=aA;m=d+B*m;var Y=d+B*C,eA=280+z.ua,gA=a.Pb?x:16777216,iA=0<z.ua?z.Wa:null,BA=z.wc,pA=aA<Y?_t(z,E,x):null;e(a.C<C),e(Y<=m);var QA=!1;A:for(;;){for(;QA||aA<Y;){var mA=0;if(x>=gA){var XA=aA-d;e((gA=a).Pb),gA.wd=gA.m,gA.xd=XA,0<gA.s.ua&&_A(gA.s.Wa,gA.s.vb),gA=x+uB}if(E&BA||(pA=_t(z,E,x)),e(pA!=null),pA.Qb&&(l[aA]=pA.qb,QA=!0),!QA)if(tA(D),pA.jc){mA=D,XA=l;var kA=aA,fe=pA.pd[R(mA)&aa-1];e(pA.jc),256>fe.g?(X(mA,mA.u+fe.g),XA[kA]=fe.value,mA=0):(X(mA,mA.u+fe.g-256),e(256<=fe.value),mA=fe.value),mA==0&&(QA=!0)}else mA=At(pA.G[0],pA.H[0],D);if(D.h)break;if(QA||256>mA){if(!QA)if(pA.nd)l[aA]=(pA.qb|mA<<8)>>>0;else{if(tA(D),QA=At(pA.G[1],pA.H[1],D),tA(D),XA=At(pA.G[2],pA.H[2],D),kA=At(pA.G[3],pA.H[3],D),D.h)break;l[aA]=(kA<<24|QA<<16|mA<<8|XA)>>>0}if(QA=!1,++aA,++E>=B&&(E=0,++x,U!=null&&x<=C&&!(x%16)&&U(a,x),iA!=null))for(;k<aA;)mA=l[k++],iA.X[(506832829*mA&4294967295)>>>iA.Mb]=mA}else if(280>mA){if(mA=$t(mA-256,D),XA=At(pA.G[4],pA.H[4],D),tA(D),XA=vr(B,XA=$t(XA,D)),D.h)break;if(aA-d<XA||m-aA<mA)break A;for(kA=0;kA<mA;++kA)l[aA+kA]=l[aA+kA-XA];for(aA+=mA,E+=mA;E>=B;)E-=B,++x,U!=null&&x<=C&&!(x%16)&&U(a,x);if(e(aA<=m),E&BA&&(pA=_t(z,E,x)),iA!=null)for(;k<aA;)mA=l[k++],iA.X[(506832829*mA&4294967295)>>>iA.Mb]=mA}else{if(!(mA<eA))break A;for(QA=mA-280,e(iA!=null);k<aA;)mA=l[k++],iA.X[(506832829*mA&4294967295)>>>iA.Mb]=mA;mA=aA,e(!(QA>>>(XA=iA).Xa)),l[mA]=XA.X[QA],QA=!0}QA||e(D.h==W(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&&_A(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 mr(a){e(a!=null),a.vc=null,a.yc=null,a.Ya=null;var l=a.Wa;l!=null&&(l.X=null),a.vb=null,e(a!=null)}function ui(){var a=new RA;return a==null?null:(a.a=0,a.xb=rh,Ce("Predictor","VP8LPredictors"),Ce("Predictor","VP8LPredictors_C"),Ce("PredictorAdd","VP8LPredictorsAdd"),Ce("PredictorAdd","VP8LPredictorsAdd_C"),oa=de,Qi=Ae,rs=Ue,ns=we,ca=ce,yi=ne,Ui=je,H.VP8LMapColor32b=dt,H.VP8LMapColor8b=Zr,a)}function qr(a,l,d,B,m){var C=1,U=[a],x=[l],E=B.m,D=B.s,z=null,aA=0;A:for(;;){if(d)for(;C&&wA(E,1);){var k=U,Y=x,eA=B,gA=1,iA=eA.m,BA=eA.gc[eA.ab],pA=wA(iA,2);if(eA.Oc&1<<pA)C=0;else{switch(eA.Oc|=1<<pA,BA.hc=pA,BA.Ea=k[0],BA.nc=Y[0],BA.K=[null],++eA.ab,e(4>=eA.ab),pA){case 0:case 1:BA.b=wA(iA,3)+2,gA=qr(fA(BA.Ea,BA.b),fA(BA.nc,BA.b),0,eA,BA.K),BA.K=BA.K[0];break;case 3:var QA,mA=wA(iA,8)+1,XA=16<mA?0:4<mA?1:2<mA?2:3;if(k[0]=fA(BA.Ea,XA),BA.b=XA,QA=gA=qr(mA,1,0,eA,BA.K)){var kA,fe=mA,VA=BA,ve=1<<(8>>VA.b),pt=i(ve);if(pt==null)QA=0;else{var he=VA.K[0],qA=VA.w;for(pt[0]=VA.K[0][0],kA=1;kA<1*fe;++kA)pt[kA]=SA(he[qA+kA],pt[kA-1]);for(;kA<4*ve;++kA)pt[kA]=0;VA.K[0]=null,VA.K[0]=pt,QA=1}}gA=QA;break;case 2:break;default:e(0)}C=gA}}if(U=U[0],x=x[0],C&&wA(E,1)&&!(C=1<=(aA=wA(E,4))&&11>=aA)){B.a=3;break A}var EA;if(EA=C)e:{var it,ue,Fe,Ve=B,Et=U,Wt=x,et=aA,Ot=d,zt=Ve.m,wt=Ve.s,ye=[null],Le=1,tt=0,Ie=lB[et];t:for(;;){if(Ot&&wA(zt,1)){var Lt=wA(zt,3)+2,kr=fA(Et,Lt),at=fA(Wt,Lt),er=kr*at;if(!qr(kr,at,0,Ve,ye))break t;for(ye=ye[0],wt.xc=Lt,it=0;it<er;++it){var ke=ye[it]>>8&65535;ye[it]=ke,ke>=Le&&(Le=ke+1)}}if(zt.h)break t;for(ue=0;5>ue;++ue){var vt=eh[ue];!ue&&0<et&&(vt+=1<<et),tt<vt&&(tt=vt)}var or=o(Le*Ie,P),Xt=Le,cr=o(Xt,sA);if(cr==null)var lr=null;else e(65536>=Xt),lr=cr;var tr=i(tt);if(lr==null||tr==null||or==null){Ve.a=1;break t}var ur=or;for(it=Fe=0;it<Le;++it){var Re=lr[it],fr=Re.G,Tr=Re.H,_i=0,Cn=1,It=0;for(ue=0;5>ue;++ue){vt=eh[ue],fr[ue]=ur,Tr[ue]=Fe,!ue&&0<et&&(vt+=1<<et);n:{var Eo,El=vt,Lo=Ve,cs=tr,IB=ur,SB=Fe,Ll=0,Kn=Lo.m,HB=wA(Kn,1);if(n(cs,0,0,El),HB){var NB=wA(Kn,1)+1,DB=wA(Kn,1),fh=wA(Kn,DB==0?1:8);cs[fh]=1,NB==2&&(cs[fh=wA(Kn,8)]=1);var Io=1}else{var hh=i(19),dh=wA(Kn,4)+4;if(19<dh){Lo.a=3;var So=0;break n}for(Eo=0;Eo<dh;++Eo)hh[oB[Eo]]=wA(Kn,3);var Il=void 0,ls=void 0,gh=Lo,kB=hh,Ho=El,Bh=cs,Sl=0,jn=gh.m,ph=8,wh=o(128,P);r:for(;S(wh,0,7,kB,19);){if(wA(jn,1)){var TB=2+2*wA(jn,3);if((Il=2+wA(jn,TB))>Ho)break r}else Il=Ho;for(ls=0;ls<Ho&&Il--;){tA(jn);var vh=wh[0+(127&R(jn))];X(jn,jn.u+vh.g);var fa=vh.value;if(16>fa)Bh[ls++]=fa,fa!=0&&(ph=fa);else{var OB=fa==16,mh=fa-16,MB=aB[mh],Ch=wA(jn,iB[mh])+MB;if(ls+Ch>Ho)break r;for(var PB=OB?ph:0;0<Ch--;)Bh[ls++]=PB}}Sl=1;break r}Sl||(gh.a=3),Io=Sl}(Io=Io&&!Kn.h)&&(Ll=S(IB,SB,8,cs,El)),Io&&Ll!=0?So=Ll:(Lo.a=3,So=0)}if(So==0)break t;if(Cn&&sB[ue]==1&&(Cn=ur[Fe].g==0),_i+=ur[Fe].g,Fe+=So,3>=ue){var us,Hl=tr[0];for(us=1;us<vt;++us)tr[us]>Hl&&(Hl=tr[us]);It+=Hl}}if(Re.nd=Cn,Re.Qb=0,Cn&&(Re.qb=(fr[3][Tr[3]+0].value<<24|fr[1][Tr[1]+0].value<<16|fr[2][Tr[2]+0].value)>>>0,_i==0&&256>fr[0][Tr[0]+0].value&&(Re.Qb=1,Re.qb+=fr[0][Tr[0]+0].value<<8)),Re.jc=!Re.Qb&&6>It,Re.jc){var No,bn=Re;for(No=0;No<aa;++No){var Gn=No,Vn=bn.pd[Gn],Do=bn.G[0][bn.H[0]+Gn];256<=Do.value?(Vn.g=Do.g+256,Vn.value=Do.value):(Vn.g=0,Vn.value=0,Gn>>=bt(Do,8,Vn),Gn>>=bt(bn.G[1][bn.H[1]+Gn],16,Vn),Gn>>=bt(bn.G[2][bn.H[2]+Gn],0,Vn),bt(bn.G[3][bn.H[3]+Gn],24,Vn))}}}wt.vc=ye,wt.Wb=Le,wt.Ya=lr,wt.yc=or,EA=1;break e}EA=0}if(!(C=EA)){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 Nl=B,bh=U,RB=x,Dl=Nl.s,kl=Dl.xc;if(Nl.c=bh,Nl.i=RB,Dl.md=fA(bh,kl),Dl.wc=kl==0?-1:(1<<kl)-1,d){B.xb=wB;break A}if((z=i(U*x))==null){B.a=1,C=0;break A}C=(C=Hr(B,z,0,U,x,x,null))&&!E.h;break A}return C?(m!=null?m[0]=z:(e(z==null),e(d)),B.$=0,d||mr(D)):mr(D),C}function fi(a,l){var d=a.c*a.i,B=d+l+16*l;return e(a.c<=l),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+l,1)}function Vi(a,l){var d=a.C,B=l-d,m=a.V,C=a.Ba+a.c*d;for(e(l<=a.l.o);0<B;){var U=16<B?16:B,x=a.l.ma,E=a.l.width,D=E*U,z=x.ca,aA=x.tb+E*d,k=a.Ta,Y=a.Ua;li(a,U,m,C),Wf(k,Y,z,aA,D),Vr(x,d,d+U,z,aA,E),B-=U,m+=U*a.c,d+=U}e(d==l),a.C=a.Ma=l}function qi(){this.ub=this.yd=this.td=this.Rb=0}function Wi(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function tl(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function ja(){this.Yb=function(){var a=[];return function l(d,B,m){for(var C=m[B],U=0;U<C&&(d.push(m.length>B+1?[]:0),!(m.length<B+1));U++)l(d[U],B+1,m)}(a,0,[3,11]),a}()}function eo(){this.jb=i(3),this.Wc=s([4,8],ja),this.Xc=s([4,17],ja)}function to(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function Cr(){this.ld=this.La=this.dd=this.tc=0}function Ga(){this.Na=this.la=0}function ro(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Va(){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 no(){this.uc=this.M=this.Nb=0,this.wa=Array(new Cr),this.Y=0,this.ya=Array(new Va),this.aa=0,this.l=new zi}function io(){this.y=i(16),this.f=i(8),this.ea=i(8)}function ao(){this.cb=this.a=0,this.sc="",this.m=new Q,this.Od=new qi,this.Kc=new Wi,this.ed=new to,this.Qa=new tl,this.Ic=this.$c=this.Aa=0,this.D=new no,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,ro),this.Pa=new eo,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new io),this.Hd=0,this.rb=Array(new Ga),this.sb=0,this.wa=Array(new Cr),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 Va),this.L=this.aa=0,this.gd=s([4,2],Cr),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 Wr(a,l){return 0>a?0:a>l?l: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 rl(){var a=new ao;return a!=null&&(a.a=0,a.sc="OK",a.cb=0,a.Xb=0,ss||(ss=Xi)),a}function ft(a,l,d){return a.a==0&&(a.a=l,a.sc=d,a.cb=0),0}function so(a,l,d){return 3<=d&&a[l+0]==157&&a[l+1]==1&&a[l+2]==42}function zr(a,l){if(a==null)return 0;if(a.a=0,a.sc="OK",l==null)return ft(a,2,"null VP8Io passed to VP8GetHeaders()");var d=l.data,B=l.w,m=l.ha;if(4>m)return ft(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 ft(a,3,"Incorrect keyframe parameters.");if(!U.yd)return ft(a,4,"Frame not displayable.");B+=3,m-=3;var x=a.Kc;if(U.Rb){if(7>m)return ft(a,7,"cannot parse picture header");if(!so(d,B,m))return ft(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,l.width=x.c,l.height=x.i,l.Da=0,l.j=0,l.v=0,l.va=l.width,l.o=l.height,l.da=0,l.ib=l.width,l.hb=l.height,l.U=l.width,l.T=l.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 ft(a,7,"bad partition length");cA(C=a.m,d,B,U.ub),B+=U.ub,m-=U.ub,U.Rb&&(x.Ld=j(C),x.Kd=j(C)),x=a.Qa;var E,D=a.Pa;if(e(C!=null),e(x!=null),x.Cb=j(C),x.Cb){if(x.Bb=j(C),j(C)){for(x.Fb=j(C),E=0;4>E;++E)x.Zb[E]=j(C)?rA(C,7):0;for(E=0;4>E;++E)x.Lb[E]=j(C)?rA(C,6):0}if(x.Bb)for(E=0;3>E;++E)D.jb[E]=j(C)?lA(C,8):255}else x.Bb=0;if(C.Ka)return ft(a,3,"cannot parse segment header");if((x=a.ed).zd=j(C),x.Tb=lA(C,6),x.wb=lA(C,3),x.Pc=j(C),x.Pc&&j(C)){for(D=0;4>D;++D)j(C)&&(x.vd[D]=rA(C,6));for(D=0;4>D;++D)j(C)&&(x.od[D]=rA(C,6))}if(a.L=x.Tb==0?0:x.zd?1:2,C.Ka)return ft(a,3,"cannot parse filter header");var z=m;if(m=E=B,B=E+z,x=z,a.Xb=(1<<lA(a.m,2))-1,z<3*(D=a.Xb))d=7;else{for(E+=3*D,x-=3*D,z=0;z<D;++z){var aA=d[m+0]|d[m+1]<<8|d[m+2]<<16;aA>x&&(aA=x),cA(a.Jc[+z],d,E,aA),E+=aA,x-=aA,m+=3}cA(a.Jc[+D],d,E,x),d=E<B?0:5}if(d!=0)return ft(a,d,"cannot parse partitions");for(d=lA(E=a.m,7),m=j(E)?rA(E,4):0,B=j(E)?rA(E,4):0,x=j(E)?rA(E,4):0,D=j(E)?rA(E,4):0,E=j(E)?rA(E,4):0,z=a.Qa,aA=0;4>aA;++aA){if(z.Cb){var k=z.Zb[aA];z.Fb||(k+=d)}else{if(0<aA){a.pb[aA]=a.pb[0];continue}k=d}var Y=a.pb[aA];Y.Sc[0]=Ul[Wr(k+m,127)],Y.Sc[1]=_l[Wr(k+0,127)],Y.Eb[0]=2*Ul[Wr(k+B,127)],Y.Eb[1]=101581*_l[Wr(k+x,127)]>>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=Ul[Wr(k+D,117)],Y.Qc[1]=_l[Wr(k+E,127)],Y.lc=k+E}if(!U.Rb)return ft(a,4,"Not a key frame.");for(j(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=oA(C,BB[d][m][B][x])?lA(C,8):dB[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][pB[m]]}return a.kc=j(C),a.kc&&(a.Bd=lA(C,8)),a.cb=1}function Xi(a,l,d,B,m,C,U){var x=l[m].Yb[d];for(d=0;16>m;++m){if(!oA(a,x[d+0]))return m;for(;!oA(a,x[d+1]);)if(x=l[++m].Yb[0],d=0,m==16)return 16;var E=l[m+1].Yb;if(oA(a,x[d+2])){var D=a,z=0;if(oA(D,(k=x)[(aA=d)+3]))if(oA(D,k[aA+6])){for(x=0,aA=2*(z=oA(D,k[aA+8]))+(k=oA(D,k[aA+9+z])),z=0,k=fB[aA];k[x];++x)z+=z+oA(D,k[x]);z+=3+(8<<aA)}else oA(D,k[aA+7])?(z=7+2*oA(D,165),z+=oA(D,145)):z=5+oA(D,159);else z=oA(D,k[aA+4])?3+oA(D,k[aA+5]):2;x=E[2]}else z=1,x=E[1];E=U+hB[m],0>(D=a).b&&uA(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]=((z^Y)-Y)*B[(0<m)+0]}return 16}function qa(a){var l=a.rb[a.sb-1];l.la=0,l.Na=0,n(a.zc,0,0,a.zc.length),a.ja=0}function ar(a,l,d,B,m){m=a[l+d+32*B]+(m>>3),a[l+d+32*B]=-256&m?0>m?0:255:m}function Ji(a,l,d,B,m,C){ar(a,l,0,d,B+m),ar(a,l,1,d,B+C),ar(a,l,2,d,B-C),ar(a,l,3,d,B-m)}function fn(a){return(20091*a>>16)+a}function xt(a,l,d,B){var m,C=0,U=i(16);for(m=0;4>m;++m){var x=a[l+0]+a[l+8],E=a[l+0]-a[l+8],D=(35468*a[l+4]>>16)-fn(a[l+12]),z=fn(a[l+4])+(35468*a[l+12]>>16);U[C+0]=x+z,U[C+1]=E+D,U[C+2]=E-D,U[C+3]=x-z,C+=4,l++}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)-fn(U[C+12]),ar(d,B,0,0,x+(z=fn(U[C+4])+(35468*U[C+12]>>16))),ar(d,B,1,0,E+D),ar(d,B,2,0,E-D),ar(d,B,3,0,x-z),C++,B+=32}function oo(a,l,d,B){var m=a[l+0]+4,C=35468*a[l+4]>>16,U=fn(a[l+4]),x=35468*a[l+1]>>16;Ji(d,B,0,m+U,a=fn(a[l+1]),x),Ji(d,B,1,m+C,a,x),Ji(d,B,2,m-C,a,x),Ji(d,B,3,m-U,a,x)}function nl(a,l,d,B,m){xt(a,l,d,B),m&&xt(a,l+16,d,B+4)}function il(a,l,d,B){wn(a,l+0,d,B,1),wn(a,l+32,d,B+128,1)}function al(a,l,d,B){var m;for(a=a[l+0]+4,m=0;4>m;++m)for(l=0;4>l;++l)ar(d,B,l,m,a)}function Xr(a,l,d,B){a[l+0]&&Tt(a,l+0,d,B),a[l+16]&&Tt(a,l+16,d,B+4),a[l+32]&&Tt(a,l+32,d,B+128),a[l+48]&&Tt(a,l+48,d,B+128+4)}function co(a,l,d,B){var m,C=i(16);for(m=0;4>m;++m){var U=a[l+0+m]+a[l+12+m],x=a[l+4+m]+a[l+8+m],E=a[l+4+m]-a[l+8+m],D=a[l+0+m]-a[l+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 Yi(a,l,d){var B,m=l-32,C=sr,U=255-a[m-1];for(B=0;B<d;++B){var x,E=C,D=U+a[l-1];for(x=0;x<d;++x)a[l+x]=E[D+a[m+x]];l+=32}}function Zi(a,l){Yi(a,l,4)}function Wa(a,l){Yi(a,l,8)}function sl(a,l){Yi(a,l,16)}function ol(a,l){var d;for(d=0;16>d;++d)r(a,l+32*d,a,l-32,16)}function cl(a,l){var d;for(d=16;0<d;--d)n(a,l,a[l-1],16),l+=32}function Sn(a,l,d){var B;for(B=0;16>B;++B)n(l,d+32*B,a,16)}function lo(a,l){var d,B=16;for(d=0;16>d;++d)B+=a[l-1+32*d]+a[l+d-32];Sn(B>>5,a,l)}function Hn(a,l){var d,B=8;for(d=0;16>d;++d)B+=a[l-1+32*d];Sn(B>>4,a,l)}function ll(a,l){var d,B=8;for(d=0;16>d;++d)B+=a[l+d-32];Sn(B>>4,a,l)}function hi(a,l){Sn(128,a,l)}function ee(a,l,d){return a+2*l+d+2>>2}function ul(a,l){var d,B=l-32;for(B=new Uint8Array([ee(a[B-1],a[B+0],a[B+1]),ee(a[B+0],a[B+1],a[B+2]),ee(a[B+1],a[B+2],a[B+3]),ee(a[B+2],a[B+3],a[B+4])]),d=0;4>d;++d)r(a,l+32*d,B,0,B.length)}function fl(a,l){var d=a[l-1],B=a[l-1+32],m=a[l-1+64],C=a[l-1+96];CA(a,l+0,16843009*ee(a[l-1-32],d,B)),CA(a,l+32,16843009*ee(d,B,m)),CA(a,l+64,16843009*ee(B,m,C)),CA(a,l+96,16843009*ee(m,C,C))}function hl(a,l){var d,B=4;for(d=0;4>d;++d)B+=a[l+d-32]+a[l-1+32*d];for(B>>=3,d=0;4>d;++d)n(a,l+32*d,B,4)}function dl(a,l){var d=a[l-1+0],B=a[l-1+32],m=a[l-1+64],C=a[l-1-32],U=a[l+0-32],x=a[l+1-32],E=a[l+2-32],D=a[l+3-32];a[l+0+96]=ee(B,m,a[l-1+96]),a[l+1+96]=a[l+0+64]=ee(d,B,m),a[l+2+96]=a[l+1+64]=a[l+0+32]=ee(C,d,B),a[l+3+96]=a[l+2+64]=a[l+1+32]=a[l+0+0]=ee(U,C,d),a[l+3+64]=a[l+2+32]=a[l+1+0]=ee(x,U,C),a[l+3+32]=a[l+2+0]=ee(E,x,U),a[l+3+0]=ee(D,E,x)}function gl(a,l){var d=a[l+1-32],B=a[l+2-32],m=a[l+3-32],C=a[l+4-32],U=a[l+5-32],x=a[l+6-32],E=a[l+7-32];a[l+0+0]=ee(a[l+0-32],d,B),a[l+1+0]=a[l+0+32]=ee(d,B,m),a[l+2+0]=a[l+1+32]=a[l+0+64]=ee(B,m,C),a[l+3+0]=a[l+2+32]=a[l+1+64]=a[l+0+96]=ee(m,C,U),a[l+3+32]=a[l+2+64]=a[l+1+96]=ee(C,U,x),a[l+3+64]=a[l+2+96]=ee(U,x,E),a[l+3+96]=ee(x,E,E)}function hn(a,l){var d=a[l-1+0],B=a[l-1+32],m=a[l-1+64],C=a[l-1-32],U=a[l+0-32],x=a[l+1-32],E=a[l+2-32],D=a[l+3-32];a[l+0+0]=a[l+1+64]=C+U+1>>1,a[l+1+0]=a[l+2+64]=U+x+1>>1,a[l+2+0]=a[l+3+64]=x+E+1>>1,a[l+3+0]=E+D+1>>1,a[l+0+96]=ee(m,B,d),a[l+0+64]=ee(B,d,C),a[l+0+32]=a[l+1+96]=ee(d,C,U),a[l+1+32]=a[l+2+96]=ee(C,U,x),a[l+2+32]=a[l+3+96]=ee(U,x,E),a[l+3+32]=ee(x,E,D)}function dn(a,l){var d=a[l+0-32],B=a[l+1-32],m=a[l+2-32],C=a[l+3-32],U=a[l+4-32],x=a[l+5-32],E=a[l+6-32],D=a[l+7-32];a[l+0+0]=d+B+1>>1,a[l+1+0]=a[l+0+64]=B+m+1>>1,a[l+2+0]=a[l+1+64]=m+C+1>>1,a[l+3+0]=a[l+2+64]=C+U+1>>1,a[l+0+32]=ee(d,B,m),a[l+1+32]=a[l+0+96]=ee(B,m,C),a[l+2+32]=a[l+1+96]=ee(m,C,U),a[l+3+32]=a[l+2+96]=ee(C,U,x),a[l+3+64]=ee(U,x,E),a[l+3+96]=ee(x,E,D)}function Bl(a,l){var d=a[l-1+0],B=a[l-1+32],m=a[l-1+64],C=a[l-1+96];a[l+0+0]=d+B+1>>1,a[l+2+0]=a[l+0+32]=B+m+1>>1,a[l+2+32]=a[l+0+64]=m+C+1>>1,a[l+1+0]=ee(d,B,m),a[l+3+0]=a[l+1+32]=ee(B,m,C),a[l+3+32]=a[l+1+64]=ee(m,C,C),a[l+3+64]=a[l+2+64]=a[l+0+96]=a[l+1+96]=a[l+2+96]=a[l+3+96]=C}function pl(a,l){var d=a[l-1+0],B=a[l-1+32],m=a[l-1+64],C=a[l-1+96],U=a[l-1-32],x=a[l+0-32],E=a[l+1-32],D=a[l+2-32];a[l+0+0]=a[l+2+32]=d+U+1>>1,a[l+0+32]=a[l+2+64]=B+d+1>>1,a[l+0+64]=a[l+2+96]=m+B+1>>1,a[l+0+96]=C+m+1>>1,a[l+3+0]=ee(x,E,D),a[l+2+0]=ee(U,x,E),a[l+1+0]=a[l+3+32]=ee(d,U,x),a[l+1+32]=a[l+3+64]=ee(B,d,U),a[l+1+64]=a[l+3+96]=ee(m,B,d),a[l+1+96]=ee(C,m,B)}function $i(a,l){var d;for(d=0;8>d;++d)r(a,l+32*d,a,l-32,8)}function za(a,l){var d;for(d=0;8>d;++d)n(a,l,a[l-1],8),l+=32}function Jr(a,l,d){var B;for(B=0;8>B;++B)n(l,d+32*B,a,8)}function wl(a,l){var d,B=8;for(d=0;8>d;++d)B+=a[l+d-32]+a[l-1+32*d];Jr(B>>4,a,l)}function Aa(a,l){var d,B=4;for(d=0;8>d;++d)B+=a[l+d-32];Jr(B>>3,a,l)}function vl(a,l){var d,B=4;for(d=0;8>d;++d)B+=a[l-1+32*d];Jr(B>>3,a,l)}function Xa(a,l){Jr(128,a,l)}function Nn(a,l,d){var B=a[l-d],m=a[l+0],C=3*(m-B)+Cl[1020+a[l-2*d]-a[l+d]],U=mo[112+(C+4>>3)];a[l-d]=sr[255+B+mo[112+(C+3>>3)]],a[l+0]=sr[255+m-U]}function Ja(a,l,d,B){var m=a[l+0],C=a[l+d];return Fr[255+a[l-2*d]-a[l-d]]>B||Fr[255+C-m]>B}function di(a,l,d,B){return 4*Fr[255+a[l-d]-a[l+0]]+Fr[255+a[l-2*d]-a[l+d]]<=B}function Ya(a,l,d,B,m){var C=a[l-3*d],U=a[l-2*d],x=a[l-d],E=a[l+0],D=a[l+d],z=a[l+2*d],aA=a[l+3*d];return 4*Fr[255+x-E]+Fr[255+U-D]>B?0:Fr[255+a[l-4*d]-C]<=m&&Fr[255+C-U]<=m&&Fr[255+U-x]<=m&&Fr[255+aA-z]<=m&&Fr[255+z-D]<=m&&Fr[255+D-E]<=m}function ea(a,l,d,B){var m=2*B+1;for(B=0;16>B;++B)di(a,l+B,d,m)&&Nn(a,l+B,d)}function Za(a,l,d,B){var m=2*B+1;for(B=0;16>B;++B)di(a,l+B*d,1,m)&&Nn(a,l+B*d,1)}function ta(a,l,d,B){var m;for(m=3;0<m;--m)ea(a,l+=4*d,d,B)}function uo(a,l,d,B){var m;for(m=3;0<m;--m)Za(a,l+=4,d,B)}function gn(a,l,d,B,m,C,U,x){for(C=2*C+1;0<m--;){if(Ya(a,l,d,C,U))if(Ja(a,l,d,x))Nn(a,l,d);else{var E=a,D=l,z=d,aA=E[D-2*z],k=E[D-z],Y=E[D+0],eA=E[D+z],gA=E[D+2*z],iA=27*(pA=Cl[1020+3*(Y-k)+Cl[1020+aA-eA]])+63>>7,BA=18*pA+63>>7,pA=9*pA+63>>7;E[D-3*z]=sr[255+E[D-3*z]+pA],E[D-2*z]=sr[255+aA+BA],E[D-z]=sr[255+k+iA],E[D+0]=sr[255+Y-iA],E[D+z]=sr[255+eA-BA],E[D+2*z]=sr[255+gA-pA]}l+=B}}function Bn(a,l,d,B,m,C,U,x){for(C=2*C+1;0<m--;){if(Ya(a,l,d,C,U))if(Ja(a,l,d,x))Nn(a,l,d);else{var E=a,D=l,z=d,aA=E[D-z],k=E[D+0],Y=E[D+z],eA=mo[112+(4+(gA=3*(k-aA))>>3)],gA=mo[112+(gA+3>>3)],iA=eA+1>>1;E[D-2*z]=sr[255+E[D-2*z]+iA],E[D-z]=sr[255+aA+gA],E[D+0]=sr[255+k-eA],E[D+z]=sr[255+Y-iA]}l+=B}}function fo(a,l,d,B,m,C){gn(a,l,d,1,16,B,m,C)}function ho(a,l,d,B,m,C){gn(a,l,1,d,16,B,m,C)}function go(a,l,d,B,m,C){var U;for(U=3;0<U;--U)Bn(a,l+=4*d,d,1,16,B,m,C)}function gi(a,l,d,B,m,C){var U;for(U=3;0<U;--U)Bn(a,l+=4,1,d,16,B,m,C)}function Bo(a,l,d,B,m,C,U,x){gn(a,l,m,1,8,C,U,x),gn(d,B,m,1,8,C,U,x)}function h(a,l,d,B,m,C,U,x){gn(a,l,1,m,8,C,U,x),gn(d,B,1,m,8,C,U,x)}function v(a,l,d,B,m,C,U,x){Bn(a,l+4*m,m,1,8,C,U,x),Bn(d,B+4*m,m,1,8,C,U,x)}function N(a,l,d,B,m,C,U,x){Bn(a,l+4,1,m,8,C,U,x),Bn(d,B+4,1,m,8,C,U,x)}function V(){this.ba=new se,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new $A,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 dA(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function vA(){this.ua=0,this.Wa=new xA,this.vb=new xA,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new sA,this.yc=new P}function RA(){this.xb=this.a=0,this.l=new zi,this.ca=new se,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,dA),this.Oc=0}function OA(){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,l,d,B,m,C,U){for(a=a==null?0:a[l+0],l=0;l<U;++l)m[C+l]=a+d[B+l]&255,a=m[C+l]}function le(a,l,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[l+x]+d[B+x]&255}function be(a,l,d,B,m,C,U){if(a==null)ae(null,null,d,B,m,C,U);else{var x,E=a[l+0],D=E,z=E;for(x=0;x<U;++x)D=z+(E=a[l+x])-D,z=d[B+x]+(-256&D?0>D?0:255:D)&255,D=E,m[C+x]=z}}function ht(a,l,d,B){var m=l.width,C=l.o;if(e(a!=null&&l!=null),0>d||0>=B||d+B>C)return null;if(!a.Cc){if(a.ga==null){var U;if(a.ga=new OA,(U=a.ga==null)||(U=l.width*l.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,z=a.mb,aA=a.nb,k=E+1,Y=D-1,eA=U.l;if(e(x!=null&&z!=null&&l!=null),Rn[0]=null,Rn[1]=ae,Rn[2]=le,Rn[3]=be,U.ca=z,U.tb=aA,U.c=l.width,U.i=l.height,e(0<U.c&&0<U.i),1>=D)l=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)l=0;else if(eA.put=ZA,eA.ac=Ct,eA.bc=Zt,eA.ma=U,eA.width=l.width,eA.height=l.height,eA.Da=l.Da,eA.v=l.v,eA.va=l.va,eA.j=l.j,eA.o=l.o,U.$a)A:{e(U.$a==1),l=ui();e:for(;;){if(l==null){l=0;break A}if(e(U!=null),U.mc=l,l.c=U.c,l.i=U.i,l.l=U.l,l.l.ma=U,l.l.width=U.c,l.l.height=U.i,l.a=0,hA(l.m,x,k,Y),!qr(U.c,U.i,1,l,null)||(l.ab==1&&l.gc[0].hc==3&&Ir(l.s)?(U.ic=1,x=l.c*l.i,l.Ta=null,l.Ua=0,l.V=i(x),l.Ba=0,l.V==null?(l.a=1,l=0):l=1):(U.ic=0,l=fi(l,U.c)),!l))break e;l=1;break A}U.mc=null,l=0}else l=Y>=U.c*U.i;U=!l}if(U)return null;a.ga.Lc!=1?a.Ga=0:B=C-d}e(a.ga!=null),e(d+B<=C);A:{if(l=(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*l,D=a.mb,z=a.nb+d*l,e(E<=a.P+a.qc),x.Z!=0)for(e(Rn[x.Z]!=null),U=0;U<B;++U)Rn[x.Z](k,Y,eA,E,D,z,l),k=D,Y=z,z+=l,E+=l;else for(U=0;U<B;++U)r(D,z,eA,E,l),k=D,Y=z,z+=l,E+=l;a.rc=k,a.Vc=Y}else{if(e(x.mc!=null),l=d+B,e((U=x.mc)!=null),e(l<=U.i),U.C>=l)l=1;else if(x.ic||Ye(),x.ic){x=U.V,k=U.Ba,Y=U.c;var gA=U.i,iA=(eA=1,E=U.$/Y,D=U.$%Y,z=U.m,aA=U.s,U.$),BA=Y*gA,pA=Y*l,QA=aA.wc,mA=iA<pA?_t(aA,D,E):null;e(iA<=BA),e(l<=gA),e(Ir(aA));e:for(;;){for(;!z.h&&iA<pA;){if(D&QA||(mA=_t(aA,D,E)),e(mA!=null),tA(z),256>(gA=At(mA.G[0],mA.H[0],z)))x[k+iA]=gA,++iA,++D>=Y&&(D=0,++E<=l&&!(E%16)&&Sr(U,E));else{if(!(280>gA)){eA=0;break e}gA=$t(gA-256,z);var XA,kA=At(mA.G[4],mA.H[4],z);if(tA(z),!(iA>=(kA=vr(Y,kA=$t(kA,z)))&&BA-iA>=gA)){eA=0;break e}for(XA=0;XA<gA;++XA)x[k+iA+XA]=x[k+iA+XA-kA];for(iA+=gA,D+=gA;D>=Y;)D-=Y,++E<=l&&!(E%16)&&Sr(U,E);iA<pA&&D&QA&&(mA=_t(aA,D,E))}e(z.h==W(z))}Sr(U,E>l?l:E);break e}!eA||z.h&&iA<BA?(eA=0,U.a=z.h?5:3):U.$=iA,l=eA}else l=Hr(U,U.V,U.Ba,U.c,U.i,l,Vi);if(!l){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 De(a,l,d,B,m,C){for(;0<m--;){var U,x=a,E=l+(d?1:0),D=a,z=l+(d?0:3);for(U=0;U<B;++U){var aA=D[z+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)}l+=C}}function He(a,l,d,B,m){for(;0<B--;){var C;for(C=0;C<d;++C){var U=a[l+2*C+0],x=15&(D=a[l+2*C+1]),E=4369*x,D=(240&D|D>>4)*E>>16;a[l+2*C+0]=(240&U|U>>4)*E>>16&240|(15&U|U<<4)*E>>16>>4&15,a[l+2*C+1]=240&D|x}l+=m}}function Ge(a,l,d,B,m,C,U,x){var E,D,z=255;for(D=0;D<m;++D){for(E=0;E<B;++E){var aA=a[l+E];C[U+4*E]=aA,z&=aA}l+=d,U+=x}return z!=255}function Je(a,l,d,B,m){var C;for(C=0;C<m;++C)d[B+C]=a[l+C]>>8}function Ye(){as=De,Vf=He,qf=Ge,Wf=Je}function Dt(a,l,d){H[a]=function(B,m,C,U,x,E,D,z,aA,k,Y,eA,gA,iA,BA,pA,QA){var mA,XA=QA-1>>1,kA=x[E+0]|D[z+0]<<16,fe=aA[k+0]|Y[eA+0]<<16;e(B!=null);var VA=3*kA+fe+131074>>2;for(l(B[m+0],255&VA,VA>>16,gA,iA),C!=null&&(VA=3*fe+kA+131074>>2,l(C[U+0],255&VA,VA>>16,BA,pA)),mA=1;mA<=XA;++mA){var ve=x[E+mA]|D[z+mA]<<16,pt=aA[k+mA]|Y[eA+mA]<<16,he=kA+ve+fe+pt+524296,qA=he+2*(ve+fe)>>3;VA=qA+kA>>1,kA=(he=he+2*(kA+pt)>>3)+ve>>1,l(B[m+2*mA-1],255&VA,VA>>16,gA,iA+(2*mA-1)*d),l(B[m+2*mA-0],255&kA,kA>>16,gA,iA+(2*mA-0)*d),C!=null&&(VA=he+fe>>1,kA=qA+pt>>1,l(C[U+2*mA-1],255&VA,VA>>16,BA,pA+(2*mA-1)*d),l(C[U+2*mA+0],255&kA,kA>>16,BA,pA+(2*mA+0)*d)),kA=ve,fe=pt}1&QA||(VA=3*kA+fe+131074>>2,l(B[m+QA-1],255&VA,VA>>16,gA,iA+(QA-1)*d),C!=null&&(VA=3*fe+kA+131074>>2,l(C[U+QA-1],255&VA,VA>>16,BA,pA+(QA-1)*d)))}}function pn(){Qr[Co]=vB,Qr[bo]=nh,Qr[$f]=mB,Qr[Fo]=ih,Qr[Qo]=ah,Qr[bl]=sh,Qr[Ah]=CB,Qr[Fl]=nh,Qr[Ql]=ih,Qr[yo]=ah,Qr[yl]=sh}function $a(a){return a&~bB?0>a?0:255:a>>oh}function Bi(a,l){return $a((19077*a>>8)+(26149*l>>8)-14234)}function pi(a,l,d){return $a((19077*a>>8)-(6419*l>>8)-(13320*d>>8)+8708)}function Dn(a,l){return $a((19077*a>>8)+(33050*l>>8)-17685)}function wi(a,l,d,B,m){B[m+0]=Bi(a,d),B[m+1]=pi(a,l,d),B[m+2]=Dn(a,l)}function ra(a,l,d,B,m){B[m+0]=Dn(a,l),B[m+1]=pi(a,l,d),B[m+2]=Bi(a,d)}function na(a,l,d,B,m){var C=pi(a,l,d);l=C<<3&224|Dn(a,l)>>3,B[m+0]=248&Bi(a,d)|C>>5,B[m+1]=l}function kt(a,l,d,B,m){var C=240&Dn(a,l)|15;B[m+0]=240&Bi(a,d)|pi(a,l,d)>>4,B[m+1]=C}function vi(a,l,d,B,m){B[m+0]=255,wi(a,l,d,B,m+1)}function mi(a,l,d,B,m){ra(a,l,d,B,m),B[m+3]=255}function As(a,l,d,B,m){wi(a,l,d,B,m),B[m+3]=255}function Yr(a,l,d){H[a]=function(B,m,C,U,x,E,D,z,aA){for(var k=z+(-2&aA)*d;z!=k;)l(B[m+0],C[U+0],x[E+0],D,z),l(B[m+1],C[U+0],x[E+0],D,z+d),m+=2,++U,++E,z+=2*d;1&aA&&l(B[m+0],C[U+0],x[E+0],D,z)}}function Vt(a,l,d){return d==0?a==0?l==0?6:5:l==0?4:0:d}function po(a,l,d,B,m){switch(a>>>30){case 3:wn(l,d,B,m,0);break;case 2:Mn(l,d,B,m);break;case 1:Tt(l,d,B,m)}}function ia(a,l){var d,B,m=l.M,C=l.Nb,U=a.oc,x=a.pc+40,E=a.oc,D=a.pc+584,z=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,z[aA+32*d-1]=129;for(0<m?U[x-1-32]=E[D-1-32]=z[aA-1-32]=129:(n(U,x-32-1,127,21),n(E,D-32-1,127,9),n(z,aA-32-1,127,9)),B=0;B<a.za;++B){var k=l.ya[l.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(z,aA+32*d-4,z,aA+32*d+4,4)}var Y=a.Gd,eA=a.Hd+B,gA=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(z,aA-32,Y[eA].ea,0,8)),k.Za){var BA=U,pA=x-32+16;for(0<m&&(B>=a.za-1?n(BA,pA,Y[eA].y[15],4):r(BA,pA,Y[eA+1].y,0,4)),d=0;4>d;d++)BA[pA+128+d]=BA[pA+256+d]=BA[pA+384+d]=BA[pA+0+d];for(d=0;16>d;++d,iA<<=2)BA=U,pA=x+lh[d],Dr[k.Ob[d]](BA,pA),po(iA,gA,16*+d,BA,pA)}else if(BA=Vt(B,m,k.Ob[0]),Pn[BA](U,x),iA!=0)for(d=0;16>d;++d,iA<<=2)po(iA,gA,16*+d,U,x+lh[d]);for(d=k.Gc,BA=Vt(B,m,k.Dd),mn[BA](E,D),mn[BA](z,aA),iA=gA,BA=E,pA=D,255&(k=0|d)&&(170&k?la(iA,256,BA,pA):$r(iA,256,BA,pA)),k=z,iA=aA,255&(d>>=8)&&(170&d?la(gA,320,k,iA):$r(gA,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,z,aA+224,8)),d=8*C*a.B,Y=a.sa,eA=a.ta+16*B+16*C*a.R,gA=a.qa,k=a.ra+8*B+d,iA=a.Ha,BA=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(gA,k+d*a.B,E,D+32*d,8),r(iA,BA+d*a.B,z,aA+32*d,8)}}function wo(a,l,d,B,m,C,U,x,E){var D=[0],z=[0],aA=0,k=E!=null?E.kd:0,Y=E??new $;if(a==null||12>d)return 7;Y.data=a,Y.w=l,Y.ha=d,l=[l],d=[d],Y.gb=[Y.gb];A:{var eA=l,gA=d,iA=Y.gb;if(e(a!=null),e(gA!=null),e(iA!=null),iA[0]=0,12<=gA[0]&&!t(a,eA[0],"RIFF")){if(t(a,eA[0]+8,"WEBP")){iA=3;break A}var BA=NA(a,eA[0]+4);if(12>BA||4294967286<BA){iA=3;break A}if(k&&BA>gA[0]-8){iA=7;break A}iA[0]=BA,eA[0]+=12,gA[0]-=12}iA=0}if(iA!=0)return iA;for(BA=0<Y.gb[0],d=d[0];;){A:{var pA=a;gA=l,iA=d;var QA=D,mA=z,XA=eA=[0];if((VA=aA=[aA])[0]=0,8>iA[0])iA=7;else{if(!t(pA,gA[0],"VP8X")){if(NA(pA,gA[0]+4)!=10){iA=3;break A}if(18>iA[0]){iA=7;break A}var kA=NA(pA,gA[0]+8),fe=1+UA(pA,gA[0]+12);if(2147483648<=fe*(pA=1+UA(pA,gA[0]+15))){iA=3;break A}XA!=null&&(XA[0]=kA),QA!=null&&(QA[0]=fe),mA!=null&&(mA[0]=pA),gA[0]+=18,iA[0]-=18,VA[0]=1}iA=0}}if(aA=aA[0],eA=eA[0],iA!=0)return iA;if(gA=!!(2&eA),!BA&&aA)return 3;if(C!=null&&(C[0]=!!(16&eA)),U!=null&&(U[0]=gA),x!=null&&(x[0]=0),U=D[0],eA=z[0],aA&&gA&&E==null){iA=0;break}if(4>d){iA=7;break}if(BA&&aA||!BA&&!aA&&!t(a,l[0],"ALPH")){d=[d],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];A:{kA=a,iA=l,BA=d;var VA=Y.gb;QA=Y.na,mA=Y.P,XA=Y.Sa,fe=22,e(kA!=null),e(BA!=null),pA=iA[0];var ve=BA[0];for(e(QA!=null),e(XA!=null),QA[0]=null,mA[0]=null,XA[0]=0;;){if(iA[0]=pA,BA[0]=ve,8>ve){iA=7;break A}var pt=NA(kA,pA+4);if(4294967286<pt){iA=3;break A}var he=8+pt+1&-2;if(fe+=he,0<VA&&fe>VA){iA=3;break A}if(!t(kA,pA,"VP8 ")||!t(kA,pA,"VP8L")){iA=0;break A}if(ve[0]<he){iA=7;break A}t(kA,pA,"ALPH")||(QA[0]=kA,mA[0]=pA+8,XA[0]=pt),pA+=he,ve-=he}}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(VA=a,iA=l,BA=d,QA=Y.gb[0],mA=Y.Ja,XA=Y.xa,kA=iA[0],pA=!t(VA,kA,"VP8 "),fe=!t(VA,kA,"VP8L"),e(VA!=null),e(BA!=null),e(mA!=null),e(XA!=null),8>BA[0])iA=7;else{if(pA||fe){if(VA=NA(VA,kA+4),12<=QA&&VA>QA-12){iA=3;break A}if(k&&VA>BA[0]-8){iA=7;break A}mA[0]=VA,iA[0]+=8,BA[0]-=8,XA[0]=fe}else XA[0]=5<=BA[0]&&VA[kA+0]==47&&!(VA[kA+4]>>5),mA[0]=BA[0];iA=0}if(d=d[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],l=l[0],iA!=0)break;if(4294967286<Y.Ja)return 3;if(x==null||gA||(x[0]=Y.xa?2:1),U=[U],eA=[eA],Y.xa){if(5>d){iA=7;break}x=U,k=eA,gA=C,a==null||5>d?a=0:5<=d&&a[l+0]==47&&!(a[l+4]>>5)?(BA=[0],VA=[0],QA=[0],hA(mA=new T,a,l,d),wr(mA,BA,VA,QA)?(x!=null&&(x[0]=BA[0]),k!=null&&(k[0]=VA[0]),gA!=null&&(gA[0]=QA[0]),a=1):a=0):a=0}else{if(10>d){iA=7;break}x=eA,a==null||10>d||!so(a,l+3,d-3)?a=0:(k=a[l+0]|a[l+1]<<8|a[l+2]<<16,gA=16383&(a[l+7]<<8|a[l+6]),a=16383&(a[l+9]<<8|a[l+8]),1&k||3<(k>>1&7)||!(k>>4&1)||k>>5>=Y.Ja||!gA||!a?a=0:(U&&(U[0]=gA),x&&(x[0]=a),a=1))}if(!a||(U=U[0],eA=eA[0],aA&&(D[0]!=U||z[0]!=eA)))return 3;E!=null&&(E[0]=Y,E.offset=l-E.w,e(4294967286>l-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 br(a,l,d){var B=l.width,m=l.height,C=0,U=0,x=B,E=m;if(l.Da=a!=null&&0<a.Da,l.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(l.v=C,l.j=U,l.va=C+x,l.o=U+E,l.U=x,l.T=E,l.da=a!=null&&0<a.da,l.da){if(!KA(x,E,d=[a.ib],C=[a.hb]))return 0;l.ib=d[0],l.hb=C[0]}return l.ob=a!=null&&a.ob,l.Kb=a==null||!a.Sd,l.da&&(l.ob=l.ib<3*B/4&&l.hb<3*m/4,l.Kb=0),1}function Ci(a){if(a==null)return 2;if(11>a.S){var l=a.f.RGBA;l.fb+=(a.height-1)*l.A,l.A=-l.A}else l=a.f.kb,a=a.height,l.O+=(a-1)*l.fa,l.fa=-l.fa,l.N+=(a-1>>1)*l.Ab,l.Ab=-l.Ab,l.W+=(a-1>>1)*l.Db,l.Db=-l.Db,l.F!=null&&(l.J+=(a-1)*l.lb,l.lb=-l.lb);return 0}function es(a,l,d,B){if(B==null||0>=a||0>=l)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>l)return 2;a=m,l=C}if(d.da){if(!KA(a,l,m=[d.ib],C=[d.hb]))return 2;a=m[0],l=C[0]}}B.width=a,B.height=l;A:{var E=B.width,D=B.height;if(a=B.S,0>=E||0>=D||!(a>=Co&&13>a))a=2;else{if(0>=B.Rd&&B.sd==null){U=C=m=l=0;var z=(x=E*uh[a])*D;if(11>a||(C=(D+1)/2*(l=(E+1)/2),a==12&&(U=(m=E)*D)),(D=i(z+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=z):((E=B.f.kb).y=D,E.O=0,E.fa=x,E.Fd=z,E.f=D,E.N=0+z,E.Ab=l,E.Cd=C,E.ea=D,E.W=0+z+C,E.Db=l,E.Ed=C,a==12&&(E.F=D,E.J=0+z+2*C),E.Tc=U,E.lb=m)}if(l=1,m=B.S,C=B.width,U=B.height,m>=Co&&13>m)if(11>m)a=B.f.RGBA,l&=(x=Math.abs(a.A))*(U-1)+C<=a.size,l&=x>=C*uh[m],l&=a.eb!=null;else{a=B.f.kb,x=(C+1)/2,z=(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;l&=E*(U-1)+C<=a.Fd,l&=D*(z-1)+x<=a.Cd,l=(l&=aA*(z-1)+x<=a.Ed)&E>=C&D>=x&aA>=x,l&=a.y!=null,l&=a.f!=null,l&=a.ea!=null,m==12&&(l&=k>=C,l&=Y<=a.Tc,l&=a.F!=null)}else l=0;a=l?0:2}}return a!=0||d!=null&&d.fd&&(a=Ci(B)),a}var aa=64,bi=[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],ts=24,qt=32,Ar=8,sa=[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];LA("Predictor0","PredictorAdd0"),H.Predictor0=function(){return 4278190080},H.Predictor1=function(a){return a},H.Predictor2=function(a,l,d){return l[d+0]},H.Predictor3=function(a,l,d){return l[d+1]},H.Predictor4=function(a,l,d){return l[d-1]},H.Predictor5=function(a,l,d){return JA(JA(a,l[d+1]),l[d+0])},H.Predictor6=function(a,l,d){return JA(a,l[d-1])},H.Predictor7=function(a,l,d){return JA(a,l[d+0])},H.Predictor8=function(a,l,d){return JA(l[d-1],l[d+0])},H.Predictor9=function(a,l,d){return JA(l[d+0],l[d+1])},H.Predictor10=function(a,l,d){return JA(JA(a,l[d-1]),JA(l[d+0],l[d+1]))},H.Predictor11=function(a,l,d){var B=l[d+0];return 0>=re(B>>24&255,a>>24&255,(l=l[d-1])>>24&255)+re(B>>16&255,a>>16&255,l>>16&255)+re(B>>8&255,a>>8&255,l>>8&255)+re(255&B,255&a,255&l)?B:a},H.Predictor12=function(a,l,d){var B=l[d+0];return(Qe((a>>24&255)+(B>>24&255)-((l=l[d-1])>>24&255))<<24|Qe((a>>16&255)+(B>>16&255)-(l>>16&255))<<16|Qe((a>>8&255)+(B>>8&255)-(l>>8&255))<<8|Qe((255&a)+(255&B)-(255&l)))>>>0},H.Predictor13=function(a,l,d){var B=l[d-1];return(ie((a=JA(a,l[d+0]))>>24&255,B>>24&255)<<24|ie(a>>16&255,B>>16&255)<<16|ie(a>>8&255,B>>8&255)<<8|ie(255&a,255&B))>>>0};var kn=H.PredictorAdd0;H.PredictorAdd1=Be,LA("Predictor2","PredictorAdd2"),LA("Predictor3","PredictorAdd3"),LA("Predictor4","PredictorAdd4"),LA("Predictor5","PredictorAdd5"),LA("Predictor6","PredictorAdd6"),LA("Predictor7","PredictorAdd7"),LA("Predictor8","PredictorAdd8"),LA("Predictor9","PredictorAdd9"),LA("Predictor10","PredictorAdd10"),LA("Predictor11","PredictorAdd11"),LA("Predictor12","PredictorAdd12"),LA("Predictor13","PredictorAdd13");var Tn=H.PredictorAdd2;WA("ColorIndexInverseTransform","MapARGB","32b",function(a){return a>>8&255},function(a){return a}),WA("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(a){return a},function(a){return a>>8&255});var oa,Fi=H.ColorIndexInverseTransform,dt=H.MapARGB,ml=H.VP8LColorIndexInverseTransformAlpha,Zr=H.MapAlpha,Nr=H.VP8LPredictorsAdd=[];Nr.length=16,(H.VP8LPredictors=[]).length=16,(H.VP8LPredictorsAdd_C=[]).length=16,(H.VP8LPredictors_C=[]).length=16;var Qi,rs,ns,ca,yi,Ui,On,wn,Mn,la,Tt,$r,Me,Pe,nt,Bt,vn,is,ua,vo,Rf,Kf,jf,Gf,as,Vf,qf,Wf,zf=i(511),Xf=i(2041),Jf=i(225),Yf=i(767),Zf=0,Cl=Xf,mo=Jf,sr=Yf,Fr=zf,Co=0,bo=1,$f=2,Fo=3,Qo=4,bl=5,Ah=6,Fl=7,Ql=8,yo=9,yl=10,iB=[2,3,7],aB=[3,3,11],eh=[280,256,256,256,40],sB=[0,1,1,1,0],oB=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],cB=[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],lB=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],uB=8,Ul=[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],_l=[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],ss=null,fB=[[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]],hB=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],th=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],dB=[[[[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]]]],gB=[[[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]]],BB=[[[[255,255,255,255,255,255,255,255,255,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]]]],pB=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Pn=[],Dr=[],mn=[],wB=1,rh=2,Rn=[],Qr=[];Dt("UpsampleRgbLinePair",wi,3),Dt("UpsampleBgrLinePair",ra,3),Dt("UpsampleRgbaLinePair",As,4),Dt("UpsampleBgraLinePair",mi,4),Dt("UpsampleArgbLinePair",vi,4),Dt("UpsampleRgba4444LinePair",kt,2),Dt("UpsampleRgb565LinePair",na,2);var vB=H.UpsampleRgbLinePair,mB=H.UpsampleBgrLinePair,nh=H.UpsampleRgbaLinePair,ih=H.UpsampleBgraLinePair,ah=H.UpsampleArgbLinePair,sh=H.UpsampleRgba4444LinePair,CB=H.UpsampleRgb565LinePair,Uo=16,_o=1<<Uo-1,os=-227,xl=482,oh=6,bB=(256<<oh)-1,ch=0,FB=i(256),QB=i(256),yB=i(256),UB=i(256),_B=i(xl-os),xB=i(xl-os);Yr("YuvToRgbRow",wi,3),Yr("YuvToBgrRow",ra,3),Yr("YuvToRgbaRow",As,4),Yr("YuvToBgraRow",mi,4),Yr("YuvToArgbRow",vi,4),Yr("YuvToRgba4444Row",kt,2),Yr("YuvToRgb565Row",na,2);var lh=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],xo=[0,2,8],EB=[8,7,6,4,4,2,2,2,1,1,1,1],LB=1;this.WebPDecodeRGBA=function(a,l,d,B,m){var C=bo,U=new V,x=new se;U.ba=x,x.S=C,x.width=[x.width],x.height=[x.height];var E=x.width,D=x.height,z=new DA;if(z==null||a==null)var aA=2;else e(z!=null),aA=wo(a,l,d,z.width,z.height,z.Pd,z.Qd,z.format,null);if(aA!=0?E=0:(E!=null&&(E[0]=z.width[0]),D!=null&&(D[0]=z.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=l,m.ha=d,m.kd=1,l=[0],e(m!=null),((a=wo(m.data,m.w,m.ha,null,null,null,l,null,m))==0||a==7)&&l[0]&&(a=4),(l=a)==0){if(e(U!=null),B.data=m.data,B.w=m.w+m.offset,B.ha=m.ha-m.offset,B.put=ZA,B.ac=Ct,B.bc=Zt,B.ma=U,m.xa){if((a=ui())==null){U=1;break A}if(function(k,Y){var eA=[0],gA=[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,hA(k.m,Y.data,Y.w,Y.ha),!wr(k.m,eA,gA,iA)){k.a=3;break e}if(k.xb=rh,Y.width=eA[0],Y.height=gA[0],!qr(eA[0],gA[0],1,k,null))break e;return 1}return e(k.a!=0),0}(a,B)){if(B=(l=es(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),!br(m.Oa,d,Fo)){B.a=2;break t}if(!fi(B,d.width)||d.da)break t;if((d.da||GA(B.ca.S))&&Ye(),11>B.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),B.ca.f.kb.F!=null&&Ye()),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(!Hr(B,B.V,B.Ba,B.c,B.i,d.o,In))break t;m.Dc=B.Ma,B=1;break e}e(B.a!=0),B=0}B=!B}B&&(l=a.a)}else l=a.a}else{if((a=new rl)==null){U=1;break A}if(a.Fa=m.na,a.P=m.P,a.qc=m.Sa,zr(a,B)){if((l=es(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=z=0;4>D;++D)12>(aA=m.pb[D]).lc&&(aA.ia=E*EB[0>aA.lc?0:aA.lc]>>3),z|=aA.ia;z&&(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 ft(k,2,"NULL VP8Io parameter in VP8Decode().");if(!k.cb&&!zr(k,Y))return 0;if(e(k.cb),Y.ac==null||Y.ac(Y)){Y.ob&&(k.L=0);var eA=xo[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 gA=k.ed;for(eA=0;4>eA;++eA){var iA;if(k.Qa.Cb){var BA=k.Qa.Lb[eA];k.Qa.Fb||(BA+=gA.Tb)}else BA=gA.Tb;for(iA=0;1>=iA;++iA){var pA=k.gd[eA][iA],QA=BA;if(gA.Pc&&(QA+=gA.vd[0],iA&&(QA+=gA.od[0])),0<(QA=0>QA?0:63<QA?63:QA)){var mA=QA;0<gA.wb&&(mA=4<gA.wb?mA>>2:mA>>1)>9-gA.wb&&(mA=9-gA.wb),1>mA&&(mA=1),pA.dd=mA,pA.tc=2*QA+mA,pA.ld=40<=QA?2:15<=QA?1:0}else pA.tc=0;pA.La=iA}}}eA=0}else ft(k,6,"Frame setup failed"),eA=k.a;if(eA=eA==0){if(eA){k.$c=0,0<k.Aa||(k.Ic=LB);e:{eA=k.Ic,gA=4*(mA=k.za);var XA=32*mA,kA=mA+1,fe=0<k.L?mA*(0<k.Aa?2:1):0,VA=(k.Aa==2?2:1)*mA;if((pA=gA+832+(iA=3*(16*eA+xo[k.L])/2*XA)+(BA=k.Fa!=null&&0<k.Fa.length?k.Kc.c*k.Kc.i:0))!=pA)eA=0;else{if(pA>k.Vb){if(k.Vb=0,k.Ec=i(pA),k.Fc=0,k.Ec==null){eA=ft(k,1,"no memory during frame initialization.");break e}k.Vb=pA}pA=k.Ec,QA=k.Fc,k.Ac=pA,k.Bc=QA,QA+=gA,k.Gd=o(XA,io),k.Hd=0,k.rb=o(kA+1,Ga),k.sb=1,k.wa=fe?o(fe,Cr):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=pA,k.pc=QA,QA+=832,k.ya=o(VA,Va),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=(XA=xo[k.L])*k.R,XA=XA/2*k.B,k.sa=pA,k.ta=QA+mA,k.qa=k.sa,k.ra=k.ta+16*eA*k.R+XA,k.Ha=k.qa,k.Ia=k.ra+8*eA*k.B+XA,k.$c=0,QA+=iA,k.mb=BA?pA:null,k.nb=BA?QA:null,e(QA+BA<=k.Fc+k.Vb),qa(k),n(k.Ac,k.Bc,0,gA),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,!Zf){for(eA=-255;255>=eA;++eA)zf[255+eA]=0>eA?-eA:eA;for(eA=-1020;1020>=eA;++eA)Xf[1020+eA]=-128>eA?-128:127<eA?127:eA;for(eA=-112;112>=eA;++eA)Jf[112+eA]=-16>eA?-16:15<eA?15:eA;for(eA=-255;510>=eA;++eA)Yf[255+eA]=0>eA?0:255<eA?255:eA;Zf=1}On=co,wn=nl,la=il,Tt=al,$r=Xr,Mn=oo,Me=fo,Pe=ho,nt=Bo,Bt=h,vn=go,is=gi,ua=v,vo=N,Rf=ea,Kf=Za,jf=ta,Gf=uo,Dr[0]=hl,Dr[1]=Zi,Dr[2]=ul,Dr[3]=fl,Dr[4]=dl,Dr[5]=hn,Dr[6]=gl,Dr[7]=dn,Dr[8]=pl,Dr[9]=Bl,Pn[0]=lo,Pn[1]=sl,Pn[2]=ol,Pn[3]=cl,Pn[4]=Hn,Pn[5]=ll,Pn[6]=hi,mn[0]=wl,mn[1]=Wa,mn[2]=$i,mn[3]=za,mn[4]=vl,mn[5]=Aa,mn[6]=Xa,eA=1}else eA=0}eA&&(eA=function(ve,pt){for(ve.M=0;ve.M<ve.Va;++ve.M){var he,qA=ve.Jc[ve.M&ve.Xb],EA=ve.m,it=ve;for(he=0;he<it.za;++he){var ue=EA,Fe=it,Ve=Fe.Ac,Et=Fe.Bc+4*he,Wt=Fe.zc,et=Fe.ya[Fe.aa+he];if(Fe.Qa.Bb?et.$b=oA(ue,Fe.Pa.jb[0])?2+oA(ue,Fe.Pa.jb[2]):oA(ue,Fe.Pa.jb[1]):et.$b=0,Fe.kc&&(et.Ad=oA(ue,Fe.Bd)),et.Za=!oA(ue,145)+0,et.Za){var Ot=et.Ob,zt=0;for(Fe=0;4>Fe;++Fe){var wt,ye=Wt[0+Fe];for(wt=0;4>wt;++wt){ye=gB[Ve[Et+wt]][ye];for(var Le=th[oA(ue,ye[0])];0<Le;)Le=th[2*Le+oA(ue,ye[Le])];ye=-Le,Ve[Et+wt]=ye}r(Ot,zt,Ve,Et,4),zt+=4,Wt[0+Fe]=ye}}else ye=oA(ue,156)?oA(ue,128)?1:3:oA(ue,163)?2:0,et.Ob[0]=ye,n(Ve,Et,ye,4),n(Wt,0,ye,4);et.Dd=oA(ue,142)?oA(ue,114)?oA(ue,183)?1:3:2:0}if(it.m.Ka)return ft(ve,7,"Premature end-of-partition0 encountered.");for(;ve.ja<ve.za;++ve.ja){if(it=qA,ue=(EA=ve).rb[EA.sb-1],Ve=EA.rb[EA.sb+EA.ja],he=EA.ya[EA.aa+EA.ja],Et=EA.kc?he.Ad:0)ue.la=Ve.la=0,he.Za||(ue.Na=Ve.Na=0),he.Hc=0,he.Gc=0,he.ia=0;else{var tt,Ie;if(ue=Ve,Ve=it,Et=EA.Pa.Xc,Wt=EA.ya[EA.aa+EA.ja],et=EA.pb[Wt.$b],Fe=Wt.ad,Ot=0,zt=EA.rb[EA.sb-1],ye=wt=0,n(Fe,Ot,0,384),Wt.Za)var Lt=0,kr=Et[3];else{Le=i(16);var at=ue.Na+zt.Na;if(at=ss(Ve,Et[1],at,et.Eb,0,Le,0),ue.Na=zt.Na=(0<at)+0,1<at)On(Le,0,Fe,Ot);else{var er=Le[0]+3>>3;for(Le=0;256>Le;Le+=16)Fe[Ot+Le]=er}Lt=1,kr=Et[0]}var ke=15&ue.la,vt=15&zt.la;for(Le=0;4>Le;++Le){var or=1&vt;for(er=Ie=0;4>er;++er)ke=ke>>1|(or=(at=ss(Ve,kr,at=or+(1&ke),et.Sc,Lt,Fe,Ot))>Lt)<<7,Ie=Ie<<2|(3<at?3:1<at?2:Fe[Ot+0]!=0),Ot+=16;ke>>=4,vt=vt>>1|or<<7,wt=(wt<<8|Ie)>>>0}for(kr=ke,Lt=vt>>4,tt=0;4>tt;tt+=2){for(Ie=0,ke=ue.la>>4+tt,vt=zt.la>>4+tt,Le=0;2>Le;++Le){for(or=1&vt,er=0;2>er;++er)at=or+(1&ke),ke=ke>>1|(or=0<(at=ss(Ve,Et[2],at,et.Qc,0,Fe,Ot)))<<3,Ie=Ie<<2|(3<at?3:1<at?2:Fe[Ot+0]!=0),Ot+=16;ke>>=2,vt=vt>>1|or<<5}ye|=Ie<<4*tt,kr|=ke<<4<<tt,Lt|=(240&vt)<<tt}ue.la=kr,zt.la=Lt,Wt.Hc=wt,Wt.Gc=ye,Wt.ia=43690&ye?0:et.ia,Et=!(wt|ye)}if(0<EA.L&&(EA.wa[EA.Y+EA.ja]=EA.gd[he.$b][he.Za],EA.wa[EA.Y+EA.ja].La|=!Et),it.Ka)return ft(ve,7,"Premature end-of-file encountered.")}if(qa(ve),EA=pt,it=1,he=(qA=ve).D,ue=0<qA.L&&qA.M>=qA.zb&&qA.M<=qA.Va,qA.Aa==0)e:{if(he.M=qA.M,he.uc=ue,ia(qA,he),it=1,he=(Ie=qA.D).Nb,ue=(ye=xo[qA.L])*qA.R,Ve=ye/2*qA.B,Le=16*he*qA.R,er=8*he*qA.B,Et=qA.sa,Wt=qA.ta-ue+Le,et=qA.qa,Fe=qA.ra-Ve+er,Ot=qA.Ha,zt=qA.Ia-Ve+er,vt=(ke=Ie.M)==0,wt=ke>=qA.Va-1,qA.Aa==2&&ia(qA,Ie),Ie.uc)for(or=(at=qA).D.M,e(at.D.uc),Ie=at.yb;Ie<at.Hb;++Ie){Lt=Ie,kr=or;var Xt=(cr=(It=at).D).Nb;tt=It.R;var cr=cr.wa[cr.Y+Lt],lr=It.sa,tr=It.ta+16*Xt*tt+16*Lt,ur=cr.dd,Re=cr.tc;if(Re!=0)if(e(3<=Re),It.L==1)0<Lt&&Kf(lr,tr,tt,Re+4),cr.La&&Gf(lr,tr,tt,Re),0<kr&&Rf(lr,tr,tt,Re+4),cr.La&&jf(lr,tr,tt,Re);else{var fr=It.B,Tr=It.qa,_i=It.ra+8*Xt*fr+8*Lt,Cn=It.Ha,It=It.Ia+8*Xt*fr+8*Lt;Xt=cr.ld,0<Lt&&(Pe(lr,tr,tt,Re+4,ur,Xt),Bt(Tr,_i,Cn,It,fr,Re+4,ur,Xt)),cr.La&&(is(lr,tr,tt,Re,ur,Xt),vo(Tr,_i,Cn,It,fr,Re,ur,Xt)),0<kr&&(Me(lr,tr,tt,Re+4,ur,Xt),nt(Tr,_i,Cn,It,fr,Re+4,ur,Xt)),cr.La&&(vn(lr,tr,tt,Re,ur,Xt),ua(Tr,_i,Cn,It,fr,Re,ur,Xt))}}if(qA.ia&&alert("todo:DitherRow"),EA.put!=null){if(Ie=16*ke,ke=16*(ke+1),vt?(EA.y=qA.sa,EA.O=qA.ta+Le,EA.f=qA.qa,EA.N=qA.ra+er,EA.ea=qA.Ha,EA.W=qA.Ia+er):(Ie-=ye,EA.y=Et,EA.O=Wt,EA.f=et,EA.N=Fe,EA.ea=Ot,EA.W=zt),wt||(ke-=ye),ke>EA.o&&(ke=EA.o),EA.F=null,EA.J=null,qA.Fa!=null&&0<qA.Fa.length&&Ie<ke&&(EA.J=ht(qA,EA,Ie,ke-Ie),EA.F=qA.mb,EA.F==null&&EA.F.length==0)){it=ft(qA,3,"Could not decode alpha data.");break e}Ie<EA.j&&(ye=EA.j-Ie,Ie=EA.j,e(!(1&ye)),EA.O+=qA.R*ye,EA.N+=qA.B*(ye>>1),EA.W+=qA.B*(ye>>1),EA.F!=null&&(EA.J+=EA.width*ye)),Ie<ke&&(EA.O+=EA.v,EA.N+=EA.v>>1,EA.W+=EA.v>>1,EA.F!=null&&(EA.J+=EA.v),EA.ka=Ie-EA.j,EA.U=EA.va-EA.v,EA.T=ke-Ie,it=EA.put(EA))}he+1!=qA.Ic||wt||(r(qA.sa,qA.ta-ue,Et,Wt+16*qA.R,ue),r(qA.qa,qA.ra-Ve,et,Fe+8*qA.B,Ve),r(qA.Ha,qA.Ia-Ve,Ot,zt+8*qA.B,Ve))}if(!it)return ft(ve,6,"Output aborted.")}return 1}(k,Y)),Y.bc!=null&&Y.bc(Y),eA&=1}return eA?(k.cb=0,eA):0})(a,B)||(l=a.a)}}else l=a.a}l==0&&U.Oa!=null&&U.Oa.fd&&(l=Ci(U.ba))}U=l}C=U!=0?null:11>C?x.f.RGBA.eb:x.f.kb.y}else C=null;return C};var uh=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(H,AA){for(var _="",S=0;S<4;S++)_+=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 c;var g=[0],F=[0],y=[],I=new c,b=A,M=function(H,AA){var _={},S=0,P=!1,K=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 cA=u(H,AA),lA=w(H,AA+=4);AA+=4;var rA=lA+(1&lA);switch(cA){case"VP8 ":case"VP8L":_.frames[S]===void 0&&(_.frames[S]={}),(wA=_.frames[S]).src_off=P?sA:AA-8,wA.src_size=K+lA+8,S++,P&&(P=!1,K=0,sA=0);break;case"VP8X":(wA=_.header={}).feature_flags=H[AA];var hA=AA+4;wA.canvas_width=1+p(H,hA),hA+=3,wA.canvas_height=1+p(H,hA),hA+=3;break;case"ALPH":P=!0,K=rA+8,sA=AA-8;break;case"ANIM":(wA=_.header).bgcolor=w(H,AA),hA=AA+4,wA.loop_count=f(H,hA),hA+=2;break;case"ANMF":var FA,wA;(wA=_.frames[S]={}).offset_x=2*p(H,AA),AA+=3,wA.offset_y=2*p(H,AA),AA+=3,wA.width=1+p(H,AA),AA+=3,wA.height=1+p(H,AA),AA+=3,wA.duration=p(H,AA),AA+=3,FA=H[AA++],wA.dispose=1&FA,wA.blend=FA>>1&1}cA!="ANMF"&&(AA+=rA)}return _}}(b,0);M.response=b,M.rgbaoutput=!0,M.dataurl=!1;var G=M.header?M.header:null,O=M.frames?M.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=I.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 pF(){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 wF(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(A){var e,t,r,n,i,o,s,c,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 c,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,c=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 W=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return W},set:function(L){W=!!L}});var X=0;Object.defineProperty(this,"posX",{get:function(){return X},set:function(L){isNaN(L)||(X=L)}});var tA=0;Object.defineProperty(this,"posY",{get:function(){return tA},set:function(L){isNaN(L)||(tA=L)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(L){var _A;typeof L=="number"?_A=[L,L,L,L]:((_A=new Array(4))[0]=L[0],_A[1]=L.length>=2?L[1]:_A[0],_A[2]=L.length>=3?L[2]:_A[0],_A[3]=L.length>=4?L[3]:_A[1]),u.margin=_A}});var uA=!1;Object.defineProperty(this,"autoPaging",{get:function(){return uA},set:function(L){uA=L}});var j=0;Object.defineProperty(this,"lastBreak",{get:function(){return j},set:function(L){j=L}});var oA=[];Object.defineProperty(this,"pageBreaks",{get:function(){return oA},set:function(L){oA=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 CA=[];Object.defineProperty(this,"ctxStack",{get:function(){return CA},set:function(L){CA=L}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(L){var _A;_A=w(L),this.ctx.fillStyle=_A.style,this.ctx.isFillTransparent=_A.a===0,this.ctx.fillOpacity=_A.a,this.pdf.setFillColor(_A.r,_A.g,_A.b,{a:_A.a}),this.pdf.setTextColor(_A.r,_A.g,_A.b,{a:_A.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(L){var _A=w(L);this.ctx.strokeStyle=_A.style,this.ctx.isStrokeTransparent=_A.a===0,this.ctx.strokeOpacity=_A.a,_A.a===0?this.pdf.setDrawColor(255,255,255):(_A.a,this.pdf.setDrawColor(_A.r,_A.g,_A.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 yA=null,UA=null,NA=null;Object.defineProperty(this,"fontFaces",{get:function(){return NA},set:function(L){yA=null,UA=null,NA=L}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(L){var _A;if(this.ctx.font=L,(_A=/^\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 xA=_A[1];_A[2];var KA=_A[3],fA=_A[4];_A[5];var SA=_A[6],LA=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(fA)[2];fA=Math.floor(LA==="px"?parseFloat(fA)*this.pdf.internal.scaleFactor:LA==="em"?parseFloat(fA)*this.pdf.getFontSize():parseFloat(fA)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(fA);var zA=function(WA){var Ue,we,ce=[],ne=WA.trim();if(ne==="")return Su;if(ne in Id)return[Id[ne]];for(;ne!=="";){switch(we=null,Ue=(ne=Hd(ne)).charAt(0)){case'"':case"'":we=uF(ne.substring(1),Ue);break;default:we=fF(ne)}if(we===null||(ce.push(we[0]),(ne=Hd(we[1]))!==""&&ne.charAt(0)!==","))return Su;ne=ne.replace(/^,/,"")}return ce}(SA);if(this.fontFaces){var JA=function(WA,Ue){var we=WA.getFontList(),ce=JSON.stringify(we);if(yA===null||UA!==ce){var ne=function(je){var jA=[];return Object.keys(je).forEach(function(Ce){je[Ce].forEach(function(GA){var PA=null;switch(GA){case"bold":PA={family:Ce,weight:"bold"};break;case"italic":PA={family:Ce,style:"italic"};break;case"bolditalic":PA={family:Ce,weight:"bold",style:"italic"};break;case"":case"normal":PA={family:Ce}}PA!==null&&(PA.ref={name:Ce,style:GA},jA.push(PA))})}),jA}(we);yA=function(je){for(var jA={},Ce=0;Ce<je.length;++Ce){var GA=Iu(je[Ce]),PA=GA.family,xe=GA.stretch,se=GA.style,DA=GA.weight;jA[PA]=jA[PA]||{},jA[PA][xe]=jA[PA][xe]||{},jA[PA][xe][se]=jA[PA][xe][se]||{},jA[PA][xe][se][DA]=GA}return jA}(ne.concat(Ue)),UA=ce}return yA}(this.pdf,this.fontFaces),Qe=zA.map(function(WA){return{family:WA,stretch:"normal",weight:KA,style:xA}}),ie=function(WA,Ue,we){for(var ce=(we=we||{}).defaultFontFamily||"times",ne=Object.assign({},lF,we.genericFontFamilies||{}),je=null,jA=null,Ce=0;Ce<Ue.length;++Ce)if(ne[(je=Iu(Ue[Ce])).family]&&(je.family=ne[je.family]),WA.hasOwnProperty(je.family)){jA=WA[je.family];break}if(!(jA=jA||WA[ce]))throw new Error("Could not find a font-family for the rule '"+Sd(je)+"' and default family '"+ce+"'.");if(jA=function(GA,PA){if(PA[GA])return PA[GA];var xe=Cf[GA],se=xe<=Cf.normal?-1:1,DA=Ld(PA,AB,xe,se);if(!DA)throw new Error("Could not find a matching font-stretch value for "+GA);return DA}(je.stretch,jA),jA=function(GA,PA){if(PA[GA])return PA[GA];for(var xe=$g[GA],se=0;se<xe.length;++se)if(PA[xe[se]])return PA[xe[se]];throw new Error("Could not find a matching font-style for "+GA)}(je.style,jA),!(jA=function(GA,PA){if(PA[GA])return PA[GA];if(GA===400&&PA[500])return PA[500];if(GA===500&&PA[400])return PA[400];var xe=cF[GA],se=Ld(PA,eB,xe,GA<400?-1:1);if(!se)throw new Error("Could not find a matching font-weight for value "+GA);return se}(je.weight,jA)))throw new Error("Failed to resolve a font for the rule '"+Sd(je)+"'.");return jA}(JA,Qe);this.pdf.setFont(ie.ref.name,ie.ref.style)}else{var re="";(KA==="bold"||parseInt(KA,10)>=700||xA==="bold")&&(re="bold"),xA==="italic"&&(re+="italic"),re.length===0&&(re="normal");for(var Be="",de={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"},MA=0;MA<zA.length;MA++){if(this.pdf.internal.getFont(zA[MA],re,{noFallback:!0,disableWarning:!0})!==void 0){Be=zA[MA];break}if(re==="bolditalic"&&this.pdf.internal.getFont(zA[MA],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Be=zA[MA],re="bold";else if(this.pdf.internal.getFont(zA[MA],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Be=zA[MA],re="normal";break}}if(Be===""){for(var Ae=0;Ae<zA.length;Ae++)if(de[zA[Ae]]){Be=de[zA[Ae]];break}}Be=Be===""?"Times":Be,this.pdf.setFont(Be,re)}}}}),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,wA.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(L){this.ctx.lineDash=L,wA.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 Te.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"&&Oe(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 Te.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,W){if(isNaN(R)||isNaN(W)||isNaN(Q)||isNaN(T))throw Te.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,W)),tA=this.ctx.transform.applyToPoint(new o(Q,T));this.path.push({type:"qct",x1:tA.x,y1:tA.y,x:X.x,y:X.y}),this.ctx.lastPoint=new o(X.x,X.y)},p.prototype.bezierCurveTo=function(Q,T,R,W,X,tA){if(isNaN(X)||isNaN(tA)||isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W))throw Te.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var uA=this.ctx.transform.applyToPoint(new o(X,tA)),j=this.ctx.transform.applyToPoint(new o(Q,T)),oA=this.ctx.transform.applyToPoint(new o(R,W));this.path.push({type:"bct",x1:j.x,y1:j.y,x2:oA.x,y2:oA.y,x:uA.x,y:uA.y}),this.ctx.lastPoint=new o(uA.x,uA.y)},p.prototype.arc=function(Q,T,R,W,X,tA){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W)||isNaN(X))throw Te.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(tA=!!tA,!this.ctx.transform.isIdentity){var uA=this.ctx.transform.applyToPoint(new o(Q,T));Q=uA.x,T=uA.y;var j=this.ctx.transform.applyToPoint(new o(0,R)),oA=this.ctx.transform.applyToPoint(new o(0,0));R=Math.sqrt(Math.pow(j.x-oA.x,2)+Math.pow(j.y-oA.y,2))}Math.abs(X-W)>=2*Math.PI&&(W=0,X=2*Math.PI),this.path.push({type:"arc",x:Q,y:T,radius:R,startAngle:W,endAngle:X,counterclockwise:tA})},p.prototype.arcTo=function(Q,T,R,W,X){throw new Error("arcTo not implemented.")},p.prototype.rect=function(Q,T,R,W){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W))throw Te.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+W),this.lineTo(Q,T+W),this.lineTo(Q,T),this.lineTo(Q+R,T),this.lineTo(Q,T)},p.prototype.fillRect=function(Q,T,R,W){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W))throw Te.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,W),this.fill(),X.hasOwnProperty("lineCap")&&(this.lineCap=X.lineCap),X.hasOwnProperty("lineJoin")&&(this.lineJoin=X.lineJoin)}},p.prototype.strokeRect=function(Q,T,R,W){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W))throw Te.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,W),this.stroke())},p.prototype.clearRect=function(Q,T,R,W){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W))throw Te.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,W))},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 W=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=W}},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,W,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,W=0,X=0;else{var tA=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(Q);if(tA!==null)T=parseInt(tA[1]),R=parseInt(tA[2]),W=parseInt(tA[3]),X=1;else if((tA=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(Q))!==null)T=parseInt(tA[1]),R=parseInt(tA[2]),W=parseInt(tA[3]),X=parseFloat(tA[4]);else{if(X=1,typeof Q=="string"&&Q.charAt(0)!=="#"){var uA=new qg(Q);Q=uA.ok?uA.toHex():"#000000"}Q.length===4?(T=Q.substring(1,2),T+=T,R=Q.substring(2,3),R+=R,W=Q.substring(3,4),W+=W):(T=Q.substring(1,3),R=Q.substring(3,5),W=Q.substring(5,7)),T=parseInt(T,16),R=parseInt(R,16),W=parseInt(W,16)}}return{r:T,g:R,b:W,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,W){if(isNaN(T)||isNaN(R)||typeof Q!="string")throw Te.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(W=isNaN(W)?void 0:W,!g.call(this)){var X=rA(this.ctx.transform.rotation),tA=this.ctx.transform.scaleX;S.call(this,{text:Q,x:T,y:R,scale:tA,angle:X,align:this.textAlign,maxWidth:W})}},p.prototype.strokeText=function(Q,T,R,W){if(isNaN(T)||isNaN(R)||typeof Q!="string")throw Te.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!F.call(this)){W=isNaN(W)?void 0:W;var X=rA(this.ctx.transform.rotation),tA=this.ctx.transform.scaleX;S.call(this,{text:Q,x:T,y:R,scale:tA,renderingMode:"stroke",angle:X,align:this.textAlign,maxWidth:W})}},p.prototype.measureText=function(Q){if(typeof Q!="string")throw Te.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,W=T.internal.getFontSize(),X=T.getStringUnitWidth(Q)*W/T.internal.scaleFactor;return new function(tA){var uA=(tA=tA||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return uA}}),this}({width:X*=Math.round(96*R/72*1e4)/1e4})},p.prototype.scale=function(Q,T){if(isNaN(Q)||isNaN(T))throw Te.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var R=new c(Q,0,0,T,0,0);this.ctx.transform=this.ctx.transform.multiply(R)},p.prototype.rotate=function(Q){if(isNaN(Q))throw Te.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var T=new c(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 Te.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var R=new c(1,0,0,1,Q,T);this.ctx.transform=this.ctx.transform.multiply(R)},p.prototype.transform=function(Q,T,R,W,X,tA){if(isNaN(Q)||isNaN(T)||isNaN(R)||isNaN(W)||isNaN(X)||isNaN(tA))throw Te.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var uA=new c(Q,T,R,W,X,tA);this.ctx.transform=this.ctx.transform.multiply(uA)},p.prototype.setTransform=function(Q,T,R,W,X,tA){Q=isNaN(Q)?1:Q,T=isNaN(T)?0:T,R=isNaN(R)?0:R,W=isNaN(W)?1:W,X=isNaN(X)?0:X,tA=isNaN(tA)?0:tA,this.ctx.transform=new c(Q,T,R,W,X,tA)};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,W,X,tA,uA,j,oA){var CA=this.pdf.getImageProperties(Q),yA=1,UA=1,NA=1,L=1;W!==void 0&&j!==void 0&&(NA=j/W,L=oA/X,yA=CA.width/W*j/W,UA=CA.height/X*oA/X),tA===void 0&&(tA=T,uA=R,T=0,R=0),W!==void 0&&j===void 0&&(j=W,oA=X),W===void 0&&j===void 0&&(j=CA.width,oA=CA.height);var _A=this.ctx.transform.decompose(),xA=rA(_A.rotate.shx),KA=new c,fA=(KA=(KA=(KA=KA.multiply(_A.translate)).multiply(_A.skew)).multiply(_A.scale)).applyToRectangle(new s(tA-T*NA,uA-R*L,W*yA,X*UA));if(this.autoPaging){for(var SA,LA=I.call(this,fA),zA=[],JA=0;JA<LA.length;JA+=1)zA.indexOf(LA[JA])===-1&&zA.push(LA[JA]);G(zA);for(var Qe=zA[0],ie=zA[zA.length-1],re=Qe;re<ie+1;re++){this.pdf.setPage(re);var Be=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],de=re===1?this.posY+this.margin[0]:this.margin[0],MA=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],WA=re===1?0:MA+(re-2)*Ae;if(this.ctx.clip_path.length!==0){var Ue=this.path;SA=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=M(SA,this.posX+this.margin[3],-WA+de+this.ctx.prevPageLastElemOffset),J.call(this,"fill",!0),this.path=Ue}var we=JSON.parse(JSON.stringify(fA));we=M([we],this.posX+this.margin[3],-WA+de+this.ctx.prevPageLastElemOffset)[0];var ce=(re>Qe||re<ie)&&y.call(this);ce&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Be,Ae,null).clip().discardPath()),this.pdf.addImage(Q,"JPEG",we.x,we.y,we.w,we.h,null,null,xA),ce&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(Q,"JPEG",fA.x,fA.y,fA.w,fA.h,null,null,xA)};var I=function(Q,T,R){var W=[];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":W.push(Math.floor((Q.y+X)/R)+1);break;case"arc":W.push(Math.floor((Q.y+X-Q.radius)/R)+1),W.push(Math.floor((Q.y+X+Q.radius)/R)+1);break;case"qct":var tA=hA(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Q.x1,Q.y1,Q.x,Q.y);W.push(Math.floor((tA.y+X)/R)+1),W.push(Math.floor((tA.y+tA.h+X)/R)+1);break;case"bct":var uA=FA(this.ctx.lastPoint.x,this.ctx.lastPoint.y,Q.x1,Q.y1,Q.x2,Q.y2,Q.x,Q.y);W.push(Math.floor((uA.y+X)/R)+1),W.push(Math.floor((uA.y+uA.h+X)/R)+1);break;case"rect":W.push(Math.floor((Q.y+X)/R)+1),W.push(Math.floor((Q.y+Q.h+X)/R)+1)}for(var j=0;j<W.length;j+=1)for(;this.pdf.internal.getNumberOfPages()<W[j];)b.call(this);return W},b=function(){var Q=this.fillStyle,T=this.strokeStyle,R=this.font,W=this.lineCap,X=this.lineWidth,tA=this.lineJoin;this.pdf.addPage(),this.fillStyle=Q,this.strokeStyle=T,this.font=R,this.lineCap=W,this.lineWidth=X,this.lineJoin=tA},M=function(Q,T,R){for(var W=0;W<Q.length;W++)switch(Q[W].type){case"bct":Q[W].x2+=T,Q[W].y2+=R;case"qct":Q[W].x1+=T,Q[W].y1+=R;default:Q[W].x+=T,Q[W].y+=R}return Q},G=function(Q){return Q.sort(function(T,R){return T-R})},O=function(Q,T){var R=this.fillStyle,W=this.strokeStyle,X=this.lineCap,tA=this.lineWidth,uA=Math.abs(tA*this.ctx.transform.scaleX),j=this.lineJoin;if(this.autoPaging){for(var oA,CA,yA=JSON.parse(JSON.stringify(this.path)),UA=JSON.parse(JSON.stringify(this.path)),NA=[],L=0;L<UA.length;L++)if(UA[L].x!==void 0)for(var _A=I.call(this,UA[L]),xA=0;xA<_A.length;xA+=1)NA.indexOf(_A[xA])===-1&&NA.push(_A[xA]);for(var KA=0;KA<NA.length;KA++)for(;this.pdf.internal.getNumberOfPages()<NA[KA];)b.call(this);G(NA);for(var fA=NA[0],SA=NA[NA.length-1],LA=fA;LA<SA+1;LA++){this.pdf.setPage(LA),this.fillStyle=R,this.strokeStyle=W,this.lineCap=X,this.lineWidth=uA,this.lineJoin=j;var zA=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],JA=LA===1?this.posY+this.margin[0]:this.margin[0],Qe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ie=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],re=LA===1?0:Qe+(LA-2)*ie;if(this.ctx.clip_path.length!==0){var Be=this.path;oA=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=M(oA,this.posX+this.margin[3],-re+JA+this.ctx.prevPageLastElemOffset),J.call(this,Q,!0),this.path=Be}if(CA=JSON.parse(JSON.stringify(yA)),this.path=M(CA,this.posX+this.margin[3],-re+JA+this.ctx.prevPageLastElemOffset),T===!1||LA===0){var de=(LA>fA||LA<SA)&&y.call(this);de&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],zA,ie,null).clip().discardPath()),J.call(this,Q,T),de&&this.pdf.restoreGraphicsState()}this.lineWidth=tA}this.path=yA}else this.lineWidth=uA,J.call(this,Q,T),this.lineWidth=tA},J=function(Q,T){if((Q!=="stroke"||T||!F.call(this))&&(Q==="stroke"||T||!g.call(this))){for(var R,W,X=[],tA=this.path,uA=0;uA<tA.length;uA++){var j=tA[uA];switch(j.type){case"begin":X.push({begin:!0});break;case"close":X.push({close:!0});break;case"mt":X.push({start:j,deltas:[],abs:[]});break;case"lt":var oA=X.length;if(tA[uA-1]&&!isNaN(tA[uA-1].x)&&(R=[j.x-tA[uA-1].x,j.y-tA[uA-1].y],oA>0)){for(;oA>=0;oA--)if(X[oA-1].close!==!0&&X[oA-1].begin!==!0){X[oA-1].deltas.push(R),X[oA-1].abs.push(j);break}}break;case"bct":R=[j.x1-tA[uA-1].x,j.y1-tA[uA-1].y,j.x2-tA[uA-1].x,j.y2-tA[uA-1].y,j.x-tA[uA-1].x,j.y-tA[uA-1].y],X[X.length-1].deltas.push(R);break;case"qct":var CA=tA[uA-1].x+2/3*(j.x1-tA[uA-1].x),yA=tA[uA-1].y+2/3*(j.y1-tA[uA-1].y),UA=j.x+2/3*(j.x1-j.x),NA=j.y+2/3*(j.y1-j.y),L=j.x,_A=j.y;R=[CA-tA[uA-1].x,yA-tA[uA-1].y,UA-tA[uA-1].x,NA-tA[uA-1].y,L-tA[uA-1].x,_A-tA[uA-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(j)}}W=T?null:Q==="stroke"?"stroke":"fill";for(var xA=!1,KA=0;KA<X.length;KA++)if(X[KA].arc)for(var fA=X[KA].abs,SA=0;SA<fA.length;SA++){var LA=fA[SA];LA.type==="arc"?q.call(this,LA.x,LA.y,LA.radius,LA.startAngle,LA.endAngle,LA.counterclockwise,void 0,T,!xA):P.call(this,LA.x,LA.y),xA=!0}else if(X[KA].close===!0)this.pdf.internal.out("h"),xA=!1;else if(X[KA].begin!==!0){var zA=X[KA].start.x,JA=X[KA].start.y;K.call(this,X[KA].deltas,zA,JA),xA=!0}W&&H.call(this,W),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,W,X,tA,uA,j,oA){for(var CA=cA.call(this,R,W,X,tA),yA=0;yA<CA.length;yA++){var UA=CA[yA];yA===0&&(oA?_.call(this,UA.x1+Q,UA.y1+T):P.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)}j?AA.call(this):H.call(this,uA)},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")},S=function(Q){var T;switch(Q.align){case"right":case"end":T="right";break;case"center":T="center";break;default:T="left"}var R,W,X,tA=this.pdf.getTextDimensions(Q.text),uA=Z.call(this,Q.y),j=nA.call(this,uA)-tA.h,oA=this.ctx.transform.applyToPoint(new o(Q.x,uA));if(this.autoPaging){var CA=this.ctx.transform.decompose(),yA=new c;yA=(yA=(yA=yA.multiply(CA.translate)).multiply(CA.skew)).multiply(CA.scale);for(var UA=this.ctx.transform.applyToRectangle(new s(Q.x,uA,tA.w,tA.h)),NA=yA.applyToRectangle(new s(Q.x,j,tA.w,tA.h)),L=I.call(this,NA),_A=[],xA=0;xA<L.length;xA+=1)_A.indexOf(L[xA])===-1&&_A.push(L[xA]);G(_A);for(var KA=_A[0],fA=_A[_A.length-1],SA=KA;SA<fA+1;SA++){this.pdf.setPage(SA);var LA=SA===1?this.posY+this.margin[0]:this.margin[0],zA=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],JA=this.pdf.internal.pageSize.height-this.margin[2],Qe=JA-this.margin[0],ie=this.pdf.internal.pageSize.width-this.margin[1],re=ie-this.margin[3],Be=SA===1?0:zA+(SA-2)*Qe;if(this.ctx.clip_path.length!==0){var de=this.path;R=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=M(R,this.posX+this.margin[3],-1*Be+LA),J.call(this,"fill",!0),this.path=de}var MA=M([JSON.parse(JSON.stringify(NA))],this.posX+this.margin[3],-Be+LA+this.ctx.prevPageLastElemOffset)[0];Q.scale>=.01&&(W=this.pdf.internal.getFontSize(),this.pdf.setFontSize(W*Q.scale),X=this.lineWidth,this.lineWidth=X*Q.scale);var Ae=this.autoPaging!=="text";if(Ae||MA.y+MA.h<=JA){if(Ae||MA.y>=LA&&MA.x<=ie){var WA=Ae?Q.text:this.pdf.splitTextToSize(Q.text,Q.maxWidth||ie-MA.x)[0],Ue=M([JSON.parse(JSON.stringify(UA))],this.posX+this.margin[3],-Be+LA+this.ctx.prevPageLastElemOffset)[0],we=Ae&&(SA>KA||SA<fA)&&y.call(this);we&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],re,Qe,null).clip().discardPath()),this.pdf.text(WA,Ue.x,Ue.y,{angle:Q.angle,align:T,renderingMode:Q.renderingMode}),we&&this.pdf.restoreGraphicsState()}}else MA.y<JA&&(this.ctx.prevPageLastElemOffset+=JA-MA.y);Q.scale>=.01&&(this.pdf.setFontSize(W),this.lineWidth=X)}}else Q.scale>=.01&&(W=this.pdf.internal.getFontSize(),this.pdf.setFontSize(W*Q.scale),X=this.lineWidth,this.lineWidth=X*Q.scale),this.pdf.text(Q.text,oA.x+this.posX,oA.y+this.posY,{angle:Q.angle,align:T,renderingMode:Q.renderingMode,maxWidth:Q.maxWidth}),Q.scale>=.01&&(this.pdf.setFontSize(W),this.lineWidth=X)},P=function(Q,T,R,W){R=R||0,W=W||0,this.pdf.internal.out(t(Q+R)+" "+r(T+W)+" l")},K=function(Q,T,R){return this.pdf.lines(Q,T,R,null,null)},sA=function(Q,T,R,W,X,tA,uA,j){this.pdf.internal.out([e(n(R+Q)),e(i(W+T)),e(n(X+Q)),e(i(tA+T)),e(n(uA+Q)),e(i(j+T)),"c"].join(" "))},cA=function(Q,T,R,W){for(var X=2*Math.PI,tA=Math.PI/2;T>R;)T-=X;var uA=Math.abs(R-T);uA<X&&W&&(uA=X-uA);for(var j=[],oA=W?-1:1,CA=T;uA>1e-5;){var yA=CA+oA*Math.min(uA,tA);j.push(lA.call(this,Q,CA,yA)),uA-=Math.abs(yA-CA),CA=yA}return j},lA=function(Q,T,R){var W=(R-T)/2,X=Q*Math.cos(W),tA=Q*Math.sin(W),uA=X,j=-tA,oA=uA*uA+j*j,CA=oA+uA*X+j*tA,yA=4/3*(Math.sqrt(2*oA*CA)-CA)/(uA*tA-j*X),UA=uA-yA*j,NA=j+yA*uA,L=UA,_A=-NA,xA=W+T,KA=Math.cos(xA),fA=Math.sin(xA);return{x1:Q*Math.cos(T),y1:Q*Math.sin(T),x2:UA*KA-NA*fA,y2:UA*fA+NA*KA,x3:L*KA-_A*fA,y3:L*fA+_A*KA,x4:Q*Math.cos(R),y4:Q*Math.sin(R)}},rA=function(Q){return 180*Q/Math.PI},hA=function(Q,T,R,W,X,tA){var uA=Q+.5*(R-Q),j=T+.5*(W-T),oA=X+.5*(R-X),CA=tA+.5*(W-tA),yA=Math.min(Q,X,uA,oA),UA=Math.max(Q,X,uA,oA),NA=Math.min(T,tA,j,CA),L=Math.max(T,tA,j,CA);return new s(yA,NA,UA-yA,L-NA)},FA=function(Q,T,R,W,X,tA,uA,j){var oA,CA,yA,UA,NA,L,_A,xA,KA,fA,SA,LA,zA,JA,Qe=R-Q,ie=W-T,re=X-R,Be=tA-W,de=uA-X,MA=j-tA;for(CA=0;CA<41;CA++)KA=(_A=(yA=Q+(oA=CA/40)*Qe)+oA*((NA=R+oA*re)-yA))+oA*(NA+oA*(X+oA*de-NA)-_A),fA=(xA=(UA=T+oA*ie)+oA*((L=W+oA*Be)-UA))+oA*(L+oA*(tA+oA*MA-L)-xA),CA==0?(SA=KA,LA=fA,zA=KA,JA=fA):(SA=Math.min(SA,KA),LA=Math.min(LA,fA),zA=Math.max(zA,KA),JA=Math.max(JA,fA));return new s(Math.round(SA),Math.round(LA),Math.round(zA-SA),Math.round(JA-LA))},wA=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)}}})(YA.API),function(A){var e=function(o){var s,c,u,f,p,w,g,F,y,I;for(c=[],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-(I=p%85))/85)-(y=p%85))/85)-(F=p%85))/85)-(g=p%85))/85)%85,c.push(w+33,g+33,F+33,y+33,I+33)):c.push(122);return function(b,M){for(var G=M;G>0;G--)b.pop()}(c,s.length),String.fromCharCode.apply(String,c)+"~>"},t=function(o){var s,c,u,f,p,w=String,g="length",F=255,y="charCodeAt",I="slice",b="replace";for(o[I](-2),o=o[I](0,-2)[b](/\s/g,"")[b]("z","!!!!!"),u=[],f=0,p=(o+=s="uuuuu"[I](o[g]%5||5))[g];p>f;f+=5)c=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&c>>24,F&c>>16,F&c>>8,F&c);return function(M,G){for(var O=G;O>0;O--)M.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 c="",u=0;u<o.length;u+=2)c+=String.fromCharCode("0x"+(o[u]+o[u+1]));return c},i=function(o){for(var s=new Uint8Array(o.length),c=o.length;c--;)s[c]=o.charCodeAt(c);return(s=of(s)).reduce(function(u,f){return u+String.fromCharCode(f)},"")};A.processDataByFilters=function(o,s){var c=0,u=o||"",f=[];for(typeof(s=s||[])=="string"&&(s=[s]),c=0;c<s.length;c+=1)switch(s[c]){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[c]+'" is not implemented')}return{data:u,reverseChain:f.reverse().join(" ")}}}(YA.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(c,u,f){var p=new XMLHttpRequest,w=0,g=function(F){var y=F.length,I=[],b=String.fromCharCode;for(w=0;w<y;w+=1)I.push(b(255&F.charCodeAt(w)));return I.join("")};if(p.open("GET",c,!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}(YA.API),function(A){function e(){return(te.html2canvas?Promise.resolve(te.html2canvas):Tl(()=>Promise.resolve().then(()=>Nm),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(te.DOMPurify?Promise.resolve(te.DOMPurify):Tl(()=>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 c=Oe(s);return c==="undefined"?"undefined":c==="string"||s instanceof String?"string":c==="number"||s instanceof Number?"number":c==="function"||s instanceof Function?"function":s&&s.constructor===Array?"array":s&&s.nodeType===1?"element":c==="object"?"object":"unknown"},n=function(s,c){var u=document.createElement(s);for(var f in c.className&&(u.className=c.className),c.innerHTML&&c.dompurify&&(u.innerHTML=c.dompurify.sanitize(c.innerHTML)),c.style)u.style[f]=c.style[f];return u},i=function s(c,u){for(var f=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),p=c.firstChild;p;p=p.nextSibling)u!==!0&&p.nodeType===1&&p.nodeName==="SCRIPT"||f.appendChild(s(p,u));return c.nodeType===1&&(c.nodeName==="CANVAS"?(f.width=c.width,f.height=c.height,f.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(f.value=c.value),f.addEventListener("load",function(){f.scrollTop=c.scrollTop,f.scrollLeft=c.scrollLeft},!0)),f},o=function s(c){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(c)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(s,c){return s.__proto__=c||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,c){return this.then(function(){switch(c=c||function(u){switch(r(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(s),c){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},c=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);c.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(c),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(c){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,c(this.prop.container,u)}).then(function(c){(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,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(c){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(I){return I.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),c(this.prop.container,w)}).then(function(c){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,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,c,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(s,c):this.outputPdf(s,c)},o.prototype.outputPdf=function(s,c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(s,c)})},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 c=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(c)})},o.prototype.get=function(s,c){return this.then(function(){var u=s in o.template.prop?this.prop[s]:this.opt[s];return c?c(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 c(u,f){return Math.floor(u*f/72*96)}return this.then(function(){(s=s||YA.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:c(s.inner.width,s.k),height:c(s.inner.height,s.k)},s.inner.ratio=s.inner.height/s.inner.width),this.prop.pageSize=s})},o.prototype.setProgress=function(s,c,u,f){return s!=null&&(this.progress.val=s),c!=null&&(this.progress.state=c),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,c,u,f){return this.setProgress(s?this.progress.val+s:null,c||null,u?this.progress.n+u:null,f?this.progress.stack.concat(f):null)},o.prototype.then=function(s,c){var u=this;return this.thenCore(s,c,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,c,u){u=u||Promise.prototype.then;var f=this;s&&(s=s.bind(f)),c&&(c=c.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,c);return o.convert(w,f.__proto__)},o.prototype.thenExternal=function(s,c){return Promise.prototype.then.call(this,s,c)},o.prototype.thenList=function(s){var c=this;return s.forEach(function(u){c=c.thenCore(u)}),c},o.prototype.catch=function(s){s&&(s=s.bind(this));var c=Promise.prototype.catch.call(this,s);return o.convert(c,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,YA.getPageSize=function(s,c,u){if(Oe(s)==="object"){var f=s;s=f.orientation,c=f.unit||c,u=f.format||u}c=c||"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(c){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: "+c}var F,y=0,I=0;if(g.hasOwnProperty(w))y=g[w][1]/p,I=g[w][0]/p;else try{y=u[1],I=u[0]}catch{throw new Error("Invalid format: "+u)}if(s==="p"||s==="portrait")s="p",I>y&&(F=I,I=y,y=F);else{if(s!=="l"&&s!=="landscape")throw"Invalid orientation: "+s;s="l",y>I&&(F=I,I=y,y=F)}return{width:I,height:y,unit:c,k:p,orientation:s}},A.html=function(s,c){(c=c||{}).callback=c.callback||function(){},c.html2canvas=c.html2canvas||{},c.html2canvas.canvas=c.html2canvas.canvas||this.canvas,c.jsPDF=c.jsPDF||this,c.fontFaces=c.fontFaces?c.fontFaces.map(Iu):null;var u=new o(c);return c.worker?u:u.from(s).doCallback()}}(YA.API),YA.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 c=0,u=o-1;u>=0&&n[u]==="\\";u--)c++;i+=c%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 c=s[1];t.internal.newObjectDeferredBegin(c,!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 c=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+c.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}}])}(YA.API),function(A){var e=[192,193,194,195,196,197,198,199];A.processJPEG=function(t,r,n,i,o,s){var c,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,c=function(p){for(var w,g=256*p.charCodeAt(4)+p.charCodeAt(5),F=p.length,y={width:0,height:0,numcomponents:1},I=4;I<F;I+=2){if(I+=g,e.indexOf(p.charCodeAt(I+1))!==-1){w=256*p.charCodeAt(I+5)+p.charCodeAt(I+6),y={width:256*p.charCodeAt(I+7)+p.charCodeAt(I+8),height:w,numcomponents:p.charCodeAt(I+9)};break}g=256*p.charCodeAt(I+2)+p.charCodeAt(I+3)}return y}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),c.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:c.width,height:c.height,colorSpace:s,bitsPerComponent:8,filter:u,index:r,alias:n}}return f}}(YA.API),YA.API.processPNG=function(A,e,t,r){if(this.__addimage__.isArrayBuffer(A)&&(A=new Uint8Array(A)),this.__addimage__.isArrayBufferView(A)){var n,i=Xb(A,{checkCrc:!0}),o=i.width,s=i.height,c=i.channels,u=i.palette,f=i.depth;n=u&&c===1?function(q){for(var H=q.width,AA=q.height,_=q.data,S=q.palette,P=q.depth,K=!1,sA=[],cA=[],lA=void 0,rA=!1,hA=0,FA=0;FA<S.length;FA++){var wA=Qh(S[FA],4),Q=wA[0],T=wA[1],R=wA[2],W=wA[3];sA.push(Q,T,R),W!=null&&(W===0?(hA++,cA.length<1&&cA.push(FA)):W<255&&(rA=!0))}if(rA||hA>1){K=!0,cA=void 0;var X=H*AA;lA=new Uint8Array(X);for(var tA=new DataView(_.buffer),uA=0;uA<X;uA++){var j=Hu(tA,uA,P),oA=Qh(S[j],4)[3];lA[uA]=oA}}else hA===0&&(cA=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:K?8:void 0,colorBytes:_,alphaBytes:lA,needSMask:K,palette:sA,mask:cA}}(i):c===2||c===4?function(q){for(var H=q.data,AA=q.width,_=q.height,S=q.channels,P=q.depth,K=S===2?"DeviceGray":"DeviceRGB",sA=S-1,cA=AA*_,lA=sA,rA=cA*lA,hA=1*cA,FA=Math.ceil(rA*P/8),wA=Math.ceil(hA*P/8),Q=new Uint8Array(FA),T=new Uint8Array(wA),R=new DataView(H.buffer),W=new DataView(Q.buffer),X=new DataView(T.buffer),tA=!1,uA=0;uA<cA;uA++){for(var j=uA*S,oA=0;oA<lA;oA++)Kd(W,Hu(R,j+oA,P),uA*lA+oA,P);var CA=Hu(R,j+lA,P);CA<(1<<P)-1&&(tA=!0),Kd(X,CA,1*uA,P)}return{colorSpace:K,colorsPerPixel:sA,sMaskBitsPerComponent:tA?P:void 0,colorBytes:Q,alphaBytes:T,needSMask:tA}}(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 S=_.length,P=new Uint8Array(2*S),K=new DataView(P.buffer,P.byteOffset,P.byteLength),sA=0;sA<S;sA++)K.setUint16(2*sA,_[sA],!1);return P}(H):H,needSMask:!1}}(i);var p,w,g,F=n,y=F.colorSpace,I=F.colorsPerPixel,b=F.sMaskBitsPerComponent,M=F.colorBytes,G=F.alphaBytes,O=F.needSMask,J=F.palette,Z=F.mask,nA=null;return r!==YA.API.image_compression.NONE&&typeof of=="function"?(nA=function(q){var H;switch(q){case YA.API.image_compression.FAST:H=11;break;case YA.API.image_compression.MEDIUM:H=13;break;case YA.API.image_compression.SLOW:H=14;break;default:H=12}return H}(r),p=this.decode.FLATE_DECODE,w="/Predictor ".concat(nA," /Colors ").concat(I," /BitsPerComponent ").concat(f," /Columns ").concat(o),A=Td(M,Math.ceil(o*I*f/8),I,f,r),O&&(g=Td(G,Math.ceil(o*b/8),1,b,r))):(p=void 0,w=void 0,A=M,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 BF(e),o=i.width,s=i.height,c=[];i.decodeAndBlitFrameRGBA(0,c);var u={data:c,width:o,height:s},f=new Nu(100).encode(u,100);return A.processJPEG.call(this,f,t,r,n)},A.processGIF87A=A.processGIF89A}(YA.API),Mr.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)},Mr.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){Te.log("bit decode error:"+t)}},Mr.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 c=this.palette[i>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}t!==0&&(this.pos+=4-t)}},Mr.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,c=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[c],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)}},Mr.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)}},Mr.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,c=(i>>10&e)/e*255|0,u=i>>15?255:0,f=r*this.width*4+4*n;this.data[f]=c,this.data[f+1]=s,this.data[f+2]=o,this.data[f+3]=u}this.pos+=A}},Mr.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,c=(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]=c,this.data[f+2]=s,this.data[f+3]=255}this.pos+=A}},Mr.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}},Mr.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}},Mr.prototype.getData=function(){return this.data},function(A){A.processBMP=function(e,t,r,n){var i=new Mr(e,!1),o=i.width,s=i.height,c={data:i.getData(),width:o,height:s},u=new Nu(100).encode(c,100);return A.processJPEG.call(this,u,t,r,n)}}(YA.API),Gd.prototype.getData=function(){return this.data},function(A){A.processWEBP=function(e,t,r,n){var i=new Gd(e),o=i.width,s=i.height,c={data:i.getData(),width:o,height:s},u=new Nu(100).encode(c,100);return A.processJPEG.call(this,u,t,r,n)}}(YA.API),YA.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,c=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[c++]=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}},YA.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},ba=YA.API,dc=ba.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,c=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]||c,I=[];for(t=0;t<g;t++)r=A.charCodeAt(t),typeof n.metadata.widthOfString=="function"?I.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(r))+o*(1e3/i)||0)/1e3):(w=p&&Oe(u[r])==="object"&&!isNaN(parseInt(u[r][F],10))?u[r][F]/f:0,I.push((s[r]||y)/c+w)),F=r;return I},Nd=ba.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 ba.processArabic&&(A=ba.processArabic(A)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(A,t,n)/t:dc.apply(this,arguments).reduce(function(i,o){return i+o},0)},Dd=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 c=i;for(s=0;i!==o;)s+e[i]>r&&(n.push(A.slice(c,i)),s=0,c=i),s+=e[i],i++;return c!==i&&n.push(A.slice(c,i)),n},kd=function(A,e,t){t||(t={});var r,n,i,o,s,c,u,f=[],p=[f],w=t.textIndent||0,g=0,F=0,y=A.split(" "),I=dc.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?y[0].length+2:t.lineIndent||0){var b=Array(c).join(" "),M=[];y.map(function(O){(O=O.split(/\s*\n/)).length>1?M=M.concat(O.map(function(J,Z){return(Z&&J.length?`
`:"")+J})):M.push(O[0])}),y=M,c=Nd.apply(this,[b,t])}for(i=0,o=y.length;i<o;i++){var G=0;if(r=y[i],c&&r[0]==`
`&&(r=r.substr(1),G=1),w+g+(F=(n=dc.apply(this,[r,t])).reduce(function(O,J){return O+J},0))>e||G){if(F>e){for(s=Dd.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+c,g=I}else f.push(r),w+=g+F,g=I}return u=c?function(O,J){return(J?b:"")+O.join(" ")}:function(O){return O.join(" ")},p.map(u)},ba.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,c,u=[];for(s=0,c=r.length;s<c;s++)u=u.concat(kd.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,I,b=["{"];for(var M in w){if(g=w[M],isNaN(parseInt(M,10))?F="'"+M+"'":(M=parseInt(M,10),F=(F=o(M).slice(2)).slice(0,-1)+n[F.slice(-1)]),typeof g=="number")g<0?(y=o(g).slice(3),I="-"):(y=o(g).slice(2),I=""),y=I+y.slice(0,-1)+n[y.slice(-1)];else{if(Oe(g)!=="object")throw new Error("Don't know what to do with value type "+Oe(g)+".");y=s(g)}b.push(F+y)}return b.push("}"),b.join("")},c=A.__fontmetrics__.uncompress=function(w){if(typeof w!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,F,y,I,b={},M=1,G=b,O=[],J="",Z="",nA=w.length-1,q=1;q<nA;q+=1)(I=w[q])=="'"?g?(y=g.join(""),g=void 0):g=[]:g?g.push(I):I=="{"?(O.push([G,y]),G={},y=void 0):I=="}"?((F=O.pop())[0][F[1]]=G,y=void 0,G=F[0]):I=="-"?M=-1:y===void 0?r.hasOwnProperty(I)?(J+=r[I],y=parseInt(J,16)*M,M=1,J=""):J+=I:r.hasOwnProperty(I)?(Z+=r[I],G[y]=parseInt(Z,16)*M,M=1,y=void 0,Z=""):Z+=I;return b},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{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":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'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":c("{'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:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'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:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'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":c("{'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:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'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":c("{'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":c("{'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])}])}(YA.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(Cc(s)),o.metadata=A.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(n,r)}}])}(YA),YA.API.addSvgAsImage=function(A,e,t,r,n,i,o,s){if(isNaN(e)||isNaN(t))throw Te.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(n))throw Te.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=r,c.height=n;var u=c.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,c.width,c.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return(te.canvg?Promise.resolve(te.canvg):Tl(()=>import("./index.es-26b70402.js"),["static/index.es-26b70402.js","static/index-7d3dbb9c.js","static/8035f1c7.css","static/objectSpread2-947328ce.js","static/toPropertyKey-720374c3.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(c.toDataURL("image/jpeg",1),e,t,r,n,o,s)})},YA.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},YA.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),c=[],u=0,f=0,p=0;function w(F,y){var I,b=!1;for(I=0;I<F.length;I+=1)F[I]===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(Oe(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")c.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&&c.push([i[u][0]-1,i[u][1]-1].join(" "))}t[n].value="["+c.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},YA.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",wF),this.internal.events.subscribe("postPutResources",pF)),this},function(A){var e=A.API,t=e.pdfEscape16=function(i,o){for(var s,c=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),c.indexOf(s)==-1&&(c.push(s),c.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,c,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`,c=[],p=0,w=(s=Object.keys(i).sort(function(g,F){return g-F})).length;p<w;p++)o=s[p],c.length>=100&&(f+=`
`+c.length+` beginbfchar
`+c.join(`
`)+`
endbfchar`,c=[]),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),c.push("<"+o+"><"+u+">"));return c.length&&(f+=`
`+c.length+` beginbfchar
`+c.join(`
`)+`
endbfchar
`),f+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};e.events.push(["putFont",function(i){(function(o){var s=o.font,c=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}),c("endobj");var I=u();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:I}),c("endobj");var b=u();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+Ua(s.fontName)),c("/FontFile2 "+y+" 0 R"),c("/FontBBox "+A.API.PDFObject.convert(s.metadata.bbox)),c("/Flags "+s.metadata.flags),c("/StemV "+s.metadata.stemV),c("/ItalicAngle "+s.metadata.italicAngle),c("/Ascent "+s.metadata.ascender),c("/Descent "+s.metadata.decender),c("/CapHeight "+s.metadata.capHeight),c(">>"),c("endobj");var M=u();c("<<"),c("/Type /Font"),c("/BaseFont /"+Ua(s.fontName)),c("/FontDescriptor "+b+" 0 R"),c("/W "+A.API.PDFObject.convert(p)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+s.encoding+")"),c(">>"),c(">>"),c("endobj"),s.objectNumber=u(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+I+" 0 R"),c("/BaseFont /"+Ua(s.fontName)),c("/Encoding /"+s.encoding),c("/DescendantFonts ["+M+" 0 R]"),c(">>"),c("endobj"),s.isAlreadyPutted=!0}})(i)}]),e.events.push(["putFont",function(i){(function(o){var s=o.font,c=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}),c("endobj");var y=u();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:y}),c("endobj");var I=u();c("<<"),c("/Descent "+s.metadata.decender),c("/CapHeight "+s.metadata.capHeight),c("/StemV "+s.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+F+" 0 R"),c("/Flags 96"),c("/FontBBox "+A.API.PDFObject.convert(s.metadata.bbox)),c("/FontName /"+Ua(s.fontName)),c("/ItalicAngle "+s.metadata.italicAngle),c("/Ascent "+s.metadata.ascender),c(">>"),c("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));c("<</Subtype/TrueType/Type/Font/ToUnicode "+y+" 0 R/BaseFont/"+Ua(s.fontName)+"/FontDescriptor "+I+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+A.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),c("endobj"),s.isAlreadyPutted=!0}})(i)}]);var n=function(i){var o,s=i.text||"",c=i.x,u=i.y,f=i.options||{},p=i.mutex||{},w=p.pdfEscape,g=p.activeFontKey,F=p.fonts,y=g,I="",b=0,M="",G=F[y].encoding;if(F[y].encoding!=="Identity-H")return{text:s,x:c,y:u,options:f,mutex:p};for(M=s,y=g,Array.isArray(s)&&(M=s[0]),b=0;b<M.length;b+=1)F[y].metadata.hasOwnProperty("cmap")&&(o=F[y].metadata.cmap.unicode.codeMap[M[b].charCodeAt(0)]),o||M[b].charCodeAt(0)<256&&F[y].metadata.hasOwnProperty("Unicode")?I+=M[b]:I+="";var O="";return parseInt(y.slice(1))<14||G==="WinAnsiEncoding"?O=w(I,y).split("").map(function(J){return J.charCodeAt(0).toString(16)}).join(""):G==="Identity-H"&&(O=t(I,F[y])),p.isHex=!0,{text:O,x:c,y:u,options:f,mutex:p}};e.events.push(["postProcessText",function(i){var o=i.text||"",s=[],c={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({},c,{text:o[u][0]})).text,o[u][1],o[u][2]]):s.push(n(Object.assign({},c,{text:o[u]})).text);i.text=s}else i.text=n(Object.assign({},c,{text:o})).text}])}(YA),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}}(YA.API),function(A){A.__bidiEngine__=A.prototype.__bidiEngine__=function(r){var n,i,o,s,c,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},I=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],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)$/),M=!1,G=0;this.__bidiEngine__={};var O=function(_){var S=_.charCodeAt(),P=S>>8,K=y[P];return K!==void 0?p[256*K+(255&S)]:P===252||P===253?"AL":b.test(P)?"L":P===8?"R":"N"},J=function(_){for(var S,P=0;P<_.length;P++){if((S=O(_.charAt(P)))==="L")return!1;if(S==="R")return!0}return!1},Z=function(_,S,P,K){var sA,cA,lA,rA,hA=S[K];switch(hA){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":M=!1;break;case"N":case"AN":break;case"EN":M&&(hA="AN");break;case"AL":M=!0,hA="R";break;case"WS":case"BN":hA="N";break;case"CS":K<1||K+1>=S.length||(sA=P[K-1])!=="EN"&&sA!=="AN"||(cA=S[K+1])!=="EN"&&cA!=="AN"?hA="N":M&&(cA="AN"),hA=cA===sA?cA:"N";break;case"ES":hA=(sA=K>0?P[K-1]:"B")==="EN"&&K+1<S.length&&S[K+1]==="EN"?"EN":"N";break;case"ET":if(K>0&&P[K-1]==="EN"){hA="EN";break}if(M){hA="N";break}for(lA=K+1,rA=S.length;lA<rA&&S[lA]==="ET";)lA++;hA=lA<rA&&S[lA]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(rA=S.length,lA=K+1;lA<rA&&S[lA]==="NSM";)lA++;if(lA<rA){var FA=_[K],wA=FA>=1425&&FA<=2303||FA===64286;if(sA=S[lA],wA&&(sA==="R"||sA==="AL")){hA="R";break}}}hA=K<1||(sA=S[K-1])==="B"?"N":P[K-1];break;case"B":M=!1,n=!0,hA=G;break;case"S":i=!0,hA="N"}return hA},nA=function(_,S,P){var K=_.split("");return P&&q(K,P,{hiLevel:G}),K.reverse(),S&&S.reverse(),K.join("")},q=function(_,S,P){var K,sA,cA,lA,rA,hA=-1,FA=_.length,wA=0,Q=[],T=G?g:w,R=[];for(M=!1,n=!1,i=!1,sA=0;sA<FA;sA++)R[sA]=O(_[sA]);for(cA=0;cA<FA;cA++){if(rA=wA,Q[cA]=Z(_,R,Q,cA),K=240&(wA=T[rA][F[Q[cA]]]),wA&=15,S[cA]=lA=T[wA][5],K>0)if(K===16){for(sA=hA;sA<cA;sA++)S[sA]=1;hA=-1}else hA=-1;if(T[wA][6])hA===-1&&(hA=cA);else if(hA>-1){for(sA=hA;sA<cA;sA++)S[sA]=lA;hA=-1}R[cA]==="B"&&(S[cA]=0),P.hiLevel|=lA}i&&function(W,X,tA){for(var uA=0;uA<tA;uA++)if(W[uA]==="S"){X[uA]=G;for(var j=uA-1;j>=0&&W[j]==="WS";j--)X[j]=G}}(R,S,FA)},H=function(_,S,P,K,sA){if(!(sA.hiLevel<_)){if(_===1&&G===1&&!n)return S.reverse(),void(P&&P.reverse());for(var cA,lA,rA,hA,FA=S.length,wA=0;wA<FA;){if(K[wA]>=_){for(rA=wA+1;rA<FA&&K[rA]>=_;)rA++;for(hA=wA,lA=rA-1;hA<lA;hA++,lA--)cA=S[hA],S[hA]=S[lA],S[lA]=cA,P&&(cA=P[hA],P[hA]=P[lA],P[lA]=cA);wA=rA}wA++}}},AA=function(_,S,P){var K=_.split(""),sA={hiLevel:G};return P||(P=[]),q(K,P,sA),function(cA,lA,rA){if(rA.hiLevel!==0&&f)for(var hA,FA=0;FA<cA.length;FA++)lA[FA]===1&&(hA=I.indexOf(cA[FA]))>=0&&(cA[FA]=I[hA+1])}(K,P,sA),H(2,K,S,P,sA),H(1,K,S,P,sA),K.join("")};return this.__bidiEngine__.doBidiReorder=function(_,S,P){if(function(sA,cA){if(cA)for(var lA=0;lA<sA.length;lA++)cA[lA]=lA;s===void 0&&(s=J(sA)),u===void 0&&(u=J(sA))}(_,S),o||!c||u)if(o&&c&&s^u)G=s?1:0,_=nA(_,S,P);else if(!o&&c&&u)G=s?1:0,_=AA(_,S,P),_=nA(_,S);else if(!o||s||c||u){if(o&&!c&&s^u)_=nA(_,S),s?(G=0,_=AA(_,S,P)):(G=1,_=AA(_,S,P),_=nA(_,S));else if(o&&s&&!c&&u)G=1,_=AA(_,S,P),_=nA(_,S);else if(!o&&!c&&s^u){var K=f;s?(G=1,_=AA(_,S,P),G=0,f=!1,_=AA(_,S,P),f=K):(G=0,_=AA(_,S,P),_=nA(_,S),G=1,f=!1,_=AA(_,S,P),f=K,_=nA(_,S))}}else G=0,_=AA(_,S,P);else G=s?1:0,_=AA(_,S,P);return _},this.__bidiEngine__.setOptions=function(_){_&&(o=_.isInputVisual,c=_.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})}])}(YA),YA.API.TTFFont=function(){function A(e){var t;if(this.rawData=e,t=this.contents=new ci(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new HF(this),this.registerTTF()}return A.open=function(e){return new A(e)},A.prototype.parse=function(){return this.directory=new vF(this.contents),this.head=new CF(this),this.name=new UF(this),this.cmap=new rB(this),this.toUnicode={},this.hhea=new bF(this),this.maxp=new _F(this),this.hmtx=new xF(this),this.post=new QF(this),this.os2=new FF(this),this.loca=new SF(this),this.glyf=new EF(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,c,u;for(u=[],o=0,s=(c=this.bbox).length;o<s;o++)e=c[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 Gr,ci=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,c;return e=this.readByte(),t=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),c=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^c)+1):72057594037927940*e+281474976710656*t+1099511627776*r+4294967296*n+16777216*i+65536*o+256*s+c},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}(),vF=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,c,u,f,p,w,g,F,y;for(y in g=Object.keys(t).length,c=Math.log(2),p=16*Math.floor(Math.log(g)/c),o=Math.floor(p/c),f=16*g-p,(n=new ci).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=nB.call(t);t.length%4;)t.push(0);for(i=new ci(t),n=0,r=0,o=t.length;r<o;r=r+=4)n+=i.readUInt32();return 4294967295&n},e}(),mF={}.hasOwnProperty,un=function(A,e){for(var t in e)mF.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};Gr=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 CF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),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 ci).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}(),Vd=function(){function A(e,t){var r,n,i,o,s,c,u,f,p,w,g,F,y,I,b,M,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(c=0;c<256;++c)this.codeMap[c]=e.readByte();break;case 4:for(g=e.readUInt16(),w=g/2,e.pos+=6,i=function(){var O,J;for(J=[],c=O=0;0<=w?O<w:O>w;c=0<=w?++O:--O)J.push(e.readUInt16());return J}(),e.pos+=2,y=function(){var O,J;for(J=[],c=O=0;0<=w?O<w:O>w;c=0<=w?++O:--O)J.push(e.readUInt16());return J}(),u=function(){var O,J;for(J=[],c=O=0;0<=w?O<w:O>w;c=0<=w?++O:--O)J.push(e.readUInt16());return J}(),f=function(){var O,J;for(J=[],c=O=0;0<=w?O<w:O>w;c=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=[],c=O=0;0<=n?O<n:O>n;c=0<=n?++O:--O)J.push(e.readUInt16());return J}(),c=b=0,G=i.length;b<G;c=++b)for(I=i[c],r=M=F=y[c];F<=I?M<=I:M>=I;r=F<=I?++M:--M)f[c]===0?o=r+u[c]:(o=s[f[c]/2+(r-F)-(w-c)]||0)!==0&&(o+=u[c]),this.codeMap[r]=65535&o}e.pos=p}return A.encode=function(e,t){var r,n,i,o,s,c,u,f,p,w,g,F,y,I,b,M,G,O,J,Z,nA,q,H,AA,_,S,P,K,sA,cA,lA,rA,hA,FA,wA,Q,T,R,W,X,tA,uA,j,oA,CA,yA;switch(K=new ci,o=Object.keys(e).sort(function(UA,NA){return UA-NA}),t){case"macroman":for(y=0,I=function(){var UA=[];for(F=0;F<256;++F)UA.push(0);return UA}(),M={0:0},i={},sA=0,hA=o.length;sA<hA;sA++)M[j=e[n=o[sA]]]==null&&(M[j]=++y),i[n]={old:e[n],new:M[e[n]]},I[n]=M[e[n]];return K.writeUInt16(1),K.writeUInt16(0),K.writeUInt32(12),K.writeUInt16(0),K.writeUInt16(262),K.writeUInt16(0),K.write(I),{charMap:i,subtable:K.data,maxGlyphID:y+1};case"unicode":for(S=[],p=[],G=0,M={},r={},b=u=null,cA=0,FA=o.length;cA<FA;cA++)M[J=e[n=o[cA]]]==null&&(M[J]=++G),r[n]={old:J,new:M[J]},s=M[J]-n,b!=null&&s===u||(b&&p.push(b),S.push(n),u=s),b=n;for(b&&p.push(b),p.push(65535),S.push(65535),AA=2*(H=S.length),q=2*Math.pow(Math.log(H)/Math.LN2,2),w=Math.log(q/2)/Math.LN2,nA=2*H-q,c=[],Z=[],g=[],F=lA=0,wA=S.length;lA<wA;F=++lA){if(_=S[F],f=p[F],_===65535){c.push(0),Z.push(0);break}if(_-(P=r[_].new)>=32768)for(c.push(0),Z.push(2*(g.length+H-F)),n=rA=_;_<=f?rA<=f:rA>=f;n=_<=f?++rA:--rA)g.push(r[n].new);else c.push(P-_),Z.push(0)}for(K.writeUInt16(3),K.writeUInt16(1),K.writeUInt32(12),K.writeUInt16(4),K.writeUInt16(16+8*H+2*g.length),K.writeUInt16(0),K.writeUInt16(AA),K.writeUInt16(q),K.writeUInt16(w),K.writeUInt16(nA),tA=0,Q=p.length;tA<Q;tA++)n=p[tA],K.writeUInt16(n);for(K.writeUInt16(0),uA=0,T=S.length;uA<T;uA++)n=S[uA],K.writeUInt16(n);for(oA=0,R=c.length;oA<R;oA++)s=c[oA],K.writeUInt16(s);for(CA=0,W=Z.length;CA<W;CA++)O=Z[CA],K.writeUInt16(O);for(yA=0,X=g.length;yA<X;yA++)y=g[yA],K.writeUInt16(y);return{charMap:r,subtable:K.data,maxGlyphID:G+1}}},A}(),rB=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),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 Vd(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=Vd.encode(e,t),(n=new ci).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 un(A,Gr),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}(),FF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),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}(),QF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),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,c;for(c=[],i=o=0,s=this.file.maxp.numGlyphs;0<=s?o<s:o>s;i=0<=s?++o:--o)c.push(e.readUInt32());return c}).call(this)}},A}(),yF=function(A,e){this.raw=A,this.length=A.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},UF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),A.prototype.tag="name",A.prototype.parse=function(e){var t,r,n,i,o,s,c,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(c={},i=f=0,p=r.length;f<p;i=++f)n=r[i],e.pos=n.offset,u=e.readString(n.length),o=new yF(u,n),c[w=n.nameID]==null&&(c[w]=[]),c[n.nameID].push(o);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfamily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},A}(),_F=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),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}(),xF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),A.prototype.tag="hmtx",A.prototype.parse=function(e){var t,r,n,i,o,s,c;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],c=[],t=o=0;0<=n?o<n:o>n;t=0<=n?++o:--o)c.push(this.widths.push(r));return c},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}(),nB=[].slice,EF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),A.prototype.tag="glyf",A.prototype.parse=function(){return this.cache={}},A.prototype.glyphFor=function(e){var t,r,n,i,o,s,c,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 ci(t.read(n))).readShort(),u=s.readShort(),p=s.readShort(),c=s.readShort(),f=s.readShort(),this.cache[e]=o===-1?new IF(s,u,p,c,f):new LF(s,o,u,p,c,f),this.cache[e]))},A.prototype.encode=function(e,t,r){var n,i,o,s,c;for(o=[],i=[],s=0,c=t.length;s<c;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}(),LF=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}(),IF=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 ci(nB.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)t.pos=this.glyphOffsets[e];return t.data},A}(),SF=function(){function A(){return A.__super__.constructor.apply(this,arguments)}return un(A,Gr),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],c=this.offsets[o+1]-s;c>0&&(n+=c)}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}(),HF=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,c;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 c=this.glyphsFor(t))r=c[i],n[i]=r;return n},A.prototype.encode=function(e,t){var r,n,i,o,s,c,u,f,p,w,g,F,y,I,b;for(n in r=rB.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),g={0:0},b=r.charMap)g[(c=b[n]).old]=c.new;for(F in w=r.maxGlyphID,o)F in g||(g[F]=w++);return f=function(M){var G,O;for(G in O={},M)O[M[G]]=G;return O}(g),p=Object.keys(f).sort(function(M,G){return M-G}),y=function(){var M,G,O;for(O=[],M=0,G=p.length;M<G;M++)s=p[M],O.push(f[s]);return O}(),i=this.font.glyf.encode(o,y,g),u=this.font.loca.encode(i.offsets,y),I={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&&(I["OS/2"]=this.font.os2.raw()),this.font.directory.encode(I)},A}();YA.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,c,u;for(u=[],s=0,c=t.length;s<c;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 NF=GB`
	0% { background-color: #4caf50; color: #fff; }
	100% { background-color: transparent; color: inherit; }
`,YQ=()=>{var wA,Q,T,R,W,X,tA,uA;const{id:A}=VB(),e=qB(),t=WB();zB(j=>XB(j));const{Statement:{selectedData:r,loading:n,ledger:i,ledgerLoading:o,authorizationCheck:s,authorizationCheckLoading:c}}=JB();Ft.useEffect(()=>{A&&(t(Ol({id:A})),t(Fh({id:A})),t(YB({id:A})))},[A]);const u=((r==null?void 0:r.payments)||[]).filter(j=>j.authorized_status!==3),[f,p]=Ft.useState([]),[w,g]=Ft.useState(1),[F,y]=Ft.useState(10),I=Ft.useRef(null),[b,M]=Ft.useState(!1),G=Ft.useCallback(async()=>{if(I.current){M(!0);try{const j=new YA({orientation:"portrait",unit:"mm",format:"a4"}),oA=j.internal.pageSize.getWidth(),CA=j.internal.pageSize.getHeight(),yA=10,UA=I.current.querySelector("table"),NA=UA==null?void 0:UA.querySelector("thead"),L=UA==null?void 0:UA.querySelector("tbody"),_A=L==null?void 0:L.querySelectorAll("tr"),xA=await X1(I.current,{scale:2,useCORS:!0,backgroundColor:"#ffffff",logging:!1,width:I.current.offsetWidth,windowWidth:I.current.offsetWidth}),KA=xA.toDataURL("image/png"),fA=oA,SA=xA.height*oA/xA.width,LA=I.current.getBoundingClientRect(),zA=NA==null?void 0:NA.getBoundingClientRect(),JA=L==null?void 0:L.getBoundingClientRect(),Qe=UA==null?void 0:UA.getBoundingClientRect(),ie=xA.height/I.current.offsetHeight;let re=0,Be=0,de=0,MA=0;Qe&&LA&&(re=Qe.top-LA.top),zA&&LA&&(Be=zA.top-LA.top,de=zA.height),JA&&LA&&(MA=JA.top-LA.top);const Ae=re*ie,WA=Be*ie,Ue=de*ie,we=MA*ie,ce=Ae/xA.height*SA,ne=Ue/xA.height*SA,je=we/xA.height*SA,jA=[];if(_A&&_A.length>0&&_A.forEach(Ce=>{const GA=Ce.getBoundingClientRect(),PA=GA.top-LA.top,xe=GA.height,se=PA*ie,DA=xe*ie,$A=se/xA.height*SA,$e=DA/xA.height*SA;jA.push({startPx:PA,heightPx:xe,startCanvas:se,heightCanvas:DA,startMM:$A,heightMM:$e})}),SA<=CA-2*yA)j.addImage(KA,"PNG",0,yA,fA,SA);else{let Ce=0,GA=0,PA=yA,xe=CA-2*yA;for(;GA<jA.length||Ce===0;){Ce>0&&(j.addPage(),PA=yA);let DA=CA-2*yA;if(Ce===0){PA=yA;const $A=document.createElement("canvas");$A.width=xA.width,$A.height=Ae;const $e=$A.getContext("2d");if($e&&Ae>0){$e.drawImage(xA,0,0,xA.width,Ae,0,0,xA.width,Ae);const ge=$A.toDataURL("image/png");j.addImage(ge,"PNG",0,PA,oA,ce),PA+=ce,DA-=ce}if(Ue>0){const ge=document.createElement("canvas");ge.width=xA.width,ge.height=Ue;const We=ge.getContext("2d");if(We){We.drawImage(xA,0,WA,xA.width,Ue,0,0,xA.width,Ue);const Ct=ge.toDataURL("image/png");j.addImage(Ct,"PNG",0,PA,oA,ne),PA+=ne,DA-=ne}}for(;GA<jA.length;){const ge=jA[GA];if(ge.heightMM>DA)break;const We=document.createElement("canvas");We.width=xA.width,We.height=ge.heightCanvas;const Ct=We.getContext("2d");if(Ct){Ct.drawImage(xA,0,ge.startCanvas,xA.width,ge.heightCanvas,0,0,xA.width,ge.heightCanvas);const ZA=We.toDataURL("image/png");j.addImage(ZA,"PNG",0,PA,oA,ge.heightMM),PA+=ge.heightMM,DA-=ge.heightMM}GA++}}else{if(Ue>0){const $A=document.createElement("canvas");$A.width=xA.width,$A.height=Ue;const $e=$A.getContext("2d");if($e){$e.drawImage(xA,0,WA,xA.width,Ue,0,0,xA.width,Ue);const ge=$A.toDataURL("image/png");j.addImage(ge,"PNG",0,PA,oA,ne),PA+=ne,DA-=ne}}for(;GA<jA.length;){const $A=jA[GA];if($A.heightMM>DA)break;const $e=document.createElement("canvas");$e.width=xA.width,$e.height=$A.heightCanvas;const ge=$e.getContext("2d");if(ge){ge.drawImage(xA,0,$A.startCanvas,xA.width,$A.heightCanvas,0,0,xA.width,$A.heightCanvas);const We=$e.toDataURL("image/png");j.addImage(We,"PNG",0,PA,oA,$A.heightMM),PA+=$A.heightMM,DA-=$A.heightMM}GA++}}if(Ce++,xe=DA,Ce>100||GA>=jA.length)break}const se=I.current.querySelector("[data-summary-section]");if(se){const DA=se.getBoundingClientRect(),$A=DA.top-LA.top,$e=DA.height,ge=$A*ie,We=$e*ie,Ct=We/xA.height*SA,ZA=5;Ct+ZA>xe?(j.addPage(),PA=yA):PA+=ZA;const Zt=document.createElement("canvas");Zt.width=xA.width,Zt.height=We;const wr=Zt.getContext("2d");if(wr){wr.drawImage(xA,0,ge,xA.width,We,0,0,xA.width,We);const $t=Zt.toDataURL("image/png");j.addImage($t,"PNG",0,PA,oA,Ct)}}}j.save(`Statement_${(i==null?void 0:i.statement_code)||(r==null?void 0:r.code)||"details"}.pdf`)}catch(j){console.error("PDF generation error:",j)}finally{M(!1)}}},[i==null?void 0:i.statement_code,r==null?void 0:r.code]),O=Ft.useCallback(()=>{var xA,KA;if(!((xA=i==null?void 0:i.ledger)!=null&&xA.length))return;const j=["S.No","Date","Code","Project","Cost Center","Expense Type","Description","Type","Amount (₹)"],oA=fA=>{const SA=String(fA??"---");return SA.includes(",")||SA.includes('"')||SA.includes(`
`)?`"${SA.replace(/"/g,'""')}"`:SA},CA=i.ledger.map((fA,SA)=>{var LA,zA;return[SA+1,fA.date||"---",fA.code||"---",fA!=null&&fA.location?typeof fA.location=="object"?`${((LA=fA.location)==null?void 0:LA[fA.location_code])??"---"}[${fA.location_code??""}]`:`${fA.location}[${fA.location_code??""}]`:"---",fA!=null&&fA.costcenter?typeof fA.costcenter=="object"?`${((zA=fA.costcenter)==null?void 0:zA[fA.costcenter_code])??"---"}[${fA.costcenter_code??""}]`:`${fA.costcenter}[${fA.costcenter_code??""}]`:"---",fA.expensetype==="Transfer Money"?`${fA.expensetype}[${fA.to_user}]`:fA.expensetype||"---",fA.description||"---",fA.type||"---",An(fA.amount,"en-IN")].map(oA).join(",")}),UA=[`Date: ${ko(i==null?void 0:i.date).format("DD-MM-YYYY")||"---"}`,`Code: ${i.statement_code||"---"}`,`User: ${i!=null&&i.user?`${i.user} [${(i==null?void 0:i.user_code)??""}]`:"---"}`,`Opening Balance: ₹${An(i.opening_balance,"en-IN")}`,`Closing Balance: ₹${An(i.closing_balance,"en-IN")}`].join(`
`)+`

`+j.join(",")+`
`+CA.join(`
`)+`
,,,,,,,Closing Balance,₹${i.closing_balance}

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