@sekyro/react 0.1.0-rc.4 → 0.1.0-rc.5

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 CHANGED
@@ -1,5 +1,37 @@
1
1
  # @sekyro/react
2
2
 
3
+ ## 0.1.0-rc.5
4
+
5
+ ### Minor Changes
6
+
7
+ - 06ea302: Org and app branding from the Sekyro AI dashboard.
8
+
9
+ - `@sekyro/web`: `HostedSessionView.branding` (`HostedBranding`: `logoUrl`, `colors`, `radius`, `fontFamily`, all optional) carries only the branding set in the dashboard, merged per field (app over org). Fields nobody set are absent (keep your defaults for them), and `branding` itself is absent when nothing is set or on older APIs.
10
+ - `@sekyro/react`: `brandingToTheme(view.branding)` maps it onto a `SekyroTheme`, and `mergeThemes(...)` combines themes left to right. Pass your own theme last so it still wins: `mergeThemes(brandingToTheme(view.branding), myTheme)`. Integrations that ignore it keep the default theme.
11
+
12
+ ### Patch Changes
13
+
14
+ - 4e7a4a3: Brand: the product is now **Sekyro AI** — package descriptions, READMEs, LICENSE text and the `@sekyro/node` configuration error messages say "Sekyro AI". No API change: package names, the `Sekyro` class, exports and header names are unchanged.
15
+ - 1b6bef2: Profile v2 policy reasons, round 2. New eligibility reason `age_unverifiable` (the app sets a minimum age but the birth date could not be read — `doc_ocr`: retryable with a clearer photo; `population_registry`: final). `failureReason` is widened to every policy reason a session can end on: the session-level reasons plus `nationality_not_allowed`, `underage`, `document_type_not_accepted`, `document_nni_mismatch` and `age_unverifiable`. `@sekyro/web`: `PolicyFailureReason` widened, `age_unverifiable` in `DocReason` / `PopulationReason` / `RETRYABLE_REASONS`. `@sekyro/react`: ar/fr/en copy for `age_unverifiable`. `@sekyro/node`: `EligibilityReason` gains `age_unverifiable`; new `PolicyFailureReason` type used by `Session.failureReason` and the `session.failed` webhook data.
16
+ - 1b6bef2: Profile v2 policy reasons. `@sekyro/web`: the eligibility check reasons `document_type_not_accepted` (retryable), `nationality_not_allowed` and `underage`; `SessionFailureReason` (`location_not_allowed`, `anonymizer_blocked`); `HostedSessionView.failureReason` and `acceptedDocumentTypes`. `@sekyro/react`: ar/fr/en copy for the five reasons. `@sekyro/node`: `SessionFailureReason`, `EligibilityReason`, and `failureReason` on `Session` and the `session.failed` webhook data.
17
+ - 13d512f: Profile v2 step 3: identity-method choice, document-NNI registry submit, matching reasons, `subject` input. `@sekyro/web`: `IdentityMethod`, `MethodChoiceView` and `HostedSessionView.methodChoice`; `HostedStepView.attemptsExhausted` / `nniFromDocument` (and `SessionStepView.attemptsExhausted`); `HostedClient.selectMethod()` (`POST /hosted/method`); error codes `method_required` / `method_locked` / `document_nni_mismatch` (409 when a typed NNI differs from the document's); matching reasons `name_mismatch`, `birth_date_mismatch`, `nationality_mismatch` (doc_ocr + population_registry) and `document_number_mismatch` (doc_ocr) as `MatchReason`. The headless runner stops on a pending choice (`unavailable` / `method_required`, `on('method')`), adds `verification.methodChoice()` / `selectMethod()`, and submits the registry with an empty input when the document gave the NNI. `@sekyro/react`: ar/fr/en copy for the four reasons and the method screen; `<LivenessCapture>` handles the method step while the session waits on the choice: it offers only the methods it can run (the national number — it has no document capture) and selects it without a screen when it is the only one left. `@sekyro/node`: `CreateSessionInput.subject` (`SessionSubjectInput`), `CreateSessionInput.identityMethod` and `sessions.selectMethod(id, method)` (`POST /sessions/:id/method`, `IdentityMethod`) so partners can choose the identity method of an optional-document session, `subjectId` / `externalRef` / `subjectConflict` on `Session` and session webhooks, `SessionStep.attemptsExhausted`, `MatchReason`, and the `subject.updated` webhook data (`{ subjectId, sessionId, status, outcome }`).
18
+ - acbf409: Profile v2 step 4: decision mode, desktop handoff, device stops, per-session profile overrides. `@sekyro/web`: decision-mode reasons `liveness_inconclusive`, `mobile_required`, `match_inconclusive`, `document_authenticity` (`DecisionReason`; the inconclusive three are retryable) and the registered `uncalibrated_capture_channel`; session failure reasons `capture_tampered`, `device_velocity_exceeded`, `device_cooldown`; `HostedStepView.requiresMobile` and `HostedSessionView.retryAfter`; the error code `inference_unavailable` (503, request-level, with `retryAfterSeconds` from `Retry-After` or the body). The headless runner retries `inference_unavailable` up to 3 times after `retryAfterSeconds` (default 10 s) under a fresh idempotency key and a fresh attestation, emitting `on('busy')` for each retry, then surfaces `unavailable / inference_unavailable`; it never captures a `requiresMobile` liveness step on desktop (`unavailable / mobile_required`, nothing uploaded) and adds `verification.mobileRequired()`; a `device_cooldown` result carries `retryAfter`. `@sekyro/react`: ar/fr/en coaching for the inconclusive reasons, "Continue on your phone" instead of the camera when liveness needs a phone, a "busy, trying again" notice, the device stop copy (the cooldown says when to try again — `retryAfterTime()`), no retry button for stops or `mobile_required`; bundle budget 23 → 24 KiB. `@sekyro/node`: `CreateSessionInput.profile` (`EkycProfileOverride`, a deep-partial of `EkycProfileSettings`; unknown keys are rejected server-side, widening answers `403 override_widens_profile` unless the app allows it), `Session.overriddenFields` / `riskSignals` / `retryAfter` (`overriddenFields` and `riskSignals` also on the session lifecycle webhooks), `DecisionReason`, the three device stops in `SessionFailureReason`, and the `subject.suspicious_activity` webhook data (`{ subjectId, sessionId, count }`).
19
+ - c3699fd: Add the `document_nni_mismatch` reason copy (en/fr/ar): the document belongs to a different person than the one the verification was created for.
20
+ - 58e220c: Published bundles are now minified and no longer include source maps. The public API and types are unchanged.
21
+ - Updated dependencies [4e7a4a3]
22
+ - Updated dependencies [fa95c41]
23
+ - Updated dependencies [d321707]
24
+ - Updated dependencies [c3699fd]
25
+ - Updated dependencies [c3699fd]
26
+ - Updated dependencies [1b6bef2]
27
+ - Updated dependencies [1b6bef2]
28
+ - Updated dependencies [13d512f]
29
+ - Updated dependencies [acbf409]
30
+ - Updated dependencies [b230694]
31
+ - Updated dependencies [06ea302]
32
+ - Updated dependencies [58e220c]
33
+ - @sekyro/web@0.1.0-rc.7
34
+
3
35
  ## 0.1.0-rc.4
4
36
 
5
37
  ### Minor Changes
package/LICENSE CHANGED
@@ -1,10 +1,10 @@
1
- Sekyro SDK — Proprietary License
1
+ Sekyro AI SDK — Proprietary License
2
2
 
3
3
  Copyright (c) 2026 Ibtikar Technologies. All rights reserved.
4
4
 
5
5
  This software (the "SDK") is proprietary to Ibtikar Technologies. Use is
6
- permitted only under a Sekyro customer agreement with Ibtikar Technologies, and
7
- only to integrate the customer's own applications with the Sekyro
6
+ permitted only under a Sekyro AI customer agreement with Ibtikar Technologies, and
7
+ only to integrate the customer's own applications with the Sekyro AI
8
8
  identity-verification service. For that purpose you may install the SDK
9
9
  from the public npm registry and run it unmodified.
10
10
 
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @sekyro/react
2
2
 
3
- React component for [Sekyro](https://sekyro.ai) liveness capture: the hosted page's
3
+ React component for [Sekyro AI](https://sekyro.ai) liveness capture: the hosted page's
4
4
  capture UI (`<LivenessCapture />`), extracted onto the public `@sekyro/web` API with
5
5
  no private design-system or framework dependency. Themeable through CSS variables,
6
6
  ar / fr / en built in, RTL-safe (logical CSS only), WCAG AAA defaults.
7
7
 
8
8
  > Status: `0.1.0-rc.0`, still `private` — the public npm release is wired in a later
9
- > task (Changesets + Trusted Publishing). Sekyro's own hosted page dogfoods it via a
9
+ > task (Changesets + Trusted Publishing). Sekyro AI's own hosted page dogfoods it via a
10
10
  > `file:` link.
11
11
 
12
12
  ## Install
@@ -111,11 +111,11 @@ switch toggle it; the viewer's choice persists in `localStorage`.
111
111
  | `VoiceOptions` | Default | Notes |
112
112
  |---|---|---|
113
113
  | `defaultEnabled?` | `true` | Used when the viewer has no stored preference. |
114
- | `clips?` | verification mode: Sekyro clips from the session (add `https://assets.sekyro.ai` to `media-src`); capture-only: none | `VoiceClipSource`: a resolver `(key, locale) => url \| null` **or** a map `{ [locale]: { [voiceKey]: url } }` (e.g. delivered by your backend — pass a new object to change it). Yours always wins over the Sekyro clips. A missing URL or a throwing resolver = no clip → device voice. |
114
+ | `clips?` | verification mode: Sekyro AI clips from the session (add `https://assets.sekyro.ai` to `media-src`); capture-only: none | `VoiceClipSource`: a resolver `(key, locale) => url \| null` **or** a map `{ [locale]: { [voiceKey]: url } }` (e.g. delivered by your backend — pass a new object to change it). Yours always wins over the Sekyro AI clips. A missing URL or a throwing resolver = no clip → device voice. |
115
115
  | `speechFallback?` | `true` | `false`, or the locales where the device voice may speak. A device with no voice for the language stays silent rather than read Arabic in a French voice. |
116
116
  | `storageKey?` | `"sekyro.voiceGuidance"` | `null` = do not persist. |
117
117
 
118
- **Sekyro clips.** In verification mode the component speaks the recorded
118
+ **Sekyro AI clips.** In verification mode the component speaks the recorded
119
119
  ar/fr clip set that arrives with the session (`verification.voiceClips()`),
120
120
  served from `https://assets.sekyro.ai` — a page with a Content-Security-Policy
121
121
  must allow that origin in `media-src`. Until the set arrives, when the session
package/dist/index.cjs CHANGED
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};__export(src_exports,{DEFAULT_THEME:()=>DEFAULT_THEME,DEFAULT_TIPS:()=>DEFAULT_TIPS,LivenessCapture:()=>LivenessCapture,NO_FACE_DEBOUNCE_MS:()=>NO_FACE_DEBOUNCE_MS,SekyroThemeProvider:()=>SekyroThemeProvider,VOICE_KEYS:()=>VOICE_KEYS,ar:()=>ar,attemptsRemainingText:()=>attemptsRemainingText,captureErrorStringKey:()=>captureErrorStringKey,en:()=>en,fr:()=>fr,hintStringKey:()=>hintStringKey,reasonStringKey:()=>reasonStringKey,resolveStrings:()=>resolveStrings,themeToCssVars:()=>themeToCssVars});module.exports=__toCommonJS(src_exports);var import_react14=require("react");var import_react=require("react");var import_jsx_runtime=require("react/jsx-runtime"),Button=(0,import_react.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),(0,import_jsx_runtime.jsx)("button",{ref,type:type??"button",className:classes.join(" "),...rest})},"Button"));var import_jsx_runtime2=require("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(0,import_jsx_runtime2.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:[(0,import_jsx_runtime2.jsx)("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"}),(0,import_jsx_runtime2.jsxs)("g",{className:phase==="locked"?"sekyro-capture-settle":void 0,children:[(0,import_jsx_runtime2.jsx)("g",{className:stillShown?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:TICKS.map((tick,i)=>(0,import_jsx_runtime2.jsx)("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))}),(0,import_jsx_runtime2.jsx)("g",{className:phase==="seeking"?"sekyro-capture-breathe":void 0,children:(0,import_jsx_runtime2.jsx)("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");var import_react2=require("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 move out of direct light","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.tips.summary":"Stand in a well-lit area. Uncover your face \u2014 no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","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 \u062A\u062C\u0646\u0651\u0628 \u0627\u0644\u0636\u0648\u0621 \u0627\u0644\u0645\u0628\u0627\u0634\u0631 \u0639\u0644\u0649 \u0648\u062C\u0647\u0643","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.tips.summary":"\u0627\u062E\u062A\u0631 \u0645\u0643\u0627\u0646\u064B\u0627 \u062C\u064A\u062F \u0627\u0644\u0625\u0636\u0627\u0621\u0629. \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. \u0628\u0639\u062F \u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627\u060C \u0623\u0645\u0633\u0643 \u0647\u0627\u062A\u0641\u0643 \u0628\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0639\u064A\u0646\u064A\u0646\u060C \u0648\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.tips.listen":"\u0627\u0633\u062A\u0645\u0639 \u0625\u0644\u0649 \u0627\u0644\u062A\u0639\u0644\u064A\u0645\u0627\u062A","capture.tips.stop":"\u0625\u064A\u0642\u0627\u0641","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 \xE9vitez la lumi\xE8re directe sur le visage","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.tips.summary":"Placez-vous dans une zone bien \xE9clair\xE9e. D\xE9gagez votre visage \u2014 ni lunettes, ni masque. Une fois la cam\xE9ra d\xE9marr\xE9e, tenez votre t\xE9l\xE9phone \xE0 hauteur des yeux, regardez droit vers la cam\xE9ra et restez immobile.","capture.tips.listen":"\xC9couter les instructions","capture.tips.stop":"Arr\xEAter","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=(0,import_react2.createContext)(key=>en[key]??""),StringsProvider=StringsContext.Provider;function useStrings(){return(0,import_react2.useContext)(StringsContext)}__name(useStrings,"useStrings");var import_jsx_runtime3=require("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(0,import_jsx_runtime3.jsxs)("div",{className:reduceMotion?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[(0,import_jsx_runtime3.jsx)("video",{ref:videoRef,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),stillUrl!==null&&settled?(0,import_jsx_runtime3.jsx)("img",{src:stillUrl,alt:t("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,(0,import_jsx_runtime3.jsx)(CaptureArc,{progress,phase,draining}),overlay?.(videoRef),voice!=null&&!settled?(0,import_jsx_runtime3.jsx)("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:voice}):null,canSwitchCamera?(0,import_jsx_runtime3.jsx)(Button,{kind:"chip",onClick:onSwitchCamera,"aria-label":t("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:(0,import_jsx_runtime3.jsx)(FlipCameraIcon,{})}):null,checking&&showChecking?(0,import_jsx_runtime3.jsxs)("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[(0,import_jsx_runtime3.jsx)(CameraOffIcon,{}),t("capture.cameraOff")]}):null,(0,import_jsx_runtime3.jsxs)("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[(0,import_jsx_runtime3.jsx)("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:displayText},displayText),settled&&showChecking?(0,import_jsx_runtime3.jsx)("span",{className:"sekyro-stage__guidance-hint",children:t("capture.checkingHint")}):null]})]})}__name(CaptureStage,"CaptureStage");function FlipCameraIcon(){return(0,import_jsx_runtime3.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[(0,import_jsx_runtime3.jsx)("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"}),(0,import_jsx_runtime3.jsx)("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),(0,import_jsx_runtime3.jsx)("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(0,import_jsx_runtime3.jsxs)("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:[(0,import_jsx_runtime3.jsx)("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"}),(0,import_jsx_runtime3.jsx)("path",{d:"M3 3l18 18"})]})}__name(CameraOffIcon,"CameraOffIcon");var import_react3=require("react");var import_jsx_runtime4=require("react/jsx-runtime");function CapturedPanel({showCoaching,attemptsText,showRetake,onRetake}){let t=useStrings(),retakeRef=(0,import_react3.useRef)(null);return(0,import_react3.useEffect)(()=>{showRetake&&retakeRef.current?.focus()},[showRetake]),!showCoaching&&!showRetake?null:(0,import_jsx_runtime4.jsxs)("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[showCoaching?(0,import_jsx_runtime4.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,import_jsx_runtime4.jsx)("p",{className:"sekyro-text-body",children:t("capture.retryCoaching.title")}),(0,import_jsx_runtime4.jsxs)("ul",{className:"sekyro-coaching",children:[(0,import_jsx_runtime4.jsx)("li",{children:t("capture.retryCoaching.light")}),(0,import_jsx_runtime4.jsx)("li",{children:t("capture.retryCoaching.eyeLevel")}),(0,import_jsx_runtime4.jsx)("li",{children:t("capture.retryCoaching.head")})]}),attemptsText!==null?(0,import_jsx_runtime4.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:attemptsText}):null]}):null,showRetake?(0,import_jsx_runtime4.jsx)(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");var import_react7=require("react");var import_jsx_runtime5=require("react/jsx-runtime");function Notice({tone,role,children,testId}){return(0,import_jsx_runtime5.jsx)("div",{role:role??(tone==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${tone}`,"data-testid":testId,children})}__name(Notice,"Notice");var import_react4=require("react");var import_jsx_runtime6=require("react/jsx-runtime"),OPTIONS=["user","environment"];function FacingPicker({value,onChange}){let t=useStrings(),name=(0,import_react4.useId)();return(0,import_jsx_runtime6.jsxs)("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[(0,import_jsx_runtime6.jsx)("legend",{className:"sekyro-segmented__legend",children:t("capture.cameraLabel")}),(0,import_jsx_runtime6.jsx)("div",{className:"sekyro-segmented__options",children:OPTIONS.map(option=>(0,import_jsx_runtime6.jsxs)("label",{className:"sekyro-segmented__option",children:[(0,import_jsx_runtime6.jsx)("input",{type:"radio",className:"sekyro-segmented__input",name,value:option,checked:value===option,onChange:()=>onChange(option)}),(0,import_jsx_runtime6.jsxs)("span",{className:"sekyro-segmented__face",children:[(0,import_jsx_runtime6.jsx)("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),t(`capture.facing.${option}`)]})]},option))})]})}__name(FacingPicker,"FacingPicker");var import_jsx_runtime7=require("react/jsx-runtime");function Svg({className,children}){return(0,import_jsx_runtime7.jsx)("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(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,import_jsx_runtime7.jsx)("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(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,import_jsx_runtime7.jsx)("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(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),(0,import_jsx_runtime7.jsx)("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),(0,import_jsx_runtime7.jsx)("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}__name(PhoneEyeLevelIcon,"PhoneEyeLevelIcon");function LookStraightIcon(props){return(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("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"}),(0,import_jsx_runtime7.jsx)("circle",{cx:"12",cy:"12",r:"2.8"})]})}__name(LookStraightIcon,"LookStraightIcon");function CameraCheckIcon(props){return(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("path",{d:CAMERA_BODY}),(0,import_jsx_runtime7.jsx)("path",{d:"M9 13l2 2 4-4"})]})}__name(CameraCheckIcon,"CameraCheckIcon");function CameraAskIcon(props){return(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("path",{d:CAMERA_BODY}),(0,import_jsx_runtime7.jsx)("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(0,import_jsx_runtime7.jsxs)(Svg,{...props,children:[(0,import_jsx_runtime7.jsx)("path",{d:CAMERA_BODY}),(0,import_jsx_runtime7.jsx)("path",{d:"M3 3l18 18"})]})}__name(CameraBlockedIcon,"CameraBlockedIcon");function SpeakerIcon({off,className}){return(0,import_jsx_runtime7.jsxs)(Svg,{...className!==void 0?{className}:{},children:[(0,import_jsx_runtime7.jsx)("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),off?(0,import_jsx_runtime7.jsx)("path",{d:"M4 4l16 16"}):(0,import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment,{children:[(0,import_jsx_runtime7.jsx)("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),(0,import_jsx_runtime7.jsx)("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}__name(SpeakerIcon,"SpeakerIcon");function CheckIcon(props){return(0,import_jsx_runtime7.jsx)(Svg,{...props,children:(0,import_jsx_runtime7.jsx)("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}__name(CheckIcon,"CheckIcon");function SpinnerIcon(props){return(0,import_jsx_runtime7.jsxs)(Svg,{className:props.className??"sekyro-spinner",children:[(0,import_jsx_runtime7.jsx)("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),(0,import_jsx_runtime7.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}__name(SpinnerIcon,"SpinnerIcon");var import_react5=require("react");var import_jsx_runtime8=require("react/jsx-runtime");function PermissionRow({state}){let t=useStrings(),[live,setLive]=(0,import_react5.useState)(!1);(0,import_react5.useEffect)(()=>{state!=="unknown"&&setLive(!0)},[state]);let icon=state==="granted"?(0,import_jsx_runtime8.jsx)(CameraCheckIcon,{}):state==="denied"?(0,import_jsx_runtime8.jsx)(CameraBlockedIcon,{}):(0,import_jsx_runtime8.jsx)(CameraAskIcon,{});return(0,import_jsx_runtime8.jsxs)("div",{role:live?"status":void 0,className:`sekyro-permission sekyro-permission--${state}`,"data-testid":"sekyro-permission","data-state":state,children:[(0,import_jsx_runtime8.jsx)("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:icon}),(0,import_jsx_runtime8.jsx)("span",{children:t(`capture.permission.${state}`)})]})}__name(PermissionRow,"PermissionRow");var import_react6=require("react");var import_jsx_runtime9=require("react/jsx-runtime"),DEFAULT_TIPS=["light","uncover","eyeLevel","straight"],BUILT_IN2={light:{key:"capture.tips.light",icon:__name(()=>(0,import_jsx_runtime9.jsx)(SunIcon,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:__name(()=>(0,import_jsx_runtime9.jsx)(FaceUncoveredIcon,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:__name(()=>(0,import_jsx_runtime9.jsx)(PhoneEyeLevelIcon,{}),"icon")},straight:{key:"capture.tips.straight",icon:__name(()=>(0,import_jsx_runtime9.jsx)(LookStraightIcon,{}),"icon")}};function TipList({tips}){let t=useStrings(),titleId=(0,import_react6.useId)();return tips.length===0?null:(0,import_jsx_runtime9.jsxs)("section",{className:"sekyro-tips","aria-labelledby":titleId,"data-testid":"sekyro-tips",children:[(0,import_jsx_runtime9.jsx)("p",{className:"sekyro-tips__title",id:titleId,children:t("capture.tips.title")}),(0,import_jsx_runtime9.jsx)("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(0,import_jsx_runtime9.jsxs)("li",{className:"sekyro-tips__item",children:[icon!=null?(0,import_jsx_runtime9.jsx)("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:icon}):null,(0,import_jsx_runtime9.jsx)("span",{children:text})]},id)})})]})}__name(TipList,"TipList");var import_jsx_runtime10=require("react/jsx-runtime");function VoiceSwitch({voice}){let t=useStrings();if(!voice.supported)return null;let on=voice.enabled;return(0,import_jsx_runtime10.jsxs)("button",{type:"button",role:"switch","aria-checked":on,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>voice.toggle(),children:[(0,import_jsx_runtime10.jsxs)("span",{className:"sekyro-switch__label",children:[(0,import_jsx_runtime10.jsx)(SpeakerIcon,{off:!on}),t("capture.voiceGuidance")]}),(0,import_jsx_runtime10.jsx)("span",{className:"sekyro-switch__track","aria-hidden":"true",children:(0,import_jsx_runtime10.jsx)("span",{className:"sekyro-switch__thumb",children:on?(0,import_jsx_runtime10.jsx)(CheckIcon,{className:"sekyro-switch__check"}):null})})]})}__name(VoiceSwitch,"VoiceSwitch");var import_jsx_runtime11=require("react/jsx-runtime");function PreCaptureScreen({assets,onRetryAssets,permission,canChooseFacing,facing,onFacingChange,voice,tips,summary,startLabel,startDisabled,onStart}){let t=useStrings(),stopSummaryRef=(0,import_react7.useRef)(summary?.stop);stopSummaryRef.current=summary?.stop,(0,import_react7.useEffect)(()=>()=>stopSummaryRef.current?.(),[]);let rootRef=(0,import_react7.useRef)(null),startRef=(0,import_react7.useRef)(null),retryRef=(0,import_react7.useRef)(null),prevAssetsRef=(0,import_react7.useRef)(assets),retriedRef=(0,import_react7.useRef)(!1);(0,import_react7.useEffect)(()=>{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=(0,import_react7.useCallback)(()=>{retriedRef.current=!0,onRetryAssets()},[onRetryAssets]),loading=assets==="loading",inert=loading||startDisabled,start=(0,import_react7.useCallback)(()=>{inert||(stopSummaryRef.current?.(),onStart())},[inert,onStart]),startArea;return assets==="failed"?startArea=(0,import_jsx_runtime11.jsxs)(Notice,{tone:"danger",testId:"sekyro-assets-error",children:[(0,import_jsx_runtime11.jsx)("p",{className:"sekyro-text-body",children:t("fcv2.err.models")}),(0,import_jsx_runtime11.jsx)(Button,{kind:"ghost",ref:retryRef,className:"sekyro-btn--start",onClick:retry,"data-testid":"sekyro-assets-retry",children:t("common.retry")})]}):startArea=(0,import_jsx_runtime11.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,import_jsx_runtime11.jsx)(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?(0,import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment,{children:[(0,import_jsx_runtime11.jsx)(SpinnerIcon,{}),t("capture.preparing.title")]}):startLabel??t("capture.start")}),loading?(0,import_jsx_runtime11.jsx)("p",{className:"sekyro-text-muted",children:t("capture.preparing.hint")}):null]}),(0,import_jsx_runtime11.jsxs)("div",{ref:rootRef,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":assets,children:[tips!==!1?(0,import_jsx_runtime11.jsx)(TipList,{tips}):null,summary!==void 0?(0,import_jsx_runtime11.jsxs)(Button,{kind:"ghost",className:"sekyro-btn--start",onClick:summary.toggle,"data-testid":"sekyro-tips-listen",children:[(0,import_jsx_runtime11.jsx)(SpeakerIcon,{off:!1}),t(summary.playing?"capture.tips.stop":"capture.tips.listen")]}):null,(0,import_jsx_runtime11.jsx)(PermissionRow,{state:permission}),canChooseFacing?(0,import_jsx_runtime11.jsx)(FacingPicker,{value:facing,onChange:onFacingChange}):null,(0,import_jsx_runtime11.jsx)(VoiceSwitch,{voice}),(0,import_jsx_runtime11.jsx)("p",{className:"sekyro-text-muted",children:t("capture.securityNote")}),startArea,(0,import_jsx_runtime11.jsx)("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");var import_web=require("@sekyro/web"),import_react8=require("react");function useCameraStatus(){let[permission,setPermission]=(0,import_react8.useState)({state:"unknown",settled:!1}),[canChooseFacing,setCanChooseFacing]=(0,import_react8.useState)(!1);return(0,import_react8.useEffect)(()=>(0,import_web.subscribeCameraPermission)(state=>setPermission({state,settled:!0})),[]),(0,import_react8.useEffect)(()=>{let live=!0;return(0,import_web.hasMultipleCameras)().then(multiple=>{live&&setCanChooseFacing(multiple)}),()=>{live=!1}},[]),{permission:permission.state,permissionSettled:permission.settled,canChooseFacing}}__name(useCameraStatus,"useCameraStatus");var import_react9=require("react");function useFocusOnMount(){return(0,import_react9.useCallback)(element=>{element?.focus()},[])}__name(useFocusOnMount,"useFocusOnMount");var import_web2=require("@sekyro/web"),import_react10=require("react");var serverSnapshot=__name(()=>"idle","serverSnapshot");function preload(assetBaseUrl){return(0,import_web2.preloadLivenessAssets)(assetBaseUrl!==void 0?{assetBaseUrl}:{})}__name(preload,"preload");function useLivenessAssets(assetBaseUrl,active=!0){let status=(0,import_react10.useSyncExternalStore)((0,import_react10.useCallback)(listener=>(0,import_web2.subscribeLivenessAssets)(listener,assetBaseUrl),[assetBaseUrl]),()=>(0,import_web2.getLivenessAssetsStatus)(assetBaseUrl),serverSnapshot),[skipped,setSkipped]=(0,import_react10.useState)(null),mountedRef=(0,import_react10.useRef)(!1),kick=(0,import_react10.useCallback)(()=>{preload(assetBaseUrl).then(settled=>{mountedRef.current&&settled==="idle"&&setSkipped({base:assetBaseUrl})})},[assetBaseUrl]);(0,import_react10.useEffect)(()=>(mountedRef.current=!0,kick(),()=>{mountedRef.current=!1}),[kick]);let loadedBaseRef=(0,import_react10.useRef)(null);(0,import_react10.useEffect)(()=>{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=(0,import_react10.useCallback)(()=>{preload(assetBaseUrl)},[assetBaseUrl]);return{gate:skipped!==null&&skipped.base===assetBaseUrl&&status==="idle"||status==="ready"?"ready":status==="failed"?"failed":"loading",retry}}__name(useLivenessAssets,"useLivenessAssets");var import_web3=require("@sekyro/web"),import_react11=require("react");var IDLE_GATE={progress:0,hint:null,faceDetected:!1};function useLivenessHandle(options){let{videoRef,assetBaseUrl}=options,verification=(0,import_react11.useRef)(options.verification).current,warnedRef=(0,import_react11.useRef)(!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=(0,import_react11.useRef)(null),[state,setState]=(0,import_react11.useState)("idle"),[gate,setGate]=(0,import_react11.useState)(IDLE_GATE),[draining,setDraining]=(0,import_react11.useState)(!1),[gateLocked,setGateLocked]=(0,import_react11.useState)(!1),[frozenPreview,setFrozenPreview]=(0,import_react11.useState)(null),[reduceMotion,setReduceMotion]=(0,import_react11.useState)(!1),[artifacts,setArtifacts]=(0,import_react11.useState)(null),[error,setError]=(0,import_react11.useState)(null),[result,setResult]=(0,import_react11.useState)(null),lastProgressRef=(0,import_react11.useRef)(null),callbacksRef=(0,import_react11.useRef)(options);callbacksRef.current=options,(0,import_react11.useEffect)(()=>{let video=videoRef.current;if(video===null)return;let captureOptions={video,...assetBaseUrl!==void 0?{assetBaseUrl}:{}},handle=verification!==void 0?verification.liveness(captureOptions):(0,import_web3.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=(0,import_react11.useCallback)(options2=>{handleRef.current?.start(options2)},[]),retry=(0,import_react11.useCallback)(()=>{handleRef.current?.retry()},[]),switchCamera=(0,import_react11.useCallback)(()=>{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");var import_react12=require("react");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","capture.tips.summary"];function isVoiceKey(key){return key!==null&&VOICE_KEYS.includes(key)}__name(isVoiceKey,"isVoiceKey");var LOCALES=["ar","fr","en"];function isClipUrl(url){if(typeof url!="string")return!1;try{let u=new URL(url);return u.protocol==="https:"||u.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(u.hostname)}catch{return!1}}__name(isClipUrl,"isClipUrl");function toVoiceClipMap(view){let clips=view.clips;if(typeof clips!="object"||clips===null)return null;let out={};for(let locale of LOCALES){let table=clips[locale];if(!(typeof table!="object"||table===null))for(let[key,url]of Object.entries(table))!isVoiceKey(key)||!isClipUrl(url)||((out[locale]??(out[locale]={}))[key]=url)}return Object.keys(out).length>0?out:null}__name(toVoiceClipMap,"toVoiceClipMap");function useServerVoiceClips(verification){let[view,setView]=(0,import_react12.useState)(null);(0,import_react12.useEffect)(()=>{if(setView(null),verification===void 0)return;let live=!0,take=__name(next=>{if(!live)return;let value=typeof next=="object"&&next!==null&&typeof next.setId=="string"?next:null;setView(prev=>prev?.setId===value?.setId?prev:value)},"take");try{typeof verification.voiceClips=="function"&&Promise.resolve(verification.voiceClips()).then(take,()=>take(null))}catch{take(null)}let off=verification.on("view",v=>take(v.voice));return()=>{live=!1,off()}},[verification]);let map=(0,import_react12.useMemo)(()=>view!==null?toVoiceClipMap(view):null,[view]);return verification===void 0?null:map}__name(useServerVoiceClips,"useServerVoiceClips");var import_jsx_runtime12=require("react/jsx-runtime");function VoiceChip({voice}){let t=useStrings();return(0,import_jsx_runtime12.jsx)(Button,{kind:"chip","aria-pressed":voice.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>voice.toggle(),children:(0,import_jsx_runtime12.jsx)(SpeakerIcon,{off:!voice.enabled,className:"sekyro-icon"})})}__name(VoiceChip,"VoiceChip");var import_react13=require("react");var own=__name((o,k)=>Object.prototype.hasOwnProperty.call(o,k),"own");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");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,end)=>{let s=synth();if(s!==null&&text!==""&&typeof SpeechSynthesisUtterance=="function"){bindVoices();let voice=pickVoice(voices,lang);if(voices.length===0||voice!==void 0){s.cancel();let u=new SpeechSynthesisUtterance(text);u.lang=lang,voice!==void 0&&(u.voice=voice),u.rate=.95,end!==void 0&&(u.onend=u.onerror=end),s.speak(u);return}}end?.()},"speak"),stop=__name(()=>{generation+=1,lastId=null,audio!==null&&(audio.pause(),audio.currentTime=0),synth()?.cancel()},"stop"),warmClips=__name(urls=>{for(let url of urls){let id=clipIdentity(url);if(warm.has(id))continue;let w=new Audio;w.preload="auto",w.src=url,warm.set(id,w)}},"warmClips");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,onEnd=utterance.onEnd,end=onEnd!==void 0?()=>{current===generation&&onEnd()}:void 0;if(synth()?.cancel(),utterance.url!==null){let a=element();a.pause(),a.muted=!1,a.src=utterance.url,a.currentTime=0,a.onended=end??null,a.play()?.catch(err=>{current===generation&&err?.name!=="AbortError"&&(utterance.speech?speak(utterance.text,utterance.lang,end):end?.())});return}utterance.speech?speak(utterance.text,utterance.lang,end):end?.()},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.onended=null,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)}warmClips(prefetch??[])},prefetch:warmClips,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 SUMMARY="capture.tips.summary",useIsomorphicLayoutEffect=typeof window<"u"?import_react13.useLayoutEffect:import_react13.useEffect,NO_CLIPS=Object.freeze({});function resolvedClipUrls(source,locale){let seen=new Set,urls=[];for(let key of VOICE_KEYS){let url=key===SUMMARY?null: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,defaultClips,options}){let off=options===!1,opts=off?{}:options??{},storageKey=opts.storageKey===void 0?DEFAULT_VOICE_STORAGE_KEY:opts.storageKey,[enabled,setEnabledState]=(0,import_react13.useState)(opts.defaultEnabled??!0),enabledRef=(0,import_react13.useRef)(enabled),[supported,setSupported]=(0,import_react13.useState)(!1),[summary,setSummary]=(0,import_react13.useState)("none"),[summaryPlaying,setSummaryPlaying]=(0,import_react13.useState)(!1),summaryPlayingRef=(0,import_react13.useRef)(!1),[voicesVersion,setVoicesVersion]=(0,import_react13.useState)(0),playerRef=(0,import_react13.useRef)(null),player=(0,import_react13.useCallback)(()=>(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),source=opts.clips??defaultClips??NO_CLIPS,unlockedRef=(0,import_react13.useRef)(!1),sourceRef=(0,import_react13.useRef)(source);useIsomorphicLayoutEffect(()=>{sourceRef.current=source,enabledRef.current=enabled}),(0,import_react13.useEffect)(()=>{if(off||storageKey===null)return;let stored=readVoicePreference(storageKey);stored!==null&&(enabledRef.current=stored,setEnabledState(stored))},[off,storageKey]),(0,import_react13.useEffect)(()=>{if(!(off||!speechAllowed))return subscribeVoices(()=>setVoicesVersion(v=>v+1))},[off,speechAllowed]);let partnerClips=opts.clips;(0,import_react13.useEffect)(()=>{if(off)return;let speech=speechAllowed&&speechUsable(lang);setSupported(resolvedClipUrls(source,locale).length>0||speech),setSummary(partnerClips!==void 0&&resolveClip(partnerClips,SUMMARY,locale)!==null?"partner":resolveClip(source,SUMMARY,locale)!==null||speech?"default":"none")},[off,source,partnerClips,locale,speechAllowed,lang,voicesVersion]),(0,import_react13.useEffect)(()=>{if(off||!enabled||!unlockedRef.current)return;let urls=resolvedClipUrls(source,locale);urls.length>0&&player().prefetch(urls)},[off,enabled,source,locale,player]),(0,import_react13.useEffect)(()=>()=>{playerRef.current?.dispose(),playerRef.current=null,unlockedRef.current=!1},[]);let unlockAudio=(0,import_react13.useCallback)(prefetch=>{off||(unlockedRef.current=!0,player().unlock({lang,speech:speechAllowed,...prefetch?{prefetch:resolvedClipUrls(sourceRef.current,locale)}:{}}))},[off,player,lang,speechAllowed,locale]),unlock=(0,import_react13.useCallback)(()=>unlockAudio(enabledRef.current),[unlockAudio]),endSummary=(0,import_react13.useCallback)(()=>{summaryPlayingRef.current=!1,setSummaryPlaying(!1)},[]),stop=(0,import_react13.useCallback)(()=>{endSummary(),playerRef.current?.stop()},[endSummary]),stopSummary=(0,import_react13.useCallback)(()=>{summaryPlayingRef.current&&stop()},[stop]),toggleSummary=(0,import_react13.useCallback)(text=>{if(off)return;if(summaryPlayingRef.current){stop();return}let p=player();p.stop(),summaryPlayingRef.current=!0,setSummaryPlaying(!0),p.say({url:resolveClip(sourceRef.current,SUMMARY,locale),text,lang,speech:speechAllowed,onEnd:endSummary})},[off,stop,player,locale,lang,speechAllowed,endSummary]),setEnabled=(0,import_react13.useCallback)(next=>{off||(next?unlockAudio(!0):stop(),storageKey!==null&&writeVoicePreference(storageKey,next),enabledRef.current=next,setEnabledState(next))},[off,unlockAudio,stop,storageKey]),toggle=(0,import_react13.useCallback)(()=>setEnabled(!enabledRef.current),[setEnabled]),speakKey=(0,import_react13.useCallback)((key,text)=>{if(off||!enabled)return;summaryPlayingRef.current&&endSummary();let url=resolveClip(sourceRef.current,key,locale);player().say({url,text,lang,speech:speechAllowed})},[off,enabled,locale,player,lang,speechAllowed,endSummary]);return(0,import_react13.useMemo)(()=>({supported:!off&&supported,enabled:!off&&enabled,setEnabled,toggle,unlock,speakKey,stop,summary:off?"none":summary,summaryPlaying,toggleSummary,stopSummary}),[off,supported,enabled,setEnabled,toggle,unlock,speakKey,stop,summary,summaryPlaying,toggleSummary,stopSummary])}__name(useVoiceGuidance,"useVoiceGuidance");function useSpeakGuidance(voice,key,text,active){let{speakKey,stop,enabled}=voice,spokeRef=(0,import_react13.useRef)(!1);(0,import_react13.useEffect)(()=>{if(!active||!enabled){spokeRef.current&&stop(),spokeRef.current=!1;return}spokeRef.current=!0,isVoiceKey(key)&&key!==SUMMARY&&text!==""&&speakKey(key,text)},[active,enabled,key,text,speakKey,stop])}__name(useSpeakGuidance,"useSpeakGuidance");var import_jsx_runtime13=require("react/jsx-runtime"),NO_FACE_DEBOUNCE_MS=800;function isDefaultTips(tips){return tips===void 0||tips!==!1&&tips.length===DEFAULT_TIPS.length&&DEFAULT_TIPS.every(id=>tips.includes(id))}__name(isDefaultTips,"isDefaultTips");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&&!(0,import_react14.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=(0,import_react14.useMemo)(()=>resolveStrings(locale,strings),[locale,strings]),t=(0,import_react14.useMemo)(()=>key=>dictionary[key]??"",[dictionary]),direction=dir??(locale==="ar"?"rtl":"ltr"),videoRef=(0,import_react14.useRef)(null),capture=useLivenessHandle({verification,videoRef,assetBaseUrl,onCaptured,onResult,onError,onStateChange}),assets=useLivenessAssets(assetBaseUrl,capture.state==="idle"&&capture.error===null),camera=useCameraStatus(),wantsServerClips=voiceOption!==!1&&voiceOption?.clips===void 0,serverClips=useServerVoiceClips(wantsServerClips?verification:void 0),voice=useVoiceGuidance({locale,defaultClips:serverClips,options:voiceOption}),[facing,setFacing]=(0,import_react14.useState)(defaultFacing??"user"),rootRef=(0,import_react14.useRef)(null),unlockedRef=(0,import_react14.useRef)(!1),unlockRef=(0,import_react14.useRef)(voice.unlock);unlockRef.current=voice.unlock,(0,import_react14.useEffect)(()=>{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=(0,import_react14.useCallback)(()=>{unlockedRef.current||(unlockedRef.current=!0,voice.unlock()),capture.start({facing})},[voice.unlock,capture.start,facing]),autoBegin=(0,import_react14.useCallback)(()=>capture.start({facing}),[capture.start,facing]),autoStartedRef=(0,import_react14.useRef)(!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;(0,import_react14.useEffect)(()=>{!autoArmed||!preCaptureIdle||assets.gate!=="ready"||autoStartedRef.current||(autoStartedRef.current=!0,autoBegin())},[autoArmed,preCaptureIdle,assets.gate,autoBegin]);let showIntro=preCaptureIdle&&!(autoPending&&assets.gate==="ready"),switchCamera=(0,import_react14.useCallback)(()=>{setFacing(f=>f==="user"?"environment":"user"),capture.switchCamera()},[capture.switchCamera]),objectUrl=(0,import_react14.useMemo)(()=>capture.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(capture.artifacts.keyframe):null,[capture.artifacts]);(0,import_react14.useEffect)(()=>{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]=(0,import_react14.useState)(null);(0,import_react14.useEffect)(()=>{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=(0,import_react14.useRef)(onGuidance);onGuidanceRef.current=onGuidance,(0,import_react14.useEffect)(()=>{if(isVoiceKey(guidanceKey))try{onGuidanceRef.current?.(guidanceKey)}catch(err){console.error("[@sekyro/react] onGuidance threw:",err)}},[guidanceKey]);let voiceControl=(0,import_react14.useMemo)(()=>({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=(0,import_react14.useRef)(!1);(0,import_react14.useEffect)(()=>{!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?()=>(0,import_jsx_runtime13.jsx)(VoiceChip,{voice:voiceControl}):void 0,{summary:summaryVoice,summaryPlaying,toggleSummary,stopSummary}=voice,summaryText=t("capture.tips.summary"),offerSummary=summaryVoice==="partner"||summaryVoice==="default"&&isDefaultTips(tips),introSummary=(0,import_react14.useMemo)(()=>offerSummary?{playing:summaryPlaying,toggle:__name(()=>toggleSummary(summaryText),"toggle"),stop:stopSummary}:void 0,[offerSummary,summaryPlaying,toggleSummary,summaryText,stopSummary]),introContext=(0,import_react14.useMemo)(()=>({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)?(0,import_jsx_runtime13.jsx)(Notice,{tone:notice.tone,testId:"sekyro-host-notice",children:(0,import_jsx_runtime13.jsx)("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(0,import_jsx_runtime13.jsx)(StringsProvider,{value:t,children:(0,import_jsx_runtime13.jsxs)("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?(0,import_jsx_runtime13.jsx)(Notice,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:(0,import_jsx_runtime13.jsx)("span",{children:reasonText(retryVerdict.reason)})}):null,capture.error!==null?slots?.errorPanel!==void 0?slots.errorPanel(capture.error,capture.retry):(0,import_jsx_runtime13.jsxs)(Notice,{tone:"danger",testId:"sekyro-error-notice",children:[(0,import_jsx_runtime13.jsx)("span",{children:t(captureErrorStringKey(capture.error.kind))}),capture.error.retryable?(0,import_jsx_runtime13.jsx)(Button,{ref:focusRetry,kind:"ghost",className:"sekyro-btn--start",onClick:capture.retry,children:t("common.retry")}):null]}):null,unavailable!==null?(0,import_jsx_runtime13.jsxs)(Notice,{tone:"danger",testId:"sekyro-unavailable-notice",children:[(0,import_jsx_runtime13.jsx)("span",{children:reasonText(unavailable.reason)??t(unavailable.reason===void 0?"errors.session_expired":"errors.network_error")}),unavailableRetryable?(0,import_jsx_runtime13.jsx)(Button,{ref:focusRetry,kind:"ghost",className:"sekyro-btn--start",onClick:capture.retry,children:t("capture.recordAgain")}):null]}):null,terminal!==null&&reasonText(terminal.reason)!==null?(0,import_jsx_runtime13.jsx)(Notice,{tone:terminal.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:(0,import_jsx_runtime13.jsx)("span",{children:reasonText(terminal.reason)})}):null,(0,import_jsx_runtime13.jsx)("div",{className:stageVisible?void 0:"sekyro-hidden","data-capture-live":stageVisible?"":void 0,children:(0,import_jsx_runtime13.jsx)(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?(0,import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment,{children:[noticeNode,slots?.intro!==void 0?slots.intro(begin,introContext):(0,import_jsx_runtime13.jsx)(PreCaptureScreen,{assets:screenGate,onRetryAssets:assets.retry,permission:camera.permission,canChooseFacing:camera.canChooseFacing,facing,onFacingChange:setFacing,voice:voiceControl,tips:tips??DEFAULT_TIPS,...introSummary!==void 0?{summary:introSummary}:{},...startLabel!==void 0?{startLabel}:{},startDisabled,onStart:begin})]}):null,(0,import_jsx_runtime13.jsx)(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");var import_jsx_runtime14=require("react/jsx-runtime"),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(0,import_jsx_runtime14.jsx)("div",{className:className===void 0?"sekyro-root":`sekyro-root ${className}`,style,children})}__name(SekyroThemeProvider,"SekyroThemeProvider");
3
- //# sourceMappingURL=index.cjs.map
2
+ "use strict";var Be=Object.defineProperty;var qr=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var jr=Object.prototype.hasOwnProperty;var n=(e,t)=>Be(e,"name",{value:t,configurable:!0});var Wr=(e,t)=>{for(var r in t)Be(e,r,{get:t[r],enumerable:!0})},Yr=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $r(t))!jr.call(e,o)&&o!==r&&Be(e,o,{get:()=>t[o],enumerable:!(s=qr(t,o))||s.enumerable});return e};var Zr=e=>Yr(Be({},"__esModule",{value:!0}),e);var xn={};Wr(xn,{DEFAULT_THEME:()=>he,DEFAULT_TIPS:()=>be,LivenessCapture:()=>Lr,NO_FACE_DEBOUNCE_MS:()=>ut,SekyroThemeProvider:()=>Ir,VOICE_KEYS:()=>xe,ar:()=>Pe,attemptsRemainingText:()=>je,brandingToTheme:()=>Vr,captureErrorStringKey:()=>De,en:()=>ge,fr:()=>Ee,hintStringKey:()=>Ge,mergeThemes:()=>Nr,reasonStringKey:()=>qe,resolveStrings:()=>Ye,retryAfterTime:()=>$e,themeToCssVars:()=>dt});module.exports=Zr(xn);var y=require("react");var Pt=require("react");var Et=require("react/jsx-runtime"),F=(0,Pt.forwardRef)(n(function({kind:t="primary",full:r=!1,className:s,type:o,...i},c){let u=["sekyro-btn",`sekyro-btn--${t}`];return r&&u.push("sekyro-btn--full"),s!==void 0&&u.push(s),(0,Et.jsx)("button",{ref:c,type:o??"button",className:u.join(" "),...i})},"Button"));var re=require("react/jsx-runtime");var Xr=Array.from({length:56},(e,t)=>{let r=t/56*2*Math.PI-Math.PI/2,s=Math.cos(r),o=Math.sin(r);return{id:`tick-${t}`,frac:t/55,x1:150+108*s,y1:150+108*o,x2:150+138*s,y2:150+138*o,style:{transitionDelay:`${t*6}ms`}}});function Qr(e,t,r,s){return r?"var(--sekyro-color-success)":e?s?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":t<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":t<.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)"}n(Qr,"tickColor");var Jr="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function Mt({progress:e,phase:t,draining:r=!1}){let s=Math.min(1,Math.max(0,e)),o=Math.round(s*56),i=t==="checking",c=t==="recording",u=t==="frozen",d=i||u,R=i||c||u,N=t==="locked"||R,V=r&&!N;return(0,re.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":t,"data-filled":o,"data-recording":c?"":void 0,"data-draining":V?"":void 0,children:[(0,re.jsx)("path",{fillRule:"evenodd",d:Jr,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":d?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),(0,re.jsxs)("g",{className:t==="locked"?"sekyro-capture-settle":void 0,children:[(0,re.jsx)("g",{className:d?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:Xr.map((f,l)=>(0,re.jsx)("line",{x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,stroke:Qr(l<o,f.frac,N,V),strokeWidth:3,strokeLinecap:"round",style:f.style,className:"sekyro-arc__tick"},f.id))}),(0,re.jsx)("g",{className:t==="seeking"?"sekyro-capture-breathe":void 0,children:(0,re.jsx)("circle",{cx:150,cy:150,r:100,fill:"none",stroke:N?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:N?3.5:2.5,className:R?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}n(Mt,"CaptureArc");var We=require("react");var ge={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture…","capture.checking":"We're checking your identity…","capture.checkingHint":"This usually takes a few seconds — 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 — a few adjustments will help:","capture.retryCoaching.light":"Find good lighting — 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 — connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera — close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS) — reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format — open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable — try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face — 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 — light your face","fcv3.too_bright":"Too much light — move out of direct light","fcv3.hold_still":"Perfect — 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 — 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 — a reviewer will check","reasons.document_nni_mismatch":"This document belongs to a different person than the one this verification was created for","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 — your verification went to human review","reasons.location_not_allowed":"Verification isn't available in your region.","reasons.anonymizer_blocked":"Turn off your VPN or proxy, then open the link again.","reasons.nationality_not_allowed":"This service can't verify this document. Contact the organization for other options.","reasons.document_type_not_accepted":"This type of document isn't accepted. Choose another document.","reasons.underage":"You don't meet the minimum age for this service.","reasons.age_unverifiable":"We couldn't read your date of birth. Take a clearer photo of your document.","reasons.name_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.birth_date_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.nationality_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.document_number_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.liveness_inconclusive":"Let's try again: face a light source and hold still.","reasons.match_inconclusive":"We couldn't confirm it's you. Try again in good light, without glasses.","reasons.document_authenticity":"Use the original card, not a photo or a copy, and avoid reflections.","reasons.mobile_required":"Continue on your phone to take the selfie.","reasons.capture_tampered":"We couldn't verify this capture. Use your phone's built-in camera, without screen recording or camera apps.","reasons.device_velocity_exceeded":"This device can't be used for another verification right now. Contact the organization.","reasons.device_cooldown":"Too many attempts. Try again later.","cooldown.retryIn":"Too many attempts. Try again {time}.","cooldown.retryAt":"Too many attempts. Try again after {time}.","capture.busy":"Our service is busy. Trying again…","errors.inference_unavailable":"Try again in a moment.","method.title":"How do you want to verify?","method.description":"Choose one option to continue","method.national_number":"Enter my national number (NNI)","method.document_photo":"Photo of my document","errors.method_required":"Choose how you want to verify, then continue","errors.attestation_invalid":"We could not confirm this browser session is genuine — reload the page and try again","errors.network_error":"We could not reach the verification service — check your internet connection and try again","errors.session_expired":"This verification session has expired — ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number — ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source — avoid strong light behind you","capture.tips.uncover":"Uncover your face — 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.tips.summary":"Stand in a well-lit area. Uncover your face — no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera — choose Allow","capture.permission.denied":"Camera access is blocked — 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 — this can take a moment on a slow connection","capture.ready":"Ready — start when you are","fcv2.err.models":"The face-detection models could not be loaded — check your connection and try again"};var Pe={"capture.start":"تشغيل الكاميرا","capture.recordAgain":"ابدأ محاولة جديدة","capture.switchCamera":"تبديل الكاميرا","capture.preparing.title":"جارٍ تجهيز الالتقاط الآمن…","capture.checking":"نتحقق من هويتك…","capture.checkingHint":"يستغرق هذا عادةً بضع ثوانٍ — أبقِ هذه الصفحة مفتوحة","capture.securityNote":"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق","capture.cameraOff":"الكاميرا مطفأة","capture.previewAlt":"معاينة الصورة الملتقطة لوجهك","capture.retryCoaching.title":"لم تنجح هذه المحاولة — بعض التعديلات ستساعد:","capture.retryCoaching.light":"اختر مكانًا جيد الإضاءة — الضوء على وجهك لا خلفك","capture.retryCoaching.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.retryCoaching.head":"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا","capture.attemptsRemaining.zero":"لم تتبقَّ أي محاولة","capture.attemptsRemaining.one":"تبقّت محاولة واحدة","capture.attemptsRemaining.two":"تبقّت محاولتان","capture.attemptsRemaining.few":"تبقّت {count} محاولات","capture.attemptsRemaining.many":"تبقّت {count} محاولة","capture.attemptsRemaining.other":"تبقّت {count} محاولة","common.retry":"أعد المحاولة","fcv2.err.permission":"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة","fcv2.err.notfound":"لم يتم العثور على كاميرا — وصِّل كاميرا أو فعِّلها ثم أعد المحاولة","fcv2.err.inuse":"تطبيق آخر يستخدم الكاميرا — أغلقه ثم أعد المحاولة","fcv2.err.insecure":"تتطلب الكاميرا اتصالًا آمنًا (HTTPS) — افتح هذه الصفحة عبر HTTPS","fcv2.err.unsupported":"متصفحك لا يستطيع الالتقاط بصيغة مدعومة — افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري","fcv2.err.generic":"الكاميرا غير متاحة — أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة","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":"أمسك الهاتف بثبات","reasons.no_face":"تعذّر اكتشاف أي وجه أثناء التحقق","reasons.media_unreadable":"تعذّرت قراءة اللقطة المُرسلة","reasons.clip_too_short":"كانت اللقطة أقصر من اللازم","reasons.spoof_detected":"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا","reasons.review_band":"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية","reasons.nni_not_found":"لم يُعثر على الرقم الوطني في سجل الحالة المدنية","reasons.nni_invalid":"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام","reasons.registry_unavailable":"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد الرقم الوطني","reasons.result_from_cache":"أُكِّد فحص السجل استنادًا إلى نسخة حديثة من السجل","reasons.no_face_source":"تعذّر اكتشاف وجه في الصورة الذاتية","reasons.no_face_reference":"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها — على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي","reasons.low_quality_reference":"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة","reasons.below_threshold":"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية","reasons.side_missing":"أحد وجهي وثيقة الهوية لم يُرسل","reasons.mrz_checksum_failed":"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة","reasons.unreadable":"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة","reasons.expired_document":"انتهت صلاحية وثيقة الهوية","reasons.authenticity_review":"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها","reasons.registry_mismatch":"بيانات الوثيقة لا تطابق السجل المدني — سيتحقق منها مراجع","reasons.document_nni_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد — أُحيل تحققك إلى مراجعة بشرية","reasons.location_not_allowed":"التحقق غير متاح في منطقتك.","reasons.anonymizer_blocked":"أوقف تشغيل VPN أو الوكيل ثم افتح الرابط مجددًا.","reasons.nationality_not_allowed":"لا يمكن لهذه الخدمة التحقق من هذه الوثيقة. تواصل مع الجهة لمعرفة الخيارات الأخرى.","reasons.document_type_not_accepted":"هذا النوع من الوثائق غير مقبول. اختر وثيقة أخرى.","reasons.underage":"لا تستوفي الحد الأدنى للسن لهذه الخدمة.","reasons.age_unverifiable":"تعذّرت قراءة تاريخ ميلادك. التقط صورة أوضح لوثيقتك.","reasons.name_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.birth_date_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.nationality_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.document_number_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.liveness_inconclusive":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","reasons.match_inconclusive":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","reasons.document_authenticity":"استخدم البطاقة الأصلية، لا صورة لها ولا نسخة منها، وتجنّب الانعكاسات.","reasons.mobile_required":"تابع على هاتفك لالتقاط صورة لوجهك.","reasons.capture_tampered":"تعذّر التحقق من هذا الالتقاط. استخدم الكاميرا المدمجة في هاتفك، دون تسجيل الشاشة أو تطبيقات الكاميرا.","reasons.device_velocity_exceeded":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع الجهة.","reasons.device_cooldown":"محاولات كثيرة. حاول مجددًا لاحقًا.","cooldown.retryIn":"محاولات كثيرة. حاول مجددًا {time}.","cooldown.retryAt":"محاولات كثيرة. حاول مجددًا بعد {time}.","capture.busy":"خدمتنا مشغولة حاليًا. نعيد المحاولة…","errors.inference_unavailable":"حاول مجددًا بعد لحظات.","method.title":"كيف تريد التحقق من هويتك؟","method.description":"اختر إحدى الطريقتين للمتابعة","method.national_number":"إدخال رقمي الوطني (NNI)","method.document_photo":"تصوير وثيقتي","errors.method_required":"اختر طريقة التحقق، ثم تابع","errors.attestation_invalid":"تعذّر التأكد من سلامة جلسة المتصفح — أعد تحميل الصفحة وحاول مجددًا","errors.network_error":"تعذّر الوصول إلى خدمة التحقق — تحقق من اتصالك بالإنترنت وأعد المحاولة","errors.session_expired":"انتهت صلاحية جلسة التحقق هذه — اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا","errors.nni_unbound":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف — اطلب رابطًا جديدًا من الجهة الطالبة","capture.tips.title":"لتحقق ناجح:","capture.tips.light":"اجعل الضوء أمام وجهك — تجنّب الإضاءة القوية خلفك","capture.tips.uncover":"اكشف وجهك — بلا نظارات أو كمامة أو يد أمامه","capture.tips.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.tips.straight":"انظر مباشرة إلى الكاميرا وابقَ ثابتًا","capture.tips.summary":"اختر مكانًا جيد الإضاءة. اكشف وجهك — بلا نظارات أو كمامة. بعد تشغيل الكاميرا، أمسك هاتفك بمستوى العينين، وانظر مباشرة إلى الكاميرا وابقَ ثابتًا.","capture.tips.listen":"استمع إلى التعليمات","capture.tips.stop":"إيقاف","capture.permission.granted":"تم السماح بالوصول إلى الكاميرا","capture.permission.prompt":"سيطلب متصفحك استخدام الكاميرا — اختر «السماح»","capture.permission.denied":"الوصول إلى الكاميرا محظور — اسمح به من إعدادات المتصفح (رمز الكاميرا في شريط العنوان)، ثم أعد تحميل الصفحة","capture.permission.unknown":"سنطلب استخدام الكاميرا عند البدء","capture.cameraLabel":"الكاميرا","capture.facing.user":"الكاميرا الأمامية","capture.facing.environment":"الكاميرا الخلفية","capture.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك — قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز — ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه — تحقق من اتصالك ثم أعد المحاولة"};var Ee={"capture.start":"Démarrer la caméra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de caméra","capture.preparing.title":"Préparation de la capture sécurisée…","capture.checking":"Nous vérifions votre identité…","capture.checkingHint":"Cela prend généralement quelques secondes — gardez cette page ouverte","capture.securityNote":"Vos images sont chiffrées et utilisées uniquement pour cette vérification","capture.cameraOff":"Caméra éteinte","capture.previewAlt":"Aperçu de l’image capturée de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti — quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien éclairé — lumière sur le visage, pas derrière vous","capture.retryCoaching.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la caméra, la tête bien droite","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"Réessayer","fcv2.err.permission":"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez","fcv2.err.notfound":"Aucune caméra détectée — branchez ou activez une caméra, puis réessayez","fcv2.err.inuse":"La caméra est utilisée par une autre application — fermez-la, puis réessayez","fcv2.err.insecure":"La caméra nécessite une connexion sécurisée (HTTPS) — rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible — ouvrez cette page dans un navigateur récent comme Chrome ou Safari","fcv2.err.generic":"Caméra indisponible — réessayez, ou contactez le support si le problème persiste","fcv3.no_face":"Nous ne voyons pas votre visage — tenez le téléphone devant vous","fcv3.come_closer":"Rapprochez un peu le téléphone","fcv3.move_back":"Éloignez un peu le téléphone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la tête droite","fcv3.more_light":"Cherchez un endroit plus lumineux — éclairez votre visage","fcv3.too_bright":"Trop de lumière — évitez la lumière directe sur le visage","fcv3.hold_still":"Parfait — ne bougez plus","fcv3.steady_camera":"Tenez le téléphone stable","reasons.no_face":"Aucun visage n’a pu être détecté pendant la vérification","reasons.media_unreadable":"La capture envoyée n’a pas pu être lue","reasons.clip_too_short":"La capture était trop courte","reasons.spoof_detected":"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra","reasons.review_band":"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain","reasons.nni_not_found":"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil","reasons.nni_invalid":"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres","reasons.registry_unavailable":"Le registre d'état civil n'a pas pu être joint pour confirmer le NNI","reasons.result_from_cache":"Le contrôle du registre a été confirmé à partir d'une copie récente du registre","reasons.no_face_source":"Aucun visage n'a pu être détecté sur la photo selfie","reasons.no_face_reference":"Aucune photo de référence n'était disponible pour comparer votre selfie — c'est au demandeur de le résoudre, reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de référence enregistrée n'était pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité","reasons.side_missing":"Un côté de la pièce d'identité n'a pas été envoyé","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu être validée","reasons.unreadable":"La photo du document n'était pas assez nette pour être lue","reasons.expired_document":"La pièce d'identité a expiré","reasons.authenticity_review":"Le document a été transmis à un examen humain pour confirmer son authenticité","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil — un examinateur va vérifier","reasons.document_nni_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.otp_mismatch":"Le code de vérification ne correspond pas à celui que nous avons envoyé","reasons.otp_expired":"Le code de vérification a expiré avant d'être saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de vérification à votre téléphone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore décidées automatiquement — votre vérification part en revue humaine","reasons.location_not_allowed":"La vérification n'est pas disponible dans votre région.","reasons.anonymizer_blocked":"Désactivez votre VPN ou proxy, puis rouvrez le lien.","reasons.nationality_not_allowed":"Ce service ne peut pas vérifier ce document. Contactez l'organisation pour d'autres options.","reasons.document_type_not_accepted":"Ce type de document n'est pas accepté. Choisissez un autre document.","reasons.underage":"Vous n'avez pas l'âge minimum requis pour ce service.","reasons.age_unverifiable":"Nous n'avons pas pu lire votre date de naissance. Prenez une photo plus nette de votre document.","reasons.name_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.birth_date_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.nationality_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.document_number_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.liveness_inconclusive":"Réessayons : placez-vous face à une source de lumière et restez immobile.","reasons.match_inconclusive":"Nous n'avons pas pu confirmer qu'il s'agit bien de vous. Réessayez dans un endroit bien éclairé, sans lunettes.","reasons.document_authenticity":"Utilisez la carte originale, pas une photo ni une copie, et évitez les reflets.","reasons.mobile_required":"Continuez sur votre téléphone pour prendre le selfie.","reasons.capture_tampered":"Nous n'avons pas pu vérifier cette capture. Utilisez l'appareil photo intégré de votre téléphone, sans enregistrement d'écran ni application de caméra.","reasons.device_velocity_exceeded":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez l'organisation.","reasons.device_cooldown":"Trop de tentatives. Réessayez plus tard.","cooldown.retryIn":"Trop de tentatives. Réessayez {time}.","cooldown.retryAt":"Trop de tentatives. Réessayez à partir de {time}.","capture.busy":"Notre service est très sollicité. Nouvel essai en cours…","errors.inference_unavailable":"Réessayez dans un instant.","method.title":"Comment souhaitez-vous vérifier votre identité ?","method.description":"Choisissez une option pour continuer","method.national_number":"Saisir mon numéro national (NNI)","method.document_photo":"Photographier mon document","errors.method_required":"Choisissez comment vérifier votre identité, puis continuez","errors.attestation_invalid":"Nous n'avons pas pu confirmer l'authenticité de cette session de navigateur — rechargez la page et réessayez","errors.network_error":"Nous n'avons pas pu joindre le service de vérification — vérifiez votre connexion internet et réessayez","errors.session_expired":"Cette session de vérification a expiré — demandez un nouveau lien à l'organisme qui vous a envoyé ici","errors.nni_unbound":"Ce lien a été créé sans votre numéro national d'identification — demandez un nouveau lien à l'organisme demandeur","capture.tips.title":"Pour une vérification réussie :","capture.tips.light":"Placez-vous face à la lumière — évitez une forte lumière derrière vous","capture.tips.uncover":"Dégagez votre visage — ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.tips.straight":"Regardez droit vers la caméra et restez immobile","capture.tips.summary":"Placez-vous dans une zone bien éclairée. Dégagez votre visage — ni lunettes, ni masque. Une fois la caméra démarrée, tenez votre téléphone à hauteur des yeux, regardez droit vers la caméra et restez immobile.","capture.tips.listen":"Écouter les instructions","capture.tips.stop":"Arrêter","capture.permission.granted":"Accès à la caméra autorisé","capture.permission.prompt":"Votre navigateur va demander l’accès à la caméra — choisissez « Autoriser »","capture.permission.denied":"L’accès à la caméra est bloqué — autorisez-le dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l’accès à la caméra au démarrage","capture.cameraLabel":"Caméra","capture.facing.user":"Caméra avant","capture.facing.environment":"Caméra arrière","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la détection du visage sur l’appareil — cela peut prendre un instant sur une connexion lente","capture.ready":"Prêt — commencez quand vous voulez","fcv2.err.models":"Impossible de charger les modèles de détection du visage — vérifiez votre connexion puis réessayez"};function Ge(e){switch(e){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 t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}n(Ge,"hintStringKey");function De(e){return`fcv2.err.${e}`}n(De,"captureErrorStringKey");function qe(e){switch(e){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";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${e}`;return Object.hasOwn(ge,t)?t:null}}}n(qe,"reasonStringKey");function $e(e,t,r=new Date){if(t===void 0)return null;let s=new Date(t),o=s.getTime()-r.getTime();if(!Number.isFinite(o)||o<=0)return null;if(o<36e5){let u=Math.max(1,Math.ceil(o/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(u,"minute")}}let i=s.toDateString()===r.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...i?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(s)}}n($e,"retryAfterTime");function je(e,t,r){let s=new Intl.PluralRules(t).select(r);return((s==="other"?void 0:e[`capture.attemptsRemaining.${s}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(r))}n(je,"attemptsRemainingText");var en={ar:Pe,fr:Ee,en:ge};function Ye(e,t){let r=en[e];if(t===void 0)return r;let s={...r};for(let o of Object.keys(t)){let i=t[o];typeof i=="string"&&(s[o]=i)}return s}n(Ye,"resolveStrings");var zt=(0,We.createContext)(e=>ge[e]??""),Kt=zt.Provider;function z(){return(0,We.useContext)(zt)}n(z,"useStrings");var P=require("react/jsx-runtime");function Ot({videoRef:e,guidanceText:t,guidanceHint:r,guidanceKey:s,progress:o,phase:i,draining:c=!1,stillUrl:u,showChecking:d,onSwitchCamera:R,canSwitchCamera:N,voicePrompt:V,overlay:f,reduceMotion:l=!1}){let _=z(),v=i==="checking",T=v||i==="frozen",m=T&&d?_("capture.checking"):t,S=V?.(r,m,s);return(0,P.jsxs)("div",{className:l?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[(0,P.jsx)("video",{ref:e,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),u!==null&&T?(0,P.jsx)("img",{src:u,alt:_("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,(0,P.jsx)(Mt,{progress:o,phase:i,draining:c}),f?.(e),S!=null&&!T?(0,P.jsx)("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:S}):null,N?(0,P.jsx)(F,{kind:"chip",onClick:R,"aria-label":_("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:(0,P.jsx)(tn,{})}):null,v&&d?(0,P.jsxs)("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[(0,P.jsx)(rn,{}),_("capture.cameraOff")]}):null,(0,P.jsxs)("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[(0,P.jsx)("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:m},m),T&&d?(0,P.jsx)("span",{className:"sekyro-stage__guidance-hint",children:_("capture.checkingHint")}):null]})]})}n(Ot,"CaptureStage");function tn(){return(0,P.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[(0,P.jsx)("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"}),(0,P.jsx)("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),(0,P.jsx)("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}n(tn,"FlipCameraIcon");function rn(){return(0,P.jsxs)("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:[(0,P.jsx)("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"}),(0,P.jsx)("path",{d:"M3 3l18 18"})]})}n(rn,"CameraOffIcon");var Ze=require("react");var Z=require("react/jsx-runtime");function Ht({showCoaching:e,attemptsText:t,showRetake:r,onRetake:s}){let o=z(),i=(0,Ze.useRef)(null);return(0,Ze.useEffect)(()=>{r&&i.current?.focus()},[r]),!e&&!r?null:(0,Z.jsxs)("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?(0,Z.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,Z.jsx)("p",{className:"sekyro-text-body",children:o("capture.retryCoaching.title")}),(0,Z.jsxs)("ul",{className:"sekyro-coaching",children:[(0,Z.jsx)("li",{children:o("capture.retryCoaching.light")}),(0,Z.jsx)("li",{children:o("capture.retryCoaching.eyeLevel")}),(0,Z.jsx)("li",{children:o("capture.retryCoaching.head")})]}),t!==null?(0,Z.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:t}):null]}):null,r?(0,Z.jsx)(F,{ref:i,className:"sekyro-btn--start",onClick:s,children:o("capture.recordAgain")}):null]})}n(Ht,"CapturedPanel");function Xe(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}n(Xe,"isDevBuild");var D=require("react");var Ft=require("react/jsx-runtime");function $({tone:e,role:t,children:r,testId:s}){return(0,Ft.jsx)("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":s,children:r})}n($,"Notice");var Ut=require("react");var ne=require("react/jsx-runtime"),nn=["user","environment"];function Bt({value:e,onChange:t}){let r=z(),s=(0,Ut.useId)();return(0,ne.jsxs)("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[(0,ne.jsx)("legend",{className:"sekyro-segmented__legend",children:r("capture.cameraLabel")}),(0,ne.jsx)("div",{className:"sekyro-segmented__options",children:nn.map(o=>(0,ne.jsxs)("label",{className:"sekyro-segmented__option",children:[(0,ne.jsx)("input",{type:"radio",className:"sekyro-segmented__input",name:s,value:o,checked:e===o,onChange:()=>t(o)}),(0,ne.jsxs)("span",{className:"sekyro-segmented__face",children:[(0,ne.jsx)("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),r(`capture.facing.${o}`)]})]},o))})]})}n(Bt,"FacingPicker");var p=require("react/jsx-runtime");function Q({className:e,children:t}){return(0,p.jsx)("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}n(Q,"Svg");var ot="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 Gt(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,p.jsx)("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"})]})}n(Gt,"SunIcon");function Dt(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,p.jsx)("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}n(Dt,"FaceUncoveredIcon");function qt(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),(0,p.jsx)("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),(0,p.jsx)("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}n(qt,"PhoneEyeLevelIcon");function $t(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("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"}),(0,p.jsx)("circle",{cx:"12",cy:"12",r:"2.8"})]})}n($t,"LookStraightIcon");function jt(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("path",{d:ot}),(0,p.jsx)("path",{d:"M9 13l2 2 4-4"})]})}n(jt,"CameraCheckIcon");function Wt(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("path",{d:ot}),(0,p.jsx)("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"})]})}n(Wt,"CameraAskIcon");function Yt(e){return(0,p.jsxs)(Q,{...e,children:[(0,p.jsx)("path",{d:ot}),(0,p.jsx)("path",{d:"M3 3l18 18"})]})}n(Yt,"CameraBlockedIcon");function ke({off:e,className:t}){return(0,p.jsxs)(Q,{...t!==void 0?{className:t}:{},children:[(0,p.jsx)("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?(0,p.jsx)("path",{d:"M4 4l16 16"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),(0,p.jsx)("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}n(ke,"SpeakerIcon");function Zt(e){return(0,p.jsx)(Q,{...e,children:(0,p.jsx)("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}n(Zt,"CheckIcon");function Xt(e){return(0,p.jsxs)(Q,{className:e.className??"sekyro-spinner",children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),(0,p.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}n(Xt,"SpinnerIcon");var Qe=require("react");var ae=require("react/jsx-runtime");function Qt({state:e}){let t=z(),[r,s]=(0,Qe.useState)(!1);(0,Qe.useEffect)(()=>{e!=="unknown"&&s(!0)},[e]);let o=e==="granted"?(0,ae.jsx)(jt,{}):e==="denied"?(0,ae.jsx)(Yt,{}):(0,ae.jsx)(Wt,{});return(0,ae.jsxs)("div",{role:r?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[(0,ae.jsx)("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:o}),(0,ae.jsx)("span",{children:t(`capture.permission.${e}`)})]})}n(Qt,"PermissionRow");var Jt=require("react");var j=require("react/jsx-runtime"),be=["light","uncover","eyeLevel","straight"],on={light:{key:"capture.tips.light",icon:n(()=>(0,j.jsx)(Gt,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:n(()=>(0,j.jsx)(Dt,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:n(()=>(0,j.jsx)(qt,{}),"icon")},straight:{key:"capture.tips.straight",icon:n(()=>(0,j.jsx)($t,{}),"icon")}};function er({tips:e}){let t=z(),r=(0,Jt.useId)();return e.length===0?null:(0,j.jsxs)("section",{className:"sekyro-tips","aria-labelledby":r,"data-testid":"sekyro-tips",children:[(0,j.jsx)("p",{className:"sekyro-tips__title",id:r,children:t("capture.tips.title")}),(0,j.jsx)("ul",{className:"sekyro-tips__list",children:e.map(s=>{let o=typeof s=="string"?on[s]:void 0,i=typeof s=="string"?s:s.id,c=o!==void 0?o.icon():typeof s=="string"?void 0:s.icon,u=o!==void 0?t(o.key):typeof s=="string"?s:s.text;return(0,j.jsxs)("li",{className:"sekyro-tips__item",children:[c!=null?(0,j.jsx)("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:c}):null,(0,j.jsx)("span",{children:u})]},i)})})]})}n(er,"TipList");var ce=require("react/jsx-runtime");function tr({voice:e}){let t=z();if(!e.supported)return null;let r=e.enabled;return(0,ce.jsxs)("button",{type:"button",role:"switch","aria-checked":r,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>e.toggle(),children:[(0,ce.jsxs)("span",{className:"sekyro-switch__label",children:[(0,ce.jsx)(ke,{off:!r}),t("capture.voiceGuidance")]}),(0,ce.jsx)("span",{className:"sekyro-switch__track","aria-hidden":"true",children:(0,ce.jsx)("span",{className:"sekyro-switch__thumb",children:r?(0,ce.jsx)(Zt,{className:"sekyro-switch__check"}):null})})]})}n(tr,"VoiceSwitch");var E=require("react/jsx-runtime");function rr({assets:e,onRetryAssets:t,permission:r,canChooseFacing:s,facing:o,onFacingChange:i,voice:c,tips:u,summary:d,startLabel:R,startDisabled:N,onStart:V}){let f=z(),l=(0,D.useRef)(d?.stop);l.current=d?.stop,(0,D.useEffect)(()=>()=>l.current?.(),[]);let _=(0,D.useRef)(null),v=(0,D.useRef)(null),b=(0,D.useRef)(null),T=(0,D.useRef)(e),m=(0,D.useRef)(!1);(0,D.useEffect)(()=>{let K=T.current;if(T.current=e,K===e)return;let L=m.current;e!=="loading"&&(m.current=!1),sn(_.current)&&(e==="failed"?b.current?.focus():L&&v.current?.focus())},[e]);let S=(0,D.useCallback)(()=>{m.current=!0,t()},[t]),k=e==="loading",q=k||N,M=(0,D.useCallback)(()=>{q||(l.current?.(),V())},[q,V]),a;return e==="failed"?a=(0,E.jsxs)($,{tone:"danger",testId:"sekyro-assets-error",children:[(0,E.jsx)("p",{className:"sekyro-text-body",children:f("fcv2.err.models")}),(0,E.jsx)(F,{kind:"ghost",ref:b,className:"sekyro-btn--start",onClick:S,"data-testid":"sekyro-assets-retry",children:f("common.retry")})]}):a=(0,E.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,E.jsx)(F,{ref:v,full:!0,"data-testid":"sekyro-start","aria-disabled":q?"true":void 0,"aria-busy":k?"true":void 0,onClick:M,children:k?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Xt,{}),f("capture.preparing.title")]}):R??f("capture.start")}),k?(0,E.jsx)("p",{className:"sekyro-text-muted",children:f("capture.preparing.hint")}):null]}),(0,E.jsxs)("div",{ref:_,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[u!==!1?(0,E.jsx)(er,{tips:u}):null,d!==void 0?(0,E.jsxs)(F,{kind:"ghost",className:"sekyro-btn--start",onClick:d.toggle,"data-testid":"sekyro-tips-listen",children:[(0,E.jsx)(ke,{off:!1}),f(d.playing?"capture.tips.stop":"capture.tips.listen")]}):null,(0,E.jsx)(Qt,{state:r}),s?(0,E.jsx)(Bt,{value:o,onChange:i}):null,(0,E.jsx)(tr,{voice:c}),(0,E.jsx)("p",{className:"sekyro-text-muted",children:f("capture.securityNote")}),a,(0,E.jsx)("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?f("capture.preparing.title"):e==="ready"?f("capture.ready"):""})]})}n(rr,"PreCaptureScreen");function sn(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}n(sn,"focusIsOurs");var or=require("react");var nr=require("react");function Je(){return(0,nr.useCallback)(e=>{e?.focus()},[])}n(Je,"useFocusOnMount");var J=require("react/jsx-runtime");function sr({choice:e,busy:t,failed:r,focus:s,onSelect:o}){let i=z(),c=(0,or.useId)(),u=Je();return(0,J.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":c,"data-testid":"sekyro-method",children:[(0,J.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,J.jsx)("h2",{id:c,className:"sekyro-text-body",children:i("method.title")}),(0,J.jsx)("p",{className:"sekyro-text-muted",children:i("method.description")})]}),r?(0,J.jsx)($,{tone:"danger",children:(0,J.jsx)("span",{children:i("errors.network_error")})}):null,(0,J.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:e.options.map((d,R)=>(0,J.jsx)(F,{ref:R===0&&s?u:void 0,kind:R===0?"primary":"ghost",full:!0,disabled:t,"aria-busy":t||void 0,onClick:()=>o(d),children:i(`method.${d}`)},d))})]})}n(sr,"MethodScreen");var et=require("@sekyro/web"),Ce=require("react");function ir(){let[e,t]=(0,Ce.useState)({state:"unknown",settled:!1}),[r,s]=(0,Ce.useState)(!1);return(0,Ce.useEffect)(()=>(0,et.subscribeCameraPermission)(o=>t({state:o,settled:!0})),[]),(0,Ce.useEffect)(()=>{let o=!0;return(0,et.hasMultipleCameras)().then(i=>{o&&s(i)}),()=>{o=!1}},[]),{permission:e.state,permissionSettled:e.settled,canChooseFacing:r}}n(ir,"useCameraStatus");var Se=require("react");function ar(e){let[t,r]=(0,Se.useState)({required:!1,settled:e===void 0});return(0,Se.useEffect)(()=>{let s=e?.mobileRequired;if(e===void 0||typeof s!="function"){r({required:!1,settled:!0});return}let o=!0;return r({required:!1,settled:!1}),Promise.resolve().then(()=>s.call(e)).then(i=>{o&&r({required:i===!0,settled:!0})},()=>{o&&r({required:!1,settled:!0})}),()=>{o=!1}},[e]),t}n(ar,"useMobileRequired");function cr(e){let[t,r]=(0,Se.useState)(!1);return(0,Se.useEffect)(()=>{if(r(!1),e===void 0)return;let s=e.on("busy",()=>r(!0)),o=e.on("result",()=>r(!1));return()=>{s(),o()}},[e]),t}n(cr,"useBusy");var we=require("@sekyro/web"),G=require("react");var an=n(()=>"idle","serverSnapshot");function ur(e){return(0,we.preloadLivenessAssets)(e!==void 0?{assetBaseUrl:e}:{})}n(ur,"preload");function lr(e,t=!0){let r=(0,G.useSyncExternalStore)((0,G.useCallback)(V=>(0,we.subscribeLivenessAssets)(V,e),[e]),()=>(0,we.getLivenessAssetsStatus)(e),an),[s,o]=(0,G.useState)(null),i=(0,G.useRef)(!1),c=(0,G.useCallback)(()=>{ur(e).then(V=>{i.current&&V==="idle"&&o({base:e})})},[e]);(0,G.useEffect)(()=>(i.current=!0,c(),()=>{i.current=!1}),[c]);let u=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(r!=="idle"){u.current={base:e};return}!t||u.current===null||u.current.base!==e||(u.current=null,c())},[r,e,c,t]);let d=(0,G.useCallback)(()=>{ur(e)},[e]);return{gate:s!==null&&s.base===e&&r==="idle"||r==="ready"?"ready":r==="failed"?"failed":"loading",retry:d}}n(lr,"useLivenessAssets");var pr=require("@sekyro/web"),I=require("react");var dr={progress:0,hint:null,faceDetected:!1};function fr(e){let{videoRef:t,assetBaseUrl:r}=e,o=(0,I.useRef)(e.verification).current,i=(0,I.useRef)(!1);e.verification!==o&&!i.current&&Xe()&&(i.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 c=(0,I.useRef)(null),[u,d]=(0,I.useState)("idle"),[R,N]=(0,I.useState)(dr),[V,f]=(0,I.useState)(!1),[l,_]=(0,I.useState)(!1),[v,b]=(0,I.useState)(null),[T,m]=(0,I.useState)(!1),[S,k]=(0,I.useState)(null),[q,M]=(0,I.useState)(null),[a,K]=(0,I.useState)(null),L=(0,I.useRef)(null),U=(0,I.useRef)(e);U.current=e,(0,I.useEffect)(()=>{let H=t.current;if(H===null)return;let ue={video:H,...r!==void 0?{assetBaseUrl:r}:{}},w=o!==void 0?o.liveness(ue):(0,pr.createLivenessCapture)(ue);c.current=w;let B=[w.on("state",h=>{h==="starting"&&(k(null),M(null),N(dr),_(!1),f(!1),b(null),L.current=null),d(h),U.current.onStateChange?.(h)}),w.on("gate",h=>{let se=L.current;L.current=h.progress,f(se!==null&&h.progress<se-.001&&h.progress>0&&h.progress<1),h.progress>=1&&_(!0),N(h)}),w.on("frozen",({previewDataUrl:h})=>b(h)),w.on("profile",({animations:h})=>m(h==="reduced")),w.on("captured",h=>{k(h),K(null),U.current.onCaptured?.(h)}),w.on("error",h=>{M(h),U.current.onError?.(h)}),o?.on("result",h=>{K(h),U.current.onResult?.(h)})];return()=>{for(let h of B)h?.();c.current=null,w.destroy()}},[o,t,r]);let W=(0,I.useCallback)(H=>{c.current?.start(H)},[]),ve=(0,I.useCallback)(()=>{c.current?.retry()},[]),O=(0,I.useCallback)(()=>{_(!1),f(!1),b(null),L.current=null,c.current?.switchCamera()},[]);return{state:u,gate:R,draining:V,gateLocked:l,frozenPreview:v,reduceMotion:T,artifacts:S,error:q,result:a,start:W,retry:ve,switchCamera:O}}n(fr,"useLivenessHandle");var oe=require("react");var cn=new Set(["national_number"]);function mr(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(r=>cn.has(r));return t.length>0?{...e,options:t}:null}n(mr,"pending");function gr(e){let[t,r]=(0,oe.useState)(null),[s,o]=(0,oe.useState)(e===void 0),[i,c]=(0,oe.useState)(!1),[u,d]=(0,oe.useState)(!1);(0,oe.useEffect)(()=>{if(r(null),e===void 0){o(!0);return}let f=!0,l=e.methodChoice;typeof l=="function"?(o(!1),Promise.resolve().then(()=>l.call(e)).then(v=>{f&&r(mr(v))},()=>{}).finally(()=>{f&&o(!0)})):o(!0);let _=e.on("method",v=>r(mr(v)));return()=>{f=!1,_()}},[e]);let R=(0,oe.useCallback)(async f=>{if(e===void 0)return!1;c(!0),d(!1);try{return await e.selectMethod(f),r(null),!0}catch{return d(!0),!1}finally{c(!1)}},[e]),N=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:N==="national_number"&&!u?N:null,settled:s,busy:i,failed:u,select:R}}n(gr,"useMethodChoice");var Re=require("react");var xe=["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","capture.tips.summary"];function ye(e){return e!==null&&xe.includes(e)}n(ye,"isVoiceKey");var un=["ar","fr","en"];function ln(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}n(ln,"isClipUrl");function dn(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let r={};for(let s of un){let o=t[s];if(!(typeof o!="object"||o===null))for(let[i,c]of Object.entries(o))!ye(i)||!ln(c)||((r[s]??(r[s]={}))[i]=c)}return Object.keys(r).length>0?r:null}n(dn,"toVoiceClipMap");function yr(e){let[t,r]=(0,Re.useState)(null);(0,Re.useEffect)(()=>{if(r(null),e===void 0)return;let o=!0,i=n(u=>{if(!o)return;let d=typeof u=="object"&&u!==null&&typeof u.setId=="string"?u:null;r(R=>R?.setId===d?.setId?R:d)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(i,()=>i(null))}catch{i(null)}let c=e.on("view",u=>i(u.voice));return()=>{o=!1,c()}},[e]);let s=(0,Re.useMemo)(()=>t!==null?dn(t):null,[t]);return e===void 0?null:s}n(yr,"useServerVoiceClips");var st=require("react/jsx-runtime");function hr({voice:e}){let t=z();return(0,st.jsx)(F,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>e.toggle(),children:(0,st.jsx)(ke,{off:!e.enabled,className:"sekyro-icon"})})}n(hr,"VoiceChip");var g=require("react");var pn=n((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function Te(e,t,r){let s;try{if(typeof e=="function")s=e(t,r);else{let o=e[r];s=o!=null&&pn(o,t)?o[t]:null}}catch{return null}return typeof s=="string"&&s!==""?s:null}n(Te,"resolveClip");var fn="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",kr={ar:"ar-SA",fr:"fr-FR",en:"en-US"};function ee(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}n(ee,"synth");function mn(){return ee()!==null&&typeof SpeechSynthesisUtterance=="function"}n(mn,"speechAvailable");function vr(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}n(vr,"baseLang");function br(e,t){let r=n(o=>o.replace(/_/g,"-").toLowerCase(),"norm"),s=vr(t);return e.find(o=>r(o.lang)===r(t))??e.find(o=>vr(o.lang)===s)}n(br,"pickVoice");function Cr(e){if(!mn())return!1;let t=[];try{t=ee()?.getVoices()??[]}catch{return!0}return t.length===0||br(t,e)!==void 0}n(Cr,"speechUsable");function Sr(e){let t=ee();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}n(Sr,"subscribeVoices");function Me(e){try{let t=typeof location<"u"?location.href:"http://localhost/",r=new URL(e,t);return`clip:${r.origin}${r.pathname}`}catch{return`clip:${e}`}}n(Me,"clipIdentity");function _r(e){e.pause(),e.removeAttribute("src"),e.load()}n(_r,"release");function wr(){let e=null,t=null,r=0,s=null,o=[],i=new Map,c=n(()=>{o=ee()?.getVoices()??[]},"loadVoices"),u=!1,d=n(()=>{let l=ee();u||l===null||(u=!0,c(),l.addEventListener?.("voiceschanged",c))},"bindVoices"),R=n(()=>(e??(e=new Audio),e),"element"),N=n((l,_,v)=>{let b=ee();if(b!==null&&l!==""&&typeof SpeechSynthesisUtterance=="function"){d();let T=br(o,_);if(o.length===0||T!==void 0){b.cancel();let m=new SpeechSynthesisUtterance(l);m.lang=_,T!==void 0&&(m.voice=T),m.rate=.95,v!==void 0&&(m.onend=m.onerror=v),b.speak(m);return}}v?.()},"speak"),V=n(()=>{r+=1,s=null,e!==null&&(e.pause(),e.currentTime=0),ee()?.cancel()},"stop"),f=n(l=>{for(let _ of l){let v=Me(_);if(i.has(v))continue;let b=new Audio;b.preload="auto",b.src=_,i.set(v,b)}},"warmClips");return{say(l){let _=l.url!==null?Me(l.url):`tts:${l.lang}:${l.text}`;if(_===s)return;s=_,r+=1;let v=r,b=l.onEnd,T=b!==void 0?()=>{v===r&&b()}:void 0;if(ee()?.cancel(),l.url!==null){let m=R();m.pause(),m.muted=!1,m.src=l.url,m.currentTime=0,m.onended=T??null,m.play()?.catch(S=>{v===r&&S?.name!=="AbortError"&&(l.speech?N(l.text,l.lang,T):T?.())});return}l.speech?N(l.text,l.lang,T):T?.()},unlock({lang:l,speech:_,prefetch:v}){let b=R();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let S=Uint8Array.from(atob(fn),k=>k.charCodeAt(0));t=URL.createObjectURL(new Blob([S],{type:"audio/wav"}))}let T=b.paused===!1&&t!==null&&b.src!==t;t!==null&&!T&&(b.muted=!0,b.onended=null,b.src=t,b.play()?.catch(()=>{}));let m=ee();if(_&&m!==null&&typeof SpeechSynthesisUtterance=="function"){d();let S=new SpeechSynthesisUtterance(" ");S.volume=0,S.lang=l,m.speak(S)}f(v??[])},prefetch:f,stop:V,dispose(){V(),u&&ee()?.removeEventListener?.("voiceschanged",c),u=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&_r(e),e=null;for(let l of i.values())_r(l);i.clear()}}}n(wr,"createVoicePlayer");var xr="sekyro.voiceGuidance";function Rr(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}n(Rr,"readVoicePreference");function Tr(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}n(Tr,"writeVoicePreference");var ze="capture.tips.summary",gn=typeof window<"u"?g.useLayoutEffect:g.useEffect,yn=Object.freeze({});function it(e,t){let r=new Set,s=[];for(let o of xe){let i=o===ze?null:Te(e,o,t);i===null||r.has(Me(i))||(r.add(Me(i)),s.push(i))}return s}n(it,"resolvedClipUrls");function at({locale:e,defaultClips:t,options:r}){let s=r===!1,o=s?{}:r??{},i=o.storageKey===void 0?xr:o.storageKey,[c,u]=(0,g.useState)(o.defaultEnabled??!0),d=(0,g.useRef)(c),[R,N]=(0,g.useState)(!1),[V,f]=(0,g.useState)("none"),[l,_]=(0,g.useState)(!1),v=(0,g.useRef)(!1),[b,T]=(0,g.useState)(0),m=(0,g.useRef)(null),S=(0,g.useCallback)(()=>(m.current??(m.current=wr()),m.current),[]),k=kr[e],q=o.speechFallback,M=q===void 0||q===!0?!0:q===!1?!1:q.includes(e),a=o.clips??t??yn,K=(0,g.useRef)(!1),L=(0,g.useRef)(a);gn(()=>{L.current=a,d.current=c}),(0,g.useEffect)(()=>{if(s||i===null)return;let x=Rr(i);x!==null&&(d.current=x,u(x))},[s,i]),(0,g.useEffect)(()=>{if(!(s||!M))return Sr(()=>T(x=>x+1))},[s,M]);let U=o.clips;(0,g.useEffect)(()=>{if(s)return;let x=M&&Cr(k);N(it(a,e).length>0||x),f(U!==void 0&&Te(U,ze,e)!==null?"partner":Te(a,ze,e)!==null||x?"default":"none")},[s,a,U,e,M,k,b]),(0,g.useEffect)(()=>{if(s||!c||!K.current)return;let x=it(a,e);x.length>0&&S().prefetch(x)},[s,c,a,e,S]),(0,g.useEffect)(()=>()=>{m.current?.dispose(),m.current=null,K.current=!1},[]);let W=(0,g.useCallback)(x=>{s||(K.current=!0,S().unlock({lang:k,speech:M,...x?{prefetch:it(L.current,e)}:{}}))},[s,S,k,M,e]),ve=(0,g.useCallback)(()=>W(d.current),[W]),O=(0,g.useCallback)(()=>{v.current=!1,_(!1)},[]),H=(0,g.useCallback)(()=>{O(),m.current?.stop()},[O]),ue=(0,g.useCallback)(()=>{v.current&&H()},[H]),w=(0,g.useCallback)(x=>{if(s)return;if(v.current){H();return}let le=S();le.stop(),v.current=!0,_(!0),le.say({url:Te(L.current,ze,e),text:x,lang:k,speech:M,onEnd:O})},[s,H,S,e,k,M,O]),B=(0,g.useCallback)(x=>{s||(x?W(!0):H(),i!==null&&Tr(i,x),d.current=x,u(x))},[s,W,H,i]),h=(0,g.useCallback)(()=>B(!d.current),[B]),se=(0,g.useCallback)((x,le)=>{if(s||!c)return;v.current&&O();let Ke=Te(L.current,x,e);S().say({url:Ke,text:le,lang:k,speech:M})},[s,c,e,S,k,M,O]);return(0,g.useMemo)(()=>({supported:!s&&R,enabled:!s&&c,setEnabled:B,toggle:h,unlock:ve,speakKey:se,stop:H,summary:s?"none":V,summaryPlaying:l,toggleSummary:w,stopSummary:ue}),[s,R,c,B,h,ve,se,H,V,l,w,ue])}n(at,"useVoiceGuidance");function ct(e,t,r,s){let{speakKey:o,stop:i,enabled:c}=e,u=(0,g.useRef)(!1);(0,g.useEffect)(()=>{if(!s||!c){u.current&&i(),u.current=!1;return}u.current=!0,ye(t)&&t!==ze&&r!==""&&o(t,r)},[s,c,t,r,o,i])}n(ct,"useSpeakGuidance");var C=require("react/jsx-runtime"),ut=800;function hn(e){return e===void 0||e!==!1&&e.length===be.length&&be.every(t=>e.includes(t))}n(hn,"isDefaultTips");function vn(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}n(vn,"carriesActivation");function _n(e){return typeof e=="object"&&e!==null&&!(0,y.isValidElement)(e)&&"tone"in e&&"text"in e}n(_n,"isNoticeObject");function kn(e){return e==="starting"||e==="gating"||e==="recording"}n(kn,"isCapturing");function bn(e){return e==="captured"||e==="uploading"||e==="checking"}n(bn,"isPostCapture");function Lr({verification:e,locale:t,dir:r,strings:s,slots:o,autoStart:i=!1,notice:c,startDisabled:u=!1,startLabel:d,tips:R,defaultFacing:N,voice:V,onGuidance:f,onCaptured:l,onResult:_,onError:v,onStateChange:b,assetBaseUrl:T,className:m}){let S=(0,y.useMemo)(()=>Ye(t,s),[t,s]),k=(0,y.useMemo)(()=>A=>S[A]??"",[S]),q=r??(t==="ar"?"rtl":"ltr"),M=(0,y.useRef)(null),a=fr({verification:e,videoRef:M,assetBaseUrl:T,onCaptured:l,onResult:_,onError:v,onStateChange:b}),K=lr(T,a.state==="idle"&&a.error===null),L=gr(e),U=L.choice!==null,W=ar(e),ve=cr(e),O=ir(),H=V!==!1&&V?.clips===void 0,ue=yr(H?e:void 0),w=at({locale:t,defaultClips:ue,options:V}),[B,h]=(0,y.useState)(N??"user"),se=(0,y.useRef)(null),x=(0,y.useRef)(!1),le=(0,y.useRef)(w.unlock);le.current=w.unlock,(0,y.useEffect)(()=>{let A=se.current;if(A===null)return;let me=["pointerup","touchend","click","keydown"],ie=n(()=>{for(let Ae of me)A.removeEventListener(Ae,_e,!0)},"disarm");function _e(Ae){if(x.current){ie();return}vn(Ae)&&(x.current=!0,ie(),le.current())}n(_e,"onGesture");for(let Ae of me)A.addEventListener(Ae,_e,{capture:!0,passive:!0});return ie},[]);let Ke=(0,y.useCallback)(()=>{x.current||(x.current=!0,w.unlock()),a.start({facing:B})},[w.unlock,a.start,B]),pt=(0,y.useCallback)(()=>a.start({facing:B}),[a.start,B]),Oe=(0,y.useRef)(!1),Le=a.state==="idle"&&a.error===null,ft=!U&&!W.required&&(i===!0||i==="when-permitted"&&O.permission==="granted"),mt=ft&&L.settled&&W.settled,Pr=i==="when-permitted"&&!O.permissionSettled&&!Oe.current,gt=ft&&Le&&!Oe.current,tt=(Pr||gt)&&K.gate==="ready"?"loading":K.gate;(0,y.useEffect)(()=>{!mt||!Le||K.gate!=="ready"||Oe.current||(Oe.current=!0,pt())},[mt,Le,K.gate,pt]);let Er=Le&&!U&&!W.required&&!(gt&&K.gate==="ready"),Mr=(0,y.useCallback)(()=>{h(A=>A==="user"?"environment":"user"),a.switchCamera()},[a.switchCamera]),He=(0,y.useMemo)(()=>a.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(a.artifacts.keyframe):null,[a.artifacts]);(0,y.useEffect)(()=>{if(He!==null)return()=>URL.revokeObjectURL(He)},[He]);let zr=a.frozenPreview??He,yt=e!==void 0,Y=kn(a.state),de=bn(a.state),ht=Y||de,X=a.result,vt=a.state==="done"&&X!==null,Kr=a.state==="recording"&&a.frozenPreview!==null,Or=de?"checking":Kr?"frozen":a.state==="recording"?"recording":a.gateLocked||a.gate.progress>=1?"locked":a.gate.faceDetected?"aligning":"seeking",Fe=Y?a.gate.hint:null,Ue=a.state==="starting"?"capture.preparing.title":Fe===null?null:Fe==="center"&&!a.gate.faceDetected?"fcv3.no_face":Ge(Fe),[Hr,_t]=(0,y.useState)(null);(0,y.useEffect)(()=>{if(Ue!=="fcv3.no_face"){_t(Ue);return}if(!Y)return;let A=setTimeout(()=>_t(Ue),ut);return()=>clearTimeout(A)},[Ue,Y]);let pe=Y?Hr:null,kt=pe===null?"":k(pe);ct(w,pe,kt,Y);let bt=(0,y.useRef)(f);bt.current=f,(0,y.useEffect)(()=>{if(ye(pe))try{bt.current?.(pe)}catch(A){console.error("[@sekyro/react] onGuidance threw:",A)}},[pe]);let Ve=(0,y.useMemo)(()=>({supported:w.supported,enabled:w.enabled,setEnabled:w.setEnabled,toggle:w.toggle}),[w.supported,w.enabled,w.setEnabled,w.toggle]),rt=o?.voicePrompt,Ct=rt!==void 0,St=V===void 0,wt=(0,y.useRef)(!1);(0,y.useEffect)(()=>{!Ct||!St||wt.current||!Xe()||(wt.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."))},[Ct,St]);let Fr=rt!==void 0?(A,me,ie)=>rt(A,me,ie,Ve):w.supported?()=>(0,C.jsx)(hr,{voice:Ve}):void 0,{summary:xt,summaryPlaying:Rt,toggleSummary:Tt,stopSummary:Lt}=w,Vt=k("capture.tips.summary"),Nt=xt==="partner"||xt==="default"&&hn(R),It=(0,y.useMemo)(()=>Nt?{playing:Rt,toggle:n(()=>Tt(Vt),"toggle"),stop:Lt}:void 0,[Nt,Rt,Tt,Vt,Lt]),Ur=(0,y.useMemo)(()=>({assets:tt,retryAssets:K.retry,permission:O.permission,facing:B,setFacing:h,canChooseFacing:O.canChooseFacing,voice:Ve}),[tt,K.retry,O.permission,O.canChooseFacing,B,Ve]),Br=_n(c)?(0,C.jsx)($,{tone:c.tone,testId:"sekyro-host-notice",children:(0,C.jsx)("span",{children:c.text})}):c??null,fe=X!==null&&X.status==="retry"?X:null,te=vt&&X.status==="unavailable"&&!U?X:null,Ne=vt&&(X.status==="approved"||X.status==="rejected"||X.status==="review")?X:null,Ie=n((A,me)=>{if(A===void 0)return null;if(A==="device_cooldown"){let _e=$e(t,me);if(_e!==null)return k(_e.key).replace("{time}",_e.time)}let ie=qe(A);return ie===null?null:k(ie)},"reasonText"),Gr=te!==null&&te.reason!==void 0&&te.reason!=="nni_unbound"&&te.reason!=="method_required"&&te.reason!=="mobile_required"&&!(te.reason==="no_recorder"&&a.artifacts?.degraded==="NO_RECORDER"),At=Je(),Dr=U&&L.auto===null&&!Y&&!de&&a.error===null,nt=(0,y.useCallback)(async A=>{await L.select(A)&&a.state==="done"&&a.retry()},[L.select,a.state,a.retry]);return(0,y.useEffect)(()=>{L.auto!==null&&!L.busy&&!Y&&!de&&nt(L.auto)},[L.auto,L.busy,Y,de,nt]),(0,C.jsx)(Kt,{value:k,children:(0,C.jsxs)("div",{ref:se,className:m===void 0?"sekyro-capture":`sekyro-capture ${m}`,dir:q,lang:t,"data-testid":"sekyro-liveness-capture","data-state":a.state,children:[o?.header,fe!==null&&Ie(fe.reason)!==null?(0,C.jsx)($,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:(0,C.jsx)("span",{children:Ie(fe.reason)})}):null,ve&&de?(0,C.jsx)($,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:(0,C.jsx)("span",{children:k("capture.busy")})}):null,W.required&&Le?(0,C.jsx)($,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:(0,C.jsx)("span",{children:k("reasons.mobile_required")})}):null,a.error!==null?o?.errorPanel!==void 0?o.errorPanel(a.error,a.retry):(0,C.jsxs)($,{tone:"danger",testId:"sekyro-error-notice",children:[(0,C.jsx)("span",{children:k(De(a.error.kind))}),a.error.retryable?(0,C.jsx)(F,{ref:At,kind:"ghost",className:"sekyro-btn--start",onClick:a.retry,children:k("common.retry")}):null]}):null,te!==null?(0,C.jsxs)($,{tone:"danger",testId:"sekyro-unavailable-notice",children:[(0,C.jsx)("span",{children:Ie(te.reason)??k(te.reason===void 0?"errors.session_expired":"errors.network_error")}),Gr?(0,C.jsx)(F,{ref:At,kind:"ghost",className:"sekyro-btn--start",onClick:a.retry,children:k("capture.recordAgain")}):null]}):null,Ne!==null&&Ie(Ne.reason)!==null?(0,C.jsx)($,{tone:Ne.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:(0,C.jsx)("span",{children:Ie(Ne.reason,Ne.retryAfter)})}):null,(0,C.jsx)("div",{className:ht?void 0:"sekyro-hidden","data-capture-live":ht?"":void 0,children:(0,C.jsx)(Ot,{videoRef:M,guidanceText:kt,guidanceHint:Fe,guidanceKey:pe,progress:a.gate.progress,phase:Or,draining:a.draining,stillUrl:zr,showChecking:yt,onSwitchCamera:Mr,canSwitchCamera:Y&&a.state!=="recording",voicePrompt:Fr,overlay:o?.stageOverlay,reduceMotion:a.reduceMotion})}),Dr&&L.choice!==null?(0,C.jsx)(sr,{choice:L.choice,busy:L.busy,failed:L.failed,focus:a.state==="done",onSelect:A=>{nt(A)}}):null,Er?(0,C.jsxs)(C.Fragment,{children:[Br,o?.intro!==void 0?o.intro(Ke,Ur):(0,C.jsx)(rr,{assets:tt,onRetryAssets:K.retry,permission:O.permission,canChooseFacing:O.canChooseFacing,facing:B,onFacingChange:h,voice:Ve,tips:R??be,...It!==void 0?{summary:It}:{},...d!==void 0?{startLabel:d}:{},startDisabled:u,onStart:Ke})]}):null,(0,C.jsx)(Ht,{showCoaching:fe!==null,attemptsText:fe?.attemptsRemaining!==void 0?je(S,t,fe.attemptsRemaining):null,showRetake:fe!==null&&!Y&&!de||!yt&&a.state==="captured",onRetake:a.retry}),o?.footer]})})}n(Lr,"LivenessCapture");var Ar=require("react/jsx-runtime"),he={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'},lt={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 dt(e={}){let t={};for(let r of Object.keys(lt))t[lt[r]]=e.colors?.[r]??he.colors[r];return t["--sekyro-radius"]=e.radius??he.radius,t["--sekyro-font"]=e.fontFamily??he.fontFamily,t}n(dt,"themeToCssVars");var Cn=/^#[0-9a-f]{6}$/i,Sn={none:"0px",sm:"4px",md:"8px",lg:"12px",full:"9999px"},wn={system:"",inter:"Inter","ibm-plex-sans-arabic":'"IBM Plex Sans Arabic"',"noto-sans-arabic":'"Noto Sans Arabic"',roboto:"Roboto"};function Vr(e){let t={};if(!e)return t;let r={};for(let[i,c]of Object.entries(e.colors??{}))i in lt&&i!=="ring"&&Cn.test(c??"")&&(r[i]=c);r.brand&&(r.ring=r.brand),Object.keys(r).length&&(t.colors=r);let s=Sn[e.radius];s&&(t.radius=s);let o=wn[e.fontFamily];return o!==void 0&&(t.fontFamily=o?`${o}, ${he.fontFamily}`:he.fontFamily),t}n(Vr,"brandingToTheme");function Nr(...e){let t={};for(let r of e)r?.colors&&(t.colors={...t.colors,...r.colors}),r?.radius&&(t.radius=r.radius),r?.fontFamily&&(t.fontFamily=r.fontFamily);return t}n(Nr,"mergeThemes");function Ir({theme:e,children:t,className:r}){let s=dt(e);return(0,Ar.jsx)("div",{className:r===void 0?"sekyro-root":`sekyro-root ${r}`,style:s,children:t})}n(Ir,"SekyroThemeProvider");