@incodetech/web 0.0.0-dev-20260303-3dab9f2 → 0.0.0-dev-20260304-fb1914c
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/flow/styles.css +4 -0
- package/dist/id/id.es.js +349 -331
- package/dist/id/styles.css +4 -0
- package/package.json +2 -2
package/dist/flow/styles.css
CHANGED
|
@@ -3336,6 +3336,10 @@
|
|
|
3336
3336
|
position: absolute;
|
|
3337
3337
|
}
|
|
3338
3338
|
|
|
3339
|
+
.IncodeIdCapturePage .IncodeCapture .IncodeCaptureVideo.IncodeCaptureVideoLoading {
|
|
3340
|
+
opacity: 0;
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3339
3343
|
.IncodeIdCapturePage .IncodeCapture .IncodeCaptureVideo .IncodeCaptureVideoElement {
|
|
3340
3344
|
inset: var(--spacing-0, var(--spacing-none, 0px));
|
|
3341
3345
|
object-fit: cover;
|
package/dist/id/id.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { u as e, S as C, B as
|
|
2
|
-
import { createIdCaptureManager as
|
|
3
|
-
import { d as
|
|
1
|
+
import { u as e, S as C, B as m, c as v, r as U, a as N } from "../incodeModule-_kfNnq5z.js";
|
|
2
|
+
import { createIdCaptureManager as O } from "@incodetech/core/id";
|
|
3
|
+
import { d as g, y as w, k as _, D as G, A as E } from "../vendor-preact-BDue3y7V.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { L as
|
|
6
|
-
import { P as x, I as
|
|
7
|
-
import { P as
|
|
5
|
+
import { L as Z, B as $, P as K } from "../baseTutorial-Bbadb04i.js";
|
|
6
|
+
import { P as x, I as Q } from "../incodeComponent-DSqGVqSo.js";
|
|
7
|
+
import { P as j } from "../processing-BuaxyhmY.js";
|
|
8
8
|
import "../instance-B-q0ZREN.js";
|
|
9
|
-
import { u as
|
|
10
|
-
import { T as
|
|
11
|
-
const
|
|
9
|
+
import { u as d } from "../useTranslation-B1jrtqlW.js";
|
|
10
|
+
import { T as k, S as F } from "../spinner-Ogo-u91P.js";
|
|
11
|
+
const q = ({ className: n }) => /* @__PURE__ */ e(
|
|
12
12
|
"svg",
|
|
13
13
|
{
|
|
14
14
|
width: "24",
|
|
@@ -56,7 +56,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
56
56
|
)
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
),
|
|
59
|
+
), J = ({ className: n }) => /* @__PURE__ */ e(
|
|
60
60
|
"svg",
|
|
61
61
|
{
|
|
62
62
|
width: "24",
|
|
@@ -74,7 +74,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
|
-
),
|
|
77
|
+
), W = ({ className: n }) => /* @__PURE__ */ e(
|
|
78
78
|
"svg",
|
|
79
79
|
{
|
|
80
80
|
width: "24",
|
|
@@ -115,7 +115,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
115
115
|
)
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
|
-
),
|
|
118
|
+
), X = ({
|
|
119
119
|
className: n
|
|
120
120
|
}) => /* @__PURE__ */ e(
|
|
121
121
|
"svg",
|
|
@@ -166,7 +166,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
166
166
|
)
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
|
-
),
|
|
169
|
+
), Y = ({ className: n }) => /* @__PURE__ */ e(
|
|
170
170
|
"svg",
|
|
171
171
|
{
|
|
172
172
|
width: "64",
|
|
@@ -187,12 +187,12 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
187
187
|
)
|
|
188
188
|
]
|
|
189
189
|
}
|
|
190
|
-
),
|
|
190
|
+
), e1 = ({
|
|
191
191
|
onClose: n,
|
|
192
|
-
onTakeManually:
|
|
192
|
+
onTakeManually: t
|
|
193
193
|
}) => {
|
|
194
|
-
const { t } =
|
|
195
|
-
|
|
194
|
+
const { t: i } = d(), r = () => {
|
|
195
|
+
t(), n();
|
|
196
196
|
};
|
|
197
197
|
return /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModal", children: /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModalContent", children: [
|
|
198
198
|
/* @__PURE__ */ e("header", { class: "IncodeCommonIssuesHeader", children: /* @__PURE__ */ e(
|
|
@@ -201,53 +201,53 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
201
201
|
type: "button",
|
|
202
202
|
class: "IncodeCommonIssuesCloseButton",
|
|
203
203
|
onClick: n,
|
|
204
|
-
"aria-label":
|
|
205
|
-
children: /* @__PURE__ */ e(
|
|
204
|
+
"aria-label": i("commonIssues.close"),
|
|
205
|
+
children: /* @__PURE__ */ e(J, {})
|
|
206
206
|
}
|
|
207
207
|
) }),
|
|
208
208
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesContent", children: [
|
|
209
|
-
/* @__PURE__ */ e(
|
|
209
|
+
/* @__PURE__ */ e(Y, { className: "IncodeCommonIssuesQuestionIcon" }),
|
|
210
210
|
/* @__PURE__ */ e(C, { size: 12 }),
|
|
211
|
-
/* @__PURE__ */ e("h2", { class: "IncodeCommonIssuesTitle", children:
|
|
211
|
+
/* @__PURE__ */ e("h2", { class: "IncodeCommonIssuesTitle", children: i("commonIssues.commonIssues") }),
|
|
212
212
|
/* @__PURE__ */ e(C, { size: 24 }),
|
|
213
213
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCards", children: [
|
|
214
214
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
|
|
215
|
-
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(
|
|
215
|
+
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(W, {}) }),
|
|
216
216
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
217
|
-
/* @__PURE__ */ e("h5", { class: "IncodeCommonIssuesCardTitle", children:
|
|
218
|
-
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children:
|
|
217
|
+
/* @__PURE__ */ e("h5", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.glarePresent") }),
|
|
218
|
+
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.glarePresentDescription") })
|
|
219
219
|
] })
|
|
220
220
|
] }),
|
|
221
221
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
|
|
222
|
-
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(
|
|
222
|
+
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(q, {}) }),
|
|
223
223
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
224
|
-
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children:
|
|
225
|
-
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children:
|
|
224
|
+
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.blurPresent") }),
|
|
225
|
+
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.blurPresentDescription") })
|
|
226
226
|
] })
|
|
227
227
|
] }),
|
|
228
228
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
|
|
229
|
-
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(
|
|
229
|
+
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(X, {}) }),
|
|
230
230
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
231
|
-
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children:
|
|
232
|
-
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children:
|
|
231
|
+
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.notReadable") }),
|
|
232
|
+
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.notReadableDescription") })
|
|
233
233
|
] })
|
|
234
234
|
] })
|
|
235
235
|
] }),
|
|
236
236
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesButtons", children: [
|
|
237
237
|
/* @__PURE__ */ e(
|
|
238
|
-
|
|
238
|
+
m,
|
|
239
239
|
{
|
|
240
240
|
variant: "link",
|
|
241
241
|
onClick: r,
|
|
242
242
|
class: "IncodeCommonIssuesTakeManually",
|
|
243
|
-
children:
|
|
243
|
+
children: i("commonIssues.takeManually")
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
|
-
/* @__PURE__ */ e(
|
|
246
|
+
/* @__PURE__ */ e(m, { onClick: n, class: "IncodeCommonIssuesTryAgain", children: i("commonIssues.tryAgain") })
|
|
247
247
|
] })
|
|
248
248
|
] })
|
|
249
249
|
] }) });
|
|
250
|
-
},
|
|
250
|
+
}, V = ({ className: n }) => /* @__PURE__ */ e(
|
|
251
251
|
"svg",
|
|
252
252
|
{
|
|
253
253
|
width: "16",
|
|
@@ -265,44 +265,44 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
265
265
|
}
|
|
266
266
|
)
|
|
267
267
|
}
|
|
268
|
-
),
|
|
268
|
+
), t1 = ({
|
|
269
269
|
orientation: n,
|
|
270
|
-
mode:
|
|
271
|
-
state:
|
|
270
|
+
mode: t,
|
|
271
|
+
state: i,
|
|
272
272
|
children: r,
|
|
273
273
|
className: o
|
|
274
274
|
}) => {
|
|
275
|
-
const
|
|
275
|
+
const s = n !== "vertical" || t === "passport", a = t === "passport", l = `IncodeCaptureFrame${i.charAt(0).toUpperCase() + i.slice(1)}`;
|
|
276
276
|
return /* @__PURE__ */ e(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
|
-
class:
|
|
279
|
+
class: v(
|
|
280
280
|
"IncodeCaptureFrame",
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
s ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
282
|
+
l,
|
|
283
283
|
a && "IncodeCaptureFramePassport",
|
|
284
284
|
o
|
|
285
285
|
),
|
|
286
286
|
children: r
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
|
-
},
|
|
289
|
+
}, D = ({
|
|
290
290
|
imageUrl: n,
|
|
291
|
-
orientation:
|
|
292
|
-
mode:
|
|
291
|
+
orientation: t,
|
|
292
|
+
mode: i,
|
|
293
293
|
borderState: r,
|
|
294
294
|
topContent: o,
|
|
295
|
-
bottomContent:
|
|
295
|
+
bottomContent: s,
|
|
296
296
|
overlayContent: a
|
|
297
297
|
}) => {
|
|
298
|
-
const { t:
|
|
298
|
+
const { t: l } = d();
|
|
299
299
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayout", children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayoutContent", children: [
|
|
300
300
|
o && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingTopArea", children: o }),
|
|
301
301
|
/* @__PURE__ */ e(
|
|
302
|
-
|
|
302
|
+
t1,
|
|
303
303
|
{
|
|
304
|
-
orientation:
|
|
305
|
-
mode:
|
|
304
|
+
orientation: t,
|
|
305
|
+
mode: i === "id" ? "front" : i,
|
|
306
306
|
state: r,
|
|
307
307
|
children: [
|
|
308
308
|
/* @__PURE__ */ e(
|
|
@@ -319,30 +319,30 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
319
319
|
),
|
|
320
320
|
/* @__PURE__ */ e("div", { class: "IncodeIdProcessingBottomArea", children: [
|
|
321
321
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
322
|
-
/* @__PURE__ */ e(
|
|
323
|
-
/* @__PURE__ */ e("span", { children:
|
|
322
|
+
/* @__PURE__ */ e(V, { className: "IncodeCaptureEncryptionIcon" }),
|
|
323
|
+
/* @__PURE__ */ e("span", { children: l("v2.capture.label") })
|
|
324
324
|
] }),
|
|
325
|
-
|
|
325
|
+
s
|
|
326
326
|
] })
|
|
327
327
|
] }) }) });
|
|
328
|
-
},
|
|
328
|
+
}, i1 = ({
|
|
329
329
|
imageUrl: n,
|
|
330
|
-
progress:
|
|
331
|
-
orientation:
|
|
330
|
+
progress: t,
|
|
331
|
+
orientation: i,
|
|
332
332
|
mode: r
|
|
333
333
|
}) => {
|
|
334
|
-
const { t: o } =
|
|
335
|
-
return
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}) : import("../id-laser-v-BTHJaSfx.js").then((
|
|
339
|
-
|
|
334
|
+
const { t: o } = d(), s = i !== "vertical" || r === "passport", [a, l] = g(null);
|
|
335
|
+
return w(() => {
|
|
336
|
+
s ? import("../id-laser-h-BBV3r3rz.js").then((c) => {
|
|
337
|
+
l(c.default);
|
|
338
|
+
}) : import("../id-laser-v-BTHJaSfx.js").then((c) => {
|
|
339
|
+
l(c.default);
|
|
340
340
|
});
|
|
341
|
-
}, [
|
|
342
|
-
|
|
341
|
+
}, [s]), /* @__PURE__ */ e(
|
|
342
|
+
D,
|
|
343
343
|
{
|
|
344
344
|
imageUrl: n,
|
|
345
|
-
orientation:
|
|
345
|
+
orientation: i,
|
|
346
346
|
mode: r,
|
|
347
347
|
borderState: "analyzing",
|
|
348
348
|
topContent: /* @__PURE__ */ e("div", { class: "IncodeAnalyzingContent", children: [
|
|
@@ -350,13 +350,13 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
350
350
|
"div",
|
|
351
351
|
{
|
|
352
352
|
class: "IncodeAnalyzingProgressFill",
|
|
353
|
-
style: { width: `${
|
|
353
|
+
style: { width: `${t}%` }
|
|
354
354
|
}
|
|
355
355
|
) }),
|
|
356
356
|
/* @__PURE__ */ e("h2", { class: "IncodeAnalyzingTitle", children: o("idv2.capture.processing.analyzing") })
|
|
357
357
|
] }),
|
|
358
358
|
overlayContent: a ? /* @__PURE__ */ e(
|
|
359
|
-
|
|
359
|
+
Z,
|
|
360
360
|
{
|
|
361
361
|
animationData: a,
|
|
362
362
|
loop: !0,
|
|
@@ -365,7 +365,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
365
365
|
) : null
|
|
366
366
|
}
|
|
367
367
|
);
|
|
368
|
-
},
|
|
368
|
+
}, n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
369
369
|
"svg",
|
|
370
370
|
{
|
|
371
371
|
class: n,
|
|
@@ -382,7 +382,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
}
|
|
385
|
-
),
|
|
385
|
+
), R = ({ className: n }) => /* @__PURE__ */ e(
|
|
386
386
|
"svg",
|
|
387
387
|
{
|
|
388
388
|
class: n,
|
|
@@ -399,97 +399,97 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
399
399
|
}
|
|
400
400
|
)
|
|
401
401
|
}
|
|
402
|
-
),
|
|
402
|
+
), S = ({
|
|
403
403
|
variant: n,
|
|
404
|
-
imageUrl:
|
|
405
|
-
orientation:
|
|
404
|
+
imageUrl: t,
|
|
405
|
+
orientation: i,
|
|
406
406
|
mode: r,
|
|
407
407
|
title: o,
|
|
408
|
-
subtitle:
|
|
408
|
+
subtitle: s,
|
|
409
409
|
buttonText: a,
|
|
410
|
-
onButtonClick:
|
|
411
|
-
attemptsRemaining:
|
|
410
|
+
onButtonClick: l,
|
|
411
|
+
attemptsRemaining: c
|
|
412
412
|
}) => {
|
|
413
|
-
const { t:
|
|
413
|
+
const { t: f } = d();
|
|
414
414
|
return /* @__PURE__ */ e(
|
|
415
|
-
|
|
415
|
+
D,
|
|
416
416
|
{
|
|
417
|
-
imageUrl:
|
|
418
|
-
orientation:
|
|
417
|
+
imageUrl: t,
|
|
418
|
+
orientation: i,
|
|
419
419
|
mode: r,
|
|
420
420
|
borderState: n,
|
|
421
421
|
topContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultContent", children: [
|
|
422
|
-
n === "success" ? /* @__PURE__ */ e(
|
|
422
|
+
n === "success" ? /* @__PURE__ */ e(n1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(R, { className: "IncodeIdProcessingResultIcon" }),
|
|
423
423
|
/* @__PURE__ */ e(C, { size: 16 }),
|
|
424
424
|
o && /* @__PURE__ */ e("h2", { class: "IncodeIdProcessingResultTitle", children: o }),
|
|
425
|
-
|
|
425
|
+
s && /* @__PURE__ */ e(_, { children: [
|
|
426
426
|
/* @__PURE__ */ e(C, { size: 12 }),
|
|
427
|
-
/* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultSubtitle", children:
|
|
427
|
+
/* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultSubtitle", children: s })
|
|
428
428
|
] })
|
|
429
429
|
] }),
|
|
430
430
|
bottomContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultButtonContainer", children: [
|
|
431
|
-
|
|
432
|
-
count:
|
|
431
|
+
c !== void 0 && c > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children: f("v2.idError.attemptsLeft", {
|
|
432
|
+
count: c
|
|
433
433
|
}) }),
|
|
434
|
-
/* @__PURE__ */ e(
|
|
434
|
+
/* @__PURE__ */ e(m, { onClick: l, "data-testid": "retry-button", children: a })
|
|
435
435
|
] })
|
|
436
436
|
}
|
|
437
437
|
);
|
|
438
|
-
},
|
|
439
|
-
const { t } =
|
|
440
|
-
if (!
|
|
438
|
+
}, r1 = ({ manager: n, state: t }) => {
|
|
439
|
+
const { t: i } = d();
|
|
440
|
+
if (!t.previewImageUrl)
|
|
441
441
|
return null;
|
|
442
|
-
const r =
|
|
442
|
+
const r = t.currentMode === "passport" ? "passport" : "id", o = () => t.needsBackCapture ? i("v2.idSuccess.subtitle") : t.needsFrontCapture ? i("idv2.capture.processing.successBackSubtitleScanFront") : i("v2.idSuccess.subtitleBack"), s = () => t.needsBackCapture ? i("idv2.capture.processing.scanBack") : t.needsFrontCapture ? i("idv2.capture.processing.scanFront") : i("idv2.capturePreview.continue");
|
|
443
443
|
return /* @__PURE__ */ e(
|
|
444
|
-
|
|
444
|
+
S,
|
|
445
445
|
{
|
|
446
446
|
variant: "success",
|
|
447
|
-
imageUrl:
|
|
448
|
-
orientation:
|
|
447
|
+
imageUrl: t.previewImageUrl,
|
|
448
|
+
orientation: t.orientation,
|
|
449
449
|
mode: r,
|
|
450
|
-
title:
|
|
450
|
+
title: i("v2.idSuccess.title"),
|
|
451
451
|
subtitle: o(),
|
|
452
|
-
buttonText:
|
|
452
|
+
buttonText: s(),
|
|
453
453
|
onButtonClick: () => n.nextStep()
|
|
454
454
|
}
|
|
455
455
|
);
|
|
456
|
-
},
|
|
457
|
-
const { t: r } =
|
|
458
|
-
if (
|
|
456
|
+
}, A = ({ manager: n, state: t, ...i }) => {
|
|
457
|
+
const { t: r } = d();
|
|
458
|
+
if (t.status === "error")
|
|
459
459
|
return /* @__PURE__ */ e("div", { class: "IncodeIdError", children: [
|
|
460
|
-
/* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children:
|
|
461
|
-
/* @__PURE__ */ e(
|
|
460
|
+
/* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children: t.error }),
|
|
461
|
+
/* @__PURE__ */ e(m, { onClick: () => n.reset(), "data-testid": "retry-button", children: r("idv2.capturePreview.retry") })
|
|
462
462
|
] });
|
|
463
|
-
const o =
|
|
464
|
-
return
|
|
465
|
-
|
|
463
|
+
const o = t.currentMode === "passport" ? "passport" : "id";
|
|
464
|
+
return t.previewImageUrl ? /* @__PURE__ */ e(
|
|
465
|
+
S,
|
|
466
466
|
{
|
|
467
467
|
variant: "error",
|
|
468
|
-
imageUrl:
|
|
469
|
-
orientation:
|
|
468
|
+
imageUrl: t.previewImageUrl,
|
|
469
|
+
orientation: t.orientation,
|
|
470
470
|
mode: o,
|
|
471
|
-
title:
|
|
472
|
-
subtitle:
|
|
473
|
-
buttonText:
|
|
471
|
+
title: t.uploadErrorMessage,
|
|
472
|
+
subtitle: t.uploadErrorDescription,
|
|
473
|
+
buttonText: t.canRetry ? r("idv2.capturePreview.tryAgain") : r("idv2.capturePreview.continue"),
|
|
474
474
|
onButtonClick: () => n.continueFromError(),
|
|
475
|
-
attemptsRemaining:
|
|
475
|
+
attemptsRemaining: t.attemptsRemaining
|
|
476
476
|
}
|
|
477
477
|
) : null;
|
|
478
|
-
},
|
|
479
|
-
const { t
|
|
478
|
+
}, o1 = ({ manager: n }) => {
|
|
479
|
+
const { t } = d(), i = () => {
|
|
480
480
|
n.retryCapture();
|
|
481
481
|
};
|
|
482
482
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdExpiredPage", children: [
|
|
483
483
|
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredContent", children: [
|
|
484
|
-
/* @__PURE__ */ e(
|
|
485
|
-
/* @__PURE__ */ e(
|
|
484
|
+
/* @__PURE__ */ e(R, { className: "IncodeIdExpiredIcon" }),
|
|
485
|
+
/* @__PURE__ */ e(k, { className: "IncodeIdExpiredTitle", children: t("idv2.capture.notifications.expiredId") }),
|
|
486
486
|
/* @__PURE__ */ e(C, { size: 12 }),
|
|
487
|
-
/* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children:
|
|
487
|
+
/* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children: t("idv2.capture.notifications.useDifferent") }),
|
|
488
488
|
/* @__PURE__ */ e(C, { size: 80 })
|
|
489
489
|
] }),
|
|
490
|
-
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredButtonContainer", children: /* @__PURE__ */ e(
|
|
490
|
+
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredButtonContainer", children: /* @__PURE__ */ e(m, { variant: "primary", onClick: i, children: t("idv2.unacceptedId.tryAgain") }) })
|
|
491
491
|
] });
|
|
492
|
-
},
|
|
492
|
+
}, l1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
493
493
|
"svg",
|
|
494
494
|
{
|
|
495
495
|
width: "30",
|
|
@@ -520,180 +520,180 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
520
520
|
)
|
|
521
521
|
]
|
|
522
522
|
}
|
|
523
|
-
),
|
|
523
|
+
), I = /* @__PURE__ */ new Map();
|
|
524
524
|
let T = !1;
|
|
525
|
-
const
|
|
525
|
+
const y = {
|
|
526
526
|
blur: () => import("../blurdevicelottie-_BZRug1c.js"),
|
|
527
527
|
glare: () => import("../glaredevicelottie-DLuIStvb.js"),
|
|
528
528
|
align: () => import("../aligndevicelottie-DlQCRPfM.js"),
|
|
529
529
|
front: () => import("../frontdevicelottie-KhKxT5n9.js"),
|
|
530
530
|
back: () => import("../backdevicelottie-B4NgyWmX.js")
|
|
531
531
|
};
|
|
532
|
-
function
|
|
532
|
+
function z(n) {
|
|
533
533
|
T || (T = !0, Promise.all([
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
]).then(([
|
|
540
|
-
|
|
534
|
+
y.blur(),
|
|
535
|
+
y.glare(),
|
|
536
|
+
y.align(),
|
|
537
|
+
y.front(),
|
|
538
|
+
y.back()
|
|
539
|
+
]).then(([t, i, r, o, s]) => {
|
|
540
|
+
I.set("blur", t.default), I.set("glare", i.default), I.set("align", r.default), I.set("front", o.default), I.set("back", s.default), n?.();
|
|
541
541
|
}).catch(() => {
|
|
542
542
|
}));
|
|
543
543
|
}
|
|
544
|
-
function l1() {
|
|
545
|
-
S();
|
|
546
|
-
}
|
|
547
544
|
function s1() {
|
|
548
|
-
|
|
549
|
-
|
|
545
|
+
z();
|
|
546
|
+
}
|
|
547
|
+
function a1() {
|
|
548
|
+
w(() => {
|
|
549
|
+
s1();
|
|
550
550
|
}, []);
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
const { t } =
|
|
554
|
-
if (
|
|
555
|
-
|
|
552
|
+
function c1(n, t) {
|
|
553
|
+
const { t: i } = d(), [, r] = g(0);
|
|
554
|
+
if (w(() => {
|
|
555
|
+
z(() => r((o) => o + 1));
|
|
556
556
|
}, []), n === "blur")
|
|
557
557
|
return {
|
|
558
|
-
title:
|
|
559
|
-
description:
|
|
560
|
-
animationData:
|
|
558
|
+
title: i("idv2.capture.notifications.blur.title"),
|
|
559
|
+
description: i("idv2.capture.notifications.blur.description"),
|
|
560
|
+
animationData: I.get("blur") ?? null
|
|
561
561
|
};
|
|
562
562
|
if (n === "glare")
|
|
563
563
|
return {
|
|
564
|
-
title:
|
|
565
|
-
description:
|
|
566
|
-
animationData:
|
|
564
|
+
title: i("idv2.capture.notifications.glare.title"),
|
|
565
|
+
description: i("idv2.capture.notifications.glare.description"),
|
|
566
|
+
animationData: I.get("glare") ?? null
|
|
567
567
|
};
|
|
568
568
|
if (n === "farAway")
|
|
569
569
|
return {
|
|
570
|
-
title:
|
|
571
|
-
description:
|
|
572
|
-
animationData:
|
|
570
|
+
title: i("idv2.capture.notifications.notAligned.title"),
|
|
571
|
+
description: i("idv2.capture.notifications.notAligned.description"),
|
|
572
|
+
animationData: I.get("align") ?? null
|
|
573
573
|
};
|
|
574
574
|
if (n === "wrongSide") {
|
|
575
|
-
const o =
|
|
575
|
+
const o = t === "back";
|
|
576
576
|
return {
|
|
577
|
-
title:
|
|
578
|
-
description:
|
|
579
|
-
animationData:
|
|
577
|
+
title: i(o ? "idv2.capture.notifications.showBack.title" : "idv2.capture.notifications.showFront.title"),
|
|
578
|
+
description: i(o ? "idv2.capture.notifications.showBack.description" : "idv2.capture.notifications.showFront.description"),
|
|
579
|
+
animationData: I.get(o ? "back" : "front") ?? null
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
582
|
return null;
|
|
583
583
|
}
|
|
584
|
-
const
|
|
584
|
+
const d1 = ({
|
|
585
585
|
detectionStatus: n,
|
|
586
|
-
mode:
|
|
586
|
+
mode: t
|
|
587
587
|
}) => {
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
/* @__PURE__ */ e("div", { class:
|
|
591
|
-
/* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children:
|
|
592
|
-
|
|
588
|
+
const i = c1(n, t);
|
|
589
|
+
return i ? /* @__PURE__ */ e("div", { class: v("IncodeIdCaptureNotification"), children: /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationContent", children: [
|
|
590
|
+
/* @__PURE__ */ e("div", { class: v("IncodeIdCaptureNotificationText"), children: [
|
|
591
|
+
/* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children: i.title }),
|
|
592
|
+
i.description && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationDescription", children: i.description })
|
|
593
593
|
] }),
|
|
594
594
|
/* @__PURE__ */ e(C, { size: 16, direction: "horizontal" }),
|
|
595
|
-
|
|
595
|
+
i.animationData && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationAnimation", children: /* @__PURE__ */ e(Z, { animationData: i.animationData, loop: !0 }) })
|
|
596
596
|
] }) }) : null;
|
|
597
|
-
},
|
|
597
|
+
}, u1 = G(
|
|
598
598
|
({
|
|
599
599
|
mode: n,
|
|
600
|
-
orientation:
|
|
601
|
-
detectionStatus:
|
|
600
|
+
orientation: t,
|
|
601
|
+
detectionStatus: i,
|
|
602
602
|
counterValue: r,
|
|
603
603
|
isCapturing: o,
|
|
604
|
-
onOpenHelp:
|
|
604
|
+
onOpenHelp: s
|
|
605
605
|
}, a) => {
|
|
606
|
-
const { t:
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
if (o ||
|
|
606
|
+
const { t: l } = d();
|
|
607
|
+
a1();
|
|
608
|
+
const c = i === "detecting" || i === "idNotDetected" || i === "manualCapture", f = () => o || i === "capturing" ? "Capturing" : i === "blur" || i === "glare" || i === "wrongSide" || i === "farAway" ? "Error" : "Idle", L = () => {
|
|
609
|
+
if (o || i === "capturing")
|
|
610
610
|
return {
|
|
611
|
-
title:
|
|
612
|
-
subtitle:
|
|
611
|
+
title: l("idv2.capture.takingPhoto"),
|
|
612
|
+
subtitle: l("idv2.capture.dontMove")
|
|
613
613
|
};
|
|
614
|
-
if (
|
|
615
|
-
const
|
|
614
|
+
if (c) {
|
|
615
|
+
const h = i === "manualCapture";
|
|
616
616
|
return n === "passport" ? {
|
|
617
|
-
title:
|
|
618
|
-
subtitle:
|
|
617
|
+
title: l("idv2.capture.fillFramePassport"),
|
|
618
|
+
subtitle: h ? "" : l("idv2.capture.v2.autoCapture")
|
|
619
619
|
} : n === "back" ? {
|
|
620
|
-
title:
|
|
621
|
-
subtitle:
|
|
620
|
+
title: l("idv2.capture.v2.fillFrameBack"),
|
|
621
|
+
subtitle: h ? "" : l("idv2.capture.v2.autoCapture")
|
|
622
622
|
} : {
|
|
623
|
-
title:
|
|
624
|
-
subtitle:
|
|
623
|
+
title: l("idv2.capture.v2.fillFrameFront"),
|
|
624
|
+
subtitle: h ? "" : l("idv2.capture.v2.autoCapture")
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
return null;
|
|
628
|
-
}, B =
|
|
628
|
+
}, B = f(), p = L(), M = n === "passport", u = t !== "vertical" || M;
|
|
629
629
|
return /* @__PURE__ */ e(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
|
-
class:
|
|
632
|
+
class: v(
|
|
633
633
|
"IncodeCaptureOverlay",
|
|
634
|
-
!
|
|
634
|
+
!u && "IncodeCaptureOverlayVertical"
|
|
635
635
|
),
|
|
636
636
|
children: [
|
|
637
637
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
638
|
+
C1,
|
|
639
639
|
{
|
|
640
|
-
detectionStatus:
|
|
640
|
+
detectionStatus: i,
|
|
641
641
|
mode: n,
|
|
642
|
-
topContent:
|
|
642
|
+
topContent: p
|
|
643
643
|
}
|
|
644
644
|
),
|
|
645
645
|
/* @__PURE__ */ e(
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
648
648
|
ref: a,
|
|
649
|
-
class:
|
|
649
|
+
class: v(
|
|
650
650
|
"IncodeCaptureFrame",
|
|
651
|
-
|
|
651
|
+
u ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
652
652
|
`IncodeCaptureFrame${B}`,
|
|
653
|
-
|
|
653
|
+
M && "IncodeCaptureFramePassport"
|
|
654
654
|
),
|
|
655
655
|
children: o && r > 0 && /* @__PURE__ */ e("div", { class: "IncodeCaptureCounter", children: r })
|
|
656
656
|
}
|
|
657
657
|
),
|
|
658
|
-
/* @__PURE__ */ e(
|
|
658
|
+
/* @__PURE__ */ e(p1, { onOpenHelp: s })
|
|
659
659
|
]
|
|
660
660
|
}
|
|
661
661
|
);
|
|
662
662
|
}
|
|
663
|
-
),
|
|
664
|
-
/* @__PURE__ */ e(
|
|
663
|
+
), C1 = ({ detectionStatus: n, mode: t, topContent: i }) => /* @__PURE__ */ e("div", { class: "IncodeCaptureTopSection", children: [
|
|
664
|
+
/* @__PURE__ */ e(d1, { detectionStatus: n, mode: t }),
|
|
665
665
|
/* @__PURE__ */ e(
|
|
666
666
|
"div",
|
|
667
667
|
{
|
|
668
|
-
class:
|
|
668
|
+
class: v(
|
|
669
669
|
"IncodeCaptureTopText",
|
|
670
|
-
!
|
|
670
|
+
!i && "IncodeCaptureTopTextHidden"
|
|
671
671
|
),
|
|
672
672
|
children: [
|
|
673
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextTitle", children:
|
|
674
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextSubtitle", children:
|
|
673
|
+
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextTitle", children: i?.title || " " }),
|
|
674
|
+
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextSubtitle", children: i?.subtitle || " " })
|
|
675
675
|
]
|
|
676
676
|
}
|
|
677
677
|
)
|
|
678
|
-
] }),
|
|
679
|
-
const { t
|
|
678
|
+
] }), p1 = ({ onOpenHelp: n }) => {
|
|
679
|
+
const { t } = d();
|
|
680
680
|
return /* @__PURE__ */ e("div", { class: "IncodeCaptureBottomSection", children: [
|
|
681
681
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
682
|
-
/* @__PURE__ */ e(
|
|
683
|
-
/* @__PURE__ */ e("span", { children:
|
|
682
|
+
/* @__PURE__ */ e(V, { className: "IncodeCaptureEncryptionIcon" }),
|
|
683
|
+
/* @__PURE__ */ e("span", { children: t("v2.capture.label") })
|
|
684
684
|
] }),
|
|
685
685
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureHelpButton", children: /* @__PURE__ */ e(
|
|
686
|
-
|
|
686
|
+
m,
|
|
687
687
|
{
|
|
688
688
|
variant: "link",
|
|
689
689
|
onClick: n,
|
|
690
|
-
"aria-label":
|
|
690
|
+
"aria-label": t("idv2.needHelp.open"),
|
|
691
691
|
class: "IncodeCaptureHelpButtonInner",
|
|
692
|
-
children: /* @__PURE__ */ e(
|
|
692
|
+
children: /* @__PURE__ */ e(l1, {})
|
|
693
693
|
}
|
|
694
694
|
) })
|
|
695
695
|
] });
|
|
696
|
-
},
|
|
696
|
+
}, h1 = ({
|
|
697
697
|
className: n
|
|
698
698
|
}) => /* @__PURE__ */ e(
|
|
699
699
|
"svg",
|
|
@@ -718,11 +718,11 @@ const c1 = ({
|
|
|
718
718
|
/* @__PURE__ */ e("circle", { cx: "33.5926", cy: "33.9996", r: "25.4187", fill: "white" })
|
|
719
719
|
]
|
|
720
720
|
}
|
|
721
|
-
),
|
|
721
|
+
), I1 = ({
|
|
722
722
|
onClick: n,
|
|
723
|
-
disabled:
|
|
723
|
+
disabled: t
|
|
724
724
|
}) => {
|
|
725
|
-
const { t } =
|
|
725
|
+
const { t: i } = d();
|
|
726
726
|
return /* @__PURE__ */ e(
|
|
727
727
|
"div",
|
|
728
728
|
{
|
|
@@ -730,104 +730,119 @@ const c1 = ({
|
|
|
730
730
|
"data-testid": "manual-capture-button",
|
|
731
731
|
children: [
|
|
732
732
|
/* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltipContainer", children: /* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltip", children: /* @__PURE__ */ e("ol", { class: "IncodeIdManualCaptureTooltipList", children: [
|
|
733
|
-
/* @__PURE__ */ e("li", { children:
|
|
734
|
-
/* @__PURE__ */ e("li", { children:
|
|
733
|
+
/* @__PURE__ */ e("li", { children: i("idv2.commonIssues.firstStep") }),
|
|
734
|
+
/* @__PURE__ */ e("li", { children: i("idv2.commonIssues.secondStep") })
|
|
735
735
|
] }) }) }),
|
|
736
736
|
/* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureButtonContent", children: /* @__PURE__ */ e(
|
|
737
|
-
|
|
737
|
+
m,
|
|
738
738
|
{
|
|
739
739
|
variant: "link",
|
|
740
740
|
onClick: n,
|
|
741
|
-
disabled:
|
|
741
|
+
disabled: t,
|
|
742
742
|
class: "IncodeIdManualCaptureButtonButton",
|
|
743
|
-
"aria-label":
|
|
744
|
-
children: /* @__PURE__ */ e(
|
|
743
|
+
"aria-label": i("idv2.capture.manualCapture.ariaLabel"),
|
|
744
|
+
children: /* @__PURE__ */ e(h1, {})
|
|
745
745
|
}
|
|
746
746
|
) })
|
|
747
747
|
]
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
|
-
},
|
|
751
|
-
const { t } =
|
|
752
|
-
if (
|
|
750
|
+
}, f1 = ({ manager: n, state: t }) => {
|
|
751
|
+
const { t: i } = d();
|
|
752
|
+
if (t.captureStatus === "initializing")
|
|
753
753
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: [
|
|
754
|
-
/* @__PURE__ */ e(
|
|
755
|
-
/* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children:
|
|
754
|
+
/* @__PURE__ */ e(F, { size: "large" }),
|
|
755
|
+
/* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children: i("idv2.capture.initializing") })
|
|
756
756
|
] }) });
|
|
757
|
-
if (
|
|
758
|
-
const r =
|
|
757
|
+
if (t.captureStatus === "uploading" && t.previewImageUrl) {
|
|
758
|
+
const r = t.currentMode === "passport" ? "passport" : "id";
|
|
759
759
|
return /* @__PURE__ */ e(
|
|
760
|
-
|
|
760
|
+
i1,
|
|
761
761
|
{
|
|
762
|
-
imageUrl:
|
|
763
|
-
progress:
|
|
764
|
-
orientation:
|
|
762
|
+
imageUrl: t.previewImageUrl,
|
|
763
|
+
progress: t.uploadProgress ?? 0,
|
|
764
|
+
orientation: t.orientation,
|
|
765
765
|
mode: r
|
|
766
766
|
}
|
|
767
767
|
);
|
|
768
768
|
}
|
|
769
|
-
return
|
|
770
|
-
},
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
769
|
+
return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(r1, { manager: n, state: t }) : t.captureStatus === "uploadError" && t.previewImageUrl ? /* @__PURE__ */ e(A, { manager: n, state: t }) : /* @__PURE__ */ e(m1, { manager: n, state: t });
|
|
770
|
+
}, m1 = ({ manager: n, state: t }) => {
|
|
771
|
+
const i = E(null), r = E(null), [o, s] = g(!1), [a, l] = g(!1);
|
|
772
|
+
w(() => {
|
|
773
|
+
const u = i.current;
|
|
774
|
+
if (!u || !t.stream) {
|
|
775
|
+
l(!1);
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
l(!1);
|
|
779
|
+
const h = () => l(!0);
|
|
780
|
+
return u.addEventListener("playing", h), u.srcObject = t.stream, u.play().catch(() => {
|
|
781
|
+
}), () => u.removeEventListener("playing", h);
|
|
782
|
+
}, [t.stream]), w(() => {
|
|
783
|
+
const u = () => {
|
|
784
|
+
const h = r.current;
|
|
785
|
+
if (!h)
|
|
779
786
|
return;
|
|
780
|
-
const
|
|
787
|
+
const b = h.getBoundingClientRect();
|
|
781
788
|
n.updateDetectionArea({
|
|
782
|
-
x:
|
|
783
|
-
y:
|
|
784
|
-
width:
|
|
785
|
-
height:
|
|
789
|
+
x: b.left,
|
|
790
|
+
y: b.top,
|
|
791
|
+
width: b.width,
|
|
792
|
+
height: b.height
|
|
786
793
|
});
|
|
787
794
|
};
|
|
788
|
-
return
|
|
789
|
-
}, [n,
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
},
|
|
793
|
-
|
|
794
|
-
},
|
|
795
|
-
|
|
795
|
+
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
796
|
+
}, [n, t.orientation, a]);
|
|
797
|
+
const c = t.captureStatus === "capturing" || t.detectionStatus === "capturing", f = t.detectionStatus, L = f === "manualCapture" || t.showCaptureButtonInAuto && t.captureStatus === "detecting" && f !== "capturing", B = () => {
|
|
798
|
+
s(!0);
|
|
799
|
+
}, p = () => {
|
|
800
|
+
s(!1);
|
|
801
|
+
}, M = () => {
|
|
802
|
+
s(!1), n.switchToManualCapture();
|
|
796
803
|
};
|
|
797
804
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCapture", children: [
|
|
798
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ e(
|
|
799
|
-
"video",
|
|
800
|
-
{
|
|
801
|
-
ref: t,
|
|
802
|
-
autoplay: !0,
|
|
803
|
-
playsInline: !0,
|
|
804
|
-
class: "IncodeCaptureVideoElement",
|
|
805
|
-
"aria-label": "Camera stream for ID capture",
|
|
806
|
-
muted: !0
|
|
807
|
-
}
|
|
808
|
-
) }),
|
|
809
805
|
/* @__PURE__ */ e(
|
|
810
|
-
|
|
806
|
+
"div",
|
|
811
807
|
{
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
808
|
+
class: `IncodeCaptureVideo${a ? "" : "IncodeCaptureVideoLoading"}`,
|
|
809
|
+
children: /* @__PURE__ */ e(
|
|
810
|
+
"video",
|
|
811
|
+
{
|
|
812
|
+
ref: i,
|
|
813
|
+
autoplay: !0,
|
|
814
|
+
playsInline: !0,
|
|
815
|
+
class: "IncodeCaptureVideoElement",
|
|
816
|
+
"aria-label": "Camera stream for ID capture",
|
|
817
|
+
muted: !0
|
|
818
|
+
}
|
|
819
|
+
)
|
|
819
820
|
}
|
|
820
821
|
),
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
822
|
+
a ? /* @__PURE__ */ e(_, { children: [
|
|
823
|
+
/* @__PURE__ */ e(
|
|
824
|
+
u1,
|
|
825
|
+
{
|
|
826
|
+
ref: r,
|
|
827
|
+
mode: t.currentMode,
|
|
828
|
+
orientation: t.orientation,
|
|
829
|
+
detectionStatus: t.detectionStatus,
|
|
830
|
+
counterValue: t.counterValue,
|
|
831
|
+
isCapturing: c,
|
|
832
|
+
onOpenHelp: B
|
|
833
|
+
}
|
|
834
|
+
),
|
|
835
|
+
L && /* @__PURE__ */ e(I1, { onClick: () => n.capture() }),
|
|
836
|
+
o && /* @__PURE__ */ e(
|
|
837
|
+
e1,
|
|
838
|
+
{
|
|
839
|
+
onClose: p,
|
|
840
|
+
onTakeManually: M
|
|
841
|
+
}
|
|
842
|
+
)
|
|
843
|
+
] }) : /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: /* @__PURE__ */ e(F, { size: "large" }) })
|
|
829
844
|
] }) });
|
|
830
|
-
},
|
|
845
|
+
}, v1 = () => /* @__PURE__ */ e(
|
|
831
846
|
"svg",
|
|
832
847
|
{
|
|
833
848
|
width: "119",
|
|
@@ -1021,7 +1036,7 @@ const c1 = ({
|
|
|
1021
1036
|
] })
|
|
1022
1037
|
]
|
|
1023
1038
|
}
|
|
1024
|
-
),
|
|
1039
|
+
), g1 = () => /* @__PURE__ */ e(
|
|
1025
1040
|
"svg",
|
|
1026
1041
|
{
|
|
1027
1042
|
width: "118",
|
|
@@ -1326,7 +1341,7 @@ const c1 = ({
|
|
|
1326
1341
|
] })
|
|
1327
1342
|
]
|
|
1328
1343
|
}
|
|
1329
|
-
),
|
|
1344
|
+
), w1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
1330
1345
|
"svg",
|
|
1331
1346
|
{
|
|
1332
1347
|
width: "46",
|
|
@@ -1359,34 +1374,34 @@ const c1 = ({
|
|
|
1359
1374
|
)
|
|
1360
1375
|
]
|
|
1361
1376
|
}
|
|
1362
|
-
),
|
|
1377
|
+
), H = ({
|
|
1363
1378
|
icon: n,
|
|
1364
|
-
title:
|
|
1365
|
-
description:
|
|
1379
|
+
title: t,
|
|
1380
|
+
description: i,
|
|
1366
1381
|
ariaLabel: r,
|
|
1367
1382
|
testId: o,
|
|
1368
|
-
onClick:
|
|
1383
|
+
onClick: s
|
|
1369
1384
|
}) => /* @__PURE__ */ e(
|
|
1370
1385
|
"button",
|
|
1371
1386
|
{
|
|
1372
1387
|
type: "button",
|
|
1373
1388
|
class: "IncodeChooserButton",
|
|
1374
|
-
onClick:
|
|
1389
|
+
onClick: s,
|
|
1375
1390
|
"aria-label": r,
|
|
1376
1391
|
"data-testid": o,
|
|
1377
1392
|
children: [
|
|
1378
1393
|
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonIcon", children: /* @__PURE__ */ e(n, {}) }),
|
|
1379
1394
|
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonContent", children: [
|
|
1380
|
-
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonTitle", children:
|
|
1395
|
+
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonTitle", children: t }),
|
|
1381
1396
|
/* @__PURE__ */ e(C, { size: 4 }),
|
|
1382
|
-
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonDescription", children:
|
|
1397
|
+
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonDescription", children: i }),
|
|
1383
1398
|
/* @__PURE__ */ e(C, { size: 8 }),
|
|
1384
|
-
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(
|
|
1399
|
+
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(w1, {}) })
|
|
1385
1400
|
] })
|
|
1386
1401
|
]
|
|
1387
1402
|
}
|
|
1388
|
-
),
|
|
1389
|
-
const { t
|
|
1403
|
+
), L1 = ({ manager: n }) => {
|
|
1404
|
+
const { t } = d(), i = () => {
|
|
1390
1405
|
n.selectDocument("id");
|
|
1391
1406
|
}, r = () => {
|
|
1392
1407
|
n.selectDocument("passport");
|
|
@@ -1394,28 +1409,28 @@ const c1 = ({
|
|
|
1394
1409
|
return /* @__PURE__ */ e(
|
|
1395
1410
|
x,
|
|
1396
1411
|
{
|
|
1397
|
-
title:
|
|
1412
|
+
title: t("idv2.chooser.title"),
|
|
1398
1413
|
"data-testid": "document-chooser-page",
|
|
1399
1414
|
className: "IncodeChooserPage",
|
|
1400
1415
|
children: /* @__PURE__ */ e("div", { class: "IncodeChooserContainer", children: /* @__PURE__ */ e("div", { class: "IncodeChooserButtons", children: [
|
|
1401
1416
|
/* @__PURE__ */ e(
|
|
1402
|
-
|
|
1417
|
+
H,
|
|
1403
1418
|
{
|
|
1404
|
-
icon:
|
|
1405
|
-
title:
|
|
1406
|
-
description:
|
|
1407
|
-
ariaLabel:
|
|
1419
|
+
icon: v1,
|
|
1420
|
+
title: t("idv2.chooser.idButtonTitle"),
|
|
1421
|
+
description: t("idv2.chooser.idButtonDescription"),
|
|
1422
|
+
ariaLabel: t("idv2.chooser.idButtonTitle"),
|
|
1408
1423
|
testId: "chooser-button-id",
|
|
1409
|
-
onClick:
|
|
1424
|
+
onClick: i
|
|
1410
1425
|
}
|
|
1411
1426
|
),
|
|
1412
1427
|
/* @__PURE__ */ e(
|
|
1413
|
-
|
|
1428
|
+
H,
|
|
1414
1429
|
{
|
|
1415
|
-
icon:
|
|
1416
|
-
title:
|
|
1417
|
-
description:
|
|
1418
|
-
ariaLabel:
|
|
1430
|
+
icon: g1,
|
|
1431
|
+
title: t("idv2.chooser.passportButtonTitle"),
|
|
1432
|
+
description: t("idv2.chooser.passportButtonDescription"),
|
|
1433
|
+
ariaLabel: t("idv2.chooser.passportButtonTitle"),
|
|
1419
1434
|
testId: "chooser-button-passport",
|
|
1420
1435
|
onClick: r
|
|
1421
1436
|
}
|
|
@@ -1423,70 +1438,73 @@ const c1 = ({
|
|
|
1423
1438
|
] }) })
|
|
1424
1439
|
}
|
|
1425
1440
|
);
|
|
1426
|
-
},
|
|
1441
|
+
}, P = ({
|
|
1427
1442
|
manager: n,
|
|
1428
|
-
direction:
|
|
1443
|
+
direction: t
|
|
1429
1444
|
}) => {
|
|
1430
|
-
const [
|
|
1431
|
-
|
|
1432
|
-
import("../flip-animation-COR596wy.js").then((
|
|
1433
|
-
r(
|
|
1445
|
+
const [i, r] = g(null), { t: o } = d();
|
|
1446
|
+
w(() => {
|
|
1447
|
+
import("../flip-animation-COR596wy.js").then((l) => {
|
|
1448
|
+
r(l.default);
|
|
1434
1449
|
});
|
|
1435
1450
|
}, []);
|
|
1436
|
-
const
|
|
1437
|
-
await new Promise((
|
|
1451
|
+
const s = async () => {
|
|
1452
|
+
await new Promise((l) => setTimeout(l, 1e3)), t === "toBack" ? n.continueToBack() : n.continueToFront();
|
|
1438
1453
|
};
|
|
1439
|
-
return
|
|
1440
|
-
/* @__PURE__ */ e(
|
|
1454
|
+
return i ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
1455
|
+
/* @__PURE__ */ e(k, { className: "IncodeFlipAnimationTitle", children: o(t === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
|
|
1441
1456
|
/* @__PURE__ */ e(C, { size: 32 }),
|
|
1442
1457
|
/* @__PURE__ */ e(
|
|
1443
|
-
|
|
1458
|
+
Z,
|
|
1444
1459
|
{
|
|
1445
|
-
animationData:
|
|
1460
|
+
animationData: i,
|
|
1446
1461
|
loop: !1,
|
|
1447
|
-
onComplete:
|
|
1462
|
+
onComplete: s
|
|
1448
1463
|
}
|
|
1449
1464
|
)
|
|
1450
1465
|
] }) : null;
|
|
1451
|
-
},
|
|
1452
|
-
const { t } =
|
|
1453
|
-
if (
|
|
1454
|
-
l ? import("../passport-tutorial-CaYBFTqt.js").then((
|
|
1455
|
-
|
|
1456
|
-
}) :
|
|
1457
|
-
|
|
1458
|
-
}) : import("../id-tutorial-B-F5Q28m.js").then((
|
|
1459
|
-
|
|
1466
|
+
}, y1 = ({ manager: n, state: t }) => {
|
|
1467
|
+
const { t: i } = d(), [r, o] = g(!1), [s, a] = g(null), l = t.selectedDocumentType === "passport", c = t.currentMode === "back";
|
|
1468
|
+
if (w(() => {
|
|
1469
|
+
l ? import("../passport-tutorial-CaYBFTqt.js").then((p) => {
|
|
1470
|
+
a(p.default);
|
|
1471
|
+
}) : c ? import("../id-tutorial-B-F5Q28m.js").then((p) => {
|
|
1472
|
+
a(p.default);
|
|
1473
|
+
}) : import("../id-tutorial-B-F5Q28m.js").then((p) => {
|
|
1474
|
+
a(p.default);
|
|
1460
1475
|
});
|
|
1461
|
-
}, [l,
|
|
1476
|
+
}, [l, c]), !s)
|
|
1462
1477
|
return null;
|
|
1463
|
-
const
|
|
1478
|
+
const f = i(l ? "idv2.capture.passport.title" : c ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), L = i(l ? "idv2.capture.passport.subtitle" : c ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
|
|
1464
1479
|
return /* @__PURE__ */ e(
|
|
1465
|
-
|
|
1480
|
+
$,
|
|
1466
1481
|
{
|
|
1467
|
-
animationData:
|
|
1468
|
-
title:
|
|
1469
|
-
subtitle:
|
|
1470
|
-
onContinue: () =>
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1482
|
+
animationData: s,
|
|
1483
|
+
title: f,
|
|
1484
|
+
subtitle: L,
|
|
1485
|
+
onContinue: () => {
|
|
1486
|
+
o(!0), n.nextStep();
|
|
1487
|
+
},
|
|
1488
|
+
buttonText: i("idv2.tutorial.startScan"),
|
|
1489
|
+
disclaimerText: i("idv2.tutorial.v2.autocapture"),
|
|
1490
|
+
isLoading: r,
|
|
1491
|
+
className: v(
|
|
1474
1492
|
"IncodeIdTutorial",
|
|
1475
1493
|
l ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId"
|
|
1476
1494
|
)
|
|
1477
1495
|
}
|
|
1478
1496
|
);
|
|
1479
|
-
}, x1 = ({ config: n, onFinish:
|
|
1480
|
-
const [r, o] =
|
|
1481
|
-
return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(
|
|
1482
|
-
|
|
1497
|
+
}, x1 = ({ config: n, onFinish: t, onError: i }) => {
|
|
1498
|
+
const [r, o] = N(() => O({ config: n }));
|
|
1499
|
+
return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(L1, { manager: o }) : r.status === "tutorial" ? /* @__PURE__ */ e(y1, { manager: o, state: r }) : r.status === "permissions" ? /* @__PURE__ */ e(
|
|
1500
|
+
K,
|
|
1483
1501
|
{
|
|
1484
1502
|
manager: o,
|
|
1485
1503
|
permissionStatus: r.permissionStatus
|
|
1486
1504
|
}
|
|
1487
|
-
) : r.status === "frontFinished" ? /* @__PURE__ */ e(
|
|
1488
|
-
},
|
|
1489
|
-
|
|
1505
|
+
) : r.status === "frontFinished" ? /* @__PURE__ */ e(P, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(P, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(f1, { manager: o, state: r, onFinish: () => t?.() }) : r.status === "processing" ? /* @__PURE__ */ e(j, {}) : r.status === "expired" ? /* @__PURE__ */ e(o1, { manager: o }) : r.status === "finished" ? (t?.(), null) : r.status === "closed" ? (i?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(A, { manager: o, state: r, onError: i }) : null;
|
|
1506
|
+
}, B1 = ({ config: n, onFinish: t, onError: i }) => /* @__PURE__ */ e(Q, { children: n ? /* @__PURE__ */ e(x1, { config: n, onFinish: t, onError: i }) : null });
|
|
1507
|
+
U(B1, "incode-id");
|
|
1490
1508
|
export {
|
|
1491
|
-
|
|
1509
|
+
B1 as Id
|
|
1492
1510
|
};
|
package/dist/id/styles.css
CHANGED
|
@@ -936,6 +936,10 @@
|
|
|
936
936
|
position: absolute;
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
+
.IncodeIdCapturePage .IncodeCapture .IncodeCaptureVideo.IncodeCaptureVideoLoading {
|
|
940
|
+
opacity: 0;
|
|
941
|
+
}
|
|
942
|
+
|
|
939
943
|
.IncodeIdCapturePage .IncodeCapture .IncodeCaptureVideo .IncodeCaptureVideoElement {
|
|
940
944
|
inset: var(--spacing-0, var(--spacing-none, 0px));
|
|
941
945
|
object-fit: cover;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260304-fb1914c",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"libphonenumber-js": "^1.11.0",
|
|
101
101
|
"preact-custom-element": "^4.6.0",
|
|
102
102
|
"tailwindcss": "^4.1.17",
|
|
103
|
-
"@incodetech/core": "0.0.0-dev-
|
|
103
|
+
"@incodetech/core": "0.0.0-dev-20260304-fb1914c"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@microsoft/api-extractor": "^7.53.3",
|