@sekyro/react 0.1.0-rc.6 → 0.1.0-rc.8

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +52 -29
  3. package/dist/{chunk-Q232JYNO.js → chunk-2CJEADGY.js} +1 -1
  4. package/dist/{chunk-63NUMQST.js → chunk-2PGJ7P7E.js} +1 -1
  5. package/dist/chunk-36RC3M4K.js +2 -0
  6. package/dist/{chunk-AMOZXMUP.js → chunk-4ENKV24I.js} +1 -1
  7. package/dist/{chunk-4INDRENU.js → chunk-5JPJXBN6.js} +1 -1
  8. package/dist/{chunk-ADMDZLPM.js → chunk-COU4Y3DB.js} +1 -1
  9. package/dist/chunk-H2KIOYQU.js +2 -0
  10. package/dist/{chunk-BENNJ4GV.js → chunk-LZU57LVO.js} +1 -1
  11. package/dist/chunk-OSS4NHIS.js +2 -0
  12. package/dist/chunk-PXRIFHY2.js +2 -0
  13. package/dist/{chunk-P2LX7BBE.js → chunk-R2D6V2R6.js} +1 -1
  14. package/dist/chunk-Y4PPDNQR.js +2 -0
  15. package/dist/chunk-ZTN4YV7S.js +2 -0
  16. package/dist/chunk-ZVSRJKQE.js +2 -0
  17. package/dist/document-capture-view-IAVBLXBO.js +2 -0
  18. package/dist/eid-view-FK54R7ER.js +2 -0
  19. package/dist/email-otp-view-ZVXSJMN5.js +2 -0
  20. package/dist/flow-views-5VR7NLTE.js +2 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.cts +2 -2
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +1 -1
  25. package/dist/portrait-capture-view-FYUOQWF7.js +2 -0
  26. package/dist/{theme-BpOuzcWh.d.ts → theme-7Jj6eSH6.d.cts} +25 -8
  27. package/dist/{theme-BpOuzcWh.d.cts → theme-7Jj6eSH6.d.ts} +25 -8
  28. package/dist/verification/index.cjs +1 -1
  29. package/dist/verification/index.d.cts +8 -1
  30. package/dist/verification/index.d.ts +8 -1
  31. package/dist/verification/index.js +1 -1
  32. package/dist/verification.css +3 -0
  33. package/package.json +2 -2
  34. package/sbom.cdx.json +4 -4
  35. package/dist/chunk-3MBJZSJL.js +0 -2
  36. package/dist/chunk-4RUZQW5T.js +0 -2
  37. package/dist/chunk-65JA6YKG.js +0 -2
  38. package/dist/chunk-BJJZ4MO5.js +0 -2
  39. package/dist/chunk-BRA6F56P.js +0 -2
  40. package/dist/chunk-JAUZKPQO.js +0 -2
  41. package/dist/chunk-YUNPD6ZB.js +0 -2
  42. package/dist/document-capture-view-SKFDM4AQ.js +0 -2
  43. package/dist/eid-view-WIK6KUTY.js +0 -2
  44. package/dist/email-otp-view-TYSBCGUY.js +0 -2
  45. package/dist/flow-views-PCBR5GYS.js +0 -2
  46. package/dist/portrait-capture-view-HYOEOAF4.js +0 -2
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var We=Object.defineProperty;var nn=Object.getOwnPropertyDescriptor;var on=Object.getOwnPropertyNames;var sn=Object.prototype.hasOwnProperty;var n=(e,t)=>We(e,"name",{value:t,configurable:!0});var an=(e,t)=>{for(var r in t)We(e,r,{get:t[r],enumerable:!0})},cn=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of on(t))!sn.call(e,o)&&o!==r&&We(e,o,{get:()=>t[o],enumerable:!(s=nn(t,o))||s.enumerable});return e};var un=e=>cn(We({},"__esModule",{value:!0}),e);var Kn={};an(Kn,{DEFAULT_THEME:()=>_e,DEFAULT_TIPS:()=>we,LivenessCapture:()=>Gr,NO_FACE_DEBOUNCE_MS:()=>_t,SekyroThemeProvider:()=>$r,VOICE_KEYS:()=>Le,ar:()=>ze,attemptsRemainingText:()=>Je,brandingToTheme:()=>qr,captureErrorStringKey:()=>Ze,en:()=>he,fr:()=>Ke,hintStringKey:()=>Ye,mergeThemes:()=>Dr,reasonStringKey:()=>Xe,resolveStrings:()=>tt,retryAfterTime:()=>Qe,themeToCssVars:()=>bt});module.exports=un(Kn);var h=require("react");var qt=require("react");var Dt=require("react/jsx-runtime"),F=(0,qt.forwardRef)(n(function({kind:t="primary",full:r=!1,className:s,type:o,...i},a){let u=["sekyro-btn",`sekyro-btn--${t}`];return r&&u.push("sekyro-btn--full"),s!==void 0&&u.push(s),(0,Dt.jsx)("button",{ref:a,type:o??"button",className:u.join(" "),...i})},"Button"));var se=require("react/jsx-runtime");var ln=Array.from({length:56},(e,t)=>{let r=t/56*2*Math.PI-Math.PI/2,s=Math.cos(r),o=Math.sin(r);return{id:`tick-${t}`,frac:t/55,x1:150+108*s,y1:150+108*o,x2:150+138*s,y2:150+138*o,style:{transitionDelay:`${t*6}ms`}}});function dn(e,t,r,s){return r?"var(--sekyro-color-success)":e?s?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":t<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":t<.66?"color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)":"var(--sekyro-color-brand)":"color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)"}n(dn,"tickColor");var pn="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function $t({progress:e,phase:t,draining:r=!1}){let s=Math.min(1,Math.max(0,e)),o=Math.round(s*56),i=t==="checking",a=t==="recording",u=t==="frozen",f=i||u,T=i||a||u,v=t==="locked"||T,x=r&&!v;return(0,se.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":t,"data-filled":o,"data-recording":a?"":void 0,"data-draining":x?"":void 0,children:[(0,se.jsx)("path",{fillRule:"evenodd",d:pn,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":f?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),(0,se.jsxs)("g",{className:t==="locked"?"sekyro-capture-settle":void 0,children:[(0,se.jsx)("g",{className:f?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:ln.map((m,l)=>(0,se.jsx)("line",{x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,stroke:dn(l<o,m.frac,v,x),strokeWidth:3,strokeLinecap:"round",style:m.style,className:"sekyro-arc__tick"},m.id))}),(0,se.jsx)("g",{className:t==="seeking"?"sekyro-capture-breathe":void 0,children:(0,se.jsx)("circle",{cx:150,cy:150,r:100,fill:"none",stroke:v?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:v?3.5:2.5,className:T?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}n($t,"CaptureArc");var et=require("react");var he={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture…","capture.checking":"We're checking your identity…","capture.checkingHint":"This usually takes a few seconds — keep this page open","capture.securityNote":"Your images are encrypted and used only for this verification","capture.cameraOff":"Camera off","capture.previewAlt":"Preview of the captured image of your face","capture.retryCoaching.title":"That attempt didn't work — a few adjustments will help:","capture.retryCoaching.light":"Find good lighting — light on your face, not behind you","capture.retryCoaching.eyeLevel":"Hold your phone at eye level","capture.retryCoaching.head":"Look straight at the camera and keep your head upright","capture.attemptsRemaining.one":"{count} attempt remaining","capture.attemptsRemaining.other":"{count} attempts remaining","common.retry":"Try again","fcv2.err.permission":"Allow camera access in your browser settings (the camera icon in the address bar), then try again","fcv2.err.notfound":"No camera detected — connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera — close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS) — reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format — open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable — try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face — hold the phone in front of you","fcv3.come_closer":"Bring the phone a little closer","fcv3.move_back":"Move the phone a little farther away","fcv3.center_face":"Center your face in the circle","fcv3.straighten":"Hold your head straight","fcv3.more_light":"Find a brighter spot — light your face","fcv3.too_bright":"Too much light — move out of direct light","fcv3.hold_still":"Perfect — hold still","fcv3.steady_camera":"Hold the phone steady","reasons.no_face":"No face could be detected during the check","reasons.media_unreadable":"The submitted capture could not be read","reasons.clip_too_short":"The capture was too short","reasons.spoof_detected":"The liveness check could not confirm a live person in front of the camera","reasons.review_band":"The automatic check was not conclusive, so it was sent to human review","reasons.nni_not_found":"The national identification number was not found in the civil registry","reasons.nni_invalid":"The national identification number is not a valid 10-digit NNI","reasons.registry_unavailable":"The civil registry could not be reached to confirm the NNI","reasons.result_from_cache":"The registry check was confirmed from a recent copy of the registry","reasons.no_face_source":"No face could be detected in the selfie photo","reasons.no_face_reference":"No reference photo was available to compare your selfie against — the requester needs to resolve this, so retaking your selfie will not help","reasons.low_quality_reference":"The reference photo on file was not clear enough to compare against","reasons.below_threshold":"The selfie did not match the photo on the identity document closely enough","reasons.side_missing":"One side of the identity document was not submitted","reasons.mrz_checksum_failed":"The machine-readable zone of the document could not be validated","reasons.unreadable":"The document photo was not clear enough to read","reasons.expired_document":"The identity document has expired","reasons.authenticity_review":"The document was sent to human review to confirm its authenticity","reasons.registry_mismatch":"The document's details did not match the civil registry — a reviewer will check","reasons.document_nni_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.otp_mismatch":"The verification code did not match the one we sent","reasons.otp_expired":"The verification code expired before it was entered","reasons.otp_send_failed":"We could not send a verification code to your phone","reasons.uncalibrated_capture_channel":"Desktop/webcam captures are not yet auto-decided — your verification went to human review","reasons.location_not_allowed":"Verification isn't available in your region.","reasons.anonymizer_blocked":"Turn off your VPN or proxy, then open the link again.","reasons.nationality_not_allowed":"This service can't verify this document. Contact the organization for other options.","reasons.document_type_not_accepted":"This type of document isn't accepted. Choose another document.","reasons.underage":"You don't meet the minimum age for this service.","reasons.age_unverifiable":"We couldn't read your date of birth. Take a clearer photo of your document.","reasons.nationality_unreadable":"We couldn't read your nationality. Take a clearer photo of your document.","reasons.name_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.birth_date_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.nationality_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.document_number_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.liveness_inconclusive":"Let's try again: face a light source and hold still.","reasons.match_inconclusive":"We couldn't confirm it's you. Try again in good light, without glasses.","reasons.subject_revoked":"The identity on file for this check is no longer available — the requester needs to run a full verification, so retrying will not help","reasons.probe_not_from_liveness":"Keep your face in the frame the whole time, then try again.","reasons.document_authenticity":"Use the original card, not a photo or a copy, and avoid reflections.","reasons.mobile_required":"Continue on your phone to take the selfie.","reasons.capture_tampered":"We couldn't verify this capture. Use your phone's built-in camera, without screen recording or camera apps.","reasons.device_velocity_exceeded":"This device can't be used for another verification right now. Contact the organization.","reasons.device_cooldown":"Too many attempts. Try again later.","cooldown.retryIn":"Too many attempts. Try again {time}.","cooldown.retryAt":"Too many attempts. Try again after {time}.","capture.busy":"Our service is busy. Trying again…","errors.inference_unavailable":"Try again in a moment.","method.title":"How do you want to verify?","method.description":"Choose one option to continue","returning.title":"Confirm it's you","returning.description":"You verified your identity before. One short face capture confirms it's still you.","method.national_number":"Enter my national number (NNI)","method.document_photo":"Photo of my document","errors.method_required":"Choose how you want to verify, then continue","errors.attestation_invalid":"We could not confirm this browser session is genuine — reload the page and try again","errors.network_error":"We could not reach the verification service — check your internet connection and try again","errors.session_expired":"This verification session has expired — ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number — ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source — avoid strong light behind you","capture.tips.uncover":"Uncover your face — no glasses, mask or hand in front of it","capture.tips.eyeLevel":"Hold your phone at eye level","capture.tips.straight":"Look straight at the camera and keep still","capture.tips.summary":"Stand in a well-lit area. Uncover your face — no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera — choose Allow","capture.permission.denied":"Camera access is blocked — allow it in your browser settings (the camera icon in the address bar), then reload this page","capture.permission.unknown":"We'll ask to use your camera when you start","capture.cameraLabel":"Camera","capture.facing.user":"Front camera","capture.facing.environment":"Back camera","capture.voiceGuidance":"Voice guidance","capture.preparing.hint":"Setting up on-device face detection — this can take a moment on a slow connection","capture.ready":"Ready — start when you are","fcv2.err.models":"The face-detection models could not be loaded — check your connection and try again"};var ze={"capture.start":"تشغيل الكاميرا","capture.recordAgain":"ابدأ محاولة جديدة","capture.switchCamera":"تبديل الكاميرا","capture.preparing.title":"جارٍ تجهيز الالتقاط الآمن…","capture.checking":"نتحقق من هويتك…","capture.checkingHint":"يستغرق هذا عادةً بضع ثوانٍ — أبقِ هذه الصفحة مفتوحة","capture.securityNote":"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق","capture.cameraOff":"الكاميرا مطفأة","capture.previewAlt":"معاينة الصورة الملتقطة لوجهك","capture.retryCoaching.title":"لم تنجح هذه المحاولة — بعض التعديلات ستساعد:","capture.retryCoaching.light":"اختر مكانًا جيد الإضاءة — الضوء على وجهك لا خلفك","capture.retryCoaching.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.retryCoaching.head":"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا","capture.attemptsRemaining.zero":"لم تتبقَّ أي محاولة","capture.attemptsRemaining.one":"تبقّت محاولة واحدة","capture.attemptsRemaining.two":"تبقّت محاولتان","capture.attemptsRemaining.few":"تبقّت {count} محاولات","capture.attemptsRemaining.many":"تبقّت {count} محاولة","capture.attemptsRemaining.other":"تبقّت {count} محاولة","common.retry":"أعد المحاولة","fcv2.err.permission":"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة","fcv2.err.notfound":"لم يتم العثور على كاميرا — وصِّل كاميرا أو فعِّلها ثم أعد المحاولة","fcv2.err.inuse":"تطبيق آخر يستخدم الكاميرا — أغلقه ثم أعد المحاولة","fcv2.err.insecure":"تتطلب الكاميرا اتصالًا آمنًا (HTTPS) — افتح هذه الصفحة عبر HTTPS","fcv2.err.unsupported":"متصفحك لا يستطيع الالتقاط بصيغة مدعومة — افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري","fcv2.err.generic":"الكاميرا غير متاحة — أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة","fcv3.no_face":"لا نرى وجهك — أمسك الهاتف أمامك","fcv3.come_closer":"قرّب الهاتف قليلًا","fcv3.move_back":"أبعد الهاتف قليلًا","fcv3.center_face":"ضع وجهك في منتصف الدائرة","fcv3.straighten":"أبقِ رأسك مستقيمًا","fcv3.more_light":"انتقل إلى مكان أكثر إضاءة — أضئ وجهك","fcv3.too_bright":"الإضاءة قوية جدًا — تجنّب الضوء المباشر على وجهك","fcv3.hold_still":"ممتاز — لا تتحرك","fcv3.steady_camera":"أمسك الهاتف بثبات","reasons.no_face":"تعذّر اكتشاف أي وجه أثناء التحقق","reasons.media_unreadable":"تعذّرت قراءة اللقطة المُرسلة","reasons.clip_too_short":"كانت اللقطة أقصر من اللازم","reasons.spoof_detected":"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا","reasons.review_band":"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية","reasons.nni_not_found":"لم يُعثر على الرقم الوطني في سجل الحالة المدنية","reasons.nni_invalid":"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام","reasons.registry_unavailable":"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد الرقم الوطني","reasons.result_from_cache":"أُكِّد فحص السجل استنادًا إلى نسخة حديثة من السجل","reasons.no_face_source":"تعذّر اكتشاف وجه في الصورة الذاتية","reasons.no_face_reference":"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها — على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي","reasons.low_quality_reference":"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة","reasons.below_threshold":"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية","reasons.side_missing":"أحد وجهي وثيقة الهوية لم يُرسل","reasons.mrz_checksum_failed":"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة","reasons.unreadable":"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة","reasons.expired_document":"انتهت صلاحية وثيقة الهوية","reasons.authenticity_review":"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها","reasons.registry_mismatch":"بيانات الوثيقة لا تطابق السجل المدني — سيتحقق منها مراجع","reasons.document_nni_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد — أُحيل تحققك إلى مراجعة بشرية","reasons.location_not_allowed":"التحقق غير متاح في منطقتك.","reasons.anonymizer_blocked":"أوقف تشغيل VPN أو الوكيل ثم افتح الرابط مجددًا.","reasons.nationality_not_allowed":"لا يمكن لهذه الخدمة التحقق من هذه الوثيقة. تواصل مع الجهة لمعرفة الخيارات الأخرى.","reasons.document_type_not_accepted":"هذا النوع من الوثائق غير مقبول. اختر وثيقة أخرى.","reasons.underage":"لا تستوفي الحد الأدنى للسن لهذه الخدمة.","reasons.age_unverifiable":"تعذّرت قراءة تاريخ ميلادك. التقط صورة أوضح لوثيقتك.","reasons.nationality_unreadable":"تعذّرت قراءة جنسيتك. التقط صورة أوضح لوثيقتك.","reasons.name_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.birth_date_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.nationality_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.document_number_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.liveness_inconclusive":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","reasons.match_inconclusive":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","reasons.subject_revoked":"لم تعد الهوية المحفوظة لهذا التحقق متاحة — على الجهة الطالبة إجراء تحقق كامل، وإعادة المحاولة لن تُجدي","reasons.probe_not_from_liveness":"أبقِ وجهك داخل الإطار طوال الوقت، ثم حاول مجددًا.","reasons.document_authenticity":"استخدم البطاقة الأصلية، لا صورة لها ولا نسخة منها، وتجنّب الانعكاسات.","reasons.mobile_required":"تابع على هاتفك لالتقاط صورة لوجهك.","reasons.capture_tampered":"تعذّر التحقق من هذا الالتقاط. استخدم الكاميرا المدمجة في هاتفك، دون تسجيل الشاشة أو تطبيقات الكاميرا.","reasons.device_velocity_exceeded":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع الجهة.","reasons.device_cooldown":"محاولات كثيرة. حاول مجددًا لاحقًا.","cooldown.retryIn":"محاولات كثيرة. حاول مجددًا {time}.","cooldown.retryAt":"محاولات كثيرة. حاول مجددًا بعد {time}.","capture.busy":"خدمتنا مشغولة حاليًا. نعيد المحاولة…","errors.inference_unavailable":"حاول مجددًا بعد لحظات.","method.title":"كيف تريد التحقق من هويتك؟","method.description":"اختر إحدى الطريقتين للمتابعة","returning.title":"أكّد أنك أنت","returning.description":"سبق أن تحقّقت من هويتك. التقاط قصير لوجهك يكفي لتأكيد أنك أنت.","method.national_number":"إدخال رقمي الوطني (NNI)","method.document_photo":"تصوير وثيقتي","errors.method_required":"اختر طريقة التحقق، ثم تابع","errors.attestation_invalid":"تعذّر التأكد من سلامة جلسة المتصفح — أعد تحميل الصفحة وحاول مجددًا","errors.network_error":"تعذّر الوصول إلى خدمة التحقق — تحقق من اتصالك بالإنترنت وأعد المحاولة","errors.session_expired":"انتهت صلاحية جلسة التحقق هذه — اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا","errors.nni_unbound":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف — اطلب رابطًا جديدًا من الجهة الطالبة","capture.tips.title":"لتحقق ناجح:","capture.tips.light":"اجعل الضوء أمام وجهك — تجنّب الإضاءة القوية خلفك","capture.tips.uncover":"اكشف وجهك — بلا نظارات أو كمامة أو يد أمامه","capture.tips.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.tips.straight":"انظر مباشرة إلى الكاميرا وابقَ ثابتًا","capture.tips.summary":"اختر مكانًا جيد الإضاءة. اكشف وجهك — بلا نظارات أو كمامة. بعد تشغيل الكاميرا، أمسك هاتفك بمستوى العينين، وانظر مباشرة إلى الكاميرا وابقَ ثابتًا.","capture.tips.listen":"استمع إلى التعليمات","capture.tips.stop":"إيقاف","capture.permission.granted":"تم السماح بالوصول إلى الكاميرا","capture.permission.prompt":"سيطلب متصفحك استخدام الكاميرا — اختر «السماح»","capture.permission.denied":"الوصول إلى الكاميرا محظور — اسمح به من إعدادات المتصفح (رمز الكاميرا في شريط العنوان)، ثم أعد تحميل الصفحة","capture.permission.unknown":"سنطلب استخدام الكاميرا عند البدء","capture.cameraLabel":"الكاميرا","capture.facing.user":"الكاميرا الأمامية","capture.facing.environment":"الكاميرا الخلفية","capture.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك — قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز — ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه — تحقق من اتصالك ثم أعد المحاولة"};var Ke={"capture.start":"Démarrer la caméra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de caméra","capture.preparing.title":"Préparation de la capture sécurisée…","capture.checking":"Nous vérifions votre identité…","capture.checkingHint":"Cela prend généralement quelques secondes — gardez cette page ouverte","capture.securityNote":"Vos images sont chiffrées et utilisées uniquement pour cette vérification","capture.cameraOff":"Caméra éteinte","capture.previewAlt":"Aperçu de l’image capturée de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti — quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien éclairé — lumière sur le visage, pas derrière vous","capture.retryCoaching.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la caméra, la tête bien droite","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"Réessayer","fcv2.err.permission":"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez","fcv2.err.notfound":"Aucune caméra détectée — branchez ou activez une caméra, puis réessayez","fcv2.err.inuse":"La caméra est utilisée par une autre application — fermez-la, puis réessayez","fcv2.err.insecure":"La caméra nécessite une connexion sécurisée (HTTPS) — rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible — ouvrez cette page dans un navigateur récent comme Chrome ou Safari","fcv2.err.generic":"Caméra indisponible — réessayez, ou contactez le support si le problème persiste","fcv3.no_face":"Nous ne voyons pas votre visage — tenez le téléphone devant vous","fcv3.come_closer":"Rapprochez un peu le téléphone","fcv3.move_back":"Éloignez un peu le téléphone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la tête droite","fcv3.more_light":"Cherchez un endroit plus lumineux — éclairez votre visage","fcv3.too_bright":"Trop de lumière — évitez la lumière directe sur le visage","fcv3.hold_still":"Parfait — ne bougez plus","fcv3.steady_camera":"Tenez le téléphone stable","reasons.no_face":"Aucun visage n’a pu être détecté pendant la vérification","reasons.media_unreadable":"La capture envoyée n’a pas pu être lue","reasons.clip_too_short":"La capture était trop courte","reasons.spoof_detected":"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra","reasons.review_band":"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain","reasons.nni_not_found":"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil","reasons.nni_invalid":"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres","reasons.registry_unavailable":"Le registre d'état civil n'a pas pu être joint pour confirmer le NNI","reasons.result_from_cache":"Le contrôle du registre a été confirmé à partir d'une copie récente du registre","reasons.no_face_source":"Aucun visage n'a pu être détecté sur la photo selfie","reasons.no_face_reference":"Aucune photo de référence n'était disponible pour comparer votre selfie — c'est au demandeur de le résoudre, reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de référence enregistrée n'était pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité","reasons.side_missing":"Un côté de la pièce d'identité n'a pas été envoyé","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu être validée","reasons.unreadable":"La photo du document n'était pas assez nette pour être lue","reasons.expired_document":"La pièce d'identité a expiré","reasons.authenticity_review":"Le document a été transmis à un examen humain pour confirmer son authenticité","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil — un examinateur va vérifier","reasons.document_nni_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.otp_mismatch":"Le code de vérification ne correspond pas à celui que nous avons envoyé","reasons.otp_expired":"Le code de vérification a expiré avant d'être saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de vérification à votre téléphone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore décidées automatiquement — votre vérification part en revue humaine","reasons.location_not_allowed":"La vérification n'est pas disponible dans votre région.","reasons.anonymizer_blocked":"Désactivez votre VPN ou proxy, puis rouvrez le lien.","reasons.nationality_not_allowed":"Ce service ne peut pas vérifier ce document. Contactez l'organisation pour d'autres options.","reasons.document_type_not_accepted":"Ce type de document n'est pas accepté. Choisissez un autre document.","reasons.underage":"Vous n'avez pas l'âge minimum requis pour ce service.","reasons.age_unverifiable":"Nous n'avons pas pu lire votre date de naissance. Prenez une photo plus nette de votre document.","reasons.nationality_unreadable":"Nous n'avons pas pu lire votre nationalité. Prenez une photo plus nette de votre document.","reasons.name_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.birth_date_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.nationality_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.document_number_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.liveness_inconclusive":"Réessayons : placez-vous face à une source de lumière et restez immobile.","reasons.match_inconclusive":"Nous n'avons pas pu confirmer qu'il s'agit bien de vous. Réessayez dans un endroit bien éclairé, sans lunettes.","reasons.subject_revoked":"L'identité enregistrée pour cette vérification n'est plus disponible — le demandeur doit lancer une vérification complète, réessayer n'y changera rien","reasons.probe_not_from_liveness":"Gardez votre visage dans le cadre tout du long, puis réessayez.","reasons.document_authenticity":"Utilisez la carte originale, pas une photo ni une copie, et évitez les reflets.","reasons.mobile_required":"Continuez sur votre téléphone pour prendre le selfie.","reasons.capture_tampered":"Nous n'avons pas pu vérifier cette capture. Utilisez l'appareil photo intégré de votre téléphone, sans enregistrement d'écran ni application de caméra.","reasons.device_velocity_exceeded":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez l'organisation.","reasons.device_cooldown":"Trop de tentatives. Réessayez plus tard.","cooldown.retryIn":"Trop de tentatives. Réessayez {time}.","cooldown.retryAt":"Trop de tentatives. Réessayez à partir de {time}.","capture.busy":"Notre service est très sollicité. Nouvel essai en cours…","errors.inference_unavailable":"Réessayez dans un instant.","method.title":"Comment souhaitez-vous vérifier votre identité ?","method.description":"Choisissez une option pour continuer","returning.title":"Confirmez qu'il s'agit bien de vous","returning.description":"Vous avez déjà vérifié votre identité. Une courte capture du visage confirme qu'il s'agit toujours de vous.","method.national_number":"Saisir mon numéro national (NNI)","method.document_photo":"Photographier mon document","errors.method_required":"Choisissez comment vérifier votre identité, puis continuez","errors.attestation_invalid":"Nous n'avons pas pu confirmer l'authenticité de cette session de navigateur — rechargez la page et réessayez","errors.network_error":"Nous n'avons pas pu joindre le service de vérification — vérifiez votre connexion internet et réessayez","errors.session_expired":"Cette session de vérification a expiré — demandez un nouveau lien à l'organisme qui vous a envoyé ici","errors.nni_unbound":"Ce lien a été créé sans votre numéro national d'identification — demandez un nouveau lien à l'organisme demandeur","capture.tips.title":"Pour une vérification réussie :","capture.tips.light":"Placez-vous face à la lumière — évitez une forte lumière derrière vous","capture.tips.uncover":"Dégagez votre visage — ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.tips.straight":"Regardez droit vers la caméra et restez immobile","capture.tips.summary":"Placez-vous dans une zone bien éclairée. Dégagez votre visage — ni lunettes, ni masque. Une fois la caméra démarrée, tenez votre téléphone à hauteur des yeux, regardez droit vers la caméra et restez immobile.","capture.tips.listen":"Écouter les instructions","capture.tips.stop":"Arrêter","capture.permission.granted":"Accès à la caméra autorisé","capture.permission.prompt":"Votre navigateur va demander l’accès à la caméra — choisissez « Autoriser »","capture.permission.denied":"L’accès à la caméra est bloqué — autorisez-le dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l’accès à la caméra au démarrage","capture.cameraLabel":"Caméra","capture.facing.user":"Caméra avant","capture.facing.environment":"Caméra arrière","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la détection du visage sur l’appareil — cela peut prendre un instant sur une connexion lente","capture.ready":"Prêt — commencez quand vous voulez","fcv2.err.models":"Impossible de charger les modèles de détection du visage — vérifiez votre connexion puis réessayez"};function Ye(e){switch(e){case"center":return"fcv3.center_face";case"closer":return"fcv3.come_closer";case"farther":return"fcv3.move_back";case"light":return"fcv3.more_light";case"still":case"hold":return"fcv3.hold_still";default:{let t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}n(Ye,"hintStringKey");function Ze(e){return`fcv2.err.${e}`}n(Ze,"captureErrorStringKey");function Xe(e){switch(e){case"no_recorder":return"fcv2.err.unsupported";case"attestation":return"errors.attestation_invalid";case"network":return"errors.network_error";case"nni_unbound":return"errors.nni_unbound";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${e}`;return Object.hasOwn(he,t)?t:null}}}n(Xe,"reasonStringKey");function Qe(e,t,r=new Date){if(t===void 0)return null;let s=new Date(t),o=s.getTime()-r.getTime();if(!Number.isFinite(o)||o<=0)return null;if(o<36e5){let u=Math.max(1,Math.ceil(o/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(u,"minute")}}let i=s.toDateString()===r.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...i?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(s)}}n(Qe,"retryAfterTime");function Je(e,t,r){let s=new Intl.PluralRules(t).select(r);return((s==="other"?void 0:e[`capture.attemptsRemaining.${s}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(r))}n(Je,"attemptsRemainingText");var fn={ar:ze,fr:Ke,en:he};function tt(e,t){let r=fn[e];if(t===void 0)return r;let s={...r};for(let o of Object.keys(t)){let i=t[o];typeof i=="string"&&(s[o]=i)}return s}n(tt,"resolveStrings");var jt=(0,et.createContext)(e=>he[e]??""),Wt=jt.Provider;function z(){return(0,et.useContext)(jt)}n(z,"useStrings");var A=require("react/jsx-runtime");function Yt({videoRef:e,guidanceText:t,guidanceHint:r,guidanceKey:s,progress:o,phase:i,draining:a=!1,stillUrl:u,showChecking:f,onSwitchCamera:T,canSwitchCamera:v,voicePrompt:x,overlay:m,reduceMotion:l=!1}){let k=z(),b=i==="checking",L=b||i==="frozen",g=L&&f?k("capture.checking"):t,R=x?.(r,g,s);return(0,A.jsxs)("div",{className:l?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[(0,A.jsx)("video",{ref:e,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),u!==null&&L?(0,A.jsx)("img",{src:u,alt:k("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,(0,A.jsx)($t,{progress:o,phase:i,draining:a}),m?.(e),R!=null&&!L?(0,A.jsx)("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:R}):null,v?(0,A.jsx)(F,{kind:"chip",onClick:T,"aria-label":k("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:(0,A.jsx)(mn,{})}):null,b&&f?(0,A.jsxs)("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[(0,A.jsx)(gn,{}),k("capture.cameraOff")]}):null,(0,A.jsxs)("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[(0,A.jsx)("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:g},g),L&&f?(0,A.jsx)("span",{className:"sekyro-stage__guidance-hint",children:k("capture.checkingHint")}):null]})]})}n(Yt,"CaptureStage");function mn(){return(0,A.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[(0,A.jsx)("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),(0,A.jsx)("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),(0,A.jsx)("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}n(mn,"FlipCameraIcon");function gn(){return(0,A.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon sekyro-icon--sm",children:[(0,A.jsx)("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),(0,A.jsx)("path",{d:"M3 3l18 18"})]})}n(gn,"CameraOffIcon");var rt=require("react");var J=require("react/jsx-runtime");function Zt({showCoaching:e,attemptsText:t,showRetake:r,onRetake:s}){let o=z(),i=(0,rt.useRef)(null);return(0,rt.useEffect)(()=>{r&&i.current?.focus()},[r]),!e&&!r?null:(0,J.jsxs)("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?(0,J.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,J.jsx)("p",{className:"sekyro-text-body",children:o("capture.retryCoaching.title")}),(0,J.jsxs)("ul",{className:"sekyro-coaching",children:[(0,J.jsx)("li",{children:o("capture.retryCoaching.light")}),(0,J.jsx)("li",{children:o("capture.retryCoaching.eyeLevel")}),(0,J.jsx)("li",{children:o("capture.retryCoaching.head")})]}),t!==null?(0,J.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:t}):null]}):null,r?(0,J.jsx)(F,{ref:i,className:"sekyro-btn--start",onClick:s,children:o("capture.recordAgain")}):null]})}n(Zt,"CapturedPanel");function nt(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}n(nt,"isDevBuild");var Xt=require("react"),Qt=(0,Xt.createContext)(null);var $=require("react");var Jt=require("react/jsx-runtime");function Y({tone:e,role:t,children:r,testId:s}){return(0,Jt.jsx)("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":s,children:r})}n(Y,"Notice");var er=require("react");var ie=require("react/jsx-runtime"),yn=["user","environment"];function tr({value:e,onChange:t}){let r=z(),s=(0,er.useId)();return(0,ie.jsxs)("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[(0,ie.jsx)("legend",{className:"sekyro-segmented__legend",children:r("capture.cameraLabel")}),(0,ie.jsx)("div",{className:"sekyro-segmented__options",children:yn.map(o=>(0,ie.jsxs)("label",{className:"sekyro-segmented__option",children:[(0,ie.jsx)("input",{type:"radio",className:"sekyro-segmented__input",name:s,value:o,checked:e===o,onChange:()=>t(o)}),(0,ie.jsxs)("span",{className:"sekyro-segmented__face",children:[(0,ie.jsx)("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),r(`capture.facing.${o}`)]})]},o))})]})}n(tr,"FacingPicker");var p=require("react/jsx-runtime");function ee({className:e,children:t}){return(0,p.jsx)("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}n(ee,"Svg");var mt="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function rr(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,p.jsx)("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}n(rr,"SunIcon");function nr(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,p.jsx)("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}n(nr,"FaceUncoveredIcon");function or(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),(0,p.jsx)("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),(0,p.jsx)("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}n(or,"PhoneEyeLevelIcon");function sr(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),(0,p.jsx)("circle",{cx:"12",cy:"12",r:"2.8"})]})}n(sr,"LookStraightIcon");function ir(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("path",{d:mt}),(0,p.jsx)("path",{d:"M9 13l2 2 4-4"})]})}n(ir,"CameraCheckIcon");function ar(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("path",{d:mt}),(0,p.jsx)("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}n(ar,"CameraAskIcon");function cr(e){return(0,p.jsxs)(ee,{...e,children:[(0,p.jsx)("path",{d:mt}),(0,p.jsx)("path",{d:"M3 3l18 18"})]})}n(cr,"CameraBlockedIcon");function Se({off:e,className:t}){return(0,p.jsxs)(ee,{...t!==void 0?{className:t}:{},children:[(0,p.jsx)("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?(0,p.jsx)("path",{d:"M4 4l16 16"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),(0,p.jsx)("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}n(Se,"SpeakerIcon");function ur(e){return(0,p.jsx)(ee,{...e,children:(0,p.jsx)("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}n(ur,"CheckIcon");function lr(e){return(0,p.jsxs)(ee,{className:e.className??"sekyro-spinner",children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),(0,p.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}n(lr,"SpinnerIcon");var ot=require("react");var de=require("react/jsx-runtime");function dr({state:e}){let t=z(),[r,s]=(0,ot.useState)(!1);(0,ot.useEffect)(()=>{e!=="unknown"&&s(!0)},[e]);let o=e==="granted"?(0,de.jsx)(ir,{}):e==="denied"?(0,de.jsx)(cr,{}):(0,de.jsx)(ar,{});return(0,de.jsxs)("div",{role:r?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[(0,de.jsx)("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:o}),(0,de.jsx)("span",{children:t(`capture.permission.${e}`)})]})}n(dr,"PermissionRow");var pr=require("react");var Z=require("react/jsx-runtime"),we=["light","uncover","eyeLevel","straight"],hn={light:{key:"capture.tips.light",icon:n(()=>(0,Z.jsx)(rr,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:n(()=>(0,Z.jsx)(nr,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:n(()=>(0,Z.jsx)(or,{}),"icon")},straight:{key:"capture.tips.straight",icon:n(()=>(0,Z.jsx)(sr,{}),"icon")}};function fr({tips:e}){let t=z(),r=(0,pr.useId)();return e.length===0?null:(0,Z.jsxs)("section",{className:"sekyro-tips","aria-labelledby":r,"data-testid":"sekyro-tips",children:[(0,Z.jsx)("p",{className:"sekyro-tips__title",id:r,children:t("capture.tips.title")}),(0,Z.jsx)("ul",{className:"sekyro-tips__list",children:e.map(s=>{let o=typeof s=="string"?hn[s]:void 0,i=typeof s=="string"?s:s.id,a=o!==void 0?o.icon():typeof s=="string"?void 0:s.icon,u=o!==void 0?t(o.key):typeof s=="string"?s:s.text;return(0,Z.jsxs)("li",{className:"sekyro-tips__item",children:[a!=null?(0,Z.jsx)("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:a}):null,(0,Z.jsx)("span",{children:u})]},i)})})]})}n(fr,"TipList");var pe=require("react/jsx-runtime");function mr({voice:e}){let t=z();if(!e.supported)return null;let r=e.enabled;return(0,pe.jsxs)("button",{type:"button",role:"switch","aria-checked":r,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>e.toggle(),children:[(0,pe.jsxs)("span",{className:"sekyro-switch__label",children:[(0,pe.jsx)(Se,{off:!r}),t("capture.voiceGuidance")]}),(0,pe.jsx)("span",{className:"sekyro-switch__track","aria-hidden":"true",children:(0,pe.jsx)("span",{className:"sekyro-switch__thumb",children:r?(0,pe.jsx)(ur,{className:"sekyro-switch__check"}):null})})]})}n(mr,"VoiceSwitch");var P=require("react/jsx-runtime");function gr({assets:e,onRetryAssets:t,permission:r,canChooseFacing:s,facing:o,onFacingChange:i,voice:a,tips:u,summary:f,startLabel:T,startDisabled:v,onStart:x}){let m=z(),l=(0,$.useRef)(f?.stop);l.current=f?.stop,(0,$.useEffect)(()=>()=>l.current?.(),[]);let k=(0,$.useRef)(null),b=(0,$.useRef)(null),w=(0,$.useRef)(null),L=(0,$.useRef)(e),g=(0,$.useRef)(!1);(0,$.useEffect)(()=>{let j=L.current;if(L.current=e,j===e)return;let B=g.current;e!=="loading"&&(g.current=!1),vn(k.current)&&(e==="failed"?w.current?.focus():B&&b.current?.focus())},[e]);let R=(0,$.useCallback)(()=>{g.current=!0,t()},[t]),N=e==="loading",U=N||v,C=(0,$.useCallback)(()=>{U||(l.current?.(),x())},[U,x]),K;return e==="failed"?K=(0,P.jsxs)(Y,{tone:"danger",testId:"sekyro-assets-error",children:[(0,P.jsx)("p",{className:"sekyro-text-body",children:m("fcv2.err.models")}),(0,P.jsx)(F,{kind:"ghost",ref:w,className:"sekyro-btn--start",onClick:R,"data-testid":"sekyro-assets-retry",children:m("common.retry")})]}):K=(0,P.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,P.jsx)(F,{ref:b,full:!0,"data-testid":"sekyro-start","aria-disabled":U?"true":void 0,"aria-busy":N?"true":void 0,onClick:C,children:N?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(lr,{}),m("capture.preparing.title")]}):T??m("capture.start")}),N?(0,P.jsx)("p",{className:"sekyro-text-muted",children:m("capture.preparing.hint")}):null]}),(0,P.jsxs)("div",{ref:k,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[u!==!1?(0,P.jsx)(fr,{tips:u}):null,f!==void 0?(0,P.jsxs)(F,{kind:"ghost",className:"sekyro-btn--start",onClick:f.toggle,"data-testid":"sekyro-tips-listen",children:[(0,P.jsx)(Se,{off:!1}),m(f.playing?"capture.tips.stop":"capture.tips.listen")]}):null,(0,P.jsx)(dr,{state:r}),s?(0,P.jsx)(tr,{value:o,onChange:i}):null,(0,P.jsx)(mr,{voice:a}),(0,P.jsx)("p",{className:"sekyro-text-muted",children:m("capture.securityNote")}),K,(0,P.jsx)("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?m("capture.preparing.title"):e==="ready"?m("capture.ready"):""})]})}n(gr,"PreCaptureScreen");function vn(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}n(vn,"focusIsOurs");var hr=require("react");var yr=require("react");function st(){return(0,yr.useCallback)(e=>{e?.focus()},[])}n(st,"useFocusOnMount");var te=require("react/jsx-runtime");function vr({choice:e,busy:t,failed:r,focus:s,eidLabel:o,onSelect:i}){let a=z(),u=(0,hr.useId)(),f=st(),T=e.options.filter(v=>v!=="document_chip"&&(v!=="national_eid"||o!==void 0));return(0,te.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":u,"data-testid":"sekyro-method",children:[(0,te.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,te.jsx)("h2",{id:u,className:"sekyro-text-body",children:a("method.title")}),(0,te.jsx)("p",{className:"sekyro-text-muted",children:a("method.description")})]}),r?(0,te.jsx)(Y,{tone:"danger",children:(0,te.jsx)("span",{children:a("errors.network_error")})}):null,(0,te.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:T.map((v,x)=>(0,te.jsx)(F,{ref:x===0&&s?f:void 0,kind:x===0?"primary":"ghost",full:!0,disabled:t,"aria-busy":t||void 0,onClick:()=>i(v),children:v==="national_eid"?o:a(`method.${v}`)},v))})]})}n(vr,"MethodScreen");var it=require("@sekyro/web"),xe=require("react");function _r(){let[e,t]=(0,xe.useState)({state:"unknown",settled:!1}),[r,s]=(0,xe.useState)(!1);return(0,xe.useEffect)(()=>(0,it.subscribeCameraPermission)(o=>t({state:o,settled:!0})),[]),(0,xe.useEffect)(()=>{let o=!0;return(0,it.hasMultipleCameras)().then(i=>{o&&s(i)}),()=>{o=!1}},[]),{permission:e.state,permissionSettled:e.settled,canChooseFacing:r}}n(_r,"useCameraStatus");var Re=require("react");function kr(e){return Cr(e,"mobileRequired")}n(kr,"useMobileRequired");function br(e){return Cr(e,"returning").required}n(br,"useReturning");function Cr(e,t){let[r,s]=(0,Re.useState)({required:!1,settled:e===void 0});return(0,Re.useEffect)(()=>{let o=e?.[t];if(e===void 0||typeof o!="function"){s({required:!1,settled:!0});return}let i=!0;return s({required:!1,settled:!1}),Promise.resolve().then(()=>o.call(e)).then(a=>{i&&s({required:a===!0,settled:!0})},()=>{i&&s({required:!1,settled:!0})}),()=>{i=!1}},[e,t]),r}n(Cr,"useFlag");function Sr(e){let[t,r]=(0,Re.useState)(!1);return(0,Re.useEffect)(()=>{if(r(!1),e===void 0)return;let s=e.on("busy",()=>r(!0)),o=e.on("result",()=>r(!1));return()=>{s(),o()}},[e]),t}n(Sr,"useBusy");var Te=require("@sekyro/web"),q=require("react");var _n=n(()=>"idle","serverSnapshot");function wr(e){return(0,Te.preloadLivenessAssets)(e!==void 0?{assetBaseUrl:e}:{})}n(wr,"preload");function xr(e,t=!0){let r=(0,q.useSyncExternalStore)((0,q.useCallback)(x=>(0,Te.subscribeLivenessAssets)(x,e),[e]),()=>(0,Te.getLivenessAssetsStatus)(e),_n),[s,o]=(0,q.useState)(null),i=(0,q.useRef)(!1),a=(0,q.useCallback)(()=>{wr(e).then(x=>{i.current&&x==="idle"&&o({base:e})})},[e]);(0,q.useEffect)(()=>(i.current=!0,a(),()=>{i.current=!1}),[a]);let u=(0,q.useRef)(null);(0,q.useEffect)(()=>{if(r!=="idle"){u.current={base:e};return}!t||u.current===null||u.current.base!==e||(u.current=null,a())},[r,e,a,t]);let f=(0,q.useCallback)(()=>{wr(e)},[e]);return{gate:s!==null&&s.base===e&&r==="idle"||r==="ready"?"ready":r==="failed"?"failed":"loading",retry:f}}n(xr,"useLivenessAssets");var Tr=require("@sekyro/web"),V=require("react");var Rr={progress:0,hint:null,faceDetected:!1};function Lr(e){let{videoRef:t,assetBaseUrl:r}=e,o=(0,V.useRef)(e.verification).current,i=(0,V.useRef)(!1);e.verification!==o&&!i.current&&nt()&&(i.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let a=(0,V.useRef)(null),[u,f]=(0,V.useState)("idle"),[T,v]=(0,V.useState)(Rr),[x,m]=(0,V.useState)(!1),[l,k]=(0,V.useState)(!1),[b,w]=(0,V.useState)(null),[L,g]=(0,V.useState)(!1),[R,N]=(0,V.useState)(null),[U,C]=(0,V.useState)(null),[K,j]=(0,V.useState)(null),B=(0,V.useRef)(null),c=(0,V.useRef)(e);c.current=e,(0,V.useEffect)(()=>{let M=t.current;if(M===null)return;let fe={video:M,...r!==void 0?{assetBaseUrl:r}:{}},G=o!==void 0?o.liveness(fe):(0,Tr.createLivenessCapture)(fe);a.current=G;let H=[G.on("state",S=>{S==="starting"&&(N(null),C(null),v(Rr),k(!1),m(!1),w(null),B.current=null),f(S),c.current.onStateChange?.(S)}),G.on("gate",S=>{let me=B.current;B.current=S.progress,m(me!==null&&S.progress<me-.001&&S.progress>0&&S.progress<1),S.progress>=1&&k(!0),v(S)}),G.on("frozen",({previewDataUrl:S})=>w(S)),G.on("profile",({animations:S})=>g(S==="reduced")),G.on("captured",S=>{N(S),j(null),c.current.onCaptured?.(S)}),G.on("error",S=>{C(S),c.current.onError?.(S)}),o?.on("result",S=>{j(S),c.current.onResult?.(S)})];return()=>{for(let S of H)S?.();a.current=null,G.destroy()}},[o,t,r]);let O=(0,V.useCallback)(M=>{a.current?.start(M)},[]),E=(0,V.useCallback)(()=>{a.current?.retry()},[]),D=(0,V.useCallback)(()=>{k(!1),m(!1),w(null),B.current=null,a.current?.switchCamera()},[]);return{state:u,gate:T,draining:x,gateLocked:l,frozenPreview:b,reduceMotion:L,artifacts:R,error:U,result:K,start:O,retry:E,switchCamera:D}}n(Lr,"useLivenessHandle");var ae=require("react");var kn=new Set(["national_number"]);function Vr(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(r=>kn.has(r));return t.length>0?{...e,options:t}:null}n(Vr,"pending");function Nr(e){let[t,r]=(0,ae.useState)(null),[s,o]=(0,ae.useState)(e===void 0),[i,a]=(0,ae.useState)(!1),[u,f]=(0,ae.useState)(!1);(0,ae.useEffect)(()=>{if(r(null),e===void 0){o(!0);return}let m=!0,l=e.methodChoice;typeof l=="function"?(o(!1),Promise.resolve().then(()=>l.call(e)).then(b=>{m&&r(Vr(b))},()=>{}).finally(()=>{m&&o(!0)})):o(!0);let k=e.on("method",b=>r(Vr(b)));return()=>{m=!1,k()}},[e]);let T=(0,ae.useCallback)(async m=>{if(e===void 0)return!1;a(!0),f(!1);try{return await e.selectMethod(m),r(null),!0}catch{return f(!0),!1}finally{a(!1)}},[e]),v=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:v==="national_number"&&!u?v:null,settled:s,busy:i,failed:u,select:T}}n(Nr,"useMethodChoice");var Ve=require("react");var Le=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera","capture.tips.summary"];function ve(e){return e!==null&&Le.includes(e)}n(ve,"isVoiceKey");var bn=["ar","fr","en"];function Cn(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}n(Cn,"isClipUrl");function Sn(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let r={};for(let s of bn){let o=t[s];if(!(typeof o!="object"||o===null))for(let[i,a]of Object.entries(o))!ve(i)||!Cn(a)||((r[s]??(r[s]={}))[i]=a)}return Object.keys(r).length>0?r:null}n(Sn,"toVoiceClipMap");function Ir(e){let[t,r]=(0,Ve.useState)(null);(0,Ve.useEffect)(()=>{if(r(null),e===void 0)return;let o=!0,i=n(u=>{if(!o)return;let f=typeof u=="object"&&u!==null&&typeof u.setId=="string"?u:null;r(T=>T?.setId===f?.setId?T:f)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(i,()=>i(null))}catch{i(null)}let a=e.on("view",u=>i(u.voice));return()=>{o=!1,a()}},[e]);let s=(0,Ve.useMemo)(()=>t!==null?Sn(t):null,[t]);return e===void 0?null:s}n(Ir,"useServerVoiceClips");var gt=require("react/jsx-runtime");function Ar({voice:e}){let t=z();return(0,gt.jsx)(F,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>e.toggle(),children:(0,gt.jsx)(Se,{off:!e.enabled,className:"sekyro-icon"})})}n(Ar,"VoiceChip");var y=require("react");var wn=n((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function Ne(e,t,r){let s;try{if(typeof e=="function")s=e(t,r);else{let o=e[r];s=o!=null&&wn(o,t)?o[t]:null}}catch{return null}return typeof s=="string"&&s!==""?s:null}n(Ne,"resolveClip");var xn="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",Mr={ar:"ar-SA",fr:"fr-FR",en:"en-US"};function re(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}n(re,"synth");function Rn(){return re()!==null&&typeof SpeechSynthesisUtterance=="function"}n(Rn,"speechAvailable");function Pr(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}n(Pr,"baseLang");function zr(e,t){let r=n(o=>o.replace(/_/g,"-").toLowerCase(),"norm"),s=Pr(t);return e.find(o=>r(o.lang)===r(t))??e.find(o=>Pr(o.lang)===s)}n(zr,"pickVoice");function Kr(e){if(!Rn())return!1;let t=[];try{t=re()?.getVoices()??[]}catch{return!0}return t.length===0||zr(t,e)!==void 0}n(Kr,"speechUsable");function Or(e){let t=re();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}n(Or,"subscribeVoices");function Oe(e){try{let t=typeof location<"u"?location.href:"http://localhost/",r=new URL(e,t);return`clip:${r.origin}${r.pathname}`}catch{return`clip:${e}`}}n(Oe,"clipIdentity");function Er(e){e.pause(),e.removeAttribute("src"),e.load()}n(Er,"release");function Hr(){let e=null,t=null,r=0,s=null,o=[],i=new Map,a=n(()=>{o=re()?.getVoices()??[]},"loadVoices"),u=!1,f=n(()=>{let l=re();u||l===null||(u=!0,a(),l.addEventListener?.("voiceschanged",a))},"bindVoices"),T=n(()=>(e??(e=new Audio),e),"element"),v=n((l,k,b)=>{let w=re();if(w!==null&&l!==""&&typeof SpeechSynthesisUtterance=="function"){f();let L=zr(o,k);if(o.length===0||L!==void 0){w.cancel();let g=new SpeechSynthesisUtterance(l);g.lang=k,L!==void 0&&(g.voice=L),g.rate=.95,b!==void 0&&(g.onend=g.onerror=b),w.speak(g);return}}b?.()},"speak"),x=n(()=>{r+=1,s=null,e!==null&&(e.pause(),e.currentTime=0),re()?.cancel()},"stop"),m=n(l=>{for(let k of l){let b=Oe(k);if(i.has(b))continue;let w=new Audio;w.preload="auto",w.src=k,i.set(b,w)}},"warmClips");return{say(l){let k=l.url!==null?Oe(l.url):`tts:${l.lang}:${l.text}`;if(k===s)return;s=k,r+=1;let b=r,w=l.onEnd,L=w!==void 0?()=>{b===r&&w()}:void 0;if(re()?.cancel(),l.url!==null){let g=T();g.pause(),g.muted=!1,g.src=l.url,g.currentTime=0,g.onended=L??null,g.play()?.catch(R=>{b===r&&R?.name!=="AbortError"&&(l.speech?v(l.text,l.lang,L):L?.())});return}l.speech?v(l.text,l.lang,L):L?.()},unlock({lang:l,speech:k,prefetch:b}){let w=T();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let R=Uint8Array.from(atob(xn),N=>N.charCodeAt(0));t=URL.createObjectURL(new Blob([R],{type:"audio/wav"}))}let L=w.paused===!1&&t!==null&&w.src!==t;t!==null&&!L&&(w.muted=!0,w.onended=null,w.src=t,w.play()?.catch(()=>{}));let g=re();if(k&&g!==null&&typeof SpeechSynthesisUtterance=="function"){f();let R=new SpeechSynthesisUtterance(" ");R.volume=0,R.lang=l,g.speak(R)}m(b??[])},prefetch:m,stop:x,dispose(){x(),u&&re()?.removeEventListener?.("voiceschanged",a),u=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&Er(e),e=null;for(let l of i.values())Er(l);i.clear()}}}n(Hr,"createVoicePlayer");var Fr="sekyro.voiceGuidance";function Ur(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}n(Ur,"readVoicePreference");function Br(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}n(Br,"writeVoicePreference");var He="capture.tips.summary",Tn=typeof window<"u"?y.useLayoutEffect:y.useEffect,Ln=Object.freeze({});function yt(e,t){let r=new Set,s=[];for(let o of Le){let i=o===He?null:Ne(e,o,t);i===null||r.has(Oe(i))||(r.add(Oe(i)),s.push(i))}return s}n(yt,"resolvedClipUrls");function ht({locale:e,defaultClips:t,options:r}){let s=r===!1,o=s?{}:r??{},i=o.storageKey===void 0?Fr:o.storageKey,[a,u]=(0,y.useState)(o.defaultEnabled??!0),f=(0,y.useRef)(a),[T,v]=(0,y.useState)(!1),[x,m]=(0,y.useState)("none"),[l,k]=(0,y.useState)(!1),b=(0,y.useRef)(!1),[w,L]=(0,y.useState)(0),g=(0,y.useRef)(null),R=(0,y.useCallback)(()=>(g.current??(g.current=Hr()),g.current),[]),N=Mr[e],U=o.speechFallback,C=U===void 0||U===!0?!0:U===!1?!1:U.includes(e),K=o.clips??t??Ln,j=(0,y.useRef)(!1),B=(0,y.useRef)(K);Tn(()=>{B.current=K,f.current=a}),(0,y.useEffect)(()=>{if(s||i===null)return;let d=Ur(i);d!==null&&(f.current=d,u(d))},[s,i]),(0,y.useEffect)(()=>{if(!(s||!C))return Or(()=>L(d=>d+1))},[s,C]);let c=o.clips;(0,y.useEffect)(()=>{if(s)return;let d=C&&Kr(N);v(yt(K,e).length>0||d),m(c!==void 0&&Ne(c,He,e)!==null?"partner":Ne(K,He,e)!==null||d?"default":"none")},[s,K,c,e,C,N,w]),(0,y.useEffect)(()=>{if(s||!a||!j.current)return;let d=yt(K,e);d.length>0&&R().prefetch(d)},[s,a,K,e,R]),(0,y.useEffect)(()=>()=>{g.current?.dispose(),g.current=null,j.current=!1},[]);let O=(0,y.useCallback)(d=>{s||(j.current=!0,R().unlock({lang:N,speech:C,...d?{prefetch:yt(B.current,e)}:{}}))},[s,R,N,C,e]),E=(0,y.useCallback)(()=>O(f.current),[O]),D=(0,y.useCallback)(()=>{b.current=!1,k(!1)},[]),M=(0,y.useCallback)(()=>{D(),g.current?.stop()},[D]),fe=(0,y.useCallback)(()=>{b.current&&M()},[M]),G=(0,y.useCallback)((d,X)=>{if(s)return;if(b.current){M();return}let ce=R();ce.stop(),b.current=!0,k(!0);let Fe=X?.clip===!1?null:Ne(B.current,He,e);ce.say({url:Fe,text:d,lang:N,speech:C,onEnd:D})},[s,M,R,e,N,C,D]),H=(0,y.useCallback)(d=>{s||(d?O(!0):M(),i!==null&&Br(i,d),f.current=d,u(d))},[s,O,M,i]),S=(0,y.useCallback)(()=>H(!f.current),[H]),me=(0,y.useCallback)((d,X)=>{if(s||!a)return;b.current&&D();let ce=Ne(B.current,d,e);R().say({url:ce,text:X,lang:N,speech:C})},[s,a,e,R,N,C,D]);return(0,y.useMemo)(()=>({supported:!s&&T,enabled:!s&&a,setEnabled:H,toggle:S,unlock:E,speakKey:me,stop:M,summary:s?"none":x,summaryPlaying:l,toggleSummary:G,stopSummary:fe}),[s,T,a,H,S,E,me,M,x,l,G,fe])}n(ht,"useVoiceGuidance");function vt(e,t,r,s){let{speakKey:o,stop:i,enabled:a}=e,u=(0,y.useRef)(!1);(0,y.useEffect)(()=>{if(!s||!a){u.current&&i(),u.current=!1;return}u.current=!0,ve(t)&&t!==He&&r!==""&&o(t,r)},[s,a,t,r,o,i])}n(vt,"useSpeakGuidance");var _=require("react/jsx-runtime"),_t=800;function Vn(e){return e===void 0||e!==!1&&e.length===we.length&&we.every(t=>e.includes(t))}n(Vn,"isDefaultTips");function Nn(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}n(Nn,"carriesActivation");function In(e){return typeof e=="object"&&e!==null&&!(0,h.isValidElement)(e)&&"tone"in e&&"text"in e}n(In,"isNoticeObject");function An(e){return e==="starting"||e==="gating"||e==="recording"}n(An,"isCapturing");function Pn(e){return e==="captured"||e==="uploading"||e==="checking"}n(Pn,"isPostCapture");function Gr({verification:e,locale:t,dir:r,strings:s,slots:o,autoStart:i=!1,notice:a,startDisabled:u=!1,startLabel:f,tips:T,tipsSummary:v,coach:x,defaultFacing:m,voice:l,onGuidance:k,onCaptured:b,onResult:w,onError:L,onStateChange:g,assetBaseUrl:R,className:N}){let U=(0,h.useMemo)(()=>tt(t,s),[t,s]),C=(0,h.useMemo)(()=>I=>U[I]??"",[U]),K=r??(t==="ar"?"rtl":"ltr"),j=(0,h.useRef)(null),B=(0,h.useContext)(Qt),c=Lr({verification:e,videoRef:j,assetBaseUrl:R,onCaptured:b,onResult:w,onError:L,onStateChange:g}),O=xr(R,c.state==="idle"&&c.error===null),E=Nr(e),D=E.choice!==null,M=kr(e),fe=br(e),G=Sr(e),H=_r(),S=l!==!1&&l?.clips===void 0,me=Ir(S?e:void 0),d=ht({locale:t,defaultClips:me,options:l}),[X,ce]=(0,h.useState)(m??"user"),Fe=(0,h.useRef)(null),Ue=(0,h.useRef)(!1),Ct=(0,h.useRef)(d.unlock);Ct.current=d.unlock,(0,h.useEffect)(()=>{let I=Fe.current;if(I===null)return;let ye=["pointerup","touchend","click","keydown"],le=n(()=>{for(let Me of ye)I.removeEventListener(Me,Ce,!0)},"disarm");function Ce(Me){if(Ue.current){le();return}Nn(Me)&&(Ue.current=!0,le(),Ct.current())}n(Ce,"onGesture");for(let Me of ye)I.addEventListener(Me,Ce,{capture:!0,passive:!0});return le},[]);let St=(0,h.useCallback)(()=>{Ue.current||(Ue.current=!0,d.unlock()),c.start({facing:X})},[d.unlock,c.start,X]),wt=(0,h.useCallback)(()=>c.start({facing:X}),[c.start,X]),Be=(0,h.useRef)(!1),Ie=c.state==="idle"&&c.error===null,xt=!D&&!M.required&&(i===!0||i==="when-permitted"&&H.permission==="granted"),Rt=xt&&E.settled&&M.settled,Wr=i==="when-permitted"&&!H.permissionSettled&&!Be.current,Tt=xt&&Ie&&!Be.current,at=(Wr||Tt)&&O.gate==="ready"?"loading":O.gate;(0,h.useEffect)(()=>{!Rt||!Ie||O.gate!=="ready"||Be.current||(Be.current=!0,wt())},[Rt,Ie,O.gate,wt]);let Yr=Ie&&!D&&!M.required&&!(Tt&&O.gate==="ready"),Zr=(0,h.useCallback)(()=>{ce(I=>I==="user"?"environment":"user"),c.switchCamera()},[c.switchCamera]),Ge=(0,h.useMemo)(()=>c.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(c.artifacts.keyframe):null,[c.artifacts]);(0,h.useEffect)(()=>{if(Ge!==null)return()=>URL.revokeObjectURL(Ge)},[Ge]);let Lt=c.frozenPreview??Ge,ke=e!==void 0,W=An(c.state),ue=Pn(c.state),qe=W||ue,Q=c.result,Vt=c.state==="done"&&Q!==null,Nt=c.state==="recording"&&c.frozenPreview!==null,ct=B!==null,Ae=ue||Nt,It=ue?"checking":Nt?"frozen":c.state==="recording"?"recording":c.gateLocked||c.gate.progress>=1?"locked":c.gate.faceDetected?"aligning":"seeking",De=W?c.gate.hint:null,$e=c.state==="starting"?"capture.preparing.title":De===null?null:De==="center"&&!c.gate.faceDetected?"fcv3.no_face":Ye(De),[Xr,At]=(0,h.useState)(null);(0,h.useEffect)(()=>{if($e!=="fcv3.no_face"){At($e);return}if(!W)return;let I=setTimeout(()=>At($e),_t);return()=>clearTimeout(I)},[$e,W]);let ut=W&&typeof x=="string"&&x!=="",ge=W&&!ut?Xr:null,lt=ut?x:ge===null?"":C(ge);vt(d,ge,lt,W);let Pt=(0,h.useRef)(k);Pt.current=k,(0,h.useEffect)(()=>{if(ve(ge))try{Pt.current?.(ge)}catch(I){console.error("[@sekyro/react] onGuidance threw:",I)}},[ge]);let Pe=(0,h.useMemo)(()=>({supported:d.supported,enabled:d.enabled,setEnabled:d.setEnabled,toggle:d.toggle}),[d.supported,d.enabled,d.setEnabled,d.toggle]),dt=o?.voicePrompt,Et=dt!==void 0,Mt=l===void 0,zt=(0,h.useRef)(!1);(0,h.useEffect)(()=>{!Et||!Mt||zt.current||!nt()||(zt.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[Et,Mt]);let Qr=dt!==void 0?(I,ye,le)=>dt(I,ye,le,Pe):d.supported?()=>(0,_.jsx)(Ar,{voice:Pe}):void 0,{summary:pt,summaryPlaying:Kt,toggleSummary:Ot,stopSummary:Ht}=d,je=v!==void 0&&v!=="",Ft=je?v:C("capture.tips.summary"),Ut=je?pt!=="none":pt==="partner"||pt==="default"&&Vn(T),Bt=(0,h.useMemo)(()=>Ut?{playing:Kt,toggle:n(()=>Ot(Ft,{clip:!je}),"toggle"),stop:Ht}:void 0,[Ut,Kt,Ot,Ft,Ht,je]),Jr=(0,h.useMemo)(()=>({assets:at,retryAssets:O.retry,permission:H.permission,facing:X,setFacing:ce,canChooseFacing:H.canChooseFacing,voice:Pe}),[at,O.retry,H.permission,H.canChooseFacing,X,Pe]),en=In(a)?(0,_.jsx)(Y,{tone:a.tone,testId:"sekyro-host-notice",children:(0,_.jsx)("span",{children:a.text})}):a??null,ne=Q!==null&&Q.status==="retry"?Q:null,oe=Vt&&Q.status==="unavailable"&&!D&&Q.reason!=="portrait_required"?Q:null,Ee=Vt&&(Q.status==="approved"||Q.status==="rejected"||Q.status==="review")?Q:null,be=n((I,ye)=>{if(I===void 0)return null;if(I==="device_cooldown"){let Ce=Qe(t,ye);if(Ce!==null)return C(Ce.key).replace("{time}",Ce.time)}let le=Xe(I);return le===null?null:C(le)},"reasonText"),tn=oe!==null&&oe.reason!==void 0&&oe.reason!=="nni_unbound"&&oe.reason!=="method_required"&&oe.reason!=="mobile_required"&&!(oe.reason==="no_recorder"&&c.artifacts?.degraded==="NO_RECORDER"),Gt=st(),rn=D&&E.auto===null&&!W&&!ue&&c.error===null,ft=(0,h.useCallback)(async I=>{await E.select(I)&&c.state==="done"&&c.retry()},[E.select,c.state,c.retry]);return(0,h.useEffect)(()=>{E.auto!==null&&!E.busy&&!W&&!ue&&ft(E.auto)},[E.auto,E.busy,W,ue,ft]),(0,_.jsx)(Wt,{value:C,children:(0,_.jsxs)("div",{ref:Fe,className:N===void 0?"sekyro-capture":`sekyro-capture ${N}`,dir:K,lang:t,"data-testid":"sekyro-liveness-capture","data-state":c.state,children:[o?.header,ne!==null&&be(ne.reason)!==null&&!(ct&&qe)?(0,_.jsx)(Y,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:(0,_.jsx)("span",{children:be(ne.reason)})}):null,G&&ue&&!ct?(0,_.jsx)(Y,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:(0,_.jsx)("span",{children:C("capture.busy")})}):null,M.required&&Ie?(0,_.jsx)(Y,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:(0,_.jsx)("span",{children:C("reasons.mobile_required")})}):null,c.error!==null?o?.errorPanel!==void 0?o.errorPanel(c.error,c.retry):(0,_.jsxs)(Y,{tone:"danger",testId:"sekyro-error-notice",children:[(0,_.jsx)("span",{children:C(Ze(c.error.kind))}),c.error.retryable?(0,_.jsx)(F,{ref:Gt,kind:"ghost",className:"sekyro-btn--start",onClick:c.retry,children:C("common.retry")}):null]}):null,oe!==null?(0,_.jsxs)(Y,{tone:"danger",testId:"sekyro-unavailable-notice",children:[(0,_.jsx)("span",{children:be(oe.reason)??C(oe.reason===void 0?"errors.session_expired":"errors.network_error")}),tn?(0,_.jsx)(F,{ref:Gt,kind:"ghost",className:"sekyro-btn--start",onClick:c.retry,children:C("capture.recordAgain")}):null]}):null,Ee!==null&&be(Ee.reason)!==null?(0,_.jsx)(Y,{tone:Ee.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:(0,_.jsx)("span",{children:be(Ee.reason,Ee.retryAfter)})}):null,(0,_.jsx)("div",{className:qe?void 0:"sekyro-hidden","data-capture-live":qe?"":void 0,children:ct?B({videoRef:j,guidance:Ae&&ke?C("capture.checking"):lt,coached:ut&&!(Ae&&ke),note:Ae?ke?C(G?"capture.busy":"capture.checkingHint"):null:ne!==null?be(ne.reason):null,settled:Ae&&ke,progress:c.gate.progress,phase:It,still:Ae?Lt:null,live:qe}):(0,_.jsx)(Yt,{videoRef:j,guidanceText:lt,guidanceHint:De,guidanceKey:ge,progress:c.gate.progress,phase:It,draining:c.draining,stillUrl:Lt,showChecking:ke,onSwitchCamera:Zr,canSwitchCamera:W&&c.state!=="recording",voicePrompt:Qr,overlay:o?.stageOverlay,reduceMotion:c.reduceMotion})}),rn&&E.choice!==null?(0,_.jsx)(vr,{choice:E.choice,busy:E.busy,failed:E.failed,focus:c.state==="done",onSelect:I=>{ft(I)}}):null,Yr?(0,_.jsxs)(_.Fragment,{children:[fe&&o?.header===void 0?(0,_.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,_.jsx)("h2",{className:"sekyro-text-body",children:C("returning.title")}),(0,_.jsx)("p",{className:"sekyro-text-muted",children:C("returning.description")})]}):null,en,o?.intro!==void 0?o.intro(St,Jr):(0,_.jsx)(gr,{assets:at,onRetryAssets:O.retry,permission:H.permission,canChooseFacing:H.canChooseFacing,facing:X,onFacingChange:ce,voice:Pe,tips:T??we,...Bt!==void 0?{summary:Bt}:{},...f!==void 0?{startLabel:f}:{},startDisabled:u,onStart:St})]}):null,(0,_.jsx)(Zt,{showCoaching:ne!==null,attemptsText:ne?.attemptsRemaining!==void 0?Je(U,t,ne.attemptsRemaining):null,showRetake:ne!==null&&!W&&!ue||!ke&&c.state==="captured",onRetake:c.retry}),o?.footer]})})}n(Gr,"LivenessCapture");var jr=require("react/jsx-runtime"),_e={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'},kt={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 bt(e={}){let t={};for(let r of Object.keys(kt))t[kt[r]]=e.colors?.[r]??_e.colors[r];return t["--sekyro-radius"]=e.radius??_e.radius,t["--sekyro-font"]=e.fontFamily??_e.fontFamily,t}n(bt,"themeToCssVars");var En=/^#[0-9a-f]{6}$/i,Mn={none:"0px",sm:"4px",md:"8px",lg:"12px",full:"9999px"},zn={system:"",inter:"Inter","ibm-plex-sans-arabic":'"IBM Plex Sans Arabic"',"noto-sans-arabic":'"Noto Sans Arabic"',roboto:"Roboto"};function qr(e){let t={};if(!e)return t;let r={};for(let[i,a]of Object.entries(e.colors??{}))i in kt&&i!=="ring"&&En.test(a??"")&&(r[i]=a);r.brand&&(r.ring=r.brand),Object.keys(r).length&&(t.colors=r);let s=Mn[e.radius];s&&(t.radius=s);let o=zn[e.fontFamily];return o!==void 0&&(t.fontFamily=o?`${o}, ${_e.fontFamily}`:_e.fontFamily),t}n(qr,"brandingToTheme");function Dr(...e){let t={};for(let r of e)r?.colors&&(t.colors={...t.colors,...r.colors}),r?.radius&&(t.radius=r.radius),r?.fontFamily&&(t.fontFamily=r.fontFamily);return t}n(Dr,"mergeThemes");function $r({theme:e,children:t,className:r}){let s=bt(e);return(0,jr.jsx)("div",{className:r===void 0?"sekyro-root":`sekyro-root ${r}`,style:s,children:t})}n($r,"SekyroThemeProvider");
2
+ "use strict";var Ze=Object.defineProperty;var dn=Object.getOwnPropertyDescriptor;var pn=Object.getOwnPropertyNames;var fn=Object.prototype.hasOwnProperty;var o=(e,t)=>Ze(e,"name",{value:t,configurable:!0});var mn=(e,t)=>{for(var r in t)Ze(e,r,{get:t[r],enumerable:!0})},gn=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pn(t))!fn.call(e,n)&&n!==r&&Ze(e,n,{get:()=>t[n],enumerable:!(s=dn(t,n))||s.enumerable});return e};var yn=e=>gn(Ze({},"__esModule",{value:!0}),e);var Dn={};mn(Dn,{DEFAULT_THEME:()=>Ce,DEFAULT_TIPS:()=>Le,LivenessCapture:()=>Zr,NO_FACE_DEBOUNCE_MS:()=>Ct,SekyroThemeProvider:()=>Jr,VOICE_KEYS:()=>Ie,ar:()=>Fe,attemptsRemainingText:()=>tt,brandingToTheme:()=>Xr,captureErrorStringKey:()=>Qe,en:()=>ke,fr:()=>He,hintStringKey:()=>Xe,mergeThemes:()=>Qr,reasonStringKey:()=>Je,resolveStrings:()=>nt,retryAfterTime:()=>et,themeToCssVars:()=>wt});module.exports=yn(Dn);var v=require("react");var Xt=require("react");var Qt=require("react/jsx-runtime"),G=(0,Xt.forwardRef)(o(function({kind:t="primary",full:r=!1,className:s,type:n,...a},c){let l=["sekyro-btn",`sekyro-btn--${t}`];return r&&l.push("sekyro-btn--full"),s!==void 0&&l.push(s),(0,Qt.jsx)("button",{ref:c,type:n??"button",className:l.join(" "),...a})},"Button"));var ie=require("react/jsx-runtime");var hn=Array.from({length:56},(e,t)=>{let r=t/56*2*Math.PI-Math.PI/2,s=Math.cos(r),n=Math.sin(r);return{id:`tick-${t}`,frac:t/55,x1:150+108*s,y1:150+108*n,x2:150+138*s,y2:150+138*n,style:{transitionDelay:`${t*6}ms`}}});function vn(e,t,r,s){return r?"var(--sekyro-color-success)":e?s?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":t<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":t<.66?"color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)":"var(--sekyro-color-brand)":"color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)"}o(vn,"tickColor");var _n="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function Jt({progress:e,phase:t,draining:r=!1}){let s=Math.min(1,Math.max(0,e)),n=Math.round(s*56),a=t==="checking",c=t==="recording",l=t==="frozen",k=a||l,S=a||c||l,x=t==="locked"||S,L=r&&!x;return(0,ie.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":t,"data-filled":n,"data-recording":c?"":void 0,"data-draining":L?"":void 0,children:[(0,ie.jsx)("path",{fillRule:"evenodd",d:_n,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":k?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),(0,ie.jsxs)("g",{className:t==="locked"?"sekyro-capture-settle":void 0,children:[(0,ie.jsx)("g",{className:k?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:hn.map((f,u)=>(0,ie.jsx)("line",{x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,stroke:vn(u<n,f.frac,x,L),strokeWidth:3,strokeLinecap:"round",style:f.style,className:"sekyro-arc__tick"},f.id))}),(0,ie.jsx)("g",{className:t==="seeking"?"sekyro-capture-breathe":void 0,children:(0,ie.jsx)("circle",{cx:150,cy:150,r:100,fill:"none",stroke:x?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:x?3.5:2.5,className:S?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}o(Jt,"CaptureArc");var rt=require("react");var ke={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture…","capture.checking":"We're checking your identity…","capture.checkingHint":"This usually takes a few seconds — keep this page open","capture.securityNote":"Your images are encrypted and used only for this verification","capture.cameraOff":"Camera off","capture.previewAlt":"Preview of the captured image of your face","capture.retryCoaching.title":"That attempt didn't work — a few adjustments will help:","capture.retryCoaching.light":"Find good lighting — light on your face, not behind you","capture.retryCoaching.eyeLevel":"Hold your phone at eye level","capture.retryCoaching.head":"Look straight at the camera and keep your head upright","capture.attemptsRemaining.one":"{count} attempt remaining","capture.attemptsRemaining.other":"{count} attempts remaining","common.retry":"Try again","fcv2.err.permission":"Allow camera access in your browser settings (the camera icon in the address bar), then try again","fcv2.err.notfound":"No camera detected — connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera — close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS) — reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format — open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable — try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face — hold the phone in front of you","fcv3.come_closer":"Bring the phone a little closer","fcv3.move_back":"Move the phone a little farther away","fcv3.center_face":"Center your face in the circle","fcv3.straighten":"Hold your head straight","fcv3.more_light":"Find a brighter spot — light your face","fcv3.too_bright":"Too much light — move out of direct light","fcv3.hold_still":"Perfect — hold still","fcv3.steady_camera":"Hold the phone steady","fcv3.hold_upright":"Hold the phone upright","reasons.no_face":"No face could be detected during the check","reasons.media_unreadable":"The submitted capture could not be read","reasons.clip_too_short":"The capture was too short","reasons.spoof_detected":"The liveness check could not confirm a live person in front of the camera","reasons.review_band":"The automatic check was not conclusive, so it was sent to human review","reasons.nni_not_found":"The national identification number was not found in the civil registry","reasons.nni_invalid":"The national identification number is not a valid 10-digit NNI","reasons.registry_unavailable":"The civil registry could not be reached to confirm your number","reasons.result_from_cache":"The registry check was confirmed from a recent copy of the registry","reasons.no_face_source":"No face could be detected in the selfie photo","reasons.no_face_reference":"No reference photo was available to compare your selfie against — the requester needs to resolve this, so retaking your selfie will not help","reasons.low_quality_reference":"The reference photo on file was not clear enough to compare against","reasons.below_threshold":"The selfie did not match the photo on the identity document closely enough","reasons.side_missing":"One side of the identity document was not submitted","reasons.mrz_checksum_failed":"The machine-readable zone of the document could not be validated","reasons.unreadable":"The document photo was not clear enough to read","reasons.expired_document":"The identity document has expired","reasons.authenticity_review":"The document was sent to human review to confirm its authenticity","reasons.registry_mismatch":"The document's details did not match the civil registry — a reviewer will check","reasons.document_nni_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.otp_mismatch":"The verification code did not match the one we sent","reasons.otp_expired":"The verification code expired before it was entered","reasons.otp_send_failed":"We could not send a verification code to your phone","reasons.uncalibrated_capture_channel":"Desktop/webcam captures are not yet auto-decided — your verification went to human review","reasons.capture_back_camera":"Use the front camera. Hold the phone in front of your face and try again","reasons.capture_not_upright":"Hold your phone upright, not sideways, and try again","reasons.location_not_allowed":"Verification isn't available in your region.","reasons.anonymizer_blocked":"Turn off your VPN or proxy, then open the link again.","reasons.nationality_not_allowed":"This service can't verify this document. Contact the organization for other options.","reasons.document_type_not_accepted":"This type of document isn't accepted. Choose another document.","reasons.underage":"You don't meet the minimum age for this service.","reasons.age_unverifiable":"We couldn't read your date of birth. Take a clearer photo of your document.","reasons.nationality_unreadable":"We couldn't read your nationality. Take a clearer photo of your document.","reasons.name_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.birth_date_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.nationality_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.document_number_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.liveness_inconclusive":"Let's try again: face a light source and hold still.","reasons.match_inconclusive":"We couldn't confirm it's you. Try again in good light, without glasses.","reasons.subject_revoked":"The identity on file for this check is no longer available — the requester needs to run a full verification, so retrying will not help","reasons.probe_not_from_liveness":"Keep your face in the frame the whole time, then try again.","reasons.document_authenticity":"Use the original card, not a photo or a copy, and avoid reflections.","reasons.mobile_required":"Continue on your phone to take the selfie.","reasons.capture_tampered":"We couldn't verify this capture. Use your phone's built-in camera, without screen recording or camera apps.","reasons.device_velocity_exceeded":"This device can't be used for another verification right now. Contact the organization.","reasons.device_cooldown":"Too many attempts. Try again later.","cooldown.retryIn":"Too many attempts. Try again {time}.","cooldown.retryAt":"Too many attempts. Try again after {time}.","capture.busy":"Our service is busy. Trying again…","errors.inference_unavailable":"Try again in a moment.","method.title":"How do you want to verify?","method.description":"Choose one option to continue","returning.title":"Confirm it's you","returning.description":"You verified your identity before. One short face capture confirms it's still you.","method.national_number":"Enter my Mauritanian national ID number (NNI)","method.document_photo":"Photo of my document","errors.method_required":"Choose how you want to verify, then continue","errors.attestation_invalid":"We could not confirm this browser session is genuine — reload the page and try again","errors.network_error":"We could not reach the verification service — check your internet connection and try again","errors.session_expired":"This verification session has expired — ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number — ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source — avoid strong light behind you","capture.tips.uncover":"Uncover your face — no glasses, mask or hand in front of it","capture.tips.eyeLevel":"Hold your phone at eye level","capture.tips.straight":"Look straight at the camera and keep still","capture.tips.summary":"Stand in a well-lit area. Uncover your face — no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera — choose Allow","capture.permission.denied":"Camera access is blocked — allow it in your browser settings (the camera icon in the address bar), then reload this page","capture.permission.unknown":"We'll ask to use your camera when you start","capture.cameraLabel":"Camera","capture.facing.user":"Front camera","capture.facing.environment":"Back camera","capture.assisted.title":"Capture the person's face","capture.assisted.lead":"Point the back camera at the person's face and hold the phone upright. The voice guidance speaks to the person being filmed.","capture.assisted.stage":"Point the camera at the person's face","capture.voiceGuidance":"Voice guidance","capture.preparing.hint":"Setting up on-device face detection — this can take a moment on a slow connection","capture.ready":"Ready — start when you are","fcv2.err.models":"The face-detection models could not be loaded — check your connection and try again"};var Fe={"capture.start":"تشغيل الكاميرا","capture.recordAgain":"ابدأ محاولة جديدة","capture.switchCamera":"تبديل الكاميرا","capture.preparing.title":"جارٍ تجهيز الالتقاط الآمن…","capture.checking":"نتحقق من هويتك…","capture.checkingHint":"يستغرق هذا عادةً بضع ثوانٍ — أبقِ هذه الصفحة مفتوحة","capture.securityNote":"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق","capture.cameraOff":"الكاميرا مطفأة","capture.previewAlt":"معاينة الصورة الملتقطة لوجهك","capture.retryCoaching.title":"لم تنجح هذه المحاولة — بعض التعديلات ستساعد:","capture.retryCoaching.light":"اختر مكانًا جيد الإضاءة — الضوء على وجهك لا خلفك","capture.retryCoaching.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.retryCoaching.head":"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا","capture.attemptsRemaining.zero":"لم تتبقَّ أي محاولة","capture.attemptsRemaining.one":"تبقّت محاولة واحدة","capture.attemptsRemaining.two":"تبقّت محاولتان","capture.attemptsRemaining.few":"تبقّت {count} محاولات","capture.attemptsRemaining.many":"تبقّت {count} محاولة","capture.attemptsRemaining.other":"تبقّت {count} محاولة","common.retry":"أعد المحاولة","fcv2.err.permission":"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة","fcv2.err.notfound":"لم يتم العثور على كاميرا — وصِّل كاميرا أو فعِّلها ثم أعد المحاولة","fcv2.err.inuse":"تطبيق آخر يستخدم الكاميرا — أغلقه ثم أعد المحاولة","fcv2.err.insecure":"تتطلب الكاميرا اتصالًا آمنًا (HTTPS) — افتح هذه الصفحة عبر HTTPS","fcv2.err.unsupported":"متصفحك لا يستطيع الالتقاط بصيغة مدعومة — افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري","fcv2.err.generic":"الكاميرا غير متاحة — أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة","fcv3.no_face":"لا نرى وجهك — أمسك الهاتف أمامك","fcv3.come_closer":"قرّب الهاتف قليلًا","fcv3.move_back":"أبعد الهاتف قليلًا","fcv3.center_face":"ضع وجهك في منتصف الدائرة","fcv3.straighten":"أبقِ رأسك مستقيمًا","fcv3.more_light":"انتقل إلى مكان أكثر إضاءة — أضئ وجهك","fcv3.too_bright":"الإضاءة قوية جدًا — تجنّب الضوء المباشر على وجهك","fcv3.hold_still":"ممتاز — لا تتحرك","fcv3.steady_camera":"أمسك الهاتف بثبات","fcv3.hold_upright":"أمسك الهاتف بشكل عمودي","reasons.no_face":"تعذّر اكتشاف أي وجه أثناء التحقق","reasons.media_unreadable":"تعذّرت قراءة اللقطة المُرسلة","reasons.clip_too_short":"كانت اللقطة أقصر من اللازم","reasons.spoof_detected":"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا","reasons.review_band":"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية","reasons.nni_not_found":"لم يُعثر على الرقم الوطني في سجل الحالة المدنية","reasons.nni_invalid":"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام","reasons.registry_unavailable":"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد رقمك","reasons.result_from_cache":"أُكِّد فحص السجل استنادًا إلى نسخة حديثة من السجل","reasons.no_face_source":"تعذّر اكتشاف وجه في الصورة الذاتية","reasons.no_face_reference":"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها — على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي","reasons.low_quality_reference":"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة","reasons.below_threshold":"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية","reasons.side_missing":"أحد وجهي وثيقة الهوية لم يُرسل","reasons.mrz_checksum_failed":"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة","reasons.unreadable":"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة","reasons.expired_document":"انتهت صلاحية وثيقة الهوية","reasons.authenticity_review":"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها","reasons.registry_mismatch":"بيانات الوثيقة لا تطابق السجل المدني — سيتحقق منها مراجع","reasons.document_nni_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد — أُحيل تحققك إلى مراجعة بشرية","reasons.capture_back_camera":"استخدم الكاميرا الأمامية. أمسك الهاتف أمام وجهك وحاول مرة أخرى","reasons.capture_not_upright":"أمسك هاتفك بشكل عمودي وليس أفقيًا، ثم حاول مرة أخرى","reasons.location_not_allowed":"التحقق غير متاح في منطقتك.","reasons.anonymizer_blocked":"أوقف تشغيل VPN أو الوكيل ثم افتح الرابط مجددًا.","reasons.nationality_not_allowed":"لا يمكن لهذه الخدمة التحقق من هذه الوثيقة. تواصل مع الجهة لمعرفة الخيارات الأخرى.","reasons.document_type_not_accepted":"هذا النوع من الوثائق غير مقبول. اختر وثيقة أخرى.","reasons.underage":"لا تستوفي الحد الأدنى للسن لهذه الخدمة.","reasons.age_unverifiable":"تعذّرت قراءة تاريخ ميلادك. التقط صورة أوضح لوثيقتك.","reasons.nationality_unreadable":"تعذّرت قراءة جنسيتك. التقط صورة أوضح لوثيقتك.","reasons.name_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.birth_date_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.nationality_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.document_number_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.liveness_inconclusive":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","reasons.match_inconclusive":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","reasons.subject_revoked":"لم تعد الهوية المحفوظة لهذا التحقق متاحة — على الجهة الطالبة إجراء تحقق كامل، وإعادة المحاولة لن تُجدي","reasons.probe_not_from_liveness":"أبقِ وجهك داخل الإطار طوال الوقت، ثم حاول مجددًا.","reasons.document_authenticity":"استخدم البطاقة الأصلية، لا صورة لها ولا نسخة منها، وتجنّب الانعكاسات.","reasons.mobile_required":"تابع على هاتفك لالتقاط صورة لوجهك.","reasons.capture_tampered":"تعذّر التحقق من هذا الالتقاط. استخدم الكاميرا المدمجة في هاتفك، دون تسجيل الشاشة أو تطبيقات الكاميرا.","reasons.device_velocity_exceeded":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع الجهة.","reasons.device_cooldown":"محاولات كثيرة. حاول مجددًا لاحقًا.","cooldown.retryIn":"محاولات كثيرة. حاول مجددًا {time}.","cooldown.retryAt":"محاولات كثيرة. حاول مجددًا بعد {time}.","capture.busy":"خدمتنا مشغولة حاليًا. نعيد المحاولة…","errors.inference_unavailable":"حاول مجددًا بعد لحظات.","method.title":"كيف تريد التحقق من هويتك؟","method.description":"اختر إحدى الطريقتين للمتابعة","returning.title":"أكّد أنك أنت","returning.description":"سبق أن تحقّقت من هويتك. التقاط قصير لوجهك يكفي لتأكيد أنك أنت.","method.national_number":"إدخال الرقم الوطني للتعريف الموريتاني (NNI)","method.document_photo":"تصوير وثيقتي","errors.method_required":"اختر طريقة التحقق، ثم تابع","errors.attestation_invalid":"تعذّر التأكد من سلامة جلسة المتصفح — أعد تحميل الصفحة وحاول مجددًا","errors.network_error":"تعذّر الوصول إلى خدمة التحقق — تحقق من اتصالك بالإنترنت وأعد المحاولة","errors.session_expired":"انتهت صلاحية جلسة التحقق هذه — اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا","errors.nni_unbound":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف — اطلب رابطًا جديدًا من الجهة الطالبة","capture.tips.title":"لتحقق ناجح:","capture.tips.light":"اجعل الضوء أمام وجهك — تجنّب الإضاءة القوية خلفك","capture.tips.uncover":"اكشف وجهك — بلا نظارات أو كمامة أو يد أمامه","capture.tips.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.tips.straight":"انظر مباشرة إلى الكاميرا وابقَ ثابتًا","capture.tips.summary":"اختر مكانًا جيد الإضاءة. اكشف وجهك — بلا نظارات أو كمامة. بعد تشغيل الكاميرا، أمسك هاتفك بمستوى العينين، وانظر مباشرة إلى الكاميرا وابقَ ثابتًا.","capture.tips.listen":"استمع إلى التعليمات","capture.tips.stop":"إيقاف","capture.permission.granted":"تم السماح بالوصول إلى الكاميرا","capture.permission.prompt":"سيطلب متصفحك استخدام الكاميرا — اختر «السماح»","capture.permission.denied":"الوصول إلى الكاميرا محظور — اسمح به من إعدادات المتصفح (رمز الكاميرا في شريط العنوان)، ثم أعد تحميل الصفحة","capture.permission.unknown":"سنطلب استخدام الكاميرا عند البدء","capture.cameraLabel":"الكاميرا","capture.facing.user":"الكاميرا الأمامية","capture.facing.environment":"الكاميرا الخلفية","capture.assisted.title":"صوّر وجه الشخص","capture.assisted.lead":"وجّه الكاميرا الخلفية نحو وجه الشخص وأمسك الهاتف بشكل عمودي. الإرشادات الصوتية تخاطب الشخص الذي تصوّره.","capture.assisted.stage":"وجّه الكاميرا نحو وجه الشخص","capture.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك — قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز — ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه — تحقق من اتصالك ثم أعد المحاولة"};var He={"capture.start":"Démarrer la caméra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de caméra","capture.preparing.title":"Préparation de la capture sécurisée…","capture.checking":"Nous vérifions votre identité…","capture.checkingHint":"Cela prend généralement quelques secondes — gardez cette page ouverte","capture.securityNote":"Vos images sont chiffrées et utilisées uniquement pour cette vérification","capture.cameraOff":"Caméra éteinte","capture.previewAlt":"Aperçu de l’image capturée de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti — quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien éclairé — lumière sur le visage, pas derrière vous","capture.retryCoaching.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la caméra, la tête bien droite","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"Réessayer","fcv2.err.permission":"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez","fcv2.err.notfound":"Aucune caméra détectée — branchez ou activez une caméra, puis réessayez","fcv2.err.inuse":"La caméra est utilisée par une autre application — fermez-la, puis réessayez","fcv2.err.insecure":"La caméra nécessite une connexion sécurisée (HTTPS) — rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible — ouvrez cette page dans un navigateur récent comme Chrome ou Safari","fcv2.err.generic":"Caméra indisponible — réessayez, ou contactez le support si le problème persiste","fcv3.no_face":"Nous ne voyons pas votre visage — tenez le téléphone devant vous","fcv3.come_closer":"Rapprochez un peu le téléphone","fcv3.move_back":"Éloignez un peu le téléphone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la tête droite","fcv3.more_light":"Cherchez un endroit plus lumineux — éclairez votre visage","fcv3.too_bright":"Trop de lumière — évitez la lumière directe sur le visage","fcv3.hold_still":"Parfait — ne bougez plus","fcv3.steady_camera":"Tenez le téléphone stable","fcv3.hold_upright":"Tenez le téléphone à la verticale","reasons.no_face":"Aucun visage n’a pu être détecté pendant la vérification","reasons.media_unreadable":"La capture envoyée n’a pas pu être lue","reasons.clip_too_short":"La capture était trop courte","reasons.spoof_detected":"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra","reasons.review_band":"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain","reasons.nni_not_found":"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil","reasons.nni_invalid":"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres","reasons.registry_unavailable":"Le registre d'état civil n'a pas pu être joint pour confirmer votre numéro","reasons.result_from_cache":"Le contrôle du registre a été confirmé à partir d'une copie récente du registre","reasons.no_face_source":"Aucun visage n'a pu être détecté sur la photo selfie","reasons.no_face_reference":"Aucune photo de référence n'était disponible pour comparer votre selfie — c'est au demandeur de le résoudre, reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de référence enregistrée n'était pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité","reasons.side_missing":"Un côté de la pièce d'identité n'a pas été envoyé","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu être validée","reasons.unreadable":"La photo du document n'était pas assez nette pour être lue","reasons.expired_document":"La pièce d'identité a expiré","reasons.authenticity_review":"Le document a été transmis à un examen humain pour confirmer son authenticité","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil — un examinateur va vérifier","reasons.document_nni_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.otp_mismatch":"Le code de vérification ne correspond pas à celui que nous avons envoyé","reasons.otp_expired":"Le code de vérification a expiré avant d'être saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de vérification à votre téléphone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore décidées automatiquement — votre vérification part en revue humaine","reasons.capture_back_camera":"Utilisez la caméra avant. Tenez le téléphone devant votre visage et réessayez","reasons.capture_not_upright":"Tenez votre téléphone à la verticale, pas à l'horizontale, et réessayez","reasons.location_not_allowed":"La vérification n'est pas disponible dans votre région.","reasons.anonymizer_blocked":"Désactivez votre VPN ou proxy, puis rouvrez le lien.","reasons.nationality_not_allowed":"Ce service ne peut pas vérifier ce document. Contactez l'organisation pour d'autres options.","reasons.document_type_not_accepted":"Ce type de document n'est pas accepté. Choisissez un autre document.","reasons.underage":"Vous n'avez pas l'âge minimum requis pour ce service.","reasons.age_unverifiable":"Nous n'avons pas pu lire votre date de naissance. Prenez une photo plus nette de votre document.","reasons.nationality_unreadable":"Nous n'avons pas pu lire votre nationalité. Prenez une photo plus nette de votre document.","reasons.name_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.birth_date_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.nationality_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.document_number_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.liveness_inconclusive":"Réessayons : placez-vous face à une source de lumière et restez immobile.","reasons.match_inconclusive":"Nous n'avons pas pu confirmer qu'il s'agit bien de vous. Réessayez dans un endroit bien éclairé, sans lunettes.","reasons.subject_revoked":"L'identité enregistrée pour cette vérification n'est plus disponible — le demandeur doit lancer une vérification complète, réessayer n'y changera rien","reasons.probe_not_from_liveness":"Gardez votre visage dans le cadre tout du long, puis réessayez.","reasons.document_authenticity":"Utilisez la carte originale, pas une photo ni une copie, et évitez les reflets.","reasons.mobile_required":"Continuez sur votre téléphone pour prendre le selfie.","reasons.capture_tampered":"Nous n'avons pas pu vérifier cette capture. Utilisez l'appareil photo intégré de votre téléphone, sans enregistrement d'écran ni application de caméra.","reasons.device_velocity_exceeded":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez l'organisation.","reasons.device_cooldown":"Trop de tentatives. Réessayez plus tard.","cooldown.retryIn":"Trop de tentatives. Réessayez {time}.","cooldown.retryAt":"Trop de tentatives. Réessayez à partir de {time}.","capture.busy":"Notre service est très sollicité. Nouvel essai en cours…","errors.inference_unavailable":"Réessayez dans un instant.","method.title":"Comment souhaitez-vous vérifier votre identité ?","method.description":"Choisissez une option pour continuer","returning.title":"Confirmez qu'il s'agit bien de vous","returning.description":"Vous avez déjà vérifié votre identité. Une courte capture du visage confirme qu'il s'agit toujours de vous.","method.national_number":"Saisir mon numéro national d'identification mauritanien (NNI)","method.document_photo":"Photographier mon document","errors.method_required":"Choisissez comment vérifier votre identité, puis continuez","errors.attestation_invalid":"Nous n'avons pas pu confirmer l'authenticité de cette session de navigateur — rechargez la page et réessayez","errors.network_error":"Nous n'avons pas pu joindre le service de vérification — vérifiez votre connexion internet et réessayez","errors.session_expired":"Cette session de vérification a expiré — demandez un nouveau lien à l'organisme qui vous a envoyé ici","errors.nni_unbound":"Ce lien a été créé sans votre numéro national d'identification — demandez un nouveau lien à l'organisme demandeur","capture.tips.title":"Pour une vérification réussie :","capture.tips.light":"Placez-vous face à la lumière — évitez une forte lumière derrière vous","capture.tips.uncover":"Dégagez votre visage — ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.tips.straight":"Regardez droit vers la caméra et restez immobile","capture.tips.summary":"Placez-vous dans une zone bien éclairée. Dégagez votre visage — ni lunettes, ni masque. Une fois la caméra démarrée, tenez votre téléphone à hauteur des yeux, regardez droit vers la caméra et restez immobile.","capture.tips.listen":"Écouter les instructions","capture.tips.stop":"Arrêter","capture.permission.granted":"Accès à la caméra autorisé","capture.permission.prompt":"Votre navigateur va demander l’accès à la caméra — choisissez « Autoriser »","capture.permission.denied":"L’accès à la caméra est bloqué — autorisez-le dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l’accès à la caméra au démarrage","capture.cameraLabel":"Caméra","capture.facing.user":"Caméra avant","capture.facing.environment":"Caméra arrière","capture.assisted.title":"Filmez le visage de la personne","capture.assisted.lead":"Pointez la caméra arrière vers le visage de la personne et tenez le téléphone à la verticale. Le guidage vocal s'adresse à la personne filmée.","capture.assisted.stage":"Pointez la caméra vers le visage de la personne","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la détection du visage sur l’appareil — cela peut prendre un instant sur une connexion lente","capture.ready":"Prêt — commencez quand vous voulez","fcv2.err.models":"Impossible de charger les modèles de détection du visage — vérifiez votre connexion puis réessayez"};function Xe(e){switch(e){case"center":return"fcv3.center_face";case"closer":return"fcv3.come_closer";case"farther":return"fcv3.move_back";case"light":return"fcv3.more_light";case"still":case"hold":return"fcv3.hold_still";case"upright":return"fcv3.hold_upright";default:{let t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}o(Xe,"hintStringKey");function Qe(e){return`fcv2.err.${e}`}o(Qe,"captureErrorStringKey");function Je(e){switch(e){case"no_recorder":return"fcv2.err.unsupported";case"attestation":return"errors.attestation_invalid";case"network":return"errors.network_error";case"nni_unbound":return"errors.nni_unbound";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${e}`;return Object.hasOwn(ke,t)?t:null}}}o(Je,"reasonStringKey");function et(e,t,r=new Date){if(t===void 0)return null;let s=new Date(t),n=s.getTime()-r.getTime();if(!Number.isFinite(n)||n<=0)return null;if(n<36e5){let l=Math.max(1,Math.ceil(n/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(l,"minute")}}let a=s.toDateString()===r.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...a?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(s)}}o(et,"retryAfterTime");function tt(e,t,r){let s=new Intl.PluralRules(t).select(r);return((s==="other"?void 0:e[`capture.attemptsRemaining.${s}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(r))}o(tt,"attemptsRemainingText");var kn={ar:Fe,fr:He,en:ke};function nt(e,t){let r=kn[e];if(t===void 0)return r;let s={...r};for(let n of Object.keys(t)){let a=t[n];typeof a=="string"&&(s[n]=a)}return s}o(nt,"resolveStrings");var er=(0,rt.createContext)(e=>ke[e]??""),tr=er.Provider;function U(){return(0,rt.useContext)(er)}o(U,"useStrings");var A=require("react/jsx-runtime");function rr({videoRef:e,guidanceText:t,guidanceHint:r,guidanceKey:s,progress:n,phase:a,draining:c=!1,stillUrl:l,showChecking:k,onSwitchCamera:S,canSwitchCamera:x,operatorText:L=null,voicePrompt:f,overlay:u,reduceMotion:_=!1}){let y=U(),d=a==="checking",m=d||a==="frozen",w=m&&k?y("capture.checking"):t,P=f?.(r,w,s);return(0,A.jsxs)("div",{className:_?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[(0,A.jsx)("video",{ref:e,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),l!==null&&m?(0,A.jsx)("img",{src:l,alt:y("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,(0,A.jsx)(Jt,{progress:n,phase:a,draining:c}),u?.(e),P!=null&&!m?(0,A.jsx)("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:P}):null,x?(0,A.jsx)(G,{kind:"chip",onClick:S,"aria-label":y("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:(0,A.jsx)(bn,{})}):null,d&&k?(0,A.jsxs)("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[(0,A.jsx)(Cn,{}),y("capture.cameraOff")]}):null,(0,A.jsxs)("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[(0,A.jsx)("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:w},w),m&&k?(0,A.jsx)("span",{className:"sekyro-stage__guidance-hint",children:y("capture.checkingHint")}):L!==null&&!m?(0,A.jsx)("span",{className:"sekyro-stage__guidance-hint","data-testid":"sekyro-operator-line",children:L}):null]})]})}o(rr,"CaptureStage");function bn(){return(0,A.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[(0,A.jsx)("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),(0,A.jsx)("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),(0,A.jsx)("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}o(bn,"FlipCameraIcon");function Cn(){return(0,A.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon sekyro-icon--sm",children:[(0,A.jsx)("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),(0,A.jsx)("path",{d:"M3 3l18 18"})]})}o(Cn,"CameraOffIcon");var ot=require("react");var ee=require("react/jsx-runtime");function nr({showCoaching:e,attemptsText:t,showRetake:r,onRetake:s}){let n=U(),a=(0,ot.useRef)(null);return(0,ot.useEffect)(()=>{r&&a.current?.focus()},[r]),!e&&!r?null:(0,ee.jsxs)("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?(0,ee.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,ee.jsx)("p",{className:"sekyro-text-body",children:n("capture.retryCoaching.title")}),(0,ee.jsxs)("ul",{className:"sekyro-coaching",children:[(0,ee.jsx)("li",{children:n("capture.retryCoaching.light")}),(0,ee.jsx)("li",{children:n("capture.retryCoaching.eyeLevel")}),(0,ee.jsx)("li",{children:n("capture.retryCoaching.head")})]}),t!==null?(0,ee.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:t}):null]}):null,r?(0,ee.jsx)(G,{ref:a,className:"sekyro-btn--start",onClick:s,children:n("capture.recordAgain")}):null]})}o(nr,"CapturedPanel");function st(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}o(st,"isDevBuild");var or=require("react"),sr=(0,or.createContext)(null);var Y=require("react");var ar=require("react/jsx-runtime");function X({tone:e,role:t,children:r,testId:s}){return(0,ar.jsx)("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":s,children:r})}o(X,"Notice");var ir=require("react");var ce=require("react/jsx-runtime"),Sn=["user","environment"];function cr({value:e,onChange:t}){let r=U(),s=(0,ir.useId)();return(0,ce.jsxs)("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[(0,ce.jsx)("legend",{className:"sekyro-segmented__legend",children:r("capture.cameraLabel")}),(0,ce.jsx)("div",{className:"sekyro-segmented__options",children:Sn.map(n=>(0,ce.jsxs)("label",{className:"sekyro-segmented__option",children:[(0,ce.jsx)("input",{type:"radio",className:"sekyro-segmented__input",name:s,value:n,checked:e===n,onChange:()=>t(n)}),(0,ce.jsxs)("span",{className:"sekyro-segmented__face",children:[(0,ce.jsx)("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),r(`capture.facing.${n}`)]})]},n))})]})}o(cr,"FacingPicker");var g=require("react/jsx-runtime");function ne({className:e,children:t}){return(0,g.jsx)("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}o(ne,"Svg");var ht="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function ur(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,g.jsx)("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}o(ur,"SunIcon");function lr(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,g.jsx)("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}o(lr,"FaceUncoveredIcon");function dr(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),(0,g.jsx)("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),(0,g.jsx)("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}o(dr,"PhoneEyeLevelIcon");function pr(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),(0,g.jsx)("circle",{cx:"12",cy:"12",r:"2.8"})]})}o(pr,"LookStraightIcon");function fr(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("path",{d:ht}),(0,g.jsx)("path",{d:"M9 13l2 2 4-4"})]})}o(fr,"CameraCheckIcon");function mr(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("path",{d:ht}),(0,g.jsx)("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}o(mr,"CameraAskIcon");function gr(e){return(0,g.jsxs)(ne,{...e,children:[(0,g.jsx)("path",{d:ht}),(0,g.jsx)("path",{d:"M3 3l18 18"})]})}o(gr,"CameraBlockedIcon");function Te({off:e,className:t}){return(0,g.jsxs)(ne,{className:t,children:[(0,g.jsx)("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?(0,g.jsx)("path",{d:"M4 4l16 16"}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),(0,g.jsx)("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}o(Te,"SpeakerIcon");function yr(e){return(0,g.jsx)(ne,{...e,children:(0,g.jsx)("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}o(yr,"CheckIcon");function hr(e){return(0,g.jsxs)(ne,{className:e.className??"sekyro-spinner",children:[(0,g.jsx)("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),(0,g.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}o(hr,"SpinnerIcon");var at=require("react");var fe=require("react/jsx-runtime");function vr({state:e}){let t=U(),[r,s]=(0,at.useState)(!1);(0,at.useEffect)(()=>{e!=="unknown"&&s(!0)},[e]);let n=e==="granted"?(0,fe.jsx)(fr,{}):e==="denied"?(0,fe.jsx)(gr,{}):(0,fe.jsx)(mr,{});return(0,fe.jsxs)("div",{role:r?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[(0,fe.jsx)("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:n}),(0,fe.jsx)("span",{children:t(`capture.permission.${e}`)})]})}o(vr,"PermissionRow");var _r=require("react");var Q=require("react/jsx-runtime"),Le=["light","uncover","eyeLevel","straight"],wn={light:{key:"capture.tips.light",icon:o(()=>(0,Q.jsx)(ur,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:o(()=>(0,Q.jsx)(lr,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:o(()=>(0,Q.jsx)(dr,{}),"icon")},straight:{key:"capture.tips.straight",icon:o(()=>(0,Q.jsx)(pr,{}),"icon")}};function kr({tips:e}){let t=U(),r=(0,_r.useId)();return e.length===0?null:(0,Q.jsxs)("section",{className:"sekyro-tips","aria-labelledby":r,"data-testid":"sekyro-tips",children:[(0,Q.jsx)("p",{className:"sekyro-tips__title",id:r,children:t("capture.tips.title")}),(0,Q.jsx)("ul",{className:"sekyro-tips__list",children:e.map(s=>{let n=typeof s=="string"?wn[s]:void 0,a=typeof s=="string"?s:s.id,c=n!==void 0?n.icon():typeof s=="string"?void 0:s.icon,l=n!==void 0?t(n.key):typeof s=="string"?s:s.text;return(0,Q.jsxs)("li",{className:"sekyro-tips__item",children:[c!=null?(0,Q.jsx)("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:c}):null,(0,Q.jsx)("span",{children:l})]},a)})})]})}o(kr,"TipList");var me=require("react/jsx-runtime");function br({voice:e}){let t=U();if(!e.supported)return null;let r=e.enabled;return(0,me.jsxs)("button",{type:"button",role:"switch","aria-checked":r,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>e.toggle(),children:[(0,me.jsxs)("span",{className:"sekyro-switch__label",children:[(0,me.jsx)(Te,{off:!r}),t("capture.voiceGuidance")]}),(0,me.jsx)("span",{className:"sekyro-switch__track","aria-hidden":"true",children:(0,me.jsx)("span",{className:"sekyro-switch__thumb",children:r?(0,me.jsx)(yr,{className:"sekyro-switch__check"}):null})})]})}o(br,"VoiceSwitch");var V=require("react/jsx-runtime");function Cr({assets:e,onRetryAssets:t,permission:r,captureMode:s="self",canChooseFacing:n,facing:a,onFacingChange:c,voice:l,tips:k,summary:S,startLabel:x,startDisabled:L,onStart:f}){let u=U(),_=(0,Y.useRef)(S?.stop);_.current=S?.stop,(0,Y.useEffect)(()=>()=>_.current?.(),[]);let y=(0,Y.useRef)(null),d=(0,Y.useRef)(null),M=(0,Y.useRef)(null),m=(0,Y.useRef)(e),w=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{let K=m.current;if(m.current=e,K===e)return;let R=w.current;e!=="loading"&&(w.current=!1),xn(y.current)&&(e==="failed"?M.current?.focus():R&&d.current?.focus())},[e]);let P=(0,Y.useCallback)(()=>{w.current=!0,t()},[t]),b=e==="loading",E=b||L,H=(0,Y.useCallback)(()=>{E||(_.current?.(),f())},[E,f]),j;e==="failed"?j=(0,V.jsxs)(X,{tone:"danger",testId:"sekyro-assets-error",children:[(0,V.jsx)("p",{className:"sekyro-text-body",children:u("fcv2.err.models")}),(0,V.jsx)(G,{kind:"ghost",ref:M,className:"sekyro-btn--start",onClick:P,"data-testid":"sekyro-assets-retry",children:u("common.retry")})]}):j=(0,V.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,V.jsx)(G,{ref:d,full:!0,"data-testid":"sekyro-start","aria-disabled":E?"true":void 0,"aria-busy":b?"true":void 0,onClick:H,children:b?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(hr,{}),u("capture.preparing.title")]}):x??u("capture.start")}),b?(0,V.jsx)("p",{className:"sekyro-text-muted",children:u("capture.preparing.hint")}):null]});let i=s==="assisted";return(0,V.jsxs)("div",{ref:y,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[i?(0,V.jsxs)("div",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-assisted-intro",children:[(0,V.jsx)("h2",{className:"sekyro-text-body",children:u("capture.assisted.title")}),(0,V.jsx)("p",{className:"sekyro-text-muted",children:u("capture.assisted.lead")})]}):null,k!==!1?(0,V.jsx)(kr,{tips:k}):null,S!==void 0?(0,V.jsxs)(G,{kind:"ghost",className:"sekyro-btn--start",onClick:S.toggle,"data-testid":"sekyro-tips-listen",children:[(0,V.jsx)(Te,{off:!1}),u(S.playing?"capture.tips.stop":"capture.tips.listen")]}):null,(0,V.jsx)(vr,{state:r}),i&&n?(0,V.jsx)(cr,{value:a,onChange:c}):null,(0,V.jsx)(br,{voice:l}),(0,V.jsx)("p",{className:"sekyro-text-muted",children:u("capture.securityNote")}),j,(0,V.jsx)("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?u("capture.preparing.title"):e==="ready"?u("capture.ready"):""})]})}o(Cr,"PreCaptureScreen");function xn(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}o(xn,"focusIsOurs");var ue=require("react");var Sr=require("react");function it(){return(0,Sr.useCallback)(e=>{e?.focus()},[])}o(it,"useFocusOnMount");var B=require("react/jsx-runtime"),Rn=220;function wr({title:e,description:t,options:r,busy:s,error:n,focus:a,testId:c,look:l="cards",marked:k,onChoose:S}){let x=(0,ue.useId)(),L=it(),[f,u]=(0,ue.useState)(null),_=(0,ue.useRef)(null);(0,ue.useEffect)(()=>{n!==null&&u(null)},[n]),(0,ue.useEffect)(()=>()=>{_.current!==null&&clearTimeout(_.current)},[]);let y=o(d=>{s||f!==null||(u(d),_.current=setTimeout(()=>{_.current=null,u(null),S(d)},Rn))},"choose");return(0,B.jsxs)("section",{className:"sekyro-stack sekyro-stack--4 sekyro-choice","aria-labelledby":x,"data-testid":c,children:[(0,B.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,B.jsx)("h2",{id:x,ref:a?L:void 0,tabIndex:-1,className:"sekyro-text-body",children:e}),t!==void 0&&t!==""?(0,B.jsx)("p",{className:"sekyro-text-muted",children:t}):null]}),n!==null?(0,B.jsx)(X,{tone:"danger",children:(0,B.jsx)("span",{children:n})}):null,l==="buttons"?(0,B.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:r.map((d,M)=>(0,B.jsx)(G,{kind:M===0?"primary":"ghost",full:!0,disabled:s,"aria-busy":s||void 0,onClick:()=>S(d.id),children:d.label},d.id))}):(0,B.jsx)("div",{className:"sekyro-choices",children:r.map(d=>(0,B.jsxs)("button",{type:"button",className:"sekyro-card","aria-pressed":(f??k)===d.id,"aria-busy":s||void 0,disabled:s||f!==null&&f!==d.id,onClick:()=>y(d.id),children:[d.glyph,(0,B.jsxs)("span",{className:"sekyro-card__body",children:[(0,B.jsx)("span",{className:"sekyro-card__title",children:d.label}),d.sub!==void 0?(0,B.jsx)("span",{className:"sekyro-card__sub",children:d.sub}):null]}),(0,B.jsx)("span",{className:"sekyro-radio","aria-hidden":"true"})]},d.id))})]})}o(wr,"ChoiceScreen");var ct=require("@sekyro/web"),Ne=require("react");function xr(){let[e,t]=(0,Ne.useState)({state:"unknown",settled:!1}),[r,s]=(0,Ne.useState)({canChoose:!1,settled:!1});return(0,Ne.useEffect)(()=>(0,ct.subscribeCameraPermission)(n=>t({state:n,settled:!0})),[]),(0,Ne.useEffect)(()=>{let n=!0;return(0,ct.hasMultipleCameras)().then(a=>{n&&s({canChoose:a,settled:!0})},()=>{n&&s({canChoose:!1,settled:!0})}),()=>{n=!1}},[]),{permission:e.state,permissionSettled:e.settled,canChooseFacing:r.canChoose,facingSettled:r.settled}}o(xr,"useCameraStatus");var ge=require("react");function Rr(e){return Lr(e,"mobileRequired")}o(Rr,"useMobileRequired");function Tr(e){return Lr(e,"returning").required}o(Tr,"useReturning");function Lr(e,t){let[r,s]=(0,ge.useState)({required:!1,settled:e===void 0});return(0,ge.useEffect)(()=>{let n=e?.[t];if(e===void 0||typeof n!="function"){s({required:!1,settled:!0});return}let a=!0;return s({required:!1,settled:!1}),Promise.resolve().then(()=>n.call(e)).then(c=>{a&&s({required:c===!0,settled:!0})},()=>{a&&s({required:!1,settled:!0})}),()=>{a=!1}},[e,t]),r}o(Lr,"useFlag");function Nr(e){let[t,r]=(0,ge.useState)({mode:"self",settled:e===void 0});return(0,ge.useEffect)(()=>{let s=e?.captureMode;if(e===void 0||typeof s!="function"){r({mode:"self",settled:!0});return}let n=!0;return r({mode:"self",settled:!1}),Promise.resolve().then(()=>s.call(e)).then(a=>{n&&r({mode:a==="assisted"?"assisted":"self",settled:!0})},()=>{n&&r({mode:"self",settled:!0})}),()=>{n=!1}},[e]),t}o(Nr,"useCaptureMode");function Vr(e){let[t,r]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{if(r(!1),e===void 0)return;let s=e.on("busy",()=>r(!0)),n=e.on("result",()=>r(!1));return()=>{s(),n()}},[e]),t}o(Vr,"useBusy");var Ve=require("@sekyro/web"),$=require("react");var Tn=o(()=>"idle","serverSnapshot");function Ir(e){return(0,Ve.preloadLivenessAssets)(e!==void 0?{assetBaseUrl:e}:{})}o(Ir,"preload");function Mr(e,t=!0){let r=(0,$.useSyncExternalStore)((0,$.useCallback)(L=>(0,Ve.subscribeLivenessAssets)(L,e),[e]),()=>(0,Ve.getLivenessAssetsStatus)(e),Tn),[s,n]=(0,$.useState)(null),a=(0,$.useRef)(!1),c=(0,$.useCallback)(()=>{Ir(e).then(L=>{a.current&&L==="idle"&&n({base:e})})},[e]);(0,$.useEffect)(()=>(a.current=!0,c(),()=>{a.current=!1}),[c]);let l=(0,$.useRef)(null);(0,$.useEffect)(()=>{if(r!=="idle"){l.current={base:e};return}!t||l.current===null||l.current.base!==e||(l.current=null,c())},[r,e,c,t]);let k=(0,$.useCallback)(()=>{Ir(e)},[e]);return{gate:s!==null&&s.base===e&&r==="idle"||r==="ready"?"ready":r==="failed"?"failed":"loading",retry:k}}o(Mr,"useLivenessAssets");var Ar=require("@sekyro/web"),I=require("react");var Pr={progress:0,hint:null,faceDetected:!1};function Er(e){let{videoRef:t,assetBaseUrl:r}=e,n=(0,I.useRef)(e.verification).current,a=(0,I.useRef)(!1);e.verification!==n&&!a.current&&st()&&(a.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let c=(0,I.useRef)(null),[l,k]=(0,I.useState)("idle"),[S,x]=(0,I.useState)(Pr),[L,f]=(0,I.useState)(!1),[u,_]=(0,I.useState)(!1),[y,d]=(0,I.useState)(null),[M,m]=(0,I.useState)(!1),[w,P]=(0,I.useState)(null),[b,E]=(0,I.useState)(null),[H,j]=(0,I.useState)(null),[i,K]=(0,I.useState)(null),R=(0,I.useRef)(null),te=(0,I.useRef)("idle"),O=(0,I.useRef)(e);O.current=e,(0,I.useEffect)(()=>{let z=t.current;if(z===null)return;let q={video:z,...r!==void 0?{assetBaseUrl:r}:{}},F=n!==void 0?n.liveness(q):(0,Ar.createLivenessCapture)(q);c.current=F;let T=o(()=>K(F.facingMode??null),"readFacing");T();let he=[F.on("state",p=>{p==="starting"?(P(null),E(null),x(Pr),_(!1),f(!1),d(null),R.current=null):p==="gating"&&te.current==="recording"&&(_(!1),f(!1),d(null),R.current=null),te.current=p,T(),k(p),O.current.onStateChange?.(p)}),F.on("gate",p=>{let Se=R.current;R.current=p.progress,f(Se!==null&&p.progress<Se-.001&&p.progress>0&&p.progress<1),p.progress>=1&&_(!0),x(p)}),F.on("frozen",({previewDataUrl:p})=>d(p)),F.on("profile",({animations:p})=>m(p==="reduced")),F.on("captured",p=>{P(p),j(null),O.current.onCaptured?.(p)}),F.on("error",p=>{E(p),O.current.onError?.(p)}),n?.on("result",p=>{j(p),O.current.onResult?.(p)})];return()=>{for(let p of he)p?.();c.current=null,F.destroy()}},[n,t,r]);let Z=(0,I.useCallback)(z=>{c.current?.start(z)},[]),ye=(0,I.useCallback)(()=>{c.current?.retry()},[]),W=(0,I.useCallback)(()=>{let z=c.current,q=z?.switchCamera()===!0;return q&&(K(z?.facingMode??null),_(!1),f(!1),d(null),R.current=null),q},[]);return{state:l,gate:S,draining:L,gateLocked:u,frozenPreview:y,reduceMotion:M,artifacts:w,error:b,result:H,facingMode:i,start:Z,retry:ye,switchCamera:W}}o(Er,"useLivenessHandle");var le=require("react");var Ln=new Set(["national_number"]);function zr(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(r=>Ln.has(r));return t.length>0?{...e,options:t}:null}o(zr,"pending");function Kr(e){let[t,r]=(0,le.useState)(null),[s,n]=(0,le.useState)(e===void 0),[a,c]=(0,le.useState)(!1),[l,k]=(0,le.useState)(!1);(0,le.useEffect)(()=>{if(r(null),e===void 0){n(!0);return}let f=!0,u=e.methodChoice;typeof u=="function"?(n(!1),Promise.resolve().then(()=>u.call(e)).then(y=>{f&&r(zr(y))},()=>{}).finally(()=>{f&&n(!0)})):n(!0);let _=e.on("method",y=>r(zr(y)));return()=>{f=!1,_()}},[e]);let S=(0,le.useCallback)(async f=>{if(e===void 0)return!1;c(!0),k(!1);try{return await e.selectMethod(f),r(null),!0}catch{return k(!0),!1}finally{c(!1)}},[e]),x=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:x==="national_number"&&!l?x:null,settled:s,busy:a,failed:l,select:S}}o(Kr,"useMethodChoice");var Me=require("react");var Ie=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera","fcv3.hold_upright","capture.tips.summary"];function be(e){return e!==null&&Ie.includes(e)}o(be,"isVoiceKey");var Nn=["ar","fr","en"];function Vn(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}o(Vn,"isClipUrl");function In(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let r={};for(let s of Nn){let n=t[s];if(!(typeof n!="object"||n===null))for(let[a,c]of Object.entries(n))!be(a)||!Vn(c)||((r[s]??(r[s]={}))[a]=c)}return Object.keys(r).length>0?r:null}o(In,"toVoiceClipMap");function Or(e){let[t,r]=(0,Me.useState)(null);(0,Me.useEffect)(()=>{if(r(null),e===void 0)return;let n=!0,a=o(l=>{if(!n)return;let k=typeof l=="object"&&l!==null&&typeof l.setId=="string"?l:null;r(S=>S?.setId===k?.setId?S:k)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(a,()=>a(null))}catch{a(null)}let c=e.on("view",l=>a(l.voice));return()=>{n=!1,c()}},[e]);let s=(0,Me.useMemo)(()=>t!==null?In(t):null,[t]);return e===void 0?null:s}o(Or,"useServerVoiceClips");var vt=require("react/jsx-runtime");function Fr({voice:e}){let t=U();return(0,vt.jsx)(G,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>e.toggle(),children:(0,vt.jsx)(Te,{off:!e.enabled,className:"sekyro-icon"})})}o(Fr,"VoiceChip");var h=require("react");var Mn=o((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function Pe(e,t,r){let s;try{if(typeof e=="function")s=e(t,r);else{let n=e[r];s=n!=null&&Mn(n,t)?n[t]:null}}catch{return null}return typeof s=="string"&&s!==""?s:null}o(Pe,"resolveClip");var Pn="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",Br={ar:"ar-SA",fr:"fr-FR",en:"en-US"};function oe(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}o(oe,"synth");function An(){return oe()!==null&&typeof SpeechSynthesisUtterance=="function"}o(An,"speechAvailable");function Hr(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}o(Hr,"baseLang");function Gr(e,t){let r=o(n=>n.replace(/_/g,"-").toLowerCase(),"norm"),s=Hr(t);return e.find(n=>r(n.lang)===r(t))??e.find(n=>Hr(n.lang)===s)}o(Gr,"pickVoice");function qr(e){if(!An())return!1;let t=[];try{t=oe()?.getVoices()??[]}catch{return!0}return t.length===0||Gr(t,e)!==void 0}o(qr,"speechUsable");function Dr(e){let t=oe();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}o(Dr,"subscribeVoices");function Ue(e){try{let t=typeof location<"u"?location.href:"http://localhost/",r=new URL(e,t);return`clip:${r.origin}${r.pathname}`}catch{return`clip:${e}`}}o(Ue,"clipIdentity");function Ur(e){e.pause(),e.removeAttribute("src"),e.load()}o(Ur,"release");function $r(){let e=null,t=null,r=0,s=null,n=[],a=new Map,c=o(()=>{n=oe()?.getVoices()??[]},"loadVoices"),l=!1,k=o(()=>{let u=oe();l||u===null||(l=!0,c(),u.addEventListener?.("voiceschanged",c))},"bindVoices"),S=o(()=>(e??(e=new Audio),e),"element"),x=o((u,_,y)=>{let d=oe();if(d!==null&&u!==""&&typeof SpeechSynthesisUtterance=="function"){k();let M=Gr(n,_);if(n.length===0||M!==void 0){d.cancel();let m=new SpeechSynthesisUtterance(u);m.lang=_,M!==void 0&&(m.voice=M),m.rate=.95,y!==void 0&&(m.onend=m.onerror=y),d.speak(m);return}}y?.()},"speak"),L=o(()=>{r+=1,s=null,e!==null&&(e.pause(),e.currentTime=0),oe()?.cancel()},"stop"),f=o(u=>{for(let _ of u){let y=Ue(_);if(a.has(y))continue;let d=new Audio;d.preload="auto",d.src=_,a.set(y,d)}},"warmClips");return{say(u){let _=u.url!==null?Ue(u.url):`tts:${u.lang}:${u.text}`;if(_===s)return;s=_,r+=1;let y=r,d=u.onEnd,M=d!==void 0?()=>{y===r&&d()}:void 0;if(oe()?.cancel(),u.url!==null){let m=S();m.pause(),m.muted=!1,m.src=u.url,m.currentTime=0,m.onended=M??null,m.play()?.catch(w=>{y===r&&w?.name!=="AbortError"&&(u.speech?x(u.text,u.lang,M):M?.())});return}u.speech?x(u.text,u.lang,M):M?.()},unlock({lang:u,speech:_,prefetch:y}){let d=S();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let w=Uint8Array.from(atob(Pn),P=>P.charCodeAt(0));t=URL.createObjectURL(new Blob([w],{type:"audio/wav"}))}let M=d.paused===!1&&t!==null&&d.src!==t;t!==null&&!M&&(d.muted=!0,d.onended=null,d.src=t,d.play()?.catch(()=>{}));let m=oe();if(_&&m!==null&&typeof SpeechSynthesisUtterance=="function"){k();let w=new SpeechSynthesisUtterance(" ");w.volume=0,w.lang=u,m.speak(w)}f(y??[])},prefetch:f,stop:L,dispose(){L(),l&&oe()?.removeEventListener?.("voiceschanged",c),l=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&Ur(e),e=null;for(let u of a.values())Ur(u);a.clear()}}}o($r,"createVoicePlayer");var jr="sekyro.voiceGuidance";function Wr(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}o(Wr,"readVoicePreference");function Yr(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}o(Yr,"writeVoicePreference");var Be="capture.tips.summary",En=typeof window<"u"?h.useLayoutEffect:h.useEffect,zn=Object.freeze({});function _t(e,t){let r=new Set,s=[];for(let n of Ie){let a=n===Be?null:Pe(e,n,t);a===null||r.has(Ue(a))||(r.add(Ue(a)),s.push(a))}return s}o(_t,"resolvedClipUrls");function kt({locale:e,defaultClips:t,options:r}){let s=r===!1,n=s?{}:r??{},a=n.storageKey===void 0?jr:n.storageKey,[c,l]=(0,h.useState)(n.defaultEnabled??!0),k=(0,h.useRef)(c),[S,x]=(0,h.useState)(!1),[L,f]=(0,h.useState)("none"),[u,_]=(0,h.useState)(!1),y=(0,h.useRef)(!1),[d,M]=(0,h.useState)(0),m=(0,h.useRef)(null),w=(0,h.useCallback)(()=>(m.current??(m.current=$r()),m.current),[]),P=Br[e],b=n.speechFallback,E=b===void 0||b===!0?!0:b===!1?!1:b.includes(e),H=n.clips??t??zn,j=(0,h.useRef)(!1),i=(0,h.useRef)(H);En(()=>{i.current=H,k.current=c}),(0,h.useEffect)(()=>{if(s||a===null)return;let T=Wr(a);T!==null&&(k.current=T,l(T))},[s,a]),(0,h.useEffect)(()=>{if(!(s||!E))return Dr(()=>M(T=>T+1))},[s,E]);let K=n.clips;(0,h.useEffect)(()=>{if(s)return;let T=E&&qr(P);x(_t(H,e).length>0||T),f(K!==void 0&&Pe(K,Be,e)!==null?"partner":Pe(H,Be,e)!==null||T?"default":"none")},[s,H,K,e,E,P,d]),(0,h.useEffect)(()=>{if(s||!c||!j.current)return;let T=_t(H,e);T.length>0&&w().prefetch(T)},[s,c,H,e,w]),(0,h.useEffect)(()=>()=>{m.current?.dispose(),m.current=null,j.current=!1},[]);let R=(0,h.useCallback)(T=>{s||(j.current=!0,w().unlock({lang:P,speech:E,...T?{prefetch:_t(i.current,e)}:{}}))},[s,w,P,E,e]),te=(0,h.useCallback)(()=>R(k.current),[R]),O=(0,h.useCallback)(()=>{y.current=!1,_(!1)},[]),Z=(0,h.useCallback)(()=>{O(),m.current?.stop()},[O]),ye=(0,h.useCallback)(()=>{y.current&&Z()},[Z]),W=(0,h.useCallback)((T,he)=>{if(s)return;if(y.current){Z();return}let p=w();p.stop(),y.current=!0,_(!0);let Se=he?.clip===!1?null:Pe(i.current,Be,e);p.say({url:Se,text:T,lang:P,speech:E,onEnd:O})},[s,Z,w,e,P,E,O]),z=(0,h.useCallback)(T=>{s||(T?R(!0):Z(),a!==null&&Yr(a,T),k.current=T,l(T))},[s,R,Z,a]),q=(0,h.useCallback)(()=>z(!k.current),[z]),F=(0,h.useCallback)((T,he)=>{if(s||!c)return;y.current&&O();let p=Pe(i.current,T,e);w().say({url:p,text:he,lang:P,speech:E})},[s,c,e,w,P,E,O]);return(0,h.useMemo)(()=>({supported:!s&&S,enabled:!s&&c,setEnabled:z,toggle:q,unlock:te,speakKey:F,stop:Z,summary:s?"none":L,summaryPlaying:u,toggleSummary:W,stopSummary:ye}),[s,S,c,z,q,te,F,Z,L,u,W,ye])}o(kt,"useVoiceGuidance");function bt(e,t,r,s){let{speakKey:n,stop:a,enabled:c}=e,l=(0,h.useRef)(!1);(0,h.useEffect)(()=>{if(!s||!c){l.current&&a(),l.current=!1;return}l.current=!0,be(t)&&t!==Be&&r!==""&&n(t,r)},[s,c,t,r,n,a])}o(bt,"useSpeakGuidance");var C=require("react/jsx-runtime"),Ct=800;function Kn(e){return e===void 0||e!==!1&&e.length===Le.length&&Le.every(t=>e.includes(t))}o(Kn,"isDefaultTips");function On(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}o(On,"carriesActivation");function Fn(e){return typeof e=="object"&&e!==null&&!(0,v.isValidElement)(e)&&"tone"in e&&"text"in e}o(Fn,"isNoticeObject");function Hn(e){return e==="starting"||e==="gating"||e==="recording"}o(Hn,"isCapturing");function Un(e){return e==="captured"||e==="uploading"||e==="checking"}o(Un,"isPostCapture");function Zr({verification:e,locale:t,dir:r,strings:s,slots:n,autoStart:a=!1,notice:c,startDisabled:l=!1,startLabel:k,tips:S,tipsSummary:x,coach:L,voice:f,onGuidance:u,onCaptured:_,onResult:y,onError:d,onStateChange:M,assetBaseUrl:m,className:w}){let P=(0,v.useMemo)(()=>nt(t,s),[t,s]),b=(0,v.useMemo)(()=>N=>P[N]??"",[P]),E=r??(t==="ar"?"rtl":"ltr"),H=(0,v.useRef)(null),j=(0,v.useContext)(sr),i=Er({verification:e,videoRef:H,assetBaseUrl:m,onCaptured:_,onResult:y,onError:d,onStateChange:M}),K=Mr(m,i.state==="idle"&&i.error===null),R=Kr(e),te=R.choice!==null,O=Rr(e),Z=Tr(e),ye=Vr(e),W=xr(),z=Nr(e),q=z.mode==="assisted",F=q&&W.canChooseFacing,T=f!==!1&&f?.clips===void 0,he=Or(T?e:void 0),p=kt({locale:t,defaultClips:he,options:f}),[Se,ut]=(0,v.useState)(null),re=q?Se??(W.canChooseFacing?"environment":"user"):"user",xt=z.settled&&(!q||W.facingSettled),Rt=(0,v.useRef)(null),Ge=(0,v.useRef)(!1),Tt=(0,v.useRef)(p.unlock);Tt.current=p.unlock,(0,v.useEffect)(()=>{let N=Rt.current;if(N===null)return;let _e=["pointerup","touchend","click","keydown"],pe=o(()=>{for(let Oe of _e)N.removeEventListener(Oe,Re,!0)},"disarm");function Re(Oe){if(Ge.current){pe();return}On(Oe)&&(Ge.current=!0,pe(),Tt.current())}o(Re,"onGesture");for(let Oe of _e)N.addEventListener(Oe,Re,{capture:!0,passive:!0});return pe},[]);let Lt=(0,v.useCallback)(()=>{Ge.current||(Ge.current=!0,p.unlock()),i.start({facing:re})},[p.unlock,i.start,re]),Nt=(0,v.useCallback)(()=>i.start({facing:re}),[i.start,re]),qe=(0,v.useRef)(!1),Ae=i.state==="idle"&&i.error===null,Vt=!te&&!O.required&&(a===!0||a==="when-permitted"&&W.permission==="granted"),It=Vt&&R.settled&&O.settled&&xt,tn=a==="when-permitted"&&!W.permissionSettled&&!qe.current,Mt=Vt&&Ae&&!qe.current,lt=(tn||Mt||!xt)&&K.gate==="ready"?"loading":K.gate;(0,v.useEffect)(()=>{!It||!Ae||K.gate!=="ready"||qe.current||(qe.current=!0,Nt())},[It,Ae,K.gate,Nt]);let rn=Ae&&!te&&!O.required&&!(Mt&&K.gate==="ready"),Pt=(0,v.useCallback)(()=>{i.switchCamera()&&ut(re==="user"?"environment":"user")},[i.switchCamera,re]),At=i.state!=="idle"&&i.facingMode!==null?i.facingMode:re;(0,v.useEffect)(()=>{let N=H.current?.style;At==="user"?N?.removeProperty("transform"):N&&(N.transform="none")},[At]);let De=(0,v.useMemo)(()=>i.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(i.artifacts.keyframe):null,[i.artifacts]);(0,v.useEffect)(()=>{if(De!==null)return()=>URL.revokeObjectURL(De)},[De]);let Et=i.frozenPreview??De,we=e!==void 0,D=Hn(i.state),de=Un(i.state),$e=D||de,J=i.result,zt=i.state==="done"&&J!==null,Kt=i.state==="recording"&&i.frozenPreview!==null,dt=j!==null,Ee=de||Kt,Ot=de?"checking":Kt?"frozen":i.state==="recording"?"recording":i.gateLocked||i.gate.progress>=1?"locked":i.gate.faceDetected?"aligning":"seeking",je=D?i.gate.hint:null,We=i.state==="starting"?"capture.preparing.title":je===null?null:je==="center"&&!i.gate.faceDetected?"fcv3.no_face":Xe(je),[nn,Ft]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(We!=="fcv3.no_face"){Ft(We);return}if(!D)return;let N=setTimeout(()=>Ft(We),Ct);return()=>clearTimeout(N)},[We,D]);let pt=D&&typeof L=="string"&&L!=="",Ht=q&&D?b("capture.assisted.stage"):null,ve=D&&!pt?nn:null,ft=pt?L:ve===null?"":b(ve);bt(p,ve,ft,D);let Ut=(0,v.useRef)(u);Ut.current=u,(0,v.useEffect)(()=>{if(be(ve))try{Ut.current?.(ve)}catch(N){console.error("[@sekyro/react] onGuidance threw:",N)}},[ve]);let ze=(0,v.useMemo)(()=>({supported:p.supported,enabled:p.enabled,setEnabled:p.setEnabled,toggle:p.toggle}),[p.supported,p.enabled,p.setEnabled,p.toggle]),mt=n?.voicePrompt,Bt=mt!==void 0,Gt=f===void 0,qt=(0,v.useRef)(!1);(0,v.useEffect)(()=>{!Bt||!Gt||qt.current||!st()||(qt.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[Bt,Gt]);let on=mt!==void 0?(N,_e,pe)=>mt(N,_e,pe,ze):p.supported?()=>(0,C.jsx)(Fr,{voice:ze}):void 0,{summary:gt,summaryPlaying:Dt,toggleSummary:$t,stopSummary:jt}=p,Ye=x!==void 0&&x!=="",Wt=Ye?x:b("capture.tips.summary"),Yt=Ye?gt!=="none":gt==="partner"||gt==="default"&&Kn(S),sn=(0,v.useMemo)(()=>Yt?{playing:Dt,toggle:o(()=>$t(Wt,{clip:!Ye}),"toggle"),stop:jt}:void 0,[Yt,Dt,$t,Wt,jt,Ye]),an=(0,v.useMemo)(()=>({assets:lt,retryAssets:K.retry,permission:W.permission,captureMode:z.mode,facing:re,setFacing:ut,canChooseFacing:F,voice:ze}),[lt,K.retry,W.permission,z.mode,F,re,ze]),cn=Fn(c)?(0,C.jsx)(X,{tone:c.tone,testId:"sekyro-host-notice",children:(0,C.jsx)("span",{children:c.text})}):c??null,se=J!==null&&J.status==="retry"?J:null,ae=zt&&J.status==="unavailable"&&!te&&J.reason!=="portrait_required"?J:null,Ke=zt&&(J.status==="approved"||J.status==="rejected"||J.status==="review")?J:null,xe=o((N,_e)=>{if(N===void 0)return null;if(N==="device_cooldown"){let Re=et(t,_e);if(Re!==null)return b(Re.key).replace("{time}",Re.time)}let pe=Je(N);return pe===null?null:b(pe)},"reasonText"),un=ae!==null&&ae.reason!==void 0&&ae.reason!=="nni_unbound"&&ae.reason!=="method_required"&&ae.reason!=="mobile_required"&&!(ae.reason==="no_recorder"&&i.artifacts?.degraded==="NO_RECORDER"),Zt=it(),ln=te&&R.auto===null&&!D&&!de&&i.error===null,yt=(0,v.useCallback)(async N=>{await R.select(N)&&i.state==="done"&&i.retry()},[R.select,i.state,i.retry]);return(0,v.useEffect)(()=>{R.auto!==null&&!R.busy&&!D&&!de&&yt(R.auto)},[R.auto,R.busy,D,de,yt]),(0,C.jsx)(tr,{value:b,children:(0,C.jsxs)("div",{ref:Rt,className:w===void 0?"sekyro-capture":`sekyro-capture ${w}`,dir:E,lang:t,"data-testid":"sekyro-liveness-capture","data-state":i.state,children:[n?.header,se!==null&&xe(se.reason)!==null&&!(dt&&$e)?(0,C.jsx)(X,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:(0,C.jsx)("span",{children:xe(se.reason)})}):null,ye&&de&&!dt?(0,C.jsx)(X,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:(0,C.jsx)("span",{children:b("capture.busy")})}):null,O.required&&Ae?(0,C.jsx)(X,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:(0,C.jsx)("span",{children:b("reasons.mobile_required")})}):null,i.error!==null?n?.errorPanel!==void 0?n.errorPanel(i.error,i.retry):(0,C.jsxs)(X,{tone:"danger",testId:"sekyro-error-notice",children:[(0,C.jsx)("span",{children:b(Qe(i.error.kind))}),i.error.retryable?(0,C.jsx)(G,{ref:Zt,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:b("common.retry")}):null]}):null,ae!==null?(0,C.jsxs)(X,{tone:"danger",testId:"sekyro-unavailable-notice",children:[(0,C.jsx)("span",{children:xe(ae.reason)??b(ae.reason===void 0?"errors.session_expired":"errors.network_error")}),un?(0,C.jsx)(G,{ref:Zt,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:b("capture.recordAgain")}):null]}):null,Ke!==null&&xe(Ke.reason)!==null?(0,C.jsx)(X,{tone:Ke.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:(0,C.jsx)("span",{children:xe(Ke.reason,Ke.retryAfter)})}):null,(0,C.jsx)("div",{className:$e?void 0:"sekyro-hidden","data-capture-live":$e?"":void 0,children:dt?j({videoRef:H,guidance:Ee&&we?b("capture.checking"):ft,coached:pt&&!(Ee&&we),note:Ee?we?b(ye?"capture.busy":"capture.checkingHint"):null:se!==null?xe(se.reason):Ht,settled:Ee&&we,progress:i.gate.progress,phase:Ot,still:Ee?Et:null,live:$e,switchCamera:D&&i.state!=="recording"&&F&&Pt}):(0,C.jsx)(rr,{videoRef:H,guidanceText:ft,guidanceHint:je,guidanceKey:ve,progress:i.gate.progress,phase:Ot,draining:i.draining,stillUrl:Et,showChecking:we,onSwitchCamera:Pt,canSwitchCamera:q&&D&&i.state!=="recording",operatorText:Ht,voicePrompt:on,overlay:n?.stageOverlay,reduceMotion:i.reduceMotion})}),ln&&R.choice!==null?(0,C.jsx)(wr,{title:b("method.title"),description:b("method.description"),options:R.choice.options.map(N=>({id:N,label:b(`method.${N}`)})),busy:R.busy,error:R.failed?b("errors.network_error"):null,focus:i.state==="done",testId:"sekyro-method",look:"buttons",onChoose:N=>{yt(N)}}):null,rn?(0,C.jsxs)(C.Fragment,{children:[Z&&n?.header===void 0?(0,C.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,C.jsx)("h2",{className:"sekyro-text-body",children:b("returning.title")}),(0,C.jsx)("p",{className:"sekyro-text-muted",children:b("returning.description")})]}):null,cn,n?.intro!==void 0?n.intro(Lt,an):(0,C.jsx)(Cr,{assets:lt,onRetryAssets:K.retry,permission:W.permission,captureMode:z.mode,canChooseFacing:F,facing:re,onFacingChange:ut,voice:ze,tips:S??Le,summary:sn,startLabel:k,startDisabled:l,onStart:Lt})]}):null,(0,C.jsx)(nr,{showCoaching:se!==null,attemptsText:se?.attemptsRemaining!==void 0?tt(P,t,se.attemptsRemaining):null,showRetake:se!==null&&!D&&!de||!we&&i.state==="captured",onRetake:i.retry}),n?.footer]})})}o(Zr,"LivenessCapture");var en=require("react/jsx-runtime"),Ce={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'},St={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 wt(e={}){let t={};for(let r of Object.keys(St))t[St[r]]=e.colors?.[r]??Ce.colors[r];return t["--sekyro-radius"]=e.radius??Ce.radius,t["--sekyro-font"]=e.fontFamily??Ce.fontFamily,t}o(wt,"themeToCssVars");var Bn=/^#[0-9a-f]{6}$/i,Gn={none:"0px",sm:"4px",md:"8px",lg:"12px",full:"9999px"},qn={system:"",inter:"Inter","ibm-plex-sans-arabic":'"IBM Plex Sans Arabic"',"noto-sans-arabic":'"Noto Sans Arabic"',roboto:"Roboto"};function Xr(e){let t={};if(!e)return t;let r={};for(let[a,c]of Object.entries(e.colors??{}))a in St&&a!=="ring"&&Bn.test(c??"")&&(r[a]=c);r.brand&&(r.ring=r.brand),Object.keys(r).length&&(t.colors=r);let s=Gn[e.radius];s&&(t.radius=s);let n=qn[e.fontFamily];return n!==void 0&&(t.fontFamily=n?`${n}, ${Ce.fontFamily}`:Ce.fontFamily),t}o(Xr,"brandingToTheme");function Qr(...e){let t={};for(let r of e)r?.colors&&(t.colors={...t.colors,...r.colors}),r?.radius&&(t.radius=r.radius),r?.fontFamily&&(t.fontFamily=r.fontFamily);return t}o(Qr,"mergeThemes");function Jr({theme:e,children:t,className:r}){let s=wt(e);return(0,en.jsx)("div",{className:r===void 0?"sekyro-root":`sekyro-root ${r}`,style:s,children:t})}o(Jr,"SekyroThemeProvider");
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as Strings, a as SekyroLocale } from './theme-BpOuzcWh.cjs';
2
- export { B as BuiltInTipId, D as DEFAULT_THEME, b as DEFAULT_TIPS, I as IntroContext, c as IntroTip, L as LivenessCapture, d as LivenessCaptureProps, e as LivenessCaptureSlots, f as LivenessNotice, N as NO_FACE_DEBOUNCE_MS, g as SekyroTheme, h as SekyroThemeColors, i as SekyroThemeProvider, j as SekyroThemeProviderProps, k as StringKey, V as VOICE_KEYS, l as VoiceClipMap, m as VoiceClipResolver, n as VoiceClipSource, o as VoiceControl, p as VoiceKey, q as VoiceOptions, r as attemptsRemainingText, s as brandingToTheme, t as captureErrorStringKey, u as en, v as hintStringKey, w as mergeThemes, x as reasonStringKey, y as retryAfterTime, z as themeToCssVars } from './theme-BpOuzcWh.cjs';
1
+ import { S as Strings, a as SekyroLocale } from './theme-7Jj6eSH6.cjs';
2
+ export { B as BuiltInTipId, D as DEFAULT_THEME, b as DEFAULT_TIPS, I as IntroContext, c as IntroTip, L as LivenessCapture, d as LivenessCaptureProps, e as LivenessCaptureSlots, f as LivenessNotice, N as NO_FACE_DEBOUNCE_MS, g as SekyroTheme, h as SekyroThemeColors, i as SekyroThemeProvider, j as SekyroThemeProviderProps, k as StringKey, V as VOICE_KEYS, l as VoiceClipMap, m as VoiceClipResolver, n as VoiceClipSource, o as VoiceControl, p as VoiceKey, q as VoiceOptions, r as attemptsRemainingText, s as brandingToTheme, t as captureErrorStringKey, u as en, v as hintStringKey, w as mergeThemes, x as reasonStringKey, y as retryAfterTime, z as themeToCssVars } from './theme-7Jj6eSH6.cjs';
3
3
  import 'react';
4
4
  import '@sekyro/web';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as Strings, a as SekyroLocale } from './theme-BpOuzcWh.js';
2
- export { B as BuiltInTipId, D as DEFAULT_THEME, b as DEFAULT_TIPS, I as IntroContext, c as IntroTip, L as LivenessCapture, d as LivenessCaptureProps, e as LivenessCaptureSlots, f as LivenessNotice, N as NO_FACE_DEBOUNCE_MS, g as SekyroTheme, h as SekyroThemeColors, i as SekyroThemeProvider, j as SekyroThemeProviderProps, k as StringKey, V as VOICE_KEYS, l as VoiceClipMap, m as VoiceClipResolver, n as VoiceClipSource, o as VoiceControl, p as VoiceKey, q as VoiceOptions, r as attemptsRemainingText, s as brandingToTheme, t as captureErrorStringKey, u as en, v as hintStringKey, w as mergeThemes, x as reasonStringKey, y as retryAfterTime, z as themeToCssVars } from './theme-BpOuzcWh.js';
1
+ import { S as Strings, a as SekyroLocale } from './theme-7Jj6eSH6.js';
2
+ export { B as BuiltInTipId, D as DEFAULT_THEME, b as DEFAULT_TIPS, I as IntroContext, c as IntroTip, L as LivenessCapture, d as LivenessCaptureProps, e as LivenessCaptureSlots, f as LivenessNotice, N as NO_FACE_DEBOUNCE_MS, g as SekyroTheme, h as SekyroThemeColors, i as SekyroThemeProvider, j as SekyroThemeProviderProps, k as StringKey, V as VOICE_KEYS, l as VoiceClipMap, m as VoiceClipResolver, n as VoiceClipSource, o as VoiceControl, p as VoiceKey, q as VoiceOptions, r as attemptsRemainingText, s as brandingToTheme, t as captureErrorStringKey, u as en, v as hintStringKey, w as mergeThemes, x as reasonStringKey, y as retryAfterTime, z as themeToCssVars } from './theme-7Jj6eSH6.js';
3
3
  import 'react';
4
4
  import '@sekyro/web';
5
5
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a,b as c,c as l,d as E,e as g}from"./chunk-ADMDZLPM.js";import{b as m,d as S,e as T,f as C}from"./chunk-BRA6F56P.js";import{a as s}from"./chunk-65JA6YKG.js";import{c as e,d as r,e as t,f as o,g as p,h as i,i as y,j as n}from"./chunk-4RUZQW5T.js";export{a as DEFAULT_THEME,m as DEFAULT_TIPS,C as LivenessCapture,T as NO_FACE_DEBOUNCE_MS,g as SekyroThemeProvider,S as VOICE_KEYS,r as ar,n as attemptsRemainingText,l as brandingToTheme,p as captureErrorStringKey,e as en,t as fr,o as hintStringKey,E as mergeThemes,i as reasonStringKey,s as resolveStrings,y as retryAfterTime,c as themeToCssVars};
2
+ import{a,b as c,c as l,d as E,e as g}from"./chunk-COU4Y3DB.js";import{c as m,e as S,f as T,g as C}from"./chunk-ZVSRJKQE.js";import"./chunk-36RC3M4K.js";import{c as e,d as r,e as t,f as o,g as p,h as i,i as y,j as n,k as s}from"./chunk-PXRIFHY2.js";export{a as DEFAULT_THEME,m as DEFAULT_TIPS,C as LivenessCapture,T as NO_FACE_DEBOUNCE_MS,g as SekyroThemeProvider,S as VOICE_KEYS,r as ar,n as attemptsRemainingText,l as brandingToTheme,p as captureErrorStringKey,e as en,t as fr,o as hintStringKey,E as mergeThemes,i as reasonStringKey,s as resolveStrings,y as retryAfterTime,c as themeToCssVars};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as R}from"./chunk-ZTN4YV7S.js";import{b as M,c as G}from"./chunk-36RC3M4K.js";import"./chunk-2CJEADGY.js";import{c as L}from"./chunk-2PGJ7P7E.js";import{a as d,b as T}from"./chunk-LZU57LVO.js";import{a as s,b as C,o as B}from"./chunk-PXRIFHY2.js";import{useContext as J,useEffect as Q,useRef as $,useState as p}from"react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var S=["pose","eyes","mouth","lighting","background","resolution"];function nt({step:r,i18n:m,assetBaseUrl:v}){let{t:e}=m,b=$(null),l=$(null),[n,U]=p("idle"),[f,w]=p(null),[F,g]=p(null),[N,I]=p({facing:"user",assisted:!1}),{canChooseFacing:V}=G(),A=B(),P=J(L);Q(()=>{let a=b.current;if(a===null)return;let o=r.capture({video:a,...v!==void 0?{assetBaseUrl:v}:{}});l.current=o;let u=s(()=>I({facing:o.facingMode??"user",assisted:o.captureMode==="assisted"}),"readCamera");u();let D=[o.on("state",k=>{u(),U(k)}),o.on("gate",w),o.on("error",g)];return o.start().catch(()=>{}),()=>{for(let k of D)k();o.destroy(),l.current=null}},[]);let E=n==="uploading"||n==="checking",c=n==="done",O=c&&r.reason!==void 0&&!r.uploadFailed,_=n==="starting"||n==="idle"?"portrait.starting":n==="captured"?"portrait.taken":n==="uploading"?"portrait.uploading":n==="checking"?"portrait.checking":`portrait.coach.${f?.coach??"no_face"}`,K=(r.report??[]).filter(a=>!a.pass),y=r.reason!==void 0?`reasons.${r.reason}`:null,x=s(()=>{g(null),l.current?.retry()},"retake"),h=s(a=>{let o=f?.criteria.find(u=>u.criterion===a);return o!==void 0&&(o.held||o.waived)},"met"),j=f?.ready||n==="captured"||E?1:S.filter(h).length/S.length,H=y!==null&&(n==="gating"||O),q=N.assisted&&V&&(n==="starting"||n==="gating"||n==="error"),z=s(()=>{let a=l.current;a?.switchCamera()===!0&&(g(null),w(null),I({facing:a.facingMode??"user",assisted:!0}))},"switchCamera");return i(R,{testId:"sekyro-portrait",video:t("video",{ref:b,className:`sekyro-lm-video sekyro-fc-video${N.facing==="environment"?" is-rear":""}`,playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),instruction:e(_),progress:j,closeLabel:e("native.close"),...P!==void 0?{onClose:P}:{},...q?{end:t("button",{type:"button",className:"sekyro-glass",onClick:z,"aria-label":e("capture.switchCamera"),"data-testid":"sekyro-portrait-switch",children:t(M,{})})}:{},children:[t("h2",{ref:A,tabIndex:-1,className:"sekyro-visually-hidden",children:e(r.reason!==void 0?"portrait.retryTitle":"session.steps.portrait.title")}),H||F!==null||c&&(r.uploadFailed||!r.attemptsExhausted)?i("div",{className:"sekyro-fc-panel",children:[H?i(d,{tone:"warning",children:[t("span",{children:m.strings[y]!==void 0?e(y):e("portrait.retryTitle")}),K.length>0?i("span",{children:[e("portrait.reportTitle"),": ",K.map(a=>e(`portrait.report.${a.criterion}`)).join(", ")]}):null,t("span",{children:T(m,r.attemptsRemaining,r.attemptsExhausted)})]}):null,F!==null?i(d,{tone:"danger",children:[t("span",{children:e("portrait.cameraBlocked")}),t("span",{children:e("portrait.cameraBlockedHint")}),t(C,{kind:"ghost",onClick:x,children:e("portrait.retryCamera")})]}):null,r.uploadFailed&&c?t(d,{tone:"danger",children:t("span",{children:e("portrait.uploadFailed")})}):null,c&&!r.attemptsExhausted?t(C,{full:!0,onClick:x,disabled:E,children:e("portrait.retake")}):null]}):null,t("ul",{className:"sekyro-fc-checks","aria-label":e("portrait.checksLabel"),children:S.map(a=>i("li",{className:h(a)?"is-met":void 0,children:[t("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:t("svg",{viewBox:"0 0 18 18",children:t("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),t("span",{children:e(`portrait.criteria.${a}`)}),t("span",{className:"sekyro-visually-hidden",children:e(h(a)?"portrait.met":"portrait.notMet")})]},a))})]})}s(nt,"PortraitCaptureView");export{nt as PortraitCaptureView};
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
- import { CaptureErrorKind, GateHint, ReasonCode, CameraPermissionState, CameraFacing, Verification, CaptureError, CapturedArtifacts, VerificationResult, CaptureState, HostedBranding } from '@sekyro/web';
3
+ import { CaptureErrorKind, GateHint, ReasonCode, CameraPermissionState, CaptureMode, CameraFacing, Verification, CaptureError, CapturedArtifacts, VerificationResult, CaptureState, HostedBranding } from '@sekyro/web';
4
4
 
5
5
  /** A built-in tip (copy `capture.tips.<id>`, built-in icon). */
6
6
  type BuiltInTipId = "light" | "uncover" | "eyeLevel" | "straight";
@@ -60,6 +60,8 @@ interface Strings {
60
60
  "fcv3.too_bright": string;
61
61
  "fcv3.hold_still": string;
62
62
  "fcv3.steady_camera": string;
63
+ /** The phone shows a landscape frame (hint `upright`): the gate waits until it is held upright. */
64
+ "fcv3.hold_upright": string;
63
65
  "reasons.no_face": string;
64
66
  "reasons.media_unreadable": string;
65
67
  "reasons.clip_too_short": string;
@@ -84,6 +86,8 @@ interface Strings {
84
86
  "reasons.otp_expired": string;
85
87
  "reasons.otp_send_failed": string;
86
88
  "reasons.uncalibrated_capture_channel": string;
89
+ "reasons.capture_back_camera": string;
90
+ "reasons.capture_not_upright": string;
87
91
  "reasons.location_not_allowed": string;
88
92
  "reasons.anonymizer_blocked": string;
89
93
  "reasons.nationality_not_allowed": string;
@@ -141,6 +145,10 @@ interface Strings {
141
145
  "capture.cameraLabel": string;
142
146
  "capture.facing.user": string;
143
147
  "capture.facing.environment": string;
148
+ /** Assisted capture (an agent films the person): the pre-capture title and lead, and the line under the stage. */
149
+ "capture.assisted.title": string;
150
+ "capture.assisted.lead": string;
151
+ "capture.assisted.stage": string;
144
152
  "capture.voiceGuidance": string;
145
153
  "capture.preparing.hint": string;
146
154
  "capture.ready": string;
@@ -188,7 +196,7 @@ declare function attemptsRemainingText(dictionary: Strings, locale: SekyroLocale
188
196
  * `capture.tips.summary` — the pre-capture "Listen to the instructions" summary
189
197
  * (played only on an explicit tap, never during capture).
190
198
  */
191
- type VoiceKey = "fcv3.no_face" | "fcv3.come_closer" | "fcv3.move_back" | "fcv3.center_face" | "fcv3.straighten" | "fcv3.more_light" | "fcv3.too_bright" | "fcv3.hold_still" | "fcv3.steady_camera" | "capture.tips.summary";
199
+ type VoiceKey = "fcv3.no_face" | "fcv3.come_closer" | "fcv3.move_back" | "fcv3.center_face" | "fcv3.straighten" | "fcv3.more_light" | "fcv3.too_bright" | "fcv3.hold_still" | "fcv3.steady_camera" | "fcv3.hold_upright" | "capture.tips.summary";
192
200
  /** Every {@link VoiceKey}, in a stable order (e.g. to build a clip map). */
193
201
  declare const VOICE_KEYS: readonly VoiceKey[];
194
202
 
@@ -255,15 +263,26 @@ interface LivenessNotice {
255
263
  interface IntroContext {
256
264
  /**
257
265
  * Detector preload gate: Start should wait for `ready`; `failed` offers `retryAssets`.
258
- * Also `loading` while `autoStart="when-permitted"` waits for the first camera-permission answer.
266
+ * Also `loading` while `autoStart="when-permitted"` waits for the first camera-permission answer, and until the
267
+ * camera `start` opens is known (the capture mode and, in an assisted capture, whether the device has a front/back
268
+ * choice).
259
269
  */
260
270
  assets: "loading" | "ready" | "failed";
261
271
  retryAssets: () => void;
262
272
  permission: CameraPermissionState;
263
- /** The camera `start` opens (and the in-stage switch flips). */
273
+ /**
274
+ * Who films the face, set by the session's flow: `self` (the person, front camera) or `assisted` (an agent films
275
+ * the person with the back camera). Always `self` without a `verification`.
276
+ */
277
+ captureMode: CaptureMode;
278
+ /**
279
+ * The camera `start` opens (and the in-stage switch flips). Always `"user"` in a self capture; an assisted capture
280
+ * defaults to `"environment"` on a device with a front/back choice and to `"user"` without one.
281
+ */
264
282
  facing: CameraFacing;
283
+ /** Picks the camera of an assisted capture (ignored in a self capture). */
265
284
  setFacing: (facing: CameraFacing) => void;
266
- /** A front/back choice makes sense on this device. */
285
+ /** A front/back choice is offered: an assisted capture on a device with several cameras. */
267
286
  canChooseFacing: boolean;
268
287
  voice: VoiceControl;
269
288
  }
@@ -351,8 +370,6 @@ interface LivenessCaptureProps {
351
370
  * built-in guidance. Shown, not spoken.
352
371
  */
353
372
  coach?: string | null;
354
- /** Camera the attempt opens with; default `"user"` (front). */
355
- defaultFacing?: CameraFacing;
356
373
  /**
357
374
  * Voice guidance (on by default). Clips: `voice.clips` when given; else, in
358
375
  * verification mode, the Sekyro AI clip set delivered with the session (served
@@ -383,7 +400,7 @@ interface LivenessCaptureProps {
383
400
  * {@link SekyroThemeProvider} (or set the `--sekyro-*` variables yourself) and
384
401
  * import `@sekyro/react/styles.css` once.
385
402
  */
386
- declare function LivenessCapture({ verification, locale, dir, strings, slots, autoStart, notice, startDisabled, startLabel, tips, tipsSummary, coach, defaultFacing, voice: voiceOption, onGuidance, onCaptured, onResult, onError, onStateChange, assetBaseUrl, className, }: LivenessCaptureProps): react.JSX.Element;
403
+ declare function LivenessCapture({ verification, locale, dir, strings, slots, autoStart, notice, startDisabled, startLabel, tips, tipsSummary, coach, voice: voiceOption, onGuidance, onCaptured, onResult, onError, onStateChange, assetBaseUrl, className, }: LivenessCaptureProps): react.JSX.Element;
387
404
 
388
405
  /** Color tokens. Every value is any valid CSS `<color>`. */
389
406
  interface SekyroThemeColors {