@ekyc_qoobiss/qbs-ect-cmp 3.6.27 → 3.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/agreement-check_19.cjs.entry.js +9498 -0
- package/dist/cjs/base-component-aa9e52bf.js +832 -0
- package/dist/cjs/index-41696e0e.js +1573 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader-dots.cjs.entry.js +19 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/qbs-ect-cmp.cjs.js +23 -0
- package/dist/cjs/random-actions.cjs.entry.js +23 -0
- package/dist/collection/assets/canvas-masks/face_green.svg +8 -0
- package/dist/collection/assets/canvas-masks/face_white.svg +8 -0
- package/dist/collection/assets/canvas-masks/id_green.svg +6 -0
- package/dist/collection/assets/canvas-masks/id_white.svg +6 -0
- package/dist/collection/assets/complete.svg +4 -0
- package/dist/collection/assets/landing/device.svg +14 -0
- package/dist/collection/assets/landing/id.svg +3 -0
- package/dist/collection/assets/landing/info.svg +3 -0
- package/dist/collection/assets/landing/validation.svg +16 -0
- package/dist/collection/assets/loader.svg +29 -0
- package/dist/collection/collection-manifest.json +32 -0
- package/dist/collection/components/base-component.js +63 -0
- package/dist/collection/components/common/agreement-check/agreement-check.css +0 -0
- package/dist/collection/components/common/agreement-check/agreement-check.js +104 -0
- package/dist/collection/components/common/camera-error/camera-error.css +0 -0
- package/dist/{qbs-ect-cmp/camera-error.entry.js → collection/components/common/camera-error/camera-error.js} +52 -20
- package/dist/collection/components/common/capture-error/capture-error.css +0 -0
- package/dist/{qbs-ect-cmp/capture-error.entry.js → collection/components/common/capture-error/capture-error.js} +63 -16
- package/dist/collection/components/common/how-to-info/how-to-info.css +0 -0
- package/dist/collection/components/common/how-to-info/how-to-info.js +121 -0
- package/dist/collection/components/common/id-back-capture/id-back-capture.css +35 -0
- package/dist/{qbs-ect-cmp/id-back-capture.entry.js → collection/components/common/id-back-capture/id-back-capture.js} +94 -24
- package/dist/collection/components/common/id-capture/id-capture.css +35 -0
- package/dist/{qbs-ect-cmp/id-capture.entry.js → collection/components/common/id-capture/id-capture.js} +94 -24
- package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
- package/dist/{qbs-ect-cmp/id-tilt.entry.js → collection/components/common/id-tilt/id-tilt.js} +94 -24
- package/dist/collection/components/common/random-actions/random-actions.css +0 -0
- package/dist/collection/components/common/random-actions/random-actions.js +24 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.css +7 -0
- package/dist/{qbs-ect-cmp/selfie-capture.entry.js → collection/components/common/selfie-capture/selfie-capture.js} +95 -24
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
- package/dist/{qbs-ect-cmp/selfie-tilt.entry.js → collection/components/common/selfie-tilt/selfie-tilt.js} +95 -24
- package/dist/collection/components/controls/camera/camera.css +47 -0
- package/dist/collection/components/controls/camera/camera.js +289 -0
- package/dist/collection/components/controls/loader-dots/loader-dots.css +61 -0
- package/dist/collection/components/controls/loader-dots/loader-dots.js +18 -0
- package/dist/collection/components/flow/agreement-info/agreement-info.css +0 -0
- package/dist/{qbs-ect-cmp/agreement-info.entry.js → collection/components/flow/agreement-info/agreement-info.js} +57 -18
- package/dist/collection/components/flow/end-redirect/end-redirect.css +128 -0
- package/dist/collection/components/flow/end-redirect/end-redirect.js +47 -0
- package/dist/collection/components/flow/error-end/error-end.css +0 -0
- package/dist/collection/components/flow/error-end/error-end.js +61 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.css +0 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.js +122 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.css +10 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +143 -0
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/{qbs-ect-cmp/process-id.entry.js → collection/components/flow/process-id/process-id.js} +100 -32
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.css +0 -0
- package/dist/{qbs-ect-cmp/sms-code-validation.entry.js → collection/components/flow/sms-code-validation/sms-code-validation.js} +63 -30
- package/dist/collection/components/flow/user-liveness/user-liveness.css +0 -0
- package/dist/{qbs-ect-cmp/user-liveness.entry.js → collection/components/flow/user-liveness/user-liveness.js} +91 -25
- package/dist/collection/components/identification-component/identification-component.css +991 -0
- package/dist/collection/components/identification-component/identification-component.js +408 -0
- package/dist/collection/global.js +0 -0
- package/dist/collection/helpers/ApiCall.js +223 -0
- package/dist/{qbs-ect-cmp/Cameras-dfbebc29.js → collection/helpers/Cameras.js} +6 -9
- package/dist/collection/helpers/DeviceDetection.js +85 -0
- package/dist/collection/helpers/Events.js +58 -0
- package/dist/collection/helpers/ML5.js +38 -0
- package/dist/collection/helpers/Stream.js +229 -0
- package/dist/collection/helpers/TranslationUtils.js +37 -0
- package/dist/collection/helpers/canvas.js +10 -0
- package/dist/collection/helpers/index.js +21 -0
- package/dist/collection/helpers/security.js +25 -0
- package/dist/collection/helpers/store.js +48 -0
- package/dist/collection/helpers/textValues.js +48 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +182 -0
- package/dist/collection/libs/FaceML5Detector/FacePose.js +85 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +99 -0
- package/dist/{qbs-ect-cmp/IDPose-181bcb25.js → collection/libs/IDML5Detector/IDPose.js} +2 -4
- package/dist/{qbs-ect-cmp/CaptureFlow-db5d90a4.js → collection/models/CaptureFlow.js} +4 -6
- package/dist/collection/models/FlowStatus.js +14 -0
- package/dist/collection/models/FlowSteps.js +30 -0
- package/dist/collection/models/IAbortResult.js +1 -0
- package/dist/collection/models/IAddRequest.js +1 -0
- package/dist/collection/models/IAgreement.js +1 -0
- package/dist/collection/models/ICamera.js +1 -0
- package/dist/{qbs-ect-cmp/IDevice-15ecfdeb.js → collection/models/IDevice.js} +4 -6
- package/dist/collection/models/IEctStore.js +1 -0
- package/dist/collection/models/IGeneration.js +1 -0
- package/dist/collection/models/ILinkSend.js +1 -0
- package/dist/collection/models/ILogResult.js +1 -0
- package/dist/collection/models/IOrderStatus.js +1 -0
- package/dist/collection/models/IOtpCheck.js +1 -0
- package/dist/collection/models/IOtpSend.js +1 -0
- package/dist/collection/models/ITranslationValues.js +1 -0
- package/dist/collection/models/IUploadFile.js +1 -0
- package/dist/collection/models/IVerificationMode.js +5 -0
- package/dist/collection/models/OrderStatuses.js +8 -0
- package/dist/{qbs-ect-cmp/utils-8225f0b7.js → collection/utils/utils.js} +8 -10
- package/dist/esm/agreement-check_19.entry.js +9476 -0
- package/dist/{qbs-ect-cmp/base-component-2e490fd9.js → esm/base-component-b7f50d31.js} +384 -62
- package/dist/esm/index-cf54a432.js +1543 -0
- package/dist/esm/index.js +1 -0
- package/dist/{qbs-ect-cmp → esm}/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/qbs-ect-cmp.js +18 -0
- package/dist/{qbs-ect-cmp → esm}/random-actions.entry.js +2 -4
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +11 -0
- package/dist/qbs-ect-cmp/index.esm.js +0 -1
- package/dist/qbs-ect-cmp/p-054dc5b3.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-215a7e76.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-7bedffaa.js +1 -0
- package/dist/qbs-ect-cmp/p-8942656c.js +2 -0
- package/dist/qbs-ect-cmp/p-c32a782a.entry.js +1373 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.css +1 -320
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -148
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/ML5-657ef934.js +0 -1370
- package/dist/qbs-ect-cmp/Stream-b867a2be.js +0 -3104
- package/dist/qbs-ect-cmp/_commonjsHelpers-321aa363.js +0 -44
- package/dist/qbs-ect-cmp/agreement-check.entry.js +0 -41
- package/dist/qbs-ect-cmp/app-globals-0f993ce5.js +0 -3
- package/dist/qbs-ect-cmp/camera-comp.entry.js +0 -103
- package/dist/qbs-ect-cmp/css-shim-b7d3d95f.js +0 -4
- package/dist/qbs-ect-cmp/dom-64053c71.js +0 -73
- package/dist/qbs-ect-cmp/end-redirect.entry.js +0 -25
- package/dist/qbs-ect-cmp/error-end.entry.js +0 -19
- package/dist/qbs-ect-cmp/how-to-info.entry.js +0 -52
- package/dist/qbs-ect-cmp/identification-component.entry.js +0 -909
- package/dist/qbs-ect-cmp/index-78a05b9e.js +0 -3371
- package/dist/qbs-ect-cmp/landing-validation.entry.js +0 -90
- package/dist/qbs-ect-cmp/mobile-redirect.entry.js +0 -2984
- package/dist/qbs-ect-cmp/shadow-css-98135883.js +0 -387
- package/dist/qbs-ect-cmp/textValues-6bcc85dd.js +0 -302
|
@@ -1,64 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as MobileOS, D as DesktopOS, B as Browser } from './IDevice-15ecfdeb.js';
|
|
3
|
-
|
|
4
|
-
class Events {
|
|
5
|
-
static init(element) {
|
|
6
|
-
this.callingModule = element;
|
|
7
|
-
}
|
|
8
|
-
static flowEvent(step, moment) {
|
|
9
|
-
const eventName = `ect-${step.toString()}-${moment.toString()}-event`;
|
|
10
|
-
this.callingModule.dispatchEvent(new CustomEvent(eventName, {
|
|
11
|
-
detail: {},
|
|
12
|
-
bubbles: true,
|
|
13
|
-
cancelable: true,
|
|
14
|
-
composed: true,
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
static flowStarted() {
|
|
18
|
-
this.callingModule.dispatchEvent(new CustomEvent('ect-started', {
|
|
19
|
-
detail: {},
|
|
20
|
-
bubbles: true,
|
|
21
|
-
cancelable: true,
|
|
22
|
-
composed: true,
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
static flowAborted() {
|
|
26
|
-
sessionStorage.clear();
|
|
27
|
-
this.callingModule.dispatchEvent(new CustomEvent('ect-aborted', {
|
|
28
|
-
detail: {},
|
|
29
|
-
bubbles: true,
|
|
30
|
-
cancelable: true,
|
|
31
|
-
composed: true,
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
static flowCompleted() {
|
|
35
|
-
sessionStorage.clear();
|
|
36
|
-
this.callingModule.dispatchEvent(new CustomEvent('ect-completed', {
|
|
37
|
-
detail: {},
|
|
38
|
-
bubbles: true,
|
|
39
|
-
cancelable: true,
|
|
40
|
-
composed: true,
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
static flowError(error) {
|
|
44
|
-
sessionStorage.clear();
|
|
45
|
-
this.callingModule.dispatchEvent(new CustomEvent('ect-error', {
|
|
46
|
-
detail: { error },
|
|
47
|
-
bubbles: true,
|
|
48
|
-
cancelable: true,
|
|
49
|
-
composed: true,
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
static tokenExpired() {
|
|
53
|
-
sessionStorage.clear();
|
|
54
|
-
this.callingModule.dispatchEvent(new CustomEvent('ect-session-expired', {
|
|
55
|
-
detail: {},
|
|
56
|
-
bubbles: true,
|
|
57
|
-
cancelable: true,
|
|
58
|
-
composed: true,
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
import { a as getRenderingRef, f as forceUpdate } from './index-cf54a432.js';
|
|
62
2
|
|
|
63
3
|
var OrderStatuses;
|
|
64
4
|
(function (OrderStatuses) {
|
|
@@ -69,6 +9,305 @@ var OrderStatuses;
|
|
|
69
9
|
OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
|
|
70
10
|
})(OrderStatuses || (OrderStatuses = {}));
|
|
71
11
|
|
|
12
|
+
const appendToMap = (map, propName, value) => {
|
|
13
|
+
const items = map.get(propName);
|
|
14
|
+
if (!items) {
|
|
15
|
+
map.set(propName, [value]);
|
|
16
|
+
}
|
|
17
|
+
else if (!items.includes(value)) {
|
|
18
|
+
items.push(value);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const debounce = (fn, ms) => {
|
|
22
|
+
let timeoutId;
|
|
23
|
+
return (...args) => {
|
|
24
|
+
if (timeoutId) {
|
|
25
|
+
clearTimeout(timeoutId);
|
|
26
|
+
}
|
|
27
|
+
timeoutId = setTimeout(() => {
|
|
28
|
+
timeoutId = 0;
|
|
29
|
+
fn(...args);
|
|
30
|
+
}, ms);
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Check if a possible element isConnected.
|
|
36
|
+
* The property might not be there, so we check for it.
|
|
37
|
+
*
|
|
38
|
+
* We want it to return true if isConnected is not a property,
|
|
39
|
+
* otherwise we would remove these elements and would not update.
|
|
40
|
+
*
|
|
41
|
+
* Better leak in Edge than to be useless.
|
|
42
|
+
*/
|
|
43
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
44
|
+
const cleanupElements = debounce((map) => {
|
|
45
|
+
for (let key of map.keys()) {
|
|
46
|
+
map.set(key, map.get(key).filter(isConnected));
|
|
47
|
+
}
|
|
48
|
+
}, 2000);
|
|
49
|
+
const stencilSubscription = () => {
|
|
50
|
+
if (typeof getRenderingRef !== 'function') {
|
|
51
|
+
// If we are not in a stencil project, we do nothing.
|
|
52
|
+
// This function is not really exported by @stencil/core.
|
|
53
|
+
return {};
|
|
54
|
+
}
|
|
55
|
+
const elmsToUpdate = new Map();
|
|
56
|
+
return {
|
|
57
|
+
dispose: () => elmsToUpdate.clear(),
|
|
58
|
+
get: (propName) => {
|
|
59
|
+
const elm = getRenderingRef();
|
|
60
|
+
if (elm) {
|
|
61
|
+
appendToMap(elmsToUpdate, propName, elm);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
set: (propName) => {
|
|
65
|
+
const elements = elmsToUpdate.get(propName);
|
|
66
|
+
if (elements) {
|
|
67
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
|
68
|
+
}
|
|
69
|
+
cleanupElements(elmsToUpdate);
|
|
70
|
+
},
|
|
71
|
+
reset: () => {
|
|
72
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
|
73
|
+
cleanupElements(elmsToUpdate);
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
79
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
80
|
+
const unwrappedState = unwrap(defaultState);
|
|
81
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
|
82
|
+
const handlers = {
|
|
83
|
+
dispose: [],
|
|
84
|
+
get: [],
|
|
85
|
+
set: [],
|
|
86
|
+
reset: [],
|
|
87
|
+
};
|
|
88
|
+
const reset = () => {
|
|
89
|
+
var _a;
|
|
90
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
91
|
+
// otherwise, the state won't be properly reset
|
|
92
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
|
93
|
+
handlers.reset.forEach((cb) => cb());
|
|
94
|
+
};
|
|
95
|
+
const dispose = () => {
|
|
96
|
+
// Call first dispose as resetting the state would
|
|
97
|
+
// cause less updates ;)
|
|
98
|
+
handlers.dispose.forEach((cb) => cb());
|
|
99
|
+
reset();
|
|
100
|
+
};
|
|
101
|
+
const get = (propName) => {
|
|
102
|
+
handlers.get.forEach((cb) => cb(propName));
|
|
103
|
+
return states.get(propName);
|
|
104
|
+
};
|
|
105
|
+
const set = (propName, value) => {
|
|
106
|
+
const oldValue = states.get(propName);
|
|
107
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
|
108
|
+
states.set(propName, value);
|
|
109
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const state = (typeof Proxy === 'undefined'
|
|
113
|
+
? {}
|
|
114
|
+
: new Proxy(unwrappedState, {
|
|
115
|
+
get(_, propName) {
|
|
116
|
+
return get(propName);
|
|
117
|
+
},
|
|
118
|
+
ownKeys(_) {
|
|
119
|
+
return Array.from(states.keys());
|
|
120
|
+
},
|
|
121
|
+
getOwnPropertyDescriptor() {
|
|
122
|
+
return {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
configurable: true,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
has(_, propName) {
|
|
128
|
+
return states.has(propName);
|
|
129
|
+
},
|
|
130
|
+
set(_, propName, value) {
|
|
131
|
+
set(propName, value);
|
|
132
|
+
return true;
|
|
133
|
+
},
|
|
134
|
+
}));
|
|
135
|
+
const on = (eventName, callback) => {
|
|
136
|
+
handlers[eventName].push(callback);
|
|
137
|
+
return () => {
|
|
138
|
+
removeFromArray(handlers[eventName], callback);
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
const onChange = (propName, cb) => {
|
|
142
|
+
const unSet = on('set', (key, newValue) => {
|
|
143
|
+
if (key === propName) {
|
|
144
|
+
cb(newValue);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
// We need to unwrap the defaultState because it might be a function.
|
|
148
|
+
// Otherwise we might not be sending the right reset value.
|
|
149
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
|
150
|
+
return () => {
|
|
151
|
+
unSet();
|
|
152
|
+
unReset();
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
const use = (...subscriptions) => {
|
|
156
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
157
|
+
if (subscription.set) {
|
|
158
|
+
unsubs.push(on('set', subscription.set));
|
|
159
|
+
}
|
|
160
|
+
if (subscription.get) {
|
|
161
|
+
unsubs.push(on('get', subscription.get));
|
|
162
|
+
}
|
|
163
|
+
if (subscription.reset) {
|
|
164
|
+
unsubs.push(on('reset', subscription.reset));
|
|
165
|
+
}
|
|
166
|
+
if (subscription.dispose) {
|
|
167
|
+
unsubs.push(on('dispose', subscription.dispose));
|
|
168
|
+
}
|
|
169
|
+
return unsubs;
|
|
170
|
+
}, []);
|
|
171
|
+
return () => unsubs.forEach((unsub) => unsub());
|
|
172
|
+
};
|
|
173
|
+
const forceUpdate = (key) => {
|
|
174
|
+
const oldValue = states.get(key);
|
|
175
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
176
|
+
};
|
|
177
|
+
return {
|
|
178
|
+
state,
|
|
179
|
+
get,
|
|
180
|
+
set,
|
|
181
|
+
on,
|
|
182
|
+
onChange,
|
|
183
|
+
use,
|
|
184
|
+
dispose,
|
|
185
|
+
reset,
|
|
186
|
+
forceUpdate,
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
const removeFromArray = (array, item) => {
|
|
190
|
+
const index = array.indexOf(item);
|
|
191
|
+
if (index >= 0) {
|
|
192
|
+
array[index] = array[array.length - 1];
|
|
193
|
+
array.length--;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const createStore = (defaultState, shouldUpdate) => {
|
|
198
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
|
199
|
+
map.use(stencilSubscription());
|
|
200
|
+
return map;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
var FlowStatus;
|
|
204
|
+
(function (FlowStatus) {
|
|
205
|
+
FlowStatus[FlowStatus["LANDING"] = 0] = "LANDING";
|
|
206
|
+
FlowStatus[FlowStatus["AGREEMENT"] = 1] = "AGREEMENT";
|
|
207
|
+
FlowStatus[FlowStatus["PHONE"] = 2] = "PHONE";
|
|
208
|
+
FlowStatus[FlowStatus["CODE"] = 3] = "CODE";
|
|
209
|
+
FlowStatus[FlowStatus["CODEERROR"] = 4] = "CODEERROR";
|
|
210
|
+
FlowStatus[FlowStatus["ID"] = 5] = "ID";
|
|
211
|
+
FlowStatus[FlowStatus["LIVENESS"] = 6] = "LIVENESS";
|
|
212
|
+
FlowStatus[FlowStatus["COMPLETE"] = 7] = "COMPLETE";
|
|
213
|
+
FlowStatus[FlowStatus["ERROREND"] = 8] = "ERROREND";
|
|
214
|
+
FlowStatus[FlowStatus["CAMERAERROR"] = 9] = "CAMERAERROR";
|
|
215
|
+
FlowStatus[FlowStatus["NONE"] = 10] = "NONE";
|
|
216
|
+
})(FlowStatus || (FlowStatus = {}));
|
|
217
|
+
|
|
218
|
+
class IdCaptureValues {
|
|
219
|
+
}
|
|
220
|
+
IdCaptureValues.IDPoseDemoMapping = {
|
|
221
|
+
0: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_front.mp4',
|
|
222
|
+
1: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_front_tilt.mp4',
|
|
223
|
+
2: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_rotate.mp4',
|
|
224
|
+
3: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_back.mp4',
|
|
225
|
+
4: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_back_tilt.mp4',
|
|
226
|
+
};
|
|
227
|
+
class SelfieCaptureValues {
|
|
228
|
+
}
|
|
229
|
+
SelfieCaptureValues.FacePoseDemoMapping = {
|
|
230
|
+
0: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_left.mp4',
|
|
231
|
+
1: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_right.mp4',
|
|
232
|
+
2: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_back.mp4',
|
|
233
|
+
3: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_front.mp4',
|
|
234
|
+
// 4: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_left.mp4',
|
|
235
|
+
// 5: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_right.mp4',
|
|
236
|
+
4: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_main.mp4',
|
|
237
|
+
};
|
|
238
|
+
class SessionKeys {
|
|
239
|
+
}
|
|
240
|
+
SessionKeys.FlowStatusKey = 'qbs-ect-flowstatus';
|
|
241
|
+
SessionKeys.RequestIdKey = 'qbs-ect-requestid';
|
|
242
|
+
SessionKeys.TokenKey = 'qbs-ect-token';
|
|
243
|
+
SessionKeys.InitialisedKey = 'qbs-ect-initialised';
|
|
244
|
+
SessionKeys.HasIdBackKey = 'qbs-ect-has-id-back';
|
|
245
|
+
SessionKeys.AgreementValidationKey = 'qbs-ect-agreement-validation';
|
|
246
|
+
SessionKeys.PhoneValidationKey = 'qbs-ect-phone-validation';
|
|
247
|
+
SessionKeys.RefreshDoneKey = 'qbs-ect-refresh-done';
|
|
248
|
+
class ApiUrls {
|
|
249
|
+
constructor() {
|
|
250
|
+
this.uriEnv = '/';
|
|
251
|
+
this.uriEnv = state.environment == 'QA' ? '/dev_' : '/';
|
|
252
|
+
this.OtpSend = this.uriEnv + 'validation/otp/send';
|
|
253
|
+
this.OtpCheck = this.uriEnv + 'validation/otp/check';
|
|
254
|
+
this.IdentityInsert = this.uriEnv + 'validation/identity/insert';
|
|
255
|
+
this.UploadCapture = this.uriEnv + 'validation/upload/capture';
|
|
256
|
+
this.GetAgreement = this.uriEnv + 'validation/agreement/content';
|
|
257
|
+
this.GenerateAgreement = this.uriEnv + 'validation/agreement/generate';
|
|
258
|
+
this.SendLink = this.uriEnv + 'validation/otp/sendlink';
|
|
259
|
+
this.GetStatus = this.uriEnv + 'validation/identity/status';
|
|
260
|
+
this.AddLog = this.uriEnv + 'validation/logs/add';
|
|
261
|
+
this.AddStep = this.uriEnv + 'validation/logs/step';
|
|
262
|
+
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const { state, onChange } = createStore({
|
|
267
|
+
flowStatus: FlowStatus.NONE,
|
|
268
|
+
environment: 'PROD',
|
|
269
|
+
debug: false,
|
|
270
|
+
requestId: '',
|
|
271
|
+
redirectId: '',
|
|
272
|
+
initialised: false,
|
|
273
|
+
token: '',
|
|
274
|
+
cameraIds: [],
|
|
275
|
+
cameraId: '',
|
|
276
|
+
hasIdBack: false,
|
|
277
|
+
hasSelfieGesture: false,
|
|
278
|
+
hasIdTilt: false,
|
|
279
|
+
agreementsValidation: true,
|
|
280
|
+
phoneValidation: true,
|
|
281
|
+
phoneNumber: '',
|
|
282
|
+
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
283
|
+
device: null,
|
|
284
|
+
langIso: 'ro',
|
|
285
|
+
});
|
|
286
|
+
onChange('environment', value => {
|
|
287
|
+
state.debug = value == 'QA';
|
|
288
|
+
});
|
|
289
|
+
onChange('flowStatus', value => {
|
|
290
|
+
sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
|
|
291
|
+
});
|
|
292
|
+
onChange('token', value => {
|
|
293
|
+
sessionStorage.setItem(SessionKeys.TokenKey, value);
|
|
294
|
+
});
|
|
295
|
+
onChange('requestId', value => {
|
|
296
|
+
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
297
|
+
});
|
|
298
|
+
onChange('initialised', value => {
|
|
299
|
+
sessionStorage.setItem(SessionKeys.InitialisedKey, String(value));
|
|
300
|
+
});
|
|
301
|
+
onChange('hasIdBack', value => {
|
|
302
|
+
sessionStorage.setItem(SessionKeys.HasIdBackKey, String(value));
|
|
303
|
+
});
|
|
304
|
+
onChange('agreementsValidation', value => {
|
|
305
|
+
sessionStorage.setItem(SessionKeys.AgreementValidationKey, String(value));
|
|
306
|
+
});
|
|
307
|
+
onChange('phoneValidation', value => {
|
|
308
|
+
sessionStorage.setItem(SessionKeys.PhoneValidationKey, String(value));
|
|
309
|
+
});
|
|
310
|
+
|
|
72
311
|
var FlowSteps;
|
|
73
312
|
(function (FlowSteps) {
|
|
74
313
|
FlowSteps[FlowSteps["ComponentLoaded"] = 'component-loaded'] = "ComponentLoaded";
|
|
@@ -319,6 +558,30 @@ class ApiCall {
|
|
|
319
558
|
}
|
|
320
559
|
}
|
|
321
560
|
|
|
561
|
+
var MobileOS;
|
|
562
|
+
(function (MobileOS) {
|
|
563
|
+
MobileOS["Android"] = "android";
|
|
564
|
+
MobileOS["iOS"] = "ios";
|
|
565
|
+
MobileOS["Unknown"] = "unknown";
|
|
566
|
+
MobileOS["WindowsPhone"] = "Windows Phone";
|
|
567
|
+
})(MobileOS || (MobileOS = {}));
|
|
568
|
+
var DesktopOS;
|
|
569
|
+
(function (DesktopOS) {
|
|
570
|
+
DesktopOS["Linux"] = "linux";
|
|
571
|
+
DesktopOS["MacOS"] = "mac_os";
|
|
572
|
+
DesktopOS["Unix"] = "unix";
|
|
573
|
+
DesktopOS["Unknown"] = "unknown";
|
|
574
|
+
DesktopOS["Windows"] = "windows";
|
|
575
|
+
})(DesktopOS || (DesktopOS = {}));
|
|
576
|
+
var Browser;
|
|
577
|
+
(function (Browser) {
|
|
578
|
+
Browser["Chrome"] = "chrome";
|
|
579
|
+
Browser["Firefox"] = "firefox";
|
|
580
|
+
Browser["Safari"] = "safari";
|
|
581
|
+
Browser["Mi"] = "mi";
|
|
582
|
+
Browser["Unknown"] = "unknown";
|
|
583
|
+
})(Browser || (Browser = {}));
|
|
584
|
+
|
|
322
585
|
class DeviceDetection {
|
|
323
586
|
constructor() {
|
|
324
587
|
var _a, _b, _c, _d;
|
|
@@ -404,6 +667,65 @@ class DeviceDetection {
|
|
|
404
667
|
}
|
|
405
668
|
}
|
|
406
669
|
|
|
670
|
+
class Events {
|
|
671
|
+
static init(element) {
|
|
672
|
+
this.callingModule = element;
|
|
673
|
+
}
|
|
674
|
+
static flowEvent(step, moment) {
|
|
675
|
+
const eventName = `ect-${step.toString()}-${moment.toString()}-event`;
|
|
676
|
+
this.callingModule.dispatchEvent(new CustomEvent(eventName, {
|
|
677
|
+
detail: {},
|
|
678
|
+
bubbles: true,
|
|
679
|
+
cancelable: true,
|
|
680
|
+
composed: true,
|
|
681
|
+
}));
|
|
682
|
+
}
|
|
683
|
+
static flowStarted() {
|
|
684
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-started', {
|
|
685
|
+
detail: {},
|
|
686
|
+
bubbles: true,
|
|
687
|
+
cancelable: true,
|
|
688
|
+
composed: true,
|
|
689
|
+
}));
|
|
690
|
+
}
|
|
691
|
+
static flowAborted() {
|
|
692
|
+
sessionStorage.clear();
|
|
693
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-aborted', {
|
|
694
|
+
detail: {},
|
|
695
|
+
bubbles: true,
|
|
696
|
+
cancelable: true,
|
|
697
|
+
composed: true,
|
|
698
|
+
}));
|
|
699
|
+
}
|
|
700
|
+
static flowCompleted() {
|
|
701
|
+
sessionStorage.clear();
|
|
702
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-completed', {
|
|
703
|
+
detail: {},
|
|
704
|
+
bubbles: true,
|
|
705
|
+
cancelable: true,
|
|
706
|
+
composed: true,
|
|
707
|
+
}));
|
|
708
|
+
}
|
|
709
|
+
static flowError(error) {
|
|
710
|
+
sessionStorage.clear();
|
|
711
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-error', {
|
|
712
|
+
detail: { error },
|
|
713
|
+
bubbles: true,
|
|
714
|
+
cancelable: true,
|
|
715
|
+
composed: true,
|
|
716
|
+
}));
|
|
717
|
+
}
|
|
718
|
+
static tokenExpired() {
|
|
719
|
+
sessionStorage.clear();
|
|
720
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-session-expired', {
|
|
721
|
+
detail: {},
|
|
722
|
+
bubbles: true,
|
|
723
|
+
cancelable: true,
|
|
724
|
+
composed: true,
|
|
725
|
+
}));
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
407
729
|
class TranslationsController {
|
|
408
730
|
async getValues() {
|
|
409
731
|
if (this.values) {
|
|
@@ -499,4 +821,4 @@ class BaseComponent {
|
|
|
499
821
|
}
|
|
500
822
|
}
|
|
501
823
|
|
|
502
|
-
export { ApiCall as A, BaseComponent as B, Events as E, FlowSteps as F, OrderStatuses as O,
|
|
824
|
+
export { ApiCall as A, BaseComponent as B, Events as E, FlowSteps as F, IdCaptureValues as I, MobileOS as M, OrderStatuses as O, SessionKeys as S, FlowStatus as a, Browser as b, FlowMoments as c, SelfieCaptureValues as d, state as s };
|