@ekyc_qoobiss/qbs-ect-cmp 3.6.44 → 3.6.45
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/{TranslationUtils-2d932eab.js → TranslationUtils-006f5c9e.js} +7 -0
- package/dist/cjs/agreement-check_17.cjs.entry.js +204 -290
- package/dist/cjs/random-actions.cjs.entry.js +1 -1
- package/dist/collection/components/base-component.js +11 -44
- package/dist/collection/components/common/agreement-check/agreement-check.js +0 -4
- package/dist/collection/components/common/camera-error/camera-error.js +3 -10
- package/dist/collection/components/common/capture-error/capture-error.js +3 -8
- package/dist/collection/components/common/how-to-info/how-to-info.js +2 -4
- package/dist/collection/components/common/id-capture/id-capture.js +2 -3
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -3
- package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -5
- package/dist/collection/components/flow/landing-validation/landing-validation.js +5 -11
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +6 -7
- package/dist/collection/components/flow/process-id/process-id.js +10 -8
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +5 -12
- package/dist/collection/components/flow/sms-send/sms-send.js +5 -11
- package/dist/collection/components/flow/user-liveness/user-liveness.js +7 -10
- package/dist/collection/components/identification-component/identification-component.js +10 -7
- package/dist/collection/helpers/ApiCall.js +6 -0
- package/dist/collection/models/FlowSteps.js +1 -0
- package/dist/esm/{TranslationUtils-0039c82d.js → TranslationUtils-13cb9b8c.js} +7 -0
- package/dist/esm/agreement-check_17.entry.js +204 -290
- package/dist/esm/random-actions.entry.js +1 -1
- package/dist/qbs-ect-cmp/p-004a2264.js +1 -0
- package/dist/qbs-ect-cmp/{p-fca9e256.entry.js → p-44d4faec.entry.js} +2 -2
- package/dist/qbs-ect-cmp/{p-0c1eead0.entry.js → p-c93d153b.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/base-component.d.ts +3 -12
- package/dist/types/components/common/agreement-check/agreement-check.d.ts +0 -1
- package/dist/types/components/common/camera-error/camera-error.d.ts +0 -1
- package/dist/types/components/common/capture-error/capture-error.d.ts +0 -1
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
- package/dist/types/components/flow/agreement-info/agreement-info.d.ts +0 -1
- package/dist/types/components/flow/landing-validation/landing-validation.d.ts +0 -1
- package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +0 -1
- package/dist/types/components/flow/process-id/process-id.d.ts +1 -1
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +0 -1
- package/dist/types/components/flow/sms-send/sms-send.d.ts +0 -1
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +0 -1
- package/dist/types/components/identification-component/identification-component.d.ts +0 -1
- package/dist/types/helpers/ApiCall.d.ts +2 -0
- package/dist/types/models/FlowSteps.d.ts +2 -1
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/p-b969ca3e.js +0 -1
|
@@ -3,116 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-41696e0e.js');
|
|
6
|
-
const TranslationUtils = require('./TranslationUtils-
|
|
6
|
+
const TranslationUtils = require('./TranslationUtils-006f5c9e.js');
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
(function (MobileOS) {
|
|
10
|
-
MobileOS["Android"] = "android";
|
|
11
|
-
MobileOS["iOS"] = "ios";
|
|
12
|
-
MobileOS["Unknown"] = "unknown";
|
|
13
|
-
MobileOS["WindowsPhone"] = "Windows Phone";
|
|
14
|
-
})(MobileOS || (MobileOS = {}));
|
|
15
|
-
var DesktopOS;
|
|
16
|
-
(function (DesktopOS) {
|
|
17
|
-
DesktopOS["Linux"] = "linux";
|
|
18
|
-
DesktopOS["MacOS"] = "mac_os";
|
|
19
|
-
DesktopOS["Unix"] = "unix";
|
|
20
|
-
DesktopOS["Unknown"] = "unknown";
|
|
21
|
-
DesktopOS["Windows"] = "windows";
|
|
22
|
-
})(DesktopOS || (DesktopOS = {}));
|
|
23
|
-
var Browser;
|
|
24
|
-
(function (Browser) {
|
|
25
|
-
Browser["Chrome"] = "chrome";
|
|
26
|
-
Browser["Firefox"] = "firefox";
|
|
27
|
-
Browser["Safari"] = "safari";
|
|
28
|
-
Browser["Mi"] = "mi";
|
|
29
|
-
Browser["Unknown"] = "unknown";
|
|
30
|
-
})(Browser || (Browser = {}));
|
|
8
|
+
const agreementCheckCss = "";
|
|
31
9
|
|
|
32
|
-
class
|
|
33
|
-
constructor() {
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
|
|
43
|
-
// Device typology
|
|
44
|
-
isMobileDevice() {
|
|
45
|
-
const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
|
|
46
|
-
return regexs.some(b => this.userAgent.match(b));
|
|
10
|
+
const AgreementCheck = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
14
|
+
this.agreementAcceptance = index.createEvent(this, "agreementAcceptance", 7);
|
|
15
|
+
this.agreementType = undefined;
|
|
16
|
+
this.htmlContent = undefined;
|
|
17
|
+
this.buttonEnabled = undefined;
|
|
18
|
+
this.scrollClass = 'scroll';
|
|
19
|
+
this.apiCalls = new TranslationUtils.ApiCall();
|
|
20
|
+
this.buttonEnabled = true;
|
|
47
21
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return regex.test(this.userAgent.toLowerCase());
|
|
22
|
+
async componentWillLoad() {
|
|
23
|
+
this.translations = await TranslationUtils.Translations.getValues();
|
|
51
24
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (/windows phone/i.test(this.userAgent))
|
|
56
|
-
return MobileOS.WindowsPhone;
|
|
57
|
-
else if (/android/i.test(this.userAgent))
|
|
58
|
-
return MobileOS.Android;
|
|
59
|
-
else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
|
|
60
|
-
return MobileOS.iOS;
|
|
61
|
-
return MobileOS.Unknown;
|
|
25
|
+
async componentDidLoad() {
|
|
26
|
+
try {
|
|
27
|
+
this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
|
|
62
28
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
getDesktopOS() {
|
|
67
|
-
if (this.isDesktop) {
|
|
68
|
-
if (this.userAgent.indexOf('Win') !== -1)
|
|
69
|
-
return DesktopOS.Windows;
|
|
70
|
-
else if (this.userAgent.indexOf('Mac') !== -1)
|
|
71
|
-
return DesktopOS.MacOS;
|
|
72
|
-
else if (this.userAgent.indexOf('X11') !== -1)
|
|
73
|
-
return DesktopOS.Unix;
|
|
74
|
-
else if (this.userAgent.indexOf('Linux') !== -1)
|
|
75
|
-
return DesktopOS.Linux;
|
|
76
|
-
return DesktopOS.Unknown;
|
|
29
|
+
catch (e) {
|
|
30
|
+
this.apiErrorEvent.emit(e);
|
|
77
31
|
}
|
|
78
|
-
else
|
|
79
|
-
return undefined;
|
|
80
|
-
}
|
|
81
|
-
getDeviceOS() {
|
|
82
|
-
var _a;
|
|
83
|
-
return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
|
|
84
32
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var isChrome = /chrome/i.test(this.userAgent);
|
|
89
|
-
if (isChrome)
|
|
90
|
-
return Browser.Chrome;
|
|
91
|
-
if (/firefox/i.test(navigator.userAgent))
|
|
92
|
-
return Browser.Firefox;
|
|
93
|
-
else if (!isChrome && /safari/i.test(navigator.userAgent))
|
|
94
|
-
return Browser.Safari;
|
|
95
|
-
else
|
|
96
|
-
return Browser.Unknown;
|
|
33
|
+
async buttonClick(result) {
|
|
34
|
+
this.buttonEnabled = false;
|
|
35
|
+
this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
|
|
97
36
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
desktopOS: this.getDesktopOS(),
|
|
102
|
-
isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
|
|
103
|
-
isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
|
|
104
|
-
isMobile: this.isMobile,
|
|
105
|
-
mobileOS: this.getMobileOS(),
|
|
106
|
-
isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
|
|
107
|
-
isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
|
|
108
|
-
isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
|
|
109
|
-
browser: this.getBrowser(),
|
|
110
|
-
isTablet: this.isTablet,
|
|
111
|
-
initialScreenOrientation: this.initialScreenOrientation,
|
|
112
|
-
};
|
|
113
|
-
return device;
|
|
37
|
+
render() {
|
|
38
|
+
let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("div", { class: "d-flex two-buttons" }, index.h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
39
|
+
return this.htmlContent ? content : index.h("div", null);
|
|
114
40
|
}
|
|
115
|
-
}
|
|
41
|
+
};
|
|
42
|
+
AgreementCheck.style = agreementCheckCss;
|
|
116
43
|
|
|
117
44
|
class Events {
|
|
118
45
|
static init(element) {
|
|
@@ -174,98 +101,29 @@ class Events {
|
|
|
174
101
|
}
|
|
175
102
|
|
|
176
103
|
class BaseComponent {
|
|
177
|
-
|
|
178
|
-
this.apiErrorEvent = null;
|
|
179
|
-
this.processError = null;
|
|
180
|
-
this.apiCall = new TranslationUtils.ApiCall();
|
|
181
|
-
if (step)
|
|
182
|
-
this.flowStep = step;
|
|
183
|
-
if (!TranslationUtils.state.device) {
|
|
184
|
-
TranslationUtils.state.device = new DeviceDetection().getDevice();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
setEventEmitter(event) {
|
|
188
|
-
this.apiErrorEvent = event;
|
|
189
|
-
}
|
|
190
|
-
setErrorCallback(callback) {
|
|
191
|
-
this.processError = callback;
|
|
192
|
-
}
|
|
193
|
-
async logStep(step, moment) {
|
|
104
|
+
static async logStep(step, moment) {
|
|
194
105
|
Events.flowEvent(step, moment);
|
|
195
106
|
try {
|
|
196
|
-
await
|
|
197
|
-
}
|
|
198
|
-
catch (e) {
|
|
199
|
-
if (this.apiErrorEvent)
|
|
200
|
-
this.apiErrorEvent.emit(e);
|
|
201
|
-
else
|
|
202
|
-
this.processError(e, `${step}-${moment}`);
|
|
107
|
+
await TranslationUtils.ApiCall.instance.AddStep(step, moment);
|
|
203
108
|
}
|
|
109
|
+
catch (e) { }
|
|
204
110
|
}
|
|
205
|
-
async initialize() {
|
|
206
|
-
Events.flowEvent(
|
|
111
|
+
static async initialize(flowStep) {
|
|
112
|
+
Events.flowEvent(flowStep, TranslationUtils.FlowMoments.Initialized);
|
|
207
113
|
try {
|
|
208
|
-
await
|
|
209
|
-
}
|
|
210
|
-
catch (e) {
|
|
211
|
-
if (this.apiErrorEvent)
|
|
212
|
-
this.apiErrorEvent.emit(e);
|
|
213
|
-
else
|
|
214
|
-
this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Initialized}`);
|
|
114
|
+
await TranslationUtils.ApiCall.instance.AddStep(flowStep, TranslationUtils.FlowMoments.Initialized);
|
|
215
115
|
}
|
|
116
|
+
catch (e) { }
|
|
216
117
|
}
|
|
217
|
-
async finalize() {
|
|
218
|
-
Events.flowEvent(
|
|
118
|
+
static async finalize(flowStep) {
|
|
119
|
+
Events.flowEvent(flowStep, TranslationUtils.FlowMoments.Finalized);
|
|
219
120
|
try {
|
|
220
|
-
await
|
|
221
|
-
}
|
|
222
|
-
catch (e) {
|
|
223
|
-
if (this.apiErrorEvent)
|
|
224
|
-
this.apiErrorEvent.emit(e);
|
|
225
|
-
else
|
|
226
|
-
this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Finalized}`);
|
|
121
|
+
await TranslationUtils.ApiCall.instance.AddStep(flowStep, TranslationUtils.FlowMoments.Finalized);
|
|
227
122
|
}
|
|
123
|
+
catch (e) { }
|
|
228
124
|
}
|
|
229
125
|
}
|
|
230
126
|
|
|
231
|
-
const agreementCheckCss = "";
|
|
232
|
-
|
|
233
|
-
const AgreementCheck = class {
|
|
234
|
-
constructor(hostRef) {
|
|
235
|
-
index.registerInstance(this, hostRef);
|
|
236
|
-
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
237
|
-
this.agreementAcceptance = index.createEvent(this, "agreementAcceptance", 7);
|
|
238
|
-
this.agreementType = undefined;
|
|
239
|
-
this.htmlContent = undefined;
|
|
240
|
-
this.buttonEnabled = undefined;
|
|
241
|
-
this.scrollClass = 'scroll';
|
|
242
|
-
this.apiCalls = new TranslationUtils.ApiCall();
|
|
243
|
-
this.buttonEnabled = true;
|
|
244
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
|
|
245
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
246
|
-
}
|
|
247
|
-
async componentWillLoad() {
|
|
248
|
-
this.translations = await TranslationUtils.Translations.getValues();
|
|
249
|
-
}
|
|
250
|
-
async componentDidLoad() {
|
|
251
|
-
try {
|
|
252
|
-
this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
|
|
253
|
-
}
|
|
254
|
-
catch (e) {
|
|
255
|
-
this.apiErrorEvent.emit(e);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
async buttonClick(result) {
|
|
259
|
-
this.buttonEnabled = false;
|
|
260
|
-
this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
|
|
261
|
-
}
|
|
262
|
-
render() {
|
|
263
|
-
let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("div", { class: "d-flex two-buttons" }, index.h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
264
|
-
return this.htmlContent ? content : index.h("div", null);
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
AgreementCheck.style = agreementCheckCss;
|
|
268
|
-
|
|
269
127
|
const agreementInfoCss = "";
|
|
270
128
|
|
|
271
129
|
const AgreementInfo = class {
|
|
@@ -276,13 +134,11 @@ const AgreementInfo = class {
|
|
|
276
134
|
this.termsChecked = undefined;
|
|
277
135
|
this.openAgreements = undefined;
|
|
278
136
|
this.openTerms = undefined;
|
|
279
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
|
|
280
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
281
137
|
this.agreementsChecked = false;
|
|
282
138
|
this.termsChecked = false;
|
|
283
139
|
}
|
|
284
140
|
async componentDidLoad() {
|
|
285
|
-
await
|
|
141
|
+
await BaseComponent.initialize(TranslationUtils.FlowSteps.Agreements);
|
|
286
142
|
}
|
|
287
143
|
async componentWillLoad() {
|
|
288
144
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
@@ -290,12 +146,12 @@ const AgreementInfo = class {
|
|
|
290
146
|
this.openTerms = false;
|
|
291
147
|
}
|
|
292
148
|
async disconnectedCallback() {
|
|
293
|
-
await
|
|
149
|
+
await BaseComponent.finalize(TranslationUtils.FlowSteps.Agreements);
|
|
294
150
|
}
|
|
295
151
|
async buttonClick() {
|
|
296
152
|
if (this.agreementsChecked && this.termsChecked) {
|
|
297
153
|
try {
|
|
298
|
-
TranslationUtils.state.flowStatus = await
|
|
154
|
+
TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.GetNextFlowState();
|
|
299
155
|
}
|
|
300
156
|
catch (e) {
|
|
301
157
|
this.apiErrorEvent.emit(e);
|
|
@@ -4506,6 +4362,30 @@ const addExifInImg = async (blob, track, videoSize) => {
|
|
|
4506
4362
|
return await fetch(newPhotoData).then(res => res.blob());
|
|
4507
4363
|
};
|
|
4508
4364
|
|
|
4365
|
+
var MobileOS;
|
|
4366
|
+
(function (MobileOS) {
|
|
4367
|
+
MobileOS["Android"] = "android";
|
|
4368
|
+
MobileOS["iOS"] = "ios";
|
|
4369
|
+
MobileOS["Unknown"] = "unknown";
|
|
4370
|
+
MobileOS["WindowsPhone"] = "Windows Phone";
|
|
4371
|
+
})(MobileOS || (MobileOS = {}));
|
|
4372
|
+
var DesktopOS;
|
|
4373
|
+
(function (DesktopOS) {
|
|
4374
|
+
DesktopOS["Linux"] = "linux";
|
|
4375
|
+
DesktopOS["MacOS"] = "mac_os";
|
|
4376
|
+
DesktopOS["Unix"] = "unix";
|
|
4377
|
+
DesktopOS["Unknown"] = "unknown";
|
|
4378
|
+
DesktopOS["Windows"] = "windows";
|
|
4379
|
+
})(DesktopOS || (DesktopOS = {}));
|
|
4380
|
+
var Browser;
|
|
4381
|
+
(function (Browser) {
|
|
4382
|
+
Browser["Chrome"] = "chrome";
|
|
4383
|
+
Browser["Firefox"] = "firefox";
|
|
4384
|
+
Browser["Safari"] = "safari";
|
|
4385
|
+
Browser["Mi"] = "mi";
|
|
4386
|
+
Browser["Unknown"] = "unknown";
|
|
4387
|
+
})(Browser || (Browser = {}));
|
|
4388
|
+
|
|
4509
4389
|
var ImageFormat;
|
|
4510
4390
|
(function (ImageFormat) {
|
|
4511
4391
|
ImageFormat["JPEG"] = "image/jpeg";
|
|
@@ -4762,16 +4642,7 @@ Camera.style = cameraCss;
|
|
|
4762
4642
|
const cameraErrorCss = "";
|
|
4763
4643
|
|
|
4764
4644
|
const CameraError = class {
|
|
4765
|
-
constructor(hostRef) {
|
|
4766
|
-
index.registerInstance(this, hostRef);
|
|
4767
|
-
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
4768
|
-
this.title = undefined;
|
|
4769
|
-
this.description = undefined;
|
|
4770
|
-
this.buttonDisabled = undefined;
|
|
4771
|
-
this.demoVideo = undefined;
|
|
4772
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CameraError);
|
|
4773
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
4774
|
-
}
|
|
4645
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.title = undefined; this.description = undefined; this.buttonDisabled = undefined; this.demoVideo = undefined; }
|
|
4775
4646
|
async componentWillLoad() {
|
|
4776
4647
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
4777
4648
|
this.buttonDisabled = false;
|
|
@@ -4780,7 +4651,7 @@ const CameraError = class {
|
|
|
4780
4651
|
this.buttonText = this.translations.CameraErrorValues.Button;
|
|
4781
4652
|
}
|
|
4782
4653
|
async componentDidLoad() {
|
|
4783
|
-
await
|
|
4654
|
+
await BaseComponent.initialize(TranslationUtils.FlowSteps.CameraError);
|
|
4784
4655
|
if (TranslationUtils.state.device.mobileOS != MobileOS.iOS) {
|
|
4785
4656
|
this.demoVideo.src = this.translations.CameraErrorValues.HowToLink;
|
|
4786
4657
|
this.demoVideo.loop = true;
|
|
@@ -4795,7 +4666,7 @@ const CameraError = class {
|
|
|
4795
4666
|
}
|
|
4796
4667
|
}
|
|
4797
4668
|
async disconnectedCallback() {
|
|
4798
|
-
await
|
|
4669
|
+
await BaseComponent.finalize(TranslationUtils.FlowSteps.CameraError);
|
|
4799
4670
|
}
|
|
4800
4671
|
async buttonClick() {
|
|
4801
4672
|
this.buttonDisabled = true;
|
|
@@ -4816,14 +4687,7 @@ CameraError.style = cameraErrorCss;
|
|
|
4816
4687
|
const captureErrorCss = "";
|
|
4817
4688
|
|
|
4818
4689
|
const CaptureError = class {
|
|
4819
|
-
constructor(hostRef) {
|
|
4820
|
-
index.registerInstance(this, hostRef);
|
|
4821
|
-
this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7);
|
|
4822
|
-
this.type = undefined;
|
|
4823
|
-
this.buttonEnabled = undefined;
|
|
4824
|
-
this.buttonText = undefined;
|
|
4825
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiError);
|
|
4826
|
-
}
|
|
4690
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7); this.type = undefined; this.buttonEnabled = undefined; this.buttonText = undefined; }
|
|
4827
4691
|
async componentWillLoad() {
|
|
4828
4692
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
4829
4693
|
this.buttonEnabled = false;
|
|
@@ -4841,7 +4705,7 @@ const CaptureError = class {
|
|
|
4841
4705
|
}
|
|
4842
4706
|
}
|
|
4843
4707
|
async componentDidLoad() {
|
|
4844
|
-
await
|
|
4708
|
+
await BaseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Initialized);
|
|
4845
4709
|
for (let i = 5; i >= 1; i--) {
|
|
4846
4710
|
this.buttonText = i.toString();
|
|
4847
4711
|
await delay(1000);
|
|
@@ -4851,7 +4715,7 @@ const CaptureError = class {
|
|
|
4851
4715
|
}
|
|
4852
4716
|
async buttonClick() {
|
|
4853
4717
|
this.buttonEnabled = false;
|
|
4854
|
-
await
|
|
4718
|
+
await BaseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Finalized);
|
|
4855
4719
|
this.eventCaptureErrorDone.emit();
|
|
4856
4720
|
}
|
|
4857
4721
|
render() {
|
|
@@ -4901,10 +4765,10 @@ const howToInfoCss = "";
|
|
|
4901
4765
|
const HowToInfo = class {
|
|
4902
4766
|
constructor(hostRef) { index.registerInstance(this, hostRef); this.eventHowToInfoDone = index.createEvent(this, "howToInfoDone", 7); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
4903
4767
|
async componentDidLoad() {
|
|
4904
|
-
await
|
|
4768
|
+
await BaseComponent.initialize(this.currentStep);
|
|
4905
4769
|
}
|
|
4906
4770
|
async disconnectedCallback() {
|
|
4907
|
-
await
|
|
4771
|
+
await BaseComponent.finalize(this.currentStep);
|
|
4908
4772
|
}
|
|
4909
4773
|
buttonClick() {
|
|
4910
4774
|
this.buttonEnabled = false;
|
|
@@ -4932,8 +4796,6 @@ const HowToInfo = class {
|
|
|
4932
4796
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
|
|
4933
4797
|
this.buttonText = this.translations.HowToValues.SelfieButton;
|
|
4934
4798
|
}
|
|
4935
|
-
this.baseComponent = new BaseComponent(this.currentStep);
|
|
4936
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
4937
4799
|
}
|
|
4938
4800
|
render() {
|
|
4939
4801
|
let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
@@ -5112,7 +4974,6 @@ const IdCapture = class {
|
|
|
5112
4974
|
if (!navigator.mediaDevices) {
|
|
5113
4975
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
5114
4976
|
}
|
|
5115
|
-
this.baseComponent = new BaseComponent(this.flowStep);
|
|
5116
4977
|
}
|
|
5117
4978
|
initVariables() {
|
|
5118
4979
|
if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
|
|
@@ -5135,7 +4996,7 @@ const IdCapture = class {
|
|
|
5135
4996
|
}
|
|
5136
4997
|
}
|
|
5137
4998
|
async componentDidLoad() {
|
|
5138
|
-
await
|
|
4999
|
+
await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
|
|
5139
5000
|
this.initVariables();
|
|
5140
5001
|
if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
|
|
5141
5002
|
this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
@@ -5186,7 +5047,7 @@ const IdCapture = class {
|
|
|
5186
5047
|
else {
|
|
5187
5048
|
this.eventTimeElapsed.emit();
|
|
5188
5049
|
}
|
|
5189
|
-
await
|
|
5050
|
+
await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
|
|
5190
5051
|
}
|
|
5191
5052
|
async verificationFinished() {
|
|
5192
5053
|
if (this.verified)
|
|
@@ -5287,7 +5148,7 @@ function v4(options, buf, offset) {
|
|
|
5287
5148
|
}
|
|
5288
5149
|
|
|
5289
5150
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5290
|
-
const version$1 = "3.6.
|
|
5151
|
+
const version$1 = "3.6.45";
|
|
5291
5152
|
const description = "Person Identification Component";
|
|
5292
5153
|
const main = "./dist/index.cjs.js";
|
|
5293
5154
|
const module$1 = "./dist/index.js";
|
|
@@ -5357,6 +5218,91 @@ const packageJson = {
|
|
|
5357
5218
|
|
|
5358
5219
|
const loaderSvg = 'data:image/svg+xml;base64,PHN2ZyBpZD0ic3Bpbm5lckxvYWRlclJlZiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSIjMDMwMzAzIiBjbGFzcz0ic2luZ2xlLWxvYWRlciI+DQogIDxkZWZzPg0KICAgIDxjaXJjbGUgaWQ9InNwaW5uZXIiIHI9IjQiIGN4PSI1MCIgY3k9IjUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC0zMCkiLz4gICAgDQogIDwvZGVmcz4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDAgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoNDUgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMC4xMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPg0KICA8L3VzZT4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDkwIDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPg0KICA8L3VzZT4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDEzNSA1MCA1MCkiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMDsxOzAiIGR1cj0iMXMiIGJlZ2luPSIwLjM3NXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuNXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMjI1IDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuNjI1cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4NCiAgPC91c2U+DQogIDx1c2UgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhsaW5rOmhyZWY9IiNzcGlubmVyIiB0cmFuc2Zvcm09InJvdGF0ZSgyNzAgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMC43NXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMzE1IDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuODc1cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4NCiAgPC91c2U+DQo8L3N2Zz4=';
|
|
5359
5220
|
|
|
5221
|
+
class DeviceDetection {
|
|
5222
|
+
constructor() {
|
|
5223
|
+
var _a, _b, _c, _d;
|
|
5224
|
+
this.supportedScreenOrientation = (_b = (_a = ((screen === null || screen === void 0 ? void 0 : screen.orientation) || {}).type) !== null && _a !== void 0 ? _a : screen.mozOrientation) !== null && _b !== void 0 ? _b : screen.msOrientation;
|
|
5225
|
+
this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
|
|
5226
|
+
this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
|
|
5227
|
+
this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
|
|
5228
|
+
this.isMobile = this.isMobileDevice();
|
|
5229
|
+
this.isTablet = this.isTabletDevice();
|
|
5230
|
+
this.isDesktop = !this.isMobile && !this.isTablet;
|
|
5231
|
+
}
|
|
5232
|
+
// Device typology
|
|
5233
|
+
isMobileDevice() {
|
|
5234
|
+
const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
|
|
5235
|
+
return regexs.some(b => this.userAgent.match(b));
|
|
5236
|
+
}
|
|
5237
|
+
isTabletDevice() {
|
|
5238
|
+
const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
|
|
5239
|
+
return regex.test(this.userAgent.toLowerCase());
|
|
5240
|
+
}
|
|
5241
|
+
// Device Operating System
|
|
5242
|
+
getMobileOS() {
|
|
5243
|
+
if (this.isMobileDevice()) {
|
|
5244
|
+
if (/windows phone/i.test(this.userAgent))
|
|
5245
|
+
return MobileOS.WindowsPhone;
|
|
5246
|
+
else if (/android/i.test(this.userAgent))
|
|
5247
|
+
return MobileOS.Android;
|
|
5248
|
+
else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
|
|
5249
|
+
return MobileOS.iOS;
|
|
5250
|
+
return MobileOS.Unknown;
|
|
5251
|
+
}
|
|
5252
|
+
else
|
|
5253
|
+
return undefined;
|
|
5254
|
+
}
|
|
5255
|
+
getDesktopOS() {
|
|
5256
|
+
if (this.isDesktop) {
|
|
5257
|
+
if (this.userAgent.indexOf('Win') !== -1)
|
|
5258
|
+
return DesktopOS.Windows;
|
|
5259
|
+
else if (this.userAgent.indexOf('Mac') !== -1)
|
|
5260
|
+
return DesktopOS.MacOS;
|
|
5261
|
+
else if (this.userAgent.indexOf('X11') !== -1)
|
|
5262
|
+
return DesktopOS.Unix;
|
|
5263
|
+
else if (this.userAgent.indexOf('Linux') !== -1)
|
|
5264
|
+
return DesktopOS.Linux;
|
|
5265
|
+
return DesktopOS.Unknown;
|
|
5266
|
+
}
|
|
5267
|
+
else
|
|
5268
|
+
return undefined;
|
|
5269
|
+
}
|
|
5270
|
+
getDeviceOS() {
|
|
5271
|
+
var _a;
|
|
5272
|
+
return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
|
|
5273
|
+
}
|
|
5274
|
+
getBrowser() {
|
|
5275
|
+
if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
|
|
5276
|
+
return Browser.Mi;
|
|
5277
|
+
var isChrome = /chrome/i.test(this.userAgent);
|
|
5278
|
+
if (isChrome)
|
|
5279
|
+
return Browser.Chrome;
|
|
5280
|
+
if (/firefox/i.test(navigator.userAgent))
|
|
5281
|
+
return Browser.Firefox;
|
|
5282
|
+
else if (!isChrome && /safari/i.test(navigator.userAgent))
|
|
5283
|
+
return Browser.Safari;
|
|
5284
|
+
else
|
|
5285
|
+
return Browser.Unknown;
|
|
5286
|
+
}
|
|
5287
|
+
getDevice() {
|
|
5288
|
+
var device = {
|
|
5289
|
+
isDesktop: this.isDesktop,
|
|
5290
|
+
desktopOS: this.getDesktopOS(),
|
|
5291
|
+
isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
|
|
5292
|
+
isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
|
|
5293
|
+
isMobile: this.isMobile,
|
|
5294
|
+
mobileOS: this.getMobileOS(),
|
|
5295
|
+
isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
|
|
5296
|
+
isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
|
|
5297
|
+
isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
|
|
5298
|
+
browser: this.getBrowser(),
|
|
5299
|
+
isTablet: this.isTablet,
|
|
5300
|
+
initialScreenOrientation: this.initialScreenOrientation,
|
|
5301
|
+
};
|
|
5302
|
+
return device;
|
|
5303
|
+
}
|
|
5304
|
+
}
|
|
5305
|
+
|
|
5360
5306
|
const identificationComponentCss = "@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-vietnamese-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-vietnamese-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-vietnamese-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{font-family:'Inter', sans-serif}h1{font-weight:900;letter-spacing:0.01em;color:#1f2024;font-size:3.2vh;margin:0;line-height:3.5vh}.row-validare h1{font-size:27px;line-height:29px}body{margin:0;padding:0;height:100vh;position:relative;}.container{width:100%;height:100%;background-color:#fff;max-width:991px;margin:auto;position:relative;overflow:hidden}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.main-text{font-weight:400;color:#71727a}.link-text{margin-top:1vh;text-decoration:underline}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text{display:flex;align-items:center;margin-bottom:3vh}.img-text .bg-img img{width:100%;padding:2vh}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.img-text .bg-img{background:#e1e3e9;border-radius:30%;width:11vh;height:11vh;display:flex;align-items:center;justify-content:center;flex:none;margin-right:3vh}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.main-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;width:100%;padding:2vh;color:#fff;border:0;font-size:2vh}.main-button:disabled{color:#71727a}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-1{margin-bottom:1vh}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.row-validare .main-input{padding:14px 12px;border-radius:12px;font-weight:700;border:2px solid #464e58;font-size:19px}.main-input{width:100%;padding:22px 26px;border:3px solid #464e58;border-radius:20px;font-weight:600;font-size:2.3vh;font-family:'Inter', sans-serif}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.color-red{color:#b67171}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:60vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.bg-black{background-color:#242426}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll{margin:4px, 4px;padding:4px;height:70vh;overflow-x:hidden;overflow-y:auto}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}}";
|
|
5361
5307
|
|
|
5362
5308
|
const IdentificationComponent = class {
|
|
@@ -5373,7 +5319,7 @@ const IdentificationComponent = class {
|
|
|
5373
5319
|
}
|
|
5374
5320
|
agreementAcceptanceEmitted(data) {
|
|
5375
5321
|
try {
|
|
5376
|
-
|
|
5322
|
+
TranslationUtils.ApiCall.instance.GenerateAgreement(data.detail.agreementType);
|
|
5377
5323
|
}
|
|
5378
5324
|
catch (e) {
|
|
5379
5325
|
this.apiErrorEmitter(e, 'Agreement Acceptance');
|
|
@@ -5397,7 +5343,7 @@ const IdentificationComponent = class {
|
|
|
5397
5343
|
}
|
|
5398
5344
|
let apiLogData = { message: this.errorTitle, stack: this.errorMessage, zone };
|
|
5399
5345
|
try {
|
|
5400
|
-
await
|
|
5346
|
+
await TranslationUtils.ApiCall.instance.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
5401
5347
|
}
|
|
5402
5348
|
catch (_g) { }
|
|
5403
5349
|
Events.flowError(this.errorTitle);
|
|
@@ -5427,8 +5373,6 @@ const IdentificationComponent = class {
|
|
|
5427
5373
|
if (this.env && this.env != '') {
|
|
5428
5374
|
TranslationUtils.state.environment = this.env;
|
|
5429
5375
|
}
|
|
5430
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.ComponentLoaded);
|
|
5431
|
-
this.baseComponent.setErrorCallback(this.apiErrorEmitter);
|
|
5432
5376
|
if (TranslationUtils.state.debug)
|
|
5433
5377
|
this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
|
|
5434
5378
|
if (this.token) {
|
|
@@ -5488,13 +5432,17 @@ const IdentificationComponent = class {
|
|
|
5488
5432
|
if (TranslationUtils.state.environment == 'DEMO') {
|
|
5489
5433
|
return;
|
|
5490
5434
|
}
|
|
5435
|
+
if (!TranslationUtils.state.device) {
|
|
5436
|
+
TranslationUtils.state.device = new DeviceDetection().getDevice();
|
|
5437
|
+
}
|
|
5438
|
+
TranslationUtils.ApiCall.getInstance();
|
|
5491
5439
|
if (TranslationUtils.state.device.browser == Browser.Mi) {
|
|
5492
5440
|
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + TranslationUtils.state.requestId + ' RedirectId:' + TranslationUtils.state.redirectId);
|
|
5493
5441
|
return;
|
|
5494
5442
|
}
|
|
5495
5443
|
try {
|
|
5496
5444
|
if (TranslationUtils.state.debug)
|
|
5497
|
-
|
|
5445
|
+
TranslationUtils.ApiCall.instance.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
5498
5446
|
}
|
|
5499
5447
|
catch (_a) { }
|
|
5500
5448
|
try {
|
|
@@ -5503,7 +5451,7 @@ const IdentificationComponent = class {
|
|
|
5503
5451
|
this.redirect_id = TranslationUtils.state.redirectId;
|
|
5504
5452
|
}
|
|
5505
5453
|
if (TranslationUtils.state.token != '' && (TranslationUtils.state.requestId != '' || TranslationUtils.state.redirectId != '')) {
|
|
5506
|
-
await
|
|
5454
|
+
await TranslationUtils.ApiCall.instance.AddIdentificationRequest(TranslationUtils.state.device, packageJson.version);
|
|
5507
5455
|
if (!this.order_id || this.order_id == '') {
|
|
5508
5456
|
this.order_id = TranslationUtils.state.requestId;
|
|
5509
5457
|
}
|
|
@@ -5571,24 +5519,16 @@ const deviceSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iMzI
|
|
|
5571
5519
|
const landingValidationCss = "";
|
|
5572
5520
|
|
|
5573
5521
|
const LandingValidation = class {
|
|
5574
|
-
constructor(hostRef) {
|
|
5575
|
-
index.registerInstance(this, hostRef);
|
|
5576
|
-
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
5577
|
-
this.warningText = undefined;
|
|
5578
|
-
this.buttonDisabled = undefined;
|
|
5579
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Landing);
|
|
5580
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
5581
|
-
}
|
|
5522
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.warningText = undefined; this.buttonDisabled = undefined; }
|
|
5582
5523
|
async componentWillLoad() {
|
|
5583
5524
|
Events.flowStarted();
|
|
5584
5525
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
5585
|
-
this.baseComponent.apiCall = new TranslationUtils.ApiCall();
|
|
5586
5526
|
this.buttonDisabled = false;
|
|
5587
5527
|
await this.initRequest();
|
|
5588
5528
|
}
|
|
5589
5529
|
async componentDidLoad() {
|
|
5590
5530
|
if (TranslationUtils.state.environment !== 'DEMO') {
|
|
5591
|
-
await
|
|
5531
|
+
await BaseComponent.initialize(TranslationUtils.FlowSteps.Landing);
|
|
5592
5532
|
}
|
|
5593
5533
|
}
|
|
5594
5534
|
async initRequest() {
|
|
@@ -5607,7 +5547,7 @@ const LandingValidation = class {
|
|
|
5607
5547
|
sessionStorage.setItem(TranslationUtils.SessionKeys.RefreshDoneKey, 'false');
|
|
5608
5548
|
}
|
|
5609
5549
|
try {
|
|
5610
|
-
TranslationUtils.state.flowStatus = await
|
|
5550
|
+
TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.LandingValidationStartFlow(cameraIsAccessible);
|
|
5611
5551
|
}
|
|
5612
5552
|
catch (e) {
|
|
5613
5553
|
this.apiErrorEvent.emit(e);
|
|
@@ -5615,13 +5555,13 @@ const LandingValidation = class {
|
|
|
5615
5555
|
}
|
|
5616
5556
|
}
|
|
5617
5557
|
async disconnectedCallback() {
|
|
5618
|
-
await
|
|
5558
|
+
await BaseComponent.finalize(TranslationUtils.FlowSteps.Landing);
|
|
5619
5559
|
}
|
|
5620
5560
|
async leaveFlow() {
|
|
5621
5561
|
if (this.buttonDisabled)
|
|
5622
5562
|
return;
|
|
5623
5563
|
try {
|
|
5624
|
-
let abortResult = await
|
|
5564
|
+
let abortResult = await TranslationUtils.ApiCall.instance.AbortRequest();
|
|
5625
5565
|
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[abortResult.state];
|
|
5626
5566
|
Events.flowAborted();
|
|
5627
5567
|
}
|
|
@@ -8524,8 +8464,6 @@ const MobileRedirect = class {
|
|
|
8524
8464
|
this.redirectLink = undefined;
|
|
8525
8465
|
this.qrCode = undefined;
|
|
8526
8466
|
this.prefilledPhone = false;
|
|
8527
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.MobileRedirect);
|
|
8528
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
8529
8467
|
this.invalidValue = false;
|
|
8530
8468
|
this.waitingMobile = false;
|
|
8531
8469
|
}
|
|
@@ -8535,7 +8473,7 @@ const MobileRedirect = class {
|
|
|
8535
8473
|
this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
|
|
8536
8474
|
this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
|
|
8537
8475
|
let envUri = TranslationUtils.state.environment == 'QA' ? 'test' : 'ect';
|
|
8538
|
-
let baseUri = TranslationUtils.state.apiBaseUrl.includes(
|
|
8476
|
+
let baseUri = TranslationUtils.state.apiBaseUrl.includes('apimd') ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
8539
8477
|
this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + TranslationUtils.state.redirectId;
|
|
8540
8478
|
if (TranslationUtils.state.phoneNumber && TranslationUtils.state.phoneNumber != '') {
|
|
8541
8479
|
this.contact = TranslationUtils.state.phoneNumber;
|
|
@@ -8549,7 +8487,7 @@ const MobileRedirect = class {
|
|
|
8549
8487
|
});
|
|
8550
8488
|
}
|
|
8551
8489
|
async componentDidLoad() {
|
|
8552
|
-
await
|
|
8490
|
+
await BaseComponent.initialize(TranslationUtils.FlowSteps.MobileRedirect);
|
|
8553
8491
|
await delay(5000);
|
|
8554
8492
|
await this.checkStatus();
|
|
8555
8493
|
while (this.orderStatus == TranslationUtils.OrderStatuses.Capturing || this.orderStatus == TranslationUtils.OrderStatuses.Waiting) {
|
|
@@ -8558,7 +8496,7 @@ const MobileRedirect = class {
|
|
|
8558
8496
|
}
|
|
8559
8497
|
}
|
|
8560
8498
|
async checkStatus() {
|
|
8561
|
-
this.orderStatus = await
|
|
8499
|
+
this.orderStatus = await TranslationUtils.ApiCall.instance.GetStatus(TranslationUtils.state.requestId);
|
|
8562
8500
|
if (this.orderStatus == TranslationUtils.OrderStatuses.FinishedCapturing) {
|
|
8563
8501
|
this.waitingMobile = false;
|
|
8564
8502
|
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.COMPLETE;
|
|
@@ -8577,7 +8515,7 @@ const MobileRedirect = class {
|
|
|
8577
8515
|
}
|
|
8578
8516
|
}
|
|
8579
8517
|
async disconnectedCallback() {
|
|
8580
|
-
await
|
|
8518
|
+
await BaseComponent.finalize(TranslationUtils.FlowSteps.MobileRedirect);
|
|
8581
8519
|
}
|
|
8582
8520
|
async buttonClick() {
|
|
8583
8521
|
if (this.contact == '' || this.contact.length != 10) {
|
|
@@ -8586,7 +8524,7 @@ const MobileRedirect = class {
|
|
|
8586
8524
|
this.waitingMobile = true;
|
|
8587
8525
|
this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
|
|
8588
8526
|
try {
|
|
8589
|
-
await
|
|
8527
|
+
await TranslationUtils.ApiCall.instance.SendLink(this.redirectLink, this.contact);
|
|
8590
8528
|
}
|
|
8591
8529
|
catch (e) {
|
|
8592
8530
|
this.apiErrorEvent.emit(e);
|
|
@@ -8630,8 +8568,6 @@ const ProcessId = class {
|
|
|
8630
8568
|
this.showTimeout = undefined;
|
|
8631
8569
|
this.showInvalid = undefined;
|
|
8632
8570
|
this.flow = undefined;
|
|
8633
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBack);
|
|
8634
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
8635
8571
|
}
|
|
8636
8572
|
componentWillLoad() {
|
|
8637
8573
|
this.captureRetryCount = 0;
|
|
@@ -8639,6 +8575,7 @@ const ProcessId = class {
|
|
|
8639
8575
|
}
|
|
8640
8576
|
initFlow() {
|
|
8641
8577
|
if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
|
|
8578
|
+
this.currentStep = TranslationUtils.FlowSteps.CiFront;
|
|
8642
8579
|
this.flow = {
|
|
8643
8580
|
capture: {
|
|
8644
8581
|
fileName: 'idImage.png',
|
|
@@ -8650,6 +8587,7 @@ const ProcessId = class {
|
|
|
8650
8587
|
};
|
|
8651
8588
|
}
|
|
8652
8589
|
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
|
|
8590
|
+
this.currentStep = TranslationUtils.FlowSteps.CiBack;
|
|
8653
8591
|
this.flow = {
|
|
8654
8592
|
capture: {
|
|
8655
8593
|
fileName: 'idBackImage.png',
|
|
@@ -8661,6 +8599,7 @@ const ProcessId = class {
|
|
|
8661
8599
|
};
|
|
8662
8600
|
}
|
|
8663
8601
|
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDTILT) {
|
|
8602
|
+
this.currentStep = TranslationUtils.FlowSteps.CiTilt;
|
|
8664
8603
|
this.flow = {
|
|
8665
8604
|
capture: {
|
|
8666
8605
|
fileName: 'idTiltImage.png',
|
|
@@ -8689,7 +8628,7 @@ const ProcessId = class {
|
|
|
8689
8628
|
async captureIdImage(event) {
|
|
8690
8629
|
let idPhoto = event.detail;
|
|
8691
8630
|
if (idPhoto.size == 0) {
|
|
8692
|
-
await
|
|
8631
|
+
await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
8693
8632
|
this.triggerErrorFlow();
|
|
8694
8633
|
return;
|
|
8695
8634
|
}
|
|
@@ -8711,7 +8650,7 @@ const ProcessId = class {
|
|
|
8711
8650
|
return;
|
|
8712
8651
|
}
|
|
8713
8652
|
if (idRecording.size == 0) {
|
|
8714
|
-
await
|
|
8653
|
+
await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
8715
8654
|
this.showTimeout = true;
|
|
8716
8655
|
return;
|
|
8717
8656
|
}
|
|
@@ -8724,13 +8663,13 @@ const ProcessId = class {
|
|
|
8724
8663
|
this.recordingResultCount = 0;
|
|
8725
8664
|
}
|
|
8726
8665
|
async componentDidLoad() {
|
|
8727
|
-
await
|
|
8666
|
+
await BaseComponent.initialize(this.currentStep);
|
|
8728
8667
|
}
|
|
8729
8668
|
async uploadPhotos(uploadType, photoFile) {
|
|
8730
8669
|
if (photoFile == null || uploadType == '') {
|
|
8731
8670
|
return false;
|
|
8732
8671
|
}
|
|
8733
|
-
var uploadResult = await
|
|
8672
|
+
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, photoFile);
|
|
8734
8673
|
if (uploadResult) {
|
|
8735
8674
|
return true;
|
|
8736
8675
|
}
|
|
@@ -8744,7 +8683,7 @@ const ProcessId = class {
|
|
|
8744
8683
|
if (recordingFile == null) {
|
|
8745
8684
|
return;
|
|
8746
8685
|
}
|
|
8747
|
-
var uploadResult = await
|
|
8686
|
+
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, recordingFile);
|
|
8748
8687
|
if (uploadResult) {
|
|
8749
8688
|
return true;
|
|
8750
8689
|
}
|
|
@@ -8757,7 +8696,7 @@ const ProcessId = class {
|
|
|
8757
8696
|
this.showInvalid = true;
|
|
8758
8697
|
}
|
|
8759
8698
|
async disconnectedCallback() {
|
|
8760
|
-
await
|
|
8699
|
+
await BaseComponent.finalize(this.currentStep);
|
|
8761
8700
|
}
|
|
8762
8701
|
switchCamera() {
|
|
8763
8702
|
if (this.captureRetryCount == 1) {
|
|
@@ -8835,8 +8774,6 @@ const SelfieCapture = class {
|
|
|
8835
8774
|
this.mainStream = Stream.getNewInstance(this.verificationMode);
|
|
8836
8775
|
this.demoVideo.src = TranslationUtils.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
|
|
8837
8776
|
}
|
|
8838
|
-
this.baseComponent = new BaseComponent(this.currentStep);
|
|
8839
|
-
await this.baseComponent.logStep(this.currentStep, TranslationUtils.FlowMoments.Initialized);
|
|
8840
8777
|
this.demoVideo.play();
|
|
8841
8778
|
await delay(this.translations.GlobalValues.VideoLenght);
|
|
8842
8779
|
this.demoEnded = true;
|
|
@@ -8877,7 +8814,7 @@ const SelfieCapture = class {
|
|
|
8877
8814
|
else {
|
|
8878
8815
|
this.eventTimeElapsed.emit();
|
|
8879
8816
|
}
|
|
8880
|
-
await
|
|
8817
|
+
await BaseComponent.logStep(this.currentStep, TranslationUtils.FlowMoments.Finalized);
|
|
8881
8818
|
}
|
|
8882
8819
|
async verificationFinished() {
|
|
8883
8820
|
if (this.verified)
|
|
@@ -8916,21 +8853,11 @@ SelfieCapture.style = selfieCaptureCss;
|
|
|
8916
8853
|
const smsCodeValidationCss = "";
|
|
8917
8854
|
|
|
8918
8855
|
const SmsCodeValidation = class {
|
|
8919
|
-
constructor(hostRef) {
|
|
8920
|
-
index.registerInstance(this, hostRef);
|
|
8921
|
-
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
8922
|
-
this.title = undefined;
|
|
8923
|
-
this.details = undefined;
|
|
8924
|
-
this.buttonText = undefined;
|
|
8925
|
-
this.code = undefined;
|
|
8926
|
-
this.canSend = false;
|
|
8927
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpCheck);
|
|
8928
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
8929
|
-
}
|
|
8856
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.title = undefined; this.details = undefined; this.buttonText = undefined; this.code = undefined; this.canSend = false; }
|
|
8930
8857
|
async doAction() {
|
|
8931
8858
|
try {
|
|
8932
8859
|
this.canSend = false;
|
|
8933
|
-
var codeChecked = await
|
|
8860
|
+
var codeChecked = await TranslationUtils.ApiCall.instance.CheckOTPCode(TranslationUtils.state.requestId, this.code);
|
|
8934
8861
|
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[codeChecked.state];
|
|
8935
8862
|
}
|
|
8936
8863
|
catch (e) {
|
|
@@ -8938,7 +8865,7 @@ const SmsCodeValidation = class {
|
|
|
8938
8865
|
}
|
|
8939
8866
|
}
|
|
8940
8867
|
async disconnectedCallback() {
|
|
8941
|
-
await
|
|
8868
|
+
await BaseComponent.finalize(TranslationUtils.FlowSteps.OtpCheck);
|
|
8942
8869
|
}
|
|
8943
8870
|
async componentWillRender() {
|
|
8944
8871
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
@@ -8947,7 +8874,7 @@ const SmsCodeValidation = class {
|
|
|
8947
8874
|
this.buttonText = this.translations.CodeValidationValues.Button;
|
|
8948
8875
|
}
|
|
8949
8876
|
async componentDidLoad() {
|
|
8950
|
-
await
|
|
8877
|
+
await BaseComponent.initialize(TranslationUtils.FlowSteps.OtpCheck);
|
|
8951
8878
|
}
|
|
8952
8879
|
handleChangeCode(ev) {
|
|
8953
8880
|
let value = ev.target ? ev.target.value : '';
|
|
@@ -8970,20 +8897,11 @@ SmsCodeValidation.style = smsCodeValidationCss;
|
|
|
8970
8897
|
const smsSendCss = "";
|
|
8971
8898
|
|
|
8972
8899
|
const SmsSend = class {
|
|
8973
|
-
constructor(hostRef) {
|
|
8974
|
-
index.registerInstance(this, hostRef);
|
|
8975
|
-
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
8976
|
-
this.buttonText = undefined;
|
|
8977
|
-
this.phoneNumber = undefined;
|
|
8978
|
-
this.prefilledPhone = false;
|
|
8979
|
-
this.canSend = false;
|
|
8980
|
-
this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpSend);
|
|
8981
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
8982
|
-
}
|
|
8900
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.buttonText = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
|
|
8983
8901
|
async doAction() {
|
|
8984
8902
|
try {
|
|
8985
8903
|
this.canSend = false;
|
|
8986
|
-
var codeSent = await
|
|
8904
|
+
var codeSent = await TranslationUtils.ApiCall.instance.SendOTPCode(TranslationUtils.state.requestId, this.phoneNumber);
|
|
8987
8905
|
if (codeSent.sent === true) {
|
|
8988
8906
|
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[codeSent.state];
|
|
8989
8907
|
}
|
|
@@ -8993,7 +8911,7 @@ const SmsSend = class {
|
|
|
8993
8911
|
}
|
|
8994
8912
|
}
|
|
8995
8913
|
async disconnectedCallback() {
|
|
8996
|
-
await
|
|
8914
|
+
await BaseComponent.finalize(TranslationUtils.FlowSteps.OtpSend);
|
|
8997
8915
|
}
|
|
8998
8916
|
async componentWillRender() {
|
|
8999
8917
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
@@ -9005,7 +8923,7 @@ const SmsSend = class {
|
|
|
9005
8923
|
}
|
|
9006
8924
|
}
|
|
9007
8925
|
async componentDidLoad() {
|
|
9008
|
-
await
|
|
8926
|
+
await BaseComponent.initialize(TranslationUtils.FlowSteps.OtpSend);
|
|
9009
8927
|
}
|
|
9010
8928
|
handleChangePhone(ev) {
|
|
9011
8929
|
let value = ev.target ? ev.target.value : '';
|
|
@@ -9033,9 +8951,7 @@ const UserLiveness = class {
|
|
|
9033
8951
|
this.flow = undefined;
|
|
9034
8952
|
this.howToDone = false;
|
|
9035
8953
|
}
|
|
9036
|
-
async componentDidLoad() {
|
|
9037
|
-
await this.baseComponent.initialize();
|
|
9038
|
-
}
|
|
8954
|
+
async componentDidLoad() { }
|
|
9039
8955
|
componentWillLoad() {
|
|
9040
8956
|
if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
|
|
9041
8957
|
this.currentStep = TranslationUtils.FlowSteps.Selfie;
|
|
@@ -9061,8 +8977,6 @@ const UserLiveness = class {
|
|
|
9061
8977
|
howToDone: false,
|
|
9062
8978
|
};
|
|
9063
8979
|
}
|
|
9064
|
-
this.baseComponent = new BaseComponent(this.currentStep);
|
|
9065
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
9066
8980
|
}
|
|
9067
8981
|
howToDoneEvent() {
|
|
9068
8982
|
this.howToDone = true;
|
|
@@ -9078,13 +8992,13 @@ const UserLiveness = class {
|
|
|
9078
8992
|
return;
|
|
9079
8993
|
let selfiePhoto = event.detail;
|
|
9080
8994
|
if (selfiePhoto.size == 0) {
|
|
9081
|
-
await
|
|
8995
|
+
await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
|
|
9082
8996
|
this.triggerErrorFlow();
|
|
9083
8997
|
return;
|
|
9084
8998
|
}
|
|
9085
8999
|
try {
|
|
9086
9000
|
var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
|
|
9087
|
-
let photoUploaded = await
|
|
9001
|
+
let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, uploadPhoto);
|
|
9088
9002
|
if (!photoUploaded) {
|
|
9089
9003
|
this.triggerErrorFlow();
|
|
9090
9004
|
}
|
|
@@ -9101,14 +9015,14 @@ const UserLiveness = class {
|
|
|
9101
9015
|
}
|
|
9102
9016
|
this.recordingResultCount = 0;
|
|
9103
9017
|
if (selfieRecording.size == 0) {
|
|
9104
|
-
await
|
|
9018
|
+
await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
|
|
9105
9019
|
this.triggerErrorFlow();
|
|
9106
9020
|
return;
|
|
9107
9021
|
}
|
|
9108
9022
|
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
9109
9023
|
try {
|
|
9110
9024
|
let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
|
|
9111
|
-
let uplodDone = await
|
|
9025
|
+
let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, uploadRec);
|
|
9112
9026
|
if (!uplodDone) {
|
|
9113
9027
|
this.triggerErrorFlow();
|
|
9114
9028
|
}
|
|
@@ -9124,7 +9038,7 @@ const UserLiveness = class {
|
|
|
9124
9038
|
}
|
|
9125
9039
|
}
|
|
9126
9040
|
async disconnectedCallback() {
|
|
9127
|
-
await
|
|
9041
|
+
await BaseComponent.finalize(this.currentStep);
|
|
9128
9042
|
}
|
|
9129
9043
|
triggerErrorFlow() {
|
|
9130
9044
|
this.showError = true;
|