@incodetech/web 0.0.0-dev-20260306-aac8dd3 → 0.0.0-dev-20260309-3ae0dc2
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 +134 -134
- package/package.json +2 -2
package/dist/id/id.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { u as e, b as u, S as p, B, c as w, r as
|
|
2
|
-
import { createIdCaptureManager as
|
|
3
|
-
import { d as m, y as v, k as
|
|
1
|
+
import { u as e, b as u, S as p, B, c as w, r as U, I as N, a as O } from "../incodeModule-Cep-QgBA.js";
|
|
2
|
+
import { createIdCaptureManager as G } from "@incodetech/core/id";
|
|
3
|
+
import { d as m, y as v, k as K, D as Q, A as Z, q as j } from "../vendor-preact-DP-hbKuj.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { L as E, B as
|
|
5
|
+
import { L as E, B as q, P as W } from "../baseTutorial-Bn4o165G.js";
|
|
6
6
|
import { P as $ } from "../processing-BivHhXrQ.js";
|
|
7
7
|
import "../uiConfig-B8PUPgHY.js";
|
|
8
|
-
import { L as
|
|
8
|
+
import { L as J, P as X, a as Y, b as e1, c as t1, C as i1, d as n1 } from "../captureFooter-I1T3jXYf.js";
|
|
9
9
|
import { P as M } from "../page-ws5_se-Y.js";
|
|
10
|
-
import { T as H, S as
|
|
11
|
-
const
|
|
10
|
+
import { T as H, S as D } from "../spinner-BNswWIfS.js";
|
|
11
|
+
const r1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
12
12
|
"svg",
|
|
13
13
|
{
|
|
14
14
|
width: "24",
|
|
@@ -56,7 +56,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
56
56
|
)
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
),
|
|
59
|
+
), o1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
60
60
|
"svg",
|
|
61
61
|
{
|
|
62
62
|
width: "24",
|
|
@@ -74,7 +74,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
|
-
),
|
|
77
|
+
), s1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
78
78
|
"svg",
|
|
79
79
|
{
|
|
80
80
|
width: "24",
|
|
@@ -115,7 +115,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
115
115
|
)
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
|
-
),
|
|
118
|
+
), l1 = ({
|
|
119
119
|
className: n
|
|
120
120
|
}) => /* @__PURE__ */ e(
|
|
121
121
|
"svg",
|
|
@@ -166,7 +166,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
166
166
|
)
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
|
-
),
|
|
169
|
+
), a1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
170
170
|
"svg",
|
|
171
171
|
{
|
|
172
172
|
width: "64",
|
|
@@ -187,7 +187,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
187
187
|
)
|
|
188
188
|
]
|
|
189
189
|
}
|
|
190
|
-
),
|
|
190
|
+
), c1 = ({
|
|
191
191
|
onClose: n,
|
|
192
192
|
onTakeManually: t
|
|
193
193
|
}) => {
|
|
@@ -202,31 +202,31 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
202
202
|
class: "IncodeCommonIssuesCloseButton",
|
|
203
203
|
onClick: n,
|
|
204
204
|
"aria-label": i("commonIssues.close"),
|
|
205
|
-
children: /* @__PURE__ */ e(
|
|
205
|
+
children: /* @__PURE__ */ e(o1, {})
|
|
206
206
|
}
|
|
207
207
|
) }),
|
|
208
208
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesContent", children: [
|
|
209
|
-
/* @__PURE__ */ e(
|
|
209
|
+
/* @__PURE__ */ e(a1, { className: "IncodeCommonIssuesQuestionIcon" }),
|
|
210
210
|
/* @__PURE__ */ e(p, { size: 12 }),
|
|
211
211
|
/* @__PURE__ */ e("h2", { class: "IncodeCommonIssuesTitle", children: i("commonIssues.commonIssues") }),
|
|
212
212
|
/* @__PURE__ */ e(p, { 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(s1, {}) }),
|
|
216
216
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
217
217
|
/* @__PURE__ */ e("h5", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.glarePresent") }),
|
|
218
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(r1, {}) }),
|
|
223
223
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
224
224
|
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.blurPresent") }),
|
|
225
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(l1, {}) }),
|
|
230
230
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
231
231
|
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.notReadable") }),
|
|
232
232
|
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.notReadableDescription") })
|
|
@@ -247,14 +247,14 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
247
247
|
] })
|
|
248
248
|
] })
|
|
249
249
|
] }) });
|
|
250
|
-
},
|
|
250
|
+
}, d1 = ({
|
|
251
251
|
orientation: n,
|
|
252
252
|
mode: t,
|
|
253
253
|
state: i,
|
|
254
254
|
children: r,
|
|
255
255
|
className: o
|
|
256
256
|
}) => {
|
|
257
|
-
const s = n !== "vertical" || t === "passport",
|
|
257
|
+
const s = n !== "vertical" || t === "passport", c = t === "passport", l = `IncodeCaptureFrame${i.charAt(0).toUpperCase() + i.slice(1)}`;
|
|
258
258
|
return /* @__PURE__ */ e(
|
|
259
259
|
"div",
|
|
260
260
|
{
|
|
@@ -262,26 +262,26 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
262
262
|
"IncodeCaptureFrame",
|
|
263
263
|
s ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
264
264
|
l,
|
|
265
|
-
|
|
265
|
+
c && "IncodeCaptureFramePassport",
|
|
266
266
|
o
|
|
267
267
|
),
|
|
268
268
|
children: r
|
|
269
269
|
}
|
|
270
270
|
);
|
|
271
|
-
},
|
|
271
|
+
}, V = ({
|
|
272
272
|
imageUrl: n,
|
|
273
273
|
orientation: t,
|
|
274
274
|
mode: i,
|
|
275
275
|
borderState: r,
|
|
276
276
|
topContent: o,
|
|
277
277
|
bottomContent: s,
|
|
278
|
-
overlayContent:
|
|
278
|
+
overlayContent: c
|
|
279
279
|
}) => {
|
|
280
280
|
const { t: l } = u();
|
|
281
281
|
return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayout", children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayoutContent", children: [
|
|
282
282
|
o && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingTopArea", children: o }),
|
|
283
283
|
/* @__PURE__ */ e(
|
|
284
|
-
|
|
284
|
+
d1,
|
|
285
285
|
{
|
|
286
286
|
orientation: t,
|
|
287
287
|
mode: i === "id" ? "front" : i,
|
|
@@ -295,53 +295,53 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
295
295
|
class: "IncodeIdProcessingImage"
|
|
296
296
|
}
|
|
297
297
|
),
|
|
298
|
-
|
|
298
|
+
c && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingOverlay", children: c })
|
|
299
299
|
]
|
|
300
300
|
}
|
|
301
301
|
),
|
|
302
302
|
/* @__PURE__ */ e("div", { class: "IncodeIdProcessingBottomArea", children: [
|
|
303
303
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
304
|
-
/* @__PURE__ */ e(
|
|
304
|
+
/* @__PURE__ */ e(J, { className: "IncodeCaptureEncryptionIcon" }),
|
|
305
305
|
/* @__PURE__ */ e("span", { children: l("v2.capture.label") })
|
|
306
306
|
] }),
|
|
307
307
|
s
|
|
308
308
|
] })
|
|
309
309
|
] }) }) });
|
|
310
|
-
},
|
|
310
|
+
}, u1 = ({
|
|
311
311
|
imageUrl: n,
|
|
312
312
|
progress: t,
|
|
313
313
|
orientation: i,
|
|
314
314
|
mode: r
|
|
315
315
|
}) => {
|
|
316
|
-
const { t: o } = u(), s = i !== "vertical" || r === "passport", [
|
|
316
|
+
const { t: o } = u(), s = i !== "vertical" || r === "passport", [c, l] = m(null);
|
|
317
317
|
return v(() => {
|
|
318
|
-
s ? import("../id-laser-h-BBV3r3rz.js").then((
|
|
319
|
-
l(
|
|
320
|
-
}) : import("../id-laser-v-BTHJaSfx.js").then((
|
|
321
|
-
l(
|
|
318
|
+
s ? import("../id-laser-h-BBV3r3rz.js").then((d) => {
|
|
319
|
+
l(d.default);
|
|
320
|
+
}) : import("../id-laser-v-BTHJaSfx.js").then((d) => {
|
|
321
|
+
l(d.default);
|
|
322
322
|
});
|
|
323
323
|
}, [s]), /* @__PURE__ */ e(
|
|
324
|
-
|
|
324
|
+
V,
|
|
325
325
|
{
|
|
326
326
|
imageUrl: n,
|
|
327
327
|
orientation: i,
|
|
328
328
|
mode: r,
|
|
329
329
|
borderState: "analyzing",
|
|
330
330
|
topContent: /* @__PURE__ */ e("div", { class: "IncodeAnalyzingContent", children: [
|
|
331
|
-
/* @__PURE__ */ e(
|
|
331
|
+
/* @__PURE__ */ e(X, { progress: t }),
|
|
332
332
|
/* @__PURE__ */ e("h2", { class: "IncodeAnalyzingTitle", children: o("idv2.capture.processing.analyzing") })
|
|
333
333
|
] }),
|
|
334
|
-
overlayContent:
|
|
334
|
+
overlayContent: c ? /* @__PURE__ */ e(
|
|
335
335
|
E,
|
|
336
336
|
{
|
|
337
|
-
animationData:
|
|
337
|
+
animationData: c,
|
|
338
338
|
loop: !0,
|
|
339
339
|
className: "IncodeAnalyzingLottie"
|
|
340
340
|
}
|
|
341
341
|
) : null
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
|
-
},
|
|
344
|
+
}, C1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
345
345
|
"svg",
|
|
346
346
|
{
|
|
347
347
|
class: n,
|
|
@@ -358,7 +358,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
358
358
|
}
|
|
359
359
|
)
|
|
360
360
|
}
|
|
361
|
-
),
|
|
361
|
+
), A = ({ className: n }) => /* @__PURE__ */ e(
|
|
362
362
|
"svg",
|
|
363
363
|
{
|
|
364
364
|
class: n,
|
|
@@ -375,49 +375,49 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
375
375
|
}
|
|
376
376
|
)
|
|
377
377
|
}
|
|
378
|
-
),
|
|
378
|
+
), S = ({
|
|
379
379
|
variant: n,
|
|
380
380
|
imageUrl: t,
|
|
381
381
|
orientation: i,
|
|
382
382
|
mode: r,
|
|
383
383
|
title: o,
|
|
384
384
|
subtitle: s,
|
|
385
|
-
buttonText:
|
|
385
|
+
buttonText: c,
|
|
386
386
|
onButtonClick: l,
|
|
387
|
-
attemptsRemaining:
|
|
387
|
+
attemptsRemaining: d
|
|
388
388
|
}) => {
|
|
389
|
-
const { t:
|
|
389
|
+
const { t: a } = u();
|
|
390
390
|
return /* @__PURE__ */ e(
|
|
391
|
-
|
|
391
|
+
V,
|
|
392
392
|
{
|
|
393
393
|
imageUrl: t,
|
|
394
394
|
orientation: i,
|
|
395
395
|
mode: r,
|
|
396
396
|
borderState: n,
|
|
397
397
|
topContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultContent", children: [
|
|
398
|
-
n === "success" ? /* @__PURE__ */ e(
|
|
398
|
+
n === "success" ? /* @__PURE__ */ e(C1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(A, { className: "IncodeIdProcessingResultIcon" }),
|
|
399
399
|
/* @__PURE__ */ e(p, { size: 16 }),
|
|
400
400
|
o && /* @__PURE__ */ e("h2", { class: "IncodeIdProcessingResultTitle", children: o }),
|
|
401
|
-
s && /* @__PURE__ */ e(
|
|
401
|
+
s && /* @__PURE__ */ e(K, { children: [
|
|
402
402
|
/* @__PURE__ */ e(p, { size: 12 }),
|
|
403
403
|
/* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultSubtitle", children: s })
|
|
404
404
|
] })
|
|
405
405
|
] }),
|
|
406
406
|
bottomContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultButtonContainer", children: [
|
|
407
|
-
|
|
408
|
-
count:
|
|
407
|
+
d !== void 0 && d > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children: a("v2.idError.attemptsLeft", {
|
|
408
|
+
count: d
|
|
409
409
|
}) }),
|
|
410
|
-
/* @__PURE__ */ e(B, { onClick: l, "data-testid": "retry-button", children:
|
|
410
|
+
/* @__PURE__ */ e(B, { onClick: l, "data-testid": "retry-button", children: c })
|
|
411
411
|
] })
|
|
412
412
|
}
|
|
413
413
|
);
|
|
414
|
-
},
|
|
414
|
+
}, p1 = ({ manager: n, state: t }) => {
|
|
415
415
|
const { t: i } = u();
|
|
416
416
|
if (!t.previewImageUrl)
|
|
417
417
|
return null;
|
|
418
418
|
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");
|
|
419
419
|
return /* @__PURE__ */ e(
|
|
420
|
-
|
|
420
|
+
S,
|
|
421
421
|
{
|
|
422
422
|
variant: "success",
|
|
423
423
|
imageUrl: t.previewImageUrl,
|
|
@@ -429,7 +429,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
429
429
|
onButtonClick: () => n.nextStep()
|
|
430
430
|
}
|
|
431
431
|
);
|
|
432
|
-
},
|
|
432
|
+
}, R = ({ manager: n, state: t, ...i }) => {
|
|
433
433
|
const { t: r } = u();
|
|
434
434
|
if (t.status === "error")
|
|
435
435
|
return /* @__PURE__ */ e("div", { class: "IncodeIdError", children: [
|
|
@@ -438,7 +438,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
438
438
|
] });
|
|
439
439
|
const o = t.currentMode === "passport" ? "passport" : "id";
|
|
440
440
|
return t.previewImageUrl ? /* @__PURE__ */ e(
|
|
441
|
-
|
|
441
|
+
S,
|
|
442
442
|
{
|
|
443
443
|
variant: "error",
|
|
444
444
|
imageUrl: t.previewImageUrl,
|
|
@@ -451,13 +451,13 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
451
451
|
attemptsRemaining: t.attemptsRemaining
|
|
452
452
|
}
|
|
453
453
|
) : null;
|
|
454
|
-
},
|
|
454
|
+
}, h1 = ({ manager: n }) => {
|
|
455
455
|
const { t } = u(), i = () => {
|
|
456
456
|
n.retryCapture();
|
|
457
457
|
};
|
|
458
458
|
return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdExpiredPage", children: [
|
|
459
459
|
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredContent", children: [
|
|
460
|
-
/* @__PURE__ */ e(
|
|
460
|
+
/* @__PURE__ */ e(A, { className: "IncodeIdExpiredIcon" }),
|
|
461
461
|
/* @__PURE__ */ e(H, { className: "IncodeIdExpiredTitle", children: t("idv2.capture.notifications.expiredId") }),
|
|
462
462
|
/* @__PURE__ */ e(p, { size: 12 }),
|
|
463
463
|
/* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children: t("idv2.capture.notifications.useDifferent") }),
|
|
@@ -474,7 +474,7 @@ const x = {
|
|
|
474
474
|
front: () => import("../frontdevicelottie-KhKxT5n9.js"),
|
|
475
475
|
back: () => import("../backdevicelottie-B4NgyWmX.js")
|
|
476
476
|
};
|
|
477
|
-
function
|
|
477
|
+
function z(n) {
|
|
478
478
|
k || (k = !0, Promise.all([
|
|
479
479
|
x.blur(),
|
|
480
480
|
x.glare(),
|
|
@@ -486,18 +486,18 @@ function R(n) {
|
|
|
486
486
|
}).catch(() => {
|
|
487
487
|
}));
|
|
488
488
|
}
|
|
489
|
-
function h1() {
|
|
490
|
-
R();
|
|
491
|
-
}
|
|
492
489
|
function f1() {
|
|
490
|
+
z();
|
|
491
|
+
}
|
|
492
|
+
function I1() {
|
|
493
493
|
v(() => {
|
|
494
|
-
|
|
494
|
+
f1();
|
|
495
495
|
}, []);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function m1(n, t) {
|
|
498
498
|
const { t: i } = u(), [, r] = m(0);
|
|
499
499
|
if (v(() => {
|
|
500
|
-
|
|
500
|
+
z(() => r((o) => o + 1));
|
|
501
501
|
}, []), n === "blur")
|
|
502
502
|
return {
|
|
503
503
|
title: i("idv2.capture.notifications.blur.title"),
|
|
@@ -526,11 +526,11 @@ function I1(n, t) {
|
|
|
526
526
|
}
|
|
527
527
|
return null;
|
|
528
528
|
}
|
|
529
|
-
const
|
|
529
|
+
const v1 = ({
|
|
530
530
|
detectionStatus: n,
|
|
531
531
|
mode: t
|
|
532
532
|
}) => {
|
|
533
|
-
const i =
|
|
533
|
+
const i = m1(n, t);
|
|
534
534
|
return i ? /* @__PURE__ */ e("div", { class: w("IncodeIdCaptureNotification"), children: /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationContent", children: [
|
|
535
535
|
/* @__PURE__ */ e("div", { class: w("IncodeIdCaptureNotificationText"), children: [
|
|
536
536
|
/* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children: i.title }),
|
|
@@ -539,7 +539,7 @@ const m1 = ({
|
|
|
539
539
|
/* @__PURE__ */ e(p, { size: 16, direction: "horizontal" }),
|
|
540
540
|
i.animationData && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationAnimation", children: /* @__PURE__ */ e(E, { animationData: i.animationData, loop: !0 }) })
|
|
541
541
|
] }) }) : null;
|
|
542
|
-
},
|
|
542
|
+
}, g1 = Q(
|
|
543
543
|
({
|
|
544
544
|
mode: n,
|
|
545
545
|
orientation: t,
|
|
@@ -547,34 +547,34 @@ const m1 = ({
|
|
|
547
547
|
counterValue: r,
|
|
548
548
|
isCapturing: o,
|
|
549
549
|
showManualCapture: s,
|
|
550
|
-
onCapture:
|
|
550
|
+
onCapture: c,
|
|
551
551
|
onOpenHelp: l
|
|
552
|
-
},
|
|
553
|
-
const { t:
|
|
554
|
-
|
|
552
|
+
}, d) => {
|
|
553
|
+
const { t: a } = u();
|
|
554
|
+
I1();
|
|
555
555
|
const L = i === "detecting" || i === "idNotDetected" || i === "manualCapture", b = () => o || i === "capturing" ? "capturing" : i === "blur" || i === "glare" || i === "wrongSide" || i === "farAway" ? "error" : "idle", h = () => {
|
|
556
556
|
if (o || i === "capturing")
|
|
557
557
|
return {
|
|
558
|
-
title:
|
|
559
|
-
subtitle:
|
|
558
|
+
title: a("idv2.capture.takingPhoto"),
|
|
559
|
+
subtitle: a("idv2.capture.dontMove")
|
|
560
560
|
};
|
|
561
561
|
if (L) {
|
|
562
562
|
const _ = i === "manualCapture";
|
|
563
563
|
return n === "passport" ? {
|
|
564
|
-
title:
|
|
565
|
-
subtitle: _ ? "" :
|
|
564
|
+
title: a("idv2.capture.fillFramePassport"),
|
|
565
|
+
subtitle: _ ? "" : a("idv2.capture.v2.autoCapture")
|
|
566
566
|
} : n === "back" ? {
|
|
567
|
-
title:
|
|
568
|
-
subtitle: _ ? "" :
|
|
567
|
+
title: a("idv2.capture.v2.fillFrameBack"),
|
|
568
|
+
subtitle: _ ? "" : a("idv2.capture.v2.autoCapture")
|
|
569
569
|
} : {
|
|
570
|
-
title:
|
|
571
|
-
subtitle: _ ? "" :
|
|
570
|
+
title: a("idv2.capture.v2.fillFrameFront"),
|
|
571
|
+
subtitle: _ ? "" : a("idv2.capture.v2.autoCapture")
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
574
|
return null;
|
|
575
575
|
}, P = b(), y = h(), C = n === "passport", I = t !== "vertical" || C, g = I ? "horizontal" : "vertical";
|
|
576
576
|
return /* @__PURE__ */ e(
|
|
577
|
-
|
|
577
|
+
i1,
|
|
578
578
|
{
|
|
579
579
|
className: w(
|
|
580
580
|
"IncodeCaptureOverlayId",
|
|
@@ -582,9 +582,9 @@ const m1 = ({
|
|
|
582
582
|
),
|
|
583
583
|
children: [
|
|
584
584
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopSection", children: [
|
|
585
|
-
/* @__PURE__ */ e(
|
|
585
|
+
/* @__PURE__ */ e(v1, { detectionStatus: i, mode: n }),
|
|
586
586
|
/* @__PURE__ */ e(
|
|
587
|
-
|
|
587
|
+
Y,
|
|
588
588
|
{
|
|
589
589
|
title: y?.title ?? "",
|
|
590
590
|
subtitle: y?.subtitle,
|
|
@@ -593,9 +593,9 @@ const m1 = ({
|
|
|
593
593
|
)
|
|
594
594
|
] }),
|
|
595
595
|
/* @__PURE__ */ e(
|
|
596
|
-
|
|
596
|
+
e1,
|
|
597
597
|
{
|
|
598
|
-
ref:
|
|
598
|
+
ref: d,
|
|
599
599
|
variant: "locked",
|
|
600
600
|
orientation: g,
|
|
601
601
|
frameState: P,
|
|
@@ -604,14 +604,14 @@ const m1 = ({
|
|
|
604
604
|
}
|
|
605
605
|
),
|
|
606
606
|
/* @__PURE__ */ e(
|
|
607
|
-
|
|
607
|
+
t1,
|
|
608
608
|
{
|
|
609
609
|
onOpenHelp: l,
|
|
610
|
-
onCapture:
|
|
610
|
+
onCapture: c,
|
|
611
611
|
isManualCapture: s,
|
|
612
612
|
children: s ? /* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltipContainer", children: /* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltip", children: /* @__PURE__ */ e("ol", { class: "IncodeIdManualCaptureTooltipList", children: [
|
|
613
|
-
/* @__PURE__ */ e("li", { children:
|
|
614
|
-
/* @__PURE__ */ e("li", { children:
|
|
613
|
+
/* @__PURE__ */ e("li", { children: a("idv2.commonIssues.firstStep") }),
|
|
614
|
+
/* @__PURE__ */ e("li", { children: a("idv2.commonIssues.secondStep") })
|
|
615
615
|
] }) }) }) : null
|
|
616
616
|
}
|
|
617
617
|
)
|
|
@@ -619,17 +619,17 @@ const m1 = ({
|
|
|
619
619
|
}
|
|
620
620
|
);
|
|
621
621
|
}
|
|
622
|
-
),
|
|
622
|
+
), w1 = ({ manager: n, state: t }) => {
|
|
623
623
|
const { t: i } = u();
|
|
624
624
|
if (t.captureStatus === "initializing")
|
|
625
625
|
return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: [
|
|
626
|
-
/* @__PURE__ */ e(
|
|
626
|
+
/* @__PURE__ */ e(D, { size: "large" }),
|
|
627
627
|
/* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children: i("idv2.capture.initializing") })
|
|
628
628
|
] }) });
|
|
629
629
|
if (t.captureStatus === "uploading" && t.previewImageUrl) {
|
|
630
630
|
const r = t.currentMode === "passport" ? "passport" : "id";
|
|
631
631
|
return /* @__PURE__ */ e(
|
|
632
|
-
|
|
632
|
+
u1,
|
|
633
633
|
{
|
|
634
634
|
imageUrl: t.previewImageUrl,
|
|
635
635
|
progress: t.uploadProgress ?? 0,
|
|
@@ -638,9 +638,9 @@ const m1 = ({
|
|
|
638
638
|
}
|
|
639
639
|
);
|
|
640
640
|
}
|
|
641
|
-
return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(
|
|
642
|
-
},
|
|
643
|
-
const i = Z(null), r = Z(null), [o, s] = m(!1), [
|
|
641
|
+
return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(p1, { manager: n, state: t }) : t.captureStatus === "uploadError" && t.previewImageUrl ? /* @__PURE__ */ e(R, { manager: n, state: t }) : /* @__PURE__ */ e(L1, { manager: n, state: t });
|
|
642
|
+
}, L1 = ({ manager: n, state: t }) => {
|
|
643
|
+
const i = Z(null), r = Z(null), [o, s] = m(!1), [c, l] = m(!1);
|
|
644
644
|
v(() => {
|
|
645
645
|
const C = i.current;
|
|
646
646
|
if (!C || !t.stream) {
|
|
@@ -665,8 +665,8 @@ const m1 = ({
|
|
|
665
665
|
});
|
|
666
666
|
};
|
|
667
667
|
return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
|
|
668
|
-
}, [n, t.orientation,
|
|
669
|
-
const
|
|
668
|
+
}, [n, t.orientation, c]);
|
|
669
|
+
const d = t.captureStatus === "capturing" || t.detectionStatus === "capturing", a = t.detectionStatus, L = a === "manualCapture" || t.showCaptureButtonInAuto && t.captureStatus === "detecting" && a !== "capturing", b = () => {
|
|
670
670
|
s(!0);
|
|
671
671
|
}, h = () => {
|
|
672
672
|
s(!1);
|
|
@@ -675,30 +675,30 @@ const m1 = ({
|
|
|
675
675
|
}, y = () => {
|
|
676
676
|
n.capture();
|
|
677
677
|
};
|
|
678
|
-
return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e(
|
|
678
|
+
return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e(n1, { stream: t.stream, children: [
|
|
679
679
|
/* @__PURE__ */ e(
|
|
680
|
-
|
|
680
|
+
g1,
|
|
681
681
|
{
|
|
682
682
|
ref: r,
|
|
683
683
|
mode: t.currentMode,
|
|
684
684
|
orientation: t.orientation,
|
|
685
685
|
detectionStatus: t.detectionStatus,
|
|
686
686
|
counterValue: t.counterValue,
|
|
687
|
-
isCapturing:
|
|
687
|
+
isCapturing: d,
|
|
688
688
|
showManualCapture: L,
|
|
689
689
|
onCapture: y,
|
|
690
690
|
onOpenHelp: b
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
693
|
o && /* @__PURE__ */ e(
|
|
694
|
-
|
|
694
|
+
c1,
|
|
695
695
|
{
|
|
696
696
|
onClose: h,
|
|
697
697
|
onTakeManually: P
|
|
698
698
|
}
|
|
699
699
|
)
|
|
700
700
|
] }) });
|
|
701
|
-
},
|
|
701
|
+
}, y1 = () => /* @__PURE__ */ e(
|
|
702
702
|
"svg",
|
|
703
703
|
{
|
|
704
704
|
width: "119",
|
|
@@ -892,7 +892,7 @@ const m1 = ({
|
|
|
892
892
|
] })
|
|
893
893
|
]
|
|
894
894
|
}
|
|
895
|
-
),
|
|
895
|
+
), x1 = () => /* @__PURE__ */ e(
|
|
896
896
|
"svg",
|
|
897
897
|
{
|
|
898
898
|
width: "118",
|
|
@@ -1197,7 +1197,7 @@ const m1 = ({
|
|
|
1197
1197
|
] })
|
|
1198
1198
|
]
|
|
1199
1199
|
}
|
|
1200
|
-
),
|
|
1200
|
+
), B1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
1201
1201
|
"svg",
|
|
1202
1202
|
{
|
|
1203
1203
|
width: "46",
|
|
@@ -1230,7 +1230,7 @@ const m1 = ({
|
|
|
1230
1230
|
)
|
|
1231
1231
|
]
|
|
1232
1232
|
}
|
|
1233
|
-
),
|
|
1233
|
+
), F = ({
|
|
1234
1234
|
icon: n,
|
|
1235
1235
|
title: t,
|
|
1236
1236
|
description: i,
|
|
@@ -1252,11 +1252,11 @@ const m1 = ({
|
|
|
1252
1252
|
/* @__PURE__ */ e(p, { size: 4 }),
|
|
1253
1253
|
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonDescription", children: i }),
|
|
1254
1254
|
/* @__PURE__ */ e(p, { size: 8 }),
|
|
1255
|
-
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(
|
|
1255
|
+
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(B1, {}) })
|
|
1256
1256
|
] })
|
|
1257
1257
|
]
|
|
1258
1258
|
}
|
|
1259
|
-
),
|
|
1259
|
+
), M1 = ({ manager: n }) => {
|
|
1260
1260
|
const { t } = u(), i = () => {
|
|
1261
1261
|
n.selectDocument("id");
|
|
1262
1262
|
}, r = () => {
|
|
@@ -1270,9 +1270,9 @@ const m1 = ({
|
|
|
1270
1270
|
className: "IncodeChooserPage",
|
|
1271
1271
|
children: /* @__PURE__ */ e("div", { class: "IncodeChooserContainer", children: /* @__PURE__ */ e("div", { class: "IncodeChooserButtons", children: [
|
|
1272
1272
|
/* @__PURE__ */ e(
|
|
1273
|
-
|
|
1273
|
+
F,
|
|
1274
1274
|
{
|
|
1275
|
-
icon:
|
|
1275
|
+
icon: y1,
|
|
1276
1276
|
title: t("idv2.chooser.idButtonTitle"),
|
|
1277
1277
|
description: t("idv2.chooser.idButtonDescription"),
|
|
1278
1278
|
ariaLabel: t("idv2.chooser.idButtonTitle"),
|
|
@@ -1281,9 +1281,9 @@ const m1 = ({
|
|
|
1281
1281
|
}
|
|
1282
1282
|
),
|
|
1283
1283
|
/* @__PURE__ */ e(
|
|
1284
|
-
|
|
1284
|
+
F,
|
|
1285
1285
|
{
|
|
1286
|
-
icon:
|
|
1286
|
+
icon: x1,
|
|
1287
1287
|
title: t("idv2.chooser.passportButtonTitle"),
|
|
1288
1288
|
description: t("idv2.chooser.passportButtonDescription"),
|
|
1289
1289
|
ariaLabel: t("idv2.chooser.passportButtonTitle"),
|
|
@@ -1294,49 +1294,49 @@ const m1 = ({
|
|
|
1294
1294
|
] }) })
|
|
1295
1295
|
}
|
|
1296
1296
|
);
|
|
1297
|
-
},
|
|
1297
|
+
}, T = ({
|
|
1298
1298
|
manager: n,
|
|
1299
1299
|
direction: t
|
|
1300
1300
|
}) => {
|
|
1301
|
-
const [i, r] = m(null), { t:
|
|
1301
|
+
const [i, r] = m(null), [o, s] = m(!1), { t: c } = u();
|
|
1302
1302
|
v(() => {
|
|
1303
|
-
import("../flip-animation-COR596wy.js").then((
|
|
1304
|
-
r(
|
|
1303
|
+
import("../flip-animation-COR596wy.js").then((a) => {
|
|
1304
|
+
r(a.default);
|
|
1305
1305
|
});
|
|
1306
1306
|
}, []);
|
|
1307
|
-
const
|
|
1308
|
-
await new Promise((
|
|
1309
|
-
};
|
|
1310
|
-
return i ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
1311
|
-
/* @__PURE__ */ e(H, { className: "IncodeFlipAnimationTitle", children:
|
|
1307
|
+
const l = j(async () => {
|
|
1308
|
+
await new Promise((a) => setTimeout(a, 1e3)), t === "toBack" ? n.continueToBack() : n.continueToFront(), s(!0);
|
|
1309
|
+
}, [t, n]);
|
|
1310
|
+
return o ? /* @__PURE__ */ e(D, { size: "large" }) : i ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
1311
|
+
/* @__PURE__ */ e(H, { className: "IncodeFlipAnimationTitle", children: c(t === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
|
|
1312
1312
|
/* @__PURE__ */ e(p, { size: 32 }),
|
|
1313
1313
|
/* @__PURE__ */ e(
|
|
1314
1314
|
E,
|
|
1315
1315
|
{
|
|
1316
1316
|
animationData: i,
|
|
1317
1317
|
loop: !1,
|
|
1318
|
-
onComplete:
|
|
1318
|
+
onComplete: l
|
|
1319
1319
|
}
|
|
1320
1320
|
)
|
|
1321
1321
|
] }) : null;
|
|
1322
|
-
},
|
|
1323
|
-
const { t: i } = u(), [r, o] = m(!1), [s,
|
|
1322
|
+
}, b1 = ({ manager: n, state: t }) => {
|
|
1323
|
+
const { t: i } = u(), [r, o] = m(!1), [s, c] = m(null), l = t.selectedDocumentType === "passport", d = t.currentMode === "back";
|
|
1324
1324
|
if (v(() => {
|
|
1325
1325
|
l ? import("../passport-tutorial-CaYBFTqt.js").then((h) => {
|
|
1326
|
-
|
|
1327
|
-
}) :
|
|
1328
|
-
|
|
1326
|
+
c(h.default);
|
|
1327
|
+
}) : d ? import("../id-tutorial-B-F5Q28m.js").then((h) => {
|
|
1328
|
+
c(h.default);
|
|
1329
1329
|
}) : import("../id-tutorial-B-F5Q28m.js").then((h) => {
|
|
1330
|
-
|
|
1330
|
+
c(h.default);
|
|
1331
1331
|
});
|
|
1332
|
-
}, [l,
|
|
1332
|
+
}, [l, d]), !s)
|
|
1333
1333
|
return null;
|
|
1334
|
-
const
|
|
1334
|
+
const a = i(l ? "idv2.capture.passport.title" : d ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), L = i(l ? "idv2.capture.passport.subtitle" : d ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
|
|
1335
1335
|
return /* @__PURE__ */ e(
|
|
1336
|
-
|
|
1336
|
+
q,
|
|
1337
1337
|
{
|
|
1338
1338
|
animationData: s,
|
|
1339
|
-
title:
|
|
1339
|
+
title: a,
|
|
1340
1340
|
subtitle: L,
|
|
1341
1341
|
onContinue: () => {
|
|
1342
1342
|
o(!0), n.nextStep();
|
|
@@ -1350,17 +1350,17 @@ const m1 = ({
|
|
|
1350
1350
|
)
|
|
1351
1351
|
}
|
|
1352
1352
|
);
|
|
1353
|
-
},
|
|
1354
|
-
const [r, o] =
|
|
1355
|
-
return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(
|
|
1356
|
-
|
|
1353
|
+
}, P1 = ({ config: n, onFinish: t, onError: i }) => {
|
|
1354
|
+
const [r, o] = O(() => G({ config: n }));
|
|
1355
|
+
return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(M1, { manager: o }) : r.status === "tutorial" ? /* @__PURE__ */ e(b1, { manager: o, state: r }) : r.status === "permissions" ? /* @__PURE__ */ e(
|
|
1356
|
+
W,
|
|
1357
1357
|
{
|
|
1358
1358
|
manager: o,
|
|
1359
1359
|
permissionStatus: r.permissionStatus
|
|
1360
1360
|
}
|
|
1361
|
-
) : r.status === "frontFinished" ? /* @__PURE__ */ e(
|
|
1362
|
-
},
|
|
1363
|
-
|
|
1361
|
+
) : r.status === "frontFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(w1, { manager: o, state: r, onFinish: () => t?.() }) : r.status === "processing" ? /* @__PURE__ */ e($, {}) : r.status === "expired" ? /* @__PURE__ */ e(h1, { manager: o }) : r.status === "finished" ? (t?.(), null) : r.status === "closed" ? (i?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(R, { manager: o, state: r, onError: i }) : null;
|
|
1362
|
+
}, _1 = ({ config: n, onFinish: t, onError: i }) => /* @__PURE__ */ e(N, { children: n ? /* @__PURE__ */ e(P1, { config: n, onFinish: t, onError: i }) : null });
|
|
1363
|
+
U(_1, "incode-id");
|
|
1364
1364
|
export {
|
|
1365
|
-
|
|
1365
|
+
_1 as Id
|
|
1366
1366
|
};
|
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-20260309-3ae0dc2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"libphonenumber-js": "^1.11.0",
|
|
108
108
|
"preact-custom-element": "^4.6.0",
|
|
109
109
|
"tailwindcss": "^4.1.17",
|
|
110
|
-
"@incodetech/core": "0.0.0-dev-
|
|
110
|
+
"@incodetech/core": "0.0.0-dev-20260309-3ae0dc2"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@microsoft/api-extractor": "^7.53.3",
|