UNPKG

jspdf-invoice-template-nodejs

Version:

PDF template created for invoice with optional parameters (for NodeJs). Using jsPDF library.

2 lines 358 kB
/*! For license information please see index.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.jsPDFInvoiceTemplate=e():t.jsPDFInvoiceTemplate=e()}(global,(()=>(()=>{"use strict";var t,e,n,r,i={2284:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:()=>r})}},a={};function o(t){var e=a[t];if(void 0!==e)return e.exports;var n=a[t]={exports:{}};return i[t].call(n.exports,n,n.exports,o),n.exports}o.m=i,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>n[t]));return a.default=()=>n,o.d(i,a),i},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>t+".index.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},r="jsPDFInvoiceTemplate:",o.l=(t,e,i,a)=>{if(n[t])n[t].push(e);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var h=u[l];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==r+i){s=h;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",r+i),s.src=t),n[t]=[e];var f=(e,r)=>{s.onerror=s.onload=null,clearTimeout(d);var i=n[t];if(delete n[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(r))),e)return e(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.p="",(()=>{var t={792:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=t[e]=[n,i]));n.push(r[2]=i);var a=o.p+o.u(e),s=new Error;o.l(a,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,r[1](s)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[a,s,c]=n,u=0;if(a.some((e=>0!==t[e]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);c&&c(o)}for(e&&e(n);u<a.length;u++)i=a[u],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=global.webpackChunkjsPDFInvoiceTemplate=global.webpackChunkjsPDFInvoiceTemplate||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})();var s={};return(()=>{o.r(s),o.d(s,{OutputType:()=>un,default:()=>ln,jsPDF:()=>Lt});var t=o(2284),e=Uint8Array,n=Uint16Array,r=Uint32Array,i=new e([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]),a=new e([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]),c=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var o=new r(i[30]);for(a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)o[s]=s-i[a]<<5|a;return[i,o]},l=u(i,2),h=l[0],f=l[1];h[28]=258,f[258]=28;for(var d=u(a,0),p=d[0],g=d[1],m=new n(32768),v=0;v<32768;++v){var b=(43690&v)>>>1|(21845&v)<<1;b=(61680&(b=(52428&b)>>>2|(13107&b)<<2))>>>4|(3855&b)<<4,m[v]=((65280&b)>>>8|(255&b)<<8)>>>1}var y=function(t,e,r){for(var i=t.length,a=0,o=new n(e);a<i;++a)++o[t[a]-1];var s,c=new n(e);for(a=0;a<e;++a)c[a]=c[a-1]+o[a-1]<<1;if(r){s=new n(1<<e);var u=15-e;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],h=e-t[a],f=c[t[a]-1]++<<h,d=f|(1<<h)-1;f<=d;++f)s[m[f]>>>u]=l}else for(s=new n(i),a=0;a<i;++a)s[a]=m[c[t[a]-1]++]>>>15-t[a];return s},w=new e(288);for(v=0;v<144;++v)w[v]=8;for(v=144;v<256;++v)w[v]=9;for(v=256;v<280;++v)w[v]=7;for(v=280;v<288;++v)w[v]=8;var N=new e(32);for(v=0;v<32;++v)N[v]=5;var x=y(w,9,0),L=y(w,9,1),A=y(N,5,0),S=y(N,5,1),_=function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},P=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>>(7&e)&n},k=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>>(7&e)},F=function(t){return(t/8|0)+(7&t&&1)},I=function(t,i,a){(null==i||i<0)&&(i=0),(null==a||a>t.length)&&(a=t.length);var o=new(t instanceof n?n:t instanceof r?r:e)(a-i);return o.set(t.subarray(i,a)),o},j=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8},C=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},O=function(t,r){for(var i=[],a=0;a<t.length;++a)t[a]&&i.push({s:a,f:t[a]});var o=i.length,s=i.slice();if(!o)return[new e(0),0];if(1==o){var c=new e(i[0].s+1);return c[i[0].s]=1,[c,1]}i.sort((function(t,e){return t.f-e.f})),i.push({s:-1,f:25001});var u=i[0],l=i[1],h=0,f=1,d=2;for(i[0]={s:-1,f:u.f+l.f,l:u,r:l};f!=o-1;)u=i[i[h].f<i[d].f?h++:d++],l=i[h!=f&&i[h].f<i[d].f?h++:d++],i[f++]={s:-1,f:u.f+l.f,l:u,r:l};var p=s[0].s;for(a=1;a<o;++a)s[a].s>p&&(p=s[a].s);var g=new n(p+1),m=B(i[f-1],g,0);if(m>r){a=0;var v=0,b=m-r,y=1<<b;for(s.sort((function(t,e){return g[e.s]-g[t.s]||t.f-e.f}));a<o;++a){var w=s[a].s;if(!(g[w]>r))break;v+=y-(1<<m-g[w]),g[w]=r}for(v>>>=b;v>0;){var N=s[a].s;g[N]<r?v-=1<<r-g[N]++-1:++a}for(;a>=0&&v;--a){var x=s[a].s;g[x]==r&&(--g[x],++v)}m=r}return[new e(g),m]},B=function(t,e,n){return-1==t.s?Math.max(B(t.l,e,n+1),B(t.r,e,n+1)):e[t.s]=n},M=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new n(++e),i=0,a=t[0],o=1,s=function(t){r[i++]=t},c=1;c<=e;++c)if(t[c]==a&&c!=e)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=t[c]}return[r.subarray(0,i),e]},E=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},q=function(t,e,n){var r=n.length,i=F(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<r;++a)t[i+a+4]=n[a];return 8*(i+4+r)},D=function(t,e,r,o,s,u,l,h,f,d,p){j(e,p++,r),++s[256];for(var g=O(s,15),m=g[0],v=g[1],b=O(u,15),L=b[0],S=b[1],_=M(m),P=_[0],k=_[1],F=M(L),I=F[0],B=F[1],D=new n(19),T=0;T<P.length;++T)D[31&P[T]]++;for(T=0;T<I.length;++T)D[31&I[T]]++;for(var R=O(D,7),z=R[0],U=R[1],H=19;H>4&&!z[c[H-1]];--H);var W,V,G,J,Y=d+5<<3,X=E(s,w)+E(u,N)+l,K=E(s,m)+E(u,L)+l+14+3*H+E(D,z)+(2*D[16]+3*D[17]+7*D[18]);if(Y<=X&&Y<=K)return q(e,p,t.subarray(f,f+d));if(j(e,p,1+(K<X)),p+=2,K<X){W=y(m,v,0),V=m,G=y(L,S,0),J=L;var Z=y(z,U,0);for(j(e,p,k-257),j(e,p+5,B-1),j(e,p+10,H-4),p+=14,T=0;T<H;++T)j(e,p+3*T,z[c[T]]);p+=3*H;for(var $=[P,I],Q=0;Q<2;++Q){var tt=$[Q];for(T=0;T<tt.length;++T){var et=31&tt[T];j(e,p,Z[et]),p+=z[et],et>15&&(j(e,p,tt[T]>>>5&127),p+=tt[T]>>>12)}}}else W=x,V=w,G=A,J=N;for(T=0;T<h;++T)if(o[T]>255){et=o[T]>>>18&31,C(e,p,W[et+257]),p+=V[et+257],et>7&&(j(e,p,o[T]>>>23&31),p+=i[et]);var nt=31&o[T];C(e,p,G[nt]),p+=J[nt],nt>3&&(C(e,p,o[T]>>>5&8191),p+=a[nt])}else C(e,p,W[o[T]]),p+=V[o[T]];return C(e,p,W[256]),p+V[256]},T=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),R=new e(0),z=function(t,o,s,c,u){return function(t,o,s,c,u,l){var h=t.length,d=new e(c+h+5*(1+Math.floor(h/7e3))+u),p=d.subarray(c,d.length-u),m=0;if(!o||h<8)for(var v=0;v<=h;v+=65535){var b=v+65535;b<h?m=q(p,m,t.subarray(v,b)):(p[v]=l,m=q(p,m,t.subarray(v,h)))}else{for(var y=T[o-1],w=y>>>13,N=8191&y,x=(1<<s)-1,L=new n(32768),A=new n(x+1),S=Math.ceil(s/3),_=2*S,P=function(e){return(t[e]^t[e+1]<<S^t[e+2]<<_)&x},k=new r(25e3),j=new n(288),C=new n(32),O=0,B=0,M=(v=0,0),E=0,z=0;v<h;++v){var U=P(v),H=32767&v,W=A[U];if(L[H]=W,A[U]=H,E<=v){var V=h-v;if((O>7e3||M>24576)&&V>423){m=D(t,p,0,k,j,C,B,M,z,v-z,m),M=O=B=0,z=v;for(var G=0;G<286;++G)j[G]=0;for(G=0;G<30;++G)C[G]=0}var J=2,Y=0,X=N,K=H-W&32767;if(V>2&&U==P(v-K))for(var Z=Math.min(w,V)-1,$=Math.min(32767,v),Q=Math.min(258,V);K<=$&&--X&&H!=W;){if(t[v+J]==t[v+J-K]){for(var tt=0;tt<Q&&t[v+tt]==t[v+tt-K];++tt);if(tt>J){if(J=tt,Y=K,tt>Z)break;var et=Math.min(K,tt-2),nt=0;for(G=0;G<et;++G){var rt=v-K+G+32768&32767,it=rt-L[rt]+32768&32767;it>nt&&(nt=it,W=rt)}}}K+=(H=W)-(W=L[H])+32768&32767}if(Y){k[M++]=268435456|f[J]<<18|g[Y];var at=31&f[J],ot=31&g[Y];B+=i[at]+a[ot],++j[257+at],++C[ot],E=v+J,++O}else k[M++]=t[v],++j[t[v]]}}m=D(t,p,l,k,j,C,B,M,z,v-z,m),l||(m=q(p,m,R))}return I(d,0,c+F(m)+u)}(t,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+o.mem,s,c,!u)};function U(t,e){void 0===e&&(e={});var n=function(){var t=1,e=0;return{p:function(n){for(var r=t,i=e,a=n.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o<s;++o)i+=r+=n[o];r%=65521,i%=65521}t=r,e=i},d:function(){return(t>>>8<<16|(255&e)<<8|e>>>8)+2*((255&t)<<23)}}}();n.p(t);var r=z(t,e,2,4);return function(t,e){var n=e.level,r=0==n?0:n<6?1:9==n?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)}(r,e),function(t,e,n){for(;n;++e)t[e]=n,n>>>=8}(r,r.length-4,n.d()),r}function H(t,n){return function(t,n,r){var o=t.length,s=!n||r,u=!r||r.i;r||(r={}),n||(n=new e(3*o));var l=function(t){var r=n.length;if(t>r){var i=new e(Math.max(2*r,t));i.set(n),n=i}},f=r.f||0,d=r.p||0,g=r.b||0,m=r.l,v=r.d,b=r.m,w=r.n,N=8*o;do{if(!m){r.f=f=P(t,d,1);var x=P(t,d+1,3);if(d+=3,!x){var A=t[(z=F(d)+4)-4]|t[z-3]<<8,j=z+A;if(j>o){if(u)throw"unexpected EOF";break}s&&l(g+A),n.set(t.subarray(z,j),g),r.b=g+=A,r.p=d=8*j;continue}if(1==x)m=L,v=S,b=9,w=5;else{if(2!=x)throw"invalid block type";var C=P(t,d,31)+257,O=P(t,d+10,15)+4,B=C+P(t,d+5,31)+1;d+=14;for(var M=new e(B),E=new e(19),q=0;q<O;++q)E[c[q]]=P(t,d+3*q,7);d+=3*O;var D=_(E),T=(1<<D)-1;if(!u&&d+B*(D+7)>N)break;var R=y(E,D,1);for(q=0;q<B;){var z,U=R[P(t,d,T)];if(d+=15&U,(z=U>>>4)<16)M[q++]=z;else{var H=0,W=0;for(16==z?(W=3+P(t,d,3),d+=2,H=M[q-1]):17==z?(W=3+P(t,d,7),d+=3):18==z&&(W=11+P(t,d,127),d+=7);W--;)M[q++]=H}}var V=M.subarray(0,C),G=M.subarray(C);b=_(V),w=_(G),m=y(V,b,1),v=y(G,w,1)}if(d>N)throw"unexpected EOF"}s&&l(g+131072);for(var J=(1<<b)-1,Y=(1<<w)-1,X=b+w+18;u||d+X<N;){var K=(H=m[k(t,d)&J])>>>4;if((d+=15&H)>N)throw"unexpected EOF";if(!H)throw"invalid length/literal";if(K<256)n[g++]=K;else{if(256==K){m=null;break}var Z=K-254;if(K>264){var $=i[q=K-257];Z=P(t,d,(1<<$)-1)+h[q],d+=$}var Q=v[k(t,d)&Y],tt=Q>>>4;if(!Q)throw"invalid distance";if(d+=15&Q,G=p[tt],tt>3&&($=a[tt],G+=k(t,d)&(1<<$)-1,d+=$),d>N)throw"unexpected EOF";s&&l(g+131072);for(var et=g+Z;g<et;g+=4)n[g]=n[g-G],n[g+1]=n[g+1-G],n[g+2]=n[g+2-G],n[g+3]=n[g+3-G];g=et}}r.l=m,r.p=d,r.b=g,m&&(f=1,r.m=b,r.d=v,r.n=w)}while(!f);return g==n.length?n:I(n,0,g)}((function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"}(t),t.subarray(2,-4)),n)}var W=function(){return"undefined"!=typeof window?window:void 0!==o.g?o.g:"undefined"!=typeof self?self:this}();function V(){W.console&&"function"==typeof W.console.log&&W.console.log.apply(W.console,arguments)}var G={log:V,warn:function(t){W.console&&("function"==typeof W.console.warn?W.console.warn.apply(W.console,arguments):V.call(null,arguments))},error:function(t){W.console&&("function"==typeof W.console.error?W.console.error.apply(W.console,arguments):V(t))}};function J(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){$(r.response,e,n)},r.onerror=function(){G.error("could not download file")},r.send()}function Y(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function X(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var K,Z,$=W.saveAs||("object"!==("undefined"==typeof window?"undefined":(0,t.A)(window))||window!==W?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var r=W.URL||W.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener","string"==typeof t?(i.href=t,i.origin!==location.origin?Y(i.href)?J(t,e,n):X(i,i.target="_blank"):X(i)):(i.href=r.createObjectURL(t),setTimeout((function(){r.revokeObjectURL(i.href)}),4e4),setTimeout((function(){X(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,r){if(n=n||e.name||"download","string"==typeof e)if(Y(e))J(e,n,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){X(i)}))}else navigator.msSaveOrOpenBlob(function(e,n){return void 0===n?n={autoBom:!1}:"object"!==(0,t.A)(n)&&(G.warn("Deprecated: Expected third argument to be a object"),n={autoBom:!n}),n.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),n)}:function(e,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return J(e,n,r);var a="application/octet-stream"===e.type,o=/constructor/i.test(W.HTMLElement)||W.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&o)&&"object"===("undefined"==typeof FileReader?"undefined":(0,t.A)(FileReader))){var c=new FileReader;c.onloadend=function(){var t=c.result;t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},c.readAsDataURL(e)}else{var u=W.URL||W.webkitURL,l=u.createObjectURL(e);i?i.location=l:location.href=l,i=null,setTimeout((function(){u.revokeObjectURL(l)}),4e4)}});function Q(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,a=n[r].process,o=i.exec(t);o&&(e=a(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n}}function tt(t,e){var n=t[0],r=t[1],i=t[2],a=t[3];n=nt(n,r,i,a,e[0],7,-680876936),a=nt(a,n,r,i,e[1],12,-389564586),i=nt(i,a,n,r,e[2],17,606105819),r=nt(r,i,a,n,e[3],22,-1044525330),n=nt(n,r,i,a,e[4],7,-176418897),a=nt(a,n,r,i,e[5],12,1200080426),i=nt(i,a,n,r,e[6],17,-1473231341),r=nt(r,i,a,n,e[7],22,-45705983),n=nt(n,r,i,a,e[8],7,1770035416),a=nt(a,n,r,i,e[9],12,-1958414417),i=nt(i,a,n,r,e[10],17,-42063),r=nt(r,i,a,n,e[11],22,-1990404162),n=nt(n,r,i,a,e[12],7,1804603682),a=nt(a,n,r,i,e[13],12,-40341101),i=nt(i,a,n,r,e[14],17,-1502002290),n=rt(n,r=nt(r,i,a,n,e[15],22,1236535329),i,a,e[1],5,-165796510),a=rt(a,n,r,i,e[6],9,-1069501632),i=rt(i,a,n,r,e[11],14,643717713),r=rt(r,i,a,n,e[0],20,-373897302),n=rt(n,r,i,a,e[5],5,-701558691),a=rt(a,n,r,i,e[10],9,38016083),i=rt(i,a,n,r,e[15],14,-660478335),r=rt(r,i,a,n,e[4],20,-405537848),n=rt(n,r,i,a,e[9],5,568446438),a=rt(a,n,r,i,e[14],9,-1019803690),i=rt(i,a,n,r,e[3],14,-187363961),r=rt(r,i,a,n,e[8],20,1163531501),n=rt(n,r,i,a,e[13],5,-1444681467),a=rt(a,n,r,i,e[2],9,-51403784),i=rt(i,a,n,r,e[7],14,1735328473),n=it(n,r=rt(r,i,a,n,e[12],20,-1926607734),i,a,e[5],4,-378558),a=it(a,n,r,i,e[8],11,-2022574463),i=it(i,a,n,r,e[11],16,1839030562),r=it(r,i,a,n,e[14],23,-35309556),n=it(n,r,i,a,e[1],4,-1530992060),a=it(a,n,r,i,e[4],11,1272893353),i=it(i,a,n,r,e[7],16,-155497632),r=it(r,i,a,n,e[10],23,-1094730640),n=it(n,r,i,a,e[13],4,681279174),a=it(a,n,r,i,e[0],11,-358537222),i=it(i,a,n,r,e[3],16,-722521979),r=it(r,i,a,n,e[6],23,76029189),n=it(n,r,i,a,e[9],4,-640364487),a=it(a,n,r,i,e[12],11,-421815835),i=it(i,a,n,r,e[15],16,530742520),n=at(n,r=it(r,i,a,n,e[2],23,-995338651),i,a,e[0],6,-198630844),a=at(a,n,r,i,e[7],10,1126891415),i=at(i,a,n,r,e[14],15,-1416354905),r=at(r,i,a,n,e[5],21,-57434055),n=at(n,r,i,a,e[12],6,1700485571),a=at(a,n,r,i,e[3],10,-1894986606),i=at(i,a,n,r,e[10],15,-1051523),r=at(r,i,a,n,e[1],21,-2054922799),n=at(n,r,i,a,e[8],6,1873313359),a=at(a,n,r,i,e[15],10,-30611744),i=at(i,a,n,r,e[6],15,-1560198380),r=at(r,i,a,n,e[13],21,1309151649),n=at(n,r,i,a,e[4],6,-145523070),a=at(a,n,r,i,e[11],10,-1120210379),i=at(i,a,n,r,e[2],15,718787259),r=at(r,i,a,n,e[9],21,-343485551),t[0]=dt(n,t[0]),t[1]=dt(r,t[1]),t[2]=dt(i,t[2]),t[3]=dt(a,t[3])}function et(t,e,n,r,i,a){return e=dt(dt(e,t),dt(r,a)),dt(e<<i|e>>>32-i,n)}function nt(t,e,n,r,i,a,o){return et(e&n|~e&r,t,e,i,a,o)}function rt(t,e,n,r,i,a,o){return et(e&r|n&~r,t,e,i,a,o)}function it(t,e,n,r,i,a,o){return et(e^n^r,t,e,i,a,o)}function at(t,e,n,r,i,a,o){return et(n^(e|~r),t,e,i,a,o)}function ot(t){var e,n=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)tt(r,st(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(tt(r,i),e=0;e<16;e++)i[e]=0;return i[14]=8*n,tt(r,i),r}function st(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}K=W.atob.bind(W),Z=W.btoa.bind(W);var ct="0123456789abcdef".split("");function ut(t){for(var e="",n=0;n<4;n++)e+=ct[t>>8*n+4&15]+ct[t>>8*n&15];return e}function lt(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function ht(t){return ot(t).map(lt).join("")}var ft="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=ut(t[e]);return t.join("")}(ot("hello"));function dt(t,e){if(ft){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}return t+e&4294967295}function pt(t,e){var n,r,i,a;if(t!==n){for(var o=(i=t,a=1+(256/t.length|0),new Array(a+1).join(i)),s=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var l=s[c];u=(u+l+o.charCodeAt(c))%256,s[c]=s[u],s[u]=l}n=t,r=s}else s=r;var h=e.length,f=0,d=0,p="";for(c=0;c<h;c++)d=(d+(l=s[f=(f+1)%256]))%256,s[f]=s[d],s[d]=l,o=s[(s[f]+s[d])%256],p+=String.fromCharCode(e.charCodeAt(c)^o);return p}var gt={print:4,modify:8,copy:16,"annot-forms":32};function mt(t,e,n,r){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==gt.perm)throw new Error("Invalid permission: "+t);i+=gt[t]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var a=(e+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=ht(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=pt(this.encryptionKey,this.padding)}function vt(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",n=t.length,r=0;r<n;r++){var i=t.charCodeAt(r);e+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):t[r]}return e}function bt(e){if("object"!==(0,t.A)(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(t,e,r){if(r=r||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(t)||(n[t]={});var i=Math.random().toString(35);return n[t][i]=[e,!!r],i},this.unsubscribe=function(t){for(var e in n)if(n[e][t])return delete n[e][t],0===Object.keys(n[e]).length&&delete n[e],!0;return!1},this.publish=function(t){if(n.hasOwnProperty(t)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in n[t]){var o=n[t][a];try{o[0].apply(e,r)}catch(t){W.console&&G.error("jsPDF PubSub Error",t.message,t)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function yt(t){if(!(this instanceof yt))return new yt(t);var e="opacity,stroke-opacity".split(",");for(var n in t)t.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=t[n]);this.id="",this.objectNumber=-1}function wt(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function Nt(t,e,n,r,i){if(!(this instanceof Nt))return new Nt(t,e,n,r,i);this.type="axial"===t?2:3,this.coords=e,this.colors=n,wt.call(this,r,i)}function xt(t,e,n,r,i){if(!(this instanceof xt))return new xt(t,e,n,r,i);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,wt.call(this,r,i)}function Lt(e){var n,r="string"==typeof arguments[0]?arguments[0]:"p",i=arguments[1],a=arguments[2],o=arguments[3],s=[],c=1,u=16,l="S",h=null;"object"===(0,t.A)(e=e||{})&&(r=e.orientation,i=e.unit||i,a=e.format||a,o=e.compress||e.compressPdf||o,null!==(h=e.encryption||null)&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),c="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(n=e.precision),void 0!==e.floatPrecision&&(u=e.floatPrecision),l=e.defaultPathOperation||"S"),s=e.filters||(!0===o?["FlateEncode"]:s),i=i||"mm",r=(""+(r||"P")).toLowerCase();var f=e.putOnlyUsedFonts||!1,d={},p={internal:{},__private__:{}};p.__private__.PubSub=bt;var g="1.3",m=p.__private__.getPdfVersion=function(){return g};p.__private__.setPdfVersion=function(t){g=t};var v={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 v};var b=p.__private__.getPageFormat=function(t){return v[t]};a=a||"a4";var y="compat",w="advanced",N=y;function x(){this.saveGraphicsState(),rt(new Wt(St,0,0,-St,0,xn()*St).toString()+" cm"),this.setFontSize(this.getFontSize()/St),l="n",N=w}function L(){this.restoreGraphicsState(),l="S",N=y}var A=p.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};p.advancedAPI=function(t){var e=N===y;return e&&x.call(this),"function"!=typeof t||(t(this),e&&L.call(this)),this},p.compatAPI=function(t){var e=N===w;return e&&L.call(this),"function"!=typeof t||(t(this),e&&x.call(this)),this},p.isAdvancedAPI=function(){return N===w};var S,_=function(t){if(N!==w)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},P=p.roundToPrecision=p.__private__.roundToPrecision=function(t,e){var r=n||e;if(isNaN(t)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(r).replace(/0+$/,"")};S=p.hpf=p.__private__.hpf="number"==typeof u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return P(t,u)}:"smart"===u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return P(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return P(t,16)};var k=p.f2=p.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return P(t,2)},F=p.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return P(t,3)},I=p.scale=p.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return N===y?t*St:N===w?t:void 0},j=function(t){return I(function(t){return N===y?xn()-t:N===w?t:void 0}(t))};p.__private__.setPrecision=p.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(n=parseInt(t,10))};var C,O="00000000000000000000000000000000",B=p.__private__.getFileId=function(){return O},M=p.__private__.setFileId=function(t){return O=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():O.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==h&&(je=new mt(h.userPermissions,h.userPassword,h.ownerPassword,O)),O};p.setFileId=function(t){return M(t),this},p.getFileId=function(){return B()};var E=p.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),n=e<0?"+":"-",r=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),a=[n,z(r),"'",z(i),"'"].join("");return["D:",t.getFullYear(),z(t.getMonth()+1),z(t.getDate()),z(t.getHours()),z(t.getMinutes()),z(t.getSeconds()),a].join("")},q=p.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),n=parseInt(t.substr(6,2),10)-1,r=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,n,r,i,a,o,0)},D=p.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=E(t);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(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return C=e},T=p.__private__.getCreationDate=function(t){var e=C;return"jsDate"===t&&(e=q(C)),e};p.setCreationDate=function(t){return D(t),this},p.getCreationDate=function(t){return T(t)};var R,z=p.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},U=p.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},H=0,V=[],J=[],Y=0,X=[],K=[],tt=!1,et=J;p.__private__.setCustomOutputDestination=function(t){tt=!0,et=t};var nt=function(t){tt||(et=t)};p.__private__.resetCustomOutputDestination=function(){tt=!1,et=J};var rt=p.__private__.out=function(t){return t=t.toString(),Y+=t.length+1,et.push(t),et},it=p.__private__.write=function(t){return rt(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},at=p.__private__.getArrayBuffer=function(t){for(var e=t.length,n=new ArrayBuffer(e),r=new Uint8Array(n);e--;)r[e]=t.charCodeAt(e);return n},ot=[["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 ot};var st=e.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(t){return st=N===w?t/St:t,this};var ct,ut=p.__private__.getFontSize=p.getFontSize=function(){return N===y?st:st*St},lt=e.R2L||!1;p.__private__.setR2L=p.setR2L=function(t){return lt=t,this},p.__private__.getR2L=p.getR2L=function(){return lt};var ht,ft=p.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))ct=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');ct=t}else ct=parseInt(t,10)};p.__private__.getZoomMode=function(){return ct};var dt,pt=p.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ht=t};p.__private__.getPageMode=function(){return ht};var gt=p.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');dt=t};p.__private__.getLayoutMode=function(){return dt},p.__private__.setDisplayMode=p.setDisplayMode=function(t,e,n){return ft(t),gt(e),pt(n),this};var wt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(t){if(-1===Object.keys(wt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return wt[t]},p.__private__.getDocumentProperties=function(){return wt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(t){for(var e in wt)wt.hasOwnProperty(e)&&t[e]&&(wt[e]=t[e]);return this},p.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(wt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return wt[t]=e};var At,St,_t,Pt,kt,Ft={},It={},jt=[],Ct={},Ot={},Bt={},Mt={},Et=null,qt=0,Dt=[],Tt=new bt(p),Rt=e.hotfixes||[],zt={},Ut={},Ht=[],Wt=function t(e,n,r,i,a,o){if(!(this instanceof t))return new t(e,n,r,i,a,o);isNaN(e)&&(e=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[e,n,r,i,a,o]};Object.defineProperty(Wt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Wt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Wt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Wt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Wt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Wt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Wt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Wt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Wt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Wt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Wt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Wt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Wt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Wt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Wt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Wt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Wt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(S).join(t)},Wt.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,n=t.sx*this.shy+t.shy*this.sy,r=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,a=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Wt(e,n,r,i,a,o)},Wt.prototype.decompose=function(){var t=this.sx,e=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(t*t+e*e),s=(t/=o)*n+(e/=o)*r;n-=t*s,r-=e*s;var c=Math.sqrt(n*n+r*r);return s/=c,t*(r/=c)<e*(n/=c)&&(t=-t,e=-e,s=-s,o=-o),{scale:new Wt(o,0,0,c,0,0),translate:new Wt(1,0,0,1,i,a),rotate:new Wt(t,e,-e,t,0,0),skew:new Wt(1,0,s,1,0,0)}},Wt.prototype.toString=function(t){return this.join(" ")},Wt.prototype.inversed=function(){var t=this.sx,e=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=1/(t*r-e*n),s=r*o,c=-e*o,u=-n*o,l=t*o;return new Wt(s,c,u,l,-s*i-u*a,-c*i-l*a)},Wt.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,n=t.x*this.shy+t.y*this.sy+this.ty;return new gn(e,n)},Wt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),n=this.applyToPoint(new gn(t.x+t.w,t.y+t.h));return new mn(e.x,e.y,n.x-e.x,n.y-e.y)},Wt.prototype.clone=function(){var t=this.sx,e=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty;return new Wt(t,e,n,r,i,a)},p.Matrix=Wt;var Vt=p.matrixMult=function(t,e){return e.multiply(t)},Gt=new Wt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Gt;var Jt=function(t,e){if(!Ot[t]){var n=(e instanceof Nt?"Sh":"P")+(Object.keys(Ct).length+1).toString(10);e.id=n,Ot[t]=n,Ct[n]=e,Tt.publish("addPattern",e)}};p.ShadingPattern=Nt,p.TilingPattern=xt,p.addShadingPattern=function(t,e){return _("addShadingPattern()"),Jt(t,e),this},p.beginTilingPattern=function(t){_("beginTilingPattern()"),bn(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},p.endTilingPattern=function(t,e){_("endTilingPattern()"),e.stream=K[R].join("\n"),Jt(t,e),Tt.publish("endTilingPattern",e),Ht.pop().restore()};var Yt,Xt=p.__private__.newObject=function(){var t=Kt();return Zt(t,!0),t},Kt=p.__private__.newObjectDeferred=function(){return H++,V[H]=function(){return Y},H},Zt=function(t,e){return e="boolean"==typeof e&&e,V[t]=Y,e&&rt(t+" 0 obj"),t},$t=p.__private__.newAdditionalObject=function(){var t={objId:Kt(),content:""};return X.push(t),t},Qt=Kt(),te=Kt(),ee=p.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1])5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]);else{var n=parseFloat(e[0]);e=[n,n,n,"r"]}for(var r="#",i=0;i<3;i++)r+=("0"+Math.floor(255*parseFloat(e[i])).toString(16)).slice(-2);return r},ne=p.__private__.encodeColorString=function(e){var n;"string"==typeof e&&(e={ch1:e});var r=e.ch1,i=e.ch2,a=e.ch3,o=e.ch4,s="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof r&&"#"!==r.charAt(0)){var c=new Q(r);if(c.ok)r=c.toHex();else if(!/^\d*\.?\d*$/.test(r))throw new Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var u=parseInt(r.substr(1),16);r=u>>16&255,i=u>>8&255,a=255&u}if(void 0===i||void 0===o&&r===i&&i===a)n="string"==typeof r?r+" "+s[0]:2===e.precision?k(r/255)+" "+s[0]:F(r/255)+" "+s[0];else if(void 0===o||"object"===(0,t.A)(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",s[1]].join(" ");n="string"==typeof r?[r,i,a,s[1]].join(" "):2===e.precision?[k(r/255),k(i/255),k(a/255),s[1]].join(" "):[F(r/255),F(i/255),F(a/255),s[1]].join(" ")}else n="string"==typeof r?[r,i,a,o,s[2]].join(" "):2===e.precision?[k(r),k(i),k(a),k(o),s[2]].join(" "):[F(r),F(i),F(a),F(o),s[2]].join(" ");return n},re=p.__private__.getFilters=function(){return s},ie=p.__private__.putStream=function(t){var e=(t=t||{}).data||"",n=t.filters||re(),r=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o=t.objectId,s=function(t){return t};if(null!==h&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==h&&(s=je.encryptor(o,0));var c={};!0===n&&(n=["FlateEncode"]);var u=t.additionalKeyValues||[],l=(c=void 0!==Lt.API.processDataByFilters?Lt.API.processDataByFilters(e,n):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==c.data.length&&(u.push({key:"Length",value:c.data.length}),!0===i&&u.push({key:"Length1",value:a})),0!=l.length)if(l.split("/").length-1==1)u.push({key:"Filter",value:l});else{u.push({key:"Filter",value:"["+l+"]"});for(var f=0;f<u.length;f+=1)if("DecodeParms"===u[f].key){for(var d=[],p=0;p<c.reverseChain.split("/").length-1;p+=1)d.push("null");d.push(u[f].value),u[f].value="["+d.join(" ")+"]"}}rt("<<");for(var g=0;g<u.length;g++)rt("/"+u[g].key+" "+u[g].value);rt(">>"),0!==c.data.length&&(rt("stream"),rt(s(c.data)),rt("endstream"))},ae=p.__private__.putPage=function(t){var e=t.number,n=t.data,r=t.objId,i=t.contentsObjId;Zt(r,!0),rt("<</Type /Page"),rt("/Parent "+t.rootDictionaryObjId+" 0 R"),rt("/Resources "+t.resourceDictionaryObjId+" 0 R"),rt("/MediaBox ["+parseFloat(S(t.mediaBox.bottomLeftX))+" "+parseFloat(S(t.mediaBox.bottomLeftY))+" "+S(t.mediaBox.topRightX)+" "+S(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&rt("/CropBox ["+S(t.cropBox.bottomLeftX)+" "+S(t.cropBox.bottomLeftY)+" "+S(t.cropBox.topRightX)+" "+S(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&rt("/BleedBox ["+S(t.bleedBox.bottomLeftX)+" "+S(t.bleedBox.bottomLeftY)+" "+S(t.bleedBox.topRightX)+" "+S(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&rt("/TrimBox ["+S(t.trimBox.bottomLeftX)+" "+S(t.trimBox.bottomLeftY)+" "+S(t.trimBox.topRightX)+" "+S(t.trimBox.topRightY)+"]"),null!==t.artBox&&rt("/ArtBox ["+S(t.artBox.bottomLeftX)+" "+S(t.artBox.bottomLeftY)+" "+S(t.artBox.topRightX)+" "+S(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&rt("/UserUnit "+t.userUnit),Tt.publish("putPage",{objId:r,pageContext:Dt[e],pageNumber:e,page:n}),rt("/Contents "+i+" 0 R"),rt(">>"),rt("endobj");var a=n.join("\n");return N===w&&(a+="\nQ"),Zt(i,!0),ie({data:a,filters:re(),objectId:i}),rt("endobj"),r},oe=p.__private__.putPages=function(){var t,e,n=[];for(t=1;t<=qt;t++)Dt[t].objId=Kt(),Dt[t].contentsObjId=Kt();for(t=1;t<=qt;t++)n.push(ae({number:t,data:K[t],objId:Dt[t].objId,contentsObjId:Dt[t].contentsObjId,mediaBox:Dt[t].mediaBox,cropBox:Dt[t].cropBox,bleedBox:Dt[t].bleedBox,trimBox:Dt[t].trimBox,artBox:Dt[t].artBox,userUnit:Dt[t].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:te}));Zt(Qt,!0),rt("<</Type /Pages");var r="/Kids [";for(e=0;e<qt;e++)r+=n[e]+" 0 R ";rt(r+"]"),rt("/Count "+qt),rt(">>"),rt("endobj"),Tt.publish("postPutPages")},se=function(t){Tt.publish("putFont",{font:t,out:rt,newObject:Xt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Xt(),rt("<<"),rt("/Type /Font"),rt("/BaseFont /"+vt(t.postScriptName)),rt("/Subtype /Type1"),"string"==typeof t.encoding&&rt("/Encoding /"+t.encoding),rt("/FirstChar 32"),rt("/LastChar 255"),rt(">>"),rt("endobj"))},ce=function(t){t.objectNumber=Xt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[S(t.x),S(t.y),S(t.x+t.width),S(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var n=t.pages[1].join("\n");ie({data:n,additionalKeyValues:e,objectId:t.objectNumber}),rt("endobj")},ue=function(t,e){e||(e=21);var n=Xt(),r=function(t,e){var n,r=[],i=1/(e-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),0!=t[0].offset){var a={offset:0,color:t[0].color};t.unshift(a)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",c=0,u=0;u<r.length;u++){for(n=r[u];n>t[c+1].offset;)c++;var l=t[c].offset,h=(n-l)/(t[c+1].offset-l),f=t[c].color,d=t[c+1].color;s+=U(Math.round((1-h)*f[0]+h*d[0]).toString(16))+U(Math.round((1-h)*f[1]+h*d[1]).toString(16))+U(Math.round((1-h)*f[2]+h*d[2]).toString(16))}return s.trim()}(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ie({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),rt("endobj"),t.objectNumber=Xt(),rt("<< /ShadingType "+t.type),rt("/ColorSpace /DeviceRGB");var a="/Coords ["+S(parseFloat(t.coords[0]))+" "+S(parseFloat(t.coords[1]))+" ";2===t.type?a+=S(parseFloat(t.coords[2]))+" "+S(parseFloat(t.coords[3])):a+=S(parseFloat(t.coords[2]))+" "+S(parseFloat(t.coords[3]))+" "+S(parseFloat(t.coords[4]))+" "+S(parseFloat(t.coords[5])),rt(a+="]"),t.matrix&&rt("/Matrix ["+t.matrix.toString()+"]"),rt("/Function "+n+" 0 R"),rt("/Extend [true true]"),rt(">>"),rt("endobj")},le=function(t,e){var n=Kt(),r=Xt();e.push({resourcesOid:n,objectOid:r}),t.objectNumber=r;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(S).join(" ")+"]"}),i.push({key:"XStep",value:S(t.xStep)}),i.push({key:"YStep",value:S(t.yStep)}),i.push({key:"Resources",value:n+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),ie({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),rt("endobj")},he=function(t){for(var e in t.objectNumber=Xt(),rt("<<"),t)switch(e){case"opacity":rt("/ca "+k(t[e]));break;case"stroke-opacity":rt("/CA "+k(t[e]))}rt(">>"),rt("endobj")},fe=function(t){Zt(t.resourcesOid,!0),rt("<<"),rt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in rt("/Font <<"),Ft)Ft.hasOwnProperty(t)&&(!1===f||!0===f&&d.hasOwnProperty(t))&&rt("/"+t+" "+Ft[t].objectNumber+" 0 R");rt(">>")}(),function(){if(Object.keys(Ct).length>0){for(var t in rt("/Shading <<"),Ct)Ct.hasOwnProperty(t)&&Ct[t]instanceof Nt&&Ct[t].objectNumber>=0&&rt("/"+t+" "+Ct[t].objectNumber+" 0 R");Tt.publish("putShadingPatternDict"),rt(">>")}}(),function(t){if(Object.keys(Ct).length>0){for(var e in rt("/Pattern <<"),Ct)Ct.hasOwnProperty(e)&&Ct[e]instanceof p.TilingPattern&&Ct[e].objectNumber>=0&&Ct[e].objectNumber<t&&rt("/"+e+" "+Ct[e].objectNumber+" 0 R");Tt.publish("putTilingPatternDict"),rt(">>")}}(t.objectOid),function(){if(Object.keys(Bt).length>0){var t;for(t in rt("/ExtGState <<"),Bt)Bt.hasOwnProperty(t)&&Bt[t].objectNumber>=0&&rt("/"+t+" "+Bt[t].objectNumber+" 0 R");Tt.publish("putGStateDict"),rt(">>")}}(),function(){for(var t in rt("/XObject <<"),zt)zt.hasOwnProperty(t)&&zt[t].objectNumber>=0&&rt("/"+t+" "+zt[t].objectNumber+" 0 R");Tt.publish("putXobjectDict"),rt(">>")}(),rt(">>"),rt("endobj")},de=function(t){It[t.fontName]=It[t.fontName]||{},It[t.fontName][t.fontStyle]=t.id},pe=function(t,e,n,r,i){var a={id:"F"+(Object.keys(Ft).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return Tt.publish("addFont",{font:a,instance:this}),Ft[a.id]=a,de(a),a.id},ge=p.__private__.pdfEscape=p.pdfEscape=function(t,e){return function(t,e){var n,r,i,a,o,s,c,u,l;if(i=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&Ft[At].metadata&&Ft[At].metadata[i]&&Ft[At].metadata[i].encoding&&(a=Ft[At].metadata[i].encoding,!o&&Ft[At].encoding&&(o=Ft[At].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(c=!1,s=[],n=0,r=t.length;n<r;n++)(u=o[t.charCodeAt(n)])?s.push(String.fromCharCode(u)):s.push(t[n]),s[n].charCodeAt(0)>>8&&(c=!0);t=s.join("")}for(n=t.length;void 0===c&&0!==n;)t.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return t;for(s=e.noBOM?[]:[254,255],n=0,r=t.length;n<r;n++){if((l=(u=t.charCodeAt(n))>>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(l),s.push(u-(l<<8))}return String.fromCharCode.apply(void 0,s)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},me=p.__private__.beginPage=function(t){K[++qt]=[],Dt[qt]={objId:0,contentsObjId:0,userUnit:Number(c),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},ye(qt),nt(K[R])},ve=function(t,e){var n,i,o;switch(r=e||r,"string"==typeof t&&(n=b(t.toLowerCase()),Array.isArray(n)&&(i=n[0],o=n[1])),Array.isArray(t)&&(i=t[0]*St,o=t[1]*St),isNaN(i)&&(i=a[0],o=a[1]),(i>14400||o>14400)&&(G.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),o=Math.min(14400,o)),a=[i,o],r.substr(0,1)){case"l":o>i&&(a=[o,i]);break;case"p":i>o&&(a=[o,i])}me(a),Ze(Xe),rt(on),0!==fn&&rt(fn+" J"),0!==dn&&rt(dn+" j"),Tt.publish("addPage",{pageNumber:qt})},be=function(t){t>0&&t<=qt&&(K.splice(t,1),Dt.splice(t,1),qt--,R>qt&&(R=qt),this.setPage(R))},ye=function(t){t>0&&t<=qt&&(R=t)},we=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return K.length-1},Ne=function(t,e,n){var r,i=void 0;return n=n||{},t=void 0!==t?t:Ft[At].fontName,e=void 0!==e?e:Ft[At].fontStyle,r=t.toLowerCase(),void 0!==It[r]&&void 0!==It[r][e]?i=It[r][e]:void 0!==It[t]&&void 0!==It[t][e]?i=It[t][e]:!1===n.disableWarning&&G.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||n.noFallback||null==(i=It.times[e])&&(i=It.times.normal),i},xe=p.__private__.putInfo=function(){var t=Xt(),e=function(t){return t};for(var n in null!==h&&(e=je.encryptor(t,0)),rt("<<"),rt("/Producer ("+ge(e("jsPDF "+Lt.version))+")"),wt)wt.hasOwnProperty(n)&&wt[n]&&rt("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+ge(e(wt[n]))+")");rt("/CreationDate ("+ge(e(C))+")"),rt(">>"),rt("endobj")},Le=p.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Qt;switch(Xt(),rt("<<"),rt("/Type /Catalog"),rt("/Pages "+e+" 0 R"),ct||(ct="fullwidth"),ct){case"fullwidth":rt("/OpenAction [3 0 R /FitH null]");break;case"fullheight":rt("/OpenAction [3 0 R /FitV null]");break;case"fullpage":rt("/OpenAction [3 0 R /Fit]");break;case"original":rt("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+ct;"%"===n.substr(n.length-1)&&(ct=parseInt(ct)/100),"number"==typeof ct&&rt("/OpenAction [3 0 R /XYZ null null "+k(ct)+"]")}switch(dt||(dt="continuous"),dt){case"continuous":rt("/PageLayout /OneColumn");break;case"single":rt("/PageLayout /SinglePage");break;case"two":case"twoleft":rt("/PageLayout /TwoColumnLeft");break;case"tworight":rt("/PageLayout /TwoColumnRight")}ht&&rt("/PageMode /"+ht),Tt.publish("putCatalog"),rt(">>"),rt("endobj")