@borurio-print/print-designer 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/PrintTemplateRenderer.vue.d.ts +3 -1
- package/dist-lib/{canvasPdfGenerator-D8G0wt4_.js → canvasPdfGenerator-DDJzgheA.js} +282 -276
- package/dist-lib/core/tableLayout.d.ts +6 -0
- package/dist-lib/core/types.d.ts +5 -0
- package/dist-lib/{index-BgS_O90Y.js → index-CUO9kRYw.js} +4521 -4464
- package/dist-lib/index.d.ts +2 -1
- package/dist-lib/{index.es-Dnr3WAbj.js → index.es-B26OpeE5.js} +161 -161
- package/dist-lib/index.js +6 -6
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Mc, f as Bs, g as Rs, r as Ic, a as Ec, b as zu, c as Cc,
|
|
1
|
+
import { i as Mc, f as Bs, g as Rs, r as Ic, a as Ec, b as zu, c as Cc, d as Fc, J as jc, Q as Oc, l as Bc, e as Rc, h as nf, T as Tc, j as Dc, k as qc } from "./index-CUO9kRYw.js";
|
|
2
2
|
function xe(r) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
@@ -83,9 +83,9 @@ var Zr = Uint8Array, jr = Uint16Array, Qo = Int32Array, tu = new Zr([
|
|
|
83
83
|
for (var a = e[n]; a < e[n + 1]; ++a)
|
|
84
84
|
s[a] = a - e[n] << 5 | n;
|
|
85
85
|
return { b: e, r: s };
|
|
86
|
-
}, sf = af(tu, 2),
|
|
87
|
-
|
|
88
|
-
var
|
|
86
|
+
}, sf = af(tu, 2), Uc = sf.b, zo = sf.r;
|
|
87
|
+
Uc[28] = 258, zo[258] = 28;
|
|
88
|
+
var zc = af(eu, 0), Wu = zc.r, Ho = new jr(32768);
|
|
89
89
|
for (var Ce = 0; Ce < 32768; ++Ce) {
|
|
90
90
|
var Jn = (Ce & 43690) >> 1 | (Ce & 21845) << 1;
|
|
91
91
|
Jn = (Jn & 52428) >> 2 | (Jn & 13107) << 2, Jn = (Jn & 61680) >> 4 | (Jn & 3855) << 4, Ho[Ce] = ((Jn & 65280) >> 8 | (Jn & 255) << 8) >> 1;
|
|
@@ -120,9 +120,9 @@ for (var Ce = 280; Ce < 288; ++Ce)
|
|
|
120
120
|
var Is = new Zr(32);
|
|
121
121
|
for (var Ce = 0; Ce < 32; ++Ce)
|
|
122
122
|
Is[Ce] = 5;
|
|
123
|
-
var
|
|
123
|
+
var Hc = /* @__PURE__ */ Ca(xi, 9, 0), Wc = /* @__PURE__ */ Ca(Is, 5, 0), of = function(r) {
|
|
124
124
|
return (r + 7) / 8 | 0;
|
|
125
|
-
},
|
|
125
|
+
}, Gc = function(r, t, e) {
|
|
126
126
|
return (e == null || e > r.length) && (e = r.length), new Zr(r.subarray(t, e));
|
|
127
127
|
}, En = function(r, t, e) {
|
|
128
128
|
e <<= t & 7;
|
|
@@ -233,7 +233,7 @@ var zc = /* @__PURE__ */ Ca(xi, 9, 0), Hc = /* @__PURE__ */ Ca(Is, 5, 0), of = f
|
|
|
233
233
|
En(t, g, Nt[T]), g += tt[T], T > 15 && (En(t, g, O[K] >> 5 & 127), g += O[K] >> 12);
|
|
234
234
|
}
|
|
235
235
|
} else
|
|
236
|
-
ot =
|
|
236
|
+
ot = Hc, ft = xi, rt = Wc, ht = Is;
|
|
237
237
|
for (var K = 0; K < u; ++K) {
|
|
238
238
|
var H = n[K];
|
|
239
239
|
if (H > 255) {
|
|
@@ -245,11 +245,11 @@ var zc = /* @__PURE__ */ Ca(xi, 9, 0), Hc = /* @__PURE__ */ Ca(Is, 5, 0), of = f
|
|
|
245
245
|
Ia(t, g, ot[H]), g += ft[H];
|
|
246
246
|
}
|
|
247
247
|
return Ia(t, g, ot[256]), g + ft[256];
|
|
248
|
-
},
|
|
248
|
+
}, Vc = /* @__PURE__ */ new Qo([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), lf = /* @__PURE__ */ new Zr(0), Yc = function(r, t, e, n, s, a) {
|
|
249
249
|
var c = a.z || r.length, u = new Zr(n + c + 5 * (1 + Math.ceil(c / 7e3)) + s), f = u.subarray(n, u.length - s), d = a.l, g = (a.r || 0) & 7;
|
|
250
250
|
if (t) {
|
|
251
251
|
g && (f[0] = a.r >> 3);
|
|
252
|
-
for (var x =
|
|
252
|
+
for (var x = Vc[t - 1], N = x >> 13, p = x & 8191, j = (1 << e) - 1, P = a.p || new jr(32768), B = a.h || new jr(j + 1), k = Math.ceil(e / 3), G = 2 * k, Y = function(Dt) {
|
|
253
253
|
return (r[Dt] ^ r[Dt + 1] << k ^ r[Dt + 2] << G) & j;
|
|
254
254
|
}, q = new Qo(25e3), it = new jr(288), mt = new jr(32), dt = 0, K = 0, R = a.i || 0, tt = 0, _ = a.w || 0, F = 0; R + 2 < c; ++R) {
|
|
255
255
|
var z = Y(R), U = R & 32767, nt = B[z];
|
|
@@ -297,7 +297,7 @@ var zc = /* @__PURE__ */ Ca(xi, 9, 0), Hc = /* @__PURE__ */ Ca(Is, 5, 0), of = f
|
|
|
297
297
|
}
|
|
298
298
|
a.i = c;
|
|
299
299
|
}
|
|
300
|
-
return
|
|
300
|
+
return Gc(u, 0, n + of(g) + s);
|
|
301
301
|
}, ff = function() {
|
|
302
302
|
var r = 1, t = 0;
|
|
303
303
|
return {
|
|
@@ -313,16 +313,16 @@ var zc = /* @__PURE__ */ Ca(xi, 9, 0), Hc = /* @__PURE__ */ Ca(Is, 5, 0), of = f
|
|
|
313
313
|
return r %= 65521, t %= 65521, (r & 255) << 24 | (r & 65280) << 8 | (t & 255) << 8 | t >> 8;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
},
|
|
316
|
+
}, Jc = function(r, t, e, n, s) {
|
|
317
317
|
if (!s && (s = { l: 1 }, t.dictionary)) {
|
|
318
318
|
var a = t.dictionary.subarray(-32768), c = new Zr(a.length + r.length);
|
|
319
319
|
c.set(a), c.set(r, a.length), r = c, s.w = a.length;
|
|
320
320
|
}
|
|
321
|
-
return
|
|
321
|
+
return Yc(r, t.level == null ? 6 : t.level, t.mem == null ? s.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(r.length))) * 1.5) : 20 : 12 + t.mem, e, n, s);
|
|
322
322
|
}, cf = function(r, t, e) {
|
|
323
323
|
for (; e; ++t)
|
|
324
324
|
r[t] = e, e >>>= 8;
|
|
325
|
-
},
|
|
325
|
+
}, Xc = function(r, t) {
|
|
326
326
|
var e = t.level, n = e == 0 ? 0 : e < 6 ? 1 : e == 9 ? 3 : 2;
|
|
327
327
|
if (r[0] = 120, r[1] = n << 6 | (t.dictionary && 32), r[1] |= 31 - (r[0] << 8 | r[1]) % 31, t.dictionary) {
|
|
328
328
|
var s = ff();
|
|
@@ -333,18 +333,18 @@ function Go(r, t) {
|
|
|
333
333
|
t || (t = {});
|
|
334
334
|
var e = ff();
|
|
335
335
|
e.p(r);
|
|
336
|
-
var n =
|
|
337
|
-
return
|
|
336
|
+
var n = Jc(r, t, t.dictionary ? 6 : 2, 4);
|
|
337
|
+
return Xc(n, t), cf(n, n.length - 4, e.d()), n;
|
|
338
338
|
}
|
|
339
|
-
var
|
|
339
|
+
var Kc = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), $c = 0;
|
|
340
340
|
try {
|
|
341
|
-
|
|
341
|
+
Kc.decode(lf, { stream: !0 }), $c = 1;
|
|
342
342
|
} catch {
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Zc(r) {
|
|
345
345
|
if (Array.isArray(r)) return r;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Qc(r, t) {
|
|
348
348
|
var e = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
349
349
|
if (e != null) {
|
|
350
350
|
var n, s, a, c, u = [], f = !0, d = !1;
|
|
@@ -367,28 +367,28 @@ function Yu(r, t) {
|
|
|
367
367
|
for (var e = 0, n = Array(t); e < t; e++) n[e] = r[e];
|
|
368
368
|
return n;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function th(r, t) {
|
|
371
371
|
if (r) {
|
|
372
372
|
if (typeof r == "string") return Yu(r, t);
|
|
373
373
|
var e = {}.toString.call(r).slice(8, -1);
|
|
374
374
|
return e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set" ? Array.from(r) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? Yu(r, t) : void 0;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function eh() {
|
|
378
378
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
379
379
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
380
380
|
}
|
|
381
381
|
function Ju(r, t) {
|
|
382
|
-
return
|
|
382
|
+
return Zc(r) || Qc(r, t) || th(r, t) || eh();
|
|
383
383
|
}
|
|
384
384
|
function Xu(r, t = "utf8") {
|
|
385
385
|
return new TextDecoder(t).decode(r);
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
389
|
-
return
|
|
387
|
+
const rh = new TextEncoder();
|
|
388
|
+
function nh(r) {
|
|
389
|
+
return rh.encode(r);
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const ih = 1024 * 8, ah = (() => {
|
|
392
392
|
const r = new Uint8Array(4), t = new Uint32Array(r.buffer);
|
|
393
393
|
return !((t[0] = 1) & r[0]);
|
|
394
394
|
})(), No = {
|
|
@@ -439,7 +439,7 @@ class ru {
|
|
|
439
439
|
* @param options - An object for the options.
|
|
440
440
|
* @returns A new IOBuffer instance.
|
|
441
441
|
*/
|
|
442
|
-
constructor(t =
|
|
442
|
+
constructor(t = ih, e = {}) {
|
|
443
443
|
let n = !1;
|
|
444
444
|
typeof t == "number" ? t = new ArrayBuffer(t) : (n = !0, this.lastWrittenByte = t.byteLength);
|
|
445
445
|
const s = e.offset ? e.offset >>> 0 : 0, a = t.byteLength - s;
|
|
@@ -612,7 +612,7 @@ class ru {
|
|
|
612
612
|
*/
|
|
613
613
|
readArray(t, e) {
|
|
614
614
|
const n = No[e].BYTES_PER_ELEMENT * t, s = this.byteOffset + this.offset, a = this.buffer.slice(s, s + n);
|
|
615
|
-
if (this.littleEndian ===
|
|
615
|
+
if (this.littleEndian === ah && e !== "uint8" && e !== "int8") {
|
|
616
616
|
const u = new Uint8Array(this.buffer.slice(s, s + n));
|
|
617
617
|
u.reverse();
|
|
618
618
|
const f = new No[e](u.buffer);
|
|
@@ -868,7 +868,7 @@ class ru {
|
|
|
868
868
|
* @returns This.
|
|
869
869
|
*/
|
|
870
870
|
writeUtf8(t) {
|
|
871
|
-
return this.writeBytes(
|
|
871
|
+
return this.writeBytes(nh(t));
|
|
872
872
|
}
|
|
873
873
|
/**
|
|
874
874
|
* Export a Uint8Array view of the internal buffer.
|
|
@@ -899,19 +899,19 @@ function sa(r) {
|
|
|
899
899
|
for (; --t >= 0; )
|
|
900
900
|
r[t] = 0;
|
|
901
901
|
}
|
|
902
|
-
const
|
|
903
|
-
sa(fh);
|
|
904
|
-
const ch = new Array(df * 2);
|
|
902
|
+
const sh = 3, oh = 258, hf = 29, uh = 256, lh = uh + 1 + hf, df = 30, fh = 512, ch = new Array((lh + 2) * 2);
|
|
905
903
|
sa(ch);
|
|
906
|
-
const hh = new Array(
|
|
904
|
+
const hh = new Array(df * 2);
|
|
907
905
|
sa(hh);
|
|
908
|
-
const dh = new Array(
|
|
906
|
+
const dh = new Array(fh);
|
|
909
907
|
sa(dh);
|
|
910
|
-
const ph = new Array(
|
|
908
|
+
const ph = new Array(oh - sh + 1);
|
|
911
909
|
sa(ph);
|
|
912
|
-
const gh = new Array(
|
|
910
|
+
const gh = new Array(hf);
|
|
913
911
|
sa(gh);
|
|
914
|
-
const mh = (
|
|
912
|
+
const mh = new Array(df);
|
|
913
|
+
sa(mh);
|
|
914
|
+
const vh = (r, t, e, n) => {
|
|
915
915
|
let s = r & 65535 | 0, a = r >>> 16 & 65535 | 0, c = 0;
|
|
916
916
|
for (; e !== 0; ) {
|
|
917
917
|
c = e > 2e3 ? 2e3 : e, e -= c;
|
|
@@ -922,8 +922,8 @@ const mh = (r, t, e, n) => {
|
|
|
922
922
|
}
|
|
923
923
|
return s | a << 16 | 0;
|
|
924
924
|
};
|
|
925
|
-
var Vo =
|
|
926
|
-
const
|
|
925
|
+
var Vo = vh;
|
|
926
|
+
const bh = () => {
|
|
927
927
|
let r, t = [];
|
|
928
928
|
for (var e = 0; e < 256; e++) {
|
|
929
929
|
r = e;
|
|
@@ -932,14 +932,14 @@ const vh = () => {
|
|
|
932
932
|
t[e] = r;
|
|
933
933
|
}
|
|
934
934
|
return t;
|
|
935
|
-
},
|
|
936
|
-
const s =
|
|
935
|
+
}, wh = new Uint32Array(bh()), yh = (r, t, e, n) => {
|
|
936
|
+
const s = wh, a = n + e;
|
|
937
937
|
r ^= -1;
|
|
938
938
|
for (let c = n; c < a; c++)
|
|
939
939
|
r = r >>> 8 ^ s[(r ^ t[c]) & 255];
|
|
940
940
|
return r ^ -1;
|
|
941
941
|
};
|
|
942
|
-
var hn =
|
|
942
|
+
var hn = yh, Yo = {
|
|
943
943
|
2: "need dictionary",
|
|
944
944
|
/* Z_NEED_DICT 2 */
|
|
945
945
|
1: "stream end",
|
|
@@ -978,8 +978,8 @@ var hn = wh, Yo = {
|
|
|
978
978
|
Z_DEFLATED: 8
|
|
979
979
|
//Z_NULL: null // Use -1 or null inline, depending on var type
|
|
980
980
|
};
|
|
981
|
-
const
|
|
982
|
-
var
|
|
981
|
+
const xh = (r, t) => Object.prototype.hasOwnProperty.call(r, t);
|
|
982
|
+
var Ah = function(r) {
|
|
983
983
|
const t = Array.prototype.slice.call(arguments, 1);
|
|
984
984
|
for (; t.length; ) {
|
|
985
985
|
const e = t.shift();
|
|
@@ -987,11 +987,11 @@ var xh = function(r) {
|
|
|
987
987
|
if (typeof e != "object")
|
|
988
988
|
throw new TypeError(e + "must be non-object");
|
|
989
989
|
for (const n in e)
|
|
990
|
-
|
|
990
|
+
xh(e, n) && (r[n] = e[n]);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
return r;
|
|
994
|
-
},
|
|
994
|
+
}, Nh = (r) => {
|
|
995
995
|
let t = 0;
|
|
996
996
|
for (let n = 0, s = r.length; n < s; n++)
|
|
997
997
|
t += r[n].length;
|
|
@@ -1002,8 +1002,8 @@ var xh = function(r) {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
return e;
|
|
1004
1004
|
}, gf = {
|
|
1005
|
-
assign:
|
|
1006
|
-
flattenChunks:
|
|
1005
|
+
assign: Ah,
|
|
1006
|
+
flattenChunks: Nh
|
|
1007
1007
|
};
|
|
1008
1008
|
let mf = !0;
|
|
1009
1009
|
try {
|
|
@@ -1015,7 +1015,7 @@ const Oa = new Uint8Array(256);
|
|
|
1015
1015
|
for (let r = 0; r < 256; r++)
|
|
1016
1016
|
Oa[r] = r >= 252 ? 6 : r >= 248 ? 5 : r >= 240 ? 4 : r >= 224 ? 3 : r >= 192 ? 2 : 1;
|
|
1017
1017
|
Oa[254] = Oa[255] = 1;
|
|
1018
|
-
var
|
|
1018
|
+
var Lh = (r) => {
|
|
1019
1019
|
if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
|
|
1020
1020
|
return new TextEncoder().encode(r);
|
|
1021
1021
|
let t, e, n, s, a, c = r.length, u = 0;
|
|
@@ -1025,7 +1025,7 @@ var Nh = (r) => {
|
|
|
1025
1025
|
e = r.charCodeAt(s), (e & 64512) === 55296 && s + 1 < c && (n = r.charCodeAt(s + 1), (n & 64512) === 56320 && (e = 65536 + (e - 55296 << 10) + (n - 56320), s++)), e < 128 ? t[a++] = e : e < 2048 ? (t[a++] = 192 | e >>> 6, t[a++] = 128 | e & 63) : e < 65536 ? (t[a++] = 224 | e >>> 12, t[a++] = 128 | e >>> 6 & 63, t[a++] = 128 | e & 63) : (t[a++] = 240 | e >>> 18, t[a++] = 128 | e >>> 12 & 63, t[a++] = 128 | e >>> 6 & 63, t[a++] = 128 | e & 63);
|
|
1026
1026
|
return t;
|
|
1027
1027
|
};
|
|
1028
|
-
const
|
|
1028
|
+
const _h = (r, t) => {
|
|
1029
1029
|
if (t < 65534 && r.subarray && mf)
|
|
1030
1030
|
return String.fromCharCode.apply(null, r.length === t ? r : r.subarray(0, t));
|
|
1031
1031
|
let e = "";
|
|
@@ -1033,7 +1033,7 @@ const Lh = (r, t) => {
|
|
|
1033
1033
|
e += String.fromCharCode(r[n]);
|
|
1034
1034
|
return e;
|
|
1035
1035
|
};
|
|
1036
|
-
var
|
|
1036
|
+
var Sh = (r, t) => {
|
|
1037
1037
|
const e = t || r.length;
|
|
1038
1038
|
if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
|
|
1039
1039
|
return new TextDecoder().decode(r.subarray(0, t));
|
|
@@ -1058,24 +1058,24 @@ var _h = (r, t) => {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
c < 65536 ? a[s++] = c : (c -= 65536, a[s++] = 55296 | c >> 10 & 1023, a[s++] = 56320 | c & 1023);
|
|
1060
1060
|
}
|
|
1061
|
-
return
|
|
1062
|
-
},
|
|
1061
|
+
return _h(a, s);
|
|
1062
|
+
}, kh = (r, t) => {
|
|
1063
1063
|
t = t || r.length, t > r.length && (t = r.length);
|
|
1064
1064
|
let e = t - 1;
|
|
1065
1065
|
for (; e >= 0 && (r[e] & 192) === 128; )
|
|
1066
1066
|
e--;
|
|
1067
1067
|
return e < 0 || e === 0 ? t : e + Oa[r[e]] > t ? e : t;
|
|
1068
1068
|
}, Jo = {
|
|
1069
|
-
string2buf:
|
|
1070
|
-
buf2string:
|
|
1071
|
-
utf8border:
|
|
1069
|
+
string2buf: Lh,
|
|
1070
|
+
buf2string: Sh,
|
|
1071
|
+
utf8border: kh
|
|
1072
1072
|
};
|
|
1073
|
-
function
|
|
1073
|
+
function Ph() {
|
|
1074
1074
|
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
1075
1075
|
}
|
|
1076
|
-
var
|
|
1077
|
-
const vs = 16209,
|
|
1078
|
-
var
|
|
1076
|
+
var Mh = Ph;
|
|
1077
|
+
const vs = 16209, Ih = 16191;
|
|
1078
|
+
var Eh = function(t, e) {
|
|
1079
1079
|
let n, s, a, c, u, f, d, g, x, N, p, j, P, B, k, G, Y, q, it, mt, dt, K, R, tt;
|
|
1080
1080
|
const _ = t.state;
|
|
1081
1081
|
n = t.next_in, R = t.input, s = n + (t.avail_in - 5), a = t.next_out, tt = t.output, c = a - (e - t.avail_out), u = a + (t.avail_out - 257), f = _.dmax, d = _.wsize, g = _.whave, x = _.wnext, N = _.window, p = _.hold, j = _.bits, P = _.lencode, B = _.distcode, k = (1 << _.lenbits) - 1, G = (1 << _.distbits) - 1;
|
|
@@ -1152,7 +1152,7 @@ var Ih = function(t, e) {
|
|
|
1152
1152
|
Y = P[(Y & 65535) + (p & (1 << q) - 1)];
|
|
1153
1153
|
continue e;
|
|
1154
1154
|
} else if (q & 32) {
|
|
1155
|
-
_.mode =
|
|
1155
|
+
_.mode = Ih;
|
|
1156
1156
|
break t;
|
|
1157
1157
|
} else {
|
|
1158
1158
|
t.msg = "invalid literal/length code", _.mode = vs;
|
|
@@ -1163,7 +1163,7 @@ var Ih = function(t, e) {
|
|
|
1163
1163
|
} while (n < s && a < u);
|
|
1164
1164
|
it = j >> 3, n -= it, j -= it << 3, p &= (1 << j) - 1, t.next_in = n, t.next_out = a, t.avail_in = n < s ? 5 + (s - n) : 5 - (n - s), t.avail_out = a < u ? 257 + (u - a) : 257 - (a - u), _.hold = p, _.bits = j;
|
|
1165
1165
|
};
|
|
1166
|
-
const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2,
|
|
1166
|
+
const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Ch = new Uint16Array([
|
|
1167
1167
|
/* Length codes 257..285 base */
|
|
1168
1168
|
3,
|
|
1169
1169
|
4,
|
|
@@ -1196,7 +1196,7 @@ const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Eh = new Uint16Array(
|
|
|
1196
1196
|
258,
|
|
1197
1197
|
0,
|
|
1198
1198
|
0
|
|
1199
|
-
]),
|
|
1199
|
+
]), Fh = new Uint8Array([
|
|
1200
1200
|
/* Length codes 257..285 extra */
|
|
1201
1201
|
16,
|
|
1202
1202
|
16,
|
|
@@ -1229,7 +1229,7 @@ const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Eh = new Uint16Array(
|
|
|
1229
1229
|
16,
|
|
1230
1230
|
199,
|
|
1231
1231
|
75
|
|
1232
|
-
]),
|
|
1232
|
+
]), jh = new Uint16Array([
|
|
1233
1233
|
/* Distance codes 0..29 base */
|
|
1234
1234
|
1,
|
|
1235
1235
|
2,
|
|
@@ -1263,7 +1263,7 @@ const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Eh = new Uint16Array(
|
|
|
1263
1263
|
24577,
|
|
1264
1264
|
0,
|
|
1265
1265
|
0
|
|
1266
|
-
]),
|
|
1266
|
+
]), Oh = new Uint8Array([
|
|
1267
1267
|
/* Distance codes 0..29 extra */
|
|
1268
1268
|
16,
|
|
1269
1269
|
16,
|
|
@@ -1297,7 +1297,7 @@ const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Eh = new Uint16Array(
|
|
|
1297
1297
|
29,
|
|
1298
1298
|
64,
|
|
1299
1299
|
64
|
|
1300
|
-
]),
|
|
1300
|
+
]), Bh = (r, t, e, n, s, a, c, u) => {
|
|
1301
1301
|
const f = u.bits;
|
|
1302
1302
|
let d = 0, g = 0, x = 0, N = 0, p = 0, j = 0, P = 0, B = 0, k = 0, G = 0, Y, q, it, mt, dt, K = null, R;
|
|
1303
1303
|
const tt = new Uint16Array(Ji + 1), _ = new Uint16Array(Ji + 1);
|
|
@@ -1321,7 +1321,7 @@ const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Eh = new Uint16Array(
|
|
|
1321
1321
|
_[d + 1] = _[d] + tt[d];
|
|
1322
1322
|
for (g = 0; g < n; g++)
|
|
1323
1323
|
t[e + g] !== 0 && (c[_[t[e + g]]++] = g);
|
|
1324
|
-
if (r === Zu ? (K = F = c, R = 20) : r === Lo ? (K =
|
|
1324
|
+
if (r === Zu ? (K = F = c, R = 20) : r === Lo ? (K = Ch, F = Fh, R = 257) : (K = jh, F = Oh, R = 0), G = 0, g = 0, d = x, dt = a, j = p, P = 0, it = -1, k = 1 << p, mt = k - 1, r === Lo && k > Ku || r === Qu && k > $u)
|
|
1325
1325
|
return 1;
|
|
1326
1326
|
for (; ; ) {
|
|
1327
1327
|
z = d - P, c[g] + 1 < R ? (U = 0, nt = c[g]) : c[g] >= R ? (U = F[c[g] - R], nt = K[c[g] - R]) : (U = 96, nt = 0), Y = 1 << d - P, q = 1 << j, x = q;
|
|
@@ -1345,21 +1345,21 @@ const Ji = 15, Ku = 852, $u = 592, Zu = 0, Lo = 1, Qu = 2, Eh = new Uint16Array(
|
|
|
1345
1345
|
}
|
|
1346
1346
|
return G !== 0 && (s[dt + G] = d - P << 24 | 64 << 16 | 0), u.bits = p, 0;
|
|
1347
1347
|
};
|
|
1348
|
-
var Fa =
|
|
1349
|
-
const
|
|
1348
|
+
var Fa = Bh;
|
|
1349
|
+
const Rh = 0, vf = 1, bf = 2, {
|
|
1350
1350
|
Z_FINISH: tl,
|
|
1351
|
-
Z_BLOCK:
|
|
1351
|
+
Z_BLOCK: Th,
|
|
1352
1352
|
Z_TREES: bs,
|
|
1353
1353
|
Z_OK: Ai,
|
|
1354
|
-
Z_STREAM_END:
|
|
1355
|
-
Z_NEED_DICT:
|
|
1354
|
+
Z_STREAM_END: Dh,
|
|
1355
|
+
Z_NEED_DICT: qh,
|
|
1356
1356
|
Z_STREAM_ERROR: zr,
|
|
1357
1357
|
Z_DATA_ERROR: wf,
|
|
1358
1358
|
Z_MEM_ERROR: yf,
|
|
1359
|
-
Z_BUF_ERROR:
|
|
1359
|
+
Z_BUF_ERROR: Uh,
|
|
1360
1360
|
Z_DEFLATED: el
|
|
1361
|
-
} = pf, Ts = 16180, rl = 16181, nl = 16182, il = 16183, al = 16184, sl = 16185, ol = 16186, ul = 16187, ll = 16188, fl = 16189, Es = 16190, Cn = 16191, _o = 16192, cl = 16193, So = 16194, hl = 16195, dl = 16196, pl = 16197, gl = 16198, ws = 16199, ys = 16200, ml = 16201, vl = 16202, bl = 16203, wl = 16204, yl = 16205, ko = 16206, xl = 16207, Al = 16208, Oe = 16209, xf = 16210, Af = 16211,
|
|
1362
|
-
function
|
|
1361
|
+
} = pf, Ts = 16180, rl = 16181, nl = 16182, il = 16183, al = 16184, sl = 16185, ol = 16186, ul = 16187, ll = 16188, fl = 16189, Es = 16190, Cn = 16191, _o = 16192, cl = 16193, So = 16194, hl = 16195, dl = 16196, pl = 16197, gl = 16198, ws = 16199, ys = 16200, ml = 16201, vl = 16202, bl = 16203, wl = 16204, yl = 16205, ko = 16206, xl = 16207, Al = 16208, Oe = 16209, xf = 16210, Af = 16211, zh = 852, Hh = 592, Wh = 15, Gh = Wh, Nl = (r) => (r >>> 24 & 255) + (r >>> 8 & 65280) + ((r & 65280) << 8) + ((r & 255) << 24);
|
|
1362
|
+
function Vh() {
|
|
1363
1363
|
this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
1364
1364
|
}
|
|
1365
1365
|
const Li = (r) => {
|
|
@@ -1371,7 +1371,7 @@ const Li = (r) => {
|
|
|
1371
1371
|
if (Li(r))
|
|
1372
1372
|
return zr;
|
|
1373
1373
|
const t = r.state;
|
|
1374
|
-
return r.total_in = r.total_out = t.total = 0, r.msg = "", t.wrap && (r.adler = t.wrap & 1), t.mode = Ts, t.last = 0, t.havedict = 0, t.flags = -1, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new Int32Array(
|
|
1374
|
+
return r.total_in = r.total_out = t.total = 0, r.msg = "", t.wrap && (r.adler = t.wrap & 1), t.mode = Ts, t.last = 0, t.havedict = 0, t.flags = -1, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new Int32Array(zh), t.distcode = t.distdyn = new Int32Array(Hh), t.sane = 1, t.back = -1, Ai;
|
|
1375
1375
|
}, Lf = (r) => {
|
|
1376
1376
|
if (Li(r))
|
|
1377
1377
|
return zr;
|
|
@@ -1386,13 +1386,13 @@ const Li = (r) => {
|
|
|
1386
1386
|
}, Sf = (r, t) => {
|
|
1387
1387
|
if (!r)
|
|
1388
1388
|
return zr;
|
|
1389
|
-
const e = new
|
|
1389
|
+
const e = new Vh();
|
|
1390
1390
|
r.state = e, e.strm = r, e.window = null, e.mode = Ts;
|
|
1391
1391
|
const n = _f(r, t);
|
|
1392
1392
|
return n !== Ai && (r.state = null), n;
|
|
1393
|
-
},
|
|
1393
|
+
}, Yh = (r) => Sf(r, Gh);
|
|
1394
1394
|
let Ll = !0, Po, Mo;
|
|
1395
|
-
const
|
|
1395
|
+
const Jh = (r) => {
|
|
1396
1396
|
if (Ll) {
|
|
1397
1397
|
Po = new Int32Array(512), Mo = new Int32Array(32);
|
|
1398
1398
|
let t = 0;
|
|
@@ -1413,7 +1413,7 @@ const Yh = (r) => {
|
|
|
1413
1413
|
let s;
|
|
1414
1414
|
const a = r.state;
|
|
1415
1415
|
return a.window === null && (a.window = new Uint8Array(1 << a.wbits)), a.wsize === 0 && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0), n >= a.wsize ? (a.window.set(t.subarray(e - a.wsize, e), 0), a.wnext = 0, a.whave = a.wsize) : (s = a.wsize - a.wnext, s > n && (s = n), a.window.set(t.subarray(e - n, e - n + s), a.wnext), n -= s, n ? (a.window.set(t.subarray(e - n, e), 0), a.wnext = n, a.whave = a.wsize) : (a.wnext += s, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += s))), 0;
|
|
1416
|
-
},
|
|
1416
|
+
}, Xh = (r, t) => {
|
|
1417
1417
|
let e, n, s, a, c, u, f, d, g, x, N, p, j, P, B = 0, k, G, Y, q, it, mt, dt, K;
|
|
1418
1418
|
const R = new Uint8Array(4);
|
|
1419
1419
|
let tt, _;
|
|
@@ -1564,11 +1564,11 @@ const Yh = (r) => {
|
|
|
1564
1564
|
/* falls through */
|
|
1565
1565
|
case Es:
|
|
1566
1566
|
if (e.havedict === 0)
|
|
1567
|
-
return r.next_out = c, r.avail_out = f, r.next_in = a, r.avail_in = u, e.hold = d, e.bits = g,
|
|
1567
|
+
return r.next_out = c, r.avail_out = f, r.next_in = a, r.avail_in = u, e.hold = d, e.bits = g, qh;
|
|
1568
1568
|
r.adler = e.check = 1, e.mode = Cn;
|
|
1569
1569
|
/* falls through */
|
|
1570
1570
|
case Cn:
|
|
1571
|
-
if (t ===
|
|
1571
|
+
if (t === Th || t === bs)
|
|
1572
1572
|
break t;
|
|
1573
1573
|
/* falls through */
|
|
1574
1574
|
case _o:
|
|
@@ -1586,7 +1586,7 @@ const Yh = (r) => {
|
|
|
1586
1586
|
e.mode = cl;
|
|
1587
1587
|
break;
|
|
1588
1588
|
case 1:
|
|
1589
|
-
if (
|
|
1589
|
+
if (Jh(e), e.mode = ws, t === bs) {
|
|
1590
1590
|
d >>>= 2, g -= 2;
|
|
1591
1591
|
break t;
|
|
1592
1592
|
}
|
|
@@ -1647,7 +1647,7 @@ const Yh = (r) => {
|
|
|
1647
1647
|
}
|
|
1648
1648
|
for (; e.have < 19; )
|
|
1649
1649
|
e.lens[F[e.have++]] = 0;
|
|
1650
|
-
if (e.lencode = e.lendyn, e.lenbits = 7, tt = { bits: e.lenbits }, K = Fa(
|
|
1650
|
+
if (e.lencode = e.lendyn, e.lenbits = 7, tt = { bits: e.lenbits }, K = Fa(Rh, e.lens, 0, 19, e.lencode, 0, e.work, tt), e.lenbits = tt.bits, K) {
|
|
1651
1651
|
r.msg = "invalid code lengths set", e.mode = Oe;
|
|
1652
1652
|
break;
|
|
1653
1653
|
}
|
|
@@ -1719,7 +1719,7 @@ const Yh = (r) => {
|
|
|
1719
1719
|
/* falls through */
|
|
1720
1720
|
case ys:
|
|
1721
1721
|
if (u >= 6 && f >= 258) {
|
|
1722
|
-
r.next_out = c, r.avail_out = f, r.next_in = a, r.avail_in = u, e.hold = d, e.bits = g,
|
|
1722
|
+
r.next_out = c, r.avail_out = f, r.next_in = a, r.avail_in = u, e.hold = d, e.bits = g, Eh(r, N), c = r.next_out, s = r.output, f = r.avail_out, a = r.next_in, n = r.input, u = r.avail_in, d = e.hold, g = e.bits, e.mode === Cn && (e.back = -1);
|
|
1723
1723
|
break;
|
|
1724
1724
|
}
|
|
1725
1725
|
for (e.back = 0; B = e.lencode[d & (1 << e.lenbits) - 1], k = B >>> 24, G = B >>> 16 & 255, Y = B & 65535, !(k <= g); ) {
|
|
@@ -1849,7 +1849,7 @@ const Yh = (r) => {
|
|
|
1849
1849
|
e.mode = Al;
|
|
1850
1850
|
/* falls through */
|
|
1851
1851
|
case Al:
|
|
1852
|
-
K =
|
|
1852
|
+
K = Dh;
|
|
1853
1853
|
break t;
|
|
1854
1854
|
case Oe:
|
|
1855
1855
|
K = wf;
|
|
@@ -1862,78 +1862,78 @@ const Yh = (r) => {
|
|
|
1862
1862
|
return zr;
|
|
1863
1863
|
}
|
|
1864
1864
|
return r.next_out = c, r.avail_out = f, r.next_in = a, r.avail_in = u, e.hold = d, e.bits = g, (e.wsize || N !== r.avail_out && e.mode < Oe && (e.mode < ko || t !== tl)) && kf(r, r.output, r.next_out, N - r.avail_out), x -= r.avail_in, N -= r.avail_out, r.total_in += x, r.total_out += N, e.total += N, e.wrap & 4 && N && (r.adler = e.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
|
|
1865
|
-
e.flags ? hn(e.check, s, N, r.next_out - N) : Vo(e.check, s, N, r.next_out - N)), r.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === Cn ? 128 : 0) + (e.mode === ws || e.mode === So ? 256 : 0), (x === 0 && N === 0 || t === tl) && K === Ai && (K =
|
|
1866
|
-
},
|
|
1865
|
+
e.flags ? hn(e.check, s, N, r.next_out - N) : Vo(e.check, s, N, r.next_out - N)), r.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === Cn ? 128 : 0) + (e.mode === ws || e.mode === So ? 256 : 0), (x === 0 && N === 0 || t === tl) && K === Ai && (K = Uh), K;
|
|
1866
|
+
}, Kh = (r) => {
|
|
1867
1867
|
if (Li(r))
|
|
1868
1868
|
return zr;
|
|
1869
1869
|
let t = r.state;
|
|
1870
1870
|
return t.window && (t.window = null), r.state = null, Ai;
|
|
1871
|
-
},
|
|
1871
|
+
}, $h = (r, t) => {
|
|
1872
1872
|
if (Li(r))
|
|
1873
1873
|
return zr;
|
|
1874
1874
|
const e = r.state;
|
|
1875
1875
|
return (e.wrap & 2) === 0 ? zr : (e.head = t, t.done = !1, Ai);
|
|
1876
|
-
},
|
|
1876
|
+
}, Zh = (r, t) => {
|
|
1877
1877
|
const e = t.length;
|
|
1878
1878
|
let n, s, a;
|
|
1879
1879
|
return Li(r) || (n = r.state, n.wrap !== 0 && n.mode !== Es) ? zr : n.mode === Es && (s = 1, s = Vo(s, t, e, 0), s !== n.check) ? wf : (a = kf(r, t, e, e), a ? (n.mode = xf, yf) : (n.havedict = 1, Ai));
|
|
1880
1880
|
};
|
|
1881
|
-
var
|
|
1882
|
-
inflateReset:
|
|
1883
|
-
inflateReset2:
|
|
1884
|
-
inflateResetKeep:
|
|
1885
|
-
inflateInit:
|
|
1886
|
-
inflateInit2:
|
|
1887
|
-
inflate:
|
|
1888
|
-
inflateEnd:
|
|
1889
|
-
inflateGetHeader:
|
|
1890
|
-
inflateSetDictionary:
|
|
1891
|
-
inflateInfo:
|
|
1881
|
+
var Qh = Lf, t1 = _f, e1 = Nf, r1 = Yh, n1 = Sf, i1 = Xh, a1 = Kh, s1 = $h, o1 = Zh, u1 = "pako inflate (from Nodeca project)", pn = {
|
|
1882
|
+
inflateReset: Qh,
|
|
1883
|
+
inflateReset2: t1,
|
|
1884
|
+
inflateResetKeep: e1,
|
|
1885
|
+
inflateInit: r1,
|
|
1886
|
+
inflateInit2: n1,
|
|
1887
|
+
inflate: i1,
|
|
1888
|
+
inflateEnd: a1,
|
|
1889
|
+
inflateGetHeader: s1,
|
|
1890
|
+
inflateSetDictionary: o1,
|
|
1891
|
+
inflateInfo: u1
|
|
1892
1892
|
};
|
|
1893
|
-
function
|
|
1893
|
+
function l1() {
|
|
1894
1894
|
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
|
|
1895
1895
|
}
|
|
1896
|
-
var
|
|
1896
|
+
var f1 = l1;
|
|
1897
1897
|
const Pf = Object.prototype.toString, {
|
|
1898
|
-
Z_NO_FLUSH:
|
|
1898
|
+
Z_NO_FLUSH: c1,
|
|
1899
1899
|
Z_FINISH: _l,
|
|
1900
1900
|
Z_OK: ea,
|
|
1901
1901
|
Z_STREAM_END: Io,
|
|
1902
1902
|
Z_NEED_DICT: Eo,
|
|
1903
|
-
Z_STREAM_ERROR:
|
|
1903
|
+
Z_STREAM_ERROR: h1,
|
|
1904
1904
|
Z_DATA_ERROR: Sl,
|
|
1905
|
-
Z_MEM_ERROR:
|
|
1905
|
+
Z_MEM_ERROR: d1,
|
|
1906
1906
|
Z_BUF_ERROR: kl
|
|
1907
|
-
} = pf,
|
|
1907
|
+
} = pf, p1 = {
|
|
1908
1908
|
chunkSize: 1024 * 64,
|
|
1909
1909
|
windowBits: 15,
|
|
1910
1910
|
to: ""
|
|
1911
1911
|
};
|
|
1912
1912
|
function Ba(r) {
|
|
1913
|
-
this.options = gf.assign({},
|
|
1913
|
+
this.options = gf.assign({}, p1, r || {});
|
|
1914
1914
|
const t = this.options;
|
|
1915
|
-
t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, t.windowBits === 0 && (t.windowBits = -15)), t.windowBits >= 0 && t.windowBits < 16 && !(r && r.windowBits) && (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && (t.windowBits & 15) === 0 && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new
|
|
1915
|
+
t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, t.windowBits === 0 && (t.windowBits = -15)), t.windowBits >= 0 && t.windowBits < 16 && !(r && r.windowBits) && (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && (t.windowBits & 15) === 0 && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new Mh(), this.strm.avail_out = 0;
|
|
1916
1916
|
let e = pn.inflateInit2(
|
|
1917
1917
|
this.strm,
|
|
1918
1918
|
t.windowBits
|
|
1919
1919
|
);
|
|
1920
1920
|
if (e !== ea)
|
|
1921
1921
|
throw new Error(Yo[e]);
|
|
1922
|
-
if (this.header = new
|
|
1922
|
+
if (this.header = new f1(), pn.inflateGetHeader(this.strm, this.header), t.dictionary && (typeof t.dictionary == "string" ? t.dictionary = Jo.string2buf(t.dictionary) : Pf.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary)), t.raw && (e = pn.inflateSetDictionary(this.strm, t.dictionary), e !== ea)))
|
|
1923
1923
|
throw new Error(Yo[e]);
|
|
1924
1924
|
}
|
|
1925
1925
|
Ba.prototype.push = function(r, t) {
|
|
1926
1926
|
const e = this.strm, n = this.options.chunkSize, s = this.options.dictionary;
|
|
1927
1927
|
let a, c, u;
|
|
1928
1928
|
if (this.ended) return !1;
|
|
1929
|
-
for (t === ~~t ? c = t : c = t === !0 ? _l :
|
|
1929
|
+
for (t === ~~t ? c = t : c = t === !0 ? _l : c1, Pf.call(r) === "[object ArrayBuffer]" ? e.input = new Uint8Array(r) : e.input = r, e.next_in = 0, e.avail_in = e.input.length; ; ) {
|
|
1930
1930
|
for (e.avail_out === 0 && (e.output = new Uint8Array(n), e.next_out = 0, e.avail_out = n), a = pn.inflate(e, c), a === Eo && s && (a = pn.inflateSetDictionary(e, s), a === ea ? a = pn.inflate(e, c) : a === Sl && (a = Eo)); e.avail_in > 0 && a === Io && e.state.wrap & 2 && e.state.flags !== 0 && e.input[e.next_in] !== 0; )
|
|
1931
1931
|
pn.inflateReset(e), a = pn.inflate(e, c);
|
|
1932
1932
|
switch (a) {
|
|
1933
|
-
case
|
|
1933
|
+
case h1:
|
|
1934
1934
|
case Sl:
|
|
1935
1935
|
case Eo:
|
|
1936
|
-
case
|
|
1936
|
+
case d1:
|
|
1937
1937
|
return this.onEnd(a), this.ended = !0, !1;
|
|
1938
1938
|
}
|
|
1939
1939
|
if (u = e.avail_out, e.next_out && (e.avail_out === 0 || a === Io || c > 0))
|
|
@@ -1960,17 +1960,17 @@ Ba.prototype.onData = function(r) {
|
|
|
1960
1960
|
Ba.prototype.onEnd = function(r) {
|
|
1961
1961
|
r === ea && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = gf.flattenChunks(this.chunks)), this.chunks = [], this.err = r, this.msg = this.strm.msg;
|
|
1962
1962
|
};
|
|
1963
|
-
function
|
|
1963
|
+
function g1(r, t) {
|
|
1964
1964
|
const e = new Ba(t);
|
|
1965
1965
|
if (e.push(r, !0), e.err) throw e.msg || Yo[e.err];
|
|
1966
1966
|
return e.result;
|
|
1967
1967
|
}
|
|
1968
|
-
var
|
|
1969
|
-
Inflate:
|
|
1970
|
-
inflate:
|
|
1968
|
+
var m1 = Ba, v1 = g1, b1 = {
|
|
1969
|
+
Inflate: m1,
|
|
1970
|
+
inflate: v1
|
|
1971
1971
|
};
|
|
1972
|
-
const { Inflate:
|
|
1973
|
-
var
|
|
1972
|
+
const { Inflate: w1, inflate: y1 } = b1;
|
|
1973
|
+
var x1 = w1, A1 = y1;
|
|
1974
1974
|
const Co = [137, 80, 78, 71, 13, 10, 26, 10], Mf = [];
|
|
1975
1975
|
for (let r = 0; r < 256; r++) {
|
|
1976
1976
|
let t = r;
|
|
@@ -1979,14 +1979,14 @@ for (let r = 0; r < 256; r++) {
|
|
|
1979
1979
|
Mf[r] = t;
|
|
1980
1980
|
}
|
|
1981
1981
|
const Pl = 4294967295;
|
|
1982
|
-
function
|
|
1982
|
+
function N1(r, t, e) {
|
|
1983
1983
|
let n = r;
|
|
1984
1984
|
for (let s = 0; s < e; s++)
|
|
1985
1985
|
n = Mf[(n ^ t[s]) & 255] ^ n >>> 8;
|
|
1986
1986
|
return n;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return (
|
|
1988
|
+
function L1(r, t) {
|
|
1989
|
+
return (N1(Pl, r, t) ^ Pl) >>> 0;
|
|
1990
1990
|
}
|
|
1991
1991
|
var $r;
|
|
1992
1992
|
(function(r) {
|
|
@@ -2004,12 +2004,12 @@ var Fs;
|
|
|
2004
2004
|
(function(r) {
|
|
2005
2005
|
r[r.UNKNOWN = -1] = "UNKNOWN", r[r.NO_INTERLACE = 0] = "NO_INTERLACE", r[r.ADAM7 = 1] = "ADAM7";
|
|
2006
2006
|
})(Fs || (Fs = {}));
|
|
2007
|
-
const
|
|
2008
|
-
class
|
|
2007
|
+
const _1 = new Uint8Array(0), Ml = "\0", S1 = new Uint16Array([255]), k1 = new Uint8Array(S1.buffer), P1 = k1[0] === 255;
|
|
2008
|
+
class M1 extends ru {
|
|
2009
2009
|
constructor(t, e = {}) {
|
|
2010
2010
|
super(t);
|
|
2011
2011
|
const { checkCrc: n = !1 } = e;
|
|
2012
|
-
this._checkCrc = n, this._inflator = new
|
|
2012
|
+
this._checkCrc = n, this._inflator = new x1(), this._png = {
|
|
2013
2013
|
width: -1,
|
|
2014
2014
|
height: -1,
|
|
2015
2015
|
channels: -1,
|
|
@@ -2066,7 +2066,7 @@ class P1 extends ru {
|
|
|
2066
2066
|
if (this.offset - n !== t)
|
|
2067
2067
|
throw new Error(`Length mismatch while decoding chunk ${e}`);
|
|
2068
2068
|
if (this._checkCrc) {
|
|
2069
|
-
const s = this.readUint32(), a = t + 4, c =
|
|
2069
|
+
const s = this.readUint32(), a = t + 4, c = L1(new Uint8Array(this.buffer, this.byteOffset + this.offset - a - 4, a), a);
|
|
2070
2070
|
if (c !== s)
|
|
2071
2071
|
throw new Error(`CRC mismatch for chunk ${e}. Expected ${s}, found ${c}`);
|
|
2072
2072
|
} else
|
|
@@ -2075,7 +2075,7 @@ class P1 extends ru {
|
|
|
2075
2075
|
// https://www.w3.org/TR/PNG/#11IHDR
|
|
2076
2076
|
decodeIHDR() {
|
|
2077
2077
|
const t = this._png;
|
|
2078
|
-
t.width = this.readUint32(), t.height = this.readUint32(), t.depth =
|
|
2078
|
+
t.width = this.readUint32(), t.height = this.readUint32(), t.depth = R1(this.readUint8());
|
|
2079
2079
|
const e = this.readUint8();
|
|
2080
2080
|
this._colorType = e;
|
|
2081
2081
|
let n;
|
|
@@ -2158,7 +2158,7 @@ class P1 extends ru {
|
|
|
2158
2158
|
const a = this.readBytes(t - e.length - 2);
|
|
2159
2159
|
this._png.iccEmbeddedProfile = {
|
|
2160
2160
|
name: e,
|
|
2161
|
-
profile:
|
|
2161
|
+
profile: A1(a)
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
2164
2164
|
// https://www.w3.org/TR/PNG/#11tEXt
|
|
@@ -2186,23 +2186,23 @@ class P1 extends ru {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
decodeInterlaceNull(t) {
|
|
2188
2188
|
const e = this._png.height, n = this._png.channels * this._png.depth / 8, s = this._png.width * n, a = new Uint8Array(this._png.height * s);
|
|
2189
|
-
let c =
|
|
2189
|
+
let c = _1, u = 0, f, d;
|
|
2190
2190
|
for (let g = 0; g < e; g++) {
|
|
2191
2191
|
switch (f = t.subarray(u + 1, u + 1 + s), d = a.subarray(g * s, (g + 1) * s), t[u]) {
|
|
2192
2192
|
case 0:
|
|
2193
|
-
|
|
2193
|
+
I1(f, d, s);
|
|
2194
2194
|
break;
|
|
2195
2195
|
case 1:
|
|
2196
|
-
|
|
2196
|
+
E1(f, d, s, n);
|
|
2197
2197
|
break;
|
|
2198
2198
|
case 2:
|
|
2199
|
-
|
|
2199
|
+
C1(f, d, c, s);
|
|
2200
2200
|
break;
|
|
2201
2201
|
case 3:
|
|
2202
|
-
|
|
2202
|
+
F1(f, d, c, s, n);
|
|
2203
2203
|
break;
|
|
2204
2204
|
case 4:
|
|
2205
|
-
|
|
2205
|
+
j1(f, d, c, s, n);
|
|
2206
2206
|
break;
|
|
2207
2207
|
default:
|
|
2208
2208
|
throw new Error(`Unsupported filter: ${t[u]}`);
|
|
@@ -2211,26 +2211,26 @@ class P1 extends ru {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
if (this._hasPalette && (this._png.palette = this._palette), this._hasTransparency && (this._png.transparency = this._transparency), this._png.depth === 16) {
|
|
2213
2213
|
const g = new Uint16Array(a.buffer);
|
|
2214
|
-
if (
|
|
2214
|
+
if (P1)
|
|
2215
2215
|
for (let x = 0; x < g.length; x++)
|
|
2216
|
-
g[x] =
|
|
2216
|
+
g[x] = B1(g[x]);
|
|
2217
2217
|
this._png.data = g;
|
|
2218
2218
|
} else
|
|
2219
2219
|
this._png.data = a;
|
|
2220
2220
|
}
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2222
|
+
function I1(r, t, e) {
|
|
2223
2223
|
for (let n = 0; n < e; n++)
|
|
2224
2224
|
t[n] = r[n];
|
|
2225
2225
|
}
|
|
2226
|
-
function
|
|
2226
|
+
function E1(r, t, e, n) {
|
|
2227
2227
|
let s = 0;
|
|
2228
2228
|
for (; s < n; s++)
|
|
2229
2229
|
t[s] = r[s];
|
|
2230
2230
|
for (; s < e; s++)
|
|
2231
2231
|
t[s] = r[s] + t[s - n] & 255;
|
|
2232
2232
|
}
|
|
2233
|
-
function
|
|
2233
|
+
function C1(r, t, e, n) {
|
|
2234
2234
|
let s = 0;
|
|
2235
2235
|
if (e.length === 0)
|
|
2236
2236
|
for (; s < n; s++)
|
|
@@ -2239,7 +2239,7 @@ function E1(r, t, e, n) {
|
|
|
2239
2239
|
for (; s < n; s++)
|
|
2240
2240
|
t[s] = r[s] + e[s] & 255;
|
|
2241
2241
|
}
|
|
2242
|
-
function
|
|
2242
|
+
function F1(r, t, e, n, s) {
|
|
2243
2243
|
let a = 0;
|
|
2244
2244
|
if (e.length === 0) {
|
|
2245
2245
|
for (; a < s; a++)
|
|
@@ -2253,7 +2253,7 @@ function C1(r, t, e, n, s) {
|
|
|
2253
2253
|
t[a] = r[a] + (t[a - s] + e[a] >> 1) & 255;
|
|
2254
2254
|
}
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function j1(r, t, e, n, s) {
|
|
2257
2257
|
let a = 0;
|
|
2258
2258
|
if (e.length === 0) {
|
|
2259
2259
|
for (; a < s; a++)
|
|
@@ -2264,17 +2264,17 @@ function F1(r, t, e, n, s) {
|
|
|
2264
2264
|
for (; a < s; a++)
|
|
2265
2265
|
t[a] = r[a] + e[a] & 255;
|
|
2266
2266
|
for (; a < n; a++)
|
|
2267
|
-
t[a] = r[a] +
|
|
2267
|
+
t[a] = r[a] + O1(t[a - s], e[a], e[a - s]) & 255;
|
|
2268
2268
|
}
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function O1(r, t, e) {
|
|
2271
2271
|
const n = r + t - e, s = Math.abs(n - r), a = Math.abs(n - t), c = Math.abs(n - e);
|
|
2272
2272
|
return s <= a && s <= c ? r : a <= c ? t : e;
|
|
2273
2273
|
}
|
|
2274
|
-
function
|
|
2274
|
+
function B1(r) {
|
|
2275
2275
|
return (r & 255) << 8 | r >> 8 & 255;
|
|
2276
2276
|
}
|
|
2277
|
-
function
|
|
2277
|
+
function R1(r) {
|
|
2278
2278
|
if (r !== 1 && r !== 2 && r !== 4 && r !== 8 && r !== 16)
|
|
2279
2279
|
throw new Error(`invalid bit depth: ${r}`);
|
|
2280
2280
|
return r;
|
|
@@ -2283,8 +2283,8 @@ var Il;
|
|
|
2283
2283
|
(function(r) {
|
|
2284
2284
|
r[r.UNKNOWN = 0] = "UNKNOWN", r[r.METRE = 1] = "METRE";
|
|
2285
2285
|
})(Il || (Il = {}));
|
|
2286
|
-
function
|
|
2287
|
-
return new
|
|
2286
|
+
function T1(r, t) {
|
|
2287
|
+
return new M1(r, t).decode();
|
|
2288
2288
|
}
|
|
2289
2289
|
var Xt = /* @__PURE__ */ (function() {
|
|
2290
2290
|
return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this;
|
|
@@ -2399,35 +2399,35 @@ function vr(r, t, e, n, s, a, c) {
|
|
|
2399
2399
|
}
|
|
2400
2400
|
function Ef(r) {
|
|
2401
2401
|
var t, e = r.length, n = [1732584193, -271733879, -1732584194, 271733878];
|
|
2402
|
-
for (t = 64; t <= r.length; t += 64) Oo(n,
|
|
2402
|
+
for (t = 64; t <= r.length; t += 64) Oo(n, D1(r.substring(t - 64, t)));
|
|
2403
2403
|
r = r.substring(t - 64);
|
|
2404
2404
|
var s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
2405
2405
|
for (t = 0; t < r.length; t++) s[t >> 2] |= r.charCodeAt(t) << (t % 4 << 3);
|
|
2406
2406
|
if (s[t >> 2] |= 128 << (t % 4 << 3), t > 55) for (Oo(n, s), t = 0; t < 16; t++) s[t] = 0;
|
|
2407
2407
|
return s[14] = 8 * e, Oo(n, s), n;
|
|
2408
2408
|
}
|
|
2409
|
-
function
|
|
2409
|
+
function D1(r) {
|
|
2410
2410
|
var t, e = [];
|
|
2411
2411
|
for (t = 0; t < 64; t += 4) e[t >> 2] = r.charCodeAt(t) + (r.charCodeAt(t + 1) << 8) + (r.charCodeAt(t + 2) << 16) + (r.charCodeAt(t + 3) << 24);
|
|
2412
2412
|
return e;
|
|
2413
2413
|
}
|
|
2414
2414
|
var Fl = "0123456789abcdef".split("");
|
|
2415
|
-
function
|
|
2415
|
+
function q1(r) {
|
|
2416
2416
|
for (var t = "", e = 0; e < 4; e++) t += Fl[r >> 8 * e + 4 & 15] + Fl[r >> 8 * e & 15];
|
|
2417
2417
|
return t;
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function U1(r) {
|
|
2420
2420
|
return String.fromCharCode(255 & r, (65280 & r) >> 8, (16711680 & r) >> 16, (4278190080 & r) >> 24);
|
|
2421
2421
|
}
|
|
2422
2422
|
function Xo(r) {
|
|
2423
|
-
return Ef(r).map(
|
|
2423
|
+
return Ef(r).map(U1).join("");
|
|
2424
2424
|
}
|
|
2425
|
-
var
|
|
2426
|
-
for (var t = 0; t < r.length; t++) r[t] =
|
|
2425
|
+
var z1 = (function(r) {
|
|
2426
|
+
for (var t = 0; t < r.length; t++) r[t] = q1(r[t]);
|
|
2427
2427
|
return r.join("");
|
|
2428
2428
|
})(Ef("hello")) != "5d41402abc4b2a76b9719d911017c592";
|
|
2429
2429
|
function Kn(r, t) {
|
|
2430
|
-
if (
|
|
2430
|
+
if (z1) {
|
|
2431
2431
|
var e = (65535 & r) + (65535 & t);
|
|
2432
2432
|
return (r >> 16) + (t >> 16) + (e >> 16) << 16 | 65535 & e;
|
|
2433
2433
|
}
|
|
@@ -3796,28 +3796,28 @@ var Sr = function(r, t) {
|
|
|
3796
3796
|
}, dn = function(r) {
|
|
3797
3797
|
var t = new jf(), e = It.internal.getHeight(r) || 0, n = It.internal.getWidth(r) || 0;
|
|
3798
3798
|
return t.BBox = [0, 0, Number($t(n)), Number($t(e))], t;
|
|
3799
|
-
},
|
|
3799
|
+
}, H1 = Ue.__acroform__.setBit = function(r, t) {
|
|
3800
3800
|
if (r = r || 0, t = t || 0, isNaN(r) || isNaN(t)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");
|
|
3801
3801
|
return r | 1 << t;
|
|
3802
|
-
},
|
|
3802
|
+
}, W1 = Ue.__acroform__.clearBit = function(r, t) {
|
|
3803
3803
|
if (r = r || 0, t = t || 0, isNaN(r) || isNaN(t)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");
|
|
3804
3804
|
return r & ~(1 << t);
|
|
3805
|
-
},
|
|
3805
|
+
}, G1 = Ue.__acroform__.getBit = function(r, t) {
|
|
3806
3806
|
if (isNaN(r) || isNaN(t)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");
|
|
3807
3807
|
return r & 1 << t ? 1 : 0;
|
|
3808
3808
|
}, Ve = Ue.__acroform__.getBitForPdf = function(r, t) {
|
|
3809
3809
|
if (isNaN(r) || isNaN(t)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");
|
|
3810
|
-
return
|
|
3810
|
+
return G1(r, t - 1);
|
|
3811
3811
|
}, Ye = Ue.__acroform__.setBitForPdf = function(r, t) {
|
|
3812
3812
|
if (isNaN(r) || isNaN(t)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");
|
|
3813
|
-
return
|
|
3813
|
+
return H1(r, t - 1);
|
|
3814
3814
|
}, Je = Ue.__acroform__.clearBitForPdf = function(r, t) {
|
|
3815
3815
|
if (isNaN(r) || isNaN(t)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");
|
|
3816
|
-
return
|
|
3817
|
-
},
|
|
3816
|
+
return W1(r, t - 1);
|
|
3817
|
+
}, V1 = Ue.__acroform__.calculateCoordinates = function(r, t) {
|
|
3818
3818
|
var e = t.internal.getHorizontalCoordinate, n = t.internal.getVerticalCoordinate, s = r[0], a = r[1], c = r[2], u = r[3], f = {};
|
|
3819
3819
|
return f.lowerLeft_X = e(s) || 0, f.lowerLeft_Y = n(a + u) || 0, f.upperRight_X = e(s + c) || 0, f.upperRight_Y = n(a) || 0, [Number($t(f.lowerLeft_X)), Number($t(f.lowerLeft_Y)), Number($t(f.upperRight_X)), Number($t(f.upperRight_Y))];
|
|
3820
|
-
},
|
|
3820
|
+
}, Y1 = function(r) {
|
|
3821
3821
|
if (r.appearanceStreamContent) return r.appearanceStreamContent;
|
|
3822
3822
|
if (r.V || r.DV) {
|
|
3823
3823
|
var t = [], e = r._V || r.DV, n = $o(r, e), s = r.scope.internal.getFont(r.fontName, r.fontStyle).id;
|
|
@@ -3910,14 +3910,14 @@ var Sr = function(r, t) {
|
|
|
3910
3910
|
}, As = function(r, t, e) {
|
|
3911
3911
|
var n = t.scope.internal.getFont(t.fontName, t.fontStyle), s = t.scope.getStringUnitWidth(r, { font: n, fontSize: parseFloat(e), charSpace: 0 }) * parseFloat(e);
|
|
3912
3912
|
return { height: t.scope.getStringUnitWidth("3", { font: n, fontSize: parseFloat(e), charSpace: 0 }) * parseFloat(e) * 1.5, width: s };
|
|
3913
|
-
},
|
|
3913
|
+
}, J1 = { fields: [], xForms: [], acroFormDictionaryRoot: null, printedOut: !1, internal: null, isInitialized: !1 }, X1 = function(r, t) {
|
|
3914
3914
|
var e = { type: "reference", object: r };
|
|
3915
3915
|
t.internal.getPageInfo(r.page).pageContext.annotations.find(function(n) {
|
|
3916
3916
|
return n.type === e.type && n.object === e.object;
|
|
3917
3917
|
}) === void 0 && t.internal.getPageInfo(r.page).pageContext.annotations.push(e);
|
|
3918
|
-
},
|
|
3918
|
+
}, K1 = function(r, t) {
|
|
3919
3919
|
if (t.scope = r, r.internal !== void 0 && (r.internal.acroformPlugin === void 0 || r.internal.acroformPlugin.isInitialized === !1)) {
|
|
3920
|
-
if (Qr.FieldNum = 0, r.internal.acroformPlugin = JSON.parse(JSON.stringify(
|
|
3920
|
+
if (Qr.FieldNum = 0, r.internal.acroformPlugin = JSON.parse(JSON.stringify(J1)), r.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error("Exception while creating AcroformDictionary");
|
|
3921
3921
|
nu = r.internal.scaleFactor, r.internal.acroformPlugin.acroFormDictionaryRoot = new Of(), r.internal.acroformPlugin.acroFormDictionaryRoot.scope = r, r.internal.acroformPlugin.acroFormDictionaryRoot._eventID = r.internal.events.subscribe("postPutResources", function() {
|
|
3922
3922
|
(function(e) {
|
|
3923
3923
|
e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID), delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID, e.internal.acroformPlugin.printedOut = !0;
|
|
@@ -3928,7 +3928,7 @@ var Sr = function(r, t) {
|
|
|
3928
3928
|
var n = e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;
|
|
3929
3929
|
for (var s in n) if (n.hasOwnProperty(s)) {
|
|
3930
3930
|
var a = n[s];
|
|
3931
|
-
a.objId = void 0, a.hasAnnotation &&
|
|
3931
|
+
a.objId = void 0, a.hasAnnotation && X1(a, e);
|
|
3932
3932
|
}
|
|
3933
3933
|
})(r);
|
|
3934
3934
|
}), r.internal.events.subscribe("putCatalog", function() {
|
|
@@ -3941,8 +3941,8 @@ var Sr = function(r, t) {
|
|
|
3941
3941
|
var a = !n;
|
|
3942
3942
|
for (var c in n || (s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId, !0), s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()), n = n || s.internal.acroformPlugin.acroFormDictionaryRoot.Kids) if (n.hasOwnProperty(c)) {
|
|
3943
3943
|
var u = n[c], f = [], d = u.Rect;
|
|
3944
|
-
if (u.Rect && (u.Rect =
|
|
3945
|
-
var g =
|
|
3944
|
+
if (u.Rect && (u.Rect = V1(u.Rect, s)), s.internal.newObjectDeferredBegin(u.objId, !0), u.DA = It.createDefaultAppearanceStream(u), xe(u) === "object" && typeof u.getKeyValueListForStream == "function" && (f = u.getKeyValueListForStream()), u.Rect = d, u.hasAppearanceStream && !u.appearanceStreamContent) {
|
|
3945
|
+
var g = Y1(u);
|
|
3946
3946
|
f.push({ key: "AP", value: "<</N " + g + ">>" }), s.internal.acroformPlugin.xForms.push(g);
|
|
3947
3947
|
}
|
|
3948
3948
|
if (u.appearanceStreamContent) {
|
|
@@ -4427,7 +4427,7 @@ Sr(Os, Qr), aa.prototype.setAppearance = function(r) {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
}, aa.prototype.createOption = function(r) {
|
|
4429
4429
|
var t = new Os();
|
|
4430
|
-
return t.Parent = this, t.optionName = r, this.Kids.push(t),
|
|
4430
|
+
return t.Parent = this, t.optionName = r, this.Kids.push(t), $1.call(this.scope, t), t;
|
|
4431
4431
|
};
|
|
4432
4432
|
var Ps = function() {
|
|
4433
4433
|
nr.call(this), this.fontName = "zapfdingbats", this.caption = "3", this.appearanceState = "On", this.value = "On", this.textAlign = "center", this.appearanceStreamContent = It.CheckBox.createAppearanceStream();
|
|
@@ -4567,8 +4567,8 @@ It.internal = { Bezier_C: 0.551915024494, calculateCross: function(r) {
|
|
|
4567
4567
|
var t = 0;
|
|
4568
4568
|
return xe(r) === "object" && (t = Bl(r.Rect[3])), t;
|
|
4569
4569
|
};
|
|
4570
|
-
var
|
|
4571
|
-
if (
|
|
4570
|
+
var $1 = Ue.addField = function(r) {
|
|
4571
|
+
if (K1(this, r), !(r instanceof Qr)) throw new Error("Invalid argument passed to jsPDF.addField.");
|
|
4572
4572
|
var t;
|
|
4573
4573
|
return (t = r).scope.internal.acroformPlugin.printedOut && (t.scope.internal.acroformPlugin.printedOut = !1, t.scope.internal.acroformPlugin.acroFormDictionaryRoot = null), t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t), r.page = r.scope.internal.getCurrentPageInfo().pageNumber, this;
|
|
4574
4574
|
};
|
|
@@ -5111,7 +5111,7 @@ function Bf(r) {
|
|
|
5111
5111
|
N.length > 0 && this.setTableHeaderRow(N), this.setFont(void 0, "normal"), e = !1;
|
|
5112
5112
|
};
|
|
5113
5113
|
})(Rt.API);
|
|
5114
|
-
var Rf = { italic: ["italic", "oblique", "normal"], oblique: ["oblique", "italic", "normal"], normal: ["normal", "oblique", "italic"] }, Tf = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"], Zo = Bf(Tf), Df = [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
5114
|
+
var Rf = { italic: ["italic", "oblique", "normal"], oblique: ["oblique", "italic", "normal"], normal: ["normal", "oblique", "italic"] }, Tf = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"], Zo = Bf(Tf), Df = [100, 200, 300, 400, 500, 600, 700, 800, 900], Z1 = Bf(Df);
|
|
5115
5115
|
function Ro(r) {
|
|
5116
5116
|
var t = r.family.replace(/"|'/g, "").toLowerCase(), e = (function(a) {
|
|
5117
5117
|
return Rf[a = a || "normal"] ? a : "normal";
|
|
@@ -5127,21 +5127,21 @@ function Rl(r, t, e, n) {
|
|
|
5127
5127
|
for (s = e; s >= 0 && s < t.length; s += n) if (r[t[s]]) return r[t[s]];
|
|
5128
5128
|
for (s = e; s >= 0 && s < t.length; s -= n) if (r[t[s]]) return r[t[s]];
|
|
5129
5129
|
}
|
|
5130
|
-
var
|
|
5130
|
+
var Q1 = { "sans-serif": "helvetica", fixed: "courier", monospace: "courier", terminal: "courier", cursive: "times", fantasy: "times", serif: "times" }, Tl = { caption: "times", icon: "times", menu: "times", "message-box": "times", "small-caption": "times", "status-bar": "times" };
|
|
5131
5131
|
function Dl(r) {
|
|
5132
5132
|
return [r.stretch, r.style, r.weight, r.family].join(" ");
|
|
5133
5133
|
}
|
|
5134
5134
|
function ql(r) {
|
|
5135
5135
|
return r.trimLeft();
|
|
5136
5136
|
}
|
|
5137
|
-
function
|
|
5137
|
+
function t2(r, t) {
|
|
5138
5138
|
for (var e = 0; e < r.length; ) {
|
|
5139
5139
|
if (r.charAt(e) === t) return [r.substring(0, e), r.substring(e + 1)];
|
|
5140
5140
|
e += 1;
|
|
5141
5141
|
}
|
|
5142
5142
|
return null;
|
|
5143
5143
|
}
|
|
5144
|
-
function
|
|
5144
|
+
function e2(r) {
|
|
5145
5145
|
var t = r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);
|
|
5146
5146
|
return t === null ? null : [t[0], r.substring(t[0].length)];
|
|
5147
5147
|
}
|
|
@@ -5159,12 +5159,12 @@ function Wl(r, t, e, n, s) {
|
|
|
5159
5159
|
a = 9, c = Jl;
|
|
5160
5160
|
}
|
|
5161
5161
|
r = (function(f, d, g, x) {
|
|
5162
|
-
for (var N, p = f.length / d, j = new Uint8Array(f.length + p), P = [
|
|
5162
|
+
for (var N, p = f.length / d, j = new Uint8Array(f.length + p), P = [r2, Gl, Vl, Yl, Jl], B = 0; B < p; B += 1) {
|
|
5163
5163
|
var k = B * d, G = f.subarray(k, k + d);
|
|
5164
5164
|
if (x) j.set(x(G, g, N), k + B);
|
|
5165
5165
|
else {
|
|
5166
5166
|
for (var Y = P.length, q = [], it = 0; it < Y; it += 1) q[it] = P[it](G, g, N);
|
|
5167
|
-
var mt =
|
|
5167
|
+
var mt = i2(q.concat());
|
|
5168
5168
|
j.set(q[mt], k + B);
|
|
5169
5169
|
}
|
|
5170
5170
|
N = G;
|
|
@@ -5174,7 +5174,7 @@ function Wl(r, t, e, n, s) {
|
|
|
5174
5174
|
var u = Go(r, { level: a });
|
|
5175
5175
|
return Rt.API.__addimage__.arrayBufferToBinaryString(u);
|
|
5176
5176
|
}
|
|
5177
|
-
function
|
|
5177
|
+
function r2(r) {
|
|
5178
5178
|
var t = Array.apply([], r);
|
|
5179
5179
|
return t.unshift(0), t;
|
|
5180
5180
|
}
|
|
@@ -5209,17 +5209,17 @@ function Jl(r, t, e) {
|
|
|
5209
5209
|
var n = r.length, s = [];
|
|
5210
5210
|
s[0] = 4;
|
|
5211
5211
|
for (var a = 0; a < n; a += 1) {
|
|
5212
|
-
var c =
|
|
5212
|
+
var c = n2(r[a - t] || 0, e && e[a] || 0, e && e[a - t] || 0);
|
|
5213
5213
|
s[a + 1] = r[a] - c + 256 & 255;
|
|
5214
5214
|
}
|
|
5215
5215
|
return s;
|
|
5216
5216
|
}
|
|
5217
|
-
function
|
|
5217
|
+
function n2(r, t, e) {
|
|
5218
5218
|
if (r === t && t === e) return r;
|
|
5219
5219
|
var n = Math.abs(t - e), s = Math.abs(r - e), a = Math.abs(r + t - e - e);
|
|
5220
5220
|
return n <= s && n <= a ? r : s <= a ? t : e;
|
|
5221
5221
|
}
|
|
5222
|
-
function
|
|
5222
|
+
function i2(r) {
|
|
5223
5223
|
var t = r.map(function(e) {
|
|
5224
5224
|
return e.reduce(function(n, s) {
|
|
5225
5225
|
return n + Math.abs(s);
|
|
@@ -5244,7 +5244,7 @@ function Xl(r, t, e, n) {
|
|
|
5244
5244
|
function qf(r, t) {
|
|
5245
5245
|
return t + 1 < r.byteLength ? r.getUint16(t, !1) : r.getUint8(t) << 8;
|
|
5246
5246
|
}
|
|
5247
|
-
function
|
|
5247
|
+
function a2(r) {
|
|
5248
5248
|
var t = 0;
|
|
5249
5249
|
if (r[t++] !== 71 || r[t++] !== 73 || r[t++] !== 70 || r[t++] !== 56 || (r[t++] + 1 & 253) != 56 || r[t++] !== 97) throw new Error("Invalid GIF 87a/89a header.");
|
|
5250
5250
|
var e = r[t++] | r[t++] << 8, n = r[t++] | r[t++] << 8, s = r[t++], a = s >> 7, c = 1 << 1 + (7 & s);
|
|
@@ -7335,11 +7335,11 @@ function $l(r) {
|
|
|
7335
7335
|
for (var K = 0; K < j[0] * p[0] * 4; K++) P[K] = dt[K];
|
|
7336
7336
|
return this.width = j, this.height = p, this.data = P, this;
|
|
7337
7337
|
}
|
|
7338
|
-
function
|
|
7338
|
+
function s2() {
|
|
7339
7339
|
var r, t = this.internal.__metadata__.metadata, e = unescape(encodeURIComponent(t));
|
|
7340
7340
|
r = this.internal.__metadata__.rawXml ? e : '<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="' + this.internal.__metadata__.namespaceUri + '"><jspdf:metadata>' + e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") + "</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>", this.internal.__metadata__.metadataObjectNumber = this.internal.newObject(), this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + r.length + " >>"), this.internal.write("stream"), this.internal.write(r), this.internal.write("endstream"), this.internal.write("endobj");
|
|
7341
7341
|
}
|
|
7342
|
-
function
|
|
7342
|
+
function o2() {
|
|
7343
7343
|
this.internal.__metadata__.metadataObjectNumber && this.internal.write("/Metadata " + this.internal.__metadata__.metadataObjectNumber + " 0 R");
|
|
7344
7344
|
}
|
|
7345
7345
|
(function(r) {
|
|
@@ -7476,10 +7476,10 @@ function s2() {
|
|
|
7476
7476
|
switch (ge = null, ze = (oe = ql(oe)).charAt(0)) {
|
|
7477
7477
|
case '"':
|
|
7478
7478
|
case "'":
|
|
7479
|
-
ge =
|
|
7479
|
+
ge = t2(oe.substring(1), ze);
|
|
7480
7480
|
break;
|
|
7481
7481
|
default:
|
|
7482
|
-
ge =
|
|
7482
|
+
ge = e2(oe);
|
|
7483
7483
|
}
|
|
7484
7484
|
if (ge === null || (se.push(ge[0]), (oe = ql(ge[1])) !== "" && oe.charAt(0) !== ",")) return To;
|
|
7485
7485
|
oe = oe.replace(/^,/, "");
|
|
@@ -7525,7 +7525,7 @@ function s2() {
|
|
|
7525
7525
|
})(this.pdf, this.fontFaces), ve = zt.map(function(Tt) {
|
|
7526
7526
|
return { family: Tt, stretch: "normal", weight: Ht, style: ae };
|
|
7527
7527
|
}), le = (function(Tt, ze, ge) {
|
|
7528
|
-
for (var se = (ge = ge || {}).defaultFontFamily || "times", oe = Object.assign({},
|
|
7528
|
+
for (var se = (ge = ge || {}).defaultFontFamily || "times", oe = Object.assign({}, Q1, ge.genericFontFamilies || {}), Fe = null, Ut = null, Se = 0; Se < ze.length; ++Se) if (oe[(Fe = Ro(ze[Se])).family] && (Fe.family = oe[Fe.family]), Tt.hasOwnProperty(Fe.family)) {
|
|
7529
7529
|
Ut = Tt[Fe.family];
|
|
7530
7530
|
break;
|
|
7531
7531
|
}
|
|
@@ -7543,7 +7543,7 @@ function s2() {
|
|
|
7543
7543
|
if (Qt[Yt]) return Qt[Yt];
|
|
7544
7544
|
if (Yt === 400 && Qt[500]) return Qt[500];
|
|
7545
7545
|
if (Yt === 500 && Qt[400]) return Qt[400];
|
|
7546
|
-
var je =
|
|
7546
|
+
var je = Z1[Yt], ue = Rl(Qt, Df, je, Yt < 400 ? -1 : 1);
|
|
7547
7547
|
if (!ue) throw new Error("Could not find a matching font-weight for value " + Yt);
|
|
7548
7548
|
return ue;
|
|
7549
7549
|
})(Fe.weight, Ut))) throw new Error("Failed to resolve a font for the rule '" + Dl(Fe) + "'.");
|
|
@@ -8509,7 +8509,7 @@ endobj\r
|
|
|
8509
8509
|
};
|
|
8510
8510
|
})(Rt.API), Rt.API.processPNG = function(r, t, e, n) {
|
|
8511
8511
|
if (this.__addimage__.isArrayBuffer(r) && (r = new Uint8Array(r)), this.__addimage__.isArrayBufferView(r)) {
|
|
8512
|
-
var s, a =
|
|
8512
|
+
var s, a = T1(r, { checkCrc: !0 }), c = a.width, u = a.height, f = a.channels, d = a.palette, g = a.depth;
|
|
8513
8513
|
s = d && f === 1 ? (function(K) {
|
|
8514
8514
|
for (var R = K.width, tt = K.height, _ = K.data, F = K.palette, z = K.depth, U = !1, nt = [], ot = [], ft = void 0, rt = !1, ht = 0, Nt = 0; Nt < F.length; Nt++) {
|
|
8515
8515
|
var wt = Ju(F[Nt], 4), A = wt[0], O = wt[1], T = wt[2], H = wt[3];
|
|
@@ -8560,7 +8560,7 @@ endobj\r
|
|
|
8560
8560
|
}
|
|
8561
8561
|
}, (function(r) {
|
|
8562
8562
|
r.processGIF89A = function(t, e, n, s) {
|
|
8563
|
-
var a = new
|
|
8563
|
+
var a = new a2(t), c = a.width, u = a.height, f = [];
|
|
8564
8564
|
a.decodeAndBlitFrameRGBA(0, f);
|
|
8565
8565
|
var d = { data: f, width: c, height: u }, g = new qo(100).encode(d, 100);
|
|
8566
8566
|
return r.processJPEG.call(this, g, e, n, s);
|
|
@@ -8800,7 +8800,7 @@ endobj\r
|
|
|
8800
8800
|
var d = f.getContext("2d");
|
|
8801
8801
|
d.fillStyle = "#fff", d.fillRect(0, 0, f.width, f.height);
|
|
8802
8802
|
var g = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, x = this;
|
|
8803
|
-
return (Xt.canvg ? Promise.resolve(Xt.canvg) : import("./index.es-
|
|
8803
|
+
return (Xt.canvg ? Promise.resolve(Xt.canvg) : import("./index.es-B26OpeE5.js")).catch(function(N) {
|
|
8804
8804
|
return Promise.reject(new Error("Could not load canvg: " + N));
|
|
8805
8805
|
}).then(function(N) {
|
|
8806
8806
|
return N.default ? N.default : N;
|
|
@@ -8857,7 +8857,7 @@ endobj\r
|
|
|
8857
8857
|
>>`);
|
|
8858
8858
|
}), this.internal.viewerpreferences.isSubscribed = !0), this.internal.viewerpreferences.configuration = e, this;
|
|
8859
8859
|
}, Rt.API.addMetadata = function(r, t) {
|
|
8860
|
-
return this.internal.__metadata__ === void 0 && (this.internal.__metadata__ = { metadata: r, namespaceUri: t ?? "http://jspdf.default.namespaceuri/", rawXml: typeof t == "boolean" && t }, this.internal.events.subscribe("putCatalog",
|
|
8860
|
+
return this.internal.__metadata__ === void 0 && (this.internal.__metadata__ = { metadata: r, namespaceUri: t ?? "http://jspdf.default.namespaceuri/", rawXml: typeof t == "boolean" && t }, this.internal.events.subscribe("putCatalog", o2), this.internal.events.subscribe("postPutResources", s2)), this;
|
|
8861
8861
|
}, (function(r) {
|
|
8862
8862
|
var t = r.API, e = t.pdfEscape16 = function(a, c) {
|
|
8863
8863
|
for (var u, f = c.metadata.Unicode.widths, d = ["", "0", "00", "000", "0000"], g = [""], x = 0, N = a.length; x < N; ++x) {
|
|
@@ -9123,12 +9123,12 @@ end`;
|
|
|
9123
9123
|
function r(t) {
|
|
9124
9124
|
var e;
|
|
9125
9125
|
if (this.rawData = t, e = this.contents = new $n(t), this.contents.pos = 4, e.readString(4) === "ttcf") throw new Error("TTCF not supported.");
|
|
9126
|
-
e.pos = 0, this.parse(), this.subset = new
|
|
9126
|
+
e.pos = 0, this.parse(), this.subset = new A2(this), this.registerTTF();
|
|
9127
9127
|
}
|
|
9128
9128
|
return r.open = function(t) {
|
|
9129
9129
|
return new r(t);
|
|
9130
9130
|
}, r.prototype.parse = function() {
|
|
9131
|
-
return this.directory = new
|
|
9131
|
+
return this.directory = new u2(this.contents), this.head = new f2(this), this.name = new g2(this), this.cmap = new Uf(this), this.toUnicode = {}, this.hhea = new c2(this), this.maxp = new m2(this), this.hmtx = new v2(this), this.post = new d2(this), this.os2 = new h2(this), this.loca = new x2(this), this.glyf = new b2(this), this.ascender = this.os2.exists && this.os2.ascender || this.hhea.ascender, this.decender = this.os2.exists && this.os2.decender || this.hhea.decender, this.lineGap = this.os2.exists && this.os2.lineGap || this.hhea.lineGap, this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax];
|
|
9132
9132
|
}, r.prototype.registerTTF = function() {
|
|
9133
9133
|
var t, e, n, s, a;
|
|
9134
9134
|
if (this.scaleFactor = 1e3 / this.head.unitsPerEm, this.bbox = (function() {
|
|
@@ -9208,7 +9208,7 @@ var tn, $n = (function() {
|
|
|
9208
9208
|
for (a = [], n = 0, s = t.length; n < s; n++) e = t[n], a.push(this.writeByte(e));
|
|
9209
9209
|
return a;
|
|
9210
9210
|
}, r;
|
|
9211
|
-
})(),
|
|
9211
|
+
})(), u2 = (function() {
|
|
9212
9212
|
var r;
|
|
9213
9213
|
function t(e) {
|
|
9214
9214
|
var n, s, a;
|
|
@@ -9224,8 +9224,8 @@ var tn, $n = (function() {
|
|
|
9224
9224
|
for (a = new $n(e), s = 0, n = 0, c = e.length; n < c; n = n += 4) s += a.readUInt32();
|
|
9225
9225
|
return 4294967295 & s;
|
|
9226
9226
|
}, t;
|
|
9227
|
-
})(),
|
|
9228
|
-
for (var e in t)
|
|
9227
|
+
})(), l2 = {}.hasOwnProperty, mn = function(r, t) {
|
|
9228
|
+
for (var e in t) l2.call(t, e) && (r[e] = t[e]);
|
|
9229
9229
|
function n() {
|
|
9230
9230
|
this.constructor = r;
|
|
9231
9231
|
}
|
|
@@ -9242,7 +9242,7 @@ tn = (function() {
|
|
|
9242
9242
|
return this.exists ? (this.file.contents.pos = this.offset, this.file.contents.read(this.length)) : null;
|
|
9243
9243
|
}, r;
|
|
9244
9244
|
})();
|
|
9245
|
-
var
|
|
9245
|
+
var f2 = (function() {
|
|
9246
9246
|
function r() {
|
|
9247
9247
|
return r.__super__.constructor.apply(this, arguments);
|
|
9248
9248
|
}
|
|
@@ -9326,14 +9326,14 @@ var l2 = (function() {
|
|
|
9326
9326
|
var n, s;
|
|
9327
9327
|
return e == null && (e = "macroman"), n = Zl.encode(t, e), (s = new $n()).writeUInt16(0), s.writeUInt16(1), n.table = s.data.concat(n.subtable), n;
|
|
9328
9328
|
}, r;
|
|
9329
|
-
})(),
|
|
9329
|
+
})(), c2 = (function() {
|
|
9330
9330
|
function r() {
|
|
9331
9331
|
return r.__super__.constructor.apply(this, arguments);
|
|
9332
9332
|
}
|
|
9333
9333
|
return mn(r, tn), r.prototype.tag = "hhea", r.prototype.parse = function(t) {
|
|
9334
9334
|
return t.pos = this.offset, this.version = t.readInt(), this.ascender = t.readShort(), this.decender = t.readShort(), this.lineGap = t.readShort(), this.advanceWidthMax = t.readShort(), this.minLeftSideBearing = t.readShort(), this.minRightSideBearing = t.readShort(), this.xMaxExtent = t.readShort(), this.caretSlopeRise = t.readShort(), this.caretSlopeRun = t.readShort(), this.caretOffset = t.readShort(), t.pos += 8, this.metricDataFormat = t.readShort(), this.numberOfMetrics = t.readUInt16();
|
|
9335
9335
|
}, r;
|
|
9336
|
-
})(),
|
|
9336
|
+
})(), h2 = (function() {
|
|
9337
9337
|
function r() {
|
|
9338
9338
|
return r.__super__.constructor.apply(this, arguments);
|
|
9339
9339
|
}
|
|
@@ -9352,7 +9352,7 @@ var l2 = (function() {
|
|
|
9352
9352
|
return n;
|
|
9353
9353
|
})(), this.version > 1)) return this.xHeight = t.readShort(), this.capHeight = t.readShort(), this.defaultChar = t.readShort(), this.breakChar = t.readShort(), this.maxContext = t.readShort();
|
|
9354
9354
|
}, r;
|
|
9355
|
-
})(),
|
|
9355
|
+
})(), d2 = (function() {
|
|
9356
9356
|
function r() {
|
|
9357
9357
|
return r.__super__.constructor.apply(this, arguments);
|
|
9358
9358
|
}
|
|
@@ -9377,16 +9377,16 @@ var l2 = (function() {
|
|
|
9377
9377
|
}).call(this);
|
|
9378
9378
|
}
|
|
9379
9379
|
}, r;
|
|
9380
|
-
})(),
|
|
9380
|
+
})(), p2 = function(r, t) {
|
|
9381
9381
|
this.raw = r, this.length = r.length, this.platformID = t.platformID, this.encodingID = t.encodingID, this.languageID = t.languageID;
|
|
9382
|
-
},
|
|
9382
|
+
}, g2 = (function() {
|
|
9383
9383
|
function r() {
|
|
9384
9384
|
return r.__super__.constructor.apply(this, arguments);
|
|
9385
9385
|
}
|
|
9386
9386
|
return mn(r, tn), r.prototype.tag = "name", r.prototype.parse = function(t) {
|
|
9387
9387
|
var e, n, s, a, c, u, f, d, g, x, N;
|
|
9388
9388
|
for (t.pos = this.offset, t.readShort(), e = t.readShort(), u = t.readShort(), n = [], a = 0; 0 <= e ? a < e : a > e; a = 0 <= e ? ++a : --a) n.push({ platformID: t.readShort(), encodingID: t.readShort(), languageID: t.readShort(), nameID: t.readShort(), length: t.readShort(), offset: this.offset + u + t.readShort() });
|
|
9389
|
-
for (f = {}, a = g = 0, x = n.length; g < x; a = ++g) s = n[a], t.pos = s.offset, d = t.readString(s.length), c = new
|
|
9389
|
+
for (f = {}, a = g = 0, x = n.length; g < x; a = ++g) s = n[a], t.pos = s.offset, d = t.readString(s.length), c = new p2(d, s), f[N = s.nameID] == null && (f[N] = []), f[s.nameID].push(c);
|
|
9390
9390
|
this.strings = f, this.copyright = f[0], this.fontFamily = f[1], this.fontSubfamily = f[2], this.uniqueSubfamily = f[3], this.fontName = f[4], this.version = f[5];
|
|
9391
9391
|
try {
|
|
9392
9392
|
this.postscriptName = f[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
|
|
@@ -9395,14 +9395,14 @@ var l2 = (function() {
|
|
|
9395
9395
|
}
|
|
9396
9396
|
return this.trademark = f[7], this.manufacturer = f[8], this.designer = f[9], this.description = f[10], this.vendorUrl = f[11], this.designerUrl = f[12], this.license = f[13], this.licenseUrl = f[14], this.preferredFamily = f[15], this.preferredSubfamily = f[17], this.compatibleFull = f[18], this.sampleText = f[19];
|
|
9397
9397
|
}, r;
|
|
9398
|
-
})(),
|
|
9398
|
+
})(), m2 = (function() {
|
|
9399
9399
|
function r() {
|
|
9400
9400
|
return r.__super__.constructor.apply(this, arguments);
|
|
9401
9401
|
}
|
|
9402
9402
|
return mn(r, tn), r.prototype.tag = "maxp", r.prototype.parse = function(t) {
|
|
9403
9403
|
return t.pos = this.offset, this.version = t.readInt(), this.numGlyphs = t.readUInt16(), this.maxPoints = t.readUInt16(), this.maxContours = t.readUInt16(), this.maxCompositePoints = t.readUInt16(), this.maxComponentContours = t.readUInt16(), this.maxZones = t.readUInt16(), this.maxTwilightPoints = t.readUInt16(), this.maxStorage = t.readUInt16(), this.maxFunctionDefs = t.readUInt16(), this.maxInstructionDefs = t.readUInt16(), this.maxStackElements = t.readUInt16(), this.maxSizeOfInstructions = t.readUInt16(), this.maxComponentElements = t.readUInt16(), this.maxComponentDepth = t.readUInt16();
|
|
9404
9404
|
}, r;
|
|
9405
|
-
})(),
|
|
9405
|
+
})(), v2 = (function() {
|
|
9406
9406
|
function r() {
|
|
9407
9407
|
return r.__super__.constructor.apply(this, arguments);
|
|
9408
9408
|
}
|
|
@@ -9422,7 +9422,7 @@ var l2 = (function() {
|
|
|
9422
9422
|
}, r.prototype.forGlyph = function(t) {
|
|
9423
9423
|
return t in this.metrics ? this.metrics[t] : { advance: this.metrics[this.metrics.length - 1].advance, lsb: this.leftSideBearings[t - this.metrics.length] };
|
|
9424
9424
|
}, r;
|
|
9425
|
-
})(), zf = [].slice,
|
|
9425
|
+
})(), zf = [].slice, b2 = (function() {
|
|
9426
9426
|
function r() {
|
|
9427
9427
|
return r.__super__.constructor.apply(this, arguments);
|
|
9428
9428
|
}
|
|
@@ -9430,20 +9430,20 @@ var l2 = (function() {
|
|
|
9430
9430
|
return this.cache = {};
|
|
9431
9431
|
}, r.prototype.glyphFor = function(t) {
|
|
9432
9432
|
var e, n, s, a, c, u, f, d, g, x;
|
|
9433
|
-
return t in this.cache ? this.cache[t] : (a = this.file.loca, e = this.file.contents, n = a.indexOf(t), (s = a.lengthOf(t)) === 0 ? this.cache[t] = null : (e.pos = this.offset + n, c = (u = new $n(e.read(s))).readShort(), d = u.readShort(), x = u.readShort(), f = u.readShort(), g = u.readShort(), this.cache[t] = c === -1 ? new
|
|
9433
|
+
return t in this.cache ? this.cache[t] : (a = this.file.loca, e = this.file.contents, n = a.indexOf(t), (s = a.lengthOf(t)) === 0 ? this.cache[t] = null : (e.pos = this.offset + n, c = (u = new $n(e.read(s))).readShort(), d = u.readShort(), x = u.readShort(), f = u.readShort(), g = u.readShort(), this.cache[t] = c === -1 ? new y2(u, d, x, f, g) : new w2(u, c, d, x, f, g), this.cache[t]));
|
|
9434
9434
|
}, r.prototype.encode = function(t, e, n) {
|
|
9435
9435
|
var s, a, c, u, f;
|
|
9436
9436
|
for (c = [], a = [], u = 0, f = e.length; u < f; u++) s = t[e[u]], a.push(c.length), s && (c = c.concat(s.encode(n)));
|
|
9437
9437
|
return a.push(c.length), { table: c, offsets: a };
|
|
9438
9438
|
}, r;
|
|
9439
|
-
})(),
|
|
9439
|
+
})(), w2 = (function() {
|
|
9440
9440
|
function r(t, e, n, s, a, c) {
|
|
9441
9441
|
this.raw = t, this.numberOfContours = e, this.xMin = n, this.yMin = s, this.xMax = a, this.yMax = c, this.compound = !1;
|
|
9442
9442
|
}
|
|
9443
9443
|
return r.prototype.encode = function() {
|
|
9444
9444
|
return this.raw.data;
|
|
9445
9445
|
}, r;
|
|
9446
|
-
})(),
|
|
9446
|
+
})(), y2 = (function() {
|
|
9447
9447
|
function r(t, e, n, s, a) {
|
|
9448
9448
|
var c, u;
|
|
9449
9449
|
for (this.raw = t, this.xMin = e, this.yMin = n, this.xMax = s, this.yMax = a, this.compound = !0, this.glyphIDs = [], this.glyphOffsets = [], c = this.raw; u = c.readShort(), this.glyphOffsets.push(c.pos), this.glyphIDs.push(c.readUInt16()), 32 & u; ) c.pos += 1 & u ? 4 : 2, 128 & u ? c.pos += 8 : 64 & u ? c.pos += 4 : 8 & u && (c.pos += 2);
|
|
@@ -9453,7 +9453,7 @@ var l2 = (function() {
|
|
|
9453
9453
|
for (e = new $n(zf.call(this.raw.data)), t = 0, n = this.glyphIDs.length; t < n; ++t) e.pos = this.glyphOffsets[t];
|
|
9454
9454
|
return e.data;
|
|
9455
9455
|
}, r;
|
|
9456
|
-
})(),
|
|
9456
|
+
})(), x2 = (function() {
|
|
9457
9457
|
function r() {
|
|
9458
9458
|
return r.__super__.constructor.apply(this, arguments);
|
|
9459
9459
|
}
|
|
@@ -9481,7 +9481,7 @@ var l2 = (function() {
|
|
|
9481
9481
|
for (var d = new Array(4 * n.length), g = 0; g < n.length; ++g) d[4 * g + 3] = 255 & n[g], d[4 * g + 2] = (65280 & n[g]) >> 8, d[4 * g + 1] = (16711680 & n[g]) >> 16, d[4 * g] = (4278190080 & n[g]) >> 24;
|
|
9482
9482
|
return d;
|
|
9483
9483
|
}, r;
|
|
9484
|
-
})(),
|
|
9484
|
+
})(), A2 = (function() {
|
|
9485
9485
|
function r(t) {
|
|
9486
9486
|
this.font = t, this.subset = {}, this.unicodes = {}, this.next = 33;
|
|
9487
9487
|
}
|
|
@@ -9536,7 +9536,7 @@ Rt.API.PDFObject = (function() {
|
|
|
9536
9536
|
return "" + e;
|
|
9537
9537
|
}, t;
|
|
9538
9538
|
})();
|
|
9539
|
-
const Hf = 25.4,
|
|
9539
|
+
const Hf = 25.4, N2 = Hf / 72, L2 = 203, _2 = 'Arial, "Microsoft YaHei", sans-serif', Uo = 2, Wf = 2, Ql = Wf * 10, S2 = 100, $i = /* @__PURE__ */ new Map();
|
|
9540
9540
|
function Gf(r) {
|
|
9541
9541
|
const t = $i.get(r);
|
|
9542
9542
|
if (t) return t;
|
|
@@ -9544,20 +9544,20 @@ function Gf(r) {
|
|
|
9544
9544
|
const a = new Image();
|
|
9545
9545
|
/^https?:/i.test(r) && (a.crossOrigin = "anonymous"), a.decoding = "async", a.onload = () => n(a), a.onerror = () => s(new Error("Failed to load the print image.")), a.src = r;
|
|
9546
9546
|
});
|
|
9547
|
-
for ($i.set(r, e); $i.size >
|
|
9547
|
+
for ($i.set(r, e); $i.size > S2; ) {
|
|
9548
9548
|
const n = $i.keys().next().value;
|
|
9549
9549
|
if (typeof n != "string") break;
|
|
9550
9550
|
$i.delete(n);
|
|
9551
9551
|
}
|
|
9552
9552
|
return e.catch(() => $i.delete(r)), e;
|
|
9553
9553
|
}
|
|
9554
|
-
function iu(r, t, e, n =
|
|
9554
|
+
function iu(r, t, e, n = _2) {
|
|
9555
9555
|
r.font = `${e} ${t}px ${n}`;
|
|
9556
9556
|
}
|
|
9557
9557
|
function Zn(r, t, e, n, s) {
|
|
9558
9558
|
r.save(), r.translate(e, n), r.rotate(t * Math.PI / 180), r.translate(-e, -n), s(), r.restore();
|
|
9559
9559
|
}
|
|
9560
|
-
function
|
|
9560
|
+
function k2(r, t) {
|
|
9561
9561
|
return "field" in r && r.field && t ? Bs(Rs(t, r.field)) : "content" in r ? r.content : "";
|
|
9562
9562
|
}
|
|
9563
9563
|
function au(r, t, e, n, s, a, c = "contain") {
|
|
@@ -9570,7 +9570,7 @@ function au(r, t, e, n, s, a, c = "contain") {
|
|
|
9570
9570
|
x
|
|
9571
9571
|
);
|
|
9572
9572
|
}
|
|
9573
|
-
function
|
|
9573
|
+
function P2(r, t, e, n, s) {
|
|
9574
9574
|
return r.type === "text" && r.field ? Bs(Rs(t.data, r.field)) : Ic(r, {
|
|
9575
9575
|
index: e,
|
|
9576
9576
|
total: n,
|
|
@@ -9580,10 +9580,10 @@ function k2(r, t, e, n, s) {
|
|
|
9580
9580
|
printTime: s
|
|
9581
9581
|
});
|
|
9582
9582
|
}
|
|
9583
|
-
function
|
|
9583
|
+
function M2(r, t, e, n, s) {
|
|
9584
9584
|
const a = e.split(/\r?\n/);
|
|
9585
9585
|
if (a.every((j) => !j.trim())) return;
|
|
9586
|
-
const c = t.fontSizePt *
|
|
9586
|
+
const c = t.fontSizePt * N2, u = c * 1.2, f = c + Math.max(0, a.length - 1) * u;
|
|
9587
9587
|
iu(r, c, t.fontWeight);
|
|
9588
9588
|
const d = a.map((j) => r.measureText(j || " ").width), g = Math.max(...d), x = t.canvasVerticalAlign === "top" ? 0 : t.canvasVerticalAlign === "center" ? (s - f) / 2 : t.canvasVerticalAlign === "bottom" ? s - f : t.yMm, N = t.canvasHorizontalAlign === "left" ? g / 2 : t.canvasHorizontalAlign === "center" ? n / 2 : t.canvasHorizontalAlign === "right" ? n - g / 2 : t.xMm + t.widthMm / 2, p = t.canvasVerticalAlign ? x + f / 2 : t.yMm + t.heightMm / 2;
|
|
9589
9589
|
Zn(
|
|
@@ -9605,9 +9605,9 @@ function P2(r, t, e, n, s) {
|
|
|
9605
9605
|
}
|
|
9606
9606
|
);
|
|
9607
9607
|
}
|
|
9608
|
-
function
|
|
9608
|
+
function I2(r, t, e) {
|
|
9609
9609
|
if (!e.trim()) return;
|
|
9610
|
-
const n =
|
|
9610
|
+
const n = Bc(t, e), s = t.xMm + t.widthMm / 2, a = t.yMm + t.heightMm / 2;
|
|
9611
9611
|
Zn(r, t.rotation, s, a, () => {
|
|
9612
9612
|
r.save(), r.beginPath(), r.rect(t.xMm, t.yMm, t.widthMm, t.heightMm), r.clip(), iu(r, n.fontSizeMm, t.fontWeight), r.fillStyle = "#000000", r.textBaseline = "top", r.textAlign = n.textAnchor === "middle" ? "center" : n.textAnchor === "end" ? "right" : "left", n.lines.forEach((c, u) => {
|
|
9613
9613
|
r.fillText(
|
|
@@ -9618,7 +9618,7 @@ function M2(r, t, e) {
|
|
|
9618
9618
|
}), r.restore();
|
|
9619
9619
|
});
|
|
9620
9620
|
}
|
|
9621
|
-
function
|
|
9621
|
+
function E2(r, t) {
|
|
9622
9622
|
const e = t.xMm + t.widthMm / 2, n = t.yMm + t.heightMm / 2;
|
|
9623
9623
|
Zn(r, t.rotation, e, n, () => {
|
|
9624
9624
|
if (r.strokeStyle = "#000000", r.lineWidth = t.strokeWidthMm, r.beginPath(), t.type === "rectangle") {
|
|
@@ -9639,9 +9639,9 @@ function I2(r, t) {
|
|
|
9639
9639
|
r.stroke();
|
|
9640
9640
|
});
|
|
9641
9641
|
}
|
|
9642
|
-
function
|
|
9642
|
+
function C2(r, t, e) {
|
|
9643
9643
|
if (!e) return;
|
|
9644
|
-
const n =
|
|
9644
|
+
const n = Oc.create(e, { errorCorrectionLevel: "M" }), s = n.modules.size + Uo * 2, a = Math.min(t.widthMm, t.heightMm), c = r.getTransform().a, u = Math.max(1, Math.floor(a * c)), d = (u >= s ? Math.floor(u / s) : u / s) / c, g = d * s, x = Math.round(
|
|
9645
9645
|
(t.xMm + (t.widthMm - g) / 2) * c
|
|
9646
9646
|
) / c, N = Math.round(
|
|
9647
9647
|
(t.yMm + (t.heightMm - g) / 2) * c
|
|
@@ -9658,11 +9658,11 @@ function E2(r, t, e) {
|
|
|
9658
9658
|
);
|
|
9659
9659
|
});
|
|
9660
9660
|
}
|
|
9661
|
-
function
|
|
9661
|
+
function F2(r, t, e) {
|
|
9662
9662
|
if (!e) return;
|
|
9663
9663
|
const n = document.createElement("canvas");
|
|
9664
9664
|
try {
|
|
9665
|
-
|
|
9665
|
+
jc(n, e, {
|
|
9666
9666
|
format: "CODE128",
|
|
9667
9667
|
displayValue: !1,
|
|
9668
9668
|
width: Wf,
|
|
@@ -9688,7 +9688,7 @@ function C2(r, t, e) {
|
|
|
9688
9688
|
), r.restore();
|
|
9689
9689
|
});
|
|
9690
9690
|
}
|
|
9691
|
-
async function
|
|
9691
|
+
async function j2(r, t, e) {
|
|
9692
9692
|
if (!e) return;
|
|
9693
9693
|
const n = await Gf(e), s = t.xMm + t.widthMm / 2, a = t.yMm + t.heightMm / 2;
|
|
9694
9694
|
Zn(r, t.rotation, s, a, () => {
|
|
@@ -9702,7 +9702,7 @@ async function F2(r, t, e) {
|
|
|
9702
9702
|
);
|
|
9703
9703
|
});
|
|
9704
9704
|
}
|
|
9705
|
-
function
|
|
9705
|
+
function O2(r) {
|
|
9706
9706
|
const t = Math.min(10, Math.max(0.01, r.cropRatio / 100));
|
|
9707
9707
|
return r.cropMode === "scale" ? {
|
|
9708
9708
|
x: (r.widthMm - r.widthMm * t) / 2,
|
|
@@ -9721,9 +9721,9 @@ function j2(r) {
|
|
|
9721
9721
|
height: r.heightMm * t
|
|
9722
9722
|
} : { x: 0, y: 0, width: r.widthMm, height: r.heightMm };
|
|
9723
9723
|
}
|
|
9724
|
-
async function
|
|
9724
|
+
async function B2(r, t, e) {
|
|
9725
9725
|
if (!e) return;
|
|
9726
|
-
const n =
|
|
9726
|
+
const n = O2(t), s = await Fc(
|
|
9727
9727
|
e,
|
|
9728
9728
|
1,
|
|
9729
9729
|
n.width,
|
|
@@ -9744,7 +9744,7 @@ async function O2(r, t, e) {
|
|
|
9744
9744
|
function Ls(r) {
|
|
9745
9745
|
return r.headerAlign === "left" || r.headerAlign === "center" || r.headerAlign === "right" ? r.headerAlign : r.align;
|
|
9746
9746
|
}
|
|
9747
|
-
function
|
|
9747
|
+
function R2(r, t, e) {
|
|
9748
9748
|
if (!r.showHeader) return [];
|
|
9749
9749
|
if (!t.some(
|
|
9750
9750
|
(c) => String(c.column.groupTitle ?? "").trim()
|
|
@@ -9800,23 +9800,23 @@ function B2(r, t, e) {
|
|
|
9800
9800
|
}
|
|
9801
9801
|
return s;
|
|
9802
9802
|
}
|
|
9803
|
-
function
|
|
9803
|
+
function T2(r, t, e, n) {
|
|
9804
9804
|
return e === "center" ? r + t / 2 : e === "right" ? r + t - n : r + n;
|
|
9805
9805
|
}
|
|
9806
|
-
function
|
|
9806
|
+
function D2(r) {
|
|
9807
9807
|
return r === "center" ? "center" : r === "right" ? "right" : "left";
|
|
9808
9808
|
}
|
|
9809
9809
|
function su(r, t, e, n, s, a, c, u, f) {
|
|
9810
|
-
const d =
|
|
9811
|
-
r.save(), r.beginPath(), r.rect(n, s, a, c), r.clip(), iu(r,
|
|
9810
|
+
const d = Rc(t), g = e.slice(0, Math.max(1, Math.floor(c / d))), x = Math.max(1, g.length) * d, N = nf(t);
|
|
9811
|
+
r.save(), r.beginPath(), r.rect(n, s, a, c), r.clip(), iu(r, Dc(t), f, Tc), r.fillStyle = "#000000", r.textAlign = D2(u), r.textBaseline = "middle", g.forEach((p, j) => {
|
|
9812
9812
|
r.fillText(
|
|
9813
9813
|
p || " ",
|
|
9814
|
-
|
|
9814
|
+
T2(n, a, u, N),
|
|
9815
9815
|
s + (c - x) / 2 + d * (j + 0.5)
|
|
9816
9816
|
);
|
|
9817
9817
|
}), r.restore();
|
|
9818
9818
|
}
|
|
9819
|
-
function
|
|
9819
|
+
function q2(r) {
|
|
9820
9820
|
const t = r.groupHeaderCells?.length > 0 ? r.groupHeaderCells : [{
|
|
9821
9821
|
id: "fallback-table-group-header-cell",
|
|
9822
9822
|
content: "",
|
|
@@ -9838,7 +9838,7 @@ function D2(r) {
|
|
|
9838
9838
|
return x += p, j;
|
|
9839
9839
|
});
|
|
9840
9840
|
}
|
|
9841
|
-
function
|
|
9841
|
+
function U2(r, t, e) {
|
|
9842
9842
|
return String(r.field ?? "").trim() ? Bs(Rs(t, r.field)) : String(r.content ?? "").replace(/\{index\}/g, String(e + 1));
|
|
9843
9843
|
}
|
|
9844
9844
|
async function tf(r, t, e, n, s, a, c) {
|
|
@@ -9864,7 +9864,7 @@ async function tf(r, t, e, n, s, a, c) {
|
|
|
9864
9864
|
}
|
|
9865
9865
|
continue;
|
|
9866
9866
|
}
|
|
9867
|
-
const p =
|
|
9867
|
+
const p = qc(
|
|
9868
9868
|
t,
|
|
9869
9869
|
N,
|
|
9870
9870
|
g,
|
|
@@ -9912,18 +9912,18 @@ function rf(r, t, e, n) {
|
|
|
9912
9912
|
);
|
|
9913
9913
|
});
|
|
9914
9914
|
}
|
|
9915
|
-
async function
|
|
9915
|
+
async function z2(r, t, e) {
|
|
9916
9916
|
const n = t.xMm + t.widthMm / 2, s = t.yMm + t.heightMm / 2, a = document.createElement("canvas"), c = r.getTransform().a;
|
|
9917
9917
|
a.width = Math.max(1, Math.ceil(t.widthMm * c)), a.height = Math.max(1, Math.ceil(t.heightMm * c));
|
|
9918
9918
|
const u = a.getContext("2d");
|
|
9919
9919
|
if (!u) throw new Error("Canvas 2D context is unavailable.");
|
|
9920
9920
|
u.scale(c, c), u.fillStyle = "#ffffff", u.fillRect(0, 0, t.widthMm, t.heightMm);
|
|
9921
|
-
const f = Ec(t), d = Math.max(1, Number(t.headerRowHeightMm) || 5), g =
|
|
9921
|
+
const f = Ec(t), d = Math.max(1, Number(t.headerRowHeightMm) || 5), g = R2(t, f, d), x = t.showHeader ? (f.some((N) => String(N.column.groupTitle ?? "").trim()) ? 2 : 1) * d : 0;
|
|
9922
9922
|
if (t.mode === "groupedDetail") {
|
|
9923
9923
|
const N = Math.max(
|
|
9924
9924
|
1,
|
|
9925
9925
|
Number(t.groupHeaderRowHeightMm) || 5
|
|
9926
|
-
), p =
|
|
9926
|
+
), p = q2(t);
|
|
9927
9927
|
let j = 0;
|
|
9928
9928
|
for (const P of e?.groups ?? []) {
|
|
9929
9929
|
const B = P.rows.length > 0 ? P.rows : [{}], k = P.rowHeightsMm?.length === B.length ? P.rowHeightsMm : B.map((mt, dt) => zu(
|
|
@@ -9942,7 +9942,7 @@ async function U2(r, t, e) {
|
|
|
9942
9942
|
)), su(
|
|
9943
9943
|
u,
|
|
9944
9944
|
t,
|
|
9945
|
-
[
|
|
9945
|
+
[U2(mt.cell, P.record, P.index)],
|
|
9946
9946
|
mt.xMm,
|
|
9947
9947
|
j,
|
|
9948
9948
|
mt.widthMm,
|
|
@@ -9967,11 +9967,11 @@ async function U2(r, t, e) {
|
|
|
9967
9967
|
ef(u, t, f, k, q, it), j = it;
|
|
9968
9968
|
}
|
|
9969
9969
|
} else {
|
|
9970
|
-
const N = e?.rows ?? [], p = e?.rowHeightsMm?.length === N.length ? e.rowHeightsMm : N.map((
|
|
9970
|
+
const N = e?.rows ?? [], p = e?.rowHeightsMm?.length === N.length ? e.rowHeightsMm : N.map((P, B) => zu(
|
|
9971
9971
|
t,
|
|
9972
9972
|
f,
|
|
9973
|
-
j,
|
|
9974
9973
|
P,
|
|
9974
|
+
B,
|
|
9975
9975
|
!0
|
|
9976
9976
|
));
|
|
9977
9977
|
rf(u, t, g, 0), await tf(
|
|
@@ -9982,11 +9982,17 @@ async function U2(r, t, e) {
|
|
|
9982
9982
|
p,
|
|
9983
9983
|
x,
|
|
9984
9984
|
!0
|
|
9985
|
-
)
|
|
9985
|
+
);
|
|
9986
|
+
const j = Cc(
|
|
9987
|
+
t,
|
|
9988
|
+
p,
|
|
9989
|
+
x
|
|
9990
|
+
);
|
|
9991
|
+
ef(
|
|
9986
9992
|
u,
|
|
9987
9993
|
t,
|
|
9988
9994
|
f,
|
|
9989
|
-
|
|
9995
|
+
j,
|
|
9990
9996
|
x,
|
|
9991
9997
|
t.heightMm
|
|
9992
9998
|
);
|
|
@@ -10001,55 +10007,55 @@ async function U2(r, t, e) {
|
|
|
10001
10007
|
);
|
|
10002
10008
|
});
|
|
10003
10009
|
}
|
|
10004
|
-
async function
|
|
10010
|
+
async function H2(r, t, e, n, s, a, c, u) {
|
|
10005
10011
|
if (Mc(t)) {
|
|
10006
|
-
|
|
10012
|
+
M2(
|
|
10007
10013
|
r,
|
|
10008
10014
|
t,
|
|
10009
|
-
|
|
10015
|
+
P2(t, e, n, s, u),
|
|
10010
10016
|
a,
|
|
10011
10017
|
c
|
|
10012
10018
|
);
|
|
10013
10019
|
return;
|
|
10014
10020
|
}
|
|
10015
|
-
const f =
|
|
10021
|
+
const f = k2(t, e.data);
|
|
10016
10022
|
switch (t.type) {
|
|
10017
10023
|
case "textBox":
|
|
10018
|
-
|
|
10024
|
+
I2(r, t, f);
|
|
10019
10025
|
return;
|
|
10020
10026
|
case "rectangle":
|
|
10021
10027
|
case "horizontalLine":
|
|
10022
10028
|
case "verticalLine":
|
|
10023
|
-
|
|
10029
|
+
E2(r, t);
|
|
10024
10030
|
return;
|
|
10025
10031
|
case "qrcode":
|
|
10026
|
-
|
|
10032
|
+
C2(r, t, f);
|
|
10027
10033
|
return;
|
|
10028
10034
|
case "barcode":
|
|
10029
|
-
|
|
10035
|
+
F2(r, t, f);
|
|
10030
10036
|
return;
|
|
10031
10037
|
case "image":
|
|
10032
|
-
await
|
|
10038
|
+
await j2(r, t, f);
|
|
10033
10039
|
return;
|
|
10034
10040
|
case "pdf":
|
|
10035
|
-
await
|
|
10041
|
+
await B2(r, t, f);
|
|
10036
10042
|
return;
|
|
10037
10043
|
case "table":
|
|
10038
|
-
await
|
|
10044
|
+
await z2(r, t, e.tableData[t.id]);
|
|
10039
10045
|
}
|
|
10040
10046
|
}
|
|
10041
|
-
async function
|
|
10047
|
+
async function W2(r, t, e, n, s, a = {}) {
|
|
10042
10048
|
if (typeof document > "u")
|
|
10043
10049
|
throw new Error("Canvas rendering is only available in a browser.");
|
|
10044
10050
|
await document.fonts?.ready;
|
|
10045
|
-
const u = Math.max(72, Number(a.dpi) ||
|
|
10051
|
+
const u = Math.max(72, Number(a.dpi) || L2) / Hf, f = document.createElement("canvas");
|
|
10046
10052
|
f.width = Math.max(1, Math.round(n * u)), f.height = Math.max(1, Math.round(s * u));
|
|
10047
10053
|
const d = f.getContext("2d");
|
|
10048
10054
|
if (!d) throw new Error("Canvas 2D context is unavailable.");
|
|
10049
10055
|
d.scale(u, u), d.fillStyle = "#ffffff", d.fillRect(0, 0, n, s), d.imageSmoothingEnabled = !0, d.imageSmoothingQuality = "high";
|
|
10050
10056
|
const g = a.printTime ?? /* @__PURE__ */ new Date(), x = [...r.elements].sort((N, p) => N.zIndex - p.zIndex);
|
|
10051
10057
|
for (const N of x)
|
|
10052
|
-
await
|
|
10058
|
+
await H2(
|
|
10053
10059
|
d,
|
|
10054
10060
|
N,
|
|
10055
10061
|
r,
|
|
@@ -10061,14 +10067,14 @@ async function H2(r, t, e, n, s, a = {}) {
|
|
|
10061
10067
|
);
|
|
10062
10068
|
return f;
|
|
10063
10069
|
}
|
|
10064
|
-
const
|
|
10065
|
-
function
|
|
10070
|
+
const G2 = 203, V2 = 1, Y2 = 2, J2 = 8;
|
|
10071
|
+
function X2(r) {
|
|
10066
10072
|
return Number.isFinite(r) ? Math.min(
|
|
10067
|
-
|
|
10073
|
+
J2,
|
|
10068
10074
|
Math.max(1, Math.trunc(r))
|
|
10069
|
-
) :
|
|
10075
|
+
) : Y2;
|
|
10070
10076
|
}
|
|
10071
|
-
function
|
|
10077
|
+
function K2(r) {
|
|
10072
10078
|
return new Promise((t, e) => {
|
|
10073
10079
|
r.toBlob((n) => {
|
|
10074
10080
|
if (!n) {
|
|
@@ -10079,13 +10085,13 @@ function X2(r) {
|
|
|
10079
10085
|
(s) => t(new Uint8Array(s)),
|
|
10080
10086
|
e
|
|
10081
10087
|
);
|
|
10082
|
-
}, "image/jpeg",
|
|
10088
|
+
}, "image/jpeg", V2);
|
|
10083
10089
|
});
|
|
10084
10090
|
}
|
|
10085
|
-
async function
|
|
10091
|
+
async function $2(r, t, e, n = {}) {
|
|
10086
10092
|
if (r.length === 0)
|
|
10087
10093
|
throw new Error("No template pages were provided.");
|
|
10088
|
-
const s = t > e ? "landscape" : "portrait", a =
|
|
10094
|
+
const s = t > e ? "landscape" : "portrait", a = X2(n.pageConcurrency), c = n.printTime ?? /* @__PURE__ */ new Date(), u = new Rt({
|
|
10089
10095
|
orientation: s,
|
|
10090
10096
|
unit: "mm",
|
|
10091
10097
|
format: [t, e],
|
|
@@ -10094,17 +10100,17 @@ async function K2(r, t, e, n = {}) {
|
|
|
10094
10100
|
for (let f = 0; f < r.length; f += a) {
|
|
10095
10101
|
const d = await Promise.all(
|
|
10096
10102
|
r.slice(f, f + a).map(async (g, x) => {
|
|
10097
|
-
const N = f + x, p = await
|
|
10103
|
+
const N = f + x, p = await W2(
|
|
10098
10104
|
g,
|
|
10099
10105
|
N,
|
|
10100
10106
|
r.length,
|
|
10101
10107
|
t,
|
|
10102
10108
|
e,
|
|
10103
10109
|
{
|
|
10104
|
-
dpi:
|
|
10110
|
+
dpi: G2,
|
|
10105
10111
|
printTime: c
|
|
10106
10112
|
}
|
|
10107
|
-
), j = await
|
|
10113
|
+
), j = await K2(p);
|
|
10108
10114
|
return p.width = 1, p.height = 1, j;
|
|
10109
10115
|
})
|
|
10110
10116
|
);
|
|
@@ -10122,11 +10128,11 @@ async function K2(r, t, e, n = {}) {
|
|
|
10122
10128
|
}
|
|
10123
10129
|
return u.output("blob");
|
|
10124
10130
|
}
|
|
10125
|
-
const
|
|
10131
|
+
const Q2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10126
10132
|
__proto__: null,
|
|
10127
|
-
generateTemplatePdf:
|
|
10133
|
+
generateTemplatePdf: $2
|
|
10128
10134
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10129
10135
|
export {
|
|
10130
10136
|
xe as _,
|
|
10131
|
-
|
|
10137
|
+
Q2 as c
|
|
10132
10138
|
};
|