@regulaforensics/vp-frontend-document-components 9.6.2924-rc → 9.6.2926-rc
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/index.d.ts +1 -0
- package/dist/main.iife.js +4 -4
- package/dist/main.js +47 -47
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -12853,11 +12853,11 @@ function ux(e, t) {
|
|
|
12853
12853
|
var n, r;
|
|
12854
12854
|
let i = {
|
|
12855
12855
|
[pi.BarcodeMRZ]: {
|
|
12856
|
-
PROD: "https://wasm-development.regulaforensics.com/document/rc/9.6/barcodemrz/
|
|
12856
|
+
PROD: "https://wasm-development.regulaforensics.com/document/rc/9.6/barcodemrz/0a20a1c8-b1802afb1",
|
|
12857
12857
|
DEV: "./wasm/barcode-mrz/"
|
|
12858
12858
|
},
|
|
12859
12859
|
[pi.BoundsLite]: {
|
|
12860
|
-
PROD: "https://wasm-development.regulaforensics.com/document/rc/9.6/boundslite/
|
|
12860
|
+
PROD: "https://wasm-development.regulaforensics.com/document/rc/9.6/boundslite/0a20a1c8-b1802afb1",
|
|
12861
12861
|
DEV: "./wasm/bounds-lite/"
|
|
12862
12862
|
}
|
|
12863
12863
|
};
|
|
@@ -13217,19 +13217,19 @@ function Zx(e) {
|
|
|
13217
13217
|
}
|
|
13218
13218
|
var Qx = Js.create("main");
|
|
13219
13219
|
function $x(e) {
|
|
13220
|
-
let t = e.videoElementParams, n = e.videoStatusParams, r = e.mirroring, i = e.onError, a = e.controlsWidth, o = e.captureMode, s = window.RegulaDocumentSDK, c = Ec(), l = c.onEvent, u = c.multipageProcessing, d = c.internalScenario, f = c.videoCaptureMotionControl, p = c.nextPageAnimationStartDelay, m = p === void 0 ? Ci : p, h = c.nextPageAnimationEndDelay, g = h === void 0 ? wi : h, _ = c.processingDelay, v = _ === void 0 ? 0 : _, y = c.manualMultipageMode, b = Bx(f).isShake, x = Ea(!1), S = Ea(!1), C = Kx(q(!1), 2), w = C[0], T = C[1], E = Kx(q(!1), 2), D = E[0], O = E[1], k = Kx(q(!1), 2), A = k[0], j = k[1], M = Kx(q(0), 2), N = M[0], P = M[1], F = Kx(q(
|
|
13220
|
+
let t = e.videoElementParams, n = e.videoStatusParams, r = e.mirroring, i = e.onError, a = e.controlsWidth, o = e.captureMode, s = window.RegulaDocumentSDK, c = Ec(), l = c.onEvent, u = c.multipageProcessing, d = c.internalScenario, f = c.videoCaptureMotionControl, p = c.nextPageAnimationStartDelay, m = p === void 0 ? Ci : p, h = c.nextPageAnimationEndDelay, g = h === void 0 ? wi : h, _ = c.processingDelay, v = _ === void 0 ? 0 : _, y = c.manualMultipageMode, b = Bx(f).isShake, x = Ea(!1), S = Ea(!1), C = Kx(q(!1), 2), w = C[0], T = C[1], E = Kx(q(!1), 2), D = E[0], O = E[1], k = Kx(q(!1), 2), A = k[0], j = k[1], M = Kx(q(void 0), 2), N = M[0], P = M[1], F = Kx(q(null), 2), ee = F[0], I = F[1], L = Kx(q(void 0), 2), R = L[0], te = L[1], z = Kx(q({
|
|
13221
13221
|
status: G.SERVICE_PREPARING,
|
|
13222
13222
|
response: null
|
|
13223
|
-
}), 2),
|
|
13224
|
-
scenario:
|
|
13223
|
+
}), 2), B = z[0], V = z[1], ne = wx({
|
|
13224
|
+
scenario: N,
|
|
13225
13225
|
onError: i
|
|
13226
|
-
}),
|
|
13226
|
+
}), re = ne.initData, ie = ne.initialized, H = Nu({
|
|
13227
13227
|
videoSize: t.videoParams,
|
|
13228
13228
|
mirroring: r,
|
|
13229
13229
|
controlsWidth: a,
|
|
13230
|
-
scenario:
|
|
13231
|
-
scenarioParams:
|
|
13232
|
-
}),
|
|
13230
|
+
scenario: N,
|
|
13231
|
+
scenarioParams: re == null ? void 0 : re.scenario
|
|
13232
|
+
}), ae = o === $r.captureFrame, oe = B.status === G.START_NEXT_PAGE;
|
|
13233
13233
|
return J(() => {
|
|
13234
13234
|
if (s) {
|
|
13235
13235
|
if (s.recognizerProcessParam = js(Ai, s.recognizerProcessParam), u !== void 0) {
|
|
@@ -13240,26 +13240,26 @@ function $x(e) {
|
|
|
13240
13240
|
let e = { processParam: { scenario: d } };
|
|
13241
13241
|
s.recognizerProcessParam = js(s.recognizerProcessParam, e);
|
|
13242
13242
|
}
|
|
13243
|
-
Qx(`Current scenario: ${s.recognizerProcessParam.processParam.scenario}`),
|
|
13243
|
+
Qx(`Current scenario: ${s.recognizerProcessParam.processParam.scenario}`), P(s.recognizerProcessParam.processParam.scenario);
|
|
13244
13244
|
}
|
|
13245
13245
|
}, [
|
|
13246
13246
|
s,
|
|
13247
13247
|
d,
|
|
13248
13248
|
u
|
|
13249
13249
|
]), J(() => {
|
|
13250
|
-
let e =
|
|
13251
|
-
Qx(`Frame params: ${JSON.stringify(
|
|
13250
|
+
let e = H || {}, t = e.frameTop, n = e.frameBottom, r = e.frameLeft, i = e.frameRight;
|
|
13251
|
+
Qx(`Frame params: ${JSON.stringify(H)}`), s.recognizerProcessParam = js(s.recognizerProcessParam, { imageInputParam: {
|
|
13252
13252
|
frameTop: t,
|
|
13253
13253
|
frameBottom: n,
|
|
13254
13254
|
frameLeft: r,
|
|
13255
13255
|
frameRight: i,
|
|
13256
|
-
light:
|
|
13256
|
+
light: R,
|
|
13257
13257
|
resolutionType: 0
|
|
13258
13258
|
} });
|
|
13259
|
-
}, [
|
|
13259
|
+
}, [H, R]), J(() => {
|
|
13260
13260
|
(function() {
|
|
13261
13261
|
var e = W(function* (e) {
|
|
13262
|
-
if (!s || !
|
|
13262
|
+
if (!s || !ie || D || ae || n.videoStatus !== Li.PLAY || !n.sortedDevices) return;
|
|
13263
13263
|
if (y) {
|
|
13264
13264
|
O(!0), Qx("New document started (manual multipage)");
|
|
13265
13265
|
return;
|
|
@@ -13267,14 +13267,14 @@ function $x(e) {
|
|
|
13267
13267
|
let t = yield Rs({
|
|
13268
13268
|
cameras: [...n.sortedDevices.frontCameras, ...n.sortedDevices.backCameras],
|
|
13269
13269
|
cameraID: n.camera.deviceId,
|
|
13270
|
-
sdkVersion: "9.6.
|
|
13270
|
+
sdkVersion: "9.6.2926-rc",
|
|
13271
13271
|
serviceUrl: ((e = s.recognizerProcessParam.processParam.backendProcessing) == null ? void 0 : e.serviceURL) || ""
|
|
13272
13272
|
});
|
|
13273
13273
|
Qx(`Metadata: ${JSON.stringify(t)}`);
|
|
13274
13274
|
try {
|
|
13275
13275
|
s.recognizerProcessParam.processParam.backendProcessing ? yield s.createBackendTransaction(t) : yield s.startNewDocument(t), O(!0), Qx("New document started");
|
|
13276
13276
|
} catch (e) {
|
|
13277
|
-
|
|
13277
|
+
V((e) => Hx(Hx({}, e), {}, { status: G.FAILED })), i(new Lu(Zr.WASM_ERROR, e));
|
|
13278
13278
|
}
|
|
13279
13279
|
});
|
|
13280
13280
|
return function(t) {
|
|
@@ -13282,18 +13282,18 @@ function $x(e) {
|
|
|
13282
13282
|
};
|
|
13283
13283
|
})()();
|
|
13284
13284
|
}, [
|
|
13285
|
-
|
|
13285
|
+
ie,
|
|
13286
13286
|
D,
|
|
13287
13287
|
o,
|
|
13288
13288
|
n,
|
|
13289
13289
|
y
|
|
13290
13290
|
]), J(() => {
|
|
13291
13291
|
let e = D && (!o || o === $r.auto), t = D && o === $r.captureVideo;
|
|
13292
|
-
(
|
|
13292
|
+
(ie && o === $r.captureFrame || t || e) && (V((e) => Hx(Hx({}, e), {}, { status: G.FINDING })), e && setTimeout(() => T(!0), v));
|
|
13293
13293
|
}, [
|
|
13294
13294
|
D,
|
|
13295
13295
|
o,
|
|
13296
|
-
|
|
13296
|
+
ie,
|
|
13297
13297
|
v
|
|
13298
13298
|
]), J(() => {
|
|
13299
13299
|
let e = n.videoStatus === Li.PLAY;
|
|
@@ -13301,36 +13301,37 @@ function $x(e) {
|
|
|
13301
13301
|
if (x.current || (l({
|
|
13302
13302
|
action: Qr.CAMERA_PROCESS_STARTED,
|
|
13303
13303
|
data: null
|
|
13304
|
-
}), x.current = !0), b) return
|
|
13304
|
+
}), x.current = !0), b) return V((e) => Hx(Hx({}, e), {}, { status: G.SHAKING }));
|
|
13305
13305
|
j(!0);
|
|
13306
13306
|
let r = dx(t.videoElement, Fi.UINT).imageData;
|
|
13307
13307
|
Qx("Image processing started"), s.process(r).then((e) => {
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13308
|
+
var t;
|
|
13309
|
+
let n = cx(e.rawResponse, (t = s.pageIdx) == null ? 0 : t, s.recognizerProcessParam.processParam.multipageProcessing);
|
|
13310
|
+
V((t) => Hx(Hx({}, t), {}, {
|
|
13311
|
+
status: n,
|
|
13311
13312
|
response: e
|
|
13312
13313
|
})), j(!1), Qx("Image processing is finished");
|
|
13313
|
-
let
|
|
13314
|
-
if (
|
|
13314
|
+
let r = !!Di[n];
|
|
13315
|
+
if (n === G.START_NEXT_PAGE || r) {
|
|
13315
13316
|
let t = e.rawResponse.multipageAnimationImage;
|
|
13316
|
-
t && !y &&
|
|
13317
|
+
t && !y && I({
|
|
13317
13318
|
type: di.Flip,
|
|
13318
13319
|
image: t
|
|
13319
13320
|
}), T(!1);
|
|
13320
13321
|
}
|
|
13321
13322
|
if ("lightType" in e.rawResponse) {
|
|
13322
13323
|
let t = e.rawResponse, n = t.lightType, r = t.liveness;
|
|
13323
|
-
r && (r.hologramTiltType !== void 0 && (0, Ll.default)(n) === 67108870 ?
|
|
13324
|
+
r && (r.hologramTiltType !== void 0 && (0, Ll.default)(n) === 67108870 ? I({
|
|
13324
13325
|
type: di.Tilt,
|
|
13325
13326
|
image: [r.livenessAnimationImage],
|
|
13326
13327
|
tiltType: r.hologramTiltType
|
|
13327
|
-
}) :
|
|
13328
|
+
}) : I(null), S.current || (l({
|
|
13328
13329
|
action: Qr.PROCESS_LIVENESS,
|
|
13329
13330
|
data: null
|
|
13330
|
-
}), S.current = !0)),
|
|
13331
|
-
} else
|
|
13331
|
+
}), S.current = !0)), te((0, Ll.default)(n));
|
|
13332
|
+
} else te(void 0);
|
|
13332
13333
|
}).catch((e) => {
|
|
13333
|
-
|
|
13334
|
+
V({
|
|
13334
13335
|
response: null,
|
|
13335
13336
|
status: G.FAILED
|
|
13336
13337
|
}), i(new Lu(Zr.WASM_ERROR, e)), T(!1);
|
|
@@ -13339,12 +13340,11 @@ function $x(e) {
|
|
|
13339
13340
|
A,
|
|
13340
13341
|
t.videoElement,
|
|
13341
13342
|
n.videoStatus,
|
|
13342
|
-
N,
|
|
13343
13343
|
w,
|
|
13344
13344
|
b,
|
|
13345
13345
|
y
|
|
13346
13346
|
]), J(() => {
|
|
13347
|
-
if (!s || !
|
|
13347
|
+
if (!s || !oe || y) return;
|
|
13348
13348
|
Qx("More pages available"), l({
|
|
13349
13349
|
action: Qr.NEW_PAGE_AVAILABLE,
|
|
13350
13350
|
data: null
|
|
@@ -13354,18 +13354,18 @@ function $x(e) {
|
|
|
13354
13354
|
yield s.startNewPage(), l({
|
|
13355
13355
|
action: Qr.NEW_PAGE_STARTED,
|
|
13356
13356
|
data: null
|
|
13357
|
-
}), T(!0),
|
|
13357
|
+
}), T(!0), I(null), Qx("New page started");
|
|
13358
13358
|
} catch (e) {
|
|
13359
|
-
|
|
13359
|
+
V((e) => Hx(Hx({}, e), {}, { status: G.FAILED })), i(new Lu(Zr.WASM_ERROR, e));
|
|
13360
13360
|
}
|
|
13361
13361
|
}), m + Si + g);
|
|
13362
13362
|
return () => {
|
|
13363
13363
|
clearTimeout(e);
|
|
13364
13364
|
};
|
|
13365
|
-
}, [
|
|
13366
|
-
frameParams:
|
|
13365
|
+
}, [oe, y]), Hx(Hx({}, B), {}, {
|
|
13366
|
+
frameParams: H,
|
|
13367
13367
|
setIsRecognitionStarted: T,
|
|
13368
|
-
animation:
|
|
13368
|
+
animation: ee
|
|
13369
13369
|
});
|
|
13370
13370
|
}
|
|
13371
13371
|
//#endregion
|
|
@@ -13989,7 +13989,7 @@ function LS(e) {
|
|
|
13989
13989
|
try {
|
|
13990
13990
|
var n;
|
|
13991
13991
|
if ((n = a.imageProcessParam.processParam) != null && n.backendProcessing) {
|
|
13992
|
-
let e = yield Rs({ sdkVersion: "9.6.
|
|
13992
|
+
let e = yield Rs({ sdkVersion: "9.6.2926-rc" });
|
|
13993
13993
|
yield a.createBackendTransaction(e, a.imageProcessParam);
|
|
13994
13994
|
}
|
|
13995
13995
|
let e = yield a.processImage(t, o);
|
|
@@ -20451,7 +20451,7 @@ function uA(e, t) {
|
|
|
20451
20451
|
}
|
|
20452
20452
|
var dA = Js.create("wasm"), fA = Js.create("main"), pA = class {
|
|
20453
20453
|
constructor() {
|
|
20454
|
-
cA(this, "_worker", null), cA(this, "_initializeListener", null), cA(this, "_processingListener", null), cA(this, "_queueService", new Bk()), cA(this, "_initProcess", null), cA(this, "version", { component: "9.6.
|
|
20454
|
+
cA(this, "_worker", null), cA(this, "_initializeListener", null), cA(this, "_processingListener", null), cA(this, "_queueService", new Bk()), cA(this, "_initProcess", null), cA(this, "version", { component: "9.6.2926-rc" }), cA(this, "onFinalize", null), cA(this, "isPrepared", !1), cA(this, "isInitialized", !1), cA(this, "isProcessing", !1), cA(this, "initData", null), cA(this, "recognizerProcessParam", { processParam: {} }), cA(this, "imageProcessParam", { processParam: {} }), cA(this, "recognizeListener", null), cA(this, "workerPath", "https://wasm-development.regulaforensics.com/document/rc/9.6/barcodemrz/0a20a1c8-b1802afb1"), cA(this, "pageIdx", null);
|
|
20455
20455
|
}
|
|
20456
20456
|
get processingListener() {
|
|
20457
20457
|
return this._processingListener;
|
|
@@ -20504,7 +20504,7 @@ var dA = Js.create("wasm"), fA = Js.create("main"), pA = class {
|
|
|
20504
20504
|
var n;
|
|
20505
20505
|
fA("Preparing the service");
|
|
20506
20506
|
{
|
|
20507
|
-
let n = t.workerPath === "https://wasm-development.regulaforensics.com/document/rc/9.6/barcodemrz/
|
|
20507
|
+
let n = t.workerPath === "https://wasm-development.regulaforensics.com/document/rc/9.6/barcodemrz/0a20a1c8-b1802afb1", r = aA(e && n ? ux(e, "PROD") : t.workerPath), i = yield (yield fetch(`${r}/${Ti}`)).text();
|
|
20508
20508
|
n || (i = lx(i, r));
|
|
20509
20509
|
let a = new Blob([i], { type: "text/plain" }), o = URL.createObjectURL(a);
|
|
20510
20510
|
t._worker = new Worker(o), URL.revokeObjectURL(o);
|
|
@@ -20543,7 +20543,7 @@ var dA = Js.create("wasm"), fA = Js.create("main"), pA = class {
|
|
|
20543
20543
|
hostName: (n = document.location) == null ? void 0 : n.origin,
|
|
20544
20544
|
license: e == null ? void 0 : e.license
|
|
20545
20545
|
},
|
|
20546
|
-
telemetry: yield Rs({ sdkVersion: "9.6.
|
|
20546
|
+
telemetry: yield Rs({ sdkVersion: "9.6.2926-rc" }),
|
|
20547
20547
|
processParam: t.recognizerProcessParam.processParam || t.imageProcessParam.processParam
|
|
20548
20548
|
}
|
|
20549
20549
|
}), a = i.scenario, o = i.license;
|
|
@@ -20597,13 +20597,13 @@ var dA = Js.create("wasm"), fA = Js.create("main"), pA = class {
|
|
|
20597
20597
|
fA("Starting new page"), yield e.sendMessage({
|
|
20598
20598
|
target: Vi.custom,
|
|
20599
20599
|
method: ii.startNewPage
|
|
20600
|
-
});
|
|
20600
|
+
}), typeof e.pageIdx == "number" && (e.pageIdx += 1);
|
|
20601
20601
|
})();
|
|
20602
20602
|
}
|
|
20603
20603
|
startNewDocument(e, t) {
|
|
20604
20604
|
var n = this;
|
|
20605
20605
|
return W(function* () {
|
|
20606
|
-
return fA("Starting new document"), yield n.sendMessage({
|
|
20606
|
+
return fA("Starting new document"), n.pageIdx = 0, yield n.sendMessage({
|
|
20607
20607
|
target: Vi.custom,
|
|
20608
20608
|
method: ii.startNewDocument,
|
|
20609
20609
|
request: sA(sA({}, t || n.recognizerProcessParam), {}, { metadata: e })
|
|
@@ -20613,7 +20613,7 @@ var dA = Js.create("wasm"), fA = Js.create("main"), pA = class {
|
|
|
20613
20613
|
createBackendTransaction(e, t) {
|
|
20614
20614
|
var n = this;
|
|
20615
20615
|
return W(function* () {
|
|
20616
|
-
return fA("Create backend transaction"), yield n.sendMessage({
|
|
20616
|
+
return fA("Create backend transaction"), n.pageIdx = 0, yield n.sendMessage({
|
|
20617
20617
|
target: Vi.custom,
|
|
20618
20618
|
method: ii.createBackendTransaction,
|
|
20619
20619
|
request: sA(sA({}, t || n.recognizerProcessParam), {}, { metadata: e })
|
|
@@ -20652,7 +20652,7 @@ var dA = Js.create("wasm"), fA = Js.create("main"), pA = class {
|
|
|
20652
20652
|
})();
|
|
20653
20653
|
}
|
|
20654
20654
|
shutdown() {
|
|
20655
|
-
fA("Shutdown service"), this._worker && (this._worker.terminate(), fA("Worker terminated")), this.isPrepared = !1, this.isInitialized = !1, this.isProcessing = !1, this._initProcess = null;
|
|
20655
|
+
fA("Shutdown service"), this._worker && (this._worker.terminate(), fA("Worker terminated")), this.isPrepared = !1, this.isInitialized = !1, this.isProcessing = !1, this.pageIdx = null, this._initProcess = null;
|
|
20656
20656
|
}
|
|
20657
20657
|
};
|
|
20658
20658
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/vp-frontend-document-components",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.2926-rc",
|
|
4
4
|
"description": "Regula framework agnostic web components to work with webcamera",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/main.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build": "vite build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@regulaforensics/document-reader-webclient": "^9.6.
|
|
25
|
+
"@regulaforensics/document-reader-webclient": "^9.6.947-rc",
|
|
26
26
|
"qrcode.react": "^4.2.0"
|
|
27
27
|
}
|
|
28
28
|
}
|