gantt-source_management
Version:
Gantt, Schedule,
85 lines • 742 kB
JavaScript
!function(A,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((A="undefined"!=typeof globalThis?globalThis:A||self).ExportPDF={})}(this,(function(A){"use strict";function t(A,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(A)}function e(A,t,e,r){return new(e||(e=Promise))((function(n,i){function s(A){try{a(r.next(A))}catch(A){i(A)}}function o(A){try{a(r.throw(A))}catch(A){i(A)}}function a(A){var t;A.done?n(A.value):(t=A.value,t instanceof e?t:new e((function(A){A(t)}))).then(s,o)}a((r=r.apply(A,t||[])).next())}))}function r(A){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},r(A)}"function"==typeof SuppressedError&&SuppressedError;var n=Uint8Array,i=Uint16Array,s=Uint32Array,o=new n([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 n([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 n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(A,t){for(var e=new i(31),r=0;r<31;++r)e[r]=t+=1<<A[r-1];var n=new s(e[30]);for(r=1;r<30;++r)for(var o=e[r];o<e[r+1];++o)n[o]=o-e[r]<<5|r;return[e,n]},l=u(o,2),h=l[0],f=l[1];h[28]=258,f[258]=28;for(var d=u(a,0),g=d[0],p=d[1],B=new i(32768),w=0;w<32768;++w){var m=(43690&w)>>>1|(21845&w)<<1;m=(61680&(m=(52428&m)>>>2|(13107&m)<<2))>>>4|(3855&m)<<4,B[w]=((65280&m)>>>8|(255&m)<<8)>>>1}var y=function(A,t,e){for(var r=A.length,n=0,s=new i(t);n<r;++n)++s[A[n]-1];var o,a=new i(t);for(n=0;n<t;++n)a[n]=a[n-1]+s[n-1]<<1;if(e){o=new i(1<<t);var c=15-t;for(n=0;n<r;++n)if(A[n])for(var u=n<<4|A[n],l=t-A[n],h=a[A[n]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)o[B[h]>>>c]=u}else for(o=new i(r),n=0;n<r;++n)o[n]=B[a[A[n]-1]++]>>>15-A[n];return o},v=new n(288);for(w=0;w<144;++w)v[w]=8;for(w=144;w<256;++w)v[w]=9;for(w=256;w<280;++w)v[w]=7;for(w=280;w<288;++w)v[w]=8;var b=new n(32);for(w=0;w<32;++w)b[w]=5;var C=y(v,9,0),Q=y(v,9,1),F=y(b,5,0),U=y(b,5,1),x=function(A){for(var t=A[0],e=1;e<A.length;++e)A[e]>t&&(t=A[e]);return t},E=function(A,t,e){var r=t/8|0;return(A[r]|A[r+1]<<8)>>>(7&t)&e},L=function(A,t){var e=t/8|0;return(A[e]|A[e+1]<<8|A[e+2]<<16)>>>(7&t)},S=function(A){return(A/8|0)+(7&A&&1)},I=function(A,t,e){(null==t||t<0)&&(t=0),(null==e||e>A.length)&&(e=A.length);var r=new(A instanceof i?i:A instanceof s?s:n)(e-t);return r.set(A.subarray(t,e)),r},N=function(A,t,e){e<<=7&t;var r=t/8|0;A[r]|=e,A[r+1]|=e>>>8},H=function(A,t,e){e<<=7&t;var r=t/8|0;A[r]|=e,A[r+1]|=e>>>8,A[r+2]|=e>>>16},P=function(A,t){for(var e=[],r=0;r<A.length;++r)A[r]&&e.push({s:r,f:A[r]});var s=e.length,o=e.slice();if(!s)return[new n(0),0];if(1==s){var a=new n(e[0].s+1);return a[e[0].s]=1,[a,1]}e.sort((function(A,t){return A.f-t.f})),e.push({s:-1,f:25001});var c=e[0],u=e[1],l=0,h=1,f=2;for(e[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=s-1;)c=e[e[l].f<e[f].f?l++:f++],u=e[l!=h&&e[l].f<e[f].f?l++:f++],e[h++]={s:-1,f:c.f+u.f,l:c,r:u};var d=o[0].s;for(r=1;r<s;++r)o[r].s>d&&(d=o[r].s);var g=new i(d+1),p=O(e[h-1],g,0);if(p>t){r=0;var B=0,w=p-t,m=1<<w;for(o.sort((function(A,t){return g[t.s]-g[A.s]||A.f-t.f}));r<s;++r){var y=o[r].s;if(!(g[y]>t))break;B+=m-(1<<p-g[y]),g[y]=t}for(B>>>=w;B>0;){var v=o[r].s;g[v]<t?B-=1<<t-g[v]++-1:++r}for(;r>=0&&B;--r){var b=o[r].s;g[b]==t&&(--g[b],++B)}p=t}return[new n(g),p]},O=function(A,t,e){return-1==A.s?Math.max(O(A.l,t,e+1),O(A.r,t,e+1)):t[A.s]=e},T=function(A){for(var t=A.length;t&&!A[--t];);for(var e=new i(++t),r=0,n=A[0],s=1,o=function(A){e[r++]=A},a=1;a<=t;++a)if(A[a]==n&&a!=t)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=A[a]}return[e.subarray(0,r),t]},_=function(A,t){for(var e=0,r=0;r<t.length;++r)e+=A[r]*t[r];return e},k=function(A,t,e){var r=e.length,n=S(t+2);A[n]=255&r,A[n+1]=r>>>8,A[n+2]=255^A[n],A[n+3]=255^A[n+1];for(var i=0;i<r;++i)A[n+i+4]=e[i];return 8*(n+4+r)},M=function(A,t,e,r,n,s,u,l,h,f,d){N(t,d++,e),++n[256];for(var g=P(n,15),p=g[0],B=g[1],w=P(s,15),m=w[0],Q=w[1],U=T(p),x=U[0],E=U[1],L=T(m),S=L[0],I=L[1],O=new i(19),M=0;M<x.length;++M)O[31&x[M]]++;for(M=0;M<S.length;++M)O[31&S[M]]++;for(var D=P(O,7),R=D[0],K=D[1],V=19;V>4&&!R[c[V-1]];--V);var j,G,q,X,z=f+5<<3,W=_(n,v)+_(s,b)+u,Y=_(n,p)+_(s,m)+u+14+3*V+_(O,R)+(2*O[16]+3*O[17]+7*O[18]);if(z<=W&&z<=Y)return k(t,d,A.subarray(h,h+f));if(N(t,d,1+(Y<W)),d+=2,Y<W){j=y(p,B,0),G=p,q=y(m,Q,0),X=m;var J=y(R,K,0);N(t,d,E-257),N(t,d+5,I-1),N(t,d+10,V-4),d+=14;for(M=0;M<V;++M)N(t,d+3*M,R[c[M]]);d+=3*V;for(var Z=[x,S],$=0;$<2;++$){var AA=Z[$];for(M=0;M<AA.length;++M){var tA=31&AA[M];N(t,d,J[tA]),d+=R[tA],tA>15&&(N(t,d,AA[M]>>>5&127),d+=AA[M]>>>12)}}}else j=C,G=v,q=F,X=b;for(M=0;M<l;++M)if(r[M]>255){tA=r[M]>>>18&31;H(t,d,j[tA+257]),d+=G[tA+257],tA>7&&(N(t,d,r[M]>>>23&31),d+=o[tA]);var eA=31&r[M];H(t,d,q[eA]),d+=X[eA],eA>3&&(H(t,d,r[M]>>>5&8191),d+=a[eA])}else H(t,d,j[r[M]]),d+=G[r[M]];return H(t,d,j[256]),d+G[256]},D=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),R=new n(0),K=function(A,t,e,r,c){return function(A,t,e,r,c,u){var l=A.length,h=new n(r+l+5*(1+Math.floor(l/7e3))+c),d=h.subarray(r,h.length-c),g=0;if(!t||l<8)for(var B=0;B<=l;B+=65535){var w=B+65535;w<l?g=k(d,g,A.subarray(B,w)):(d[B]=u,g=k(d,g,A.subarray(B,l)))}else{for(var m=D[t-1],y=m>>>13,v=8191&m,b=(1<<e)-1,C=new i(32768),Q=new i(b+1),F=Math.ceil(e/3),U=2*F,x=function(t){return(A[t]^A[t+1]<<F^A[t+2]<<U)&b},E=new s(25e3),L=new i(288),N=new i(32),H=0,P=0,O=(B=0,0),T=0,_=0;B<l;++B){var K=x(B),V=32767&B,j=Q[K];if(C[V]=j,Q[K]=V,T<=B){var G=l-B;if((H>7e3||O>24576)&&G>423){g=M(A,d,0,E,L,N,P,O,_,B-_,g),O=H=P=0,_=B;for(var q=0;q<286;++q)L[q]=0;for(q=0;q<30;++q)N[q]=0}var X=2,z=0,W=v,Y=V-j&32767;if(G>2&&K==x(B-Y))for(var J=Math.min(y,G)-1,Z=Math.min(32767,B),$=Math.min(258,G);Y<=Z&&--W&&V!=j;){if(A[B+X]==A[B+X-Y]){for(var AA=0;AA<$&&A[B+AA]==A[B+AA-Y];++AA);if(AA>X){if(X=AA,z=Y,AA>J)break;var tA=Math.min(Y,AA-2),eA=0;for(q=0;q<tA;++q){var rA=B-Y+q+32768&32767,nA=rA-C[rA]+32768&32767;nA>eA&&(eA=nA,j=rA)}}}Y+=(V=j)-(j=C[V])+32768&32767}if(z){E[O++]=268435456|f[X]<<18|p[z];var iA=31&f[X],sA=31&p[z];P+=o[iA]+a[sA],++L[257+iA],++N[sA],T=B+X,++H}else E[O++]=A[B],++L[A[B]]}}g=M(A,d,u,E,L,N,P,O,_,B-_,g),u||(g=k(d,g,R))}return I(h,0,r+S(g)+c)}(A,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(A.length)))):12+t.mem,e,r,!c)};function V(A,t){void 0===t&&(t={});var e=function(){var A=1,t=0;return{p:function(e){for(var r=A,n=t,i=e.length,s=0;s!=i;){for(var o=Math.min(s+5552,i);s<o;++s)n+=r+=e[s];r%=65521,n%=65521}A=r,t=n},d:function(){return(A>>>8<<16|(255&t)<<8|t>>>8)+2*((255&A)<<23)}}}();e.p(A);var r=K(A,t,2,4);return function(A,t){var e=t.level,r=0==e?0:e<6?1:9==e?3:2;A[0]=120,A[1]=r<<6|(r?32-2*r:1)}(r,t),function(A,t,e){for(;e;++t)A[t]=e,e>>>=8}(r,r.length-4,e.d()),r}function j(A,t){return function(A,t,e){var r=A.length,i=!t||e,s=!e||e.i;e||(e={}),t||(t=new n(3*r));var u=function(A){var e=t.length;if(A>e){var r=new n(Math.max(2*e,A));r.set(t),t=r}},l=e.f||0,f=e.p||0,d=e.b||0,p=e.l,B=e.d,w=e.m,m=e.n,v=8*r;do{if(!p){e.f=l=E(A,f,1);var b=E(A,f+1,3);if(f+=3,!b){var C=A[(R=S(f)+4)-4]|A[R-3]<<8,F=R+C;if(F>r){if(s)throw"unexpected EOF";break}i&&u(d+C),t.set(A.subarray(R,F),d),e.b=d+=C,e.p=f=8*F;continue}if(1==b)p=Q,B=U,w=9,m=5;else{if(2!=b)throw"invalid block type";var N=E(A,f,31)+257,H=E(A,f+10,15)+4,P=N+E(A,f+5,31)+1;f+=14;for(var O=new n(P),T=new n(19),_=0;_<H;++_)T[c[_]]=E(A,f+3*_,7);f+=3*H;var k=x(T),M=(1<<k)-1;if(!s&&f+P*(k+7)>v)break;var D=y(T,k,1);for(_=0;_<P;){var R,K=D[E(A,f,M)];if(f+=15&K,(R=K>>>4)<16)O[_++]=R;else{var V=0,j=0;for(16==R?(j=3+E(A,f,3),f+=2,V=O[_-1]):17==R?(j=3+E(A,f,7),f+=3):18==R&&(j=11+E(A,f,127),f+=7);j--;)O[_++]=V}}var G=O.subarray(0,N),q=O.subarray(N);w=x(G),m=x(q),p=y(G,w,1),B=y(q,m,1)}if(f>v)throw"unexpected EOF"}i&&u(d+131072);for(var X=(1<<w)-1,z=(1<<m)-1,W=w+m+18;s||f+W<v;){var Y=(V=p[L(A,f)&X])>>>4;if((f+=15&V)>v)throw"unexpected EOF";if(!V)throw"invalid length/literal";if(Y<256)t[d++]=Y;else{if(256==Y){p=null;break}var J=Y-254;if(Y>264){var Z=o[_=Y-257];J=E(A,f,(1<<Z)-1)+h[_],f+=Z}var $=B[L(A,f)&z],AA=$>>>4;if(!$)throw"invalid distance";if(f+=15&$,q=g[AA],AA>3&&(Z=a[AA],q+=L(A,f)&(1<<Z)-1,f+=Z),f>v)throw"unexpected EOF";i&&u(d+131072);for(var tA=d+J;d<tA;d+=4)t[d]=t[d-q],t[d+1]=t[d+1-q],t[d+2]=t[d+2-q],t[d+3]=t[d+3-q];d=tA}}e.l=p,e.p=f,e.b=d,p&&(l=1,e.m=w,e.d=B,e.n=m)}while(!l);return d==t.length?t:I(t,0,d)}((function(A){if(8!=(15&A[0])||A[0]>>>4>7||(A[0]<<8|A[1])%31)throw"invalid zlib data";if(32&A[1])throw"invalid zlib data: preset dictionaries not supported"}(A),A.subarray(2,-4)),t)}
/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
* 2015-2021 yWorks GmbH, http://www.yworks.com
* 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
* 2010 Aaron Spike, https://github.com/acspike
* 2012 Willow Systems Corporation, https://github.com/willowsystems
* 2012 Pablo Hess, https://github.com/pablohess
* 2012 Florian Jenett, https://github.com/fjenett
* 2013 Warren Weckesser, https://github.com/warrenweckesser
* 2013 Youssef Beddad, https://github.com/lifof
* 2013 Lee Driscoll, https://github.com/lsdriscoll
* 2013 Stefan Slonevskiy, https://github.com/stefslon
* 2013 Jeremy Morel, https://github.com/jmorel
* 2013 Christoph Hartmann, https://github.com/chris-rock
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
* 2014 James Makes, https://github.com/dollaruw
* 2014 Diego Casorran, https://github.com/diegocr
* 2014 Steven Spungin, https://github.com/Flamenco
* 2014 Kenneth Glassey, https://github.com/Gavvers
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Contributor(s):
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
* kim3er, mfo, alnorth, Flamenco
*/var G=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function q(){G.console&&"function"==typeof G.console.log&&G.console.log.apply(G.console,arguments)}var X={log:q,warn:function(A){G.console&&("function"==typeof G.console.warn?G.console.warn.apply(G.console,arguments):q.call(null,arguments))},error:function(A){G.console&&("function"==typeof G.console.error?G.console.error.apply(G.console,arguments):q(A))}};function z(A,t,e){var r=new XMLHttpRequest;r.open("GET",A),r.responseType="blob",r.onload=function(){$(r.response,t,e)},r.onerror=function(){X.error("could not download file")},r.send()}function W(A){var t=new XMLHttpRequest;t.open("HEAD",A,!1);try{t.send()}catch(A){}return t.status>=200&&t.status<=299}function Y(A){try{A.dispatchEvent(new MouseEvent("click"))}catch(e){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),A.dispatchEvent(t)}}var J,Z,$=G.saveAs||("object"!==("undefined"==typeof window?"undefined":r(window))||window!==G?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(A,t,e){var r=G.URL||G.webkitURL,n=document.createElement("a");t=t||A.name||"download",n.download=t,n.rel="noopener","string"==typeof A?(n.href=A,n.origin!==location.origin?W(n.href)?z(A,t,e):Y(n,n.target="_blank"):Y(n)):(n.href=r.createObjectURL(A),setTimeout((function(){r.revokeObjectURL(n.href)}),4e4),setTimeout((function(){Y(n)}),0))}:"msSaveOrOpenBlob"in navigator?function(A,t,e){if(t=t||A.name||"download","string"==typeof A)if(W(A))z(A,t,e);else{var n=document.createElement("a");n.href=A,n.target="_blank",setTimeout((function(){Y(n)}))}else navigator.msSaveOrOpenBlob(function(A,t){return void 0===t?t={autoBom:!1}:"object"!==r(t)&&(X.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(A.type)?new Blob([String.fromCharCode(65279),A],{type:A.type}):A}(A,e),t)}:function(A,t,e,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof A)return z(A,t,e);var i="application/octet-stream"===A.type,s=/constructor/i.test(G.HTMLElement)||G.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&s)&&"object"===("undefined"==typeof FileReader?"undefined":r(FileReader))){var a=new FileReader;a.onloadend=function(){var A=a.result;A=o?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=A:location=A,n=null},a.readAsDataURL(A)}else{var c=G.URL||G.webkitURL,u=c.createObjectURL(A);n?n.location=u:location.href=u,n=null,setTimeout((function(){c.revokeObjectURL(u)}),4e4)}});
/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function AA(A){var t;A=A||"",this.ok=!1,"#"==A.charAt(0)&&(A=A.substr(1,6));A={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[A=(A=A.replace(/ /g,"")).toLowerCase()]||A;for(var 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(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(A){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(A){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}}],r=0;r<e.length;r++){var n=e[r].re,i=e[r].process,s=n.exec(A);s&&(t=i(s),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 A=this.r.toString(16),t=this.g.toString(16),e=this.b.toString(16);return 1==A.length&&(A="0"+A),1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),"#"+A+t+e}}
/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/
function tA(A,t){var e=A[0],r=A[1],n=A[2],i=A[3];e=rA(e,r,n,i,t[0],7,-680876936),i=rA(i,e,r,n,t[1],12,-389564586),n=rA(n,i,e,r,t[2],17,606105819),r=rA(r,n,i,e,t[3],22,-1044525330),e=rA(e,r,n,i,t[4],7,-176418897),i=rA(i,e,r,n,t[5],12,1200080426),n=rA(n,i,e,r,t[6],17,-1473231341),r=rA(r,n,i,e,t[7],22,-45705983),e=rA(e,r,n,i,t[8],7,1770035416),i=rA(i,e,r,n,t[9],12,-1958414417),n=rA(n,i,e,r,t[10],17,-42063),r=rA(r,n,i,e,t[11],22,-1990404162),e=rA(e,r,n,i,t[12],7,1804603682),i=rA(i,e,r,n,t[13],12,-40341101),n=rA(n,i,e,r,t[14],17,-1502002290),e=nA(e,r=rA(r,n,i,e,t[15],22,1236535329),n,i,t[1],5,-165796510),i=nA(i,e,r,n,t[6],9,-1069501632),n=nA(n,i,e,r,t[11],14,643717713),r=nA(r,n,i,e,t[0],20,-373897302),e=nA(e,r,n,i,t[5],5,-701558691),i=nA(i,e,r,n,t[10],9,38016083),n=nA(n,i,e,r,t[15],14,-660478335),r=nA(r,n,i,e,t[4],20,-405537848),e=nA(e,r,n,i,t[9],5,568446438),i=nA(i,e,r,n,t[14],9,-1019803690),n=nA(n,i,e,r,t[3],14,-187363961),r=nA(r,n,i,e,t[8],20,1163531501),e=nA(e,r,n,i,t[13],5,-1444681467),i=nA(i,e,r,n,t[2],9,-51403784),n=nA(n,i,e,r,t[7],14,1735328473),e=iA(e,r=nA(r,n,i,e,t[12],20,-1926607734),n,i,t[5],4,-378558),i=iA(i,e,r,n,t[8],11,-2022574463),n=iA(n,i,e,r,t[11],16,1839030562),r=iA(r,n,i,e,t[14],23,-35309556),e=iA(e,r,n,i,t[1],4,-1530992060),i=iA(i,e,r,n,t[4],11,1272893353),n=iA(n,i,e,r,t[7],16,-155497632),r=iA(r,n,i,e,t[10],23,-1094730640),e=iA(e,r,n,i,t[13],4,681279174),i=iA(i,e,r,n,t[0],11,-358537222),n=iA(n,i,e,r,t[3],16,-722521979),r=iA(r,n,i,e,t[6],23,76029189),e=iA(e,r,n,i,t[9],4,-640364487),i=iA(i,e,r,n,t[12],11,-421815835),n=iA(n,i,e,r,t[15],16,530742520),e=sA(e,r=iA(r,n,i,e,t[2],23,-995338651),n,i,t[0],6,-198630844),i=sA(i,e,r,n,t[7],10,1126891415),n=sA(n,i,e,r,t[14],15,-1416354905),r=sA(r,n,i,e,t[5],21,-57434055),e=sA(e,r,n,i,t[12],6,1700485571),i=sA(i,e,r,n,t[3],10,-1894986606),n=sA(n,i,e,r,t[10],15,-1051523),r=sA(r,n,i,e,t[1],21,-2054922799),e=sA(e,r,n,i,t[8],6,1873313359),i=sA(i,e,r,n,t[15],10,-30611744),n=sA(n,i,e,r,t[6],15,-1560198380),r=sA(r,n,i,e,t[13],21,1309151649),e=sA(e,r,n,i,t[4],6,-145523070),i=sA(i,e,r,n,t[11],10,-1120210379),n=sA(n,i,e,r,t[2],15,718787259),r=sA(r,n,i,e,t[9],21,-343485551),A[0]=dA(e,A[0]),A[1]=dA(r,A[1]),A[2]=dA(n,A[2]),A[3]=dA(i,A[3])}function eA(A,t,e,r,n,i){return t=dA(dA(t,A),dA(r,i)),dA(t<<n|t>>>32-n,e)}function rA(A,t,e,r,n,i,s){return eA(t&e|~t&r,A,t,n,i,s)}function nA(A,t,e,r,n,i,s){return eA(t&r|e&~r,A,t,n,i,s)}function iA(A,t,e,r,n,i,s){return eA(t^e^r,A,t,n,i,s)}function sA(A,t,e,r,n,i,s){return eA(e^(t|~r),A,t,n,i,s)}function oA(A){var t,e=A.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=A.length;t+=64)tA(r,aA(A.substring(t-64,t)));A=A.substring(t-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<A.length;t++)n[t>>2]|=A.charCodeAt(t)<<(t%4<<3);if(n[t>>2]|=128<<(t%4<<3),t>55)for(tA(r,n),t=0;t<16;t++)n[t]=0;return n[14]=8*e,tA(r,n),r}function aA(A){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=A.charCodeAt(t)+(A.charCodeAt(t+1)<<8)+(A.charCodeAt(t+2)<<16)+(A.charCodeAt(t+3)<<24);return e}J=G.atob.bind(G),Z=G.btoa.bind(G);var cA="0123456789abcdef".split("");function uA(A){for(var t="",e=0;e<4;e++)t+=cA[A>>8*e+4&15]+cA[A>>8*e&15];return t}function lA(A){return String.fromCharCode(255&A,(65280&A)>>8,(16711680&A)>>16,(4278190080&A)>>24)}function hA(A){return function(A){return A.map(lA).join("")}(oA(A))}var fA="5d41402abc4b2a76b9719d911017c592"!=function(A){return function(A){for(var t=0;t<A.length;t++)A[t]=uA(A[t]);return A.join("")}(oA(A))}("hello");function dA(A,t){if(fA){var e=(65535&A)+(65535&t);return(A>>16)+(t>>16)+(e>>16)<<16|65535&e}return A+t&4294967295}
/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function gA(A,t){var e,r,n,i;if(A!==e){for(var s=(n=A,i=1+(256/A.length|0),new Array(i+1).join(n)),o=[],a=0;a<256;a++)o[a]=a;var c=0;for(a=0;a<256;a++){var u=o[a];c=(c+u+s.charCodeAt(a))%256,o[a]=o[c],o[c]=u}e=A,r=o}else o=r;var l=t.length,h=0,f=0,d="";for(a=0;a<l;a++)f=(f+(u=o[h=(h+1)%256]))%256,o[h]=o[f],o[f]=u,s=o[(o[h]+o[f])%256],d+=String.fromCharCode(t.charCodeAt(a)^s);return d}
/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var pA={print:4,modify:8,copy:16,"annot-forms":32};function BA(A,t,e,r){this.v=1,this.r=2;var n=192;A.forEach((function(A){if(void 0!==pA.perm)throw new Error("Invalid permission: "+A);n+=pA[A]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(t+this.padding).substr(0,32),s=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,s),this.P=-(1+(255^n)),this.encryptionKey=hA(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=gA(this.encryptionKey,this.padding)}function wA(A){if(/[^\u0000-\u00ff]/.test(A))throw new Error("Invalid PDF Name Object: "+A+", Only accept ASCII characters.");for(var t="",e=A.length,r=0;r<e;r++){var n=A.charCodeAt(r);if(n<33||35===n||37===n||40===n||41===n||47===n||60===n||62===n||91===n||93===n||123===n||125===n||n>126)t+="#"+("0"+n.toString(16)).slice(-2);else t+=A[r]}return t}function mA(A){if("object"!==r(A))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(A,e,r){if(r=r||!1,"string"!=typeof A||"function"!=typeof e||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(A)||(t[A]={});var n=Math.random().toString(35);return t[A][n]=[e,!!r],n},this.unsubscribe=function(A){for(var e in t)if(t[e][A])return delete t[e][A],0===Object.keys(t[e]).length&&delete t[e],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),n=[];for(var i in t[e]){var s=t[e][i];try{s[0].apply(A,r)}catch(A){G.console&&X.error("jsPDF PubSub Error",A.message,A)}s[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function yA(A){if(!(this instanceof yA))return new yA(A);var t="opacity,stroke-opacity".split(",");for(var e in A)A.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=A[e]);this.id="",this.objectNumber=-1}function vA(A,t){this.gState=A,this.matrix=t,this.id="",this.objectNumber=-1}function bA(A,t,e,r,n){if(!(this instanceof bA))return new bA(A,t,e,r,n);this.type="axial"===A?2:3,this.coords=t,this.colors=e,vA.call(this,r,n)}function CA(A,t,e,r,n){if(!(this instanceof CA))return new CA(A,t,e,r,n);this.boundingBox=A,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,vA.call(this,r,n)}function QA(A){var t,e="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],i=arguments[2],s=arguments[3],o=[],a=1,c=16,u="S",l=null;"object"===r(A=A||{})&&(e=A.orientation,n=A.unit||n,i=A.format||i,s=A.compress||A.compressPdf||s,null!==(l=A.encryption||null)&&(l.userPassword=l.userPassword||"",l.ownerPassword=l.ownerPassword||"",l.userPermissions=l.userPermissions||[]),a="number"==typeof A.userUnit?Math.abs(A.userUnit):1,void 0!==A.precision&&(t=A.precision),void 0!==A.floatPrecision&&(c=A.floatPrecision),u=A.defaultPathOperation||"S"),o=A.filters||(!0===s?["FlateEncode"]:o),n=n||"mm",e=(""+(e||"P")).toLowerCase();var h=A.putOnlyUsedFonts||!1,f={},d={internal:{},__private__:{}};d.__private__.PubSub=mA;var g="1.3",p=d.__private__.getPdfVersion=function(){return g};d.__private__.setPdfVersion=function(A){g=A};var B={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return B};var w=d.__private__.getPageFormat=function(A){return B[A]};i=i||"a4";var m="compat",y="advanced",v=m;function b(){this.saveGraphicsState(),rA(new jA(FA,0,0,-FA,0,ve()*FA).toString()+" cm"),this.setFontSize(this.getFontSize()/FA),u="n",v=y}function C(){this.restoreGraphicsState(),u="S",v=m}var Q=d.__private__.combineFontStyleAndFontWeight=function(A,t){if("bold"==A&&"normal"==t||"bold"==A&&400==t||"normal"==A&&"italic"==t||"bold"==A&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&(A=400==t||"normal"===t?"italic"===A?"italic":"normal":700!=t&&"bold"!==t||"normal"!==A?(700==t?"bold":t)+""+A:"bold"),A};d.advancedAPI=function(A){var t=v===m;return t&&b.call(this),"function"!=typeof A||(A(this),t&&C.call(this)),this},d.compatAPI=function(A){var t=v===y;return t&&C.call(this),"function"!=typeof A||(A(this),t&&b.call(this)),this},d.isAdvancedAPI=function(){return v===y};var F,U=function(A){if(v!==y)throw new Error(A+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},x=d.roundToPrecision=d.__private__.roundToPrecision=function(A,e){var r=t||e;if(isNaN(A)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return A.toFixed(r).replace(/0+$/,"")};F=d.hpf=d.__private__.hpf="number"==typeof c?function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.hpf");return x(A,c)}:"smart"===c?function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.hpf");return x(A,A>-1&&A<1?16:5)}:function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.hpf");return x(A,16)};var E=d.f2=d.__private__.f2=function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.f2");return x(A,2)},L=d.__private__.f3=function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.f3");return x(A,3)},S=d.scale=d.__private__.scale=function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.scale");return v===m?A*FA:v===y?A:void 0},I=function(A){return S(function(A){return v===m?ve()-A:v===y?A:void 0}(A))};d.__private__.setPrecision=d.setPrecision=function(A){"number"==typeof parseInt(A,10)&&(t=parseInt(A,10))};var N,H="00000000000000000000000000000000",P=d.__private__.getFileId=function(){return H},O=d.__private__.setFileId=function(A){return H=void 0!==A&&/^[a-fA-F0-9]{32}$/.test(A)?A.toUpperCase():H.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==l&&(It=new BA(l.userPermissions,l.userPassword,l.ownerPassword,H)),H};d.setFileId=function(A){return O(A),this},d.getFileId=function(){return P()};var T=d.__private__.convertDateToPDFDate=function(A){var t=A.getTimezoneOffset(),e=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),n=Math.abs(t%60),i=[e,R(r),"'",R(n),"'"].join("");return["D:",A.getFullYear(),R(A.getMonth()+1),R(A.getDate()),R(A.getHours()),R(A.getMinutes()),R(A.getSeconds()),i].join("")},_=d.__private__.convertPDFDateToDate=function(A){var t=parseInt(A.substr(2,4),10),e=parseInt(A.substr(6,2),10)-1,r=parseInt(A.substr(8,2),10),n=parseInt(A.substr(10,2),10),i=parseInt(A.substr(12,2),10),s=parseInt(A.substr(14,2),10);return new Date(t,e,r,n,i,s,0)},k=d.__private__.setCreationDate=function(A){var t;if(void 0===A&&(A=new Date),A instanceof Date)t=T(A);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(A))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=A}return N=t},M=d.__private__.getCreationDate=function(A){var t=N;return"jsDate"===A&&(t=_(N)),t};d.setCreationDate=function(A){return k(A),this},d.getCreationDate=function(A){return M(A)};var D,R=d.__private__.padd2=function(A){return("0"+parseInt(A)).slice(-2)},K=d.__private__.padd2Hex=function(A){return("00"+(A=A.toString())).substr(A.length)},V=0,j=[],q=[],z=0,W=[],Y=[],J=!1,tA=q;d.__private__.setCustomOutputDestination=function(A){J=!0,tA=A};var eA=function(A){J||(tA=A)};d.__private__.resetCustomOutputDestination=function(){J=!1,tA=q};var rA=d.__private__.out=function(A){return A=A.toString(),z+=A.length+1,tA.push(A),tA},nA=d.__private__.write=function(A){return rA(1===arguments.length?A.toString():Array.prototype.join.call(arguments," "))},iA=d.__private__.getArrayBuffer=function(A){for(var t=A.length,e=new ArrayBuffer(t),r=new Uint8Array(e);t--;)r[t]=A.charCodeAt(t);return e},sA=[["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]];d.__private__.getStandardFonts=function(){return sA};var oA=A.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(A){return oA=v===y?A/FA:A,this};var aA,cA=d.__private__.getFontSize=d.getFontSize=function(){return v===m?oA:oA*FA},uA=A.R2L||!1;d.__private__.setR2L=d.setR2L=function(A){return uA=A,this},d.__private__.getR2L=d.getR2L=function(){return uA};var lA,hA=d.__private__.setZoomMode=function(A){var t=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(A))aA=A;else if(isNaN(A)){if(-1===t.indexOf(A))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+A+'" is not recognized.');aA=A}else aA=parseInt(A,10)};d.__private__.getZoomMode=function(){return aA};var fA,dA=d.__private__.setPageMode=function(A){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(A))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+A+'" is not recognized.');lA=A};d.__private__.getPageMode=function(){return lA};var gA=d.__private__.setLayoutMode=function(A){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(A))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+A+'" is not recognized.');fA=A};d.__private__.getLayoutMode=function(){return fA},d.__private__.setDisplayMode=d.setDisplayMode=function(A,t,e){return hA(A),gA(t),dA(e),this};var pA={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(A){if(-1===Object.keys(pA).indexOf(A))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return pA[A]},d.__private__.getDocumentProperties=function(){return pA},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(A){for(var t in pA)pA.hasOwnProperty(t)&&A[t]&&(pA[t]=A[t]);return this},d.__private__.setDocumentProperty=function(A,t){if(-1===Object.keys(pA).indexOf(A))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return pA[A]=t};var vA,FA,UA,xA,EA,LA={},SA={},IA=[],NA={},HA={},PA={},OA={},TA=null,_A=0,kA=[],MA=new mA(d),DA=A.hotfixes||[],RA={},KA={},VA=[],jA=function A(t,e,r,n,i,s){if(!(this instanceof A))return new A(t,e,r,n,i,s);isNaN(t)&&(t=1),isNaN(e)&&(e=0),isNaN(r)&&(r=0),isNaN(n)&&(n=1),isNaN(i)&&(i=0),isNaN(s)&&(s=0),this._matrix=[t,e,r,n,i,s]};Object.defineProperty(jA.prototype,"sx",{get:function(){return this._matrix[0]},set:function(A){this._matrix[0]=A}}),Object.defineProperty(jA.prototype,"shy",{get:function(){return this._matrix[1]},set:function(A){this._matrix[1]=A}}),Object.defineProperty(jA.prototype,"shx",{get:function(){return this._matrix[2]},set:function(A){this._matrix[2]=A}}),Object.defineProperty(jA.prototype,"sy",{get:function(){return this._matrix[3]},set:function(A){this._matrix[3]=A}}),Object.defineProperty(jA.prototype,"tx",{get:function(){return this._matrix[4]},set:function(A){this._matrix[4]=A}}),Object.defineProperty(jA.prototype,"ty",{get:function(){return this._matrix[5]},set:function(A){this._matrix[5]=A}}),Object.defineProperty(jA.prototype,"a",{get:function(){return this._matrix[0]},set:function(A){this._matrix[0]=A}}),Object.defineProperty(jA.prototype,"b",{get:function(){return this._matrix[1]},set:function(A){this._matrix[1]=A}}),Object.defineProperty(jA.prototype,"c",{get:function(){return this._matrix[2]},set:function(A){this._matrix[2]=A}}),Object.defineProperty(jA.prototype,"d",{get:function(){return this._matrix[3]},set:function(A){this._matrix[3]=A}}),Object.defineProperty(jA.prototype,"e",{get:function(){return this._matrix[4]},set:function(A){this._matrix[4]=A}}),Object.defineProperty(jA.prototype,"f",{get:function(){return this._matrix[5]},set:function(A){this._matrix[5]=A}}),Object.defineProperty(jA.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(jA.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(jA.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(jA.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),jA.prototype.join=function(A){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(F).join(A)},jA.prototype.multiply=function(A){var t=A.sx*this.sx+A.shy*this.shx,e=A.sx*this.shy+A.shy*this.sy,r=A.shx*this.sx+A.sy*this.shx,n=A.shx*this.shy+A.sy*this.sy,i=A.tx*this.sx+A.ty*this.shx+this.tx,s=A.tx*this.shy+A.ty*this.sy+this.ty;return new jA(t,e,r,n,i,s)},jA.prototype.decompose=function(){var A=this.sx,t=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty,s=Math.sqrt(A*A+t*t),o=(A/=s)*e+(t/=s)*r;e-=A*o,r-=t*o;var a=Math.sqrt(e*e+r*r);return o/=a,A*(r/=a)<t*(e/=a)&&(A=-A,t=-t,o=-o,s=-s),{scale:new jA(s,0,0,a,0,0),translate:new jA(1,0,0,1,n,i),rotate:new jA(A,t,-t,A,0,0),skew:new jA(1,0,o,1,0,0)}},jA.prototype.toString=function(A){return this.join(" ")},jA.prototype.inversed=function(){var A=this.sx,t=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty,s=1/(A*r-t*e),o=r*s,a=-t*s,c=-e*s,u=A*s;return new jA(o,a,c,u,-o*n-c*i,-a*n-u*i)},jA.prototype.applyToPoint=function(A){var t=A.x*this.sx+A.y*this.shx+this.tx,e=A.x*this.shy+A.y*this.sy+this.ty;return new de(t,e)},jA.prototype.applyToRectangle=function(A){var t=this.applyToPoint(A),e=this.applyToPoint(new de(A.x+A.w,A.y+A.h));return new ge(t.x,t.y,e.x-t.x,e.y-t.y)},jA.prototype.clone=function(){var A=this.sx,t=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty;return new jA(A,t,e,r,n,i)},d.Matrix=jA;var GA=d.matrixMult=function(A,t){return t.multiply(A)},qA=new jA(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=qA;var XA=function(A,t){if(!HA[A]){var e=(t instanceof bA?"Sh":"P")+(Object.keys(NA).length+1).toString(10);t.id=e,HA[A]=e,NA[e]=t,MA.publish("addPattern",t)}};d.ShadingPattern=bA,d.TilingPattern=CA,d.addShadingPattern=function(A,t){return U("addShadingPattern()"),XA(A,t),this},d.beginTilingPattern=function(A){U("beginTilingPattern()"),Be(A.boundingBox[0],A.boundingBox[1],A.boundingBox[2]-A.boundingBox[0],A.boundingBox[3]-A.boundingBox[1],A.matrix)},d.endTilingPattern=function(A,t){U("endTilingPattern()"),t.stream=Y[D].join("\n"),XA(A,t),MA.publish("endTilingPattern",t),VA.pop().restore()};var zA,WA=d.__private__.newObject=function(){var A=YA();return JA(A,!0),A},YA=d.__private__.newObjectDeferred=function(){return V++,j[V]=function(){return z},V},JA=function(A,t){return t="boolean"==typeof t&&t,j[A]=z,t&&rA(A+" 0 obj"),A},ZA=d.__private__.newAdditionalObject=function(){var A={objId:YA(),content:""};return W.push(A),A},$A=YA(),At=YA(),tt=d.__private__.decodeColorString=function(A){var t=A.split(" ");if(2!==t.length||"g"!==t[1]&&"G"!==t[1]){if(5===t.length&&("k"===t[4]||"K"===t[4])){t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]}}else{var e=parseFloat(t[0]);t=[e,e,e,"r"]}for(var r="#",n=0;n<3;n++)r+=("0"+Math.floor(255*parseFloat(t[n])).toString(16)).slice(-2);return r},et=d.__private__.encodeColorString=function(A){var t;"string"==typeof A&&(A={ch1:A});var e=A.ch1,n=A.ch2,i=A.ch3,s=A.ch4,o="draw"===A.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof e&&"#"!==e.charAt(0)){var a=new AA(e);if(a.ok)e=a.toHex();else if(!/^\d*\.?\d*$/.test(e))throw new Error('Invalid color "'+e+'" passed to jsPDF.encodeColorString.')}if("string"==typeof e&&/^#[0-9A-Fa-f]{3}$/.test(e)&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),"string"==typeof e&&/^#[0-9A-Fa-f]{6}$/.test(e)){var c=parseInt(e.substr(1),16);e=c>>16&255,n=c>>8&255,i=255&c}if(void 0===n||void 0===s&&e===n&&n===i)if("string"==typeof e)t=e+" "+o[0];else if(2===A.precision)t=E(e/255)+" "+o[0];else t=L(e/255)+" "+o[0];else if(void 0===s||"object"===r(s)){if(s&&!isNaN(s.a)&&0===s.a)return t=["1.","1.","1.",o[1]].join(" ");if("string"==typeof e)t=[e,n,i,o[1]].join(" ");else if(2===A.precision)t=[E(e/255),E(n/255),E(i/255),o[1]].join(" ");else t=[L(e/255),L(n/255),L(i/255),o[1]].join(" ")}else if("string"==typeof e)t=[e,n,i,s,o[2]].join(" ");else if(2===A.precision)t=[E(e),E(n),E(i),E(s),o[2]].join(" ");else t=[L(e),L(n),L(i),L(s),o[2]].join(" ");return t},rt=d.__private__.getFilters=function(){return o},nt=d.__private__.putStream=function(A){var t=(A=A||{}).data||"",e=A.filters||rt(),r=A.alreadyAppliedFilters||[],n=A.addLength1||!1,i=t.length,s=A.objectId,o=function(A){return A};if(null!==l&&void 0===s)throw new Error("ObjectId must be passed to putStream for file encryption");null!==l&&(o=It.encryptor(s,0));var a={};!0===e&&(e=["FlateEncode"]);var c=A.additionalKeyValues||[],u=(a=void 0!==QA.API.processDataByFilters?QA.API.processDataByFilters(t,e):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==a.data.length&&(c.push({key:"Length",value:a.data.length}),!0===n&&c.push({key:"Length1",value:i})),0!=u.length)if(u.split("/").length-1==1)c.push({key:"Filter",value:u});else{c.push({key:"Filter",value:"["+u+"]"});for(var h=0;h<c.length;h+=1)if("DecodeParms"===c[h].key){for(var f=[],d=0;d<a.reverseChain.split("/").length-1;d+=1)f.push("null");f.push(c[h].value),c[h].value="["+f.join(" ")+"]"}}rA("<<");for(var g=0;g<c.length;g++)rA("/"+c[g].key+" "+c[g].value);rA(">>"),0!==a.data.length&&(rA("stream"),rA(o(a.data)),rA("endstream"))},it=d.__private__.putPage=function(A){var t=A.number,e=A.data,r=A.objId,n=A.contentsObjId;JA(r,!0),rA("<</Type /Page"),rA("/Parent "+A.rootDictionaryObjId+" 0 R"),rA("/Resources "+A.resourceDictionaryObjId+" 0 R"),rA("/MediaBox ["+parseFloat(F(A.mediaBox.bottomLeftX))+" "+parseFloat(F(A.mediaBox.bottomLeftY))+" "+F(A.mediaBox.topRightX)+" "+F(A.mediaBox.topRightY)+"]"),null!==A.cropBox&&rA("/CropBox ["+F(A.cropBox.bottomLeftX)+" "+F(A.cropBox.bottomLeftY)+" "+F(A.cropBox.topRightX)+" "+F(A.cropBox.topRightY)+"]"),null!==A.bleedBox&&rA("/BleedBox ["+F(A.bleedBox.bottomLeftX)+" "+F(A.bleedBox.bottomLeftY)+" "+F(A.bleedBox.topRightX)+" "+F(A.bleedBox.topRightY)+"]"),null!==A.trimBox&&rA("/TrimBox ["+F(A.trimBox.bottomLeftX)+" "+F(A.trimBox.bottomLeftY)+" "+F(A.trimBox.topRightX)+" "+F(A.trimBox.topRightY)+"]"),null!==A.artBox&&rA("/ArtBox ["+F(A.artBox.bottomLeftX)+" "+F(A.artBox.bottomLeftY)+" "+F(A.artBox.topRightX)+" "+F(A.artBox.topRightY)+"]"),"number"==typeof A.userUnit&&1!==A.userUnit&&rA("/UserUnit "+A.userUnit),MA.publish("putPage",{objId:r,pageContext:kA[t],pageNumber:t,page:e}),rA("/Contents "+n+" 0 R"),rA(">>"),rA("endobj");var i=e.join("\n");return v===y&&(i+="\nQ"),JA(n,!0),nt({data:i,filters:rt(),objectId:n}),rA("endobj"),r},st=d.__private__.putPages=function(){var A,t,e=[];for(A=1;A<=_A;A++)kA[A].objId=YA(),kA[A].contentsObjId=YA();for(A=1;A<=_A;A++)e.push(it({number:A,data:Y[A],objId:kA[A].objId,contentsObjId:kA[A].contentsObjId,mediaBox:kA[A].mediaBox,cropBox:kA[A].cropBox,bleedBox:kA[A].bleedBox,trimBox:kA[A].trimBox,artBox:kA[A].artBox,userUnit:kA[A].userUnit,rootDictionaryObjId:$A,resourceDictionaryObjId:At}));JA($A,!0),rA("<</Type /Pages");var r="/Kids [";for(t=0;t<_A;t++)r+=e[t]+" 0 R ";rA(r+"]"),rA("/Count "+_A),rA(">>"),rA("endobj"),MA.publish("postPutPages")},ot=function(A){A.objectNumber=WA();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[F(A.x),F(A.y),F(A.x+A.width),F(A.y+A.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+A.matrix.toString()+"]"});var e=A.pages[1].join("\n");nt({data:e,additionalKeyValues:t,objectId:A.objectNumber}),rA("endobj")},at=function(A,t){t||(t=21);var e=WA(),r=function(A,t){var e,r=[],n=1/(t-1);for(e=0;e<1;e+=n)r.push(e);if(r.push(1),0!=A[0].offset){var i={offset:0,color:A[0].color};A.unshift(i)}if(1!=A[A.length-1].offset){var s={offset:1,color:A[A.length-1].color};A.push(s)}for(var o="",a=0,c=0;c<r.length;c++){for(e=r[c];e>A[a+1].offset;)a++;var u=A[a].offset,l=(e-u)/(A[a+1].offset-u),h=A[a].color,f=A[a+1].color;o+=K(Math.round((1-l)*h[0]+l*f[0]).toString(16))+K(Math.round((1-l)*h[1]+l*f[1]).toString(16))+K(Math.round((1-l)*h[2]+l*f[2]).toString(16))}return o.trim()}(A.colors,t),n=[];n.push({key:"FunctionType",value:"0"}),n.push({key:"Domain",value:"[0.0 1.0]"}),n.push({key:"Size",value:"["+t+"]"}),n.push({key:"BitsPerSample",value:"8"}),n.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),n.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),nt({data:r,additionalKeyValues:n,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:e}),rA("endobj"),A.objectNumber=WA(),rA("<< /ShadingType "+A.type),rA("/ColorSpace /DeviceRGB");var i="/Coords ["+F(parseFloat(A.coords[0]))+" "+F(parseFloat(A.coords[1]))+" ";2===A.type?i+=F(parseFloat(A.coords[2]))+" "+F(parseFloat(A.coords[3])):i+=F(parseFloat(A.coords[2]))+" "+F(parseFloat(A.coords[3]))+" "+F(parseFloat(A.coords[4]))+" "+F(parseFloat(A.coords[5])),rA(i+="]"),A.matrix&&rA("/Matrix ["+A.matrix.toString()+"]"),rA("/Function "+e+" 0 R"),rA("/Extend [true true]"),rA(">>"),rA("endobj")},ct=function(A,t){var e=YA(),r=WA();t.push({resourcesOid:e,objectOid:r}),A.objectNumber=r;var n=[];n.push({key:"Type",value:"/Pattern"}),n.push({key:"PatternType",value:"1"}),n.push({key:"PaintType",value:"1"}),n.push({key:"TilingType",value:"1"}),n.push({key:"BBox",value:"["+A.boundingBox.map(F).join(" ")+"]"}),n.push({key:"XStep",value:F(A.xStep)}),n.push({key:"YStep",value:F(A.yStep)}),n.push({key:"Resources",value:e+" 0 R"}),A.matrix&&n.push({key:"Matrix",value:"["+A.matrix.toString()+"]"}),nt({data:A.stream,additionalKeyValues:n,objectId:A.objectNumber}),rA("endobj")},ut=function(A){for(var t in A.objectNumber=WA(),rA("<<"),A)switch(t){case"opacity":rA("/ca "+E(A[t]));break;case"stroke-opacity":rA("/CA "+E(A[t]))}rA(">>"),rA("endobj")},lt=function(A){JA(A.resourcesOid,!0),rA("<<"),rA("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var A in rA("/Font <<"),LA)LA.hasOwnProperty(A)&&(!1===h||!0===h&&f.hasOwnProperty(A))&&rA("/"+A+" "+LA[A].objectNumber+" 0 R");rA(">>")}(),function(){if(Object.keys(NA).length>0){for(var A in rA("/Shading <<"),NA)NA.hasOwnProperty(A)&&NA[A]instanceof bA&&NA[A].objectNumber>=0&&rA("/"+A+" "+NA[A].objectNumber+" 0 R");MA.publish("putShadingPatternDict"),rA(">>")}}(),function(A){if(Object.keys(NA).length>0){for(var t in rA("/Pattern <<"),NA)NA.hasOwnProperty(t)&&NA[t]instanceof d.TilingPattern&&NA[t].objectNumber>=0&&NA[t].objectNumber<A&&rA("/"+t+" "+NA[t].objectNumber+" 0 R");MA.publish("putTilingPatternDict"),rA(">>")}}(A.objectOid),function(){if(Object.keys(PA).length>0){var A;for(A in rA("/ExtGState <<"),PA)PA.hasOwnProperty(A)&&PA[A].objectNumber>=0&&rA("/"+A+" "+PA[A].objectNumber+" 0 R");MA.publish("putGStateDict"),rA(">>")}}(),function(){for(var A in rA("/XObject <<"),RA)RA.hasOwnProperty(A)&&RA[A].objectNumber>=0&&rA("/"+A+" "+RA[A].objectNumber+" 0 R");MA.publish("putXobjectDict"),rA(">>")}(),rA(">>"),rA("endobj")},ht=function(){var A=[];!function(){for(var A in LA)LA.hasOwnProperty(A)&&(!1===h||!0===h&&f.hasOwnProperty(A))&&(t=LA[A],MA.publish("putFont",{font:t,out:rA,newObject:WA,putStream:nt}),!0!==t.isAlreadyPutted&&(t.objectNumber=WA(),rA("<<"),rA("/Type /Font"),rA("/BaseFont /"+wA(t.postScriptName)),rA("/Subtype /Type1"),"string"==typeof t.encoding&&rA("/Encoding /"+t.encoding),rA("/FirstChar 32"),rA("/LastChar 255"),rA(">>"),rA("endobj")));var t}(),function(){var A;for(A in PA)PA.hasOwnProperty(A)&&ut(PA[A])}(),function(){for(var A in RA)RA.hasOwnProperty(A)&&ot(RA[A])}(),function(A){var t;for(t in NA)NA.hasOwnProperty(t)&&(NA[t]instanceof bA?at(NA[t]):NA[t]instanceof CA&&ct(NA[t],A))}(A),MA.publish("putResources"),A.forEach(lt),lt({resourcesOid:At,objectOid:Number.MAX_SAFE_INTEGER}),MA.publish("postPutResources")},ft=function(A){SA[A.fontName]=SA[A.fontName]||{},SA[A.fontName][A.fontStyle]=A.id},dt=function(A,t,e,r,n){var i={id:"F"+(Object.keys(LA).length+1).toString(10),postScriptName:A,fontName:t,fontStyle:e,encoding:r,isStandardFont:n||!1,metadata:{}};return MA.publish("addFont",{font:i,instance:this}),LA[i.id]=i,ft(i),i.id},gt=d.__private__.pdfEscape=d.pdfEscape=function(A,t){return function(A,t){var e,r,n,i,s,o,a,c,u;if(n=(t=t||{}).sourceEncoding||"Unicode",s=t.outputEncoding,(t.autoencode||s)&&LA[vA].metadata&&LA[vA].metadata[n]&&LA[vA].metadata[n].encoding&&(i=LA[vA].metadata[n].encoding,!s&&LA[vA].encoding&&(s=LA[vA].encoding),!s&&i.codePages&&(s=i.codePages[0]),"string"==typeof s&&(s=i[s]),s)){for(a=!1,o=[],e=0,r=A.length;e<r;e++)(c=s[A.charCodeAt(e)])?o.push(String.fromCharCode(c)):o.push(A[e]),o[e].charCodeAt(0)>>8&&(a=!0);A=o.join("")}for(e=A.length;void 0===a&&0!==e;)A.charCodeAt(e-1)>>8&&(a=!0),e--;if(!a)return A;for(o=t.noBOM?[]:[254,255],e=0,r=A.length;e<r;e++){if((u=(c=A.charCodeAt(e))>>8)>>8)throw new Error("Character at position "+e+" of string '"+A+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");o.push(u),o.push(c-(u<<8))}return String.fromCharCode.apply(void 0,o)}(A,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},pt=d.__private__.beginPage=function(A){Y[++_A]=[],kA[_A]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(A[0]),topRightY:Number(A[1])}},mt(_A),eA(Y[D])},Bt=function(A,t){var r,n,s;switch(e=t||e,"string"==typeof A&&(r=w(A.toLowerCase()),Array.isArray(r)&&(n=r[0],s=r[1])),Array.isArray(A)&&(n=A[0]*FA,s=A[1]*FA),isNaN(n)&&(n=i[0],s=i[1]),(n>14400||s>14400)&&(X.warn("A page in a PDF can not be wider or taller than 14400 userUnit.