@sekyro/react 0.1.0-rc.8 → 0.1.0-rc.9
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 +16 -0
- package/dist/chunk-2KED7D2Q.js +2 -0
- package/dist/chunk-4CUPBFVB.js +2 -0
- package/dist/chunk-4U5FQY26.js +2 -0
- package/dist/chunk-64PTFYXL.js +2 -0
- package/dist/chunk-7C3GZLJB.js +2 -0
- package/dist/{chunk-4ENKV24I.js → chunk-EZ5TVL6P.js} +1 -1
- package/dist/{chunk-2CJEADGY.js → chunk-PYAJMHZH.js} +1 -1
- package/dist/{chunk-R2D6V2R6.js → chunk-RFCYXRRC.js} +1 -1
- package/dist/chunk-RPQZH66I.js +2 -0
- package/dist/chunk-VRS7WSIK.js +2 -0
- package/dist/chunk-WJW3SNXQ.js +2 -0
- package/dist/chunk-XZEX5KTU.js +2 -0
- package/dist/{chunk-5JPJXBN6.js → chunk-YY76AMUA.js} +1 -1
- package/dist/chunk-ZCAZDOMD.js +2 -0
- package/dist/document-capture-view-2XBWIX6K.js +2 -0
- package/dist/eid-view-4T7Y2NJC.js +2 -0
- package/dist/email-otp-view-76T5QW7H.js +2 -0
- package/dist/flow-views-LEW6T5UR.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +1 -1
- package/dist/overlay-de-WAVGHULU.js +2 -0
- package/dist/overlay-es-CHRGVULE.js +2 -0
- package/dist/overlay-pt-2QQ7WMTF.js +2 -0
- package/dist/portrait-capture-view-GORALODC.js +2 -0
- package/dist/styles.css +12 -11
- package/dist/{theme-7Jj6eSH6.d.cts → theme-DiGLpM-i.d.cts} +26 -7
- package/dist/{theme-7Jj6eSH6.d.ts → theme-DiGLpM-i.d.ts} +26 -7
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +31 -4
- package/dist/verification/index.d.ts +31 -4
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +14 -0
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-2PGJ7P7E.js +0 -2
- package/dist/chunk-36RC3M4K.js +0 -2
- package/dist/chunk-COU4Y3DB.js +0 -2
- package/dist/chunk-LZU57LVO.js +0 -2
- package/dist/chunk-OSS4NHIS.js +0 -2
- package/dist/chunk-PXRIFHY2.js +0 -2
- package/dist/chunk-Y4PPDNQR.js +0 -2
- package/dist/chunk-ZTN4YV7S.js +0 -2
- package/dist/chunk-ZVSRJKQE.js +0 -2
- package/dist/document-capture-view-IAVBLXBO.js +0 -2
- package/dist/eid-view-FK54R7ER.js +0 -2
- package/dist/email-otp-view-ZVXSJMN5.js +0 -2
- package/dist/flow-views-5VR7NLTE.js +0 -2
- package/dist/portrait-capture-view-FYUOQWF7.js +0 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-DiGLpM-i.cjs';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-DiGLpM-i.cjs';
|
|
2
3
|
import * as react from 'react';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
4
5
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -15,6 +16,7 @@ interface StepStrings {
|
|
|
15
16
|
"consent.terms.processing": string;
|
|
16
17
|
"consent.terms.sharing": string;
|
|
17
18
|
"consent.terms.retention": string;
|
|
19
|
+
"reasons.camera_unavailable": string;
|
|
18
20
|
"otp.sendTitle": string;
|
|
19
21
|
"otp.sendDescription": string;
|
|
20
22
|
"otp.prefilledNotice": string;
|
|
@@ -44,6 +46,7 @@ interface StepStrings {
|
|
|
44
46
|
"otp.reason_otp_destination_not_allowed": string;
|
|
45
47
|
"otp.reason_otp_destination_unknown": string;
|
|
46
48
|
"otp.reason_otp_rate_limited": string;
|
|
49
|
+
"otp.reason_otp_daily_cap_reached": string;
|
|
47
50
|
"session.steps.population.title": string;
|
|
48
51
|
"session.steps.population.description": string;
|
|
49
52
|
"population.label": string;
|
|
@@ -216,6 +219,7 @@ interface StepStrings {
|
|
|
216
219
|
"unsupported.title": string;
|
|
217
220
|
"unsupported.description": string;
|
|
218
221
|
"shell.subtitle": string;
|
|
222
|
+
"shell.subtitleHuman": string;
|
|
219
223
|
"shell.verifiedBy": string;
|
|
220
224
|
"doc.sub.carte_identite": string;
|
|
221
225
|
"doc.sub.residence_permit": string;
|
|
@@ -223,6 +227,8 @@ interface StepStrings {
|
|
|
223
227
|
"native.close": string;
|
|
224
228
|
"native.face.introTitle": string;
|
|
225
229
|
"native.face.introLead": string;
|
|
230
|
+
"native.face.humanIntroTitle": string;
|
|
231
|
+
"native.face.humanIntroLead": string;
|
|
226
232
|
"native.doc.holdIt": string;
|
|
227
233
|
"native.doc.changeCountry": string;
|
|
228
234
|
"native.result.approved": string;
|
|
@@ -231,6 +237,7 @@ interface StepStrings {
|
|
|
231
237
|
"native.result.expired": string;
|
|
232
238
|
"native.result.copied": string;
|
|
233
239
|
"native.result.back": string;
|
|
240
|
+
"emailOtp.reason_otp_daily_cap_reached"?: string;
|
|
234
241
|
"emailOtp.sendTitle"?: string;
|
|
235
242
|
"emailOtp.sendDescription"?: string;
|
|
236
243
|
"emailOtp.prefilledNotice"?: string;
|
|
@@ -322,6 +329,16 @@ interface StepStrings {
|
|
|
322
329
|
"native.scan.reading"?: string;
|
|
323
330
|
"native.scan.putDown"?: string;
|
|
324
331
|
"native.scan.retry"?: string;
|
|
332
|
+
"consent.human.terms.intro"?: string;
|
|
333
|
+
"consent.human.terms.data"?: string;
|
|
334
|
+
"consent.human.terms.processing"?: string;
|
|
335
|
+
"consent.human.terms.sharing"?: string;
|
|
336
|
+
"consent.human.terms.retention"?: string;
|
|
337
|
+
"capture.noCamera.title"?: string;
|
|
338
|
+
"capture.noCamera.body"?: string;
|
|
339
|
+
"capture.noCamera.continue"?: string;
|
|
340
|
+
"capture.noCamera.deniedTitle"?: string;
|
|
341
|
+
"capture.noCamera.deniedBody"?: string;
|
|
325
342
|
"choice.title"?: string;
|
|
326
343
|
"choice.description"?: string;
|
|
327
344
|
"choice.switch"?: string;
|
|
@@ -373,6 +390,13 @@ interface StepStrings {
|
|
|
373
390
|
"inApp.continueAnyway"?: string;
|
|
374
391
|
}
|
|
375
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Loads the copy of a Human-only locale (es, pt, de); resolves at once for ar/fr/en. The components load it by
|
|
395
|
+
* themselves (they render once it is there); call it ahead to have the copy ready on the first render. A failed
|
|
396
|
+
* download leaves the locale on English.
|
|
397
|
+
*/
|
|
398
|
+
declare function loadSekyroLocale(locale: SekyroLocale): Promise<void>;
|
|
399
|
+
|
|
376
400
|
declare const arSteps: StepStrings;
|
|
377
401
|
|
|
378
402
|
declare const enSteps: StepStrings;
|
|
@@ -383,17 +407,19 @@ type SekyroStrings = Strings & StepStrings;
|
|
|
383
407
|
type SekyroStringKey = keyof SekyroStrings;
|
|
384
408
|
type StepTranslate = (key: SekyroStringKey, vars?: Record<string, string | number>) => string;
|
|
385
409
|
declare function formatTemplate(template: string, vars?: Record<string, string | number>): string;
|
|
410
|
+
/** 0.1 built-ins → step built-ins → (es/pt/de) the locale's loaded overlay → overrides. */
|
|
386
411
|
declare function resolveSekyroStrings(locale: SekyroLocale, overrides?: Partial<SekyroStrings>): SekyroStrings;
|
|
387
412
|
interface StepI18n {
|
|
388
413
|
locale: SekyroLocale;
|
|
389
414
|
strings: SekyroStrings;
|
|
390
415
|
t: StepTranslate;
|
|
391
416
|
}
|
|
417
|
+
/** es/pt/de: renders once the locale's overlay is loaded (no English flash). */
|
|
392
418
|
declare function StepI18nProvider({ locale, strings, children }: {
|
|
393
419
|
locale: SekyroLocale;
|
|
394
420
|
strings?: Partial<SekyroStrings>;
|
|
395
421
|
children: ReactNode;
|
|
396
|
-
}): react.JSX.Element;
|
|
422
|
+
}): react.JSX.Element | null;
|
|
397
423
|
/** Props win over the surrounding provider; default English. */
|
|
398
424
|
declare function useStepI18n(locale?: SekyroLocale, strings?: Partial<SekyroStrings>): StepI18n;
|
|
399
425
|
|
|
@@ -483,7 +509,8 @@ interface SekyroVerificationProps {
|
|
|
483
509
|
voice?: false | VoiceOptions;
|
|
484
510
|
livenessProps?: Omit<LivenessCaptureProps, "verification" | "locale" | "dir" | "strings" | "assetBaseUrl" | "voice" | "onCaptured" | "onResult">;
|
|
485
511
|
/**
|
|
486
|
-
* `header` and `footer` replace the partner header and the "Verified by Sekyro AI"
|
|
512
|
+
* `header` and `footer` replace the partner header and the "Verified by Sekyro AI" link (`footer: null` hides it;
|
|
513
|
+
* the link also hides when the org hides the attribution, `branding.hideAttribution`);
|
|
487
514
|
* `headerEnd` sits at the inline end of the partner header (a language menu), before the close button.
|
|
488
515
|
*/
|
|
489
516
|
slots?: {
|
|
@@ -528,4 +555,4 @@ declare function VerificationResultScreen({ step, locale, strings, className, on
|
|
|
528
555
|
onClose?: () => void;
|
|
529
556
|
}): react.JSX.Element;
|
|
530
557
|
|
|
531
|
-
export { DocumentCapture, EidStep, type EidStepProps, EmailOtpStep, type EmailOtpStepProps, MethodChoice, NniEntry, PhoneOtpStep, type PhoneOtpStepProps, PortraitCapture, type SekyroCloseEvent, type SekyroColorScheme, SekyroFlow, type SekyroFlowProps, SekyroLocale, type SekyroStringKey, type SekyroStrings, SekyroVerification, type SekyroVerificationProps, type StepComponentProps, type StepI18n, StepI18nProvider, type StepStrings, type StepTranslate, Strings, VerificationResultScreen, arSteps, enSteps, formatTemplate, frSteps, isInAppBrowser, resolveSekyroStrings, useStepI18n, useVerificationStep };
|
|
558
|
+
export { DocumentCapture, EidStep, type EidStepProps, EmailOtpStep, type EmailOtpStepProps, MethodChoice, NniEntry, PhoneOtpStep, type PhoneOtpStepProps, PortraitCapture, type SekyroCloseEvent, type SekyroColorScheme, SekyroFlow, type SekyroFlowProps, SekyroLocale, type SekyroStringKey, type SekyroStrings, SekyroVerification, type SekyroVerificationProps, type StepComponentProps, type StepI18n, StepI18nProvider, type StepStrings, type StepTranslate, Strings, VerificationResultScreen, arSteps, enSteps, formatTemplate, frSteps, isInAppBrowser, loadSekyroLocale, resolveSekyroStrings, useStepI18n, useVerificationStep };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-DiGLpM-i.js';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-DiGLpM-i.js';
|
|
2
3
|
import * as react from 'react';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
4
5
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -15,6 +16,7 @@ interface StepStrings {
|
|
|
15
16
|
"consent.terms.processing": string;
|
|
16
17
|
"consent.terms.sharing": string;
|
|
17
18
|
"consent.terms.retention": string;
|
|
19
|
+
"reasons.camera_unavailable": string;
|
|
18
20
|
"otp.sendTitle": string;
|
|
19
21
|
"otp.sendDescription": string;
|
|
20
22
|
"otp.prefilledNotice": string;
|
|
@@ -44,6 +46,7 @@ interface StepStrings {
|
|
|
44
46
|
"otp.reason_otp_destination_not_allowed": string;
|
|
45
47
|
"otp.reason_otp_destination_unknown": string;
|
|
46
48
|
"otp.reason_otp_rate_limited": string;
|
|
49
|
+
"otp.reason_otp_daily_cap_reached": string;
|
|
47
50
|
"session.steps.population.title": string;
|
|
48
51
|
"session.steps.population.description": string;
|
|
49
52
|
"population.label": string;
|
|
@@ -216,6 +219,7 @@ interface StepStrings {
|
|
|
216
219
|
"unsupported.title": string;
|
|
217
220
|
"unsupported.description": string;
|
|
218
221
|
"shell.subtitle": string;
|
|
222
|
+
"shell.subtitleHuman": string;
|
|
219
223
|
"shell.verifiedBy": string;
|
|
220
224
|
"doc.sub.carte_identite": string;
|
|
221
225
|
"doc.sub.residence_permit": string;
|
|
@@ -223,6 +227,8 @@ interface StepStrings {
|
|
|
223
227
|
"native.close": string;
|
|
224
228
|
"native.face.introTitle": string;
|
|
225
229
|
"native.face.introLead": string;
|
|
230
|
+
"native.face.humanIntroTitle": string;
|
|
231
|
+
"native.face.humanIntroLead": string;
|
|
226
232
|
"native.doc.holdIt": string;
|
|
227
233
|
"native.doc.changeCountry": string;
|
|
228
234
|
"native.result.approved": string;
|
|
@@ -231,6 +237,7 @@ interface StepStrings {
|
|
|
231
237
|
"native.result.expired": string;
|
|
232
238
|
"native.result.copied": string;
|
|
233
239
|
"native.result.back": string;
|
|
240
|
+
"emailOtp.reason_otp_daily_cap_reached"?: string;
|
|
234
241
|
"emailOtp.sendTitle"?: string;
|
|
235
242
|
"emailOtp.sendDescription"?: string;
|
|
236
243
|
"emailOtp.prefilledNotice"?: string;
|
|
@@ -322,6 +329,16 @@ interface StepStrings {
|
|
|
322
329
|
"native.scan.reading"?: string;
|
|
323
330
|
"native.scan.putDown"?: string;
|
|
324
331
|
"native.scan.retry"?: string;
|
|
332
|
+
"consent.human.terms.intro"?: string;
|
|
333
|
+
"consent.human.terms.data"?: string;
|
|
334
|
+
"consent.human.terms.processing"?: string;
|
|
335
|
+
"consent.human.terms.sharing"?: string;
|
|
336
|
+
"consent.human.terms.retention"?: string;
|
|
337
|
+
"capture.noCamera.title"?: string;
|
|
338
|
+
"capture.noCamera.body"?: string;
|
|
339
|
+
"capture.noCamera.continue"?: string;
|
|
340
|
+
"capture.noCamera.deniedTitle"?: string;
|
|
341
|
+
"capture.noCamera.deniedBody"?: string;
|
|
325
342
|
"choice.title"?: string;
|
|
326
343
|
"choice.description"?: string;
|
|
327
344
|
"choice.switch"?: string;
|
|
@@ -373,6 +390,13 @@ interface StepStrings {
|
|
|
373
390
|
"inApp.continueAnyway"?: string;
|
|
374
391
|
}
|
|
375
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Loads the copy of a Human-only locale (es, pt, de); resolves at once for ar/fr/en. The components load it by
|
|
395
|
+
* themselves (they render once it is there); call it ahead to have the copy ready on the first render. A failed
|
|
396
|
+
* download leaves the locale on English.
|
|
397
|
+
*/
|
|
398
|
+
declare function loadSekyroLocale(locale: SekyroLocale): Promise<void>;
|
|
399
|
+
|
|
376
400
|
declare const arSteps: StepStrings;
|
|
377
401
|
|
|
378
402
|
declare const enSteps: StepStrings;
|
|
@@ -383,17 +407,19 @@ type SekyroStrings = Strings & StepStrings;
|
|
|
383
407
|
type SekyroStringKey = keyof SekyroStrings;
|
|
384
408
|
type StepTranslate = (key: SekyroStringKey, vars?: Record<string, string | number>) => string;
|
|
385
409
|
declare function formatTemplate(template: string, vars?: Record<string, string | number>): string;
|
|
410
|
+
/** 0.1 built-ins → step built-ins → (es/pt/de) the locale's loaded overlay → overrides. */
|
|
386
411
|
declare function resolveSekyroStrings(locale: SekyroLocale, overrides?: Partial<SekyroStrings>): SekyroStrings;
|
|
387
412
|
interface StepI18n {
|
|
388
413
|
locale: SekyroLocale;
|
|
389
414
|
strings: SekyroStrings;
|
|
390
415
|
t: StepTranslate;
|
|
391
416
|
}
|
|
417
|
+
/** es/pt/de: renders once the locale's overlay is loaded (no English flash). */
|
|
392
418
|
declare function StepI18nProvider({ locale, strings, children }: {
|
|
393
419
|
locale: SekyroLocale;
|
|
394
420
|
strings?: Partial<SekyroStrings>;
|
|
395
421
|
children: ReactNode;
|
|
396
|
-
}): react.JSX.Element;
|
|
422
|
+
}): react.JSX.Element | null;
|
|
397
423
|
/** Props win over the surrounding provider; default English. */
|
|
398
424
|
declare function useStepI18n(locale?: SekyroLocale, strings?: Partial<SekyroStrings>): StepI18n;
|
|
399
425
|
|
|
@@ -483,7 +509,8 @@ interface SekyroVerificationProps {
|
|
|
483
509
|
voice?: false | VoiceOptions;
|
|
484
510
|
livenessProps?: Omit<LivenessCaptureProps, "verification" | "locale" | "dir" | "strings" | "assetBaseUrl" | "voice" | "onCaptured" | "onResult">;
|
|
485
511
|
/**
|
|
486
|
-
* `header` and `footer` replace the partner header and the "Verified by Sekyro AI"
|
|
512
|
+
* `header` and `footer` replace the partner header and the "Verified by Sekyro AI" link (`footer: null` hides it;
|
|
513
|
+
* the link also hides when the org hides the attribution, `branding.hideAttribution`);
|
|
487
514
|
* `headerEnd` sits at the inline end of the partner header (a language menu), before the close button.
|
|
488
515
|
*/
|
|
489
516
|
slots?: {
|
|
@@ -528,4 +555,4 @@ declare function VerificationResultScreen({ step, locale, strings, className, on
|
|
|
528
555
|
onClose?: () => void;
|
|
529
556
|
}): react.JSX.Element;
|
|
530
557
|
|
|
531
|
-
export { DocumentCapture, EidStep, type EidStepProps, EmailOtpStep, type EmailOtpStepProps, MethodChoice, NniEntry, PhoneOtpStep, type PhoneOtpStepProps, PortraitCapture, type SekyroCloseEvent, type SekyroColorScheme, SekyroFlow, type SekyroFlowProps, SekyroLocale, type SekyroStringKey, type SekyroStrings, SekyroVerification, type SekyroVerificationProps, type StepComponentProps, type StepI18n, StepI18nProvider, type StepStrings, type StepTranslate, Strings, VerificationResultScreen, arSteps, enSteps, formatTemplate, frSteps, isInAppBrowser, resolveSekyroStrings, useStepI18n, useVerificationStep };
|
|
558
|
+
export { DocumentCapture, EidStep, type EidStepProps, EmailOtpStep, type EmailOtpStepProps, MethodChoice, NniEntry, PhoneOtpStep, type PhoneOtpStepProps, PortraitCapture, type SekyroCloseEvent, type SekyroColorScheme, SekyroFlow, type SekyroFlowProps, SekyroLocale, type SekyroStringKey, type SekyroStrings, SekyroVerification, type SekyroVerificationProps, type StepComponentProps, type StepI18n, StepI18nProvider, type StepStrings, type StepTranslate, Strings, VerificationResultScreen, arSteps, enSteps, formatTemplate, frSteps, isInAppBrowser, loadSekyroLocale, resolveSekyroStrings, useStepI18n, useVerificationStep };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as ie,d as ae,e as le}from"../chunk-COU4Y3DB.js";import{a as qe}from"../chunk-4ENKV24I.js";import{a as Qe}from"../chunk-5JPJXBN6.js";import{a as Je,b as Xe,c as Ze,d as je}from"../chunk-OSS4NHIS.js";import{a as Ue,b as ze,d as Ke,g as We}from"../chunk-ZVSRJKQE.js";import{a as G}from"../chunk-R2D6V2R6.js";import{a as wt,b as Pt,c as xt,d as _t,e as It,f as te,g as b}from"../chunk-Y4PPDNQR.js";import{a as et}from"../chunk-ZTN4YV7S.js";import{b as $e}from"../chunk-36RC3M4K.js";import{a as $}from"../chunk-2CJEADGY.js";import{a as z,b as K,c as ce,d as Ge,g as Ye}from"../chunk-2PGJ7P7E.js";import{a as v,b as pe}from"../chunk-LZU57LVO.js";import{a as i,b as g,h as Oe,i as He,n as me,o as se}from"../chunk-PXRIFHY2.js";import{useEffect as Et,useState as tt}from"react";function fe(e){let[t,n]=tt(()=>e?.currentStep?.()??null),[s,l]=tt(null);return Et(()=>{if(e===void 0)return;if(typeof e.run!="function"){l(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let r=!0,o=e.on("step",a=>{r&&n(a)});return e.run().then(a=>{r&&n(p=>p??a)},a=>{r&&l(a)}),()=>{r=!1,o()}},[e]),{step:t,error:s}}i(fe,"useVerificationStep");import{useEffect as Vt,useId as Lt,useRef as Tt,useState as de}from"react";import{Fragment as nt,jsx as S,jsxs as F}from"react/jsx-runtime";var ot=i((e,t)=>{if(e===void 0)return 0;let n=Date.parse(e)-t;return Number.isFinite(n)?Math.max(0,Math.ceil(n/1e3)):0},"secondsUntil"),Rt=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),At=["whatsapp","sms"],Mt=new Set(["otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited"]),q="+222";function Dt(e){let t=e.replace(/[\s-]/g,""),n=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(n)?`+${n}`:null}i(Dt,"normalizedPhone");function Bt({id:e,label:t,value:n,onChange:s,placeholder:l}){let r=n.startsWith("+")&&!n.startsWith(q),o=r?n:n.slice(n.startsWith(q)?q.length:0).trim(),a=Tt(null);return Vt(()=>{let p=setTimeout(()=>a.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(p)},[]),F("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:e,children:t}),F("div",{className:"sekyro-phone",dir:"ltr",children:[r?null:F("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[S("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:"🇲🇷"}),q]}),S("input",{ref:a,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...r?{}:{"aria-describedby":`${e}-dial`},placeholder:l,value:o,onChange:p=>{let m=p.target.value.replace(/[^\d +]/g,"");s(m.startsWith("+")?m:q+m.replace(/\D/g,""))}})]})]})}i(Bt,"PhoneField");function ye({step:e,locale:t,strings:n,className:s,defaultPhone:l=q,onError:r}){let o=b(t,n),{t:a}=o,[p,m]=de(l),[k,y]=de(""),[f,h]=de(!1),[w,E]=de(null),V=e.phase==="verify",L=Qe(V),N=Lt(),H=i(async P=>{h(!0),E(null);try{await P()}catch(I){E(G(I,o.strings)),r?.(I)}finally{h(!1)}},"run"),M=At.filter(P=>(e.channels??[]).includes(P)),u=Dt(p),C=!e.needsPhone||u!==null,d=i((P,I=!1)=>{H(()=>e.send({...e.needsPhone&&(!I||p!==l)?{phone:u??p}:{},...P!==void 0?{channel:P}:{}}))},"send"),D=i(P=>{H(()=>e.verify(P))},"submitCode"),De=i(P=>{P.preventDefault(),V?D(k):M.length<=1&&C&&d(M[0])},"onSubmit"),Be=ot(e.codeExpiresAt,L),ee=ot(e.resendAvailableAt,L),re=V&&e.codeExpiresAt!==void 0&&Be===0,ue=i(P=>a(P==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[vt,Nt]=a("otp.sentTo",{channel:ue(e.channel)}).split("{number}"),Ct=e.reason==="otp_mismatch"?F(v,{tone:"danger",children:[S("span",{children:a("otp.reason_otp_mismatch")}),S("span",{children:pe(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Mt.has(e.reason)?S(v,{tone:"warning",children:S("span",{children:a(`otp.reason_${e.reason}`)})}):null,Fe=F(nt,{children:[Ct,w!==null?S(v,{tone:"danger",children:S("span",{children:a(w)})}):null]});if(V){let P=M.length===0;return F("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":N,onSubmit:De,noValidate:!0,children:[S(z,{id:N,title:a("otp.verifyTitle"),lead:F(nt,{children:[vt,S("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),Nt]})}),Fe,F("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:`${N}-code`,children:a("otp.codeLabel")}),S(qe,{id:`${N}-code`,value:k,invalid:e.reason==="otp_mismatch",onChange:I=>{y(I),I.length===6&&k.length!==6&&!f&&!e.attemptsExhausted&&D(I)}}),S("span",{className:`sekyro-help sekyro-otp-expiry${re?" is-danger":""}`,"aria-hidden":!re||void 0,children:re?a("otp.expired"):a("otp.expiresIn",{time:Rt(Be)})})]}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:re?a("otp.expired"):""}),F(K,{children:[S(g,{type:"submit",full:!0,disabled:f||k.length!==6||e.attemptsExhausted,"aria-busy":f||void 0,children:a("otp.verify")}),P?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:f||ee>0,onClick:()=>d(void 0,!0),children:ee>0?a("otp.resendIn",{seconds:ee}):a("otp.resend")}):ee>0?S("p",{className:"sekyro-resend is-waiting",children:a("otp.resendIn",{seconds:ee})}):S("div",{className:"sekyro-resend-row",children:M.map(I=>S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:f,onClick:()=>d(I,!0),children:a("otp.resendBy",{channel:ue(I)})},I))})]})]})}return F("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":N,onSubmit:De,noValidate:!0,children:[S(z,{id:N,title:a("otp.sendTitle"),lead:a("otp.sendDescription")}),Fe,e.needsPhone?S(Bt,{id:`${N}-phone`,label:a("otp.phoneLabel"),value:p,onChange:m,placeholder:a("otp.phonePlaceholder").replace(q,"").trim()}):S("p",{className:"sekyro-text-muted",children:a("otp.prefilledNotice")}),S(K,{children:M.length>0?F("div",{className:"sekyro-actions__group",role:"group","aria-label":a("otp.chooseChannel"),children:[S("p",{className:"sekyro-label","aria-hidden":"true",children:a("otp.chooseChannel")}),M.map((P,I)=>S(g,{kind:I===0?"primary":"ghost",full:!0,disabled:f||!C,"aria-busy":I===0&&f||void 0,onClick:()=>d(P),children:a("otp.sendBy",{channel:ue(P)})},P))]}):S(g,{type:"submit",full:!0,disabled:f||!C,"aria-busy":f||void 0,children:a("otp.send")})})]})}i(ye,"PhoneOtpStep");import{lazy as Ot,Suspense as Ht,useMemo as $t,useState as Ut}from"react";import{Component as Ft}from"react";var ke=class ke extends Ft{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(ke,"LoadBoundary");var O=ke;import{jsx as Y,jsxs as Kt}from"react/jsx-runtime";var zt={load:i(()=>import("../email-otp-view-ZVXSJMN5.js"),"load")};function he({locale:e,strings:t,...n}){let s=b(e,t),[l,r]=Ut(0),o=$t(()=>Ot(()=>zt.load().then(p=>({default:p.EmailOtpView}))),[l]),a=Kt(v,{tone:"danger",children:[Y("span",{children:s.t("errors.network_error")}),Y(g,{kind:"ghost",onClick:()=>r(p=>p+1),children:s.t("common.retry")})]});return Y(O,{fallback:a,children:Y(Ht,{fallback:Y("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Y(o,{...n,i18n:s})})},l)}i(he,"EmailOtpStep");import{lazy as Wt,Suspense as qt,useMemo as Gt,useState as Yt}from"react";import{jsx as Q,jsxs as Jt}from"react/jsx-runtime";var Qt={load:i(()=>import("../eid-view-FK54R7ER.js"),"load")};function Se({locale:e,strings:t,...n}){let s=b(e,t),[l,r]=Yt(0),o=Gt(()=>Wt(()=>Qt.load().then(p=>({default:p.EidView}))),[l]),a=Jt(v,{tone:"danger",children:[Q("span",{children:s.t("errors.network_error")}),Q(g,{kind:"ghost",onClick:()=>r(p=>p+1),children:s.t("common.retry")})]});return Q(O,{fallback:a,children:Q(qt,{fallback:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:Q(o,{...n,i18n:s})})},l)}i(Se,"EidStep");import{useMemo as no}from"react";import{lazy as Xt,Suspense as Zt,useMemo as jt,useState as eo}from"react";import{jsx as J,jsxs as oo}from"react/jsx-runtime";var to={load:i(()=>import("../flow-views-5VR7NLTE.js"),"load")};function R({view:e,i18n:t,quiet:n,...s}){let[l,r]=eo(0),o=jt(()=>Xt(()=>to.load().then(p=>({default:p[e]}))),[e,l]),a=oo(v,{tone:"danger",children:[J("span",{children:t.t("errors.network_error")}),J(g,{kind:"ghost",onClick:()=>r(p=>p+1),children:t.t("common.retry")})]});return J(O,{fallback:a,children:J(Zt,{fallback:n===!0?null:J("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:J(o,{...s,i18n:t})})},l)}i(R,"Flow");import{jsx as ge,jsxs as ro}from"react/jsx-runtime";function be({step:e,locale:t,strings:n,className:s,onError:l}){let r=b(t,n),{busy:o,error:a,run:p}=Ze(r,l),m=no(()=>e.choice.options.flatMap(y=>{let f=Xe(y,r),h=Je[y.service];return f===null?[]:[{id:y.id,label:f,glyph:h&&ge($,{name:h})}]}),[e.choice.options,r]),k=e.choice.options.find(y=>y.service==="national_eid");return ro("div",{className:s,children:[ge(Ke,{title:r.t("method.title"),description:r.t("method.description"),options:m,busy:o,error:a,focus:!0,testId:"sekyro-method",onChoose:y=>p(()=>e.choose(y))}),k?.nationalEid?.afterPass==="continue"?ge(R,{view:"EidContinueHint",i18n:r,provider:k.nationalEid.providerName,quiet:!0}):null]})}i(be,"MethodChoice");import{isValidNni as so,normalizeNni as rt}from"@sekyro/web";import{useId as io,useState as ve}from"react";import{Fragment as ao,jsx as x,jsxs as X}from"react/jsx-runtime";function Ne({step:e,locale:t,strings:n,className:s,onError:l}){let r=b(t,n),{t:o}=r,[a,p]=ve(""),[m,k]=ve(!1),[y,f]=ve(null),h=io(),w=e.attemptsExhausted,E=i(async C=>{k(!0),f(null);try{await C()}catch(d){f(G(d,r.strings)),l?.(d)}finally{k(!1)}},"run"),V=i(C=>{if(C.preventDefault(),e.source!=="typed"){E(()=>e.confirm());return}let d=rt(a);if(!/^\d{10}$/.test(d))return f("population.invalid");if(!so(d))return f("population.reason_nni_invalid");E(()=>e.submitNni(d))},"onSubmit"),L=pe(r,e.attemptsRemaining,w),N=X(ao,{children:[e.reason==="registry_unavailable"?X(v,{tone:"warning",children:[x("span",{children:o("population.reason_registry_unavailable")}),x("span",{children:L})]}):null,e.reason==="nni_not_found"&&e.canUseDocument?X(v,{tone:"warning",children:[x("span",{children:o("population.reason_nni_not_found_or_document")}),x("span",{children:L}),x(g,{kind:"ghost",disabled:m,onClick:()=>{E(()=>e.useDocument())},children:o("population.useDocument")})]}):null,e.reason==="nni_not_found"&&!e.canUseDocument||e.reason==="nni_invalid"?X(v,{tone:"danger",children:[x("span",{children:o(e.reason==="nni_not_found"?"population.reason_nni_not_found":"population.reason_nni_invalid")}),x("span",{children:L})]}):null,w&&e.reason===void 0?x(v,{tone:"danger",children:x("span",{children:L})}):null,y!==null?x(v,{tone:"danger",children:x("span",{children:o(y)})}):null]}),[H,M,u]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return X("form",{className:`sekyro-step${s?` ${s}`:""}`,"aria-labelledby":h,onSubmit:V,noValidate:!0,children:[x(z,{id:h,title:o(H),lead:o(M)}),N,e.source==="typed"?X("div",{className:"sekyro-field",children:[x("label",{className:"sekyro-label",htmlFor:`${h}-nni`,children:o("population.label")}),x("input",{id:`${h}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:a,"aria-describedby":`${h}-nni-help`,"aria-invalid":y==="population.invalid"||y==="population.reason_nni_invalid"||void 0,onChange:C=>{f(null),p(rt(C.target.value).replace(/\D/g,"").slice(0,10))}}),x("span",{id:`${h}-nni-help`,className:"sekyro-help",children:o("population.helper")})]}):null,x(K,{children:w?null:x(g,{type:"submit",full:!0,disabled:m,"aria-busy":m||void 0,children:o(u)})})]})}i(Ne,"NniEntry");import{acceptedIssuers as fo,acceptedTypesFor as yo,warmDocumentCapture as ko}from"@sekyro/web";import{lazy as ho,Suspense as So,useEffect as go,useMemo as bo,useState as ct}from"react";import{acceptedIssuers as lo,acceptedTypesFor as Ce}from"@sekyro/web";import{useEffect as st,useId as co,useMemo as it,useState as we}from"react";import{jsx as _,jsxs as Z}from"react/jsx-runtime";var at=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),po=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),uo=220;function mo(e,t){let n=null;try{n=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(r=>({code:r,name:n?.of(r)??r})),l=new Intl.Collator(e);return s.sort((r,o)=>r.code==="MR"?-1:o.code==="MR"?1:l.compare(r.name,o.name))}i(mo,"countryNames");function lt({step:e,i18n:t,issuer:n,onPicked:s}){let{t:l,locale:r}=t,o=it(()=>lo(e.documents),[e.documents]),a=it(()=>mo(r,o),[r,o]),p=o.length===1?o[0]:null,[m,k]=we(n??p),[y,f]=we(""),[h,w]=we(null),E=co(),V=p===null?[]:Ce(e.documents,p),L=p!==null&&V.length===1?V[0]:null;st(()=>{p!==null&&L!==null&&e.selectDocument(p,L)},[p,L]);let N=i((u,C)=>{e.selectDocument(u,C),s?.()},"pick"),H=i(u=>{let C=Ce(e.documents,u);C.length===1?N(u,C[0]):k(u)},"chooseIssuer");if(st(()=>{if(h===null||m===null)return;let u=setTimeout(()=>N(m,h),uo);return()=>clearTimeout(u)},[h]),L!==null)return null;if(m===null){let u=at(y.trim()),C=u===""?a:a.filter(d=>at(d.name).includes(u)||d.code.toLowerCase()===u);return Z("section",{className:"sekyro-step",children:[_(z,{title:l("doc.countryTitle"),lead:l("doc.pickDescription")}),Z("div",{className:"sekyro-field",children:[_("label",{className:"sekyro-label",htmlFor:E,children:l("doc.countryLabel")}),_("input",{id:E,type:"search",className:"sekyro-input",placeholder:l("doc.countrySearch"),value:y,onChange:d=>f(d.target.value)})]}),C.length===0?_("p",{className:"sekyro-text-muted",children:l("doc.noCountryMatch")}):_("ul",{className:"sekyro-rows",children:C.map(d=>_("li",{children:Z("button",{type:"button",className:"sekyro-row-btn",onClick:()=>H(d.code),children:[_("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:po(d.code)}),d.name]})},d.code))}),_(K,{children:null})]})}let M=Ce(e.documents,m);return Z("section",{className:"sekyro-step",children:[_(z,{title:l("doc.pickTitle"),lead:l("native.doc.holdIt")}),_("div",{className:"sekyro-choices",children:M.map(u=>Z("button",{type:"button",className:"sekyro-card","aria-pressed":h===u,disabled:h!==null&&h!==u,onClick:()=>w(u),children:[_($,{name:u==="passport"?"passport":"card"}),Z("span",{className:"sekyro-card__body",children:[_("span",{className:"sekyro-card__title",children:l(`doc.type.${u}`)}),_("span",{className:"sekyro-card__sub",children:l(`doc.sub.${u}`)})]}),_("span",{className:"sekyro-radio","aria-hidden":"true"})]},u))}),o.length>1?_("button",{type:"button",className:"sekyro-link",onClick:()=>{k(null),w(null)},children:l("native.doc.changeCountry")}):null,_(K,{children:null})]})}i(lt,"DocumentPicker");import{jsx as W,jsxs as No}from"react/jsx-runtime";var vo={load:i(()=>import("../document-capture-view-IAVBLXBO.js"),"load")};function Pe({step:e,locale:t,strings:n,className:s,liveMrz:l}){let r=b(t,n),[o,a]=ct(0),[p,m]=ct(null),k=fo(e.documents).length>1,y=e.issuer!==null&&yo(e.documents,e.issuer).length>1,f=bo(()=>ho(()=>vo.load().then(w=>({default:w.DocumentCaptureView}))),[o]);go(()=>{ko()},[]);let h=No(v,{tone:"danger",children:[W("span",{children:r.t("errors.network_error")}),W(g,{kind:"ghost",onClick:()=>a(w=>w+1),children:r.t("doc.retryCamera")})]});return W("div",{className:s,children:e.documentType===null||e.issuer===null||p!==null?W(lt,{step:e,i18n:r,...p==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>m(null)}):W(O,{fallback:h,children:W(So,{fallback:W("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:W(f,{step:e,i18n:r,liveMrz:l,...k?{onChangeCountry:i(()=>m("country"),"onChangeCountry")}:{},...y?{onChangeDocument:i(()=>m("document"),"onChangeDocument")}:{}})})},o)})}i(Pe,"DocumentCapture");import{warmPortraitCapture as Co}from"@sekyro/web";import{Component as wo,lazy as Po,Suspense as xo,useEffect as _o,useMemo as Io,useState as Eo}from"react";import{jsx as T,jsxs as _e}from"react/jsx-runtime";var Vo={load:i(()=>import("../portrait-capture-view-FYUOQWF7.js"),"load")},Ee=class Ee extends wo{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Ee,"LoadBoundary");var xe=Ee;function Lo({step:e,i18n:t}){let{t:n}=t,s=se();return _e("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[T("h2",{ref:s,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?T("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?_e(v,{tone:"danger",children:[T("span",{children:n("portrait.uploadFailed")}),T(g,{kind:"ghost",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):T("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Lo,"MatchPhase");function Ie({step:e,locale:t,strings:n,className:s,assetBaseUrl:l}){let r=b(t,n),[o,a]=Eo(0),p=Io(()=>Po(()=>Vo.load().then(k=>({default:k.PortraitCaptureView}))),[o]);if(_o(()=>{e.phase==="capture"&&Co()},[e.phase]),e.phase==="match")return T("div",{className:s,children:T(Lo,{step:e,i18n:r})});let m=_e(v,{tone:"danger",children:[T("span",{children:r.t("errors.network_error")}),T(g,{kind:"ghost",onClick:()=>a(k=>k+1),children:r.t("portrait.retryCamera")})]});return T("div",{className:s,children:T(xe,{fallback:m,children:T(xo,{fallback:T("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:T(p,{step:e,i18n:r,...l!==void 0?{assetBaseUrl:l}:{}})})},o)})}i(Ie,"PortraitCapture");import{useCallback as Te,useEffect as St,useId as Go,useRef as Re,useState as ne}from"react";var A={light:{brand:"#0d3b66",brandFg:"#ffffff",fg:"#13141f",fgMuted:"#4e5270",bg:"#f6f7fb",surface:"#ffffff",ring:"#0d3b66",danger:"#ca0f07",success:"#007a5e",warning:"#735003"},dark:{brand:"#6ea2d3",brandFg:"#051a2e",fg:"#f6f7fb",fgMuted:"#cbcedc",bg:"#13141f",surface:"#1d1e2c",ring:"#6ea2d3",danger:"#ff7c7c",success:"#00c897",warning:"#ffd98a"},roles:{light:{brandSoft:"#eaf2fa",line:"#cbcedc",lineSubtle:"#e2e4ee",lineStrong:"#8c91a9",sunken:"#eeeff5",fgSubtle:"#686d8a"},dark:{brandSoft:"#092b4b",line:"#4e5270",lineSubtle:"#2b2d40",lineStrong:"#686d8a",sunken:"#0b0c14",fgSubtle:"#8c91a9"}},stage:"#051a2e",stageAccent:"#69dfef",radius:"10px",radiusLg:"16px",font:'"Sekyro Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif',fontDisplay:'"Sekyro Geist", Geist, "Sekyro Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif',fontArabic:'"Sekyro Cairo", Cairo, "Sekyro Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif'};import{useId as To,useState as Ro}from"react";import{jsx as Ve,jsxs as pt}from"react/jsx-runtime";var Ao=["intro","data","processing","sharing","retention"];function dt({i18n:e}){let{t}=e,[n,s]=Ro(!1),l=To(),[r,o=""]=t("consent.short").split("{terms}");return pt("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[pt("p",{className:"sekyro-text-muted",children:[r,Ve("button",{type:"button",className:"sekyro-link","aria-expanded":n,"aria-controls":l,onClick:()=>s(a=>!a),children:t("consent.termsLink")}),o]}),Ve("div",{id:l,hidden:!n,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:Ao.map(a=>Ve("p",{children:t(`consent.terms.${a}`)},a))})]})}i(dt,"ConsentNotice");function ut(e){let t=e.trim().split(/\s+/).filter(s=>s!=="");return(t.length>=2?[t[0],t[1]].map(s=>Array.from(s??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(ut,"initials");import{useSyncExternalStore as Mo}from"react";var ft=i(e=>({colors:{...e?A.dark:A.light},radius:A.radiusLg,fontFamily:A.font}),"brandTheme"),qr=ft(!1);function yt(e,t,n){let s=ie(e);if(n&&s.colors!==void 0){let{brand:l,brandFg:r}=s.colors;l!==void 0&&Oo(l,A.dark.bg)>=3?s.colors={brand:l,ring:l,...r!==void 0?{brandFg:r}:{}}:delete s.colors}return ae(ft(n),s,t)}i(yt,"verificationTheme");function kt(e){let t=Mo(Fo,Bo,()=>!1);return e==="dark"||e==="system"&&t}i(kt,"useDarkScheme");var Do="(prefers-color-scheme: dark)",ht=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Do):null,"media"),Bo=i(()=>ht()?.matches??!1,"prefersDark");function Fo(e){let t=ht();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(Fo,"subscribe");function Oo(e,t){let[n,s]=[mt(e),mt(t)];return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}i(Oo,"contrast");function mt(e){let t=[1,3,5].map(n=>{let s=Number.parseInt(e.slice(n,n+2),16)/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(mt,"luminance");import{useEffect as Ho,useId as $o,useState as Uo}from"react";import{jsx as B,jsxs as oe}from"react/jsx-runtime";var zo=new Set(["document_nni_mismatch","name_mismatch","birth_date_mismatch"]),Ko={approved:"M6.5 12.5l3.6 3.6 7.4-8.2",review:"M12 7v5l3.2 2",expired:"M8 5h8M8 19h8M9 5c0 4 6 5 6 7s-6 3-6 7M15 5c0 4-6 5-6 7s6 3 6 7",rejected:"M8 8l8 8M16 8l-8 8"};function Wo({outcome:e}){return oe("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[B("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),B("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),B("path",{className:"sekyro-outcome__glyph",d:Ko[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(Wo,"OutcomeMark");function qo({label:e,id:t,copied:n}){let[s,l]=Uo(!1);return Ho(()=>{if(!s)return;let r=setTimeout(()=>l(!1),1600);return()=>clearTimeout(r)},[s]),oe("button",{type:"button",className:`sekyro-reference${s?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>l(!0),()=>{})},children:[B("span",{"aria-live":"polite",children:s?n:e}),B("bdi",{dir:"ltr",children:t}),B($,{name:"copy"})]})}i(qo,"ReferenceLine");function Le({step:e,locale:t,strings:n,className:s,onClose:l}){let r=b(t,n),{t:o}=r,a=$o(),p=se(),m=e.context.orgName,k=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",y;switch(e.display){case"policy_stop":{let f=e.failureReason??"";if(zo.has(f))y=o("session.result.detailsMismatch",{org:m});else if(f==="device_velocity_exceeded")y=o("session.result.deviceVelocity",{org:m});else if(f==="capture_tampered")y=o("session.result.deviceStop");else{let h=Oe(f);y=h!==null?o(h,{org:m}):o("session.result.rejected.description")}break}case"cooldown":{let f=He(r.locale,e.retryAfter);y=f!==null?o(f.key,{time:f.time}):o("reasons.device_cooldown");break}case"platform_unsupported":y=o("result.platform_unsupported");break;case"attempts_exhausted":y=o("common.noAttemptsLeft");break;default:y=m!==""?o(`native.result.${k}`,{org:m}):o(`session.result.${k}.description`)}return oe("section",{className:`sekyro-result${s?` ${s}`:""}`,"aria-labelledby":a,"data-testid":"sekyro-result",children:[oe("div",{className:"sekyro-result__body",children:[B(Wo,{outcome:e.display==="cooldown"?"review":k}),oe("div",{className:"sekyro-heading",children:[B("h2",{id:a,ref:p,tabIndex:-1,className:"sekyro-text-body",children:o(`session.result.${k}.title`)}),B("p",{className:"sekyro-text-muted",children:y})]}),B(qo,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),l!==void 0?B("div",{className:"sekyro-actions",children:B(g,{full:!0,onClick:l,children:m!==""?o("native.result.back",{org:m}):o("native.close")})}):null]})}i(Le,"VerificationResultScreen");import{Fragment as gt,jsx as c,jsxs as U}from"react/jsx-runtime";function Yo(e,t){let n=t?A.dark:A.light,s=t?A.roles.dark:A.roles.light,l=e.colors??{},r={},o=l.fg===n.fg&&l.surface===n.surface;return l.brand===n.brand&&l.surface===n.surface&&(r["--sekyro-color-brand-soft"]=s.brandSoft),o&&(r["--sekyro-color-line"]=s.line,r["--sekyro-color-line-subtle"]=s.lineSubtle,r["--sekyro-color-line-strong"]=s.lineStrong,r["--sekyro-color-sunken"]=s.sunken),l.fgMuted===n.fgMuted&&l.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=s.fgSubtle),e.fontFamily===A.font&&(r["--sekyro-font-display"]=A.fontDisplay),r}i(Yo,"flowRoles");function Ae(e){let{verification:t,locale:n,strings:s,onStep:l,onResult:r}=e,{step:o,error:a}=fe(t);St(()=>{o!==null&&l?.(o)},[o,l]),St(()=>r===void 0?void 0:t.on("result",r),[t,r]);let p=kt(e.colorScheme??"light"),m=yt(o?.context.branding,e.theme,p),[k,y]=ne(!1),f=`sekyro-verification${p?" sekyro-verification--dark":""}${k?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,h=Re(e.onClose);h.current=e.onClose;let w=Re(o);w.current=o;let E=Te(()=>{let V=w.current;h.current?.(V?.kind==="result"?{reason:"finished",result:V.result}:{reason:"cancelled"})},[]);return c(le,{theme:m,className:f,children:c(te,{locale:n,...s!==void 0?{strings:s}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Yo(m,p),children:c(Ge.Provider,{value:y,children:c(ce.Provider,{value:e.onClose!==void 0?E:void 0,children:c(Qo,{...e,step:o,error:a,immersive:k})})})})})})}i(Ae,"SekyroVerification");function Qo(e){let{step:t,error:n,slots:s,immersive:l}=e,r=b(),{t:o}=r,[a,p]=ne(!1),[m,k]=ne(0),[y,f]=ne(null),h=Te((d,D)=>c(je,{start:d,context:D,extra:D.canChooseFacing&&c(ze,{value:D.facing,onChange:D.setFacing})}),[]),w=Re(""),E=e.livenessProps?.slots?.stageOverlay,V=Te(d=>(d.guidance!==""&&!d.coached&&(w.current=d.guidance),c(et,{testId:"sekyro-capture-stage",video:c("video",{ref:d.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:d.guidance!==""?d.guidance:w.current,note:d.note,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:E?.(d.videoRef),...d.settled?{}:{onClose:i(()=>k(D=>D+1),"onClose")},end:d.switchCamera&&c("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":o("capture.switchCamera"),children:c($e,{})})})),[o,E]),L=Go();if(n!==null)return c(me,{tone:"danger",children:c("span",{children:o(G(n,r.strings))})});if(t===null)return c("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o("common.loading")});let{context:N}=t,H=i(d=>{p(!0),d().finally(()=>p(!1))},"refresh"),M=s?.header??c(Xo,{context:N,headerId:L,end:s?.headerEnd}),u,C=y===t.key&&t.context.switchable!==void 0;if(C)u=c(R,{view:"LaneChoiceView",i18n:r,step:t,onClose:()=>f(null)});else switch(t.kind){case"phone_otp":u=c(ye,{step:t});break;case"email_otp":u=c(he,{step:t});break;case"method":u=c(be,{step:t});break;case"registry":u=c(Ne,{step:t});break;case"document":u=c(Pe,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,D={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??h},...m>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:r.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};u=c(Ue.Provider,{value:V,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(R,{view:"LivePhotoLiveness",i18n:r,step:t,livenessProps:D,sekyroIntro:d===void 0},m):c(We,{...D},m)});break}case"portrait":u=U(gt,{children:[t.retakeOnly?c(R,{view:"PortraitRetakeNotice",i18n:r,quiet:!0}):null,c(Ie,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":u=c(R,{view:"ContactChoiceView",i18n:r,step:t});break;case"choice":u=c(R,{view:"GenericChoiceView",i18n:r,step:t});break;case"identity_summary":u=c(R,{view:"IdentitySummaryView",i18n:r,step:t});break;case"mobile_required":u=e.handoffUrl!==void 0?c(R,{view:"HandoffView",i18n:r,url:e.handoffUrl,refresh:t.refresh}):U(me,{tone:"info",children:[c("strong",{children:o("handoff.title")}),c("span",{children:o("reasons.mobile_required")}),c(g,{kind:"ghost",disabled:a,onClick:()=>H(t.refresh),children:o("common.refresh")})]});break;case"processing":u=U("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[c("h2",{className:"sekyro-text-body",children:o("session.processing.title")}),c("p",{className:"sekyro-text-muted",children:o("session.processing.description")}),t.stalled?c(g,{kind:"ghost",disabled:a,onClick:()=>H(t.refresh),children:o("common.refresh")}):null]});break;case"eid":u=c(Se,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";u=U("section",{className:"sekyro-stack sekyro-stack--1",children:[c("h2",{className:"sekyro-text-body",children:o(d?"needsApp.title":"unsupported.title")}),c("p",{children:d?N.orgName!==""?o("needsApp.description",{org:N.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:N.orgName})})]});break}case"result":u=s?.result?.(t)??c(Jo,{step:t});break;default:{let d=t;u=null}}return U(gt,{children:[l?null:M,!l&&t.kind!=="result"&&N.sections.length>1?c(Zo,{context:N,current:t.section,i18n:r}):null,!l&&!N.consentRecorded&&t.kind!=="result"?c(dt,{i18n:r}):null,c(Ye,{pageKey:t.key,children:u}),!l&&!C&&t.kind!=="result"&&t.context.switchable!==void 0?c(R,{view:"LaneSwitch",i18n:r,step:t,onOpen:()=>f(t.key),quiet:!0},t.key):null,l?null:s?.footer!==void 0?s.footer:U("p",{className:"sekyro-footer",children:[c($,{name:"lock"}),o("shell.verifiedBy")]})]})}i(Qo,"Body");function Jo({step:e}){return c(ce.Consumer,{children:t=>c(Le,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Jo,"ResultPage");function Xo({context:e,headerId:t,end:n}){let{t:s}=b(),[l,r]=ne(!1),o=l?void 0:e.branding?.logoUrl,a=e.orgName!==""?e.orgName:s(e.returning?"returning.title":"session.title");return U("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[U("div",{className:"sekyro-org",children:[c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:o!==void 0?c("img",{className:"sekyro-org__logo",src:o,alt:"",onError:()=>r(!0)}):ut(e.orgName)}),U("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:a}),c("p",{className:"sekyro-org__sub",children:s("shell.subtitle")})]}),n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(ce.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":s("native.close"),onClick:p,children:c($,{name:"close"})}):null})]}),e.returning?c("p",{className:"sekyro-text-muted",children:s("returning.description")}):null]})}i(Xo,"OrgHeader");function Zo({context:e,current:t,i18n:n}){let s=t===null?-1:e.sections.indexOf(t),l=e.progress,r=l!==void 0&&l.length===e.sections.length?l:e.sections.map((o,a)=>({id:o,state:a<s?"done":a===s?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:r.map(({id:o,state:a})=>c("li",{className:`sekyro-progress__bar${a==="done"?" is-done":a==="current"?" is-current":""}`,...a==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(Zo,"SectionProgress");import{useEffect as en,useState as bt}from"react";var jo=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Me(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return jo.test(t)}i(Me,"isInAppBrowser");import{jsx as j}from"react/jsx-runtime";function tn(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(tn,"pageUrl");function on({hostedUrl:e,inAppBrowser:t,...n}){let[s,l]=bt(t===!0);en(()=>{t===void 0&&Me()&&l(!0)},[t]);let[r,o]=bt(!1),a=n.handoffUrl??e??tn();return s&&!r?j(le,{theme:ae(ie(void 0),n.theme),...n.className!==void 0?{className:n.className}:{},children:j(te,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:j("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-stack sekyro-stack--4",children:j(nn,{url:a,onContinue:()=>o(!0)})})})}):j(Ae,{...n,...a!==""?{handoffUrl:a}:{}})}i(on,"SekyroFlow");function nn({url:e,onContinue:t}){let n=b();return j(R,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(nn,"Prompt");export{Pe as DocumentCapture,Se as EidStep,he as EmailOtpStep,be as MethodChoice,Ne as NniEntry,ye as PhoneOtpStep,Ie as PortraitCapture,on as SekyroFlow,Ae as SekyroVerification,te as StepI18nProvider,Le as VerificationResultScreen,wt as arSteps,Pt as enSteps,_t as formatTemplate,xt as frSteps,Me as isInAppBrowser,It as resolveSekyroStrings,b as useStepI18n,fe as useVerificationStep};
|
|
2
|
+
import{a as st}from"../chunk-VRS7WSIK.js";import{a as B,d as ye,e as ke,f as he}from"../chunk-ZCAZDOMD.js";import{a as Xe}from"../chunk-EZ5TVL6P.js";import{a as et}from"../chunk-YY76AMUA.js";import{a as tt,b as ot,c as nt,d as rt}from"../chunk-7C3GZLJB.js";import{a as q}from"../chunk-PYAJMHZH.js";import{a as Ye,b as Ge,d as Qe,g as Je}from"../chunk-XZEX5KTU.js";import{b as We}from"../chunk-4U5FQY26.js";import{a as Y,b as G,c as Se,d as Ze,g as je}from"../chunk-WJW3SNXQ.js";import{a as ee}from"../chunk-RFCYXRRC.js";import{a as xt,b as It,c as Et,d as Vt,e as Lt,f as ae,g as v}from"../chunk-4CUPBFVB.js";import{a as N,b as ge}from"../chunk-RPQZH66I.js";import{a as b,g as Pt,i as _t,j as Ke,k as ze,l as qe,r as fe,s as j}from"../chunk-64PTFYXL.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as Tt,useState as it}from"react";function Ce(e){let[t,n]=it(()=>e?.currentStep?.()??null),[s,a]=it(null);return Tt(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let r=!0,o=e.on("step",l=>{r&&n(l)});return e.run().then(l=>{r&&n(c=>c??l)},l=>{r&&a(l)}),()=>{r=!1,o()}},[e]),{step:t,error:s}}i(Ce,"useVerificationStep");import{useEffect as Rt,useId as Mt,useRef as Dt,useState as be}from"react";import{Fragment as lt,jsx as h,jsxs as U}from"react/jsx-runtime";var at=i((e,t)=>{if(e===void 0)return 0;let n=Date.parse(e)-t;return Number.isFinite(n)?Math.max(0,Math.ceil(n/1e3)):0},"secondsUntil"),At=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Bt=["whatsapp","sms"],Ot=new Set(["otp_daily_cap_reached","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited"]),J="+222";function Ft(e){let t=e.replace(/[\s-]/g,""),n=t.startsWith("+")?t.slice(1):t;return/^\d{8,15}$/.test(n)?`+${n}`:null}i(Ft,"normalizedPhone");function Ht({id:e,label:t,value:n,onChange:s,placeholder:a}){let r=n.startsWith("+")&&!n.startsWith(J),o=r?n:n.slice(n.startsWith(J)?J.length:0).trim(),l=Dt(null);return Rt(()=>{let c=setTimeout(()=>l.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(c)},[]),U("div",{className:"sekyro-field",children:[h("label",{className:"sekyro-label",htmlFor:e,children:t}),U("div",{className:"sekyro-phone",dir:"ltr",children:[r?null:U("span",{className:"sekyro-phone__dial",id:`${e}-dial`,children:[h("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:"🇲🇷"}),J]}),h("input",{ref:l,id:e,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",...r?{}:{"aria-describedby":`${e}-dial`},placeholder:a,value:o,onChange:c=>{let u=c.target.value.replace(/[^\d +]/g,"");s(u.startsWith("+")?u:J+u.replace(/\D/g,""))}})]})]})}i(Ht,"PhoneField");function Ne({step:e,locale:t,strings:n,className:s,defaultPhone:a=J,onError:r}){let o=v(t,n),{t:l}=o,[c,u]=be(a),[k,f]=be(""),[m,y]=be(!1),[w,D]=be(null),T=e.phase==="verify",R=et(T),_=Mt(),$=i(async I=>{y(!0),D(null);try{await I()}catch(M){D(ee(M,o.strings)),r?.(M)}finally{y(!1)}},"run"),O=Bt.filter(I=>(e.channels??[]).includes(I)),S=Ft(c),P=!e.needsPhone||S!==null,g=i((I,M=!1)=>{$(()=>e.send({...e.needsPhone&&(!M||c!==a)?{phone:S??c}:{},...I!==void 0?{channel:I}:{}}))},"send"),de=i(I=>{$(()=>e.verify(I))},"submitCode"),ue=i(I=>{I.preventDefault(),T?de(k):O.length<=1&&P&&g(O[0])},"onSubmit"),F=at(e.codeExpiresAt,R),W=at(e.resendAvailableAt,R),X=T&&e.codeExpiresAt!==void 0&&F===0,C=i(I=>l(I==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[me,d]=l("otp.sentTo",{channel:C(e.channel)}).split("{number}"),x=e.reason==="otp_mismatch"?U(N,{tone:"danger",children:[h("span",{children:l("otp.reason_otp_mismatch")}),h("span",{children:ge(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Ot.has(e.reason)?h(N,{tone:"warning",children:h("span",{children:l(`otp.reason_${e.reason}`)})}):null,Z=U(lt,{children:[x,w!==null?h(N,{tone:"danger",children:h("span",{children:l(w)})}):null]});if(T){let I=O.length===0;return U("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":_,onSubmit:ue,noValidate:!0,children:[h(Y,{id:_,title:l("otp.verifyTitle"),lead:U(lt,{children:[me,h("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),d]})}),Z,U("div",{className:"sekyro-field",children:[h("label",{className:"sekyro-label",htmlFor:`${_}-code`,children:l("otp.codeLabel")}),h(Xe,{id:`${_}-code`,value:k,invalid:e.reason==="otp_mismatch",onChange:M=>{f(M),M.length===6&&k.length!==6&&!m&&!e.attemptsExhausted&&de(M)}}),h("span",{className:`sekyro-help sekyro-otp-expiry${X?" is-danger":""}`,"aria-hidden":!X||void 0,children:X?l("otp.expired"):l("otp.expiresIn",{time:At(F)})})]}),h("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:X?l("otp.expired"):""}),U(G,{children:[h(b,{type:"submit",full:!0,disabled:m||k.length!==6||e.attemptsExhausted,"aria-busy":m||void 0,children:l("otp.verify")}),I?h("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:m||W>0,onClick:()=>g(void 0,!0),children:W>0?l("otp.resendIn",{seconds:W}):l("otp.resend")}):W>0?h("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:W})}):h("div",{className:"sekyro-resend-row",children:O.map(M=>h("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:m,onClick:()=>g(M,!0),children:l("otp.resendBy",{channel:C(M)})},M))})]})]})}return U("form",{className:`sekyro-step sekyro-otp${s?` ${s}`:""}`,"aria-labelledby":_,onSubmit:ue,noValidate:!0,children:[h(Y,{id:_,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Z,e.needsPhone?h(Ht,{id:`${_}-phone`,label:l("otp.phoneLabel"),value:c,onChange:u,placeholder:l("otp.phonePlaceholder").replace(J,"").trim()}):h("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),h(G,{children:O.length>0?U("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[h("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),O.map((I,M)=>h(b,{kind:M===0?"primary":"ghost",full:!0,disabled:m||!P,"aria-busy":M===0&&m||void 0,onClick:()=>g(I),children:l("otp.sendBy",{channel:C(I)})},I))]}):h(b,{type:"submit",full:!0,disabled:m||!P,"aria-busy":m||void 0,children:l("otp.send")})})]})}i(Ne,"PhoneOtpStep");import{lazy as Ut,Suspense as Kt,useMemo as zt,useState as qt}from"react";import{Component as $t}from"react";var we=class we extends $t{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(we,"LoadBoundary");var z=we;import{jsx as te,jsxs as Yt}from"react/jsx-runtime";var Wt={load:i(()=>import("../email-otp-view-76T5QW7H.js"),"load")};function Pe({locale:e,strings:t,...n}){let s=v(e,t),[a,r]=qt(0),o=zt(()=>Ut(()=>Wt.load().then(c=>({default:c.EmailOtpView}))),[a]),l=Yt(N,{tone:"danger",children:[te("span",{children:s.t("errors.network_error")}),te(b,{kind:"ghost",onClick:()=>r(c=>c+1),children:s.t("common.retry")})]});return te(z,{fallback:l,children:te(Kt,{fallback:te("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:te(o,{...n,i18n:s})})},a)}i(Pe,"EmailOtpStep");import{lazy as Gt,Suspense as Qt,useMemo as Jt,useState as Xt}from"react";import{jsx as oe,jsxs as jt}from"react/jsx-runtime";var Zt={load:i(()=>import("../eid-view-4T7Y2NJC.js"),"load")};function _e({locale:e,strings:t,...n}){let s=v(e,t),[a,r]=Xt(0),o=Jt(()=>Gt(()=>Zt.load().then(c=>({default:c.EidView}))),[a]),l=jt(N,{tone:"danger",children:[oe("span",{children:s.t("errors.network_error")}),oe(b,{kind:"ghost",onClick:()=>r(c=>c+1),children:s.t("common.retry")})]});return oe(z,{fallback:l,children:oe(Qt,{fallback:oe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:oe(o,{...n,i18n:s})})},a)}i(_e,"EidStep");import{useMemo as io}from"react";import{lazy as eo,Suspense as to,useMemo as oo,useState as no}from"react";import{jsx as ne,jsxs as so}from"react/jsx-runtime";var ro={load:i(()=>import("../flow-views-LEW6T5UR.js"),"load")};function E({view:e,i18n:t,quiet:n,...s}){let[a,r]=no(0),o=oo(()=>eo(()=>ro.load().then(c=>({default:c[e]}))),[e,a]),l=so(N,{tone:"danger",children:[ne("span",{children:t.t("errors.network_error")}),ne(b,{kind:"ghost",onClick:()=>r(c=>c+1),children:t.t("common.retry")})]});return ne(z,{fallback:l,children:ne(to,{fallback:n===!0?null:ne("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:ne(o,{...s,i18n:t})})},a)}i(E,"Flow");import{jsx as xe,jsxs as ao}from"react/jsx-runtime";function Ie({step:e,locale:t,strings:n,className:s,onError:a}){let r=v(t,n),{busy:o,error:l,run:c}=nt(r,a),u=io(()=>e.choice.options.flatMap(f=>{let m=ot(f,r),y=tt[f.service];return m===null?[]:[{id:f.id,label:m,glyph:y&&xe(q,{name:y})}]}),[e.choice.options,r]),k=e.choice.options.find(f=>f.service==="national_eid");return ao("div",{className:s,children:[xe(Qe,{title:r.t("method.title"),description:r.t("method.description"),options:u,busy:o,error:l,focus:!0,testId:"sekyro-method",onChoose:f=>c(()=>e.choose(f))}),k?.nationalEid?.afterPass==="continue"?xe(E,{view:"EidContinueHint",i18n:r,provider:k.nationalEid.providerName,quiet:!0}):null]})}i(Ie,"MethodChoice");import{isValidNni as lo,normalizeNni as pt}from"@sekyro/web";import{useId as po,useState as Ee}from"react";import{Fragment as co,jsx as V,jsxs as re}from"react/jsx-runtime";function Ve({step:e,locale:t,strings:n,className:s,onError:a}){let r=v(t,n),{t:o}=r,[l,c]=Ee(""),[u,k]=Ee(!1),[f,m]=Ee(null),y=po(),w=e.attemptsExhausted,D=i(async P=>{k(!0),m(null);try{await P()}catch(g){m(ee(g,r.strings)),a?.(g)}finally{k(!1)}},"run"),T=i(P=>{if(P.preventDefault(),e.source!=="typed"){D(()=>e.confirm());return}let g=pt(l);if(!/^\d{10}$/.test(g))return m("population.invalid");if(!lo(g))return m("population.reason_nni_invalid");D(()=>e.submitNni(g))},"onSubmit"),R=ge(r,e.attemptsRemaining,w),_=re(co,{children:[e.reason==="registry_unavailable"?re(N,{tone:"warning",children:[V("span",{children:o("population.reason_registry_unavailable")}),V("span",{children:R})]}):null,e.reason==="nni_not_found"&&e.canUseDocument?re(N,{tone:"warning",children:[V("span",{children:o("population.reason_nni_not_found_or_document")}),V("span",{children:R}),V(b,{kind:"ghost",disabled:u,onClick:()=>{D(()=>e.useDocument())},children:o("population.useDocument")})]}):null,e.reason==="nni_not_found"&&!e.canUseDocument||e.reason==="nni_invalid"?re(N,{tone:"danger",children:[V("span",{children:o(e.reason==="nni_not_found"?"population.reason_nni_not_found":"population.reason_nni_invalid")}),V("span",{children:R})]}):null,w&&e.reason===void 0?V(N,{tone:"danger",children:V("span",{children:R})}):null,f!==null?V(N,{tone:"danger",children:V("span",{children:o(f)})}):null]}),[$,O,S]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return re("form",{className:`sekyro-step${s?` ${s}`:""}`,"aria-labelledby":y,onSubmit:T,noValidate:!0,children:[V(Y,{id:y,title:o($),lead:o(O)}),_,e.source==="typed"?re("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:`${y}-nni`,children:o("population.label")}),V("input",{id:`${y}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:l,"aria-describedby":`${y}-nni-help`,"aria-invalid":f==="population.invalid"||f==="population.reason_nni_invalid"||void 0,onChange:P=>{m(null),c(pt(P.target.value).replace(/\D/g,"").slice(0,10))}}),V("span",{id:`${y}-nni-help`,className:"sekyro-help",children:o("population.helper")})]}):null,V(G,{children:w?null:V(b,{type:"submit",full:!0,disabled:u,"aria-busy":u||void 0,children:o(S)})})]})}i(Ve,"NniEntry");import{acceptedIssuers as ho,acceptedTypesFor as So,warmDocumentCapture as go}from"@sekyro/web";import{lazy as bo,Suspense as vo,useEffect as Co,useMemo as No,useState as ft}from"react";import{acceptedIssuers as uo,acceptedTypesFor as Le}from"@sekyro/web";import{useEffect as ct,useId as mo,useMemo as dt,useState as Te}from"react";import{jsx as L,jsxs as se}from"react/jsx-runtime";var ut=i(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),fo=i(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),yo=220;function ko(e,t){let n=null;try{n=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(r=>({code:r,name:n?.of(r)??r})),a=new Intl.Collator(e);return s.sort((r,o)=>r.code==="MR"?-1:o.code==="MR"?1:a.compare(r.name,o.name))}i(ko,"countryNames");function mt({step:e,i18n:t,issuer:n,onPicked:s}){let{t:a,locale:r}=t,o=dt(()=>uo(e.documents),[e.documents]),l=dt(()=>ko(r,o),[r,o]),c=o.length===1?o[0]:null,[u,k]=Te(n??c),[f,m]=Te(""),[y,w]=Te(null),D=mo(),T=c===null?[]:Le(e.documents,c),R=c!==null&&T.length===1?T[0]:null;ct(()=>{c!==null&&R!==null&&e.selectDocument(c,R)},[c,R]);let _=i((S,P)=>{e.selectDocument(S,P),s?.()},"pick"),$=i(S=>{let P=Le(e.documents,S);P.length===1?_(S,P[0]):k(S)},"chooseIssuer");if(ct(()=>{if(y===null||u===null)return;let S=setTimeout(()=>_(u,y),yo);return()=>clearTimeout(S)},[y]),R!==null)return null;if(u===null){let S=ut(f.trim()),P=S===""?l:l.filter(g=>ut(g.name).includes(S)||g.code.toLowerCase()===S);return se("section",{className:"sekyro-step",children:[L(Y,{title:a("doc.countryTitle"),lead:a("doc.pickDescription")}),se("div",{className:"sekyro-field",children:[L("label",{className:"sekyro-label",htmlFor:D,children:a("doc.countryLabel")}),L("input",{id:D,type:"search",className:"sekyro-input",placeholder:a("doc.countrySearch"),value:f,onChange:g=>m(g.target.value)})]}),P.length===0?L("p",{className:"sekyro-text-muted",children:a("doc.noCountryMatch")}):L("ul",{className:"sekyro-rows",children:P.map(g=>L("li",{children:se("button",{type:"button",className:"sekyro-row-btn",onClick:()=>$(g.code),children:[L("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:fo(g.code)}),g.name]})},g.code))}),L(G,{children:null})]})}let O=Le(e.documents,u);return se("section",{className:"sekyro-step",children:[L(Y,{title:a("doc.pickTitle"),lead:a("native.doc.holdIt")}),L("div",{className:"sekyro-choices",children:O.map(S=>se("button",{type:"button",className:"sekyro-card","aria-pressed":y===S,disabled:y!==null&&y!==S,onClick:()=>w(S),children:[L(q,{name:S==="passport"?"passport":"card"}),se("span",{className:"sekyro-card__body",children:[L("span",{className:"sekyro-card__title",children:a(`doc.type.${S}`)}),L("span",{className:"sekyro-card__sub",children:a(`doc.sub.${S}`)})]}),L("span",{className:"sekyro-radio","aria-hidden":"true"})]},S))}),o.length>1?L("button",{type:"button",className:"sekyro-link",onClick:()=>{k(null),w(null)},children:a("native.doc.changeCountry")}):null,L(G,{children:null})]})}i(mt,"DocumentPicker");import{jsx as Q,jsxs as Po}from"react/jsx-runtime";var wo={load:i(()=>import("../document-capture-view-2XBWIX6K.js"),"load")};function Re({step:e,locale:t,strings:n,className:s,liveMrz:a}){let r=v(t,n),[o,l]=ft(0),[c,u]=ft(null),k=ho(e.documents).length>1,f=e.issuer!==null&&So(e.documents,e.issuer).length>1,m=No(()=>bo(()=>wo.load().then(w=>({default:w.DocumentCaptureView}))),[o]);Co(()=>{go()},[]);let y=Po(N,{tone:"danger",children:[Q("span",{children:r.t("errors.network_error")}),Q(b,{kind:"ghost",onClick:()=>l(w=>w+1),children:r.t("doc.retryCamera")})]});return Q("div",{className:s,children:e.documentType===null||e.issuer===null||c!==null?Q(mt,{step:e,i18n:r,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>u(null)}):Q(z,{fallback:y,children:Q(vo,{fallback:Q("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:Q(m,{step:e,i18n:r,liveMrz:a,...k?{onChangeCountry:i(()=>u("country"),"onChangeCountry")}:{},...f?{onChangeDocument:i(()=>u("document"),"onChangeDocument")}:{}})})},o)})}i(Re,"DocumentCapture");import{warmPortraitCapture as _o}from"@sekyro/web";import{Component as xo,lazy as Io,Suspense as Eo,useEffect as Vo,useMemo as Lo,useState as To}from"react";import{jsx as A,jsxs as De}from"react/jsx-runtime";var Ro={load:i(()=>import("../portrait-capture-view-GORALODC.js"),"load")},Be=class Be extends xo{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(Be,"LoadBoundary");var Me=Be;function Mo({step:e,i18n:t}){let{t:n}=t,s=j();return De("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[A("h2",{ref:s,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?A("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?De(N,{tone:"danger",children:[A("span",{children:n("portrait.uploadFailed")}),A(b,{kind:"ghost",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):A("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Mo,"MatchPhase");function Ae({step:e,locale:t,strings:n,className:s,assetBaseUrl:a}){let r=v(t,n),[o,l]=To(0),c=Lo(()=>Io(()=>Ro.load().then(k=>({default:k.PortraitCaptureView}))),[o]);if(Vo(()=>{e.phase==="capture"&&_o()},[e.phase]),e.phase==="match")return A("div",{className:s,children:A(Mo,{step:e,i18n:r})});let u=De(N,{tone:"danger",children:[A("span",{children:r.t("errors.network_error")}),A(b,{kind:"ghost",onClick:()=>l(k=>k+1),children:r.t("portrait.retryCamera")})]});return A("div",{className:s,children:A(Me,{fallback:u,children:A(Eo,{fallback:A("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:A(c,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{}})})},o)})}i(Ae,"PortraitCapture");import{cameraUnavailableCauseOf as Jo}from"@sekyro/web";import{useCallback as pe,useEffect as Nt,useId as Xo,useRef as He,useState as ce}from"react";import{useId as Do,useState as Ao}from"react";import{jsx as ve,jsxs as yt}from"react/jsx-runtime";var Bo=["intro","data","processing","sharing","retention"];function kt({i18n:e,purpose:t="identity"}){let{t:n}=e,[s,a]=Ao(!1),r=Do(),[o,l=""]=n("consent.short").split("{terms}");return yt("section",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-consent",children:[yt("p",{className:"sekyro-text-muted",children:[o,ve("button",{type:"button",className:"sekyro-link","aria-expanded":s,"aria-controls":r,onClick:()=>a(c=>!c),children:n("consent.termsLink")}),l]}),ve("div",{id:r,hidden:!s,className:"sekyro-stack sekyro-stack--1 sekyro-text-muted","data-testid":"sekyro-consent-terms",children:t==="human"?ve(E,{view:"HumanConsentTerms",i18n:e,quiet:!0}):Bo.map(c=>ve("p",{children:n(`consent.terms.${c}`)},c))})]})}i(kt,"ConsentNotice");function ht(e){let t=e.trim().split(/\s+/).filter(s=>s!=="");return(t.length>=2?[t[0],t[1]].map(s=>Array.from(s??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(ht,"initials");import{useSyncExternalStore as Oo}from"react";var gt=i(e=>({colors:{...e?B.dark:B.light},radius:B.radiusLg,fontFamily:B.font}),"brandTheme"),Xr=gt(!1);function bt(e,t,n){let s=ye(e);if(n&&s.colors!==void 0){let{brand:a,brandFg:r}=s.colors;a!==void 0&&Uo(a,B.dark.bg)>=3?s.colors={brand:a,ring:a,...r!==void 0?{brandFg:r}:{}}:delete s.colors}return ke(gt(n),s,t)}i(bt,"verificationTheme");function vt(e){let t=Oo($o,Ho,()=>!1);return e==="dark"||e==="system"&&t}i(vt,"useDarkScheme");var Fo="(prefers-color-scheme: dark)",Ct=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Fo):null,"media"),Ho=i(()=>Ct()?.matches??!1,"prefersDark");function $o(e){let t=Ct();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i($o,"subscribe");function Uo(e,t){let[n,s]=[St(e),St(t)];return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}i(Uo,"contrast");function St(e){let t=[1,3,5].map(n=>{let s=Number.parseInt(e.slice(n,n+2),16)/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(St,"luminance");import{useEffect as Ko,useId as zo,useState as qo}from"react";import{jsx as H,jsxs as le}from"react/jsx-runtime";var Wo=new Set(["document_nni_mismatch","name_mismatch","birth_date_mismatch"]),Yo={approved:"M6.5 12.5l3.6 3.6 7.4-8.2",review:"M12 7v5l3.2 2",expired:"M8 5h8M8 19h8M9 5c0 4 6 5 6 7s-6 3-6 7M15 5c0 4-6 5-6 7s6 3 6 7",rejected:"M8 8l8 8M16 8l-8 8"};function Go({outcome:e}){return le("svg",{className:`sekyro-outcome sekyro-outcome--${e}`,viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[H("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"57",pathLength:"1"}),H("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),H("path",{className:"sekyro-outcome__glyph",d:Yo[e],pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]})}i(Go,"OutcomeMark");function Qo({label:e,id:t,copied:n}){let[s,a]=qo(!1);return Ko(()=>{if(!s)return;let r=setTimeout(()=>a(!1),1600);return()=>clearTimeout(r)},[s]),le("button",{type:"button",className:`sekyro-reference${s?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[H("span",{"aria-live":"polite",children:s?n:e}),H("bdi",{dir:"ltr",children:t}),H(q,{name:"copy"})]})}i(Qo,"ReferenceLine");function Oe({step:e,locale:t,strings:n,className:s,onClose:a}){let r=v(t,n),{t:o}=r,l=zo(),c=j(),u=e.context.orgName,k=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",f;switch(e.display){case"policy_stop":{let m=e.failureReason??"";if(Wo.has(m))f=o("session.result.detailsMismatch",{org:u});else if(m==="device_velocity_exceeded")f=o("session.result.deviceVelocity",{org:u});else if(m==="capture_tampered")f=o("session.result.deviceStop");else if(m==="camera_unavailable")f=o("reasons.camera_unavailable",{org:u});else{let y=ze(m);f=y!==null?o(y,{org:u}):o("session.result.rejected.description")}break}case"cooldown":{let m=qe(r.locale,e.retryAfter);f=m!==null?o(m.key,{time:m.time}):o("reasons.device_cooldown");break}case"platform_unsupported":f=o("result.platform_unsupported");break;case"attempts_exhausted":f=o("common.noAttemptsLeft");break;default:f=u!==""?o(`native.result.${k}`,{org:u}):o(`session.result.${k}.description`)}return le("section",{className:`sekyro-result${s?` ${s}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[le("div",{className:"sekyro-result__body",children:[H(Go,{outcome:e.display==="cooldown"?"review":k}),le("div",{className:"sekyro-heading",children:[H("h2",{id:l,ref:c,tabIndex:-1,className:"sekyro-text-body",children:o(`session.result.${k}.title`)}),H("p",{className:"sekyro-text-muted",children:f})]}),H(Qo,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),a!==void 0?H("div",{className:"sekyro-actions",children:H(b,{full:!0,onClick:a,children:u!==""?o("native.result.back",{org:u}):o("native.close")})}):null]})}i(Oe,"VerificationResultScreen");import{Fragment as Fe,jsx as p,jsxs as K}from"react/jsx-runtime";function Zo(e,t){let n=t?B.dark:B.light,s=t?B.roles.dark:B.roles.light,a=e.colors??{},r={},o=a.fg===n.fg&&a.surface===n.surface;return a.brand===n.brand&&a.surface===n.surface&&(r["--sekyro-color-brand-soft"]=s.brandSoft),o&&(r["--sekyro-color-line"]=s.line,r["--sekyro-color-line-subtle"]=s.lineSubtle,r["--sekyro-color-line-strong"]=s.lineStrong,r["--sekyro-color-sunken"]=s.sunken),a.fgMuted===n.fgMuted&&a.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=s.fgSubtle),e.fontFamily===B.font&&(r["--sekyro-font-display"]=B.fontDisplay),r}i(Zo,"flowRoles");function $e(e){let{verification:t,locale:n,strings:s,onStep:a,onResult:r}=e,{step:o,error:l}=Ce(t);Nt(()=>{o!==null&&a?.(o)},[o,a]),Nt(()=>r===void 0?void 0:t.on("result",r),[t,r]);let c=vt(e.colorScheme??"light"),u=bt(o?.context.branding,e.theme,c),[k,f]=ce(!1),m=`sekyro-verification${c?" sekyro-verification--dark":""}${k?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,y=He(e.onClose);y.current=e.onClose;let w=He(o);w.current=o;let D=pe(()=>{let T=w.current;y.current?.(T?.kind==="result"?{reason:"finished",result:T.result}:{reason:"cancelled"})},[]);return p(he,{theme:u,className:m,children:p(ae,{locale:n,...s!==void 0?{strings:s}:{},children:p("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Zo(u,c),children:p(Ze.Provider,{value:f,children:p(Se.Provider,{value:e.onClose!==void 0?D:void 0,children:p(en,{...e,step:o,error:l,immersive:k})})})})})})}i($e,"SekyroVerification");function jo({error:e,retry:t}){let{t:n}=v(),s=j();return K(fe,{tone:"danger",testId:"sekyro-error-notice",children:[p("span",{children:n(Ke(e.kind))}),e.retryable?p(b,{ref:s,kind:"ghost",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}i(jo,"CameraErrorNotice");function en(e){let{step:t,error:n,slots:s,immersive:a}=e,r=v(),{t:o}=r,[l,c]=ce(!1),[u,k]=ce(0),[f,m]=ce(null),y=t?.context.purpose??"identity",w=e.verification,D=y==="human"||t?.context.cameraUnavailableHandled===!0,T=w.reportCameraUnavailable!==void 0&&D?d=>w.reportCameraUnavailable?.(d)??Promise.resolve():void 0,R=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,_=e.handoffUrl,$=pe((d,x)=>T===void 0?void 0:p(E,{view:"NoCameraView",i18n:r,quiet:!0,cause:x,onRetry:d,...R?{onContinue:T}:{},..._!==void 0?{handoffUrl:_}:{}}),[r,w,D,R,_]),O=pe((d,x)=>p(rt,{start:d,context:x,human:y==="human",extra:x.canChooseFacing&&p(Ge,{value:x.facing,onChange:x.setFacing}),notice:x.permissionSettled&&x.permission==="denied"?$(d,"denied"):void 0}),[y,$]),S=pe((d,x)=>{let Z=Jo(d.kind);return(Z!==void 0?$(x,Z):void 0)??K(Fe,{children:[p(jo,{error:d,retry:x}),Z!==void 0&&_!==void 0?p(E,{view:"DesktopHandoffView",i18n:r,quiet:!0,url:_}):null]})},[$,_,r]),P=He(""),g=e.livenessProps?.slots?.stageOverlay,de=pe(d=>(d.guidance!==""&&!d.coached&&(P.current=d.guidance),p(st,{testId:"sekyro-capture-stage",video:p("video",{ref:d.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:d.guidance!==""?d.guidance:P.current,note:d.note,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:g?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>k(x=>x+1),"onClose")},end:d.switchCamera&&p("button",{type:"button",className:"sekyro-glass",onClick:d.switchCamera,"aria-label":o("capture.switchCamera"),children:p(We,{})})})),[o,g]),ue=Xo();if(n!==null)return p(fe,{tone:"danger",children:p("span",{children:o(ee(n,r.strings))})});if(t===null)return p("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o("common.loading")});let{context:F}=t,W=i(d=>{c(!0),d().finally(()=>c(!1))},"refresh"),X=s?.header??p(on,{context:F,headerId:ue,end:s?.headerEnd}),C,me=f===t.key&&t.context.switchable!==void 0;if(me)C=p(E,{view:"LaneChoiceView",i18n:r,step:t,onClose:()=>m(null)});else switch(t.kind){case"phone_otp":C=p(Ne,{step:t});break;case"email_otp":C=p(Pe,{step:t});break;case"method":C=p(Ie,{step:t});break;case"registry":C=p(Ve,{step:t});break;case"document":C=p(Re,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,x={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??O,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:S}:{}},...u>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:r.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};C=p(Ye.Provider,{value:de,children:t.instructions==="icao"||t.livePhoto?.icao===!0?p(E,{view:"LivePhotoLiveness",i18n:r,step:t,livenessProps:x,sekyroIntro:d===void 0},u):p(Je,{...x},u)});break}case"portrait":C=K(Fe,{children:[t.retakeOnly?p(E,{view:"PortraitRetakeNotice",i18n:r,quiet:!0}):null,p(Ae,{step:t,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":C=p(E,{view:"ContactChoiceView",i18n:r,step:t});break;case"choice":C=p(E,{view:"GenericChoiceView",i18n:r,step:t});break;case"identity_summary":C=p(E,{view:"IdentitySummaryView",i18n:r,step:t});break;case"mobile_required":C=e.handoffUrl!==void 0?p(E,{view:"HandoffView",i18n:r,url:e.handoffUrl,refresh:t.refresh}):K(fe,{tone:"info",children:[p("strong",{children:o("handoff.title")}),p("span",{children:o("reasons.mobile_required")}),p(b,{kind:"ghost",disabled:l,onClick:()=>W(t.refresh),children:o("common.refresh")})]});break;case"processing":C=K("section",{className:"sekyro-stack sekyro-stack--1",role:"status","aria-live":"polite",children:[p("h2",{className:"sekyro-text-body",children:o("session.processing.title")}),p("p",{className:"sekyro-text-muted",children:o("session.processing.description")}),t.stalled?p(b,{kind:"ghost",disabled:l,onClick:()=>W(t.refresh),children:o("common.refresh")}):null]});break;case"eid":C=p(_e,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";C=K("section",{className:"sekyro-stack sekyro-stack--1",children:[p("h2",{className:"sekyro-text-body",children:o(d?"needsApp.title":"unsupported.title")}),p("p",{children:d?F.orgName!==""?o("needsApp.description",{org:F.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:F.orgName})})]});break}case"result":C=s?.result?.(t)??p(tn,{step:t});break;default:{let d=t;C=null}}return K(Fe,{children:[a?null:X,!a&&t.kind!=="result"&&F.sections.length>1?p(nn,{context:F,current:t.section,i18n:r}):null,!a&&!F.consentRecorded&&t.kind!=="result"?p(kt,{i18n:r,purpose:F.purpose}):null,p(je,{pageKey:t.key,children:C}),!a&&!me&&t.kind!=="result"&&t.context.switchable!==void 0?p(E,{view:"LaneSwitch",i18n:r,step:t,onOpen:()=>m(t.key),quiet:!0},t.key):null,a?null:s?.footer!==void 0?s.footer:F.branding?.hideAttribution===!0?null:K("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[p(q,{name:"lock"}),o("shell.verifiedBy")]})]})}i(en,"Body");function tn({step:e}){return p(Se.Consumer,{children:t=>p(Oe,{step:e,...t!==void 0?{onClose:t}:{}})})}i(tn,"ResultPage");function on({context:e,headerId:t,end:n}){let{t:s}=v(),[a,r]=ce(!1),o=a?void 0:e.branding?.logoUrl,l=e.orgName!==""?e.orgName:s(e.returning?"returning.title":"session.title");return K("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:[K("div",{className:"sekyro-org",children:[p("span",{className:"sekyro-org__tile","aria-hidden":"true",children:o!==void 0?p("img",{className:"sekyro-org__logo",src:o,alt:"",onError:()=>r(!0)}):ht(e.orgName)}),K("div",{className:"sekyro-org__text",children:[p("h1",{id:t,className:"sekyro-org__name",children:l}),p("p",{className:"sekyro-org__sub",children:s(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),n!=null?p("div",{className:"sekyro-org__end",children:n}):null,p(Se.Consumer,{children:c=>c!==void 0?p("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":s("native.close"),onClick:c,children:p(q,{name:"close"})}):null})]}),e.returning?p("p",{className:"sekyro-text-muted",children:s("returning.description")}):null]})}i(on,"OrgHeader");function nn({context:e,current:t,i18n:n}){let s=t===null?-1:e.sections.indexOf(t),a=e.progress,r=a!==void 0&&a.length===e.sections.length?a:e.sections.map((o,l)=>({id:o,state:l<s?"done":l===s?"current":"upcoming"}));return p("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:r.map(({id:o,state:l})=>p("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:p("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(nn,"SectionProgress");import{useEffect as sn,useState as wt}from"react";var rn=/FBAN|FBAV|FB_IAB|FBIOS|MessengerForiOS|Instagram|WhatsApp|musical_ly|BytedanceWebview|TikTok|Snapchat|\bLine\/|LinkedInApp|Pinterest|MicroMessenger|; wv\)/i;function Ue(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));return rn.test(t)}i(Ue,"isInAppBrowser");import{jsx as ie}from"react/jsx-runtime";function an(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(an,"pageUrl");function ln({hostedUrl:e,inAppBrowser:t,...n}){let[s,a]=wt(t===!0);sn(()=>{t===void 0&&Ue()&&a(!0)},[t]);let[r,o]=wt(!1),l=n.handoffUrl??e??an();return s&&!r?ie(he,{theme:ke(ye(void 0),n.theme),...n.className!==void 0?{className:n.className}:{},children:ie(ae,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:ie("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-stack sekyro-stack--4",children:ie(pn,{url:l,onContinue:()=>o(!0)})})})}):ie($e,{...n,...l!==""?{handoffUrl:l}:{}})}i(ln,"SekyroFlow");function pn({url:e,onContinue:t}){let n=v();return ie(E,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(pn,"Prompt");export{Re as DocumentCapture,_e as EidStep,Pe as EmailOtpStep,Ie as MethodChoice,Ve as NniEntry,Ne as PhoneOtpStep,Ae as PortraitCapture,ln as SekyroFlow,$e as SekyroVerification,ae as StepI18nProvider,Oe as VerificationResultScreen,xt as arSteps,It as enSteps,Vt as formatTemplate,Et as frSteps,Ue as isInAppBrowser,Pt as loadSekyroLocale,Lt as resolveSekyroStrings,_t as retakeHintStringKey,v as useStepI18n,Ce as useVerificationStep};
|
package/dist/verification.css
CHANGED
|
@@ -142,6 +142,11 @@
|
|
|
142
142
|
font: var(--sekyro-type-flow-caption) var(--sekyro-font); color: var(--sekyro-color-fg-muted);
|
|
143
143
|
}
|
|
144
144
|
.sekyro-footer .sekyro-glyph { inline-size: 0.75rem; block-size: 0.75rem; }
|
|
145
|
+
/* D16: the attribution is a link to sekyro.ai: the muted caption (its contrast holds), underlined on hover, the
|
|
146
|
+
focus ring of every control. */
|
|
147
|
+
a.sekyro-footer { text-decoration: none; border-radius: 0.25rem; }
|
|
148
|
+
a.sekyro-footer:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
149
|
+
a.sekyro-footer:focus-visible { outline: 3px solid var(--sekyro-color-ring); outline-offset: 2px; }
|
|
145
150
|
.sekyro-glyph { inline-size: 1.25rem; block-size: 1.25rem; flex-shrink: 0; fill: none; }
|
|
146
151
|
|
|
147
152
|
/* ── Pages: one at a time, rising into place ───────────────────────────── */
|
|
@@ -489,6 +494,15 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
489
494
|
.sekyro-fc-video.is-rear { transform: none; }
|
|
490
495
|
.sekyro-fc-still { animation: sekyro-fade 250ms ease-out both; }
|
|
491
496
|
.sekyro-fc-scrim { fill: var(--sekyro-color-stage); fill-opacity: 0.82; }
|
|
497
|
+
/* Liveness v7 §4.4: while a screen-ramp pastel fills the viewport, the white instruction and note sit on a band of the
|
|
498
|
+
* scrim's ink at the scrim's opacity (white keeps at least 4.5:1 over the brightest pastel: screen-ramp-contrast.test). */
|
|
499
|
+
.sekyro-fc[data-ramp] .sekyro-lm-line,
|
|
500
|
+
.sekyro-fc[data-ramp] .sekyro-lm-note {
|
|
501
|
+
background: color-mix(in srgb, var(--sekyro-color-stage) 82%, transparent);
|
|
502
|
+
border-radius: 999px;
|
|
503
|
+
padding-block: 0.25rem;
|
|
504
|
+
padding-inline: 1rem;
|
|
505
|
+
}
|
|
492
506
|
.sekyro-fc-rim { fill: none; stroke: color-mix(in srgb, var(--sekyro-color-on-stage) 35%, transparent); stroke-width: 1.5; }
|
|
493
507
|
.sekyro-fc-ticks { fill: none; stroke: color-mix(in srgb, var(--sekyro-color-on-stage) 28%, transparent); stroke-width: 3; stroke-linecap: round; }
|
|
494
508
|
.sekyro-fc-ticks.is-done { stroke: var(--sekyro-color-on-camera-success); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--sekyro-color-on-camera-success) 60%, transparent)); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/react",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.9",
|
|
4
4
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"strings:steps": "node scripts/gen-step-strings.mjs"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
77
|
+
"@sekyro/web": "^0.1.0-rc.11 || ^0.2.0-rc.0",
|
|
78
78
|
"react": ">=18.2",
|
|
79
79
|
"react-dom": ">=18.2"
|
|
80
80
|
},
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "react",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/react@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.9",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.9",
|
|
102
102
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.9?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"components": [],
|
|
148
148
|
"dependencies": [
|
|
149
149
|
{
|
|
150
|
-
"ref": "@sekyro/react@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/react@0.1.0-rc.9"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-2PGJ7P7E.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as n,o as c}from"./chunk-PXRIFHY2.js";import{createContext as d,useContext as m,useEffect as u,useRef as f,useState as x}from"react";import{jsx as i,jsxs as N}from"react/jsx-runtime";function h({id:e,title:t,lead:o}){let s=c();return N("div",{className:"sekyro-heading",children:[i("h2",{id:e,ref:s,tabIndex:-1,className:"sekyro-text-body",children:t}),o!==void 0?i("p",{className:"sekyro-text-muted",children:o}):null]})}n(h,"StepHeading");function R({children:e}){return i("div",{className:"sekyro-actions",children:e})}n(R,"StepActions");var w=d(void 0),v=d(()=>{});function C(e){let t=m(v);u(()=>(t(e),()=>t(!1)),[e,t])}n(C,"useImmersive");var g=100;function y({swapKey:e,className:t,children:o}){let[s,l]=x({key:e,node:o}),a=f(o);a.current=o;let r=s.key!==e;return u(()=>{if(!r)return;let p=setTimeout(()=>l({key:e,node:a.current}),g);return()=>clearTimeout(p)},[r,e]),i("div",{className:`${t}${r?" is-leaving":""}`,"aria-hidden":r||void 0,children:r?s.node:o},s.key)}n(y,"Swap");var b=n(({pageKey:e,children:t})=>i(y,{swapKey:e,className:"sekyro-page",children:t}),"PageSwap");export{h as a,R as b,w as c,v as d,C as e,y as f,b as g};
|
package/dist/chunk-36RC3M4K.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as i,b as I,m as S}from"./chunk-PXRIFHY2.js";import{jsx as y,jsxs as R}from"react/jsx-runtime";var P=Array.from({length:56},(o,e)=>{let a=e/56*2*Math.PI-Math.PI/2,s=Math.cos(a),t=Math.sin(a);return{id:`tick-${e}`,frac:e/55,x1:150+108*s,y1:150+108*t,x2:150+138*s,y2:150+138*t,style:{transitionDelay:`${e*6}ms`}}});function T(o,e,a,s){return a?"var(--sekyro-color-success)":o?s?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":e<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":e<.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)"}i(T,"tickColor");var A="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function x({progress:o,phase:e,draining:a=!1}){let s=Math.min(1,Math.max(0,o)),t=Math.round(s*56),c=e==="checking",f=e==="recording",u=e==="frozen",l=c||u,_=c||f||u,d=e==="locked"||_,p=a&&!d;return R("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":e,"data-filled":t,"data-recording":f?"":void 0,"data-draining":p?"":void 0,children:[y("path",{fillRule:"evenodd",d:A,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":l?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),R("g",{className:e==="locked"?"sekyro-capture-settle":void 0,children:[y("g",{className:l?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:P.map((n,C)=>y("line",{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:T(C<t,n.frac,d,p),strokeWidth:3,strokeLinecap:"round",style:n.style,className:"sekyro-arc__tick"},n.id))}),y("g",{className:e==="seeking"?"sekyro-capture-breathe":void 0,children:y("circle",{cx:150,cy:150,r:100,fill:"none",stroke:d?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:d?3.5:2.5,className:_?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}i(x,"CaptureArc");import{jsx as r,jsxs as k}from"react/jsx-runtime";function Y({videoRef:o,guidanceText:e,guidanceHint:a,guidanceKey:s,progress:t,phase:c,draining:f=!1,stillUrl:u,showChecking:l,onSwitchCamera:_,canSwitchCamera:d,operatorText:p=null,voicePrompt:n,overlay:C,reduceMotion:E=!1}){let g=S(),b=c==="checking",m=b||c==="frozen",h=m&&l?g("capture.checking"):e,v=n?.(a,h,s);return k("div",{className:E?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[r("video",{ref:o,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),u!==null&&m?r("img",{src:u,alt:g("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,r(x,{progress:t,phase:c,draining:f}),C?.(o),v!=null&&!m?r("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:v}):null,d?r(I,{kind:"chip",onClick:_,"aria-label":g("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:r(G,{})}):null,b&&l?k("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[r(U,{}),g("capture.cameraOff")]}):null,k("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[r("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:h},h),m&&l?r("span",{className:"sekyro-stage__guidance-hint",children:g("capture.checkingHint")}):p!==null&&!m?r("span",{className:"sekyro-stage__guidance-hint","data-testid":"sekyro-operator-line",children:p}):null]})]})}i(Y,"CaptureStage");function G(){return k("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[r("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"}),r("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),r("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}i(G,"FlipCameraIcon");function U(){return k("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:[r("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"}),r("path",{d:"M3 3l18 18"})]})}i(U,"CameraOffIcon");import{hasMultipleCameras as H,subscribeCameraPermission as $}from"@sekyro/web";import{useEffect as N,useState as M}from"react";function j(){let[o,e]=M({state:"unknown",settled:!1}),[a,s]=M({canChoose:!1,settled:!1});return N(()=>$(t=>e({state:t,settled:!0})),[]),N(()=>{let t=!0;return H().then(c=>{t&&s({canChoose:c,settled:!0})},()=>{t&&s({canChoose:!1,settled:!0})}),()=>{t=!1}},[]),{permission:o.state,permissionSettled:o.settled,canChooseFacing:a.canChoose,facingSettled:a.settled}}i(j,"useCameraStatus");export{Y as a,G as b,j as c};
|
package/dist/chunk-COU4Y3DB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as s}from"./chunk-PXRIFHY2.js";import{jsx as m}from"react/jsx-runtime";var n={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'},f={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 y(e={}){let r={};for(let o of Object.keys(f))r[f[o]]=e.colors?.[o]??n.colors[o];return r["--sekyro-radius"]=e.radius??n.radius,r["--sekyro-font"]=e.fontFamily??n.fontFamily,r}s(y,"themeToCssVars");var l=/^#[0-9a-f]{6}$/i,d={none:"0px",sm:"4px",md:"8px",lg:"12px",full:"9999px"},g={system:"",inter:"Inter","ibm-plex-sans-arabic":'"IBM Plex Sans Arabic"',"noto-sans-arabic":'"Noto Sans Arabic"',roboto:"Roboto"};function k(e){let r={};if(!e)return r;let o={};for(let[a,c]of Object.entries(e.colors??{}))a in f&&a!=="ring"&&l.test(c??"")&&(o[a]=c);o.brand&&(o.ring=o.brand),Object.keys(o).length&&(r.colors=o);let t=d[e.radius];t&&(r.radius=t);let i=g[e.fontFamily];return i!==void 0&&(r.fontFamily=i?`${i}, ${n.fontFamily}`:n.fontFamily),r}s(k,"brandingToTheme");function u(...e){let r={};for(let o of e)o?.colors&&(r.colors={...r.colors,...o.colors}),o?.radius&&(r.radius=o.radius),o?.fontFamily&&(r.fontFamily=o.fontFamily);return r}s(u,"mergeThemes");function S({theme:e,children:r,className:o}){let t=y(e);return m("div",{className:o===void 0?"sekyro-root":`sekyro-root ${o}`,style:t,children:r})}s(S,"SekyroThemeProvider");export{n as a,y as b,k as c,u as d,S as e};
|
package/dist/chunk-LZU57LVO.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as o,j as n,n as r}from"./chunk-PXRIFHY2.js";import{jsx as i}from"react/jsx-runtime";function a({tone:t,children:e}){return i(r,{tone:t,children:e})}o(a,"StepNotice");function f(t,e,p){return p?t.t("common.noAttemptsLeft"):n(t.strings,t.locale,e)}o(f,"attemptsLine");export{a,f as b};
|
package/dist/chunk-OSS4NHIS.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as f}from"./chunk-R2D6V2R6.js";import{g as y}from"./chunk-Y4PPDNQR.js";import{a as l}from"./chunk-2CJEADGY.js";import{a as d,b as k}from"./chunk-2PGJ7P7E.js";import{a as n,b as p}from"./chunk-PXRIFHY2.js";import{useState as h}from"react";var C={document:"card",population_registry:"id",national_eid:"smartphone",phone_otp:"phone",email_otp:"email"};function b(o,t){switch(o.service){case"document":return t.t("method.document_photo");case"population_registry":return t.t("method.national_number");case"national_eid":{let a=o.nationalEid?.providerName;return a?t.t("method.national_eid",{provider:a}):t.t("method.national_eidGeneric")}default:return null}}n(b,"identityLabel");function L(o,t){let[a,i]=h(!1),[m,r]=h(null);return{busy:a,error:m,run:n(g=>{i(!0),r(null),g().then(()=>i(!1),u=>{i(!1),r(o.t(f(u,o.strings))),t?.(u)})},"run")}}n(L,"useChoiceAction");import{useId as _}from"react";import{Fragment as N,jsx as e,jsxs as s}from"react/jsx-runtime";function I(){let o=`sekyro-face-light-${_().replace(/[^A-Za-z0-9_-]/g,"")}`;return s("svg",{className:"sekyro-mark sekyro-mark--face",viewBox:"0 0 168 206","aria-hidden":"true",focusable:"false",children:[e("defs",{children:e("mask",{id:o,children:e("ellipse",{className:"sekyro-mark__arc",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"1",fill:"none",stroke:"#fff",strokeWidth:"16"})})}),e("ellipse",{cx:"84",cy:"103",rx:"64",ry:"83",fill:"none",className:"sekyro-mark__line"}),e("path",{className:"sekyro-mark__face",d:"M68 64v10M100 64v10M84 66v25q0 2-6 1M60 108q24 18 48 0"}),e("ellipse",{className:"sekyro-mark__ticks",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56"}),e("ellipse",{className:"sekyro-mark__ticks sekyro-mark__ticks--light",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56",mask:`url(#${o})`})]})}n(I,"FaceMark");var v={glasses:"jGlasses",lighting:"light",faceCamera:"camera"};function E({start:o,context:t,tips:a,tipsTitle:i,extra:m}){let{t:r}=y();return s("section",{className:"sekyro-step",children:[e(I,{}),t.captureMode==="assisted"?e(d,{title:r("capture.assisted.title"),lead:r("capture.assisted.lead")}):e(d,{title:r("native.face.introTitle"),lead:r("native.face.introLead")}),i!==void 0?e("p",{className:"sekyro-section-label",children:i}):null,e("ul",{className:"sekyro-tiprows",children:a!==void 0?a.map(c=>s("li",{children:[e(l,{name:v[c.id]??"face"}),c.text]},c.id)):s(N,{children:[s("li",{children:[e(l,{name:"light"}),r("capture.tips.light")]}),s("li",{children:[e(l,{name:"jGlasses"}),r("capture.tips.uncover")]}),s("li",{children:[e(l,{name:"smartphone"}),r("capture.tips.eyeLevel")]})]})}),m,t.assets==="failed"?e(p,{kind:"ghost",onClick:t.retryAssets,children:r("common.refresh")}):null,e(k,{children:s(p,{full:!0,disabled:t.assets!=="ready","aria-busy":t.assets==="loading"||void 0,onClick:o,children:[e(l,{name:"camera"}),r("capture.start")]})})]})}n(E,"FaceIntro");export{C as a,b,L as c,E as d};
|