@ekyc_qoobiss/qbs-ect-cmp 3.6.7 → 3.6.11
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/Stream-7793cdf8.js +5352 -0
- package/dist/cjs/agreement-check_18.cjs.entry.js +763 -6009
- package/dist/cjs/id-double-side.cjs.entry.js +208 -0
- package/dist/cjs/id-single-side.cjs.entry.js +147 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +4 -19
- package/dist/collection/components/common/id-capture/id-capture.js +4 -19
- package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
- package/dist/collection/components/common/id-tilt/id-tilt.js +194 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +4 -3
- package/dist/collection/components/controls/camera/camera.js +3 -1
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/collection/components/flow/process-id/process-id.js +375 -0
- package/dist/collection/components/identification-component/identification-component.js +2 -5
- package/dist/collection/helpers/ApiCall.js +2 -0
- package/dist/collection/helpers/Stream.js +10 -8
- package/dist/collection/helpers/store.js +2 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +12 -12
- package/dist/collection/models/CaptureFlow.js +16 -0
- package/dist/collection/models/FlowSteps.js +1 -0
- package/dist/collection/models/IRecordingCallback.js +1 -0
- package/dist/collection/models/IVerificationMode.js +5 -0
- package/dist/esm/Stream-b0b71a36.js +5328 -0
- package/dist/esm/agreement-check_18.entry.js +446 -5692
- package/dist/esm/id-double-side.entry.js +204 -0
- package/dist/esm/id-single-side.entry.js +143 -0
- package/dist/esm/{index-9d69e511.js → index-5d6f9123.js} +1 -1
- package/dist/esm/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/qbs-ect-cmp.js +3 -3
- package/dist/qbs-ect-cmp/{p-4c8e922b.entry.js → p-7c33dd41.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-06e42b28.js → p-aacd7024.js} +1 -1
- package/dist/qbs-ect-cmp/{p-3083aa5e.entry.js → p-acd71227.js} +26 -26
- package/dist/qbs-ect-cmp/p-bbc70bcf.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-c429f75a.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-f6c2922f.entry.js +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/components/common/id-tilt/id-tilt.d.ts +26 -0
- package/dist/types/components/controls/camera/camera.d.ts +3 -2
- package/dist/types/components/flow/process-id/process-id.d.ts +28 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/helpers/Stream.d.ts +5 -2
- package/dist/types/libs/IDML5Detector/IDML5Detector.d.ts +4 -3
- package/dist/types/models/CaptureFlow.d.ts +29 -0
- package/dist/types/models/FlowSteps.d.ts +1 -0
- package/dist/types/models/IAddRequest.d.ts +2 -0
- package/dist/types/models/IEctStore.d.ts +2 -0
- package/dist/types/models/IRecordingCallback.d.ts +4 -0
- package/dist/types/models/IVerificationMode.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-79f82518.js');
|
|
6
|
+
const Stream = require('./Stream-7793cdf8.js');
|
|
7
|
+
|
|
8
|
+
const idDoubleSideCss = "";
|
|
9
|
+
|
|
10
|
+
const IdDoubleSide = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
14
|
+
this.recordingResultCount = 0;
|
|
15
|
+
this.showTimeout = undefined;
|
|
16
|
+
this.showInvalid = undefined;
|
|
17
|
+
this.showHowTo = undefined;
|
|
18
|
+
this.front = undefined;
|
|
19
|
+
this.flow = {
|
|
20
|
+
photoDone: false,
|
|
21
|
+
recordingDone: false,
|
|
22
|
+
verificationFinished: false,
|
|
23
|
+
photoFile: null,
|
|
24
|
+
photoFileName: '',
|
|
25
|
+
photoUploadType: '',
|
|
26
|
+
recordingFile: null,
|
|
27
|
+
recordingFileName: '',
|
|
28
|
+
recordingUploadType: '',
|
|
29
|
+
};
|
|
30
|
+
this.baseComponent = new Stream.BaseComponent(Stream.FlowSteps.CiBack);
|
|
31
|
+
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
32
|
+
}
|
|
33
|
+
componentWillLoad() {
|
|
34
|
+
this.captureRetryCount = 0;
|
|
35
|
+
this.showHowTo = true;
|
|
36
|
+
this.flow.photoFileName = 'idImage.png';
|
|
37
|
+
this.flow.recordingFileName = 'idVideo.';
|
|
38
|
+
this.flow.photoUploadType = 'IdFront';
|
|
39
|
+
this.flow.recordingUploadType = 'IdFrontVideo';
|
|
40
|
+
this.front = true;
|
|
41
|
+
}
|
|
42
|
+
howToDone() {
|
|
43
|
+
this.showHowTo = false;
|
|
44
|
+
}
|
|
45
|
+
timeElapsed() {
|
|
46
|
+
this.showTimeout = true;
|
|
47
|
+
}
|
|
48
|
+
captureErrorDone() {
|
|
49
|
+
if (this.showTimeout == true) {
|
|
50
|
+
this.showTimeout = false;
|
|
51
|
+
}
|
|
52
|
+
if (this.showInvalid == true) {
|
|
53
|
+
this.flow.photoFileName = 'idImage.png';
|
|
54
|
+
this.flow.recordingFileName = 'idVideo.';
|
|
55
|
+
this.flow.photoUploadType = 'IdFront';
|
|
56
|
+
this.flow.recordingUploadType = 'IdFrontVideo';
|
|
57
|
+
this.flow.photoFile = null;
|
|
58
|
+
this.flow.recordingFile = null;
|
|
59
|
+
this.flow.photoDone = false;
|
|
60
|
+
this.flow.recordingDone = false;
|
|
61
|
+
this.front = true;
|
|
62
|
+
this.showInvalid = false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async captureIdImage(event) {
|
|
66
|
+
let idPhoto = event.detail;
|
|
67
|
+
if (idPhoto.size == 0) {
|
|
68
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, Stream.getLogMessage());
|
|
69
|
+
this.triggerErrorFlow();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
this.flow.photoFile = new File([idPhoto], this.flow.photoFileName, { type: 'image/png' });
|
|
74
|
+
this.uploadPhoto();
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
this.apiErrorEvent.emit(e);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async captureIdBackImage(event) {
|
|
81
|
+
let idPhoto = event.detail;
|
|
82
|
+
if (idPhoto.size == 0) {
|
|
83
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, Stream.getLogMessage());
|
|
84
|
+
this.triggerErrorFlow();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
this.flow.photoFile = new File([idPhoto], this.flow.photoFileName, { type: 'image/png' });
|
|
89
|
+
this.uploadPhoto();
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
this.apiErrorEvent.emit(e);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async capturedIdRecording(event) {
|
|
96
|
+
let idRecording = event.detail;
|
|
97
|
+
if (idRecording.size == 0 && this.recordingResultCount == 0) {
|
|
98
|
+
this.recordingResultCount++;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (idRecording.size == 0) {
|
|
102
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, Stream.getLogMessage());
|
|
103
|
+
this.triggerErrorFlow();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.recordingResultCount = 0;
|
|
107
|
+
let mimeType = idRecording.type == Stream.Stream.mp4MimeType.type ? Stream.Stream.mp4MimeType : Stream.Stream.webmMimeType;
|
|
108
|
+
try {
|
|
109
|
+
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
|
|
110
|
+
this.uploadRecording();
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
if (Stream.state.recordingRetryCount < 3) {
|
|
114
|
+
Stream.state.recordingRetryCount++;
|
|
115
|
+
this.triggerErrorFlow();
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.apiErrorEvent.emit(e);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async verificationFinished(_event) {
|
|
123
|
+
this.flow.verificationFinished = true;
|
|
124
|
+
await this.endFlow();
|
|
125
|
+
}
|
|
126
|
+
async componentDidLoad() {
|
|
127
|
+
await this.baseComponent.initialize();
|
|
128
|
+
}
|
|
129
|
+
async uploadPhoto() {
|
|
130
|
+
if (this.flow.photoFile == null || this.flow.photoDone) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.flow.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(Stream.state.requestId, this.flow.photoUploadType, this.flow.photoFile);
|
|
134
|
+
if (this.flow.photoDone) {
|
|
135
|
+
await this.endFlow();
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
this.switchCamera();
|
|
139
|
+
this.triggerErrorFlow();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async uploadRecording() {
|
|
143
|
+
if (this.flow.recordingFile == null || this.flow.recordingDone) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this.flow.recordingDone = await this.baseComponent.apiCall.UploadFileForRequestB64(Stream.state.requestId, this.flow.recordingUploadType, this.flow.recordingFile);
|
|
147
|
+
if (this.flow.recordingDone) {
|
|
148
|
+
await this.endFlow();
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
this.triggerErrorFlow();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
triggerErrorFlow() {
|
|
155
|
+
this.flow.photoFile = null;
|
|
156
|
+
this.flow.recordingFile = null;
|
|
157
|
+
this.showInvalid = true;
|
|
158
|
+
}
|
|
159
|
+
async endFlow() {
|
|
160
|
+
if (!this.flow.photoDone) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (!this.flow.recordingDone) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (this.front) {
|
|
167
|
+
this.flow.photoFileName = 'idBackImage.png';
|
|
168
|
+
this.flow.recordingFileName = 'idBackVideo.';
|
|
169
|
+
this.flow.photoUploadType = 'IdBack';
|
|
170
|
+
this.flow.recordingUploadType = 'IdBackVideo';
|
|
171
|
+
this.flow.photoFile = null;
|
|
172
|
+
this.flow.recordingFile = null;
|
|
173
|
+
this.flow.photoDone = false;
|
|
174
|
+
this.flow.recordingDone = false;
|
|
175
|
+
this.front = false;
|
|
176
|
+
this.showHowTo = true;
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (!this.flow.verificationFinished) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
Stream.state.recordingRetryCount = 0;
|
|
183
|
+
Stream.state.flowStatus = Stream.FlowStatus.LIVENESS;
|
|
184
|
+
}
|
|
185
|
+
async disconnectedCallback() {
|
|
186
|
+
await this.baseComponent.finalize();
|
|
187
|
+
}
|
|
188
|
+
switchCamera() {
|
|
189
|
+
if (this.captureRetryCount == 1) {
|
|
190
|
+
let camIndex = Stream.state.cameraIds.indexOf(Stream.state.cameraId);
|
|
191
|
+
Stream.state.cameraId = camIndex === Stream.state.cameraIds.length - 1 ? Stream.state.cameraIds[0] : Stream.state.cameraIds[camIndex + 1];
|
|
192
|
+
this.captureRetryCount = 0;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.captureRetryCount++;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
render() {
|
|
199
|
+
let error = index.h("capture-error", { type: "ID" });
|
|
200
|
+
let frontCapture = index.h("id-capture", { id: "idFront" });
|
|
201
|
+
let secondCapture = index.h("id-back-capture", { id: "idBack" });
|
|
202
|
+
let howToInfo = index.h("how-to-info", { idSide: this.front ? 'front' : 'back' });
|
|
203
|
+
return this.showHowTo ? howToInfo : this.showInvalid || this.showTimeout ? error : this.front ? frontCapture : secondCapture;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
IdDoubleSide.style = idDoubleSideCss;
|
|
207
|
+
|
|
208
|
+
exports.id_double_side = IdDoubleSide;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-79f82518.js');
|
|
6
|
+
const Stream = require('./Stream-7793cdf8.js');
|
|
7
|
+
|
|
8
|
+
const idSingleSideCss = "";
|
|
9
|
+
|
|
10
|
+
const IdSingleSide = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
14
|
+
this.recordingResultCount = 0;
|
|
15
|
+
this.showTimeout = undefined;
|
|
16
|
+
this.showHowTo = undefined;
|
|
17
|
+
this.idFlow = {
|
|
18
|
+
verificationFinished: false,
|
|
19
|
+
photoDone: false,
|
|
20
|
+
recordingDone: false,
|
|
21
|
+
photoFile: null,
|
|
22
|
+
recordingFile: null,
|
|
23
|
+
};
|
|
24
|
+
this.baseComponent = new Stream.BaseComponent(Stream.FlowSteps.CiFront);
|
|
25
|
+
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
26
|
+
this.captureRetryCount = 0;
|
|
27
|
+
this.showHowTo = true;
|
|
28
|
+
}
|
|
29
|
+
captureErrorDone() {
|
|
30
|
+
this.idFlow.photoFile = null;
|
|
31
|
+
this.idFlow.recordingFile = null;
|
|
32
|
+
this.showTimeout = false;
|
|
33
|
+
}
|
|
34
|
+
howToDone() {
|
|
35
|
+
this.showHowTo = false;
|
|
36
|
+
}
|
|
37
|
+
timeElapsed() {
|
|
38
|
+
this.showTimeout = true;
|
|
39
|
+
}
|
|
40
|
+
async captureIdImage(event) {
|
|
41
|
+
let idPhoto = event.detail;
|
|
42
|
+
if (idPhoto.size == 0) {
|
|
43
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, Stream.getLogMessage());
|
|
44
|
+
this.showTimeout = true;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
this.idFlow.photoFile = new File([idPhoto], 'idImage.png', { type: 'image/png' });
|
|
49
|
+
await this.uploadPhoto();
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
this.apiErrorEvent.emit(e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async verificationFinished(_event) {
|
|
56
|
+
this.idFlow.verificationFinished = true;
|
|
57
|
+
await this.endFlow();
|
|
58
|
+
}
|
|
59
|
+
async capturedIdRecording(event) {
|
|
60
|
+
let idRecording = event.detail;
|
|
61
|
+
if (idRecording.size == 0 && this.recordingResultCount == 0) {
|
|
62
|
+
this.recordingResultCount++;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (idRecording.size == 0) {
|
|
66
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, Stream.getLogMessage());
|
|
67
|
+
this.showTimeout = true;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
let mimeType = idRecording.type == Stream.Stream.mp4MimeType.type ? Stream.Stream.mp4MimeType : Stream.Stream.webmMimeType;
|
|
71
|
+
if (Stream.state.flowStatus == Stream.FlowStatus.ID) {
|
|
72
|
+
try {
|
|
73
|
+
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
|
|
74
|
+
await this.uploadRecording();
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
this.apiErrorEvent.emit(e);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async componentDidLoad() {
|
|
82
|
+
await this.baseComponent.initialize();
|
|
83
|
+
}
|
|
84
|
+
async uploadPhoto() {
|
|
85
|
+
if (this.idFlow.photoFile == null || this.idFlow.photoDone) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.idFlow.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(Stream.state.requestId, 'IdFront', this.idFlow.photoFile);
|
|
89
|
+
if (this.idFlow.photoDone) {
|
|
90
|
+
await this.endFlow();
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.idFlow.photoFile = null;
|
|
94
|
+
this.idFlow.recordingFile = null;
|
|
95
|
+
this.switchCamera();
|
|
96
|
+
this.showTimeout = true;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async uploadRecording() {
|
|
100
|
+
if (this.idFlow.recordingFile == null || this.idFlow.recordingDone) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
this.idFlow.recordingDone = await this.baseComponent.apiCall.UploadFileForRequestB64(Stream.state.requestId, 'IdFrontVideo', this.idFlow.recordingFile);
|
|
104
|
+
if (this.idFlow.recordingDone) {
|
|
105
|
+
await this.endFlow();
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.idFlow.photoFile = null;
|
|
109
|
+
this.idFlow.recordingFile = null;
|
|
110
|
+
this.showTimeout = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async endFlow() {
|
|
114
|
+
if (!this.idFlow.photoDone) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (!this.idFlow.recordingDone) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (!this.idFlow.verificationFinished) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
Stream.state.flowStatus = Stream.FlowStatus.LIVENESS;
|
|
124
|
+
}
|
|
125
|
+
async disconnectedCallback() {
|
|
126
|
+
await this.baseComponent.finalize();
|
|
127
|
+
}
|
|
128
|
+
switchCamera() {
|
|
129
|
+
if (this.captureRetryCount == 1) {
|
|
130
|
+
let camIndex = Stream.state.cameraIds.indexOf(Stream.state.cameraId);
|
|
131
|
+
Stream.state.cameraId = camIndex === Stream.state.cameraIds.length - 1 ? Stream.state.cameraIds[0] : Stream.state.cameraIds[camIndex + 1];
|
|
132
|
+
this.captureRetryCount = 0;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
this.captureRetryCount++;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
render() {
|
|
139
|
+
let error = index.h("capture-error", { type: "ID" });
|
|
140
|
+
let capture = index.h("id-capture", { id: "idFront" });
|
|
141
|
+
let howToInfo = index.h("how-to-info", { idSide: "front" });
|
|
142
|
+
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
IdSingleSide.style = idSingleSideCss;
|
|
146
|
+
|
|
147
|
+
exports.id_single_side = IdSingleSide;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["
|
|
17
|
+
return index.bootstrapLazy([["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"process-id",{"captureStep":[32],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-tilt",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]],["id-double-side.cjs",[[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]]]],["id-single-side.cjs",[[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]]]],["loader-dots.cjs",[[1,"loader-dots"]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["
|
|
20
|
+
return index.bootstrapLazy([["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"process-id",{"captureStep":[32],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-tilt",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]],["id-double-side.cjs",[[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]]]],["id-single-side.cjs",[[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]]]],["loader-dots.cjs",[[1,"loader-dots"]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"./components/common/how-to-info/how-to-info.js",
|
|
7
7
|
"./components/common/id-back-capture/id-back-capture.js",
|
|
8
8
|
"./components/common/id-capture/id-capture.js",
|
|
9
|
+
"./components/common/id-tilt/id-tilt.js",
|
|
9
10
|
"./components/common/selfie-capture/selfie-capture.js",
|
|
10
11
|
"./components/controls/camera/camera.js",
|
|
11
12
|
"./components/controls/loader-dots/loader-dots.js",
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
"./components/flow/id-single-side/id-single-side.js",
|
|
17
18
|
"./components/flow/landing-validation/landing-validation.js",
|
|
18
19
|
"./components/flow/mobile-redirect/mobile-redirect.js",
|
|
20
|
+
"./components/flow/process-id/process-id.js",
|
|
19
21
|
"./components/flow/sms-code-validation/sms-code-validation.js",
|
|
20
22
|
"./components/flow/user-liveness/user-liveness.js",
|
|
21
23
|
"./components/identification-component/identification-component.js"
|
|
@@ -9,6 +9,7 @@ import { delay } from '../../../utils/utils';
|
|
|
9
9
|
import store from '../../../helpers/store';
|
|
10
10
|
import { BaseComponent } from '../../base-component';
|
|
11
11
|
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
12
|
+
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
12
13
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
13
14
|
export class IdBackCapture {
|
|
14
15
|
// @State() private animationPath: string;
|
|
@@ -30,16 +31,6 @@ export class IdBackCapture {
|
|
|
30
31
|
this.showDemo = true;
|
|
31
32
|
this.baseComponent = new BaseComponent(FlowSteps.CiBackHoldAnimation);
|
|
32
33
|
}
|
|
33
|
-
async eventChangeTitle(event) {
|
|
34
|
-
await this.baseComponent.logStep(FlowSteps.CiBackTiltAnimation, FlowMoments.Initialized);
|
|
35
|
-
this.showDemo = true;
|
|
36
|
-
this.titleMesage = IdCaptureValues.IDPoseMapping[event.detail];
|
|
37
|
-
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackTilted];
|
|
38
|
-
this.demoVideo.play();
|
|
39
|
-
await delay(IdCaptureValues.VideoLenght);
|
|
40
|
-
this.showDemo = false;
|
|
41
|
-
await this.baseComponent.logStep(FlowSteps.CiBackTiltAnimation, FlowMoments.Finalized);
|
|
42
|
-
}
|
|
43
34
|
eventVideoStarted(event) {
|
|
44
35
|
this.videoStarted = true;
|
|
45
36
|
this.cameraSize = event.detail;
|
|
@@ -71,7 +62,7 @@ export class IdBackCapture {
|
|
|
71
62
|
navigator.mediaDevices
|
|
72
63
|
.getUserMedia(constraints)
|
|
73
64
|
.then(stream => {
|
|
74
|
-
const superStream = Stream.getInstance();
|
|
65
|
+
const superStream = Stream.getInstance(VerificationMode.Full);
|
|
75
66
|
superStream.initStream(stream);
|
|
76
67
|
})
|
|
77
68
|
.catch(e => {
|
|
@@ -82,7 +73,7 @@ export class IdBackCapture {
|
|
|
82
73
|
}
|
|
83
74
|
closeCamera() {
|
|
84
75
|
if (Stream.instance) {
|
|
85
|
-
Stream.getInstance().dropStream();
|
|
76
|
+
Stream.getInstance(VerificationMode.Full).dropStream();
|
|
86
77
|
}
|
|
87
78
|
}
|
|
88
79
|
disconnectedCallback() {
|
|
@@ -106,7 +97,7 @@ export class IdBackCapture {
|
|
|
106
97
|
if (this.captureTaken)
|
|
107
98
|
return;
|
|
108
99
|
this.captureTaken = true;
|
|
109
|
-
let res = await Stream.getInstance().takePhoto();
|
|
100
|
+
let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
|
|
110
101
|
this.photoIsReady(res);
|
|
111
102
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Finalized);
|
|
112
103
|
}
|
|
@@ -180,12 +171,6 @@ export class IdBackCapture {
|
|
|
180
171
|
static get elementRef() { return "component"; }
|
|
181
172
|
static get listeners() {
|
|
182
173
|
return [{
|
|
183
|
-
"name": "changeTitle",
|
|
184
|
-
"method": "eventChangeTitle",
|
|
185
|
-
"target": undefined,
|
|
186
|
-
"capture": false,
|
|
187
|
-
"passive": false
|
|
188
|
-
}, {
|
|
189
174
|
"name": "videoStarted",
|
|
190
175
|
"method": "eventVideoStarted",
|
|
191
176
|
"target": undefined,
|
|
@@ -9,6 +9,7 @@ import { delay } from '../../../utils/utils';
|
|
|
9
9
|
import store from '../../../helpers/store';
|
|
10
10
|
import { BaseComponent } from '../../base-component';
|
|
11
11
|
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
12
|
+
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
12
13
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
13
14
|
export class IdCapture {
|
|
14
15
|
// @State() private animationPath: string;
|
|
@@ -30,16 +31,6 @@ export class IdCapture {
|
|
|
30
31
|
this.showDemo = true;
|
|
31
32
|
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHoldAnimation);
|
|
32
33
|
}
|
|
33
|
-
async eventChangeTitle(event) {
|
|
34
|
-
await this.baseComponent.logStep(FlowSteps.CiFrontTiltAnimation, FlowMoments.Initialized);
|
|
35
|
-
this.showDemo = true;
|
|
36
|
-
this.titleMesage = IdCaptureValues.IDPoseMapping[event.detail];
|
|
37
|
-
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
38
|
-
this.demoVideo.play();
|
|
39
|
-
await delay(IdCaptureValues.VideoLenght);
|
|
40
|
-
this.showDemo = false;
|
|
41
|
-
await this.baseComponent.logStep(FlowSteps.CiFrontTiltAnimation, FlowMoments.Finalized);
|
|
42
|
-
}
|
|
43
34
|
eventVideoStarted(event) {
|
|
44
35
|
this.videoStarted = true;
|
|
45
36
|
this.cameraSize = event.detail;
|
|
@@ -67,7 +58,7 @@ export class IdCapture {
|
|
|
67
58
|
navigator.mediaDevices
|
|
68
59
|
.getUserMedia(constraints)
|
|
69
60
|
.then(stream => {
|
|
70
|
-
const superStream = Stream.getInstance();
|
|
61
|
+
const superStream = Stream.getInstance(VerificationMode.Full);
|
|
71
62
|
superStream.initStream(stream);
|
|
72
63
|
})
|
|
73
64
|
.catch(e => {
|
|
@@ -78,7 +69,7 @@ export class IdCapture {
|
|
|
78
69
|
}
|
|
79
70
|
closeCamera() {
|
|
80
71
|
if (Stream.instance) {
|
|
81
|
-
Stream.getInstance().dropStream();
|
|
72
|
+
Stream.getInstance(VerificationMode.Full).dropStream();
|
|
82
73
|
}
|
|
83
74
|
}
|
|
84
75
|
disconnectedCallback() {
|
|
@@ -91,7 +82,7 @@ export class IdCapture {
|
|
|
91
82
|
if (this.captureTaken)
|
|
92
83
|
return;
|
|
93
84
|
this.captureTaken = true;
|
|
94
|
-
let res = await Stream.getInstance().takePhoto();
|
|
85
|
+
let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
|
|
95
86
|
this.photoIsReady(res);
|
|
96
87
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Finalized);
|
|
97
88
|
}
|
|
@@ -181,12 +172,6 @@ export class IdCapture {
|
|
|
181
172
|
static get elementRef() { return "component"; }
|
|
182
173
|
static get listeners() {
|
|
183
174
|
return [{
|
|
184
|
-
"name": "changeTitle",
|
|
185
|
-
"method": "eventChangeTitle",
|
|
186
|
-
"target": undefined,
|
|
187
|
-
"capture": false,
|
|
188
|
-
"passive": false
|
|
189
|
-
}, {
|
|
190
175
|
"name": "videoStarted",
|
|
191
176
|
"method": "eventVideoStarted",
|
|
192
177
|
"target": undefined,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* .cameraContainer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
z-index: 10;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
} */
|
|
8
|
+
|
|
9
|
+
.logo {
|
|
10
|
+
max-height: 450px;
|
|
11
|
+
max-width: 450px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* .block {
|
|
15
|
+
width: 90%;
|
|
16
|
+
padding-left: 5%;
|
|
17
|
+
padding-right: 5%;
|
|
18
|
+
margin-top: 5vh;
|
|
19
|
+
} */
|
|
20
|
+
|
|
21
|
+
.canvas-on-video {
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
max-height: 100%;
|
|
24
|
+
position: absolute;
|
|
25
|
+
z-index: 2;
|
|
26
|
+
transform: scale(-1, 1);
|
|
27
|
+
}
|
|
28
|
+
/*
|
|
29
|
+
@media screen and (max-height: 414px) {
|
|
30
|
+
.logo {
|
|
31
|
+
background-size: 140px;
|
|
32
|
+
max-height: 140px;
|
|
33
|
+
max-width: 140px;
|
|
34
|
+
}
|
|
35
|
+
} */
|