UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

1,048 lines 486 kB
function he(r) { "@babel/helpers - typeof"; return he = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, he(r); } var tn = Uint8Array, vn = Uint16Array, _o = Int32Array, ps = new tn([ 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, /* unused */ 0, 0, /* impossible */ 0 ]), gs = new tn([ 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, /* unused */ 0, 0 ]), go = new tn([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Nu = function(r, e) { for (var n = new vn(31), a = 0; a < 31; ++a) n[a] = e += 1 << r[a - 1]; for (var u = new _o(n[30]), a = 1; a < 30; ++a) for (var s = n[a]; s < n[a + 1]; ++s) u[s] = s - n[a] << 5 | a; return { b: n, r: u }; }, Au = Nu(ps, 2), xu = Au.b, mo = Au.r; xu[28] = 258, mo[258] = 28; var Su = Nu(gs, 0), _l = Su.b, nu = Su.r, vo = new vn(32768); for (var we = 0; we < 32768; ++we) { var kr = (we & 43690) >> 1 | (we & 21845) << 1; kr = (kr & 52428) >> 2 | (kr & 13107) << 2, kr = (kr & 61680) >> 4 | (kr & 3855) << 4, vo[we] = ((kr & 65280) >> 8 | (kr & 255) << 8) >> 1; } var tr = function(r, e, n) { for (var a = r.length, u = 0, s = new vn(e); u < a; ++u) r[u] && ++s[r[u] - 1]; var c = new vn(e); for (u = 1; u < e; ++u) c[u] = c[u - 1] + s[u - 1] << 1; var f; if (n) { f = new vn(1 << e); var h = 15 - e; for (u = 0; u < a; ++u) if (r[u]) for (var g = u << 4 | r[u], y = e - r[u], w = c[r[u] - 1]++ << y, S = w | (1 << y) - 1; w <= S; ++w) f[vo[w] >> h] = g; } else for (f = new vn(a), u = 0; u < a; ++u) r[u] && (f[u] = vo[c[r[u] - 1]++] >> 15 - r[u]); return f; }, Cr = new tn(288); for (var we = 0; we < 144; ++we) Cr[we] = 8; for (var we = 144; we < 256; ++we) Cr[we] = 9; for (var we = 256; we < 280; ++we) Cr[we] = 7; for (var we = 280; we < 288; ++we) Cr[we] = 8; var da = new tn(32); for (var we = 0; we < 32; ++we) da[we] = 5; var Pl = /* @__PURE__ */ tr(Cr, 9, 0), kl = /* @__PURE__ */ tr(Cr, 9, 1), Fl = /* @__PURE__ */ tr(da, 5, 0), Il = /* @__PURE__ */ tr(da, 5, 1), ao = function(r) { for (var e = r[0], n = 1; n < r.length; ++n) r[n] > e && (e = r[n]); return e; }, qn = function(r, e, n) { var a = e / 8 | 0; return (r[a] | r[a + 1] << 8) >> (e & 7) & n; }, so = function(r, e) { var n = e / 8 | 0; return (r[n] | r[n + 1] << 8 | r[n + 2] << 16) >> (e & 7); }, Po = function(r) { return (r + 7) / 8 | 0; }, _u = function(r, e, n) { return (n == null || n > r.length) && (n = r.length), new tn(r.subarray(e, n)); }, Cl = [ "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" // determined by unknown compression method ], Rn = function(r, e, n) { var a = new Error(e || Cl[r]); if (a.code = r, Error.captureStackTrace && Error.captureStackTrace(a, Rn), !n) throw a; return a; }, jl = function(r, e, n, a) { var u = r.length, s = 0; if (!u || e.f && !e.l) return n || new tn(0); var c = !n, f = c || e.i != 2, h = e.i; c && (n = new tn(u * 3)); var g = function(Nt) { var Ft = n.length; if (Nt > Ft) { var _t = new tn(Math.max(Ft * 2, Nt)); _t.set(n), n = _t; } }, y = e.f || 0, w = e.p || 0, S = e.b || 0, p = e.l, O = e.d, F = e.m, q = e.n, _ = u * 8; do { if (!p) { y = qn(r, w, 1); var M = qn(r, w + 1, 3); if (w += 3, M) if (M == 1) p = kl, O = Il, F = 9, q = 5; else if (M == 2) { var wt = qn(r, w, 31) + 257, tt = qn(r, w + 10, 15) + 4, z = wt + qn(r, w + 5, 31) + 1; w += 14; for (var rt = new tn(z), pt = new tn(19), P = 0; P < tt; ++P) pt[go[P]] = qn(r, w + P * 3, 7); w += tt * 3; for (var k = ao(pt), W = (1 << k) - 1, D = tr(pt, k, 1), P = 0; P < z; ) { var ot = D[qn(r, w, W)]; w += ot & 15; var Y = ot >> 4; if (Y < 16) rt[P++] = Y; else { var it = 0, ft = 0; for (Y == 16 ? (ft = 3 + qn(r, w, 3), w += 2, it = rt[P - 1]) : Y == 17 ? (ft = 3 + qn(r, w, 7), w += 3) : Y == 18 && (ft = 11 + qn(r, w, 127), w += 7); ft--; ) rt[P++] = it; } } var $ = rt.subarray(0, wt), lt = rt.subarray(wt); F = ao($), q = ao(lt), p = tr($, F, 1), O = tr(lt, q, 1); } else Rn(1); else { var Y = Po(w) + 4, st = r[Y - 4] | r[Y - 3] << 8, ct = Y + st; if (ct > u) { h && Rn(0); break; } f && g(S + st), n.set(r.subarray(Y, ct), S), e.b = S += st, e.p = w = ct * 8, e.f = y; continue; } if (w > _) { h && Rn(0); break; } } f && g(S + 131072); for (var dt = (1 << F) - 1, jt = (1 << q) - 1, N = w; ; N = w) { var it = p[so(r, w) & dt], C = it >> 4; if (w += it & 15, w > _) { h && Rn(0); break; } if (it || Rn(2), C < 256) n[S++] = C; else if (C == 256) { N = w, p = null; break; } else { var B = C - 254; if (C > 264) { var P = C - 257, T = ps[P]; B = qn(r, w, (1 << T) - 1) + xu[P], w += T; } var J = O[so(r, w) & jt], Q = J >> 4; J || Rn(3), w += J & 15; var lt = _l[Q]; if (Q > 3) { var T = gs[Q]; lt += so(r, w) & (1 << T) - 1, w += T; } if (w > _) { h && Rn(0); break; } f && g(S + 131072); var et = S + B; if (S < lt) { var nt = s - lt, At = Math.min(lt, et); for (nt + S < 0 && Rn(3); S < At; ++S) n[S] = a[nt + S]; } for (; S < et; ++S) n[S] = n[S - lt]; } } e.l = p, e.p = N, e.b = S, e.f = y, p && (y = 1, e.m = F, e.d = O, e.n = q); } while (!y); return S != n.length && c ? _u(n, 0, S) : n.subarray(0, S); }, dr = function(r, e, n) { n <<= e & 7; var a = e / 8 | 0; r[a] |= n, r[a + 1] |= n >> 8; }, ca = function(r, e, n) { n <<= e & 7; var a = e / 8 | 0; r[a] |= n, r[a + 1] |= n >> 8, r[a + 2] |= n >> 16; }, oo = function(r, e) { for (var n = [], a = 0; a < r.length; ++a) r[a] && n.push({ s: a, f: r[a] }); var u = n.length, s = n.slice(); if (!u) return { t: ku, l: 0 }; if (u == 1) { var c = new tn(n[0].s + 1); return c[n[0].s] = 1, { t: c, l: 1 }; } n.sort(function(ct, wt) { return ct.f - wt.f; }), n.push({ s: -1, f: 25001 }); var f = n[0], h = n[1], g = 0, y = 1, w = 2; for (n[0] = { s: -1, f: f.f + h.f, l: f, r: h }; y != u - 1; ) f = n[n[g].f < n[w].f ? g++ : w++], h = n[g != y && n[g].f < n[w].f ? g++ : w++], n[y++] = { s: -1, f: f.f + h.f, l: f, r: h }; for (var S = s[0].s, a = 1; a < u; ++a) s[a].s > S && (S = s[a].s); var p = new vn(S + 1), O = bo(n[y - 1], p, 0); if (O > e) { var a = 0, F = 0, q = O - e, _ = 1 << q; for (s.sort(function(wt, tt) { return p[tt.s] - p[wt.s] || wt.f - tt.f; }); a < u; ++a) { var M = s[a].s; if (p[M] > e) F += _ - (1 << O - p[M]), p[M] = e; else break; } for (F >>= q; F > 0; ) { var Y = s[a].s; p[Y] < e ? F -= 1 << e - p[Y]++ - 1 : ++a; } for (; a >= 0 && F; --a) { var st = s[a].s; p[st] == e && (--p[st], ++F); } O = e; } return { t: new tn(p), l: O }; }, bo = function(r, e, n) { return r.s == -1 ? Math.max(bo(r.l, e, n + 1), bo(r.r, e, n + 1)) : e[r.s] = n; }, ru = function(r) { for (var e = r.length; e && !r[--e]; ) ; for (var n = new vn(++e), a = 0, u = r[0], s = 1, c = function(h) { n[a++] = h; }, f = 1; f <= e; ++f) if (r[f] == u && f != e) ++s; else { if (!u && s > 2) { for (; s > 138; s -= 138) c(32754); s > 2 && (c(s > 10 ? s - 11 << 5 | 28690 : s - 3 << 5 | 12305), s = 0); } else if (s > 3) { for (c(u), --s; s > 6; s -= 6) c(8304); s > 2 && (c(s - 3 << 5 | 8208), s = 0); } for (; s--; ) c(u); s = 1, u = r[f]; } return { c: n.subarray(0, a), n: e }; }, fa = function(r, e) { for (var n = 0, a = 0; a < e.length; ++a) n += r[a] * e[a]; return n; }, Pu = function(r, e, n) { var a = n.length, u = Po(e + 2); r[u] = a & 255, r[u + 1] = a >> 8, r[u + 2] = r[u] ^ 255, r[u + 3] = r[u + 1] ^ 255; for (var s = 0; s < a; ++s) r[u + s + 4] = n[s]; return (u + 4 + a) * 8; }, iu = function(r, e, n, a, u, s, c, f, h, g, y) { dr(e, y++, n), ++u[256]; for (var w = oo(u, 15), S = w.t, p = w.l, O = oo(s, 15), F = O.t, q = O.l, _ = ru(S), M = _.c, Y = _.n, st = ru(F), ct = st.c, wt = st.n, tt = new vn(19), z = 0; z < M.length; ++z) ++tt[M[z] & 31]; for (var z = 0; z < ct.length; ++z) ++tt[ct[z] & 31]; for (var rt = oo(tt, 7), pt = rt.t, P = rt.l, k = 19; k > 4 && !pt[go[k - 1]]; --k) ; var W = g + 5 << 3, D = fa(u, Cr) + fa(s, da) + c, ot = fa(u, S) + fa(s, F) + c + 14 + 3 * k + fa(tt, pt) + 2 * tt[16] + 3 * tt[17] + 7 * tt[18]; if (h >= 0 && W <= D && W <= ot) return Pu(e, y, r.subarray(h, h + g)); var it, ft, $, lt; if (dr(e, y, 1 + (ot < D)), y += 2, ot < D) { it = tr(S, p, 0), ft = S, $ = tr(F, q, 0), lt = F; var dt = tr(pt, P, 0); dr(e, y, Y - 257), dr(e, y + 5, wt - 1), dr(e, y + 10, k - 4), y += 14; for (var z = 0; z < k; ++z) dr(e, y + 3 * z, pt[go[z]]); y += 3 * k; for (var jt = [M, ct], N = 0; N < 2; ++N) for (var C = jt[N], z = 0; z < C.length; ++z) { var B = C[z] & 31; dr(e, y, dt[B]), y += pt[B], B > 15 && (dr(e, y, C[z] >> 5 & 127), y += C[z] >> 12); } } else it = Pl, ft = Cr, $ = Fl, lt = da; for (var z = 0; z < f; ++z) { var T = a[z]; if (T > 255) { var B = T >> 18 & 31; ca(e, y, it[B + 257]), y += ft[B + 257], B > 7 && (dr(e, y, T >> 23 & 31), y += ps[B]); var J = T & 31; ca(e, y, $[J]), y += lt[J], J > 3 && (ca(e, y, T >> 5 & 8191), y += gs[J]); } else ca(e, y, it[T]), y += ft[T]; } return ca(e, y, it[256]), y + ft[256]; }, Ol = /* @__PURE__ */ new _o([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), ku = /* @__PURE__ */ new tn(0), Ml = function(r, e, n, a, u, s) { var c = s.z || r.length, f = new tn(a + c + 5 * (1 + Math.ceil(c / 7e3)) + u), h = f.subarray(a, f.length - u), g = s.l, y = (s.r || 0) & 7; if (e) { y && (h[0] = s.r >> 3); for (var w = Ol[e - 1], S = w >> 13, p = w & 8191, O = (1 << n) - 1, F = s.p || new vn(32768), q = s.h || new vn(O + 1), _ = Math.ceil(n / 3), M = 2 * _, Y = function(zt) { return (r[zt] ^ r[zt + 1] << _ ^ r[zt + 2] << M) & O; }, st = new _o(25e3), ct = new vn(288), wt = new vn(32), tt = 0, z = 0, rt = s.i || 0, pt = 0, P = s.w || 0, k = 0; rt + 2 < c; ++rt) { var W = Y(rt), D = rt & 32767, ot = q[W]; if (F[D] = ot, q[W] = D, P <= rt) { var it = c - rt; if ((tt > 7e3 || pt > 24576) && (it > 423 || !g)) { y = iu(r, h, 0, st, ct, wt, z, pt, k, rt - k, y), pt = tt = z = 0, k = rt; for (var ft = 0; ft < 286; ++ft) ct[ft] = 0; for (var ft = 0; ft < 30; ++ft) wt[ft] = 0; } var $ = 2, lt = 0, dt = p, jt = D - ot & 32767; if (it > 2 && W == Y(rt - jt)) for (var N = Math.min(S, it) - 1, C = Math.min(32767, rt), B = Math.min(258, it); jt <= C && --dt && D != ot; ) { if (r[rt + $] == r[rt + $ - jt]) { for (var T = 0; T < B && r[rt + T] == r[rt + T - jt]; ++T) ; if (T > $) { if ($ = T, lt = jt, T > N) break; for (var J = Math.min(jt, T - 2), Q = 0, ft = 0; ft < J; ++ft) { var et = rt - jt + ft & 32767, nt = F[et], At = et - nt & 32767; At > Q && (Q = At, ot = et); } } } D = ot, ot = F[D], jt += D - ot & 32767; } if (lt) { st[pt++] = 268435456 | mo[$] << 18 | nu[lt]; var Nt = mo[$] & 31, Ft = nu[lt] & 31; z += ps[Nt] + gs[Ft], ++ct[257 + Nt], ++wt[Ft], P = rt + $, ++tt; } else st[pt++] = r[rt], ++ct[r[rt]]; } } for (rt = Math.max(rt, P); rt < c; ++rt) st[pt++] = r[rt], ++ct[r[rt]]; y = iu(r, h, g, st, ct, wt, z, pt, k, rt - k, y), g || (s.r = y & 7 | h[y / 8 | 0] << 3, y -= 7, s.h = q, s.p = F, s.i = rt, s.w = P); } else { for (var rt = s.w || 0; rt < c + g; rt += 65535) { var _t = rt + 65535; _t >= c && (h[y / 8 | 0] = g, _t = c), y = Pu(h, y + 1, r.subarray(rt, _t)); } s.i = c; } return _u(f, 0, a + Po(y) + u); }, Fu = function() { var r = 1, e = 0; return { p: function(n) { for (var a = r, u = e, s = n.length | 0, c = 0; c != s; ) { for (var f = Math.min(c + 2655, s); c < f; ++c) u += a += n[c]; a = (a & 65535) + 15 * (a >> 16), u = (u & 65535) + 15 * (u >> 16); } r = a, e = u; }, d: function() { return r %= 65521, e %= 65521, (r & 255) << 24 | (r & 65280) << 8 | (e & 255) << 8 | e >> 8; } }; }, Bl = function(r, e, n, a, u) { if (!u && (u = { l: 1 }, e.dictionary)) { var s = e.dictionary.subarray(-32768), c = new tn(s.length + r.length); c.set(s), c.set(r, s.length), r = c, u.w = s.length; } return Ml(r, e.level == null ? 6 : e.level, e.mem == null ? u.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(r.length))) * 1.5) : 20 : 12 + e.mem, n, a, u); }, Iu = function(r, e, n) { for (; n; ++e) r[e] = n, n >>>= 8; }, El = function(r, e) { var n = e.level, a = n == 0 ? 0 : n < 6 ? 1 : n == 9 ? 3 : 2; if (r[0] = 120, r[1] = a << 6 | (e.dictionary && 32), r[1] |= 31 - (r[0] << 8 | r[1]) % 31, e.dictionary) { var u = Fu(); u.p(e.dictionary), Iu(r, 2, u.d()); } }, ql = function(r, e) { return ((r[0] & 15) != 8 || r[0] >> 4 > 7 || (r[0] << 8 | r[1]) % 31) && Rn(6, "invalid zlib data"), (r[1] >> 5 & 1) == 1 && Rn(6, "invalid zlib data: " + (r[1] & 32 ? "need" : "unexpected") + " dictionary"), (r[1] >> 3 & 4) + 2; }; function yo(r, e) { e || (e = {}); var n = Fu(); n.p(r); var a = Bl(r, e, e.dictionary ? 6 : 2, 4); return El(a, e), Iu(a, a.length - 4, n.d()), a; } function Dl(r, e) { return jl(r.subarray(ql(r), -4), { i: 2 }, e, e); } var Rl = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Tl = 0; try { Rl.decode(ku, { stream: !0 }), Tl = 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 Ht = /* @__PURE__ */ function() { return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this; }(); function uo() { Ht.console && typeof Ht.console.log == "function" && Ht.console.log.apply(Ht.console, arguments); } var ve = { log: uo, warn: function(r) { Ht.console && (typeof Ht.console.warn == "function" ? Ht.console.warn.apply(Ht.console, arguments) : uo.call(null, arguments)); }, error: function(r) { Ht.console && (typeof Ht.console.error == "function" ? Ht.console.error.apply(Ht.console, arguments) : uo(r)); } }; function lo(r, e, n) { var a = new XMLHttpRequest(); a.open("GET", r), a.responseType = "blob", a.onload = function() { Gr(a.response, e, n); }, a.onerror = function() { ve.error("could not download file"); }, a.send(); } function au(r) { var e = new XMLHttpRequest(); e.open("HEAD", r, !1); try { e.send(); } catch { } return e.status >= 200 && e.status <= 299; } function is(r) { try { r.dispatchEvent(new MouseEvent("click")); } catch { var e = document.createEvent("MouseEvents"); e.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), r.dispatchEvent(e); } } var ha, wo, Gr = Ht.saveAs || ((typeof window > "u" ? "undefined" : he(window)) !== "object" || window !== Ht ? function() { } : typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype ? function(r, e, n) { var a = Ht.URL || Ht.webkitURL, u = document.createElement("a"); e = e || r.name || "download", u.download = e, u.rel = "noopener", typeof r == "string" ? (u.href = r, u.origin !== location.origin ? au(u.href) ? lo(r, e, n) : is(u, u.target = "_blank") : is(u)) : (u.href = a.createObjectURL(r), setTimeout(function() { a.revokeObjectURL(u.href); }, 4e4), setTimeout(function() { is(u); }, 0)); } : "msSaveOrOpenBlob" in navigator ? function(r, e, n) { if (e = e || r.name || "download", typeof r == "string") if (au(r)) lo(r, e, n); else { var a = document.createElement("a"); a.href = r, a.target = "_blank", setTimeout(function() { is(a); }); } else navigator.msSaveOrOpenBlob(function(u, s) { return s === void 0 ? s = { autoBom: !1 } : he(s) !== "object" && (ve.warn("Deprecated: Expected third argument to be a object"), s = { autoBom: !s }), s.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type) ? new Blob(["\uFEFF", u], { type: u.type }) : u; }(r, n), e); } : function(r, e, n, a) { if ((a = a || open("", "_blank")) && (a.document.title = a.document.body.innerText = "downloading..."), typeof r == "string") return lo(r, e, n); var u = r.type === "application/octet-stream", s = /constructor/i.test(Ht.HTMLElement) || Ht.safari, c = /CriOS\/[\d]+/.test(navigator.userAgent); if ((c || u && s) && (typeof FileReader > "u" ? "undefined" : he(FileReader)) === "object") { var f = new FileReader(); f.onloadend = function() { var y = f.result; y = c ? y : y.replace(/^data:[^;]*;/, "data:attachment/file;"), a ? a.location.href = y : location = y, a = null; }, f.readAsDataURL(r); } else { var h = Ht.URL || Ht.webkitURL, g = h.createObjectURL(r); a ? a.location = g : location.href = g, a = null, setTimeout(function() { h.revokeObjectURL(g); }, 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 Cu(r) { var e; 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 n = [{ re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, example: ["rgb(123, 234, 45)", "rgb(255,234,245)"], process: function(f) { return [parseInt(f[1]), parseInt(f[2]), parseInt(f[3])]; } }, { re: /^(\w{2})(\w{2})(\w{2})$/, example: ["#00ff00", "336699"], process: function(f) { return [parseInt(f[1], 16), parseInt(f[2], 16), parseInt(f[3], 16)]; } }, { re: /^(\w{1})(\w{1})(\w{1})$/, example: ["#fb0", "f0f"], process: function(f) { return [parseInt(f[1] + f[1], 16), parseInt(f[2] + f[2], 16), parseInt(f[3] + f[3], 16)]; } }], a = 0; a < n.length; a++) { var u = n[a].re, s = n[a].process, c = u.exec(r); c && (e = s(c), this.r = e[0], this.g = e[1], this.b = e[2], this.ok = !0); } this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r, this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g, this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b, this.toRGB = function() { return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")"; }, this.toHex = function() { var f = this.r.toString(16), h = this.g.toString(16), g = this.b.toString(16); return f.length == 1 && (f = "0" + f), h.length == 1 && (h = "0" + h), g.length == 1 && (g = "0" + g), "#" + f + h + g; }; } /** * @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 co(r, e) { var n = r[0], a = r[1], u = r[2], s = r[3]; n = Ke(n, a, u, s, e[0], 7, -680876936), s = Ke(s, n, a, u, e[1], 12, -389564586), u = Ke(u, s, n, a, e[2], 17, 606105819), a = Ke(a, u, s, n, e[3], 22, -1044525330), n = Ke(n, a, u, s, e[4], 7, -176418897), s = Ke(s, n, a, u, e[5], 12, 1200080426), u = Ke(u, s, n, a, e[6], 17, -1473231341), a = Ke(a, u, s, n, e[7], 22, -45705983), n = Ke(n, a, u, s, e[8], 7, 1770035416), s = Ke(s, n, a, u, e[9], 12, -1958414417), u = Ke(u, s, n, a, e[10], 17, -42063), a = Ke(a, u, s, n, e[11], 22, -1990404162), n = Ke(n, a, u, s, e[12], 7, 1804603682), s = Ke(s, n, a, u, e[13], 12, -40341101), u = Ke(u, s, n, a, e[14], 17, -1502002290), n = Ze(n, a = Ke(a, u, s, n, e[15], 22, 1236535329), u, s, e[1], 5, -165796510), s = Ze(s, n, a, u, e[6], 9, -1069501632), u = Ze(u, s, n, a, e[11], 14, 643717713), a = Ze(a, u, s, n, e[0], 20, -373897302), n = Ze(n, a, u, s, e[5], 5, -701558691), s = Ze(s, n, a, u, e[10], 9, 38016083), u = Ze(u, s, n, a, e[15], 14, -660478335), a = Ze(a, u, s, n, e[4], 20, -405537848), n = Ze(n, a, u, s, e[9], 5, 568446438), s = Ze(s, n, a, u, e[14], 9, -1019803690), u = Ze(u, s, n, a, e[3], 14, -187363961), a = Ze(a, u, s, n, e[8], 20, 1163531501), n = Ze(n, a, u, s, e[13], 5, -1444681467), s = Ze(s, n, a, u, e[2], 9, -51403784), u = Ze(u, s, n, a, e[7], 14, 1735328473), n = $e(n, a = Ze(a, u, s, n, e[12], 20, -1926607734), u, s, e[5], 4, -378558), s = $e(s, n, a, u, e[8], 11, -2022574463), u = $e(u, s, n, a, e[11], 16, 1839030562), a = $e(a, u, s, n, e[14], 23, -35309556), n = $e(n, a, u, s, e[1], 4, -1530992060), s = $e(s, n, a, u, e[4], 11, 1272893353), u = $e(u, s, n, a, e[7], 16, -155497632), a = $e(a, u, s, n, e[10], 23, -1094730640), n = $e(n, a, u, s, e[13], 4, 681279174), s = $e(s, n, a, u, e[0], 11, -358537222), u = $e(u, s, n, a, e[3], 16, -722521979), a = $e(a, u, s, n, e[6], 23, 76029189), n = $e(n, a, u, s, e[9], 4, -640364487), s = $e(s, n, a, u, e[12], 11, -421815835), u = $e(u, s, n, a, e[15], 16, 530742520), n = Qe(n, a = $e(a, u, s, n, e[2], 23, -995338651), u, s, e[0], 6, -198630844), s = Qe(s, n, a, u, e[7], 10, 1126891415), u = Qe(u, s, n, a, e[14], 15, -1416354905), a = Qe(a, u, s, n, e[5], 21, -57434055), n = Qe(n, a, u, s, e[12], 6, 1700485571), s = Qe(s, n, a, u, e[3], 10, -1894986606), u = Qe(u, s, n, a, e[10], 15, -1051523), a = Qe(a, u, s, n, e[1], 21, -2054922799), n = Qe(n, a, u, s, e[8], 6, 1873313359), s = Qe(s, n, a, u, e[15], 10, -30611744), u = Qe(u, s, n, a, e[6], 15, -1560198380), a = Qe(a, u, s, n, e[13], 21, 1309151649), n = Qe(n, a, u, s, e[4], 6, -145523070), s = Qe(s, n, a, u, e[11], 10, -1120210379), u = Qe(u, s, n, a, e[2], 15, 718787259), a = Qe(a, u, s, n, e[9], 21, -343485551), r[0] = Ir(n, r[0]), r[1] = Ir(a, r[1]), r[2] = Ir(u, r[2]), r[3] = Ir(s, r[3]); } function ms(r, e, n, a, u, s) { return e = Ir(Ir(e, r), Ir(a, s)), Ir(e << u | e >>> 32 - u, n); } function Ke(r, e, n, a, u, s, c) { return ms(e & n | ~e & a, r, e, u, s, c); } function Ze(r, e, n, a, u, s, c) { return ms(e & a | n & ~a, r, e, u, s, c); } function $e(r, e, n, a, u, s, c) { return ms(e ^ n ^ a, r, e, u, s, c); } function Qe(r, e, n, a, u, s, c) { return ms(n ^ (e | ~a), r, e, u, s, c); } function ju(r) { var e, n = r.length, a = [1732584193, -271733879, -1732584194, 271733878]; for (e = 64; e <= r.length; e += 64) co(a, zl(r.substring(e - 64, e))); r = r.substring(e - 64); var u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (e = 0; e < r.length; e++) u[e >> 2] |= r.charCodeAt(e) << (e % 4 << 3); if (u[e >> 2] |= 128 << (e % 4 << 3), e > 55) for (co(a, u), e = 0; e < 16; e++) u[e] = 0; return u[14] = 8 * n, co(a, u), a; } function zl(r) { var e, n = []; for (e = 0; e < 64; e += 4) n[e >> 2] = r.charCodeAt(e) + (r.charCodeAt(e + 1) << 8) + (r.charCodeAt(e + 2) << 16) + (r.charCodeAt(e + 3) << 24); return n; } ha = Ht.atob.bind(Ht), wo = Ht.btoa.bind(Ht); var su = "0123456789abcdef".split(""); function Ul(r) { for (var e = "", n = 0; n < 4; n++) e += su[r >> 8 * n + 4 & 15] + su[r >> 8 * n & 15]; return e; } function Hl(r) { return String.fromCharCode((255 & r) >> 0, (65280 & r) >> 8, (16711680 & r) >> 16, (4278190080 & r) >> 24); } function Lo(r) { return ju(r).map(Hl).join(""); } var Wl = function(r) { for (var e = 0; e < r.length; e++) r[e] = Ul(r[e]); return r.join(""); }(ju("hello")) != "5d41402abc4b2a76b9719d911017c592"; function Ir(r, e) { if (Wl) { var n = (65535 & r) + (65535 & e); return (r >> 16) + (e >> 16) + (n >> 16) << 16 | 65535 & n; } return r + e & 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 No(r, e) { var n, a, u, s; if (r !== n) { for (var c = (u = r, s = 1 + (256 / r.length >> 0), new Array(s + 1).join(u)), f = [], h = 0; h < 256; h++) f[h] = h; var g = 0; for (h = 0; h < 256; h++) { var y = f[h]; g = (g + y + c.charCodeAt(h)) % 256, f[h] = f[g], f[g] = y; } n = r, a = f; } else f = a; var w = e.length, S = 0, p = 0, O = ""; for (h = 0; h < w; h++) p = (p + (y = f[S = (S + 1) % 256])) % 256, f[S] = f[p], f[p] = y, c = f[(f[S] + f[p]) % 256], O += String.fromCharCode(e.charCodeAt(h) ^ c); return O; } /** * @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 ou = { print: 4, modify: 8, copy: 16, "annot-forms": 32 }; function Pi(r, e, n, a) { this.v = 1, this.r = 2; var u = 192; r.forEach(function(f) { if (ou.perm !== void 0) throw new Error("Invalid permission: " + f); u += ou[f]; }), this.padding = "(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz"; var s = (e + this.padding).substr(0, 32), c = (n + this.padding).substr(0, 32); this.O = this.processOwnerPassword(s, c), this.P = -(1 + (255 ^ u)), this.encryptionKey = Lo(s + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(a)).substr(0, 5), this.U = No(this.encryptionKey, this.padding); } function ki(r) { if (/[^\u0000-\u00ff]/.test(r)) throw new Error("Invalid PDF Name Object: " + r + ", Only accept ASCII characters."); for (var e = "", n = r.length, a = 0; a < n; a++) { var u = r.charCodeAt(a); u < 33 || u === 35 || u === 37 || u === 40 || u === 41 || u === 47 || u === 60 || u === 62 || u === 91 || u === 93 || u === 123 || u === 125 || u > 126 ? e += "#" + ("0" + u.toString(16)).slice(-2) : e += r[a]; } return e; } function uu(r) { if (he(r) !== "object") throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)"); var e = {}; this.subscribe = function(n, a, u) { if (u = u || !1, typeof n != "string" || typeof a != "function" || typeof u != "boolean") throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)"); e.hasOwnProperty(n) || (e[n] = {}); var s = Math.random().toString(35); return e[n][s] = [a, !!u], s; }, this.unsubscribe = function(n) { for (var a in e) if (e[a][n]) return delete e[a][n], Object.keys(e[a]).length === 0 && delete e[a], !0; return !1; }, this.publish = function(n) { if (e.hasOwnProperty(n)) { var a = Array.prototype.slice.call(arguments, 1), u = []; for (var s in e[n]) { var c = e[n][s]; try { c[0].apply(r, a); } catch (f) { Ht.console && ve.error("jsPDF PubSub Error", f.message, f); } c[1] && u.push(s); } u.length && u.forEach(this.unsubscribe); } }, this.getTopics = function() { return e; }; } function hs(r) { if (!(this instanceof hs)) return new hs(r); var e = "opacity,stroke-opacity".split(","); for (var n in r) r.hasOwnProperty(n) && e.indexOf(n) >= 0 && (this[n] = r[n]); this.id = "", this.objectNumber = -1; } function Ou(r, e) { this.gState = r, this.matrix = e, this.id = "", this.objectNumber = -1; } function Jr(r, e, n, a, u) { if (!(this instanceof Jr)) return new Jr(r, e, n, a, u); this.type = r === "axial" ? 2 : 3, this.coords = e, this.colors = n, Ou.call(this, a, u); } function Fi(r, e, n, a, u) { if (!(this instanceof Fi)) return new Fi(r, e, n, a, u); this.boundingBox = r, this.xStep = e, this.yStep = n, this.stream = "", this.cloneIndex = 0, Ou.call(this, a, u); } function Ut(r) { var e, n = typeof arguments[0] == "string" ? arguments[0] : "p", a = arguments[1], u = arguments[2], s = arguments[3], c = [], f = 1, h = 16, g = "S", y = null; he(r = r || {}) === "object" && (n = r.orientation, a = r.unit || a, u = r.format || u, s = r.compress || r.compressPdf || s, (y = r.encryption || null) !== null && (y.userPassword = y.userPassword || "", y.ownerPassword = y.ownerPassword || "", y.userPermissions = y.userPermissions || []), f = typeof r.userUnit == "number" ? Math.abs(r.userUnit) : 1, r.precision !== void 0 && (e = r.precision), r.floatPrecision !== void 0 && (h = r.floatPrecision), g = r.defaultPathOperation || "S"), c = r.filters || (s === !0 ? ["FlateEncode"] : c), a = a || "mm", n = ("" + (n || "P")).toLowerCase(); var w = r.putOnlyUsedFonts || !1, S = {}, p = { internal: {}, __private__: {} }; p.__private__.PubSub = uu; var O = "1.3", F = p.__private__.getPdfVersion = function() { return O; }; p.__private__.setPdfVersion = function(o) { O = o; }; var q = { a0: [2383.94, 3370.39], a1: [1683.78, 2383.94], a2: [1190.55, 1683.78], a3: [841.89, 1190.55], a4: [595.28, 841.89], a5: [419.53, 595.28], a6: [297.64, 419.53], a7: [209.76, 297.64], a8: [147.4, 209.76], a9: [104.88, 147.4], a10: [73.7, 104.88], b0: [2834.65, 4008.19], b1: [2004.09, 2834.65], b2: [1417.32, 2004.09], b3: [1000.63, 1417.32], b4: [708.66, 1000.63], b5: [498.9, 708.66], b6: [354.33, 498.9], b7: [249.45, 354.33], b8: [175.75, 249.45], b9: [124.72, 175.75], b10: [87.87, 124.72], c0: [2599.37, 3676.54], c1: [1836.85, 2599.37], c2: [1298.27, 1836.85], c3: [918.43, 1298.27], c4: [649.13, 918.43], c5: [459.21, 649.13], c6: [323.15, 459.21], c7: [229.61, 323.15], c8: [161.57, 229.61], c9: [113.39, 161.57], c10: [79.37, 113.39], dl: [311.81, 623.62], letter: [612, 792], "government-letter": [576, 756], legal: [612, 1008], "junior-legal": [576, 360], ledger: [1224, 792], tabloid: [792, 1224], "credit-card": [153, 243] }; p.__private__.getPageFormats = function() { return q; }; var _ = p.__private__.getPageFormat = function(o) { return q[o]; }; u = u || "a4"; var M = { COMPAT: "compat", ADVANCED: "advanced" }, Y = M.COMPAT; function st() { this.saveGraphicsState(), E(new Tt(Ct, 0, 0, -Ct, 0, mr() * Ct).toString() + " cm"), this.setFontSize(this.getFontSize() / Ct), g = "n", Y = M.ADVANCED; } function ct() { this.restoreGraphicsState(), g = "S", Y = M.COMPAT; } var wt = p.__private__.combineFontStyleAndFontWeight = function(o, v) { if (o == "bold" && v == "normal" || o == "bold" && v == 400 || o == "normal" && v == "italic" || o == "bold" && v == "italic") throw new Error("Invalid Combination of fontweight and fontstyle"); return v && (o = v == 400 || v === "normal" ? o === "italic" ? "italic" : "normal" : v != 700 && v !== "bold" || o !== "normal" ? (v == 700 ? "bold" : v) + "" + o : "bold"), o; }; p.advancedAPI = function(o) { var v = Y === M.COMPAT; return v && st.call(this), typeof o != "function" || (o(this), v && ct.call(this)), this; }, p.compatAPI = function(o) { var v = Y === M.ADVANCED; return v && ct.call(this), typeof o != "function" || (o(this), v && st.call(this)), this; }, p.isAdvancedAPI = function() { return Y === M.ADVANCED; }; var tt, z = function(o) { if (Y !== M.ADVANCED) throw new Error(o + " is only available in 'advanced' API mode. You need to call advancedAPI() first."); }, rt = p.roundToPrecision = p.__private__.roundToPrecision = function(o, v) { var j = e || v; if (isNaN(o) || isNaN(j)) throw new Error("Invalid argument passed to jsPDF.roundToPrecision"); return o.toFixed(j).replace(/0+$/, ""); }; tt = p.hpf = p.__private__.hpf = typeof h == "number" ? function(o) { if (isNaN(o)) throw new Error("Invalid argument passed to jsPDF.hpf"); return rt(o, h); } : h === "smart" ? function(o) { if (isNaN(o)) throw new Error("Invalid argument passed to jsPDF.hpf"); return rt(o, o > -1 && o < 1 ? 16 : 5); } : function(o) { if (isNaN(o)) throw new Error("Invalid argument passed to jsPDF.hpf"); return rt(o, 16); }; var pt = p.f2 = p.__private__.f2 = function(o) { if (isNaN(o)) throw new Error("Invalid argument passed to jsPDF.f2"); return rt(o, 2); }, P = p.__private__.f3 = function(o) { if (isNaN(o)) throw new Error("Invalid argument passed to jsPDF.f3"); return rt(o, 3); }, k = p.scale = p.__private__.scale = function(o) { if (isNaN(o)) throw new Error("Invalid argument passed to jsPDF.scale"); return Y === M.COMPAT ? o * Ct : Y === M.ADVANCED ? o : void 0; }, W = function(o) { return Y === M.COMPAT ? mr() - o : Y === M.ADVANCED ? o : void 0; }, D = function(o) { return k(W(o)); }; p.__private__.setPrecision = p.setPrecision = function(o) { typeof parseInt(o, 10) == "number" && (e = parseInt(o, 10)); }; var ot, it = "00000000000000000000000000000000", ft = p.__private__.getFileId = function() { return it; }, $ = p.__private__.setFileId = function(o) { return it = o !== void 0 && /^[a-fA-F0-9]{32}$/.test(o) ? o.toUpperCase() : it.split("").map(function() { return "ABCDEF0123456789".charAt(Math.floor(16 * Math.random())); }).join(""), y !== null && (Ye = new Pi(y.userPermissions, y.userPassword, y.ownerPassword, it)), it; }; p.setFileId = function(o) { return $(o), this; }, p.getFileId = function() { return ft(); }; var lt = p.__private__.convertDateToPDFDate = function(o) { var v = o.getTimezoneOffset(), j = v < 0 ? "+" : "-", R = Math.floor(Math.abs(v / 60)), X = Math.abs(v % 60), ut = [j, B(R), "'", B(X), "'"].join(""); return ["D:", o.getFullYear(), B(o.getMonth() + 1), B(o.getDate()), B(o.getHours()), B(o.getMinutes()), B(o.getSeconds()), ut].join(""); }, dt = p.__private__.convertPDFDateToDate = function(o) { var v = parseInt(o.substr(2, 4), 10), j = parseInt(o.substr(6, 2), 10) - 1, R = parseInt(o.substr(8, 2), 10), X = parseInt(o.substr(10, 2), 10), ut = parseInt(o.substr(12, 2), 10), yt = parseInt(o.substr(14, 2), 10); return new Date(v, j, R, X, ut, yt, 0); }, jt = p.__private__.setCreationDate = function(o) { var v; if (o === void 0 && (o = /* @__PURE__ */ new Date()), o instanceof Date) v = lt(o); 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(o)) throw new Error("Invalid argument passed to jsPDF.setCreationDate"); v = o; } return ot = v; }, N = p.__private__.getCreationDate = function(o) { var v = ot; return o === "jsDate" && (v = dt(ot)), v; }; p.setCreationDate = function(o) { return jt(o), this; }, p.getCreationDate = function(o) { return N(o); }; var C, B = p.__private__.padd2 = function(o) { return ("0" + parseInt(o)).slice(-2); }, T = p.__private__.padd2Hex = function(o) { return ("00" + (o = o.toString())).substr(o.length); }, J = 0, Q = [], et = [], nt = 0, At = [], Nt = [], Ft = !1, _t = et, zt = function() { J = 0, nt = 0, et = [], Q = [], At = [], rr = Me(), Fn = Me(); }; p.__private__.setCustomOutputDestination = function(o) { Ft = !0, _t = o; }; var ht = function(o) { Ft || (_t = o); }; p.__private__.resetCustomOutputDestination = function() { Ft = !1, _t = et; }; var E = p.__private__.out = function(o) { return o = o.toString(), nt += o.length + 1, _t.push(o), _t; }, Kt = p.__private__.write = function(o) { return E(arguments.length === 1 ? o.toString() : Array.prototype.join.call(arguments, " ")); }, Et = p.__private__.getArrayBuffer = function(o) { for (var v = o.length, j = new ArrayBuffer(v), R = new Uint8Array(j); v--; ) R[v] = o.charCodeAt(v); return j; }, Lt = [["Helvetica", "helvetica", "normal", "WinAnsiEncoding"], ["Helvetica-Bold", "helvetica", "bold", "WinAnsiEncoding"], ["Helvetica-Oblique", "helvetica", "italic", "WinAnsiEncoding"], ["Helvetica-BoldOblique", "helvetica", "bolditalic", "WinAnsiEncoding"], ["Courier", "courier", "normal", "WinAnsiEncoding"], ["Courier-Bold", "courier", "bold", "WinAnsiEncoding"], ["Courier-Oblique", "courier", "italic", "WinAnsiEncoding"], ["Courier-BoldOblique", "courier", "bolditalic", "WinAnsiEncoding"], ["Times-Roman", "times", "normal", "WinAnsiEncoding"], ["Times-Bold", "times", "bold", "WinAnsiEncoding"], ["Times-Italic", "times", "italic", "WinAnsiEncoding"], ["Times-BoldItalic", "times", "bolditalic", "WinAnsiEncoding"], ["ZapfDingbats", "zapfdingbats", "normal", null], ["Symbol", "symbol", "normal", null]]; p.__private__.getStandardFonts = function() { return Lt; }; var xt = r.fontSize || 16; p.__private__.setFontSize = p.setFontSize = function(o) { return xt = Y === M.ADVANCED ? o / Ct : o, this; }; var It, kt = p.__private__.getFontSize = p.getFontSize = function() { return Y === M.COMPAT ? xt : xt * Ct; }, qt = r.R2L || !1; p.__private__.setR2L = p.setR2L = function(o) { return qt = o, this; }, p.__private__.getR2L = p.getR2L = function() { return qt; }; var Gt, Qt = p.__private__.setZoomMode = function(o) { var v = [void 0, null, "fullwidth", "fullheight", "fullpage", "original"]; if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(o)) It = o; else if (isNaN(o)) { if (v.indexOf(o) === -1) throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + o + '" is not recognized.'); It = o; } else It = parseInt(o, 10); }; p.__private__.getZoomMode = function() { return It; }; var te, ie = p.__private__.setPageMode = function(o) { if ([void 0, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"].indexOf(o) == -1) throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + o + '" is not recognized.'); Gt = o; }; p.__private__.getPageMode = function() { return Gt; }; var de = p.__private__.setLayoutMode = function(o) { if ([void 0, null, "continuous", "single", "twoleft", "tworight", "two"].indexOf(o) == -1) throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + o + '" is not recognized.'); te = o; }; p.__private__.getLayoutMode = function() { return te; }, p.__private__.setDisplayMode = p.setDisplayMode = function(o, v, j) { return Qt(o), de(v), ie(j), this; }; var Wt = { title: "", subject: "", author: "", keywords: "", creator: "" }; p.__private__.getDocumentProperty = function(o) { if (Object.keys(Wt).indexOf(o) === -1) throw new Error("Invalid argument passed to jsPDF.getDocumentProperty"); return Wt[o]; }, p.__private__.getDocumentProperties = function() { return Wt; }, p.__private__.setDocumentProperties = p.setProperties = p.setDocumentProperties = function(o) { for (var v in Wt) Wt.hasOwnProperty(v) && o[v] && (Wt[v] = o[v]); return this; }, p.__private__.setDocumentProperty = function(o, v) { if (Object.keys(Wt).indexOf(o) === -1) throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty"); return Wt[o] = v; }; var ee, Ct, Je, se, _n, ge = {}, Le = {}, Un = [], ue = {}, Or = {}, Ae = {}, Pn = {}, nr = null, xe = 0, Jt = [], le = new uu(p), Mr = r.hotfixes || [], We = {}, Hn = {}, Wn = [], Tt = function o(v, j, R, X, ut, yt) { if (!(this instanceof o)) return new o(v, j, R, X, ut, yt); isNaN(v) && (v = 1), isNaN(j) && (j = 0), isNaN(R) && (R = 0), isNaN(X) && (X = 1), isNaN(ut) && (ut = 0), isNaN(yt) && (yt = 0), this._matrix = [v, j, R, X, ut, yt]; }; Object.defineProperty(Tt.prototype, "sx", { get: function() { return this._matrix[0]; }, set: function(o) { this._matrix[0] = o; } }), Object.defineProperty(Tt.prototype, "shy", { get: function() { return this._matrix[1]; }, set: function(o) { this._matrix[1] = o; } }), Object.defineProperty(Tt.prototype, "shx", { get: function() { return this._matrix[2]; }, set: function(o) { this._matrix[2] = o; } }), Object.defineProperty(Tt.prototype, "sy", { get: function() { return this._matrix[3]; }, set: function(o) { this._matrix[3] = o; } }), Object.defineProperty(Tt.prototype, "tx", { get: function() { return this._matrix[4]; }, set: function(o) { this._matrix[4] = o; } }), Object.defineProperty(Tt.prototype, "ty", { get: function() { return this._matrix[5]; }, set: function(o) { this._matrix[5] = o; } }), Object.defineProperty(Tt.prototype, "a", { get: function() { return this._matrix[0]; }, set: function(o) { this._matrix[0] = o; } }), Object.defineProperty(Tt.prototype, "b", { get: function() { return this._matrix[1]; }, set: function(o) { this._matrix[1] = o; } }), Object.defineProperty(Tt.prototype, "c", { get: function() { return this._matrix[2]; }, set: function(o) { this._matrix[2] = o; } }), Object.defineProperty(Tt.prototype, "d", { get: function() { return this._matrix[3]; }, set: function(o) { this._matrix[3] = o; } }), Object.defineProperty(Tt.prototype, "e", { get: function() { return this._matrix[4]; }, set: function(o) { this._matrix[4] = o; } }), Object.defineProperty(Tt.prototype, "f", { get: function() { return this._matrix[5]; }, set: function(o) { this._matrix[5] = o; } }), Object.defineProperty(Tt.prototype, "rotation", { get: function() { return Math.atan2(this.shx, this.sx); } }), Object.defineProperty(Tt.prototype, "scaleX", { get: function() { return this.decompose().scale.sx; } }), Object.defineProperty(Tt.prototype, "scaleY", { get: function() { return this.decompose().scale.sy; } }), Object.defineProperty(Tt.prototype, "isIdentity", { get: function() { return this.sx === 1 && this.shy === 0 && this.shx === 0 && this.sy === 1 && this.tx === 0 && this.ty === 0; } }), Tt.prototype.join = function(o) { return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(tt).join(o); }, Tt.prototype.multiply = function(o) { var v = o.sx * this.sx + o.shy * this.shx, j = o.sx * this.shy + o.shy * this.sy, R = o.shx * this.sx + o.sy * this.shx, X = o.shx * this.shy + o.sy * this.sy, ut = o.tx * this.sx + o.ty * this.shx + this.tx, yt = o.tx * this.shy + o.ty * this.sy + this.ty; return new Tt(v, j, R, X, ut, yt); }, Tt.prototype.decompose = function() { var o = this.sx, v = this.shy, j = this.shx, R = this.sy, X = this.tx, ut = this.ty, yt = Math.sqrt(o * o + v * v), Ot = (o /= yt) * j + (v /= yt) * R; j -= o * Ot, R -= v * Ot; var Dt = Math.sqrt(j * j + R * R); return Ot /= Dt, o * (R /= Dt) < v * (j /= Dt) && (o = -o, v = -v, Ot = -Ot, yt = -yt), { scale: new Tt(yt, 0, 0, Dt, 0, 0), translate: new Tt(1, 0, 0, 1, X, ut), rotate: new Tt(o, v, -v, o, 0, 0), skew: new Tt(1, 0, Ot, 1, 0, 0) }; }, Tt.prototype.toString = function(o) { return this.join(" "); }, Tt.prototype.inversed = function() { var o = this.sx, v = this.shy, j = this.shx, R = this.sy, X = this.tx, ut = this.ty, yt = 1 / (o * R - v * j), Ot = R * yt,