@chialab/pdfjs-lib 1.0.0-alpha.41 → 1.0.0-alpha.42
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/browser/{chunk-5CXGBP2M.js → chunk-PNBBIN2K.js} +19 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/worker.js +1 -1
- package/dist/node/{chunk-G56GLMCB.js → chunk-B3MHCDGS.js} +19 -1
- package/dist/node/index.js +1 -1
- package/dist/node/worker.js +1 -1
- package/dist/pdf.js/src/display/editor/drawers/signaturedraw.d.ts +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,21 @@ if (!Array.prototype.at) {
|
|
|
15
15
|
enumerable: false
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
+
if (!ArrayBuffer.prototype.transferToFixedLength) {
|
|
19
|
+
Object.defineProperty(ArrayBuffer.prototype, "transferToFixedLength", {
|
|
20
|
+
value: function transferToFixedLength(newByteLength) {
|
|
21
|
+
const length = typeof newByteLength === "number" ? Math.min(newByteLength, this.byteLength) : this.byteLength;
|
|
22
|
+
const copy = this.slice(0, length);
|
|
23
|
+
if (typeof newByteLength === "number" && newByteLength > length) {
|
|
24
|
+
const bigger = new ArrayBuffer(newByteLength);
|
|
25
|
+
new Uint8Array(bigger).set(new Uint8Array(copy));
|
|
26
|
+
return bigger;
|
|
27
|
+
}
|
|
28
|
+
return copy;
|
|
29
|
+
},
|
|
30
|
+
enumerable: false
|
|
31
|
+
});
|
|
32
|
+
}
|
|
18
33
|
if (!Promise.withResolvers) {
|
|
19
34
|
Promise.withResolvers = function withResolvers() {
|
|
20
35
|
let resolve;
|
|
@@ -51,7 +66,10 @@ if (!URL.parse) {
|
|
|
51
66
|
enumerable: false,
|
|
52
67
|
value: function parse(input, base) {
|
|
53
68
|
try {
|
|
54
|
-
return new URL(
|
|
69
|
+
return new URL(
|
|
70
|
+
input,
|
|
71
|
+
base || globalThis.location && globalThis.location.href
|
|
72
|
+
);
|
|
55
73
|
} catch (_) {
|
|
56
74
|
if (!globalThis.document || !globalThis.document.createElement) {
|
|
57
75
|
return {};
|
package/dist/browser/index.js
CHANGED
package/dist/browser/worker.js
CHANGED
|
@@ -27,6 +27,21 @@ if (!Array.prototype.at) {
|
|
|
27
27
|
enumerable: false
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
+
if (!ArrayBuffer.prototype.transferToFixedLength) {
|
|
31
|
+
Object.defineProperty(ArrayBuffer.prototype, "transferToFixedLength", {
|
|
32
|
+
value: function transferToFixedLength(newByteLength) {
|
|
33
|
+
const length = typeof newByteLength === "number" ? Math.min(newByteLength, this.byteLength) : this.byteLength;
|
|
34
|
+
const copy = this.slice(0, length);
|
|
35
|
+
if (typeof newByteLength === "number" && newByteLength > length) {
|
|
36
|
+
const bigger = new ArrayBuffer(newByteLength);
|
|
37
|
+
new Uint8Array(bigger).set(new Uint8Array(copy));
|
|
38
|
+
return bigger;
|
|
39
|
+
}
|
|
40
|
+
return copy;
|
|
41
|
+
},
|
|
42
|
+
enumerable: false
|
|
43
|
+
});
|
|
44
|
+
}
|
|
30
45
|
if (!Promise.withResolvers) {
|
|
31
46
|
Promise.withResolvers = function withResolvers() {
|
|
32
47
|
let resolve;
|
|
@@ -63,7 +78,10 @@ if (!URL.parse) {
|
|
|
63
78
|
enumerable: false,
|
|
64
79
|
value: function parse(input, base) {
|
|
65
80
|
try {
|
|
66
|
-
return new URL(
|
|
81
|
+
return new URL(
|
|
82
|
+
input,
|
|
83
|
+
base || globalThis.location && globalThis.location.href
|
|
84
|
+
);
|
|
67
85
|
} catch (_) {
|
|
68
86
|
if (!globalThis.document || !globalThis.document.createElement) {
|
|
69
87
|
return {};
|
package/dist/node/index.js
CHANGED
package/dist/node/worker.js
CHANGED
|
@@ -20,7 +20,7 @@ export class SignatureExtractor {
|
|
|
20
20
|
}[];
|
|
21
21
|
static "__#private@#douglasPeuckerHelper"(points: any, start: any, end: any, output: any): void;
|
|
22
22
|
static "__#private@#douglasPeucker"(points: any): any[] | null;
|
|
23
|
-
static "__#private@#bilateralFilter"(buf: any, width: any, height: any, sigmaS: any, sigmaR: any, kernelSize: any): (
|
|
23
|
+
static "__#private@#bilateralFilter"(buf: any, width: any, height: any, sigmaS: any, sigmaR: any, kernelSize: any): (Uint8Array<any> | Uint32Array<ArrayBuffer>)[];
|
|
24
24
|
static "__#private@#getHistogram"(buf: any): Uint32Array<ArrayBuffer>;
|
|
25
25
|
static "__#private@#toUint8"(buf: any): Uint8ClampedArray<ArrayBuffer>;
|
|
26
26
|
static "__#private@#guessThreshold"(histogram: any): number;
|
package/package.json
CHANGED