@incodetech/web 0.0.0-dev-20260303-3dab9f2 → 0.0.0-dev-20260304-4c68279
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/id/id.es.js +128 -125
- package/package.json +2 -2
package/dist/id/id.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { u as e, S as C, B as
|
|
1
|
+
import { u as e, S as C, B as f, c as m, r as A, a as R } from "../incodeModule-_kfNnq5z.js";
|
|
2
2
|
import { createIdCaptureManager as z } from "@incodetech/core/id";
|
|
3
|
-
import { d as
|
|
3
|
+
import { d as g, y as v, k as U, D as N, A as Z } from "../vendor-preact-BDue3y7V.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
5
|
import { L as b, B as O, P as G } from "../baseTutorial-Bbadb04i.js";
|
|
6
|
-
import { P as
|
|
6
|
+
import { P as y, I as $ } from "../incodeComponent-DSqGVqSo.js";
|
|
7
7
|
import { P as K } from "../processing-BuaxyhmY.js";
|
|
8
8
|
import "../instance-B-q0ZREN.js";
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as d } from "../useTranslation-B1jrtqlW.js";
|
|
10
10
|
import { T as _, S as Q } from "../spinner-Ogo-u91P.js";
|
|
11
11
|
const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
12
12
|
"svg",
|
|
@@ -191,7 +191,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
191
191
|
onClose: n,
|
|
192
192
|
onTakeManually: i
|
|
193
193
|
}) => {
|
|
194
|
-
const { t } =
|
|
194
|
+
const { t } = d(), r = () => {
|
|
195
195
|
i(), n();
|
|
196
196
|
};
|
|
197
197
|
return /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModal", children: /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModalContent", children: [
|
|
@@ -235,7 +235,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
235
235
|
] }),
|
|
236
236
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesButtons", children: [
|
|
237
237
|
/* @__PURE__ */ e(
|
|
238
|
-
|
|
238
|
+
f,
|
|
239
239
|
{
|
|
240
240
|
variant: "link",
|
|
241
241
|
onClick: r,
|
|
@@ -243,7 +243,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
243
243
|
children: t("commonIssues.takeManually")
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
|
-
/* @__PURE__ */ e(
|
|
246
|
+
/* @__PURE__ */ e(f, { onClick: n, class: "IncodeCommonIssuesTryAgain", children: t("commonIssues.tryAgain") })
|
|
247
247
|
] })
|
|
248
248
|
] })
|
|
249
249
|
] }) });
|
|
@@ -272,14 +272,14 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
272
272
|
children: r,
|
|
273
273
|
className: o
|
|
274
274
|
}) => {
|
|
275
|
-
const
|
|
275
|
+
const s = n !== "vertical" || i === "passport", a = i === "passport", l = `IncodeCaptureFrame${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
276
276
|
return /* @__PURE__ */ e(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
|
-
class:
|
|
279
|
+
class: m(
|
|
280
280
|
"IncodeCaptureFrame",
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
s ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
282
|
+
l,
|
|
283
283
|
a && "IncodeCaptureFramePassport",
|
|
284
284
|
o
|
|
285
285
|
),
|
|
@@ -292,11 +292,11 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
292
292
|
mode: t,
|
|
293
293
|
borderState: r,
|
|
294
294
|
topContent: o,
|
|
295
|
-
bottomContent:
|
|
295
|
+
bottomContent: s,
|
|
296
296
|
overlayContent: a
|
|
297
297
|
}) => {
|
|
298
|
-
const { t:
|
|
299
|
-
return /* @__PURE__ */ e(
|
|
298
|
+
const { t: l } = d();
|
|
299
|
+
return /* @__PURE__ */ e(y, { 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
|
e1,
|
|
@@ -320,9 +320,9 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
320
320
|
/* @__PURE__ */ e("div", { class: "IncodeIdProcessingBottomArea", children: [
|
|
321
321
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
322
322
|
/* @__PURE__ */ e(P, { className: "IncodeCaptureEncryptionIcon" }),
|
|
323
|
-
/* @__PURE__ */ e("span", { children:
|
|
323
|
+
/* @__PURE__ */ e("span", { children: l("v2.capture.label") })
|
|
324
324
|
] }),
|
|
325
|
-
|
|
325
|
+
s
|
|
326
326
|
] })
|
|
327
327
|
] }) }) });
|
|
328
328
|
}, t1 = ({
|
|
@@ -331,14 +331,14 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
331
331
|
orientation: t,
|
|
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 = t !== "vertical" || r === "passport", [a, l] = g(null);
|
|
335
|
+
return v(() => {
|
|
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
|
-
}, [
|
|
341
|
+
}, [s]), /* @__PURE__ */ e(
|
|
342
342
|
k,
|
|
343
343
|
{
|
|
344
344
|
imageUrl: n,
|
|
@@ -405,12 +405,12 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
405
405
|
orientation: t,
|
|
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: h } = d();
|
|
414
414
|
return /* @__PURE__ */ e(
|
|
415
415
|
k,
|
|
416
416
|
{
|
|
@@ -422,24 +422,24 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
422
422
|
n === "success" ? /* @__PURE__ */ e(i1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(F, { className: "IncodeIdProcessingResultIcon" }),
|
|
423
423
|
/* @__PURE__ */ e(C, { size: 16 }),
|
|
424
424
|
o && /* @__PURE__ */ e("h2", { class: "IncodeIdProcessingResultTitle", children: o }),
|
|
425
|
-
|
|
425
|
+
s && /* @__PURE__ */ e(U, { 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: h("v2.idError.attemptsLeft", {
|
|
432
|
+
count: c
|
|
433
433
|
}) }),
|
|
434
|
-
/* @__PURE__ */ e(
|
|
434
|
+
/* @__PURE__ */ e(f, { onClick: l, "data-testid": "retry-button", children: a })
|
|
435
435
|
] })
|
|
436
436
|
}
|
|
437
437
|
);
|
|
438
438
|
}, n1 = ({ manager: n, state: i }) => {
|
|
439
|
-
const { t } =
|
|
439
|
+
const { t } = d();
|
|
440
440
|
if (!i.previewImageUrl)
|
|
441
441
|
return null;
|
|
442
|
-
const r = i.currentMode === "passport" ? "passport" : "id", o = () => i.needsBackCapture ? t("v2.idSuccess.subtitle") : i.needsFrontCapture ? t("idv2.capture.processing.successBackSubtitleScanFront") : t("v2.idSuccess.subtitleBack"),
|
|
442
|
+
const r = i.currentMode === "passport" ? "passport" : "id", o = () => i.needsBackCapture ? t("v2.idSuccess.subtitle") : i.needsFrontCapture ? t("idv2.capture.processing.successBackSubtitleScanFront") : t("v2.idSuccess.subtitleBack"), s = () => i.needsBackCapture ? t("idv2.capture.processing.scanBack") : i.needsFrontCapture ? t("idv2.capture.processing.scanFront") : t("idv2.capturePreview.continue");
|
|
443
443
|
return /* @__PURE__ */ e(
|
|
444
444
|
V,
|
|
445
445
|
{
|
|
@@ -449,16 +449,16 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
449
449
|
mode: r,
|
|
450
450
|
title: t("v2.idSuccess.title"),
|
|
451
451
|
subtitle: o(),
|
|
452
|
-
buttonText:
|
|
452
|
+
buttonText: s(),
|
|
453
453
|
onButtonClick: () => n.nextStep()
|
|
454
454
|
}
|
|
455
455
|
);
|
|
456
456
|
}, D = ({ manager: n, state: i, ...t }) => {
|
|
457
|
-
const { t: r } =
|
|
457
|
+
const { t: r } = d();
|
|
458
458
|
if (i.status === "error")
|
|
459
459
|
return /* @__PURE__ */ e("div", { class: "IncodeIdError", children: [
|
|
460
460
|
/* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children: i.error }),
|
|
461
|
-
/* @__PURE__ */ e(
|
|
461
|
+
/* @__PURE__ */ e(f, { onClick: () => n.reset(), "data-testid": "retry-button", children: r("idv2.capturePreview.retry") })
|
|
462
462
|
] });
|
|
463
463
|
const o = i.currentMode === "passport" ? "passport" : "id";
|
|
464
464
|
return i.previewImageUrl ? /* @__PURE__ */ e(
|
|
@@ -476,10 +476,10 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
476
476
|
}
|
|
477
477
|
) : null;
|
|
478
478
|
}, r1 = ({ manager: n }) => {
|
|
479
|
-
const { t: i } =
|
|
479
|
+
const { t: i } = d(), t = () => {
|
|
480
480
|
n.retryCapture();
|
|
481
481
|
};
|
|
482
|
-
return /* @__PURE__ */ e(
|
|
482
|
+
return /* @__PURE__ */ e(y, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdExpiredPage", children: [
|
|
483
483
|
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredContent", children: [
|
|
484
484
|
/* @__PURE__ */ e(F, { className: "IncodeIdExpiredIcon" }),
|
|
485
485
|
/* @__PURE__ */ e(_, { className: "IncodeIdExpiredTitle", children: i("idv2.capture.notifications.expiredId") }),
|
|
@@ -487,7 +487,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
487
487
|
/* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children: i("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(f, { variant: "primary", onClick: t, children: i("idv2.unacceptedId.tryAgain") }) })
|
|
491
491
|
] });
|
|
492
492
|
}, o1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
493
493
|
"svg",
|
|
@@ -522,7 +522,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
522
522
|
}
|
|
523
523
|
), p = /* @__PURE__ */ new Map();
|
|
524
524
|
let T = !1;
|
|
525
|
-
const
|
|
525
|
+
const x = {
|
|
526
526
|
blur: () => import("../blurdevicelottie-_BZRug1c.js"),
|
|
527
527
|
glare: () => import("../glaredevicelottie-DLuIStvb.js"),
|
|
528
528
|
align: () => import("../aligndevicelottie-DlQCRPfM.js"),
|
|
@@ -531,13 +531,13 @@ const w = {
|
|
|
531
531
|
};
|
|
532
532
|
function S(n) {
|
|
533
533
|
T || (T = !0, Promise.all([
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
]).then(([i, t, r, o,
|
|
540
|
-
p.set("blur", i.default), p.set("glare", t.default), p.set("align", r.default), p.set("front", o.default), p.set("back",
|
|
534
|
+
x.blur(),
|
|
535
|
+
x.glare(),
|
|
536
|
+
x.align(),
|
|
537
|
+
x.front(),
|
|
538
|
+
x.back()
|
|
539
|
+
]).then(([i, t, r, o, s]) => {
|
|
540
|
+
p.set("blur", i.default), p.set("glare", t.default), p.set("align", r.default), p.set("front", o.default), p.set("back", s.default), n?.();
|
|
541
541
|
}).catch(() => {
|
|
542
542
|
}));
|
|
543
543
|
}
|
|
@@ -545,13 +545,13 @@ function l1() {
|
|
|
545
545
|
S();
|
|
546
546
|
}
|
|
547
547
|
function s1() {
|
|
548
|
-
|
|
548
|
+
v(() => {
|
|
549
549
|
l1();
|
|
550
550
|
}, []);
|
|
551
551
|
}
|
|
552
552
|
function a1(n, i) {
|
|
553
|
-
const { t } =
|
|
554
|
-
if (
|
|
553
|
+
const { t } = d(), [, r] = g(0);
|
|
554
|
+
if (v(() => {
|
|
555
555
|
S(() => r((o) => o + 1));
|
|
556
556
|
}, []), n === "blur")
|
|
557
557
|
return {
|
|
@@ -586,8 +586,8 @@ const c1 = ({
|
|
|
586
586
|
mode: i
|
|
587
587
|
}) => {
|
|
588
588
|
const t = a1(n, i);
|
|
589
|
-
return t ? /* @__PURE__ */ e("div", { class:
|
|
590
|
-
/* @__PURE__ */ e("div", { class:
|
|
589
|
+
return t ? /* @__PURE__ */ e("div", { class: m("IncodeIdCaptureNotification"), children: /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationContent", children: [
|
|
590
|
+
/* @__PURE__ */ e("div", { class: m("IncodeIdCaptureNotificationText"), children: [
|
|
591
591
|
/* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children: t.title }),
|
|
592
592
|
t.description && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationDescription", children: t.description })
|
|
593
593
|
] }),
|
|
@@ -601,37 +601,37 @@ const c1 = ({
|
|
|
601
601
|
detectionStatus: t,
|
|
602
602
|
counterValue: r,
|
|
603
603
|
isCapturing: o,
|
|
604
|
-
onOpenHelp:
|
|
604
|
+
onOpenHelp: s
|
|
605
605
|
}, a) => {
|
|
606
|
-
const { t:
|
|
606
|
+
const { t: l } = d();
|
|
607
607
|
s1();
|
|
608
|
-
const
|
|
608
|
+
const c = t === "detecting" || t === "idNotDetected" || t === "manualCapture", h = () => o || t === "capturing" ? "Capturing" : t === "blur" || t === "glare" || t === "wrongSide" || t === "farAway" ? "Error" : "Idle", w = () => {
|
|
609
609
|
if (o || t === "capturing")
|
|
610
610
|
return {
|
|
611
|
-
title:
|
|
612
|
-
subtitle:
|
|
611
|
+
title: l("idv2.capture.takingPhoto"),
|
|
612
|
+
subtitle: l("idv2.capture.dontMove")
|
|
613
613
|
};
|
|
614
|
-
if (
|
|
614
|
+
if (c) {
|
|
615
615
|
const M = t === "manualCapture";
|
|
616
616
|
return n === "passport" ? {
|
|
617
|
-
title:
|
|
618
|
-
subtitle: M ? "" :
|
|
617
|
+
title: l("idv2.capture.fillFramePassport"),
|
|
618
|
+
subtitle: M ? "" : l("idv2.capture.v2.autoCapture")
|
|
619
619
|
} : n === "back" ? {
|
|
620
|
-
title:
|
|
621
|
-
subtitle: M ? "" :
|
|
620
|
+
title: l("idv2.capture.v2.fillFrameBack"),
|
|
621
|
+
subtitle: M ? "" : l("idv2.capture.v2.autoCapture")
|
|
622
622
|
} : {
|
|
623
|
-
title:
|
|
624
|
-
subtitle: M ? "" :
|
|
623
|
+
title: l("idv2.capture.v2.fillFrameFront"),
|
|
624
|
+
subtitle: M ? "" : l("idv2.capture.v2.autoCapture")
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
return null;
|
|
628
|
-
}, B =
|
|
628
|
+
}, B = h(), u = w(), L = n === "passport", I = i !== "vertical" || L;
|
|
629
629
|
return /* @__PURE__ */ e(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
|
-
class:
|
|
632
|
+
class: m(
|
|
633
633
|
"IncodeCaptureOverlay",
|
|
634
|
-
!
|
|
634
|
+
!I && "IncodeCaptureOverlayVertical"
|
|
635
635
|
),
|
|
636
636
|
children: [
|
|
637
637
|
/* @__PURE__ */ e(
|
|
@@ -639,23 +639,23 @@ const c1 = ({
|
|
|
639
639
|
{
|
|
640
640
|
detectionStatus: t,
|
|
641
641
|
mode: n,
|
|
642
|
-
topContent:
|
|
642
|
+
topContent: u
|
|
643
643
|
}
|
|
644
644
|
),
|
|
645
645
|
/* @__PURE__ */ e(
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
648
648
|
ref: a,
|
|
649
|
-
class:
|
|
649
|
+
class: m(
|
|
650
650
|
"IncodeCaptureFrame",
|
|
651
|
-
|
|
651
|
+
I ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
652
652
|
`IncodeCaptureFrame${B}`,
|
|
653
|
-
|
|
653
|
+
L && "IncodeCaptureFramePassport"
|
|
654
654
|
),
|
|
655
655
|
children: o && r > 0 && /* @__PURE__ */ e("div", { class: "IncodeCaptureCounter", children: r })
|
|
656
656
|
}
|
|
657
657
|
),
|
|
658
|
-
/* @__PURE__ */ e(C1, { onOpenHelp:
|
|
658
|
+
/* @__PURE__ */ e(C1, { onOpenHelp: s })
|
|
659
659
|
]
|
|
660
660
|
}
|
|
661
661
|
);
|
|
@@ -665,7 +665,7 @@ const c1 = ({
|
|
|
665
665
|
/* @__PURE__ */ e(
|
|
666
666
|
"div",
|
|
667
667
|
{
|
|
668
|
-
class:
|
|
668
|
+
class: m(
|
|
669
669
|
"IncodeCaptureTopText",
|
|
670
670
|
!t && "IncodeCaptureTopTextHidden"
|
|
671
671
|
),
|
|
@@ -676,14 +676,14 @@ const c1 = ({
|
|
|
676
676
|
}
|
|
677
677
|
)
|
|
678
678
|
] }), C1 = ({ onOpenHelp: n }) => {
|
|
679
|
-
const { t: i } =
|
|
679
|
+
const { t: i } = d();
|
|
680
680
|
return /* @__PURE__ */ e("div", { class: "IncodeCaptureBottomSection", children: [
|
|
681
681
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
682
682
|
/* @__PURE__ */ e(P, { className: "IncodeCaptureEncryptionIcon" }),
|
|
683
683
|
/* @__PURE__ */ e("span", { children: i("v2.capture.label") })
|
|
684
684
|
] }),
|
|
685
685
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureHelpButton", children: /* @__PURE__ */ e(
|
|
686
|
-
|
|
686
|
+
f,
|
|
687
687
|
{
|
|
688
688
|
variant: "link",
|
|
689
689
|
onClick: n,
|
|
@@ -722,7 +722,7 @@ const c1 = ({
|
|
|
722
722
|
onClick: n,
|
|
723
723
|
disabled: i
|
|
724
724
|
}) => {
|
|
725
|
-
const { t } =
|
|
725
|
+
const { t } = d();
|
|
726
726
|
return /* @__PURE__ */ e(
|
|
727
727
|
"div",
|
|
728
728
|
{
|
|
@@ -734,7 +734,7 @@ const c1 = ({
|
|
|
734
734
|
/* @__PURE__ */ e("li", { children: t("idv2.commonIssues.secondStep") })
|
|
735
735
|
] }) }) }),
|
|
736
736
|
/* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureButtonContent", children: /* @__PURE__ */ e(
|
|
737
|
-
|
|
737
|
+
f,
|
|
738
738
|
{
|
|
739
739
|
variant: "link",
|
|
740
740
|
onClick: n,
|
|
@@ -748,9 +748,9 @@ const c1 = ({
|
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
}, I1 = ({ manager: n, state: i }) => {
|
|
751
|
-
const { t } =
|
|
751
|
+
const { t } = d();
|
|
752
752
|
if (i.captureStatus === "initializing")
|
|
753
|
-
return /* @__PURE__ */ e(
|
|
753
|
+
return /* @__PURE__ */ e(y, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: [
|
|
754
754
|
/* @__PURE__ */ e(Q, { size: "large" }),
|
|
755
755
|
/* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children: t("idv2.capture.initializing") })
|
|
756
756
|
] }) });
|
|
@@ -768,33 +768,33 @@ const c1 = ({
|
|
|
768
768
|
}
|
|
769
769
|
return i.captureStatus === "success" && i.previewImageUrl ? /* @__PURE__ */ e(n1, { manager: n, state: i }) : i.captureStatus === "uploadError" && i.previewImageUrl ? /* @__PURE__ */ e(D, { manager: n, state: i }) : /* @__PURE__ */ e(f1, { manager: n, state: i });
|
|
770
770
|
}, f1 = ({ manager: n, state: i }) => {
|
|
771
|
-
const t = Z(null), r = Z(null), [o,
|
|
772
|
-
|
|
771
|
+
const t = Z(null), r = Z(null), [o, s] = g(!1);
|
|
772
|
+
v(() => {
|
|
773
773
|
t.current && i.stream && (t.current.srcObject = i.stream, t.current.play().catch(() => {
|
|
774
774
|
}));
|
|
775
|
-
}, [i.stream]),
|
|
776
|
-
const
|
|
777
|
-
const
|
|
778
|
-
if (!
|
|
775
|
+
}, [i.stream]), v(() => {
|
|
776
|
+
const u = () => {
|
|
777
|
+
const L = r.current;
|
|
778
|
+
if (!L)
|
|
779
779
|
return;
|
|
780
|
-
const
|
|
780
|
+
const I = L.getBoundingClientRect();
|
|
781
781
|
n.updateDetectionArea({
|
|
782
|
-
x:
|
|
783
|
-
y:
|
|
784
|
-
width:
|
|
785
|
-
height:
|
|
782
|
+
x: I.left,
|
|
783
|
+
y: I.top,
|
|
784
|
+
width: I.width,
|
|
785
|
+
height: I.height
|
|
786
786
|
});
|
|
787
787
|
};
|
|
788
|
-
return
|
|
788
|
+
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
789
789
|
}, [n, i.orientation]);
|
|
790
|
-
const a = i.captureStatus === "capturing" || i.detectionStatus === "capturing",
|
|
791
|
-
|
|
792
|
-
},
|
|
793
|
-
|
|
790
|
+
const a = i.captureStatus === "capturing" || i.detectionStatus === "capturing", l = i.detectionStatus, c = l === "manualCapture" || i.showCaptureButtonInAuto && i.captureStatus === "detecting" && l !== "capturing", h = () => {
|
|
791
|
+
s(!0);
|
|
792
|
+
}, w = () => {
|
|
793
|
+
s(!1);
|
|
794
794
|
}, B = () => {
|
|
795
|
-
|
|
795
|
+
s(!1), n.switchToManualCapture();
|
|
796
796
|
};
|
|
797
|
-
return /* @__PURE__ */ e(
|
|
797
|
+
return /* @__PURE__ */ e(y, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCapture", children: [
|
|
798
798
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ e(
|
|
799
799
|
"video",
|
|
800
800
|
{
|
|
@@ -815,14 +815,14 @@ const c1 = ({
|
|
|
815
815
|
detectionStatus: i.detectionStatus,
|
|
816
816
|
counterValue: i.counterValue,
|
|
817
817
|
isCapturing: a,
|
|
818
|
-
onOpenHelp:
|
|
818
|
+
onOpenHelp: h
|
|
819
819
|
}
|
|
820
820
|
),
|
|
821
|
-
|
|
821
|
+
c && /* @__PURE__ */ e(h1, { onClick: () => n.capture() }),
|
|
822
822
|
o && /* @__PURE__ */ e(
|
|
823
823
|
Y,
|
|
824
824
|
{
|
|
825
|
-
onClose:
|
|
825
|
+
onClose: w,
|
|
826
826
|
onTakeManually: B
|
|
827
827
|
}
|
|
828
828
|
)
|
|
@@ -1365,13 +1365,13 @@ const c1 = ({
|
|
|
1365
1365
|
description: t,
|
|
1366
1366
|
ariaLabel: r,
|
|
1367
1367
|
testId: o,
|
|
1368
|
-
onClick:
|
|
1368
|
+
onClick: s
|
|
1369
1369
|
}) => /* @__PURE__ */ e(
|
|
1370
1370
|
"button",
|
|
1371
1371
|
{
|
|
1372
1372
|
type: "button",
|
|
1373
1373
|
class: "IncodeChooserButton",
|
|
1374
|
-
onClick:
|
|
1374
|
+
onClick: s,
|
|
1375
1375
|
"aria-label": r,
|
|
1376
1376
|
"data-testid": o,
|
|
1377
1377
|
children: [
|
|
@@ -1386,13 +1386,13 @@ const c1 = ({
|
|
|
1386
1386
|
]
|
|
1387
1387
|
}
|
|
1388
1388
|
), w1 = ({ manager: n }) => {
|
|
1389
|
-
const { t: i } =
|
|
1389
|
+
const { t: i } = d(), t = () => {
|
|
1390
1390
|
n.selectDocument("id");
|
|
1391
1391
|
}, r = () => {
|
|
1392
1392
|
n.selectDocument("passport");
|
|
1393
1393
|
};
|
|
1394
1394
|
return /* @__PURE__ */ e(
|
|
1395
|
-
|
|
1395
|
+
y,
|
|
1396
1396
|
{
|
|
1397
1397
|
title: i("idv2.chooser.title"),
|
|
1398
1398
|
"data-testid": "document-chooser-page",
|
|
@@ -1427,14 +1427,14 @@ const c1 = ({
|
|
|
1427
1427
|
manager: n,
|
|
1428
1428
|
direction: i
|
|
1429
1429
|
}) => {
|
|
1430
|
-
const [t, r] =
|
|
1431
|
-
|
|
1432
|
-
import("../flip-animation-COR596wy.js").then((
|
|
1433
|
-
r(
|
|
1430
|
+
const [t, r] = g(null), { t: o } = d();
|
|
1431
|
+
v(() => {
|
|
1432
|
+
import("../flip-animation-COR596wy.js").then((l) => {
|
|
1433
|
+
r(l.default);
|
|
1434
1434
|
});
|
|
1435
1435
|
}, []);
|
|
1436
|
-
const
|
|
1437
|
-
await new Promise((
|
|
1436
|
+
const s = async () => {
|
|
1437
|
+
await new Promise((l) => setTimeout(l, 1e3)), i === "toBack" ? n.continueToBack() : n.continueToFront();
|
|
1438
1438
|
};
|
|
1439
1439
|
return t ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
1440
1440
|
/* @__PURE__ */ e(_, { className: "IncodeFlipAnimationTitle", children: o(i === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
|
|
@@ -1444,33 +1444,36 @@ const c1 = ({
|
|
|
1444
1444
|
{
|
|
1445
1445
|
animationData: t,
|
|
1446
1446
|
loop: !1,
|
|
1447
|
-
onComplete:
|
|
1447
|
+
onComplete: s
|
|
1448
1448
|
}
|
|
1449
1449
|
)
|
|
1450
1450
|
] }) : null;
|
|
1451
1451
|
}, L1 = ({ manager: n, state: i }) => {
|
|
1452
|
-
const { t } =
|
|
1453
|
-
if (
|
|
1452
|
+
const { t } = d(), [r, o] = g(!1), [s, a] = g(null), l = i.selectedDocumentType === "passport", c = i.currentMode === "back";
|
|
1453
|
+
if (v(() => {
|
|
1454
1454
|
l ? import("../passport-tutorial-CaYBFTqt.js").then((u) => {
|
|
1455
|
-
|
|
1456
|
-
}) :
|
|
1457
|
-
|
|
1455
|
+
a(u.default);
|
|
1456
|
+
}) : c ? import("../id-tutorial-B-F5Q28m.js").then((u) => {
|
|
1457
|
+
a(u.default);
|
|
1458
1458
|
}) : import("../id-tutorial-B-F5Q28m.js").then((u) => {
|
|
1459
|
-
|
|
1459
|
+
a(u.default);
|
|
1460
1460
|
});
|
|
1461
|
-
}, [l,
|
|
1461
|
+
}, [l, c]), !s)
|
|
1462
1462
|
return null;
|
|
1463
|
-
const
|
|
1463
|
+
const h = t(l ? "idv2.capture.passport.title" : c ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), w = t(l ? "idv2.capture.passport.subtitle" : c ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
|
|
1464
1464
|
return /* @__PURE__ */ e(
|
|
1465
1465
|
O,
|
|
1466
1466
|
{
|
|
1467
|
-
animationData:
|
|
1468
|
-
title:
|
|
1469
|
-
subtitle:
|
|
1470
|
-
onContinue: () =>
|
|
1467
|
+
animationData: s,
|
|
1468
|
+
title: h,
|
|
1469
|
+
subtitle: w,
|
|
1470
|
+
onContinue: () => {
|
|
1471
|
+
o(!0), n.nextStep();
|
|
1472
|
+
},
|
|
1471
1473
|
buttonText: t("idv2.tutorial.startScan"),
|
|
1472
1474
|
disclaimerText: t("idv2.tutorial.v2.autocapture"),
|
|
1473
|
-
|
|
1475
|
+
isLoading: r,
|
|
1476
|
+
className: m(
|
|
1474
1477
|
"IncodeIdTutorial",
|
|
1475
1478
|
l ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId"
|
|
1476
1479
|
)
|
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-4c68279",
|
|
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-4c68279"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@microsoft/api-extractor": "^7.53.3",
|