@senx/discovery-plugin-marauder
Version:
Discovery plugin - Marauder's map
35 lines • 406 kB
JavaScript
import{r as t,c as i,h as e,H as n,g as r}from"./p-e66c054b.js";import{g as s,P as o,U as a,L as u,v as h,J as c,G as f,_ as l}from"./p-5b1ad25e.js";import{D as d}from"./p-952e14ac.js";import{g as v}from"./p-30f68cd2.js";import{C as w}from"./p-90362062.js";import{L as p}from"./p-8755d298.js";import{P as m}from"./p-15f98754.js";var b={exports:{}};(function(t){function i(e){"@babel/helpers - typeof";return t.exports=i="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},t.exports.__esModule=true,t.exports["default"]=t.exports,i(e)}t.exports=i,t.exports.__esModule=true,t.exports["default"]=t.exports})(b);const N=s(b.exports);var g=Uint8Array,y=Uint16Array,L=Int32Array;var A=new g([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]);var k=new g([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]);var S=new g([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);var x=function(t,i){var e=new y(31);for(var n=0;n<31;++n){e[n]=i+=1<<t[n-1]}var r=new L(e[30]);for(var n=1;n<30;++n){for(var s=e[n];s<e[n+1];++s){r[s]=s-e[n]<<5|n}}return{b:e,r}};var q=x(A,2),j=q.b,E=q.r;j[28]=258,E[258]=28;var M=x(k,0),O=M.b,P=M.r;var I=new y(32768);for(var R=0;R<32768;++R){var F=(R&43690)>>1|(R&21845)<<1;F=(F&52428)>>2|(F&13107)<<2;F=(F&61680)>>4|(F&3855)<<4;I[R]=((F&65280)>>8|(F&255)<<8)>>1}var B=function(t,i,e){var n=t.length;var r=0;var s=new y(i);for(;r<n;++r){if(t[r])++s[t[r]-1]}var o=new y(i);for(r=1;r<i;++r){o[r]=o[r-1]+s[r-1]<<1}var a;if(e){a=new y(1<<i);var u=15-i;for(r=0;r<n;++r){if(t[r]){var h=r<<4|t[r];var c=i-t[r];var f=o[t[r]-1]++<<c;for(var l=f|(1<<c)-1;f<=l;++f){a[I[f]>>u]=h}}}}else{a=new y(n);for(r=0;r<n;++r){if(t[r]){a[r]=I[o[t[r]-1]++]>>15-t[r]}}}return a};var T=new g(288);for(var R=0;R<144;++R)T[R]=8;for(var R=144;R<256;++R)T[R]=9;for(var R=256;R<280;++R)T[R]=7;for(var R=280;R<288;++R)T[R]=8;var D=new g(32);for(var R=0;R<32;++R)D[R]=5;var C=B(T,9,0),z=B(T,9,1);var U=B(D,5,0),V=B(D,5,1);var W=function(t){var i=t[0];for(var e=1;e<t.length;++e){if(t[e]>i)i=t[e]}return i};var H=function(t,i,e){var n=i/8|0;return(t[n]|t[n+1]<<8)>>(i&7)&e};var _=function(t,i){var e=i/8|0;return(t[e]|t[e+1]<<8|t[e+2]<<16)>>(i&7)};var J=function(t){return(t+7)/8|0};var G=function(t,i,e){if(i==null||i<0)i=0;if(e==null||e>t.length)e=t.length;return new g(t.subarray(i,e))};var $=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"];var Y=function(t,i,e){var n=new Error(i||$[t]);n.code=t;if(Error.captureStackTrace)Error.captureStackTrace(n,Y);if(!e)throw n;return n};var K=function(t,i,e,n){var r=t.length,s=n?n.length:0;if(!r||i.f&&!i.l)return e||new g(0);var o=!e;var a=o||i.i!=2;var u=i.i;if(o)e=new g(r*3);var h=function(t){var i=e.length;if(t>i){var n=new g(Math.max(i*2,t));n.set(e);e=n}};var c=i.f||0,f=i.p||0,l=i.b||0,d=i.l,v=i.d,w=i.m,p=i.n;var m=r*8;do{if(!d){c=H(t,f,1);var b=H(t,f+1,3);f+=3;if(!b){var N=J(f)+4,y=t[N-4]|t[N-3]<<8,L=N+y;if(L>r){if(u)Y(0);break}if(a)h(l+y);e.set(t.subarray(N,L),l);i.b=l+=y,i.p=f=L*8,i.f=c;continue}else if(b==1)d=z,v=V,w=9,p=5;else if(b==2){var x=H(t,f,31)+257,q=H(t,f+10,15)+4;var E=x+H(t,f+5,31)+1;f+=14;var M=new g(E);var P=new g(19);for(var I=0;I<q;++I){P[S[I]]=H(t,f+I*3,7)}f+=q*3;var R=W(P),F=(1<<R)-1;var T=B(P,R,1);for(var I=0;I<E;){var D=T[H(t,f,F)];f+=D&15;var N=D>>4;if(N<16){M[I++]=N}else{var C=0,U=0;if(N==16)U=3+H(t,f,3),f+=2,C=M[I-1];else if(N==17)U=3+H(t,f,7),f+=3;else if(N==18)U=11+H(t,f,127),f+=7;while(U--)M[I++]=C}}var $=M.subarray(0,x),K=M.subarray(x);w=W($);p=W(K);d=B($,w,1);v=B(K,p,1)}else Y(1);if(f>m){if(u)Y(0);break}}if(a)h(l+131072);var X=(1<<w)-1,Z=(1<<p)-1;var Q=f;for(;;Q=f){var C=d[_(t,f)&X],tt=C>>4;f+=C&15;if(f>m){if(u)Y(0);break}if(!C)Y(2);if(tt<256)e[l++]=tt;else if(tt==256){Q=f,d=null;break}else{var it=tt-254;if(tt>264){var I=tt-257,et=A[I];it=H(t,f,(1<<et)-1)+j[I];f+=et}var nt=v[_(t,f)&Z],rt=nt>>4;if(!nt)Y(3);f+=nt&15;var K=O[rt];if(rt>3){var et=k[rt];K+=_(t,f)&(1<<et)-1,f+=et}if(f>m){if(u)Y(0);break}if(a)h(l+131072);var st=l+it;if(l<K){var ot=s-K,at=Math.min(K,st);if(ot+l<0)Y(3);for(;l<at;++l)e[l]=n[ot+l]}for(;l<st;++l)e[l]=e[l-K]}}i.l=d,i.p=Q,i.b=l,i.f=c;if(d)c=1,i.m=w,i.d=v,i.n=p}while(!c);return l!=e.length&&o?G(e,0,l):e.subarray(0,l)};var X=function(t,i,e){e<<=i&7;var n=i/8|0;t[n]|=e;t[n+1]|=e>>8};var Z=function(t,i,e){e<<=i&7;var n=i/8|0;t[n]|=e;t[n+1]|=e>>8;t[n+2]|=e>>16};var Q=function(t,i){var e=[];for(var n=0;n<t.length;++n){if(t[n])e.push({s:n,f:t[n]})}var r=e.length;var s=e.slice();if(!r)return{t:ot,l:0};if(r==1){var o=new g(e[0].s+1);o[e[0].s]=1;return{t:o,l:1}}e.sort((function(t,i){return t.f-i.f}));e.push({s:-1,f:25001});var a=e[0],u=e[1],h=0,c=1,f=2;e[0]={s:-1,f:a.f+u.f,l:a,r:u};while(c!=r-1){a=e[e[h].f<e[f].f?h++:f++];u=e[h!=c&&e[h].f<e[f].f?h++:f++];e[c++]={s:-1,f:a.f+u.f,l:a,r:u}}var l=s[0].s;for(var n=1;n<r;++n){if(s[n].s>l)l=s[n].s}var d=new y(l+1);var v=tt(e[c-1],d,0);if(v>i){var n=0,w=0;var p=v-i,m=1<<p;s.sort((function(t,i){return d[i.s]-d[t.s]||t.f-i.f}));for(;n<r;++n){var b=s[n].s;if(d[b]>i){w+=m-(1<<v-d[b]);d[b]=i}else break}w>>=p;while(w>0){var N=s[n].s;if(d[N]<i)w-=1<<i-d[N]++-1;else++n}for(;n>=0&&w;--n){var L=s[n].s;if(d[L]==i){--d[L];++w}}v=i}return{t:new g(d),l:v}};var tt=function(t,i,e){return t.s==-1?Math.max(tt(t.l,i,e+1),tt(t.r,i,e+1)):i[t.s]=e};var it=function(t){var i=t.length;while(i&&!t[--i]);var e=new y(++i);var n=0,r=t[0],s=1;var o=function(t){e[n++]=t};for(var a=1;a<=i;++a){if(t[a]==r&&a!=i)++s;else{if(!r&&s>2){for(;s>138;s-=138)o(32754);if(s>2){o(s>10?s-11<<5|28690:s-3<<5|12305);s=0}}else if(s>3){o(r),--s;for(;s>6;s-=6)o(8304);if(s>2)o(s-3<<5|8208),s=0}while(s--)o(r);s=1;r=t[a]}}return{c:e.subarray(0,n),n:i}};var et=function(t,i){var e=0;for(var n=0;n<i.length;++n)e+=t[n]*i[n];return e};var nt=function(t,i,e){var n=e.length;var r=J(i+2);t[r]=n&255;t[r+1]=n>>8;t[r+2]=t[r]^255;t[r+3]=t[r+1]^255;for(var s=0;s<n;++s)t[r+s+4]=e[s];return(r+4+n)*8};var rt=function(t,i,e,n,r,s,o,a,u,h,c){X(i,c++,e);++r[256];var f=Q(r,15),l=f.t,d=f.l;var v=Q(s,15),w=v.t,p=v.l;var m=it(l),b=m.c,N=m.n;var g=it(w),L=g.c,x=g.n;var q=new y(19);for(var j=0;j<b.length;++j)++q[b[j]&31];for(var j=0;j<L.length;++j)++q[L[j]&31];var E=Q(q,7),M=E.t,O=E.l;var P=19;for(;P>4&&!M[S[P-1]];--P);var I=h+5<<3;var R=et(r,T)+et(s,D)+o;var F=et(r,l)+et(s,w)+o+14+3*P+et(q,M)+2*q[16]+3*q[17]+7*q[18];if(u>=0&&I<=R&&I<=F)return nt(i,c,t.subarray(u,u+h));var z,V,W,H;X(i,c,1+(F<R)),c+=2;if(F<R){z=B(l,d,0),V=l,W=B(w,p,0),H=w;var _=B(M,O,0);X(i,c,N-257);X(i,c+5,x-1);X(i,c+10,P-4);c+=14;for(var j=0;j<P;++j)X(i,c+3*j,M[S[j]]);c+=3*P;var J=[b,L];for(var G=0;G<2;++G){var $=J[G];for(var j=0;j<$.length;++j){var Y=$[j]&31;X(i,c,_[Y]),c+=M[Y];if(Y>15)X(i,c,$[j]>>5&127),c+=$[j]>>12}}}else{z=C,V=T,W=U,H=D}for(var j=0;j<a;++j){var K=n[j];if(K>255){var Y=K>>18&31;Z(i,c,z[Y+257]),c+=V[Y+257];if(Y>7)X(i,c,K>>23&31),c+=A[Y];var tt=K&31;Z(i,c,W[tt]),c+=H[tt];if(tt>3)Z(i,c,K>>5&8191),c+=k[tt]}else{Z(i,c,z[K]),c+=V[K]}}Z(i,c,z[256]);return c+V[256]};var st=new L([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]);var ot=new g(0);var at=function(t,i,e,n,r,s){var o=s.z||t.length;var a=new g(n+o+5*(1+Math.ceil(o/7e3))+r);var u=a.subarray(n,a.length-r);var h=s.l;var c=(s.r||0)&7;if(i){if(c)u[0]=s.r>>3;var f=st[i-1];var l=f>>13,d=f&8191;var v=(1<<e)-1;var w=s.p||new y(32768),p=s.h||new y(v+1);var m=Math.ceil(e/3),b=2*m;var N=function(i){return(t[i]^t[i+1]<<m^t[i+2]<<b)&v};var S=new L(25e3);var x=new y(288),q=new y(32);var j=0,M=0,O=s.i||0,I=0,R=s.w||0,F=0;for(;O+2<o;++O){var B=N(O);var T=O&32767,D=p[B];w[T]=D;p[B]=T;if(R<=O){var C=o-O;if((j>7e3||I>24576)&&(C>423||!h)){c=rt(t,u,0,S,x,q,M,I,F,O-F,c);I=j=M=0,F=O;for(var z=0;z<286;++z)x[z]=0;for(var z=0;z<30;++z)q[z]=0}var U=2,V=0,W=d,H=T-D&32767;if(C>2&&B==N(O-H)){var _=Math.min(l,C)-1;var $=Math.min(32767,O);var Y=Math.min(258,C);while(H<=$&&--W&&T!=D){if(t[O+U]==t[O+U-H]){var K=0;for(;K<Y&&t[O+K]==t[O+K-H];++K);if(K>U){U=K,V=H;if(K>_)break;var X=Math.min(H,K-2);var Z=0;for(var z=0;z<X;++z){var Q=O-H+z&32767;var tt=w[Q];var it=Q-tt&32767;if(it>Z)Z=it,D=Q}}}T=D,D=w[T];H+=T-D&32767}}if(V){S[I++]=268435456|E[U]<<18|P[V];var et=E[U]&31,ot=P[V]&31;M+=A[et]+k[ot];++x[257+et];++q[ot];R=O+U;++j}else{S[I++]=t[O];++x[t[O]]}}}for(O=Math.max(O,R);O<o;++O){S[I++]=t[O];++x[t[O]]}c=rt(t,u,h,S,x,q,M,I,F,O-F,c);if(!h){s.r=c&7|u[c/8|0]<<3;c-=7;s.h=p,s.p=w,s.i=O,s.w=R}}else{for(var O=s.w||0;O<o+h;O+=65535){var at=O+65535;if(at>=o){u[c/8|0]=h;at=o}c=nt(u,c+1,t.subarray(O,at))}s.i=o}return G(a,0,n+J(c)+r)};var ut=function(){var t=1,i=0;return{p:function(e){var n=t,r=i;var s=e.length|0;for(var o=0;o!=s;){var a=Math.min(o+2655,s);for(;o<a;++o)r+=n+=e[o];n=(n&65535)+15*(n>>16),r=(r&65535)+15*(r>>16)}t=n,i=r},d:function(){t%=65521,i%=65521;return(t&255)<<24|(t&65280)<<8|(i&255)<<8|i>>8}}};var ht=function(t,i,e,n,r){if(!r){r={l:1};if(i.dictionary){var s=i.dictionary.subarray(-32768);var o=new g(s.length+t.length);o.set(s);o.set(t,s.length);t=o;r.w=s.length}}return at(t,i.level==null?6:i.level,i.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+i.mem,e,n,r)};var ct=function(t,i,e){for(;e;++i)t[i]=e,e>>>=8};var ft=function(t,i){var e=i.level,n=e==0?0:e<6?1:e==9?3:2;t[0]=120,t[1]=n<<6|(i.dictionary&&32);t[1]|=31-(t[0]<<8|t[1])%31;if(i.dictionary){var r=ut();r.p(i.dictionary);ct(t,2,r.d())}};var lt=function(t,i){if((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)Y(6,"invalid zlib data");if((t[1]>>5&1)==+!i)Y(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary");return(t[1]>>3&4)+2};function dt(t,i){if(!i)i={};var e=ut();e.p(t);var n=ht(t,i,i.dictionary?6:2,4);return ft(n,i),ct(n,n.length-4,e.d()),n}function vt(t,i){return K(t.subarray(lt(t,i&&i.dictionary),-4),{i:2},i&&i.out,i&&i.dictionary)}var wt=typeof TextDecoder!="undefined"&&new TextDecoder;try{wt.decode(ot,{stream:true})}catch(t){}var pt=function(){return"undefined"!=typeof window?window:"undefined"!=typeof v?v:"undefined"!=typeof self?self:this}();function mt(){pt.console&&"function"==typeof pt.console.log&&pt.console.log.apply(pt.console,arguments)}var bt={log:mt,warn:function(t){pt.console&&("function"==typeof pt.console.warn?pt.console.warn.apply(pt.console,arguments):mt.call(null,arguments))},error:function(t){pt.console&&("function"==typeof pt.console.error?pt.console.error.apply(pt.console,arguments):mt(t))}};function Nt(t,i,e){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){kt(n.response,i,e)},n.onerror=function(){bt.error("could not download file")},n.send()}function gt(t){var i=new XMLHttpRequest;i.open("HEAD",t,!1);try{i.send()}catch(t){}return i.status>=200&&i.status<=299}function yt(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}var Lt,At,kt=pt.saveAs||("object"!==("undefined"==typeof window?"undefined":N(window))||window!==pt?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,i,e){var n=pt.URL||pt.webkitURL,r=document.createElement("a");i=i||t.name||"download",r.download=i,r.rel="noopener","string"==typeof t?(r.href=t,r.origin!==location.origin?gt(r.href)?Nt(t,i,e):yt(r,r.target="_blank"):yt(r)):(r.href=n.createObjectURL(t),setTimeout((function(){n.revokeObjectURL(r.href)}),4e4),setTimeout((function(){yt(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,i,e){if(i=i||t.name||"download","string"==typeof t)if(gt(t))Nt(t,i,e);else{var n=document.createElement("a");n.href=t,n.target="_blank",setTimeout((function(){yt(n)}))}else navigator.msSaveOrOpenBlob(function(t,i){return void 0===i?i={autoBom:!1}:"object"!==N(i)&&(bt.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,e),i)}:function(t,i,e,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof t)return Nt(t,i,e);var r="application/octet-stream"===t.type,s=/constructor/i.test(pt.HTMLElement)||pt.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||r&&s)&&"object"===("undefined"==typeof FileReader?"undefined":N(FileReader))){var a=new FileReader;a.onloadend=function(){var t=a.result;t=o?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=t:location=t,n=null},a.readAsDataURL(t)}else{var u=pt.URL||pt.webkitURL,h=u.createObjectURL(t);n?n.location=h:location.href=h,n=null,setTimeout((function(){u.revokeObjectURL(h)}),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 St(t){var i;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 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(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)]}}],n=0;n<e.length;n++){var r=e[n].re,s=e[n].process,o=r.exec(t);o&&(i=s(o),this.r=i[0],this.g=i[1],this.b=i[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),i=this.g.toString(16),e=this.b.toString(16);return 1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),1==e.length&&(e="0"+e),"#"+t+i+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 xt(t,i){var e=t[0],n=t[1],r=t[2],s=t[3];e=jt(e,n,r,s,i[0],7,-680876936),s=jt(s,e,n,r,i[1],12,-389564586),r=jt(r,s,e,n,i[2],17,606105819),n=jt(n,r,s,e,i[3],22,-1044525330),e=jt(e,n,r,s,i[4],7,-176418897),s=jt(s,e,n,r,i[5],12,1200080426),r=jt(r,s,e,n,i[6],17,-1473231341),n=jt(n,r,s,e,i[7],22,-45705983),e=jt(e,n,r,s,i[8],7,1770035416),s=jt(s,e,n,r,i[9],12,-1958414417),r=jt(r,s,e,n,i[10],17,-42063),n=jt(n,r,s,e,i[11],22,-1990404162),e=jt(e,n,r,s,i[12],7,1804603682),s=jt(s,e,n,r,i[13],12,-40341101),r=jt(r,s,e,n,i[14],17,-1502002290),e=Et(e,n=jt(n,r,s,e,i[15],22,1236535329),r,s,i[1],5,-165796510),s=Et(s,e,n,r,i[6],9,-1069501632),r=Et(r,s,e,n,i[11],14,643717713),n=Et(n,r,s,e,i[0],20,-373897302),e=Et(e,n,r,s,i[5],5,-701558691),s=Et(s,e,n,r,i[10],9,38016083),r=Et(r,s,e,n,i[15],14,-660478335),n=Et(n,r,s,e,i[4],20,-405537848),e=Et(e,n,r,s,i[9],5,568446438),s=Et(s,e,n,r,i[14],9,-1019803690),r=Et(r,s,e,n,i[3],14,-187363961),n=Et(n,r,s,e,i[8],20,1163531501),e=Et(e,n,r,s,i[13],5,-1444681467),s=Et(s,e,n,r,i[2],9,-51403784),r=Et(r,s,e,n,i[7],14,1735328473),e=Mt(e,n=Et(n,r,s,e,i[12],20,-1926607734),r,s,i[5],4,-378558),s=Mt(s,e,n,r,i[8],11,-2022574463),r=Mt(r,s,e,n,i[11],16,1839030562),n=Mt(n,r,s,e,i[14],23,-35309556),e=Mt(e,n,r,s,i[1],4,-1530992060),s=Mt(s,e,n,r,i[4],11,1272893353),r=Mt(r,s,e,n,i[7],16,-155497632),n=Mt(n,r,s,e,i[10],23,-1094730640),e=Mt(e,n,r,s,i[13],4,681279174),s=Mt(s,e,n,r,i[0],11,-358537222),r=Mt(r,s,e,n,i[3],16,-722521979),n=Mt(n,r,s,e,i[6],23,76029189),e=Mt(e,n,r,s,i[9],4,-640364487),s=Mt(s,e,n,r,i[12],11,-421815835),r=Mt(r,s,e,n,i[15],16,530742520),e=Ot(e,n=Mt(n,r,s,e,i[2],23,-995338651),r,s,i[0],6,-198630844),s=Ot(s,e,n,r,i[7],10,1126891415),r=Ot(r,s,e,n,i[14],15,-1416354905),n=Ot(n,r,s,e,i[5],21,-57434055),e=Ot(e,n,r,s,i[12],6,1700485571),s=Ot(s,e,n,r,i[3],10,-1894986606),r=Ot(r,s,e,n,i[10],15,-1051523),n=Ot(n,r,s,e,i[1],21,-2054922799),e=Ot(e,n,r,s,i[8],6,1873313359),s=Ot(s,e,n,r,i[15],10,-30611744),r=Ot(r,s,e,n,i[6],15,-1560198380),n=Ot(n,r,s,e,i[13],21,1309151649),e=Ot(e,n,r,s,i[4],6,-145523070),s=Ot(s,e,n,r,i[11],10,-1120210379),r=Ot(r,s,e,n,i[2],15,718787259),n=Ot(n,r,s,e,i[9],21,-343485551),t[0]=Ct(e,t[0]),t[1]=Ct(n,t[1]),t[2]=Ct(r,t[2]),t[3]=Ct(s,t[3])}function qt(t,i,e,n,r,s){return i=Ct(Ct(i,t),Ct(n,s)),Ct(i<<r|i>>>32-r,e)}function jt(t,i,e,n,r,s,o){return qt(i&e|~i&n,t,i,r,s,o)}function Et(t,i,e,n,r,s,o){return qt(i&n|e&~n,t,i,r,s,o)}function Mt(t,i,e,n,r,s,o){return qt(i^e^n,t,i,r,s,o)}function Ot(t,i,e,n,r,s,o){return qt(e^(i|~n),t,i,r,s,o)}function Pt(t){var i,e=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(i=64;i<=t.length;i+=64)xt(n,It(t.substring(i-64,i)));t=t.substring(i-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<t.length;i++)r[i>>2]|=t.charCodeAt(i)<<(i%4<<3);if(r[i>>2]|=128<<(i%4<<3),i>55)for(xt(n,r),i=0;i<16;i++)r[i]=0;return r[14]=8*e,xt(n,r),n}function It(t){var i,e=[];for(i=0;i<64;i+=4)e[i>>2]=t.charCodeAt(i)+(t.charCodeAt(i+1)<<8)+(t.charCodeAt(i+2)<<16)+(t.charCodeAt(i+3)<<24);return e}Lt=pt.atob.bind(pt),At=pt.btoa.bind(pt);var Rt="0123456789abcdef".split("");function Ft(t){for(var i="",e=0;e<4;e++)i+=Rt[t>>8*e+4&15]+Rt[t>>8*e&15];return i}function Bt(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Tt(t){return Pt(t).map(Bt).join("")}var Dt="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var i=0;i<t.length;i++)t[i]=Ft(t[i]);return t.join("")}(Pt("hello"));function Ct(t,i){if(Dt){var e=(65535&t)+(65535&i);return(t>>16)+(i>>16)+(e>>16)<<16|65535&e}return t+i&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 zt(t,i){var e,n,r,s;if(t!==e){for(var o=(r=t,s=1+(256/t.length>>0),new Array(s+1).join(r)),a=[],u=0;u<256;u++)a[u]=u;var h=0;for(u=0;u<256;u++){var c=a[u];h=(h+c+o.charCodeAt(u))%256,a[u]=a[h],a[h]=c}e=t,n=a}else a=n;var f=i.length,l=0,d=0,v="";for(u=0;u<f;u++)d=(d+(c=a[l=(l+1)%256]))%256,a[l]=a[d],a[d]=c,o=a[(a[l]+a[d])%256],v+=String.fromCharCode(i.charCodeAt(u)^o);return v}
/**
* @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 Ut={print:4,modify:8,copy:16,"annot-forms":32};function Vt(t,i,e,n){this.v=1,this.r=2;var r=192;t.forEach((function(t){r+=Ut[t]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(i+this.padding).substr(0,32),o=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,o),this.P=-(1+(255^r)),this.encryptionKey=Tt(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=zt(this.encryptionKey,this.padding)}function Wt(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var i="",e=t.length,n=0;n<e;n++){var r=t.charCodeAt(n);if(r<33||35===r||37===r||40===r||41===r||47===r||60===r||62===r||91===r||93===r||123===r||125===r||r>126)i+="#"+("0"+r.toString(16)).slice(-2);else i+=t[n]}return i}function Ht(t){if("object"!==N(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var i={};this.subscribe=function(t,e,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");i.hasOwnProperty(t)||(i[t]={});var r=Math.random().toString(35);return i[t][r]=[e,!!n],r},this.unsubscribe=function(t){for(var e in i)if(i[e][t])return delete i[e][t],0===Object.keys(i[e]).length&&delete i[e],!0;return!1},this.publish=function(e){if(i.hasOwnProperty(e)){var n=Array.prototype.slice.call(arguments,1),r=[];for(var s in i[e]){var o=i[e][s];try{o[0].apply(t,n)}catch(e){pt.console&&bt.error("jsPDF PubSub Error",e.message,e)}o[1]&&r.push(s)}r.length&&r.forEach(this.unsubscribe)}},this.getTopics=function(){return i}}function _t(t){if(!(this instanceof _t))return new _t(t);var i="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&i.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function Jt(t,i){this.gState=t,this.matrix=i,this.id="",this.objectNumber=-1}function Gt(t,i,e,n,r){if(!(this instanceof Gt))return new Gt(t,i,e,n,r);this.type="axial"===t?2:3,this.coords=i,this.colors=e,Jt.call(this,n,r)}function $t(t,i,e,n,r){if(!(this instanceof $t))return new $t(t,i,e,n,r);this.boundingBox=t,this.xStep=i,this.yStep=e,this.stream="",this.cloneIndex=0,Jt.call(this,n,r)}function Yt(t){var i,e="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],r=arguments[2],s=arguments[3],o=[],a=1,u=16,h="S",c=null;"object"===N(t=t||{})&&(e=t.orientation,n=t.unit||n,r=t.format||r,s=t.compress||t.compressPdf||s,null!==(c=t.encryption||null)&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),a="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(i=t.precision),void 0!==t.floatPrecision&&(u=t.floatPrecision),h=t.defaultPathOperation||"S"),o=t.filters||(!0===s?["FlateEncode"]:o),n=n||"mm",e=(""+(e||"P")).toLowerCase();var f=t.putOnlyUsedFonts||!1,l={},d={internal:{},__private__:{}};d.__private__.PubSub=Ht;var v="1.3",w=d.__private__.getPdfVersion=function(){return v};d.__private__.setPdfVersion=function(t){v=t};var p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return p};var m=d.__private__.getPageFormat=function(t){return p[t]};r=r||"a4";var b={COMPAT:"compat",ADVANCED:"advanced"},g=b.COMPAT;function y(){this.saveGraphicsState(),Q(new Dt(vt,0,0,-vt,0,Ce()*vt).toString()+" cm"),this.setFontSize(this.getFontSize()/vt),h="n",g=b.ADVANCED}function L(){this.restoreGraphicsState(),h="S",g=b.COMPAT}var A=d.__private__.combineFontStyleAndFontWeight=function(t,i){if("bold"==t&&"normal"==i||"bold"==t&&400==i||"normal"==t&&"italic"==i||"bold"==t&&"italic"==i)throw new Error("Invalid Combination of fontweight and fontstyle");return i&&(t=400==i||"normal"===i?"italic"===t?"italic":"normal":700!=i&&"bold"!==i||"normal"!==t?(700==i?"bold":i)+""+t:"bold"),t};d.advancedAPI=function(t){var i=g===b.COMPAT;return i&&y.call(this),"function"!=typeof t||(t(this),i&&L.call(this)),this},d.compatAPI=function(t){var i=g===b.ADVANCED;return i&&L.call(this),"function"!=typeof t||(t(this),i&&y.call(this)),this},d.isAdvancedAPI=function(){return g===b.ADVANCED};var k,S=function(t){if(g!==b.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},x=d.roundToPrecision=d.__private__.roundToPrecision=function(t,e){var n=i||e;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};k=d.hpf=d.__private__.hpf="number"==typeof u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return x(t,u)}:"smart"===u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return x(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return x(t,16)};var q=d.f2=d.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return x(t,2)},j=d.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return x(t,3)},E=d.scale=d.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return g===b.COMPAT?t*vt:g===b.ADVANCED?t:void 0},M=function(t){return g===b.COMPAT?Ce()-t:g===b.ADVANCED?t:void 0},O=function(t){return E(M(t))};d.__private__.setPrecision=d.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(i=parseInt(t,10))};var P,I="00000000000000000000000000000000",R=d.__private__.getFileId=function(){return I},F=d.__private__.setFileId=function(t){return I=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():I.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==c&&(Gi=new Vt(c.userPermissions,c.userPassword,c.ownerPassword,I)),I};d.setFileId=function(t){return F(t),this},d.getFileId=function(){return R()};var B=d.__private__.convertDateToPDFDate=function(t){var i=t.getTimezoneOffset(),e=i<0?"+":"-",n=Math.floor(Math.abs(i/60)),r=Math.abs(i%60),s=[e,U(n),"'",U(r),"'"].join("");return["D:",t.getFullYear(),U(t.getMonth()+1),U(t.getDate()),U(t.getHours()),U(t.getMinutes()),U(t.getSeconds()),s].join("")},T=d.__private__.convertPDFDateToDate=function(t){var i=parseInt(t.substr(2,4),10),e=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),r=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(i,e,n,r,s,o,0)},D=d.__private__.setCreationDate=function(t){var i;if(void 0===t&&(t=new Date),t instanceof Date)i=B(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");i=t}return P=i},C=d.__private__.getCreationDate=function(t){var i=P;return"jsDate"===t&&(i=T(P)),i};d.setCreationDate=function(t){return D(t),this},d.getCreationDate=function(t){return C(t)};var z,U=d.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},V=d.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},W=0,H=[],_=[],J=0,G=[],$=[],Y=!1,K=_,X=function(){W=0,J=0,_=[],H=[],G=[],Qt=Kt(),ti=Kt()};d.__private__.setCustomOutputDestination=function(t){Y=!0,K=t};var Z=function(t){Y||(K=t)};d.__private__.resetCustomOutputDestination=function(){Y=!1,K=_};var Q=d.__private__.out=function(t){return t=t.toString(),J+=t.length+1,K.push(t),K},tt=d.__private__.write=function(t){return Q(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},it=d.__private__.getArrayBuffer=function(t){for(var i=t.length,e=new ArrayBuffer(i),n=new Uint8Array(e);i--;)n[i]=t.charCodeAt(i);return e},et=[["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 et};var nt=t.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(t){return nt=g===b.ADVANCED?t/vt:t,this};var rt,st=d.__private__.getFontSize=d.getFontSize=function(){return g===b.COMPAT?nt:nt*vt},ot=t.R2L||!1;d.__private__.setR2L=d.setR2L=function(t){return ot=t,this},d.__private__.getR2L=d.getR2L=function(){return ot};var at,ut=d.__private__.setZoomMode=function(t){var i=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))rt=t;else if(isNaN(t)){if(-1===i.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.');rt=t}else rt=parseInt(t,10)};d.__private__.getZoomMode=function(){return rt};var ht,ct=d.__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.');at=t};d.__private__.getPageMode=function(){return at};var ft=d.__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.');ht=t};d.__private__.getLayoutMode=function(){return ht},d.__private__.setDisplayMode=d.setDisplayMode=function(t,i,e){return ut(t),ft(i),ct(e),this};var lt={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(t){if(-1===Object.keys(lt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return lt[t]},d.__private__.getDocumentProperties=function(){return lt},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(t){for(var i in lt)lt.hasOwnProperty(i)&&t[i]&&(lt[i]=t[i]);return this},d.__private__.setDocumentProperty=function(t,i){if(-1===Object.keys(lt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return lt[t]=i};var dt,vt,wt,mt,Nt,gt={},yt={},Lt=[],xt={},qt={},jt={},Et={},Mt=null,Ot=0,Pt=[],It=new Ht(d),Rt=t.hotfixes||[],Ft={},Bt={},Tt=[],Dt=function t(i,e,n,r,s,o){if(!(this instanceof t))return new t(i,e,n,r,s,o);isNaN(i)&&(i=1),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(r)&&(r=1),isNaN(s)&&(s=0),isNaN(o)&&(o=0),this._matrix=[i,e,n,r,s,o]};Object.defineProperty(Dt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Dt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Dt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Dt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Dt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Dt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Dt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Dt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Dt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Dt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Dt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Dt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Dt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Dt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Dt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Dt.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),Dt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(k).join(t)},Dt.prototype.multiply=function(t){var i=t.sx*this.sx+t.shy*this.shx,e=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,r=t.shx*this.shy+t.sy*this.sy,s=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Dt(i,e,n,r,s,o)},Dt.prototype.decompose=function(){var t=this.sx,i=this.shy,e=this.shx,n=this.sy,r=this.tx,s=this.ty,o=Math.sqrt(t*t+i*i),a=(t/=o)*e+(i/=o)*n;e-=t*a,n-=i*a;var u=Math.sqrt(e*e+n*n);return a/=u,t*(n/=u)<i*(e/=u)&&(t=-t,i=-i,a=-a,o=-o),{scale:new Dt(o,0,0,u,0,0),translate:new Dt(1,0,0,1,r,s),rotate:new Dt(t,i,-i,t,0,0),skew:new Dt(1,0,a,1,0,0)}},Dt.prototype.toString=function(t){return this.join(" ")},Dt.prototype.inversed=function(){var t=this.sx,i=this.shy,e=this.shx,n=this.sy,r=this.tx,s=this.ty,o=1/(t*n-i*e),a=n*o,u=-i*o,h=-e*o,c=t*o;return new Dt(a,u,h,c,-a*r-h*s,-u*r-c*s)},Dt.prototype.applyToPoint=function(t){var i=t.x*this.sx+t.y*this.shx+this.tx,e=t.x*this.shy+t.y*this.sy+this.ty;return new Oe(i,e)},Dt.prototype.applyToRectangle=function(t){var i=this.applyToPoint(t),e=this.applyToPoint(new Oe(t.x+t.w,t.y+t.h));return new Pe(i.x,i.y,e.x-i.x,e.y-i.y)},Dt.prototype.clone=function(){var t=this.sx,i=this.shy,e=this.shx,n=this.sy,r=this.tx,s=this.ty;return new Dt(t,i,e,n,r,s)},d.Matrix=Dt;var Ct=d.matrixMult=function(t,i){return i.multiply(t)},zt=new Dt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=zt;var Ut=function(t,i){if(!qt[t]){var e=(i instanceof Gt?"Sh":"P")+(Object.keys(xt).length+1).toString(10);i.id=e,qt[t]=e,xt[e]=i,It.publish("addPattern",i)}};d.ShadingPattern=Gt,d.TilingPattern=$t,d.addShadingPattern=function(t,i){return S("addShadingPattern()"),Ut(t,i),this},d.beginTilingPattern=function(t){S("beginTilingPattern()"),Re(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},d.endTilingPattern=function(t,i){S("endTilingPattern()"),i.stream=$[z].join("\n"),Ut(t,i),It.publish("endTilingPattern",i),Tt.pop().restore()};var Jt=d.__private__.newObject=function(){var t=Kt();return Xt(t,!0),t},Kt=d.__private__.newObjectDeferred=function(){return W++,H[W]=function(){return J},W},Xt=function(t,i){return i="boolean"==typeof i&&i,H[t]=J,i&&Q(t+" 0 obj"),t},Zt=d.__private__.newAdditionalObject=function(){var t={objId:Kt(),content:""};return G.push(t),t},Qt=Kt(),ti=Kt(),ii=d.__private__.decodeColorString=function(t){var i=t.split(" ");if(2!==i.length||"g"!==i[1]&&"G"!==i[1]){if(5===i.length&&("k"===i[4]||"K"===i[4])){i=[(1-i[0])*(1-i[3]),(1-i[1])*(1-i[3]),(1-i[2])*(1-i[3]),"r"]}}else{var e=parseFloat(i[0]);i=[e,e,e,"r"]}for(var n="#",r=0;r<3;r++)n+=("0"+Math.floor(255*parseFloat(i[r])).toString(16)).slice(-2);return n},ei=d.__private__.encodeColorString=function(t){var i;"string"==typeof t&&(t={ch1:t});var e=t.ch1,n=t.ch2,r=t.ch3,s=t.ch4,o="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof e&&"#"!==e.charAt(0)){var a=new St(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 u=parseInt(e.substr(1),16);e=u>>16&255,n=u>>8&255,r=255&u}if(void 0===n||void 0===s&&e===n&&n===r)if("string"==typeof e)i=e+" "+o[0];else switch(t.precision){case 2:i=q(e/255)+" "+o[0];break;case 3:default:i=j(e/255)+" "+o[0]}else if(void 0===s||"object"===N(s)){if(s&&!isNaN(s.a)&&0===s.a)return i=["1.","1.","1.",o[1]].join(" ");if("string"==typeof e)i=[e,n,r,o[1]].join(" ");else switch(t.precision){case 2:i=[q(e/255),q(n/255),q(r/255),o[1]].join(" ");break;default:case 3:i=[j(e/255),j(n/255),j(r/255),o[1]].join(" ")}}else if("string"==typeof e)i=[e,n,r,s,o[2]].join(" ");else switch(t.precision){case 2:i=[q(e),q(n),q(r),q(s),o[2]].join(" ");break;case 3:default:i=[j(e),j(n),j(r),j(s),o[2]].join(" ")}return i},ni=d.__private__.getFilters=function(){return o},ri=d.__private__.putStream=function(t){var i=(t=t||{}).data||"",e=t.filters||ni(),n=t.alreadyAppliedFilters||[],r=t.addLength1||!1,s=i.length,o=t.objectId,a=function(t){return t};if(null!==c&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==c&&(a=Gi.encryptor(o,0));var u={};!0===e&&(e=["FlateEncode"]);var h=t.additionalKeyValues||[],f=(u=void 0!==Yt.API.processDataByFilters?Yt.API.processDataByFilters(i,e):{data:i,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(h.push({key:"Length",value:u.data.length}),!0===r&&h.push({key:"Length1",value:s})),0!=f.length)if(f.split("/").length-1==1)h.push({key:"Filter",value:f});else{h.push({key:"Filter",value:"["+f+"]"});for(var l=0;l<h.length;l+=1)if("DecodeParms"===h[l].key){for(var d=[],v=0;v<u.reverseChain.split("/").length-1;v+=1)d.push("null");d.push(h[l].value),h[l].value="["+d.join(" ")+"]"}}Q("<<");for(var w=0;w<h.length;w++)Q("/"+h[w].key+" "+h[w].value);Q(">>"),0!==u.data.length&&(Q("stream"),Q(a(u.data)),Q("endstream"))},si=d.__private__.putPage=function(t){var i=t.number,e=t.data,n=t.objId,r=t.contentsObjId;Xt(n,!0),Q("<</Type /Page"),Q("/Parent "+t.rootDictionaryObjId+" 0 R"),Q("/Resources "+t.resourceDictionaryObjId+" 0 R"),Q("/MediaBox ["+parseFloat(k(t.mediaBox.bottomLeftX))+" "+parseFloat(k(t.mediaBox.bottomLeftY))+" "+k(t.mediaBox.topRightX)+" "+k(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&Q("/CropBox ["+k(t.cropBox.bottomLeftX)+" "+k(t.cropBox.bottomLeftY)+" "+k(t.cropBox.topRightX)+" "+k(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&Q("/BleedBox ["+k(t.bleedBox.bottomLeftX)+" "+k(t.bleedBox.bottomLeftY)+" "+k(t.bleedBox.topRightX)+" "+k(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&Q("/TrimBox ["+k(t.trimBox.bottomLeftX)+" "+k(t.trimBox.bottomLeftY)+" "+k(t.trimBox.topRightX)+" "+k(t.trimBox.topRightY)+"]"),null!==t.artBox&&Q("/ArtBox ["+k(t.artBox.bottomLeftX)+" "+k(t.artBox.bottomLeftY)+" "+k(t.artBox.topRightX)+" "+k(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&Q("/UserUnit "+t.userUnit),It.publish("putPage",{objId:n,pageContext:Pt[i],pageNumber:i,page:e}),Q("/Contents "+r+" 0 R"),Q(">>"),Q("endobj");var s=e.join("\n");return g===b.ADVANCED&&(s+="\nQ"),Xt(r,!0),ri({data:s,filters:ni(),objectId:r}),Q("endobj"),n},oi=d.__private__.putPages=function(){var t,i,e=[];for(t=1;t<=Ot;t++)Pt[t].objId=Kt(),Pt[t].contentsObjId=Kt();for(t=1;t<=Ot;t++)e.push(si({number:t,data:$[t],objId:Pt[t].objId,contentsObjId:Pt[t].contentsObjId,mediaBox:Pt[t].mediaBox,cropBox:Pt[t].cropBox,bleedBox:Pt[t].bleedBox,trimBox:Pt[t].trimBox,artBox:Pt[t].artBox,userUnit:Pt[t].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:ti}));Xt(Qt,!0),Q("<</Type /Pages");var n="/Kids [";for(i=0;i<Ot;i++)n+=e[i]+" 0 R ";Q(n+"]"),Q("/Count "+Ot),Q(">>"),Q("endobj"),It.publish("postPutPages")},ai=function(t){It.publish("putFont",{font:t,out:Q,newObject:Jt,putStream:ri}),!0!==t.isAlreadyPutted&&(t.objectNumber=Jt(),Q("<<"),Q("/Type /Font"),Q("/BaseFont /"+Wt(t.postScriptName)),Q("/Subtype /Type1"),"string"==typeof t.encoding&&Q("/Encoding /"+t.encoding),Q("/FirstChar 32"),Q("/LastChar 255"),Q(">>"),Q("endobj"))},ui=function(){for(var t in gt)gt.hasOwnProperty(t)&&(!1===f||!0===f&&l.hasOwnProperty(t))&&ai(gt[t])},hi=function(t){t.objectNumber=Jt();var i=[];i.push({key:"Type",value:"/XObject"}),i.push({key:"Subtype",value:"/Form"}),i.push({key:"BBox",value:"["+[k(t.x),k(t.y),k(t.x+t.width),k(t.y+t.height)].join(" ")+"]"}),i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var e=t.pages[1].join("\n");ri({data:e,additionalKeyValues:i,objectId:t.objectNumber}),Q("endobj")},ci=function(){for(var t in Ft)Ft.hasOwnProperty(t)&&hi(Ft[t])},fi=function(t,i){var e,n=[],r=1/(i-1);for(e=0;e<1;e+=r)n.push(e);if(n.push(1),0!=t[0].offset){var s={offset:0,color:t[0].color};t.unshift(s)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var a="",u=0,h=0;h<n.length;h++){for(e=n[h];e>t[u+1].offset;)u++;var c=t[u].offset,f=(e-c)/(t[u+1].offset-c),l=t[u].color,d=t[u+1].color;a+=V(Math.round((1-f)*l[0]+f*d[0]).toString(16))+V(Math.round((1-f)*l[1]+f*d[1]).toString(16))+V(Math.round((1-f)*l[2]+f*d[2]).toString(16))}return a.trim()},li=function(t,i){i||(i=21);var e=Jt(),n=fi(t.colors,i),r=[];r.push({key:"FunctionType",value:"0"}),r.push({key:"Domain",value:"[0.0 1.0]"}),r.push({key:"Size",value:"["+i+"]"}),r.push({key:"BitsPerSample",value:"8"}),r.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),r.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ri({data:n,additionalKeyValues:r,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:e}),Q("endobj"),t.objectNumber=Jt(),Q("<< /ShadingType "+t.type),Q("/ColorSpace /DeviceRGB");var s="/Coords ["+k(parseFloat(t.coords[0]))+" "+k(parseFloat(t.coords[1]))+" ";2===t.type?s+=k(parseFloat(t.coords[2]))+" "+k(parseFloat(t.coords[3])):s+=k(parseFloat(t.coords[2]))+" "+k(parseFloat(t.coords[3]))+" "+k(parseFloat(t.coords[4]))+" "+k(parseFloat(t.coords[5])),Q(s+="]"),t.matrix&&Q("/Matrix ["+t.matrix.toString()+"]"),Q("/Function "+e+" 0 R"),Q("/Extend [true true]"),Q(">>"),Q("endobj")},di=function(t,i){var e=Kt(),n=Jt();i.push({resourcesOid:e,objectOid:n}),t.objectNumber=n;var r=[];r.push({key:"Type",value:"/Pattern"}),r.push({key:"PatternType",value:"1"}),r.push({key:"PaintType",value:"1"}),r.push({key:"TilingType",value:"1"}),r.push({key:"BBox",value:"["+t.boundingBox.map(k).join(" ")+"]"}),r.push({key:"XStep",value:k(t.xStep)}),r.push({key:"YStep",value:k(t.yStep)}),r.push({key:"Resources",value:e+" 0 R"}),t.matrix&&r.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),ri({data:t.stream,additionalKeyValues:r,objectId:t.objectNumber}),Q("endobj")},vi=function(t){var i;for(i in xt)xt.hasOwnProperty(i)&&(xt[i]instanceof Gt?li(xt[i]):xt[i]instanceof $t&&di(xt[i],t))},wi=function(t){for(var i in t.objectNumber=Jt(),Q("<<"),t)switch(i){case"opacity":Q("/ca "+q(t[i]));break;case"stroke-opacity":Q("/CA "+q(t[i]))}Q(">>"),Q("endobj")},pi=function(){var t;for(t in jt)jt.hasOwnProperty(t)&&wi(jt[t])},mi=function(){for(var t in Q("/XObject <<"),Ft)Ft.hasOwnProperty(t)&&Ft[t].objectNumber>=0&&Q("/"+t+" "+Ft[t].objectNumber+" 0 R");It.publish("putXobjectDict"),Q(">>")},bi=function(){Gi.oid=Jt(),Q("<<"),Q("/Filter /Standard"),Q("/V "+Gi.v),Q("/R "+Gi.r),Q("/U <"+Gi.toHexString(Gi.U)+">"),Q("/O <"+Gi.toHexString(Gi.O)+">"),Q("/P "+Gi.P),Q(">>"),Q("endobj")},Ni=function(){for(var t in Q("/Font <<"),gt)gt.hasOwnProperty(t)&&(!1===f||!0===f&&l.hasOwnProperty(t))&&Q("/"+t+" "+gt[t].objectNumber+" 0 R");Q(">>")},gi=function(){if(Object.keys(xt).length>0){for(var t in Q("/Shading <<"),xt)xt.hasOwnProperty(t)&&xt[t]instanceof Gt&&xt[t].objectNumber>=0&&Q("/"+t+" "+xt[t].objectNumber+" 0 R");It.publish("putShadingPatternDict"),Q(">>")}},yi=function(t){if(Object.keys(xt).length>0){for(var i in Q("/Pattern <<"),xt)xt.hasOwnProperty(i)&&xt[i]instanceof d.TilingPattern&&xt[i].objectNumber>=0&&xt[i].objectNumber<t&&Q("/"+i+" "+xt[i].objectNumber+" 0 R");It.publish("putTilingPatternDict"),Q(">>")}},Li=function(){if(Object.keys(jt).length>0){var t;for(t in Q("/ExtGState <<"),jt)jt.hasOwnProperty(t)&&jt[t].objectNumber>=0&&Q("/"+t+" "+jt[t].objectNumber+" 0 R");It.publish("putGStateDict"),Q(">>")}},Ai=function(t){Xt(t.resourcesOid,!0),Q("<<"),Q("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Ni(),gi(),yi(t.objectOid),Li(),mi(),Q(">>"),Q("endobj")},ki=function(){var t=[];ui(),pi(),ci(),vi(t),It.publish("putResources"),t.forEach(Ai),Ai({resourcesOid:ti,objectOid:Number.MAX_SAFE_INTEGER}),It.publish("postPutResources")},Si=function(){It.publish("putAdditionalObjects");for(var t=0;t<G.length;t++){var i=G[t];Xt(i.objId,!0),Q(i.content),Q("endobj")}It.publish("postPutAdditionalObjects")},xi=function(t){yt[t.fontName]=yt[t.fontName]||{},yt[t.fontName][t.fontStyle]=t.id},qi=function(t,i,e,n,r){var s={id:"F"+(Object.keys(gt).length+1).toString(10),postScriptName:t,fontName:i,fontStyle:e,encoding:n,isStandardFont:r||!1,metadata:{}};return It.publish("addFont",{font:s,instance:this}),gt[s.id]=s,xi(s),s.id},ji=function(t){for(var i=0,e=et.length;i<e;i++){var n=qi.call(this,t[i][0],t[i][1],t[i][2],et[i][3],!0);!1===f&&(l[n]=!0);var r=t[i][0].split("-");xi({id:n,fontName:r[0],fontStyle:r[1]||""})}It.publish("addFonts",{fonts:gt,dictionary:yt})},Ei=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var i=t.stack||"";~i.indexOf(" at ")&&(i=i.split(" at ")[1]);var e="Error in function "+i.split("\n")[0].split("<")[0]+": "+t.message;if(!pt.console)throw new Error(e);pt.console.error(e,t),pt.alert&&alert(e)}},t.foo.bar=t,t.foo},Mi=function(t,i){var e,n,r,s,o,a,u,h,c;if(r=(i=i||{}).sourceEncoding||"Unicode",o=i.outputEncoding,(i.autoencode||o)&>[dt].metadata&>[dt].metadata[r]&>[dt].metadata[r].encoding&&(s=gt[dt].metadata[r].encoding,!o&>[dt].encoding&&(o=gt[dt].encoding),!o&&s.codePages&&(o=s.codePages[0]),"string"==typeof o&&(o=s[o]),o)){for(u=!1,a=[],e=0,n=t.length;e<n;e++)(h=o[t.charCodeAt(e)])?a.push(String.fromCharCode(h)):a.push(t[e]),a[e].charCodeAt(0)>>8&&(u=!0);t=a.join("")}for(e=t.length;void 0===u&&0!==e;)t.charCodeAt(e-1)>>8&&(u=!0),e--;if(!u)return t;for(a=i.noBOM?[]:[254,255],e=0,n=t.length;e<n;e++){if((c=(h=t.charCodeAt(e))>>8)>>8)throw new Error("Character at position "+e+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(c),a.push(h-(c<<8))}return String.fromCharCode.apply(void 0,a)},Oi=d.__private__.pdfEscape=d.pdfEscape=function(t,i){return Mi(t,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pi=d.__private__.beginPage=function(t){$[++Ot]=[],Pt[Ot]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Fi(Ot),Z($[z])},Ii=function(t,i){var n,s,o;switch(e=i||e,"string"==typeof t&&(n=m(t.toLowerCase()),Array.isArray(n)&&(s=n[0],o=n[1])),Array.isArray(t)&&(s=t[0]*vt,o=t[1]*vt),isNaN(s)&&(s=r[0],o=r[1]),(s>14400||o>14400)&&(bt.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),s=Math.min(14400,s),o=Math.min(14400,o)),r=[s,o],e.substr(0,1)){case"l":o>s&&(r=[o,s]);break;case"p":s>o&&(r=[o,s])}Pi(r),ve(le),Q(Le),0!==je&&Q(je+" J"),0!==Ee&&Q(Ee+" j"),It.publish("addPage",{pageNumber:Ot})},Ri=function(t){t>0&&t<=Ot&&($.splice(t,1),Pt.splice(t,1),Ot--,z>Ot&&(z=Ot),this.setPage(z))},Fi=function(t){t>0&&t<=Ot&&(z=t)},Bi=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return $.len