1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-CfCbvP_S.js","assets/index-CC1u1DhI.js","assets/index--It4Iap6.css","assets/otp-YaAdehxP.js","assets/button-D7RObRbP.js","assets/clsx-B-dksMZM.js","assets/utils-B6c5mWi-.js","assets/x-JwK8Qfkw.js","assets/createLucideIcon-BL9-6JVW.js","assets/card-CK9oc1EM.js","assets/trash-2-CwK4_2KO.js","assets/loader-circle-DiVSng2e.js","assets/badge-idllAojT.js","assets/table-BAWZH_9X.js","assets/chevron-left-DPOi437k.js","assets/PdfViewer-CEqgR14K.js","assets/PdfViewer-Bu5q60D-.css","assets/skeleton-FSyVJSkU.js","assets/circle-check-C47T3Y3n.js"])))=>i.map(i=>d[i]); 2var Ah=Object.defineProperty;var _h=(n,t,e)=>t in n?Ah(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var Pt=(n,t,e)=>_h(n,typeof t!="symbol"?t+"":t,e);import{l as Uu,p as vn,r as _e,j as b,_ as Oo,u as Lh,a as Sh,g as kh,y as Ph,A as Ro}from"./index-CC1u1DhI.js";import{c as jh}from"./otp-YaAdehxP.js";import{B as Bt}from"./button-D7RObRbP.js";import{X as di}from"./x-JwK8Qfkw.js";import{b as dl,C as ta,a as Ia}from"./card-CK9oc1EM.js";import{D as Ch,T as Eh}from"./trash-2-CwK4_2KO.js";import{L as Sl}from"./loader-circle-DiVSng2e.js";import{B as mc,b as Ih}from"./badge-idllAojT.js";import{c as ys}from"./utils-B6c5mWi-.js";import{C as Fh,T as Th,a as Mh,b as Vs,c as gc,d as Dh,e as hs}from"./table-BAWZH_9X.js";import{C as bc}from"./chevron-left-DPOi437k.js";import{P as Oh}from"./PdfViewer-CEqgR14K.js";import{S as Yr}from"./skeleton-FSyVJSkU.js";import{c as mo}from"./createLucideIcon-BL9-6JVW.js";import{C as Bo}from"./circle-check-C47T3Y3n.js";/** 3 * @license lucide-react v0.575.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const Rh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],vc=mo("circle-question-mark",Rh);/** 8 * @license lucide-react v0.575.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const Bh=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],yc=mo("landmark",Bh);/** 13 * @license lucide-react v0.575.0 - ISC 14 * 15 * This source code is licensed under the ISC license. 16 * See the LICENSE file in the root directory of this source tree. 17 */const qh=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],xc=mo("pencil",qh);/** 18 * @license lucide-react v0.575.0 - ISC 19 * 20 * This source code is licensed under the ISC license. 21 * See the LICENSE file in the root directory of this source tree. 22 */const Uh=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],zh=mo("wallet",Uh);async function Hh(n){return Uu(`/api/repayments/payment-preferences?parentId=${encodeURIComponent(n)}`)}async function Wh(n){return vn("/api/repayments/payment-preferences",{parentId:n,action:"agree"})}async function Vh(n){return vn("/api/repayments/payment-preferences",{parentId:n,action:"mark_autopay"})}async function Gh(n){return vn("/api/repayments/payment-preferences",{parentId:n,action:"unmark_autopay"})}async function Yh(n){return Uu(`/api/repayments/summary?parentId=${encodeURIComponent(n)}`)}async function $h(n){return(await vn("/api/repayments/statements",{parentId:n})).statements??[]}async function Kh(n,t){return vn("/api/repayments/statements/download",{parentId:n,billingCycleId:t})}async function Jh(n){return(await vn("/api/repayments/methods/list",{parentId:n})).methods??[]}async function Xh(n){return vn("/api/repayments/methods/obo-token",{parentId:n})}async function Zh(n,t){return vn("/api/repayments/methods/add-bank",{parentId:n,...t})}async function Qh(n,t){return vn("/api/repayments/methods/remove",{parentId:n,...t})}async function ed(n,t){const{idempotencyKey:e,...r}=t;return vn("/api/repayments/make-payment",{parentId:n,...r,...e?{idempotencyKey:e}:{}},{headers:e?{"X-Idempotency-Key":e}:void 0})}async function Gs(n,t){return vn("/api/repayments/transactions",{parentId:n,...t})}async function td(n){return(await vn("/api/repayments/autopay/list",{parentId:n})).autopays??[]}async function wc(n){return(await vn("/api/repayments/scheduled-payments/list",{parentId:n})).scheduledPayments??[]}
22async function nd(n,t){return vn("/api/repayments/scheduled-payments/cancel",{parentId:n,scheduledPaymentId:t})}async function rd(n,t){return await vn("/api/repayments/autopay/create",{parentId:n,...t})}async function id(n,t){return await vn("/api/repayments/autopay/cancel",{parentId:n,autopayId:t})}async function ad(n,t){return(await vn("/api/repayments/autopay/history",{parentId:n,autopayId:t})).history??[]}async function sd(n,t,e){await vn("/api/repayments/autopay/receipt/save",{parentId:n,loanproAutopayId:t,pdfBase64:e})}async function od(n,t){const e={parentId:n};return t!=null&&(e.loanproAutopayId=t),(await vn("/api/repayments/autopay/receipt/get",e)).receipts??[]}const ld=1e3,cd="Pathfinder AutoPay",ud="autopay.recurringFrequency.monthly",fd="h-9 w-full rounded-lg border border-[#e4e5e7] bg-white px-3 text-[13px] text-[#2b2d31] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6918eb]";function hd({mode:n,existingAutopay:t,paymentMethods:e,paymentDueDate:r,saving:s,onSave:a,onClose:f}){const l=e.filter(ne=>ne.active&&ne.visible&&ne.methodType==="bank"),u=_e.useId(),d=_e.useRef(null),m=_e.useRef(null),w=_e.useRef(null),S="recurring",p=(t==null?void 0:t.applyDate)??r,C=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"}),E=ne=>C.format(new Date(`${ne}T00:00:00`)),[O,k]=_e.useState((t==null?void 0:t.paymentMethodId)!=null?String(t.paymentMethodId):l[0]?String(l[0].id):""),[Y,V]=_e.useState(null),[q,oe]=_e.useState({});_e.useEffect(()=>{var R;w.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(R=m.current)==null||R.focus();const ne=d.current;if(!ne)return;const K=Z=>{if(Z.key==="Escape"){Z.preventDefault(),f();return}if(Z.key!=="Tab")return;const _=ne.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!_.length)return;const I=_[0],H=_[_.length-1],U=document.activeElement;Z.shiftKey&&U===I?(Z.preventDefault(),H.focus()):!Z.shiftKey&&U===H&&(Z.preventDefault(),I.focus())};return ne.addEventListener("keydown",K),()=>{var Z,_;ne.removeEventListener("keydown",K),(_=(Z=w.current)==null?void 0:Z.focus)==null||_.call(Z)}},[f]);const ye=()=>{V(null);const ne={};if(p||(ne.applyDate="No Payment Due Date available. Cannot set up AutoPay."),O||(ne.paymentMethodId="Select a payment method."),oe(ne),Object.keys(ne).length>0){V("Please resolve the highlighted fields before continuing.");return}const K={name:cd,type:S,applyDate:p,paymentMethodId:Number(O),recurringFrequency:ud,recurringPeriods:ld};a(K)};return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:f,children:b.jsxs("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":u,className:"max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl border border-[#ececef] bg-white shadow-xl",onClick:ne=>ne.stopPropagation(),children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-6 py-4",children:[b.jsx("h2",{id:u,className:"text-[16px] font-semibold text-[#1F0151]",children:n==="create"?"Setup Automatic Payment":"Edit Automatic Payment"}),b.jsx("button",{ref:m,type:"button",onClick:f,className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4]",children:b.jsx(di,{className:"h-5 w-5"})})]}),b.jsxs("div",{className:"space-y-4 px-6 py-5",children:[Y&&b.jsx("p",{id:"autopay-validation-error",className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:Y}),b.jsx(Ys,{idPrefix:"autopay-amount-type",label:"Amount",children:b.jsx("p",{id:"autopay-amount-type",className:"h-9 flex items-center rounded-lg border border-[#e4e5e7] bg-[#f9f9fa] px-3 text-[13px] text-[#2b2d31]",children:"Statement Balance"})}),b.jsx(Ys,{idPrefix:"autopay-frequency",label:"Frequency",children:b.jsx("p",{id:"autopay-frequency",className:"h-9 flex items-center rounded-lg border border-[#e4e5e7] bg-[#f9f9fa] px-3 text-[13px] text-[#2b2d31]",children:"Monthly"})}),b.jsxs(Ys,{idPrefix:"autopay-due-date",label:"Payment Due Date",children:[b.jsx("p",{id:"autopay-due-date",className:"h-9 flex items-center rounded-lg border border-[#e4e5e7] bg-[#f9f9fa] px-3 text-[13px] text-[#2b2d31]",children:p?E(p):"No Payment Due Date available"}),b.jsxs("p",{className:"mt-1 text-[11px] leading-relaxed text-[#6b7079]",children:["AutoPay both ",b.jsx("span",{children:"processes and applies on your Payment Due Date"}),". If the attempt fails, AutoPay will ",b.jsx("span",{children:"remain active for future billing cycles"}),", but you will be responsible for submitting a ",b.jsx("span",{children:"one-time payment"})," for the affected cycle to avoid late fees. You can cancel or modify this AutoPay ",b.jsx("span",{children:"up to 2 business days before"})," the next Payment Due Date. Your ",b.jsx("span",{children:"available credit"})," appears once the payment is submitted."]})]}),b.jsx(Ys,{idPrefix:"autopay-payment-method",label:"Payment Method",children:b.jsxs("select",{id:"autopay-payment-method",value:O,onChange:ne=>k(ne.target.value),className:fd,"aria-invalid":!!q.paymentMethodId,"aria-describedby":q.paymentMethodId?"autopay-payment-method-error":void 0,children:[l.length===0&&b.jsx("option",{value:"",children:"No methods available"}),l.length>0&&b.jsx("option",{value:"",children:"Select option"}),l.map(ne=>b.jsxs("option",{value:ne.id,children:[ne.title||"Payment Method"," (ACH",ne.last4?` â¢â¢â¢â¢ ${ne.last4}`:"",")"]},ne.id))]})}),q.paymentMethodId&&b.jsx("p",{id:"autopay-payment-method-error",className:"text-[12px] text-[#c04c2d]",children:q.paymentMethodId})]}),b.jsx("div",{className:"flex items-center justify-end gap-3 border-t border-[#ececef] px-6 py-4",children:b.jsx(Bt,{className:`w-full text-white disabled:opacity-100 ${s||!p||!O||l.length===0?"bg-[#a6a6ab] hover:bg-[#8f8f95]":"bg-[#6918eb] hover:bg-[#5a14c9]"}`,onClick:ye,disabled:s,children:s?"Saving...":b.jsxs("span",{className:"inline-flex items-center gap-1",children:["Continue ",b.jsx(dl,{className:"h-4 w-4"})]})})})]})})}function Ys({idPrefix:n,label:t,children:e}){return b.jsxs("div",{children:[b.jsx("div",{className:"mb-1 flex items-center gap-1",children:b.jsx("label",{htmlFor:n,className:"text-[12px] font-medium text-[#2b2d31]",children:t})}),e]})}function jt(n){"@babel/helpers - typeof";return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(n)}var Pr=Uint8Array,dr=Uint16Array,kl=Int32Array,Pl=new Pr([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]),jl=new Pr([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]),Nc=new Pr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zu=function(n,t){for(var e=new dr(31),r=0;r<31;++r)e[r]=t+=1<<n[r-1];for(var s=new kl(e[30]),r=1;r<30;++r)for(var a=e[r];a<e[r+1];++a)s[a]=a-e[r]<<5|r;return{b:e,r:s}},Hu=zu(Pl,2),dd=Hu.b,pl=Hu.r;dd[28]=258,pl[258]=28;var pd=zu(jl,0),Ac=pd.r,ml=new dr(32768);for(var Wt=0;Wt<32768;++Wt){var Ci=(Wt&43690)>>1|(Wt&21845)<<1;Ci=(Ci&52428)>>2|(Ci&13107)<<2,Ci=(Ci&61680)>>4|(Ci&3855)<<4,ml[Wt]=((Ci&65280)>>8|(Ci&255)<<8)>>1}var ms=function(n,t,e){for(var r=n.length,s=0,a=new dr(t);s<r;++s)n[s]&&++a[n[s]-1];var f=new dr(t);for(s=1;s<t;++s)f[s]=f[s-1]+a[s-1]<<1;var l;if(e){l=new dr(1<<t);var u=15-t;for(s=0;s<r;++s)if(n[s])for(var d=s<<4|n[s],m=t-n[s],w=f[n[s]-1]++<<m,S=w|(1<<m)-1;w<=S;++w)l[ml[w]>>u]=d}else for(l=new dr(r),s=0;s<r;++s)n[s]&&(l[s]=ml[f[n[s]-1]++]>>15-n[s]);return l},ia=new Pr(288);for(var Wt=0;Wt<144;++Wt)ia[Wt]=8;for(var Wt=144;Wt<256;++Wt)ia[Wt]=9;for(var Wt=256;Wt<280;++Wt)ia[Wt]=7;for(var Wt=280;Wt<288;++Wt)ia[Wt]=8;var uo=new Pr(32);for(var Wt=0;Wt<32;++Wt)uo[Wt]=5;var md=ms(ia,9,0),gd=ms(uo,5,0),Wu=function(n){return(n+7)/8|0},bd=function(n,t,e){return(e==null||e>n.length)&&(e=n.length),new Pr(n.subarray(t,e))},ci=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8},ds=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8,n[r+2]|=e>>16},qo=function(n,t){for(var e=[],r=0;r<n.length;++r)n[r]&&e.push({s:r,f:n[r]});var s=e.length,a=e.slice();if(!s)return{t:Gu,l:0};if(s==1){var f=new Pr(e[0].s+1);return f[e[0].s]=1,{t:f,l:1}}e.sort(function(oe,ye){return oe.f-ye.f}),e.push({s:-1,f:25001});var l=e[0],u=e[1],d=0,m=1,w=2;
vendor: 11,963 bytes, lines 22-23
22for(e[0]={s:-1,f:l.f+u.f,l,r:u};m!=s-1;)l=e[e[d].f<e[w].f?d++:w++],u=e[d!=m&&e[d].f<e[w].f?d++:w++],e[m++]={s:-1,f:l.f+u.f,l,r:u};for(var S=a[0].s,r=1;r<s;++r)a[r].s>S&&(S=a[r].s);var p=new dr(S+1),C=gl(e[m-1],p,0);if(C>t){var r=0,E=0,O=C-t,k=1<<O;for(a.sort(function(ye,ne){return p[ne.s]-p[ye.s]||ye.f-ne.f});r<s;++r){var Y=a[r].s;if(p[Y]>t)E+=k-(1<<C-p[Y]),p[Y]=t;else break}for(E>>=O;E>0;){var V=a[r].s;p[V]<t?E-=1<<t-p[V]++-1:++r}for(;r>=0&&E;--r){var q=a[r].s;p[q]==t&&(--p[q],++E)}C=t}return{t:new Pr(p),l:C}},gl=function(n,t,e){return n.s==-1?Math.max(gl(n.l,t,e+1),gl(n.r,t,e+1)):t[n.s]=e},_c=function(n){for(var t=n.length;t&&!n[--t];);for(var e=new dr(++t),r=0,s=n[0],a=1,f=function(u){e[r++]=u},l=1;l<=t;++l)if(n[l]==s&&l!=t)++a;else{if(!s&&a>2){for(;a>138;a-=138)f(32754);a>2&&(f(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(f(s),--a;a>6;a-=6)f(8304);a>2&&(f(a-3<<5|8208),a=0)}for(;a--;)f(s);a=1,s=n[l]}return{c:e.subarray(0,r),n:t}},ps=function(n,t){for(var e=0,r=0;r<t.length;++r)e+=n[r]*t[r];return e},Vu=function(n,t,e){var r=e.length,s=Wu(t+2);n[s]=r&255,n[s+1]=r>>8,n[s+2]=n[s]^255,n[s+3]=n[s+1]^255;for(var a=0;a<r;++a)n[s+a+4]=e[a];return(s+4+r)*8},Lc=function(n,t,e,r,s,a,f,l,u,d,m){ci(t,m++,e),++s[256];for(var w=qo(s,15),S=w.t,p=w.l,C=qo(a,15),E=C.t,O=C.l,k=_c(S),Y=k.c,V=k.n,q=_c(E),oe=q.c,ye=q.n,ne=new dr(19),K=0;K<Y.length;++K)++ne[Y[K]&31];for(var K=0;K<oe.length;++K)++ne[oe[K]&31];for(var R=qo(ne,7),Z=R.t,_=R.l,I=19;I>4&&!Z[Nc[I-1]];--I);var H=d+5<<3,U=ps(s,ia)+ps(a,uo)+f,se=ps(s,S)+ps(a,E)+f+14+3*I+ps(ne,Z)+2*ne[16]+3*ne[17]+7*ne[18];if(u>=0&&H<=U&&H<=se)return Vu(t,m,n.subarray(u,u+d));var le,he,te,de;if(ci(t,m,1+(se<U)),m+=2,se<U){le=ms(S,p,0),he=S,te=ms(E,O,0),de=E;var ke=ms(Z,_,0);ci(t,m,V-257),ci(t,m+5,ye-1),ci(t,m+10,I-4),m+=14;for(var K=0;K<I;++K)ci(t,m+3*K,Z[Nc[K]]);m+=3*I;for(var we=[Y,oe],A=0;A<2;++A)for(var D=we[A],K=0;K<D.length;++K){var B=D[K]&31;ci(t,m,ke[B]),m+=Z[B],B>15&&(ci(t,m,D[K]>>5&127),m+=D[K]>>12)}}else le=md,he=ia,te=gd,de=uo;for(var K=0;K<l;++K){var W=r[K];if(W>255){var B=W>>18&31;ds(t,m,le[B+257]),m+=he[B+257],B>7&&(ci(t,m,W>>23&31),m+=Pl[B]);var $=W&31;ds(t,m,te[$]),m+=de[$],$>3&&(ds(t,m,W>>5&8191),m+=jl[$])}else ds(t,m,le[W]),m+=he[W]}return ds(t,m,le[256]),m+he[256]},vd=new kl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gu=new Pr(0),yd=function(n,t,e,r,s,a){var f=a.z||n.length,l=new Pr(r+f+5*(1+Math.ceil(f/7e3))+s),u=l.subarray(r,l.length-s),d=a.l,m=(a.r||0)&7;if(t){m&&(u[0]=a.r>>3);for(var w=vd[t-1],S=w>>13,p=w&8191,C=(1<<e)-1,E=a.p||new dr(32768),O=a.h||new dr(C+1),k=Math.ceil(e/3),Y=2*k,V=function(Ee){return(n[Ee]^n[Ee+1]<<k^n[Ee+2]<<Y)&C},q=new kl(25e3),oe=new dr(288),ye=new dr(32),ne=0,K=0,R=a.i||0,Z=0,_=a.w||0,I=0;R+2<f;++R){var H=V(R),U=R&32767,se=O[H];if(E[U]=se,O[H]=U,_<=R){var le=f-R;if((ne>7e3||Z>24576)&&(le>423||!d)){m=Lc(n,u,0,q,oe,ye,K,Z,I,R-I,m),Z=ne=K=0,I=R;for(var he=0;he<286;++he)oe[he]=0;for(var he=0;he<30;++he)ye[he]=0}var te=2,de=0,ke=p,we=U-se&32767;if(le>2&&H==V(R-we))for(var A=Math.min(S,le)-1,D=Math.min(32767,R),B=Math.min(258,le);we<=D&&--ke&&U!=se;){if(n[R+te]==n[R+te-we]){for(var W=0;W<B&&n[R+W]==n[R+W-we];++W);if(W>te){if(te=W,de=we,W>A)break;for(var $=Math.min(we,W-2),Q=0,he=0;he<$;++he){var ce=R-we+he&32767,fe=E[ce],be=ce-fe&32767;be>Q&&(Q=be,se=ce)}}}U=se,se=E[U],we+=U-se&32767}if(de){q[Z++]=268435456|pl[te]<<18|Ac[de];var Pe=pl[te]&31,Ie=Ac[de]&31;K+=Pl[Pe]+jl[Ie],++oe[257+Pe],++ye[Ie],_=R+te,++ne}else q[Z++]=n[R],++oe[n[R]]}}for(R=Math.max(R,_);R<f;++R)q[Z++]=n[R],++oe[n[R]];m=Lc(n,u,d,q,oe,ye,K,Z,I,R-I,m),d||(a.r=m&7|u[m/8|0]<<3,m-=7,a.h=O,a.p=E,a.i=R,a.w=_)}else{for(var R=a.w||0;R<f+d;R+=65535){var ue=R+65535;ue>=f&&(u[m/8|0]=d,ue=f),m=Vu(u,m+1,n.subarray(R,ue))}a.i=f}return bd(l,0,r+Wu(m)+s)},Yu=function(){var n=1,t=0;return{p:function(e){for(var r=n,s=t,a=e.length|0,f=0;f!=a;){for(var l=Math.min(f+2655,a);f<l;++f)s+=r+=e[f];r=(r&65535)+15*(r>>16),s=(s&65535)+15*(s>>16)}n=r,t=s},d:function(){return n%=65521,t%=65521,(n&255)<<24|(n&65280)<<8|(t&255)<<8|t>>8}}},xd=function(n,t,e,r,s){if(!s&&(s={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),f=new Pr(a.length+n.length);f.set(a),f.set(n,a.length),n=f,s.w=a.length}return yd(n,t.level==null?6:t.level,t.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+t.mem,e,r,s)},$u=function(n,t,e){for(;e;++t)n[t]=e,e>>>=8},wd=function(n,t){var e=t.level,r=e==0?0:e<6?1:e==9?3:2;if(n[0]=120,n[1]=r<<6|(t.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,t.dictionary){var s=Yu();s.p(t.dictionary),$u(n,2,s.d())}};function bl(n,t){t||(t={});var e=Yu();e.p(n);var r=xd(n,t,t.dictionary?6:2,4);return wd(r,t),$u(r,r.length-4,e.d()),r}var Nd=typeof TextDecoder<"u"&&new TextDecoder,Ad=0;try{Nd.decode(Gu,{stream:!0}),Ad=1}catch{}function _d(n){if(Array.isArray(n))return n}function Ld(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,s,a,f,l=[],u=!0,d=!1;try{if(a=(e=e.call(n)).next,t!==0)for(;!(u=(r=a.call(e)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(m){d=!0,s=m}finally{try{if(!u&&e.return!=null&&(f=e.return(),Object(f)!==f))return}finally{if(d)throw s}}return l}}function Sc(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function Sd(n,t){if(n){if(typeof n=="string")return Sc(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Sc(n,t):void 0}}function kd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 23In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kc(n,t){return _d(n)||Ld(n,t)||Sd(n,t)||kd()}function Pc(n,t="utf8"){return new TextDecoder(t).decode(n)}const Pd=new TextEncoder;function jd(n){return Pd.encode(n)}const Cd=1024*8,Ed=(()=>{const n=new Uint8Array(4),t=new Uint32Array(n.buffer);return!((t[0]=1)&n[0])})(),Uo={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Cl{constructor(t=Cd,e={}){Pt(this,"buffer");Pt(this,"byteLength");Pt(this,"byteOffset");Pt(this,"length");Pt(this,"offset");Pt(this,"lastWrittenByte");Pt(this,"littleEndian");Pt(this,"_data");Pt(this,"_mark");Pt(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const s=e.offset?e.offset>>>0:0,a=t.byteLength-s;let f=s;(ArrayBuffer.isView(t)||t instanceof Cl)&&(t.byteLength!==t.buffer.byteLength&&(f=t.byteOffset+s),t=t.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,a),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,s=new Uint8Array(r);s.set(new Uint8Array(this.buffer)),this.buffer=s.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=Uo[e].BYTES_PER_ELEMENT*t,s=this.byteOffset+this.offset,a=this.buffer.slice(s,s+r);if(this.littleEndian===Ed&&e!=="uint8"&&e!=="int8"){const l=new Uint8Array(this.buffer.slice(s,s+r));l.reverse();const u=new Uo[e](l.buffer);return this.offset+=r,u.reverse(),u}const f=new Uo[e](a);return this.offset+=r,f}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;r<t;r++)e+=this.readChar();return e}readUtf8(t=1){return Pc(this.readBytes(t))}decodeText(t=1,e="utf8"){return Pc(this.readBytes(t),e)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let e=0;e<t.length;e++)this._data.setUint8(this.offset++,t[e]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let e=0;e<t.length;e++)this.writeUint8(t.charCodeAt(e));return this}writeUtf8(t){return this.writeBytes(jd(t))}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)}}function Ba(n){let t=n.length;for(;--t>=0;)n[t]=0}const Id=3,Fd=258,Ku=29,Td=256,Md=Td+1+Ku,Ju=30,Dd=512,Od=new Array((Md+2)*2);Ba(Od);const Rd=new Array(Ju*2);Ba(Rd);const Bd=new Array(Dd);Ba(Bd);const qd=new Array(Fd-Id+1);Ba(qd);const Ud=new Array(Ku);Ba(Ud);const zd=new Array(Ju);Ba(zd);const Hd=(n,t,e,r)=>{let s=n&65535|0,a=n>>>16&65535|0,f=0;for(;e!==0;){f=e>2e3?2e3:e,e-=f;do s=s+t[r++]|0,a=a+s|0;while(--f);
vendor: 20,096 bytes, line 23
23s%=65521,a%=65521}return s|a<<16|0};var vl=Hd;const Wd=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},Vd=new Uint32Array(Wd()),Gd=(n,t,e,r)=>{const s=Vd,a=r+e;n^=-1;for(let f=r;f<a;f++)n=n>>>8^s[(n^t[f])&255];return n^-1};var Wr=Gd,yl={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"},Xu={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const Yd=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var $d=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)Yd(e,r)&&(n[r]=e[r])}}return n},Kd=n=>{let t=0;for(let r=0,s=n.length;r<s;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,s=0,a=n.length;r<a;r++){let f=n[r];e.set(f,s),s+=f.length}return e},Zu={assign:$d,flattenChunks:Kd};let Qu=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Qu=!1}const bs=new Uint8Array(256);for(let n=0;n<256;n++)bs[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;bs[254]=bs[254]=1;var Jd=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,s,a,f=n.length,l=0;for(s=0;s<f;s++)e=n.charCodeAt(s),(e&64512)===55296&&s+1<f&&(r=n.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),l+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(l),a=0,s=0;a<l;s++)e=n.charCodeAt(s),(e&64512)===55296&&s+1<f&&(r=n.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?t[a++]=e:e<2048?(t[a++]=192|e>>>6,t[a++]=128|e&63):e<65536?(t[a++]=224|e>>>12,t[a++]=128|e>>>6&63,t[a++]=128|e&63):(t[a++]=240|e>>>18,t[a++]=128|e>>>12&63,t[a++]=128|e>>>6&63,t[a++]=128|e&63);return t};const Xd=(n,t)=>{if(t<65534&&n.subarray&&Qu)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var Zd=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,s;const a=new Array(e*2);for(s=0,r=0;r<e;){let f=n[r++];if(f<128){a[s++]=f;continue}let l=bs[f];if(l>4){a[s++]=65533,r+=l-1;continue}for(f&=l===2?31:l===3?15:7;l>1&&r<e;)f=f<<6|n[r++]&63,l--;if(l>1){a[s++]=65533;continue}f<65536?a[s++]=f:(f-=65536,a[s++]=55296|f>>10&1023,a[s++]=56320|f&1023)}return Xd(a,s)},Qd=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+bs[n[e]]>t?e:t},xl={string2buf:Jd,buf2string:Zd,utf8border:Qd};function e1(){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 t1=e1;const $s=16209,n1=16191;var r1=function(t,e){let r,s,a,f,l,u,d,m,w,S,p,C,E,O,k,Y,V,q,oe,ye,ne,K,R,Z;const _=t.state;r=t.next_in,R=t.input,s=r+(t.avail_in-5),a=t.next_out,Z=t.output,f=a-(e-t.avail_out),l=a+(t.avail_out-257),u=_.dmax,d=_.wsize,m=_.whave,w=_.wnext,S=_.window,p=_.hold,C=_.bits,E=_.lencode,O=_.distcode,k=(1<<_.lenbits)-1,Y=(1<<_.distbits)-1;e:do{C<15&&(p+=R[r++]<<C,C+=8,p+=R[r++]<<C,C+=8),V=E[p&k];t:for(;;){if(q=V>>>24,p>>>=q,C-=q,q=V>>>16&255,q===0)Z[a++]=V&65535;else if(q&16){oe=V&65535,q&=15,q&&(C<q&&(p+=R[r++]<<C,C+=8),oe+=p&(1<<q)-1,p>>>=q,C-=q),C<15&&(p+=R[r++]<<C,C+=8,p+=R[r++]<<C,C+=8),V=O[p&Y];n:for(;;){if(q=V>>>24,p>>>=q,C-=q,q=V>>>16&255,q&16){if(ye=V&65535,q&=15,C<q&&(p+=R[r++]<<C,C+=8,C<q&&(p+=R[r++]<<C,C+=8)),ye+=p&(1<<q)-1,ye>u){t.msg="invalid distance too far back",_.mode=$s;break e}if(p>>>=q,C-=q,q=a-f,ye>q){if(q=ye-q,q>m&&_.sane){t.msg="invalid distance too far back",_.mode=$s;break e}if(ne=0,K=S,w===0){if(ne+=d-q,q<oe){oe-=q;do Z[a++]=S[ne++];while(--q);ne=a-ye,K=Z}}else if(w<q){if(ne+=d+w-q,q-=w,q<oe){oe-=q;do Z[a++]=S[ne++];while(--q);if(ne=0,w<oe){q=w,oe-=q;do Z[a++]=S[ne++];while(--q);ne=a-ye,K=Z}}}else if(ne+=w-q,q<oe){oe-=q;do Z[a++]=S[ne++];while(--q);ne=a-ye,K=Z}for(;oe>2;)Z[a++]=K[ne++],Z[a++]=K[ne++],Z[a++]=K[ne++],oe-=3;oe&&(Z[a++]=K[ne++],oe>1&&(Z[a++]=K[ne++]))}else{ne=a-ye;do Z[a++]=Z[ne++],Z[a++]=Z[ne++],Z[a++]=Z[ne++],oe-=3;while(oe>2);oe&&(Z[a++]=Z[ne++],oe>1&&(Z[a++]=Z[ne++]))}}else if(q&64){t.msg="invalid distance code",_.mode=$s;break e}else{V=O[(V&65535)+(p&(1<<q)-1)];continue n}break}}else if(q&64)if(q&32){_.mode=n1;break e}else{t.msg="invalid literal/length code",_.mode=$s;break e}else{V=E[(V&65535)+(p&(1<<q)-1)];continue t}break}}while(r<s&&a<l);oe=C>>3,r-=oe,C-=oe<<3,p&=(1<<C)-1,t.next_in=r,t.next_out=a,t.avail_in=r<s?5+(s-r):5-(r-s),t.avail_out=a<l?257+(l-a):257-(a-l),_.hold=p,_.bits=C};const Sa=15,jc=852,Cc=592,Ec=0,zo=1,Ic=2,i1=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]),a1=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]),s1=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]),o1=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]),l1=(n,t,e,r,s,a,f,l)=>{const u=l.bits;let d=0,m=0,w=0,S=0,p=0,C=0,E=0,O=0,k=0,Y=0,V,q,oe,ye,ne,K=null,R;const Z=new Uint16Array(Sa+1),_=new Uint16Array(Sa+1);let I=null,H,U,se;for(d=0;d<=Sa;d++)Z[d]=0;for(m=0;m<r;m++)Z[t[e+m]]++;for(p=u,S=Sa;S>=1&&Z[S]===0;S--);if(p>S&&(p=S),S===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,l.bits=1,0;for(w=1;w<S&&Z[w]===0;w++);for(p<w&&(p=w),O=1,d=1;d<=Sa;d++)if(O<<=1,O-=Z[d],O<0)return-1;if(O>0&&(n===Ec||S!==1))return-1;for(_[1]=0,d=1;d<Sa;d++)_[d+1]=_[d]+Z[d];for(m=0;m<r;m++)t[e+m]!==0&&(f[_[t[e+m]]++]=m);if(n===Ec?(K=I=f,R=20):n===zo?(K=i1,I=a1,R=257):(K=s1,I=o1,R=0),Y=0,m=0,d=w,ne=a,C=p,E=0,oe=-1,k=1<<p,ye=k-1,n===zo&&k>jc||n===Ic&&k>Cc)return 1;for(;;){H=d-E,f[m]+1<R?(U=0,se=f[m]):f[m]>=R?(U=I[f[m]-R],se=K[f[m]-R]):(U=96,se=0),V=1<<d-E,q=1<<C,w=q;do q-=V,s[ne+(Y>>E)+q]=H<<24|U<<16|se|0;while(q!==0);for(V=1<<d-1;Y&V;)V>>=1;if(V!==0?(Y&=V-1,Y+=V):Y=0,m++,--Z[d]===0){if(d===S)break;d=t[e+f[m]]}if(d>p&&(Y&ye)!==oe){for(E===0&&(E=p),ne+=w,C=d-E,O=1<<C;C+E<S&&(O-=Z[C+E],!(O<=0));)C++,O<<=1;if(k+=1<<C,n===zo&&k>jc||n===Ic&&k>Cc)return 1;oe=Y&ye,s[oe]=p<<24|C<<16|ne-a|0}}return Y!==0&&(s[ne+Y]=d-E<<24|64<<16|0),l.bits=p,0};var gs=l1;const c1=0,ef=1,tf=2,{Z_FINISH:Fc,Z_BLOCK:u1,Z_TREES:Ks,Z_OK:aa,Z_STREAM_END:f1,Z_NEED_DICT:h1,Z_STREAM_ERROR:xr,Z_DATA_ERROR:nf,Z_MEM_ERROR:rf,Z_BUF_ERROR:d1,Z_DEFLATED:Tc}=Xu,go=16180,Mc=16181,Dc=16182,Oc=16183,Rc=16184,Bc=16185,qc=16186,Uc=16187,zc=16188,Hc=16189,fo=16190,ui=16191,Ho=16192,Wc=16193,Wo=16194,Vc=16195,Gc=16196,Yc=16197,$c=16198,Js=16199,Xs=16200,Kc=16201,Jc=16202,Xc=16203,Zc=16204,Qc=16205,Vo=16206,eu=16207,tu=16208,Vt=16209,af=16210,sf=16211,p1=852,m1=592,g1=15,b1=g1,nu=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function v1(){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 oa=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<go||t.mode>sf?1:0},of=n=>{if(oa(n))return xr;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=go,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(p1),t.distcode=t.distdyn=new Int32Array(m1),t.sane=1,t.back=-1,aa},lf=n=>{if(oa(n))return xr;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,of(n)},cf=(n,t)=>{let e;if(oa(n))return xr;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?xr:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,lf(n))},uf=(n,t)=>{if(!n)return xr;const e=new v1;n.state=e,e.strm=n,e.window=null,e.mode=go;const r=cf(n,t);return r!==aa&&(n.state=null),r},y1=n=>uf(n,b1);let ru=!0,Go,Yo;const x1=n=>{if(ru){Go=new Int32Array(512),Yo=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(gs(ef,n.lens,0,288,Go,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;gs(tf,n.lens,0,32,Yo,0,n.work,{bits:5}),ru=!1}n.lencode=Go,n.lenbits=9,n.distcode=Yo,n.distbits=5},ff=(n,t,e,r)=>{let s;const a=n.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(e-a.wsize,e),0),a.wnext=0,a.whave=a.wsize):(s=a.wsize-a.wnext,s>r&&(s=r),a.window.set(t.subarray(e-r,e-r+s),a.wnext),r-=s,r?(a.window.set(t.subarray(e-r,e),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0},w1=(n,t)=>{let e,r,s,a,f,l,u,d,m,w,S,p,C,E,O=0,k,Y,V,q,oe,ye,ne,K;const R=new Uint8Array(4);let Z,_;const I=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(oa(n)||!n.output||!n.input&&n.avail_in!==0)return xr;e=n.state,e.mode===ui&&(e.mode=Ho),f=n.next_out,s=n.output,u=n.avail_out,a=n.next_in,r=n.input,l=n.avail_in,d=e.hold,m=e.bits,w=l,S=u,K=aa;e:for(;;)switch(e.mode){case go:if(e.wrap===0){e.mode=Ho;break}for(;m<16;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(e.wrap&2&&d===35615){e.wbits===0&&(e.wbits=15),e.check=0,R[0]=d&255,R[1]=d>>>8&255,e.check=Wr(e.check,R,2,0),d=0,m=0,e.mode=Mc;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((d&255)<<8)+(d>>8))%31){n.msg="incorrect header check",e.mode=Vt;break}if((d&15)!==Tc){n.msg="unknown compression method",e.mode=Vt;break}if(d>>>=4,m-=4,ne=(d&15)+8,e.wbits===0&&(e.wbits=ne),ne>15||ne>e.wbits){n.msg="invalid window size",e.mode=Vt;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=d&512?Hc:ui,d=0,m=0;break;case Mc:for(;m<16;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(e.flags=d,(e.flags&255)!==Tc){n.msg="unknown compression method",e.mode=Vt;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Vt;break}e.head&&(e.head.text=d>>8&1),e.flags&512&&e.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,e.check=Wr(e.check,R,2,0)),d=0,m=0,e.mode=Dc;case Dc:for(;m<32;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}e.head&&(e.head.time=d),e.flags&512&&e.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,R[2]=d>>>16&255,R[3]=d>>>24&255,e.check=Wr(e.check,R,4,0)),d=0,m=0,e.mode=Oc;case Oc:for(;m<16;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}e.head&&(e.head.xflags=d&255,e.head.os=d>>8),e.flags&512&&e.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,e.check=Wr(e.check,R,2,0)),d=0,m=0,e.mode=Rc;case Rc:if(e.flags&1024){for(;m<16;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}e.length=d,e.head&&(e.head.extra_len=d),e.flags&512&&e.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,e.check=Wr(e.check,R,2,0)),d=0,m=0}else e.head&&(e.head.extra=null);e.mode=Bc;case Bc:if(e.flags&1024&&(p=e.length,p>l&&(p=l),p&&(e.head&&(ne=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(a,a+p),ne)),e.flags&512&&e.wrap&4&&(e.check=Wr(e.check,r,p,a)),l-=p,a+=p,e.length-=p),e.length))break e;e.length=0,e.mode=qc;case qc:if(e.flags&2048){if(l===0)break e;p=0;do ne=r[a+p++],e.head&&ne&&e.length<65536&&(e.head.name+=String.fromCharCode(ne));while(ne&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=Wr(e.check,r,p,a)),l-=p,a+=p,ne)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Uc;case Uc:if(e.flags&4096){if(l===0)break e;p=0;do ne=r[a+p++],e.head&&ne&&e.length<65536&&(e.head.comment+=String.fromCharCode(ne));while(ne&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=Wr(e.check,r,p,a)),l-=p,a+=p,ne)break e}else e.head&&(e.head.comment=null);e.mode=zc;case zc:if(e.flags&512){for(;m<16;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(e.wrap&4&&d!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Vt;break}d=0,m=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=ui;break;case Hc:for(;m<32;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}n.adler=e.check=nu(d),d=0,m=0,e.mode=fo;case fo:if(e.havedict===0)return n.next_out=f,n.avail_out=u,n.next_in=a,n.avail_in=l,e.hold=d,e.bits=m,h1;n.adler=e.check=1,e.mode=ui;case ui:if(t===u1||t===Ks)break e;case Ho:if(e.last){d>>>=m&7,m-=m&7,e.mode=Vo;break}for(;m<3;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}switch(e.last=d&1,d>>>=1,m-=1,d&3){case 0:e.mode=Wc;break;case 1:if(x1(e),e.mode=Js,t===Ks){d>>>=2,m-=2;break e}break;case 2:e.mode=Gc;break;case 3:n.msg="invalid block type",e.mode=Vt}d>>>=2,m-=2;break;case Wc:for(d>>>=m&7,m-=m&7;m<32;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Vt;break}if(e.length=d&65535,d=0,m=0,e.mode=Wo,t===Ks)break e;case Wo:e.mode=Vc;case Vc:if(p=e.length,p){if(p>l&&(p=l),p>u&&(p=u),p===0)break e;s.set(r.subarray(a,a+p),f),l-=p,a+=p,u-=p,f+=p,e.length-=p;break}e.mode=ui;break;case Gc:for(;m<14;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(e.nlen=(d&31)+257,d>>>=5,m-=5,e.ndist=(d&31)+1,d>>>=5,m-=5,e.ncode=(d&15)+4,d>>>=4,m-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Vt;break}e.have=0,e.mode=Yc;case Yc:for(;e.have<e.ncode;){for(;m<3;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}e.lens[I[e.have++]]=d&7,d>>>=3,m-=3}for(;e.have<19;)e.lens[I[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,Z={bits:e.lenbits},K=gs(c1,e.lens,0,19,e.lencode,0,e.work,Z),e.lenbits=Z.bits,K){n.msg="invalid code lengths set",e.mode=Vt;break}e.have=0,e.mode=$c;case $c:for(;e.have<e.nlen+e.ndist;){for(;O=e.lencode[d&(1<<e.lenbits)-1],k=O>>>24,Y=O>>>16&255,V=O&65535,!(k<=m);){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(V<16)d>>>=k,m-=k,e.lens[e.have++]=V;else{if(V===16){for(_=k+2;m<_;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(d>>>=k,m-=k,e.have===0){n.msg="invalid bit length repeat",e.mode=Vt;break}ne=e.lens[e.have-1],p=3+(d&3),d>>>=2,m-=2}else if(V===17){for(_=k+3;m<_;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}d>>>=k,m-=k,ne=0,p=3+(d&7),d>>>=3,m-=3}else{for(_=k+7;m<_;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}d>>>=k,m-=k,ne=0,p=11+(d&127),d>>>=7,m-=7}if(e.have+p>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Vt;break}for(;p--;)e.lens[e.have++]=ne}}if(e.mode===Vt)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Vt;break}if(e.lenbits=9,Z={bits:e.lenbits},K=gs(ef,e.lens,0,e.nlen,e.lencode,0,e.work,Z),e.lenbits=Z.bits,K){n.msg="invalid literal/lengths set",e.mode=Vt;break}if(e.distbits=6,e.distcode=e.distdyn,Z={bits:e.distbits},K=gs(tf,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,Z),e.distbits=Z.bits,K){n.msg="invalid distances set",e.mode=Vt;break}if(e.mode=Js,t===Ks)break e;case Js:e.mode=Xs;case Xs:if(l>=6&&u>=258){n.next_out=f,n.avail_out=u,n.next_in=a,n.avail_in=l,e.hold=d,e.bits=m,r1(n,S),f=n.next_out,s=n.output,u=n.avail_out,a=n.next_in,r=n.input,l=n.avail_in,d=e.hold,m=e.bits,e.mode===ui&&(e.back=-1);break}for(e.back=0;O=e.lencode[d&(1<<e.lenbits)-1],k=O>>>24,Y=O>>>16&255,V=O&65535,!(k<=m);){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(Y&&!(Y&240)){for(q=k,oe=Y,ye=V;O=e.lencode[ye+((d&(1<<q+oe)-1)>>q)],k=O>>>24,Y=O>>>16&255,V=O&65535,!(q+k<=m);){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}d>>>=q,m-=q,e.back+=q}if(d>>>=k,m-=k,e.back+=k,e.length=V,Y===0){e.mode=Qc;break}if(Y&32){e.back=-1,e.mode=ui;break}if(Y&64){n.msg="invalid literal/length code",e.mode=Vt;break}e.extra=Y&15,e.mode=Kc;case Kc:if(e.extra){for(_=e.extra;m<_;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}e.length+=d&(1<<e.extra)-1,d>>>=e.extra,m-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=Jc;case Jc:for(;O=e.distcode[d&(1<<e.distbits)-1],k=O>>>24,Y=O>>>16&255,V=O&65535,!(k<=m);){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(!(Y&240)){for(q=k,oe=Y,ye=V;O=e.distcode[ye+((d&(1<<q+oe)-1)>>q)],k=O>>>24,Y=O>>>16&255,V=O&65535,!(q+k<=m);){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}d>>>=q,m-=q,e.back+=q}if(d>>>=k,m-=k,e.back+=k,Y&64){n.msg="invalid distance code",e.mode=Vt;break}e.offset=V,e.extra=Y&15,e.mode=Xc;case Xc:if(e.extra){for(_=e.extra;m<_;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}e.offset+=d&(1<<e.extra)-1,d>>>=e.extra,m-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Vt;break}e.mode=Zc;case Zc:if(u===0)break e;if(p=S-u,e.offset>p){if(p=e.offset-p,p>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Vt;break}p>e.wnext?(p-=e.wnext,C=e.wsize-p):C=e.wnext-p,p>e.length&&(p=e.length),E=e.window}else E=s,C=f-e.offset,p=e.length;p>u&&(p=u),u-=p,e.length-=p;do s[f++]=E[C++];while(--p);e.length===0&&(e.mode=Xs);break;case Qc:if(u===0)break e;s[f++]=e.length,u--,e.mode=Xs;break;case Vo:if(e.wrap){for(;m<32;){if(l===0)break e;l--,d|=r[a++]<<m,m+=8}if(S-=u,n.total_out+=S,e.total+=S,e.wrap&4&&S&&(n.adler=e.check=e.flags?Wr(e.check,s,S,f-S):vl(e.check,s,S,f-S)),S=u,e.wrap&4&&(e.flags?d:nu(d))!==e.check){n.msg="incorrect data check",e.mode=Vt;break}d=0,m=0}e.mode=eu;case eu:if(e.wrap&&e.flags){for(;m<32;){if(l===0)break e;l--,d+=r[a++]<<m,m+=8}if(e.wrap&4&&d!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Vt;break}d=0,m=0}e.mode=tu;case tu:K=f1;break e;case Vt:K=nf;break e;case af:return rf;case sf:default:return xr}return n.next_out=f,n.avail_out=u,n.next_in=a,n.avail_in=l,e.hold=d,e.bits=m,(e.wsize||S!==n.avail_out&&e.mode<Vt&&(e.mode<Vo||t!==Fc))&&ff(n,n.output,n.next_out,S-n.avail_out),w-=n.avail_in,S-=n.avail_out,n.total_in+=w,n.total_out+=S,e.total+=S,e.wrap&4&&S&&(n.adler=e.check=e.flags?Wr(e.check,s,S,n.next_out-S):vl(e.check,s,S,n.next_out-S)),n.data_type=e.bits+(e.last?64:0)+(e.mode===ui?128:0)+(e.mode===Js||e.mode===Wo?256:0),(w===0&&S===0||t===Fc)&&K===aa&&(K=d1),K},N1=n=>{if(oa(n))return xr;let t=n.state;return t.window&&(t.window=null),n.state=null,aa},A1=(n,t)=>{if(oa(n))return xr;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,aa):xr},_1=(n,t)=>{const e=t.length;let r,s,a;return oa(n)||(r=n.state,r.wrap!==0&&r.mode!==fo)?xr:r.mode===fo&&(s=1,s=vl(s,t,e,0),s!==r.check)?nf:(a=ff(n,t,e,e),a?(r.mode=af,rf):(r.havedict=1,aa))};var L1=lf,S1=cf,k1=of,P1=y1,j1=uf,C1=w1,E1=N1,I1=A1,F1=_1,T1="pako inflate (from Nodeca project)",hi={inflateReset:L1,inflateReset2:S1,inflateResetKeep:k1,inflateInit:P1,inflateInit2:j1,inflate:C1,inflateEnd:E1,inflateGetHeader:I1,inflateSetDictionary:F1,inflateInfo:T1};function M1(){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 D1=M1;const hf=Object.prototype.toString,{Z_NO_FLUSH:O1,Z_FINISH:R1,Z_OK:vs,Z_STREAM_END:$o,Z_NEED_DICT:Ko,Z_STREAM_ERROR:B1,Z_DATA_ERROR:iu,Z_MEM_ERROR:q1}=Xu;function xs(n){this.options=Zu.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new t1,this.strm.avail_out=0;let e=hi.inflateInit2(this.strm,t.windowBits);if(e!==vs)throw new Error(yl[e]);if(this.header=new D1,hi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=xl.string2buf(t.dictionary):hf.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=hi.inflateSetDictionary(this.strm,t.dictionary),e!==vs)))throw new Error(yl[e])}xs.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,s=this.options.dictionary;let a,f,l;if(this.ended)return!1;for(t===~~t?f=t:f=t===!0?R1:O1,hf.call(n)==="[object ArrayBuffer]"?e.input=new
vendor: 9,958 bytes, line 23
23Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),a=hi.inflate(e,f),a===Ko&&s&&(a=hi.inflateSetDictionary(e,s),a===vs?a=hi.inflate(e,f):a===iu&&(a=Ko));e.avail_in>0&&a===$o&&e.state.wrap>0&&n[e.next_in]!==0;)hi.inflateReset(e),a=hi.inflate(e,f);switch(a){case B1:case iu:case Ko:case q1:return this.onEnd(a),this.ended=!0,!1}if(l=e.avail_out,e.next_out&&(e.avail_out===0||a===$o))if(this.options.to==="string"){let u=xl.utf8border(e.output,e.next_out),d=e.next_out-u,m=xl.buf2string(e.output,u);e.next_out=d,e.avail_out=r-d,d&&e.output.set(e.output.subarray(u,u+d),0),this.onData(m)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(a===vs&&l===0)){if(a===$o)return a=hi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};xs.prototype.onData=function(n){this.chunks.push(n)};xs.prototype.onEnd=function(n){n===vs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Zu.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function U1(n,t){const e=new xs(t);if(e.push(n),e.err)throw e.msg||yl[e.err];return e.result}var z1=xs,H1=U1,W1={Inflate:z1,inflate:H1};const{Inflate:V1,inflate:G1}=W1;var au=V1,Y1=G1;const df=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t=t>>>1;df[n]=t}const su=4294967295;function $1(n,t,e){let r=n;for(let s=0;s<e;s++)r=df[(r^t[s])&255]^r>>>8;return r}function K1(n,t){return($1(su,n,t)^su)>>>0}function ou(n,t,e){const r=n.readUint32(),s=K1(new Uint8Array(n.buffer,n.byteOffset+n.offset-t-4,t),t);if(s!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${s}`)}function pf(n,t,e){for(let r=0;r<e;r++)t[r]=n[r]}function mf(n,t,e,r){let s=0;for(;s<r;s++)t[s]=n[s];for(;s<e;s++)t[s]=n[s]+t[s-r]&255}function gf(n,t,e,r){let s=0;if(e.length===0)for(;s<r;s++)t[s]=n[s];else for(;s<r;s++)t[s]=n[s]+e[s]&255}function bf(n,t,e,r,s){let a=0;if(e.length===0){for(;a<s;a++)t[a]=n[a];for(;a<r;a++)t[a]=n[a]+(t[a-s]>>1)&255}else{for(;a<s;a++)t[a]=n[a]+(e[a]>>1)&255;for(;a<r;a++)t[a]=n[a]+(t[a-s]+e[a]>>1)&255}}function vf(n,t,e,r,s){let a=0;if(e.length===0){for(;a<s;a++)t[a]=n[a];for(;a<r;a++)t[a]=n[a]+t[a-s]&255}else{for(;a<s;a++)t[a]=n[a]+e[a]&255;for(;a<r;a++)t[a]=n[a]+J1(t[a-s],e[a],e[a-s])&255}}function J1(n,t,e){const r=n+t-e,s=Math.abs(r-n),a=Math.abs(r-t),f=Math.abs(r-e);return s<=a&&s<=f?n:a<=f?t:e}function X1(n,t,e,r,s,a){switch(n){case 0:pf(t,e,s);break;case 1:mf(t,e,s,a);break;case 2:gf(t,e,r,s);break;case 3:bf(t,e,r,s,a);break;case 4:vf(t,e,r,s,a);break;default:throw new Error(`Unsupported filter: ${n}`)}}const Z1=new Uint16Array([255]),Q1=new Uint8Array(Z1.buffer),e2=Q1[0]===255;function t2(n){const{data:t,width:e,height:r,channels:s,depth:a}=n,f=[{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}],l=Math.ceil(a/8)*s,u=new Uint8Array(r*e*l);let d=0;for(let m=0;m<7;m++){const w=f[m],S=Math.ceil((e-w.x)/w.xStep),p=Math.ceil((r-w.y)/w.yStep);if(S<=0||p<=0)continue;const C=S*l,E=new Uint8Array(C);for(let O=0;O<p;O++){const k=t[d++],Y=t.subarray(d,d+C);d+=C;const V=new Uint8Array(C);X1(k,Y,V,E,C,l),E.set(V);for(let q=0;q<S;q++){const oe=w.x+q*w.xStep,ye=w.y+O*w.yStep;if(!(oe>=e||ye>=r))for(let ne=0;ne<l;ne++)u[(ye*e+oe)*l+ne]=V[q*l+ne]}}}if(a===16){const m=new Uint16Array(u.buffer);if(e2)for(let w=0;w<m.length;w++)m[w]=n2(m[w]);return m}else return u}function n2(n){return(n&255)<<8|n>>8&255}const r2=new Uint16Array([255]),i2=new Uint8Array(r2.buffer),a2=i2[0]===255,s2=new Uint8Array(0);function lu(n){const{data:t,width:e,height:r,channels:s,depth:a}=n,f=Math.ceil(a/8)*s,l=Math.ceil(a/8*s*e),u=new Uint8Array(r*l);let d=s2,m=0,w,S;for(let p=0;p<r;p++){switch(w=t.subarray(m+1,m+1+l),S=u.subarray(p*l,(p+1)*l),t[m]){case 0:pf(w,S,l);break;case 1:mf(w,S,l,f);break;case 2:gf(w,S,d,l);break;case 3:bf(w,S,d,l,f);break;case 4:vf(w,S,d,l,f);break;default:throw new Error(`Unsupported filter: ${t[m]}`)}d=S,m+=l+1}if(a===16){const p=new Uint16Array(u.buffer);if(a2)for(let C=0;C<p.length;C++)p[C]=o2(p[C]);return p}else return u}function o2(n){return(n&255)<<8|n>>8&255}const ro=Uint8Array.of(137,80,78,71,13,10,26,10);function cu(n){if(!l2(n.readBytes(ro.length)))throw new Error("wrong PNG signature")}function l2(n){if(n.length<ro.length)return!1;for(let t=0;t<ro.length;t++)if(n[t]!==ro[t])return!1;return!0}const c2="tEXt",u2=0,yf=new TextDecoder("latin1");function f2(n){if(d2(n),n.length===0||n.length>79)throw new Error("keyword length must be between 1 and 79")}const h2=/^[\u0000-\u00FF]*$/;function d2(n){if(!h2.test(n))throw new Error("invalid latin1 text")}function p2(n,t,e){const r=xf(t);n[r]=m2(t,e-r.length-1)}function xf(n){for(n.mark();n.readByte()!==u2;);const t=n.offset;n.reset();const e=yf.decode(n.readBytes(t-n.offset-1));return n.skip(1),f2(e),e}function m2(n,t){return yf.decode(n.readBytes(t))}const hr={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Jo={UNKNOWN:-1,DEFLATE:0},uu={UNKNOWN:-1,ADAPTIVE:0},Xo={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Zs={NONE:0,BACKGROUND:1,PREVIOUS:2},Zo={SOURCE:0,OVER:1};class g2 extends Cl{constructor(e,r={}){super(e);Pt(this,"_checkCrc");Pt(this,"_inflator");Pt(this,"_png");Pt(this,"_apng");Pt(this,"_end");Pt(this,"_hasPalette");Pt(this,"_palette");Pt(this,"_hasTransparency");Pt(this,"_transparency");Pt(this,"_compressionMethod");Pt(this,"_filterMethod");Pt(this,"_interlaceMethod");Pt(this,"_colorType");Pt(this,"_isAnimated");Pt(this,"_numberOfFrames");Pt(this,"_numberOfPlays");Pt(this,"_frames");Pt(this,"_writingDataChunks");const{checkCrc:s=!1}=r;this._checkCrc=s,this._inflator=new au,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=Jo.UNKNOWN,this._filterMethod=uu.UNKNOWN,this._interlaceMethod=Xo.UNKNOWN,this._colorType=hr.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(cu(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeChunk(e,r)}return this.decodeImage(),this._png}decodeApng(){for(cu(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(e,r)}return this.decodeApngImage(),this._apng}decodeChunk(e,r){const s=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case c2:p2(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-s!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?ou(this,e+4,r):this.skip(4)}decodeApngChunk(e,r){const s=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(e);break;default:this.decodeChunk(e,r),this.offset=s+e;break}if(this.offset-s!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?ou(this,e+4,r):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=b2(this.readUint8());const r=this.readUint8();this._colorType=r;let s;switch(r){case hr.GREYSCALE:s=1;break;case hr.TRUECOLOUR:s=3;break;case hr.INDEXED_COLOUR:s=1;break;case hr.GREYSCALE_ALPHA:s=2;break;case hr.TRUECOLOUR_ALPHA:s=4;break;case hr.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=s,this._compressionMethod=this.readUint8(),this._compressionMethod!==Jo.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 e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const r=e/3;this._hasPalette=!0;const s=[];this._palette=s;for(let a=0;a<r;a++)s.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const r=e,s=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,s,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let r=e,s=this.offset+this.byteOffset;if(s+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,s,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case hr.GREYSCALE:case hr.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let r=0;r<e/2;r++)this._transparency[r]=this.readUint16();break}case hr.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alph
23a values than there are palette colors (${e} vs ${this._palette.length})`);let r=0;for(;r<e;r++){const s=this.readByte();this._palette[r].push(s)}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(e){const r=xf(this),s=this.readUint8();if(s!==Jo.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${s}`);const a=this.readBytes(e-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:Y1(a)}}decodepHYs(){const e=this.readUint32(),r=this.readUint32(),s=this.readByte();this._png.resolution={x:e,y:r,unit:s}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const r={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},s=this._frames.at(e);if(s){if(s.data=lu({data:s.data,width:s.width,height:s.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||s.xOffset===0&&s.yOffset===0&&s.width===this._png.width&&s.height===this._png.height)r.data=s.data;else{const a=this._apng.frames.at(e-1);this.disposeFrame(s,a,r),this.addFrameDataToCanvas(r,s)}this._apng.frames.push(r)}}return this._apng}disposeFrame(e,r,s){switch(e.disposeOp){case Zs.NONE:break;case Zs.BACKGROUND:for(let a=0;a<this._png.height;a++)for(let f=0;f<this._png.width;f++){const l=(a*e.width+f)*this._png.channels;for(let u=0;u<this._png.channels;u++)s.data[l+u]=0}break;case Zs.PREVIOUS:s.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,r){const s=1<<this._png.depth,a=(f,l)=>{const u=((f+r.yOffset)*this._png.width+r.xOffset+l)*this._png.channels,d=(f*r.width+l)*this._png.channels;return{index:u,frameIndex:d}};switch(r.blendOp){case Zo.SOURCE:for(let f=0;f<r.height;f++)for(let l=0;l<r.width;l++){const{index:u,frameIndex:d}=a(f,l);for(let m=0;m<this._png.channels;m++)e.data[u+m]=r.data[d+m]}break;case Zo.OVER:for(let f=0;f<r.height;f++)for(let l=0;l<r.width;l++){const{index:u,frameIndex:d}=a(f,l);for(let m=0;m<this._png.channels;m++){const w=r.data[d+this._png.channels-1]/s,S=m%(this._png.channels-1)===0?1:r.data[d+m],p=Math.floor(w*S+(1-w)*e.data[u+m]);e.data[u+m]+=p}}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 e=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==uu.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Xo.NO_INTERLACE)this._png.data=lu({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Xo.ADAM7)this._png.data=t2({data:e,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 e=this._inflator.result,r=this._frames.at(-1);r?r.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Zs.NONE,blendOp:Zo.SOURCE,data:e}),this._inflator=new au,this._writingDataChunks=!1}}function b2(n){if(n!==1&&n!==2&&n!==4&&n!==8&&n!==16)throw new Error(`invalid bit depth: ${n}`);return n}var fu;(function(n){n[n.UNKNOWN=0]="UNKNOWN",n[n.METRE=1]="METRE"})(fu||(fu={}));function v2(n,t){return new g2(n,t).decode()}var nt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Qo(){nt.console&&typeof nt.console.log=="function"&&nt.console.log.apply(nt.console,arguments)}var Mt={log:Qo,warn:function(n){nt.console&&(typeof nt.console.warn=="function"?nt.console.warn.apply(nt.console,arguments):Qo.c
vendor: 3,963 bytes, lines 23-28
23all(null,arguments))},error:function(n){nt.console&&(typeof nt.console.error=="function"?nt.console.error.apply(nt.console,arguments):Qo(n))}};function el(n,t,e){var r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){ea(r.response,t,e)},r.onerror=function(){Mt.error("could not download file")},r.send()}function hu(n){var t=new XMLHttpRequest;t.open("HEAD",n,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Qs(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(t)}}var ea=nt.saveAs||((typeof window>"u"?"undefined":jt(window))!=="object"||window!==nt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,t,e){var r=nt.URL||nt.webkitURL,s=document.createElement("a");t=t||n.name||"download",s.download=t,s.rel="noopener",typeof n=="string"?(s.href=n,s.origin!==location.origin?hu(s.href)?el(n,t,e):Qs(s,s.target="_blank"):Qs(s)):(s.href=r.createObjectURL(n),setTimeout(function(){r.revokeObjectURL(s.href)},4e4),setTimeout(function(){Qs(s)},0))}:"msSaveOrOpenBlob"in navigator?function(n,t,e){if(t=t||n.name||"download",typeof n=="string")if(hu(n))el(n,t,e);else{var r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){Qs(r)})}else navigator.msSaveOrOpenBlob(function(s,a){return a===void 0?a={autoBom:!1}:jt(a)!=="object"&&(Mt.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}(n,e),t)}:function(n,t,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return el(n,t,e);var s=n.type==="application/octet-stream",a=/constructor/i.test(nt.HTMLElement)||nt.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||s&&a)&&(typeof FileReader>"u"?"undefined":jt(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var m=l.result;m=f?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=m:location=m,r=null},l.readAsDataURL(n)}else{var u=nt.URL||nt.webkitURL,d=u.createObjectURL(n);r?r.location=d:location.href=d,r=null,setTimeout(function(){u.revokeObjectURL(d)},4e4)}});/** 24 * A class to parse color values 25 * @author Stoyan Stefanov <[email protected]> 26 * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} 27 * @license Use it if you like it 28 */function wf(n){var t;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
280",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],r=0;r<e.length;r++){var s=e[r].re,a=e[r].process,f=s.exec(n);f&&(t=a(f),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),u=this.g.toString(16),d=this.b.toString(16);return l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),d.length==1&&(d="0"+d),"#"+l+u+d}}var io=nt.atob.bind(nt),du=nt.btoa.bind(nt);/** 29 * @license 30 * Joseph Myers does not specify a particular license for his work. 31 * 32 * Author: Joseph Myers 33 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js 34 * 35 * Modified by: Owen Leong 36 */function tl(n,t){var e=n[0],r=n[1],s=n[2],a=n[3];e=En(e,r,s,a,t[0],7,-680876936),a=En(a,e,r,s,t[1],12,-389564586),s=En(s,a,e,r,t[2],17,606105819),r=En(r,s,a,e,t[3],22,-1044525330),e=En(e,r,s,a,t[4],7,-176418897),a=En(a,e,r,s,t[5],12,1200080426),s=En(s,a,e,r,t[6],17,-1473231341),r=En(r,s,a,e,t[7],22,-45705983),e=En(e,r,s,a,t[8],7,1770035416),a=En(a,e,r,s,t[9],12,-1958414417),s=En(s,a,e,r,t[10],17,-42063),r=En(r,s,a,e,t[11],22,-1990404162),e=En(e,r,s,a,t[12],7,1804603682),a=En(a,e,r,s,t[13],12,-40341101),s=En(s,a,e,r,t[14],17,-1502002290),e=In(e,r=En(r,s,a,e,t[15],22,1236535329),s,a,t[1],5,-165796510),a=In(a,e,r,s,t[6],9,-1069501632),s=In(s,a,e,r,t[11],14,643717713),r=In(r,s,a,e,t[0],20,-373897302),e=In(e,r,s,a,t[5],5,-701558691),a=In(a,e,r,s,t[10],9,38016083),s=In(s,a,e,r,t[15],14,-660478335),r=In(r,s,a,e,t[4],20,-405537848),e=In(e,r,s,a,t[9],5,568446438),a=In(a,e,r,s,t[14],9,-1019803690),s=In(s,a,e,r,t[3],14,-187363961),r=In(r,s,a,e,t[8],20,1163531501),e=In(e,r,s,a,t[13],5,-1444681467),a=In(a,e,r,s,t[2],9,-51403784),s=In(s,a,e,r,t[7],14,1735328473),e=Fn(e,r=In(r,s,a,e,t[12],20,-1926607734),s,a,t[5],4,-378558),a=Fn(a,e,r,s,t[8],11,-2022574463),s=Fn(s,a,e,r,t[11],16,1839030562),r=Fn(r,s,a,e,t[14],23,-35309556),e=Fn(e,r,s,a,t[1],4,-1530992060),a=Fn(a,e,r,s,t[4],11,1272893353),s=Fn(s,a,e,r,t[7],16,-155497632),r=Fn(r,s,a,e,t[10],23,-1094730640),e=Fn(e,r,s,a,t[13],4,681279174),a=Fn(a,e,r,s,t[0],11,-358537222),s=Fn(s,a,e,r,t[3],16,-722521979),r=Fn(r,s,a,e,t[6],23,76029189),e=Fn(e,r,s,a,t[9],4,-640364487),a=Fn(a,e,r,s,t[12],11,-421815835),s=Fn(s,a,e,r,t[15],16,530742520),e=Tn(e,r=Fn(r,s,a,e,t[2],23,-995338651),s,a,t[0],6,-198630844),a=Tn(a,e,r,s,t[7],10,1126891415),s=Tn(s,a,e,r,t[14],15,-1416354905),r=Tn(r,s,a,e,t[5],21,-57434055),e=Tn(e,r,s,a,t[12],6,1700485571),a=Tn(a,e,r,s,t[3],10,-1894986606),s=Tn(s,a,e,r,t[10],15,-1051523),r=Tn(r,s,a,e,t[1],21,-2054922799),e=Tn(e,r,s,a,t[8],6,1873313359),a=Tn(a,e,r,s,t[15],10,-30611744),s=Tn(s,a,e,r,t[6],15,-1560198380),r=Tn(r,s,a,e,t[13],21,1309151649),e=Tn(e,r,s,a,t[4],6,-145523070),a=Tn(a,e,r,s,t[11],10,-1120210379),s=Tn(s,a,e,r,t[2],15,718787259),r=Tn(r,s,a,e,t[9],21,-343485551),n[0]=Ii(e,n[0]),n[1]=Ii(r,n[1]),n[2]=Ii(s,n[2]),n[3]=Ii(a,n[3])}function bo(n,t,e,r,s,a){return t=Ii(Ii(t,n),Ii(r,a)),Ii(t<<s|t>>>32-s,e)}function En(n,t,e,r,s,a,f){return bo(t&e|~t&r,n,t,s,a,f)}function In(n,t,e,r,s,a,f){return bo(t&r|e&~r,n,t,s,a,f)}function Fn(n,t,e,r,s,a,f){return bo(t^e^r,n,t,s,a,f)}function Tn(n,t,e,r,s,a,f){return bo(e^(t|~r),n,t,s,a,f)}function Nf(n){var t,e=n.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=n.length;t+=64)tl(r,y2(n.substring(t-64,t)));n=n.substring(t-64);var s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<n.length;t++)s[t>>2]|=n.charCodeAt(t)<<(t%4<<3);if(s[t>>2]|=128<<(t%4<<3),t>55)for(tl(r,s),t=0;t<16;t++)s[t]=0;return s[14]=8*e,tl(r,s),r}function y2(n){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=n.charCodeAt(t)+(n.charCodeAt(t+1)<<8)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+3)<<24);return e}var pu="0123456789abcdef".split("");function x2(n){for(var t="",e=0;e<4;e++)t+=pu[n>>8*e+4&15]+pu[n>>8*e&15];return t}function w2(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function wl(n){return Nf(n).map(w2).join("")}var N2=function(n){for(var t=0;t<n.length;t++)n[t]=x2(n[t]);return n.join("")}(Nf("hello"))!="5d41402abc4b2a76b9719d911017c592";function Ii(n,t){if(N2){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}return n+t&4294967295}/** 37 * @license 38 * FPDF is released under a permissive license: there is no usage restriction. 39 * You may embed it freely in your application (commercial or not), with or 40 * without modifications. 41 * 42 * Reference: http://www.fpdf.org/en/script/script37.php 43 */function Nl(n,t){var e,r,s,a;if(n!==e){for(var f=(s=n,a=1+(256/n.length|0),new Array(a+1).join(s)),l=[],u=0;u<256;u++)l[u]=u;var d=0;for(u=0;
vendor: 5,782 bytes, lines 43-53
43u<256;u++){var m=l[u];d=(d+m+f.charCodeAt(u))%256,l[u]=l[d],l[d]=m}e=n,r=l}else l=r;var w=t.length,S=0,p=0,C="";for(u=0;u<w;u++)p=(p+(m=l[S=(S+1)%256]))%256,l[S]=l[p],l[p]=m,f=l[(l[S]+l[p])%256],C+=String.fromCharCode(t.charCodeAt(u)^f);return C}/** 44 * @license 45 * Licensed under the MIT License. 46 * http://opensource.org/licenses/mit-license 47 * Author: Owen Leong (@owenl131) 48 * Date: 15 Oct 2020 49 * References: 50 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt 51 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js 52 * http://www.fpdf.org/en/script/script37.php 53 */var mu={print:4,modify:8,copy:16,"annot-forms":32};function ja(n,t,e,r){this.v=1,this.r=2;var s=192;n.forEach(function(l){if(mu.perm!==void 0)throw new Error("Invalid permission: "+l);s+=mu[l]}),this.padding="(¿N^NuÂAd\0NVÿú�\b..\0¶Ãh>Â/\f©þdSiz";var a=(t+this.padding).substr(0,32),f=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,f),this.P=-(1+(255^s)),this.encryptionKey=wl(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=Nl(this.encryptionKey,this.padding)}function Ca(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var t="",e=n.length,r=0;r<e;r++){var s=n.charCodeAt(r);t+=s<33||s===35||s===37||s===40||s===41||s===47||s===60||s===62||s===91||s===93||s===123||s===125||s>126?"#"+("0"+s.toString(16)).slice(-2):n[r]}return t}function gu(n){if(jt(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,s){if(s=s||!1,typeof e!="string"||typeof r!="function"||typeof s!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var a=Math.random().toString(35);return t[e][a]=[r,!!s],a},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),s=[];for(var a in t[e]){var f=t[e][a];try{f[0].apply(n,r)}catch(l){nt.console&&Mt.error("jsPDF PubSub Error",l.message,l)}f[1]&&s.push(a)}s.length&&s.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function ho(n){if(!(this instanceof ho))return new ho(n);var t="opacity,stroke-opacity".split(",");for(var e in n)n.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=n[e]);this.id="",this.objectNumber=-1}function Af(n,t){this.gState=n,this.matrix=t,this.id="",this.objectNumber=-1}function na(n,t,e,r,s){if(!(this instanceof na))return new na(n,t,e,r,s);this.type=n==="axial"?2:3,this.coords=t,this.colors=e,Af.call(this,r,s)}function Fa(n,t,e,r,s){if(!(this instanceof Fa))return new Fa(n,t,e,r,s);this.boundingBox=n,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,Af.call(this,r,s)}function Ge(n){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],s=arguments[2],a=arguments[3],f=[],l=1,u=16,d="S",m=null;jt(n=n||{})==="object"&&(e=n.orientation,r=n.unit||r,s=n.format||s,a=n.compress||n.compressPdf||a,(m=n.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),l=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(t=n.precision),n.floatPrecision!==void 0&&(u=n.floatPrecision),d=n.defaultPathOperation||"S"),f=n.filters||(a===!0?["FlateEncode"]:f),r=r||"mm",e=(""+(e||"P")).toLowerCase();var w=n.putOnlyUsedFonts||!1,S={},p={internal:{},__private__:{}};p.__private__.PubSub=gu;var C="1.3",E=p.__private__.getPdfVersion=function(){return C};p.__private__.setPdfVersion=function(c){C=c};var O={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]};p.__private__.getPageFormats=function(){return O};var k=p.__private__.getPageFormat=function(c){return O[c]};s=s||"a4";var Y="compat",V="advanced",q=Y;function oe(){this.saveGraphicsState(),j(new Xe(ot,0,0,-ot,0,Ui()*ot).toString()+" cm"),this.setFontSize(this.getFontSize()/ot),d="n",q=V}function ye(){this.restoreGraphicsState(),d="S",q=Y}var ne=p.__private__.combineFontStyleAndFontWeight=function(c,v){if(c=="bold"&&v=="normal"||c=="bold"&&v==400||c=="normal"&&v=="italic"||c=="bold"&&v=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return v&&(c=v==400||v==="normal"?c==="italic"?"italic":"normal":v!=700&&v!=="bold"||c!=="normal"?(v==700?"bold":v)+""+c:"bold"),c};p.advancedAPI=function(c){var v=q===Y;return v&&oe.call(this),typeof c!="function"||(c(this),v&&ye.call(this)),this},p.compatAPI=function(c){var v=q===V;return v&&ye.call(this),typeof c!="function"||(c(this),v&&oe.call(this)),this},p.isAdvancedAPI=function(){return q===V};var K,R=function(c){if(q!==V)throw new Error(c+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},Z=p.roundToPrecision=p.__private__.roundToPrecision=function(c,v){var F=t||v;if(isNaN(c)||isNaN(F))throw new Error("Invalid argument passed to
53jsPDF.roundToPrecision");return c.toFixed(F).replace(/0+$/,"")};K=p.hpf=p.__private__.hpf=typeof u=="number"?function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return Z(c,u)}:u==="smart"?function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return Z(c,c>-1&&c<1?16:5)}:function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return Z(c,16)};var _=p.f2=p.__private__.f2=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.f2");return Z(c,2)},I=p.__private__.f3=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.f3");return Z(c,3)},H=p.scale=p.__private__.scale=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.scale");return q===Y?c*ot:q===V?c:void 0},U=function(c){return H(function(v){return q===Y?Ui()-v:q===V?v:void 0}(c))};p.__private__.setPrecision=p.setPrecision=function(c){typeof parseInt(c,10)=="number"&&(t=parseInt(c,10))};var se,le="00000000000000000000000000000000",he=p.__private__.getFileId=function(){return le},te=p.__private__.setFileId=function(c){return le=c!==void 0&&/^[a-fA-F0-9]{32}$/.test(c)?c.toUpperCase():le.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(dn=new ja(m.userPermissions,m.userPassword,m.ownerPassword,le)),le};p.setFileId=function(c){return te(c),this},p.getFileId=function(){return he()};var de=p.__private__.convertDateToPDFDate=function(c){var v=c.getTimezoneOffset(),F=v<0?"+":"-",z=Math.floor(Math.abs(v/60)),X=Math.abs(v%60),pe=[F,B(z),"'",B(X),"'"].join("");return["D:",c.getFullYear(),B(c.getMonth()+1),B(c.getDate()),B(c.getHours()),B(c.getMinutes()),B(c.getSeconds()),pe].join("")},ke=p.__private__.convertPDFDateToDate=function(c){var v=parseInt(c.substr(2,4),10),F=parseInt(c.substr(6,2),10)-1,z=parseInt(c.substr(8,2),10),X=parseInt(c.substr(10,2),10),pe=parseInt(c.substr(12,2),10),Ae=parseInt(c.substr(14,2),10);return new Date(v,F,z,X,pe,Ae,0)},we=p.__private__.setCreationDate=function(c){var v;if(c===void 0&&(c=new Date),c instanceof Date)v=de(c);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(c))throw new Error("Invalid argument passed to jsPDF.setCreationDate");v=c}return se=v},A=p.__private__.getCreationDate=function(c){var v=se;return c==="jsDate"&&(v=ke(se)),v};p.setCreationDate=function(c){return we(c),this},p.getCreationDate=function(c){return A(c)};var D,B=p.__private__.padd2=function(c){return("0"+parseInt(c)).slice(-2)},W=p.__private__.padd2Hex=function(c){return("00"+(c=c.toString())).substr(c.length)},$=0,Q=[],ce=[],fe=0,be=[],Pe=[],Ie=!1,ue=ce;p.__private__.setCustomOutputDestination=function(c){Ie=!0,ue=c};var Ee=function(c){Ie||(ue=c)};p.__private__.resetCustomOutputDestination=function(){Ie=!1,ue=ce};var j=p.__private__.out=function(c){return c=c.toString(),fe+=c.length+1,ue.push(c),ue},Se=p.__private__.write=function(c){return j(arguments.length===1?c.toString():Array.prototype.join.call(arguments," "))},Ye=p.__private__.getArrayBuffer=function(c){for(var v=c.length,F=new ArrayBuffer(v),z=new Uint8Array(F);v--;)z[v]=c.charCodeAt(v);return F},Ue=[["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]];p.__private__.getStandardFonts=function(){return Ue};var Ne=n.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(c){return Ne=q===V?c/
vendor: 20,231 bytes, lines 53-57
53ot:c,this};var Be,Fe=p.__private__.getFontSize=p.getFontSize=function(){return q===Y?Ne:Ne*ot},Je=n.R2L||!1;p.__private__.setR2L=p.setR2L=function(c){return Je=c,this},p.__private__.getR2L=p.getR2L=function(){return Je};var $e,wt=p.__private__.setZoomMode=function(c){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(c))Be=c;else if(isNaN(c)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(c)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+c+'" is not recognized.');Be=c}else Be=parseInt(c,10)};p.__private__.getZoomMode=function(){return Be};var ht,rt=p.__private__.setPageMode=function(c){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(c)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+c+'" is not recognized.');$e=c};p.__private__.getPageMode=function(){return $e};var bt=p.__private__.setLayoutMode=function(c){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(c)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+c+'" is not recognized.');ht=c};p.__private__.getLayoutMode=function(){return ht},p.__private__.setDisplayMode=p.setDisplayMode=function(c,v,F){return wt(c),bt(v),rt(F),this};var gt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(c){if(Object.keys(gt).indexOf(c)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return gt[c]},p.__private__.getDocumentProperties=function(){return gt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(c){for(var v in gt)gt.hasOwnProperty(v)&&c[v]&&(gt[v]=c[v]);return this},p.__private__.setDocumentProperty=function(c,v){if(Object.keys(gt).indexOf(c)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return gt[c]=v};var De,ot,We,Gt,vt,lt={},tt={},Ct=[],Ke={},Lt={},et={},it={},It=null,dt=0,Qe=[],yt=new gu(p),Jr=n.hotfixes||[],en={},wr={},rr=[],Xe=function c(v,F,z,X,pe,Ae){if(!(this instanceof c))return new c(v,F,z,X,pe,Ae);isNaN(v)&&(v=1),isNaN(F)&&(F=0),isNaN(z)&&(z=0),isNaN(X)&&(X=1),isNaN(pe)&&(pe=0),isNaN(Ae)&&(Ae=0),this._matrix=[v,F,z,X,pe,Ae]};Object.defineProperty(Xe.prototype,"sx",{get:function(){return this._matrix[0]},set:function(c){this._matrix[0]=c}}),Object.defineProperty(Xe.prototype,"shy",{get:function(){return this._matrix[1]},set:function(c){this._matrix[1]=c}}),Object.defineProperty(Xe.prototype,"shx",{get:function(){return this._matrix[2]},set:function(c){this._matrix[2]=c}}),Object.defineProperty(Xe.prototype,"sy",{get:function(){return this._matrix[3]},set:function(c){this._matrix[3]=c}}),Object.defineProperty(Xe.prototype,"tx",{get:function(){return this._matrix[4]},set:function(c){this._matrix[4]=c}}),Object.defineProperty(Xe.prototype,"ty",{get:function(){return this._matrix[5]},set:function(c){this._matrix[5]=c}}),Object.defineProperty(Xe.prototype,"a",{get:function(){return this._matrix[0]},set:function(c){this._matrix[0]=c}}),Object.defineProperty(Xe.prototype,"b",{get:function(){return this._matrix[1]},set:function(c){this._matrix[1]=c}}),Object.defineProperty(Xe.prototype,"c",{get:function(){return this._matrix[2]},set:function(c){this._matrix[2]=c}}),Object.defineProperty(Xe.prototype,"d",{get:function(){return this._matrix[3]},set:function(c){this._matrix[3]=c}}),Object.defineProperty(Xe.prototype,"e",{get:function(){return this._matrix[4]},set:function(c){this._matrix[4]=c}}),Object.defineProperty(Xe.prototype,"f",{get:function(){return this._matrix[5]},set:function(c){this._matrix[5]=c}}),Object.defineProperty(Xe.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Xe.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Xe.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Xe.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Xe.prototype.join=function(c){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(K).join(c)},Xe.prototype.multiply=function(c){var v=c.sx*this.sx+c.shy*this.shx,F=c.sx*this.shy+c.shy*this.sy,z=c.shx*this.sx+c.sy*this.shx,X=c.shx*this.shy+c.sy*this.sy,pe=c.tx*this.sx+c.ty*this.shx+this.tx,Ae=c.tx*this.shy+c.ty*this.sy+this.ty;return new Xe(v,F,z,X,pe,Ae)},Xe.prototype.decompose=function(){var c=this.sx,v=this.shy,F=this.shx,z=this.sy,X=this.tx,pe=this.ty,Ae=Math.sqrt(c*c+v*v),qe=(c/=Ae)*F+(v/=Ae)*z;F-=c*qe,z-=v*qe;var Re=Math.sqrt(F*F+z*z);return qe/=Re,c*(z/=Re)<v*(F/=Re)&&(c=-c,v=-v,qe=-qe,Ae=-Ae),{scale:new Xe(Ae,0,0,Re,0,0),translate:new Xe(1,0,0,1,X,pe),rotate:new Xe(c,v,-v,c,0,0),skew:new Xe(1,0,qe,1,0,0)}},Xe.prototype.toString=function(c){return this.join(" ")},Xe.prototype.inversed=function(){var c=this.sx,v=this.shy,F=this.shx,z=this.sy,X=this.tx,pe=this.ty,Ae=1/(c*z-v*F),qe=z*Ae,Re=-v*Ae,st=-F*Ae,ut=c*Ae;return new Xe(qe,Re,st,ut,-qe*X-st*pe,-Re*X-ut*pe)},Xe.prototype.applyToPoint=function(c){var v=c.x*this.sx+c.y*this.shx+this.tx,F=c.x*this.shy+c.y*this.sy+this.ty;return new qi(v,F)},Xe.prototype.applyToRectangle=function(c){var v=this.applyToPoint(c),F=this.applyToPoint(new qi(c.x+c.w,c.y+c.h));return new Xa(v.x,v.y,F.x-v.x,F.y-v.y)},Xe.prototype.clone=function(){var c=this.sx,v=this.shy,F=this.shx,z=this.sy,X=this.tx,pe=this.ty;return new Xe(c,v,F,z,X,pe)},p.Matrix=Xe;var Mn=p.matrixMult=function(c,v){return v.multiply(c)},Yn=new Xe(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Yn;var Dn=function(c,v){if(!Lt[c]){var F=(v instanceof na?"Sh":"P")+(Object.keys(Ke).length+1).toString(10);v.id=F,Lt[c]=F,Ke[F]=v,yt.publish("addPattern",v)}};p.ShadingPattern=na,p.TilingPattern=Fa,p.addShadingPattern=function(c,v){return R("addShadingPattern()"),Dn(c,v),this},p.beginTilingPattern=function(c){R("beginTilingPattern()"),Za(c.boundingBox[0],c.boundingBox[1],c.boundingBox[2]-c.boundingBox[0],c.boundingBox[3]-c.boundingBox[1],c.matrix)},p.endTilingPattern=function(c,v){R("endTilingPattern()"),v.stream=Pe[D].join(` 54`),Dn(c,v),yt.publish("endTilingPattern",v),rr.pop().restore()};var On,qt=p.__private__.newObject=function(){var c=tn();return hn(c,!0),c},tn=p.__private__.newObjectDeferred=function(){return $++,Q[$]=function(){return fe},$},hn=function(c,v){return v=typeof v=="boolean"&&v,Q[c]=fe,v&&j(c+" 0 obj"),c},Er=p.__private__.newAdditionalObject=function(){var c={objId:tn(),content:""};return be.push(c),c},wn=tn(),Ln=tn(),ir=p.__private__.decodeColorString=function(c){var v=c.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 F=parseFloat(v[0]);v=[F,F,F,"r"]}for(var z="#",X=0;X<3;X++)z+=("0"+Math.floor(255*parseFloat(v[X])).toString(16)).slice(-2);return z},$n=p.__private__.encodeColorString=function(c){var v;typeof c=="string"&&(c={ch1:c});var F=c.ch1,z=c.ch2,X=c.ch3,pe=c.ch4,Ae=c.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof F=="string"&&F.charAt(0)!=="#"){var qe=new wf(F);if(qe.ok)F=qe.toHex();else if(!/^\d*\.?\d*$/.test(F))throw new Error('Invalid color "'+F+'" passed to jsPDF.encodeColorString.')}if(typeof F=="string"&&/^#[0-9A-Fa-f]{3}$/.test(F)&&(F="#"+F[1]+F[1]+F[2]+F[2]+F[3]+F[3]),typeof F=="string"&&/^#[0-9A-Fa-f]{6}$/.test(F)){var Re=parseInt(F.substr(1),16);F=Re>>16&255,z=Re>>8&255,X=255&Re}if(z===void 0||pe===void 0&&F===z&&z===X)v=typeof F=="string"?F+" "+Ae[0]:c.precision===2?_(F/255)+" "+Ae[0]:I(F/255)+" "+Ae[0];else if(pe===void 0||jt(pe)==="object"){if(pe&&!isNaN(pe.a)&&pe.a===0)return["1.","1.","1.",Ae[1]].join(" ");v=typeof F=="string"?[F,z,X,Ae[1]].join(" "):c.precision===2?[_(F/255),_(z/255),_(X/255),Ae[1]].join(" "):[I(F/255),I(z/255),I(X/255),Ae[1]].join(" ")}else v=typeof F=="string"?[F,z,X,pe,Ae[2]].join(" "):c.precision===2?[_(F),_(z),_(X),_(pe),Ae[2]].join(" "):[I(F),I(z),I(X),I(pe),Ae[2]].join(" ");return v},Kn=p.__private__.getFilters=function(){return f},Rn=p.__private__.putStream=function(c){var v=(c=c||{}).data||"",F=c.filters||Kn(),z=c.alreadyAppliedFilters||[],X=c.addLength1||!1,pe=v.length,Ae=c.objectId,qe=function(zt){return zt};if(m!==null&&Ae===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(qe=dn.encryptor(Ae,0));var Re={};F===!0&&(F=["FlateEncode"]);var st=c.additionalKeyValues||[],ut=(Re=Ge.API.processDataByFilters!==void 0?Ge.API.processDataByFilters(v,F):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(z)?z.join(" "):z.toString());if(Re.data.length!==0&&(st.push({key:"Length",value:Re.data.length}),X===!0&&st.push({key:"Length1",value:pe})),ut.length!=0)if(ut.split("/").length-1==1)st.push({key:"Filter",value:ut});else{st.push({key:"Filter",value:"["+ut+"]"});for(var Nt=0;Nt<st.length;Nt+=1)if(st[Nt].key==="DecodeParms"){for(var un=[],Ft=0;Ft<Re.reverseChain.split("/").length-1;Ft+=1)un.push("null");un.push(st[Nt].value),st[Nt].value="["+un.join(" ")+"]"}}j("<<");for(var Et=0;Et<st.length;Et++)j("/"+st[Et].key+" "+st[Et].value);j(">>"),Re.data.length!==0&&(j("stream"),j(qe(Re.data)),j("endstream"))},Ir=p.__private__.putPage=function(c){var v=c.number,F=c.data,z=c.objId,X=c.contentsObjId;hn(z,!0),j("<</Type /Page"),j("/Parent "+c.rootDictionaryObjId+" 0 R"),j("/Resources "+c.resourceDictionaryObjId+" 0 R"),j("/MediaBox ["+parseFloat(K(c.mediaBox.bottomLeftX))+" "+parseFloat(K(c.mediaBox.bottomLeftY))+" "+K(c.mediaBox.topRightX)+" "+K(c.mediaBox.topRightY)+"]"),c.cropBox!==null&&j("/CropBox ["+K(c.cropBox.bottomLeftX)+" "+K(c.cropBox.bottomLeftY)+" "+K(c.cropBox.topRightX)+" "+K(c.cropBox.topRightY)+"]"),c.bleedBox!==null&&j("/BleedBox ["+K(c.bleedBox.bottomLeftX)+" "+K(c.bleedBox.bottomLeftY)+" "+K(c.bleedBox.topRightX)+" "+K(c.bleedBox.topRightY)+"]"),c.trimBox!==null&&j("/TrimBox ["+K(c.trimBox.bottomLeftX)+" "+K(c.trimBox.bottomLeftY)+" "+K(c.trimBox.topRightX)+" "+K(c.trimBox.topRightY)+"]"),c.artBox!==null&&j("/ArtBox ["+K(c.artBox.bottomLeftX)+" "+K(c.artBox.bottomLeftY)+" "+K(c.artBox.topRightX)+" "+K(c.artBox.topRightY)+"]"),typeof c.userUnit=="number"&&c.userUnit!==1&&j("/UserUnit "+c.userUnit),yt.publish("putPage",{objId:z,pageContext:Qe[v],pageNumber:v,page:F}),j("/Contents "+X+" 0 R"),j(">>"),j("endobj");var pe=F.join(` 55`);return q===V&&(pe+=` 56Q`),hn(X,!0),Rn({data:pe,filters:Kn(),objectId:X}),j("endobj"),z},Jn=p.__private__.putPages=function(){var c,v,F=[];for(c=1;c<=dt;c++)Qe[c].objId=tn(),Qe[c].contentsObjId=tn();for(c=1;c<=dt;c++)F.push(Ir({number:c,data:Pe[c],objId:Qe[c].objId,contentsObjId:Qe[c].contentsObjId,mediaBox:Qe[c].mediaBox,cropBox:Qe[c].cropBox,bleedBox:Qe[c].bleedBox,trimBox:Qe[c].trimBox,artBox:Qe[c].artBox,userUnit:Qe[c].userUnit,rootDictionaryObjId:wn,resourceDictionaryObjId:Ln}));hn(wn,!0),j("<</Type /Pages");var z="/Kids [";for(v=0;v<dt;v++)z+=F[v]+" 0 R ";j(z+"]"),j("/Count "+dt),j(">>"),j("endobj"),yt.publish("postPutPages")},Xn=function(c){yt.publish("putFont",{font:c,out:j,newObject:qt,putStream:Rn}),c.isAlreadyPutted!==!0&&(c.objectNumber=qt(),j("<<"),j("/Type /Font"),j("/BaseFont /"+Ca(c.postScriptName)),j("/Subtype /Type1"),typeof c.encoding=="string"&&j("/Encoding /"+c.encoding),j("/FirstChar 32"),j("/LastChar 255"),j(">>"),j("endobj"))},Fr=function(c){c.objectNumber=qt();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[K(c.x),K(c.y),K(c.x+c.width),K(c.y+c.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+c.matrix.toString()+"]"});var F=c.pages[1].join(` 57`);Rn({data:F,additionalKeyValues:v,objectId:c.objectNumber}),j("endobj")},pi=function(c,v){v||(v=21);var F=qt(),z=function(Ae,qe){var Re,st=[],ut=1/(qe-1);for(Re=0;Re<1;Re+=ut)st.push(Re);if(st.push(1),Ae[0].offset!=0){var Nt={offset:0,color:Ae[0].color};Ae.unshift(Nt)}if(Ae[Ae.length-1].offset!=1){var un={offset:1,color:Ae[Ae.length-1].color};Ae.push(un)}for(var Ft="",Et=0,zt=0;zt<st.length;zt++){for(Re=st[zt];Re>Ae[Et+1].offset;)Et++;var Kt=Ae[Et].offset,Jt=(Re-Kt)/(Ae[Et+1].offset-Kt),kn=Ae[Et].color,ri=Ae[Et+1].color;Ft+=W(Math.round((1-Jt)*kn[0]+Jt*ri[0]).toString(16))+W(Math.round((1-Jt)*kn[1]+Jt*ri[1]).toString(16))+W(Math.round((1-Jt)*kn[2]+Jt*ri[2]).toString(16))}return Ft.trim()}(c.colors,v),X=[];X.push({key:"FunctionType",value:"0"}),X.push({key:"Domain",value:"[0.0 1.0]"}),X.push({key:"Size",value:"["+v+"]"}),X.push({key:"BitsPerSample",value:"8"}),X.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),X.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Rn({data:z,additionalKeyValues:X,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:F}),j("endobj"),c.objectNumber=qt(),j("<< /ShadingType "+c.type),j("/ColorSpace /DeviceRGB");var pe="/Coords ["+K(parseFloat(c.coords[0]))+" "+K(parseFloat(c.coords[1]))+" ";c.type===2?pe+=K(parseFloat(c.coords[2]))+" "+K(parseFloat(c.coords[3])):pe+=K(parseFloat(c.coords[2]))+" "+K(parseFloat(c.coords[3]))+" "+K(parseFloat(c.coords[4]))+" "+K(parseFloat(c.coords[5])),j(pe+="]"),c.matrix&&j("/Matrix ["+c.matrix.toString()+"]"),j("/Function "+F+" 0 R"),j("/Extend [true true]"),j(">>"),j("endobj")},pr=function(c,v){var F=tn(),z=qt();v.push({resourcesOid:F,objectOid:z}),c.objectNumber=z;var X=[];X.push({key:"Type",value:"/Pattern"}),X.push({key:"PatternType",value:"1"}),X.push({key:"PaintType",value:"1"}),X.push({key:"TilingType",value:"1"}),X.push({key:"BBox",value:"["+c.boundingBox.map(K).join(" ")+"]"}),X.push({key:"XStep",value:K(c.xStep)}),X.push({key:"YStep",value:K(c.yStep)}),X.push({key:"Resources",value:F+" 0 R"}),c.matrix&&X.push({key:"Matrix",value:"["+c.matrix.toString()+"]"}),Rn({data:c.stream,additionalKeyValues:X,objectId:c.objectNumber}),j("endobj")},qa=function(c){for(var v in c.objectNumber=qt(),j("<<"),c)switch(v){case"opacity":j("/ca "+_(c[v]));break;case"stroke-opacity":j("/CA "+_(c[v]))}j(">>"),j("endobj")},Nr=function(c){hn(c.resourcesOid,!0),j("<<"),j("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var v in j("/Font <<"),lt)lt.hasOwnProperty(v)&&(w===!1||w===!0&&S.hasOwnProperty(v))&&j("/"+v+" "+lt[v].objectNumber+" 0 R");j(">>")}(),function(){if(Object.keys(Ke).length>0){for(var v in j("/Shading <<"),Ke)Ke.hasOwnProperty(v)&&Ke[v]instanceof na&&Ke[v].objectNumber>=0&&j("/"+v+" "+Ke[v].objectNumber+" 0 R");yt.publish("putShadingPatternDict"),j(">>")}}(),function(v){if(Object.keys(Ke).length>0){for(var F in j("/Pattern <<"),Ke)Ke.hasOwnProperty(F)&&Ke[F]instanceof p.TilingPattern&&Ke[F].objectNumber>=0&&Ke[F].objectNumber<v&&j("/"+F+" "+Ke[F].objectNumber+" 0 R");yt.publish("putTilingPatternDict"),j(">>")}}(c.objectOid),function(){if(Object.keys(et).length>0){var v;for(v in j("/ExtGState <<"),et)et.hasOwnProperty(v)&&et[v].objectNumber>=0&&j("/"+v+" "+et[v].objectNumber+" 0 R");yt.publish("putGStateDict"),j(">>")}}(),function(){for(var v in j("/XObject <<"),en)en.hasOwnProperty(v)&&en[v].objectNumber>=0&&j("/"+v+" "+en[v].objectNumber+" 0 R");yt.publish("putXobjectDict"),j(">>")}(),j(">>"),j("endobj")},Ti=function(c){tt[c.fontName]=tt[c.fontName]||{},tt[c.fontName][c.fontStyle]=c.id},Mi=function(c,v,F,z,X){var pe={id:"F"+(Object.keys(lt).length+1).toString(10),postScriptName:c,fontName:v,fontStyle:F,encoding:z,isStandardFont:X||!1,metadata:{}};return yt.publish("addFont",{font:pe,instance:this}),lt[pe.id]=pe,Ti(pe),pe.id},Zn=p.__private__.pdfEscape=p.pdfEscape=function(c,v){return function(F,z){var X,pe,Ae,qe,Re,st,ut,Nt,un;if(Ae=(z=z||{}).sourceEncoding||"Unicode",Re=z.outputEncoding,(z.autoencode||Re)&<[De].metadata&<[De].metadata[Ae]&<[De].metadata[Ae].encoding&&(qe=lt[De].metadata[Ae].encoding,!Re&<[De].encoding&&(Re=lt[De].encoding),!Re&&qe.codePages&&(Re=qe.codePages[0]),typeof Re=="string"&&(Re=qe[Re]),Re)){for(ut=!1,st=[],X=0,pe=F.length;X<pe;X++)(Nt=Re[F.charCodeAt(X)])?st.push(String.fromCharCode(Nt)):st.push(F[X]),st[X].charCodeAt(0)>>8&&(ut=!0);F=st.join("")}for(X=F.length;ut===void 0&&X!==0;)F.charCodeAt(X-1)>>8&&(ut=!0),X--;if(!ut)return F;for(st=z.noBOM?[]:[254,255],X=0,pe=F.length;X<pe;X++){if((un=(Nt=F.charCodeAt(X))>>8)>>8)throw new Error("Character at position "+X+" of string '"+F+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");st.push(un),st.push(Nt-(un<<8))}return String.fromCharCode.apply(void 0,st)}(c,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},mr=p.__private__.beginPage=function(c){Pe[++dt]=[],Qe[dt]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(c[0]),topRightY:Number(c[1])}},mi(dt),Ee(Pe[D])},ar=function(c,v){var F,z,X;switch(e=v||e,typeof c=="string"&&(F=k(c.toLowerCase()),Array.isArray(F)&&(z=F[0],X=F[1])),Array.isArray(c)&&(z=c[0]*ot,X=c[1]*ot),isNaN(z)&&(z=s[0],X=s[1]),(z>14400||X>14400)&&(Mt.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),z=Math.min(14400,z),X=Math.min(14400,X)),s=[z,X],e.substr(0,1)){case"l":X>z&&(s=[X,z]);break;case"p":z>X&&(s=[X,z])}mr(s),Ze(xe),j(Bi),Ka!==0&&j(Ka+" J"),vi!==0&&j(vi+" j"),yt.publish("addPage",{pageNumber:dt})},Xr=function(c){c>0&&c<=dt&&(Pe.splice(c,1),Qe.splice(c,1),dt--,D>dt&&(D=dt),this.setPage(D))},mi=function(c){c>0&&c<=dt&&(D=c)},Tr=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Pe.length-1},ca=function(c,v,F){var z,X=void 0;return F=F||{},c=c!==void 0?c:lt[De].fontName,v=v!==void 0?v:lt[De].fontStyle,z=c.toLowerCase(),tt[z]!==void 0&&tt[z][v]!==void 0?X=tt[z][v]:tt[c]!==void 0&&tt[c][v]!==void 0?X=tt[c][v]:F.disableWarning===!1&&Mt.warn("Unable to look up font label for font '"+c+"', '"+v+"'. Refer to getFontList() for available fonts."),X||F.noFallback||(X=tt.times[v])==null&&(X=tt.times.normal),X},Bn=p.__private__.putInfo=function(){var c=qt(),v=function(z){return z};for(var F in m!==null&&(v=dn.encryptor(c,0)),j("<<"),j("/Producer ("+Zn(v("jsPDF "+Ge.version))+")"),gt)gt.hasOwnProperty(F)&>[F]&&j("/"+F.substr(0,1).toUpperCase()+F.substr(1)+" ("+Zn(v(gt[F]))+")");j("/CreationDate ("+Zn(v(se))+")"),j(">>"),j("endobj")},gi=p.__private__.putCatalog=function(c){var v=(c=c||{}).rootDictionaryObjId||wn;switch(qt(),j("<<"),j("/Type /Catalog"),j("/Pages "+v+" 0 R"),Be||(Be="fullwidth"),Be){case"fullwidth":j("/OpenAction [3 0 R /FitH null]");break;case"fullheight":j("/OpenAction [3 0 R /FitV null]");break;case"fullpage":j("/OpenAction [3 0 R /Fit]");break;case"original":j("/OpenAction [3 0 R /XYZ null null 1]");break;default:var F=""+Be;F.substr(F.length-1)==="%"&&(Be=parseInt(Be)/100),typeof Be=="number"&&j("/OpenAction [3 0 R /XYZ null null "+_(Be)+"]")}switch(ht||(ht="continuous"),ht){case"continuous":j("/PageLayout /OneColumn");break;case"single":j("/PageLayout /SinglePage");break;case"two":case"twoleft":j("/PageLayout /TwoColumnLeft");break;case"tworight":j("/PageLayout /TwoColumnRight")}$e&&j("/PageMode /"+$e),yt.publish("putCatalog"),j(">>"),j("endobj")},Di=p.__private__.putTrailer=function(){j("trailer"),j("<<"),j("/Size "+($+1)),j("/Root "+$+" 0 R"),j("/Info "+($-1)+" 0 R"),m!==null&&j("/Encrypt "+dn.oid+" 0 R"),j("/ID [ <"+le+"> <"+le+"> ]"),j(">>")},Yt=p.__private__.putHeader=function(){j("%PDF-"+C),j("%ºÃˆ ")},Zr=p.__private__.putXRef=function(){var c="0000000000";j("xref"),j("0 "+($+1)),j("0000000000 65535 f ");for(var v=1;v<=$;v++)typeof Q[v]=="function"?j((c+Q[v]()).slice(-10)+" 00000 n "):Q[v]!==void 0?j((c+Q[v]).slice(-10)+" 00000 n "):j("0000000000 00000 n ")},qn=p.__private__.buildDocument=function(){var c;$=0,fe=0,ce=[],Q=[],be=[],wn=tn(),Ln=tn(),Ee(ce),yt.publish("buildDocument"),Yt(),Jn(),function(){yt.publish("putAdditionalObjects");for(var F=0;F<be.length;F++){var z=be[F];hn(z.objId,!0),j(z.content),j("endobj")}yt.publish("postPutAdditionalObjects")}(),c=[],function(){for(var F in lt)lt.hasOwnProperty(F)&&(w===!1||w===!0&&S.hasOwnProperty(F))&&Xn(lt[F])}(),function(){var F;for(F in et)et.hasOwnProperty(F)&&qa(et[F])}(),function(){for(var F in en)en.hasOwnProperty(F)&&Fr(en[F])}(),function(F){var z;for(z in Ke)Ke.hasOwnProperty(z)&&(Ke[z]instanceof na?pi(Ke[z]):Ke[z]instanceof Fa&&pr(Ke[z],F))}
57(c),yt.publish("putResources"),c.forEach(Nr),Nr({resourcesOid:Ln,objectOid:Number.MAX_SAFE_INTEGER}),yt.publish("postPutResources"),m!==null&&(dn.oid=qt(),j("<<"),j("/Filter /Standard"),j("/V "+dn.v),j("/R "+dn.r),j("/U <"+dn.toHexString(dn.U)+">"),j("/O <"+dn.toHexString(dn.O)+">"),j("/P "+dn.P),j(">>"),j("endobj")),Bn(),gi();var v=fe;return Zr(),Di(),j("startxref"),j(""+v),j("%%EOF"),Ee(Pe[D]),ce.join(` 58`)},Mr=p.__private__.getBlob=function(c){return new Blob([Ye(c)],{type:"application/pdf"})},Dr=function(c){for(;c.firstChild;)c.removeChild(c.firstChild)},Un=function(c){var v,F=c.document,z=F.documentElement,X=F.head,pe=F.body;return X||(X=F.createElement("head"),z.appendChild(X)),pe||(pe=F.createElement("body"),z.appendChild(pe)),Dr(X),Dr(pe),(v=F.createElement("style")).appendChild(F.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),X.appendChild(v),{document:F,body:pe}},Qr=p.output=p.__private__.output=(On=function(c,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",c){case void 0:return qn();case"save":p.save(v.filename);break;case"arraybuffer":return Ye(qn());case"blob":return Mr(qn());case"bloburi":case"bloburl":if(nt.URL!==void 0&&typeof nt.URL.createObjectURL=="function")return nt.URL&&nt.URL.createObjectURL(Mr(qn()))||void 0;Mt.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;
58case"datauristring":case"dataurlstring":var F="",z=qn();try{F=du(z)}catch{F=du(unescape(encodeURIComponent(z)))}return"data:application/pdf;filename="+encodeURIComponent(v.filename)+";base64,"+F;case"pdfobjectnewwindow":if(Object.prototype.toString.call(nt)==="[object Window]"){var X="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",pe=!v.pdfObjectUrl;pe||(X=v.pdfObjectUrl);var Ae=nt.open();if(Ae!==null){var qe=Un(Ae),Re=qe.document.createElement("script"),st=this;Re.src=X,pe&&(Re.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Re.crossOrigin="anonymous"),Re.onload=function(){Ae.PDFObject.embed(st.output("dataurlstring"),v)},qe.body.appendChild(Re)}return Ae}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(nt)==="[object Window]"){var ut=v.pdfJsUrl||"examples/PDF.js/web/viewer.html",Nt=nt.open();if(Nt!==null){var un=Un(Nt),Ft=un.document.createElement("iframe"),Et=ut.indexOf("?")===-1?"?":"&";st=this,Ft.id="pdfViewer",Ft.width="500px",Ft.height="400px",Ft.src=ut+Et+"file=&downloadName="+encodeURIComponent(v.filename),Ft.onload=function(){Nt.document.title=v.filename,Ft.contentWindow.PDFViewerApplication.open(st.output("bloburl"))},un.body.appendChild(Ft)}return Nt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(nt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var zt=nt.open();if(zt!==null){var Kt=Un(zt),Jt=Kt.document.createElement("iframe");Jt.src=this.output("datauristring",v),Kt.body.appendChild(Jt),zt.document.title=v.filename}if(zt||typeof safari>"u")return zt;break;case"datauri":case"dataurl":return nt.document.location.href=this.output("datauristring",v);default:return null}},On.foo=function(){try{return On.apply(this,arguments)}catch(F){var c=F.stack||"";~c.indexOf(" at ")&&(c=c.split(" at ")[1]);var v="Error in function "+c.split(` 59`)[0].split("<")[0]+": "+F.message;if(!nt.console)throw new Error(v);nt.console.error(v,F),nt.alert&&alert(v)}},On.foo.bar=On,On.foo),gr=function(c){return Array.isArray(Jr)===!0&&Jr.indexOf(c)>-1};switch(r){case"pt":ot=1;break;case"mm":ot=72/25.4;break;case"cm":ot=72/2.54;break;case"in":ot=72;break;case"px":ot=gr("px_scaling")==1?.75:96/72;break;case"pc":case"em":ot=12;break;case"ex":ot=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ot=r}var dn=null;we(),te();var ua=p.__private__.getPageInfo=p.getPageInfo=function(c){if(isNaN(c)||c%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Qe[c].objId,pageNumber:c,pageContext:Qe[c]}},Ua=p.__private__.getPageInfoByObjId=function(c){if(isNaN(c)||c%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in Qe)if(Qe[v].objId===c)break;return ua(v)},za=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Qe[D].objId,pageNumber:D,pageContext:Qe[D]}};p.addPage=function(){return ar.apply(this,arguments),this},p.setPage=function(){return mi.apply(this,arguments),Ee.call(this,Pe[D]),this},p.insertPage=function(c){return this.addPage(),this.movePage(D,c),this},p.movePage=function(c,v){var F,z;if(c>v){F=Pe[c],z=Qe[c];for(var X=c;X>v;X--)Pe[X]=Pe[X-1],Qe[X]=Qe[X-1];Pe[v]=F,Qe[v]=z,this.setPage(v)}else if(c<v){F=Pe[c],z=Qe[c];for(var pe=c;pe<v;pe++)Pe[pe]=Pe[pe+1],Qe[pe]=Qe[pe+1];Pe[v]=F,Qe[v]=z,this.setPage(v)}return this},p.deletePage=function(){return Xr.apply(this,arguments),this},p.__private__.text=p.text=function(c,v,F,z,X){var pe,Ae,qe,Re,st,ut,Nt,un,Ft,Et=(z=z||{}).scope||this;if(typeof c=="number"&&typeof v=="number"&&(typeof F=="string"||Array.isArray(F))){var zt=F;F=v,v=c,c=zt}if(arguments[3]instanceof Xe==0?(qe=arguments[4],Re=arguments[5],jt(Nt=arguments[3])==="object"&&Nt!==null||(typeof qe=="string"&&(Re=qe,qe=null),typeof Nt=="string"&&(Re=Nt,Nt=null),typeof Nt=="number"&&(qe=Nt,Nt=null),z={flags:Nt,angle:qe,align:Re})):(R("The transform parameter of text() with a Matrix value"),Ft=X),isNaN(v)||isNaN(F)||c==null)throw new Error("Invalid arguments passed to
59jsPDF.text");if(c.length===0)return Et;var Kt,Jt="",kn=typeof z.lineHeightFactor=="number"?z.lineHeightFactor:ae,ri=Et.internal.scaleFactor;function Qa(Dt){return Dt=Dt.split(" ").join(Array(z.TabLen||9).join(" ")),Zn(Dt,Nt)}function zi(Dt){for(var Ot,rn=Dt.concat(),pn=[],ai=rn.length;ai--;)typeof(Ot=rn.shift())=="string"?pn.push(Ot):Array.isArray(Dt)&&(Ot.length===1||Ot[1]===void 0&&Ot[2]===void 0)?pn.push(Ot[0]):pn.push([Ot[0],Ot[1],Ot[2]]);return pn}function Hi(Dt,Ot){var rn;if(typeof Dt=="string")rn=Ot(Dt)[0];else if(Array.isArray(Dt)){for(var pn,ai,as=Dt.concat(),_a=[],Ps=as.length;Ps--;)typeof(pn=as.shift())=="string"?_a.push(Ot(pn)[0]):Array.isArray(pn)&&typeof pn[0]=="string"&&(ai=Ot(pn[0],pn[1],pn[2]),_a.push([ai[0],ai[1],ai[2]]));rn=_a}return rn}var yi=!1,Wi=!0;if(typeof c=="string")yi=!0;else if(Array.isArray(c)){var ga=c.concat();Ae=[];for(var ba,Pn=ga.length;Pn--;)(typeof(ba=ga.shift())!="string"||Array.isArray(ba)&&typeof ba[0]!="string")&&(Wi=!1);yi=Wi}if(yi===!1)throw new Error('Type of text must be string or Array. "'+c+'" is not recognized.');typeof c=="string"&&(c=c.match(/[\r?\n]/)?c.split(/\r\n|\r|\n/g):[c]);var Vi=Ne/Et.internal.scaleFactor,Gi=Vi*(kn-1);switch(z.baseline){case"bottom":F-=Gi;break;case"top":F+=Vi-Gi;break;case"hanging":F+=Vi-2*Gi;break;case"middle":F+=Vi/2-Gi}if((ut=z.maxWidth||0)>0&&(typeof c=="string"?c=Et.splitTextToSize(c,ut):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(Dt,Ot){return Dt.concat(Et.splitTextToSize(Ot,ut))},[]))),pe={text:c,x:v,y:F,options:z,mutex:{pdfEscape:Zn,activeFontKey:De,fonts:lt,activeFontSize:Ne}},yt.publish("preProcessText",pe),c=pe.text,qe=(z=pe.options).angle,Ft instanceof Xe==0&&qe&&typeof qe=="number"){qe*=Math.PI/180,z.rotationDirection===0&&(qe=-qe),q===V&&(qe=-qe);var es=Math.cos(qe),Ur=Math.sin(qe);Ft=new Xe(es,Ur,-Ur,es,0,0)}else qe&&qe instanceof Xe&&(Ft=qe);q!==V||Ft||(Ft=Yn),(st=z.charSpace||da)!==void 0&&(Jt+=K(H(st))+` Tc 60`,this.setCharSpace(this.getCharSpace()||0)),(un=z.horizontalScale)!==void 0&&(Jt+=K(100*un)+` Tz 61`),z.lang;var zn=-1,Ss=z.renderingMode!==void 0?z.renderingMode:z.stroke,va=Et.internal.getCurrentPageInfo().pageContext;switch(Ss){case 0:case!1:case"fill":zn=0;break;case 1:case!0:case"stroke":zn=1;break;case 2:case"fillThenStroke":zn=2;break;case 3:case"invisible":zn=3;break;case 4:case"fillAndAddForClipping":zn=4;break;case 5:case"strokeAndAddPathForClipping":zn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":zn=6;break;case 7:case"addToPathForClipping":zn=7}var ks=va.usedRenderingMode!==void 0?va.usedRenderingMode:-1;zn!==-1?Jt+=zn+` Tr 62`:ks!==-1&&(Jt+=`0 Tr 63`),zn!==-1&&(va.usedRenderingMode=zn),Re=z.align||"left";var br,Yi=Ne*kn,ts=Et.internal.pageSize.getWidth(),ya=lt[De];st=z.charSpace||da,ut=z.maxWidth||0,Nt=Object.assign({autoencode:!0,noBOM:!0},z.flags);var $i=[],ns=function(Dt){return Et.getStringUnitWidth(Dt,{font:ya,charSpace:st,fontSize:Ne,doKerning:!1})*Ne/ri};if(Object.prototype.toString.call(c)==="[object Array]"){var Hn;Ae=zi(c),Re!=="left"&&(br=Ae.map(ns));var Qn,xa=0;if(Re==="right"){v-=br[0],c=[],Pn=Ae.length;for(var xi=0;xi<Pn;xi++)xi===0?(Qn=$t(v),Hn=nn(F)):(Qn=H(xa-br[xi]),Hn=-Yi),c.push([Ae[xi],Qn,Hn]),xa=br[xi]}else if(Re==="center"){v-=br[0]/2,c=[],Pn=Ae.length;for(var wi=0;wi<Pn;wi++)wi===0?(Qn=$t(v),Hn=nn(F)):(Qn=H((xa-br[wi])/2),Hn=-Yi),c.push([Ae[wi],Qn,Hn]),xa=br[wi]}else if(Re==="left"){c=[],Pn=Ae.length;for(var wa=0;wa<Pn;wa++)c.push(Ae[wa])}else if(Re==="justify"&&ya.encoding==="Identity-H"){c=[],Pn=Ae.length,ut=ut!==0?ut:ts;for(var Ki=0,fn=0;fn<Pn;fn++)if(Hn=fn===0?nn(F):-Yi,Qn=fn===0?$t(v):Ki,fn<Pn-1){var xo=H((ut-br[fn])/(Ae[fn].split(" ").length-1)),zr=Ae[fn].split(" ");c.push([zr[0]+" ",Qn,Hn]),Ki=0;for(var Ar=1;Ar<zr.length;Ar++){var Ji=(ns(zr[Ar-1]+" "+zr[Ar])-ns(zr[Ar]))*ri+xo;Ar==zr.length-1?c.push([zr[Ar],Ji,0]):c.push([zr[Ar]+" ",Ji,0]),Ki-=Ji}}else c.push([Ae[fn],Qn,Hn]);c.push(["",Ki,0])}else{if(Re!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(c=[],Pn=Ae.length,ut=ut!==0?ut:ts,fn=0;fn<Pn;fn++){Hn=fn===0?nn(F):-Yi,Qn=fn===0?$t(v):0;var rs=Ae[fn].split(" ").length-1,is=rs>0?(ut-br[fn])/rs:0;fn<Pn-1?$i.push(K(H(is))):$i.push(0),c.push([Ae[fn],Qn,Hn])}}}(typeof z.R2L=="boolean"?z.R2L:Je)===!0&&(c=Hi(c,function(Dt,Ot,rn){return[Dt.split("").reverse().join(""),Ot,rn]})),pe={text:c,x:v,y:F,options:z,mutex:{pdfEscape:Zn,activeFontKey:De,fonts:lt,activeFontSize:Ne}},yt.publish("postProcessText",pe),c=pe.text,Kt=pe.mutex.isHex||!1;var Na=lt[De].encoding;Na!=="WinAnsiEncoding"&&Na!=="StandardEncoding"||(c=Hi(c,function(Dt,Ot,rn){return[Qa(Dt),Ot,rn]})),Ae=zi(c),c=[];for(var Xi,Zi,Ni,ii=Array.isArray(Ae[0])?1:0,Ai="",Aa=function(Dt,Ot,rn){var pn="";return rn instanceof Xe?(rn=typeof z.angle=="number"?Mn(rn,new Xe(1,0,0,1,Dt,Ot)):Mn(new Xe(1,0,0,1,Dt,Ot),rn),q===V&&(rn=Mn(new Xe(1,0,0,-1,0,0),rn)),pn=rn.join(" ")+` Tm 64`):pn=K(Dt)+" "+K(Ot)+` Td 65`,pn},jn=0;jn<Ae.length;jn++){switch(Ai="",ii){case 1:Ni=(Kt?"<":"(")+Ae[jn][0]+(Kt?">":")"),Xi=parseFloat(Ae[jn][1]),Zi=parseFloat(Ae[jn][2]);break;case 0:Ni=(Kt?"<":"(")+Ae[jn]+(Kt?">":")"),Xi=$t(v),Zi=nn(F)}$i!==void 0&&$i[jn]!==void 0&&(Ai=$i[jn]+` Tw 66`),jn===0?c.push(Ai+Aa(Xi,Zi,Ft)+Ni):ii===0?c.push(Ai+Ni):ii===1&&c.push(Ai+Aa(Xi,Zi,Ft)+Ni)}c=ii===0?c.join(` Tj 67T* `):c.join(` Tj 68`),c+=` Tj 69`;var Hr=`BT 70/`;return Hr+=De+" "+Ne+` Tf 71`,Hr+=K(Ne*kn)+` TL 72`,Hr+=qr+` 73`,Hr+=Jt,Hr+=c,j(Hr+="ET"),S[De]=!0,Et};var Ha=p.__private__.clip=p.clip=function(c){return j(c==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Ha("evenodd")},p.__private__.discardPath=p.discardPath=function(){return j("n"),this};var Sn=p.__private__.isValidStyle=function(c){var v=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(c)!==-1&&(v=!0),v};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(c){return Sn(c)&&(d=c),this};var fa=p.__private__.getStyle=p.getStyle=function(c){var v=d;switch(c){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=c}return v},ei=p.close=function(){return j("h"),this};p.stroke=function(){return j("S"),this},p.fill=function(c){return bi("f",c),this},p.fillEvenOdd=function(c){return bi("f*",c),this},p.fillStroke=function(c){return bi("B",c),this},p.fillStrokeEvenOdd=function(c){return bi("B*",c),this};var bi=function(c,v){jt(v)==="object"?Va(v,c):j(c)},Oi=function(c){c===null||q===V&&c===void 0||(c=fa(c),j(c))};function Wa(c,v,F,z,X){var pe=new Fa(v||this.boundingBox,F||this.xStep,z||this.yStep,this.gState,X||this.matrix
vendor: 4,357 bytes, line 73
73);pe.stream=this.stream;var Ae=c+"$$"+this.cloneIndex+++"$$";return Dn(Ae,pe),pe}var Va=function(c,v){var F=Lt[c.key],z=Ke[F];if(z instanceof na)j("q"),j(Ga(v)),z.gState&&p.setGState(z.gState),j(c.matrix.toString()+" cm"),j("/"+F+" sh"),j("Q");else if(z instanceof Fa){var X=new Xe(1,0,0,-1,0,Ui());c.matrix&&(X=X.multiply(c.matrix||Yn),F=Wa.call(z,c.key,c.boundingBox,c.xStep,c.yStep,X).id),j("q"),j("/Pattern cs"),j("/"+F+" scn"),z.gState&&p.setGState(z.gState),j(v),j("Q")}},Ga=function(c){switch(c){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Or=p.moveTo=function(c,v){return j(K(H(c))+" "+K(U(v))+" m"),this},ha=p.lineTo=function(c,v){return j(K(H(c))+" "+K(U(v))+" l"),this},Rr=p.curveTo=function(c,v,F,z,X,pe){return j([K(H(c)),K(U(v)),K(H(F)),K(U(z)),K(H(X)),K(U(pe)),"c"].join(" ")),this};p.__private__.line=p.line=function(c,v,F,z,X){if(isNaN(c)||isNaN(v)||isNaN(F)||isNaN(z)||!Sn(X))throw new Error("Invalid arguments passed to jsPDF.line");return q===Y?this.lines([[F-c,z-v]],c,v,[1,1],X||"S"):this.lines([[F-c,z-v]],c,v,[1,1]).stroke()},p.__private__.lines=p.lines=function(c,v,F,z,X,pe){var Ae,qe,Re,st,ut,Nt,un,Ft,Et,zt,Kt,Jt;if(typeof c=="number"&&(Jt=F,F=v,v=c,c=Jt),z=z||[1,1],pe=pe||!1,isNaN(v)||isNaN(F)||!Array.isArray(c)||!Array.isArray(z)||!Sn(X)||typeof pe!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Or(v,F),Ae=z[0],qe=z[1],st=c.length,zt=v,Kt=F,Re=0;Re<st;Re++)(ut=c[Re]).length===2?(zt=ut[0]*Ae+zt,Kt=ut[1]*qe+Kt,ha(zt,Kt)):(Nt=ut[0]*Ae+zt,un=ut[1]*qe+Kt,Ft=ut[2]*Ae+zt,Et=ut[3]*qe+Kt,zt=ut[4]*Ae+zt,Kt=ut[5]*qe+Kt,Rr(Nt,un,Ft,Et,zt,Kt));return pe&&ei(),Oi(X),this},p.path=function(c){for(var v=0;v<c.length;v++){var F=c[v],z=F.c;switch(F.op){case"m":Or(z[0],z[1]);break;case"l":ha(z[0],z[1]);break;case"c":Rr.apply(this,z);break;case"h":ei()}}return this},p.__private__.rect=p.rect=function(c,v,F,z,X){if(isNaN(c)||isNaN(v)||isNaN(F)||isNaN(z)||!Sn(X))throw new Error("Invalid arguments passed to jsPDF.rect");return q===Y&&(z=-z),j([K(H(c)),K(U(v)),K(H(F)),K(H(z)),"re"].join(" ")),Oi(X),this},p.__private__.triangle=p.triangle=function(c,v,F,z,X,pe,Ae){if(isNaN(c)||isNaN(v)||isNaN(F)||isNaN(z)||isNaN(X)||isNaN(pe)||!Sn(Ae))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[F-c,z-v],[X-F,pe-z],[c-X,v-pe]],c,v,[1,1],Ae,!0),this},p.__private__.roundedRect=p.roundedRect=function(c,v,F,z,X,pe,Ae){if(isNaN(c)||isNaN(v)||isNaN(F)||isNaN(z)||isNaN(X)||isNaN(pe)||!Sn(Ae))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var qe=4/3*(Math.SQRT2-1);return X=Math.min(X,.5*F),pe=Math.min(pe,.5*z),this.lines([[F-2*X,0],[X*qe,0,X,pe-pe*qe,X,pe],[0,z-2*pe],[0,pe*qe,-X*qe,pe,-X,pe],[2*X-F,0],[-X*qe,0,-X,-pe*qe,-X,-pe],[0,2*pe-z],[0,-pe*qe,X*qe,-pe,X,-pe]],c+X,v,[1,1],Ae,!0),this},p.__private__.ellipse=p.ellipse=function(c,v,F,z,X){if(isNaN(c)||isNaN(v)||isNaN(F)||isNaN(z)||!Sn(X))throw new Error("Invalid arguments passed to jsPDF.ellipse");var pe=4/3*(Math.SQRT2-1)*F,Ae=4/3*(Math.SQRT2-1)*z;return Or(c+F,v),Rr(c+F,v-Ae,c+pe,v-z,c,v-z),Rr(c-pe,v-z,c-F,v-Ae,c-F,v),Rr(c-F,v+Ae,c-pe,v+z,c,v+z),Rr(c+pe,v+z,c+F,v+Ae,c+F,v),Oi(X),this},p.__private__.circle=p.circle=function(c,v,F,z){if(isNaN(c)||isNaN(v)||isNaN(F)||!Sn(z))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(c,v,F,F,z)},p.setFont=function(c,v,F){return F&&(v=ne(v,F)),De=ca(c,v,{disableWarning:!1}),this};var Ya=p.__private__.getFont=p.getFont=function(){return lt[ca.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var c,v,F={};for(c in tt)if(tt.hasOwnProperty(c))for(v in F[c]=[],tt[c])tt[c].hasOwnProperty(v)&&F[c].push(v);return F},p.addFont=function(c,v,F,z,X){var pe=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&pe.indexOf(arguments[3])!==-1?X=arguments[3]:arguments[3]&&pe.indexOf(arguments[3])==-1&&(F=ne(F,z)),Mi.call(this,c,v,F,X=X||"Identity-H")};var ae,xe=n.lineWidth||.200025,Te=p.__private__.getLineWidth=p.getLineWidth=function(){return xe},Ze=p.__private__.setLineWidth=p.setLineWidth=function(c){return xe=c,j(K(H(c))+" w"),this};p.__private__.setLineDash=Ge.API.setLineDash=Ge.API.setLineDashPattern=function(c,v){if(c=c||[],v=v||0,isNaN(v)||!Array.isArray(c))throw new Error("Invalid arguments passed to
73jsPDF.setLineDash");return c=c.map(function(F){return K(H(F))}).join(" "),v=K(H(v)),j("["+c+"] "+v+" d"),this};var at=p.__private__.getLineHeight=p.getLineHeight=function(){return Ne*ae};p.__private__.getLineHeight=p.getLineHeight=function(){return Ne*ae};var Ut=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(c){return typeof(c=c||1.15)=="number"&&(ae=c),this},yn=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return ae};Ut(n.lineHeight);var $t=p.__private__.getHorizontalCoordinate=function(c){return H(c)},nn=p.__private__.getVerticalCoordinate=function(c){return q===V?c:Qe[D].mediaBox.topRightY-Qe[D].mediaBox.bottomLeftY-H(c)},Ri=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(c){return K($t(c))},Br=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(c){return K(nn(c))},Bi=n.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return ir(Bi)},p.__private__.setStrokeColor=p.setDrawColor=function(c,v,F,z){return Bi=$n({ch1:c,ch2:v,ch3:F,ch4:z,pdfColorType:"draw",precision:2}),j(Bi),this};var $a=n.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return ir($a)},p.__private__.setFillColor=p.setFillColor=function(c,v,F,z){return $a=$n({ch1:c,ch2:v,ch3:F,ch4:z,pdfColorType:"fill",precision:2}),j($a),this};var qr=n.textColor||"0 g",vo=p.__private__.getTextColor=p.getTextColor=function(){return ir(qr)};p.__private__.setTextColor=p.setTextColor=function(c,v,F,z){return qr=$n({ch1:c,ch2:v,ch3:F,ch4:z,pdfColorType:"text",precision:3}),this};var da=n.charSpace,yo=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(da||0)};p.__private__.setCharSpace=p.setCharSpace=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return da=c,this};var Ka=0;p.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},p.__private__.setLineCap=p.setLineCap=function(c){var v=p.CapJoinStyles[c];if(v===void 0)throw new Error("Line cap style of '"+c+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ka=v,j(v+" J"),this};var vi=0;p.__private__.setLineJoin=p.setLineJoin=function(c){var v=p.CapJoinStyles[c];if(v===void 0)throw new Error("Line join style of '"+c+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return vi=v,j(v+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(c){if(c=c||0,isNaN(c))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return j(K(H(c))+" M"),this},p.GState=ho,p.setGState=function(c){(c=typeof c=="string"?et[it[c]]:Ja(null,c)).equals(It)||(j("/"+c.id+" gs"),It=c)};var Ja=function(c,v){if(!c||!it[c]){var F=!1;for(var z in et)if(et.hasOwnProperty(z)&&et[z].equals(v)){F=!0;break}if(F)v=et[z];else{var X="GS"+(Object.keys(et).length+1).toString(10);et[X]=v,v.id=X}return c&&(it[c]=v.id),yt.publish("addGState",v),v}};p.addGState=function(c,v){return Ja(c,v),this},p.saveGraphicsState=function(){return j("q"),Ct.push({key:De,size:Ne,color:qr}),this},p.restoreGraphicsState=function(){j("Q");var c=Ct.pop();return De=c.key,Ne=c.size,qr=c.color,It=null,this},p.setCurrentTransformationMatrix=function(c){return j(c.toString()+" cm"),this},p.comment=function(c){return j("#"+c),this};var qi=function(c,v){var F=c||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return F},set:function(pe){isNaN(pe)||(F=parseFloat(pe))}});var z=v||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return z},set:function(pe){isNaN(pe)||(z=parseFloat(pe))}});var X="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return X},set:function(pe){X=pe.toString()}}),this},Xa=function(c,v,F,z){qi.call(this,c,v),this.type="rect";var X=F||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return X},set:function(Ae){isNaN(Ae)||(X=parseFloat(Ae))}});var pe=z||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return pe},set:function(Ae){isNaN(Ae)||(pe=parseFloat(Ae))}}),this},pa=function(){this.page=dt,this.currentPage=D,this.pages=Pe.slice(0),this.pagesContext=Qe.slice(0),this.x=We,this.y=Gt,this.matrix=vt,this.width=ws(D),this.height=ni(D),this.outputDestination=ue,this.id="",this.objectNumber=-1};pa.prototype.restore=function(){dt=this.page,D=this.currentPage,Qe=this.pagesContext,Pe=this.pages,We=this.x,Gt=this.y,vt=this.matrix,ti(D,this.width),Ns(D,this.height),ue=this.outputDestination};var Za=function(c,v,F,z,X){rr.push(new pa),dt=D=0,Pe=[],We=c,Gt=v,vt=X,mr([F,z])};for(var ma in p.beginFormObject=function(c,v,F,z,X){return Za(c,v,F,z,X),this},p.endFormObject=function(c){return function(v){if(wr[v])rr.pop().restore(
vendor: 28,822 bytes, lines 73-84
73);else{var F=new pa,z="Xo"+(Object.keys(en).length+1).toString(10);F.id=z,wr[v]=z,en[z]=F,yt.publish("addFormObject",F),rr.pop().restore()}}(c),this},p.doFormObject=function(c,v){var F=en[wr[c]];return j("q"),j(v.toString()+" cm"),j("/"+F.id+" Do"),j("Q"),this},p.getFormObject=function(c){var v=en[wr[c]];return{x:v.x,y:v.y,width:v.width,height:v.height,matrix:v.matrix}},p.save=function(c,v){return c=c||"generated.pdf",(v=v||{}).returnPromise=v.returnPromise||!1,v.returnPromise===!1?(ea(Mr(qn()),c),typeof ea.unload=="function"&&nt.setTimeout&&setTimeout(ea.unload,911),this):new Promise(function(F,z){try{var X=ea(Mr(qn()),c);typeof ea.unload=="function"&&nt.setTimeout&&setTimeout(ea.unload,911),F(X)}catch(pe){z(pe.message)}})},Ge.API)Ge.API.hasOwnProperty(ma)&&(ma==="events"&&Ge.API.events.length?function(c,v){var F,z,X;for(X=v.length-1;X!==-1;X--)F=v[X][0],z=v[X][1],c.subscribe.apply(c,[F].concat(typeof z=="function"?[z]:z))}(yt,Ge.API.events):p[ma]=Ge.API[ma]);function ws(c){return Qe[c].mediaBox.topRightX-Qe[c].mediaBox.bottomLeftX}function ti(c,v){Qe[c].mediaBox.topRightX=v+Qe[c].mediaBox.bottomLeftX}function ni(c){return Qe[c].mediaBox.topRightY-Qe[c].mediaBox.bottomLeftY}function Ns(c,v){Qe[c].mediaBox.topRightY=v+Qe[c].mediaBox.bottomLeftY}var As=p.getPageWidth=function(c){return ws(c=c||D)/ot},_s=p.setPageWidth=function(c,v){ti(c,v*ot)},Ui=p.getPageHeight=function(c){return ni(c=c||D)/ot},Ls=p.setPageHeight=function(c,v){Ns(c,v*ot)};return p.internal={pdfEscape:Zn,getStyle:fa,getFont:Ya,getFontSize:Fe,getCharSpace:yo,getTextColor:vo,getLineHeight:at,getLineHeightFactor:yn,getLineWidth:Te,write:Se,getHorizontalCoordinate:$t,getVerticalCoordinate:nn,getCoordinateString:Ri,getVerticalCoordinateString:Br,collections:{},newObject:qt,newAdditionalObject:Er,newObjectDeferred:tn,newObjectDeferredBegin:hn,getFilters:Kn,putStream:Rn,events:yt,scaleFactor:ot,pageSize:{getWidth:function(){return As(D)},setWidth:function(c){_s(D,c)},getHeight:function(){return Ui(D)},setHeight:function(c){Ls(D,c)}},encryptionOptions:m,encryption:dn,getEncryptor:function(c){return m!==null?dn.encryptor(c,0):function(v){return v}},output:Qr,getNumberOfPages:Tr,get pages(){return Pe},out:j,f2:_,f3:I,getPageInfo:ua,getPageInfoByObjId:Ua,getCurrentPageInfo:za,getPDFVersion:E,Point:qi,Rectangle:Xa,Matrix:Xe,hasHotfix:gr},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return As(D)},set:function(c){_s(D,c)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return Ui(D)},set:function(c){Ls(D,c)},enumerable:!0,configurable:!0}),(function(c){for(var v=0,F=Ue.length;v<F;v++){var z=Mi.call(this,c[v][0],c[v][1],c[v][2],Ue[v][3],!0);w===!1&&(S[z]=!0);var X=c[v][0].split("-");Ti({id:z,fontName:X[0],fontStyle:X[1]||""})}yt.publish("addFonts",{fonts:lt,dictionary:tt})}).call(p,Ue),De="F1",ar(s,e),yt.publish("initialized"),p}ja.prototype.lsbFirstWord=function(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)},ja.prototype.toHexString=function(n){return n.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ja.prototype.hexToBytes=function(n){for(var t=[],e=0;e<n.length;e+=2)t.push(String.fromCharCode(parseInt(n.substr(e,2),16)));return t.join("")},ja.prototype.processOwnerPassword=function(n,t){return Nl(wl(t).substr(0,5),n)},ja.prototype.encryptor=function(n,t){var e=wl(this.encryptionKey+String.fromCharCode(255&n,n>>8&255,n>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return Nl(e,r)}},ho.prototype.equals=function(n){var t,e="id,objectNumber,equals";if(!n||jt(n)!==jt(this))return!1;var r=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!n.hasOwnProperty(t)||this[t]!==n[t])return!1;r++}for(t in n)n.hasOwnProperty(t)&&e.indexOf(t)<0&&r--;return r===0},Ge.API={events:[]},Ge.version="4.2.1";var Qt=Ge.API,El=1,la=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ka=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},sa=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},ct=function(n){return n.toFixed(2)},Ei=function(n){return n.toFixed(5)};Qt.__acroform__={};var nr=function(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n},bu=function(n){return n*El},Vr=function(n){var t=new Lf,e=Oe.internal.getHeight(n)||0,r=Oe.internal.getWidth(n)||0;return t.BBox=[0,0,Number(ct(r)),Number(ct(e))],t},A2=Qt.__acroform__.setBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<<t},_2=Qt.__acroform__.clearBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return n&~(1<<t)},L2=Qt.__acroform__.getBit=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return n&1<<t?1:0},on=Qt.__acroform__.getBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return L2(n,t-1)},ln=Qt.__acroform__.setBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return A2(n,t-1)},cn=Qt.__acroform__.clearBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return _2(n,t-1)},S2=Qt.__acroform__.calculateCoordinates=function(n,t){var e=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,s=n[0],a=n[1],f=n[2],l=n[3],u={};return u.lowerLeft_X=e(s)||0,u.lowerLeft_Y=r(a+l)||0,u.upperRight_X=e(s+f)||0,u.upperRight_Y=r(a)||0,[Number(ct(u.lowerLeft_X)),Number(ct(u.lowerLeft_Y)),Number(ct(u.upperRight_X)),Number(ct(u.upperRight_Y))]},k2=function(n){if(n.appearanceStreamContent)return n.appearanceStreamContent;if(n.V||n.DV){var t=[],e=n._V||n.DV,r=Al(n,e),s=n.scope.internal.getFont(n.fontName,n.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(n.scope.__private__.encodeColorString(n.color)),t.push("/"+s+" "+ct(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=Vr(n);return a.scope=n.scope,a.stream=t.join(` 74`),a}},Al=function(n,t){var e=n.fontSize===0?n.maxFontSize:n.fontSize,r={text:"",fontSize:""},s=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");s=n.multiline?s.map(function(_){return _.split(` 75`)}):s.map(function(_){return[_]});var a=e,f=Oe.internal.getHeight(n)||0;f=f<0?-f:f;var l=Oe.internal.getWidth(n)||0;l=l<0?-l:l;var u=function(_,I,H){if(_+1<s.length){var U=I+" "+s[_+1][0];return eo(U,n,H).width<=l-4}return!1};a++;e:for(;a>0;){t="",a--;var d,m,w=eo("3",n,a).height,S=n.multiline?f-a:(f-w)/2,p=S+=2,C=0,E=0,O=0;if(a<=0){t=`(...) Tj 76`,t+="% Width of Text: "+eo(t,n,a=12).width+", FieldWidth:"+l+` 77`;break}for(var k="",Y=0,V=0;V<s.length;V++)if(s.hasOwnProperty(V)){var q=!1;if(s[V].length!==1&&O!==s[V].length-1){if((w+2)*(Y+2)+2>f)continue e;k+=s[V][O],q=!0,E=V,V--}else{k=(k+=s[V][O]+" ").substr(k.length-1)==" "?k.substr(0,k.length-1):k;var oe=parseInt(V),ye=u(oe,k,a),ne=V>=s.length-1;if(ye&&!ne){k+=" ",O=0;continue}if(ye||ne){if(ne)E=oe;else if(n.multiline&&(w+2)*(Y+2)+2>f)continue e}else{if(!n.multiline||(w+2)*(Y+2)+2>f)continue e;E=oe}}for(var K="",R=C;R<=E;R++){var Z=s[R];if(n.multiline){if(R===E){K+=Z[O]+" ",O=(O+1)%Z.length;continue}if(R===C){K+=Z[Z.length-1]+" ";continue}}K+=Z[0]+" "}switch(K=K.substr(K.length-1)==" "?K.substr(0,K.length-1):K,m=eo(K,n,a).width,n.textAlign){case"right":d=l-m-2;break;case"center":d=(l-m)/2;break;default:d=2}t+=ct(d)+" "+ct(p)+` Td 78`,t+="("+la(K)+`) Tj 79`,t+=-ct(d)+` 0 Td 80`,p=-(a+2),m=0,C=q?E:E+1,Y++,k=""}break}return r.text=t,r.fontSize=a,r},eo=function(n,t,e){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),s=t.scope.getStringUnitWidth(n,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:s}},P2={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},j2=function(n,t){var e={type:"reference",object:n};t.internal.getPageInfo(n.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&t.internal.getPageInfo(n.page).pageContext.annotations.push(e)},C2=function(n,t){if(t.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(jr.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(P2)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");El=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new Sf,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var s in r)if(r.hasOwnProperty(s)){var a=r[s];a.objId=void 0,a.hasAnnotation&&j2(a,e)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(e){(function(r,s){var a=!r;for(var f in r||(s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||s.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(f)){var l=r[f],u=[],d=l.Rect;if(l.Rect&&(l.Rect=S2(l.Rect,s)),s.internal.newObjectDeferredBegin(l.objId,!0),l.DA=Oe.createDefaultAppearanceStream(l),jt(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(u=l.getKeyValueListForStream()),l.Rect=d,l.hasAppearanceStream&&!l.appearanceStreamContent){var m=k2(l);u.push({key:"AP",value:"<</N "+m+">>"}),s.internal.acroformPlugin.xForms.push(m)}if(l.appearanceStreamContent){var w="";for(var S in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(S)){var p=l.appearanceStreamContent[S];if(w+="/"+S+" ",w+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var f in p)if(p.hasOwnProperty(f)){var C=p[f];typeof C=="function"&&(C=C.call(s,l)),w+="/"+f+" "+C+" ",s.internal.acroformPlugin.xForms.indexOf(C)>=0||s.internal.acroformPlugin.xForms.push(C)}}else typeof(C=p)=="function"&&(C=C.call(s,l)),w+="/"+f+" "+C,s.internal.acroformPlugin.xForms.indexOf(C)>=0||s.internal.acroformPlugin.xForms.push(C);w+=">>"}u.push({key:"AP",value:`<< 81`+w+">>"})}s.internal.putStream({additionalKeyValues:u,objectId:l.objId}),s.internal.out("endobj")}a&&function(E,O){for(var k in E)if(E.hasOwnProperty(k)){var Y=k,V=E[k];O.internal.newObjectDeferredBegin(V.objId,!0),jt(V)==="object"&&typeof V.putStream=="function"&&V.putStream(),delete E[Y]}}(s.internal.acroformPlugin.xForms,s)})(e,n)}),n.internal.acroformPlugin.isInitialized=!0}},_f=Qt.__acroform__.arrayToPdfArray=function(n,t,e){var r=function(f){return f};if(Array.isArray(n)){for(var s="[",a=0;a<n.length;a++)switch(a!==0&&(s+=" "),jt(n[a])){case"boolean":case"number":case"object":s+=n[a].toString();break;case"string":n[a].substr(0,1)==="/"?s+="/"+sa(n[a].substr(1)):(t!==void 0&&e&&(r=e.internal.getEncryptor(t)),s+="("+la(r(n[a].toString()))+")")}return s+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},nl=function(n,t,e){var r=function(s){return s};return t!==void 0&&e&&(r=e.internal.getEncryptor(t)),(n=n||"").toString(),"("+la(r(n))+")"},$r=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(n){this._objId=n}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};$r.prototype.toString=function(){return this.objId+" 0 R"},$r.prototype.putStream=function(){var n=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:n,objectId:this.objId}),this.scope.internal.out("endobj")},$r.prototype.getKeyValueListForStream=function(){var n=[],t=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var e in t)if(Object.getOwnPropertyDescriptor(this,t[e]).configurable===!1){var r=t[e],s=this[r];s&&(Array.isArray(s)?n.push({key:r,value:_f(s,this.objId,this.scope)}):s instanceof $r?(s.scope=this.scope,n.push({key:r,value:s.objId+" 0 R"})):typeof s!="function"&&n.push({key:r,value:s}))}return n};var Lf=function(){$r.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 n,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){n=e.trim()},get:function(){return n||null}})};nr(Lf,$r);var Sf=function(){$r.call(this);var n,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(n){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+la(e(n))+")"}},set:function(e){n=e}})};nr(Sf,$r);var jr=function n(){$r.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(k){if(isNaN(k))throw new Error('Invalid value "'+k+'" for attribute F supplied.');t=k}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!on(t,3)},set:function(k){k?this.F=ln(t,3):this.F=cn(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(k){if(isNaN(k))throw new Error('Invalid value "'+k+'" for attribute Ff supplied.');e=k}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(k){r=k!==void 0?k:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(k){r[0]=k}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(k){r[1]=k}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(k){r[2]=k}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(k){r[3]=k}});var s="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return s},set:function(k){switch(k){case"/Btn":case"/Tx":case"/Ch":case"/Sig":s=k;break;default:throw new Error('Invalid value "'+k+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof po)return;a="FieldObject"+n.FieldNum++}var k=function(Y){return Y};return this.scope&&(k=this.scope.internal.getEncryptor(this.objId)),"("+la(k(a))+")"},set:function(k){a=k.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(k){a=k}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(k){f=k}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(k){l=k}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(k){u=k}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/El:d},set:function(k){d=k}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(k){m=k}});var w="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!w||this instanceof po||this instanceof ra))return nl(w,this.objId,this.scope)},set:function(k){k=k.toString(),w=k}});var S=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(S)return this instanceof xn==0?nl(S,this.objId,this.scope):S},set:function(k){k=k.toString(),S=this instanceof xn==0?k.substr(0,1)==="("?ka(k.substr(1,k.length-2)):ka(k):k}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof xn==1?ka(S.substr(1,S.length-1)):S},set:function(k){k=k.toString(),S=this instanceof xn==1?"/"+sa(k):k}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(k){this.V=k}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof xn==0?nl(p,this.objId,this.scope):p},set:function(k){k=k.toString(),p=this instanceof xn==0?k.substr(0,1)==="("?ka(k.substr(1,k.length-2)):ka(k):k}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof xn==1?ka(p.substr(1,p.length-1)):p},set:function(k){k=k.toString(),p=this instanceof xn==1?"/"+sa(k):k}}),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 C,E=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return E},set:function(k){k=!!k,E=k}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(C)return C},set:function(k){C=k}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,1)},set:function(k){k?this.Ff=ln(this.Ff,1):this.Ff=cn(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,2)},set:function(k){k?this.Ff=ln(this.Ff,2):this.Ff=cn(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,3)},set:function(k){k?this.Ff=ln(this.Ff,3):this.Ff=cn(this.Ff,3)}});var O=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(O!==null)return O},set:function(k){if([0,1,2].indexOf(k)===-1)throw new Error('Invalid value "'+k+'" for attribute Q supplied.');O=k}}),Object.defineProperty(this,"textAlign",{get:function(){var k;switch(O){case 0:default:k="left";break;case 1:k="center";break;case 2:k="right"}return k},configurable:!0,enumerable:!0,set:function(k){switch(k){case"right":case 2:O=2;break;case"center":case 1:O=1;break;default:O=0}}})};nr(jr,$r);var Ta=function(){jr.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){n=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return _f(t,this.objId,this.scope)},set:function(e){var r,s;s=[],typeof(r=e)=="string"&&(s=function(a,f,l){l||(l=1);for(var u,d=[];u=f.exec(a);)d.push(u[l]);return d}(r,/\((.*?)\)/g)),t=s}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,18)},set:function(e){e?this.Ff=ln(this.Ff,18):this.Ff=cn(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=ln(this.Ff,19):this.Ff=cn(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,20)},set:function(e){e?(this.Ff=ln(this.Ff,20),t.sort()):this.Ff=cn(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,22)},set:function(e){e?this.Ff=ln(this.Ff,22):this.Ff=cn(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,23)},set:function(e){e?this.Ff=ln(this.Ff,23):this.Ff=cn(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,27)},set:function(e){e?this.Ff=ln(this.Ff,27):this.Ff=cn(this.Ff,27)}}),this.hasAppearanceStream=!1};nr(Ta,jr);var Ma=function(){Ta.call(this),this.fontName="helvetica",this.combo=!1};nr(Ma,Ta);var Da=function(){Ma.call(this),this.combo=!0};nr(Da,Ma);var ao=function(){Da.call(this),this.edit=!0};nr(ao,Da);var xn=function(){jr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,15)},set:function(e){e?this.Ff=ln(this.Ff,15):this.Ff=cn(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,16)},set:function(e){e?this.Ff=ln(this.Ff,16):this.Ff=cn(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,17)},set:function(e){e?this.Ff=ln(this.Ff,17):this.Ff=cn(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,26)},set:function(e){e?this.Ff=ln(this.Ff,26):this.Ff=cn(this.Ff,26)}});var n,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(a){return a};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,s=[];for(r in s.push("<<"),t)s.push("/"+r+" ("+la(e(t[r]))+")");return s.push(">>"),s.join(` 82`)}},set:function(e){jt(e)==="object"&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){typeof e=="string"&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),n="/"+sa(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+sa(e)}})};nr(xn,jr);var so=function(){xn.call(this),this.pushButton=!0};nr(so,xn);var Oa=function(){xn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t!==void 0?t:[]}})};nr(Oa,xn);var po=function(){var n,t;jr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(s){n=s}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(s){t=s}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var s=function(l){return l};this.scope&&(s=this.scope.internal.getEncryptor(this.objId));var a,f=[];for(a in f.push("<<"),r)f.push("/"+a+" ("+la(s(r[a]))+")");return f.push(">>"),f.join(` 83`)},set:function(s){jt(s)==="object"&&(r=s)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(s){typeof s=="string"&&(r.CA=s)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(s){var a=s==null?"":s.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),e="/"+sa(a)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(s){var a=s==null?"":s.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),e="/"+sa(a)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Oe.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};nr(po,jr),Oa.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=n.createAppearanceStream(e.optionName),e.caption=n.getCA()}},Oa.prototype.createOption=function(n){var t=new po;return t.Parent=this,t.optionName=n,this.Kids.push(t),E2.call(this.scope,t),t};var oo=function(){xn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Oe.CheckBox.createAppearanceStream()};nr(oo,xn);var ra=function(){jr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,13)},set:function(t){t?this.Ff=ln(this.Ff,13):this.Ff=cn(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,21)},set:function(t){t?this.Ff=ln(this.Ff,21):this.Ff=cn(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,23)},set:function(t){t?this.Ff=ln(this.Ff,23):this.Ff=cn(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,24)},set:function(t){t?this.Ff=ln(this.Ff,24):this.Ff=cn(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,25)},set:function(t){t?this.Ff=ln(this.Ff,25):this.Ff=cn(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,26)},set:function(t){t?this.Ff=ln(this.Ff,26):this.Ff=cn(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){Number.isInteger(t)&&(n=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};nr(ra,jr);var lo=function(){ra.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!on(this.Ff,14)},set:function(n){n?this.Ff=ln(this.Ff,14):this.Ff=cn(this.Ff,14)}}),this.password=!0};nr(lo,ra);var Oe={CheckBox:{createAppearanceStream:function(){return{N:{On:Oe.CheckBox.YesNormal},D:{On:Oe.CheckBox.YesPushDown,Off:Oe.CheckBox.OffPushDown}}},YesPushDown:function(n){var t=Vr(n);t.scope=n.scope;var e=[],r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,s=n.scope.__private__.encodeColorString(n.color),a=Al(n,n.caption);return e.push("0.749023 g"),e.push("0 0 "+ct(Oe.internal.getWidth(n))+" "+ct(Oe.internal.getHeight(n))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+ct(a.fontSize)+" Tf "+s),e.push("BT"),e.push(a.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(` 84`),t},YesNormal:function(n){var t=Vr(n);t.scope=n.scope;var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,r=n.scope.__private__.encodeColorString(n.color),s=[],a=Oe.internal.getHeight(n),f=Oe.internal.getWidth(n),l=Al(n,n.caption);
vendor: 4,094 bytes, lines 84-90
84return s.push("1 g"),s.push("0 0 "+ct(f)+" "+ct(a)+" re"),s.push("f"),s.push("q"),s.push("0 0 1 rg"),s.push("0 0 "+ct(f-1)+" "+ct(a-1)+" re"),s.push("W"),s.push("n"),s.push("0 g"),s.push("BT"),s.push("/"+e+" "+ct(l.fontSize)+" Tf "+r),s.push(l.text),s.push("ET"),s.push("Q"),t.stream=s.join(` 85`),t},OffPushDown:function(n){var t=Vr(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+ct(Oe.internal.getWidth(n))+" "+ct(Oe.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(` 86`),t}},RadioButton:{Circle:{createAppearanceStream:function(n){var t={D:{Off:Oe.RadioButton.Circle.OffPushDown},N:{}};return t.N[n]=Oe.RadioButton.Circle.YesNormal,t.D[n]=Oe.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(n){var t=Vr(n);t.scope=n.scope;var e=[],r=Oe.internal.getWidth(n)<=Oe.internal.getHeight(n)?Oe.internal.getWidth(n)/4:Oe.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var s=Oe.internal.Bezier_C,a=Number((r*s).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+Ei(Oe.internal.getWidth(n)/2)+" "+Ei(Oe.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),e.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),e.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),e.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(` 87`),t},YesPushDown:function(n){var t=Vr(n);t.scope=n.scope;var e=[],r=Oe.internal.getWidth(n)<=Oe.internal.getHeight(n)?Oe.internal.getWidth(n)/4:Oe.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var s=Number((2*r).toFixed(5)),a=Number((s*Oe.internal.Bezier_C).toFixed(5)),f=Number((r*Oe.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Ei(Oe.internal.getWidth(n)/2)+" "+Ei(Oe.internal.getHeight(n)/2)+" cm"),e.push(s+" 0 m"),e.push(s+" "+a+" "+a+" "+s+" 0 "+s+" c"),e.push("-"+a+" "+s+" -"+s+" "+a+" -"+s+" 0 c"),e.push("-"+s+" -"+a+" -"+a+" -"+s+" 0 -"+s+" c"),e.push(a+" -"+s+" "+s+" -"+a+" "+s+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+Ei(Oe.internal.getWidth(n)/2)+" "+Ei(Oe.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+f+" "+f+" "+r+" 0 "+r+" c"),e.push("-"+f+" "+r+" -"+r+" "+f+" -"+r+" 0 c"),e.push("-"+r+" -"+f+" -"+f+" -"+r+" 0 -"+r+" c"),e.push(f+" -"+r+" "+r+" -"+f+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(` 88`),t},OffPushDown:function(n){var t=Vr(n);t.scope=n.scope;var e=[],r=Oe.internal.getWidth(n)<=Oe.internal.getHeight(n)?Oe.internal.getWidth(n)/4:Oe.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var s=Number((2*r).toFixed(5)),a=Number((s*Oe.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Ei(Oe.internal.getWidth(n)/2)+" "+Ei(Oe.internal.getHeight(n)/2)+" cm"),e.push(s+" 0 m"),e.push(s+" "+a+" "+a+" "+s+" 0 "+s+" c"),e.push("-"+a+" "+s+" -"+s+" "+a+" -"+s+" 0 c"),e.push("-"+s+" -"+a+" -"+a+" -"+s+" 0 -"+s+" c"),e.push(a+" -"+s+" "+s+" -"+a+" "+s+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(` 89`),t}},Cross:{createAppearanceStream:function(n){var t={D:{Off:Oe.RadioButton.Cross.OffPushDown},N:{}};return t.N[n]=Oe.RadioButton.Cross.YesNormal,t.D[n]=Oe.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(n){var t=Vr(n);t.scope=n.scope;var e=[],r=Oe.internal.calculateCross(n);return e.push("q"),e.push("1 1 "+ct(Oe.internal.getWidth(n)-2)+" "+ct(Oe.internal.getHeight(n)-2)+" re"),e.push("W"),e.push("n"),e.push(ct(r.x1.x)+" "+ct(r.x1.y)+" m"),e.push(ct(r.x2.x)+" "+ct(r.x2.y)+" l"),e.push(ct(r.x4.x)+" "+ct(r.x4.y)+" m"),e.push(ct(r.x3.x)+" "+ct(r.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(` 90`),t},YesPushDown:function(n){var t=Vr(n);t.scope=n.scope;var e=Oe.internal.calculateCross(n),r=[];return r.push("0.749023 g"),r.push("0 0 "+ct(Oe.internal.getWidth(n))+" "+ct(Oe.internal.getHeight(n))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+ct(Oe.internal.getWidth(n)-2)+" "+ct(Oe.internal.getHeight(n)-2)+" re"),r.push("W"),r.push("n"),r.push(ct(e.x1.x)+" "+ct(e.x1.y)+" m"),r.push(ct(e.x2.x)+" "+ct(e.x2.y)+" l"),r.push(ct(e.x4.x)+" "+ct(e.x4.y
vendor: 36,995 bytes, lines 90-116
90)+" m"),r.push(ct(e.x3.x)+" "+ct(e.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(` 91`),t},OffPushDown:function(n){var t=Vr(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+ct(Oe.internal.getWidth(n))+" "+ct(Oe.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(` 92`),t}}},createDefaultAppearanceStream:function(n){var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,e=n.scope.__private__.encodeColorString(n.color);return"/"+t+" "+n.fontSize+" Tf "+e}};Oe.internal={Bezier_C:.551915024494,calculateCross:function(n){var t=Oe.internal.getWidth(n),e=Oe.internal.getHeight(n),r=Math.min(t,e);return{x1:{x:(t-r)/2,y:(e-r)/2+r},x2:{x:(t-r)/2+r,y:(e-r)/2},x3:{x:(t-r)/2,y:(e-r)/2},x4:{x:(t-r)/2+r,y:(e-r)/2+r}}}},Oe.internal.getWidth=function(n){var t=0;return jt(n)==="object"&&(t=bu(n.Rect[2])),t},Oe.internal.getHeight=function(n){var t=0;return jt(n)==="object"&&(t=bu(n.Rect[3])),t};var E2=Qt.addField=function(n){if(C2(this,n),!(n instanceof jr))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=n).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};Qt.AcroFormChoiceField=Ta,Qt.AcroFormListBox=Ma,Qt.AcroFormComboBox=Da,Qt.AcroFormEditBox=ao,Qt.AcroFormButton=xn,Qt.AcroFormPushButton=so,Qt.AcroFormRadioButton=Oa,Qt.AcroFormCheckBox=oo,Qt.AcroFormTextField=ra,Qt.AcroFormPasswordField=lo,Qt.AcroFormAppearance=Oe,Qt.AcroForm={ChoiceField:Ta,ListBox:Ma,ComboBox:Da,EditBox:ao,Button:xn,PushButton:so,RadioButton:Oa,CheckBox:oo,TextField:ra,PasswordField:lo,Appearance:Oe},Ge.AcroForm={ChoiceField:Ta,ListBox:Ma,ComboBox:Da,EditBox:ao,Button:xn,PushButton:so,RadioButton:Oa,CheckBox:oo,TextField:ra,PasswordField:lo,Appearance:Oe};Ge.AcroForm;function kf(n){return n.reduce(function(t,e,r){return t[e]=r,t},{})}(function(n){var t="addImage_";n.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},s=n.__addimage__.getImageFileTypeByImageData=function(_,I){var H,U,se,le,he,te=e;if((I=I||e)==="RGBA"||_.data!==void 0&&_.data instanceof Uint8ClampedArray&&"height"in _&&"width"in _)return"RGBA";if(ye(_))for(he in r)for(se=r[he],H=0;H<se.length;H+=1){for(le=!0,U=0;U<se[H].length;U+=1)if(se[H][U]!==void 0&&se[H][U]!==_[U]){le=!1;break}if(le===!0){te=he;break}}else for(he in r)for(se=r[he],H=0;H<se.length;H+=1){for(le=!0,U=0;U<se[H].length;U+=1)if(se[H][U]!==void 0&&se[H][U]!==_.charCodeAt(U)){le=!1;break}if(le===!0){te=he;break}}return te===e&&I!==e&&(te=I),te},a=function _(I){for(var H=this.internal.write,U=this.internal.putStream,se=(0,this.internal.getFilters)();se.indexOf("FlateEncode")!==-1;)se.splice(se.indexOf("FlateEncode"),1);I.objectId=this.internal.newObject();var le=[];if(le.push({key:"Type",value:"/XObject"}),le.push({key:"Subtype",value:"/Image"}),le.push({key:"Width",value:I.width}),le.push({key:"Height",value:I.height}),I.colorSpace===k.INDEXED?le.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(I.palette.length/3-1)+" "+("sMask"in I&&I.sMask!==void 0?I.objectId+2:I.objectId+1)+" 0 R]"}):(le.push({key:"ColorSpace",value:"/"+I.colorSpace}),I.colorSpace===k.DEVICE_CMYK&&le.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),le.push({key:"BitsPerComponent",value:I.bitsPerComponent}),"decodeParameters"in I&&I.decodeParameters!==void 0&&le.push({key:"DecodeParms",value:"<<"+I.decodeParameters+">>"}),"transparency"in I&&Array.isArray(I.transparency)&&I.transparency.length>0){for(var he="",te=0,de=I.transparency.length;te<de;te++)he+=I.transparency[te]+" "+I.transparency[te]+" ";le.push({key:"Mask",value:"["+he+"]"})}I.sMask!==void 0&&le.push({key:"SMask",value:I.objectId+1+" 0 R"});var ke=I.filter!==void 0?["/"+I.filter]:void 0;if(U({data:I.data,additionalKeyValues:le,alreadyAppliedFilters:ke,objectId:I.objectId}),H("endobj"),"sMask"in I&&I.sMask!==void 0){var we,A=(we=I.sMaskBitsPerComponent)!==null&&we!==void 0?we:I.bitsPerComponent,D={width:I.width,height:I.height,colorSpace:"DeviceGray",bitsPerComponent:A,data:I.sMask};"filter"in I&&(D.decodeParameters="/Predictor ".concat(I.predictor," /Colors 1 /BitsPerComponent ").concat(A," /Columns ").concat(I.width),D.filter=I.filter),_.call(this,D)}if(I.colorSpace===k.INDEXED){var B=this.internal.newObject();U({data:K(new Uint8Array(I.palette)),objectId:B}),H("endobj")}},f=function(){var _=this.internal.collections[t+"images"];for(var I in _)a.call(this,_[I])},l=function(){var _,I=this.internal.collections[t+"images"],H=this.internal.write;for(var U in I)H("/I"+(_=I[U]).index,_.objectId,"0","R")},u=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",f),this.internal.events.subscribe("putXobjectDict",l))},d=function(){var _=this.internal.collections[t+"images"];return u.call(this),_},m=function(){return Object.keys(this.internal.collections[t+"images"]).length},w=function(_){return typeof n["process"+_.toUpperCase()]=="function"},S=function(_){return jt(_)==="object"&&_.nodeType===1},p=function(_,I){if(_.nodeName==="IMG"&&_.hasAttribute("src")){var H=""+_.getAttribute("src");if(H.indexOf("data:image/")===0)return io(unescape(H).split("base64,").pop());var U=n.loadFile(H,!0);if(U!==void 0)return U}if(_.nodeName==="CANVAS"){if(_.width===0||_.height===0)throw new Error("Given canvas must have data. Canvas width: "+_.width+", height: "+_.height);var se;switch(I){case"PNG":se="image/png";break;case"WEBP":se="image/webp";break;default:se="image/jpeg"}return io(_.toDataURL(se,1).split("base64,").pop())}},C=function(_){var I=this.internal.collections[t+"images"];if(I){for(var H in I)if(_===I[H].alias)return I[H]}},E=function(_,I,H){return _||I||(_=-96,I=-96),_<0&&(_=-1*H.width*72/_/this.internal.scaleFactor),I<0&&(I=-1*H.height*72/I/this.internal.scaleFactor),_===0&&(_=I*H.width/H.height),I===0&&(I=_*H.height/H.width),[_,I]},O=function(_,I,H,U,se,le){var he=E.call(this,H,U,se),te=this.internal.getCoordinateString,de=this.internal.getVerticalCoordinateString,ke=d.call(this);if(H=he[0],U=he[1],ke[se.index]=se,le){le*=Math.PI/180;var we=Math.cos(le),A=Math.sin(le),D=function(W){return W.toFixed(4)},B=[D(we),D(A),D(-1*A),D(we),0,0,"cm"]}this.internal.write("q"),le?(this.internal.write([1,"0","0",1,te(_),de(I+U),"cm"].join(" ")),this.internal.write(B.join(" ")),this.internal.write([te(H),"0","0",te(U),"0","0","cm"].join(" "))):this.internal.write([te(H),"0","0",te(U),te(_),de(I+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+se.index+" Do"),this.internal.write("Q")},k=n.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"};n.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var Y=n.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},V=n.__addimage__.sHashCode=function(_){var I,H,U=0;if(typeof _=="string")for(H=_.length,I=0;I<H;I++)U=(U<<5)-U+_.charCodeAt(I),U|=0;else if(ye(_))for(H=_.byteLength/2,I=0;I<H;I++)U=(U<<5)-U+_[I],U|=0;return U},q=n.__addimage__.validateStringAsBase64=function(_){(_=_||"").toString().trim();var I=!0;return _.length===0&&(I=!1),_.length%4!=0&&(I=!1),/^[A-Za-z0-9+/]+$/.test(_.substr(0,_.length-2))===!1&&(I=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(_.substr(-2))===!1&&(I=!1),I},oe=n.__addimage__.extractImageFromDataUrl=function(_){if(_==null||!(_=_.trim()).startsWith("data:"))return null;var I=_.indexOf(",");return I<0?null:_.substring(0,I).trim().endsWith("base64")?_.substring(I+1):null};n.__addimage__.isArrayBuffer=function(_){return _ instanceof ArrayBuffer};var ye=n.__addimage__.isArrayBufferView=function(_){return _ instanceof Int8Array||_ instanceof Uint8Array||_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array},ne=n.__addimage__.binaryStringToUint8Array=function(_){for(var I=_.length,H=new Uint8Array(I),U=0;U<I;U++)H[U]=_.charCodeAt(U);return H},K=n.__addimage__.arrayBufferToBinaryString=function(_){for(var I="",H=ye(_)?_:new Uint8Array(_),U=0;U<H.length;U+=8192)I+=String.fromCharCode.apply(null,H.subarray(U,U+8192));return I};n.addImage=function(){var _,I,H,U,se,le,he,te,de;if(typeof arguments[1]=="number"?(I=e,H=arguments[1],U=arguments[2],se=arguments[3],le=arguments[4],he=arguments[5],te=arguments[6],de=arguments[7]):(I=arguments[1],H=arguments[2],U=arguments[3],se=arguments[4],le=arguments[5],he=arguments[6],te=arguments[7],de=arguments[8]),jt(_=arguments[0])==="object"&&!S(_)&&"imageData"in _){var ke=_;_=ke.imageData,I=ke.format||I||e,H=ke.x||H||0,U=ke.y||U||0,se=ke.w||ke.width||se,le=ke.h||ke.height||le,he=ke.alias||he,te=ke.compression||te,de=ke.rotation||ke.angle||de}var we=this.internal.getFilters();if(te===void 0&&we.indexOf("FlateEncode")!==-1&&(te="SLOW"),isNaN(H)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var A=R.call(this,_,I,he,te);return O.call(this,H,U,se,le,A,de),this};var R=function(_,I,H,U){var se,le,he;if(typeof _=="string"&&s(_)===e){_=unescape(_);var te=Z(_,!1);(te!==""||(te=n.loadFile(_,!0))!==void 0)&&(_=te)}if(S(_)&&(_=p(_,I)),I=s(_,I),!w(I))throw new Error("addImage does not support files of type '"+I+"', please ensure that a plugin for '"+I+"' support is added.");if(((he=H)==null||he.length===0)&&(H=function(de){return typeof de=="string"||ye(de)?V(de):ye(de.data)?V(de.data):null}(_)),(se=C.call(this,H))||(_ instanceof Uint8Array||I==="RGBA"||(le=_,_=ne(_)),se=this["process"+I.toUpperCase()](_,m.call(this),H,function(de){return de&&typeof de=="string"&&(de=de.toUpperCase()),de in n.image_compression?de:Y.NONE}(U),le)),!se)throw new Error("An unknown error occurred whilst processing the image.");return se},Z=n.__addimage__.convertBase64ToBinaryString=function(_,I){I=typeof I!="boolean"||I;var H,U="";if(typeof _=="string"){var se;H=(se=oe(_))!==null&&se!==void 0?se:_;try{U=io(H)}catch(le){if(I)throw q(H)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+le.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};n.getImageProperties=function(_){var I,H,U="";if(S(_)&&(_=p(_)),typeof _=="string"&&s(_)===e&&((U=Z(_,!1))===""&&(U=n.loadFile(_)||""),_=U),H=s(_),!w(H))throw new Error("addImage does not support files of type '"+H+"', please ensure that a plugin for '"+H+"' support is added.");if(_ instanceof Uint8Array||(_=ne(_)),!(I=this["process"+H.toUpperCase()](_)))throw new Error("An unknown error occurred whilst processing the image");return I.fileType=H,I}})(Ge.API),function(n){var t=function(e){if(e!==void 0&&e!="")return!0};Ge.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),n.events.push(["putPage",function(e){for(var r,s,a,f=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(e.objId),d=e.pageContext.annotations,m=!1,w=0;w<d.length&&!m;w++)switch((r=d[w]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(m=!0);break;case"reference":case"text":case"freetext":m=!0}if(m!=0){this.internal.write("/Annots [");for(var S=0;S<d.length;S++){r=d[S];var p=this.internal.pdfEscape,C=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var E=this.internal.newAdditionalObject(),O=this.internal.newAdditionalObject(),k=this.internal.getEncryptor(E.objId),Y=r.title||"Note";a="<</Type /Annot /Subtype /Text "+(s="/Rect ["+f(r.bounds.x)+" "+l(r.bounds.y+r.bounds.h)+" "+f(r.bounds.x+r.bounds.w)+" "+l(r.bounds.y)+"] ")+"/Contents ("+p(k(r.contents))+")",a+=" /Popup "+O.objId+" 0 R",a+=" /P "+u.objId+" 0 R",a+=" /T ("+p(k(Y))+") >>",E.content=a;var V=E.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(s="/Rect ["+f(r.bounds.x+30)+" "+l(r.bounds.y+r.bounds.h)+" "+f(r.bounds.x+r.bounds.w+30)+" "+l(r.bounds.y)+"] ")+" /Parent "+V,r.open&&(a+=" /Open true"),a+=" >>",O.content=a,this.internal.write(E.objId,"0 R",O.objId,"0 R");break;case"freetext":s="/Rect ["+f(r.bounds.x)+" "+l(r.bounds.y)+" "+f(r.bounds.x+r.bounds.w)+" "+l(r.bounds.y+r.bounds.h)+"] ";var q="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");a="<</Type /Annot /Subtype /FreeText "+s+"/Contents ("+p(C(r.contents))+")",a+=" /DS("+p(C(q))+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(r.options.name){var oe=this.annotations._nameMap[r.options.name];r.options.pageNumber=oe.page,r.options.top=oe.y}else r.options.top||(r.options.top=0);if(s="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",a="",r.options.url)a="<</Type /Annot /Subtype /Link "+s+"/Border [0 0 0] /A <</S /URI /URI ("+p(C(r.options.url))+") >>";else if(r.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+s+"/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":a+=" /Fit]";break;case"FitH":a+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,a+=" /FitV "+r.options.left+"]";break;default:var ye=l(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),a+=" /XYZ "+r.options.left+" "+ye+" "+r.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),n.createAnnotation=function(e){var r=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":r.pageContext.annotations.push(e)}},n.link=function(e,r,s,a,f){var l=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:u(e),y:d(r),w:u(e+s),h:d(r+a)},options:f,type:"link"})},n.textWithLink=function(e,r,s,a){var f,l,u=this.getTextWidth(e),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){l=a.maxWidth;var m=this.splitTextToSize(e,l).length;f=Math.ceil(d*m)}else l=u,f=d;return this.text(e,r,s,a),s+=.2*d,a.align==="center"&&(r-=u/2),a.align==="right"&&(r-=u),this.link(r,s-d,l,f,a),u},n.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}}(Ge.API),function(n){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={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},s=[1570,1571,1573,1575];n.__arabicParser__={};var a=n.__arabicParser__.isInArabicSubstitutionA=function(E){return t[E.charCodeAt(0)]!==void 0},f=n.__arabicParser__.isArabicLetter=function(E){return typeof E=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(E)},l=n.__arabicParser__.isArabicEndLetter=function(E){return f(E)&&a(E)&&t[E.charCodeAt(0)].length<=2},u=n.__arabicParser__.isArabicAlfLetter=function(E){return f(E)&&s.indexOf(E.charCodeAt(0))>=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(E){return f(E)&&a(E)&&t[E.charCodeAt(0)].length>=1};var d=n.__arabicParser__.arabicLetterHasFinalForm=function(E){return f(E)&&a(E)&&t[E.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(E){return f(E)&&a(E)&&t[E.charCodeAt(0)].length>=3};var m=n.__arabicParser__.arabicLetterHasMedialForm=function(E){return f(E)&&a(E)&&t[E.charCodeAt(0)].length==4},w=n.__arabicParser__.resolveLigatures=function(E){var O=0,k=e,Y="",V=0;for(O=0;O<E.length;O+=1)k[E.charCodeAt(O)]!==void 0?(V++,typeof(k=k[E.charCodeAt(O)])=="number"&&(Y+=String.fromCharCode(k),k=e,V=0),O===E.length-1&&(k=e,Y+=E.charAt(O-(V-1)),O-=V-1,V=0)):(k=e,Y+=E.charAt(O-V),O-=V,V=0);return Y};n.__arabicParser__.isArabicDiacritic=function(E){return E!==void 0&&r[E.charCodeAt(0)]!==void 0};var S=n.__arabicParser__.getCorrectForm=function(E,O,k){return f(E)?a(E)===!1?-1:!d(E)||!f(O)&&!f(k)||!f(k)&&l(O)||l(E)&&!f(O)||l(E)&&u(O)||l(E)&&l(O)?0:m(E)&&f(O)&&!l(O)&&f(k)&&d(k)?3:l(E)||!f(k)?1:2:-1},p=function(E){var O=0,k=0,Y=0,V="",q="",oe="",ye=(E=E||"").split("\\s+"),ne=[];for(O=0;O<ye.length;O+=1){for(ne.push(""),k=0;k<ye[O].length;k+=1)V=ye[O][k],q=ye[O][k-1],oe=ye[O][k+1],f(V)?(Y=S(V,q,oe),ne[O]+=Y!==-1?String.fromCharCode(t[V.charCodeAt(0)][Y]):V):ne[O]+=V;ne[O]=w(ne[O])}return ne.join(" ")},C=n.__arabicParser__.processArabic=n.processArabic=function(){var E,O=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,k=[];if(Array.isArray(O)){var Y=0;for(k=[],Y=0;Y<O.length;Y+=1)Array.isArray(O[Y])?k.push([p(O[Y][0]),O[Y][1],O[Y][2]]):k.push([p(O[Y])]);E=k}else E=p(O);return typeof arguments[0]=="string"?E:(arguments[0].text=E,arguments[0])};n.events.push(["preProcessText",C])}(Ge.API),Ge.API.autoPrint=function(n){var t;return(n=n||{}).variant=n.variant||"non-conform",n.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},function(n){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(l){r=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var s=300;Object.defineProperty(this,"height",{get:function(){return s},set:function(l){s=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=s+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(l){a=l}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(l){f=l}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,r){var s;if((e=e||"2d")!=="2d")return null;for(s in r)this.pdf.context2d.hasOwnProperty(s)&&(this.pdf.context2d[s]=r[s]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(Ge.API),function(n){var t={left:0,top:0,bottom:0,right:0},e=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),s.call(this))},s=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(E){u=E}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(E){d=E}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(E){m=E}});var w=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return w},set:function(E){w=E}});var S=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return S},set:function(E){S=E}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(E){p=E}});var C=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return C},set:function(E){C=E}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(u){return r.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},n.getTextDimensions=function(u,d){r.call(this);var m=(d=d||{}).fontSize||this.getFontSize(),w=d.font||this.getFont(),S=d.scaleFactor||this.internal.scaleFactor,p=0,C=0,E=0,O=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var k=d.maxWidth;k>0?typeof u=="string"?u=this.splitTextToSize(u,k):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(V,q){return V.concat(O.splitTextToSize(q,k))},[])):u=Array.isArray(u)?u:[u];for(var Y=0;Y<u.length;Y++)p<(E=this.getStringUnitWidth(u[Y],{font:w})*m)&&(p=E);return p!==0&&(C=u.length),{w:p/=S,h:Math.max((C*m*this.getLineHeightFactor()-m*(this.getLineHeightFactor()-1))/S,0)}},n.cellAddPage=function(){r.call(this),this.addPage();var u=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var f=n.cell=function(){var u;u=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var d=this.internal.__cell__.lastCell,m=this.internal.__cell__.padding,w=this.internal.__cell__.margins||t,S=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===u.lineNumber?(u.x=(d.x||0)+(d.width||0),u.y=d.y||0):d.y+d.height+u.height+w.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=w.top,p&&S&&(this.printHeaderRow(u.lineNumber,!0),u.y+=S[0].height)):u.y=d.y+d.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,e===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-m,u.y+m,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+m,{align:"center",baseline:"top",maxWidth:u.width-m-m}):this.text(u.text,u.x+m,u.y+m,{align:"left",baseline:"top",maxWidth:u.width-m-m})),this.internal.__cell__.lastCell=u,this};n.table=function(u,d,m,w,S){if(r.call(this),!m)throw new Error("No data for PDF table.");var p,C,E,O,k=[],Y=[],V=[],q={},oe={},ye=[],ne=[],K=(S=S||{}).autoSize||!1,R=S.printHeaders!==!1,Z=S.css&&S.css["font-size"]!==void 0?16*S.css["font-size"]:S.fontSize||12,_=S.margins||Object.assign({width:this.getPageWidth()},t),I=typeof S.padding=="number"?S.padding:3,H=S.headerBackgroundColor||"#c8c8c8",U=S.headerTextColor||"#000";if(s.call(this),this.internal.__cell__.printHeaders=R,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=Z,this.internal.__cell__.padding=I,this.internal.__cell__.headerBackgroundColor=H,this.internal.__cell__.headerTextColor=U,this.setFontSize(Z),w==null)Y=k=Object.keys(m[0]),V=k.map(function(){return"left"});else if(Array.isArray(w)&&jt(w[0])==="object")for(k=w.map(function(ke){return ke.name}),Y=w.map(function(ke){return ke.prompt||ke.name||""}),V=w.map(function(ke){return ke.align||"left"}),p=0;p<w.length;p+=1)oe[w[p].name]=.7499990551181103*w[p].width;else Array.isArray(w)&&typeof w[0]=="string"&&(Y=k=w,V=k.map(function(){return"left"}));if(K||Array.isArray(w)&&typeof w[0]=="string")for(p=0;p<k.length;p+=1){for(q[O=k[p]]=m.map(function(ke){return ke[O]}),this.setFont(void 0,"bold"),ye.push(this.getTextDimensions(Y[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),C=q[O],this.setFont(void 0,"normal"),E=0;E<C.length;E+=1)ye.push(this.getTextDimensions(C[E],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);oe[O]=Math.max.apply(null,ye)+I+I,ye=[]}if(R){var se={};for(p=0;p<k.length;p+=1)se[k[p]]={},se[k[p]].text=Y[p],se[k[p]].align=V[p];var le=l.call(this,se,oe);ne=k.map(function(ke){return new a(u,d,oe[ke],le,se[ke].text,void 0,se[ke].align)}),this.setTableHeaderRow(ne),this.printHeaderRow(1,!1)}var he=w.reduce(function(ke,we){return ke[we.name]=we.align,ke},{});for(p=0;p<m.length;p+=1){"rowStart"in S&&S.rowStart instanceof Function&&S.rowStart({row:p,data:m[p]},this);var te=l.call(this,m[p],oe);for(E=0;E<k.length;E+=1){var de=m[p][k[E]];"cellStart"in S&&S.cellStart instanceof Function&&S.cellStart({row:p,col:E,data:de},this),f.call(this,new a(u,d,oe[k[E]],te,de,p+2,he[k[E]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=d,this};var l=function(u,d){var m=this.internal.__cell__.padding,w=this.internal.__cell__.table_font_size,S=this.internal.scaleFactor;return Object.keys(u).map(function(p){var C=u[p];return this.splitTextToSize(C.hasOwnProperty("text")?C.text:C,d[p]-m-m)},this).map(function(p){return this.getLineHeightFactor()*p.length*w/S+m+m},this).reduce(function(p,C){return Math.max(p,C)},0)};n.setTableHeaderRow=function(u){r.call(this),this.internal.__cell__.tableHeaderRow=u},n.printHeaderRow=function(u,d){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var m;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var w=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(w[0],w[1],w[2],w[3],void 0,-1)}this.setFont(void 0,"bold");for(var S=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){m=this.internal.__cell__.tableHeaderRow[p].clone(),d&&(m.y=this.internal.__cell__.margins.top||0,S.push(m)),m.lineNumber=u;var C=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),f.call(this,m),this.setTextColor(C)}S.length>0&&this.setTableHeaderRow(S),this.setFont(void 0,"normal"),e=!1}}(Ge.API);var Pf={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},jf=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],_l=kf(jf),Cf=[100,200,300,400,500,600,700,800,900],I2=kf(Cf);function rl(n){var t=n.family.replace(/"|'/g,"").toLowerCase(),e=function(a){return Pf[a=a||"normal"]?a:"normal"}(n.style),r=function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400}(n.weight),s=function(a){return typeof _l[a=a||"normal"]=="number"?a:"normal"}(n.stretch);return{family:t,style:e,weight:r,stretch:s,src:n.src||[],ref:n.ref||{name:t,style:[s,e,r].join(" ")}}}function vu(n,t,e,r){var s;for(s=e;s>=0&&s<t.length;s+=r)if(n[t[s]])return n[t[s]];for(s=e;s>=0&&s<t.length;s-=r)if(n[t[s]])return n[t[s]]}var F2={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},yu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function xu(n){return[n.stretch,n.style,n.weight,n.family].join(" ")}function wu(n){return n.trimLeft()}function T2(n,t){for(var e=0;e<n.length;){if(n.charAt(e)===t)return[n.substring(0,e),n.substring(e+1)];e+=1}return null}function M2(n){var t=n.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],n.substring(t[0].length)]}var Pa,to,Nu,Au,_u,il=["times"];function Lu(n,t,e,r,s){var a=4,f=ku;switch(s){case Ge.API.image_compression.FAST:a=1,f=Su;break;case Ge.API.image_compression.MEDIUM:a=6,f=Pu;break;case Ge.API.image_compression.SLOW:a=9,f=ju}n=function(u,d,m,w){for(var S,p=u.length/d,C=new Uint8Array(u.length+p),E=[D2,Su,ku,Pu,ju],O=0;O<p;O+=1){var k=O*d,Y=u.subarray(k,k+d);if(w)C.set(w(Y,m,S),k+O);else{for(var V=E.length,q=[],oe=0;oe<V;oe+=1)q[oe]=E[oe](Y,m,S);var ye=R2(q.concat());C.set(q[ye],k+O)}S=Y}return C}(n,t,Math.ceil(e*r/8),f);var l=bl(n,{level:a});return Ge.API.__addimage__.arrayBufferToBinaryString(l)}function D2(n){var t=Array.apply([],n);return t.unshift(0),t}function Su(n,t){var e=n.length,r=[];r[0]=1;for(var s=0;s<e;s+=1){var a=n[s-t]||0;r[s+1]=n[s]-a+256&255}return r}function ku(n,t,e){var r=n.length,s=[];s[0]=2;for(var a=0;a<r;a+=1){var f=e&&e[a]||0;s[a+1]=n[a]-f+256&255}return s}function Pu(n,t,e){var r=n.length,s=[];s[0]=3;for(var a=0;a<r;a+=1){var f=n[a-t]||0,l=e&&e[a]||0;s[a+1]=n[a]+256-(f+l>>>1)&255}return s}function ju(n,t,e){var r=n.length,s=[];s[0]=4;for(var a=0;a<r;a+=1){var f=O2(n[a-t]||0,e&&e[a]||0,e&&e[a-t]||0);s[a+1]=n[a]-f+256&255}return s}function O2(n,t,e){if(n===t&&t===e)return n;var r=Math.abs(t-e),s=Math.abs(n-e),a=Math.abs(n+t-e-e);return r<=s&&r<=a?n:s<=a?t:e}function R2(n){var t=n.map(function(e){return e.reduce(function(r,s){return r+Math.abs(s)},0)});return t.indexOf(Math.min.apply(null,t))}function al(n,t,e){var r=t*e,s=Math.floor(r/8),a=16-(r-8*s+e),f=(1<<e)-1;return Ef(n,s)>>a&f}function Cu(n,t,e,r){var s=e*r,a=Math.floor(s/8),f=16-(s-8*a+r),l=(1<<r)-1,u=(t&l)<<f;(function(d,m,w){if(m+1<d.byteLength)d.setUint16(m,w,!1);else{var S=w>>8&255;d.setUint8(m,S)}})(n,a,Ef(n,a)&~(l<<f)&65535|u)}function Ef(n,t){return t+1<n.byteLength?n.getUint16(t,!1):n.getUint8(t)<<8}function B2(n){var t=0;if(n[t++]!==71||n[t++]!==73||n[t++]!==70||n[t++]!==56||(n[t++]+1&253)!=56||n[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=n[t++]|n[t++]<<8,r=n[t++]|n[t++]<<8,s=n[t++],a=s>>7,f=1<<1+(7&s);n[t++],n[t++];var l=null,u=null;a&&(l=t,u=f,t+=3*f);var d=!0,m=[],w=0,S=null,p=0,C=null;for(this.width=e,this.height=r;d&&t<n.length;)switch(n[t++]){case 33:switch(n[t++]){case 255:if(n[t]!==11||n[t+1]==78&&n[t+2]==69&&n[t+3]==84&&n[t+4]==83&&n[t+5]==67&&n[t+6]==65&&n[t+7]==80&&n[t+8]==69&&n[t+9]==50&&n[t+10]==46&&n[t+11]==48&&n[t+12]==3&&n[t+13]==1&&n[t+16]==0)t+=14,C=n[t++]|n[t++]<<8,t++;else for(t+=12;;){if(!((_=n[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}break;case 249:if(n[t++]!==4||n[t+4]!==0)throw new Error("Invalid graphics extension block.");var E=n[t++];w=n[t++]|n[t++]<<8,S=n[t++],1&E||(S=null),p=E>>2&7,t++;break;case 254:for(;;){if(!((_=n[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}break;default:throw new Error("Unknown graphic control label: 0x"+n[t-1].toString(16))}break;case 44:var O=n[t++]|n[t++]<<8,k=n[t++]|n[t++]<<8,Y=n[t++]|n[t++]<<8,V=n[t++]|n[t++]<<8,q=n[t++],oe=q>>6&1,ye=1<<1+(7&q),ne=l,K=u,R=!1;q>>7&&(R=!0,ne=t,K=ye,t+=3*ye);var Z=t;for(t++;;){var _;if(!((_=n[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}m.push({x:O,y:k,width:Y,height:V,has_local_palette:R,palette_offset:ne,palette_size:K,data_offset:Z,data_length:t-Z,transparent_index:S,interlaced:!!oe,delay:w,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+n[t-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return C},this.frameInfo=function(I){if(I<0||I>=m.length)throw new Error("Frame index out of range.");return m[I]},this.decodeAndBlitFrameBGRA=function(I,H){var U=this.frameInfo(I),se=U.width*U.height;if(se>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var le=new Uint8Array(se);Eu(n,U.data_offset,le,se);var he=U.palette_offset,te=U.transparent_index;te===null&&(te=256);var de=U.width,ke=e-de,we=de,A=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),B=A,W=4*ke;U.interlaced===!0&&(W+=4*e*7);for(var $=8,Q=0,ce=le.length;Q<ce;++Q){var fe=le[Q];if(we===0&&(we=de,(B+=W)>=D&&(W=4*ke+4*e*($-1),B=A+(de+ke)*($<<1),$>>=1)),fe===te)B+=4;else{var be=n[he+3*fe],Pe=n[he+3*fe+1],Ie=n[he+3*fe+2];H[B++]=Ie,H[B++]=Pe,H[B++]=be,H[B++]=255}--we}},this.decodeAndBlitFrameRGBA=function(I,H){var U=this.frameInfo(I),se=U.width*U.height;if(se>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var le=new Uint8Array(se);Eu(n,U.data_offset,le,se);var he=U.palette_offset,te=U.transparent_index;te===null&&(te=256);var de=U.width,ke=e-de,we=de,A=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),B=A,W=4*ke;U.interlaced===!0&&(W+=4*e*7);for(var $=8,Q=0,ce=le.length;Q<ce;++Q){var fe=le[Q];if(we===0&&(we=de,(B+=W)>=D&&(W=4*ke+4*e*($-1),B=A+(de+ke)*($<<1),$>>=1)),fe===te)B+=4;else{var be=n[he+3*fe],Pe=n[he+3*fe+1],Ie=n[he+3*fe+2];H[B++]=be,H[B++]=Pe,H[B++]=Ie,H[B++]=255}--we}}}function Eu(n,t,e,r){for(var s=n[t++],a=1<<s,f=a+1,l=f+1,u=s+1,d=(1<<u)-1,m=0,w=0,S=0,p=n[t++],C=new Int32Array(4096),E=null;;){for(;m<16&&p!==0;)w|=n[t++]<<m,m+=8,p===1?p=n[t++]:--p;if(m<u)break;var O=w&d;if(w>>=u,m-=u,O!==a){if(O===f)break;for(var k=O<l?O:E,Y=0,V=k;V>a;)V=C[V]>>8,++Y;var q=V;if(S+Y+(k!==O?1:0)>r)return void Mt.log("Warning, gif stream longer than expected.");e[S++]=q;var oe=S+=Y;for(k!==O&&(e[S++]=q),V=k;Y--;)V=C[V],e[--oe]=255&V,V>>=8;E!==null&&l<4096&&(C[l++]=E<<8|q,l>=d+1&&u<12&&(++u,d=d<<1|1)),E=O}else l=f+1,d=(1<<(u=s+1))-1,E=null}return S!==r&&Mt.log("Warning, gif stream shorter than expected."),e}/** 93 * @license 94 Copyright (c) 2008, Adobe Systems Incorporated 95 All rights reserved. 96 97 Redistribution and use in source and binary forms, with or without 98 modification, are permitted provided that the following conditions are 99 met: 100 101 * Redistributions of source code must retain the above copyright notice, 102 this list of conditions and the following disclaimer. 103 104 * Redistributions in binary form must reproduce the above copyright 105 notice, this list of conditions and the following disclaimer in the 106 documentation and/or other materials provided with the distribution. 107 108 * Neither the name of Adobe Systems Incorporated nor the names of its 109 contributors may be used to endorse or promote products derived from 110 this software without specific prior written permission. 111 112 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 113 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 114 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 115 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 116 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
117 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 118 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 119 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 120 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 121 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 122 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 123*/function sl(n){var t,e,r,s,a,f=Math.floor,l=new Array(64),u=new Array(64),d=new Array(64),m=new Array(64),w=new Array(65535),S=new Array(65535),p=new Array(64),C=new Array(64),E=[],O=0,k=7,Y=new Array(64),V=new Array(64),q=new Array(64),oe=new Array(256),ye=new Array(2048),ne=[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],K=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],Z=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],_=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],se=[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 le(A,D){for(var B=0,W=0,$=new Array,Q=1;Q<=16;Q++){for(var ce=1;ce<=A[Q];ce++)$[D[W]]=[],$[D[W]][0]=B,$[D[W]][1]=Q,W++,B++;B*=2}return $}function he(A){for(var D=A[0],B=A[1]-1;B>=0;)D&1<<B&&(O|=1<<k),B--,--k<0&&(O==255?(te(255),te(0)):te(O),k=7,O=0)}function te(A){E.push(A)}function de(A){te(A>>8&255),te(255&A)}function ke(A,D,B,W,$){for(var Q,ce=$[0],fe=$[240],be=function(Ne,Be){var Fe,Je,$e,wt,ht,rt,bt,gt,De,ot,We=0;for(De=0;De<8;++De){Fe=Ne[We],Je=Ne[We+1],$e=Ne[We+2],wt=Ne[We+3],ht=Ne[We+4],rt=Ne[We+5],bt=Ne[We+6];var Gt=Fe+(gt=Ne[We+7]),vt=Fe-gt,lt=Je+bt,tt=Je-bt,Ct=$e+rt,Ke=$e-rt,Lt=wt+ht,et=wt-ht,it=Gt+Lt,It=Gt-Lt,dt=lt+Ct,Qe=lt-Ct;Ne[We]=it+dt,Ne[We+4]=it-dt;var yt=.707106781*(Qe+It);Ne[We+2]=It+yt,Ne[We+6]=It-yt;var Jr=.382683433*((it=et+Ke)-(Qe=tt+vt)),en=.5411961*it+Jr,wr=1.306562965*Qe+Jr,rr=.707106781*(dt=Ke+tt),Xe=vt+rr,Mn=vt-rr;Ne[We+5]=Mn+en,Ne[We+3]=Mn-en,Ne[We+1]=Xe+wr,Ne[We+7]=Xe-wr,We+=8}for(We=0,De=0;De<8;++De){Fe=Ne[We],Je=Ne[We+8],$e=Ne[We+16],wt=Ne[We+24],ht=Ne[We+32],rt=Ne[We+40],bt=Ne[We+48];var Yn=Fe+(gt=Ne[We+56]),Dn=Fe-gt,On=Je+bt,qt=Je-bt,tn=$e+rt,hn=$e-rt,Er=wt+ht,wn=wt-ht,Ln=Yn+Er,ir=Yn-Er,$n=On+tn,Kn=On-tn;Ne[We]=Ln+$n,Ne[We+32]=Ln-$n;var Rn=.707106781*(Kn+ir);Ne[We+16]=ir+Rn,Ne[We+48]=ir-Rn;var Ir=.382683433*((Ln=wn+hn)-(Kn=qt+Dn)),Jn=.5411961*Ln+Ir,Xn=1.306562965*Kn+Ir,Fr=.707106781*($n=hn+qt),pi=Dn+Fr,pr=Dn-Fr;Ne[We+40]=pr+Jn,Ne[We+24]=pr-Jn,Ne[We+8]=pi+Xn,Ne[We+56]=pi-Xn,We++}for(De=0;De<64;++De)ot=Ne[De]*Be[De],p[De]=ot>0?ot+.5|0:ot-.5|0;return p}(A,D),Pe=0;Pe<64;++Pe)C[ne[Pe]]=be[Pe];var Ie=C[0]-B;B=C[0],Ie==0?he(W[0]):(he(W[S[Q=32767+Ie]]),he(w[Q]));for(var ue=63;ue>0&&C[ue]==0;)ue--;if(ue==0)return he(ce),B;for(var Ee,j=1;j<=ue;){for(var Se=j;C[j]==0&&j<=ue;)++j;var Ye=j-Se;if(Ye>=16){Ee=Ye>>4;for(var Ue=1;Ue<=Ee;++Ue)he(fe);Ye&=15}Q=32767+C[j],he($[(Ye<<4)+S[Q]]),he(w[Q]),j++}return ue!=63&&he(ce),B}function we(A){A=Math.min(Math.max(A,1),100),a!=A&&(function(D){for(var B=[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 $=f((B[W]*D+50)/100);$=Math.min(Math.max($,1),255),l[ne[W]]=$}for(var Q=[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],ce=0;ce<64;ce++){var fe=f((Q[ce]*D+50)/100);fe=Math.min(Math.max(fe,1),255),u[ne[ce]]=fe}for(var be=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Pe=0,Ie=0;Ie<8;Ie++)for(var ue=0;ue<8;ue++)d[Pe]=1/(l[ne[Pe]]*be[Ie]*be[ue]*8),m[Pe]=1/(u[ne[Pe]]*be[Ie]*be[ue]*8),Pe++}(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),a=A)}this.encode=function(A,D){D&&we(D),E=new Array,O=0,k=7,de(65496),de(65504),de(16),te(74),te(70),te(73),te(70),te(0),te(1),te(1),te(0),de(1),de(1),te(0),te(0),function(){de(65499),de(132),te(0);for(var Je=0;Je<64;Je++)te(l[Je]);te(1);for(var $e=0;$e<64;$e++)te(u[$e])}(),function(Je,$e){de(65472),de(17),te(8),de($e),de(Je),te(3),te(1),te(17),te(0),te(2),te(17),te(1),te(3),te(17),te(1)}(A.width,A.height),function(){de(65476),de(418),te(0);for(var Je=0;Je<16;Je++)te(K[Je+1]);for(var $e=0;$e<=11;$e++)te(R[$e]);te(16);for(var wt=0;wt<16;wt++)te(Z[wt+1]);for(var ht=0;ht<=161;ht++)te(_[ht]);te(1);for(var rt=0;rt<16;rt++)te(I[rt+1]);for(var bt=0;bt<=11;bt++)te(H[bt]);
vendor: 49,075 bytes, lines 123-129
123te(17);for(var gt=0;gt<16;gt++)te(U[gt+1]);for(var De=0;De<=161;De++)te(se[De])}(),de(65498),de(12),te(3),te(1),te(0),te(2),te(17),te(3),te(17),te(0),te(63),te(0);var B=0,W=0,$=0;O=0,k=7,this.encode.displayName="_encode_";for(var Q,ce,fe,be,Pe,Ie,ue,Ee,j,Se=A.data,Ye=A.width,Ue=A.height,Ne=4*Ye,Be=0;Be<Ue;){for(Q=0;Q<Ne;){for(Pe=Ne*Be+Q,ue=-1,Ee=0,j=0;j<64;j++)Ie=Pe+(Ee=j>>3)*Ne+(ue=4*(7&j)),Be+Ee>=Ue&&(Ie-=Ne*(Be+1+Ee-Ue)),Q+ue>=Ne&&(Ie-=Q+ue-Ne+4),ce=Se[Ie++],fe=Se[Ie++],be=Se[Ie++],Y[j]=(ye[ce]+ye[fe+256|0]+ye[be+512|0]>>16)-128,V[j]=(ye[ce+768|0]+ye[fe+1024|0]+ye[be+1280|0]>>16)-128,q[j]=(ye[ce+1280|0]+ye[fe+1536|0]+ye[be+1792|0]>>16)-128;B=ke(Y,d,B,t,r),W=ke(V,m,W,e,s),$=ke(q,m,$,e,s),Q+=32}Be+=8}if(k>=0){var Fe=[];Fe[1]=k+1,Fe[0]=(1<<k+1)-1,he(Fe)}return de(65497),new Uint8Array(E)},n=n||50,function(){for(var A=String.fromCharCode,D=0;D<256;D++)oe[D]=A(D)}(),t=le(K,R),e=le(I,H),r=le(Z,_),s=le(U,se),function(){for(var A=1,D=2,B=1;B<=15;B++){for(var W=A;W<D;W++)S[32767+W]=B,w[32767+W]=[],w[32767+W][1]=B,w[32767+W][0]=W;for(var $=-(D-1);$<=-A;$++)S[32767+$]=B,w[32767+$]=[],w[32767+$][1]=B,w[32767+$][0]=D-1+$;A<<=1,D<<=1}}(),function(){for(var A=0;A<256;A++)ye[A]=19595*A,ye[A+256|0]=38470*A,ye[A+512|0]=7471*A+32768,ye[A+768|0]=-11059*A,ye[A+1024|0]=-21709*A,ye[A+1280|0]=32768*A+8421375,ye[A+1536|0]=-27439*A,ye[A+1792|0]=-5329*A}(),we(n)}/** 124 * @license 125 * Copyright (c) 2017 Aras Abbasi 126 * 127 * Licensed under the MIT License. 128 * http://opensource.org/licenses/mit-license 129 */function kr(n,t){if(this.pos=0,this.buffer=n,this.datav=new DataView(n.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Iu(n){function t(R){if(!R)throw Error("assert :P")}function e(R,Z,_){for(var I=0;4>I;I++)if(R[Z+I]!=_.charCodeAt(I))return!0;return!1}function r(R,Z,_,I,H){for(var U=0;U<H;U++)R[Z+U]=_[I+U]}function s(R,Z,_,I){for(var H=0;H<I;H++)R[Z+H]=_}function a(R){return new Int32Array(R)}function f(R,Z){for(var _=[],I=0;I<R;I++)_.push(new Z);return _}function l(R,Z){var _=[];return function I(H,U,se){for(var le=se[U],he=0;he<le&&(H.push(se.length>U+1?[]:new Z),!(se.length<U+1));he++)I(H[he],U+1,se)}(_,0,R),_}var u=function(){var R=this;function Z(i,o){for(var h=1<<o-1>>>0;i&h;)h>>>=1;return h?(i&h-1)+h:i}function _(i,o,h,g,y){t(!(g%h));do i[o+(g-=h)]=y;while(0<g)}function I(i,o,h,g,y){if(t(2328>=y),512>=y)var x=a(512);else if((x=a(y))==null)return 0;return function(N,L,P,T,G,ie){var M,J,ee=L,me=1<<P,re=a(16),ge=a(16);for(t(G!=0),t(T!=null),t(N!=null),t(0<P),J=0;J<G;++J){if(15<T[J])return 0;++re[T[J]]}if(re[0]==G)return 0;for(ge[1]=0,M=1;15>M;++M){if(re[M]>1<<M)return 0;ge[M+1]=ge[M]+re[M]}for(J=0;J<G;++J)M=T[J],0<T[J]&&(ie[ge[M]++]=J);if(ge[15]==1)return(T=new H).g=0,T.value=ie[0],_(N,ee,1,me,T),me;var ve,je=-1,Le=me-1,Ve=0,Me=1,pt=1,ze=1<<P;for(J=0,M=1,G=2;M<=P;++M,G<<=1){if(Me+=pt<<=1,0>(pt-=re[M]))return 0;for(;0<re[M];--re[M])(T=new H).g=M,T.value=ie[J++],_(N,ee+Ve,G,ze,T),Ve=Z(Ve,M)}for(M=P+1,G=2;15>=M;++M,G<<=1){if(Me+=pt<<=1,0>(pt-=re[M]))return 0;for(;0<re[M];--re[M]){if(T=new H,(Ve&Le)!=je){for(ee+=ze,ve=1<<(je=M)-P;15>je&&!(0>=(ve-=re[je]));)++je,ve<<=1;me+=ze=1<<(ve=je-P),N[L+(je=Ve&Le)].g=ve+P,N[L+je].value=ee-L-je}T.g=M-P,T.value=ie[J++],_(N,ee+(Ve>>P),G,ze,T),Ve=Z(Ve,M)}}return Me!=2*ge[15]-1?0:me}(i,o,h,g,y,x)}function H(){this.value=this.g=0}function U(){this.value=this.g=0}function se(){this.G=f(5,H),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(ya,U)}function le(i,o,h,g){t(i!=null),t(o!=null),t(2147483648>g),i.Ca=254,i.I=0,i.b=-8,i.Ka=0,i.oa=o,i.pa=h,i.Jd=o,i.Yc=h+g,i.Zc=4<=g?h+g-4+1:h,ce(i)}function he(i,o){for(var h=0;0<o--;)h|=be(i,128)<<o;return h}function te(i,o){var h=he(i,o);return fe(i)?-h:h}function de(i,o,h,g){var y,x=0;for(t(i!=null),t(o!=null),t(4294967288>g),i.Sb=g,i.Ra=0,i.u=0,i.h=0,4<g&&(g=4),y=0;y<g;++y)x+=o[h+y]<<8*y;i.Ra=x,i.bb=g,i.oa=o,i.pa=h}function ke(i){for(;8<=i.u&&i.bb<i.Sb;)i.Ra>>>=8,i.Ra+=i.oa[i.pa+i.bb]<<Hn-8>>>0,++i.bb,i.u-=8;W(i)&&(i.h=1,i.u=0)}function we(i,o){if(t(0<=o),!i.h&&o<=ns){var h=B(i)&$i[o];return i.u+=o,ke(i),h}return i.h=1,i.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function D(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function B(i){return i.Ra>>>(i.u&Hn-1)>>>0}function W(i){return t(i.bb<=i.Sb),i.h||i.bb==i.Sb&&i.u>Hn}function $(i,o){i.u=o,i.h=W(i)}function Q(i){i.u>=Qn&&(t(i.u>=Qn),ke(i))}function ce(i){t(i!=null&&i.oa!=null),i.pa<i.Zc?(i.I=(i.oa[i.pa++]|i.I<<8)>>>0,i.b+=8):(t(i!=null&&i.oa!=null),i.pa<i.Yc?(i.b+=8,i.I=i.oa[i.pa++]|i.I<<8):i.Ka?i.b=0:(i.I<<=8,i.b+=8,i.Ka=1))}function fe(i){return he(i,1)}function be(i,o){var h=i.Ca;0>i.b&&ce(i);var g=i.b,y=h*o>>>8,x=(i.I>>>g>y)+0;for(x?(h-=y,i.I-=y+1<<g>>>0):h=y+1,g=h,y=0;256<=g;)y+=8,g>>=8;return g=7^y+xa[g],i.b-=g,i.Ca=(h<<g)-1,x}function Pe(i,o,h){i[o+0]=h>>24&255,i[o+1]=h>>16&255,i[o+2]=h>>8&255,i[o+3]=255&h}function Ie(i,o){return i[o+0]|i[o+1]<<8}function ue(i,o){return Ie(i,o)|i[o+2]<<16}function Ee(i,o){return Ie(i,o)|Ie(i,o+2)<<16}function j(i,o){var h=1<<o;return t(i!=null),t(0<o),i.X=a(h),i.X==null?0:(i.Mb=32-o,i.Xa=o,1)}function Se(i,o){t(i!=null),t(o!=null),t(i.Xa==o.Xa),r(o.X,0,i.X,0,1<<o.Xa)}function Ye(){this.X=[],this.Xa=this.Mb=0}function Ue(i,o,h,g){t(h!=null),t(g!=null);var y=h[0],x=g[0];return y==0&&(y=(i*x+o/2)/o),x==0&&(x=(o*y+i/2)/i),0>=y||0>=x?0:(h[0]=y,g[0]=x,1)}function Ne(i,o){return i+(1<<o)-1>>>o}function Be(i,o){return((4278255360&i)+(4278255360&o)>>>0&4278255360)+((16711935&i)+(16711935&o)>>>0&16711935)>>>0}function Fe(i,o){R[o]=function(h,g,y,x,N,L,P){var T;for(T=0;T<N;++T){var G=R[i](L[P+T-1],y,x+T);L[P+T]=Be(h[g+T],G)}}}function Je(){this.ud=this.hd=this.jd=0}function $e(i,o){return((4278124286&(i^o))>>>1)+(i&o)>>>0}function wt(i){return 0<=i&&256>i?i:0>i?0:255<i?255:void 0}function ht(i,o){return wt(i+(i-o+.5>>1))}function rt(i,o,h){return Math.abs(o-h)-Math.abs(i-h)}function bt(i,o,h,g,y,x,N){for(g=x[N-1],h=0;h<y;++h)x[N+h]=g=Be(i[o+h],g)}function gt(i,o,h,g,y){var x;for(x=0;x<h;++x){var N=i[o+x],L=N>>8&255,P=16711935&(P=(P=16711935&N)+((L<<16)+L));g[y+x]=(4278255360&N)+P>>>0}}function De(i,o){o.jd=255&i,o.hd=i>>8&255,o.ud=i>>16&255}function ot(i,o,h,g,y,x){var N;for(N=0;N<g;++N){var L=o[h+N],P=L>>>8,T=L,G=255&(G=(G=L>>>16)+((i.jd<<24>>24)*(P<<24>>24)>>>5));T=255&(T=(T+=(i.hd<<24>>24)*(P<<24>>24)>>>5)+((i.ud<<24>>24)*(G<<24>>24)>>>5)),y[x+N]=(4278255360&L)+(G<<16)+T}}function We(i,o,h,g,y){R[o]=function(x,N,L,P,T,G,ie,M,J){for(P=ie;P<M;++P)for(ie=0;ie<J;++ie)T[G++]=y(L[g(x[N++])])},R[i]=function(x,N,L,P,T,G,ie){var M=8>>x.b,J=x.Ea,ee=x.K[0],me=x.w;if(8>M)for(x=(1<<x.b)-1,me=(1<<M)-1;N<L;++N){var re,ge=0;for(re=0;re<J;++re)re&x||(ge=g(P[T++])),G[ie++]=y(ee[ge&me]),ge>>=M}else R["VP8LMapColor"+h](P,T,ee,me,G,ie,N,L,J)}}function Gt(i,o,h,g,y){for(h=o+h;o<h;){var x=i[o++];g[y++]=x>>16&255,g[y++]=x>>8&255,g[y++]=255&x}}function vt(i,o,h,g,y){for(h=o+h;o<h;){var x=i[o++];g[y++]=x>>16&255,g[y++]=x>>8&255,g[y++]=255&x,g[y++]=x>>24&255}}function lt(i,o,h,g,y){for(h=o+h;o<h;){var x=(N=i[o++])>>16&240|N>>12&15,N=240&N|N>>28&15;g[y++]=x,g[y++]=N}}function tt(i,o,h,g,y){for(h=o+h;o<h;){var x=(N=i[o++])>>16&248|N>>13&7,N=N>>5&224|N>>3&31;g[y++]=x,g[y++]=N}}function Ct(i,o,h,g,y){for(h=o+h;o<h;){var x=i[o++];g[y++]=255&x,g[y++]=x>>8&255,g[y++]=x>>16&255}}function Ke(i,o,h,g,y,x){if(x==0)for(h=o+h;o<h;)Pe(g,((x=i[o++])[0]>>24|x[1]>>8&65280|x[2]<<8&16711680|x[3]<<24)>>>0),y+=32;else r(g,y,i,o,h)}function Lt(i,o){R[o][0]=R[i+"0"],R[o][1]=R[i+"1"],R[o][2]=R[i+"2"],R[o][3]=R[i+"3"],R[o][4]=R[i+"4"],R[o][5]=R[i+"5"],R[o][6]=R[i+"6"],R[o][7]=R[i+"7"],R[o][8]=R[i+"8"],R[o][9]=R[i+"9"],R[o][10]=R[i+"10"],R[o][11]=R[i+"11"],R[o][12]=R[i+"12"],R[o][13]=R[i+"13"],R[o][14]=R[i+"0"],R[o][15]=R[i+"0"]}function et(i){return i==Ao||i==_o||i==Ts||i==Lo}function it(){this.eb=[],this.size=this.A=this.fb=0}function It(){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 dt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new It,this.sd=null}function Qe(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function yt(){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 Jr(i){return alert("todo:WebPSamplerProcessPlane"),i.T}function en(i,o){var h=i.T,g=o.ba.f.RGBA,y=g.eb,x=g.fb+i.ka*g.A,N=yr[o.ba.S],L=i.y,P=i.O,T=i.f,G=i.N,ie=i.ea,M=i.W,J=o.cc,ee=o.dc,me=o.Mc,re=o.Nc,ge=i.ka,ve=i.ka+i.T,je=i.U,Le=je+1>>1;for(ge==0?N(L,P,null,null,T,G,ie,M,T,G,ie,M,y,x,null,null,je):(N(o.ec,o.fc,L,P,J,ee,me,re,T,G,ie,M,y,x-g.A,y,x,je),++h);ge+2<ve;ge+=2)J=T,ee=G,me=ie,re=M,G+=i.Rc,M+=i.Rc,x+=2*g.A,N(L,(P+=2*i.fa)-i.fa,L,P,J,ee,me,re,T,G,ie,M,y,x-g.A,y,x,je);return P+=i.fa,i.j+ve<i.o?(r(o.ec,o.fc,L,P,je),r(o.cc,o.dc,T,G,Le),r(o.Mc,o.Nc,ie,M,Le),h--):1&ve||N(L,P,null,null,T,G,ie,M,T,G,ie,M,y,x+g.A,null,null,je),h}function wr(i,o,h){var g=i.F,y=[i.J];if(g!=null){var x=i.U,N=o.ba.S,L=N==Fs||N==Ts;o=o.ba.f.RGBA;var P=[0],T=i.ka;P[0]=i.T,i.Kb&&(T==0?--P[0]:(--T,y[0]-=i.width),i.j+i.ka+i.T==i.o&&(P[0]=i.o-i.j-T));var G=o.eb;T=o.fb+T*o.A,i=Bl(g,y[0],i.width,x,P,G,T+(L?0:3),o.A),t(h==P),i&&et(N)&&ss(G,T,L,x,P,o.A)}return 0}function rr(i){var o=i.ma,h=o.ba.S,g=11>h,y=h==Es||h==Is||h==Fs||h==No||h==12||et(h);if(o.memory=null,o.Ib=null,o.Jb=null,o.Nd=null,!br(o.Oa,i,y?11:12))return 0;if(y&&et(h)&&ri(),i.da)alert("todo:use_scaling");else{if(g){if(o.Ib=Jr,i.Kb){if(h=i.U+1>>1,o.memory=a(i.U+2*h),o.memory==null)return 0;o.ec=o.memory,o.fc=0,o.cc=o.ec,o.dc=o.fc+i.U,o.Mc=o.cc,o.Nc=o.dc+h,o.Ib=en,ri()}}else alert("todo:EmitYUV");y&&(o.Jb=wr,g&&Jt())}if(g&&!tc){for(i=0;256>i;++i)ih[i]=89858*(i-128)+Ds>>Ms,oh[i]=-22014*(i-128)+Ds,sh[i]=-45773*(i-128),ah[i]=113618*(i-128)+Ds>>Ms;for(i=ls;i<Po;++i)o=76283*(i-16)+Ds>>Ms,lh[i-ls]=Bn(o,255),ch[i-ls]=Bn(o+8>>4,15);tc=1}return 1}function Xe(i){var o=i.ma,h=i.U,g=i.T;return t(!(1&i.ka)),0>=h||0>=g?0:(h=o.Ib(i,o),o.Jb!=null&&o.Jb(i,o,h),o.Dc+=h,1)}function Mn(i){i.ma.memory=null}function Yn(i,o,h,g){return we(i,8)!=47?0:(o[0]=we(i,14)+1,h[0]=we(i,14)+1,g[0]=we(i,1),we(i,3)!=0?0:!i.h)}function Dn(i,o){if(4>i)return i+1;var h=i-2>>1;return(2+(1&i)<<h)+we(o,h)+1}function On(i,o){return 120<o?o-120:1<=(h=((h=Wf[o-1])>>4)*i+(8-(15&h)))?h:1;var h}function qt(i,o,h){var g=B(h),y=i[o+=255&g].g-8;return 0<y&&($(h,h.u+8),g=B(h),o+=i[o].value,o+=g&(1<<y)-1),$(h,h.u+i[o].g),i[o].value}function tn(i,o,h){return h.g+=i.g,h.value+=i.value<<o>>>0,t(8>=h.g),i.g}function hn(i,o,h){var g=i.xc;return t((o=g==0?0:i.vc[i.md*(h>>g)+(o>>g)])<i.Wb),i.Ya[o]}function Er(i,o,h,g){var y=i.ab,x=i.c*o,N=i.C;o=N+o;var L=h,P=g;for(g=i.Ta,h=i.Ua;0<y--;){var T=i.gc[y],G=N,ie=o,M=L,J=P,ee=(P=g,L=h,T.Ea);switch(t(G<ie),t(ie<=T.nc),T.hc){case 2:wa(M,J,(ie-G)*ee,P,L);break;case 0:var me=G,re=ie,ge=P,ve=L,je=(ze=T).Ea;me==0&&(xi(M,J,null,null,1,ge,ve),bt(M,J+1,0,0,je-1,ge,ve+1),J+=je,ve+=je,++me);for(var Le=1<<ze.b,Ve=Le-1,Me=Ne(je,ze.b),pt=ze.K,ze=ze.w+(me>>ze.b)*Me;me<re;){var xt=pt,mn=ze,mt=1;for(wi(M,J,ge,ve-je,1,ge,ve);mt<je;){var He=(mt&~Ve)+Le;He>je&&(He=je),(0,Ar[xt[mn++]>>8&15])(M,J+ +mt,ge,ve+mt-je,He-mt,ge,ve+mt),mt=He}J+=je,ve+=je,++me&Ve||(ze+=Me)}ie!=T.nc&&r(P,L-ee,P,L+(ie-G-1)*ee,ee);break;case 1:for(ee=M,re=J,je=(M=T.Ea)-(ve=M&~(ge=(J=1<<T.b)-1)),me=Ne(M,T.b),Le=T.K,T=T.w+(G>>T.b)*me;G<ie;){for(Ve=Le,Me=T,pt=new Je,ze=re+ve,xt=re+M;re<ze;)De(Ve[Me++],pt),Ji(pt,ee,re,J,P,L),re+=J,L+=J;re<xt&&(De(Ve[Me++],pt),Ji(pt,ee,re,je,P,L),re+=je,L+=je),++G&ge||(T+=me)}break;case 3:if(M==P&&J==L&&0<T.b){for(re=P,M=ee=L+(ie-G)*ee-(ve=(ie-G)*Ne(T.Ea,T.b)),J=P,ge=L,me=[],ve=(je=ve)-1;0<=ve;--ve)me[ve]=J[ge+ve];for(ve=je-1;0<=ve;--ve)re[M+ve]=me[ve];Ki(T,G,ie,P,ee,P,L)}else Ki(T,G,ie,M,J,P,L)}L=g,P=h}P!=h&&r(g,h,L,P,x)}function wn(i,o){var h=i.V,g=i.Ba+i.c*i.C,y=o-i.C;if(t(o<=i.l.o),t(16>=y),0<y){var x=i.l,N=i.Ta,L=i.Ua,P=x.width;if(Er(i,y,h,g),y=L=[L],t((h=i.C)<(g=o)),t(x.v<x.va),g>x.o&&(g=x.o),h<x.j){var T=x.j-h;h=x.j,y[0]+=T*P}if(h>=g?h=0:(y[0]+=4*x.v,x.ka=h-x.j,x.U=x.va-x.v,x.T=g-h,h=1),h){if(L=L[0],11>(h=i.ca).S){var G=h.f.RGBA,ie=(g=h.S,y=x.U,x=x.T,T=G.eb,G.A),M=x;for(G=G.fb+i.Ma*G.A;0<M--;){var J=N,ee=L,me=y,re=T,ge=G;switch(g){case Cs:rs(J,ee,me,re,ge);break;case Es:is(J,ee,me,re,ge);break;case Ao:is(J,ee,me,re,ge),ss(re,ge,0,me,1,0);break;case Gl:Zi(J,ee,me,re,ge);break;case Is:Ke(J,ee,me,re,ge,1);break;case _o:Ke(J,ee,me,re,ge,1),ss(re,ge,0,me,1,0);break;case Fs:Ke(J,ee,me,re,ge,0);break;case Ts:Ke(J,ee,me,re,ge,0),ss(re,ge,1,me,1,0);break;case No:Na(J,ee,me,re,ge);break;case Lo:Na(J,ee,me,re,ge),Rl(re,ge,me,1,0);break;case Yl:Xi(J,ee,me,re,ge);break;default:t(0)}L+=P,G+=ie}i.Ma+=x}else alert("todo:EmitRescaledRowsYUVA");t(i.Ma<=h.height)}}i.C=o,t(i.C<=i.i)}function Ln(i){var o;if(0<i.ua)return 0;for(o=0;o<i.Wb;++o){var h=i.Ya[o].G,g=i.Ya[o].H;if(0<h[1][g[1]+0].g||0<h[2][g[2]+0].g||0<h[3][g[3]+0].g)return 0}return 1}function ir(i,o,h,g,y,x){if(i.Z!=0){var N=i.qd,L=i.rd;for(t(Li[i.Z]!=null);o<h;++o)Li[i.Z](N,L,g,y,g,y,x),N=g,L=y,y+=x;i.qd=N,i.rd=L}}function $n(i,o){var h=i.l.ma,g=h.Z==0||h.Z==1?i.l.j:i.C;if(g=i.C<g?g:i.C,t(o<=i.l.o),o>g){var y=i.l.width,x=h.ca,N=h.tb+y*g,L=i.V,P=i.Ba+i.c*g,T=i.gc;t(i.ab==1),t(T[0].hc==3),xo(T[0],g,o,L,P,x,N),ir(h,g,o,x,N,y)}i.C=i.Ma=o}function Kn(i,o,h,g,y,x,N){var L=i.$/g,P=i.$%g,T=i.m,G=i.s,ie=h+i.$,M=ie;y=h+g*y;var J=h+g*x,ee=280+G.ua,me=i.Pb?L:16777216,re=0<G.ua?G.Wa:null,ge=G.wc,ve=ie<J?hn(G,P,L):null;t(i.C<x),t(J<=y);var je=!1;e:for(;;){for(;je||ie<J;){var Le=0;if(L>=me){var Ve=ie-h;t((me=i).Pb),me.wd=me.m,me.xd=Ve,0<me.s.ua&&Se(me.s.Wa,me.s.vb),me=L+Gf}if(P&ge||(ve=hn(G,P,L)),t(ve!=null),ve.Qb&&(o[ie]=ve.qb,je=!0),!je)if(Q(T),ve.jc){Le=T,Ve=o;var Me=ie,pt=ve.pd[B(Le)&ya-1];t(ve.jc),256>pt.g?($(Le,Le.u+pt.g),Ve[Me]=pt.value,Le=0):($(Le,Le.u+pt.g-256),t(256<=pt.value),Le=pt.value),Le==0&&(je=!0)}else Le=qt(ve.G[0],ve.H[0],T);if(T.h)break;if(je||256>Le){if(!je)if(ve.nd)o[ie]=(ve.qb|Le<<8)>>>0;else{if(Q(T),je=qt(ve.G[1],ve.H[1],T),Q(T),Ve=qt(ve.G[2],ve.H[2],T),Me=qt(ve.G[3],ve.H[3],T),T.h)break;o[ie]=(Me<<24|je<<16|Le<<8|Ve)>>>0}if(je=!1,++ie,++P>=g&&(P=0,++L,N!=null&&L<=x&&!(L%16)&&N(i,L),re!=null))for(;M<ie;)Le=o[M++],re.X[(506832829*Le&4294967295)>>>re.Mb]=Le}else if(280>Le){if(Le=Dn(Le-256,T),Ve=qt(ve.G[4],ve.H[4],T),Q(T),Ve=On(g,Ve=Dn(Ve,T)),T.h)break;if(ie-h<Ve||y-ie<Le)break e;for(Me=0;Me<Le;++Me)o[ie+Me]=o[ie+Me-Ve];for(ie+=Le,P+=Le;P>=g;)P-=g,++L,N!=null&&L<=x&&!(L%16)&&N(i,L);if(t(ie<=y),P&ge&&(ve=hn(G,P,L)),re!=null)for(;M<ie;)Le=o[M++],re.X[(506832829*Le&4294967295)>>>re.Mb]=Le}else{if(!(Le<ee))break e;for(je=Le-280,t(re!=null);M<ie;)Le=o[M++],re.X[(506832829*Le&4294967295)>>>re.Mb]=Le;Le=ie,t(!(je>>>(Ve=re).Xa)),o[Le]=Ve.X[je],je=!0}je||t(T.h==W(T))}if(i.Pb&&T.h&&ie<y)t(i.m.h),i.a=5,i.m=i.wd,i.$=i.xd,0<i.s.ua&&Se(i.s.vb,i.s.Wa);else{if(T.h)break e;N!=null&&N(i,L>x?x:L),i.a=0,i.$=ie-h}return 1}return i.a=3,0}function Rn(i){t(i!=null),i.vc=null,i.yc=null,i.Ya=null;var o=i.Wa;o!=null&&(o.X=null),i.vb=null,t(i!=null)}function Ir(){var i=new qe;return i==null?null:(i.a=0,i.xb=Jl,Lt("Predictor","VP8LPredictors"),Lt("Predictor","VP8LPredictors_C"),Lt("PredictorAdd","VP8LPredictorsAdd"),Lt("PredictorAdd","VP8LPredictorsAdd_C"),wa=gt,Ji=ot,rs=Gt,is=vt,Na=lt,Xi=tt,Zi=Ct,R.VP8LMapColor32b=fn,R.VP8LMapColor8b=zr,i)}function Jn(i,o,h,g,y){var x=1,N=[i],L=[o],P=g.m,T=g.s,G=null,ie=0;e:for(;;){if(h)for(;x&&we(P,1);){var M=N,J=L,ee=g,me=1,re=ee.m,ge=ee.gc[ee.ab],ve=we(re,2);if(ee.Oc&1<<ve)x=0;else{switch(ee.Oc|=1<<ve,ge.hc=ve,ge.Ea=M[0],ge.nc=J[0],ge.K=[null],++ee.ab,t(4>=ee.ab),ve){case 0:case 1:ge.b=we(re,3)+2,me=Jn(Ne(ge.Ea,ge.b),Ne(ge.nc,ge.b),0,ee,ge.K),ge.K=ge.K[0];break;case 3:var je,Le=we(re,8)+1,Ve=16<Le?0:4<Le?1:2<Le?2:3;if(M[0]=Ne(ge.Ea,Ve),ge.b=Ve,je=me=Jn(Le,1,0,ee,ge.K)){var Me,pt=Le,ze=ge,xt=1<<(8>>ze.b),mn=a(xt);if(mn==null)je=0;else{var mt=ze.K[0],He=ze.w;for(mn[0]=ze.K[0][0],Me=1;Me<1*pt;++Me)mn[Me]=Be(mt[He+Me],mn[Me-1]);for(;Me<4*xt;++Me)mn[Me]=0;ze.K[0]=null,ze.K[0]=mn,je=1}}me=je;break;case 2:break;default:t(0)}x=me}}if(N=N[0],L=L[0],x&&we(P,1)&&!(x=1<=(ie=we(P,4))&&11>=ie)){g.a=3;break e}var Ce;if(Ce=x)t:{var an,ft,At,Ht=g,Nn=N,Wn=L,Xt=ie,Cn=h,Vn=Ht.m,gn=Ht.s,_t=[null],St=1,Zt=0,kt=Vf[Xt];n:for(;;){if(Cn&&we(Vn,1)){var An=we(Vn,3)+2,Lr=Ne(Nn,An),sn=Ne(Wn,An),er=Lr*sn;if(!Jn(Lr,sn,0,Ht,_t))break n;for(_t=_t[0],gn.xc=An,an=0;an<er;++an){var Tt=_t[an]>>8&65535;_t[an]=Tt,Tt>=St&&(St=Tt+1)}}if(Vn.h)break n;for(ft=0;5>ft;++ft){var bn=$l[ft];!ft&&0<Xt&&(bn+=1<<Xt),Zt<bn&&(Zt=bn)}var or=f(St*kt,H),Gn=St,lr=f(Gn,se);if(lr==null)var cr=null;else t(65536>=Gn),cr=lr;var tr=a(Zt);if(cr==null||tr==null||or==null){Ht.a=1;break n}var ur=or;for(an=At=0;an<St;++an){var Rt=cr[an],fr=Rt.G,Sr=Rt.H,Qi=0,oi=1,_n=0;for(ft=0;5>ft;++ft){bn=$l[ft],fr[ft]=ur,Sr[ft]=At,!ft&&0<Xt&&(bn+=1<<Xt);i:{var Rs,jo=bn,Bs=Ht,cs=tr,hh=ur,dh=At,Co=0,Si=Bs.m,ph=we(Si,1);if(s(cs,0,0,jo),ph){var mh=we(Si,1)+1,gh=we(Si,1),ic=we(Si,gh==0?1:8);cs[ic]=1,mh==2&&(cs[ic=we(Si,8)]=1);var qs=1}else{var ac=a(19),sc=we(Si,4)+4;if(19<sc){Bs.a=3;var Us=0;break i}for(Rs=0;Rs<sc;++Rs)ac[Hf[Rs]]=we(Si,3);var Eo=void 0,us=void 0,oc=Bs,bh=ac,zs=jo,lc=cs,Io=0,ki=oc.m,cc=8,uc=f(128,H);r:for(;I(uc,0,7,bh,19);){if(we(ki,1)){var vh=2+2*we(ki,3);if((Eo=2+we(ki,vh))>zs)break r}else Eo=zs;for(us=0;us<zs&&Eo--;){Q(ki);var fc=uc[0+(127&B(ki))];$(ki,ki.u+fc.g);var La=fc.value;if(16>La)lc[us++]=La,La!=0&&(cc=La);else{var yh=La==16,hc=La-16,xh=Uf[hc],dc=we(ki,qf[hc])+xh;if(us+dc>zs)break r;for(var wh=yh?cc:0;0<dc--;)lc[us++]=wh}}Io=1;break r}Io||(oc.a=3),qs=Io}(qs=qs&&!Si.h)&&(Co=I(hh,dh,8,cs,jo)),qs&&Co!=0?Us=Co:(Bs.a=3,Us=0)}if(Us==0)break n;if(oi&&zf[ft]==1&&(oi=ur[At].g==0),Qi+=ur[At].g,At+=Us,3>=ft){var fs,Fo=tr[0];for(fs=1;fs<bn;++fs)tr[fs]>Fo&&(Fo=tr[fs]);_n+=Fo}}if(Rt.nd=oi,Rt.Qb=0,oi&&(Rt.qb=(fr[3][Sr[3]+0].value<<24|fr[1][Sr[1]+0].value<<16|fr[2][Sr[2]+0].value)>>>0,Qi==0&&256>fr[0][Sr[0]+0].value&&(Rt.Qb=1,Rt.qb+=fr[0][Sr[0]+0].value<<8)),Rt.jc=!Rt.Qb&&6>_n,Rt.jc){var Hs,li=Rt;for(Hs=0;Hs<ya;++Hs){var Pi=Hs,ji=li.pd[Pi],Ws=li.G[0][li.H[0]+Pi];256<=Ws.value?(ji.g=Ws.g+256,ji.value=Ws.value):(ji.g=0,ji.value=0,Pi>>=tn(Ws,8,ji),Pi>>=tn(li.G[1][li.H[1]+Pi],16,ji),Pi>>=tn(li.G[2][li.H[2]+Pi],0,ji),tn(li.G[3][li.H[3]+Pi],24,ji))}}}gn.vc=_t,gn.Wb=St,gn.Ya=cr,gn.yc=or,Ce=1;break t}Ce=0}if(!(x=Ce)){g.a=3;break e}if(0<ie){if(T.ua=1<<ie,!j(T.Wa,ie)){g.a=1,x=0;break e}}else T.ua=0;var To=g,pc=N,Nh=L,Mo=To.s,Do=Mo.xc;if(To.c=pc,To.i=Nh,Mo.md=Ne(pc,Do),Mo.wc=Do==0?-1:(1<<Do)-1,h){g.xb=Qf;break e}if((G=a(N*L))==null){g.a=1,x=0;break e}x=(x=Kn(g,G,0,N,L,L,null))&&!P.h;break e}return x?(y!=null?y[0]=G:(t(G==null),t(h)),g.$=0,h||Rn(T)):Rn(T),x}function Xn(i,o){var h=i.c*i.i,g=h+o+16*o;return t(i.c<=o),i.V=a(g),i.V==null?(i.Ta=null,i.Ua=0,i.a=1,0):(i.Ta=i.V,i.Ua=i.Ba+h+o,1)}function Fr(i,o){var h=i.C,g=o-h,y=i.V,x=i.Ba+i.c*h;for(t(o<=i.l.o);0<g;){var N=16<g?16:g,L=i.l.ma,P=i.l.width,T=P*N,G=L.ca,ie=L.tb+P*h,M=i.Ta,J=i.Ua;Er(i,N,y,x),ql(M,J,G,ie,T),ir(L,h,h+N,G,ie,P),g-=N,y+=N*i.c,h+=N}t(h==o),i.C=i.Ma=o}function pi(){this.ub=this.yd=this.td=this.Rb=0}function pr(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function qa(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Nr(){this.Yb=function(){var i=[];return function o(h,g,y){for(var x=y[g],N=0;N<x&&(h.push(y.length>g+1?[]:0),!(y.length<g+1));N++)o(h[N],g+1,y)}(i,0,[3,11]),i}()}function Ti(){this.jb=a(3),this.Wc=l([4,8],Nr),this.Xc=l([4,17],Nr)}function Mi(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Zn(){this.ld=this.La=this.dd=this.tc=0}function mr(){this.Na=this.la=0}function ar(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Xr(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function mi(){this.uc=this.M=this.Nb=0,this.wa=Array(new Zn),this.Y=0,this.ya=Array(new Xr),this.aa=0,this.l=new gi}function Tr(){this.y=a(16),this.f=a(8),this.ea=a(8)}function ca(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new pi,this.Kc=new pr,this.ed=new Mi,this.Qa=new qa,this.Ic=this.$c=this.Aa=0,this.D=new mi,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=f(8,A),this.ia=0,this.pb=f(4,ar),this.Pa=new Ti,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Tr),this.Hd=0,this.rb=Array(new mr),this.sb=0,this.wa=Array(new Zn),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 Xr),this.L=this.aa=0,this.gd=l([4,2],Zn),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 Bn(i,o){return 0>i?0:i>o?o:i}function gi(){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 Di(){var i=new ca;return i!=null&&(i.a=0,i.sc="OK",i.cb=0,i.Xb=0,os||(os=Mr)),i}function Yt(i,o,h){return i.a==0&&(i.a=o,i.sc=h,i.cb=0),0}function Zr(i,o,h){return 3<=h&&i[o+0]==157&&i[o+1]==1&&i[o+2]==42}function qn(i,o){if(i==null)return 0;if(i.a=0,i.sc="OK",o==null)return Yt(i,2,"null VP8Io passed to VP8GetHeaders()");var h=o.data,g=o.w,y=o.ha;if(4>y)return Yt(i,7,"Truncated header.");var x=h[g+0]|h[g+1]<<8|h[g+2]<<16,N=i.Od;if(N.Rb=!(1&x),N.td=x>>1&7,N.yd=x>>4&1,N.ub=x>>5,3<N.td)return Yt(i,3,"Incorrect keyframe parameters.");if(!N.yd)return Yt(i,4,"Frame not displayable.");g+=3,y-=3;var L=i.Kc;if(N.Rb){if(7>y)return Yt(i,7,"cannot parse picture header");if(!Zr(h,g,y))return Yt(i,3,"Bad code word");L.c=16383&(h[g+4]<<8|h[g+3]),L.Td=h[g+4]>>6,L.i=16383&(h[g+6]<<8|h[g+5]),L.Ud=h[g+6]>>6,g+=7,y-=7,i.za=L.c+15>>4,i.Ub=L.i+15>>4,o.width=L.c,o.height=L.i,o.Da=0,o.j=0,o.v=0,o.va=o.width,o.o=o.height,o.da=0,o.ib=o.width,o.hb=o.height,o.U=o.width,o.T=o.height,s((x=i.Pa).jb,0,255,x.jb.length),t((x=i.Qa)!=null),x.Cb=0,x.Bb=0,x.Fb=1,s(x.Zb,0,0,x.Zb.length),s(x.Lb,0,0,x.Lb)}if(N.ub>y)return Yt(i,7,"bad partition length");le(x=i.m,h,g,N.ub),g+=N.ub,y-=N.ub,N.Rb&&(L.Ld=fe(x),L.Kd=fe(x)),L=i.Qa;var P,T=i.Pa;if(t(x!=null),t(L!=null),L.Cb=fe(x),L.Cb){if(L.Bb=fe(x),fe(x)){for(L.Fb=fe(x),P=0;4>P;++P)L.Zb[P]=fe(x)?te(x,7):0;for(P=0;4>P;++P)L.Lb[P]=fe(x)?te(x,6):0}if(L.Bb)for(P=0;3>P;++P)T.jb[P]=fe(x)?he(x,8):255}else L.Bb=0;if(x.Ka)return Yt(i,3,"cannot parse segment header");if((L=i.ed).zd=fe(x),L.Tb=he(x,6),L.wb=he(x,3),L.Pc=fe(x),L.Pc&&fe(x)){for(T=0;4>T;++T)fe(x)&&(L.vd[T]=te(x,6));for(T=0;4>T;++T)fe(x)&&(L.od[T]=te(x,6))}if(i.L=L.Tb==0?0:L.zd?1:2,x.Ka)return Yt(i,3,"cannot parse filter header");var G=y;if(y=P=g,g=P+G,L=G,i.Xb=(1<<he(i.m,2))-1,G<3*(T=i.Xb))h=7;else{for(P+=3*T,L-=3*T,G=0;G<T;++G){var ie=h[y+0]|h[y+1]<<8|h[y+2]<<16;ie>L&&(ie=L),le(i.Jc[+G],h,P,ie),P+=ie,L-=ie,y+=3}le(i.Jc[+T],h,P,L),h=P<g?0:5}if(h!=0)return Yt(i,h,"cannot parse partitions");for(h=he(P=i.m,7),y=fe(P)?te(P,4):0,g=fe(P)?te(P,4):0,L=fe(P)?te(P,4):0,T=fe(P)?te(P,4):0,P=fe(P)?te(P,4):0,G=i.Qa,ie=0;4>ie;++ie){if(G.Cb){var M=G.Zb[ie];G.Fb||(M+=h)}else{if(0<ie){i.pb[ie]=i.pb[0];continue}M=h}var J=i.pb[ie];J.Sc[0]=So[Bn(M+y,127)],J.Sc[1]=ko[Bn(M+0,127)],J.Eb[0]=2*So[Bn(M+g,127)],J.Eb[1]=101581*ko[Bn(M+L,127)]>>16,8>J.Eb[1]&&(J.Eb[1]=8),J.Qc[0]=So[Bn(M+T,117)],J.Qc[1]=ko[Bn(M+P,127)],J.lc=M+P}if(!N.Rb)return Yt(i,4,"Not a key frame.");for(fe(x),N=i.Pa,h=0;4>h;++h){for(y=0;8>y;++y)for(g=0;3>g;++g)for(L=0;11>L;++L)T=be(x,Xf[h][y][g][L])?he(x,8):Kf[h][y][g][L],N.Wc[h][y].Yb[g][L]=T;for(y=0;17>y;++y)N.Xc[h][y]=N.Wc[h][Zf[y]]}return i.kc=fe(x),i.kc&&(i.Bd=he(x,8)),i.cb=1}function Mr(i,o,h,g,y,x,N){var L=o[y].Yb[h];for(h=0;16>y;++y){if(!be(i,L[h+0]))return y;for(;!be(i,L[h+1]);)if(L=o[++y].Yb[0],h=0,y==16)return 16;var P=o[y+1].Yb;if(be(i,L[h+2])){var T=i,G=0;if(be(T,(M=L)[(ie=h)+3]))if(be(T,M[ie+6])){for(L=0,ie=2*(G=be(T,M[ie+8]))+(M=be(T,M[ie+9+G])),G=0,M=Yf[ie];M[L];++L)G+=G+be(T,M[L]);G+=3+(8<<ie)}else be(T,M[ie+7])?(G=7+2*be(T,165),G+=be(T,145)):G=5+be(T,159);else G=be(T,M[ie+4])?3+be(T,M[ie+5]):2;L=P[2]}else G=1,L=P[1];P=N+$f[y],0>(T=i).b&&ce(T);var ie,M=T.b,J=(ie=T.Ca>>1)-(T.I>>M)>>31;--T.b,T.Ca+=J,T.Ca|=1,T.I-=(ie+1&J)<<M,x[P]=((G^J)-J)*g[(0<y)+0]}return 16}function Dr(i){var o=i.rb[i.sb-1];o.la=0,o.Na=0,s(i.zc,0,0,i.zc.length),i.ja=0}function Un(i,o,h,g,y){y=i[o+h+32*g]+(y>>3),i[o+h+32*g]=-256&y?0>y?0:255:y}function Qr(i,o,h,g,y,x){Un(i,o,0,h,g+y),Un(i,o,1,h,g+x),Un(i,o,2,h,g-x),Un(i,o,3,h,g-y)}function gr(i){return(20091*i>>16)+i}function dn(i,o,h,g){var y,x=0,N=a(16);for(y=0;4>y;++y){var L=i[o+0]+i[o+8],P=i[o+0]-i[o+8],T=(35468*i[o+4]>>16)-gr(i[o+12]),G=gr(i[o+4])+(35468*i[o+12]>>16);N[x+0]=L+G,N[x+1]=P+T,N[x+2]=P-T,N[x+3]=L-G,x+=4,o++}for(y=x=0;4>y;++y)L=(i=N[x+0]+4)+N[x+8],P=i-N[x+8],T=(35468*N[x+4]>>16)-gr(N[x+12]),Un(h,g,0,0,L+(G=gr(N[x+4])+(35468*N[x+12]>>16))),Un(h,g,1,0,P+T),Un(h,g,2,0,P-T),Un(h,g,3,0,L-G),x++,g+=32}function ua(i,o,h,g){var y=i[o+0]+4,x=35468*i[o+4]>>16,N=gr(i[o+4]),L=35468*i[o+1]>>16;Qr(h,g,0,y+N,i=gr(i[o+1]),L),Qr(h,g,1,y+x,i,L),Qr(h,g,2,y-x,i,L),Qr(h,g,3,y-N,i,L)}function Ua(i,o,h,g,y){dn(i,o,h,g),y&&dn(i,o+16,h,g+4)}function za(i,o,h,g){ii(i,o+0,h,g,1),ii(i,o+32,h,g+128,1)}function Ha(i,o,h,g){var y;for(i=i[o+0]+4,y=0;4>y;++y)for(o=0;4>o;++o)Un(h,g,o,y,i)}function Sn(i,o,h,g){i[o+0]&&jn(i,o+0,h,g),i[o+16]&&jn(i,o+16,h,g+4),i[o+32]&&jn(i,o+32,h,g+128),i[o+48]&&jn(i,o+48,h,g+128+4)}function fa(i,o,h,g){var y,x=a(16);for(y=0;4>y;++y){var N=i[o+0+y]+i[o+12+y],L=i[o+4+y]+i[o+8+y],P=i[o+4+y]-i[o+8+y],T=i[o+0+y]-i[o+12+y];x[0+y]=N+L,x[8+y]=N-L,x[4+y]=T+P,x[12+y]=T-P}for(y=0;4>y;++y)N=(i=x[0+4*y]+3)+x[3+4*y],L=x[1+4*y]+x[2+4*y],P=x[1+4*y]-x[2+4*y],T=i-x[3+4*y],h[g+0]=N+L>>3,h[g+16]=T+P>>3,h[g+32]=N-L>>3,h[g+48]=T-P>>3,g+=64}function ei(i,o,h){var g,y=o-32,x=sr,N=255-i[y-1];for(g=0;g<h;++g){var L,P=x,T=N+i[o-1];for(L=0;L<h;++L)i[o+L]=P[T+i[y+L]];o+=32}}function bi(i,o){ei(i,o,4)}function Oi(i,o){ei(i,o,8)}function Wa(i,o){ei(i,o,16)}function Va(i,o){var h;for(h=0;16>h;++h)r(i,o+32*h,i,o-32,16)}function Ga(i,o){var h;for(h=16;0<h;--h)s(i,o,i[o-1],16),o+=32}function Or(i,o,h){var g;for(g=0;16>g;++g)s(o,h+32*g,i,16)}function ha(i,o){var h,g=16;for(h=0;16>h;++h)g+=i[o-1+32*h]+i[o+h-32];Or(g>>5,i,o)}function Rr(i,o){var h,g=8;for(h=0;16>h;++h)g+=i[o-1+32*h];Or(g>>4,i,o)}function Ya(i,o){var h,g=8;for(h=0;16>h;++h)g+=i[o+h-32];Or(g>>4,i,o)}function ae(i,o){Or(128,i,o)}function xe(i,o,h){return i+2*o+h+2>>2}function Te(i,o){var h,g=o-32;for(g=new Uint8Array([xe(i[g-1],i[g+0],i[g+1]),xe(i[g+0],i[g+1],i[g+2]),xe(i[g+1],i[g+2],i[g+3]),xe(i[g+2],i[g+3],i[g+4])]),h=0;4>h;++h)r(i,o+32*h,g,0,g.length)}function Ze(i,o){var h=i[o-1],g=i[o-1+32],y=i[o-1+64],x=i[o-1+96];Pe(i,o+0,16843009*xe(i[o-1-32],h,g)),Pe(i,o+32,16843009*xe(h,g,y)),Pe(i,o+64,16843009*xe(g,y,x)),Pe(i,o+96,16843009*xe(y,x,x))}function at(i,o){var h,g=4;for(h=0;4>h;++h)g+=i[o+h-32]+i[o-1+32*h];for(g>>=3,h=0;4>h;++h)s(i,o+32*h,g,4)}function Ut(i,o){var h=i[o-1+0],g=i[o-1+32],y=i[o-1+64],x=i[o-1-32],N=i[o+0-32],L=i[o+1-32],P=i[o+2-32],T=i[o+3-32];i[o+0+96]=xe(g,y,i[o-1+96]),i[o+1+96]=i[o+0+64]=xe(h,g,y),i[o+2+96]=i[o+1+64]=i[o+0+32]=xe(x,h,g),i[o+3+96]=i[o+2+64]=i[o+1+32]=i[o+0+0]=xe(N,x,h),i[o+3+64]=i[o+2+32]=i[o+1+0]=xe(L,N,x),i[o+3+32]=i[o+2+0]=xe(P,L,N),i[o+3+0]=xe(T,P,L)}function yn(i,o){var h=i[o+1-32],g=i[o+2-32],y=i[o+3-32],x=i[o+4-32],N=i[o+5-32],L=i[o+6-32],P=i[o+7-32];i[o+0+0]=xe(i[o+0-32],h,g),i[o+1+0]=i[o+0+32]=xe(h,g,y),i[o+2+0]=i[o+1+32]=i[o+0+64]=xe(g,y,x),i[o+3+0]=i[o+2+32]=i[o+1+64]=i[o+0+96]=xe(y,x,N),i[o+3+32]=i[o+2+64]=i[o+1+96]=xe(x,N,L),i[o+3+64]=i[o+2+96]=xe(N,L,P),i[o+3+96]=xe(L,P,P)}function $t(i,o){var h=i[o-1+0],g=i[o-1+32],y=i[o-1+64],x=i[o-1-32],N=i[o+0-32],L=i[o+1-32],P=i[o+2-32],T=i[o+3-32];i[o+0+0]=i[o+1+64]=x+N+1>>1,i[o+1+0]=i[o+2+64]=N+L+1>>1,i[o+2+0]=i[o+3+64]=L+P+1>>1,i[o+3+0]=P+T+1>>1,i[o+0+96]=xe(y,g,h),i[o+0+64]=xe(g,h,x),i[o+0+32]=i[o+1+96]=xe(h,x,N),i[o+1+32]=i[o+2+96]=xe(x,N,L),i[o+2+32]=i[o+3+96]=xe(N,L,P),i[o+3+32]=xe(L,P,T)}function nn(i,o){var h=i[o+0-32],g=i[o+1-32],y=i[o+2-32],x=i[o+3-32],N=i[o+4-32],L=i[o+5-32],P=i[o+6-32],T=i[o+7-32];i[o+0+0]=h+g+1>>1,i[o+1+0]=i[o+0+64]=g+y+1>>1,i[o+2+0]=i[o+1+64]=y+x+1>>1,i[o+3+0]=i[o+2+64]=x+N+1>>1,i[o+0+32]=xe(h,g,y),i[o+1+32]=i[o+0+96]=xe(g,y,x),i[o+2+32]=i[o+1+96]=xe(y,x,N),i[o+3+32]=i[o+2+96]=xe(x,N,L),i[o+3+64]=xe(N,L,P),i[o+3+96]=xe(L,P,T)}function Ri(i,o){var h=i[o-1+0],g=i[o-1+32],y=i[o-1+64],x=i[o-1+96];i[o+0+0]=h+g+1>>1,i[o+2+0]=i[o+0+32]=g+y+1>>1,i[o+2+32]=i[o+0+64]=y+x+1>>1,i[o+1+0]=xe(h,g,y),i[o+3+0]=i[o+1+32]=xe(g,y,x),i[o+3+32]=i[o+1+64]=xe(y,x,x),i[o+3+64]=i[o+2+64]=i[o+0+96]=i[o+1+96]=i[o+2+96]=i[o+3+96]=x}function Br(i,o){var h=i[o-1+0],g=i[o-1+32],y=i[o-1+64],x=i[o-1+96],N=i[o-1-32],L=i[o+0-32],P=i[o+1-32],T=i[o+2-32];i[o+0+0]=i[o+2+32]=h+N+1>>1,i[o+0+32]=i[o+2+64]=g+h+1>>1,i[o+0+64]=i[o+2+96]=y+g+1>>1,i[o+0+96]=x+y+1>>1,i[o+3+0]=xe(L,P,T),i[o+2+0]=xe(N,L,P),i[o+1+0]=i[o+3+32]=xe(h,N,L),i[o+1+32]=i[o+3+64]=xe(g,h,N),i[o+1+64]=i[o+3+96]=xe(y,g,h),i[o+1+96]=xe(x,y,g)}function Bi(i,o){var h;for(h=0;8>h;++h)r(i,o+32*h,i,o-32,8)}function $a(i,o){var h;for(h=0;8>h;++h)s(i,o,i[o-1],8),o+=32}function qr(i,o,h){var g;for(g=0;8>g;++g)s(o,h+32*g,i,8)}function vo(i,o){var h,g=8;for(h=0;8>h;++h)g+=i[o+h-32]+i[o-1+32*h];qr(g>>4,i,o)}function da(i,o){var h,g=4;for(h=0;8>h;++h)g+=i[o+h-32];qr(g>>3,i,o)}function yo(i,o){var h,g=4;for(h=0;8>h;++h)g+=i[o-1+32*h];qr(g>>3,i,o)}function Ka(i,o){qr(128,i,o)}function vi(i,o,h){var g=i[o-h],y=i[o+0],x=3*(y-g)+wo[1020+i[o-2*h]-i[o+h]],N=js[112+(x+4>>3)];i[o-h]=sr[255+g+js[112+(x+3>>3)]],i[o+0]=sr[255+y-N]}function Ja(i,o,h,g){var y=i[o+0],x=i[o+h];return vr[255+i[o-2*h]-i[o-h]]>g||vr[255+x-y]>g}function qi(i,o,h,g){return 4*vr[255+i[o-h]-i[o+0]]+vr[255+i[o-2*h]-i[o+h]]<=g}function Xa(i,o,h,g,y){var x=i[o-3*h],N=i[o-2*h],L=i[o-h],P=i[o+0],T=i[o+h],G=i[o+2*h],ie=i[o+3*h];return 4*vr[255+L-P]+vr[255+N-T]>g?0:vr[255+i[o-4*h]-x]<=y&&vr[255+x-N]<=y&&vr[255+N-L]<=y&&vr[255+ie-G]<=y&&vr[255+G-T]<=y&&vr[255+T-P]<=y}function pa(i,o,h,g){var y=2*g+1;for(g=0;16>g;++g)qi(i,o+g,h,y)&&vi(i,o+g,h)}function Za(i,o,h,g){var y=2*g+1;for(g=0;16>g;++g)qi(i,o+g*h,1,y)&&vi(i,o+g*h,1)}function ma(i,o,h,g){var y;for(y=3;0<y;--y)pa(i,o+=4*h,h,g)}function ws(i,o,h,g){var y;for(y=3;0<y;--y)Za(i,o+=4,h,g)}function ti(i,o,h,g,y,x,N,L){for(x=2*x+1;0<y--;){if(Xa(i,o,h,x,N))if(Ja(i,o,h,L))vi(i,o,h);else{var P=i,T=o,G=h,ie=P[T-2*G],M=P[T-G],J=P[T+0],ee=P[T+G],me=P[T+2*G],re=27*(ve=wo[1020+3*(J-M)+wo[1020+ie-ee]])+63>>7,ge=18*ve+63>>7,ve=9*ve+63>>7;P[T-3*G]=sr[255+P[T-3*G]+ve],P[T-2*G]=sr[255+ie+ge],P[T-G]=sr[255+M+re],P[T+0]=sr[255+J-re],P[T+G]=sr[255+ee-ge],P[T+2*G]=sr[255+me-ve]}o+=g}}function ni(i,o,h,g,y,x,N,L){for(x=2*x+1;0<y--;){if(Xa(i,o,h,x,N))if(Ja(i,o,h,L))vi(i,o,h);else{var P=i,T=o,G=h,ie=P[T-G],M=P[T+0],J=P[T+G],ee=js[112+(4+(me=3*(M-ie))>>3)],me=js[112+(me+3>>3)],re=ee+1>>1;P[T-2*G]=sr[255+P[T-2*G]+re],P[T-G]=sr[255+ie+me],P[T+0]=sr[255+M-ee],P[T+G]=sr[255+J-re]}o+=g}}function Ns(i,o,h,g,y,x){ti(i,o,h,1,16,g,y,x)}function As(i,o,h,g,y,x){ti(i,o,1,h,16,g,y,x)}function _s(i,o,h,g,y,x){var N;for(N=3;0<N;--N)ni(i,o+=4*h,h,1,16,g,y,x)}function Ui(i,o,h,g,y,x){var N;for(N=3;0<N;--N)ni(i,o+=4,1,h,16,g,y,x)}function Ls(i,o,h,g,y,x,N,L){ti(i,o,y,1,8,x,N,L),ti(h,g,y,1,8,x,N,L)}function c(i,o,h,g,y,x,N,L){ti(i,o,1,y,8,x,N,L),ti(h,g,1,y,8,x,N,L)}function v(i,o,h,g,y,x,N,L){ni(i,o+4*y,y,1,8,x,N,L),ni(h,g+4*y,y,1,8,x,N,L)}function F(i,o,h,g,y,x,N,L){ni(i,o+4,1,y,8,x,N,L),ni(h,g+4,1,y,8,x,N,L)}function z(){this.ba=new dt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new yt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function X(){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 pe(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ae(){this.ua=0,this.Wa=new Ye,this.vb=new Ye,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new se,this.yc=new H}function qe(){this.xb=this.a=0,this.l=new gi,this.ca=new dt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new D,this.Pb=0,this.wd=new D,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ae,this.ab=0,this.gc=f(4,pe),this.Oc=0}function Re(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new gi,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function st(i,o,h,g,y,x,N){for(i=i==null?0:i[o+0],o=0;o<N;++o)y[x+o]=i+h[g+o]&255,i=y[x+o]}function ut(i,o,h,g,y,x,N){var L;if(i==null)st(null,null,h,g,y,x,N);else for(L=0;L<N;++L)y[x+L]=i[o+L]+h[g+L]&255}function Nt(i,o,h,g,y,x,N){if(i==null)st(null,null,h,g,y,x,N);else{var L,P=i[o+0],T=P,G=P;for(L=0;L<N;++L)T=G+(P=i[o+L])-T,G=h[g+L]+(-256&T?0>T?0:255:T)&255,T=P,y[x+L]=G}}function un(i,o,h,g){var y=o.width,x=o.o;if(t(i!=null&&o!=null),0>h||0>=g||h+g>x)return null;if(!i.Cc){if(i.ga==null){var N;if(i.ga=new Re,(N=i.ga==null)||(N=o.width*o.o,t(i.Gb.length==0),i.Gb=a(N),i.Uc=0,i.Gb==null?N=0:(i.mb=i.Gb,i.nb=i.Uc,i.rc=null,N=1),N=!N),!N){N=i.ga;var L=i.Fa,P=i.P,T=i.qc,G=i.mb,ie=i.nb,M=P+1,J=T-1,ee=N.l;if(t(L!=null&&G!=null&&o!=null),Li[0]=null,Li[1]=st,Li[2]=ut,Li[3]=Nt,N.ca=G,N.tb=ie,N.c=o.width,N.i=o.height,t(0<N.c&&0<N.i),1>=T)o=0;else if(N.$a=3&L[P+0],N.Z=L[P+0]>>2&3,N.Lc=L[P+0]>>4&3,P=L[P+0]>>6&3,0>N.$a||1<N.$a||4<=N.Z||1<N.Lc||P)o=0;else if(ee.put=Xe,ee.ac=rr,ee.bc=Mn,ee.ma=N,ee.width=o.width,ee.height=o.height,ee.Da=o.Da,ee.v=o.v,ee.va=o.va,ee.j=o.j,ee.o=o.o,N.$a)e:{t(N.$a==1),o=Ir();t:for(;;){if(o==null){o=0;break e}if(t(N!=null),N.mc=o,o.c=N.c,o.i=N.i,o.l=N.l,o.l.ma=N,o.l.width=N.c,o.l.height=N.i,o.a=0,de(o.m,L,M,J),!Jn(N.c,N.i,1,o,null)||(o.ab==1&&o.gc[0].hc==3&&Ln(o.s)?(N.ic=1,L=o.c*o.i,o.Ta=null,o.Ua=0,o.V=a(L),o.Ba=0,o.V==null?(o.a=1,o=0):o=1):(N.ic=0,o=Xn(o,N.c)),!o))break t;o=1;break e}N.mc=null,o=0}else o=J>=N.c*N.i;N=!o}if(N)return null;i.ga.Lc!=1?i.Ga=0:g=x-h}t(i.ga!=null),t(h+g<=x);e:{if(o=(L=i.ga).c,x=L.l.o,L.$a==0){if(M=i.rc,J=i.Vc,ee=i.Fa,P=i.P+1+h*o,T=i.mb,G=i.nb+h*o,t(P<=i.P+i.qc),L.Z!=0)for(t(Li[L.Z]!=null),N=0;N<g;++N)Li[L.Z](M,J,ee,P,T,G,o),M=T,J=G,G+=o,P+=o;else for(N=0;N<g;++N)r(T,G,ee,P,o),M=T,J=G,G+=o,P+=o;i.rc=M,i.Vc=J}else{if(t(L.mc!=null),o=h+g,t((N=L.mc)!=null),t(o<=N.i),N.C>=o)o=1;else if(L.ic||Jt(),L.ic){L=N.V,M=N.Ba,J=N.c;var me=N.i,re=(ee=1,P=N.$/J,T=N.$%J,G=N.m,ie=N.s,N.$),ge=J*me,ve=J*o,je=ie.wc,Le=re<ve?hn(ie,T,P):null;t(re<=ge),t(o<=me),t(Ln(ie));t:for(;;){for(;!G.h&&re<ve;){if(T&je||(Le=hn(ie,T,P)),t(Le!=null),Q(G),256>(me=qt(Le.G[0],Le.H[0],G)))L[M+re]=me,++re,++T>=J&&(T=0,++P<=o&&!(P%16)&&$n(N,P));else{if(!(280>me)){ee=0;break t}me=Dn(me-256,G);var Ve,Me=qt(Le.G[4],Le.H[4],G);if(Q(G),!(re>=(Me=On(J,Me=Dn(Me,G)))&&ge-re>=me)){ee=0;break t}for(Ve=0;Ve<me;++Ve)L[M+re+Ve]=L[M+re+Ve-Me];for(re+=me,T+=me;T>=J;)T-=J,++P<=o&&!(P%16)&&$n(N,P);re<ve&&T&je&&(Le=hn(ie,T,P))}t(G.h==W(G))}$n(N,P>o?o:P);break t}!ee||G.h&&re<ge?(ee=0,N.a=G.h?5:3):N.$=re,o=ee}else o=Kn(N,N.V,N.Ba,N.c,N.i,o,Fr);if(!o){g=0;break e}}h+g>=x&&(i.Cc=1),g=1}if(!g)return null;if(i.Cc&&((g=i.ga)!=null&&(g.mc=null),i.ga=null,0<i.Ga))return alert("todo:WebPDequantizeLevels"),null}return i.nb+h*y}function Ft(i,o,h,g,y,x){for(;0<y--;){var N,L=i,P=o+(h?1:0),T=i,G=o+(h?0:3);for(N=0;N<g;++N){var ie=T[G+4*N];ie!=255&&(ie*=32897,L[P+4*N+0]=L[P+4*N+0]*ie>>23,L[P+4*N+1]=L[P+4*N+1]*ie>>23,L[P+4*N+2]=L[P+4*N+2]*ie>>23)}o+=x}}function Et(i,o,h,g,y){for(;0<g--;){var x;for(x=0;x<h;++x){var N=i[o+2*x+0],L=15&(T=i[o+2*x+1]),P=4369*L,T=(240&T|T>>4)*P>>16;i[o+2*x+0]=(240&N|N>>4)*P>>16&240|(15&N|N<<4)*P>>16>>4&15,i[o+2*x+1]=240&T|L}o+=y}}function zt(i,o,h,g,y,x,N,L){var P,T,G=255;for(T=0;T<y;++T){for(P=0;P<g;++P){var ie=i[o+P];x[N+4*P]=ie,G&=ie}o+=h,N+=L}return G!=255}function Kt(i,o,h,g,y){var x;for(x=0;x<y;++x)h[g+x]=i[o+x]>>8}function Jt(){ss=Ft,Rl=Et,Bl=zt,ql=Kt}function kn(i,o,h){R[i]=function(g,y,x,N,L,P,T,G,ie,M,J,ee,me,re,ge,ve,je){var Le,Ve=je-1>>1,Me=L[P+0]|T[G+0]<<16,pt=ie[M+0]|J[ee+0]<<16;t(g!=null);var ze=3*Me+pt+131074>>2;for(o(g[y+0],255&ze,ze>>16,me,re),x!=null&&(ze=3*pt+Me+131074>>2,o(x[N+0],255&ze,ze>>16,ge,ve)),Le=1;Le<=Ve;++Le){var xt=L[P+Le]|T[G+Le]<<16,mn=ie[M+Le]|J[ee+Le]<<16,mt=Me+xt+pt+mn+524296,He=mt+2*(xt+pt)>>3;ze=He+Me>>1,Me=(mt=mt+2*(Me+mn)>>3)+xt>>1,o(g[y+2*Le-1],255&ze,ze>>16,me,re+(2*Le-1)*h),o(g[y+2*Le-0],255&Me,Me>>16,me,re+(2*Le-0)*h),x!=null&&(ze=mt+pt>>1,Me=He+mn>>1,o(x[N+2*Le-1],255&ze,ze>>16,ge,ve+(2*Le-1)*h),o(x[N+2*Le+0],255&Me,Me>>16,ge,ve+(2*Le+0)*h)),Me=xt,pt=mn}1&je||(ze=3*Me+pt+131074>>2,o(g[y+je-1],255&ze,ze>>16,me,re+(je-1)*h),x!=null&&(ze=3*pt+Me+131074>>2,o(x[N+je-1],255&ze,ze>>16,ge,ve+(je-1)*h)))}}function ri(){yr[Cs]=eh,yr[Es]=Xl,yr[Gl]=th,yr[Is]=Zl,yr[Fs]=Ql,yr[No]=ec,yr[Yl]=nh,yr[Ao]=Xl,yr[_o]=Zl,yr[Ts]=Ql,yr[Lo]=ec}function Qa(i){return i&-16384?0>i?0:255:i>>rh}function zi(i,o){return Qa((19077*i>>8)+(26149*o>>8)-14234)}function Hi(i,o,h){return Qa((19077*i>>8)-(6419*o>>8)-(13320*h>>8)+8708)}function yi(i,o){return Qa((19077*i>>8)+(33050*o>>8)-17685)}function Wi(i,o,h,g,y){g[y+0]=zi(i,h),g[y+1]=Hi(i,o,h),g[y+2]=yi(i,o)}function ga(i,o,h,g,y){g[y+0]=yi(i,o),g[y+1]=Hi(i,o,h),g[y+2]=zi(i,h)}function ba(i,o,h,g,y){var x=Hi(i,o,h);o=x<<3&224|yi(i,o)>>3,g[y+0]=248&zi(i,h)|x>>5,g[y+1]=o}function Pn(i,o,h,g,y){var x=240&yi(i,o)|15;g[y+0]=240&zi(i,h)|Hi(i,o,h)>>4,g[y+1]=x}function Vi(i,o,h,g,y){g[y+0]=255,Wi(i,o,h,g,y+1)}function Gi(i,o,h,g,y){ga(i,o,h,g,y),g[y+3]=255}function es(i,o,h,g,y){Wi(i,o,h,g,y),g[y+3]=255}function Ur(i,o,h){R[i]=function(g,y,x,N,L,P,T,G,ie){for(var M=G+(-2&ie)*h;G!=M;)o(g[y+0],x[N+0],L[P+0],T,G),o(g[y+1],x[N+0],L[P+0],T,G+h),y+=2,++N,++P,G+=2*h;1&ie&&o(g[y+0],x[N+0],L[P+0],T,G)}}function zn(i,o,h){return h==0?i==0?o==0?6:5:o==0?4:0:h}function Ss(i,o,h,g,y){switch(i>>>30){case 3:ii(o,h,g,y,0);break;case 2:Ai(o,h,g,y);break;case 1:jn(o,h,g,y)}}function va(i,o){var h,g,y=o.M,x=o.Nb,N=i.oc,L=i.pc+40,P=i.oc,T=i.pc+584,G=i.oc,ie=i.pc+600;for(h=0;16>h;++h)N[L+32*h-1]=129;for(h=0;8>h;++h)P[T+32*h-1]=129,G[ie+32*h-1]=129;for(0<y?N[L-1-32]=P[T-1-32]=G[ie-1-32]=129:(s(N,L-32-1,127,21),s(P,T-32-1,127,9),s(G,ie-32-1,127,9)),g=0;g<i.za;++g){var M=o.ya[o.aa+g];if(0<g){for(h=-1;16>h;++h)r(N,L+32*h-4,N,L+32*h+12,4);for(h=-1;8>h;++h)r(P,T+32*h-4,P,T+32*h+4,4),r(G,ie+32*h-4,G,ie+32*h+4,4)}var J=i.Gd,ee=i.Hd+g,me=M.ad,re=M.Hc;if(0<y&&(r(N,L-32,J[ee].y,0,16),r(P,T-32,J[ee].f,0,8),r(G,ie-32,J[ee].ea,0,8)),M.Za){var ge=N,ve=L-32+16;for(0<y&&(g>=i.za-1?s(ge,ve,J[ee].y[15],4):r(ge,ve,J[ee+1].y,0,4)),h=0;4>h;h++)ge[ve+128+h]=ge[ve+256+h]=ge[ve+384+h]=ge[ve+0+h];for(h=0;16>h;++h,re<<=2)ge=N,ve=L+nc[h],_r[M.Ob[h]](ge,ve),Ss(re,me,16*+h,ge,ve)}else if(ge=zn(g,y,M.Ob[0]),_i[ge](N,L),re!=0)for(h=0;16>h;++h,re<<=2)Ss(re,me,16*+h,N,L+nc[h]);for(h=M.Gc,ge=zn(g,y,M.Dd),si[ge](P,T),si[ge](G,ie),re=me,ge=P,ve=T,255&(M=0|h)&&(170&M?Aa(re,256,ge,ve):Hr(re,256,ge,ve)),M=G,re=ie,255&(h>>=8)&&(170&h?Aa(me,320,M,re):Hr(me,320,M,re)),y<i.Ub-1&&(r(J[ee].y,0,N,L+480,16),r(J[ee].f,0,P,T+224,8),r(J[ee].ea,0,G,ie+224,8)),h=8*x*i.B,J=i.sa,ee=i.ta+16*g+16*x*i.R,me=i.qa,M=i.ra+8*g+h,re=i.Ha,ge=i.Ia+8*g+h,h=0;16>h;++h)r(J,ee+h*i.R,N,L+32*h,16);for(h=0;8>h;++h)r(me,M+h*i.B,P,T+32*h,8),r(re,ge+h*i.B,G,ie+32*h,8)}}function ks(i,o,h,g,y,x,N,L,P){var T=[0],G=[0],ie=0,M=P!=null?P.kd:0,J=P??new X;if(i==null||12>h)return 7;J.data=i,J.w=o,J.ha=h,o=[o],h=[h],J.gb=[J.gb];e:{var ee=o,me=h,re=J.gb;if(t(i!=null),t(me!=null),t(re!=null),re[0]=0,12<=me[0]&&!e(i,ee[0],"RIFF")){if(e(i,ee[0]+8,"WEBP")){re=3;break e}var ge=Ee(i,ee[0]+4);if(12>ge||4294967286<ge){re=3;break e}if(M&&ge>me[0]-8){re=7;break e}re[0]=ge,ee[0]+=12,me[0]-=12}re=0}if(re!=0)return re;for(ge=0<J.gb[0],h=h[0];;){e:{var ve=i;me=o,re=h;var je=T,Le=G,Ve=ee=[0];if((ze=ie=[ie])[0]=0,8>re[0])re=7;else{if(!e(ve,me[0],"VP8X")){if(Ee(ve,me[0]+4)!=10){re=3;break e}if(18>re[0]){re=7;break e}var Me=Ee(ve,me[0]+8),pt=1+ue(ve,me[0]+12);if(2147483648<=pt*(ve=1+ue(ve,me[0]+15))){re=3;break e}Ve!=null&&(Ve[0]=Me),je!=null&&(je[0]=pt),Le!=null&&(Le[0]=ve),me[0]+=18,re[0]-=18,ze[0]=1}re=0}}if(ie=ie[0],ee=ee[0],re!=0)return re;if(me=!!(2&ee),!ge&&ie)return 3;if(x!=null&&(x[0]=!!(16&ee)),N!=null&&(N[0]=me),L!=null&&(L[0]=0),N=T[0],ee=G[0],ie&&me&&P==null){re=0;break}if(4>h){re=7;break}if(ge&&ie||!ge&&!ie&&!e(i,o[0],"ALPH")){h=[h],J.na=[J.na],J.P=[J.P],J.Sa=[J.Sa];e:{Me=i,re=o,ge=h;var ze=J.gb;je=J.na,Le=J.P,Ve=J.Sa,pt=22,t(Me!=null),t(ge!=null),ve=re[0];var xt=ge[0];for(t(je!=null),t(Ve!=null),je[0]=null,Le[0]=null,Ve[0]=0;;){if(re[0]=ve,ge[0]=xt,8>xt){re=7;break e}var mn=Ee(Me,ve+4);if(4294967286<mn){re=3;break e}var mt=8+mn+1&-2;if(pt+=mt,0<ze&&pt>ze){re=3;break e}if(!e(Me,ve,"VP8 ")||!e(Me,ve,"VP8L")){re=0;break e}if(xt[0]<mt){re=7;break e}e(Me,ve,"ALPH")||(je[0]=Me,Le[0]=ve+8,Ve[0]=mn),ve+=mt,xt-=mt}}if(h=h[0],J.na=J.na[0],J.P=J.P[0],J.Sa=J.Sa[0],re!=0)break}h=[h],J.Ja=[J.Ja],J.xa=[J.xa];e:if(ze=i,re=o,ge=h,je=J.gb[0],Le=J.Ja,Ve=J.xa,Me=re[0],ve=!e(ze,Me,"VP8 "),pt=!e(ze,Me,"VP8L"),t(ze!=null),t(ge!=null),t(Le!=null),t(Ve!=null),8>ge[0])re=7;else{if(ve||pt){if(ze=Ee(ze,Me+4),12<=je&&ze>je-12){re=3;break e}if(M&&ze>ge[0]-8){re=7;break e}Le[0]=ze,re[0]+=8,ge[0]-=8,Ve[0]=pt}else Ve[0]=5<=ge[0]&&ze[Me+0]==47&&!(ze[Me+4]>>5),Le[0]=ge[0];re=0}if(h=h[0],J.Ja=J.Ja[0],J.xa=J.xa[0],o=o[0],re!=0)break;if(4294967286<J.Ja)return 3;if(L==null||me||(L[0]=J.xa?2:1),N=[N],ee=[ee],J.xa){if(5>h){re=7;break}L=N,M=ee,me=x,i==null||5>h?i=0:5<=h&&i[o+0]==47&&!(i[o+4]>>5)?(ge=[0],ze=[0],je=[0],de(Le=new D,i,o,h),Yn(Le,ge,ze,je)?(L!=null&&(L[0]=ge[0]),M!=null&&(M[0]=ze[0]),me!=null&&(me[0]=je[0]),i=1):i=0):i=0}else{if(10>h){re=7;break}L=ee,i==null||10>h||!Zr(i,o+3,h-3)?i=0:(M=i[o+0]|i[o+1]<<8|i[o+2]<<16,me=16383&(i[o+7]<<8|i[o+6]),i=16383&(i[o+9]<<8|i[o+8]),1&M||3<(M>>1&7)||!(M>>4&1)||M>>5>=J.Ja||!me||!i?i=0:(N&&(N[0]=me),L&&(L[0]=i),i=1))}if(!i||(N=N[0],ee=ee[0],ie&&(T[0]!=N||G[0]!=ee)))return 3;P!=null&&(P[0]=J,P.offset=o-P.w,t(4294967286>o-P.w),t(P.offset==P.ha-h));break}return re==0||re==7&&ie&&P==null?(x!=null&&(x[0]|=J.na!=null&&0<J.na.length),g!=null&&(g[0]=N),y!=null&&(y[0]=ee),0):re}function br(i,o,h){var g=o.width,y=o.height,x=0,N=0,L=g,P=y;if(o.Da=i!=null&&0<i.Da,o.Da&&(L=i.cd,P=i.bd,x=i.v,N=i.j,11>h||(x&=-2,N&=-2),0>x||0>N||0>=L||0>=P||x+L>g||N+P>y))return 0;if(o.v=x,o.j=N,o.va=x+L,o.o=N+P,o.U=L,o.T=P,o.da=i!=null&&0<i.da,o.da){if(!Ue(L,P,h=[i.ib],x=[i.hb]))return 0;o.ib=h[0],o.hb=x[0]}return o.ob=i!=null&&i.ob,o.Kb=i==null||!i.Sd,o.da&&(o.ob=o.ib<3*g/4&&o.hb<3*y/4,o.Kb=0),1}function Yi(i){if(i==null)return 2;if(11>i.S){var o=i.f.RGBA;o.fb+=(i.height-1)*o.A,o.A=-o.A}else o=i.f.kb,i=i.height,o.O+=(i-1)*o.fa,o.fa=-o.fa,o.N+=(i-1>>1)*o.Ab,o.Ab=-o.Ab,o.W+=(i-1>>1)*o.Db,o.Db=-o.Db,o.F!=null&&(o.J+=(i-1)*o.lb,o.lb=-o.lb);return 0}function ts(i,o,h,g){if(g==null||0>=i||0>=o)return 2;if(h!=null){if(h.Da){var y=h.cd,x=h.bd,N=-2&h.v,L=-2&h.j;if(0>N||0>L||0>=y||0>=x||N+y>i||L+x>o)return 2;i=y,o=x}if(h.da){if(!Ue(i,o,y=[h.ib],x=[h.hb]))return 2;i=y[0],o=x[0]}}g.width=i,g.height=o;e:{var P=g.width,T=g.height;if(i=g.S,0>=P||0>=T||!(i>=Cs&&13>i))i=2;else{if(0>=g.Rd&&g.sd==null){N=x=y=o=0;var G=(L=P*rc[i])*T;if(11>i||(x=(T+1)/2*(o=(P+1)/2),i==12&&(N=(y=P)*T)),(T=a(G+2*x+N))==null){i=1;break e}g.sd=T,11>i?((P=g.f.RGBA).eb=T,P.fb=0,P.A=L,P.size=G):((P=g.f.kb).y=T,P.O=0,P.fa=L,P.Fd=G,P.f=T,P.N=0+G,P.Ab=o,P.Cd=x,P.ea=T,P.W=0+G+x,P.Db=o,P.Ed=x,i==12&&(P.F=T,P.J=0+G+2*x),P.Tc=N,P.lb=y)}if(o=1,y=g.S,x=g.width,N=g.height,y>=Cs&&13>y)if(11>y)i=g.f.RGBA,o&=(L=Math.abs(i.A))*(N-1)+x<=i.size,o&=L>=x*rc[y],o&=i.eb!=null;else{i=g.f.kb,L=(x+1)/2,G=(N+1)/2,P=Math.abs(i.fa),T=Math.abs(i.Ab);var ie=Math.abs(i.Db),M=Math.abs(i.lb),J=M*(N-1)+x;o&=P*(N-1)+x<=i.Fd,o&=T*(G-1)+L<=i.Cd,o=(o&=ie*(G-1)+L<=i.Ed)&P>=x&T>=L&ie>=L,o&=i.y!=null,o&=i.f!=null,o&=i.ea!=null,y==12&&(o&=M>=x,o&=J<=i.Tc,o&=i.F!=null)}else o=0;i=o?0:2}}return i!=0||h!=null&&h.fd&&(i=Yi(g)),i}var ya=64,$i=[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],ns=24,Hn=32,Qn=8,xa=[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];Fe("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(i){return i},R.Predictor2=function(i,o,h){return o[h+0]},R.Predictor3=function(i,o,h){return o[h+1]},R.Predictor4=function(i,o,h){return o[h-1]},R.Predictor5=function(i,o,h){return $e($e(i,o[h+1]),o[h+0])},R.Predictor6=function(i,o,h){return $e(i,o[h-1])},R.Predictor7=function(i,o,h){return $e(i,o[h+0])},R.Predictor8=function(i,o,h){return $e(o[h-1],o[h+0])},R.Predictor9=function(i,o,h){return $e(o[h+0],o[h+1])},R.Predictor10=function(i,o,h){return $e($e(i,o[h-1]),$e(o[h+0],o[h+1]))},R.Predictor11=function(i,o,h){var g=o[h+0];return 0>=rt(g>>24&255,i>>24&255,(o=o[h-1])>>24&255)+rt(g>>16&255,i>>16&255,o>>16&255)+rt(g>>8&255,i>>8&255,o>>8&255)+rt(255&g,255&i,255&o)?g:i},R.Predictor12=function(i,o,h){var g=o[h+0];return(wt((i>>24&255)+(g>>24&255)-((o=o[h-1])>>24&255))<<24|wt((i>>16&255)+(g>>16&255)-(o>>16&255))<<16|wt((i>>8&255)+(g>>8&255)-(o>>8&255))<<8|wt((255&i)+(255&g)-(255&o)))>>>0},R.Predictor13=function(i,o,h){var g=o[h-1];return(ht((i=$e(i,o[h+0]))>>24&255,g>>24&255)<<24|ht(i>>16&255,g>>16&255)<<16|ht(i>>8&255,g>>8&255)<<8|ht(255&i,255&g))>>>0};var xi=R.PredictorAdd0;R.PredictorAdd1=bt,Fe("Predictor2","PredictorAdd2"),Fe("Predictor3","PredictorAdd3"),Fe("Predictor4","PredictorAdd4"),Fe("Predictor5","PredictorAdd5"),Fe("Predictor6","PredictorAdd6"),Fe("Predictor7","PredictorAdd7"),Fe("Predictor8","PredictorAdd8"),Fe("Predictor9","PredictorAdd9"),Fe("Predictor10","PredictorAdd10"),Fe("Predictor11","PredictorAdd11"),Fe("Predictor12","PredictorAdd12"),Fe("Predictor13","PredictorAdd13");var wi=R.PredictorAdd2;We("ColorIndexInverseTransform","MapARGB","32b",function(i){return i>>8&255},function(i){return i}),We("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(i){return i},function(i){return i>>8&255});var wa,Ki=R.ColorIndexInverseTransform,fn=R.MapARGB,xo=R.VP8LColorIndexInverseTransformAlpha,zr=R.MapAlpha,Ar=R.VP8LPredictorsAdd=[];Ar.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var Ji,rs,is,Na,Xi,Zi,Ni,ii,Ai,Aa,jn,Hr,Dt,Ot,rn,pn,ai,as,_a,Ps,Tl,Ml,Dl,Ol,ss,Rl,Bl,ql,Ul=a(511),zl=a(2041),Hl=a(225),Wl=a(767),Vl=0,wo=zl,js=Hl,sr=Wl,vr=Ul,Cs=0,Es=1,Gl=2,Is=3,Fs=4,No=5,Yl=6,Ao=7,_o=8,Ts=9,Lo=10,qf=[2,3,7],Uf=[3,3,11],$l=[280,256,256,256,40],zf=[0,1,1,1,0],Hf=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Wf=[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],Vf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Gf=8,So=[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],ko=[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],os=null,Yf=[[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]],$f=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Kl=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Kf=[[[[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,25
1295,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]]]],Jf=[[[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,25
1295,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]]],Xf=[[[[255,255,255,255,255,255,255,255,255,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,25
vendor: 23,695 bytes, lines 129-153
1295,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]]]],Zf=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],_i=[],_r=[],si=[],Qf=1,Jl=2,Li=[],yr=[];kn("UpsampleRgbLinePair",Wi,3),kn("UpsampleBgrLinePair",ga,3),kn("UpsampleRgbaLinePair",es,4),kn("UpsampleBgraLinePair",Gi,4),kn("UpsampleArgbLinePair",Vi,4),kn("UpsampleRgba4444LinePair",Pn,2),kn("UpsampleRgb565LinePair",ba,2);var eh=R.UpsampleRgbLinePair,th=R.UpsampleBgrLinePair,Xl=R.UpsampleRgbaLinePair,Zl=R.UpsampleBgraLinePair,Ql=R.UpsampleArgbLinePair,ec=R.UpsampleRgba4444LinePair,nh=R.UpsampleRgb565LinePair,Ms=16,Ds=1<<Ms-1,ls=-227,Po=482,rh=6,tc=0,ih=a(256),ah=a(256),sh=a(256),oh=a(256),lh=a(Po-ls),ch=a(Po-ls);Ur("YuvToRgbRow",Wi,3),Ur("YuvToBgrRow",ga,3),Ur("YuvToRgbaRow",es,4),Ur("YuvToBgraRow",Gi,4),Ur("YuvToArgbRow",Vi,4),Ur("YuvToRgba4444Row",Pn,2),Ur("YuvToRgb565Row",ba,2);var nc=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Os=[0,2,8],uh=[8,7,6,4,4,2,2,2,1,1,1,1],fh=1;this.WebPDecodeRGBA=function(i,o,h,g,y){var x=Es,N=new z,L=new dt;N.ba=L,L.S=x,L.width=[L.width],L.height=[L.height];var P=L.width,T=L.height,G=new Qe;if(G==null||i==null)var ie=2;else t(G!=null),ie=ks(i,o,h,G.width,G.height,G.Pd,G.Qd,G.format,null);if(ie!=0?P=0:(P!=null&&(P[0]=G.width[0]),T!=null&&(T[0]=G.height[0]),P=1),P){L.width=L.width[0],L.height=L.height[0],g!=null&&(g[0]=L.width),y!=null&&(y[0]=L.height);e:{if(g=new gi,(y=new X).data=i,y.w=o,y.ha=h,y.kd=1,o=[0],t(y!=null),((i=ks(y.data,y.w,y.ha,null,null,null,o,null,y))==0||i==7)&&o[0]&&(i=4),(o=i)==0){if(t(N!=null),g.data=y.data,g.w=y.w+y.offset,g.ha=y.ha-y.offset,g.put=Xe,g.ac=rr,g.bc=Mn,g.ma=N,y.xa){if((i=Ir())==null){N=1;break e}if(function(M,J){var ee=[0],me=[0],re=[0];t:for(;;){if(M==null)return 0;if(J==null)return M.a=2,0;if(M.l=J,M.a=0,de(M.m,J.data,J.w,J.ha),!Yn(M.m,ee,me,re)){M.a=3;break t}if(M.xb=Jl,J.width=ee[0],J.height=me[0],!Jn(ee[0],me[0],1,M,null))break t;return 1}return t(M.a!=0),0}(i,g)){if(g=(o=ts(g.width,g.height,N.Oa,N.ba))==0){t:{g=i;n:for(;;){if(g==null){g=0;break t}if(t(g.s.yc!=null),t(g.s.Ya!=null),t(0<g.s.Wb),t((h=g.l)!=null),t((y=h.ma)!=null),g.xb!=0){if(g.ca=y.ba,g.tb=y.tb,t(g.ca!=null),!br(y.Oa,h,Is)){g.a=2;break n}if(!Xn(g,h.width)||h.da)break n;if((h.da||et(g.ca.S))&&Jt(),11>g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&Jt()),g.Pb&&0<g.s.ua&&g.s.vb.X==null&&!j(g.s.vb,g.s.Wa.Xa)){g.a=1;break n}g.xb=0}if(!Kn(g,g.V,g.Ba,g.c,g.i,h.o,wn))break n;y.Dc=g.Ma,g=1;break t}t(g.a!=0),g=0}g=!g}g&&(o=i.a)}else o=i.a}else{if((i=new Di)==null){N=1;break e}if(i.Fa=y.na,i.P=y.P,i.qc=y.Sa,qn(i,g)){if((o=ts(g.width,g.height,N.Oa,N.ba))==0){if(i.Aa=0,h=N.Oa,t((y=i)!=null),h!=null){if(0<(P=0>(P=h.Md)?0:100<P?255:255*P/100)){for(T=G=0;4>T;++T)12>(ie=y.pb[T]).lc&&(ie.ia=P*uh[0>ie.lc?0:ie.lc]>>3),G|=ie.ia;G&&(alert("todo:VP8InitRandom"),y.ia=1)}y.Ga=h.Id,100<y.Ga?y.Ga=100:0>y.Ga&&(y.Ga=0)}(function(M,J){if(M==null)return 0;if(J==null)return Yt(M,2,"NULL VP8Io parameter in VP8Decode().");if(!M.cb&&!qn(M,J))return 0;if(t(M.cb),J.ac==null||J.ac(J)){J.ob&&(M.L=0);var ee=Os[M.L];if(M.L==2?(M.yb=0,M.zb=0):(M.yb=J.v-ee>>4,M.zb=J.j-ee>>4,0>M.yb&&(M.yb=0),0>M.zb&&(M.zb=0)),M.Va=J.o+15+ee>>4,M.Hb=J.va+15+ee>>4,M.Hb>M.za&&(M.Hb=M.za),M.Va>M.Ub&&(M.Va=M.Ub),0<M.L){var me=M.ed;for(ee=0;4>ee;++ee){var re;if(M.Qa.Cb){var ge=M.Qa.Lb[ee];M.Qa.Fb||(ge+=me.Tb)}else ge=me.Tb;for(re=0;1>=re;++re){var ve=M.gd[ee][re],je=ge;if(me.Pc&&(je+=me.vd[0],re&&(je+=me.od[0])),0<(je=0>je?0:63<je?63:je)){var Le=je;0<me.wb&&(Le=4<me.wb?Le>>2:Le>>1)>9-me.wb&&(Le=9-me.wb),1>Le&&(Le=1),ve.dd=Le,ve.tc=2*je+Le,ve.ld=40<=je?2:15<=je?1:0}else ve.tc=0;ve.La=re}}}ee=0}else Yt(M,6,"Frame setup failed"),ee=M.a;if(ee=ee==0){if(ee){M.$c=0,0<M.Aa||(M.Ic=fh);t:{ee=M.Ic,me=4*(Le=M.za);var Ve=32*Le,Me=Le+1,pt=0<M.L?Le*(0<M.Aa?2:1):0,ze=(M.Aa==2?2:1)*Le;if((ve=me+832+(re=3*(16*ee+Os[M.L])/2*Ve)+(ge=M.Fa!=null&&0<M.Fa.length?M.Kc.c*M.Kc.i:0))!=ve)ee=0;else{if(ve>M.Vb){if(M.Vb=0,M.Ec=a(ve),M.Fc=0,M.Ec==null){ee=Yt(M,1,"no memory during frame initialization.");break t}M.Vb=ve}ve=M.Ec,je=M.Fc,M.Ac=ve,M.Bc=je,je+=me,M.Gd=f(Ve,Tr),M.Hd=0,M.rb=f(Me+1,mr),M.sb=1,M.wa=pt?f(pt,Zn):null,M.Y=0,M.D.Nb=0,M.D.wa=M.wa,M.D.Y=M.Y,0<M.Aa&&(M.D.Y+=Le),t(!0),M.oc=ve,M.pc=je,je+=832,M.ya=f(ze,Xr),M.aa=0,M.D.ya=M.ya,M.D.aa=M.aa,M.Aa==2&&(M.D.aa+=Le),M.R=16*Le,M.B=8*Le,Le=(Ve=Os[M.L])*M.R,Ve=Ve/2*M.B,M.sa=ve,M.ta=je+Le,M.qa=M.sa,M.ra=M.ta+16*ee*M.R+Ve,M.Ha=M.qa,M.Ia=M.ra+8*ee*M.B+Ve,M.$c=0,je+=re,M.mb=ge?ve:null,M.nb=ge?je:null,t(je+ge<=M.Fc+M.Vb),Dr(M),s(M.Ac,M.Bc,0,me),ee=1}}if(ee){if(J.ka=0,J.y=M.sa,J.O=M.ta,J.f=M.qa,J.N=M.ra,J.ea=M.Ha,J.Vd=M.Ia,J.fa=M.R,J.Rc=M.B,J.F=null,J.J=0,!Vl){for(ee=-255;255>=ee;++ee)Ul[255+ee]=0>ee?-ee:ee;for(ee=-1020;1020>=ee;++ee)zl[1020+ee]=-128>ee?-128:127<ee?127:ee;for(ee=-112;112>=ee;++ee)Hl[112+ee]=-16>ee?-16:15<ee?15:ee;for(ee=-255;510>=ee;++ee)Wl[255+ee]=0>ee?0:255<ee?255:ee;Vl=1}Ni=fa,ii=Ua,Aa=za,jn=Ha,Hr=Sn,Ai=ua,Dt=Ns,Ot=As,rn=Ls,pn=c,ai=_s,as=Ui,_a=v,Ps=F,Tl=pa,Ml=Za,Dl=ma,Ol=ws,_r[0]=at,_r[1]=bi,_r[2]=Te,_r[3]=Ze,_r[4]=Ut,_r[5]=$t,_r[6]=yn,_r[7]=nn,_r[8]=Br,_r[9]=Ri,_i[0]=ha,_i[1]=Wa,_i[2]=Va,_i[3]=Ga,_i[4]=Rr,_i[5]=Ya,_i[6]=ae,si[0]=vo,si[1]=Oi,si[2]=Bi,si[3]=$a,si[4]=yo,si[5]=da,si[6]=Ka,ee=1}else ee=0}ee&&(ee=function(xt,mn){for(xt.M=0;xt.M<xt.Va;++xt.M){var mt,He=xt.Jc[xt.M&xt.Xb],Ce=xt.m,an=xt;for(mt=0;mt<an.za;++mt){var ft=Ce,At=an,Ht=At.Ac,Nn=At.Bc+4*mt,Wn=At.zc,Xt=At.ya[At.aa+mt];if(At.Qa.Bb?Xt.$b=be(ft,At.Pa.jb[0])?2+be(ft,At.Pa.jb[2]):be(ft,At.Pa.jb[1]):Xt.$b=0,At.kc&&(Xt.Ad=be(ft,At.Bd)),Xt.Za=!be(ft,145)+0,Xt.Za){var Cn=Xt.Ob,Vn=0;for(At=0;4>At;++At){var gn,_t=Wn[0+At];for(gn=0;4>gn;++gn){_t=Jf[Ht[Nn+gn]][_t];for(var St=Kl[be(ft,_t[0])];0<St;)St=Kl[2*St+be(ft,_t[St])];_t=-St,Ht[Nn+gn]=_t}r(Cn,Vn,Ht,Nn,4),Vn+=4,Wn[0+At]=_t}}else _t=be(ft,156)?be(ft,128)?1:3:be(ft,163)?2:0,Xt.Ob[0]=_t,s(Ht,Nn,_t,4),s(Wn,0,_t,4);Xt.Dd=be(ft,142)?be(ft,114)?be(ft,183)?1:3:2:0}if(an.m.Ka)return Yt(xt,7,"Premature end-of-partition0 encountered.");for(;xt.ja<xt.za;++xt.ja){if(an=He,ft=(Ce=xt).rb[Ce.sb-1],Ht=Ce.rb[Ce.sb+Ce.ja],mt=Ce.ya[Ce.aa+Ce.ja],Nn=Ce.kc?mt.Ad:0)ft.la=Ht.la=0,mt.Za||(ft.Na=Ht.Na=0),mt.Hc=0,mt.Gc=0,mt.ia=0;else{var Zt,kt;if(ft=Ht,Ht=an,Nn=Ce.Pa.Xc,Wn=Ce.ya[Ce.aa+Ce.ja],Xt=Ce.pb[Wn.$b],At=Wn.ad,Cn=0,Vn=Ce.rb[Ce.sb-1],_t=gn=0,s(At,Cn,0,384),Wn.Za)var An=0,Lr=Nn[3];else{St=a(16);var sn=ft.Na+Vn.Na;if(sn=os(Ht,Nn[1],sn,Xt.Eb,0,St,0),ft.Na=Vn.Na=(0<sn)+0,1<sn)Ni(St,0,At,Cn);else{var er=St[0]+3>>3;for(St=0;256>St;St+=16)At[Cn+St]=er}An=1,Lr=Nn[0]}var Tt=15&ft.la,bn=15&Vn.la;for(St=0;4>St;++St){var or=1&bn;for(er=kt=0;4>er;++er)Tt=Tt>>1|(or=(sn=os(Ht,Lr,sn=or+(1&Tt),Xt.Sc,An,At,Cn))>An)<<7,kt=kt<<2|(3<sn?3:1<sn?2:At[Cn+0]!=0),Cn+=16;Tt>>=4,bn=bn>>1|or<<7,gn=(gn<<8|kt)>>>0}for(Lr=Tt,An=bn>>4,Zt=0;4>Zt;Zt+=2){for(kt=0,Tt=ft.la>>4+Zt,bn=Vn.la>>4+Zt,St=0;2>St;++St){for(or=1&bn,er=0;2>er;++er)sn=or+(1&Tt),Tt=Tt>>1|(or=0<(sn=os(Ht,Nn[2],sn,Xt.Qc,0,At,Cn)))<<3,kt=kt<<2|(3<sn?3:1<sn?2:At[Cn+0]!=0),Cn+=16;Tt>>=2,bn=bn>>1|or<<5}_t|=kt<<4*Zt,Lr|=Tt<<4<<Zt,An|=(240&bn)<<Zt}ft.la=Lr,Vn.la=An,Wn.Hc=gn,Wn.Gc=_t,Wn.ia=43690&_t?0:Xt.ia,Nn=!(gn|_t)}if(0<Ce.L&&(Ce.wa[Ce.Y+Ce.ja]=Ce.gd[mt.$b][mt.Za],Ce.wa[Ce.Y+Ce.ja].La|=!Nn),an.Ka)return Yt(xt,7,"Premature end-of-file encountered.")}if(Dr(xt),Ce=mn,an=1,mt=(He=xt).D,ft=0<He.L&&He.M>=He.zb&&He.M<=He.Va,He.Aa==0)t:{if(mt.M=He.M,mt.uc=ft,va(He,mt),an=1,mt=(kt=He.D).Nb,ft=(_t=Os[He.L])*He.R,Ht=_t/2*He.B,St=16*mt*He.R,er=8*mt*He.B,Nn=He.sa,Wn=He.ta-ft+St,Xt=He.qa,At=He.ra-Ht+er,Cn=He.Ha,Vn=He.Ia-Ht+er,bn=(Tt=kt.M)==0,gn=Tt>=He.Va-1,He.Aa==2&&va(He,kt),kt.uc)for(or=(sn=He).D.M,t(sn.D.uc),kt=sn.yb;kt<sn.Hb;++kt){An=kt,Lr=or;var Gn=(lr=(_n=sn).D).Nb;Zt=_n.R;var lr=lr.wa[lr.Y+An],cr=_n.sa,tr=_n.ta+16*Gn*Zt+16*An,ur=lr.dd,Rt=lr.tc;if(Rt!=0)if(t(3<=Rt),_n.L==1)0<An&&Ml(cr,tr,Zt,Rt+4),lr.La&&Ol(cr,tr,Zt,Rt),0<Lr&&Tl(cr,tr,Zt,Rt+4),lr.La&&Dl(cr,tr,Zt,Rt);else{var fr=_n.B,Sr=_n.qa,Qi=_n.ra+8*Gn*fr+8*An,oi=_n.Ha,_n=_n.Ia+8*Gn*fr+8*An;Gn=lr.ld,0<An&&(Ot(cr,tr,Zt,Rt+4,ur,Gn),pn(Sr,Qi,oi,_n,fr,Rt+4,ur,Gn)),lr.La&&(as(cr,tr,Zt,Rt,ur,Gn),Ps(Sr,Qi,oi,_n,fr,Rt,ur,Gn)),0<Lr&&(Dt(cr,tr,Zt,Rt+4,ur,Gn),rn(Sr,Qi,oi,_n,fr,Rt+4,ur,Gn)),lr.La&&(ai(cr,tr,Zt,Rt,ur,Gn),_a(Sr,Qi,oi,_n,fr,Rt,ur,Gn))}}if(He.ia&&alert("todo:DitherRow"),Ce.put!=null){if(kt=16*Tt,Tt=16*(Tt+1),bn?(Ce.y=He.sa,Ce.O=He.ta+St,Ce.f=He.qa,Ce.N=He.ra+er,Ce.ea=He.Ha,Ce.W=He.Ia+er):(kt-=_t,Ce.y=Nn,Ce.O=Wn,Ce.f=Xt,Ce.N=At,Ce.ea=Cn,Ce.W=Vn),gn||(Tt-=_t),Tt>Ce.o&&(Tt=Ce.o),Ce.F=null,Ce.J=null,He.Fa!=null&&0<He.Fa.length&&kt<Tt&&(Ce.J=un(He,Ce,kt,Tt-kt),Ce.F=He.mb,Ce.F==null&&Ce.F.length==0)){an=Yt(He,3,"Could not decode alpha data.");break t}kt<Ce.j&&(_t=Ce.j-kt,kt=Ce.j,t(!(1&_t)),Ce.O+=He.R*_t,Ce.N+=He.B*(_t>>1),Ce.W+=He.B*(_t>>1),Ce.F!=null&&(Ce.J+=Ce.width*_t)),kt<Tt&&(Ce.O+=Ce.v,Ce.N+=Ce.v>>1,Ce.W+=Ce.v>>1,Ce.F!=null&&(Ce.J+=Ce.v),Ce.ka=kt-Ce.j,Ce.U=Ce.va-Ce.v,Ce.T=Tt-kt,an=Ce.put(Ce))}mt+1!=He.Ic||gn||(r(He.sa,He.ta-ft,Nn,Wn+16*He.R,ft),r(He.qa,He.ra-Ht,Xt,At+8*He.B,Ht),r(He.Ha,He.Ia-Ht,Cn,Vn+8*He.B,Ht))}if(!an)return Yt(xt,6,"Output aborted.")}return 1}(M,J)),J.bc!=null&&J.bc(J),ee&=1}return ee?(M.cb=0,ee):0})(i,g)||(o=i.a)}}else o=i.a}o==0&&N.Oa!=null&&N.Oa.fd&&(o=Yi(N.ba))}N=o}x=N!=0?null:11>x?L.f.RGBA.eb:L.f.kb.y}else x=null;return x};var rc=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(R,Z){for(var _="",I=0;I<4;I++)_+=String.fromCharCode(R[Z++]);return _}function m(R,Z){return R[Z+0]|R[Z+1]<<8}function w(R,Z){return(R[Z+0]|R[Z+1]<<8|R[Z+2]<<16)>>>0}function S(R,Z){return(R[Z+0]|R[Z+1]<<8|R[Z+2]<<16|R[Z+3]<<24)>>>0}new u;var p=[0],C=[0],E=[],O=new u,k=n,Y=function(R,Z){var _={},I=0,H=!1,U=0,se=0;if(_.frames=[],!function(A,D){for(var B=0;B<4;B++)if(A[D+B]!="RIFF".charCodeAt(B))return!0;return!1}(R,Z)){for(S(R,Z+=4),Z+=8;Z<R.length;){var le=d(R,Z),he=S(R,Z+=4);Z+=4;var te=he+(1&he);switch(le){case"VP8 ":case"VP8L":_.frames[I]===void 0&&(_.frames[I]={}),(we=_.frames[I]).src_off=H?se:Z-8,we.src_size=U+he+8,I++,H&&(H=!1,U=0,se=0);break;case"VP8X":(we=_.header={}).feature_flags=R[Z];var de=Z+4;we.canvas_width=1+w(R,de),de+=3,we.canvas_height=1+w(R,de),de+=3;break;case"ALPH":H=!0,U=te+8,se=Z-8;break;case"ANIM":(we=_.header).bgcolor=S(R,Z),de=Z+4,we.loop_count=m(R,de),de+=2;break;case"ANMF":var ke,we;(we=_.frames[I]={}).offset_x=2*w(R,Z),Z+=3,we.offset_y=2*w(R,Z),Z+=3,we.width=1+w(R,Z),Z+=3,we.height=1+w(R,Z),Z+=3,we.duration=w(R,Z),Z+=3,ke=R[Z++],we.dispose=1&ke,we.blend=ke>>1&1}le!="ANMF"&&(Z+=te)}return _}}(k,0);Y.response=k,Y.rgbaoutput=!0,Y.dataurl=!1;var V=Y.header?Y.header:null,q=Y.frames?Y.frames:null;if(V){V.loop_counter=V.loop_count,p=[V.canvas_height],C=[V.canvas_width];for(var oe=0;oe<q.length&&q[oe].blend!=0;oe++);}var ye=q[0],ne=O.WebPDecodeRGBA(k,ye.src_off,ye.src_size,C,p);ye.rgba=ne,ye.imgwidth=C[0],ye.imgheight=p[0];for(var K=0;K<C[0]*p[0]*4;K++)E[K]=ne[K];return this.width=C,this.height=p,this.data=E,this}/** ==================================================================== 130 * @license 131 * jsPDF XMP metadata plugin 132 * Copyright (c) 2016 Jussi Utunen, [email protected] 133 * 134 * Permission is hereby granted, free of charge, to any person obtaining 135 * a copy of this software and associated documentation files (the 136 * "Software"), to deal in the Software without restriction, including 137 * without limitation the rights to use, copy, modify, merge, publish, 138 * distribute, sublicense, and/or sell copies of the Software, and to 139 * permit persons to whom the Software is furnished to do so, subject to 140 * the following conditions: 141 * 142 * The above copyright notice and this permission notice shall be 143 * included in all copies or substantial portions of the Software. 144 * 145 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 146 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 147 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 148 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 149 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 150 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 151 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 152 * ==================================================================== 153 */function q2(){var n,t=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(t));n=this.internal.__metadata__.rawXml?e:'<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>'+e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function U2(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var t,e,r,s,a,f,l,u,d,m=function(A){return A=A||{},this.isStrokeTransparent=A.isStrokeTransparent||!1,this.strokeOpacity=A.strokeOpacity||1,this.strokeStyle=A.strokeStyle||"#000000",this.fillStyle=A.fillStyle||"#000000",this.isFillTransparent=A.isFillTransparent||!1,this.fillOpacity=A.fillOpacity||1,this.font=A.font||"10px sans-serif",this.textBaseline=A.textBaseline||"alphabetic",this.textAlign=A.textAlign||"left",this.lineWidth=A.lineWidth||1,this.lineJoin=A.lineJoin||"miter",this.lineCap=A.lineCap||"butt",this.path=A.path||[],this.transform=A.transform!==void 0?A.transform.clone():new u,this.globalCompositeOperation=A.globalCompositeOperation||"normal",this.globalAlpha=A.globalAlpha||1,this.clip_path=A.clip_path||[],this.currentPoint=A.currentPoint||new f,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new f,this.lineDashOffset=A.lineDashOffset||0,this.lineDash=A.lineDash||[],this.margin=A.margin||[0,0,0,0],this.prevPageLastElemOffset=A.prevPageLastElemOffset||0,this.ignoreClearRect=typeof A.ignoreClearRect!="boolean"||A.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new w(this),t=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,s=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,f=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,d=new m}]);var w=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var D=A;Object.defineProperty(this,"pdf",{get:function(){return D}});var B=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return B},set:function(j){B=!!j}});var W=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return W},set:function(j){W=!!j}});var $=0;Object.defineProperty(this,"posX",{get:function(){return $},set:function(j){isNaN(j)||($=j)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(j){isNaN(j)||(Q=j)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(j){var Se;typeof j=="number"?Se=[j,j,j,j]:((Se=new Array(4))[0]=j[0],Se[1]=j.length>=2?j[1]:Se[0],Se[2]=j.length>=3?j[2]:Se[0],Se[3]=j.length>=4?j[3]:Se[1]),d.margin=Se}});var ce=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ce},set:function(j){ce=j}});var fe=0;Object.defineProperty(this,"lastBreak",{get:function(){return fe},set:function(j){fe=j}});var be=[];Object.defineProperty(this,"pageBreaks",{get:function(){return be},set:function(j){be=j}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(j){j instanceof m&&(d=j)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(j){d.path=j}});var Pe=[];Object.defineProperty(this,"ctxStack",{get:function(){return Pe},set:function(j){Pe=j}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(j){var Se;Se=S(j),this.ctx.fillStyle=Se.style,this.ctx.isFillTransparent=Se.a===0,this.ctx.fillOpacity=Se.a,this.pdf.setFillColor(Se.r,Se.g,Se.b,{a:Se.a}),this.pdf.setTextColor(Se.r,Se.g,Se.b,{a:Se.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(j){var Se=S(j);this.ctx.strokeStyle=Se.style,this.ctx.isStrokeTransparent=Se.a===0,this.ctx.strokeOpacity=Se.a,Se.a===0?this.pdf.setDrawColor(255,255,255):(Se.a,this.pdf.setDrawColor(Se.r,Se.g,Se.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(j){["butt","round","square"].indexOf(j)!==-1&&(this.ctx.lineCap=j,this.pdf.setLineCap(j))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(j){isNaN(j)||(this.ctx.lineWidth=j,this.pdf.setLineWidth(j))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(j){["bevel","round","miter"].indexOf(j)!==-1&&(this.ctx.lineJoin=j,this.pdf.setLineJoin(j))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(j){isNaN(j)||(this.ctx.miterLimit=j,this.pdf.setMiterLimit(j))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(j){this.ctx.textBaseline=j}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(j){["right","end","center","left","start"].indexOf(j)!==-1&&(this.ctx.textAlign=j)}});var Ie=null,ue=null,Ee=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ee},set:function(j){Ie=null,ue=null,Ee=j}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(j){var Se;if(this.ctx.font=j,(Se=/^\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(j))!==null){var Ye=Se[1];Se[2];var Ue=Se[3],Ne=Se[4];Se[5];var Be=Se[6],Fe=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ne)[2];Ne=Math.floor(Fe==="px"?parseFloat(Ne)*this.pdf.internal.scaleFactor:Fe==="em"?parseFloat(Ne)*this.pdf.getFontSize():parseFloat(Ne)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ne);var Je=function(We){var Gt,vt,lt=[],tt=We.trim();if(tt==="")return il;if(tt in yu)return[yu[tt]];for(;tt!=="";){switch(vt=null,Gt=(tt=wu(tt)).charAt(0)){case'"':case"'":vt=T2(tt.substring(1),Gt);break;default:vt=M2(tt)}if(vt===null||(lt.push(vt[0]),(tt=wu(vt[1]))!==""&&tt.charAt(0)!==","))return il;tt=tt.replace(/^,/,"")}return lt}(Be);if(this.fontFaces){var $e=function(We,Gt){var vt=We.getFontList(),lt=JSON.stringify(vt);if(Ie===null||ue!==lt){var tt=function(Ct){var Ke=[];return Object.keys(Ct).forEach(function(Lt){Ct[Lt].forEach(function(et){var it=null;switch(et){case"bold":it={family:Lt,weight:"bold"};break;case"italic":it={family:Lt,style:"italic"};break;case"bolditalic":it={family:Lt,weight:"bold",style:"italic"};break;case"":case"normal":it={family:Lt}}it!==null&&(it.ref={name:Lt,style:et},Ke.push(it))})}),Ke}(vt);Ie=function(Ct){for(var Ke={},Lt=0;Lt<Ct.length;++Lt){var et=rl(Ct[Lt]),it=et.family,It=et.stretch,dt=et.style,Qe=et.weight;Ke[it]=Ke[it]||{},Ke[it][It]=Ke[it][It]||{},Ke[it][It][dt]=Ke[it][It][dt]||{},Ke[it][It][dt][Qe]=et}return Ke}(tt.concat(Gt)),ue=lt}return Ie}(this.pdf,this.fontFaces),wt=Je.map(function(We){return{family:We,stretch:"normal",weight:Ue,style:Ye}}),ht=function(We,Gt,vt){for(var lt=(vt=vt||{}).defaultFontFamily||"times",tt=Object.assign({},F2,vt.genericFontFamilies||{}),Ct=null,Ke=null,Lt=0;Lt<Gt.length;++Lt)if(tt[(Ct=rl(Gt[Lt])).family]&&(Ct.family=tt[Ct.family]),We.hasOwnProperty(Ct.family)){Ke=We[Ct.family];break}if(!(Ke=Ke||We[lt]))throw new Error("Could not find a font-family for the rule '"+xu(Ct)+"' and default family '"+lt+"'.");if(Ke=function(et,it){if(it[et])return it[et];var It=_l[et],dt=It<=_l.normal?-1:1,Qe=vu(it,jf,It,dt);if(!Qe)throw new Error("Could not find a matching font-stretch value for "+et);return Qe}(Ct.stretch,Ke),Ke=function(et,it){if(it[et])return it[et];for(var It=Pf[et],dt=0;dt<It.length;++dt)if(it[It[dt]])return it[It[dt]];throw new Error("Could not find a matching font-style for "+et)}(Ct.style,Ke),!(Ke=function(et,it){if(it[et])return it[et];if(et===400&&it[500])return it[500];if(et===500&&it[400])return it[400];var It=I2[et],dt=vu(it,Cf,It,et<400?-1:1);if(!dt)throw new Error("Could not find a matching font-weight for value "+et);return dt}(Ct.weight,Ke)))throw new Error("Failed to resolve a font for the rule '"+xu(Ct)+"'.");return Ke}($e,wt);this.pdf.setFont(ht.ref.name,ht.ref.style)}else{var rt="";(Ue==="bold"||parseInt(Ue,10)>=700||Ye==="bold")&&(rt="bold"),Ye==="italic"&&(rt+="italic"),rt.length===0&&(rt="normal");for(var bt="",gt={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"},De=0;De<Je.length;De++){if(this.pdf.internal.getFont(Je[De],rt,{noFallback:!0,disableWarning:!0})!==void 0){bt=Je[De];break}if(rt==="bolditalic"&&this.pdf.internal.getFont(Je[De],"bold",{noFallback:!0,disableWarning:!0})!==void 0)bt=Je[De],rt="bold";else if(this.pdf.internal.getFont(Je[De],"normal",{noFallback:!0,disableWarning:!0})!==void 0){bt=Je[De],rt="normal";break}}if(bt===""){for(var ot=0;ot<Je.length;ot++)if(gt[Je[ot]]){bt=gt[Je[ot]];break}}bt=bt===""?"Times":bt,this.pdf.setFont(bt,rt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(j){this.ctx.globalCompositeOperation=j}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(j){this.ctx.globalAlpha=j}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(j){this.ctx.lineDashOffset=j,we.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(j){this.ctx.lineDash=j,we.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(j){this.ctx.ignoreClearRect=!!j}})};w.prototype.setLineDash=function(A){this.lineDash=A},w.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},w.prototype.fill=function(){q.call(this,"fill",!1)},w.prototype.stroke=function(){q.call(this,"stroke",!1)},w.prototype.beginPath=function(){this.path=[{type:"begin"}]},w.prototype.moveTo=function(A,D){if(isNaN(A)||isNaN(D))throw Mt.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to
153jsPDF.context2d.moveTo");var B=this.ctx.transform.applyToPoint(new f(A,D));this.path.push({type:"mt",x:B.x,y:B.y}),this.ctx.lastPoint=new f(A,D)},w.prototype.closePath=function(){var A=new f(0,0),D=0;for(D=this.path.length-1;D!==-1;D--)if(this.path[D].type==="begin"&&jt(this.path[D+1])==="object"&&typeof this.path[D+1].x=="number"){A=new f(this.path[D+1].x,this.path[D+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new f(A.x,A.y)},w.prototype.lineTo=function(A,D){if(isNaN(A)||isNaN(D))throw Mt.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var B=this.ctx.transform.applyToPoint(new f(A,D));this.path.push({type:"lt",x:B.x,y:B.y}),this.ctx.lastPoint=new f(B.x,B.y)},w.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),q.call(this,null,!0)},w.prototype.quadraticCurveTo=function(A,D,B,W){if(isNaN(B)||isNaN(W)||isNaN(A)||isNaN(D))throw Mt.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var $=this.ctx.transform.applyToPoint(new f(B,W)),Q=this.ctx.transform.applyToPoint(new f(A,D));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:$.x,y:$.y}),this.ctx.lastPoint=new f($.x,$.y)},w.prototype.bezierCurveTo=function(A,D,B,W,$,Q){if(isNaN($)||isNaN(Q)||isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W))throw Mt.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ce=this.ctx.transform.applyToPoint(new f($,Q)),fe=this.ctx.transform.applyToPoint(new f(A,D)),be=this.ctx.transform.applyToPoint(new f(B,W));this.path.push({type:"bct",x1:fe.x,y1:fe.y,x2:be.x,y2:be.y,x:ce.x,y:ce.y}),this.ctx.lastPoint=new f(ce.x,ce.y)},w.prototype.arc=function(A,D,B,W,$,Q){if(isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W)||isNaN($))throw Mt.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var ce=this.ctx.transform.applyToPoint(new f(A,D));A=ce.x,D=ce.y;var fe=this.ctx.transform.applyToPoint(new f(0,B)),be=this.ctx.transform.applyToPoint(new f(0,0));B=Math.sqrt(Math.pow(fe.x-be.x,2)+Math.pow(fe.y-be.y,2))}Math.abs($-W)>=2*Math.PI&&(W=0,$=2*Math.PI),this.path.push({type:"arc",x:A,y:D,radius:B,startAngle:W,endAngle:$,counterclockwise:Q})},w.prototype.arcTo=function(A,D,B,W,$){throw new Error("arcTo not implemented.")},w.prototype.rect=function(A,D,B,W){if(isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W))throw Mt.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,D),this.lineTo(A+B,D),this.lineTo(A+B,D+W),this.lineTo(A,D+W),this.lineTo(A,D),this.lineTo(A+B,D),this.lineTo(A,D)},w.prototype.fillRect=function(A,D,B,W){if(isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W))throw Mt.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var $={};this.lineCap!=="butt"&&($.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&($.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,D,B,W),this.fill(),$.hasOwnProperty("lineCap")&&(this.lineCap=$.lineCap),$.hasOwnProperty("lineJoin")&&(this.lineJoin=$.lineJoin)}},w.prototype.strokeRect=function(A,D,B,W){if(isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W))throw Mt.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");C.call(this)||(this.beginPath(),this.rect(A,D,B,W),this.stroke())},w.prototype.clearRect=function(A,D,B,W){if(isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W))throw Mt.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,D,B,W))},w.prototype.save=function(A){A=typeof A!="boolean"||A;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("q");
vendor: 4,132 bytes, line 153
153if(this.pdf.setPage(D),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var W=new m(this.ctx);this.ctxStack.push(this.ctx),this.ctx=W}},w.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("Q");this.pdf.setPage(D),A&&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)},w.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var S=function(A){var D,B,W,$;if(A.isCanvasGradient===!0&&(A=A.getColor()),!A)return{r:0,g:0,b:0,a:0,style:A};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(A))D=0,B=0,W=0,$=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(Q!==null)D=parseInt(Q[1]),B=parseInt(Q[2]),W=parseInt(Q[3]),$=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)D=parseInt(Q[1]),B=parseInt(Q[2]),W=parseInt(Q[3]),$=parseFloat(Q[4]);else{if($=1,typeof A=="string"&&A.charAt(0)!=="#"){var ce=new wf(A);A=ce.ok?ce.toHex():"#000000"}A.length===4?(D=A.substring(1,2),D+=D,B=A.substring(2,3),B+=B,W=A.substring(3,4),W+=W):(D=A.substring(1,3),B=A.substring(3,5),W=A.substring(5,7)),D=parseInt(D,16),B=parseInt(B,16),W=parseInt(W,16)}}return{r:D,g:B,b:W,a:$,style:A}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},C=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};w.prototype.fillText=function(A,D,B,W){if(isNaN(D)||isNaN(B)||typeof A!="string")throw Mt.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(W=isNaN(W)?void 0:W,!p.call(this)){var $=te(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;I.call(this,{text:A,x:D,y:B,scale:Q,angle:$,align:this.textAlign,maxWidth:W})}},w.prototype.strokeText=function(A,D,B,W){if(isNaN(D)||isNaN(B)||typeof A!="string")throw Mt.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!C.call(this)){W=isNaN(W)?void 0:W;var $=te(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;I.call(this,{text:A,x:D,y:B,scale:Q,renderingMode:"stroke",angle:$,align:this.textAlign,maxWidth:W})}},w.prototype.measureText=function(A){if(typeof A!="string")throw Mt.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var D=this.pdf,B=this.pdf.internal.scaleFactor,W=D.internal.getFontSize(),$=D.getStringUnitWidth(A)*W/D.internal.scaleFactor;return new function(Q){var ce=(Q=Q||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ce}}),this}({width:$*=Math.round(96*B/72*1e4)/1e4})},w.prototype.scale=function(A,D){if(isNaN(A)||isNaN(D))throw Mt.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var B=new u(A,0,0,D,0,0);this.ctx.transform=this.ctx.transform.multiply(B)},w.prototype.rotate=function(A){if(isNaN(A))throw Mt.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var D=new u(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(D)},w.prototype.translate=function(A,D){if(isNaN(A)||isNaN(D))throw Mt.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var B=new u(1,0,0,1,A,D);this.ctx.transform=this.ctx.transform.multiply(B)},w.prototype.transform=function(A,D,B,W,$,Q){if(isNaN(A)||isNaN(D)||isNaN(B)||isNaN(W)||isNaN($)||isNaN(Q))throw Mt.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to
153jsPDF.context2d.transform");var ce=new u(A,D,B,W,$,Q);this.ctx.transform=this.ctx.transform.multiply(ce)},w.prototype.setTransform=function(A,D,B,W,$,Q){A=isNaN(A)?1:A,D=isNaN(D)?0:D,B=isNaN(B)?0:B,W=isNaN(W)?1:W,$=isNaN($)?0:$,Q=isNaN(Q)?0:Q,this.ctx.transform=new u(A,D,B,W,$,Q)};var E=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};w.prototype.drawImage=function(A,D,B,W,$,Q,ce,fe,be){var Pe=this.pdf.getImageProperties(A),Ie=1,ue=1,Ee=1,j=1;W!==void 0&&fe!==void 0&&(Ee=fe/W,j=be/$,Ie=Pe.width/W*fe/W,ue=Pe.height/$*be/$),Q===void 0&&(Q=D,ce=B,D=0,B=0),W!==void 0&&fe===void 0&&(fe=W,be=$),W===void 0&&fe===void 0&&(fe=Pe.width,be=Pe.height);var Se=this.ctx.transform.decompose(),Ye=te(Se.rotate.shx),Ue=new u,Ne=(Ue=(Ue=(Ue=Ue.multiply(Se.translate)).multiply(Se.skew)).multiply(Se.scale)).applyToRectangle(new l(Q-D*Ee,ce-B*j,W*Ie,$*ue));if(this.autoPaging){for(var Be,Fe=O.call(this,Ne),Je=[],$e=0;$e<Fe.length;$e+=1)Je.indexOf(Fe[$e])===-1&&Je.push(Fe[$e]);V(Je);for(var wt=Je[0],ht=Je[Je.length-1],rt=wt;rt<ht+1;rt++){this.pdf.setPage(rt);var bt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],gt=rt===1?this.posY+this.margin[0]:this.margin[0],De=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ot=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],We=rt===1?0:De+(rt-2)*ot;if(this.ctx.clip_path.length!==0){var Gt=this.path;Be=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(Be,this.posX+this.margin[3],-We+gt+this.ctx.prevPageLastElemOffset),oe.call(this,"fill",!0),this.path=Gt}var vt=JSON.parse(JSON.stringify(Ne));vt=Y([vt],this.posX+this.margin[3],-We+gt+this.ctx.prevPageLastElemOffset)[0];var lt=(rt>wt||rt<ht)&&E.call(this);lt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],bt,ot,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",vt.x,vt.y,vt.w,vt.h,null,null,Ye),lt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(A,"JPEG",Ne.x,Ne.y,Ne.w,Ne.h,null,null,Ye)};var O=function(A,D,B){var W=[];D=D||this.pdf.internal.pageSize.width,B=B||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var $=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":W.push(Math.floor((A.y+$)/B)+1);break;case"arc":W.push(Math.floor((A.y+$-A.radius)/B)+1),W.push(Math.floor((A.y+$+A.radius)/B)+1);break;case"qct":var Q=de(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);W.push(Math.floor((Q.y+$)/B)+1),W.push(Math.floor((Q.y+Q.h+$)/B)+1);break;case"bct":var ce=ke(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);W.push(Math.floor((ce.y+$)/B)+1),W.push(Math.floor((ce.y+ce.h+$)/B)+1);break;case"rect":W.push(Math.floor((A.y+$)/B)+1),W.push(Math.floor((A.y+A.h+$)/B)+1)}for(var fe=0;fe<W.length;fe+=1)for(;this.pdf.internal.getNumberOfPages()<W[fe];)k.call(this);return W},k=function(){var A=this.fillStyle,D=this.strokeStyle,B=this.font,W=this.lineCap,$=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=D,this.font=B,this.lineCap=W,this.lineWidth=$,this.lineJoin=Q},Y=function(A,D,B){for(var W=0;W<A.length;W++)switch(A[W].type){case"bct":A[W].x2+=D,A[W].y2+=B;case"qct":A[W].x1+=D,A[W].y1+=B;default:A[W].x+=D,A[W].y+=B}return A},V=function(A){return A.sort(function(D,B){return D-B})},q=function(A,D){var B=this.fillStyle,W=this.strokeStyle,$=this.lineCap,Q=this.lineWidth,ce=Math.abs(Q*this.ctx.transform.scaleX),fe=this.lineJoin;if(this.autoPaging){for(var be,Pe,Ie=JSON.parse(JSON.stringify(this.path)),ue=JSON.parse(JSON.stringify(this.path)),Ee=[],j=0;j<ue.length;j++)if(ue[j].x!==void 0)for(var Se=O.call(this,ue[j]),Ye=0;Ye<Se.length;Ye+=1)Ee.indexOf(Se[Ye])===-1&&Ee.push(Se[Ye]);for(var Ue=0;Ue<Ee.length;Ue++)for(;this.pdf.internal.getNumberOfPages()<Ee[Ue];)k.call(this);V(Ee);for(var Ne=Ee[0],Be=Ee[Ee.length-1],Fe=Ne;Fe<Be+1;Fe++){this.pdf.setPage(Fe),this.fillStyle=B,this.strokeStyle=W,this.lineCap=$,this.lineWidth=ce,this.lineJoin=fe;var Je=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],$e=Fe===1?this.posY+this.margin[0]:this.margin[0],wt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],rt=Fe===1?0:wt+(Fe-2)*ht;if(this.ctx.clip_path.length!==0){var bt=this.path;be=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(be,this.posX+this.margin[3],-rt+$e+this.ctx.prevPageLastElemOffset),oe.call(this,A,!0),this.path=bt}if(Pe=JSON.parse(JSON.stringify(Ie)),this.path=Y(Pe,this.posX+this.margin[3],-rt+$e+this.ctx.prevPageLastElemOffset),D===!1||Fe===0){var gt=(Fe>Ne||Fe<Be)&&E.call(this);gt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Je,ht,null).clip().discardPath()),oe.call(this,A,D),gt&&this.pdf.restoreGraphicsState()}this.lineWidth=Q}this.path=Ie}else this.lineWidth=ce,oe.call(this,A,D),this.lineWidth=Q}
vendor: 38,925 bytes, lines 153-159
153,oe=function(A,D){if((A!=="stroke"||D||!C.call(this))&&(A==="stroke"||D||!p.call(this))){for(var B,W,$=[],Q=this.path,ce=0;ce<Q.length;ce++){var fe=Q[ce];switch(fe.type){case"begin":$.push({begin:!0});break;case"close":$.push({close:!0});break;case"mt":$.push({start:fe,deltas:[],abs:[]});break;case"lt":var be=$.length;if(Q[ce-1]&&!isNaN(Q[ce-1].x)&&(B=[fe.x-Q[ce-1].x,fe.y-Q[ce-1].y],be>0)){for(;be>=0;be--)if($[be-1].close!==!0&&$[be-1].begin!==!0){$[be-1].deltas.push(B),$[be-1].abs.push(fe);break}}break;case"bct":B=[fe.x1-Q[ce-1].x,fe.y1-Q[ce-1].y,fe.x2-Q[ce-1].x,fe.y2-Q[ce-1].y,fe.x-Q[ce-1].x,fe.y-Q[ce-1].y],$[$.length-1].deltas.push(B);break;case"qct":var Pe=Q[ce-1].x+2/3*(fe.x1-Q[ce-1].x),Ie=Q[ce-1].y+2/3*(fe.y1-Q[ce-1].y),ue=fe.x+2/3*(fe.x1-fe.x),Ee=fe.y+2/3*(fe.y1-fe.y),j=fe.x,Se=fe.y;B=[Pe-Q[ce-1].x,Ie-Q[ce-1].y,ue-Q[ce-1].x,Ee-Q[ce-1].y,j-Q[ce-1].x,Se-Q[ce-1].y],$[$.length-1].deltas.push(B);break;case"arc":$.push({deltas:[],abs:[],arc:!0}),Array.isArray($[$.length-1].abs)&&$[$.length-1].abs.push(fe)}}W=D?null:A==="stroke"?"stroke":"fill";for(var Ye=!1,Ue=0;Ue<$.length;Ue++)if($[Ue].arc)for(var Ne=$[Ue].abs,Be=0;Be<Ne.length;Be++){var Fe=Ne[Be];Fe.type==="arc"?K.call(this,Fe.x,Fe.y,Fe.radius,Fe.startAngle,Fe.endAngle,Fe.counterclockwise,void 0,D,!Ye):H.call(this,Fe.x,Fe.y),Ye=!0}else if($[Ue].close===!0)this.pdf.internal.out("h"),Ye=!1;else if($[Ue].begin!==!0){var Je=$[Ue].start.x,$e=$[Ue].start.y;U.call(this,$[Ue].deltas,Je,$e),Ye=!0}W&&R.call(this,W),D&&Z.call(this)}},ye=function(A){var D=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,B=D*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-B;case"top":return A+D-B;case"hanging":return A+D-2*B;case"middle":return A+D/2-B;default:return A}},ne=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};w.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(D,B){this.colorStops.push([D,B])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},w.prototype.createPattern=function(){return this.createLinearGradient()},w.prototype.createRadialGradient=function(){return this.createLinearGradient()};var K=function(A,D,B,W,$,Q,ce,fe,be){for(var Pe=le.call(this,B,W,$,Q),Ie=0;Ie<Pe.length;Ie++){var ue=Pe[Ie];Ie===0&&(be?_.call(this,ue.x1+A,ue.y1+D):H.call(this,ue.x1+A,ue.y1+D)),se.call(this,A,D,ue.x2,ue.y2,ue.x3,ue.y3,ue.x4,ue.y4)}fe?Z.call(this):R.call(this,ce)},R=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},Z=function(){this.pdf.clip(),this.pdf.discardPath()},_=function(A,D){this.pdf.internal.out(e(A)+" "+r(D)+" m")},I=function(A){var D;switch(A.align){case"right":case"end":D="right";break;case"center":D="center";break;default:D="left"}var B,W,$,Q=this.pdf.getTextDimensions(A.text),ce=ye.call(this,A.y),fe=ne.call(this,ce)-Q.h,be=this.ctx.transform.applyToPoint(new f(A.x,ce));if(this.autoPaging){var Pe=this.ctx.transform.decompose(),Ie=new u;Ie=(Ie=(Ie=Ie.multiply(Pe.translate)).multiply(Pe.skew)).multiply(Pe.scale);for(var ue=this.ctx.transform.applyToRectangle(new l(A.x,ce,Q.w,Q.h)),Ee=Ie.applyToRectangle(new l(A.x,fe,Q.w,Q.h)),j=O.call(this,Ee),Se=[],Ye=0;Ye<j.length;Ye+=1)Se.indexOf(j[Ye])===-1&&Se.push(j[Ye]);V(Se);for(var Ue=Se[0],Ne=Se[Se.length-1],Be=Ue;Be<Ne+1;Be++){this.pdf.setPage(Be);var Fe=Be===1?this.posY+this.margin[0]:this.margin[0],Je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],$e=this.pdf.internal.pageSize.height-this.margin[2],wt=$e-this.margin[0],ht=this.pdf.internal.pageSize.width-this.margin[1],rt=ht-this.margin[3],bt=Be===1?0:Je+(Be-2)*wt;if(this.ctx.clip_path.length!==0){var gt=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(B,this.posX+this.margin[3],-1*bt+Fe),oe.call(this,"fill",!0),this.path=gt}var De=Y([JSON.parse(JSON.stringify(Ee))],this.posX+this.margin[3],-bt+Fe+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&(W=this.pdf.internal.getFontSize(),this.pdf.setFontSize(W*A.scale),$=this.lineWidth,this.lineWidth=$*A.scale);var ot=this.autoPaging!=="text";if(ot||De.y+De.h<=$e){if(ot||De.y>=Fe&&De.x<=ht){var We=ot?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||ht-De.x)[0],Gt=Y([JSON.parse(JSON.stringify(ue))],this.posX+this.margin[3],-bt+Fe+this.ctx.prevPageLastElemOffset)[0],vt=ot&&(Be>Ue||Be<Ne)&&E.call(this);vt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],rt,wt,null).clip().discardPath()),this.pdf.text(We,Gt.x,Gt.y,{angle:A.angle,align:D,renderingMode:A.renderingMode}),vt&&this.pdf.restoreGraphicsState()}}else De.y<$e&&(this.ctx.prevPageLastElemOffset+=$e-De.y);A.scale>=.01&&(this.pdf.setFontSize(W),this.lineWidth=$)}}else A.scale>=.01&&(W=this.pdf.internal.getFontSize(),this.pdf.setFontSize(W*A.scale),$=this.lineWidth,this.lineWidth=$*A.scale),this.pdf.text(A.text,be.x+this.posX,be.y+this.posY,{angle:A.angle,align:D,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(W),this.lineWidth=$)},H=function(A,D,B,W){B=B||0,W=W||0,this.pdf.internal.out(e(A+B)+" "+r(D+W)+" l")},U=function(A,D,B){return this.pdf.lines(A,D,B,null,null)},se=function(A,D,B,W,$,Q,ce,fe){this.pdf.internal.out([t(s(B+A)),t(a(W+D)),t(s($+A)),t(a(Q+D)),t(s(ce+A)),t(a(fe+D)),"c"].join(" "))},le=function(A,D,B,W){for(var $=2*Math.PI,Q=Math.PI/2;D>B;)D-=$;var ce=Math.abs(B-D);ce<$&&W&&(ce=$-ce);for(var fe=[],be=W?-1:1,Pe=D;ce>1e-5;){var Ie=Pe+be*Math.min(ce,Q);fe.push(he.call(this,A,Pe,Ie)),ce-=Math.abs(Ie-Pe),Pe=Ie}return fe},he=function(A,D,B){var W=(B-D)/2,$=A*Math.cos(W),Q=A*Math.sin(W),ce=$,fe=-Q,be=ce*ce+fe*fe,Pe=be+ce*$+fe*Q,Ie=4/3*(Math.sqrt(2*be*Pe)-Pe)/(ce*Q-fe*$),ue=ce-Ie*fe,Ee=fe+Ie*ce,j=ue,Se=-Ee,Ye=W+D,Ue=Math.cos(Ye),Ne=Math.sin(Ye);return{x1:A*Math.cos(D),y1:A*Math.sin(D),x2:ue*Ue-Ee*Ne,y2:ue*Ne+Ee*Ue,x3:j*Ue-Se*Ne,y3:j*Ne+Se*Ue,x4:A*Math.cos(B),y4:A*Math.sin(B)}},te=function(A){return 180*A/Math.PI},de=function(A,D,B,W,$,Q){var ce=A+.5*(B-A),fe=D+.5*(W-D),be=$+.5*(B-$),Pe=Q+.5*(W-Q),Ie=Math.min(A,$,ce,be),ue=Math.max(A,$,ce,be),Ee=Math.min(D,Q,fe,Pe),j=Math.max(D,Q,fe,Pe);return new l(Ie,Ee,ue-Ie,j-Ee)},ke=function(A,D,B,W,$,Q,ce,fe){var be,Pe,Ie,ue,Ee,j,Se,Ye,Ue,Ne,Be,Fe,Je,$e,wt=B-A,ht=W-D,rt=$-B,bt=Q-W,gt=ce-$,De=fe-Q;for(Pe=0;Pe<41;Pe++)Ue=(Se=(Ie=A+(be=Pe/40)*wt)+be*((Ee=B+be*rt)-Ie))+be*(Ee+be*($+be*gt-Ee)-Se),Ne=(Ye=(ue=D+be*ht)+be*((j=W+be*bt)-ue))+be*(j+be*(Q+be*De-j)-Ye),Pe==0?(Be=Ue,Fe=Ne,Je=Ue,$e=Ne):(Be=Math.min(Be,Ue),Fe=Math.min(Fe,Ne),Je=Math.max(Je,Ue),$e=Math.max($e,Ne));return new l(Math.round(Be),Math.round(Fe),Math.round(Je-Be),Math.round($e-Fe))},we=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,D,B=(A=this.ctx.lineDash,D=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:D}));this.prevLineDash!==B&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=B)}}})(Ge.API),function(n){var t=function(f){var l,u,d,m,w,S,p,C,E,O;for(u=[],d=0,m=(f+=l="\0\0\0\0".slice(f.length%4||4)).length;m>d;d+=4)(w=(f.charCodeAt(d)<<24)+(f.charCodeAt(d+1)<<16)+(f.charCodeAt(d+2)<<8)+f.charCodeAt(d+3))!==0?(S=(w=((w=((w=((w=(w-(O=w%85))/85)-(E=w%85))/85)-(C=w%85))/85)-(p=w%85))/85)%85,u.push(S+33,p+33,C+33,E+33,O+33)):u.push(122);return function(k,Y){for(var V=Y;V>0;V--)k.pop()}(u,l.length),String.fromCharCode.apply(String,u)+"~>"},e=function(f){var l,u,d,m,w,S=String,p="length",C=255,E="charCodeAt",O="slice",k="replace";for(f[O](-2),f=f[O](0,-2)[k](/\s/g,"")[k]("z","!!!!!"),d=[],m=0,w=(f+=l="uuuuu"[O](f[p]%5||5))[p];w>m;m+=5)u=52200625*(f[E](m)-33)+614125*(f[E](m+1)-33)+7225*(f[E](m+2)-33)+85*(f[E](m+3)-33)+(f[E](m+4)-33),d.push(C&u>>24,C&u>>16,C&u>>8,C&u);return function(Y,V){for(var q=V;q>0;q--)Y.pop()}(d,l[p]),S.fromCharCode.apply(S,d)},r=function(f){return f.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},s=function(f){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),l.test(f)===!1)return"";for(var u="",d=0;d<f.length;d+=2)u+=String.fromCharCode("0x"+(f[d]+f[d+1]));return u},a=function(f){for(var l=new Uint8Array(f.length),u=f.length;u--;)l[u]=f.charCodeAt(u);return(l=bl(l)).reduce(function(d,m){return d+String.fromCharCode(m)},"")};n.processDataByFilters=function(f,l){var u=0,d=f||"",m=[];for(typeof(l=l||[])=="string"&&(l=[l]),u=0;u<l.length;u+=1)switch(l[u]){case"ASCII85Decode":case"/ASCII85Decode":d=e(d),m.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=t(d),m.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=s(d),m.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=r(d),m.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=a(d),m.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[u]+'" is not implemented')}return{data:d,reverseChain:m.reverse().join(" ")}}}(Ge.API),function(n){n.loadFile=function(t,e,r){return function(s,a,f){a=a!==!1,f=typeof f=="function"?f:function(){};var l=void 0;try{l=function(u,d,m){var w=new XMLHttpRequest,S=0,p=function(C){var E=C.length,O=[],k=String.fromCharCode;for(S=0;S<E;S+=1)O.push(k(255&C.charCodeAt(S)));return O.join("")};if(w.open("GET",u,!d),w.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(w.onload=function(){w.status===200?m(p(this.responseText)):m(void 0)}),w.send(null),d&&w.status===200)return p(w.responseText)}(s,a,f)}catch{}return l}(t,e,r)},n.allowFsRead=void 0,n.loadImageFile=n.loadFile}(Ge.API),function(n){function t(){return(nt.html2canvas?Promise.resolve(nt.html2canvas):Oo(()=>import("./html2canvas.esm-C3fx88d4.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function e(){return(nt.DOMPurify?Promise.resolve(nt.DOMPurify):Oo(()=>import("./purify.es-CxTuOytG.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var r=function(l){var u=jt(l);return u==="undefined"?"undefined":u==="string"||l instanceof String?"string":u==="number"||l instanceof Number?"number":u==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":u==="object"?"object":"unknown"},s=function(l,u){var d=document.createElement(l);for(var m in u.className&&(d.className=u.className),u.innerHTML&&u.dompurify&&(d.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)d.style[m]=u.style[m];return d},a=function l(u,d){for(var m=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),w=u.firstChild;w;w=w.nextSibling)d!==!0&&w.nodeType===1&&w.nodeName==="SCRIPT"||m.appendChild(l(w,d));return u.nodeType===1&&(u.nodeName==="CANVAS"?(m.width=u.width,m.height=u.height,m.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(m.value=u.value),m.addEventListener("load",function(){m.scrollTop=u.scrollTop,m.scrollLeft=u.scrollLeft},!0)),m},f=function l(u){var d=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),m=l.convert(Promise.resolve(),d);return(m=m.setProgress(1,l,1,[l])).set(u)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(l,u){return l.__proto__=u||f.prototype,l},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(l,u){return this.then(function(){switch(u=u||function(d){switch(r(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(l),u){case"string":return this.then(e).then(function(d){return this.set({src:s("div",{innerHTML:l,dompurify:d})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},f.prototype.to=function(l){switch(l){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var l={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(s("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,u(this.prop.container,d)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var d=this.opt.jsPDF,m=this.opt.fontFaces,w=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,S=Object.assign({async:!0,allowTaint:!0,scale:w,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete S.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=m,m)for(var p=0;p<m.length;++p){var C=m[p],E=C.src.find(function(O){return O.format==="truetype"});E&&d.addFont(E.url,C.ref.name,C.ref.style)}return S.windowHeight=S.windowHeight||0,S.windowHeight=S.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):S.windowHeight,d.context2d.save(!0),u(this.prop.container,S)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},f.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},f.prototype.output=function(l,u,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(l,u):this.outputPdf(l,u)},f.prototype.outputPdf=function(l,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,u)})},f.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){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 "'+l+'" is not supported.'}})},f.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},f.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},f.prototype.set=function(l){if(r(l)!=="object")return this;var u=Object.keys(l||{}).map(function(d){if(d in f.template.prop)return function(){this.prop[d]=l[d]};switch(d){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[d]=l[d]}}},this);return this.then(function(){return this.thenList(u)})},f.prototype.get=function(l,u){return this.then(function(){var d=l in f.template.prop?this.prop[l]:this.opt[l];return u?u(d):d})},f.prototype.setMargin=function(l){return this.then(function(){switch(r(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},f.prototype.setPageSize=function(l){function u(d,m){return Math.floor(d*m/72*96)}return this.then(function(){(l=l||Ge.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:u(l.inner.width,l.k),height:u(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},f.prototype.setProgress=function(l,u,d,m){return l!=null&&(this.progress.val=l),u!=null&&(this.progress.state=u),d!=null&&(this.progress.n=d),m!=null&&(this.progress.stack=m),this.progress.ratio=this.progress.val/this.progress.state,this},f.prototype.updateProgress=function(l,u,d,m){return this.setProgress(l?this.progress.val+l:null,u||null,d?this.progress.n+d:null,m?this.progress.stack.concat(m):null)},f.prototype.then=function(l,u){var d=this;return this.thenCore(l,u,function(m,w){return d.updateProgress(null,null,1,[m]),Promise.prototype.then.call(this,function(S){return d.updateProgress(null,m),S}).then(m,w).then(function(S){return d.updateProgress(1),S})})},f.prototype.thenCore=function(l,u,d){d=d||Promise.prototype.then;var m=this;l&&(l=l.bind(m)),u&&(u=u.bind(m));var w=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?m:f.convert(Object.assign({},m),Promise.prototype),S=d.call(w,l,u);return f.convert(S,m.__proto__)},f.prototype.thenExternal=function(l,u){return Promise.prototype.then.call(this,l,u)},f.prototype.thenList=function(l){var u=this;return l.forEach(function(d){u=u.thenCore(d)}),u},f.prototype.catch=function(l){l&&(l=l.bind(this));var u=Promise.prototype.catch.call(this,l);return f.convert(u,this)},f.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},f.prototype.error=function(l){return this.then(function(){throw new Error(l)})},f.prototype.using=f.prototype.set,f.prototype.saveAs=f.prototype.save,f.prototype.export=f.prototype.output,f.prototype.run=f.prototype.then,Ge.getPageSize=function(l,u,d){if(jt(l)==="object"){var m=l;l=m.orientation,u=m.unit||u,d=m.format||d}u=u||"mm",d=d||"a4",l=(""+(l||"P")).toLowerCase();var w,S=(""+d).toLowerCase(),p={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(u){case"pt":w=1;break;case"mm":w=72/25.4;break;case"cm":w=72/2.54;break;case"in":w=72;break;case"px":w=.75;break;case"pc":case"em":w=12;break;case"ex":w=6;break;default:throw"Invalid unit: "+u}var C,E=0,O=0;if(p.hasOwnProperty(S))E=p[S][1]/w,O=p[S][0]/w;else try{E=d[1],O=d[0]}catch{throw new Error("Invalid format: "+d)}if(l==="p"||l==="portrait")l="p",O>E&&(C=O,O=E,E=C);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",E>O&&(C=O,O=E,E=C)}return{width:O,height:E,unit:u,k:w,orientation:l}},n.html=function(l,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(rl):null;var d=new f(u);return u.worker?d:d.from(l).doCallback()}}(Ge.API),Ge.API.addJS=function(n){var t,e,r=function(s){for(var a="",f=0;f<s.length;f++){var l=s[f];if(l==="("||l===")"){for(var u=0,d=f-1;d>=0&&s[d]==="\\";d--)u++;a+=u%2==0?"\\"+l:l}else a+=l}return a}(n);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&e!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},function(n){var t;n.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var s=e.outline.render().split(/\r\n/),a=0;a<s.length;a++){var f=s[a],l=r.exec(f);if(l!=null){var u=l[1];e.internal.newObjectDeferredBegin(u,!1)}e.internal.write(f)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,m=[];for(a=0;a<d;a++){var w=e.internal.newObject();m.push(w);var S=e.internal.getPageInfo(a+1);e.internal.write("<< /D["+S.objId+" 0 R /XYZ null null null]>> endobj")}var p=e.internal.newObject();for(e.internal.write("<< /Names [ "),a=0;a<m.length;a++)e.internal.write("(page_"+(a+1)+")"+m[a]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+p+" 0 R"),e.internal.write(">>","endobj")}}]),n.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),n.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,s,a){var f={title:s,options:a,children:[]};return r==null&&(r=this.root),r.children.push(f),f},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(r){r.id=e.internal.newObjectDeferred();for(var s=0;s<r.children.length;s++)this.genIds_r(r.children[s])},e.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()},e.outline.renderItems=function(r){for(var s=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<r.children.length;a++){var f=r.children[a];this.objStart(f),this.line("/Title "+this.makeString(f.title)),this.line("/Parent "+this.makeRef(r)),a>0&&this.line("/Prev "+this.makeRef(r.children[a-1])),a<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[a+1])),f.children.length>0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var l=this.count=this.count_r({count:0},f);if(l>0&&this.line("/Count "+l),f.options&&f.options.pageNumber){var u=e.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+s(0)+" 0]")}this.objEnd()}for(var d=0;d<r.children.length;d++)this.renderItems(r.children[d])},e.outline.line=function(r){this.ctx.val+=r+`\r 154`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r 155`+r.id+` 0 obj\r 156<<\r 157`},e.outline.objEnd=function(){this.ctx.val+=`>> \r 158endobj\r 159`},e.outline.count_r=function(r,s){for(var a=0;a<s.children.length;a++)r.count++,this.count_r(r,s.children[a]);return r.count}}])}(Ge.API),function(n){var t=[192,193,194,195,196,197,198,199];n.processJPEG=function(e,r,s,a,f,l){var u,d=this.decode.DCT_DECODE,m=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=f||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,u=function(w){for(var S,p=256*w.charCodeAt(4)+w.charCodeAt(5),C=w.length,E={width:0,height:0,numcomponents:1},O=4;O<C;O+=2){if(O+=p,t.indexOf(w.charCodeAt(O+1))!==-1){S=256*w.charCodeAt(O+5)+w.charCodeAt(O+6),E={width:256*w.charCodeAt(O+7)+w.charCodeAt(O+8),height:S,numcomponents:w.charCodeAt(O+9)};break}p=256*w.charCodeAt(O+2)+w.charCodeAt(O+3)}return E}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),u.numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}m={data:e,width:u.width,height:u.height,colorSpace:l,bitsPerComponent:8,filter:d,index:r,alias:s}}return m}}(Ge.API),Ge.API.processPNG=function(n,t,e,r){if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){var s,a=v2(n,{checkCrc:!0}),f=a.width,l=a.height,u=a.channels,d=a.palette,m=a.depth;s=d&&u===1?function(K){for(var R=K.width,Z=K.height,_=K.data,I=K.palette,H=K.depth,U=!1,se=[],le=[],he=void 0,te=!1,de=0,ke=0;ke<I.length;ke++){var we=kc(I[ke],4),A=we[0],D=we[1],B=we[2],W=we[3];se.push(A,D,B),W!=null&&(W===0?(de++,le.length<1&&le.push(ke)):W<255&&(te=!0))}if(te||de>1){U=!0,le=void 0;var $=R*Z;he=new Uint8Array($);for(var Q=new DataView(_.buffer),ce=0;ce<$;ce++){var fe=al(Q,ce,H),be=kc(I[fe],4)[3];he[ce]=be}}else de===0&&(le=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:U?8:void 0,colorBytes:_,alphaBytes:he,needSMask:U,palette:se,mask:le}}(a):u===2||u===4?function(K){for(var R=K.data,Z=K.width,_=K.height,I=K.channels,H=K.depth,U=I===2?"DeviceGray":"DeviceRGB",se=I-1,le=Z*_,he=se,te=le*he,de=1*le,ke=Math.ceil(te*H/8),we=Math.ceil(de*H/8),A=new Uint8Array(ke),D=new Uint8Array(we),B=new DataView(R.buffer),W=new DataView(A.buffer),$=new DataView(D.buffer),Q=!1,ce=0;ce<le;ce++){for(var fe=ce*I,be=0;be<he;be++)Cu(W,al(B,fe+be,H),ce*he+be,H);var Pe=al(B,fe+he,H);Pe<(1<<H)-1&&(Q=!0),Cu($,Pe,1*ce,H)}return{colorSpace:U,colorsPerPixel:se,sMaskBitsPerComponent:Q?H:void 0,colorBytes:A,alphaBytes:D,needSMask:Q}}(a):function(K){var R=K.data,Z=K.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:Z,colorsPerPixel:Z==="DeviceGray"?1:3,colorBytes:R instanceof Uint16Array?function(_){for(var I=_.length,H=new Uint8Array(2*I),U=new DataView(H.buffer,H.byteOffset,H.byteLength),se=0;se<I;se++)U.setUint16(2*se,_[se],!1);return H}(R):R,needSMask:!1}}(a);var w,S,p,C=s,E=C.colorSpace,O=C.colorsPerPixel,k=C.sMaskBitsPerComponent,Y=C.colorBytes,V=C.alphaBytes,q=C.needSMask,oe=C.palette,ye=C.mask,ne=null;return r!==Ge.API.image_compression.NONE&&typeof bl=="function"?(ne=function(K){var R;switch(K){case Ge.API.image_compression.FAST:R=11;break;case Ge.API.image_compression.MEDIUM:R=13;break;case Ge.API.image_compression.SLOW:R=14;break;default:R=12}return R}(r),w=this.decode.FLATE_DECODE,S="/Predictor ".concat(ne," /Colors ").concat(O," /BitsPerComponent ").concat(m," /Columns ").concat(f),n=Lu(Y,Math.ceil(f*O*m/8),O,m,r),q&&(p=Lu(V,Math.ceil(f*k/8),1,k,r))):(w=void 0,S=void 0,n=Y,q&&(p=V)),(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:e,data:n,index:t,filter:w,decodeParameters:S,transparency:ye,palette:oe,sMask:p,predictor:ne,width:f,height:l,bitsPerComponent:m,sMaskBitsPerComponent:k,colorSpace:E}}},function(n){n.processGIF89A=function(t,e,r,s){var a=new B2(t),f=a.width,l=a.height,u=[];a.decodeAndBlitFrameRGBA(0,u);var d={data:u,width:f,height:l},m=new sl(100).encode(d,100);return n.processJPEG.call(this,m,e,r,s)},n.processGIF87A=n.processGIF89A}(Ge.API),kr.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 n=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(n);for(var t=0;t<n;t++){var e=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:s,green:r,blue:e,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},kr.prototype.parseBGR=function(){this.pos=this.offset;var n="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[n]()}catch(e){Mt.log("bit decode error:"+e)}},kr.prototype.bit1=function(){var n,t=Math.ceil(this.width/8),e=t%4;for(n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,s=0;s<t;s++)for(var a=this.datav.getUint8(this.pos++,!0),f=r*this.width*4+8*s*4,l=0;l<8&&8*s+l<this.width;l++){var u=this.palette[a>>7-l&1];this.data[f+4*l]=u.blue,this.data[f+4*l+1]=u.green,this.data[f+4*l+2]=u.red,this.data[f+4*l+3]=255}e!==0&&(this.pos+=4-e)}},kr.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),t=n%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,s=0;s<n;s++){var a=this.datav.getUint8(this.pos++,!0),f=r*this.width*4+2*s*4,l=a>>4,u=15&a,d=this.palette[l];if(this.data[f]=d.blue,this.data[f+1]=d.green,this.data[f+2]=d.red,this.data[f+3]=255,2*s+1>=this.width)break;d=this.palette[u],this.data[f+4]=d.blue,this.data[f+4+1]=d.green,this.data[f+4+2]=d.red,this.data[f+4+3]=255}t!==0&&(this.pos+=4-t)}},kr.prototype.bit8=function(){for(var n=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var s=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*r;if(s<this.palette.length){var f=this.palette[s];this.data[a]=f.red,this.data[a+1]=f.green,this.data[a+2]=f.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}n!==0&&(this.pos+=4-n)}},kr.prototype.bit15=function(){for(var n=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,s=0;s<this.width;s++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var f=(a&t)/t*255|0,l=(a>>5&t)/t*255|0,u=(a>>10&t)/t*255|0,d=a>>15?255:0,m=r*this.width*4+4*s;this.data[m]=u,this.data[m+1]=l,this.data[m+2]=f,this.data[m+3]=d}this.pos+=n}},kr.prototype.bit16=function(){for(var n=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var s=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var f=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(f&t)/t*255|0,u=(f>>5&e)/e*255|0,d=(f>>11)/t*255|0,m=s*this.width*4+4*a;this.data[m]=d,this.data[m+1]=u,this.data[m+2]=l,this.data[m+3]=255}this.pos+=n}},kr.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),f=t*this.width*4+4*e;this.data[f]=a,this.data[f+1]=s,this.data[f+2]=r,this.data[f+3]=255}this.pos+=this.width%4}},kr.prototype.bit32=function(){for(var n=this.height-1;n>=0;n--)for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),l=t*this.width*4+4*e;this.data[l]=a,this.data[l+1]=s,this.data[l+2]=r,this.data[l+3]=f}},kr.prototype.getData=function(){return this.data},function(n){n.processBMP=function(t,e,r,s){var a=new kr(t,!1),f=a.width,l=a.height,u={data:a.getData(),width:f,height:l},d=new sl(100).encode(u,100);return n.processJPEG.call(this,d,e,r,s)}}(Ge.API),Iu.prototype.getData=function(){return this.data},function(n){n.processWEBP=function(t,e,r,s){var a=new Iu(t),f=a.width,l=a.height,u={data:a.getData(),width:f,height:l},d=new sl(100).encode(u,100);return n.processJPEG.call(this,d,e,r,s)}}(Ge.API),Ge.API.processRGBA=function(n,t,e){for(var r=n.data,s=r.length,a=new Uint8Array(s/4*3),f=new Uint8Array(s/4),l=0,u=0,d=0;d<s;d+=4){var m=r[d],w=r[d+1],S=r[d+2],p=r[d+3];a[l++]=m,a[l++]=w,a[l++]=S,f[u++]=p}var C=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(f),data:C,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:n.width,height:n.height}},Ge.API.setLanguage=function(n){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 (Sp
159ain)","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"}[n]!==void 0&&(this.internal.languageSettings.languageCode=n,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},Pa=Ge.API,to=Pa.getCharWidthsArray=function(n,t){var e,r,s=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),f=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:s.metadata.Unicode.widths,u=l.fof?l.fof:1,d=t.kerning?t.kerning:s.metadata.Unicode.kerning,m=d.fof?d.fof:1,w=t.doKerning!==!1,S=0,p=n.length,C=0,E=l[0]||u,O=[];for(e=0;e<p;e++)r=n.charCodeAt(e),typeof s.metadata.widthOfString=="function"?O.push((s.metadata.widthOfGlyph(s.metadata.characterToGlyph(r))+f*(1e3/a)||0)/1e3):(S=w&&jt(d[r])==="object"&&!isNaN(parseInt(d[r][C],10))?d[r][C]/m:0,O.push((l[r]||E)/u+S)),C=r;return O},Nu=Pa.getStringUnitWidth=function(n,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),s=t.charSpace||this.internal.getCharSpace();return Pa.processArabic&&(n=Pa.processArabic(n)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(n,e,s)/e:to.apply(this,arguments).reduce(function(a,f){return a+f},0)},Au=function(n,t,e,r){for(var s=[],a=0,f=n.length,l=0;a!==f&&l+t[a]<e;)l+=t[a],a++;s.push(n.slice(0,a));var u=a;for(l=0;a!==f;)l+t[a]>r&&(s.push(n.slice(u,a)),l=0,u=a),l+=t[a],a++;return u!==a&&s.push(n.slice(u,a)),s},_u=function(n,t,e){e||(e={});var r,s,a,f,l,u,d,m=[],w=[m],S=e.textIndent||0,p=0,C=0,E=n.split(" "),O=to.apply(this,[" ",e])[0];if(u=e.lineIndent===-1?E[0].length+2:e.lineIndent||0){var k=Array(u).join(" "),Y=[];E.map(function(q){(q=q.split(/\s*\n/)).length>1?Y=Y.concat(q.map(function(oe,ye){return(ye&&oe.length?` 160`:"")+oe})):Y.push(q[0])}),E=Y,u=Nu.apply(this,[k,e])}for(a=0,f=E.length;a<f;a++){var V=0;if(r=E[a],u&&r[0]==` 161`&&(r=r.substr(1),V=1),S+p+(C=(s=to.apply(this,[r,e])).reduce(function(q,oe){return q+oe},0))>t||V){if(C>t){for(l=Au.apply(this,[r,s,t-(S+p),t]),m.push(l.shift()),m=[l.pop()];l.length;)w.push([l.shift()]);C=s.slice(r.length-(m[0]?m[0].length:0)).reduce(function(q,oe){return q+oe},0)}else m=[r];w.push(m),S=C+u,p=O}else m.push(r),S+=p+C,p=O}return d=u?function(q,oe){return(oe?k:"")+q.join(" ")}:function(q){return q.join(" ")},w.map(d)},Pa.splitTextToSize=function(n,t,e){var r,s=(e=e||{}).fontSize||this.internal.getFontSize(),a=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var w=this.internal.getFont(m.fontName,m.fontStyle),S="Unicode";return w.metadata[S]?{widths:w.metadata[S].widths||{0:1},kerning:w.metadata[S].kerning||{}}:{font:w.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);r=Array.isArray(n)?n:String(n).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/s;a.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/s:0,a.lineIndent=e.lineIndent;var l,u,d=[];for(l=0,u=r.length;l<u;l++)d=d.concat(_u.apply(this,[r[l],f,a]));return d},function(n){n.__fontmetrics__=n.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",r={},s={},a=0;a<16;a++)r[e[a]]=t[a],s[t[a]]=e[a];var f=function(S){return"0x"+parseInt(S,10).toString(16)},l=n.__fontmetrics__.compress=function(S){var p,C,E,O,k=["{"];for(var Y in S){if(p=S[Y],isNaN(parseInt(Y,10))?C="'"+Y+"'":(Y=parseInt(Y,10),C=(C=f(Y).slice(2)).slice(0,-1)+s[C.slice(-1)]),typeof p=="number")p<0?(E=f(p).slice(3),O="-"):(E=f(p).slice(2),O=""),E=O+E.slice(0,-1)+s[E.slice(-1)];else{if(jt(p)!=="object")throw new Error("Don't know what to do with value type "+jt(p)+".");E=l(p)}k.push(C+E)}return k.push("}"),k.join("")}
vendor: 963 bytes, line 161
161,u=n.__fontmetrics__.uncompress=function(S){if(typeof S!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,C,E,O,k={},Y=1,V=k,q=[],oe="",ye="",ne=S.length-1,K=1;K<ne;K+=1)(O=S[K])=="'"?p?(E=p.join(""),p=void 0):p=[]:p?p.push(O):O=="{"?(q.push([V,E]),V={},E=void 0):O=="}"?((C=q.pop())[0][C[1]]=V,E=void 0,V=C[0]):O=="-"?Y=-1:E===void 0?r.hasOwnProperty(O)?(oe+=r[O],E=parseInt(oe,16)*Y,Y=1,oe=""):oe+=O:r.hasOwnProperty(O)?(ye+=r[O],V[E]=parseInt(ye,16)*Y,Y=1,E=void 0,ye=""):ye+=O;return k},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},m={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},w
vendor: 14,693 bytes, line 161
161={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'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":u("{'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:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'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:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'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":u("{'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:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'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":u("{'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":u("{'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}}}")}};
vendor: 8,524 bytes, lines 161-189
161n.events.push(["addFont",function(S){var p=S.font,C=w.Unicode[p.postScriptName];C&&(p.metadata.Unicode={},p.metadata.Unicode.widths=C.widths,p.metadata.Unicode.kerning=C.kerning);var E=m.Unicode[p.postScriptName];E&&(p.metadata.Unicode.encoding=E,p.encoding=E.codePages[0])}])}(Ge.API),function(n){var t=function(e){for(var r=e.length,s=new Uint8Array(r),a=0;a<r;a++)s[a]=e.charCodeAt(a);return s};n.API.events.push(["addFont",function(e){var r=void 0,s=e.font,a=e.instance;if(!s.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");if(typeof(r=a.existsFileInVFS(s.postScriptName)===!1?a.loadFile(s.postScriptName):a.getFileFromVFS(s.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");(function(f,l){l=/^\x00\x01\x00\x00/.test(l)?t(l):t(io(l)),f.metadata=n.API.TTFFont.open(l),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(s,r)}}])}(Ge),Ge.API.addSvgAsImage=function(n,t,e,r,s,a,f,l){if(isNaN(t)||isNaN(e))throw Mt.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(s))throw Mt.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=r,u.height=s;var d=u.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,u.width,u.height);var m={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},w=this;return(nt.canvg?Promise.resolve(nt.canvg):Oo(()=>import("./index.es-CfCbvP_S.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))).catch(function(S){return Promise.reject(new Error("Could not load canvg: "+S))}).then(function(S){return S.default?S.default:S}).then(function(S){return S.fromString(d,n,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(S){return S.render(m)}).then(function(){w.addImage(u.toDataURL("image/jpeg",1),t,e,r,s,f,l)})},Ge.API.putTotalPages=function(n){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(n,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var s=0;s<this.internal.pages[r].length;s++)this.internal.pages[r][s]=this.internal.pages[r][s].replace(t,e);return this},Ge.API.viewerPreferences=function(n,t){var e;n=n||{},t=t||!1;var r,s,a,f={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}},l=Object.keys(f),u=[],d=0,m=0,w=0;function S(C,E){var O,k=!1;for(O=0;O<C.length;O+=1)C[O]===E&&(k=!0);return k}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,n==="reset"||t===!0){var p=l.length;for(w=0;w<p;w+=1)e[l[w]].value=e[l[w]].defaultValue,e[l[w]].explicitSet=!1}if(jt(n)==="object"){for(s in n)if(a=n[s],S(l,s)&&a!==void 0){if(e[s].type==="boolean"&&typeof a=="boolean")e[s].value=a;else if(e[s].type==="name"&&S(e[s].valueSet,a))e[s].value=a;else if(e[s].type==="integer"&&Number.isInteger(a))e[s].value=a;else if(e[s].type==="array"){for(d=0;d<a.length;d+=1)if(r=!0,a[d].length===1&&typeof a[d][0]=="number")u.push(String(a[d]-1));else if(a[d].length>1){for(m=0;m<a[d].length;m+=1)typeof a[d][m]!="number"&&(r=!1);r===!0&&u.push([a[d][0]-1,a[d][1]-1].join(" "))}e[s].value="["+u.join(" ")+"]"}else e[s].value=e[s].defaultValue;e[s].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var C,E=[];for(C in e)e[C].explicitSet===!0&&(e[C].type==="name"?E.push("/"+C+" /"+e[C].value):E.push("/"+C+" "+e[C].value));E.length!==0&&this.internal.write(`/ViewerPreferences 162<< 163`+E.join(` 164`)+` 165>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},Ge.API.addMetadata=function(n,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",U2),this.internal.events.subscribe("postPutResources",q2)),this},function(n){var t=n.API,e=t.pdfEscape16=function(a,f){for(var l,u=f.metadata.Unicode.widths,d=["","0","00","000","0000"],m=[""],w=0,S=a.length;w<S;++w){if(l=f.metadata.characterToGlyph(a.charCodeAt(w)),f.metadata.glyIdsUsed.push(l),f.metadata.toUnicode[l]=a.charCodeAt(w),u.indexOf(l)==-1&&(u.push(l),u.push([parseInt(f.metadata.widthOfGlyph(l),10)])),l=="0")return m.join("");l=l.toString(16),m.push(d[4-l.length],l)}return m.join("")},r=function(a){var f,l,u,d,m,w,S;for(m=`/CIDInit /ProcSet findresource begin 16612 dict begin 167begincmap 168/CIDSystemInfo << 169 /Registry (Adobe) 170 /Ordering (UCS) 171 /Supplement 0 172>> def 173/CMapName /Adobe-Identity-UCS def 174/CMapType 2 def 1751 begincodespacerange 176<0000><ffff> 177endcodespacerange`,u=[],w=0,S=(l=Object.keys(a).sort(function(p,C){return p-C})).length;w<S;w++)f=l[w],u.length>=100&&(m+=` 178`+u.length+` beginbfchar 179`+u.join(` 180`)+` 181endbfchar`,u=[]),a[f]!==void 0&&a[f]!==null&&typeof a[f].toString=="function"&&(d=("0000"+a[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),u.push("<"+f+"><"+d+">"));return u.length&&(m+=` 182`+u.length+` beginbfchar 183`+u.join(` 184`)+` 185endbfchar 186`),m+`endcmap 187CMapName currentdict /CMap defineresource pop 188end 189end`};t.events.push(["putFont",function(a){(function(f){var l=f.font,u=f.out,d=f.newObject,m=f.putStream;if(l.metadata instanceof n.API.TTFFont&&l.encoding==="Identity-H"){for(var w=l.metadata.Unicode.widths,S=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),p="",C=0;C<S.length;C++)p+=String.fromCharCode(S[C]);var E=d();m({data:p,addLength1:!0,objectId:E}),u("endobj");var O=d();m({data:r(l.metadata.toUnicode),addLength1:!0,objectId:O}),u("endobj");var k=d();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+Ca(l.fontName)),u("/FontFile2 "+E+" 0 R"),u("/FontBBox "+n.API.PDFObject.convert(l.metadata.bbox)),u("/Flags "+l.metadata.flags),u("/StemV "+l.metadata.stemV),u("/ItalicAngle "+l.metadata.italicAngle),u("/Asce
189nt "+l.metadata.ascender),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u(">>"),u("endobj");var Y=d();u("<<"),u("/Type /Font"),u("/BaseFont /"+Ca(l.fontName)),u("/FontDescriptor "+k+" 0 R"),u("/W "+n.API.PDFObject.convert(w)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+l.encoding+")"),u(">>"),u(">>"),u("endobj"),l.objectNumber=d(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+O+" 0 R"),u("/BaseFont /"+Ca(l.fontName)),u("/Encoding /"+l.encoding),u("/DescendantFonts ["+Y+" 0 R]"),u(">>"),u("endobj"),l.isAlreadyPutted=!0}})(a)}]),t.events.push(["putFont",function(a){(function(f){var l=f.font,u=f.out,d=f.newObject,m=f.putStream;if(l.metadata instanceof n.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var w=l.metadata.rawData,S="",p=0;p<w.length;p++)S+=String.fromCharCode(w[p]);var C=d();m({data:S,addLength1:!0,objectId:C}),u("endobj");var E=d();m({data:r(l.metadata.toUnicode),addLength1:!0,objectId:E}),u("endobj");var O=d();u("<<"),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u("/StemV "+l.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+C+" 0 R"),u("/Flags 96"),u("/FontBBox "+n.API.PDFObject.convert(l.metadata.bbox)),u("/FontName /"+Ca(l.fontName)),u("/ItalicAngle "+l.metadata.italicAngle),u("/Asce
189nt "+l.metadata.ascender),u(">>"),u("endobj"),l.objectNumber=d();for(var k=0;k<l.metadata.hmtx.widths.length;k++)l.metadata.hmtx.widths[k]=parseInt(l.metadata.hmtx.widths[k]*(1e3/l.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+E+" 0 R/BaseFont/"+Ca(l.fontName)+"/FontDescriptor "+O+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+n.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),u("endobj"),l.isAlreadyPutted=!0}})(a)}]);var s=function(a){var f,l=a.text||"",u=a.x,d=a.y,m=a.options||{},w=a.mutex||{},S=w.pdfEscape,p=w.activeFontKey,C=w.fonts,E=p,O="",k=0,Y="",V=C[E].encoding;if(C[E].encoding!=="Identity-H")return{text:l,x:u,y:d,options:m,mutex:w};for(Y=l,E=p,Array.isArray(l)&&(Y=l[0]),k=0;k<Y.length;k+=1)C[E].metadata.hasOwnProperty("cmap")&&(f=C[E].metadata.cmap.unicode.codeMap[Y[k].charCodeAt(0)]),f||Y[k].charCodeAt(0)<256&&C[E].metadata.hasOwnProperty("Unicode")?O+=Y[k]:O+="";var q="";return parseInt(E.slice(1))<14||V==="WinAnsiEncoding"?q=S(O,E).split("").map(function(oe){return oe.charCodeAt(0).toString(16)}).join(""):V==="Identity-H"&&(q=e(O,C[E])),w.isHex=!0,{text:q,x:u,y:d,options:m,mutex:w}};t.events.push(["postProcessText",function(a){var f=a.text||"",l=[],u={text:f,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(f)){var d=0;for(d=0;d<f.length;d+=1)Array.isArray(f[d])&&f[d].length===3?l.push([s(Object.assign({},u,{text:f[d][0]})).text,f[d][1],f[d][2]]):l.push(s(Object.assign({},u,{text:f[d]})).text);a.text=l}else a.text=s(Object.assign({},u,{text:f})).text}])}(Ge),function(n){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};n.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},n.addFileToVFS=function(e,r){return t.call(this),this.internal.vFS[e]=r,this},n.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}}(Ge.API),function(n){n.__bidiEngine__=n.prototype.__bidiEngine__=function(r){var s,a,f,l,u,d,m,w=t,S=[[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]],p=[[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]],C={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},E={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},O=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","â¹","âº","â¹","â
","â","â
","â½","â¾","â½","â","â","â","â¤","â¥","â¤","â©","âª","â©","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","﹤","ï¹¥","﹤"],k=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)$/),Y=!1,V=0;this.__bidiEngine__={};var q=function(_){var I=_.charCodeAt(),H=I>>8,U=E[H];return U!==void 0?w[256*U+(255&I)]:H===252||H===253?"AL":k.test(H)?"L":H===8?"R":"N"},oe=function(_){for(var I,H=0;H<_.length;H++){if((I=q(_.charAt(H)))==="L")return!1;if(I==="R")return!0}return!1},ye=function(_,I,H,U){var se,le,he,te,de=I[U];switch(de){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":Y=!1;break;case"N":case"AN":break;case"EN":Y&&(de="AN");break;case"AL":Y=!0,de="R";break;case"WS":case"BN":de="N";break;case"CS":U<1||U+1>=I.length||(se=H[U-1])!=="EN"&&se!=="AN"||(le=I[U+1])!=="EN"&&le!=="AN"?de="N":Y&&(le="AN"),de=le===se?le:"N";break;case"ES":de=(se=U>0?H[U-1]:"B")==="EN"&&U+1<I.length&&I[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&H[U-1]==="EN"){de="EN";break}if(Y){de="N";break}for(he=U+1,te=I.length;he<te&&I[he]==="ET";)he++;de=he<te&&I[he]==="EN"?"EN":"N";break;case"NSM":if(f&&!l){for(te=I.length,he=U+1;he<te&&I[he]==="NSM";)he++;if(he<te){var ke=_[U],we=ke>=1425&&ke<=2303||ke===64286;if(se=I[he],we&&(se==="R"||se==="AL")){de="R";break}}}de=U<1||(se=I[U-1])==="B"?"N":H[U-1];break;case"B":Y=!1,s=!0,de=V;break;case"S":a=!0,de="N"}return de},ne=function(_,I,H){var U=_.split("");return H&&K(U,H,{hiLevel:V}),U.reverse(),I&&I.reverse(),U.join("")},K=function(_,I,H){var U,se,le,he,te,de=-1,ke=_.length,we=0,A=[],D=V?p:S,B=[];for(Y=!1,s=!1,a=!1,se=0;se<ke;se++)B[se]=q(_[se]);for(le=0;le<ke;le++){if(te=we,A[le]=ye(_,B,A,le),U=240&(we=D[te][C[A[le]]]),we&=15,I[le]=he=D[we][5],U>0)if(U===16){for(se=de;se<le;se++)I[se]=1;de=-1}else de=-1;if(D[we][6])de===-1&&(de=le);else if(de>-1){for(se=de;se<le;se++)I[se]=he;de=-1}B[le]==="B"&&(I[le]=0),H.hiLevel|=he}a&&function(W,$,Q){for(var ce=0;ce<Q;ce++)if(W[ce]==="S"){$[ce]=V;for(var fe=ce-1;fe>=0&&W[fe]==="WS";fe--)$[fe]=V}}(B,I,ke)},R=function(_,I,H,U,se){if(!(se.hiLevel<_)){if(_===1&&V===1&&!s)return I.reverse(),void(H&&H.reverse());for(var le,he,te,de,ke=I.length,we=0;we<ke;){if(U[we]>=_){for(te=we+1;te<ke&&U[te]>=_;)te++;for(de=we,he=te-1;de<he;de++,he--)le=I[de],I[de]=I[he],I[he]=le,H&&(le=H[de],H[de]=H[he],H[he]=le);we=te}we++}}},Z=function(_,I,H){var U=_.split(""),se={hiLevel:V};return H||(H=[]),K(U,H,se),function(le,he,te){if(te.hiLevel!==0&&m)for(var de,ke=0;ke<le.length;ke++)he[ke]===1&&(de=O.indexOf(le[ke]))>=0&&(le[ke]=O[de+1])}(U,H,se),R(2,U,I,H,se),R(1,U,I,H,se),U.join("")};return this.__bidiEngine__.doBidiReorder=function(_,I,H){if(function(se,le){if(le)for(var he=0;he<se.length;he++)le[he]=he;l===void 0&&(l=oe(se)),d===void 0&&(d=oe(se))}(_,I),f||!u||d)if(f&&u&&l^d)V=l?1:0,_=ne(_,I,H);else if(!f&&u&&d)V=l?1:0,_=Z(_,I,H),_=ne(_,I);else if(!f||l||u||d){if(f&&!u&&l^d)_=ne(_,I),l?(V=0,_=Z(_,I,H)):(V=1,_=Z(_,I,H),_=ne(_,I));else if(f&&l&&!u&&d)V=1,_=Z(_,I,H),_=ne(_,I);else if(!f&&!u&&l^d){var U=m;l?(V=1,_=Z(_,I,H),V=0,m=!1,_=Z(_,I,H),m=U):(V=0,_=Z(_,I,H),_=ne(_,I),V=1,m=!1,_=Z(_,I,H),m=U,_=ne(_,I))}}else V=0,_=Z(_,I,H);else V=l?1:0,_=Z(_,I,H);return _},this.__bidiEngine__.setOptions=function(_){_&&(f=_.isInputVisual,u=_.isOutputVisual,l=_.isInputRtl,d=_.isOutputRtl,m=_.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new n.__bidiEngine__({isInputVisual:!0});n.API.events.push(["postProcessText",function(r){var s=r.text;r.x,r.y;var a=r.options||{};r.mutex,a.lang;var f=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,e.setOptions(a),Object.prototype.toString.call(s)==="[object Array]"){var l=0;for(f=[],l=0;l<s.length;l+=1)Object.prototype.toString.call(s[l])==="[object Array]"?f.push([e.doBidiReorder(s[l][0]),s[l][1],s[l][2]]):f.push([e.doBidiReorder(s[l])]);r.text=f}else r.text=e.doBidiReorder(s);e.setOptions({isInputVisual:!0})}])}(Ge),Ge.API.TTFFont=function(){function n(t){var e;if(this.rawData=t,e=this.contents=new Fi(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new n5(this),this.registerTTF()}return n.open=function(t){return new n(t)},n.prototype.parse=function(){return this.directory=new z2(this.contents),this.head=new W2(this),this.name=new K2(this),this.cmap=new If(this),this.toUnicode={},this.hhea=new V2(this),this.maxp=new J2(this),this.hmtx=new X2(this),this.post=new Y2(this),this.os2=new G2(this
vendor: 18,828 bytes, line 189
189),this.loca=new t5(this),this.glyf=new Z2(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]},n.prototype.registerTTF=function(){var t,e,r,s,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var f,l,u,d;for(d=[],f=0,l=(u=this.bbox).length;f<l;f++)t=u[f],d.push(Math.round(t*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(r=255&(s=this.post.italic_angle),32768&(e=s>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},n.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},n.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},n.prototype.widthOfString=function(t,e,r){var s,a,f,l;for(f=0,a=0,l=(t=""+t).length;0<=l?a<l:a>l;a=0<=l?++a:--a)s=t.charCodeAt(a),f+=this.widthOfGlyph(this.characterToGlyph(s))+r*(1e3/e)||0;return f*(e/1e3)},n.prototype.lineHeight=function(t,e){var r;return e==null&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},n}();var Cr,Fi=function(){function n(t){this.data=t??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(t){return this.data[this.pos++]=t},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},n.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},n.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},n.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(t){var e,r,s;for(s=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)s.push(this.writeByte(t.charCodeAt(e)));return s},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(t){return this.writeInt16(t)},n.prototype.readLongLong=function(){var t,e,r,s,a,f,l,u;return t=this.readByte(),e=this.readByte(),r=this.readByte(),s=this.readByte(),a=this.readByte(),f=this.readByte(),l=this.readByte(),u=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^s)+16777216*(255^a)+65536*(255^f)+256*(255^l)+(255^u)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*s+16777216*a+65536*f+256*l+u},n.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(t){return this.writeInt32(t)},n.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},n.prototype.write=function(t){var e,r,s,a;for(a=[],r=0,s=t.length;r<s;r++)e=t[r],a.push(this.writeByte(e));return a},n}(),z2=function(){var n;function t(e){var r,s,a;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},s=0,a=this.tableCount;0<=a?s<a:s>a;s=0<=a?++s:--s)r={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(e){var r,s,a,f,l,u,d,m,w,S,p,C,E;for(E in p=Object.keys(e).length,u=Math.log(2),w=16*Math.floor(Math.log(p)/u),f=Math.floor(w/u),m=16*p-w,(s=new Fi).writeInt(this.scalarType),s.writeShort(p),s.writeShort(w),s.writeShort(f),s.writeShort(m),a=16*p,d=s.pos+a,l=null,C=[],e)for(S=e[E],s.writeString(E),s.writeInt(n(S)),s.writeInt(d),s.writeInt(S.length),C=C.concat(S),E==="head"&&(l=d),d+=S.length;d%4;)C.push(0),d++;return s.write(C),r=2981146554-n(s.data),s.pos=l+8,s.writeUInt32(r),s.data},n=function(e){var r,s,a,f;for(e=Ff.call(e);e.length%4;)e.push(0);for(a=new Fi(e),s=0,r=0,f=e.length;r<f;r=r+=4)s+=a.readUInt32();return 4294967295&s},t}(),H2={}.hasOwnProperty,Kr=function(n,t){for(var e in t)H2.call(t,e)&&(n[e]=t[e]);function r(){this.constructor=n}return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};Cr=function(){function n(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return n.prototype.parse=function(){},n.prototype.encode=function(){},n.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},n}();var W2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="head",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},n.prototype.encode=function(t){var e;return(e=new Fi).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},n}(),Fu=function(){function n(t,e){var r,s,a,f,l,u,d,m,w,S,p,C,E,O,k,Y,V;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),w=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.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(u=0;u<256;++u)this.codeMap[u]=t.readByte();break;case 4:for(p=t.readUInt16(),S=p/2,t.pos+=6,a=function(){var q,oe;for(oe=[],u=q=0;0<=S?q<S:q>S;u=0<=S?++q:--q)oe.push(t.readUInt16());return oe}(),t.pos+=2,E=function(){var q,oe;for(oe=[],u=q=0;0<=S?q<S:q>S;u=0<=S?++q:--q)oe.push(t.readUInt16());return oe}(),d=function(){var q,oe;for(oe=[],u=q=0;0<=S?q<S:q>S;u=0<=S?++q:--q)oe.push(t.readUInt16());return oe}(),m=function(){var q,oe;for(oe=[],u=q=0;0<=S?q<S:q>S;u=0<=S?++q:--q)oe.push(t.readUInt16());return oe}(),s=(this.length-t.pos+this.offset)/2,l=function(){var q,oe;for(oe=[],u=q=0;0<=s?q<s:q>s;u=0<=s?++q:--q)oe.push(t.readUInt16());return oe}(),u=k=0,V=a.length;k<V;u=++k)for(O=a[u],r=Y=C=E[u];C<=O?Y<=O:Y>=O;r=C<=O?++Y:--Y)m[u]===0?f=r+d[u]:(f=l[m[u]/2+(r-C)-(S-u)]||0)!==0&&(f+=d[u]),this.codeMap[r]=65535&f}t.pos=w}return n.encode=function(t,e){var r,s,a,f,l,u,d,m,w,S,p,C,E,O,k,Y,V,q,oe,ye,ne,K,R,Z,_,I,H,U,se,le,he,te,de,ke,we,A,D,B,W,$,Q,ce,fe,be,Pe,Ie;switch(U=new Fi,f=Object.keys(t).sort(function(ue,Ee){return ue-Ee}),e){case"macroman":for(E=0,O=function(){var ue=[];for(C=0;C<256;++C)ue.push(0);return ue}(),Y={0:0},a={},se=0,de=f.length;se<de;se++)Y[fe=t[s=f[se]]]==null&&(Y[fe]=++E),a[s]={old:t[s],new:Y[t[s]]},O[s]=Y[t[s]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(O),{charMap:a,subtable:U.data,maxGlyphID:E+1};case"unicode":for(I=[],w=[],V=0,Y={},r={},k=d=null,le=0,ke=f.length;le<ke;le++)Y[oe=t[s=f[le]]]==null&&(Y[oe]=++V),r[s]={old:oe,new:Y[oe]},l=Y[oe]-s,k!=null&&l===d||(k&&w.push(k),I.push(s),d=l),k=s;for(k&&w.push(k),w.push(65535),I.push(65535),Z=2*(R=I.length),K=2*Math.pow(Math.log(R)/Math.LN2,2),S=Math.log(K/2)/Math.LN2,ne=2*R-K,u=[],ye=[],p=[],C=he=0,we=I.length;he<we;C=++he){if(_=I[C],m=w[C],_===65535){u.push(0),ye.push(0);break}if(_-(H=r[_].new)>=32768)for(u.push(0),ye.push(2*(p.length+R-C)),s=te=_;_<=m?te<=m:te>=m;s=_<=m?++te:--te)p.push(r[s].new);else u.push(H-_),ye.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*R+2*p.length),U.writeUInt16(0),U.writeUInt16(Z),U.writeUInt16(K),U.writeUInt16(S),U.writeUInt16(ne),Q=0,A=w.length;Q<A;Q++)s=w[Q],U.writeUInt16(s);for(U.writeUInt16(0),ce=0,D=I.length;ce<D;ce++)s=I[ce],U.writeUInt16(s);for(be=0,B=u.length;be<B;be++)l=u[be],U.writeUInt16(l);for(Pe=0,W=ye.length;Pe<W;Pe++)q=ye[Pe],U.writeUInt16(q);for(Ie=0,$=p.length;Ie<$;Ie++)E=p[Ie],U.writeUInt16(E);return{charMap:r,subtable:U.data,maxGlyphID:V+1}}},n}(),If=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="cmap",n.prototype.parse=function(t){var e,r,s;for(t.pos=this.offset,this.version=t.readUInt16(),s=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=s?r<s:r>s;r=0<=s?++r:--r)e=new Fu(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},n.encode=function(t,e){var r,s;return e==null&&(e="macroman"),r=Fu.encode(t,e),(s=new Fi).writeUInt16(0),s.writeUInt16(1),r.table=s.data.concat(r.subtable),r},n}(),V2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="hhea",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},n}(),G2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="OS/2",n.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},n}(),Y2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="post",n.prototype.parse=function(t){var e,r,s;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(r=t.readUInt16(),this.glyphNameIndex=[],a=0;0<=r?a<r:a>r;a=0<=r?++a:--a)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],s=[];t.pos<this.offset+this.length;)e=t.readByte(),s.push(this.names.push(t.readString(e)));return s;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var f,l,u;for(u=[],a=f=0,l=this.file.maxp.numGlyphs;0<=l?f<l:f>l;a=0<=l?++f:--f)u.push(t.readUInt32());return u}).call(this)}},n}(),$2=function(n,t){this.raw=n,this.length=n.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},K2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="name",n.prototype.parse=function(t){var e,r,s,a,f,l,u,d,m,w,S;for(t.pos=this.offset,t.readShort(),e=t.readShort(),l=t.readShort(),r=[],a=0;0<=e?a<e:a>e;a=0<=e?++a:--a)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+l+t.readShort()});for(u={},a=m=0,w=r.length;m<w;a=++m)s=r[a],t.pos=s.offset,d=t.readString(s.length),f=new $2(d,s),u[S=s.nameID]==null&&(u[S]=[]),u[s.nameID].push(f);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},n}(),J2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="maxp",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},n}(),X2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="hmtx",n.prototype.parse=function(t){var e,r,s,a,f,l,u;for(t.pos=this.offset,this.metrics=[],e=0,l=this.file.hhea.numberOfMetrics;0<=l?e<l:e>l;e=0<=l?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(s=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var d,m;for(m=[],e=d=0;0<=s?d<s:d>s;e=0<=s?++d:--d)m.push(t.readInt16());return m}(),this.widths=(function(){var d,m,w,S;for(S=[],d=0,m=(w=this.metrics).length;d<m;d++)a=w[d],S.push(a.advance);return S}).call(this),r=this.widths[this.widths.length-1],u=[],e=f=0;0<=s?f<s:f>s;e=0<=s?++f:--f)u.push(this.widths.push(r));return u},n.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},n}(),Ff=[].slice,Z2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(t){var e,r,s,a,f,l,u,d,m,w;return t in this.cache?this.cache[t]:(a=this.file.loca,e=this.file.contents,r=a.indexOf(t),(s=a.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+r,f=(l=new Fi(e.read(s))).readShort(),d=l.readShort(),w=l.readShort(),u=l.readShort(),m=l.readShort(),this.cache[t]=f===-1?new e5(l,d,w,u,m):new Q2(l,f,d,w,u,m),this.cache[t]))},n.prototype.encode=function(t,e,r){var s,a,f,l,u;for(f=[],a=[],l=0,u=e.length;l<u;l++)s=t[e[l]],a.push(f.length),s&&(f=f.concat(s.encode(r)));return a.push(f.length),{table:f,offsets:a}},n}(),Q2=function(){function n(t,e,r,s,a,f){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=s,this.xMax=a,this.yMax=f,this.compound=!1}return n.prototype.encode=function(){return this.raw.data},n}(),e5=function(){function n(t,e,r,s,a){var f,l;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=s,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],f=this.raw;l=f.readShort(),this.glyphOffsets.push(f.pos),this.glyphIDs.push(f.readUInt16()),32&l;)f.pos+=1&l?4:2,128&l?f.pos+=8:64&l?f.pos+=4:8&l&&(f.pos+=2)}return n.prototype.encode=function(){var t,e,r;for(e=new Fi(Ff.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},n}(),t5=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Kr(n,Cr),n.prototype.tag="loca",n.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?(function(){var s,a;for(a=[],r=0,s=this.length;r<s;r+=2)a.push(2*t.readUInt16());return a}).call(this):(function(){var s,a;for(a=[],r=0,s=this.length;r<s;r+=4)a.push(t.readUInt32());return a}).call(this)},n.prototype.indexOf=function(t){return this.offsets[t]},n.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]}
189,n.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),s=0,a=0,f=0;f<r.length;++f)if(r[f]=s,a<e.length&&e[a]==f){++a,r[f]=s;var l=this.offsets[f],u=this.offsets[f+1]-l;u>0&&(s+=u)}for(var d=new Array(4*r.length),m=0;m<r.length;++m)d[4*m+3]=255&r[m],d[4*m+2]=(65280&r[m])>>8,d[4*m+1]=(16711680&r[m])>>16,d[4*m]=(4278190080&r[m])>>24;return d},n}(),n5=function(){function n(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var t,e,r,s,a;for(e in s=this.font.cmap.tables[0].codeMap,t={},a=this.subset)r=a[e],t[e]=s[r];return t},n.prototype.glyphsFor=function(t){var e,r,s,a,f,l,u;for(s={},f=0,l=t.length;f<l;f++)s[a=t[f]]=this.font.glyf.glyphFor(a);for(a in e=[],s)(r=s[a])!=null&&r.compound&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(a in u=this.glyphsFor(e))r=u[a],s[a]=r;return s},n.prototype.encode=function(t,e){var r,s,a,f,l,u,d,m,w,S,p,C,E,O,k;for(s in r=If.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(t),p={0:0},k=r.charMap)p[(u=k[s]).old]=u.new;for(C in S=r.maxGlyphID,f)C in p||(p[C]=S++);return m=function(Y){var V,q;for(V in q={},Y)q[Y[V]]=V;return q}(p),w=Object.keys(m).sort(function(Y,V){return Y-V}),E=function(){var Y,V,q;for(q=[],Y=0,V=w.length;Y<V;Y++)l=w[Y],q.push(m[l]);return q}(),a=this.font.glyf.encode(f,E,p),d=this.font.loca.encode(a.offsets,E),O={cmap:this.font.cmap.raw(),glyf:a.table,loca:d,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(e)},this.font.os2.exists&&(O["OS/2"]=this.font.os2.raw()),this.font.directory.encode(O)},n}();Ge.API.PDFObject=function(){var n;function t(){}return n=function(e,r){return(Array(r+1).join("0")+e).slice(-r)},t.convert=function(e){var r,s,a,f;if(Array.isArray(e))return"["+function(){var l,u,d;for(d=[],l=0,u=e.length;l<u;l++)r=e[l],d.push(t.convert(r));return d}().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+n(e.getUTCFullYear(),4)+n(e.getUTCMonth(),2)+n(e.getUTCDate(),2)+n(e.getUTCHours(),2)+n(e.getUTCMinutes(),2)+n(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(s in a=["<<"],e)f=e[s],a.push("/"+s+" "+t.convert(f));return a.push(">>"),a.join(` 190`)}return""+e},t}();const Ll=210,Ea=25,Tf=25,ol=Ll-Ea-Tf;function r5(n){const t=String(n.getMonth()+1).padStart(2,"0"),e=String(n.getDate()).padStart(2,"0"),r=String(n.getFullYear());return`${t}/${e}/${r}`}function Mf(n,t=new Date){const e=new Ge({unit:"mm",format:"a4"}),r=`(...${n})`,s=r5(t);let a=25;const f=(w,S,p,C="left")=>{e.setFontSize(w),e.setFont("helvetica",S),e.setTextColor(30);const E=e.splitTextToSize(p,ol),O=w*.5;for(const k of E)a>275&&(e.addPage(),a=20),C==="center"?e.text(k,Ll/2,a,{align:"center"}):e.text(k,Ea,a),a+=O},l=w=>{a+=w};f(14,"bold","AUTOPAY ENROLLMENT CONFIRMATION","center"),l(8);const u=["Pathfinder AI, Inc.","Program Manager for Column, N.A.","5151 E Broadway Blvd, Suite 600","Tucson, AZ 85711","1-833-348-6330","[email protected]"];for(const w of u)f(9,"normal",w,"left");l(8),f(11,"bold","Autopay Enrollment Confirmation"),l(2),f(9,"normal",`Thank you for enrolling in automatic payments (âAutopayâ) for your Pathfinder Card (âCardâ) ${r} issued by Column, N.A.. Your enrollment date is ${s}. This confirmation summarizes your Autopay election.`),l(6),f(11,"bold","Authorization"),l(2),f(9,"normal","By enrolling in Autopay, youâll automatically pay your New Balance amount shown on your Cardâs monthly statement by the Payment Due Date shown on your monthly statement."),l(6),f(11,"bold","Important Information"),l(2);const d=["If your scheduled Payment Due Date falls on a weekend or federal holiday, the payment may be processed on the next business day.","You are responsible for ensuring sufficient funds are available in your designated deposit account on the scheduled payment date.","We may charge you a service charge for returned or rejected payments. Your bank may also assess its customary charge for such payments.","Enrollment in Autopay does not alter your obligation to pay amounts owed under your Account Agreement."];for(const w of d){e.setFontSize(9),e.setFont("helvetica","normal"),e.setTextColor(30);const S=e.splitTextToSize(w,ol-6),p=9*.5;for(let C=0;C<S.length;C++)a>275&&(e.addPage(),a=20),C===0&&e.text("â¢",Ea,a),e.text(S[C],Ea+6,a),a+=p;a+=1}l(4),f(11,"bold","Right to Cancel or Modify Autopay"),l(2),f(9,"normal","You may cancel or modify your Autopay enrollment at any time at least two (2) business days before the next scheduled Payment Due Date by logging into your account or by contacting Customer Service at 1-833-348-6330 or [email protected]."),l(6),f(11,"bold","Electronic Records"),l(2),f(9,"normal","This communication is being provided electronically in accordance with your consent to receive electronic communications. You may retain or print this confirmation for your records."),l(10),f(9,"normal","Sincerely,"),l(1),f(9,"bold","Pathfinder AI, Inc."),f(9,"normal","on behalf of Column, N.A."),l(12),a>260&&(e.addPage(),a=20),e.setDrawColor(200),e.line(Ea,a,Ll-Tf,a),a+=4,e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(120);const m=e.splitTextToSize("Pathfinder is a financial technology company, not a bank. Pathfinder Education Visa® Charge Card (âPathfinder Cardâ) is issued by Column, N.A., Member FDIC, pursuant to a license from Visa U.S.A. Inc. The Pathfinder Card is only available to participants in education savings account programs in the following states: AZ.",ol);for(const w of m)e.text(w,Ea,a),a+=3.5;return e}function i5(n){const t=Uint8Array.from(atob(n),a=>
190a.charCodeAt(0)),e=new Blob([t],{type:"application/pdf"}),r=URL.createObjectURL(e),s=document.createElement("a");s.href=r,s.download="Autopay_Enrollment_Confirmation.pdf",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(r)}function a5(n){const t=Uint8Array.from(atob(n),r=>r.charCodeAt(0)),e=new Blob([t],{type:"application/pdf"});return URL.createObjectURL(e)}function s5(n){const{onClose:t}=n,e=_e.useRef(null),r=_e.useRef(null),s=_e.useRef(null),[a,f]=_e.useState(n.pdfBase64??null),[l,u]=_e.useState(null);return _e.useEffect(()=>{if(n.pdfBase64){f(n.pdfBase64);return}if(n.lastFour){const m=Mf(n.lastFour).output("datauristring").split(",")[1];f(m)}},[n.lastFour,n.pdfBase64]),_e.useEffect(()=>{if(!a)return;const d=a5(a);return u(d),()=>URL.revokeObjectURL(d)},[a]),_e.useEffect(()=>{var w;s.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(w=r.current)==null||w.focus();const d=e.current;if(!d)return;const m=S=>{if(S.key==="Escape"){S.preventDefault(),t();return}if(S.key!=="Tab")return;const p=d.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!p.length)return;const C=p[0],E=p[p.length-1];S.shiftKey&&document.activeElement===C?(S.preventDefault(),E.focus()):!S.shiftKey&&document.activeElement===E&&(S.preventDefault(),C.focus())};return d.addEventListener("keydown",m),()=>{var S,p;d.removeEventListener("keydown",m),(p=(S=s.current)==null?void 0:S.focus)==null||p.call(S)}},[t]),b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"presentation",children:b.jsxs("div",{ref:e,role:"dialog","aria-modal":"true","aria-labelledby":"receipt-modal-title",className:"flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-xl border border-[#ececef] bg-white shadow-lg",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-5 py-3",children:[b.jsx("h2",{id:"receipt-modal-title",className:"text-[15px] font-semibold text-[#1F0151]",children:"AutoPay Enrollment Confirmation"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsxs(Bt,{size:"sm",variant:"outline",disabled:!a,onClick:()=>a&&i5(a),children:[b.jsx(Ch,{className:"mr-1.5 h-3.5 w-3.5"}),"Download PDF"]}),b.jsx("button",{ref:r,type:"button",onClick:t,className:"rounded-md p-1 text-[#6b7079] hover:bg-[#f3f3f4] hover:text-[#2b2d31]","aria-label":"Close",children:b.jsx(di,{className:"h-4 w-4"})})]})]}),b.jsx("div",{className:"flex-1 overflow-hidden",children:l?b.jsx("embed",{src:`${l}#toolbar=0&navpanes=0`,type:"application/pdf",className:"h-full w-full",style:{minHeight:"70vh"}}):b.jsxs("div",{className:"flex h-64 items-center justify-center text-[#6b7079]",children:[b.jsx(Sl,{className:"mr-2 h-4 w-4 animate-spin"})," Generating receiptâ¦"]})})]})})}const Df=_e.forwardRef(({className:n,type:t,...e},r)=>b.jsx("input",{type:t,className:ys("flex h-9 w-full rounded-lg border border-[#e4e5e7] bg-white px-3 py-1 text-[13px] text-[#2b2d31] transition-colors placeholder:text-[#8a8f98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6918eb] focus-visible:border-transparent disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...e}));Df.displayName="Input";const o5={currentBalance:"Current Balance",statementBalance:"Statement Balance",custom:"Custom Amount"},l5="h-9 w-full rounded-lg border border-[#e4e5e7] bg-white px-3 text-[13px] text-[#2b2d31] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6918eb]";function Ra(n){const t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${t}-${e}-${r}`}function Tu(){return Ra(new Date)}function co(n){if(!n)return null;const t=n.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const e=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(e.getTime())?null:e}function c5(n){if(!n)return null;const t=co(n);if(t)return Ra(t);const e=n.match(/^\/Date\((\d+)\)\/$/);if(e){const s=Number(e[1]),a=new Date(s<1e12?s*1e3:s);return Number.isNaN(a.getTime())?null:Ra(a)}const r=new Date(n);return Number.isNaN(r.getTime())?null:Ra(r)}function ll(n,t){return new Date(n.getFullYear(),n.getMonth()+t,1)}function u5(n,t){return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()}function cl(n){const[t,e,r]=n.split("-"),s=new Date(Number(t),Number(e)-1,Number(r));return new Intl.DateTimeFormat(void 0,{month:"long",day:"numeric",year:"numeric"}).format(s)}
190function no(n){return`$${n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`}function f5({paymentMethods:n,currentBalance:t,statementBalance:e,paymentDueDate:r,paying:s,addingBank:a,onSubmit:f,onAddBank:l,onClose:u}){const d=n.filter(ue=>ue.active&&ue.visible&&ue.methodType==="bank"),m=t!=null&&t<=0,w=_e.useId(),S=_e.useRef(null),p=_e.useRef(null),C=_e.useRef(null),[E,O]=_e.useState("form"),[k,Y]=_e.useState(d[0]?String(d[0].id):""),[V,q]=_e.useState("currentBalance"),[oe,ye]=_e.useState(""),[ne,K]=_e.useState(Tu),[R,Z]=_e.useState(!1),[_,I]=_e.useState(()=>{const ue=new Date;return new Date(ue.getFullYear(),ue.getMonth(),1)}),[H,U]=_e.useState(null),se=d.find(ue=>String(ue.id)===k)??null,le=Tu(),he=c5(r),te=V==="currentBalance"?t??0:V==="statementBalance"?e??0:oe?Number(oe)/100:0,de=Number.isFinite(te)&&te>0,ke=ne>=le,we=oe?(Number(oe)/100).toFixed(2):"",A=ue=>ue.replace(/^0+(?=\d)/,""),D=ue=>{ye(A(ue.replace(/\D/g,"")))},B=ue=>{if(!(ue.metaKey||ue.ctrlKey||ue.altKey)&&!["Tab","ArrowLeft","ArrowRight","Home","End"].includes(ue.key)){if(/^\d$/.test(ue.key)){ue.preventDefault(),ye(Ee=>A(`${Ee}${ue.key}`));return}if(ue.key==="Backspace"){ue.preventDefault(),ye(Ee=>Ee.slice(0,-1));return}if(ue.key==="Delete"){ue.preventDefault(),ye("");return}ue.preventDefault()}};_e.useEffect(()=>{var j;C.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(j=p.current)==null||j.focus();const ue=S.current;if(!ue)return;const Ee=Se=>{if(Se.key==="Escape"){Se.preventDefault(),u();return}if(Se.key!=="Tab")return;const Ye=ue.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!Ye.length)return;const Ue=Ye[0],Ne=Ye[Ye.length-1],Be=document.activeElement;Se.shiftKey&&Be===Ue?(Se.preventDefault(),Ne.focus()):!Se.shiftKey&&Be===Ne&&(Se.preventDefault(),Ue.focus())};return ue.addEventListener("keydown",Ee),()=>{var Se,Ye;ue.removeEventListener("keydown",Ee),(Ye=(Se=C.current)==null?void 0:Se.focus)==null||Ye.call(Se)}},[u]),_e.useEffect(()=>{if(ne<le){K(le);const ue=co(le);ue&&I(new Date(ue.getFullYear(),ue.getMonth(),1))}},[ne,le]),co(ne);const W=co(le)??new Date,$=new Date(_.getFullYear(),_.getMonth(),1),Q=new Date($);Q.setDate(Q.getDate()-Q.getDay());const ce=Array.from({length:42},(ue,Ee)=>{const j=new Date(Q);return j.setDate(Q.getDate()+Ee),j}),fe=ll(_,-1)>=new Date(W.getFullYear(),W.getMonth(),1),be=ue=>{const Ee=Ra(ue);Ee<le||(K(Ee),Z(!1))},Pe=()=>{if(U(null),!k){U("Select a payment method first.");return}if(!de){U(V==="custom"?"Enter a valid amount greater than 0.":"The selected balance is not available. Try a custom amount.");return}if(!ke){U("Choose a valid payment date.");return}O("confirm")},Ie=()=>{f({paymentMethodId:Number(k),amount:te,applyDate:ne})};return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:u,children:b.jsxs("div",{ref:S,role:"dialog","aria-modal":"true","aria-labelledby":w,className:"max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl border border-[#ececef] bg-white shadow-xl",onClick:ue=>ue.stopPropagation(),children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-6 py-4",children:[b.jsx("h2",{id:w,className:"text-[16px] font-semibold text-[#1F0151]",children:m?"No Payment Needed":E==="form"?"Make a Payment":"Confirm Payment"}),b.jsx("button",{ref:p,type:"button",onClick:u,className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4]",children:b.jsx(di,{className:"h-5 w-5"})})]}),m?b.jsxs("div",{className:"space-y-4 px-6 py-5",children:[b.jsxs("p",{className:"text-[14px] leading-6 text-[#6b7079]",children:["Your current balance is ",no(t),", so there is nothing to pay."]}),b.jsx(Bt,{className:"h-12 w-full rounded-xl text-[14px] font-semibold",onClick:u,children:"Got it"})]}):E==="form"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"space-y-4 px-6 py-5",children:[H&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:H}),d.length===0?b.jsxs("div",{className:"rounded-xl border border-[#ececef] bg-[#faf7ff] p-5",children:[b.jsx("p",{className:"text-[18px] font-semibold leading-7 text-[#1F0151]",children:"Add a bank account before making your first payment."}),b.jsx("div",{className:"mt-5 flex justify-end",children:b.jsx(Bt,{className:"h-10 rounded-lg bg-gradient-to-b from-[#7C22F2] to-[#5411C1] px-5 text-[14px] font-semibold text-white shadow-none hover:from-[#7C22F2] hover:to-[#5411C1]",disabled:a,onClick:l,children:a?"Adding...":"Add Bank Account"})})]}):b.jsxs(b.Fragment,{children:[b.jsx(ul,{label:"Payment Method",children:b.jsxs("select",{value:k,onChange:ue=>Y(ue.target.value),className:l5,children:[d.length===0&&b.jsx("option",{value:"",children:"No methods available"}),d.map(ue=>b.jsxs("option",{value:ue.id,children:[ue.title||"Payment Method"," (",ue.methodType.toUpperCase(),ue.last4?` â¢â¢â¢â¢ ${ue.last4}`:"",")"]},ue.id))]})}),b.jsx(ul,{label:"Amount",children:b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-lg border border-[#e4e5e7] px-3 py-2.5 transition-colors has-[:checked]:border-[#6918eb] has-[:checked]:bg-[#f8f5ff]",children:[b.jsx("input",{type:"radio",name:"amountType",value:"currentBalance",checked:V==="currentBalance",onChange:()=>q("currentBalance"),className:"accent-[#6918eb]"}),b.jsx("span",{className:"flex-1 text-[13px] text-[#2b2d31]",children:"Current Balance"}),b.jsx("span",{className:"text-[13px] font-semibold text-[#2b2d31]",children:t!=null?no(t):"--"})]}),b.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-lg border border-[#e4e5e7] px-3 py-2.5 transition-colors has-[:checked]:border-[#6918eb] has-[:checked]:bg-[#f8f5ff]",children:[b.jsx("input",{type:"radio",name:"amountType",value:"statementBalance",checked:V==="statementBalance",onChange:()=>q("statementBalance"),className:"accent-[#6918eb]"}),b.jsx("span",{className:"flex-1 text-[13px] text-[#2b2d31]",children:"Statement Balance"}),b.jsx("span",{className:"text-[13px] font-semibold text-[#2b2d31]",children:e!=null?no(e):"--"})]}),b.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-lg border border-[#e4e5e7] px-3 py-2.5 transition-colors has-[:checked]:border-[#6918eb] has-[:checked]:bg-[#f8f5ff]",children:[b.jsx("input",{type:"radio",name:"amountType",value:"custom",checked:V==="custom",onChange:()=>q("custom"),className:"accent-[#6918eb]"}),b.jsx("span",{className:"flex-1 text-[13px] text-[#2b2d31]",children:"Custom Amount"}),V==="custom"&&b.jsxs("span",{className:"flex h-8 w-32 items-center rounded-md border border-[#e4e5e7] bg-white px-2 text-[13px] text-[#2b2d31] focus-within:border-transparent focus-within:ring-2 focus-within:ring-[#6918eb]",children:[b.jsx("span",{className:"text-[#6b7079]",children:"$"}),b.jsx(Df,{type:"text",inputMode:"decimal",value:we,onChange:ue=>D(ue.target.value),onKeyDown:B,onPaste:ue=>{ue.preventDefault(),D(ue.clipboardData.getData("text"))},placeholder:"0.00",className:"h-7 border-0 bg-transparent px-1 py-0 text-right text-[13px] tabular-nums shadow-none focus-visible:ring-0",autoFocus:!0})]})]})]})}),b.jsx(ul,{label:"Payment Date",children:b.jsxs("div",{className:"relative",children:[b.jsxs("button",{type:"button",onClick:()=>Z(ue=>!ue),className:"flex h-10 w-full items-center justify-between rounded-lg border border-[#e4e5e7] bg-white px-3 text-left text-[13px] text-[#2b2d31] transition-colors hover:bg-[#fafafa] focu
190s-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6918eb]","aria-expanded":R,children:[b.jsx("span",{children:cl(ne)}),b.jsx(Fh,{className:"h-4 w-4 text-[#6b7079]"})]}),R&&b.jsxs("div",{className:"absolute bottom-full left-0 right-0 z-10 mb-2 rounded-xl border border-[#ececef] bg-white p-3 shadow-[0_18px_60px_-24px_rgba(31,1,81,0.35)]",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("p",{className:"text-[13px] font-semibold text-[#1F0151]",children:new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}).format(_)}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("button",{type:"button",onClick:()=>fe&&I(ue=>ll(ue,-1)),disabled:!fe,className:"rounded-lg p-1 text-[#6b7079] transition-colors hover:bg-[#f3f3f4] hover:text-[#2b2d31] disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Previous month",children:b.jsx(bc,{className:"h-3.5 w-3.5"})}),b.jsx("button",{type:"button",onClick:()=>I(ue=>ll(ue,1)),disabled:!1,className:"rounded-lg p-1 text-[#6b7079] transition-colors hover:bg-[#f3f3f4] hover:text-[#2b2d31] disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Next month",children:b.jsx(dl,{className:"h-3.5 w-3.5"})})]})]}),b.jsx("div",{className:"mt-3 grid grid-cols-7 gap-0.5 text-center text-[10px] font-medium text-[#8a8f98]",children:["S","M","T","W","T","F","S"].map(ue=>b.jsx("span",{className:"py-1",children:ue},ue))}),b.jsx("div",{className:"mt-0.5 grid grid-cols-7 gap-0.5",children:ce.map(ue=>{const Ee=Ra(ue),j=!u5(ue,_),Se=Ee<le,Ye=Ee===ne,Ue=Ee===le,Ne=he===Ee;return b.jsx("button",{type:"button",onClick:()=>be(ue),disabled:Se,title:Ne?"Payment Due Date":void 0,className:["relative h-7 rounded-full text-[12px] font-medium transition-colors",Ye?"bg-[#6918eb] text-white shadow-[0_8px_18px_-12px_rgba(105,24,235,0.9)]":"",!Ye&&Ne?"bg-[#f8f5ff] text-[#6918eb] ring-1 ring-[#6918eb]/30":"",!Ye&&Ue?"text-[#6918eb]":"",!Ye&&!Ue&&!Ne&&j?"text-[#c4c7cc]":"",!Ye&&!Ue&&!Ne&&!j?"text-[#2b2d31]":"",Se?"cursor-not-allowed opacity-30":"hover:bg-[#f8f5ff] hover:text-[#6918eb]"].join(" "),children:ue.getDate()},Ee)})}),he&&b.jsxs("p",{className:"mt-2 text-[10px] leading-relaxed text-[#6b7079]",children:["Payment Due Date: ",cl(he),"."]})]})]})})]})]}),d.length>0&&b.jsxs("div",{className:"space-y-3 border-t border-[#ececef] px-6 py-4",children:[b.jsx(Bt,{className:"h-12 w-full rounded-xl text-[14px] font-semibold",onClick:Pe,disabled:d.length===0||!de||!ke||!k,children:b.jsxs("span",{className:"inline-flex items-center gap-1",children:["Review Payment ",b.jsx(dl,{className:"h-4 w-4"})]})}),b.jsx("p",{className:"text-[11px] leading-relaxed text-[#6b7079]",children:"Amount must be greater than 0 and cannot exceed allowed balance rules. Payments made online or by phone before midnight Mountain Time (US & Canada) on any day except your Statement Closing Date will be credited as of the same day: on your Statement Closing Date, online and phone payments must be made before 5:00 PM Mountain Time (US & Canada) to be credited as of that day. You can cancel or modify a scheduled payment until 5:00 PM Mountain Time on the scheduled date. Your available credit appears once the payment is submitted."})]})]}),E==="confirm"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"space-y-4 px-6 py-5",children:b.jsxs("div",{className:"rounded-xl border border-[#ececef] bg-white",children:[b.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-[#ececef] px-4 py-3",children:[b.jsx("span",{className:"text-[12px] font-medium text-[#8a8f98]",children:"Payment Method"}),b.jsx("span",{className:"min-w-0 truncate text-right text-[13px] font-medium text-[#2b2d31]",children:se?`${se.title||"Payment Method"} (${se.methodType.toUpperCase()}${se.last4?` â¢â¢â¢â¢ ${se.last4}`:""})`:"--"})]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-[#ececef] px-4 py-3",children:[b.jsx("span",{className:"text-[12px] font-medium text-[#8a8f98]",children:"Amount"}),b.jsxs("span",{className:"text-right",children:[b.jsx("span",{className:"block text-[16px] font-semibold text-[#2b2d31]",children:de?no(te):"--"}),b.jsx("span",{className:"block text-[11px] text-[#8a8f98]",children:o5[V]})]})]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[b.jsx("span",{className:"text-[12px] font-medium text-[#8a8f98]",children:"Payment Date"}),b.jsx("span",{className:"text-[13px] font-medium text-[#2b2d31]",children:ne?cl(ne):"--"})]})]})}),b.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-[#ececef] px-6 py-4",children:[b.jsx(Bt,{variant:"outline",className:"h-12 w-28 rounded-xl text-[14px] font-semibold",onClick:()=>O("form"),disabled:s,children:b.jsxs("span",{className:"inline-flex items-center gap-1",children:[b.jsx(bc,{className:"h-4 w-4"})," Edit"]})}),b.jsx(Bt,{className:"h-12 flex-1 rounded-xl text-[14px] font-semibold",onClick:Ie,disabled:s,children:s?"Submitting...":"Submit"})]})]})]})})}function ul({label:n,children:t}){return b.jsxs("div",{children:[b.jsx("div",{className:"mb-1 flex items-center gap-1",children:b.jsx("span",{className:"text-[12px] font-medium text-[#2b2d31]",children:n})}),t]})}function h5({open:n,agreeing:t,error:e,onAgree:r,onDecline:s,onDismiss:a}){const f=_e.useId(),l=_e.useRef(null),u=_e.useRef(null),d=_e.useRef(null);return _e.useEffect(()=>{var S;if(!n)return;d.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(S=u.current)==null||S.focus();const m=l.current;if(!m)return;const w=p=>{if(p.key==="Escape"){p.preventDefault(),a();return}if(p.key!=="Tab")return;const C=m.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not
190([tabindex="-1"])');if(!C.length)return;const E=C[0],O=C[C.length-1],k=document.activeElement;p.shiftKey&&k===E?(p.preventDefault(),O.focus()):!p.shiftKey&&k===O&&(p.preventDefault(),E.focus())};return m.addEventListener("keydown",w),()=>{var p,C;m.removeEventListener("keydown",w),(C=(p=d.current)==null?void 0:p.focus)==null||C.call(p)}},[n,a]),n?b.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/40 p-4",onClick:a,children:b.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":f,className:"font-[system-ui,-apple-system,BlinkMacSystemFont,'Segoe_UI',sans-serif] max-h-[92vh] w-full max-w-[860px] overflow-hidden rounded-2xl border border-[#ececef] bg-white shadow-xl",onClick:m=>m.stopPropagation(),children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-6 py-4",children:[b.jsx("h2",{id:f,className:"text-[16px] font-semibold text-[#1F0151]",children:"Electronic Payment Terms & Conditions"}),b.jsx("button",{ref:u,type:"button",onClick:a,disabled:t,className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4] disabled:opacity-50","aria-label":"Close",children:b.jsx(di,{className:"h-5 w-5"})})]}),b.jsx("div",{className:"overflow-y-auto px-6 py-5",style:{maxHeight:"calc(92vh - 140px)"},children:b.jsxs("div",{className:"mx-auto max-w-[860px] space-y-5",children:[b.jsx("p",{className:"text-[14px] text-[#2b2d31]",children:"Please review the Electronic Payment Terms and Conditions below. You must agree before making a payment for the first time."}),b.jsx(Oh,{url:"/electronic-payment-terms.pdf",maxHeight:"50vh"}),e&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:e}),b.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4 pb-2 pt-2",children:[b.jsx(Bt,{variant:"outline",onClick:s,disabled:t,className:"min-w-[140px]",children:"Decline"}),b.jsx(Bt,{onClick:()=>void r(),disabled:t,className:"min-w-[140px]",children:t?b.jsxs(b.Fragment,{children:[b.jsx(Sl,{className:"mr-1.5 h-4 w-4 animate-spin"}),"Agreeingâ¦"]}):"Agree"})]})]})})]})}):null}const Il=_e.createContext(null);function d5({value:n,onValueChange:t,children:e,className:r,...s}){return b.jsx(Il.Provider,{value:{value:n,onValueChange:t},children:b.jsx("div",{className:ys("",r),...s,children:e})})}function p5({className:n,children:t,...e}){return b.jsx("div",{className:ys("inline-flex items-center gap-1 border-b border-[#ececef] pb-0",n),...e,children:t})}function Mu({value:n,className:t,children:e,...r}){const s=_e.useContext(Il);if(!s)throw new Error("TabsTrigger must be inside Tabs");const a=s.value===n;return b.jsx("button",{className:ys("inline-flex items-center px-3 py-2 text-[13px] font-medium transition-colors relative",a?"text-[#6918eb]":"text-[#6b7079] hover:text-[#2b2d31]",t),"data-state":a?"active":"inactive",onClick:()=>s.onValueChange(n),...r,children:e})}function Du({value:n,className:t,children:e,...r}){const s=_e.useContext(Il);if(!s)throw new Error("TabsContent must be inside Tabs");return s.value!==n?null:b.jsx("div",{className:ys("mt-4",t),...r,children:e})}const fi=n=>n==null||Number.isNaN(n)?"--":`$${n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,Of=n=>{if(!n)return null;const t=n.match(/^\/Date\((\d+)\)\/$/);if(t){const s=Number(t[1]),a=s<1e12?s*1e3:s,f=new Date(a);return Number.isNaN(f.getTime())?null:f}const e=/^\d{4}-\d{2}-\d{2}$/.test(n),r=new Date(e?`${n}T00:00:00`:n);return Number.isNaN(r.getTime())?null:r},Gr=n=>{const t=Of(n);return t?new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"}).format(t):"--"},Ou=n=>{const t=Of(n);return t?new Intl.DateTimeFormat(void 0,{month:"long",day:"numeric",year:"numeric"}).format(t):"--"},m5={"locAutopay.amountType.static":"Custom Amount","locAutopay.amountType.Minimum":"Min. Payment","locAutopay.amountType.statementBalance":"Statement Balance","locAutopay.amountType.statement":"Statement Balance","locAutopay.amountType.Total":"Total Balance","locAutopay.amountType.amountPastDue":"Past Due"},Ru=n=>m5[n]??n.replace(/^locAutopay\.amountType\./,""),g5=n=>
190n==="autopay.recurringFrequency.monthly"?"Monthly":n.replace(/^autopay\.recurringFrequency\./,""),b5=n=>n==="pending"?"Scheduled":n==="completed"?"Completed":n==="failed"?"Failed":n==="cancelled"?"Cancelled":n.charAt(0).toUpperCase()+n.slice(1),v5=n=>n.status==="reversed"||n.status==="void",y5=(n,t)=>{var r;const e=(r=n.description)==null?void 0:r.trim();return e&&/^(borrower portal payment|customer portal payment)$/i.test(e)?"Online Payment":e||(t?"Account fee":"Card payment")},Rf="https://securepayments.loanpro.io".replace(/\/+$/,""),x5=(()=>{try{return new URL(Rf).origin}catch{return"https://securepayments.loanpro.io"}})(),w5=[0,2e3,5e3,1e4],fl=()=>{const n=new Date,t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${t}-${e}-${r}`},Bf=n=>{if(typeof n=="string"){const s=n.trim();if(!s)return null;if(s.startsWith("{")||s.startsWith("["))try{return Bf(JSON.parse(s))}catch{return null}return null}if(!n||typeof n!="object")return null;const t=n,e=t.token;if(typeof e=="string"&&e.trim())return e.trim();const r=t.data;if(r&&typeof r=="object"){const s=r.token;if(typeof s=="string"&&s.trim())return s.trim()}return null},N5=()=>typeof window<"u"&&window.location.protocol==="https:",A5={settled:"Payment completed successfully.",pending:"Payment was submitted and is still processing.",reversed:"Payment was reversed after submission. Reversed payments are crossed out.",void:"Payment was voided before settlement. Voided payments are crossed out.",declined:"Payment was declined by the processor.",expired:"Payment request expired before completion.",active:"Payment is active and not yet finalized."},_5={fee:"A fee posted to your account (e.g. late fee, returned payment fee, foreign transaction fee).",reversed:"Fee was reversed and is no longer owed. Reversed fees are crossed out.",void:"Fee was voided and is no longer owed. Voided fees are crossed out."};function L5(){const n=Lh(),{capture:t}=Sh(),e=kh(),r=Ph(),[s,a]=_e.useState(!0),[f,l]=_e.useState(!1),[u,d]=_e.useState(e),[m,w]=_e.useState(!e),[S,p]=_e.useState(null),[C,E]=_e.useState({creditLimit:null,currentBalance:null,availableCredit:null,currentDue:null,principalBalance:null,remainingStatementBalance:null,minimumPayment:null,nextPaymentDate:null}),[O,k]=_e.useState([]),[Y,V]=_e.useState([]),[q,oe]=_e.useState([]),[ye,ne]=_e.useState(0),[K,R]=_e.useState(1),[Z,_]=_e.useState([]),[I,H]=_e.useState(0),[U,se]=_e.useState(1),le=10,[he,te]=_e.useState("payments"),[de,ke]=_e.useState(!1),[we,A]=_e.useState(null),[D,B]=_e.useState(!1),[W,$]=_e.useState(!1),Q=_e.useRef(null),[ce,fe]=_e.useState(null),[be,Pe]=_e.useState(null),Ie=_e.useRef(null),ue=_e.useRef(null),Ee=_e.useRef(null),j=_e.useRef(!1),Se=_e.useRef(!1),[Ye,Ue]=_e.useState(null),[Ne,Be]=_e.useState(null),[Fe,Je]=_e.useState(!1),[$e,wt]=_e.useState(null),[ht,rt]=_e.useState(null),[bt,gt]=_e.useState(!1),De=_e.useRef(null),[ot,We]=_e.useState(!1),[Gt,vt]=_e.useState(!1),lt=_e.useRef(null),[tt,Ct]=_e.useState([]),[Ke,Lt]=_e.useState([]),[et,it]=_e.useState(null),[It,dt]=_e.useState(null),[Qe,yt]=_e.useState(!1),[Jr,en]=_e.useState(!1),[wr,rr]=_e.useState(!1),[Xe,Mn]=_e.useState(null),Yn=_e.useRef(null),[Dn,On]=_e.useState(null),[qt,tn]=_e.useState({}),[hn,Er]=_e.useState(null),[wn,Ln]=_e.useState(null),ir=_e.useRef(null),$n=_e.useRef(null),[Kn,Rn]=_e.useState(null),[Ir,Jn]=_e.useState(null),[Xn,Fr]=_e.useState(null),[pi,pr]=_e.useState(!1),[qa,Nr]=_e.useState(null),[Ti,Mi]=_e.useState(!1),[Zn,mr]=_e.useState(null),ar=_e.useMemo(()=>Y.filter(ae=>ae.active&&ae.visible&&ae.methodType==="bank"),[Y]),Xr=_e.useMemo(()=>C.nextPaymentDate??null,[C.nextPaymentDate]),mi=_e.useMemo(()=>ar.find(ae=>ae.isPrimary)??ar[0]??null,[ar]),Tr=_e.useMemo(()=>tt.find(ae=>ae.status==="pending")??tt.find(ae=>ae.status==="active")??tt[0]??null,[tt]),ca=C.remainingStatementBalance??C.currentDue??C.currentBalance,Bn=W&&!j.current&&!Se.current,gi=()=>{Q.current!=null&&(window.clearTimeout(Q.current),Q.current=null)},Di=()=>{lt.current!=null&&(window.clearTimeout(lt.current),lt.current=null)},Yt=ae=>{Di(),wt(ae),lt.current=window.setTimeout(()=>wt(null),5e3)},Zr=()=>{Yn.current!=null&&(window.clearTimeout(Yn.current),Yn.current=null)};_e.useEffect(()=>()=>{gi(),Di(),Zr()},[]),_e.useEffect(()=>{var Te;if(!ce)return;Ee.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(Te=ue.current)==null||Te.focus();const ae=Ie.current;if(!ae)return;const xe=Ze=>{if(Ze.key==="Escape"){Ze.preventDefault(),Mr(),$(!1),j.current=!1,Se.current=!1;return}if(Ze.key!=="Tab")return;const at=ae.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not
190([tabindex="-1"])');if(!at.length)return;const Ut=at[0],yn=at[at.length-1],$t=document.activeElement;Ze.shiftKey&&$t===Ut?(Ze.preventDefault(),yn.focus()):!Ze.shiftKey&&$t===yn&&(Ze.preventDefault(),Ut.focus())};return ae.addEventListener("keydown",xe),()=>{var Ze,at;ae.removeEventListener("keydown",xe),(at=(Ze=Ee.current)==null?void 0:Ze.focus)==null||at.call(Ze)}},[ce]),_e.useEffect(()=>{var Te;if(!wn)return;Ee.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(Te=$n.current)==null||Te.focus();const ae=ir.current;if(!ae)return;const xe=Ze=>{if(Ze.key==="Escape"){Ze.preventDefault(),Ln(null);return}if(Ze.key!=="Tab")return;const at=ae.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!at.length)return;const Ut=at[0],yn=at[at.length-1],$t=document.activeElement;Ze.shiftKey&&$t===Ut?(Ze.preventDefault(),yn.focus()):!Ze.shiftKey&&$t===yn&&(Ze.preventDefault(),Ut.focus())};return ae.addEventListener("keydown",xe),()=>{var Ze,at;ae.removeEventListener("keydown",xe),(at=(Ze=Ee.current)==null?void 0:Ze.focus)==null||at.call(Ze)}},[wn]),_e.useEffect(()=>{if(!r){d(e??null),w(!1);return}let ae=!1;return w(!0),jh(r).then(()=>{ae||d(e??null)}).catch(()=>{ae||d(e??null)}).finally(()=>{ae||w(!1)}),()=>{ae=!0}},[e,r]);const qn=async(ae=!1)=>{if(!u)return p("Missing parent context. Please log in again."),null;ae?l(!0):a(!0),p(null);try{const xe=Hh(u).catch(Br=>({agreedToPaymentTcs:!1})),[Te,Ze,at,Ut,yn,$t,nn,Ri]=await Promise.all([Yh(u),$h(u),Jh(u),Gs(u,{page:1,pageSize:le,kind:"payment"}),Gs(u,{page:1,pageSize:le,kind:"fee"}),td(u).catch(Br=>[]),wc(u).catch(Br=>[]),xe]);return Fr(Ri.agreedToPaymentTcs),E(Te),k(Ze),V(at),oe(Ut.transactions),ne(Ut.total),R(1),_(yn.transactions),H(yn.total),se(1),Ct($t),Lt(nn),Te}catch(xe){return p(xe instanceof Error?xe.message:"Failed to load payments data"),Fr(!1),null}finally{a(!1),l(!1)}};_e.useEffect(()=>{m||qn()},[u,m]);const Mr=()=>{fe(null),Pe(null)};_e.useEffect(()=>{if(!be||!ce||!u)return;let ae=!1;const xe=async Te=>{if(ae||Te.origin!==x5)return;const Ze=Bf(Te.data);if(Ze){ae=!0,Mr(),Be(null);try{const at=await Zh(u,{paymentToken:Ze,title:be.title});V(at.methods??[]),await qn(!0),j.current&&ke(!0),Se.current&&(Xn?yt(!0):(Nr("autopay"),mr(null),pr(!0))),j.current=!1,Se.current=!1}catch(at){Be(at instanceof Error?at.message:"Failed to add payment method"),j.current=!1,Se.current=!1}finally{$(!1)}}};return window.addEventListener("message",xe),()=>{ae=!0,window.removeEventListener("message",xe)}},[be,ce,u]);const Dr=async({returnToPayment:ae=!1,returnToAutopay:xe=!1}={})=>{if(u){if(!N5()){Be("SecurePayments capture forms can only be embedded from an HTTPS app origin. Restart frontend and open the HTTPS dev URL.");return}$(!0),Be(null),j.current=ae,Se.current=xe;try{const Te=await Xh(u),Ze=`${Rf}/api/check-capture-form/${Te.token}?account_type=checking`;Pe({methodType:"bank",title:"Checking Account"}),fe(Ze)}catch(Te){Be(Te instanceof Error?Te.message:"Failed to add bank method"),j.current=!1,Se.current=!1,$(!1)}}},Un=async ae=>{if(!(!u||!window.confirm("Remove this payment method?"))){Ue(ae),Be(null);try{const Te=await Qh(u,{paymentAccountId:ae});V(Te.methods??[]),await qn(!0)}catch(Te){Be(Te instanceof Error?Te.message:"Failed to remove payment method")}finally{Ue(null)}}},Qr=async ae=>{if(u)try{const xe=await Gs(u,{page:ae,pageSize:le,kind:"payment"});oe(xe.transactions),ne(xe.total),R(ae)}catch{}},gr=async ae=>{if(u)try{const xe=await Gs(u,{page:ae,pageSize:le,kind:"fee"});_(xe.transactions),H(xe.total),se(ae)}catch{}},dn=async(ae,xe)=>{gt(!0);try{for(const Te of w5){Te>0&&await j5(Te);const Ze=await qn(!0);if(P5(ae,xe,(Ze==null?void 0:Ze.currentBalance)??null))break}}finally{gt(!1)}},ua=async ae=>{var xe;if(u){A(ae),p(null);try{const Ze=((xe=(await Kh(u,ae)).url)==null?void 0:xe.trim())??"";if(!/^https?:\/\//i.test(Ze))throw new Error("Statement link was invalid. Please try again.");return Ze}catch(Te){return p(Te instanceof Error?Te.message:"Failed to open statement"),null}finally{A(null)}}},Ua=async ae=>{const xe=window.open("","_blank");xe&&(xe.opener=null,xe.document.title="Loading statement...",xe.document.body.textContent="Loading statement...");const Te=await ua(ae.billingCycleId);if(!Te){xe==null||xe.close();return}xe?xe.location.href=Te:window.open(Te,"_blank","noopener,noreferrer")},za=async ae=>{var Ut,yn,$t;if(!u)return;const xe=C.currentBalance,Te=Y.find(nn=>nn.id===ae.paymentMethodId);if(!Te){Yt("Selected payment method not found.");return}Je(!0),wt(null),Di(),t(Ro.PAYMENT_STARTED,{payment_method_type:Te.methodType,is_scheduled:ae.applyDate>fl(),amount_type:"selected_in_payment_form"});const Ze=`${ae.paymentMethodId}:${ae.amount.toFixed(2)}:${ae.applyDate}`;((Ut=De.current)==null?void 0:Ut.fingerprint)!==Ze&&(De.current={fingerprint:Ze,idempotencyKey:(($t=(yn=globalThis.crypto)==null?void 0:yn.randomUUID)==null?void 0:$t.call(yn))??`${Date.now()}-${Math.random().toString(36).slice(2)}`});const at={paymentAccountId:ae.paymentMethodId,amount:ae.amount,applyDate:ae.applyDate,paymentType:"ach",description:"Borrower portal payment",idempotencyKey:De.current.idempotencyKey};try{const nn=await ed(u,at);ke(!1);const Ri=`${Te.title||"Payment Method"}${Te.last4?` â¢â¢â¢â¢ ${Te.last4}`:""}`,Br=nn.scheduled??nn.status==="scheduled";rt({paymentId:nn.paymentId,amount:nn.amount??ae.amount,applyDate:ae.applyDate,methodLabel:Ri,createdAt:new Date().toISOString(),scheduled:Br}),t(Ro.PAYMENT_COMPLETED,{payment_method_type:Te.methodType,is_scheduled:ae.applyDate>fl(),completion_semantics:Br?"payment_schedule_accepted":"payment_api_accepted"}
190),Br?wc(u).then(Lt).catch(Bi=>{}):dn(xe,nn.amount??ae.amount),De.current=null}catch{t(Ro.PAYMENT_FAILED,{payment_method_type:Te.methodType,is_scheduled:ae.applyDate>fl(),failure_type:"payment_api_rejected_or_unavailable"}),Yt("Payment failed. Please contact support if the issue persists.")}finally{Je(!1)}},Ha=async ae=>{if(!(!u||!window.confirm(`Cancel the ${fi(ae.amount)} payment scheduled for ${Gr(ae.applyDate)}?`))){it(ae.id),dt(null);try{const Te=await nd(u,ae.id);Lt(Te.scheduledPayments??[])}catch(Te){dt(Te instanceof Error?Te.message:"Failed to cancel scheduled payment.")}finally{it(null)}}},Sn=ae=>{Zr(),Mn(ae),Yn.current=window.setTimeout(()=>Mn(null),8e3)},fa="We couldn't set up AutoPay right now. Please try again in a moment. If this keeps happening, contact support.",ei=()=>{if(tt.length>0){en(!0),Sn("To change AutoPay, remove your current AutoPay and set up a new one.");return}if(ar.length===0){Mn(null),Dr({returnToAutopay:!0});return}yt(!0)},bi=()=>{if(C.currentBalance!=null&&C.currentBalance<=0){ke(!0);return}if(Xn!==null){if(!Xn){Nr("payment"),mr(null),pr(!0);return}ke(!0)}},Oi=()=>{if(Xn!==null){if(!Xn){Nr("autopay"),mr(null),pr(!0);return}ei()}},Wa=async()=>{if(u){Mi(!0),mr(null);try{await Wh(u),Fr(!0),pr(!1);const ae=qa;Nr(null),ae==="payment"?ke(!0):ae==="autopay"&&ei()}catch(ae){mr(ae instanceof Error?ae.message:"Failed to record agreement")}finally{Mi(!1)}}},Va=()=>{Ti||(pr(!1),Nr(null),mr(null))},Ga=async ae=>{if(u){rr(!0),Mn(null),Zr();try{const Te=(await rd(u,{name:ae.name,type:ae.type,applyDate:ae.applyDate,paymentMethodId:ae.paymentMethodId,recurringFrequency:ae.recurringFrequency||void 0,recurringPeriods:ae.recurringPeriods??void 0})).autopays??[],Ze=new Set(tt.map(Ut=>Ut.id)),at=Te.find(Ut=>!Ze.has(Ut.id));Ct(Te),yt(!1),u&&(Vh(u).catch(Ut=>{}),Ih(u).then(Ut=>{const $t=Mf(Ut).output("datauristring").split(",")[1];Jn({pdfBase64:$t}),at&&u&&sd(u,at.id,$t).catch(nn=>{})}).catch(Ut=>{}))}catch{Sn(fa)}finally{rr(!1)}}},Or=ae=>{Ln(ae)},ha=async()=>{const ae=wn;if(ae&&u){Ln(null),Mn(null),Zr();try{const Te=(await id(u,ae.id)).autopays??[];Ct(Te),!Te.some(at=>at.active)&&u&&Gh(u).catch(at=>{})}catch(xe){Sn(xe instanceof Error?xe.message:"Failed to cancel AutoPay.")}}},Rr=async ae=>{if(Dn===ae.id){On(null);return}if(On(ae.id),!qt[ae.id]&&u){Er(ae.id);try{const xe=await ad(u,ae.id);tn(Te=>({...Te,[ae.id]:xe}))}catch{tn(Te=>({...Te,[ae.id]:[]}))}finally{Er(null)}}},Ya=async ae=>{if(u){Rn(ae.id);try{const xe=await od(u,ae.id);xe.length>0&&xe[0].pdfBase64?Jn({pdfBase64:xe[0].pdfBase64}):Sn("No receipt found for this AutoPay.")}catch{Sn("Failed to load receipt.")}finally{Rn(null)}}};return b.jsxs("div",{className:"min-h-full bg-white font-[var(--font-body)] text-[#2b2d31]",children:[b.jsx("div",{className:"flex min-h-[72px] items-center justify-between border-b border-[#ececef] bg-white px-6",children:b.jsx("h1",{className:"text-[20px] font-semibold tracking-[-0.02em] text-[#1F0151]",children:"Payments"})}),b.jsx("div",{className:"overflow-y-auto px-4 py-6 sm:px-6",style:{maxHeight:"calc(100vh - 80px)"},children:b.jsxs("div",{className:"mx-auto max-w-3xl min-w-0 space-y-6",children:[b.jsxs("div",{className:"grid gap-4",children:[b.jsx(ta,{className:"overflow-hidden",children:b.jsxs(Ia,{className:"p-0",children:[b.jsxs("div",{className:"px-5 py-5 sm:px-6",children:[b.jsxs("div",{className:"flex flex-col gap-5 sm:flex-row sm:items-start sm:justify-between",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:"Current balance"}),s?b.jsx(Yr,{className:"mt-3 h-12 w-44"}):b.jsxs(b.Fragment,{children:[b.jsx("p",{className:"mt-2 text-[36px] font-semibold tracking-[-0.04em] text-[#1F0151]",children:fi(C.currentBalance)}),bt&&b.jsx("p",{className:"mt-1 text-[12px] font-medium text-[#4A237A]",children:"Balance updating..."})]})]}),b.jsxs(Bt,{onClick:bi,className:"h-14 w-full rounded-2xl bg-gradient-to-b from-[#7C22F2] to-[#5411C1] px-8 text-[16px] font-semibold shadow-none transition-colors hover:from-[#7C22F2] hover:to-[#5411C1] sm:w-auto",children:[b.jsx(zh,{className:"mr-2.5 h-5 w-5"}),"Make a Payment"]})]}
190),!s&&C.remainingStatementBalance!=null&&C.remainingStatementBalance<=0&&b.jsxs("div",{className:"mt-4 flex items-center gap-2 text-[#047857]",children:[b.jsx(Bo,{className:"h-5 w-5 shrink-0"}),b.jsx("p",{className:"text-[15px] font-semibold leading-[20px]",children:"Payment not required at this time."})]})]}),b.jsxs("div",{className:"grid gap-0 divide-y divide-[#ececef] border-t border-[#ececef] sm:grid-cols-3 sm:divide-x sm:divide-y-0",children:[b.jsx(hl,{label:"Statement balance",value:fi(ca),loading:s}),b.jsx(hl,{label:"Available credit",value:fi(C.availableCredit),loading:s}),b.jsx(hl,{label:"Payment due date",value:Gr(Xr),loading:s})]})]})}),b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(ta,{className:!s&&Tr?"border-[#d7eadf] bg-[#f7fcf9]":void 0,children:b.jsx(Ia,{className:"p-4",children:b.jsxs("div",{className:"min-w-0",children:[b.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:"Payment method"}),!s&&(mi?b.jsx("button",{type:"button",onClick:()=>B(!0),className:"flex h-7 w-7 items-center justify-center rounded-lg border border-[#ececef] text-[#6918eb] transition-colors hover:bg-[#f8f5ff] disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Manage payment methods",children:b.jsx(xc,{className:"h-3.5 w-3.5"})}):b.jsx(Bt,{size:"sm",className:"rounded-lg bg-gradient-to-b from-[#7C22F2] to-[#5411C1] px-4 font-semibold text-white shadow-none hover:from-[#7C22F2] hover:to-[#5411C1]",disabled:Bn,onClick:()=>void Dr(),children:Bn?"Adding...":"Add Bank Account"}))]}),s?b.jsx(Yr,{className:"mt-3 h-5 w-40"}):mi?b.jsx(b.Fragment,{children:b.jsx("p",{className:"mt-2 truncate text-[15px] font-semibold text-[#2b2d31]",children:mi.title||"Linked bank account"})}):b.jsx("div",{className:"mt-2",children:b.jsx("p",{className:"text-[13px] leading-relaxed text-[#6b7079]",children:"Add a bank account before making your first payment."})})]})})}),b.jsx(ta,{children:b.jsx(Ia,{className:"p-4",children:b.jsxs("div",{className:"min-w-0",children:[b.jsxs("div",{className:"flex items-start justify-between gap-3",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:"AutoPay"}),b.jsx("a",{href:"/payments/autopay-guide",target:"_blank",rel:"noreferrer",className:"mt-1 inline-flex text-[12px] text-[#6918eb] hover:underline",children:"How does AutoPay work?"})]}),!s&&(tt.length>0?b.jsx("button",{type:"button",onClick:()=>en(!0),className:"flex h-7 w-7 items-center justify-center rounded-lg border border-[#ececef] text-[#6918eb] transition-colors hover:bg-[#f8f5ff]","aria-label":"Manage AutoPay",children:b.jsx(xc,{className:"h-3.5 w-3.5"})}):b.jsx(Bt,{size:"sm",className:"rounded-lg bg-gradient-to-b from-[#7C22F2] to-[#5411C1] px-4 font-semibold text-white shadow-none hover:from-[#7C22F2] hover:to-[#5411C1]",onClick:Oi,disabled:Xn===null,children:"Set Up AutoPay"}))]}),s?b.jsx(Yr,{className:"mt-3 h-5 w-36"}):Tr?b.jsxs("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-center",children:[b.jsxs(mc,{variant:"success",className:"w-fit gap-1 border-[#b9dec7] bg-[#e
1906f4ec] text-[#2f7a53]",children:[b.jsx(Bo,{className:"h-3 w-3"}),"Active"]}),b.jsxs("p",{className:"text-[13px] text-[#2b2d31]",children:[Ru(Tr.amountType),Tr.applyDate?` scheduled on ${Gr(Tr.applyDate)}`:""]})]}):b.jsx("p",{className:"mt-2 text-[13px] leading-relaxed text-[#6b7079]",children:"Set up AutoPay to automate future card payments."})]})})})]})]}),S&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:S}),$e&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:$e}),Xe&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:Xe}),It&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:It}),ht&&b.jsx(ta,{className:"border-[#d7eadf] bg-[#f7fcf9]",children:b.jsx(Ia,{className:"pt-4 pb-4",children:b.jsxs("div",{className:"flex items-start gap-3",children:[b.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[#e6f4ec] text-[#2f7a53]",children:b.jsx(Bo,{className:"h-5 w-5"})}),b.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[b.jsx("p",{className:"text-[14px] font-semibold text-[#2f7a53]",children:ht.scheduled?"Payment scheduled successfully":"Payment submitted successfully"}),b.jsxs("div",{className:"grid grid-cols-1 gap-x-6 gap-y-1 text-[12px] text-[#2b2d31] sm:grid-cols-2",children:[b.jsxs("div",{className:"flex justify-between gap-4",children:[b.jsx("span",{className:"text-[#6b7079]",children:"Amount"}),b.jsx("span",{className:"font-semibold",children:fi(ht.amount)})]}),b.jsxs("div",{className:"flex justify-between gap-4",children:[b.jsx("span",{className:"text-[#6b7079]",children:"Payment Date"}),b.jsx("span",{children:Gr(ht.applyDate)})]}),b.jsxs("div",{className:"flex justify-between gap-4",children:[b.jsx("span",{className:"text-[#6b7079]",children:"Payment Method"}),b.jsx("span",{className:"truncate text-right",children:ht.methodLabel})]})]})]}),b.jsx("button",{type:"button",onClick:()=>rt(null),className:"shrink-0 rounded-md p-1 text-[#6b7079] hover:bg-[#eaf5ee] hover:text-[#2b2d31] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2f7a53]","aria-label":"Close payment confirmation",children:b.jsx(di,{className:"h-4 w-4"})})]})})}),b.jsxs(d5,{value:he,onValueChange:te,className:"mx-auto max-w-3xl space-y-5",children:[b.jsxs(p5,{className:"grid w-full grid-cols-2 rounded-2xl border border-[#ececef] bg-white p-1 shadow-none",children:[b.jsx(Mu,{value:"payments",className:"h-10 justify-center rounded-xl data-[state=active]:bg-white data-[state=active]:shadow-sm",children:"Payments"}),b.jsx(Mu,{value:"statements",className:"h-10 justify-center rounded-xl data-[state=active]:bg-white data-[state=active]:shadow-sm",children:"Statements"})]}),b.jsxs(Du,{value:"payments",className:"space-y-5",children:[Ke.length>0&&b.jsx(S5,{scheduledPayments:Ke,cancellingScheduledPaymentId:et,onCancel:Ha}),b.jsx(qu,{title:"Payment history",subtitle:"Payments submitted from your card account.",loading:s,loadingRows:4,transactions:q,emptyText:"No payments yet.",tone:"payment",help:b.jsx("button",{type:"button",onClick:()=>We(!0),className:"rounded p-0.5 text-[#8a8f98] hover:text-[#2b2d31] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6918eb]","aria-label":"Payment history statuses",children:b.jsx(vc,{className:"h-3.5 w-3.5"})}),pagination:ye>le?b.jsx(Bu,{page:K,totalPages:Math.ceil(ye/le),onPrevious:()=>Qr(K-1),onNext:()=>Qr(K+1)}):null}),(s||I>0||Z.length>0)&&b.jsx(qu,{title:"Fees",subtitle:"Fees posted to the account, including reversals when applicable.",loading:s,loadingRows:2,transactions:Z,emptyText:"No fees on your account.",tone:"fee",help:b.jsx("button",{type:"button",onClick:()=>vt(!0),className:"rounded p-0.5 text-[#8a8f98] hover:text-[#2b2d31] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6918eb]","aria-label":"Fee statuses",children:b.jsx(vc,{className:"h-3.5 w-3.5"})}),pagination:I>le?b.jsx(Bu,{page:U,totalPages:Math.ceil(I/le),onPrevious:()=>gr(U-1),onNext:()=>gr(U+1)}):null})]}),b.jsxs(Du,{value:"statements",className:"mx-auto max-w-3xl space-y-5",children:[b.jsx(Fl,{children:"Statements"}),b.jsx(ta,{className:"overflow-hidden border-[#ececef]",children:b.jsxs(Th,{children:[b.jsx(Mh,{children:b.jsxs(Vs,{className:"hover:bg-transparent",children:[b.jsx(gc,{children:"Period"}),b.jsx(gc,{className:"w-32 text-right",children:"Preview"})]})}),b.jsxs(Dh,{children:[s&&Array.from({length:4}).map((ae,xe)=>
190b.jsxs(Vs,{children:[b.jsx(hs,{children:b.jsx(Yr,{className:"h-4 w-48"})}),b.jsx(hs,{className:"text-right",children:b.jsx(Yr,{className:"ml-auto h-8 w-20 rounded-lg"})})]},xe)),!s&&O.length===0&&b.jsx(Vs,{children:b.jsx(hs,{colSpan:2,className:"py-8 text-center text-[#6b7079]",children:"No statements available yet."})}),!s&&O.map(ae=>b.jsxs(Vs,{children:[b.jsxs(hs,{className:"min-w-0 whitespace-normal text-[#2b2d31]",children:[Ou(ae.periodStart)," â ",Ou(ae.periodEnd)]}),b.jsx(hs,{className:"text-right",children:b.jsx(Bt,{type:"button",size:"sm",variant:"outline",className:"h-8 shrink-0 px-3",disabled:!ae.hasPdf||we===ae.billingCycleId,onClick:()=>Ua(ae),"aria-label":we===ae.billingCycleId?"Loading statement PDF":"Preview statement PDF",children:we===ae.billingCycleId?"Loading...":"Preview"})})]},ae.billingCycleId))]})]})})]})]})]})}),b.jsx(h5,{open:pi,agreeing:Ti,error:Zn,onAgree:Wa,onDecline:()=>n("/welcome"),onDismiss:Va}),de&&b.jsx(f5,{paymentMethods:ar,currentBalance:C.currentBalance,statementBalance:C.remainingStatementBalance,paymentDueDate:Xr,paying:Fe,addingBank:W,onSubmit:za,onAddBank:()=>{ke(!1),Dr({returnToPayment:!0})},onClose:()=>ke(!1)}),ce&&b.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",role:"presentation",children:b.jsxs("div",{ref:Ie,role:"dialog","aria-modal":"true","aria-labelledby":"capture-modal-title",className:"h-[85vh] w-full max-w-3xl overflow-hidden rounded-xl border border-[#ececef] bg-white shadow-lg",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-4 py-3",children:[b.jsx("p",{id:"capture-modal-title",className:"text-[13px] font-semibold text-[#2b2d31]",children:"Secure Bank Account Capture"}),b.jsx(Bt,{ref:ue,size:"sm",variant:"outline",onClick:()=>{Mr(),$(!1),j.current=!1,Se.current=!1},children:"Cancel"})]}),b.jsx("iframe",{src:ce,title:"SecurePayments Capture",className:"h-[calc(85vh-57px)] w-full"})]})}),D&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"presentation",children:b.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"payment-methods-modal-title",className:"w-full max-w-lg overflow-hidden rounded-2xl border border-[#ececef] bg-white shadow-xl",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-5 py-4",children:[b.jsxs("div",{children:[b.jsx("h2",{id:"payment-methods-modal-title",className:"text-[16px] font-semibold text-[#1F0151]",children:"Payment Methods"}),b.jsx("p",{className:"mt-0.5 text-[12px] text-[#6b7079]",children:"Manage the bank accounts used for card payments."})]}),b.jsx("button",{type:"button",onClick:()=>B(!1),className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4] hover:text-[#2b2d31]","aria-label":"Close payment methods",children:b.jsx(di,{className:"h-5 w-5"})})]}),b.jsxs("div",{className:"space-y-4 px-5 py-4",children:[Ne&&b.jsx("p",{className:"rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:Ne}),b.jsx("div",{className:"overflow-hidden rounded-xl border border-[#ececef]",children:ar.length===0?b.jsx("p",{className:"px-4 py-6 text-center text-[13px] text-[#6b7079]",children:"No ACH payment methods linked yet."}):ar.map(ae=>b.jsxs("div",{className:"flex items-center gap-3 border-b border-[#ececef] px-4 py-3 last:border-b-0",children:[b.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-[#f8f3fe] text-[#6918eb]",children:b.jsx(yc,{className:"h-4 w-4"})}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("p",{className:"truncate text-[13px] font-medium text-[#2b2d31]",children:ae.title||"Payment Method"}),b.jsxs("p",{className:"text-[12px] text-[#6b7079]",children:["ACH",ae.last4?` ending in ${ae.last4}`:""]})]}),b.jsxs(Bt,{size:"sm",variant:"outline",onClick:()=>Un(ae.id),disabled:Ye===ae.id,children:[b.jsx(Eh,{className:"mr-1.5 h-3.5 w-3.5"}),Ye===ae.id?"Removing...":"Remove"]})]},ae.id))})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[#ececef] px-5 py-4",children:[b.jsx(Bt,{variant:"outline",onClick:()=>B(!1),children:"Done"}),b.jsxs(Bt,{onClick:()=>void Dr(),disabled:Bn,children:[b.jsx(yc,{className:"mr-1.5 h-3.5 w-3.5"}),Bn?"Adding...":"Add Bank Account"]})]})]})}),ot&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"presentation",children:b.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"payment-status-modal-title",className:"w-full max-w-md overflow-hidden rounded-2xl border border-[#ececef] bg-white shadow-xl",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-5 py-4",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:"Payment History"}),b.jsx("h2",{id:"payment-status-modal-title",className:"mt-1 text-[16px] font-semibold text-[#1F0151]",children:"Status Guide"})]}),b.jsx("button",{type:"button",onClick:()=>We(!1),className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4] hover:text-[#2b2d31]","aria-label":"Close payment status guide",children:b.jsx(di,{className:"h-5 w-5"})})]}),b.jsx("div",{className:"divide-y divide-[#ececef] px-5 py-2",children:Object.entries(A5).map(([ae,xe])=>b.jsxs("div",{className:"py-3",children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:ae}),b.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-[#6b7079]",children:xe})]},ae))})]})}),Gt&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"presentation",children:b.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"fee-status-modal-title",className:"w-full max-w-md overflow-hidden rounded-2xl border border-[#ececef] bg-white shadow-xl",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-5 py-4",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:"Fees"}),b.jsx("h2",{id:"fee-status-modal-title",className:"mt-1 text-[16px] font-semibold text-[#1F0151]",children:"Status Guide"})]}),b.jsx("button",{type:"button",onClick:()=>vt(!1),className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4] hover:text-[#2b2d31]","aria-label":"Close fee status guide",children:b.jsx(di,{className:"h-5 w-5"})})]}),b.jsx("div",{className:"divide-y divide-[#ececef] px-5 py-2",children:Object.entries(_5).map(([ae,xe])=>b.jsxs("div",{className:"py-3",children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:ae}),b.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-[#6b7079]",children:xe})]},ae))})]})}),Jr&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"presentation",children:b.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"autopay-manage-modal-title",className:"max-h-[90vh] w-full max-w-2xl overflow-hidden rounded-2xl border border-[#ececef] bg-white shadow-xl",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-[#ececef] px-5 py-4",children:[b.jsxs("div",{children:[b.jsx("h2",{id:"autopay-manage-modal-title",className:"text-[16px] font-semibold text-[#1F0151]",children:"AutoPay"}),b.jsx("p",{className:"mt-0.5 text-[12px] text-[#6b7079]",children:"Manage your scheduled AutoPays, receipts, and payment history."})]}),b.jsx("button",{type:"button",onClick:()=>en(!1),className:"rounded-lg p-1 text-[#6b7079] hover:bg-[#f3f3f4] hover:text-[#2b2d31]","aria-label":"Close AutoPay management",children:b.jsx(di,{className:"h-5 w-5"})})]}),b.jsxs("div",{className:"max-h-[calc(90vh-145px)] overflow-y-auto px-5 py-4",children:[Xe&&b.jsx("p",{className:"mb-4 rounded-lg border border-[#f3d7cf] bg-[#fdf3f0] px-3 py-2 text-[13px] text-[#c04c2d]",children:Xe}),tt.length===0?b.jsx("p",{className:"rounded-xl border border-[#ececef] px-4 py-6 text-center text-[13px] text-[#6b7079]",children:"No scheduled AutoPays. Set one up to automate your payments."}):b.jsx("div",{className:"space-y-3",children:b.jsx("div",{className:"overflow-hidden rounded-xl border border-[#ececef]",children:tt.map(ae=>{const xe=Dn===ae.id,Te=qt[ae.id],Ze=hn===ae.id;return b.jsxs("div",{className:"border-b border-[#ececef] last:border-b-0",children:[b.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center",children:[b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("p",{className:"truncate text-[13px] font-medium text-[#2b2d31]",children:ae.name||"AutoPay"}),b.jsxs("p",{className:"text-[12px] text-[#6b7079]",children:[ae.recurringFrequency?`${g5(ae.recurringFrequency)} · `:"",ae.amount!=null&&ae.amount>0?fi(ae.amount):Ru(ae.amountType),ae.applyDate?` · Next: ${Gr(ae.applyDate)}`:""]}),ae.status==="failed"&&b.jsxs("p",{className:"mt-1 text-[11px] text-[#c04c2d]",children:["Your scheduled payment",ae.applyDate?` on ${Gr(ae.applyDate)}`:""," could not be processed. AutoPay remains active â review your payment method before your next Payment Due Date."]})]}),b.jsxs("div",{className:"flex flex-wrap gap-2",children:[b.jsx(Bt,{size:"sm",variant:"outline",onClick:()=>Ya(ae),disabled:Kn===ae.id,"aria-label":"Download AutoPay receipt",children:Kn===ae.id?"Loading...":"Receipt"}),b.jsx(Bt,{size:"sm",variant:"outline",onClick:()=>Rr(ae),"aria-label":xe?"Hide payment history":"Show payment history","aria-expanded":xe,children:xe?"Hide History":"History"}),b.jsx(Bt,{size:"sm",variant:"outline",className:"text-[#c04c2d] hover:text-[#c04c2d]",onClick:()=>Or(ae),"aria-label":"Cancel AutoPay",children:"Remove"})]})]}),xe&&b.jsxs("div",{className:"border-t border-[#ececef] bg-[#fafafa] px-6 py-3",children:[Ze&&b.jsxs("div",{className:"flex items-center gap-2 py-2 text-[12px] text-[#6b7079]",children:[b.jsx(Sl,{className:"h-3.5 w-3.5 animate-spin"})," Loading history..."]}),!Ze&&Te&&Te.length===0&&b.jsx("p",{className:"py-2 text-[12px] text-[#6b7079]",children:"No payments have been processed by this AutoPay yet."}),!Ze&&Te&&Te.length>0&&b.jsxs("div",{className:"space-y-0",children:[b.jsxs("div",{className:"mb-1.5 grid grid-cols-4 gap-2 text-[11px] font-medium uppercase tracking-wider text-[#8a8f98]",children:[b.jsx("span",{children:"Date"}),b.jsx("span",{children:"Amount"}),b.jsx("span",{children:"Description"}),b.jsx("span",{children:"Status"})]}),Te.map((at,Ut)=>b.jsxs("div",{className:"grid grid-cols-4 gap-2 border-t border-[#ececef] py-1.5 text-[12px] text-[#2b2d31]",children:[b.jsx("span",{children:at.applyDate?Gr(at.applyDate):"--"}),b.jsx("span",{children:at.amount!=null?fi(at.amount):"--"}),b.jsx("span",{className:"truncate text-[#6b7079]",children:at.description||"--"}),b.jsx("span",{children:b.jsx(mc,{variant:at.status==="active"?"success":at.status==="reversed"||at.status==="void"?"destructive":"secondary",className:"text-[10px]",children:at.status})})]},at.id??Ut))]})]})]},ae.id)})})})]}),b.jsxs("div",{className:"flex flex-col gap-3 border-t border-[#ececef] px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[tt.length>0&&b.jsx("p",{className:"text-[12px] leading-relaxed text-[#6b7079]",children:"To edit AutoPay, remove your current AutoPay and set up a new one."}),b.jsx(Bt,{variant:"outline",onClick:()=>en(!1),children:"Done"})]})]})}),wn&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"presentation",children:b.jsxs("div",{ref:ir,role:"dialog","aria-modal":"true","aria-labelledby":"
190cancel-autopay-title","aria-describedby":"cancel-autopay-description",className:"w-full max-w-md rounded-xl border border-[#ececef] bg-white shadow-lg",children:[b.jsx("div",{className:"border-b border-[#ececef] px-5 py-4",children:b.jsx("h2",{id:"cancel-autopay-title",className:"text-[16px] font-semibold text-[#1F0151]",children:"Cancel AutoPay"})}),b.jsxs("div",{className:"space-y-2 px-5 py-4",children:[b.jsxs("p",{id:"cancel-autopay-description",className:"text-[13px] text-[#2b2d31]",children:["You are cancelling ",b.jsx("span",{className:"font-semibold",children:wn.name}),". This will stop future scheduled payments for this AutoPay."]}),b.jsxs("p",{className:"text-[12px] text-[#6b7079]",children:["Current status: ",b5(wn.status),wn.applyDate?` · Next date: ${Gr(wn.applyDate)}`:""]})]}),b.jsxs("div",{className:"flex justify-end gap-2 border-t border-[#ececef] px-5 py-4",children:[b.jsx(Bt,{ref:$n,variant:"outline",onClick:()=>Ln(null),children:"Keep AutoPay"}),b.jsx(Bt,{variant:"destructive",onClick:ha,children:"Cancel AutoPay"})]})]})}),Qe&&b.jsx(hd,{mode:"create",existingAutopay:null,paymentMethods:ar,paymentDueDate:Xr,saving:wr,onSave:Ga,onClose:()=>yt(!1)}),Ir&&b.jsx(s5,{...Ir,onClose:()=>Jn(null)})]})}function hl({label:n,value:t,loading:e}){return b.jsxs("div",{className:"px-5 py-4",children:[b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:n}),e?b.jsx(Yr,{className:"mt-2 h-6 w-28"}):b.jsx("p",{className:"mt-1 text-[18px] font-medium tracking-[-0.02em] text-[#2b2d31]",children:t})]})}function Bu({page:n,totalPages:t,onPrevious:e,onNext:r}){return b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsxs("p",{className:"text-[12px] text-[#6b7079]",children:["Page ",n," of ",t]}),b.jsx(Bt,{size:"sm",variant:"outline",disabled:n<=1,onClick:e,children:"Previous"}),b.jsx(Bt,{size:"sm",variant:"outline",disabled:n>=t,onClick:r,children:"Next"})]})}function S5({scheduledPayments:n,cancellingScheduledPaymentId:t,onCancel:e}){return b.jsx(ta,{className:"mx-auto w-full max-w-3xl overflow-hidden border-[#e1d3f6] bg-white shadow-none",children:b.jsxs(Ia,{className:"p-0",children:[b.jsxs("div",{className:"border-b border-[#ececef] px-5 py-4",children:[b.jsx(Fl,{children:"Scheduled payments"}),b.jsx("p",{className:"mt-1 text-[12px] text-[#6b7079]",children:"These payments will move to payment history after processing."})]}),b.jsx("div",{className:"divide-y divide-[#ececef]",children:n.map(r=>{const s=t===r.id;return b.jsxs("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center",children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("p",{className:"text-[13px] font-medium text-[#2b2d31]",children:"Scheduled payment"}),b.jsx("p",{className:"mt-1 text-[11px] text-[#6b7079]",children:Gr(r.applyDate)})]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 sm:justify-end",children:[b.jsx("p",{className:"text-[14px] font-semibold tabular-nums text-[#2b2d31]",children:fi(r.amount)}),b.jsx(Bt,{type:"button",size:"sm",variant:"outline",className:"h-8 border-[#f0c9c0] px-3 text-[#c04c2d] hover:bg-[#fdf3f0] hover:text-[#a33b22]",disabled:s,onClick:()=>e(r),children:s?"Cancelling...":"Cancel"})]})]},r.id)})})]})})}function qu({title:n,subtitle:t,loading:e,loadingRows:r,transactions:s,emptyText:a,tone:f,help:l,pagination:u}){return b.jsx(ta,{className:"mx-auto w-full max-w-3xl overflow-hidden border-[#ececef] bg-white shadow-none",children:b.jsxs(Ia,{className:"p-0",children:[b.jsxs("div",{className:"flex flex-col gap-3 border-b border-[#ececef] px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(Fl,{children:n}),l]}),b.jsx("p",{className:"mt-1 text-[12px] text-[#6b7079]",children:t})]}),!e&&u]}),b.jsxs("div",{className:"divide-y divide-[#ececef]",children:[e&&Array.from({length:r}).map((d,m)=>b.jsxs("div",{className:"flex items-center justify-between gap-4 px-5 py-3",children:[b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx(Yr,{className:"h-4 w-48"}),b.jsx(Yr,{className:"mt-1.5 h-3 w-24"})]}),b.jsxs("div",{className:"flex flex-col items-end gap-2",children:[b.jsx(Yr,{className:"h-4 w-16"}
190),b.jsx(Yr,{className:"h-5 w-14 rounded-full"})]})]},m)),!e&&s.length===0&&b.jsx("div",{className:"px-5 py-8 text-center",children:b.jsx("p",{className:"text-[13px] text-[#6b7079]",children:a})}),!e&&s.map((d,m)=>b.jsx(k5,{transaction:d,tone:f},`${d.type}-${d.id??m}`))]})]})})}function k5({transaction:n,tone:t}){const e=v5(n),r=t==="fee",s=r?e?`Fee · ${n.status}`:"Fee":n.status,a=y5(n,r),f=e?"text-[#8a8f98] line-through":"text-[#2b2d31]";return b.jsxs("div",{className:"grid gap-2 px-5 py-3 transition-colors hover:bg-[#fafafa] sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center",children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("p",{className:`truncate text-[13px] font-medium ${e?"text-[#8a8f98] line-through":"text-[#2b2d31]"}`,children:a}),b.jsxs("p",{className:`mt-0.5 text-[11px] ${e?"text-[#8a8f98] line-through":"text-[#6b7079]"}`,children:[n.applyDate?Gr(n.applyDate):"--",b.jsx("span",{className:"mx-1.5 text-[#c8cbd0]",children:"·"}),b.jsx("span",{className:"capitalize",children:s})]})]}),b.jsx("div",{className:"flex items-center justify-between gap-3 sm:justify-end",children:b.jsx("p",{className:`text-[13px] font-medium tabular-nums ${f}`,children:n.amount!=null?fi(n.amount):"--"})})]})}function Fl({children:n}){return b.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#1F0151]",children:n})}function P5(n,t,e){return n==null||e==null||Number.isNaN(t)?!1:e<=Math.max(n-t,0)}function j5(n){return new Promise(t=>window.setTimeout(t,n))}const G5=Object.freeze(Object.defineProperty({__proto__:null,default:L5},Symbol.toStringTag,{value:"Module"}));export{G5 as P,jt as _};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.