@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.
Files changed (148) hide show
  1. package/dist/cjs/agreement-check_19.cjs.entry.js +9498 -0
  2. package/dist/cjs/base-component-aa9e52bf.js +832 -0
  3. package/dist/cjs/index-41696e0e.js +1573 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader-dots.cjs.entry.js +19 -0
  6. package/dist/cjs/loader.cjs.js +22 -0
  7. package/dist/cjs/qbs-ect-cmp.cjs.js +23 -0
  8. package/dist/cjs/random-actions.cjs.entry.js +23 -0
  9. package/dist/collection/assets/canvas-masks/face_green.svg +8 -0
  10. package/dist/collection/assets/canvas-masks/face_white.svg +8 -0
  11. package/dist/collection/assets/canvas-masks/id_green.svg +6 -0
  12. package/dist/collection/assets/canvas-masks/id_white.svg +6 -0
  13. package/dist/collection/assets/complete.svg +4 -0
  14. package/dist/collection/assets/landing/device.svg +14 -0
  15. package/dist/collection/assets/landing/id.svg +3 -0
  16. package/dist/collection/assets/landing/info.svg +3 -0
  17. package/dist/collection/assets/landing/validation.svg +16 -0
  18. package/dist/collection/assets/loader.svg +29 -0
  19. package/dist/collection/collection-manifest.json +32 -0
  20. package/dist/collection/components/base-component.js +63 -0
  21. package/dist/collection/components/common/agreement-check/agreement-check.css +0 -0
  22. package/dist/collection/components/common/agreement-check/agreement-check.js +104 -0
  23. package/dist/collection/components/common/camera-error/camera-error.css +0 -0
  24. package/dist/{qbs-ect-cmp/camera-error.entry.js → collection/components/common/camera-error/camera-error.js} +52 -20
  25. package/dist/collection/components/common/capture-error/capture-error.css +0 -0
  26. package/dist/{qbs-ect-cmp/capture-error.entry.js → collection/components/common/capture-error/capture-error.js} +63 -16
  27. package/dist/collection/components/common/how-to-info/how-to-info.css +0 -0
  28. package/dist/collection/components/common/how-to-info/how-to-info.js +121 -0
  29. package/dist/collection/components/common/id-back-capture/id-back-capture.css +35 -0
  30. package/dist/{qbs-ect-cmp/id-back-capture.entry.js → collection/components/common/id-back-capture/id-back-capture.js} +94 -24
  31. package/dist/collection/components/common/id-capture/id-capture.css +35 -0
  32. package/dist/{qbs-ect-cmp/id-capture.entry.js → collection/components/common/id-capture/id-capture.js} +94 -24
  33. package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
  34. package/dist/{qbs-ect-cmp/id-tilt.entry.js → collection/components/common/id-tilt/id-tilt.js} +94 -24
  35. package/dist/collection/components/common/random-actions/random-actions.css +0 -0
  36. package/dist/collection/components/common/random-actions/random-actions.js +24 -0
  37. package/dist/collection/components/common/selfie-capture/selfie-capture.css +7 -0
  38. package/dist/{qbs-ect-cmp/selfie-capture.entry.js → collection/components/common/selfie-capture/selfie-capture.js} +95 -24
  39. package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
  40. package/dist/{qbs-ect-cmp/selfie-tilt.entry.js → collection/components/common/selfie-tilt/selfie-tilt.js} +95 -24
  41. package/dist/collection/components/controls/camera/camera.css +47 -0
  42. package/dist/collection/components/controls/camera/camera.js +289 -0
  43. package/dist/collection/components/controls/loader-dots/loader-dots.css +61 -0
  44. package/dist/collection/components/controls/loader-dots/loader-dots.js +18 -0
  45. package/dist/collection/components/flow/agreement-info/agreement-info.css +0 -0
  46. package/dist/{qbs-ect-cmp/agreement-info.entry.js → collection/components/flow/agreement-info/agreement-info.js} +57 -18
  47. package/dist/collection/components/flow/end-redirect/end-redirect.css +128 -0
  48. package/dist/collection/components/flow/end-redirect/end-redirect.js +47 -0
  49. package/dist/collection/components/flow/error-end/error-end.css +0 -0
  50. package/dist/collection/components/flow/error-end/error-end.js +61 -0
  51. package/dist/collection/components/flow/landing-validation/landing-validation.css +0 -0
  52. package/dist/collection/components/flow/landing-validation/landing-validation.js +122 -0
  53. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.css +10 -0
  54. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +143 -0
  55. package/dist/collection/components/flow/process-id/process-id.css +0 -0
  56. package/dist/{qbs-ect-cmp/process-id.entry.js → collection/components/flow/process-id/process-id.js} +100 -32
  57. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.css +0 -0
  58. package/dist/{qbs-ect-cmp/sms-code-validation.entry.js → collection/components/flow/sms-code-validation/sms-code-validation.js} +63 -30
  59. package/dist/collection/components/flow/user-liveness/user-liveness.css +0 -0
  60. package/dist/{qbs-ect-cmp/user-liveness.entry.js → collection/components/flow/user-liveness/user-liveness.js} +91 -25
  61. package/dist/collection/components/identification-component/identification-component.css +991 -0
  62. package/dist/collection/components/identification-component/identification-component.js +408 -0
  63. package/dist/collection/global.js +0 -0
  64. package/dist/collection/helpers/ApiCall.js +223 -0
  65. package/dist/{qbs-ect-cmp/Cameras-dfbebc29.js → collection/helpers/Cameras.js} +6 -9
  66. package/dist/collection/helpers/DeviceDetection.js +85 -0
  67. package/dist/collection/helpers/Events.js +58 -0
  68. package/dist/collection/helpers/ML5.js +38 -0
  69. package/dist/collection/helpers/Stream.js +229 -0
  70. package/dist/collection/helpers/TranslationUtils.js +37 -0
  71. package/dist/collection/helpers/canvas.js +10 -0
  72. package/dist/collection/helpers/index.js +21 -0
  73. package/dist/collection/helpers/security.js +25 -0
  74. package/dist/collection/helpers/store.js +48 -0
  75. package/dist/collection/helpers/textValues.js +48 -0
  76. package/dist/collection/index.js +1 -0
  77. package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +182 -0
  78. package/dist/collection/libs/FaceML5Detector/FacePose.js +85 -0
  79. package/dist/collection/libs/IDML5Detector/IDML5Detector.js +99 -0
  80. package/dist/{qbs-ect-cmp/IDPose-181bcb25.js → collection/libs/IDML5Detector/IDPose.js} +2 -4
  81. package/dist/{qbs-ect-cmp/CaptureFlow-db5d90a4.js → collection/models/CaptureFlow.js} +4 -6
  82. package/dist/collection/models/FlowStatus.js +14 -0
  83. package/dist/collection/models/FlowSteps.js +30 -0
  84. package/dist/collection/models/IAbortResult.js +1 -0
  85. package/dist/collection/models/IAddRequest.js +1 -0
  86. package/dist/collection/models/IAgreement.js +1 -0
  87. package/dist/collection/models/ICamera.js +1 -0
  88. package/dist/{qbs-ect-cmp/IDevice-15ecfdeb.js → collection/models/IDevice.js} +4 -6
  89. package/dist/collection/models/IEctStore.js +1 -0
  90. package/dist/collection/models/IGeneration.js +1 -0
  91. package/dist/collection/models/ILinkSend.js +1 -0
  92. package/dist/collection/models/ILogResult.js +1 -0
  93. package/dist/collection/models/IOrderStatus.js +1 -0
  94. package/dist/collection/models/IOtpCheck.js +1 -0
  95. package/dist/collection/models/IOtpSend.js +1 -0
  96. package/dist/collection/models/ITranslationValues.js +1 -0
  97. package/dist/collection/models/IUploadFile.js +1 -0
  98. package/dist/collection/models/IVerificationMode.js +5 -0
  99. package/dist/collection/models/OrderStatuses.js +8 -0
  100. package/dist/{qbs-ect-cmp/utils-8225f0b7.js → collection/utils/utils.js} +8 -10
  101. package/dist/esm/agreement-check_19.entry.js +9476 -0
  102. package/dist/{qbs-ect-cmp/base-component-2e490fd9.js → esm/base-component-b7f50d31.js} +384 -62
  103. package/dist/esm/index-cf54a432.js +1543 -0
  104. package/dist/esm/index.js +1 -0
  105. package/dist/{qbs-ect-cmp → esm}/loader-dots.entry.js +1 -1
  106. package/dist/esm/loader.js +18 -0
  107. package/dist/esm/polyfills/core-js.js +11 -0
  108. package/dist/esm/polyfills/css-shim.js +1 -0
  109. package/dist/esm/polyfills/dom.js +79 -0
  110. package/dist/esm/polyfills/es5-html-element.js +1 -0
  111. package/dist/esm/polyfills/index.js +34 -0
  112. package/dist/esm/polyfills/system.js +6 -0
  113. package/dist/esm/qbs-ect-cmp.js +18 -0
  114. package/dist/{qbs-ect-cmp → esm}/random-actions.entry.js +2 -4
  115. package/dist/index.cjs.js +1 -0
  116. package/dist/index.js +1 -0
  117. package/dist/loader/cdn.js +3 -0
  118. package/dist/loader/index.cjs.js +3 -0
  119. package/dist/loader/index.d.ts +21 -0
  120. package/dist/loader/index.es2017.js +3 -0
  121. package/dist/loader/index.js +4 -0
  122. package/dist/loader/package.json +11 -0
  123. package/dist/qbs-ect-cmp/index.esm.js +0 -1
  124. package/dist/qbs-ect-cmp/p-054dc5b3.entry.js +1 -0
  125. package/dist/qbs-ect-cmp/p-215a7e76.entry.js +1 -0
  126. package/dist/qbs-ect-cmp/p-7bedffaa.js +1 -0
  127. package/dist/qbs-ect-cmp/p-8942656c.js +2 -0
  128. package/dist/qbs-ect-cmp/p-c32a782a.entry.js +1373 -0
  129. package/dist/qbs-ect-cmp/qbs-ect-cmp.css +1 -320
  130. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -148
  131. package/package.json +1 -1
  132. package/dist/qbs-ect-cmp/ML5-657ef934.js +0 -1370
  133. package/dist/qbs-ect-cmp/Stream-b867a2be.js +0 -3104
  134. package/dist/qbs-ect-cmp/_commonjsHelpers-321aa363.js +0 -44
  135. package/dist/qbs-ect-cmp/agreement-check.entry.js +0 -41
  136. package/dist/qbs-ect-cmp/app-globals-0f993ce5.js +0 -3
  137. package/dist/qbs-ect-cmp/camera-comp.entry.js +0 -103
  138. package/dist/qbs-ect-cmp/css-shim-b7d3d95f.js +0 -4
  139. package/dist/qbs-ect-cmp/dom-64053c71.js +0 -73
  140. package/dist/qbs-ect-cmp/end-redirect.entry.js +0 -25
  141. package/dist/qbs-ect-cmp/error-end.entry.js +0 -19
  142. package/dist/qbs-ect-cmp/how-to-info.entry.js +0 -52
  143. package/dist/qbs-ect-cmp/identification-component.entry.js +0 -909
  144. package/dist/qbs-ect-cmp/index-78a05b9e.js +0 -3371
  145. package/dist/qbs-ect-cmp/landing-validation.entry.js +0 -90
  146. package/dist/qbs-ect-cmp/mobile-redirect.entry.js +0 -2984
  147. package/dist/qbs-ect-cmp/shadow-css-98135883.js +0 -387
  148. package/dist/qbs-ect-cmp/textValues-6bcc85dd.js +0 -302
@@ -1,387 +0,0 @@
1
- /*
2
- Stencil Client Platform v2.22.3 | MIT Licensed | https://stenciljs.com
3
- */
4
- /**
5
- * @license
6
- * Copyright Google Inc. All Rights Reserved.
7
- *
8
- * Use of this source code is governed by an MIT-style license that can be
9
- * found in the LICENSE file at https://angular.io/license
10
- *
11
- * This file is a port of shadowCSS from webcomponents.js to TypeScript.
12
- * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
13
- * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
14
- */
15
- const safeSelector = (selector) => {
16
- const placeholders = [];
17
- let index = 0;
18
- // Replaces attribute selectors with placeholders.
19
- // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
20
- selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
21
- const replaceBy = `__ph-${index}__`;
22
- placeholders.push(keep);
23
- index++;
24
- return replaceBy;
25
- });
26
- // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
27
- // WS and "+" would otherwise be interpreted as selector separators.
28
- const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
29
- const replaceBy = `__ph-${index}__`;
30
- placeholders.push(exp);
31
- index++;
32
- return pseudo + replaceBy;
33
- });
34
- const ss = {
35
- content,
36
- placeholders,
37
- };
38
- return ss;
39
- };
40
- const restoreSafeSelector = (placeholders, content) => {
41
- return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
42
- };
43
- const _polyfillHost = '-shadowcsshost';
44
- const _polyfillSlotted = '-shadowcssslotted';
45
- // note: :host-context pre-processed to -shadowcsshostcontext.
46
- const _polyfillHostContext = '-shadowcsscontext';
47
- const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
48
- const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
49
- const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
50
- const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
51
- const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
52
- const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
53
- const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
54
- const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
55
- const _polyfillHostRe = /-shadowcsshost/gim;
56
- const _colonHostRe = /:host/gim;
57
- const _colonSlottedRe = /::slotted/gim;
58
- const _colonHostContextRe = /:host-context/gim;
59
- const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
60
- const stripComments = (input) => {
61
- return input.replace(_commentRe, '');
62
- };
63
- const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
64
- const extractCommentsWithHash = (input) => {
65
- return input.match(_commentWithHashRe) || [];
66
- };
67
- const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
68
- const _curlyRe = /([{}])/g;
69
- const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
70
- const OPEN_CURLY = '{';
71
- const CLOSE_CURLY = '}';
72
- const BLOCK_PLACEHOLDER = '%BLOCK%';
73
- const processRules = (input, ruleCallback) => {
74
- const inputWithEscapedBlocks = escapeBlocks(input);
75
- let nextBlockIndex = 0;
76
- return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
77
- const selector = m[2];
78
- let content = '';
79
- let suffix = m[4];
80
- let contentPrefix = '';
81
- if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
82
- content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
83
- suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
84
- contentPrefix = '{';
85
- }
86
- const cssRule = {
87
- selector,
88
- content,
89
- };
90
- const rule = ruleCallback(cssRule);
91
- return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
92
- });
93
- };
94
- const escapeBlocks = (input) => {
95
- const inputParts = input.split(_curlyRe);
96
- const resultParts = [];
97
- const escapedBlocks = [];
98
- let bracketCount = 0;
99
- let currentBlockParts = [];
100
- for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
101
- const part = inputParts[partIndex];
102
- if (part === CLOSE_CURLY) {
103
- bracketCount--;
104
- }
105
- if (bracketCount > 0) {
106
- currentBlockParts.push(part);
107
- }
108
- else {
109
- if (currentBlockParts.length > 0) {
110
- escapedBlocks.push(currentBlockParts.join(''));
111
- resultParts.push(BLOCK_PLACEHOLDER);
112
- currentBlockParts = [];
113
- }
114
- resultParts.push(part);
115
- }
116
- if (part === OPEN_CURLY) {
117
- bracketCount++;
118
- }
119
- }
120
- if (currentBlockParts.length > 0) {
121
- escapedBlocks.push(currentBlockParts.join(''));
122
- resultParts.push(BLOCK_PLACEHOLDER);
123
- }
124
- const strEscapedBlocks = {
125
- escapedString: resultParts.join(''),
126
- blocks: escapedBlocks,
127
- };
128
- return strEscapedBlocks;
129
- };
130
- const insertPolyfillHostInCssText = (selector) => {
131
- selector = selector
132
- .replace(_colonHostContextRe, _polyfillHostContext)
133
- .replace(_colonHostRe, _polyfillHost)
134
- .replace(_colonSlottedRe, _polyfillSlotted);
135
- return selector;
136
- };
137
- const convertColonRule = (cssText, regExp, partReplacer) => {
138
- // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
139
- return cssText.replace(regExp, (...m) => {
140
- if (m[2]) {
141
- const parts = m[2].split(',');
142
- const r = [];
143
- for (let i = 0; i < parts.length; i++) {
144
- const p = parts[i].trim();
145
- if (!p)
146
- break;
147
- r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
148
- }
149
- return r.join(',');
150
- }
151
- else {
152
- return _polyfillHostNoCombinator + m[3];
153
- }
154
- });
155
- };
156
- const colonHostPartReplacer = (host, part, suffix) => {
157
- return host + part.replace(_polyfillHost, '') + suffix;
158
- };
159
- const convertColonHost = (cssText) => {
160
- return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
161
- };
162
- const colonHostContextPartReplacer = (host, part, suffix) => {
163
- if (part.indexOf(_polyfillHost) > -1) {
164
- return colonHostPartReplacer(host, part, suffix);
165
- }
166
- else {
167
- return host + part + suffix + ', ' + part + ' ' + host + suffix;
168
- }
169
- };
170
- const convertColonSlotted = (cssText, slotScopeId) => {
171
- const slotClass = '.' + slotScopeId + ' > ';
172
- const selectors = [];
173
- cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
174
- if (m[2]) {
175
- const compound = m[2].trim();
176
- const suffix = m[3];
177
- const slottedSelector = slotClass + compound + suffix;
178
- let prefixSelector = '';
179
- for (let i = m[4] - 1; i >= 0; i--) {
180
- const char = m[5][i];
181
- if (char === '}' || char === ',') {
182
- break;
183
- }
184
- prefixSelector = char + prefixSelector;
185
- }
186
- const orgSelector = prefixSelector + slottedSelector;
187
- const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
188
- if (orgSelector.trim() !== addedSelector.trim()) {
189
- const updatedSelector = `${addedSelector}, ${orgSelector}`;
190
- selectors.push({
191
- orgSelector,
192
- updatedSelector,
193
- });
194
- }
195
- return slottedSelector;
196
- }
197
- else {
198
- return _polyfillHostNoCombinator + m[3];
199
- }
200
- });
201
- return {
202
- selectors,
203
- cssText,
204
- };
205
- };
206
- const convertColonHostContext = (cssText) => {
207
- return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
208
- };
209
- const convertShadowDOMSelectors = (cssText) => {
210
- return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
211
- };
212
- const makeScopeMatcher = (scopeSelector) => {
213
- const lre = /\[/g;
214
- const rre = /\]/g;
215
- scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
216
- return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
217
- };
218
- const selectorNeedsScoping = (selector, scopeSelector) => {
219
- const re = makeScopeMatcher(scopeSelector);
220
- return !re.test(selector);
221
- };
222
- const injectScopingSelector = (selector, scopingSelector) => {
223
- return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
224
- return before + scopingSelector + colon + after;
225
- });
226
- };
227
- const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
228
- // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
229
- _polyfillHostRe.lastIndex = 0;
230
- if (_polyfillHostRe.test(selector)) {
231
- const replaceBy = `.${hostSelector}`;
232
- return selector
233
- .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
234
- .replace(_polyfillHostRe, replaceBy + ' ');
235
- }
236
- return scopeSelector + ' ' + selector;
237
- };
238
- const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
239
- const isRe = /\[is=([^\]]*)\]/g;
240
- scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
241
- const className = '.' + scopeSelector;
242
- const _scopeSelectorPart = (p) => {
243
- let scopedP = p.trim();
244
- if (!scopedP) {
245
- return '';
246
- }
247
- if (p.indexOf(_polyfillHostNoCombinator) > -1) {
248
- scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
249
- }
250
- else {
251
- // remove :host since it should be unnecessary
252
- const t = p.replace(_polyfillHostRe, '');
253
- if (t.length > 0) {
254
- scopedP = injectScopingSelector(t, className);
255
- }
256
- }
257
- return scopedP;
258
- };
259
- const safeContent = safeSelector(selector);
260
- selector = safeContent.content;
261
- let scopedSelector = '';
262
- let startIndex = 0;
263
- let res;
264
- const sep = /( |>|\+|~(?!=))\s*/g;
265
- // If a selector appears before :host it should not be shimmed as it
266
- // matches on ancestor elements and not on elements in the host's shadow
267
- // `:host-context(div)` is transformed to
268
- // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
269
- // the `div` is not part of the component in the 2nd selectors and should not be scoped.
270
- // Historically `component-tag:host` was matching the component so we also want to preserve
271
- // this behavior to avoid breaking legacy apps (it should not match).
272
- // The behavior should be:
273
- // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
274
- // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
275
- // `:host-context(tag)`)
276
- const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
277
- // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
278
- let shouldScope = !hasHost;
279
- while ((res = sep.exec(selector)) !== null) {
280
- const separator = res[1];
281
- const part = selector.slice(startIndex, res.index).trim();
282
- shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
283
- const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
284
- scopedSelector += `${scopedPart} ${separator} `;
285
- startIndex = sep.lastIndex;
286
- }
287
- const part = selector.substring(startIndex);
288
- shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
289
- scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
290
- // replace the placeholders with their original values
291
- return restoreSafeSelector(safeContent.placeholders, scopedSelector);
292
- };
293
- const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
294
- return selector
295
- .split(',')
296
- .map((shallowPart) => {
297
- if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
298
- return shallowPart.trim();
299
- }
300
- if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
301
- return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
302
- }
303
- else {
304
- return shallowPart.trim();
305
- }
306
- })
307
- .join(', ');
308
- };
309
- const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
310
- return processRules(cssText, (rule) => {
311
- let selector = rule.selector;
312
- let content = rule.content;
313
- if (rule.selector[0] !== '@') {
314
- selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
315
- }
316
- else if (rule.selector.startsWith('@media') ||
317
- rule.selector.startsWith('@supports') ||
318
- rule.selector.startsWith('@page') ||
319
- rule.selector.startsWith('@document')) {
320
- content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
321
- }
322
- const cssRule = {
323
- selector: selector.replace(/\s{2,}/g, ' ').trim(),
324
- content,
325
- };
326
- return cssRule;
327
- });
328
- };
329
- const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
330
- cssText = insertPolyfillHostInCssText(cssText);
331
- cssText = convertColonHost(cssText);
332
- cssText = convertColonHostContext(cssText);
333
- const slotted = convertColonSlotted(cssText, slotScopeId);
334
- cssText = slotted.cssText;
335
- cssText = convertShadowDOMSelectors(cssText);
336
- if (scopeId) {
337
- cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
338
- }
339
- cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
340
- cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
341
- return {
342
- cssText: cssText.trim(),
343
- slottedSelectors: slotted.selectors,
344
- };
345
- };
346
- const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
347
- const hostScopeId = scopeId + '-h';
348
- const slotScopeId = scopeId + '-s';
349
- const commentsWithHash = extractCommentsWithHash(cssText);
350
- cssText = stripComments(cssText);
351
- const orgSelectors = [];
352
- if (commentOriginalSelector) {
353
- const processCommentedSelector = (rule) => {
354
- const placeholder = `/*!@___${orgSelectors.length}___*/`;
355
- const comment = `/*!@${rule.selector}*/`;
356
- orgSelectors.push({ placeholder, comment });
357
- rule.selector = placeholder + rule.selector;
358
- return rule;
359
- };
360
- cssText = processRules(cssText, (rule) => {
361
- if (rule.selector[0] !== '@') {
362
- return processCommentedSelector(rule);
363
- }
364
- else if (rule.selector.startsWith('@media') ||
365
- rule.selector.startsWith('@supports') ||
366
- rule.selector.startsWith('@page') ||
367
- rule.selector.startsWith('@document')) {
368
- rule.content = processRules(rule.content, processCommentedSelector);
369
- return rule;
370
- }
371
- return rule;
372
- });
373
- }
374
- const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
375
- cssText = [scoped.cssText, ...commentsWithHash].join('\n');
376
- if (commentOriginalSelector) {
377
- orgSelectors.forEach(({ placeholder, comment }) => {
378
- cssText = cssText.replace(placeholder, comment);
379
- });
380
- }
381
- scoped.slottedSelectors.forEach((slottedSelector) => {
382
- cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
383
- });
384
- return cssText;
385
- };
386
-
387
- export { scopeCss };
@@ -1,302 +0,0 @@
1
- import { g as getRenderingRef, f as forceUpdate } from './index-78a05b9e.js';
2
-
3
- const appendToMap = (map, propName, value) => {
4
- const items = map.get(propName);
5
- if (!items) {
6
- map.set(propName, [value]);
7
- }
8
- else if (!items.includes(value)) {
9
- items.push(value);
10
- }
11
- };
12
- const debounce = (fn, ms) => {
13
- let timeoutId;
14
- return (...args) => {
15
- if (timeoutId) {
16
- clearTimeout(timeoutId);
17
- }
18
- timeoutId = setTimeout(() => {
19
- timeoutId = 0;
20
- fn(...args);
21
- }, ms);
22
- };
23
- };
24
-
25
- /**
26
- * Check if a possible element isConnected.
27
- * The property might not be there, so we check for it.
28
- *
29
- * We want it to return true if isConnected is not a property,
30
- * otherwise we would remove these elements and would not update.
31
- *
32
- * Better leak in Edge than to be useless.
33
- */
34
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
35
- const cleanupElements = debounce((map) => {
36
- for (let key of map.keys()) {
37
- map.set(key, map.get(key).filter(isConnected));
38
- }
39
- }, 2000);
40
- const stencilSubscription = () => {
41
- if (typeof getRenderingRef !== 'function') {
42
- // If we are not in a stencil project, we do nothing.
43
- // This function is not really exported by @stencil/core.
44
- return {};
45
- }
46
- const elmsToUpdate = new Map();
47
- return {
48
- dispose: () => elmsToUpdate.clear(),
49
- get: (propName) => {
50
- const elm = getRenderingRef();
51
- if (elm) {
52
- appendToMap(elmsToUpdate, propName, elm);
53
- }
54
- },
55
- set: (propName) => {
56
- const elements = elmsToUpdate.get(propName);
57
- if (elements) {
58
- elmsToUpdate.set(propName, elements.filter(forceUpdate));
59
- }
60
- cleanupElements(elmsToUpdate);
61
- },
62
- reset: () => {
63
- elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
64
- cleanupElements(elmsToUpdate);
65
- },
66
- };
67
- };
68
-
69
- const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
- const unwrappedState = unwrap(defaultState);
72
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
73
- const handlers = {
74
- dispose: [],
75
- get: [],
76
- set: [],
77
- reset: [],
78
- };
79
- const reset = () => {
80
- var _a;
81
- // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
- // otherwise, the state won't be properly reset
83
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
84
- handlers.reset.forEach((cb) => cb());
85
- };
86
- const dispose = () => {
87
- // Call first dispose as resetting the state would
88
- // cause less updates ;)
89
- handlers.dispose.forEach((cb) => cb());
90
- reset();
91
- };
92
- const get = (propName) => {
93
- handlers.get.forEach((cb) => cb(propName));
94
- return states.get(propName);
95
- };
96
- const set = (propName, value) => {
97
- const oldValue = states.get(propName);
98
- if (shouldUpdate(value, oldValue, propName)) {
99
- states.set(propName, value);
100
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
101
- }
102
- };
103
- const state = (typeof Proxy === 'undefined'
104
- ? {}
105
- : new Proxy(unwrappedState, {
106
- get(_, propName) {
107
- return get(propName);
108
- },
109
- ownKeys(_) {
110
- return Array.from(states.keys());
111
- },
112
- getOwnPropertyDescriptor() {
113
- return {
114
- enumerable: true,
115
- configurable: true,
116
- };
117
- },
118
- has(_, propName) {
119
- return states.has(propName);
120
- },
121
- set(_, propName, value) {
122
- set(propName, value);
123
- return true;
124
- },
125
- }));
126
- const on = (eventName, callback) => {
127
- handlers[eventName].push(callback);
128
- return () => {
129
- removeFromArray(handlers[eventName], callback);
130
- };
131
- };
132
- const onChange = (propName, cb) => {
133
- const unSet = on('set', (key, newValue) => {
134
- if (key === propName) {
135
- cb(newValue);
136
- }
137
- });
138
- // We need to unwrap the defaultState because it might be a function.
139
- // Otherwise we might not be sending the right reset value.
140
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
141
- return () => {
142
- unSet();
143
- unReset();
144
- };
145
- };
146
- const use = (...subscriptions) => {
147
- const unsubs = subscriptions.reduce((unsubs, subscription) => {
148
- if (subscription.set) {
149
- unsubs.push(on('set', subscription.set));
150
- }
151
- if (subscription.get) {
152
- unsubs.push(on('get', subscription.get));
153
- }
154
- if (subscription.reset) {
155
- unsubs.push(on('reset', subscription.reset));
156
- }
157
- if (subscription.dispose) {
158
- unsubs.push(on('dispose', subscription.dispose));
159
- }
160
- return unsubs;
161
- }, []);
162
- return () => unsubs.forEach((unsub) => unsub());
163
- };
164
- const forceUpdate = (key) => {
165
- const oldValue = states.get(key);
166
- handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
167
- };
168
- return {
169
- state,
170
- get,
171
- set,
172
- on,
173
- onChange,
174
- use,
175
- dispose,
176
- reset,
177
- forceUpdate,
178
- };
179
- };
180
- const removeFromArray = (array, item) => {
181
- const index = array.indexOf(item);
182
- if (index >= 0) {
183
- array[index] = array[array.length - 1];
184
- array.length--;
185
- }
186
- };
187
-
188
- const createStore = (defaultState, shouldUpdate) => {
189
- const map = createObservableMap(defaultState, shouldUpdate);
190
- map.use(stencilSubscription());
191
- return map;
192
- };
193
-
194
- var FlowStatus;
195
- (function (FlowStatus) {
196
- FlowStatus[FlowStatus["LANDING"] = 0] = "LANDING";
197
- FlowStatus[FlowStatus["AGREEMENT"] = 1] = "AGREEMENT";
198
- FlowStatus[FlowStatus["PHONE"] = 2] = "PHONE";
199
- FlowStatus[FlowStatus["CODE"] = 3] = "CODE";
200
- FlowStatus[FlowStatus["CODEERROR"] = 4] = "CODEERROR";
201
- FlowStatus[FlowStatus["ID"] = 5] = "ID";
202
- FlowStatus[FlowStatus["LIVENESS"] = 6] = "LIVENESS";
203
- FlowStatus[FlowStatus["COMPLETE"] = 7] = "COMPLETE";
204
- FlowStatus[FlowStatus["ERROREND"] = 8] = "ERROREND";
205
- FlowStatus[FlowStatus["CAMERAERROR"] = 9] = "CAMERAERROR";
206
- FlowStatus[FlowStatus["NONE"] = 10] = "NONE";
207
- })(FlowStatus || (FlowStatus = {}));
208
-
209
- const { state, onChange } = createStore({
210
- flowStatus: FlowStatus.NONE,
211
- environment: 'PROD',
212
- debug: false,
213
- requestId: '',
214
- redirectId: '',
215
- initialised: false,
216
- token: '',
217
- cameraIds: [],
218
- cameraId: '',
219
- hasIdBack: false,
220
- hasSelfieGesture: false,
221
- hasIdTilt: false,
222
- agreementsValidation: true,
223
- phoneValidation: true,
224
- phoneNumber: '',
225
- apiBaseUrl: 'https://apiro.id-kyc.com',
226
- device: null,
227
- langIso: 'ro',
228
- });
229
- onChange('environment', value => {
230
- state.debug = value == 'QA';
231
- });
232
- onChange('flowStatus', value => {
233
- sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
234
- });
235
- onChange('token', value => {
236
- sessionStorage.setItem(SessionKeys.TokenKey, value);
237
- });
238
- onChange('requestId', value => {
239
- sessionStorage.setItem(SessionKeys.RequestIdKey, value);
240
- });
241
- onChange('initialised', value => {
242
- sessionStorage.setItem(SessionKeys.InitialisedKey, String(value));
243
- });
244
- onChange('hasIdBack', value => {
245
- sessionStorage.setItem(SessionKeys.HasIdBackKey, String(value));
246
- });
247
- onChange('agreementsValidation', value => {
248
- sessionStorage.setItem(SessionKeys.AgreementValidationKey, String(value));
249
- });
250
- onChange('phoneValidation', value => {
251
- sessionStorage.setItem(SessionKeys.PhoneValidationKey, String(value));
252
- });
253
-
254
- class IdCaptureValues {
255
- }
256
- IdCaptureValues.IDPoseDemoMapping = {
257
- 0: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_front.mp4',
258
- 1: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_front_tilt.mp4',
259
- 2: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_rotate.mp4',
260
- 3: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_back.mp4',
261
- 4: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_back_tilt.mp4',
262
- };
263
- class SelfieCaptureValues {
264
- }
265
- SelfieCaptureValues.FacePoseDemoMapping = {
266
- 0: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_left.mp4',
267
- 1: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_right.mp4',
268
- 2: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_back.mp4',
269
- 3: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_front.mp4',
270
- // 4: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_left.mp4',
271
- // 5: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_right.mp4',
272
- 4: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_main.mp4',
273
- };
274
- class SessionKeys {
275
- }
276
- SessionKeys.FlowStatusKey = 'qbs-ect-flowstatus';
277
- SessionKeys.RequestIdKey = 'qbs-ect-requestid';
278
- SessionKeys.TokenKey = 'qbs-ect-token';
279
- SessionKeys.InitialisedKey = 'qbs-ect-initialised';
280
- SessionKeys.HasIdBackKey = 'qbs-ect-has-id-back';
281
- SessionKeys.AgreementValidationKey = 'qbs-ect-agreement-validation';
282
- SessionKeys.PhoneValidationKey = 'qbs-ect-phone-validation';
283
- SessionKeys.RefreshDoneKey = 'qbs-ect-refresh-done';
284
- class ApiUrls {
285
- constructor() {
286
- this.uriEnv = '/';
287
- this.uriEnv = state.environment == 'QA' ? '/dev_' : '/';
288
- this.OtpSend = this.uriEnv + 'validation/otp/send';
289
- this.OtpCheck = this.uriEnv + 'validation/otp/check';
290
- this.IdentityInsert = this.uriEnv + 'validation/identity/insert';
291
- this.UploadCapture = this.uriEnv + 'validation/upload/capture';
292
- this.GetAgreement = this.uriEnv + 'validation/agreement/content';
293
- this.GenerateAgreement = this.uriEnv + 'validation/agreement/generate';
294
- this.SendLink = this.uriEnv + 'validation/otp/sendlink';
295
- this.GetStatus = this.uriEnv + 'validation/identity/status';
296
- this.AddLog = this.uriEnv + 'validation/logs/add';
297
- this.AddStep = this.uriEnv + 'validation/logs/step';
298
- this.AbortRequest = this.uriEnv + 'validation/identity/abort';
299
- }
300
- }
301
-
302
- export { ApiUrls as A, FlowStatus as F, IdCaptureValues as I, SessionKeys as S, SelfieCaptureValues as a, state as s };