@sekyro/react 0.1.0-rc.2 → 0.1.0-rc.3
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/CHANGELOG.md +23 -0
- package/README.md +76 -2
- package/assets/audio/v1/README.md +60 -0
- package/assets/audio/v1/manifest.json +7 -0
- package/dist/index.cjs +2 -900
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +162 -15
- package/dist/index.d.ts +162 -15
- package/dist/index.js +2 -879
- package/dist/index.js.map +1 -1
- package/dist/styles.css +275 -1
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -1,880 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { useEffect as useEffect3, useMemo, useRef as useRef3, useState as useState2 } from "react";
|
|
3
|
-
|
|
4
|
-
// src/button.tsx
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
var Button = forwardRef(function Button2({ kind = "primary", full = false, className, type, ...rest }, ref) {
|
|
8
|
-
const classes = ["sekyro-btn", `sekyro-btn--${kind}`];
|
|
9
|
-
if (full) classes.push("sekyro-btn--full");
|
|
10
|
-
if (className !== void 0) classes.push(className);
|
|
11
|
-
return /* @__PURE__ */ jsx("button", { ref, type: type ?? "button", className: classes.join(" "), ...rest });
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// src/capture-arc.tsx
|
|
15
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
16
|
-
var ARC_TICKS = 56;
|
|
17
|
-
var VIEW = 300;
|
|
18
|
-
var CX = 150;
|
|
19
|
-
var CY = 150;
|
|
20
|
-
var CY_GUIDE = 150;
|
|
21
|
-
var GUIDE_R = 100;
|
|
22
|
-
var R_IN = 108;
|
|
23
|
-
var R_OUT = 138;
|
|
24
|
-
var TICK_W = 3;
|
|
25
|
-
var TICKS = Array.from({ length: ARC_TICKS }, (_, i) => {
|
|
26
|
-
const angle = i / ARC_TICKS * 2 * Math.PI - Math.PI / 2;
|
|
27
|
-
const cos = Math.cos(angle);
|
|
28
|
-
const sin = Math.sin(angle);
|
|
29
|
-
return {
|
|
30
|
-
id: `tick-${i}`,
|
|
31
|
-
frac: i / (ARC_TICKS - 1),
|
|
32
|
-
x1: CX + R_IN * cos,
|
|
33
|
-
y1: CY + R_IN * sin,
|
|
34
|
-
x2: CX + R_OUT * cos,
|
|
35
|
-
y2: CY + R_OUT * sin,
|
|
36
|
-
// Ignition cascade: constant per-tick stagger so fills and the success
|
|
37
|
-
// flip sweep clockwise (~340 ms) instead of snapping.
|
|
38
|
-
style: { transitionDelay: `${i * 6}ms` }
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
function tickColor(reached, frac, complete, draining) {
|
|
42
|
-
if (complete) return "var(--sekyro-color-success)";
|
|
43
|
-
if (!reached) return "color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)";
|
|
44
|
-
if (draining) return "color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)";
|
|
45
|
-
if (frac < 0.33) return "color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)";
|
|
46
|
-
if (frac < 0.66) return "color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)";
|
|
47
|
-
return "var(--sekyro-color-brand)";
|
|
48
|
-
}
|
|
49
|
-
var SCRIM_PATH = `M0 -50 H${VIEW} V${VIEW + 50} H0 Z M${CX - GUIDE_R} ${CY_GUIDE} a${GUIDE_R},${GUIDE_R} 0 1 0 ${2 * GUIDE_R},0 a${GUIDE_R},${GUIDE_R} 0 1 0 ${-2 * GUIDE_R},0 Z`;
|
|
50
|
-
function CaptureArc({
|
|
51
|
-
progress,
|
|
52
|
-
phase,
|
|
53
|
-
draining = false
|
|
54
|
-
}) {
|
|
55
|
-
const clamped = Math.min(1, Math.max(0, progress));
|
|
56
|
-
const filled = Math.round(clamped * ARC_TICKS);
|
|
57
|
-
const checking = phase === "checking";
|
|
58
|
-
const recording = phase === "recording";
|
|
59
|
-
const frozen = phase === "frozen";
|
|
60
|
-
const stillShown = checking || frozen;
|
|
61
|
-
const spinning = checking || recording || frozen;
|
|
62
|
-
const complete = phase === "locked" || spinning;
|
|
63
|
-
const drainingVisible = draining && !complete;
|
|
64
|
-
return /* @__PURE__ */ jsxs(
|
|
65
|
-
"svg",
|
|
66
|
-
{
|
|
67
|
-
"aria-hidden": "true",
|
|
68
|
-
viewBox: `0 0 ${VIEW} ${VIEW}`,
|
|
69
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
70
|
-
className: "sekyro-stage__arc",
|
|
71
|
-
"data-testid": "sekyro-capture-arc",
|
|
72
|
-
"data-phase": phase,
|
|
73
|
-
"data-filled": filled,
|
|
74
|
-
"data-recording": recording ? "" : void 0,
|
|
75
|
-
"data-draining": drainingVisible ? "" : void 0,
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ jsx2(
|
|
78
|
-
"path",
|
|
79
|
-
{
|
|
80
|
-
fillRule: "evenodd",
|
|
81
|
-
d: SCRIM_PATH,
|
|
82
|
-
fill: "color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",
|
|
83
|
-
style: { "--sekyro-scrim": stillShown ? "100%" : "96%" },
|
|
84
|
-
className: "sekyro-arc__scrim sekyro-capture-fade-in",
|
|
85
|
-
"data-testid": "sekyro-capture-scrim"
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ jsxs("g", { className: phase === "locked" ? "sekyro-capture-settle" : void 0, children: [
|
|
89
|
-
/* @__PURE__ */ jsx2("g", { className: stillShown ? "sekyro-arc__ring sekyro-arc__ring--dim" : "sekyro-arc__ring", children: TICKS.map((tick, i) => /* @__PURE__ */ jsx2(
|
|
90
|
-
"line",
|
|
91
|
-
{
|
|
92
|
-
x1: tick.x1,
|
|
93
|
-
y1: tick.y1,
|
|
94
|
-
x2: tick.x2,
|
|
95
|
-
y2: tick.y2,
|
|
96
|
-
stroke: tickColor(i < filled, tick.frac, complete, drainingVisible),
|
|
97
|
-
strokeWidth: TICK_W,
|
|
98
|
-
strokeLinecap: "round",
|
|
99
|
-
style: tick.style,
|
|
100
|
-
className: "sekyro-arc__tick"
|
|
101
|
-
},
|
|
102
|
-
tick.id
|
|
103
|
-
)) }),
|
|
104
|
-
/* @__PURE__ */ jsx2("g", { className: phase === "seeking" ? "sekyro-capture-breathe" : void 0, children: /* @__PURE__ */ jsx2(
|
|
105
|
-
"circle",
|
|
106
|
-
{
|
|
107
|
-
cx: CX,
|
|
108
|
-
cy: CY_GUIDE,
|
|
109
|
-
r: GUIDE_R,
|
|
110
|
-
fill: "none",
|
|
111
|
-
stroke: complete ? "var(--sekyro-color-success)" : "var(--sekyro-color-surface)",
|
|
112
|
-
strokeWidth: complete ? 3.5 : 2.5,
|
|
113
|
-
className: spinning ? (
|
|
114
|
-
// Recording + checking spinner: dashed success circle, the
|
|
115
|
-
// dashes crawl one lap ≈ 2s. Reduced motion → static solid circle.
|
|
116
|
-
"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin"
|
|
117
|
-
) : "sekyro-arc__guide sekyro-capture-fade-in",
|
|
118
|
-
"data-testid": "sekyro-capture-guide"
|
|
119
|
-
}
|
|
120
|
-
) })
|
|
121
|
-
] })
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// src/use-strings.ts
|
|
128
|
-
import { createContext, useContext } from "react";
|
|
129
|
-
|
|
130
|
-
// src/strings/en.ts
|
|
131
|
-
var en = {
|
|
132
|
-
"capture.start": "Start camera",
|
|
133
|
-
"capture.recordAgain": "Start a new attempt",
|
|
134
|
-
"capture.switchCamera": "Switch camera",
|
|
135
|
-
"capture.preparing.title": "Preparing secure capture\u2026",
|
|
136
|
-
"capture.checking": "We're checking your identity\u2026",
|
|
137
|
-
"capture.checkingHint": "This usually takes a few seconds \u2014 keep this page open",
|
|
138
|
-
"capture.securityNote": "Your images are encrypted and used only for this verification",
|
|
139
|
-
"capture.cameraOff": "Camera off",
|
|
140
|
-
"capture.previewAlt": "Preview of the captured image of your face",
|
|
141
|
-
"capture.retryCoaching.title": "That attempt didn't work \u2014 a few adjustments will help:",
|
|
142
|
-
"capture.retryCoaching.light": "Find good lighting \u2014 light on your face, not behind you",
|
|
143
|
-
"capture.retryCoaching.eyeLevel": "Hold your phone at eye level",
|
|
144
|
-
"capture.retryCoaching.head": "Look straight at the camera and keep your head upright",
|
|
145
|
-
"capture.attemptsRemaining.one": "{count} attempt remaining",
|
|
146
|
-
"capture.attemptsRemaining.other": "{count} attempts remaining",
|
|
147
|
-
"common.retry": "Try again",
|
|
148
|
-
"fcv2.err.permission": "Allow camera access in your browser settings (the camera icon in the address bar), then try again",
|
|
149
|
-
"fcv2.err.notfound": "No camera detected \u2014 connect or enable a camera, then try again",
|
|
150
|
-
"fcv2.err.inuse": "Another app is using the camera \u2014 close it, then try again",
|
|
151
|
-
"fcv2.err.insecure": "The camera needs a secure connection (HTTPS) \u2014 reopen this page over HTTPS",
|
|
152
|
-
"fcv2.err.unsupported": "Your browser cannot capture in a supported format \u2014 open this page in a recent browser such as Chrome or Safari",
|
|
153
|
-
"fcv2.err.generic": "The camera is unavailable \u2014 try again, or contact support if it keeps failing",
|
|
154
|
-
"fcv3.no_face": "We can't see your face \u2014 hold the phone in front of you",
|
|
155
|
-
"fcv3.come_closer": "Bring the phone a little closer",
|
|
156
|
-
"fcv3.move_back": "Move the phone a little farther away",
|
|
157
|
-
"fcv3.center_face": "Center your face in the circle",
|
|
158
|
-
"fcv3.straighten": "Hold your head straight",
|
|
159
|
-
"fcv3.more_light": "Find a brighter spot \u2014 light your face",
|
|
160
|
-
"fcv3.too_bright": "Too much light \u2014 turn away from the light source",
|
|
161
|
-
"fcv3.hold_still": "Perfect \u2014 hold still",
|
|
162
|
-
"fcv3.steady_camera": "Hold the phone steady",
|
|
163
|
-
"reasons.no_face": "No face could be detected during the check",
|
|
164
|
-
"reasons.media_unreadable": "The submitted capture could not be read",
|
|
165
|
-
"reasons.clip_too_short": "The capture was too short",
|
|
166
|
-
"reasons.spoof_detected": "The liveness check could not confirm a live person in front of the camera",
|
|
167
|
-
"reasons.review_band": "The automatic check was not conclusive, so it was sent to human review",
|
|
168
|
-
"reasons.nni_not_found": "The national identification number was not found in the civil registry",
|
|
169
|
-
"reasons.nni_invalid": "The national identification number is not a valid 10-digit NNI",
|
|
170
|
-
"reasons.registry_unavailable": "The civil registry could not be reached to confirm the NNI",
|
|
171
|
-
"reasons.result_from_cache": "The registry check was confirmed from a recent copy of the registry",
|
|
172
|
-
"reasons.no_face_source": "No face could be detected in the selfie photo",
|
|
173
|
-
"reasons.no_face_reference": "No reference photo was available to compare your selfie against \u2014 the requester needs to resolve this, so retaking your selfie will not help",
|
|
174
|
-
"reasons.low_quality_reference": "The reference photo on file was not clear enough to compare against",
|
|
175
|
-
"reasons.below_threshold": "The selfie did not match the photo on the identity document closely enough",
|
|
176
|
-
"reasons.side_missing": "One side of the identity document was not submitted",
|
|
177
|
-
"reasons.mrz_checksum_failed": "The machine-readable zone of the document could not be validated",
|
|
178
|
-
"reasons.unreadable": "The document photo was not clear enough to read",
|
|
179
|
-
"reasons.expired_document": "The identity document has expired",
|
|
180
|
-
"reasons.authenticity_review": "The document was sent to human review to confirm its authenticity",
|
|
181
|
-
"reasons.registry_mismatch": "The document's details did not match the civil registry \u2014 a reviewer will check",
|
|
182
|
-
"reasons.otp_mismatch": "The verification code did not match the one we sent",
|
|
183
|
-
"reasons.otp_expired": "The verification code expired before it was entered",
|
|
184
|
-
"reasons.otp_send_failed": "We could not send a verification code to your phone",
|
|
185
|
-
"reasons.uncalibrated_capture_channel": "Desktop/webcam captures are not yet auto-decided \u2014 your verification went to human review",
|
|
186
|
-
"errors.attestation_invalid": "We could not confirm this browser session is genuine \u2014 reload the page and try again",
|
|
187
|
-
"errors.network_error": "We could not reach the verification service \u2014 check your internet connection and try again",
|
|
188
|
-
"errors.session_expired": "This verification session has expired \u2014 ask the organisation that sent you here for a new link",
|
|
189
|
-
"errors.nni_unbound": "This link was created without your national ID number \u2014 ask the requester for a new link"
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
// src/strings/ar.ts
|
|
193
|
-
var ar = {
|
|
194
|
-
"capture.start": "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627",
|
|
195
|
-
"capture.recordAgain": "\u0627\u0628\u062F\u0623 \u0645\u062D\u0627\u0648\u0644\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
196
|
-
"capture.switchCamera": "\u062A\u0628\u062F\u064A\u0644 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627",
|
|
197
|
-
"capture.preparing.title": "\u062C\u0627\u0631\u064D \u062A\u062C\u0647\u064A\u0632 \u0627\u0644\u0627\u0644\u062A\u0642\u0627\u0637 \u0627\u0644\u0622\u0645\u0646\u2026",
|
|
198
|
-
"capture.checking": "\u0646\u062A\u062D\u0642\u0642 \u0645\u0646 \u0647\u0648\u064A\u062A\u0643\u2026",
|
|
199
|
-
"capture.checkingHint": "\u064A\u0633\u062A\u063A\u0631\u0642 \u0647\u0630\u0627 \u0639\u0627\u062F\u0629\u064B \u0628\u0636\u0639 \u062B\u0648\u0627\u0646\u064D \u2014 \u0623\u0628\u0642\u0650 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0645\u0641\u062A\u0648\u062D\u0629",
|
|
200
|
-
"capture.securityNote": "\u062A\u064F\u0634\u0641\u064E\u0651\u0631 \u0644\u0642\u0637\u0627\u062A\u0643 \u0648\u062A\u064F\u0633\u062A\u062E\u062F\u0645 \u0641\u0642\u0637 \u0644\u0647\u0630\u0627 \u0627\u0644\u062A\u062D\u0642\u0642",
|
|
201
|
-
"capture.cameraOff": "\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0645\u0637\u0641\u0623\u0629",
|
|
202
|
-
"capture.previewAlt": "\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0644\u062A\u0642\u0637\u0629 \u0644\u0648\u062C\u0647\u0643",
|
|
203
|
-
"capture.retryCoaching.title": "\u0644\u0645 \u062A\u0646\u062C\u062D \u0647\u0630\u0647 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u2014 \u0628\u0639\u0636 \u0627\u0644\u062A\u0639\u062F\u064A\u0644\u0627\u062A \u0633\u062A\u0633\u0627\u0639\u062F:",
|
|
204
|
-
"capture.retryCoaching.light": "\u0627\u062E\u062A\u0631 \u0645\u0643\u0627\u0646\u064B\u0627 \u062C\u064A\u062F \u0627\u0644\u0625\u0636\u0627\u0621\u0629 \u2014 \u0627\u0644\u0636\u0648\u0621 \u0639\u0644\u0649 \u0648\u062C\u0647\u0643 \u0644\u0627 \u062E\u0644\u0641\u0643",
|
|
205
|
-
"capture.retryCoaching.eyeLevel": "\u0623\u0645\u0633\u0643 \u0647\u0627\u062A\u0641\u0643 \u0628\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0639\u064A\u0646\u064A\u0646",
|
|
206
|
-
"capture.retryCoaching.head": "\u0627\u0646\u0638\u0631 \u0645\u0628\u0627\u0634\u0631\u0629 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0648\u0623\u0628\u0642\u0650 \u0631\u0623\u0633\u0643 \u0645\u0633\u062A\u0642\u064A\u0645\u064B\u0627",
|
|
207
|
-
"capture.attemptsRemaining.zero": "\u0644\u0645 \u062A\u062A\u0628\u0642\u064E\u0651 \u0623\u064A \u0645\u062D\u0627\u0648\u0644\u0629",
|
|
208
|
-
"capture.attemptsRemaining.one": "\u062A\u0628\u0642\u0651\u062A \u0645\u062D\u0627\u0648\u0644\u0629 \u0648\u0627\u062D\u062F\u0629",
|
|
209
|
-
"capture.attemptsRemaining.two": "\u062A\u0628\u0642\u0651\u062A \u0645\u062D\u0627\u0648\u0644\u062A\u0627\u0646",
|
|
210
|
-
"capture.attemptsRemaining.few": "\u062A\u0628\u0642\u0651\u062A {count} \u0645\u062D\u0627\u0648\u0644\u0627\u062A",
|
|
211
|
-
"capture.attemptsRemaining.many": "\u062A\u0628\u0642\u0651\u062A {count} \u0645\u062D\u0627\u0648\u0644\u0629",
|
|
212
|
-
"capture.attemptsRemaining.other": "\u062A\u0628\u0642\u0651\u062A {count} \u0645\u062D\u0627\u0648\u0644\u0629",
|
|
213
|
-
"common.retry": "\u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",
|
|
214
|
-
"fcv2.err.permission": "\u0627\u0633\u0645\u062D \u0628\u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0645\u0646 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062A\u0635\u0641\u062D (\u0623\u064A\u0642\u0648\u0646\u0629 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0641\u064A \u0634\u0631\u064A\u0637 \u0627\u0644\u0639\u0646\u0648\u0627\u0646) \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",
|
|
215
|
-
"fcv2.err.notfound": "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0643\u0627\u0645\u064A\u0631\u0627 \u2014 \u0648\u0635\u0650\u0651\u0644 \u0643\u0627\u0645\u064A\u0631\u0627 \u0623\u0648 \u0641\u0639\u0650\u0651\u0644\u0647\u0627 \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",
|
|
216
|
-
"fcv2.err.inuse": "\u062A\u0637\u0628\u064A\u0642 \u0622\u062E\u0631 \u064A\u0633\u062A\u062E\u062F\u0645 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u2014 \u0623\u063A\u0644\u0642\u0647 \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",
|
|
217
|
-
"fcv2.err.insecure": "\u062A\u062A\u0637\u0644\u0628 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u062A\u0635\u0627\u0644\u064B\u0627 \u0622\u0645\u0646\u064B\u0627 (HTTPS) \u2014 \u0627\u0641\u062A\u062D \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0639\u0628\u0631 HTTPS",
|
|
218
|
-
"fcv2.err.unsupported": "\u0645\u062A\u0635\u0641\u062D\u0643 \u0644\u0627 \u064A\u0633\u062A\u0637\u064A\u0639 \u0627\u0644\u0627\u0644\u062A\u0642\u0627\u0637 \u0628\u0635\u064A\u063A\u0629 \u0645\u062F\u0639\u0648\u0645\u0629 \u2014 \u0627\u0641\u062A\u062D \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0641\u064A \u0645\u062A\u0635\u0641\u062D \u062D\u062F\u064A\u062B \u0645\u062B\u0644 \u0643\u0631\u0648\u0645 \u0623\u0648 \u0633\u0641\u0627\u0631\u064A",
|
|
219
|
-
"fcv2.err.generic": "\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u0629 \u2014 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629\u060C \u0648\u062A\u0648\u0627\u0635\u0644 \u0645\u0639 \u0627\u0644\u062F\u0639\u0645 \u0625\u0630\u0627 \u0627\u0633\u062A\u0645\u0631\u062A \u0627\u0644\u0645\u0634\u0643\u0644\u0629",
|
|
220
|
-
"fcv3.no_face": "\u0644\u0627 \u0646\u0631\u0649 \u0648\u062C\u0647\u0643 \u2014 \u0623\u0645\u0633\u0643 \u0627\u0644\u0647\u0627\u062A\u0641 \u0623\u0645\u0627\u0645\u0643",
|
|
221
|
-
"fcv3.come_closer": "\u0642\u0631\u0651\u0628 \u0627\u0644\u0647\u0627\u062A\u0641 \u0642\u0644\u064A\u0644\u064B\u0627",
|
|
222
|
-
"fcv3.move_back": "\u0623\u0628\u0639\u062F \u0627\u0644\u0647\u0627\u062A\u0641 \u0642\u0644\u064A\u0644\u064B\u0627",
|
|
223
|
-
"fcv3.center_face": "\u0636\u0639 \u0648\u062C\u0647\u0643 \u0641\u064A \u0645\u0646\u062A\u0635\u0641 \u0627\u0644\u062F\u0627\u0626\u0631\u0629",
|
|
224
|
-
"fcv3.straighten": "\u0623\u0628\u0642\u0650 \u0631\u0623\u0633\u0643 \u0645\u0633\u062A\u0642\u064A\u0645\u064B\u0627",
|
|
225
|
-
"fcv3.more_light": "\u0627\u0646\u062A\u0642\u0644 \u0625\u0644\u0649 \u0645\u0643\u0627\u0646 \u0623\u0643\u062B\u0631 \u0625\u0636\u0627\u0621\u0629 \u2014 \u0623\u0636\u0626 \u0648\u062C\u0647\u0643",
|
|
226
|
-
"fcv3.too_bright": "\u0627\u0644\u0625\u0636\u0627\u0621\u0629 \u0642\u0648\u064A\u0629 \u062C\u062F\u064B\u0627 \u2014 \u0627\u0628\u062A\u0639\u062F \u0639\u0646 \u0645\u0635\u062F\u0631 \u0627\u0644\u0636\u0648\u0621",
|
|
227
|
-
"fcv3.hold_still": "\u0645\u0645\u062A\u0627\u0632 \u2014 \u0644\u0627 \u062A\u062A\u062D\u0631\u0643",
|
|
228
|
-
"fcv3.steady_camera": "\u0623\u0645\u0633\u0643 \u0627\u0644\u0647\u0627\u062A\u0641 \u0628\u062B\u0628\u0627\u062A",
|
|
229
|
-
"reasons.no_face": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0643\u062A\u0634\u0627\u0641 \u0623\u064A \u0648\u062C\u0647 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u062D\u0642\u0642",
|
|
230
|
-
"reasons.media_unreadable": "\u062A\u0639\u0630\u0651\u0631\u062A \u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0644\u0642\u0637\u0629 \u0627\u0644\u0645\u064F\u0631\u0633\u0644\u0629",
|
|
231
|
-
"reasons.clip_too_short": "\u0643\u0627\u0646\u062A \u0627\u0644\u0644\u0642\u0637\u0629 \u0623\u0642\u0635\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645",
|
|
232
|
-
"reasons.spoof_detected": "\u0644\u0645 \u064A\u062A\u0645\u0643\u0646 \u0641\u062D\u0635 \u0627\u0644\u062D\u0636\u0648\u0631 \u0627\u0644\u062D\u064A \u0645\u0646 \u062A\u0623\u0643\u064A\u062F \u0648\u062C\u0648\u062F \u0634\u062E\u0635 \u062D\u0642\u064A\u0642\u064A \u0623\u0645\u0627\u0645 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627",
|
|
233
|
-
"reasons.review_band": "\u0644\u0645 \u064A\u0643\u0646 \u0627\u0644\u0641\u062D\u0635 \u0627\u0644\u062A\u0644\u0642\u0627\u0626\u064A \u062D\u0627\u0633\u0645\u064B\u0627\u060C \u0644\u0630\u0627 \u0623\u064F\u062D\u064A\u0644 \u0625\u0644\u0649 \u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0634\u0631\u064A\u0629",
|
|
234
|
-
"reasons.nni_not_found": "\u0644\u0645 \u064A\u064F\u0639\u062B\u0631 \u0639\u0644\u0649 \u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0648\u0637\u0646\u064A \u0641\u064A \u0633\u062C\u0644 \u0627\u0644\u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u062F\u0646\u064A\u0629",
|
|
235
|
-
"reasons.nni_invalid": "\u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0648\u0637\u0646\u064A \u0644\u064A\u0633 \u0631\u0642\u0645\u064B\u0627 \u0635\u0627\u0644\u062D\u064B\u0627 \u0645\u0643\u0648\u0651\u0646\u064B\u0627 \u0645\u0646 10 \u0623\u0631\u0642\u0627\u0645",
|
|
236
|
-
"reasons.registry_unavailable": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0633\u062C\u0644 \u0627\u0644\u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u062F\u0646\u064A\u0629 \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0648\u0637\u0646\u064A",
|
|
237
|
-
"reasons.result_from_cache": "\u0623\u064F\u0643\u0650\u0651\u062F \u0641\u062D\u0635 \u0627\u0644\u0633\u062C\u0644 \u0627\u0633\u062A\u0646\u0627\u062F\u064B\u0627 \u0625\u0644\u0649 \u0646\u0633\u062E\u0629 \u062D\u062F\u064A\u062B\u0629 \u0645\u0646 \u0627\u0644\u0633\u062C\u0644",
|
|
238
|
-
"reasons.no_face_source": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0643\u062A\u0634\u0627\u0641 \u0648\u062C\u0647 \u0641\u064A \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0630\u0627\u062A\u064A\u0629",
|
|
239
|
-
"reasons.no_face_reference": "\u0644\u0645 \u062A\u062A\u0648\u0641\u0651\u0631 \u0635\u0648\u0631\u0629 \u0645\u0631\u062C\u0639\u064A\u0629 \u0644\u0645\u0642\u0627\u0631\u0646\u0629 \u0635\u0648\u0631\u062A\u0643 \u0627\u0644\u0630\u0627\u062A\u064A\u0629 \u0628\u0647\u0627 \u2014 \u0639\u0644\u0649 \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u0637\u0627\u0644\u0628\u0629 \u0645\u0639\u0627\u0644\u062C\u0629 \u0630\u0644\u0643\u060C \u0648\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0642\u0627\u0637 \u0635\u0648\u0631\u062A\u0643 \u0627\u0644\u0630\u0627\u062A\u064A\u0629 \u0644\u0646 \u062A\u064F\u062C\u062F\u064A",
|
|
240
|
-
"reasons.low_quality_reference": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0631\u062C\u0639\u064A\u0629 \u0627\u0644\u0645\u062D\u0641\u0648\u0638\u0629 \u0644\u0645 \u062A\u0643\u0646 \u0648\u0627\u0636\u062D\u0629 \u0628\u0645\u0627 \u064A\u0643\u0641\u064A \u0644\u0644\u0645\u0642\u0627\u0631\u0646\u0629",
|
|
241
|
-
"reasons.below_threshold": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0630\u0627\u062A\u064A\u0629 \u0644\u0645 \u062A\u0637\u0627\u0628\u0642 \u0635\u0648\u0631\u0629 \u0648\u062B\u064A\u0642\u0629 \u0627\u0644\u0647\u0648\u064A\u0629 \u0628\u062F\u0631\u062C\u0629 \u0643\u0627\u0641\u064A\u0629",
|
|
242
|
-
"reasons.side_missing": "\u0623\u062D\u062F \u0648\u062C\u0647\u064A \u0648\u062B\u064A\u0642\u0629 \u0627\u0644\u0647\u0648\u064A\u0629 \u0644\u0645 \u064A\u064F\u0631\u0633\u0644",
|
|
243
|
-
"reasons.mrz_checksum_failed": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0622\u0644\u064A\u0629 \u0641\u064A \u0627\u0644\u0648\u062B\u064A\u0642\u0629",
|
|
244
|
-
"reasons.unreadable": "\u0635\u0648\u0631\u0629 \u0627\u0644\u0648\u062B\u064A\u0642\u0629 \u0644\u0645 \u062A\u0643\u0646 \u0648\u0627\u0636\u062D\u0629 \u0628\u0645\u0627 \u064A\u0643\u0641\u064A \u0644\u0644\u0642\u0631\u0627\u0621\u0629",
|
|
245
|
-
"reasons.expired_document": "\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u0648\u062B\u064A\u0642\u0629 \u0627\u0644\u0647\u0648\u064A\u0629",
|
|
246
|
-
"reasons.authenticity_review": "\u0623\u064F\u062D\u064A\u0644\u062A \u0627\u0644\u0648\u062B\u064A\u0642\u0629 \u0625\u0644\u0649 \u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0634\u0631\u064A\u0629 \u0644\u0644\u062A\u0623\u0643\u062F \u0645\u0646 \u0635\u062D\u062A\u0647\u0627",
|
|
247
|
-
"reasons.registry_mismatch": "\u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0648\u062B\u064A\u0642\u0629 \u0644\u0627 \u062A\u0637\u0627\u0628\u0642 \u0627\u0644\u0633\u062C\u0644 \u0627\u0644\u0645\u062F\u0646\u064A \u2014 \u0633\u064A\u062A\u062D\u0642\u0642 \u0645\u0646\u0647\u0627 \u0645\u0631\u0627\u062C\u0639",
|
|
248
|
-
"reasons.otp_mismatch": "\u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0651\u0642 \u0644\u0627 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064A \u0623\u0631\u0633\u0644\u0646\u0627\u0647",
|
|
249
|
-
"reasons.otp_expired": "\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0651\u0642 \u0642\u0628\u0644 \u0625\u062F\u062E\u0627\u0644\u0647",
|
|
250
|
-
"reasons.otp_send_failed": "\u062A\u0639\u0630\u0651\u0631 \u0625\u0631\u0633\u0627\u0644 \u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0651\u0642 \u0625\u0644\u0649 \u0647\u0627\u062A\u0641\u0643",
|
|
251
|
-
"reasons.uncalibrated_capture_channel": "\u062C\u0648\u062F\u0629 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0645\u0643\u062A\u0628\u064A\u0629 \u063A\u064A\u0631 \u0645\u0639\u0627\u064A\u064E\u0631\u0629 \u0628\u0639\u062F \u2014 \u0623\u064F\u062D\u064A\u0644 \u062A\u062D\u0642\u0642\u0643 \u0625\u0644\u0649 \u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0634\u0631\u064A\u0629",
|
|
252
|
-
"errors.attestation_invalid": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u062A\u0623\u0643\u062F \u0645\u0646 \u0633\u0644\u0627\u0645\u0629 \u062C\u0644\u0633\u0629 \u0627\u0644\u0645\u062A\u0635\u0641\u062D \u2014 \u0623\u0639\u062F \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629 \u0648\u062D\u0627\u0648\u0644 \u0645\u062C\u062F\u062F\u064B\u0627",
|
|
253
|
-
"errors.network_error": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u062E\u062F\u0645\u0629 \u0627\u0644\u062A\u062D\u0642\u0642 \u2014 \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643 \u0628\u0627\u0644\u0625\u0646\u062A\u0631\u0646\u062A \u0648\u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",
|
|
254
|
-
"errors.session_expired": "\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u062C\u0644\u0633\u0629 \u0627\u0644\u062A\u062D\u0642\u0642 \u0647\u0630\u0647 \u2014 \u0627\u0637\u0644\u0628 \u0631\u0627\u0628\u0637\u064B\u0627 \u062C\u062F\u064A\u062F\u064B\u0627 \u0645\u0646 \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u062A\u064A \u0623\u0631\u0633\u0644\u062A\u0643 \u0625\u0644\u0649 \u0647\u0646\u0627",
|
|
255
|
-
"errors.nni_unbound": "\u0623\u064F\u0646\u0634\u0626 \u0647\u0630\u0627 \u0627\u0644\u0631\u0627\u0628\u0637 \u062F\u0648\u0646 \u0631\u0642\u0645\u0643 \u0627\u0644\u0648\u0637\u0646\u064A \u0644\u0644\u062A\u0639\u0631\u064A\u0641 \u2014 \u0627\u0637\u0644\u0628 \u0631\u0627\u0628\u0637\u064B\u0627 \u062C\u062F\u064A\u062F\u064B\u0627 \u0645\u0646 \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u0637\u0627\u0644\u0628\u0629"
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
// src/strings/fr.ts
|
|
259
|
-
var fr = {
|
|
260
|
-
"capture.start": "D\xE9marrer la cam\xE9ra",
|
|
261
|
-
"capture.recordAgain": "Commencer une nouvelle tentative",
|
|
262
|
-
"capture.switchCamera": "Changer de cam\xE9ra",
|
|
263
|
-
"capture.preparing.title": "Pr\xE9paration de la capture s\xE9curis\xE9e\u2026",
|
|
264
|
-
"capture.checking": "Nous v\xE9rifions votre identit\xE9\u2026",
|
|
265
|
-
"capture.checkingHint": "Cela prend g\xE9n\xE9ralement quelques secondes \u2014 gardez cette page ouverte",
|
|
266
|
-
"capture.securityNote": "Vos images sont chiffr\xE9es et utilis\xE9es uniquement pour cette v\xE9rification",
|
|
267
|
-
"capture.cameraOff": "Cam\xE9ra \xE9teinte",
|
|
268
|
-
"capture.previewAlt": "Aper\xE7u de l\u2019image captur\xE9e de votre visage",
|
|
269
|
-
"capture.retryCoaching.title": "Cette tentative n'a pas abouti \u2014 quelques ajustements vous aideront :",
|
|
270
|
-
"capture.retryCoaching.light": "Placez-vous dans un endroit bien \xE9clair\xE9 \u2014 lumi\xE8re sur le visage, pas derri\xE8re vous",
|
|
271
|
-
"capture.retryCoaching.eyeLevel": "Tenez votre t\xE9l\xE9phone \xE0 hauteur des yeux",
|
|
272
|
-
"capture.retryCoaching.head": "Regardez droit vers la cam\xE9ra, la t\xEAte bien droite",
|
|
273
|
-
"capture.attemptsRemaining.one": "{count} tentative restante",
|
|
274
|
-
"capture.attemptsRemaining.other": "{count} tentatives restantes",
|
|
275
|
-
"common.retry": "R\xE9essayer",
|
|
276
|
-
"fcv2.err.permission": "Autorisez la cam\xE9ra dans les r\xE9glages du navigateur (ic\xF4ne cam\xE9ra dans la barre d\u2019adresse), puis r\xE9essayez",
|
|
277
|
-
"fcv2.err.notfound": "Aucune cam\xE9ra d\xE9tect\xE9e \u2014 branchez ou activez une cam\xE9ra, puis r\xE9essayez",
|
|
278
|
-
"fcv2.err.inuse": "La cam\xE9ra est utilis\xE9e par une autre application \u2014 fermez-la, puis r\xE9essayez",
|
|
279
|
-
"fcv2.err.insecure": "La cam\xE9ra n\xE9cessite une connexion s\xE9curis\xE9e (HTTPS) \u2014 rouvrez cette page en HTTPS",
|
|
280
|
-
"fcv2.err.unsupported": "Votre navigateur ne prend pas en charge un format de capture compatible \u2014 ouvrez cette page dans un navigateur r\xE9cent comme Chrome ou Safari",
|
|
281
|
-
"fcv2.err.generic": "Cam\xE9ra indisponible \u2014 r\xE9essayez, ou contactez le support si le probl\xE8me persiste",
|
|
282
|
-
"fcv3.no_face": "Nous ne voyons pas votre visage \u2014 tenez le t\xE9l\xE9phone devant vous",
|
|
283
|
-
"fcv3.come_closer": "Rapprochez un peu le t\xE9l\xE9phone",
|
|
284
|
-
"fcv3.move_back": "\xC9loignez un peu le t\xE9l\xE9phone",
|
|
285
|
-
"fcv3.center_face": "Centrez votre visage dans le cercle",
|
|
286
|
-
"fcv3.straighten": "Tenez la t\xEAte droite",
|
|
287
|
-
"fcv3.more_light": "Cherchez un endroit plus lumineux \u2014 \xE9clairez votre visage",
|
|
288
|
-
"fcv3.too_bright": "Trop de lumi\xE8re \u2014 tournez-vous dos \xE0 la source de lumi\xE8re",
|
|
289
|
-
"fcv3.hold_still": "Parfait \u2014 ne bougez plus",
|
|
290
|
-
"fcv3.steady_camera": "Tenez le t\xE9l\xE9phone stable",
|
|
291
|
-
"reasons.no_face": "Aucun visage n\u2019a pu \xEAtre d\xE9tect\xE9 pendant la v\xE9rification",
|
|
292
|
-
"reasons.media_unreadable": "La capture envoy\xE9e n\u2019a pas pu \xEAtre lue",
|
|
293
|
-
"reasons.clip_too_short": "La capture \xE9tait trop courte",
|
|
294
|
-
"reasons.spoof_detected": "Le contr\xF4le de pr\xE9sence n'a pas pu confirmer la pr\xE9sence d'une personne r\xE9elle devant la cam\xE9ra",
|
|
295
|
-
"reasons.review_band": "Le contr\xF4le automatique n'a pas \xE9t\xE9 concluant, il a donc \xE9t\xE9 transmis \xE0 un examen humain",
|
|
296
|
-
"reasons.nni_not_found": "Le num\xE9ro national d'identification n'a pas \xE9t\xE9 trouv\xE9 dans le registre d'\xE9tat civil",
|
|
297
|
-
"reasons.nni_invalid": "Le num\xE9ro national d'identification n'est pas un NNI valide \xE0 10 chiffres",
|
|
298
|
-
"reasons.registry_unavailable": "Le registre d'\xE9tat civil n'a pas pu \xEAtre joint pour confirmer le NNI",
|
|
299
|
-
"reasons.result_from_cache": "Le contr\xF4le du registre a \xE9t\xE9 confirm\xE9 \xE0 partir d'une copie r\xE9cente du registre",
|
|
300
|
-
"reasons.no_face_source": "Aucun visage n'a pu \xEAtre d\xE9tect\xE9 sur la photo selfie",
|
|
301
|
-
"reasons.no_face_reference": "Aucune photo de r\xE9f\xE9rence n'\xE9tait disponible pour comparer votre selfie \u2014 c'est au demandeur de le r\xE9soudre, reprendre votre selfie n'y changera rien",
|
|
302
|
-
"reasons.low_quality_reference": "La photo de r\xE9f\xE9rence enregistr\xE9e n'\xE9tait pas assez nette pour la comparaison",
|
|
303
|
-
"reasons.below_threshold": "Le selfie ne correspondait pas suffisamment \xE0 la photo de la pi\xE8ce d'identit\xE9",
|
|
304
|
-
"reasons.side_missing": "Un c\xF4t\xE9 de la pi\xE8ce d'identit\xE9 n'a pas \xE9t\xE9 envoy\xE9",
|
|
305
|
-
"reasons.mrz_checksum_failed": "La zone de lecture automatique du document n'a pas pu \xEAtre valid\xE9e",
|
|
306
|
-
"reasons.unreadable": "La photo du document n'\xE9tait pas assez nette pour \xEAtre lue",
|
|
307
|
-
"reasons.expired_document": "La pi\xE8ce d'identit\xE9 a expir\xE9",
|
|
308
|
-
"reasons.authenticity_review": "Le document a \xE9t\xE9 transmis \xE0 un examen humain pour confirmer son authenticit\xE9",
|
|
309
|
-
"reasons.registry_mismatch": "Les informations du document ne correspondent pas au registre civil \u2014 un examinateur va v\xE9rifier",
|
|
310
|
-
"reasons.otp_mismatch": "Le code de v\xE9rification ne correspond pas \xE0 celui que nous avons envoy\xE9",
|
|
311
|
-
"reasons.otp_expired": "Le code de v\xE9rification a expir\xE9 avant d'\xEAtre saisi",
|
|
312
|
-
"reasons.otp_send_failed": "Nous n'avons pas pu envoyer de code de v\xE9rification \xE0 votre t\xE9l\xE9phone",
|
|
313
|
-
"reasons.uncalibrated_capture_channel": "Les captures webcam ne sont pas encore d\xE9cid\xE9es automatiquement \u2014 votre v\xE9rification part en revue humaine",
|
|
314
|
-
"errors.attestation_invalid": "Nous n'avons pas pu confirmer l'authenticit\xE9 de cette session de navigateur \u2014 rechargez la page et r\xE9essayez",
|
|
315
|
-
"errors.network_error": "Nous n'avons pas pu joindre le service de v\xE9rification \u2014 v\xE9rifiez votre connexion internet et r\xE9essayez",
|
|
316
|
-
"errors.session_expired": "Cette session de v\xE9rification a expir\xE9 \u2014 demandez un nouveau lien \xE0 l'organisme qui vous a envoy\xE9 ici",
|
|
317
|
-
"errors.nni_unbound": "Ce lien a \xE9t\xE9 cr\xE9\xE9 sans votre num\xE9ro national d'identification \u2014 demandez un nouveau lien \xE0 l'organisme demandeur"
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
// src/strings/index.ts
|
|
321
|
-
function hintStringKey(hint) {
|
|
322
|
-
switch (hint) {
|
|
323
|
-
case "center":
|
|
324
|
-
return "fcv3.center_face";
|
|
325
|
-
case "closer":
|
|
326
|
-
return "fcv3.come_closer";
|
|
327
|
-
case "farther":
|
|
328
|
-
return "fcv3.move_back";
|
|
329
|
-
case "light":
|
|
330
|
-
return "fcv3.more_light";
|
|
331
|
-
case "still":
|
|
332
|
-
case "hold":
|
|
333
|
-
return "fcv3.hold_still";
|
|
334
|
-
default: {
|
|
335
|
-
const unhandled = hint;
|
|
336
|
-
throw new Error(`hintStringKey: unhandled hint ${unhandled}`);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
function captureErrorStringKey(kind) {
|
|
341
|
-
return `fcv2.err.${kind}`;
|
|
342
|
-
}
|
|
343
|
-
function reasonStringKey(reason) {
|
|
344
|
-
switch (reason) {
|
|
345
|
-
case "no_recorder":
|
|
346
|
-
return "fcv2.err.unsupported";
|
|
347
|
-
case "attestation":
|
|
348
|
-
return "errors.attestation_invalid";
|
|
349
|
-
case "network":
|
|
350
|
-
return "errors.network_error";
|
|
351
|
-
case "nni_unbound":
|
|
352
|
-
return "errors.nni_unbound";
|
|
353
|
-
default: {
|
|
354
|
-
const key = `reasons.${reason}`;
|
|
355
|
-
return Object.hasOwn(en, key) ? key : null;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
function attemptsRemainingText(dictionary, locale, count) {
|
|
360
|
-
const category = new Intl.PluralRules(locale).select(count);
|
|
361
|
-
const template = (category === "other" ? void 0 : dictionary[`capture.attemptsRemaining.${category}`]) ?? dictionary["capture.attemptsRemaining.other"];
|
|
362
|
-
return template.replace("{count}", new Intl.NumberFormat(locale).format(count));
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// src/use-strings.ts
|
|
366
|
-
var BUILT_IN = { ar, fr, en };
|
|
367
|
-
function resolveStrings(locale, overrides) {
|
|
368
|
-
const base = BUILT_IN[locale];
|
|
369
|
-
if (overrides === void 0) return base;
|
|
370
|
-
const merged = { ...base };
|
|
371
|
-
for (const key of Object.keys(overrides)) {
|
|
372
|
-
const value = overrides[key];
|
|
373
|
-
if (typeof value === "string") merged[key] = value;
|
|
374
|
-
}
|
|
375
|
-
return merged;
|
|
376
|
-
}
|
|
377
|
-
var StringsContext = createContext((key) => en[key] ?? "");
|
|
378
|
-
var StringsProvider = StringsContext.Provider;
|
|
379
|
-
function useStrings() {
|
|
380
|
-
return useContext(StringsContext);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
// src/capture-stage.tsx
|
|
384
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
385
|
-
function CaptureStage({
|
|
386
|
-
videoRef,
|
|
387
|
-
guidanceText,
|
|
388
|
-
guidanceHint,
|
|
389
|
-
guidanceKey,
|
|
390
|
-
progress,
|
|
391
|
-
phase,
|
|
392
|
-
draining = false,
|
|
393
|
-
stillUrl,
|
|
394
|
-
showChecking,
|
|
395
|
-
onSwitchCamera,
|
|
396
|
-
canSwitchCamera,
|
|
397
|
-
voicePrompt,
|
|
398
|
-
overlay,
|
|
399
|
-
reduceMotion = false
|
|
400
|
-
}) {
|
|
401
|
-
const t = useStrings();
|
|
402
|
-
const checking = phase === "checking";
|
|
403
|
-
const frozen = phase === "frozen";
|
|
404
|
-
const settled = checking || frozen;
|
|
405
|
-
const displayText = settled && showChecking ? t("capture.checking") : guidanceText;
|
|
406
|
-
const voice = voicePrompt?.(guidanceHint, displayText, guidanceKey);
|
|
407
|
-
return /* @__PURE__ */ jsxs2(
|
|
408
|
-
"div",
|
|
409
|
-
{
|
|
410
|
-
className: reduceMotion ? "sekyro-stage sekyro-capture-reduce" : "sekyro-stage",
|
|
411
|
-
"data-testid": "sekyro-capture-stage",
|
|
412
|
-
children: [
|
|
413
|
-
/* @__PURE__ */ jsx3("video", { ref: videoRef, playsInline: true, muted: true, className: "sekyro-stage__video", "data-testid": "sekyro-capture-video" }),
|
|
414
|
-
stillUrl !== null && settled ? (
|
|
415
|
-
// "Photo develops": fade + settle-scale while the scrim deepens — NOT
|
|
416
|
-
// flipped (the keyframe is pre-mirrored).
|
|
417
|
-
/* @__PURE__ */ jsx3(
|
|
418
|
-
"img",
|
|
419
|
-
{
|
|
420
|
-
src: stillUrl,
|
|
421
|
-
alt: t("capture.previewAlt"),
|
|
422
|
-
className: "sekyro-stage__still sekyro-capture-develop",
|
|
423
|
-
"data-testid": "sekyro-capture-still"
|
|
424
|
-
}
|
|
425
|
-
)
|
|
426
|
-
) : null,
|
|
427
|
-
/* @__PURE__ */ jsx3(CaptureArc, { progress, phase, draining }),
|
|
428
|
-
overlay?.(videoRef),
|
|
429
|
-
voice !== void 0 && voice !== null && !settled ? /* @__PURE__ */ jsx3("div", { className: "sekyro-stage__corner-start", "data-testid": "sekyro-voice-slot", children: voice }) : null,
|
|
430
|
-
canSwitchCamera ? /* @__PURE__ */ jsx3(
|
|
431
|
-
Button,
|
|
432
|
-
{
|
|
433
|
-
kind: "chip",
|
|
434
|
-
onClick: onSwitchCamera,
|
|
435
|
-
"aria-label": t("capture.switchCamera"),
|
|
436
|
-
className: "sekyro-stage__corner-end",
|
|
437
|
-
"data-testid": "sekyro-switch-camera",
|
|
438
|
-
children: /* @__PURE__ */ jsx3(FlipCameraIcon, {})
|
|
439
|
-
}
|
|
440
|
-
) : null,
|
|
441
|
-
checking && showChecking ? (
|
|
442
|
-
/* Camera-off trust pill — where the flip control was. Truthful: the
|
|
443
|
-
engine stopped the tracks the moment the artifacts landed. */
|
|
444
|
-
/* @__PURE__ */ jsxs2(
|
|
445
|
-
"span",
|
|
446
|
-
{
|
|
447
|
-
className: "sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in",
|
|
448
|
-
"data-testid": "sekyro-camera-off-pill",
|
|
449
|
-
children: [
|
|
450
|
-
/* @__PURE__ */ jsx3(CameraOffIcon, {}),
|
|
451
|
-
t("capture.cameraOff")
|
|
452
|
-
]
|
|
453
|
-
}
|
|
454
|
-
)
|
|
455
|
-
) : null,
|
|
456
|
-
/* @__PURE__ */ jsxs2("p", { "aria-live": "polite", className: "sekyro-stage__guidance", "data-testid": "sekyro-capture-guidance", children: [
|
|
457
|
-
/* @__PURE__ */ jsx3("span", { className: "sekyro-stage__guidance-text sekyro-capture-text-in", children: displayText }, displayText),
|
|
458
|
-
settled && showChecking ? /* @__PURE__ */ jsx3("span", { className: "sekyro-stage__guidance-hint", children: t("capture.checkingHint") }) : null
|
|
459
|
-
] })
|
|
460
|
-
]
|
|
461
|
-
}
|
|
462
|
-
);
|
|
463
|
-
}
|
|
464
|
-
function FlipCameraIcon() {
|
|
465
|
-
return /* @__PURE__ */ jsxs2(
|
|
466
|
-
"svg",
|
|
467
|
-
{
|
|
468
|
-
"aria-hidden": "true",
|
|
469
|
-
viewBox: "0 0 24 24",
|
|
470
|
-
fill: "none",
|
|
471
|
-
stroke: "currentColor",
|
|
472
|
-
strokeWidth: "1.8",
|
|
473
|
-
strokeLinecap: "round",
|
|
474
|
-
strokeLinejoin: "round",
|
|
475
|
-
className: "sekyro-icon",
|
|
476
|
-
children: [
|
|
477
|
-
/* @__PURE__ */ jsx3("path", { d: "M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z" }),
|
|
478
|
-
/* @__PURE__ */ jsx3("path", { d: "M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8" }),
|
|
479
|
-
/* @__PURE__ */ jsx3("path", { d: "M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1" })
|
|
480
|
-
]
|
|
481
|
-
}
|
|
482
|
-
);
|
|
483
|
-
}
|
|
484
|
-
function CameraOffIcon() {
|
|
485
|
-
return /* @__PURE__ */ jsxs2(
|
|
486
|
-
"svg",
|
|
487
|
-
{
|
|
488
|
-
"aria-hidden": "true",
|
|
489
|
-
viewBox: "0 0 24 24",
|
|
490
|
-
fill: "none",
|
|
491
|
-
stroke: "currentColor",
|
|
492
|
-
strokeWidth: "1.8",
|
|
493
|
-
strokeLinecap: "round",
|
|
494
|
-
strokeLinejoin: "round",
|
|
495
|
-
className: "sekyro-icon sekyro-icon--sm",
|
|
496
|
-
children: [
|
|
497
|
-
/* @__PURE__ */ jsx3("path", { d: "M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z" }),
|
|
498
|
-
/* @__PURE__ */ jsx3("path", { d: "M3 3l18 18" })
|
|
499
|
-
]
|
|
500
|
-
}
|
|
501
|
-
);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
// src/captured-panel.tsx
|
|
505
|
-
import { useEffect, useRef } from "react";
|
|
506
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
507
|
-
function CapturedPanel({
|
|
508
|
-
showCoaching,
|
|
509
|
-
attemptsText,
|
|
510
|
-
showRetake,
|
|
511
|
-
onRetake
|
|
512
|
-
}) {
|
|
513
|
-
const t = useStrings();
|
|
514
|
-
const retakeRef = useRef(null);
|
|
515
|
-
useEffect(() => {
|
|
516
|
-
if (showRetake) retakeRef.current?.focus();
|
|
517
|
-
}, [showRetake]);
|
|
518
|
-
if (!showCoaching && !showRetake) return null;
|
|
519
|
-
return /* @__PURE__ */ jsxs3("div", { className: "sekyro-stack sekyro-stack--3", "data-testid": "sekyro-captured-panel", children: [
|
|
520
|
-
showCoaching ? /* @__PURE__ */ jsxs3("div", { className: "sekyro-stack sekyro-stack--1", children: [
|
|
521
|
-
/* @__PURE__ */ jsx4("p", { className: "sekyro-text-body", children: t("capture.retryCoaching.title") }),
|
|
522
|
-
/* @__PURE__ */ jsxs3("ul", { className: "sekyro-coaching", children: [
|
|
523
|
-
/* @__PURE__ */ jsx4("li", { children: t("capture.retryCoaching.light") }),
|
|
524
|
-
/* @__PURE__ */ jsx4("li", { children: t("capture.retryCoaching.eyeLevel") }),
|
|
525
|
-
/* @__PURE__ */ jsx4("li", { children: t("capture.retryCoaching.head") })
|
|
526
|
-
] }),
|
|
527
|
-
attemptsText !== null ? /* @__PURE__ */ jsx4("p", { className: "sekyro-text-muted", "data-testid": "sekyro-attempts-remaining", children: attemptsText }) : null
|
|
528
|
-
] }) : null,
|
|
529
|
-
showRetake ? /* @__PURE__ */ jsx4(Button, { ref: retakeRef, className: "sekyro-btn--start", onClick: onRetake, children: t("capture.recordAgain") }) : null
|
|
530
|
-
] });
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
// src/notice.tsx
|
|
534
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
535
|
-
function Notice({
|
|
536
|
-
tone,
|
|
537
|
-
role,
|
|
538
|
-
children,
|
|
539
|
-
testId
|
|
540
|
-
}) {
|
|
541
|
-
return /* @__PURE__ */ jsx5(
|
|
542
|
-
"div",
|
|
543
|
-
{
|
|
544
|
-
role: role ?? (tone === "info" ? "status" : "alert"),
|
|
545
|
-
className: `sekyro-notice sekyro-notice--${tone}`,
|
|
546
|
-
"data-testid": testId,
|
|
547
|
-
children
|
|
548
|
-
}
|
|
549
|
-
);
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
// src/use-focus-on-mount.ts
|
|
553
|
-
import { useCallback } from "react";
|
|
554
|
-
function useFocusOnMount() {
|
|
555
|
-
return useCallback((element) => {
|
|
556
|
-
element?.focus();
|
|
557
|
-
}, []);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
// src/use-liveness-handle.ts
|
|
561
|
-
import {
|
|
562
|
-
createLivenessCapture
|
|
563
|
-
} from "@sekyro/web";
|
|
564
|
-
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState } from "react";
|
|
565
|
-
var IDLE_GATE = { progress: 0, hint: null, faceDetected: false };
|
|
566
|
-
function isDevBuild() {
|
|
567
|
-
try {
|
|
568
|
-
return typeof process !== "undefined" && true;
|
|
569
|
-
} catch {
|
|
570
|
-
return false;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
function useLivenessHandle(options) {
|
|
574
|
-
const { videoRef, assetBaseUrl } = options;
|
|
575
|
-
const verificationRef = useRef2(options.verification);
|
|
576
|
-
const verification = verificationRef.current;
|
|
577
|
-
const warnedRef = useRef2(false);
|
|
578
|
-
if (options.verification !== verification && !warnedRef.current && isDevBuild()) {
|
|
579
|
-
warnedRef.current = true;
|
|
580
|
-
console.warn(
|
|
581
|
-
"[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."
|
|
582
|
-
);
|
|
583
|
-
}
|
|
584
|
-
const handleRef = useRef2(null);
|
|
585
|
-
const [state, setState] = useState("idle");
|
|
586
|
-
const [gate, setGate] = useState(IDLE_GATE);
|
|
587
|
-
const [draining, setDraining] = useState(false);
|
|
588
|
-
const [gateLocked, setGateLocked] = useState(false);
|
|
589
|
-
const [frozenPreview, setFrozenPreview] = useState(null);
|
|
590
|
-
const [reduceMotion, setReduceMotion] = useState(false);
|
|
591
|
-
const [artifacts, setArtifacts] = useState(null);
|
|
592
|
-
const [error, setError] = useState(null);
|
|
593
|
-
const [result, setResult] = useState(null);
|
|
594
|
-
const lastProgressRef = useRef2(null);
|
|
595
|
-
const callbacksRef = useRef2(options);
|
|
596
|
-
callbacksRef.current = options;
|
|
597
|
-
useEffect2(() => {
|
|
598
|
-
const video = videoRef.current;
|
|
599
|
-
if (video === null) return;
|
|
600
|
-
const captureOptions = {
|
|
601
|
-
video,
|
|
602
|
-
...assetBaseUrl !== void 0 ? { assetBaseUrl } : {}
|
|
603
|
-
};
|
|
604
|
-
const handle = verification !== void 0 ? verification.liveness(captureOptions) : createLivenessCapture(captureOptions);
|
|
605
|
-
handleRef.current = handle;
|
|
606
|
-
const unsubscribes = [
|
|
607
|
-
handle.on("state", (next) => {
|
|
608
|
-
if (next === "starting") {
|
|
609
|
-
setArtifacts(null);
|
|
610
|
-
setError(null);
|
|
611
|
-
setGate(IDLE_GATE);
|
|
612
|
-
setGateLocked(false);
|
|
613
|
-
setDraining(false);
|
|
614
|
-
setFrozenPreview(null);
|
|
615
|
-
lastProgressRef.current = null;
|
|
616
|
-
}
|
|
617
|
-
setState(next);
|
|
618
|
-
callbacksRef.current.onStateChange?.(next);
|
|
619
|
-
}),
|
|
620
|
-
handle.on("gate", (update) => {
|
|
621
|
-
const previous = lastProgressRef.current;
|
|
622
|
-
lastProgressRef.current = update.progress;
|
|
623
|
-
setDraining(
|
|
624
|
-
previous !== null && update.progress < previous - 1e-3 && update.progress > 0 && update.progress < 1
|
|
625
|
-
);
|
|
626
|
-
if (update.progress >= 1) setGateLocked(true);
|
|
627
|
-
setGate(update);
|
|
628
|
-
}),
|
|
629
|
-
handle.on("frozen", ({ previewDataUrl }) => setFrozenPreview(previewDataUrl)),
|
|
630
|
-
handle.on("profile", ({ animations }) => setReduceMotion(animations === "reduced")),
|
|
631
|
-
handle.on("captured", (captured) => {
|
|
632
|
-
setArtifacts(captured);
|
|
633
|
-
setResult(null);
|
|
634
|
-
callbacksRef.current.onCaptured?.(captured);
|
|
635
|
-
}),
|
|
636
|
-
handle.on("error", (err) => {
|
|
637
|
-
setError(err);
|
|
638
|
-
callbacksRef.current.onError?.(err);
|
|
639
|
-
}),
|
|
640
|
-
verification?.on("result", (next) => {
|
|
641
|
-
setResult(next);
|
|
642
|
-
callbacksRef.current.onResult?.(next);
|
|
643
|
-
})
|
|
644
|
-
];
|
|
645
|
-
return () => {
|
|
646
|
-
for (const unsubscribe of unsubscribes) unsubscribe?.();
|
|
647
|
-
handleRef.current = null;
|
|
648
|
-
handle.destroy();
|
|
649
|
-
};
|
|
650
|
-
}, [verification, videoRef, assetBaseUrl]);
|
|
651
|
-
const start = useCallback2(() => {
|
|
652
|
-
void handleRef.current?.start();
|
|
653
|
-
}, []);
|
|
654
|
-
const retry = useCallback2(() => {
|
|
655
|
-
handleRef.current?.retry();
|
|
656
|
-
}, []);
|
|
657
|
-
const switchCamera = useCallback2(() => {
|
|
658
|
-
setGateLocked(false);
|
|
659
|
-
setDraining(false);
|
|
660
|
-
setFrozenPreview(null);
|
|
661
|
-
lastProgressRef.current = null;
|
|
662
|
-
handleRef.current?.switchCamera();
|
|
663
|
-
}, []);
|
|
664
|
-
return {
|
|
665
|
-
state,
|
|
666
|
-
gate,
|
|
667
|
-
draining,
|
|
668
|
-
gateLocked,
|
|
669
|
-
frozenPreview,
|
|
670
|
-
reduceMotion,
|
|
671
|
-
artifacts,
|
|
672
|
-
error,
|
|
673
|
-
result,
|
|
674
|
-
start,
|
|
675
|
-
retry,
|
|
676
|
-
switchCamera
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
// src/liveness-capture.tsx
|
|
681
|
-
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
682
|
-
var NO_FACE_DEBOUNCE_MS = 800;
|
|
683
|
-
function isCapturing(state) {
|
|
684
|
-
return state === "starting" || state === "gating" || state === "recording";
|
|
685
|
-
}
|
|
686
|
-
function isPostCapture(state) {
|
|
687
|
-
return state === "captured" || state === "uploading" || state === "checking";
|
|
688
|
-
}
|
|
689
|
-
function LivenessCapture({
|
|
690
|
-
verification,
|
|
691
|
-
locale,
|
|
692
|
-
dir,
|
|
693
|
-
strings,
|
|
694
|
-
slots,
|
|
695
|
-
autoStart = false,
|
|
696
|
-
onCaptured,
|
|
697
|
-
onResult,
|
|
698
|
-
onError,
|
|
699
|
-
onStateChange,
|
|
700
|
-
assetBaseUrl,
|
|
701
|
-
className
|
|
702
|
-
}) {
|
|
703
|
-
const dictionary = useMemo(() => resolveStrings(locale, strings), [locale, strings]);
|
|
704
|
-
const t = useMemo(() => (key) => dictionary[key] ?? "", [dictionary]);
|
|
705
|
-
const direction = dir ?? (locale === "ar" ? "rtl" : "ltr");
|
|
706
|
-
const videoRef = useRef3(null);
|
|
707
|
-
const capture = useLivenessHandle({
|
|
708
|
-
verification,
|
|
709
|
-
videoRef,
|
|
710
|
-
assetBaseUrl,
|
|
711
|
-
onCaptured,
|
|
712
|
-
onResult,
|
|
713
|
-
onError,
|
|
714
|
-
onStateChange
|
|
715
|
-
});
|
|
716
|
-
const autoStartedRef = useRef3(false);
|
|
717
|
-
const preCaptureIdle = capture.state === "idle" && capture.error === null;
|
|
718
|
-
useEffect3(() => {
|
|
719
|
-
if (!autoStart || !preCaptureIdle || autoStartedRef.current) return;
|
|
720
|
-
autoStartedRef.current = true;
|
|
721
|
-
capture.start();
|
|
722
|
-
}, [autoStart, preCaptureIdle, capture.start]);
|
|
723
|
-
const objectUrl = useMemo(
|
|
724
|
-
() => capture.artifacts !== null && typeof URL.createObjectURL === "function" ? URL.createObjectURL(capture.artifacts.keyframe) : null,
|
|
725
|
-
[capture.artifacts]
|
|
726
|
-
);
|
|
727
|
-
useEffect3(() => {
|
|
728
|
-
if (objectUrl === null) return;
|
|
729
|
-
return () => URL.revokeObjectURL(objectUrl);
|
|
730
|
-
}, [objectUrl]);
|
|
731
|
-
const stillUrl = capture.frozenPreview ?? objectUrl;
|
|
732
|
-
const verificationMode = verification !== void 0;
|
|
733
|
-
const capturing = isCapturing(capture.state);
|
|
734
|
-
const postCapture = isPostCapture(capture.state);
|
|
735
|
-
const stageVisible = capturing || postCapture;
|
|
736
|
-
const result = capture.result;
|
|
737
|
-
const done = capture.state === "done" && result !== null;
|
|
738
|
-
const frozen = capture.state === "recording" && capture.frozenPreview !== null;
|
|
739
|
-
const phase = postCapture ? "checking" : frozen ? "frozen" : capture.state === "recording" ? "recording" : capture.gateLocked || capture.gate.progress >= 1 ? "locked" : capture.gate.faceDetected ? "aligning" : "seeking";
|
|
740
|
-
const guidanceHint = capturing ? capture.gate.hint : null;
|
|
741
|
-
const rawKey = capture.state === "starting" ? "capture.preparing.title" : guidanceHint === null ? null : guidanceHint === "center" && !capture.gate.faceDetected ? "fcv3.no_face" : hintStringKey(guidanceHint);
|
|
742
|
-
const [displayKey, setDisplayKey] = useState2(null);
|
|
743
|
-
useEffect3(() => {
|
|
744
|
-
if (rawKey !== "fcv3.no_face") {
|
|
745
|
-
setDisplayKey(rawKey);
|
|
746
|
-
return;
|
|
747
|
-
}
|
|
748
|
-
if (!capturing) return;
|
|
749
|
-
const timer = setTimeout(() => setDisplayKey(rawKey), NO_FACE_DEBOUNCE_MS);
|
|
750
|
-
return () => clearTimeout(timer);
|
|
751
|
-
}, [rawKey, capturing]);
|
|
752
|
-
const guidanceKey = capturing ? displayKey : null;
|
|
753
|
-
const guidanceText = guidanceKey === null ? "" : t(guidanceKey);
|
|
754
|
-
const retryVerdict = result !== null && result.status === "retry" ? result : null;
|
|
755
|
-
const unavailable = done && result.status === "unavailable" ? result : null;
|
|
756
|
-
const terminal = done && (result.status === "approved" || result.status === "rejected" || result.status === "review") ? result : null;
|
|
757
|
-
const reasonText = (reason) => {
|
|
758
|
-
if (reason === void 0) return null;
|
|
759
|
-
const key = reasonStringKey(reason);
|
|
760
|
-
return key === null ? null : t(key);
|
|
761
|
-
};
|
|
762
|
-
const unavailableRetryable = unavailable !== null && unavailable.reason !== void 0 && unavailable.reason !== "nni_unbound" && !(unavailable.reason === "no_recorder" && capture.artifacts?.degraded === "NO_RECORDER");
|
|
763
|
-
const focusRetry = useFocusOnMount();
|
|
764
|
-
return /* @__PURE__ */ jsx6(StringsProvider, { value: t, children: /* @__PURE__ */ jsxs4(
|
|
765
|
-
"div",
|
|
766
|
-
{
|
|
767
|
-
className: className === void 0 ? "sekyro-capture" : `sekyro-capture ${className}`,
|
|
768
|
-
dir: direction,
|
|
769
|
-
lang: locale,
|
|
770
|
-
"data-testid": "sekyro-liveness-capture",
|
|
771
|
-
"data-state": capture.state,
|
|
772
|
-
children: [
|
|
773
|
-
slots?.header,
|
|
774
|
-
retryVerdict !== null && reasonText(retryVerdict.reason) !== null ? /* @__PURE__ */ jsx6(Notice, { tone: "warning", role: "status", testId: "sekyro-retry-notice", children: /* @__PURE__ */ jsx6("span", { children: reasonText(retryVerdict.reason) }) }) : null,
|
|
775
|
-
capture.error !== null ? slots?.errorPanel !== void 0 ? slots.errorPanel(capture.error, capture.retry) : /* @__PURE__ */ jsxs4(Notice, { tone: "danger", testId: "sekyro-error-notice", children: [
|
|
776
|
-
/* @__PURE__ */ jsx6("span", { children: t(captureErrorStringKey(capture.error.kind)) }),
|
|
777
|
-
capture.error.retryable ? /* @__PURE__ */ jsx6(Button, { ref: focusRetry, kind: "ghost", className: "sekyro-btn--start", onClick: capture.retry, children: t("common.retry") }) : null
|
|
778
|
-
] }) : null,
|
|
779
|
-
unavailable !== null ? /* @__PURE__ */ jsxs4(Notice, { tone: "danger", testId: "sekyro-unavailable-notice", children: [
|
|
780
|
-
/* @__PURE__ */ jsx6("span", { children: reasonText(unavailable.reason) ?? t(unavailable.reason === void 0 ? "errors.session_expired" : "errors.network_error") }),
|
|
781
|
-
unavailableRetryable ? /* @__PURE__ */ jsx6(Button, { ref: focusRetry, kind: "ghost", className: "sekyro-btn--start", onClick: capture.retry, children: t("capture.recordAgain") }) : null
|
|
782
|
-
] }) : null,
|
|
783
|
-
terminal !== null && reasonText(terminal.reason) !== null ? /* @__PURE__ */ jsx6(Notice, { tone: terminal.status === "rejected" ? "danger" : "info", testId: "sekyro-result-notice", children: /* @__PURE__ */ jsx6("span", { children: reasonText(terminal.reason) }) }) : null,
|
|
784
|
-
/* @__PURE__ */ jsx6("div", { className: stageVisible ? void 0 : "sekyro-hidden", "data-capture-live": stageVisible ? "" : void 0, children: /* @__PURE__ */ jsx6(
|
|
785
|
-
CaptureStage,
|
|
786
|
-
{
|
|
787
|
-
videoRef,
|
|
788
|
-
guidanceText,
|
|
789
|
-
guidanceHint,
|
|
790
|
-
guidanceKey,
|
|
791
|
-
progress: capture.gate.progress,
|
|
792
|
-
phase,
|
|
793
|
-
draining: capture.draining,
|
|
794
|
-
stillUrl,
|
|
795
|
-
showChecking: verificationMode,
|
|
796
|
-
onSwitchCamera: capture.switchCamera,
|
|
797
|
-
canSwitchCamera: capturing && capture.state !== "recording",
|
|
798
|
-
voicePrompt: slots?.voicePrompt,
|
|
799
|
-
overlay: slots?.stageOverlay,
|
|
800
|
-
reduceMotion: capture.reduceMotion
|
|
801
|
-
}
|
|
802
|
-
) }),
|
|
803
|
-
preCaptureIdle && !autoStart ? slots?.intro !== void 0 ? slots.intro(capture.start) : /* @__PURE__ */ jsxs4("div", { className: "sekyro-stack sekyro-stack--4", "data-testid": "sekyro-intro", children: [
|
|
804
|
-
/* @__PURE__ */ jsx6("p", { className: "sekyro-text-muted", children: t("capture.securityNote") }),
|
|
805
|
-
/* @__PURE__ */ jsx6(Button, { full: true, onClick: capture.start, "data-testid": "sekyro-start", children: t("capture.start") })
|
|
806
|
-
] }) : null,
|
|
807
|
-
/* @__PURE__ */ jsx6(
|
|
808
|
-
CapturedPanel,
|
|
809
|
-
{
|
|
810
|
-
showCoaching: retryVerdict !== null,
|
|
811
|
-
attemptsText: retryVerdict?.attemptsRemaining !== void 0 ? attemptsRemainingText(dictionary, locale, retryVerdict.attemptsRemaining) : null,
|
|
812
|
-
showRetake: retryVerdict !== null && !capturing && !postCapture || !verificationMode && capture.state === "captured",
|
|
813
|
-
onRetake: capture.retry
|
|
814
|
-
}
|
|
815
|
-
),
|
|
816
|
-
slots?.footer
|
|
817
|
-
]
|
|
818
|
-
}
|
|
819
|
-
) });
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
// src/theme.tsx
|
|
823
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
824
|
-
var DEFAULT_THEME = {
|
|
825
|
-
colors: {
|
|
826
|
-
brand: "#1e40af",
|
|
827
|
-
brandFg: "#ffffff",
|
|
828
|
-
fg: "#111827",
|
|
829
|
-
fgMuted: "#4b5563",
|
|
830
|
-
bg: "#f8fafc",
|
|
831
|
-
surface: "#ffffff",
|
|
832
|
-
ring: "#1e40af",
|
|
833
|
-
danger: "#b91c1c",
|
|
834
|
-
success: "#15803d",
|
|
835
|
-
warning: "#a16207"
|
|
836
|
-
},
|
|
837
|
-
radius: "12px",
|
|
838
|
-
fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif'
|
|
839
|
-
};
|
|
840
|
-
var COLOR_VAR = {
|
|
841
|
-
brand: "--sekyro-color-brand",
|
|
842
|
-
brandFg: "--sekyro-color-brand-fg",
|
|
843
|
-
fg: "--sekyro-color-fg",
|
|
844
|
-
fgMuted: "--sekyro-color-fg-muted",
|
|
845
|
-
bg: "--sekyro-color-bg",
|
|
846
|
-
surface: "--sekyro-color-surface",
|
|
847
|
-
ring: "--sekyro-color-ring",
|
|
848
|
-
danger: "--sekyro-color-danger",
|
|
849
|
-
success: "--sekyro-color-success",
|
|
850
|
-
warning: "--sekyro-color-warning"
|
|
851
|
-
};
|
|
852
|
-
function themeToCssVars(theme = {}) {
|
|
853
|
-
const vars = {};
|
|
854
|
-
for (const key of Object.keys(COLOR_VAR)) {
|
|
855
|
-
vars[COLOR_VAR[key]] = theme.colors?.[key] ?? DEFAULT_THEME.colors[key];
|
|
856
|
-
}
|
|
857
|
-
vars["--sekyro-radius"] = theme.radius ?? DEFAULT_THEME.radius;
|
|
858
|
-
vars["--sekyro-font"] = theme.fontFamily ?? DEFAULT_THEME.fontFamily;
|
|
859
|
-
return vars;
|
|
860
|
-
}
|
|
861
|
-
function SekyroThemeProvider({ theme, children, className }) {
|
|
862
|
-
const style = themeToCssVars(theme);
|
|
863
|
-
return /* @__PURE__ */ jsx7("div", { className: className === void 0 ? "sekyro-root" : `sekyro-root ${className}`, style, children });
|
|
864
|
-
}
|
|
865
|
-
export {
|
|
866
|
-
DEFAULT_THEME,
|
|
867
|
-
LivenessCapture,
|
|
868
|
-
NO_FACE_DEBOUNCE_MS,
|
|
869
|
-
SekyroThemeProvider,
|
|
870
|
-
ar,
|
|
871
|
-
attemptsRemainingText,
|
|
872
|
-
captureErrorStringKey,
|
|
873
|
-
en,
|
|
874
|
-
fr,
|
|
875
|
-
hintStringKey,
|
|
876
|
-
reasonStringKey,
|
|
877
|
-
resolveStrings,
|
|
878
|
-
themeToCssVars
|
|
879
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import{isValidElement,useCallback as useCallback6,useEffect as useEffect8,useMemo as useMemo2,useRef as useRef6,useState as useState6}from"react";import{forwardRef}from"react";import{jsx}from"react/jsx-runtime";var Button=forwardRef(__name(function({kind="primary",full=!1,className,type,...rest},ref){let classes=["sekyro-btn",`sekyro-btn--${kind}`];return full&&classes.push("sekyro-btn--full"),className!==void 0&&classes.push(className),jsx("button",{ref,type:type??"button",className:classes.join(" "),...rest})},"Button"));import{jsx as jsx2,jsxs}from"react/jsx-runtime";var TICKS=Array.from({length:56},(_,i)=>{let angle=i/56*2*Math.PI-Math.PI/2,cos=Math.cos(angle),sin=Math.sin(angle);return{id:`tick-${i}`,frac:i/55,x1:150+108*cos,y1:150+108*sin,x2:150+138*cos,y2:150+138*sin,style:{transitionDelay:`${i*6}ms`}}});function tickColor(reached,frac,complete,draining){return complete?"var(--sekyro-color-success)":reached?draining?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":frac<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":frac<.66?"color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)":"var(--sekyro-color-brand)":"color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)"}__name(tickColor,"tickColor");var SCRIM_PATH="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function CaptureArc({progress,phase,draining=!1}){let clamped=Math.min(1,Math.max(0,progress)),filled=Math.round(clamped*56),checking=phase==="checking",recording=phase==="recording",frozen=phase==="frozen",stillShown=checking||frozen,spinning=checking||recording||frozen,complete=phase==="locked"||spinning,drainingVisible=draining&&!complete;return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":phase,"data-filled":filled,"data-recording":recording?"":void 0,"data-draining":drainingVisible?"":void 0,children:[jsx2("path",{fillRule:"evenodd",d:SCRIM_PATH,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":stillShown?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),jsxs("g",{className:phase==="locked"?"sekyro-capture-settle":void 0,children:[jsx2("g",{className:stillShown?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:TICKS.map((tick,i)=>jsx2("line",{x1:tick.x1,y1:tick.y1,x2:tick.x2,y2:tick.y2,stroke:tickColor(i<filled,tick.frac,complete,drainingVisible),strokeWidth:3,strokeLinecap:"round",style:tick.style,className:"sekyro-arc__tick"},tick.id))}),jsx2("g",{className:phase==="seeking"?"sekyro-capture-breathe":void 0,children:jsx2("circle",{cx:150,cy:150,r:100,fill:"none",stroke:complete?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:complete?3.5:2.5,className:spinning?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}__name(CaptureArc,"CaptureArc");import{createContext,useContext}from"react";var en={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture\u2026","capture.checking":"We're checking your identity\u2026","capture.checkingHint":"This usually takes a few seconds \u2014 keep this page open","capture.securityNote":"Your images are encrypted and used only for this verification","capture.cameraOff":"Camera off","capture.previewAlt":"Preview of the captured image of your face","capture.retryCoaching.title":"That attempt didn't work \u2014 a few adjustments will help:","capture.retryCoaching.light":"Find good lighting \u2014 light on your face, not behind you","capture.retryCoaching.eyeLevel":"Hold your phone at eye level","capture.retryCoaching.head":"Look straight at the camera and keep your head upright","capture.attemptsRemaining.one":"{count} attempt remaining","capture.attemptsRemaining.other":"{count} attempts remaining","common.retry":"Try again","fcv2.err.permission":"Allow camera access in your browser settings (the camera icon in the address bar), then try again","fcv2.err.notfound":"No camera detected \u2014 connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera \u2014 close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS) \u2014 reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format \u2014 open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable \u2014 try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face \u2014 hold the phone in front of you","fcv3.come_closer":"Bring the phone a little closer","fcv3.move_back":"Move the phone a little farther away","fcv3.center_face":"Center your face in the circle","fcv3.straighten":"Hold your head straight","fcv3.more_light":"Find a brighter spot \u2014 light your face","fcv3.too_bright":"Too much light \u2014 turn away from the light source","fcv3.hold_still":"Perfect \u2014 hold still","fcv3.steady_camera":"Hold the phone steady","reasons.no_face":"No face could be detected during the check","reasons.media_unreadable":"The submitted capture could not be read","reasons.clip_too_short":"The capture was too short","reasons.spoof_detected":"The liveness check could not confirm a live person in front of the camera","reasons.review_band":"The automatic check was not conclusive, so it was sent to human review","reasons.nni_not_found":"The national identification number was not found in the civil registry","reasons.nni_invalid":"The national identification number is not a valid 10-digit NNI","reasons.registry_unavailable":"The civil registry could not be reached to confirm the NNI","reasons.result_from_cache":"The registry check was confirmed from a recent copy of the registry","reasons.no_face_source":"No face could be detected in the selfie photo","reasons.no_face_reference":"No reference photo was available to compare your selfie against \u2014 the requester needs to resolve this, so retaking your selfie will not help","reasons.low_quality_reference":"The reference photo on file was not clear enough to compare against","reasons.below_threshold":"The selfie did not match the photo on the identity document closely enough","reasons.side_missing":"One side of the identity document was not submitted","reasons.mrz_checksum_failed":"The machine-readable zone of the document could not be validated","reasons.unreadable":"The document photo was not clear enough to read","reasons.expired_document":"The identity document has expired","reasons.authenticity_review":"The document was sent to human review to confirm its authenticity","reasons.registry_mismatch":"The document's details did not match the civil registry \u2014 a reviewer will check","reasons.otp_mismatch":"The verification code did not match the one we sent","reasons.otp_expired":"The verification code expired before it was entered","reasons.otp_send_failed":"We could not send a verification code to your phone","reasons.uncalibrated_capture_channel":"Desktop/webcam captures are not yet auto-decided \u2014 your verification went to human review","errors.attestation_invalid":"We could not confirm this browser session is genuine \u2014 reload the page and try again","errors.network_error":"We could not reach the verification service \u2014 check your internet connection and try again","errors.session_expired":"This verification session has expired \u2014 ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number \u2014 ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source \u2014 avoid strong light behind you","capture.tips.uncover":"Uncover your face \u2014 no glasses, mask or hand in front of it","capture.tips.eyeLevel":"Hold your phone at eye level","capture.tips.straight":"Look straight at the camera and keep still","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera \u2014 choose Allow","capture.permission.denied":"Camera access is blocked \u2014 allow it in your browser settings (the camera icon in the address bar), then reload this page","capture.permission.unknown":"We'll ask to use your camera when you start","capture.cameraLabel":"Camera","capture.facing.user":"Front camera","capture.facing.environment":"Back camera","capture.voiceGuidance":"Voice guidance","capture.preparing.hint":"Setting up on-device face detection \u2014 this can take a moment on a slow connection","capture.ready":"Ready \u2014 start when you are","fcv2.err.models":"The face-detection models could not be loaded \u2014 check your connection and try again"};var ar={"capture.start":"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627","capture.recordAgain":"\u0627\u0628\u062F\u0623 \u0645\u062D\u0627\u0648\u0644\u0629 \u062C\u062F\u064A\u062F\u0629","capture.switchCamera":"\u062A\u0628\u062F\u064A\u0644 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627","capture.preparing.title":"\u062C\u0627\u0631\u064D \u062A\u062C\u0647\u064A\u0632 \u0627\u0644\u0627\u0644\u062A\u0642\u0627\u0637 \u0627\u0644\u0622\u0645\u0646\u2026","capture.checking":"\u0646\u062A\u062D\u0642\u0642 \u0645\u0646 \u0647\u0648\u064A\u062A\u0643\u2026","capture.checkingHint":"\u064A\u0633\u062A\u063A\u0631\u0642 \u0647\u0630\u0627 \u0639\u0627\u062F\u0629\u064B \u0628\u0636\u0639 \u062B\u0648\u0627\u0646\u064D \u2014 \u0623\u0628\u0642\u0650 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0645\u0641\u062A\u0648\u062D\u0629","capture.securityNote":"\u062A\u064F\u0634\u0641\u064E\u0651\u0631 \u0644\u0642\u0637\u0627\u062A\u0643 \u0648\u062A\u064F\u0633\u062A\u062E\u062F\u0645 \u0641\u0642\u0637 \u0644\u0647\u0630\u0627 \u0627\u0644\u062A\u062D\u0642\u0642","capture.cameraOff":"\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0645\u0637\u0641\u0623\u0629","capture.previewAlt":"\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0644\u062A\u0642\u0637\u0629 \u0644\u0648\u062C\u0647\u0643","capture.retryCoaching.title":"\u0644\u0645 \u062A\u0646\u062C\u062D \u0647\u0630\u0647 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u2014 \u0628\u0639\u0636 \u0627\u0644\u062A\u0639\u062F\u064A\u0644\u0627\u062A \u0633\u062A\u0633\u0627\u0639\u062F:","capture.retryCoaching.light":"\u0627\u062E\u062A\u0631 \u0645\u0643\u0627\u0646\u064B\u0627 \u062C\u064A\u062F \u0627\u0644\u0625\u0636\u0627\u0621\u0629 \u2014 \u0627\u0644\u0636\u0648\u0621 \u0639\u0644\u0649 \u0648\u062C\u0647\u0643 \u0644\u0627 \u062E\u0644\u0641\u0643","capture.retryCoaching.eyeLevel":"\u0623\u0645\u0633\u0643 \u0647\u0627\u062A\u0641\u0643 \u0628\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0639\u064A\u0646\u064A\u0646","capture.retryCoaching.head":"\u0627\u0646\u0638\u0631 \u0645\u0628\u0627\u0634\u0631\u0629 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0648\u0623\u0628\u0642\u0650 \u0631\u0623\u0633\u0643 \u0645\u0633\u062A\u0642\u064A\u0645\u064B\u0627","capture.attemptsRemaining.zero":"\u0644\u0645 \u062A\u062A\u0628\u0642\u064E\u0651 \u0623\u064A \u0645\u062D\u0627\u0648\u0644\u0629","capture.attemptsRemaining.one":"\u062A\u0628\u0642\u0651\u062A \u0645\u062D\u0627\u0648\u0644\u0629 \u0648\u0627\u062D\u062F\u0629","capture.attemptsRemaining.two":"\u062A\u0628\u0642\u0651\u062A \u0645\u062D\u0627\u0648\u0644\u062A\u0627\u0646","capture.attemptsRemaining.few":"\u062A\u0628\u0642\u0651\u062A {count} \u0645\u062D\u0627\u0648\u0644\u0627\u062A","capture.attemptsRemaining.many":"\u062A\u0628\u0642\u0651\u062A {count} \u0645\u062D\u0627\u0648\u0644\u0629","capture.attemptsRemaining.other":"\u062A\u0628\u0642\u0651\u062A {count} \u0645\u062D\u0627\u0648\u0644\u0629","common.retry":"\u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","fcv2.err.permission":"\u0627\u0633\u0645\u062D \u0628\u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0645\u0646 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062A\u0635\u0641\u062D (\u0623\u064A\u0642\u0648\u0646\u0629 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0641\u064A \u0634\u0631\u064A\u0637 \u0627\u0644\u0639\u0646\u0648\u0627\u0646) \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","fcv2.err.notfound":"\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0643\u0627\u0645\u064A\u0631\u0627 \u2014 \u0648\u0635\u0650\u0651\u0644 \u0643\u0627\u0645\u064A\u0631\u0627 \u0623\u0648 \u0641\u0639\u0650\u0651\u0644\u0647\u0627 \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","fcv2.err.inuse":"\u062A\u0637\u0628\u064A\u0642 \u0622\u062E\u0631 \u064A\u0633\u062A\u062E\u062F\u0645 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u2014 \u0623\u063A\u0644\u0642\u0647 \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","fcv2.err.insecure":"\u062A\u062A\u0637\u0644\u0628 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u062A\u0635\u0627\u0644\u064B\u0627 \u0622\u0645\u0646\u064B\u0627 (HTTPS) \u2014 \u0627\u0641\u062A\u062D \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0639\u0628\u0631 HTTPS","fcv2.err.unsupported":"\u0645\u062A\u0635\u0641\u062D\u0643 \u0644\u0627 \u064A\u0633\u062A\u0637\u064A\u0639 \u0627\u0644\u0627\u0644\u062A\u0642\u0627\u0637 \u0628\u0635\u064A\u063A\u0629 \u0645\u062F\u0639\u0648\u0645\u0629 \u2014 \u0627\u0641\u062A\u062D \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0641\u064A \u0645\u062A\u0635\u0641\u062D \u062D\u062F\u064A\u062B \u0645\u062B\u0644 \u0643\u0631\u0648\u0645 \u0623\u0648 \u0633\u0641\u0627\u0631\u064A","fcv2.err.generic":"\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u0629 \u2014 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629\u060C \u0648\u062A\u0648\u0627\u0635\u0644 \u0645\u0639 \u0627\u0644\u062F\u0639\u0645 \u0625\u0630\u0627 \u0627\u0633\u062A\u0645\u0631\u062A \u0627\u0644\u0645\u0634\u0643\u0644\u0629","fcv3.no_face":"\u0644\u0627 \u0646\u0631\u0649 \u0648\u062C\u0647\u0643 \u2014 \u0623\u0645\u0633\u0643 \u0627\u0644\u0647\u0627\u062A\u0641 \u0623\u0645\u0627\u0645\u0643","fcv3.come_closer":"\u0642\u0631\u0651\u0628 \u0627\u0644\u0647\u0627\u062A\u0641 \u0642\u0644\u064A\u0644\u064B\u0627","fcv3.move_back":"\u0623\u0628\u0639\u062F \u0627\u0644\u0647\u0627\u062A\u0641 \u0642\u0644\u064A\u0644\u064B\u0627","fcv3.center_face":"\u0636\u0639 \u0648\u062C\u0647\u0643 \u0641\u064A \u0645\u0646\u062A\u0635\u0641 \u0627\u0644\u062F\u0627\u0626\u0631\u0629","fcv3.straighten":"\u0623\u0628\u0642\u0650 \u0631\u0623\u0633\u0643 \u0645\u0633\u062A\u0642\u064A\u0645\u064B\u0627","fcv3.more_light":"\u0627\u0646\u062A\u0642\u0644 \u0625\u0644\u0649 \u0645\u0643\u0627\u0646 \u0623\u0643\u062B\u0631 \u0625\u0636\u0627\u0621\u0629 \u2014 \u0623\u0636\u0626 \u0648\u062C\u0647\u0643","fcv3.too_bright":"\u0627\u0644\u0625\u0636\u0627\u0621\u0629 \u0642\u0648\u064A\u0629 \u062C\u062F\u064B\u0627 \u2014 \u0627\u0628\u062A\u0639\u062F \u0639\u0646 \u0645\u0635\u062F\u0631 \u0627\u0644\u0636\u0648\u0621","fcv3.hold_still":"\u0645\u0645\u062A\u0627\u0632 \u2014 \u0644\u0627 \u062A\u062A\u062D\u0631\u0643","fcv3.steady_camera":"\u0623\u0645\u0633\u0643 \u0627\u0644\u0647\u0627\u062A\u0641 \u0628\u062B\u0628\u0627\u062A","reasons.no_face":"\u062A\u0639\u0630\u0651\u0631 \u0627\u0643\u062A\u0634\u0627\u0641 \u0623\u064A \u0648\u062C\u0647 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u062D\u0642\u0642","reasons.media_unreadable":"\u062A\u0639\u0630\u0651\u0631\u062A \u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0644\u0642\u0637\u0629 \u0627\u0644\u0645\u064F\u0631\u0633\u0644\u0629","reasons.clip_too_short":"\u0643\u0627\u0646\u062A \u0627\u0644\u0644\u0642\u0637\u0629 \u0623\u0642\u0635\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645","reasons.spoof_detected":"\u0644\u0645 \u064A\u062A\u0645\u0643\u0646 \u0641\u062D\u0635 \u0627\u0644\u062D\u0636\u0648\u0631 \u0627\u0644\u062D\u064A \u0645\u0646 \u062A\u0623\u0643\u064A\u062F \u0648\u062C\u0648\u062F \u0634\u062E\u0635 \u062D\u0642\u064A\u0642\u064A \u0623\u0645\u0627\u0645 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627","reasons.review_band":"\u0644\u0645 \u064A\u0643\u0646 \u0627\u0644\u0641\u062D\u0635 \u0627\u0644\u062A\u0644\u0642\u0627\u0626\u064A \u062D\u0627\u0633\u0645\u064B\u0627\u060C \u0644\u0630\u0627 \u0623\u064F\u062D\u064A\u0644 \u0625\u0644\u0649 \u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0634\u0631\u064A\u0629","reasons.nni_not_found":"\u0644\u0645 \u064A\u064F\u0639\u062B\u0631 \u0639\u0644\u0649 \u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0648\u0637\u0646\u064A \u0641\u064A \u0633\u062C\u0644 \u0627\u0644\u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u062F\u0646\u064A\u0629","reasons.nni_invalid":"\u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0648\u0637\u0646\u064A \u0644\u064A\u0633 \u0631\u0642\u0645\u064B\u0627 \u0635\u0627\u0644\u062D\u064B\u0627 \u0645\u0643\u0648\u0651\u0646\u064B\u0627 \u0645\u0646 10 \u0623\u0631\u0642\u0627\u0645","reasons.registry_unavailable":"\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0633\u062C\u0644 \u0627\u0644\u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u062F\u0646\u064A\u0629 \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0648\u0637\u0646\u064A","reasons.result_from_cache":"\u0623\u064F\u0643\u0650\u0651\u062F \u0641\u062D\u0635 \u0627\u0644\u0633\u062C\u0644 \u0627\u0633\u062A\u0646\u0627\u062F\u064B\u0627 \u0625\u0644\u0649 \u0646\u0633\u062E\u0629 \u062D\u062F\u064A\u062B\u0629 \u0645\u0646 \u0627\u0644\u0633\u062C\u0644","reasons.no_face_source":"\u062A\u0639\u0630\u0651\u0631 \u0627\u0643\u062A\u0634\u0627\u0641 \u0648\u062C\u0647 \u0641\u064A \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0630\u0627\u062A\u064A\u0629","reasons.no_face_reference":"\u0644\u0645 \u062A\u062A\u0648\u0641\u0651\u0631 \u0635\u0648\u0631\u0629 \u0645\u0631\u062C\u0639\u064A\u0629 \u0644\u0645\u0642\u0627\u0631\u0646\u0629 \u0635\u0648\u0631\u062A\u0643 \u0627\u0644\u0630\u0627\u062A\u064A\u0629 \u0628\u0647\u0627 \u2014 \u0639\u0644\u0649 \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u0637\u0627\u0644\u0628\u0629 \u0645\u0639\u0627\u0644\u062C\u0629 \u0630\u0644\u0643\u060C \u0648\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0642\u0627\u0637 \u0635\u0648\u0631\u062A\u0643 \u0627\u0644\u0630\u0627\u062A\u064A\u0629 \u0644\u0646 \u062A\u064F\u062C\u062F\u064A","reasons.low_quality_reference":"\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0631\u062C\u0639\u064A\u0629 \u0627\u0644\u0645\u062D\u0641\u0648\u0638\u0629 \u0644\u0645 \u062A\u0643\u0646 \u0648\u0627\u0636\u062D\u0629 \u0628\u0645\u0627 \u064A\u0643\u0641\u064A \u0644\u0644\u0645\u0642\u0627\u0631\u0646\u0629","reasons.below_threshold":"\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0630\u0627\u062A\u064A\u0629 \u0644\u0645 \u062A\u0637\u0627\u0628\u0642 \u0635\u0648\u0631\u0629 \u0648\u062B\u064A\u0642\u0629 \u0627\u0644\u0647\u0648\u064A\u0629 \u0628\u062F\u0631\u062C\u0629 \u0643\u0627\u0641\u064A\u0629","reasons.side_missing":"\u0623\u062D\u062F \u0648\u062C\u0647\u064A \u0648\u062B\u064A\u0642\u0629 \u0627\u0644\u0647\u0648\u064A\u0629 \u0644\u0645 \u064A\u064F\u0631\u0633\u0644","reasons.mrz_checksum_failed":"\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0622\u0644\u064A\u0629 \u0641\u064A \u0627\u0644\u0648\u062B\u064A\u0642\u0629","reasons.unreadable":"\u0635\u0648\u0631\u0629 \u0627\u0644\u0648\u062B\u064A\u0642\u0629 \u0644\u0645 \u062A\u0643\u0646 \u0648\u0627\u0636\u062D\u0629 \u0628\u0645\u0627 \u064A\u0643\u0641\u064A \u0644\u0644\u0642\u0631\u0627\u0621\u0629","reasons.expired_document":"\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u0648\u062B\u064A\u0642\u0629 \u0627\u0644\u0647\u0648\u064A\u0629","reasons.authenticity_review":"\u0623\u064F\u062D\u064A\u0644\u062A \u0627\u0644\u0648\u062B\u064A\u0642\u0629 \u0625\u0644\u0649 \u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0634\u0631\u064A\u0629 \u0644\u0644\u062A\u0623\u0643\u062F \u0645\u0646 \u0635\u062D\u062A\u0647\u0627","reasons.registry_mismatch":"\u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0648\u062B\u064A\u0642\u0629 \u0644\u0627 \u062A\u0637\u0627\u0628\u0642 \u0627\u0644\u0633\u062C\u0644 \u0627\u0644\u0645\u062F\u0646\u064A \u2014 \u0633\u064A\u062A\u062D\u0642\u0642 \u0645\u0646\u0647\u0627 \u0645\u0631\u0627\u062C\u0639","reasons.otp_mismatch":"\u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0651\u0642 \u0644\u0627 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064A \u0623\u0631\u0633\u0644\u0646\u0627\u0647","reasons.otp_expired":"\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0651\u0642 \u0642\u0628\u0644 \u0625\u062F\u062E\u0627\u0644\u0647","reasons.otp_send_failed":"\u062A\u0639\u0630\u0651\u0631 \u0625\u0631\u0633\u0627\u0644 \u0631\u0645\u0632 \u0627\u0644\u062A\u062D\u0642\u0651\u0642 \u0625\u0644\u0649 \u0647\u0627\u062A\u0641\u0643","reasons.uncalibrated_capture_channel":"\u062C\u0648\u062F\u0629 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0645\u0643\u062A\u0628\u064A\u0629 \u063A\u064A\u0631 \u0645\u0639\u0627\u064A\u064E\u0631\u0629 \u0628\u0639\u062F \u2014 \u0623\u064F\u062D\u064A\u0644 \u062A\u062D\u0642\u0642\u0643 \u0625\u0644\u0649 \u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0634\u0631\u064A\u0629","errors.attestation_invalid":"\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u062A\u0623\u0643\u062F \u0645\u0646 \u0633\u0644\u0627\u0645\u0629 \u062C\u0644\u0633\u0629 \u0627\u0644\u0645\u062A\u0635\u0641\u062D \u2014 \u0623\u0639\u062F \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629 \u0648\u062D\u0627\u0648\u0644 \u0645\u062C\u062F\u062F\u064B\u0627","errors.network_error":"\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u062E\u062F\u0645\u0629 \u0627\u0644\u062A\u062D\u0642\u0642 \u2014 \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643 \u0628\u0627\u0644\u0625\u0646\u062A\u0631\u0646\u062A \u0648\u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","errors.session_expired":"\u0627\u0646\u062A\u0647\u062A \u0635\u0644\u0627\u062D\u064A\u0629 \u062C\u0644\u0633\u0629 \u0627\u0644\u062A\u062D\u0642\u0642 \u0647\u0630\u0647 \u2014 \u0627\u0637\u0644\u0628 \u0631\u0627\u0628\u0637\u064B\u0627 \u062C\u062F\u064A\u062F\u064B\u0627 \u0645\u0646 \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u062A\u064A \u0623\u0631\u0633\u0644\u062A\u0643 \u0625\u0644\u0649 \u0647\u0646\u0627","errors.nni_unbound":"\u0623\u064F\u0646\u0634\u0626 \u0647\u0630\u0627 \u0627\u0644\u0631\u0627\u0628\u0637 \u062F\u0648\u0646 \u0631\u0642\u0645\u0643 \u0627\u0644\u0648\u0637\u0646\u064A \u0644\u0644\u062A\u0639\u0631\u064A\u0641 \u2014 \u0627\u0637\u0644\u0628 \u0631\u0627\u0628\u0637\u064B\u0627 \u062C\u062F\u064A\u062F\u064B\u0627 \u0645\u0646 \u0627\u0644\u062C\u0647\u0629 \u0627\u0644\u0637\u0627\u0644\u0628\u0629","capture.tips.title":"\u0644\u062A\u062D\u0642\u0642 \u0646\u0627\u062C\u062D:","capture.tips.light":"\u0627\u062C\u0639\u0644 \u0627\u0644\u0636\u0648\u0621 \u0623\u0645\u0627\u0645 \u0648\u062C\u0647\u0643 \u2014 \u062A\u062C\u0646\u0651\u0628 \u0627\u0644\u0625\u0636\u0627\u0621\u0629 \u0627\u0644\u0642\u0648\u064A\u0629 \u062E\u0644\u0641\u0643","capture.tips.uncover":"\u0627\u0643\u0634\u0641 \u0648\u062C\u0647\u0643 \u2014 \u0628\u0644\u0627 \u0646\u0638\u0627\u0631\u0627\u062A \u0623\u0648 \u0643\u0645\u0627\u0645\u0629 \u0623\u0648 \u064A\u062F \u0623\u0645\u0627\u0645\u0647","capture.tips.eyeLevel":"\u0623\u0645\u0633\u0643 \u0647\u0627\u062A\u0641\u0643 \u0628\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0639\u064A\u0646\u064A\u0646","capture.tips.straight":"\u0627\u0646\u0638\u0631 \u0645\u0628\u0627\u0634\u0631\u0629 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0648\u0627\u0628\u0642\u064E \u062B\u0627\u0628\u062A\u064B\u0627","capture.permission.granted":"\u062A\u0645 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627","capture.permission.prompt":"\u0633\u064A\u0637\u0644\u0628 \u0645\u062A\u0635\u0641\u062D\u0643 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u2014 \u0627\u062E\u062A\u0631 \xAB\u0627\u0644\u0633\u0645\u0627\u062D\xBB","capture.permission.denied":"\u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0645\u062D\u0638\u0648\u0631 \u2014 \u0627\u0633\u0645\u062D \u0628\u0647 \u0645\u0646 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062A\u0635\u0641\u062D (\u0631\u0645\u0632 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0641\u064A \u0634\u0631\u064A\u0637 \u0627\u0644\u0639\u0646\u0648\u0627\u0646)\u060C \u062B\u0645 \u0623\u0639\u062F \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629","capture.permission.unknown":"\u0633\u0646\u0637\u0644\u0628 \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0639\u0646\u062F \u0627\u0644\u0628\u062F\u0621","capture.cameraLabel":"\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627","capture.facing.user":"\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0623\u0645\u0627\u0645\u064A\u0629","capture.facing.environment":"\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u062E\u0644\u0641\u064A\u0629","capture.voiceGuidance":"\u0627\u0644\u0625\u0631\u0634\u0627\u062F \u0627\u0644\u0635\u0648\u062A\u064A","capture.preparing.hint":"\u064A\u062C\u0631\u064A \u0625\u0639\u062F\u0627\u062F \u0643\u0634\u0641 \u0627\u0644\u0648\u062C\u0647 \u0639\u0644\u0649 \u062C\u0647\u0627\u0632\u0643 \u2014 \u0642\u062F \u064A\u0633\u062A\u063A\u0631\u0642 \u0630\u0644\u0643 \u0644\u062D\u0638\u0629 \u0639\u0644\u0649 \u0627\u062A\u0635\u0627\u0644 \u0628\u0637\u064A\u0621","capture.ready":"\u062C\u0627\u0647\u0632 \u2014 \u0627\u0628\u062F\u0623 \u0639\u0646\u062F\u0645\u0627 \u062A\u0643\u0648\u0646 \u0645\u0633\u062A\u0639\u062F\u064B\u0627","fcv2.err.models":"\u062A\u0639\u0630\u0651\u0631 \u062A\u062D\u0645\u064A\u0644 \u0646\u0645\u0627\u0630\u062C \u0627\u0644\u062A\u0639\u0631\u0641 \u0639\u0644\u0649 \u0627\u0644\u0648\u062C\u0647 \u2014 \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643 \u062B\u0645 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629"};var fr={"capture.start":"D\xE9marrer la cam\xE9ra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de cam\xE9ra","capture.preparing.title":"Pr\xE9paration de la capture s\xE9curis\xE9e\u2026","capture.checking":"Nous v\xE9rifions votre identit\xE9\u2026","capture.checkingHint":"Cela prend g\xE9n\xE9ralement quelques secondes \u2014 gardez cette page ouverte","capture.securityNote":"Vos images sont chiffr\xE9es et utilis\xE9es uniquement pour cette v\xE9rification","capture.cameraOff":"Cam\xE9ra \xE9teinte","capture.previewAlt":"Aper\xE7u de l\u2019image captur\xE9e de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti \u2014 quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien \xE9clair\xE9 \u2014 lumi\xE8re sur le visage, pas derri\xE8re vous","capture.retryCoaching.eyeLevel":"Tenez votre t\xE9l\xE9phone \xE0 hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la cam\xE9ra, la t\xEAte bien droite","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"R\xE9essayer","fcv2.err.permission":"Autorisez la cam\xE9ra dans les r\xE9glages du navigateur (ic\xF4ne cam\xE9ra dans la barre d\u2019adresse), puis r\xE9essayez","fcv2.err.notfound":"Aucune cam\xE9ra d\xE9tect\xE9e \u2014 branchez ou activez une cam\xE9ra, puis r\xE9essayez","fcv2.err.inuse":"La cam\xE9ra est utilis\xE9e par une autre application \u2014 fermez-la, puis r\xE9essayez","fcv2.err.insecure":"La cam\xE9ra n\xE9cessite une connexion s\xE9curis\xE9e (HTTPS) \u2014 rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible \u2014 ouvrez cette page dans un navigateur r\xE9cent comme Chrome ou Safari","fcv2.err.generic":"Cam\xE9ra indisponible \u2014 r\xE9essayez, ou contactez le support si le probl\xE8me persiste","fcv3.no_face":"Nous ne voyons pas votre visage \u2014 tenez le t\xE9l\xE9phone devant vous","fcv3.come_closer":"Rapprochez un peu le t\xE9l\xE9phone","fcv3.move_back":"\xC9loignez un peu le t\xE9l\xE9phone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la t\xEAte droite","fcv3.more_light":"Cherchez un endroit plus lumineux \u2014 \xE9clairez votre visage","fcv3.too_bright":"Trop de lumi\xE8re \u2014 tournez-vous dos \xE0 la source de lumi\xE8re","fcv3.hold_still":"Parfait \u2014 ne bougez plus","fcv3.steady_camera":"Tenez le t\xE9l\xE9phone stable","reasons.no_face":"Aucun visage n\u2019a pu \xEAtre d\xE9tect\xE9 pendant la v\xE9rification","reasons.media_unreadable":"La capture envoy\xE9e n\u2019a pas pu \xEAtre lue","reasons.clip_too_short":"La capture \xE9tait trop courte","reasons.spoof_detected":"Le contr\xF4le de pr\xE9sence n'a pas pu confirmer la pr\xE9sence d'une personne r\xE9elle devant la cam\xE9ra","reasons.review_band":"Le contr\xF4le automatique n'a pas \xE9t\xE9 concluant, il a donc \xE9t\xE9 transmis \xE0 un examen humain","reasons.nni_not_found":"Le num\xE9ro national d'identification n'a pas \xE9t\xE9 trouv\xE9 dans le registre d'\xE9tat civil","reasons.nni_invalid":"Le num\xE9ro national d'identification n'est pas un NNI valide \xE0 10 chiffres","reasons.registry_unavailable":"Le registre d'\xE9tat civil n'a pas pu \xEAtre joint pour confirmer le NNI","reasons.result_from_cache":"Le contr\xF4le du registre a \xE9t\xE9 confirm\xE9 \xE0 partir d'une copie r\xE9cente du registre","reasons.no_face_source":"Aucun visage n'a pu \xEAtre d\xE9tect\xE9 sur la photo selfie","reasons.no_face_reference":"Aucune photo de r\xE9f\xE9rence n'\xE9tait disponible pour comparer votre selfie \u2014 c'est au demandeur de le r\xE9soudre, reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de r\xE9f\xE9rence enregistr\xE9e n'\xE9tait pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment \xE0 la photo de la pi\xE8ce d'identit\xE9","reasons.side_missing":"Un c\xF4t\xE9 de la pi\xE8ce d'identit\xE9 n'a pas \xE9t\xE9 envoy\xE9","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu \xEAtre valid\xE9e","reasons.unreadable":"La photo du document n'\xE9tait pas assez nette pour \xEAtre lue","reasons.expired_document":"La pi\xE8ce d'identit\xE9 a expir\xE9","reasons.authenticity_review":"Le document a \xE9t\xE9 transmis \xE0 un examen humain pour confirmer son authenticit\xE9","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil \u2014 un examinateur va v\xE9rifier","reasons.otp_mismatch":"Le code de v\xE9rification ne correspond pas \xE0 celui que nous avons envoy\xE9","reasons.otp_expired":"Le code de v\xE9rification a expir\xE9 avant d'\xEAtre saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de v\xE9rification \xE0 votre t\xE9l\xE9phone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore d\xE9cid\xE9es automatiquement \u2014 votre v\xE9rification part en revue humaine","errors.attestation_invalid":"Nous n'avons pas pu confirmer l'authenticit\xE9 de cette session de navigateur \u2014 rechargez la page et r\xE9essayez","errors.network_error":"Nous n'avons pas pu joindre le service de v\xE9rification \u2014 v\xE9rifiez votre connexion internet et r\xE9essayez","errors.session_expired":"Cette session de v\xE9rification a expir\xE9 \u2014 demandez un nouveau lien \xE0 l'organisme qui vous a envoy\xE9 ici","errors.nni_unbound":"Ce lien a \xE9t\xE9 cr\xE9\xE9 sans votre num\xE9ro national d'identification \u2014 demandez un nouveau lien \xE0 l'organisme demandeur","capture.tips.title":"Pour une v\xE9rification r\xE9ussie :","capture.tips.light":"Placez-vous face \xE0 la lumi\xE8re \u2014 \xE9vitez une forte lumi\xE8re derri\xE8re vous","capture.tips.uncover":"D\xE9gagez votre visage \u2014 ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre t\xE9l\xE9phone \xE0 hauteur des yeux","capture.tips.straight":"Regardez droit vers la cam\xE9ra et restez immobile","capture.permission.granted":"Acc\xE8s \xE0 la cam\xE9ra autoris\xE9","capture.permission.prompt":"Votre navigateur va demander l\u2019acc\xE8s \xE0 la cam\xE9ra \u2014 choisissez \xAB Autoriser \xBB","capture.permission.denied":"L\u2019acc\xE8s \xE0 la cam\xE9ra est bloqu\xE9 \u2014 autorisez-le dans les r\xE9glages du navigateur (ic\xF4ne cam\xE9ra dans la barre d\u2019adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l\u2019acc\xE8s \xE0 la cam\xE9ra au d\xE9marrage","capture.cameraLabel":"Cam\xE9ra","capture.facing.user":"Cam\xE9ra avant","capture.facing.environment":"Cam\xE9ra arri\xE8re","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la d\xE9tection du visage sur l\u2019appareil \u2014 cela peut prendre un instant sur une connexion lente","capture.ready":"Pr\xEAt \u2014 commencez quand vous voulez","fcv2.err.models":"Impossible de charger les mod\xE8les de d\xE9tection du visage \u2014 v\xE9rifiez votre connexion puis r\xE9essayez"};function hintStringKey(hint){switch(hint){case"center":return"fcv3.center_face";case"closer":return"fcv3.come_closer";case"farther":return"fcv3.move_back";case"light":return"fcv3.more_light";case"still":case"hold":return"fcv3.hold_still";default:{let unhandled=hint;throw new Error(`hintStringKey: unhandled hint ${unhandled}`)}}}__name(hintStringKey,"hintStringKey");function captureErrorStringKey(kind){return`fcv2.err.${kind}`}__name(captureErrorStringKey,"captureErrorStringKey");function reasonStringKey(reason){switch(reason){case"no_recorder":return"fcv2.err.unsupported";case"attestation":return"errors.attestation_invalid";case"network":return"errors.network_error";case"nni_unbound":return"errors.nni_unbound";default:{let key=`reasons.${reason}`;return Object.hasOwn(en,key)?key:null}}}__name(reasonStringKey,"reasonStringKey");function attemptsRemainingText(dictionary,locale,count){let category=new Intl.PluralRules(locale).select(count);return((category==="other"?void 0:dictionary[`capture.attemptsRemaining.${category}`])??dictionary["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(locale).format(count))}__name(attemptsRemainingText,"attemptsRemainingText");var BUILT_IN={ar,fr,en};function resolveStrings(locale,overrides){let base=BUILT_IN[locale];if(overrides===void 0)return base;let merged={...base};for(let key of Object.keys(overrides)){let value=overrides[key];typeof value=="string"&&(merged[key]=value)}return merged}__name(resolveStrings,"resolveStrings");var StringsContext=createContext(key=>en[key]??""),StringsProvider=StringsContext.Provider;function useStrings(){return useContext(StringsContext)}__name(useStrings,"useStrings");import{jsx as jsx3,jsxs as jsxs2}from"react/jsx-runtime";function CaptureStage({videoRef,guidanceText,guidanceHint,guidanceKey,progress,phase,draining=!1,stillUrl,showChecking,onSwitchCamera,canSwitchCamera,voicePrompt,overlay,reduceMotion=!1}){let t=useStrings(),checking=phase==="checking",settled=checking||phase==="frozen",displayText=settled&&showChecking?t("capture.checking"):guidanceText,voice=voicePrompt?.(guidanceHint,displayText,guidanceKey);return jsxs2("div",{className:reduceMotion?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[jsx3("video",{ref:videoRef,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),stillUrl!==null&&settled?jsx3("img",{src:stillUrl,alt:t("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,jsx3(CaptureArc,{progress,phase,draining}),overlay?.(videoRef),voice!=null&&!settled?jsx3("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:voice}):null,canSwitchCamera?jsx3(Button,{kind:"chip",onClick:onSwitchCamera,"aria-label":t("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:jsx3(FlipCameraIcon,{})}):null,checking&&showChecking?jsxs2("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[jsx3(CameraOffIcon,{}),t("capture.cameraOff")]}):null,jsxs2("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[jsx3("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:displayText},displayText),settled&&showChecking?jsx3("span",{className:"sekyro-stage__guidance-hint",children:t("capture.checkingHint")}):null]})]})}__name(CaptureStage,"CaptureStage");function FlipCameraIcon(){return jsxs2("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[jsx3("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),jsx3("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),jsx3("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}__name(FlipCameraIcon,"FlipCameraIcon");function CameraOffIcon(){return jsxs2("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon sekyro-icon--sm",children:[jsx3("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),jsx3("path",{d:"M3 3l18 18"})]})}__name(CameraOffIcon,"CameraOffIcon");import{useEffect,useRef}from"react";import{jsx as jsx4,jsxs as jsxs3}from"react/jsx-runtime";function CapturedPanel({showCoaching,attemptsText,showRetake,onRetake}){let t=useStrings(),retakeRef=useRef(null);return useEffect(()=>{showRetake&&retakeRef.current?.focus()},[showRetake]),!showCoaching&&!showRetake?null:jsxs3("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[showCoaching?jsxs3("div",{className:"sekyro-stack sekyro-stack--1",children:[jsx4("p",{className:"sekyro-text-body",children:t("capture.retryCoaching.title")}),jsxs3("ul",{className:"sekyro-coaching",children:[jsx4("li",{children:t("capture.retryCoaching.light")}),jsx4("li",{children:t("capture.retryCoaching.eyeLevel")}),jsx4("li",{children:t("capture.retryCoaching.head")})]}),attemptsText!==null?jsx4("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:attemptsText}):null]}):null,showRetake?jsx4(Button,{ref:retakeRef,className:"sekyro-btn--start",onClick:onRetake,children:t("capture.recordAgain")}):null]})}__name(CapturedPanel,"CapturedPanel");function isDevBuild(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}__name(isDevBuild,"isDevBuild");import{useCallback,useEffect as useEffect3,useRef as useRef2}from"react";import{jsx as jsx5}from"react/jsx-runtime";function Notice({tone,role,children,testId}){return jsx5("div",{role:role??(tone==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${tone}`,"data-testid":testId,children})}__name(Notice,"Notice");import{useId}from"react";import{jsx as jsx6,jsxs as jsxs4}from"react/jsx-runtime";var OPTIONS=["user","environment"];function FacingPicker({value,onChange}){let t=useStrings(),name=useId();return jsxs4("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[jsx6("legend",{className:"sekyro-segmented__legend",children:t("capture.cameraLabel")}),jsx6("div",{className:"sekyro-segmented__options",children:OPTIONS.map(option=>jsxs4("label",{className:"sekyro-segmented__option",children:[jsx6("input",{type:"radio",className:"sekyro-segmented__input",name,value:option,checked:value===option,onChange:()=>onChange(option)}),jsxs4("span",{className:"sekyro-segmented__face",children:[jsx6("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),t(`capture.facing.${option}`)]})]},option))})]})}__name(FacingPicker,"FacingPicker");import{Fragment,jsx as jsx7,jsxs as jsxs5}from"react/jsx-runtime";function Svg({className,children}){return jsx7("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:className??"sekyro-icon sekyro-icon--sm",children})}__name(Svg,"Svg");var CAMERA_BODY="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function SunIcon(props){return jsxs5(Svg,{...props,children:[jsx7("circle",{cx:"12",cy:"12",r:"4"}),jsx7("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}__name(SunIcon,"SunIcon");function FaceUncoveredIcon(props){return jsxs5(Svg,{...props,children:[jsx7("circle",{cx:"12",cy:"12",r:"9"}),jsx7("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}__name(FaceUncoveredIcon,"FaceUncoveredIcon");function PhoneEyeLevelIcon(props){return jsxs5(Svg,{...props,children:[jsx7("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),jsx7("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),jsx7("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}__name(PhoneEyeLevelIcon,"PhoneEyeLevelIcon");function LookStraightIcon(props){return jsxs5(Svg,{...props,children:[jsx7("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),jsx7("circle",{cx:"12",cy:"12",r:"2.8"})]})}__name(LookStraightIcon,"LookStraightIcon");function CameraCheckIcon(props){return jsxs5(Svg,{...props,children:[jsx7("path",{d:CAMERA_BODY}),jsx7("path",{d:"M9 13l2 2 4-4"})]})}__name(CameraCheckIcon,"CameraCheckIcon");function CameraAskIcon(props){return jsxs5(Svg,{...props,children:[jsx7("path",{d:CAMERA_BODY}),jsx7("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}__name(CameraAskIcon,"CameraAskIcon");function CameraBlockedIcon(props){return jsxs5(Svg,{...props,children:[jsx7("path",{d:CAMERA_BODY}),jsx7("path",{d:"M3 3l18 18"})]})}__name(CameraBlockedIcon,"CameraBlockedIcon");function SpeakerIcon({off,className}){return jsxs5(Svg,{...className!==void 0?{className}:{},children:[jsx7("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),off?jsx7("path",{d:"M4 4l16 16"}):jsxs5(Fragment,{children:[jsx7("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),jsx7("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}__name(SpeakerIcon,"SpeakerIcon");function CheckIcon(props){return jsx7(Svg,{...props,children:jsx7("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}__name(CheckIcon,"CheckIcon");function SpinnerIcon(props){return jsxs5(Svg,{className:props.className??"sekyro-spinner",children:[jsx7("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),jsx7("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}__name(SpinnerIcon,"SpinnerIcon");import{useEffect as useEffect2,useState}from"react";import{jsx as jsx8,jsxs as jsxs6}from"react/jsx-runtime";function PermissionRow({state}){let t=useStrings(),[live,setLive]=useState(!1);useEffect2(()=>{state!=="unknown"&&setLive(!0)},[state]);let icon=state==="granted"?jsx8(CameraCheckIcon,{}):state==="denied"?jsx8(CameraBlockedIcon,{}):jsx8(CameraAskIcon,{});return jsxs6("div",{role:live?"status":void 0,className:`sekyro-permission sekyro-permission--${state}`,"data-testid":"sekyro-permission","data-state":state,children:[jsx8("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:icon}),jsx8("span",{children:t(`capture.permission.${state}`)})]})}__name(PermissionRow,"PermissionRow");import{useId as useId2}from"react";import{jsx as jsx9,jsxs as jsxs7}from"react/jsx-runtime";var DEFAULT_TIPS=["light","uncover","eyeLevel","straight"],BUILT_IN2={light:{key:"capture.tips.light",icon:__name(()=>jsx9(SunIcon,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:__name(()=>jsx9(FaceUncoveredIcon,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:__name(()=>jsx9(PhoneEyeLevelIcon,{}),"icon")},straight:{key:"capture.tips.straight",icon:__name(()=>jsx9(LookStraightIcon,{}),"icon")}};function TipList({tips}){let t=useStrings(),titleId=useId2();return tips.length===0?null:jsxs7("section",{className:"sekyro-tips","aria-labelledby":titleId,"data-testid":"sekyro-tips",children:[jsx9("p",{className:"sekyro-tips__title",id:titleId,children:t("capture.tips.title")}),jsx9("ul",{className:"sekyro-tips__list",children:tips.map(tip=>{let builtIn=typeof tip=="string"?BUILT_IN2[tip]:void 0,id=typeof tip=="string"?tip:tip.id,icon=builtIn!==void 0?builtIn.icon():typeof tip=="string"?void 0:tip.icon,text=builtIn!==void 0?t(builtIn.key):typeof tip=="string"?tip:tip.text;return jsxs7("li",{className:"sekyro-tips__item",children:[icon!=null?jsx9("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:icon}):null,jsx9("span",{children:text})]},id)})})]})}__name(TipList,"TipList");import{jsx as jsx10,jsxs as jsxs8}from"react/jsx-runtime";function VoiceSwitch({voice}){let t=useStrings();if(!voice.supported)return null;let on=voice.enabled;return jsxs8("button",{type:"button",role:"switch","aria-checked":on,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>voice.toggle(),children:[jsxs8("span",{className:"sekyro-switch__label",children:[jsx10(SpeakerIcon,{off:!on}),t("capture.voiceGuidance")]}),jsx10("span",{className:"sekyro-switch__track","aria-hidden":"true",children:jsx10("span",{className:"sekyro-switch__thumb",children:on?jsx10(CheckIcon,{className:"sekyro-switch__check"}):null})})]})}__name(VoiceSwitch,"VoiceSwitch");import{Fragment as Fragment2,jsx as jsx11,jsxs as jsxs9}from"react/jsx-runtime";function PreCaptureScreen({assets,onRetryAssets,permission,canChooseFacing,facing,onFacingChange,voice,tips,startLabel,startDisabled,onStart}){let t=useStrings(),rootRef=useRef2(null),startRef=useRef2(null),retryRef=useRef2(null),prevAssetsRef=useRef2(assets),retriedRef=useRef2(!1);useEffect3(()=>{let prev=prevAssetsRef.current;if(prevAssetsRef.current=assets,prev===assets)return;let retried=retriedRef.current;assets!=="loading"&&(retriedRef.current=!1),focusIsOurs(rootRef.current)&&(assets==="failed"?retryRef.current?.focus():retried&&startRef.current?.focus())},[assets]);let retry=useCallback(()=>{retriedRef.current=!0,onRetryAssets()},[onRetryAssets]),loading=assets==="loading",inert=loading||startDisabled,start=useCallback(()=>{inert||onStart()},[inert,onStart]),startArea;return assets==="failed"?startArea=jsxs9(Notice,{tone:"danger",testId:"sekyro-assets-error",children:[jsx11("p",{className:"sekyro-text-body",children:t("fcv2.err.models")}),jsx11(Button,{kind:"ghost",ref:retryRef,className:"sekyro-btn--start",onClick:retry,"data-testid":"sekyro-assets-retry",children:t("common.retry")})]}):startArea=jsxs9("div",{className:"sekyro-stack sekyro-stack--1",children:[jsx11(Button,{ref:startRef,full:!0,"data-testid":"sekyro-start","aria-disabled":inert?"true":void 0,"aria-busy":loading?"true":void 0,onClick:start,children:loading?jsxs9(Fragment2,{children:[jsx11(SpinnerIcon,{}),t("capture.preparing.title")]}):startLabel??t("capture.start")}),loading?jsx11("p",{className:"sekyro-text-muted",children:t("capture.preparing.hint")}):null]}),jsxs9("div",{ref:rootRef,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":assets,children:[tips!==!1?jsx11(TipList,{tips}):null,jsx11(PermissionRow,{state:permission}),canChooseFacing?jsx11(FacingPicker,{value:facing,onChange:onFacingChange}):null,jsx11(VoiceSwitch,{voice}),jsx11("p",{className:"sekyro-text-muted",children:t("capture.securityNote")}),startArea,jsx11("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:assets==="loading"?t("capture.preparing.title"):assets==="ready"?t("capture.ready"):""})]})}__name(PreCaptureScreen,"PreCaptureScreen");function focusIsOurs(root){if(typeof document>"u")return!1;let active=document.activeElement;return active===null||active===document.body||root!==null&&root.contains(active)}__name(focusIsOurs,"focusIsOurs");import{hasMultipleCameras,subscribeCameraPermission}from"@sekyro/web";import{useEffect as useEffect4,useState as useState2}from"react";function useCameraStatus(){let[permission,setPermission]=useState2({state:"unknown",settled:!1}),[canChooseFacing,setCanChooseFacing]=useState2(!1);return useEffect4(()=>subscribeCameraPermission(state=>setPermission({state,settled:!0})),[]),useEffect4(()=>{let live=!0;return hasMultipleCameras().then(multiple=>{live&&setCanChooseFacing(multiple)}),()=>{live=!1}},[]),{permission:permission.state,permissionSettled:permission.settled,canChooseFacing}}__name(useCameraStatus,"useCameraStatus");import{useCallback as useCallback2}from"react";function useFocusOnMount(){return useCallback2(element=>{element?.focus()},[])}__name(useFocusOnMount,"useFocusOnMount");import{getLivenessAssetsStatus,preloadLivenessAssets,subscribeLivenessAssets}from"@sekyro/web";import{useCallback as useCallback3,useEffect as useEffect5,useRef as useRef3,useState as useState3,useSyncExternalStore}from"react";var serverSnapshot=__name(()=>"idle","serverSnapshot");function preload(assetBaseUrl){return preloadLivenessAssets(assetBaseUrl!==void 0?{assetBaseUrl}:{})}__name(preload,"preload");function useLivenessAssets(assetBaseUrl,active=!0){let status=useSyncExternalStore(useCallback3(listener=>subscribeLivenessAssets(listener,assetBaseUrl),[assetBaseUrl]),()=>getLivenessAssetsStatus(assetBaseUrl),serverSnapshot),[skipped,setSkipped]=useState3(null),mountedRef=useRef3(!1),kick=useCallback3(()=>{preload(assetBaseUrl).then(settled=>{mountedRef.current&&settled==="idle"&&setSkipped({base:assetBaseUrl})})},[assetBaseUrl]);useEffect5(()=>(mountedRef.current=!0,kick(),()=>{mountedRef.current=!1}),[kick]);let loadedBaseRef=useRef3(null);useEffect5(()=>{if(status!=="idle"){loadedBaseRef.current={base:assetBaseUrl};return}!active||loadedBaseRef.current===null||loadedBaseRef.current.base!==assetBaseUrl||(loadedBaseRef.current=null,kick())},[status,assetBaseUrl,kick,active]);let retry=useCallback3(()=>{preload(assetBaseUrl)},[assetBaseUrl]);return{gate:skipped!==null&&skipped.base===assetBaseUrl&&status==="idle"||status==="ready"?"ready":status==="failed"?"failed":"loading",retry}}__name(useLivenessAssets,"useLivenessAssets");import{createLivenessCapture}from"@sekyro/web";import{useCallback as useCallback4,useEffect as useEffect6,useRef as useRef4,useState as useState4}from"react";var IDLE_GATE={progress:0,hint:null,faceDetected:!1};function useLivenessHandle(options){let{videoRef,assetBaseUrl}=options,verification=useRef4(options.verification).current,warnedRef=useRef4(!1);options.verification!==verification&&!warnedRef.current&&isDevBuild()&&(warnedRef.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let handleRef=useRef4(null),[state,setState]=useState4("idle"),[gate,setGate]=useState4(IDLE_GATE),[draining,setDraining]=useState4(!1),[gateLocked,setGateLocked]=useState4(!1),[frozenPreview,setFrozenPreview]=useState4(null),[reduceMotion,setReduceMotion]=useState4(!1),[artifacts,setArtifacts]=useState4(null),[error,setError]=useState4(null),[result,setResult]=useState4(null),lastProgressRef=useRef4(null),callbacksRef=useRef4(options);callbacksRef.current=options,useEffect6(()=>{let video=videoRef.current;if(video===null)return;let captureOptions={video,...assetBaseUrl!==void 0?{assetBaseUrl}:{}},handle=verification!==void 0?verification.liveness(captureOptions):createLivenessCapture(captureOptions);handleRef.current=handle;let unsubscribes=[handle.on("state",next=>{next==="starting"&&(setArtifacts(null),setError(null),setGate(IDLE_GATE),setGateLocked(!1),setDraining(!1),setFrozenPreview(null),lastProgressRef.current=null),setState(next),callbacksRef.current.onStateChange?.(next)}),handle.on("gate",update=>{let previous=lastProgressRef.current;lastProgressRef.current=update.progress,setDraining(previous!==null&&update.progress<previous-.001&&update.progress>0&&update.progress<1),update.progress>=1&&setGateLocked(!0),setGate(update)}),handle.on("frozen",({previewDataUrl})=>setFrozenPreview(previewDataUrl)),handle.on("profile",({animations})=>setReduceMotion(animations==="reduced")),handle.on("captured",captured=>{setArtifacts(captured),setResult(null),callbacksRef.current.onCaptured?.(captured)}),handle.on("error",err=>{setError(err),callbacksRef.current.onError?.(err)}),verification?.on("result",next=>{setResult(next),callbacksRef.current.onResult?.(next)})];return()=>{for(let unsubscribe of unsubscribes)unsubscribe?.();handleRef.current=null,handle.destroy()}},[verification,videoRef,assetBaseUrl]);let start=useCallback4(options2=>{handleRef.current?.start(options2)},[]),retry=useCallback4(()=>{handleRef.current?.retry()},[]),switchCamera=useCallback4(()=>{setGateLocked(!1),setDraining(!1),setFrozenPreview(null),lastProgressRef.current=null,handleRef.current?.switchCamera()},[]);return{state,gate,draining,gateLocked,frozenPreview,reduceMotion,artifacts,error,result,start,retry,switchCamera}}__name(useLivenessHandle,"useLivenessHandle");import{jsx as jsx12}from"react/jsx-runtime";function VoiceChip({voice}){let t=useStrings();return jsx12(Button,{kind:"chip","aria-pressed":voice.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>voice.toggle(),children:jsx12(SpeakerIcon,{off:!voice.enabled,className:"sekyro-icon"})})}__name(VoiceChip,"VoiceChip");var BUNDLED_CLIP_MANIFEST={set:"v1",clips:{ar:{},fr:{}}};var VOICE_KEYS=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera"];function isVoiceKey(key){return key!==null&&VOICE_KEYS.includes(key)}__name(isVoiceKey,"isVoiceKey");function clipName(key){return key.slice(key.lastIndexOf(".")+1)}__name(clipName,"clipName");var own=__name((o,k)=>Object.prototype.hasOwnProperty.call(o,k),"own");function createManifestResolver(manifest,baseUrl){let base=baseUrl.replace(/\/+$/,"");return(key,locale)=>{let table=manifest.clips[locale],name=clipName(key);return table!==void 0&&own(table,name)?`${base}/${locale}/${name}.mp3`:null}}__name(createManifestResolver,"createManifestResolver");function defaultClipBaseUrl(assetBaseUrl){return`${(assetBaseUrl??"/models-v3").replace(/\/+$/,"")}/audio/${BUNDLED_CLIP_MANIFEST.set}`}__name(defaultClipBaseUrl,"defaultClipBaseUrl");function bundledClipResolver(clipBaseUrl){return createManifestResolver(BUNDLED_CLIP_MANIFEST,clipBaseUrl)}__name(bundledClipResolver,"bundledClipResolver");function resolveClip(source,key,locale){let url;try{if(typeof source=="function")url=source(key,locale);else{let table=source[locale];url=table!=null&&own(table,key)?table[key]:null}}catch{return null}return typeof url=="string"&&url!==""?url:null}__name(resolveClip,"resolveClip");import{useCallback as useCallback5,useEffect as useEffect7,useLayoutEffect,useMemo,useRef as useRef5,useState as useState5}from"react";var SILENT_WAV_BASE64="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",SPEECH_LANG={ar:"ar-SA",fr:"fr-FR",en:"en-US"};function synth(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}__name(synth,"synth");function speechAvailable(){return synth()!==null&&typeof SpeechSynthesisUtterance=="function"}__name(speechAvailable,"speechAvailable");function baseLang(lang){return(lang.split(/[-_]/)[0]??lang).toLowerCase()}__name(baseLang,"baseLang");function pickVoice(voices,lang){let norm=__name(l=>l.replace(/_/g,"-").toLowerCase(),"norm"),base=baseLang(lang);return voices.find(v=>norm(v.lang)===norm(lang))??voices.find(v=>baseLang(v.lang)===base)}__name(pickVoice,"pickVoice");function speechUsable(lang){if(!speechAvailable())return!1;let voices=[];try{voices=synth()?.getVoices()??[]}catch{return!0}return voices.length===0||pickVoice(voices,lang)!==void 0}__name(speechUsable,"speechUsable");function subscribeVoices(onChange){let s=synth();return s===null||typeof s.addEventListener!="function"?()=>{}:(s.addEventListener("voiceschanged",onChange),()=>s.removeEventListener?.("voiceschanged",onChange))}__name(subscribeVoices,"subscribeVoices");function clipIdentity(url){try{let base=typeof location<"u"?location.href:"http://localhost/",u=new URL(url,base);return`clip:${u.origin}${u.pathname}`}catch{return`clip:${url}`}}__name(clipIdentity,"clipIdentity");function release(a){a.pause(),a.removeAttribute("src"),a.load()}__name(release,"release");function createVoicePlayer(){let audio=null,unlockUrl=null,generation=0,lastId=null,voices=[],warm=new Map,loadVoices=__name(()=>{voices=synth()?.getVoices()??[]},"loadVoices"),voicesBound=!1,bindVoices=__name(()=>{let s=synth();voicesBound||s===null||(voicesBound=!0,loadVoices(),s.addEventListener?.("voiceschanged",loadVoices))},"bindVoices"),element=__name(()=>(audio??(audio=new Audio),audio),"element"),speak=__name((text,lang)=>{let s=synth();if(s===null||text===""||typeof SpeechSynthesisUtterance!="function")return;bindVoices();let voice=pickVoice(voices,lang);if(voices.length>0&&voice===void 0)return;s.cancel();let u=new SpeechSynthesisUtterance(text);u.lang=lang,voice!==void 0&&(u.voice=voice),u.rate=.95,s.speak(u)},"speak"),stop=__name(()=>{generation+=1,lastId=null,audio!==null&&(audio.pause(),audio.currentTime=0),synth()?.cancel()},"stop");return{say(utterance){let id=utterance.url!==null?clipIdentity(utterance.url):`tts:${utterance.lang}:${utterance.text}`;if(id===lastId)return;lastId=id,generation+=1;let current=generation;if(synth()?.cancel(),utterance.url!==null){let a=element();a.pause(),a.muted=!1,a.src=utterance.url,a.currentTime=0,a.play()?.catch(err=>{current===generation&&err?.name!=="AbortError"&&utterance.speech&&speak(utterance.text,utterance.lang)});return}utterance.speech&&speak(utterance.text,utterance.lang)},unlock({lang,speech,prefetch}){let a=element();if(unlockUrl===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let bytes=Uint8Array.from(atob(SILENT_WAV_BASE64),c=>c.charCodeAt(0));unlockUrl=URL.createObjectURL(new Blob([bytes],{type:"audio/wav"}))}let playingClip=a.paused===!1&&unlockUrl!==null&&a.src!==unlockUrl;unlockUrl!==null&&!playingClip&&(a.muted=!0,a.src=unlockUrl,a.play()?.catch(()=>{}));let s=synth();if(speech&&s!==null&&typeof SpeechSynthesisUtterance=="function"){bindVoices();let u=new SpeechSynthesisUtterance(" ");u.volume=0,u.lang=lang,s.speak(u)}for(let url of prefetch??[]){let id=clipIdentity(url);if(warm.has(id))continue;let w=new Audio;w.preload="auto",w.src=url,warm.set(id,w)}},stop,dispose(){stop(),voicesBound&&synth()?.removeEventListener?.("voiceschanged",loadVoices),voicesBound=!1,unlockUrl!==null&&URL.revokeObjectURL(unlockUrl),unlockUrl=null,audio!==null&&release(audio),audio=null;for(let w of warm.values())release(w);warm.clear()}}}__name(createVoicePlayer,"createVoicePlayer");var DEFAULT_VOICE_STORAGE_KEY="sekyro.voiceGuidance";function readVoicePreference(key){try{if(typeof window>"u")return null;let value=window.localStorage.getItem(key);return value==="1"?!0:value==="0"?!1:null}catch{return null}}__name(readVoicePreference,"readVoicePreference");function writeVoicePreference(key,enabled){try{if(typeof window>"u")return;window.localStorage.setItem(key,enabled?"1":"0")}catch{}}__name(writeVoicePreference,"writeVoicePreference");var useIsomorphicLayoutEffect=typeof window<"u"?useLayoutEffect:useEffect7;function resolvedClipUrls(source,locale){let seen=new Set,urls=[];for(let key of VOICE_KEYS){let url=resolveClip(source,key,locale);url===null||seen.has(clipIdentity(url))||(seen.add(clipIdentity(url)),urls.push(url))}return urls}__name(resolvedClipUrls,"resolvedClipUrls");function useVoiceGuidance({locale,assetBaseUrl,options}){let off=options===!1,opts=off?{}:options??{},storageKey=opts.storageKey===void 0?DEFAULT_VOICE_STORAGE_KEY:opts.storageKey,[enabled,setEnabledState]=useState5(opts.defaultEnabled??!0),enabledRef=useRef5(enabled),[supported,setSupported]=useState5(!1),[voicesVersion,setVoicesVersion]=useState5(0),playerRef=useRef5(null),player=useCallback5(()=>(playerRef.current??(playerRef.current=createVoicePlayer()),playerRef.current),[]),lang=SPEECH_LANG[locale],fallback=opts.speechFallback,speechAllowed=fallback===void 0||fallback===!0?!0:fallback===!1?!1:fallback.includes(locale),clipBase=opts.clipBaseUrl??defaultClipBaseUrl(assetBaseUrl),custom=opts.clips,source=useMemo(()=>custom??bundledClipResolver(clipBase),[custom,clipBase]),sourceRef=useRef5(source);useIsomorphicLayoutEffect(()=>{sourceRef.current=source,enabledRef.current=enabled}),useEffect7(()=>{if(off||storageKey===null)return;let stored=readVoicePreference(storageKey);stored!==null&&(enabledRef.current=stored,setEnabledState(stored))},[off,storageKey]),useEffect7(()=>{if(!(off||!speechAllowed))return subscribeVoices(()=>setVoicesVersion(v=>v+1))},[off,speechAllowed]),useEffect7(()=>{off||setSupported(resolvedClipUrls(source,locale).length>0||speechAllowed&&speechUsable(lang))},[off,source,locale,speechAllowed,lang,voicesVersion]),useEffect7(()=>()=>{playerRef.current?.dispose(),playerRef.current=null},[]);let unlockAudio=useCallback5(prefetch=>{off||player().unlock({lang,speech:speechAllowed,...prefetch?{prefetch:resolvedClipUrls(sourceRef.current,locale)}:{}})},[off,player,lang,speechAllowed,locale]),unlock=useCallback5(()=>unlockAudio(enabledRef.current),[unlockAudio]),stop=useCallback5(()=>playerRef.current?.stop(),[]),setEnabled=useCallback5(next=>{off||(next?unlockAudio(!0):stop(),storageKey!==null&&writeVoicePreference(storageKey,next),enabledRef.current=next,setEnabledState(next))},[off,unlockAudio,stop,storageKey]),toggle=useCallback5(()=>setEnabled(!enabledRef.current),[setEnabled]),speakKey=useCallback5((key,text)=>{if(off||!enabled)return;let url=resolveClip(sourceRef.current,key,locale);player().say({url,text,lang,speech:speechAllowed})},[off,enabled,locale,player,lang,speechAllowed]);return useMemo(()=>({supported:!off&&supported,enabled:!off&&enabled,setEnabled,toggle,unlock,speakKey,stop}),[off,supported,enabled,setEnabled,toggle,unlock,speakKey,stop])}__name(useVoiceGuidance,"useVoiceGuidance");function useSpeakGuidance(voice,key,text,active){let{speakKey,stop,enabled}=voice;useEffect7(()=>{if(!active||!enabled){stop();return}isVoiceKey(key)&&text!==""&&speakKey(key,text)},[active,enabled,key,text,speakKey,stop])}__name(useSpeakGuidance,"useSpeakGuidance");import{Fragment as Fragment3,jsx as jsx13,jsxs as jsxs10}from"react/jsx-runtime";var NO_FACE_DEBOUNCE_MS=800;function carriesActivation(event){if(event.type==="keydown"&&event.key==="Escape")return!1;let activation=globalThis.navigator?.userActivation;return activation===void 0?!(event.type==="pointerup"&&event.pointerType==="touch"):activation.isActive}__name(carriesActivation,"carriesActivation");function isNoticeObject(value){return typeof value=="object"&&value!==null&&!isValidElement(value)&&"tone"in value&&"text"in value}__name(isNoticeObject,"isNoticeObject");function isCapturing(state){return state==="starting"||state==="gating"||state==="recording"}__name(isCapturing,"isCapturing");function isPostCapture(state){return state==="captured"||state==="uploading"||state==="checking"}__name(isPostCapture,"isPostCapture");function LivenessCapture({verification,locale,dir,strings,slots,autoStart=!1,notice,startDisabled=!1,startLabel,tips,defaultFacing,voice:voiceOption,onGuidance,onCaptured,onResult,onError,onStateChange,assetBaseUrl,className}){let dictionary=useMemo2(()=>resolveStrings(locale,strings),[locale,strings]),t=useMemo2(()=>key=>dictionary[key]??"",[dictionary]),direction=dir??(locale==="ar"?"rtl":"ltr"),videoRef=useRef6(null),capture=useLivenessHandle({verification,videoRef,assetBaseUrl,onCaptured,onResult,onError,onStateChange}),assets=useLivenessAssets(assetBaseUrl,capture.state==="idle"&&capture.error===null),camera=useCameraStatus(),voice=useVoiceGuidance({locale,assetBaseUrl,options:voiceOption}),[facing,setFacing]=useState6(defaultFacing??"user"),rootRef=useRef6(null),unlockedRef=useRef6(!1),unlockRef=useRef6(voice.unlock);unlockRef.current=voice.unlock,useEffect8(()=>{let root=rootRef.current;if(root===null)return;let events=["pointerup","touchend","click","keydown"],disarm=__name(()=>{for(let type of events)root.removeEventListener(type,onGesture,!0)},"disarm");function onGesture(event){if(unlockedRef.current){disarm();return}carriesActivation(event)&&(unlockedRef.current=!0,disarm(),unlockRef.current())}__name(onGesture,"onGesture");for(let type of events)root.addEventListener(type,onGesture,{capture:!0,passive:!0});return disarm},[]);let begin=useCallback6(()=>{unlockedRef.current||(unlockedRef.current=!0,voice.unlock()),capture.start({facing})},[voice.unlock,capture.start,facing]),autoBegin=useCallback6(()=>capture.start({facing}),[capture.start,facing]),autoStartedRef=useRef6(!1),preCaptureIdle=capture.state==="idle"&&capture.error===null,autoArmed=autoStart===!0||autoStart==="when-permitted"&&camera.permission==="granted",permissionPending=autoStart==="when-permitted"&&!camera.permissionSettled&&!autoStartedRef.current,autoPending=autoArmed&&preCaptureIdle&&!autoStartedRef.current,screenGate=(permissionPending||autoPending)&&assets.gate==="ready"?"loading":assets.gate;useEffect8(()=>{!autoArmed||!preCaptureIdle||assets.gate!=="ready"||autoStartedRef.current||(autoStartedRef.current=!0,autoBegin())},[autoArmed,preCaptureIdle,assets.gate,autoBegin]);let showIntro=preCaptureIdle&&!(autoPending&&assets.gate==="ready"),switchCamera=useCallback6(()=>{setFacing(f=>f==="user"?"environment":"user"),capture.switchCamera()},[capture.switchCamera]),objectUrl=useMemo2(()=>capture.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(capture.artifacts.keyframe):null,[capture.artifacts]);useEffect8(()=>{if(objectUrl!==null)return()=>URL.revokeObjectURL(objectUrl)},[objectUrl]);let stillUrl=capture.frozenPreview??objectUrl,verificationMode=verification!==void 0,capturing=isCapturing(capture.state),postCapture=isPostCapture(capture.state),stageVisible=capturing||postCapture,result=capture.result,done=capture.state==="done"&&result!==null,frozen=capture.state==="recording"&&capture.frozenPreview!==null,phase=postCapture?"checking":frozen?"frozen":capture.state==="recording"?"recording":capture.gateLocked||capture.gate.progress>=1?"locked":capture.gate.faceDetected?"aligning":"seeking",guidanceHint=capturing?capture.gate.hint:null,rawKey=capture.state==="starting"?"capture.preparing.title":guidanceHint===null?null:guidanceHint==="center"&&!capture.gate.faceDetected?"fcv3.no_face":hintStringKey(guidanceHint),[displayKey,setDisplayKey]=useState6(null);useEffect8(()=>{if(rawKey!=="fcv3.no_face"){setDisplayKey(rawKey);return}if(!capturing)return;let timer=setTimeout(()=>setDisplayKey(rawKey),NO_FACE_DEBOUNCE_MS);return()=>clearTimeout(timer)},[rawKey,capturing]);let guidanceKey=capturing?displayKey:null,guidanceText=guidanceKey===null?"":t(guidanceKey);useSpeakGuidance(voice,guidanceKey,guidanceText,capturing);let onGuidanceRef=useRef6(onGuidance);onGuidanceRef.current=onGuidance,useEffect8(()=>{if(isVoiceKey(guidanceKey))try{onGuidanceRef.current?.(guidanceKey)}catch(err){console.error("[@sekyro/react] onGuidance threw:",err)}},[guidanceKey]);let voiceControl=useMemo2(()=>({supported:voice.supported,enabled:voice.enabled,setEnabled:voice.setEnabled,toggle:voice.toggle}),[voice.supported,voice.enabled,voice.setEnabled,voice.toggle]),voicePromptSlot=slots?.voicePrompt,hasVoicePromptSlot=voicePromptSlot!==void 0,voiceUnset=voiceOption===void 0,warnedVoicePromptRef=useRef6(!1);useEffect8(()=>{!hasVoicePromptSlot||!voiceUnset||warnedVoicePromptRef.current||!isDevBuild()||(warnedVoicePromptRef.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[hasVoicePromptSlot,voiceUnset]);let voicePrompt=voicePromptSlot!==void 0?(hint,text,key)=>voicePromptSlot(hint,text,key,voiceControl):voice.supported?()=>jsx13(VoiceChip,{voice:voiceControl}):void 0,introContext=useMemo2(()=>({assets:screenGate,retryAssets:assets.retry,permission:camera.permission,facing,setFacing,canChooseFacing:camera.canChooseFacing,voice:voiceControl}),[screenGate,assets.retry,camera.permission,camera.canChooseFacing,facing,voiceControl]),noticeNode=isNoticeObject(notice)?jsx13(Notice,{tone:notice.tone,testId:"sekyro-host-notice",children:jsx13("span",{children:notice.text})}):notice??null,retryVerdict=result!==null&&result.status==="retry"?result:null,unavailable=done&&result.status==="unavailable"?result:null,terminal=done&&(result.status==="approved"||result.status==="rejected"||result.status==="review")?result:null,reasonText=__name(reason=>{if(reason===void 0)return null;let key=reasonStringKey(reason);return key===null?null:t(key)},"reasonText"),unavailableRetryable=unavailable!==null&&unavailable.reason!==void 0&&unavailable.reason!=="nni_unbound"&&!(unavailable.reason==="no_recorder"&&capture.artifacts?.degraded==="NO_RECORDER"),focusRetry=useFocusOnMount();return jsx13(StringsProvider,{value:t,children:jsxs10("div",{ref:rootRef,className:className===void 0?"sekyro-capture":`sekyro-capture ${className}`,dir:direction,lang:locale,"data-testid":"sekyro-liveness-capture","data-state":capture.state,children:[slots?.header,retryVerdict!==null&&reasonText(retryVerdict.reason)!==null?jsx13(Notice,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:jsx13("span",{children:reasonText(retryVerdict.reason)})}):null,capture.error!==null?slots?.errorPanel!==void 0?slots.errorPanel(capture.error,capture.retry):jsxs10(Notice,{tone:"danger",testId:"sekyro-error-notice",children:[jsx13("span",{children:t(captureErrorStringKey(capture.error.kind))}),capture.error.retryable?jsx13(Button,{ref:focusRetry,kind:"ghost",className:"sekyro-btn--start",onClick:capture.retry,children:t("common.retry")}):null]}):null,unavailable!==null?jsxs10(Notice,{tone:"danger",testId:"sekyro-unavailable-notice",children:[jsx13("span",{children:reasonText(unavailable.reason)??t(unavailable.reason===void 0?"errors.session_expired":"errors.network_error")}),unavailableRetryable?jsx13(Button,{ref:focusRetry,kind:"ghost",className:"sekyro-btn--start",onClick:capture.retry,children:t("capture.recordAgain")}):null]}):null,terminal!==null&&reasonText(terminal.reason)!==null?jsx13(Notice,{tone:terminal.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:jsx13("span",{children:reasonText(terminal.reason)})}):null,jsx13("div",{className:stageVisible?void 0:"sekyro-hidden","data-capture-live":stageVisible?"":void 0,children:jsx13(CaptureStage,{videoRef,guidanceText,guidanceHint,guidanceKey,progress:capture.gate.progress,phase,draining:capture.draining,stillUrl,showChecking:verificationMode,onSwitchCamera:switchCamera,canSwitchCamera:capturing&&capture.state!=="recording",voicePrompt,overlay:slots?.stageOverlay,reduceMotion:capture.reduceMotion})}),showIntro?jsxs10(Fragment3,{children:[noticeNode,slots?.intro!==void 0?slots.intro(begin,introContext):jsx13(PreCaptureScreen,{assets:screenGate,onRetryAssets:assets.retry,permission:camera.permission,canChooseFacing:camera.canChooseFacing,facing,onFacingChange:setFacing,voice:voiceControl,tips:tips??DEFAULT_TIPS,...startLabel!==void 0?{startLabel}:{},startDisabled,onStart:begin})]}):null,jsx13(CapturedPanel,{showCoaching:retryVerdict!==null,attemptsText:retryVerdict?.attemptsRemaining!==void 0?attemptsRemainingText(dictionary,locale,retryVerdict.attemptsRemaining):null,showRetake:retryVerdict!==null&&!capturing&&!postCapture||!verificationMode&&capture.state==="captured",onRetake:capture.retry}),slots?.footer]})})}__name(LivenessCapture,"LivenessCapture");import{jsx as jsx14}from"react/jsx-runtime";var DEFAULT_THEME={colors:{brand:"#1e40af",brandFg:"#ffffff",fg:"#111827",fgMuted:"#4b5563",bg:"#f8fafc",surface:"#ffffff",ring:"#1e40af",danger:"#b91c1c",success:"#15803d",warning:"#a16207"},radius:"12px",fontFamily:'system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif'},COLOR_VAR={brand:"--sekyro-color-brand",brandFg:"--sekyro-color-brand-fg",fg:"--sekyro-color-fg",fgMuted:"--sekyro-color-fg-muted",bg:"--sekyro-color-bg",surface:"--sekyro-color-surface",ring:"--sekyro-color-ring",danger:"--sekyro-color-danger",success:"--sekyro-color-success",warning:"--sekyro-color-warning"};function themeToCssVars(theme={}){let vars={};for(let key of Object.keys(COLOR_VAR))vars[COLOR_VAR[key]]=theme.colors?.[key]??DEFAULT_THEME.colors[key];return vars["--sekyro-radius"]=theme.radius??DEFAULT_THEME.radius,vars["--sekyro-font"]=theme.fontFamily??DEFAULT_THEME.fontFamily,vars}__name(themeToCssVars,"themeToCssVars");function SekyroThemeProvider({theme,children,className}){let style=themeToCssVars(theme);return jsx14("div",{className:className===void 0?"sekyro-root":`sekyro-root ${className}`,style,children})}__name(SekyroThemeProvider,"SekyroThemeProvider");export{DEFAULT_THEME,DEFAULT_TIPS,LivenessCapture,NO_FACE_DEBOUNCE_MS,SekyroThemeProvider,VOICE_KEYS,ar,attemptsRemainingText,captureErrorStringKey,createManifestResolver,en,fr,hintStringKey,reasonStringKey,resolveStrings,themeToCssVars};
|
|
880
3
|
//# sourceMappingURL=index.js.map
|