@easypdf/react
Version:
Free and open source React library for generating beautiful PDFs from React components
108 lines (106 loc) • 989 kB
JavaScript
(function(Jt,tt){typeof exports=="object"&&typeof module<"u"?tt(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],tt):(Jt=typeof globalThis<"u"?globalThis:Jt||self,tt(Jt["EasyPdf/React"]={},Jt.React,Jt.ReactDOM))})(this,function(Jt,tt,rs){"use strict";var CM=Object.defineProperty;var QM=(Jt,tt,rs)=>tt in Jt?CM(Jt,tt,{enumerable:!0,configurable:!0,writable:!0,value:rs}):Jt[tt]=rs;var e1=(Jt,tt,rs)=>QM(Jt,typeof tt!="symbol"?tt+"":tt,rs);const $u={pageSize:"A4",margins:{top:30,right:20,bottom:20,left:20},metadata:{title:"Generated Document",author:"EasyPdf",creator:"EasyPdf Generator"},watermark:{text:"Easy PDF Watermark"},scale:2,footer:{text:"Page {pageNumber} of {totalPages}",marginBottom:10,marginLeft:20,marginRight:20,align:"center"},header:{text:"Easy PDF Header",marginTop:10,marginLeft:20,marginRight:20,align:"center"},container:{},styles:{backgroundColor:"#ffffff",defaultFontSize:12,defaultFontFamily:"Arial, sans-serif",defaultTextColor:"#333333",customCSS:""}},qa=class qa{constructor(){e1(this,"config");this.config=$u}static initialize(){return qa.instance||(qa.instance=new qa),qa.instance}getConfig(){return this.config}setConfig(A){this.config={...this.config,...A}}};e1(qa,"instance",null);let wh=qa;var vh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ch(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var zu={exports:{}},co={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var t1;function t4(){if(t1)return co;t1=1;var r=tt,A=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,n=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,o,u){var c,f={},g=null,h=null;u!==void 0&&(g=""+u),o.key!==void 0&&(g=""+o.key),o.ref!==void 0&&(h=o.ref);for(c in o)t.call(o,c)&&!i.hasOwnProperty(c)&&(f[c]=o[c]);if(s&&s.defaultProps)for(c in o=s.defaultProps,o)f[c]===void 0&&(f[c]=o[c]);return{$$typeof:A,type:s,key:g,ref:h,props:f,_owner:n.current}}return co.Fragment=e,co.jsx=a,co.jsxs=a,co}var lo={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r1;function r4(){return r1||(r1=1,process.env.NODE_ENV!=="production"&&function(){var r=tt,A=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,p="@@iterator";function m(AA){if(AA===null||typeof AA!="object")return null;var xA=v&&AA[v]||AA[p];return typeof xA=="function"?xA:null}var C=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q(AA){{for(var xA=arguments.length,RA=new Array(xA>1?xA-1:0),te=1;te<xA;te++)RA[te-1]=arguments[te];y("error",AA,RA)}}function y(AA,xA,RA){{var te=C.ReactDebugCurrentFrame,de=te.getStackAddendum();de!==""&&(xA+="%s",RA=RA.concat([de]));var ye=RA.map(function(ce){return String(ce)});ye.unshift("Warning: "+xA),Function.prototype.apply.call(console[AA],console,ye)}}var x=!1,T=!1,N=!1,D=!1,R=!1,k;k=Symbol.for("react.module.reference");function $(AA){return!!(typeof AA=="string"||typeof AA=="function"||AA===t||AA===i||R||AA===n||AA===u||AA===c||D||AA===h||x||T||N||typeof AA=="object"&&AA!==null&&(AA.$$typeof===g||AA.$$typeof===f||AA.$$typeof===a||AA.$$typeof===s||AA.$$typeof===o||AA.$$typeof===k||AA.getModuleId!==void 0))}function I(AA,xA,RA){var te=AA.displayName;if(te)return te;var de=xA.displayName||xA.name||"";return de!==""?RA+"("+de+")":RA}function L(AA){return AA.displayName||"Context"}function K(AA){if(AA==null)return null;if(typeof AA.tag=="number"&&Q("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof AA=="function")return AA.displayName||AA.name||null;if(typeof AA=="string")return AA;switch(AA){case t:return"Fragment";case e:return"Portal";case i:return"Profiler";case n:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof AA=="object")switch(AA.$$typeof){case s:var xA=AA;return L(xA)+".Consumer";case a:var RA=AA;return L(RA._context)+".Provider";case o:return I(AA,AA.render,"ForwardRef");case f:var te=AA.displayName||null;return te!==null?te:K(AA.type)||"Memo";case g:{var de=AA,ye=de._payload,ce=de._init;try{return K(ce(ye))}catch{return null}}}return null}var M=Object.assign,J=0,Y,z,W,Z,rA,hA,U;function _(){}_.__reactDisabledLog=!0;function V(){{if(J===0){Y=console.log,z=console.info,W=console.warn,Z=console.error,rA=console.group,hA=console.groupCollapsed,U=console.groupEnd;var AA={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:AA,log:AA,warn:AA,error:AA,group:AA,groupCollapsed:AA,groupEnd:AA})}J++}}function G(){{if(J--,J===0){var AA={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},AA,{value:Y}),info:M({},AA,{value:z}),warn:M({},AA,{value:W}),error:M({},AA,{value:Z}),group:M({},AA,{value:rA}),groupCollapsed:M({},AA,{value:hA}),groupEnd:M({},AA,{value:U})})}J<0&&Q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var tA=C.ReactCurrentDispatcher,sA;function cA(AA,xA,RA){{if(sA===void 0)try{throw Error()}catch(de){var te=de.stack.trim().match(/\n( *(at )?)/);sA=te&&te[1]||""}return`
`+sA+AA}}var lA=!1,CA;{var QA=typeof WeakMap=="function"?WeakMap:Map;CA=new QA}function bA(AA,xA){if(!AA||lA)return"";{var RA=CA.get(AA);if(RA!==void 0)return RA}var te;lA=!0;var de=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ye;ye=tA.current,tA.current=null,V();try{if(xA){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(Se){te=Se}Reflect.construct(AA,[],ce)}else{try{ce.call()}catch(Se){te=Se}AA.call(ce.prototype)}}else{try{throw Error()}catch(Se){te=Se}AA()}}catch(Se){if(Se&&te&&typeof Se.stack=="string"){for(var he=Se.stack.split(`
`),kA=te.stack.split(`
`),eA=he.length-1,mA=kA.length-1;eA>=1&&mA>=0&&he[eA]!==kA[mA];)mA--;for(;eA>=1&&mA>=0;eA--,mA--)if(he[eA]!==kA[mA]){if(eA!==1||mA!==1)do if(eA--,mA--,mA<0||he[eA]!==kA[mA]){var KA=`
`+he[eA].replace(" at new "," at ");return AA.displayName&&KA.includes("<anonymous>")&&(KA=KA.replace("<anonymous>",AA.displayName)),typeof AA=="function"&&CA.set(AA,KA),KA}while(eA>=1&&mA>=0);break}}}finally{lA=!1,tA.current=ye,G(),Error.prepareStackTrace=de}var Ie=AA?AA.displayName||AA.name:"",qe=Ie?cA(Ie):"";return typeof AA=="function"&&CA.set(AA,qe),qe}function NA(AA,xA,RA){return bA(AA,!1)}function GA(AA){var xA=AA.prototype;return!!(xA&&xA.isReactComponent)}function dA(AA,xA,RA){if(AA==null)return"";if(typeof AA=="function")return bA(AA,GA(AA));if(typeof AA=="string")return cA(AA);switch(AA){case u:return cA("Suspense");case c:return cA("SuspenseList")}if(typeof AA=="object")switch(AA.$$typeof){case o:return NA(AA.render);case f:return dA(AA.type,xA,RA);case g:{var te=AA,de=te._payload,ye=te._init;try{return dA(ye(de),xA,RA)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,re={},qA=C.ReactDebugCurrentFrame;function EA(AA){if(AA){var xA=AA._owner,RA=dA(AA.type,AA._source,xA?xA.type:null);qA.setExtraStackFrame(RA)}else qA.setExtraStackFrame(null)}function TA(AA,xA,RA,te,de){{var ye=Function.call.bind(X);for(var ce in AA)if(ye(AA,ce)){var he=void 0;try{if(typeof AA[ce]!="function"){var kA=Error((te||"React class")+": "+RA+" type `"+ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof AA[ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw kA.name="Invariant Violation",kA}he=AA[ce](xA,ce,te,RA,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(eA){he=eA}he&&!(he instanceof Error)&&(EA(de),Q("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",te||"React class",RA,ce,typeof he),EA(null)),he instanceof Error&&!(he.message in re)&&(re[he.message]=!0,EA(de),Q("Failed %s type: %s",RA,he.message),EA(null))}}}var DA=Array.isArray;function OA(AA){return DA(AA)}function pA(AA){{var xA=typeof Symbol=="function"&&Symbol.toStringTag,RA=xA&&AA[Symbol.toStringTag]||AA.constructor.name||"Object";return RA}}function IA(AA){try{return MA(AA),!1}catch{return!0}}function MA(AA){return""+AA}function PA(AA){if(IA(AA))return Q("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pA(AA)),MA(AA)}var ZA=C.ReactCurrentOwner,ve={key:!0,ref:!0,__self:!0,__source:!0},ee,ie;function _A(AA){if(X.call(AA,"ref")){var xA=Object.getOwnPropertyDescriptor(AA,"ref").get;if(xA&&xA.isReactWarning)return!1}return AA.ref!==void 0}function Pe(AA){if(X.call(AA,"key")){var xA=Object.getOwnPropertyDescriptor(AA,"key").get;if(xA&&xA.isReactWarning)return!1}return AA.key!==void 0}function ge(AA,xA){typeof AA.ref=="string"&&ZA.current}function Je(AA,xA){{var RA=function(){ee||(ee=!0,Q("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",xA))};RA.isReactWarning=!0,Object.defineProperty(AA,"key",{get:RA,configurable:!0})}}function Ue(AA,xA){{var RA=function(){ie||(ie=!0,Q("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",xA))};RA.isReactWarning=!0,Object.defineProperty(AA,"ref",{get:RA,configurable:!0})}}var Oe=function(AA,xA,RA,te,de,ye,ce){var he={$$typeof:A,type:AA,key:xA,ref:RA,props:ce,_owner:ye};return he._store={},Object.defineProperty(he._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(he,"_self",{configurable:!1,enumerable:!1,writable:!1,value:te}),Object.defineProperty(he,"_source",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.freeze&&(Object.freeze(he.props),Object.freeze(he)),he};function Pt(AA,xA,RA,te,de){{var ye,ce={},he=null,kA=null;RA!==void 0&&(PA(RA),he=""+RA),Pe(xA)&&(PA(xA.key),he=""+xA.key),_A(xA)&&(kA=xA.ref,ge(xA,de));for(ye in xA)X.call(xA,ye)&&!ve.hasOwnProperty(ye)&&(ce[ye]=xA[ye]);if(AA&&AA.defaultProps){var eA=AA.defaultProps;for(ye in eA)ce[ye]===void 0&&(ce[ye]=eA[ye])}if(he||kA){var mA=typeof AA=="function"?AA.displayName||AA.name||"Unknown":AA;he&&Je(ce,mA),kA&&Ue(ce,mA)}return Oe(AA,he,kA,de,te,ZA.current,ce)}}var be=C.ReactCurrentOwner,Kt=C.ReactDebugCurrentFrame;function Ee(AA){if(AA){var xA=AA._owner,RA=dA(AA.type,AA._source,xA?xA.type:null);Kt.setExtraStackFrame(RA)}else Kt.setExtraStackFrame(null)}var St;St=!1;function De(AA){return typeof AA=="object"&&AA!==null&&AA.$$typeof===A}function Ze(){{if(be.current){var AA=K(be.current.type);if(AA)return`
Check the render method of \``+AA+"`."}return""}}function Be(AA){return""}var oe={};function yr(AA){{var xA=Ze();if(!xA){var RA=typeof AA=="string"?AA:AA.displayName||AA.name;RA&&(xA=`
Check the top-level render call using <`+RA+">.")}return xA}}function wt(AA,xA){{if(!AA._store||AA._store.validated||AA.key!=null)return;AA._store.validated=!0;var RA=yr(xA);if(oe[RA])return;oe[RA]=!0;var te="";AA&&AA._owner&&AA._owner!==be.current&&(te=" It was passed a child from "+K(AA._owner.type)+"."),Ee(AA),Q('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',RA,te),Ee(null)}}function Ur(AA,xA){{if(typeof AA!="object")return;if(OA(AA))for(var RA=0;RA<AA.length;RA++){var te=AA[RA];De(te)&&wt(te,xA)}else if(De(AA))AA._store&&(AA._store.validated=!0);else if(AA){var de=m(AA);if(typeof de=="function"&&de!==AA.entries)for(var ye=de.call(AA),ce;!(ce=ye.next()).done;)De(ce.value)&&wt(ce.value,xA)}}}function br(AA){{var xA=AA.type;if(xA==null||typeof xA=="string")return;var RA;if(typeof xA=="function")RA=xA.propTypes;else if(typeof xA=="object"&&(xA.$$typeof===o||xA.$$typeof===f))RA=xA.propTypes;else return;if(RA){var te=K(xA);TA(RA,AA.props,"prop",te,AA)}else if(xA.PropTypes!==void 0&&!St){St=!0;var de=K(xA);Q("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",de||"Unknown")}typeof xA.getDefaultProps=="function"&&!xA.getDefaultProps.isReactClassApproved&&Q("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ae(AA){{for(var xA=Object.keys(AA.props),RA=0;RA<xA.length;RA++){var te=xA[RA];if(te!=="children"&&te!=="key"){Ee(AA),Q("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),Ee(null);break}}AA.ref!==null&&(Ee(AA),Q("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var lr={};function Dr(AA,xA,RA,te,de,ye){{var ce=$(AA);if(!ce){var he="";(AA===void 0||typeof AA=="object"&&AA!==null&&Object.keys(AA).length===0)&&(he+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var kA=Be();kA?he+=kA:he+=Ze();var eA;AA===null?eA="null":OA(AA)?eA="array":AA!==void 0&&AA.$$typeof===A?(eA="<"+(K(AA.type)||"Unknown")+" />",he=" Did you accidentally export a JSX literal instead of a component?"):eA=typeof AA,Q("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",eA,he)}var mA=Pt(AA,xA,RA,de,ye);if(mA==null)return mA;if(ce){var KA=xA.children;if(KA!==void 0)if(te)if(OA(KA)){for(var Ie=0;Ie<KA.length;Ie++)Ur(KA[Ie],AA);Object.freeze&&Object.freeze(KA)}else Q("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ur(KA,AA)}if(X.call(xA,"key")){var qe=K(AA),Se=Object.keys(xA).filter(function(Bn){return Bn!=="key"}),vt=Se.length>0?"{key: someKey, "+Se.join(": ..., ")+": ...}":"{key: someKey}";if(!lr[qe+vt]){var Xt=Se.length>0?"{"+Se.join(": ..., ")+": ...}":"{}";Q(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,vt,qe,Xt,qe),lr[qe+vt]=!0}}return AA===t?ae(mA):br(mA),mA}}function At(AA,xA,RA){return Dr(AA,xA,RA,!0)}function it(AA,xA,RA){return Dr(AA,xA,RA,!1)}var ct=it,er=At;lo.Fragment=t,lo.jsx=ct,lo.jsxs=er}()),lo}var n1;function n4(){return n1||(n1=1,process.env.NODE_ENV==="production"?zu.exports=t4():zu.exports=r4()),zu.exports}var i4=n4();const i1=tt.createContext(null),a4=({instance:r,children:A})=>i4.jsx(i1.Provider,{value:{instance:r},children:A}),a1=()=>{const r=tt.useContext(i1);if(!r)throw new Error("useEasyPdf must be used within an EasyPdfProvider");return r};var ns={},s1;function s4(){if(s1)return ns;s1=1;var r=rs;if(process.env.NODE_ENV==="production")ns.createRoot=r.createRoot,ns.hydrateRoot=r.hydrateRoot;else{var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ns.createRoot=function(e,t){A.usingClientEntryPoint=!0;try{return r.createRoot(e,t)}finally{A.usingClientEntryPoint=!1}},ns.hydrateRoot=function(e,t,n){A.usingClientEntryPoint=!0;try{return r.hydrateRoot(e,t,n)}finally{A.usingClientEntryPoint=!1}}}return ns}var o4=s4();const u4=Ch(o4);function Me(r){"@babel/helpers - typeof";return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},Me(r)}var Br=Uint8Array,Jr=Uint16Array,Qh=Int32Array,Zu=new Br([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]),Ac=new Br([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]),mh=new Br([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o1=function(r,A){for(var e=new Jr(31),t=0;t<31;++t)e[t]=A+=1<<r[t-1];for(var n=new Qh(e[30]),t=1;t<30;++t)for(var i=e[t];i<e[t+1];++i)n[i]=i-e[t]<<5|t;return{b:e,r:n}},u1=o1(Zu,2),c1=u1.b,Fh=u1.r;c1[28]=258,Fh[258]=28;for(var l1=o1(Ac,0),c4=l1.b,f1=l1.r,yh=new Jr(32768),ot=0;ot<32768;++ot){var Li=(ot&43690)>>1|(ot&21845)<<1;Li=(Li&52428)>>2|(Li&13107)<<2,Li=(Li&61680)>>4|(Li&3855)<<4,yh[ot]=((Li&65280)>>8|(Li&255)<<8)>>1}for(var Vn=function(r,A,e){for(var t=r.length,n=0,i=new Jr(A);n<t;++n)r[n]&&++i[r[n]-1];var a=new Jr(A);for(n=1;n<A;++n)a[n]=a[n-1]+i[n-1]<<1;var s;if(e){s=new Jr(1<<A);var o=15-A;for(n=0;n<t;++n)if(r[n])for(var u=n<<4|r[n],c=A-r[n],f=a[r[n]-1]++<<c,g=f|(1<<c)-1;f<=g;++f)s[yh[f]>>o]=u}else for(s=new Jr(t),n=0;n<t;++n)r[n]&&(s[n]=yh[a[r[n]-1]++]>>15-r[n]);return s},Hi=new Br(288),ot=0;ot<144;++ot)Hi[ot]=8;for(var ot=144;ot<256;++ot)Hi[ot]=9;for(var ot=256;ot<280;++ot)Hi[ot]=7;for(var ot=280;ot<288;++ot)Hi[ot]=8;for(var fo=new Br(32),ot=0;ot<32;++ot)fo[ot]=5;var l4=Vn(Hi,9,0),f4=Vn(Hi,9,1),h4=Vn(fo,5,0),B4=Vn(fo,5,1),Uh=function(r){for(var A=r[0],e=1;e<r.length;++e)r[e]>A&&(A=r[e]);return A},mn=function(r,A,e){var t=A/8|0;return(r[t]|r[t+1]<<8)>>(A&7)&e},bh=function(r,A){var e=A/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(A&7)},Eh=function(r){return(r+7)/8|0},h1=function(r,A,e){return(e==null||e>r.length)&&(e=r.length),new Br(r.subarray(A,e))},g4=["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"],Fn=function(r,A,e){var t=new Error(A||g4[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,Fn),!e)throw t;return t},d4=function(r,A,e,t){var n=r.length,i=0;if(!n||A.f&&!A.l)return e||new Br(0);var a=!e,s=a||A.i!=2,o=A.i;a&&(e=new Br(n*3));var u=function(QA){var bA=e.length;if(QA>bA){var NA=new Br(Math.max(bA*2,QA));NA.set(e),e=NA}},c=A.f||0,f=A.p||0,g=A.b||0,h=A.l,v=A.d,p=A.m,m=A.n,C=n*8;do{if(!h){c=mn(r,f,1);var Q=mn(r,f+1,3);if(f+=3,Q)if(Q==1)h=f4,v=B4,p=9,m=5;else if(Q==2){var N=mn(r,f,31)+257,D=mn(r,f+10,15)+4,R=N+mn(r,f+5,31)+1;f+=14;for(var k=new Br(R),$=new Br(19),I=0;I<D;++I)$[mh[I]]=mn(r,f+I*3,7);f+=D*3;for(var L=Uh($),K=(1<<L)-1,M=Vn($,L,1),I=0;I<R;){var J=M[mn(r,f,K)];f+=J&15;var y=J>>4;if(y<16)k[I++]=y;else{var Y=0,z=0;for(y==16?(z=3+mn(r,f,3),f+=2,Y=k[I-1]):y==17?(z=3+mn(r,f,7),f+=3):y==18&&(z=11+mn(r,f,127),f+=7);z--;)k[I++]=Y}}var W=k.subarray(0,N),Z=k.subarray(N);p=Uh(W),m=Uh(Z),h=Vn(W,p,1),v=Vn(Z,m,1)}else Fn(1);else{var y=Eh(f)+4,x=r[y-4]|r[y-3]<<8,T=y+x;if(T>n){o&&Fn(0);break}s&&u(g+x),e.set(r.subarray(y,T),g),A.b=g+=x,A.p=f=T*8,A.f=c;continue}if(f>C){o&&Fn(0);break}}s&&u(g+131072);for(var rA=(1<<p)-1,hA=(1<<m)-1,U=f;;U=f){var Y=h[bh(r,f)&rA],_=Y>>4;if(f+=Y&15,f>C){o&&Fn(0);break}if(Y||Fn(2),_<256)e[g++]=_;else if(_==256){U=f,h=null;break}else{var V=_-254;if(_>264){var I=_-257,G=Zu[I];V=mn(r,f,(1<<G)-1)+c1[I],f+=G}var tA=v[bh(r,f)&hA],sA=tA>>4;tA||Fn(3),f+=tA&15;var Z=c4[sA];if(sA>3){var G=Ac[sA];Z+=bh(r,f)&(1<<G)-1,f+=G}if(f>C){o&&Fn(0);break}s&&u(g+131072);var cA=g+V;if(g<Z){var lA=i-Z,CA=Math.min(Z,cA);for(lA+g<0&&Fn(3);g<CA;++g)e[g]=t[lA+g]}for(;g<cA;++g)e[g]=e[g-Z]}}A.l=h,A.p=U,A.b=g,A.f=c,h&&(c=1,A.m=p,A.d=v,A.n=m)}while(!c);return g!=e.length&&a?h1(e,0,g):e.subarray(0,g)},si=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8},ho=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8,r[t+2]|=e>>16},Ih=function(r,A){for(var e=[],t=0;t<r.length;++t)r[t]&&e.push({s:t,f:r[t]});var n=e.length,i=e.slice();if(!n)return{t:p1,l:0};if(n==1){var a=new Br(e[0].s+1);return a[e[0].s]=1,{t:a,l:1}}e.sort(function(T,N){return T.f-N.f}),e.push({s:-1,f:25001});var s=e[0],o=e[1],u=0,c=1,f=2;for(e[0]={s:-1,f:s.f+o.f,l:s,r:o};c!=n-1;)s=e[e[u].f<e[f].f?u++:f++],o=e[u!=c&&e[u].f<e[f].f?u++:f++],e[c++]={s:-1,f:s.f+o.f,l:s,r:o};for(var g=i[0].s,t=1;t<n;++t)i[t].s>g&&(g=i[t].s);var h=new Jr(g+1),v=xh(e[c-1],h,0);if(v>A){var t=0,p=0,m=v-A,C=1<<m;for(i.sort(function(N,D){return h[D.s]-h[N.s]||N.f-D.f});t<n;++t){var Q=i[t].s;if(h[Q]>A)p+=C-(1<<v-h[Q]),h[Q]=A;else break}for(p>>=m;p>0;){var y=i[t].s;h[y]<A?p-=1<<A-h[y]++-1:++t}for(;t>=0&&p;--t){var x=i[t].s;h[x]==A&&(--h[x],++p)}v=A}return{t:new Br(h),l:v}},xh=function(r,A,e){return r.s==-1?Math.max(xh(r.l,A,e+1),xh(r.r,A,e+1)):A[r.s]=e},B1=function(r){for(var A=r.length;A&&!r[--A];);for(var e=new Jr(++A),t=0,n=r[0],i=1,a=function(o){e[t++]=o},s=1;s<=A;++s)if(r[s]==n&&s!=A)++i;else{if(!n&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(n),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(n);i=1,n=r[s]}return{c:e.subarray(0,t),n:A}},Bo=function(r,A){for(var e=0,t=0;t<A.length;++t)e+=r[t]*A[t];return e},g1=function(r,A,e){var t=e.length,n=Eh(A+2);r[n]=t&255,r[n+1]=t>>8,r[n+2]=r[n]^255,r[n+3]=r[n+1]^255;for(var i=0;i<t;++i)r[n+i+4]=e[i];return(n+4+t)*8},d1=function(r,A,e,t,n,i,a,s,o,u,c){si(A,c++,e),++n[256];for(var f=Ih(n,15),g=f.t,h=f.l,v=Ih(i,15),p=v.t,m=v.l,C=B1(g),Q=C.c,y=C.n,x=B1(p),T=x.c,N=x.n,D=new Jr(19),R=0;R<Q.length;++R)++D[Q[R]&31];for(var R=0;R<T.length;++R)++D[T[R]&31];for(var k=Ih(D,7),$=k.t,I=k.l,L=19;L>4&&!$[mh[L-1]];--L);var K=u+5<<3,M=Bo(n,Hi)+Bo(i,fo)+a,J=Bo(n,g)+Bo(i,p)+a+14+3*L+Bo(D,$)+2*D[16]+3*D[17]+7*D[18];if(o>=0&&K<=M&&K<=J)return g1(A,c,r.subarray(o,o+u));var Y,z,W,Z;if(si(A,c,1+(J<M)),c+=2,J<M){Y=Vn(g,h,0),z=g,W=Vn(p,m,0),Z=p;var rA=Vn($,I,0);si(A,c,y-257),si(A,c+5,N-1),si(A,c+10,L-4),c+=14;for(var R=0;R<L;++R)si(A,c+3*R,$[mh[R]]);c+=3*L;for(var hA=[Q,T],U=0;U<2;++U)for(var _=hA[U],R=0;R<_.length;++R){var V=_[R]&31;si(A,c,rA[V]),c+=$[V],V>15&&(si(A,c,_[R]>>5&127),c+=_[R]>>12)}}else Y=l4,z=Hi,W=h4,Z=fo;for(var R=0;R<s;++R){var G=t[R];if(G>255){var V=G>>18&31;ho(A,c,Y[V+257]),c+=z[V+257],V>7&&(si(A,c,G>>23&31),c+=Zu[V]);var tA=G&31;ho(A,c,W[tA]),c+=Z[tA],tA>3&&(ho(A,c,G>>5&8191),c+=Ac[tA])}else ho(A,c,Y[G]),c+=z[G]}return ho(A,c,Y[256]),c+z[256]},p4=new Qh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),p1=new Br(0),w4=function(r,A,e,t,n,i){var a=i.z||r.length,s=new Br(t+a+5*(1+Math.ceil(a/7e3))+n),o=s.subarray(t,s.length-n),u=i.l,c=(i.r||0)&7;if(A){c&&(o[0]=i.r>>3);for(var f=p4[A-1],g=f>>13,h=f&8191,v=(1<<e)-1,p=i.p||new Jr(32768),m=i.h||new Jr(v+1),C=Math.ceil(e/3),Q=2*C,y=function(GA){return(r[GA]^r[GA+1]<<C^r[GA+2]<<Q)&v},x=new Qh(25e3),T=new Jr(288),N=new Jr(32),D=0,R=0,k=i.i||0,$=0,I=i.w||0,L=0;k+2<a;++k){var K=y(k),M=k&32767,J=m[K];if(p[M]=J,m[K]=M,I<=k){var Y=a-k;if((D>7e3||$>24576)&&(Y>423||!u)){c=d1(r,o,0,x,T,N,R,$,L,k-L,c),$=D=R=0,L=k;for(var z=0;z<286;++z)T[z]=0;for(var z=0;z<30;++z)N[z]=0}var W=2,Z=0,rA=h,hA=M-J&32767;if(Y>2&&K==y(k-hA))for(var U=Math.min(g,Y)-1,_=Math.min(32767,k),V=Math.min(258,Y);hA<=_&&--rA&&M!=J;){if(r[k+W]==r[k+W-hA]){for(var G=0;G<V&&r[k+G]==r[k+G-hA];++G);if(G>W){if(W=G,Z=hA,G>U)break;for(var tA=Math.min(hA,G-2),sA=0,z=0;z<tA;++z){var cA=k-hA+z&32767,lA=p[cA],CA=cA-lA&32767;CA>sA&&(sA=CA,J=cA)}}}M=J,J=p[M],hA+=M-J&32767}if(Z){x[$++]=268435456|Fh[W]<<18|f1[Z];var QA=Fh[W]&31,bA=f1[Z]&31;R+=Zu[QA]+Ac[bA],++T[257+QA],++N[bA],I=k+W,++D}else x[$++]=r[k],++T[r[k]]}}for(k=Math.max(k,I);k<a;++k)x[$++]=r[k],++T[r[k]];c=d1(r,o,u,x,T,N,R,$,L,k-L,c),u||(i.r=c&7|o[c/8|0]<<3,c-=7,i.h=m,i.p=p,i.i=k,i.w=I)}else{for(var k=i.w||0;k<a+u;k+=65535){var NA=k+65535;NA>=a&&(o[c/8|0]=u,NA=a),c=g1(o,c+1,r.subarray(k,NA))}i.i=a}return h1(s,0,t+Eh(c)+n)},w1=function(){var r=1,A=0;return{p:function(e){for(var t=r,n=A,i=e.length|0,a=0;a!=i;){for(var s=Math.min(a+2655,i);a<s;++a)n+=t+=e[a];t=(t&65535)+15*(t>>16),n=(n&65535)+15*(n>>16)}r=t,A=n},d:function(){return r%=65521,A%=65521,(r&255)<<24|(r&65280)<<8|(A&255)<<8|A>>8}}},v4=function(r,A,e,t,n){if(!n&&(n={l:1},A.dictionary)){var i=A.dictionary.subarray(-32768),a=new Br(i.length+r.length);a.set(i),a.set(r,i.length),r=a,n.w=i.length}return w4(r,A.level==null?6:A.level,A.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+A.mem,e,t,n)},v1=function(r,A,e){for(;e;++A)r[A]=e,e>>>=8},C4=function(r,A){var e=A.level,t=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=t<<6|(A.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,A.dictionary){var n=w1();n.p(A.dictionary),v1(r,2,n.d())}},Q4=function(r,A){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Fn(6,"invalid zlib data"),(r[1]>>5&1)==1&&Fn(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Lh(r,A){A||(A={});var e=w1();e.p(r);var t=v4(r,A,A.dictionary?6:2,4);return C4(t,A),v1(t,t.length-4,e.d()),t}function m4(r,A){return d4(r.subarray(Q4(r),-4),{i:2},A,A)}var F4=typeof TextDecoder<"u"&&new TextDecoder,y4=0;try{F4.decode(p1,{stream:!0}),y4=1}catch{}/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 3.0.1 Built on 2025-03-17T14:19:36.873Z
* 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 le=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Hh(){le.console&&typeof le.console.log=="function"&&le.console.log.apply(le.console,arguments)}var ze={log:Hh,warn:function(r){le.console&&(typeof le.console.warn=="function"?le.console.warn.apply(le.console,arguments):Hh.call(null,arguments))},error:function(r){le.console&&(typeof le.console.error=="function"?le.console.error.apply(le.console,arguments):Hh(r))}};function Sh(r,A,e){var t=new XMLHttpRequest;t.open("GET",r),t.responseType="blob",t.onload=function(){va(t.response,A,e)},t.onerror=function(){ze.error("could not download file")},t.send()}function C1(r){var A=new XMLHttpRequest;A.open("HEAD",r,!1);try{A.send()}catch{}return A.status>=200&&A.status<=299}function ec(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(A)}}var go,Th,va=le.saveAs||((typeof window>"u"?"undefined":Me(window))!=="object"||window!==le?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,A,e){var t=le.URL||le.webkitURL,n=document.createElement("a");A=A||r.name||"download",n.download=A,n.rel="noopener",typeof r=="string"?(n.href=r,n.origin!==location.origin?C1(n.href)?Sh(r,A,e):ec(n,n.target="_blank"):ec(n)):(n.href=t.createObjectURL(r),setTimeout(function(){t.revokeObjectURL(n.href)},4e4),setTimeout(function(){ec(n)},0))}:"msSaveOrOpenBlob"in navigator?function(r,A,e){if(A=A||r.name||"download",typeof r=="string")if(C1(r))Sh(r,A,e);else{var t=document.createElement("a");t.href=r,t.target="_blank",setTimeout(function(){ec(t)})}else navigator.msSaveOrOpenBlob(function(n,i){return i===void 0?i={autoBom:!1}:Me(i)!=="object"&&(ze.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n}(r,e),A)}:function(r,A,e,t){if((t=t||open("","_blank"))&&(t.document.title=t.document.body.innerText="downloading..."),typeof r=="string")return Sh(r,A,e);var n=r.type==="application/octet-stream",i=/constructor/i.test(le.HTMLElement)||le.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||n&&i)&&(typeof FileReader>"u"?"undefined":Me(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var c=s.result;c=a?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),t?t.location.href=c:location=c,t=null},s.readAsDataURL(r)}else{var o=le.URL||le.webkitURL,u=o.createObjectURL(r);t?t.location=u:location.href=u,t=null,setTimeout(function(){o.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 Q1(r){var A;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={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"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;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(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],t=0;t<e.length;t++){var n=e[t].re,i=e[t].process,a=n.exec(r);a&&(A=i(a),this.r=A[0],this.g=A[1],this.b=A[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),o=this.g.toString(16),u=this.b.toString(16);return s.length==1&&(s="0"+s),o.length==1&&(o="0"+o),u.length==1&&(u="0"+u),"#"+s+o+u}}/**
* @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 Nh(r,A){var e=r[0],t=r[1],n=r[2],i=r[3];e=gr(e,t,n,i,A[0],7,-680876936),i=gr(i,e,t,n,A[1],12,-389564586),n=gr(n,i,e,t,A[2],17,606105819),t=gr(t,n,i,e,A[3],22,-1044525330),e=gr(e,t,n,i,A[4],7,-176418897),i=gr(i,e,t,n,A[5],12,1200080426),n=gr(n,i,e,t,A[6],17,-1473231341),t=gr(t,n,i,e,A[7],22,-45705983),e=gr(e,t,n,i,A[8],7,1770035416),i=gr(i,e,t,n,A[9],12,-1958414417),n=gr(n,i,e,t,A[10],17,-42063),t=gr(t,n,i,e,A[11],22,-1990404162),e=gr(e,t,n,i,A[12],7,1804603682),i=gr(i,e,t,n,A[13],12,-40341101),n=gr(n,i,e,t,A[14],17,-1502002290),e=dr(e,t=gr(t,n,i,e,A[15],22,1236535329),n,i,A[1],5,-165796510),i=dr(i,e,t,n,A[6],9,-1069501632),n=dr(n,i,e,t,A[11],14,643717713),t=dr(t,n,i,e,A[0],20,-373897302),e=dr(e,t,n,i,A[5],5,-701558691),i=dr(i,e,t,n,A[10],9,38016083),n=dr(n,i,e,t,A[15],14,-660478335),t=dr(t,n,i,e,A[4],20,-405537848),e=dr(e,t,n,i,A[9],5,568446438),i=dr(i,e,t,n,A[14],9,-1019803690),n=dr(n,i,e,t,A[3],14,-187363961),t=dr(t,n,i,e,A[8],20,1163531501),e=dr(e,t,n,i,A[13],5,-1444681467),i=dr(i,e,t,n,A[2],9,-51403784),n=dr(n,i,e,t,A[7],14,1735328473),e=pr(e,t=dr(t,n,i,e,A[12],20,-1926607734),n,i,A[5],4,-378558),i=pr(i,e,t,n,A[8],11,-2022574463),n=pr(n,i,e,t,A[11],16,1839030562),t=pr(t,n,i,e,A[14],23,-35309556),e=pr(e,t,n,i,A[1],4,-1530992060),i=pr(i,e,t,n,A[4],11,1272893353),n=pr(n,i,e,t,A[7],16,-155497632),t=pr(t,n,i,e,A[10],23,-1094730640),e=pr(e,t,n,i,A[13],4,681279174),i=pr(i,e,t,n,A[0],11,-358537222),n=pr(n,i,e,t,A[3],16,-722521979),t=pr(t,n,i,e,A[6],23,76029189),e=pr(e,t,n,i,A[9],4,-640364487),i=pr(i,e,t,n,A[12],11,-421815835),n=pr(n,i,e,t,A[15],16,530742520),e=wr(e,t=pr(t,n,i,e,A[2],23,-995338651),n,i,A[0],6,-198630844),i=wr(i,e,t,n,A[7],10,1126891415),n=wr(n,i,e,t,A[14],15,-1416354905),t=wr(t,n,i,e,A[5],21,-57434055),e=wr(e,t,n,i,A[12],6,1700485571),i=wr(i,e,t,n,A[3],10,-1894986606),n=wr(n,i,e,t,A[10],15,-1051523),t=wr(t,n,i,e,A[1],21,-2054922799),e=wr(e,t,n,i,A[8],6,1873313359),i=wr(i,e,t,n,A[15],10,-30611744),n=wr(n,i,e,t,A[6],15,-1560198380),t=wr(t,n,i,e,A[13],21,1309151649),e=wr(e,t,n,i,A[4],6,-145523070),i=wr(i,e,t,n,A[11],10,-1120210379),n=wr(n,i,e,t,A[2],15,718787259),t=wr(t,n,i,e,A[9],21,-343485551),r[0]=Si(e,r[0]),r[1]=Si(t,r[1]),r[2]=Si(n,r[2]),r[3]=Si(i,r[3])}function tc(r,A,e,t,n,i){return A=Si(Si(A,r),Si(t,i)),Si(A<<n|A>>>32-n,e)}function gr(r,A,e,t,n,i,a){return tc(A&e|~A&t,r,A,n,i,a)}function dr(r,A,e,t,n,i,a){return tc(A&t|e&~t,r,A,n,i,a)}function pr(r,A,e,t,n,i,a){return tc(A^e^t,r,A,n,i,a)}function wr(r,A,e,t,n,i,a){return tc(e^(A|~t),r,A,n,i,a)}function m1(r){var A,e=r.length,t=[1732584193,-271733879,-1732584194,271733878];for(A=64;A<=r.length;A+=64)Nh(t,U4(r.substring(A-64,A)));r=r.substring(A-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(A=0;A<r.length;A++)n[A>>2]|=r.charCodeAt(A)<<(A%4<<3);if(n[A>>2]|=128<<(A%4<<3),A>55)for(Nh(t,n),A=0;A<16;A++)n[A]=0;return n[14]=8*e,Nh(t,n),t}function U4(r){var A,e=[];for(A=0;A<64;A+=4)e[A>>2]=r.charCodeAt(A)+(r.charCodeAt(A+1)<<8)+(r.charCodeAt(A+2)<<16)+(r.charCodeAt(A+3)<<24);return e}go=le.atob.bind(le),Th=le.btoa.bind(le);var F1="0123456789abcdef".split("");function b4(r){for(var A="",e=0;e<4;e++)A+=F1[r>>8*e+4&15]+F1[r>>8*e&15];return A}function E4(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function Oh(r){return m1(r).map(E4).join("")}var I4=function(r){for(var A=0;A<r.length;A++)r[A]=b4(r[A]);return r.join("")}(m1("hello"))!="5d41402abc4b2a76b9719d911017c592";function Si(r,A){if(I4){var e=(65535&r)+(65535&A);return(r>>16)+(A>>16)+(e>>16)<<16|65535&e}return r+A&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 Dh(r,A){var e,t,n,i;if(r!==e){for(var a=(n=r,i=1+(256/r.length>>0),new Array(i+1).join(n)),s=[],o=0;o<256;o++)s[o]=o;var u=0;for(o=0;o<256;o++){var c=s[o];u=(u+c+a.charCodeAt(o))%256,s[o]=s[u],s[u]=c}e=r,t=s}else s=t;var f=A.length,g=0,h=0,v="";for(o=0;o<f;o++)h=(h+(c=s[g=(g+1)%256]))%256,s[g]=s[h],s[h]=c,a=s[(s[g]+s[h])%256],v+=String.fromCharCode(A.charCodeAt(o)^a);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 y1={print:4,modify:8,copy:16,"annot-forms":32};function is(r,A,e,t){this.v=1,this.r=2;var n=192;r.forEach(function(s){if(y1.perm!==void 0)throw new Error("Invalid permission: "+s);n+=y1[s]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(A+this.padding).substr(0,32),a=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,a),this.P=-(1+(255^n)),this.encryptionKey=Oh(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(t)).substr(0,5),this.U=Dh(this.encryptionKey,this.padding)}function as(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var A="",e=r.length,t=0;t<e;t++){var n=r.charCodeAt(t);n<33||n===35||n===37||n===40||n===41||n===47||n===60||n===62||n===91||n===93||n===123||n===125||n>126?A+="#"+("0"+n.toString(16)).slice(-2):A+=r[t]}return A}function U1(r){if(Me(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var A={};this.subscribe=function(e,t,n){if(n=n||!1,typeof e!="string"||typeof t!="function"||typeof n!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");A.hasOwnProperty(e)||(A[e]={});var i=Math.random().toString(35);return A[e][i]=[t,!!n],i},this.unsubscribe=function(e){for(var t in A)if(A[t][e])return delete A[t][e],Object.keys(A[t]).length===0&&delete A[t],!0;return!1},this.publish=function(e){if(A.hasOwnProperty(e)){var t=Array.prototype.slice.call(arguments,1),n=[];for(var i in A[e]){var a=A[e][i];try{a[0].apply(r,t)}catch(s){le.console&&ze.error("jsPDF PubSub Error",s.message,s)}a[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return A}}function rc(r){if(!(this instanceof rc))return new rc(r);var A="opacity,stroke-opacity".split(",");for(var e in r)r.hasOwnProperty(e)&&A.indexOf(e)>=0&&(this[e]=r[e]);this.id="",this.objectNumber=-1}function b1(r,A){this.gState=r,this.matrix=A,this.id="",this.objectNumber=-1}function Ca(r,A,e,t,n){if(!(this instanceof Ca))return new Ca(r,A,e,t,n);this.type=r==="axial"?2:3,this.coords=A,this.colors=e,b1.call(this,t,n)}function ss(r,A,e,t,n){if(!(this instanceof ss))return new ss(r,A,e,t,n);this.boundingBox=r,this.xStep=A,this.yStep=e,this.stream="",this.cloneIndex=0,b1.call(this,t,n)}function fe(r){var A,e=typeof arguments[0]=="string"?arguments[0]:"p",t=arguments[1],n=arguments[2],i=arguments[3],a=[],s=1,o=16,u="S",c=null;Me(r=r||{})==="object"&&(e=r.orientation,t=r.unit||t,n=r.format||n,i=r.compress||r.compressPdf||i,(c=r.encryption||null)!==null&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),s=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(A=r.precision),r.floatPrecision!==void 0&&(o=r.floatPrecision),u=r.defaultPathOperation||"S"),a=r.filters||(i===!0?["FlateEncode"]:a),t=t||"mm",e=(""+(e||"P")).toLowerCase();var f=r.putOnlyUsedFonts||!1,g={},h={internal:{},__private__:{}};h.__private__.PubSub=U1;var v="1.3",p=h.__private__.getPdfVersion=function(){return v};h.__private__.setPdfVersion=function(d){v=d};var m={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]};h.__private__.getPageFormats=function(){return m};var C=h.__private__.getPageFormat=function(d){return m[d]};n=n||"a4";var Q={COMPAT:"compat",ADVANCED:"advanced"},y=Q.COMPAT;function x(){this.saveGraphicsState(),X(new ae(_A,0,0,-_A,0,sa()*_A).toString()+" cm"),this.setFontSize(this.getFontSize()/_A),u="n",y=Q.ADVANCED}function T(){this.restoreGraphicsState(),u="S",y=Q.COMPAT}var N=h.__private__.combineFontStyleAndFontWeight=function(d,E){if(d=="bold"&&E=="normal"||d=="bold"&&E==400||d=="normal"&&E=="italic"||d=="bold"&&E=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return E&&(d=E==400||E==="normal"?d==="italic"?"italic":"normal":E!=700&&E!=="bold"||d!=="normal"?(E==700?"bold":E)+""+d:"bold"),d};h.advancedAPI=function(d){var E=y===Q.COMPAT;return E&&x.call(this),typeof d!="function"||(d(this),E&&T.call(this)),this},h.compatAPI=function(d){var E=y===Q.ADVANCED;return E&&T.call(this),typeof d!="function"||(d(this),E&&x.call(this)),this},h.isAdvancedAPI=function(){return y===Q.ADVANCED};var D,R=function(d){if(y!==Q.ADVANCED)throw new Error(d+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},k=h.roundToPrecision=h.__private__.roundToPrecision=function(d,E){var q=A||E;if(isNaN(d)||isNaN(q))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return d.toFixed(q).replace(/0+$/,"")};D=h.hpf=h.__private__.hpf=typeof o=="number"?function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.hpf");return k(d,o)}:o==="smart"?function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.hpf");return k(d,d>-1&&d<1?16:5)}:function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.hpf");return k(d,16)};var $=h.f2=h.__private__.f2=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.f2");return k(d,2)},I=h.__private__.f3=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.f3");return k(d,3)},L=h.scale=h.__private__.scale=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.scale");return y===Q.COMPAT?d*_A:y===Q.ADVANCED?d:void 0},K=function(d){return y===Q.COMPAT?sa()-d:y===Q.ADVANCED?d:void 0},M=function(d){return L(K(d))};h.__private__.setPrecision=h.setPrecision=function(d){typeof parseInt(d,10)=="number"&&(A=parseInt(d,10))};var J,Y="00000000000000000000000000000000",z=h.__private__.getFileId=function(){return Y},W=h.__private__.setFileId=function(d){return Y=d!==void 0&&/^[a-fA-F0-9]{32}$/.test(d)?d.toUpperCase():Y.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),c!==null&&(Er=new is(c.userPermissions,c.userPassword,c.ownerPassword,Y)),Y};h.setFileId=function(d){return W(d),this},h.getFileId=function(){return z()};var Z=h.__private__.convertDateToPDFDate=function(d){var E=d.getTimezoneOffset(),q=E<0?"+":"-",nA=Math.floor(Math.abs(E/60)),fA=Math.abs(E%60),vA=[q,V(nA),"'",V(fA),"'"].join("");return["D:",d.getFullYear(),V(d.getMonth()+1),V(d.getDate()),V(d.getHours()),V(d.getMinutes()),V(d.getSeconds()),vA].join("")},rA=h.__private__.convertPDFDateToDate=function(d){var E=parseInt(d.substr(2,4),10),q=parseInt(d.substr(6,2),10)-1,nA=parseInt(d.substr(8,2),10),fA=parseInt(d.substr(10,2),10),vA=parseInt(d.substr(12,2),10),SA=parseInt(d.substr(14,2),10);return new Date(E,q,nA,fA,vA,SA,0)},hA=h.__private__.setCreationDate=function(d){var E;if(d===void 0&&(d=new Date),d instanceof Date)E=Z(d);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(d))throw new Error("Invalid argument passed to jsPDF.setCreationDate");E=d}return J=E},U=h.__private__.getCreationDate=function(d){var E=J;return d==="jsDate"&&(E=rA(J)),E};h.setCreationDate=function(d){return hA(d),this},h.getCreationDate=function(d){return U(d)};var _,V=h.__private__.padd2=function(d){return("0"+parseInt(d)).slice(-2)},G=h.__private__.padd2Hex=function(d){return("00"+(d=d.toString())).substr(d.length)},tA=0,sA=[],cA=[],lA=0,CA=[],QA=[],bA=!1,NA=cA,GA=function(){tA=0,lA=0,cA=[],sA=[],CA=[],xA=ct(),RA=ct()};h.__private__.setCustomOutputDestination=function(d){bA=!0,NA=d};var dA=function(d){bA||(NA=d)};h.__private__.resetCustomOutputDestination=function(){bA=!1,NA=cA};var X=h.__private__.out=function(d){return d=d.toString(),lA+=d.length+1,NA.push(d),NA},re=h.__private__.write=function(d){return X(arguments.length===1?d.toString():Array.prototype.join.call(arguments," "))},qA=h.__private__.getArrayBuffer=function(d){for(var E=d.length,q=new ArrayBuffer(E),nA=new Uint8Array(q);E--;)nA[E]=d.charCodeAt(E);return q},EA=[["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]];h.__private__.getStandardFonts=function(){return EA};var TA=r.fontSize||16;h.__private__.setFontSize=h.setFontSize=function(d){return TA=y===Q.ADVANCED?d/_A:d,this};var DA,OA=h.__private__.getFontSize=h.getFontSize=function(){return y===Q.COMPAT?TA:TA*_A},pA=r.R2L||!1;h.__private__.setR2L=h.setR2L=function(d){return pA=d,this},h.__private__.getR2L=h.getR2L=function(){return pA};var IA,MA=h.__private__.setZoomMode=function(d){var E=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(d))DA=d;else if(isNaN(d)){if(E.indexOf(d)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpag