@ekyc_qoobiss/qbs-ect-cmp 3.6.74 → 3.6.76
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/cjs/agreement-check_18.cjs.entry.js +44 -49
- package/dist/collection/components/common/how-to-info/how-to-info.js +7 -5
- package/dist/collection/components/common/id-capture/id-capture.js +12 -16
- package/dist/collection/helpers/Stream.js +15 -15
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +3 -8
- package/dist/esm/agreement-check_18.entry.js +44 -49
- package/dist/qbs-ect-cmp/{p-f055f0ce.entry.js → p-1aec8825.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/libs/IDML5Detector/IDML5Detector.d.ts +1 -3
- package/package.json +1 -1
|
@@ -1524,12 +1524,6 @@ const getLogMessage = (param_req_id = '', param_redirect_id = '', param_token =
|
|
|
1524
1524
|
};
|
|
1525
1525
|
};
|
|
1526
1526
|
|
|
1527
|
-
var VerificationMode;
|
|
1528
|
-
(function (VerificationMode) {
|
|
1529
|
-
VerificationMode[VerificationMode["Full"] = 0] = "Full";
|
|
1530
|
-
VerificationMode[VerificationMode["Tilt"] = 1] = "Tilt";
|
|
1531
|
-
})(VerificationMode || (VerificationMode = {}));
|
|
1532
|
-
|
|
1533
1527
|
class IDML5Detector {
|
|
1534
1528
|
static getInstance(stream, isMobile) {
|
|
1535
1529
|
if (!IDML5Detector.instance) {
|
|
@@ -1550,13 +1544,9 @@ class IDML5Detector {
|
|
|
1550
1544
|
this.canvasElement = canvasElement;
|
|
1551
1545
|
// this.component = component;
|
|
1552
1546
|
}
|
|
1553
|
-
initDetector(
|
|
1547
|
+
initDetector() {
|
|
1554
1548
|
this.initTime = Date.now();
|
|
1555
1549
|
this.continue = true;
|
|
1556
|
-
if (mode == VerificationMode.Full)
|
|
1557
|
-
this.targetedLabel = 'full';
|
|
1558
|
-
else
|
|
1559
|
-
this.targetedLabel = 'tilted';
|
|
1560
1550
|
// this.width = this.videoElement.videoWidth;
|
|
1561
1551
|
// this.height = this.videoElement.videoHeight;
|
|
1562
1552
|
this.drawFrame('white');
|
|
@@ -1584,14 +1574,14 @@ class IDML5Detector {
|
|
|
1584
1574
|
this.stream.timeElapsed();
|
|
1585
1575
|
return;
|
|
1586
1576
|
}
|
|
1587
|
-
if (results[0].label ==
|
|
1577
|
+
if (results[0].label == 'full' && results[0].confidence > 0.9 && !this.checked) {
|
|
1588
1578
|
this.checked = true;
|
|
1589
1579
|
if (state.debug)
|
|
1590
1580
|
console.log('idml5detector | gotResults | autoCapturing');
|
|
1591
1581
|
this.stream.autoCapturing();
|
|
1592
1582
|
await this.drawFrame('green');
|
|
1593
1583
|
}
|
|
1594
|
-
if (results[0].label ==
|
|
1584
|
+
if (results[0].label == 'tilted' && results[0].confidence > 0.8 && !this.checked) {
|
|
1595
1585
|
this.checked = true;
|
|
1596
1586
|
await this.drawFrame('green');
|
|
1597
1587
|
}
|
|
@@ -1715,6 +1705,12 @@ const faceWhiteSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9
|
|
|
1715
1705
|
|
|
1716
1706
|
const faceGreenSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9IjIyNC45OTk5OTk5OTk5OTk5NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIHZlcnNpb249IjEuMSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQogPGc+DQogIDx0aXRsZT5MYXllciAxPC90aXRsZT4NCiAgPGcgc3Ryb2tlPSJudWxsIiBpZD0iTGF5ZXIgMSI+DQogICA8cGF0aCBzdHJva2U9IiM0Y2E1ODUiIGlkPSJzdmdfMSIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZmlsbD0ibm9uZSIgZD0ibTc0LjI3NzY1LDYuOTI3NjFjLTExLjM3NTk3LC0wLjAxNzEzIC0zMy41NjU1MSw1LjEwNDMzIC00Ni44MTMxNiwxOS40OTQ4MWMtNi43NDE0Myw3LjMyMjkyIC0xOC4xMjI2OSwyMy4wNjk2NyAtMTkuMjY3NTgsNTkuNjEzNjljLTAuNTE5MDYsMTYuNTY5MjEgNS4wNDUyNCw2MC42MjUzMyAxMC4yNDAwNiw3Ni40Njc3NWMzLjYzMTMsMTEuMDc0NjggMjcuNDgyMTUsNDMuOTMzNDkgNDQuNDkwNiw1My42ODI1MWM0LjgwNzkxLDIuNzU1NDYgMTEuMjk2NjgsMi42ODI1MSAxMi40MjI1NSwyLjY4MjUxYzEuMTg4NzYsLTAuMDg0NTcgNy4zMzAyNiwwLjA3Mjk0IDEyLjEzNzY1LC0yLjY4MjUxYzE3LjAwODQ2LC05Ljc0OTAyIDQwLjQwMjA4LC00Mi43Njg1MSA0NC40OTA2LC01My42ODI1MWM0LjQwMDM4LC0xMS43NDQ5MSAxMC43NTk2NSwtNTkuODk4NTQgMTAuMjQwMDYsLTc2LjQ2Nzc1Yy0xLjE0NDg5LC0zNi41NDQwMiAtMTIuNTI2MTUsLTUyLjI5MDc3IC0xOS4yNjc1OCwtNTkuNjEzNjljLTEzLjI0NzY1LC0xNC4zOTA0OCAtMzUuMzA2NjMsLTE5LjUyOTMzIC00Ni43NzgyNywtMTkuNDk0ODFjLTAuNzQ2ODgsMC4wMDIyMiAtMS44OTQ5NCwwIC0xLjg5NDk0LDB6IiBzdHJva2Utd2lkdGg9IjciLz4NCiAgPC9nPg0KIDwvZz4NCjwvc3ZnPg0K';
|
|
1717
1707
|
|
|
1708
|
+
var VerificationMode;
|
|
1709
|
+
(function (VerificationMode) {
|
|
1710
|
+
VerificationMode[VerificationMode["Full"] = 0] = "Full";
|
|
1711
|
+
VerificationMode[VerificationMode["Tilt"] = 1] = "Tilt";
|
|
1712
|
+
})(VerificationMode || (VerificationMode = {}));
|
|
1713
|
+
|
|
1718
1714
|
class FaceML5Detector {
|
|
1719
1715
|
static getInstance(stream, isMobile) {
|
|
1720
1716
|
if (!FaceML5Detector.instance) {
|
|
@@ -4418,7 +4414,7 @@ class Stream {
|
|
|
4418
4414
|
this.recordedChunks = [];
|
|
4419
4415
|
this.videoSize = { width: 0, height: 0 };
|
|
4420
4416
|
if (state.debug)
|
|
4421
|
-
console.log(
|
|
4417
|
+
console.log(`stream | constructor`);
|
|
4422
4418
|
this.initFacePose();
|
|
4423
4419
|
this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
|
|
4424
4420
|
this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
|
|
@@ -4428,25 +4424,25 @@ class Stream {
|
|
|
4428
4424
|
if (state.debug)
|
|
4429
4425
|
console.log('stream | getNewInstance');
|
|
4430
4426
|
if (!Stream.instance) {
|
|
4431
|
-
if (state.debug)
|
|
4432
|
-
console.log('stream | getNewInstance | new instance');
|
|
4433
4427
|
Stream.instance = new Stream(mode);
|
|
4428
|
+
if (state.debug)
|
|
4429
|
+
console.log(`stream | getNewInstance | new instance`);
|
|
4434
4430
|
}
|
|
4435
4431
|
return Stream.instance;
|
|
4436
4432
|
}
|
|
4437
4433
|
autoCapturing() {
|
|
4438
4434
|
if (state.debug)
|
|
4439
|
-
console.log(
|
|
4435
|
+
console.log(`stream | autoCapturing`);
|
|
4440
4436
|
this.callbackAutoCapturing();
|
|
4441
4437
|
}
|
|
4442
4438
|
timeElapsed() {
|
|
4443
4439
|
if (state.debug)
|
|
4444
|
-
console.log(
|
|
4440
|
+
console.log(`stream | timeElapsed`);
|
|
4445
4441
|
this.callbackTimeElapsed();
|
|
4446
4442
|
}
|
|
4447
4443
|
verificationReady() {
|
|
4448
4444
|
if (state.debug)
|
|
4449
|
-
console.log(
|
|
4445
|
+
console.log(`stream | verificationReady`);
|
|
4450
4446
|
this.verificationFinished();
|
|
4451
4447
|
}
|
|
4452
4448
|
updateHtmlElements(videoElement, canvasElement, component) {
|
|
@@ -4457,7 +4453,7 @@ class Stream {
|
|
|
4457
4453
|
}
|
|
4458
4454
|
startStream(stream) {
|
|
4459
4455
|
if (state.debug)
|
|
4460
|
-
console.log(
|
|
4456
|
+
console.log(`stream | startStream`);
|
|
4461
4457
|
if (this.stream)
|
|
4462
4458
|
this.stream.getTracks().forEach((track) => track.stop());
|
|
4463
4459
|
this.stream = stream;
|
|
@@ -4490,7 +4486,7 @@ class Stream {
|
|
|
4490
4486
|
}
|
|
4491
4487
|
recordStream() {
|
|
4492
4488
|
if (state.debug)
|
|
4493
|
-
console.log(
|
|
4489
|
+
console.log(`stream | recordStream`);
|
|
4494
4490
|
if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
|
|
4495
4491
|
return;
|
|
4496
4492
|
var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
|
|
@@ -4502,12 +4498,12 @@ class Stream {
|
|
|
4502
4498
|
this.mediaRecorder = new MediaRecorder(this.stream, options);
|
|
4503
4499
|
this.mediaRecorder.ondataavailable = event => {
|
|
4504
4500
|
if (state.debug)
|
|
4505
|
-
console.log(
|
|
4501
|
+
console.log(`stream | recordStream | ondataavailable`);
|
|
4506
4502
|
this.recordedChunks.push(event.data);
|
|
4507
4503
|
};
|
|
4508
4504
|
this.mediaRecorder.onstop = _e => {
|
|
4509
4505
|
if (state.debug)
|
|
4510
|
-
console.log(
|
|
4506
|
+
console.log(`stream | recordStream | onstop`);
|
|
4511
4507
|
var rec = new Blob(this.recordedChunks, {
|
|
4512
4508
|
type: options.mimeType.split(';')[0],
|
|
4513
4509
|
});
|
|
@@ -4539,7 +4535,7 @@ class Stream {
|
|
|
4539
4535
|
}
|
|
4540
4536
|
async takePhoto() {
|
|
4541
4537
|
if (state.debug)
|
|
4542
|
-
console.log(
|
|
4538
|
+
console.log(`stream | takePhoto`);
|
|
4543
4539
|
const canvas = document.createElement('canvas');
|
|
4544
4540
|
canvas.style.visibility = 'hidden';
|
|
4545
4541
|
canvas.width = this.videoElement.videoWidth;
|
|
@@ -4548,7 +4544,7 @@ class Stream {
|
|
|
4548
4544
|
}
|
|
4549
4545
|
getFrame(canvas) {
|
|
4550
4546
|
if (state.debug)
|
|
4551
|
-
console.log(
|
|
4547
|
+
console.log(`stream | getFrame`);
|
|
4552
4548
|
return new Promise(resolve => {
|
|
4553
4549
|
const context = canvas.getContext('2d');
|
|
4554
4550
|
context.drawImage(this.videoElement, 0, 0, canvas.width, canvas.height);
|
|
@@ -4556,7 +4552,7 @@ class Stream {
|
|
|
4556
4552
|
if (frame.type === ImageFormat.JPEG && !state.device.isAppleDevice) {
|
|
4557
4553
|
try {
|
|
4558
4554
|
if (state.debug)
|
|
4559
|
-
console.log(
|
|
4555
|
+
console.log(`stream | getFrame | addExifInImg`);
|
|
4560
4556
|
addExifInImg(frame, this.stream.getTracks()[0], this.videoSize).then(updatedFrame => resolve(updatedFrame));
|
|
4561
4557
|
}
|
|
4562
4558
|
catch (e) {
|
|
@@ -4566,7 +4562,7 @@ class Stream {
|
|
|
4566
4562
|
}
|
|
4567
4563
|
else {
|
|
4568
4564
|
if (state.debug)
|
|
4569
|
-
console.log(
|
|
4565
|
+
console.log(`stream | getFrame | resolve`);
|
|
4570
4566
|
resolve(frame);
|
|
4571
4567
|
}
|
|
4572
4568
|
}, ImageFormat.PNG, 1);
|
|
@@ -4575,7 +4571,7 @@ class Stream {
|
|
|
4575
4571
|
async startIdDetection() {
|
|
4576
4572
|
if (this.streamPaused)
|
|
4577
4573
|
return;
|
|
4578
|
-
this.idML5Detector.initDetector(
|
|
4574
|
+
this.idML5Detector.initDetector();
|
|
4579
4575
|
}
|
|
4580
4576
|
async startFaceDetection() {
|
|
4581
4577
|
if (this.streamPaused)
|
|
@@ -4817,10 +4813,12 @@ const HowToInfo = class {
|
|
|
4817
4813
|
registerInstance(this, hostRef);
|
|
4818
4814
|
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
4819
4815
|
this.loadImage = src => new Promise((resolve, reject) => {
|
|
4820
|
-
this.image.onload = () =>
|
|
4816
|
+
this.image.onload = () => {
|
|
4817
|
+
this.imageLoaded = true;
|
|
4818
|
+
resolve(this.image);
|
|
4819
|
+
};
|
|
4821
4820
|
this.image.onerror = reject;
|
|
4822
4821
|
this.image.src = src;
|
|
4823
|
-
this.imageLoaded = true;
|
|
4824
4822
|
});
|
|
4825
4823
|
this.showVideo = undefined;
|
|
4826
4824
|
this.topTitle = undefined;
|
|
@@ -4876,13 +4874,13 @@ const HowToInfo = class {
|
|
|
4876
4874
|
this.buttonText = this.translations.HowToValues.IdButton;
|
|
4877
4875
|
}
|
|
4878
4876
|
render() {
|
|
4879
|
-
let titleClass = 'color-
|
|
4877
|
+
let titleClass = 'color-black-2';
|
|
4880
4878
|
let bgDemo = 'container';
|
|
4881
4879
|
if (state.flowStatus == FlowStatus.IDBACKHOWTO) {
|
|
4882
|
-
titleClass = 'color-
|
|
4880
|
+
titleClass = 'color-white';
|
|
4883
4881
|
bgDemo = 'container bg-black';
|
|
4884
4882
|
}
|
|
4885
|
-
return (h("div", { class: bgDemo }, h("div", { class: "row", hidden:
|
|
4883
|
+
return (h("div", { class: bgDemo }, h("div", { class: "row", hidden: this.imageLoaded == false }, h("div", { class: "div-ci align-center", hidden: this.showVideo }, h("img", { ref: el => (this.image = el) })), h("div", { hidden: this.showVideo == false }, h("video", { id: "howTo", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { class: "text-center" }, h("h1", { class: titleClass }, this.topTitle), h("p", { class: "font-size-2", hidden: this.subTitle == '' }, this.subTitle)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(), hidden: this.showVideo == true }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
4886
4884
|
}
|
|
4887
4885
|
};
|
|
4888
4886
|
HowToInfo.style = howToInfoCss;
|
|
@@ -5054,7 +5052,7 @@ const IdCapture = class {
|
|
|
5054
5052
|
}
|
|
5055
5053
|
async componentWillLoad() {
|
|
5056
5054
|
if (state.debug)
|
|
5057
|
-
console.log(
|
|
5055
|
+
console.log(`id-capture | componentWillLoad`);
|
|
5058
5056
|
this.translations = await Translations.getValues();
|
|
5059
5057
|
if (!navigator.mediaDevices) {
|
|
5060
5058
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -5062,29 +5060,26 @@ const IdCapture = class {
|
|
|
5062
5060
|
}
|
|
5063
5061
|
initVariables() {
|
|
5064
5062
|
if (state.debug)
|
|
5065
|
-
console.log(
|
|
5063
|
+
console.log(`id-capture | initVariables`);
|
|
5066
5064
|
if (state.flowStatus == FlowStatus.IDFRONT) {
|
|
5067
5065
|
this.pose = IDPose.Straight;
|
|
5068
5066
|
this.flowStep = FlowSteps.CiFrontCapture;
|
|
5069
5067
|
this.titleMesage = this.translations.IdCaptureValues.Title;
|
|
5070
|
-
this.verificationMode = VerificationMode.Full;
|
|
5071
5068
|
}
|
|
5072
5069
|
else if (state.flowStatus == FlowStatus.IDBACK) {
|
|
5073
5070
|
this.pose = IDPose.BackStraight;
|
|
5074
5071
|
this.flowStep = FlowSteps.CiBackCapture;
|
|
5075
5072
|
this.titleMesage = this.translations.IdCaptureValues.TtileRotate;
|
|
5076
|
-
this.verificationMode = VerificationMode.Full;
|
|
5077
5073
|
}
|
|
5078
5074
|
else if (state.flowStatus == FlowStatus.IDTILT) {
|
|
5079
5075
|
this.titleMesage = this.translations.IdCaptureValues.IDPoseMapping;
|
|
5080
5076
|
this.pose = IDPose.Tilted;
|
|
5081
5077
|
this.flowStep = FlowSteps.CiTilt;
|
|
5082
|
-
this.verificationMode = VerificationMode.Tilt;
|
|
5083
5078
|
}
|
|
5084
5079
|
}
|
|
5085
5080
|
async componentDidLoad() {
|
|
5086
5081
|
if (state.debug)
|
|
5087
|
-
console.log(
|
|
5082
|
+
console.log(`id-capture | componentDidLoad`);
|
|
5088
5083
|
this.initVariables();
|
|
5089
5084
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Initialized);
|
|
5090
5085
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[this.pose];
|
|
@@ -5095,7 +5090,7 @@ const IdCapture = class {
|
|
|
5095
5090
|
}
|
|
5096
5091
|
async openCamera() {
|
|
5097
5092
|
if (state.debug)
|
|
5098
|
-
console.log(
|
|
5093
|
+
console.log(`id-capture | openCamera`);
|
|
5099
5094
|
if (!state.cameraId) {
|
|
5100
5095
|
await Cameras.InitCameras(state.device);
|
|
5101
5096
|
}
|
|
@@ -5105,8 +5100,8 @@ const IdCapture = class {
|
|
|
5105
5100
|
.getUserMedia(constraints)
|
|
5106
5101
|
.then(stream => {
|
|
5107
5102
|
if (state.debug)
|
|
5108
|
-
console.log(
|
|
5109
|
-
const superStream = Stream.getNewInstance(
|
|
5103
|
+
console.log(`id-capture | openCamera | streamObtained`);
|
|
5104
|
+
const superStream = Stream.getNewInstance(null);
|
|
5110
5105
|
superStream.initStream(stream);
|
|
5111
5106
|
})
|
|
5112
5107
|
.catch(e => {
|
|
@@ -5117,34 +5112,34 @@ const IdCapture = class {
|
|
|
5117
5112
|
}
|
|
5118
5113
|
closeCamera() {
|
|
5119
5114
|
if (state.debug)
|
|
5120
|
-
console.log(
|
|
5115
|
+
console.log(`id-capture | closeCamera`);
|
|
5121
5116
|
if (Stream.instance) {
|
|
5122
5117
|
Stream.instance.dropStream();
|
|
5123
5118
|
}
|
|
5124
5119
|
}
|
|
5125
5120
|
disconnectedCallback() {
|
|
5126
|
-
if (state.debug)
|
|
5127
|
-
console.log('id-capture | disconnectedCallback');
|
|
5128
5121
|
this.closeCamera();
|
|
5129
5122
|
Stream.instance = null;
|
|
5130
5123
|
IDML5Detector.instance = null;
|
|
5131
5124
|
FaceML5Detector.instance = null;
|
|
5125
|
+
if (state.debug)
|
|
5126
|
+
console.log(`id-capture | disconnectedCallback`);
|
|
5132
5127
|
}
|
|
5133
5128
|
async takePhoto() {
|
|
5134
5129
|
if (state.debug)
|
|
5135
|
-
console.log(
|
|
5130
|
+
console.log(`id-capture | takePhoto`);
|
|
5136
5131
|
if (this.captureTaken)
|
|
5137
5132
|
return;
|
|
5138
5133
|
this.captureTaken = true;
|
|
5139
5134
|
if (state.debug)
|
|
5140
|
-
console.log(
|
|
5135
|
+
console.log(`id-capture | takePhoto | sendingPhoto`);
|
|
5141
5136
|
let res = await Stream.instance.takePhoto();
|
|
5142
5137
|
this.eventPhotoCapture.emit(res);
|
|
5143
5138
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
5144
5139
|
}
|
|
5145
5140
|
async verificationFinished() {
|
|
5146
5141
|
if (state.debug)
|
|
5147
|
-
console.log(
|
|
5142
|
+
console.log(`id-capture | verificationFinished`);
|
|
5148
5143
|
if (this.verified)
|
|
5149
5144
|
return;
|
|
5150
5145
|
this.verified = true;
|
|
@@ -5241,7 +5236,7 @@ function v4(options, buf, offset) {
|
|
|
5241
5236
|
}
|
|
5242
5237
|
|
|
5243
5238
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5244
|
-
const version$1 = "3.6.
|
|
5239
|
+
const version$1 = "3.6.76";
|
|
5245
5240
|
const description = "Person Identification Component";
|
|
5246
5241
|
const main = "./dist/index.cjs.js";
|
|
5247
5242
|
const module = "./dist/index.js";
|