@sekyro/react 0.1.0-rc.40 → 0.1.0-rc.41

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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a as be,c as W,d as R,e as ve,f as we,g as Ae,h as Z}from"./chunk-P7QMLT56.js";import{a as z}from"./chunk-WIHBHY2K.js";import{f as Q,j as K}from"./chunk-SRQXICOI.js";import"./chunk-2SVN4T5I.js";import"./chunk-7MMT5M4E.js";import{a as ge,b as P,c as ke}from"./chunk-55NNQK5P.js";import{a as fe}from"./chunk-A7C3KQ7K.js";import{d as Y}from"./chunk-V3BQZTXH.js";import{a as $,b as ye,d as q,e as he,q as _}from"./chunk-OLU5EOHP.js";import"./chunk-TLYACCNO.js";import{a as C,s as H}from"./chunk-MDXA7C7O.js";import{a as m}from"./chunk-2KED7D2Q.js";import{HostedApiError as Te,laneOptionsFor as Be,queryCameraPermission as Ze}from"@sekyro/web";import{detectIsMobile as se}from"@sekyro/web/core";import{useEffect as L,useId as F,useMemo as I,useRef as E,useState as x}from"react";var Se={"consent.human.terms.intro":"تؤكد Sekyro AI أن شخصًا حقيقيًا يُجري هذه الخطوة، نيابةً عن الجهة التي طلبتها.","consent.human.terms.data":"تلتقط Sekyro AI تسجيلًا قصيرًا لوجهك.","consent.human.terms.processing":"يُفحص هذا التسجيل للتأكد من أنك شخص حقيقي وحاضر، وقد يُقارَن بالوجوه التي سبق التحقق منها لدى هذه الجهة.","consent.human.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.human.terms.retention":"تُخزَّن بياناتك مشفّرة ولا يُحتفظ بها إلا للمدة التي يقتضيها القانون وإعدادات الجهة. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع الجهة التي طلبت هذا التحقق.","capture.noCamera.title":"تتطلب هذه الخطوة كاميرا","capture.noCamera.body":"اسمح بالوصول إلى الكاميرا وحاول مرة أخرى، أو تابع على هاتف مزوّد بكاميرا.","capture.noCamera.continue":"المتابعة بدون كاميرا","capture.noCamera.deniedTitle":"اسمح بالوصول إلى الكاميرا","capture.noCamera.deniedBody":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","capture.noCamera.stepsChrome":"في Chrome، اضغط على الرمز الموجود بجانب العنوان، ثم الأذونات، وفعّل الكاميرا.","capture.noCamera.stepsSamsung":"في Samsung Internet، افتح القائمة، ثم الإعدادات، المواقع والتنزيلات، أذونات المواقع، الكاميرا، واسمح لهذا الموقع.","capture.noCamera.stepsSafari":"في Safari، اضغط على زر aA في شريط العنوان، ثم إعدادات موقع الويب، واضبط الكاميرا على السماح.","capture.noCamera.stepsDesktop":"انقر على الرمز الموجود بجانب العنوان واسمح بالكاميرا لهذا الموقع.","capture.noCamera.stepsSystem":"ما زالت محظورة؟ تحقق في إعدادات هاتفك من أن متصفحك مسموح له باستخدام الكاميرا.","capture.noCamera.stillBlocked":"ما زالت الكاميرا محظورة. اتبع الخطوات أعلاه ثم أعد المحاولة.","capture.noCamera.inAppTitle":"افتح هذه الصفحة في متصفحك","capture.noCamera.inAppBody":"لا يمكن لمتصفح هذا التطبيق استخدام الكاميرا. افتح الصفحة في Chrome أو Safari للمتابعة.","choice.title":"كيف تريد المتابعة؟","choice.description":"اختر خيارًا واحدًا.","choice.switch":"استخدم خيارًا آخر","contact.title":"كيف تريد استلام الرمز؟","contact.description":"اختر خيارًا واحدًا.","contact.phone":"عبر الهاتف (واتساب أو رسالة نصية)","contact.email":"عبر البريد الإلكتروني","contact.switch":"استخدم خيارًا آخر","summary.title":"تحقق من بياناتك","summary.description":"تأكد من أن هذه بياناتك قبل الصورة الحية.","summary.fullName":"الاسم الكامل","summary.birthDate":"تاريخ الميلاد","summary.nationality":"الجنسية","summary.documentType":"الوثيقة","summary.documentNumber":"رقم الوثيقة","summary.nni":"الرقم الوطني للتعريف الموريتاني (NNI)","summary.id_number":"رقم الهوية","summary.expiryDate":"تاريخ الانتهاء","summary.portraitAlt":"الصورة المسجلة","summary.source.registry":"من سجل الحالة المدنية","summary.source.document":"مقروءة من وثيقتك","summary.source.chip":"مقروءة من شريحة وثيقتك","summary.name":"الاسم","summary.birthYear":"سنة الميلاد","summary.confirm":"تأكيد ومتابعة","summary.retakeDocument":"مسح وثيقتي مرة أخرى","summary.retakeNationalNumber":"إدخال رقمي مرة أخرى","summary.noRetake":"لم يعد بإمكانك إعادة المحاولة. تواصل مع {org} إذا كانت هذه البيانات غير صحيحة","capture.tipsIcao.title":"لصورة الهوية:","capture.tipsIcao.glasses":"انزع نظارتك","capture.tipsIcao.headwear":"انزع القبعة. يُقبل غطاء الرأس الديني إذا كان الوجه ظاهرًا بالكامل","capture.tipsIcao.expression":"حافظ على تعبير محايد وفمك مغلق","capture.tipsIcao.faceCamera":"انظر مباشرة إلى الكاميرا وعيناك مفتوحتان","capture.tipsIcao.background":"قف أمام خلفية سادة فاتحة اللون","capture.tipsIcao.lighting":"استخدم إضاءة متساوية على وجهك: دون ظلال","capture.tipsIcao.hair":"أبعد شعرك عن وجهك وعينيك","capture.tipsIcao.summary":"قف أمام جدار سادة فاتح اللون مع إضاءة متساوية على وجهك. انزع نظارتك وأي قبعة. أبعد شعرك عن وجهك، وانظر مباشرة إلى الكاميرا وعيناك مفتوحتان، وحافظ على تعبير محايد وفمك مغلق، وابقَ ثابتًا.","portrait.retakeOnly":"نجح التحقق الحي. الصورة فقط تحتاج إلى محاولة أخرى","portrait.keepCamera":"ابقَ أمام الكاميرا","handoff.description":"امسح الرمز بهاتفك للمتابعة","handoff.qrAlt":"رمز QR يفتح عملية التحقق هذه على هاتفك","handoff.copyLink":"نسخ الرابط","handoff.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة من متصفحك بدلًا من ذلك","handoff.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة على هاتفك","inApp.title":"افتح الصفحة في متصفحك","inApp.description":"لا تعمل الكاميرا جيدًا داخل هذا التطبيق. افتح الرابط في Chrome أو Safari للمتابعة.","inApp.copyLink":"نسخ الرابط","inApp.copied":"تم نسخ الرابط. الصقه في متصفحك","inApp.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة بدلًا من ذلك","inApp.continueAnyway":"المتابعة هنا على أي حال","needsApp.capture.title":"تابع في التطبيق","needsApp.capture.description":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org}.","needsApp.capture.descriptionSekyro":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org} أو في تطبيق Sekyro AI.","needsApp.capture.descriptionNoOrg":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في التطبيق الذي أُعطي لك.","needsApp.capture.descriptionNoOrgSekyro":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في تطبيق Sekyro AI.","needsApp.capture.openSekyro":"افتح في تطبيق Sekyro AI","needsApp.capture.getApp":"احصل على تطبيق Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"امسح الرمز بهاتفك لفتح هذا التحقق في التطبيق.","needsApp.capture.qrAlt":"رمز QR يفتح هذا التحقق في التطبيق","needsApp.capture.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة في التطبيق","inApp.openBrowser":"افتح في المتصفح","testerGate.action":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. إذا تطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة، فستُجري هذه الجلسة فحوصات حقيقية. وإلا فلن يُحتفظ بأي شيء وستتابع باستخدام بيانات الاختبار.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"لم يُحتفظ بأي شيء. يمكنك إعادة المحاولة أو المتابعة باستخدام بيانات الاختبار.","testerGate.retakeTitle":"تعذّر علينا التحقق من وجهك بوضوح","testerGate.retakeBody":"لم يُحتفظ بأي شيء، ولا تُحتسب هذه المحاولة. واجه الكاميرا في إضاءة جيدة، وابقَ ثابتًا، ثم أعد المحاولة.","testerGate.livenessTitle":"لم يتم تأكيد الوجه الحي","testerGate.livenessBody":"لم يُحتفظ بأي شيء. يمكنك إعادة المحاولة أو المتابعة باستخدام بيانات الاختبار.","testerGate.retry":"أعد المحاولة","testerGate.continueTest":"المتابعة باستخدام بيانات الاختبار","testerGate.continue":"متابعة","testerGate.limitBody":"تم بلوغ الحد اليومي للفحوصات الحقيقية للمختبِرين. تابع باستخدام بيانات الاختبار، أو أعد المحاولة غدًا.","testerGate.exhaustedBody":"لم تتبقَّ أي محاولة في هذه الجلسة. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة.","testerGate.closedBody":"لا يمكن بدء الفحوصات الحقيقية إلا قبل أول التقاط. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة."};var M={"consent.human.terms.intro":"Sekyro AI confirms that a real person is completing this step, on behalf of the organization that asked for it.","consent.human.terms.data":"Sekyro AI collects a short capture of your face.","consent.human.terms.processing":"The capture is checked to confirm that you are a real person who is present. It may be compared with faces already verified for this organization.","consent.human.terms.sharing":"The organization that requested this verification learns its outcome.","consent.human.terms.retention":"Your data is stored encrypted and kept only as long as the law and the organization's settings require. To exercise your data-protection rights, contact the organization that requested this verification.","capture.noCamera.title":"This step needs a camera","capture.noCamera.body":"Allow camera access and try again, or continue on a phone with a camera.","capture.noCamera.continue":"Continue without a camera","capture.noCamera.deniedTitle":"Allow camera access","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","capture.noCamera.stepsChrome":"In Chrome, tap the icon to the left of the address, then Permissions, and turn on Camera.","capture.noCamera.stepsSamsung":"In Samsung Internet, open the menu, then Settings, Sites and downloads, Site permissions, Camera, and allow this site.","capture.noCamera.stepsSafari":"In Safari, tap the aA button in the address bar, then Website Settings, and set Camera to Allow.","capture.noCamera.stepsDesktop":"Click the icon to the left of the address and allow the camera for this site.","capture.noCamera.stepsSystem":"Still blocked? In your phone's settings, check that your browser may use the camera.","capture.noCamera.stillBlocked":"The camera is still blocked. Follow the steps above, then try again.","capture.noCamera.inAppTitle":"Open this page in your browser","capture.noCamera.inAppBody":"This app's browser can't use your camera. Open the page in Chrome or Safari to continue.","choice.title":"Choose how to continue","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"Where to send your code","contact.description":"Choose one option.","contact.phone":"By phone (WhatsApp or SMS)","contact.email":"By email","contact.switch":"Use another option","summary.title":"Check your details","summary.description":"Make sure this is you before the live photo.","summary.fullName":"Full name","summary.birthDate":"Date of birth","summary.nationality":"Nationality","summary.documentType":"Document","summary.documentNumber":"Document number","summary.nni":"Mauritanian national ID number (NNI)","summary.id_number":"ID number","summary.expiryDate":"Expiry date","summary.portraitAlt":"Photo on record","summary.source.registry":"From the civil registry","summary.source.document":"Read from your document","summary.source.chip":"Read from your document's chip","summary.name":"Name","summary.birthYear":"Year of birth","summary.confirm":"Confirm and continue","summary.retakeDocument":"Scan my document again","summary.retakeNationalNumber":"Enter my number again","summary.noRetake":"You can't try again. Contact {org} if these details are wrong","capture.tipsIcao.title":"For your ID photo:","capture.tipsIcao.glasses":"Remove your glasses","capture.tipsIcao.headwear":"Remove hats and caps. A religious head covering is fine if your whole face shows","capture.tipsIcao.expression":"Keep a neutral expression with your mouth closed","capture.tipsIcao.faceCamera":"Look straight at the camera with your eyes open","capture.tipsIcao.background":"Stand in front of a plain, light background","capture.tipsIcao.lighting":"Use even light on your face: no shadows","capture.tipsIcao.hair":"Keep your hair away from your face and eyes","capture.tipsIcao.summary":"Stand in front of a plain, light wall with even light on your face. Remove your glasses and any hat. Keep your hair off your face, look straight at the camera with your eyes open, keep a neutral expression with your mouth closed, and hold still.","portrait.retakeOnly":"Your live check passed. Only the photo needs another try","portrait.keepCamera":"Stay in front of the camera","handoff.description":"Scan with your phone to continue","handoff.qrAlt":"QR code that opens this verification on your phone","handoff.copyLink":"Copy link","handoff.copyFailed":"We couldn't copy the link. Copy this page's address from your browser instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open in your browser","inApp.description":"The camera doesn't work well inside this app. Open the link in Chrome or Safari to continue.","inApp.copyLink":"Copy link","inApp.copied":"Link copied. Paste it in your browser","inApp.copyFailed":"We couldn't copy the link. Copy this page's address instead","inApp.continueAnyway":"Continue here anyway","needsApp.capture.title":"Continue in the app","needsApp.capture.description":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app.","needsApp.capture.descriptionSekyro":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app or in the Sekyro AI app.","needsApp.capture.descriptionNoOrg":"This verification takes the photos in a mobile app. Open it in the app you were given.","needsApp.capture.descriptionNoOrgSekyro":"This verification takes the photos in a mobile app. Open it in the Sekyro AI app.","needsApp.capture.openSekyro":"Open in the Sekyro AI app","needsApp.capture.getApp":"Get the Sekyro AI app","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scan with your phone to open this verification in the app.","needsApp.capture.qrAlt":"QR code that opens this verification in the app","needsApp.capture.waiting":"This page moves on when you finish in the app","inApp.openBrowser":"Open in browser","testerGate.action":"Run real checks as a tester","testerGate.title":"Run real checks as a tester","testerGate.body":"Look at the camera. If your face matches one of the organization's enrolled testers, this session runs real checks. If not, nothing is kept and you continue with test data.","testerGate.start":"Start","testerGate.checking":"Checking your face","testerGate.boundTitle":"Real checks are on","testerGate.boundBody":"You were recognised as an enrolled tester. The next steps run real checks.","testerGate.missTitle":"No enrolled tester matched","testerGate.missBody":"Nothing was kept. You can try again or continue with test data.","testerGate.retakeTitle":"We couldn't check your face clearly","testerGate.retakeBody":"Nothing was kept, and this try doesn't count. Face the camera in good light, keep still, and try again.","testerGate.livenessTitle":"Live face not confirmed","testerGate.livenessBody":"Nothing was kept. You can try again or continue with test data.","testerGate.retry":"Try again","testerGate.continueTest":"Continue with test data","testerGate.continue":"Continue","testerGate.limitBody":"Today's limit of real checks for testers is reached. Continue with test data, or try again tomorrow.","testerGate.exhaustedBody":"No tries are left on this session. Continue with test data, or start a new session.","testerGate.closedBody":"Real checks can start only before the first capture. Continue with test data, or start a new session."};var Ce={"consent.human.terms.intro":"Sekyro AI confirme qu'une personne réelle effectue cette étape, pour le compte de l'organisme qui l'a demandée.","consent.human.terms.data":"Sekyro AI recueille une courte capture de votre visage.","consent.human.terms.processing":"La capture est analysée pour confirmer que vous êtes une personne réelle et présente. Elle peut être comparée aux visages déjà vérifiés pour cet organisme.","consent.human.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.human.terms.retention":"Vos données sont stockées chiffrées et conservées uniquement pendant la durée exigée par la loi et les paramètres de l'organisme. Pour exercer vos droits en matière de protection des données, contactez l'organisme qui a demandé cette vérification.","capture.noCamera.title":"Une caméra est nécessaire","capture.noCamera.body":"Autorisez l'accès à la caméra et réessayez, ou continuez sur un téléphone équipé d'une caméra.","capture.noCamera.continue":"Continuer sans caméra","capture.noCamera.deniedTitle":"Autorisez la caméra","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","capture.noCamera.stepsChrome":"Dans Chrome, touchez l'icône à gauche de l'adresse, puis Autorisations, et activez Caméra.","capture.noCamera.stepsSamsung":"Dans Samsung Internet, ouvrez le menu, puis Paramètres, Sites et téléchargements, Autorisations des sites, Appareil photo, et autorisez ce site.","capture.noCamera.stepsSafari":"Dans Safari, touchez le bouton aA de la barre d'adresse, puis Réglages du site web, et réglez Caméra sur Autoriser.","capture.noCamera.stepsDesktop":"Cliquez sur l'icône à gauche de l'adresse et autorisez la caméra pour ce site.","capture.noCamera.stepsSystem":"Toujours bloquée ? Dans les réglages du téléphone, vérifiez que votre navigateur peut utiliser la caméra.","capture.noCamera.stillBlocked":"La caméra est toujours bloquée. Suivez les étapes ci-dessus, puis réessayez.","capture.noCamera.inAppTitle":"Ouvrez cette page dans votre navigateur","capture.noCamera.inAppBody":"Le navigateur de cette application ne peut pas utiliser votre caméra. Ouvrez la page dans Chrome ou Safari pour continuer.","choice.title":"Comment continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Où envoyer votre code ?","contact.description":"Choisissez une option.","contact.phone":"Par téléphone (WhatsApp ou SMS)","contact.email":"Par e-mail","contact.switch":"Utiliser une autre option","summary.title":"Vérifiez vos informations","summary.description":"Assurez-vous qu'il s'agit bien de vous avant la photo en direct.","summary.fullName":"Nom complet","summary.birthDate":"Date de naissance","summary.nationality":"Nationalité","summary.documentType":"Document","summary.documentNumber":"Numéro du document","summary.nni":"Numéro national d'identification mauritanien (NNI)","summary.id_number":"Numéro d'identité","summary.expiryDate":"Date d'expiration","summary.portraitAlt":"Photo enregistrée","summary.source.registry":"Issu de l'état civil","summary.source.document":"Lu sur votre document","summary.source.chip":"Lu sur la puce de votre document","summary.name":"Nom","summary.birthYear":"Année de naissance","summary.confirm":"Confirmer et continuer","summary.retakeDocument":"Scanner à nouveau mon document","summary.retakeNationalNumber":"Saisir à nouveau mon numéro","summary.noRetake":"Vous ne pouvez plus réessayer. Contactez {org} si ces informations sont incorrectes","capture.tipsIcao.title":"Pour votre photo d'identité :","capture.tipsIcao.glasses":"Retirez vos lunettes","capture.tipsIcao.headwear":"Retirez chapeau et casquette. Un couvre-chef religieux est accepté si tout le visage est visible","capture.tipsIcao.expression":"Gardez une expression neutre, la bouche fermée","capture.tipsIcao.faceCamera":"Regardez la caméra bien en face, les yeux ouverts","capture.tipsIcao.background":"Placez-vous devant un fond uni et clair","capture.tipsIcao.lighting":"Éclairez votre visage de façon uniforme : sans ombres","capture.tipsIcao.hair":"Dégagez vos cheveux du visage et des yeux","capture.tipsIcao.summary":"Placez-vous devant un mur uni et clair, le visage éclairé de façon uniforme. Retirez vos lunettes et tout chapeau. Dégagez vos cheveux du visage, regardez la caméra bien en face, les yeux ouverts, gardez une expression neutre, la bouche fermée, et ne bougez plus.","portrait.retakeOnly":"Votre vérification en direct est validée. Seule la photo est à refaire","portrait.keepCamera":"Restez face à la caméra","handoff.description":"Scannez avec votre téléphone pour continuer","handoff.qrAlt":"Code QR qui ouvre cette vérification sur votre téléphone","handoff.copyLink":"Copier le lien","handoff.copyFailed":"Nous n'avons pas pu copier le lien. Copiez plutôt l'adresse de cette page depuis votre navigateur","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez dans le navigateur","inApp.description":"La caméra fonctionne mal dans cette application. Ouvrez le lien dans Chrome ou Safari pour continuer.","inApp.copyLink":"Copier le lien","inApp.copied":"Lien copié. Collez-le dans votre navigateur","inApp.copyFailed":"Impossible de copier le lien. Copiez plutôt l'adresse de cette page","inApp.continueAnyway":"Continuer ici quand même","needsApp.capture.title":"Continuez dans l’application","needsApp.capture.description":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org}.","needsApp.capture.descriptionSekyro":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org} ou dans l’application Sekyro AI.","needsApp.capture.descriptionNoOrg":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application que l’on vous a indiquée.","needsApp.capture.descriptionNoOrgSekyro":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application Sekyro AI.","needsApp.capture.openSekyro":"Ouvrir dans l’application Sekyro AI","needsApp.capture.getApp":"Obtenir l’application Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scannez avec votre téléphone pour ouvrir cette vérification dans l’application.","needsApp.capture.qrAlt":"QR code qui ouvre cette vérification dans l’application","needsApp.capture.waiting":"Cette page avancera d’elle-même une fois l’étape terminée dans l’application","inApp.openBrowser":"Ouvrir dans le navigateur","testerGate.action":"Lancer de vrais contrôles en tant que testeur","testerGate.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Si votre visage correspond à l'un des testeurs inscrits de l'organisation, cette session lance de vrais contrôles. Sinon, rien n'est conservé et vous continuez avec des données de test.","testerGate.start":"Commencer","testerGate.checking":"Vérification de votre visage","testerGate.boundTitle":"Les vrais contrôles sont activés","testerGate.boundBody":"Vous avez été reconnu comme testeur inscrit. Les étapes suivantes lancent de vrais contrôles.","testerGate.missTitle":"Aucun testeur inscrit ne correspond","testerGate.missBody":"Rien n'a été conservé. Vous pouvez réessayer ou continuer avec des données de test.","testerGate.retakeTitle":"Nous n'avons pas pu vérifier votre visage clairement","testerGate.retakeBody":"Rien n'a été conservé et cet essai ne compte pas. Placez-vous face à la caméra, dans un endroit bien éclairé, restez immobile et réessayez.","testerGate.livenessTitle":"Visage en direct non confirmé","testerGate.livenessBody":"Rien n'a été conservé. Vous pouvez réessayer ou continuer avec des données de test.","testerGate.retry":"Réessayer","testerGate.continueTest":"Continuer avec des données de test","testerGate.continue":"Continuer","testerGate.limitBody":"La limite de vrais contrôles pour les testeurs est atteinte pour aujourd'hui. Continuez avec des données de test, ou réessayez demain.","testerGate.exhaustedBody":"Il ne reste plus d'essai sur cette session. Continuez avec des données de test, ou lancez une nouvelle session.","testerGate.closedBody":"Les vrais contrôles ne peuvent commencer qu'avant la première capture. Continuez avec des données de test, ou lancez une nouvelle session."};var xe={M:{perBlock:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26],blocks:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16],formatBits:0},H:{perBlock:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28],blocks:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25],formatBits:2}},Ie=20;function Fe(e){let t=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}m(Fe,"rawDataModules");function Ne(e,t){let{perBlock:r,blocks:n}=xe[t],a=r[e-1],i=n[e-1],c=Math.floor(Fe(e)/8),s=i-c%i,o=Math.floor(c/i)-a;return[a,s===i?[[i,o]]:[[s,o],[i-s,o+1]]]}m(Ne,"blockLayout");var j=m((e,t)=>Ne(e,t)[1].reduce((r,[n,a])=>r+n*a,0),"dataCapacity");function X(e,t){let r=0;for(let n=7;n>=0;n-=1)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r&255}m(X,"gfMul");function Ve(e){let t=new Array(e).fill(0);t[e-1]=1;let r=1;for(let n=0;n<e;n+=1){for(let a=0;a<e;a+=1)t[a]=X(t[a],r),a+1<e&&(t[a]=t[a]^t[a+1]);r=X(r,2)}return t}m(Ve,"rsDivisor");function De(e,t){let r=t.map(()=>0);for(let n of e){let a=n^r.shift();r.push(0),t.forEach((i,c)=>{r[c]=r[c]^X(i,a)})}return r}m(De,"rsRemainder");function He(e,t,r){let n=[],a=m((u,d)=>{for(let h=d-1;h>=0;h-=1)n.push(u>>>h&1)},"put");a(4,4),a(e.length,t<10?8:16);for(let u of e)a(u,8);let i=j(t,r)*8;a(0,Math.min(4,i-n.length)),a(0,(8-n.length%8)%8);let c=[];for(let u=0;u<n.length;u+=8)c.push(n.slice(u,u+8).reduce((d,h)=>d<<1|h,0));for(let u=236;c.length<j(t,r);u^=253)c.push(u);let[s,o]=Ne(t,r),l=Ve(s),f=[],k=0;for(let[u,d]of o)for(let h=0;h<u;h+=1){let b=c.slice(k,k+d);k+=d,f.push({data:b,ec:De(b,l)})}let y=[],g=Math.max(...f.map(u=>u.data.length));for(let u=0;u<g;u+=1)for(let d of f)u<d.data.length&&y.push(d.data[u]);for(let u=0;u<s;u+=1)for(let d of f)y.push(d.ec[u]);return y}m(He,"codewords");function ze(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=Math.ceil((e*4+4)/(t*2-2))*2,n=[6];for(let a=e*4+10;n.length<t;a-=r)n.splice(1,0,a);return n}m(ze,"alignmentPositions");var $e=[(e,t)=>(e+t)%2===0,e=>e%2===0,(e,t)=>t%3===0,(e,t)=>(e+t)%3===0,(e,t)=>(Math.floor(e/2)+Math.floor(t/3))%2===0,(e,t)=>e*t%2+e*t%3===0,(e,t)=>(e*t%2+e*t%3)%2===0,(e,t)=>((e+t)%2+e*t%3)%2===0],oe=class oe{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,r,n){this.dark[t*this.size+r]=n,this.fixed[t*this.size+r]=!0}get(t,r){return this.dark[t*this.size+r]===!0}};m(oe,"Grid");var J=oe;function qe(e,t){let r=e.size;for(let i=0;i<r;i+=1)e.set(6,i,i%2===0),e.set(i,6,i%2===0);for(let[i,c]of[[3,3],[3,r-4],[r-4,3]])for(let s=-4;s<=4;s+=1)for(let o=-4;o<=4;o+=1){let l=i+s,f=c+o;if(l<0||l>=r||f<0||f>=r)continue;let k=Math.max(Math.abs(s),Math.abs(o));e.set(l,f,k!==2&&k!==4)}let n=ze(t),a=n.length-1;if(n.forEach((i,c)=>n.forEach((s,o)=>{if(!(c===0&&o===0||c===0&&o===a||c===a&&o===0))for(let l=-2;l<=2;l+=1)for(let f=-2;f<=2;f+=1)e.set(i+l,s+f,Math.max(Math.abs(l),Math.abs(f))!==1)})),Ge(e,0),t>=7){let i=t;for(let s=0;s<12;s+=1)i=i<<1^(i>>>11)*7973;let c=t<<12|i;for(let s=0;s<18;s+=1){let o=(c>>>s&1)===1,l=r-11+s%3,f=Math.floor(s/3);e.set(l,f,o),e.set(f,l,o)}}}m(qe,"drawFunctionPatterns");function Ge(e,t,r=0){let n=e.size,a=r<<3|t,i=a;for(let o=0;o<10;o+=1)i=i<<1^(i>>>9)*1335;let c=(a<<10|i)^21522,s=m(o=>(c>>>o&1)===1,"bit");for(let o=0;o<=5;o+=1)e.set(o,8,s(o));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let o=9;o<15;o+=1)e.set(8,14-o,s(o));for(let o=0;o<8;o+=1)e.set(8,n-1-o,s(o));for(let o=8;o<15;o+=1)e.set(n-15+o,8,s(o));e.set(n-8,8,!0)}m(Ge,"drawFormat");function Ee(e,t){let r=e.size,n=0;for(let a=r-1;a>=1;a-=2){a===6&&(a=5);for(let i=0;i<r;i+=1)for(let c=0;c<2;c+=1){let s=a-c,l=(a+1&2)===0?r-1-i:i;e.fixed[l*r+s]!==!0&&(n<t.length*8&&(e.dark[l*r+s]=(t[n>>>3]>>>7-(n&7)&1)===1),n+=1)}}}m(Ee,"placeData");function Ue(e,t){let r=$e[t];for(let n=0;n<e.size;n+=1)for(let a=0;a<e.size;a+=1)e.fixed[n*e.size+a]!==!0&&r(n,a)&&(e.dark[n*e.size+a]=!e.dark[n*e.size+a])}m(Ue,"applyMask");function Qe(e){let t=e.size,r=0,n=m(i=>{let c=1;for(let s=1;s<=t;s+=1)s<t&&i(s)===i(s-1)?c+=1:(c>=5&&(r+=3+(c-5)),c=1);for(let s=0;s+10<t;s+=1){let o=[!0,!1,!0,!0,!0,!1,!0];if(!(o.every((y,g)=>i(s+g)===y)||o.every((y,g)=>i(s+4+g)===y)))continue;let f=[0,1,2,3].every(y=>!i(s+y))&&o.every((y,g)=>i(s+4+g)===y),k=o.every((y,g)=>i(s+g)===y)&&[7,8,9,10].every(y=>!i(s+y));f&&(r+=40),k&&(r+=40)}},"line");for(let i=0;i<t;i+=1)n(c=>e.get(i,c));for(let i=0;i<t;i+=1)n(c=>e.get(c,i));for(let i=0;i+1<t;i+=1)for(let c=0;c+1<t;c+=1){let s=e.get(i,c);s===e.get(i,c+1)&&s===e.get(i+1,c)&&s===e.get(i+1,c+1)&&(r+=3)}let a=e.dark.filter(Boolean).length;return r+=Math.floor(Math.abs(a*20-t*t*10)/(t*t))*10,r}m(Qe,"penalty");function ee(e,t={}){let r=t.ecl??"M",n=new TextEncoder().encode(e),a=1;for(;a<=Ie&&!(4+(a<10?8:16)+n.length*8<=j(a,r)*8);a+=1);if(a>Ie)throw new RangeError("text too long for a QR code");let i=He(n,a,r),c=m(l=>{let f=new J(a*4+17);return qe(f,a),Ee(f,i),Ue(f,l),Ge(f,l,xe[r].formatBits),f},"build"),s=null;if(t.mask!==void 0)s=c(t.mask);else{let l=Number.POSITIVE_INFINITY;for(let f=0;f<8;f+=1){let k=c(f),y=Qe(k);y<l&&(l=y,s=k)}}let o=s;return{size:o.size,get:m((l,f)=>o.get(l,f),"get")}}m(ee,"encodeQr");var te={viewBox:"0 0 100 100",d:"M22.37,0H77.63A22.37,22.37 0 0 1 100,22.37V77.63A22.37,22.37 0 0 1 77.63,100H22.37A22.37,22.37 0 0 1 0,77.63V22.37A22.37,22.37 0 0 1 22.37,0ZM48.067,21H38.308A17.308,17.308 0 0 0 21,38.308V42.543A19.886,19.886 0 0 0 40.886,62.429H60.219V57.641A4.419,4.419 0 0 0 55.8,53.222H43.463A11.416,11.416 0 0 1 32.048,41.806V38.308A8.102,8.102 0 0 1 40.149,30.206H43.648A4.419,4.419 0 0 0 48.067,25.787ZM38.676,79H59.114A19.886,19.886 0 0 0 79,59.114V57.457A19.886,19.886 0 0 0 59.114,37.571H38.676V42.359A4.419,4.419 0 0 0 43.095,46.778H56.537A11.416,11.416 0 0 1 67.952,58.194V58.378A11.416,11.416 0 0 1 56.537,69.794H43.095A4.419,4.419 0 0 0 38.676,74.213ZM51.933,21H79V37.571H69.794V30.206H51.933ZM21,71.543A7.457,7.457 0 1 0 35.914,71.543A7.457,7.457 0 1 0 21,71.543Z"},O=.42,Ke=.2,w=m(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function T(e,t,r,n){let a=`A${w(n)} ${w(n)} 0 0 1 `;return`M${w(e+n)} ${w(t)}H${w(e+r-n)}${a}${w(e+r)} ${w(t+n)}V${w(t+r-n)}${a}${w(e+r-n)} ${w(t+r)}H${w(e+n)}${a}${w(e)} ${w(t+r-n)}V${w(t+n)}${a}${w(e+n)} ${w(t)}Z`}m(T,"roundedSquare");function Ye(e){let t=(e-17)/4,r=ze(t),n=r.length-1,a=[];return r.forEach((i,c)=>r.forEach((s,o)=>{c===0&&o===0||c===0&&o===n||c===n&&o===0||a.push([i,s])})),a}m(Ye,"alignmentCentres");function ne(e,{quiet:t=4,logo:r=!1}={}){let n=e.size,a=m((u,d)=>u<7&&d<7||u<7&&d>=n-7||u>=n-7&&d<7,"isFinder"),i=Math.floor(n*Ke),c=r?i%2===0?i-1:i:0,s=(n-c)/2,o=m((u,d)=>c>0&&u>=s&&u<s+c&&d>=s&&d<s+c,"inZone"),l=Ye(n).filter(([u,d])=>!o(u,d)),f=m((u,d)=>l.some(([h,b])=>Math.abs(u-h)<=2&&Math.abs(d-b)<=2),"isAlign"),k=`a${w(O)} ${w(O)} 0 1 0 `,y="";for(let u=0;u<n;u+=1)for(let d=0;d<n;d+=1)!e.get(u,d)||a(u,d)||f(u,d)||o(u,d)||(y+=`M${w(d+t+.5-O)} ${w(u+t+.5)}${k}${w(2*O)} 0${k}${w(-2*O)} 0Z`);let g="";for(let[u,d]of[[0,0],[0,n-7],[n-7,0]]){let h=d+t,b=u+t;g+=T(h,b,7,1.6)+T(h+1,b+1,5,.6)+T(h+2,b+2,3,.6)}for(let[u,d]of l){let h=d-2+t,b=u-2+t;g+=T(h,b,5,1.2)+T(h+1,b+1,3,.5)+T(h+2,b+2,1,.5)}return{size:n+t*2,dots:y,finders:g,logo:c>0?{x:s+t+.5,y:s+t+.5,size:c-1}:null}}m(ne,"styledQr");function re(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${w(e.x)} ${w(e.y)}) scale(${t})`}m(re,"qrLogoTransform");import{useContext as We}from"react";function ae(e){let t=We(he);return e.kind!=="document"?{issuer:void 0,listed:[]}:{issuer:e.issuer??t.issuer,listed:t.listed}}m(ae,"useLaneIssuer");import{Fragment as G,jsx as p,jsxs as v}from"react/jsx-runtime";var je={en:M,fr:Ce,ar:Se,es:M,pt:M,de:M},Pe={en:P,fr:ke,ar:ge,es:P,pt:P,de:P};function A(e){let t=e.strings;return(r,n)=>Y(t[r]??je[e.locale][r]??"",n)}m(A,"flowT");function Re(e,t){let r=A(t);return e.flatMap(n=>{let a=n.service==="phone_otp"?r("contact.phone"):n.service==="email_otp"?r("contact.email"):W(n,t),i=be[n.service];return a===null?[]:[{id:n.id,label:a,...i!==void 0?{glyph:p($,{name:i})}:{}}]})}m(Re,"labelled");function Me({step:e,i18n:t,onError:r}){let n=A(t),{busy:a,error:i,run:c}=R(t,r),s=e.kind==="contact_choice";return p(Q,{title:n(s?"contact.title":"choice.title"),description:n(s?"contact.description":"choice.description"),options:Re(e.choice.options,t),busy:a,error:i,focus:!0,testId:s?"sekyro-contact-choice":"sekyro-choice",onChoose:o=>c(()=>e.choose(o))})}m(Me,"PlanChoiceView");var $t=Me,qt=Me;function Et({step:e,i18n:t,onError:r,onOpen:n}){let a=A(t),{busy:i,error:c,run:s}=R(t,r),o=e,l=e.context.switchable,{issuer:f,listed:k}=ae(e),y=l===void 0?[]:Be(l,f).switchTo.filter(S=>!k.includes(S.id)),g=o.kind==="registry"&&(o.reason==="nni_not_found"||o.reason==="registry_record_not_found")&&o.canUseDocument||o.kind==="eid"&&o.reason?.startsWith("eid_")&&o.canUseCamera,u=y.length===1?y[0]:void 0,d=u!==void 0&&(u.service==="phone_otp"||u.service==="email_otp"),h=d&&o.canSwitch&&o.switchTo!==void 0?()=>o.switchTo.call(e):o.chooseOption===void 0||u===void 0?void 0:()=>o.chooseOption.call(e,u.id);if(y.length===0||g||u!==void 0&&(h===void 0||b()===null)||u===void 0&&o.chooseOption===void 0)return null;function b(){return u===void 0?a("choice.switch"):u.service==="phone_otp"||u.service==="email_otp"?a("contact.switch"):o.kind==="registry"&&u.service==="document"?t.t("population.useDocument"):o.kind==="eid"?t.strings["eid.useCamera"]??Pe[t.locale]["eid.useCamera"]:W(u,t)}return m(b,"labelOf"),v("div",{className:"sekyro-stack sekyro-stack--1",children:[c!==null?p(_,{tone:"danger",children:p("span",{children:c})}):null,p(C,{kind:"secondary",disabled:i,"aria-busy":i||void 0,onClick:()=>h===void 0?n():s(h),"data-testid":d?"sekyro-contact-switch":"sekyro-lane-switch",children:b()})]})}m(Et,"LaneSwitch");function Ut({step:e,i18n:t,onError:r,onClose:n}){let a=A(t),{busy:i,error:c,run:s}=R(t,r),o=e.context.switchable,l=e.chooseOption,{issuer:f}=ae(e);if(o===void 0||l===void 0)return null;let k=new Set(Be(o,f).switchTo.map(y=>y.id));return p(Q,{title:a("choice.title"),description:a("choice.description"),options:Re(o.options.filter(y=>y.id===o.current||k.has(y.id)),t),...o.current!==null?{marked:o.current}:{},busy:i,error:c,focus:!0,testId:"sekyro-lane-choice",onChoose:y=>y===o.current?n():s(()=>l.call(e,y))})}m(Ut,"LaneChoiceView");var Xe=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["idNumberMasked","summary.id_number",!0],["expiryDate","summary.expiryDate",!0]];function Je(e){let[t,r]=x(null);return L(()=>{if(!e.portraitAvailable)return;let n=!0,a=null;return e.portrait().then(i=>{!n||i===null||!i.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(a=URL.createObjectURL(i),r(a))}),()=>{n=!1,a!==null&&URL.revokeObjectURL(a)}},[e.portraitAvailable]),t}m(Je,"usePortraitUrl");var et=m(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function tt(e,t){try{return new Intl.DateTimeFormat(t==="ar"?"ar-u-nu-latn":t,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))}catch{return e}}m(tt,"formatDate");function Qt({step:e,i18n:t,onError:r}){let n=A(t),a=F(),i=H(),c=Je(e),{busy:s,error:o,run:l}=R(t,r),f=e.context.orgName,k=["registry","document","chip"].find(u=>u===e.source),y=e.summaryKind==="partial",g=m(u=>t.strings[`doc.type.${u}`]??u,"documentLabel");return v("section",{className:"sekyro-step","aria-labelledby":a,"data-testid":"sekyro-identity-summary",children:[v("div",{className:"sekyro-heading",children:[p("h2",{id:a,ref:i,tabIndex:-1,className:"sekyro-text-body",children:n("summary.title")}),p("p",{className:"sekyro-text-muted",children:n("summary.description")})]}),k!==void 0?p("p",{className:"sekyro-summary__source",children:n(`summary.source.${k}`)}):null,v("div",{className:"sekyro-summary",children:[c!==null?p("img",{className:"sekyro-summary__portrait",src:c,alt:n("summary.portraitAlt")}):null,p("dl",{className:"sekyro-summary__list",children:Xe.map(([u,d,h])=>{let b=u==="idNumberMasked"?e.idNumberMasked??e.nniMasked:e[u];return b===void 0?null:v("div",{className:"sekyro-summary__row",children:[p("dt",{className:"sekyro-text-muted",children:n(u==="fullName"&&y?"summary.name":d)}),p("dd",{children:et(b)?tt(b,t.locale):h?p("bdi",{dir:"ltr",children:b}):u==="documentType"?g(b):b})]},u)})})]}),o!==null?p(_,{tone:"danger",children:p("span",{children:o})}):null,e.retakeAvailable?null:p("p",{className:"sekyro-text-muted",children:n("summary.noRetake",{org:f})}),v(q,{children:[p(C,{full:!0,disabled:s,"aria-busy":s||void 0,onClick:()=>l(()=>e.confirm()),children:n("summary.confirm")}),e.retakeAvailable?p(C,{kind:"secondary",full:!0,disabled:s,onClick:()=>l(()=>e.retake()),children:n(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}m(Qt,"IdentitySummaryView");var nt=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Kt({step:e,i18n:t,livenessProps:r,sekyroIntro:n}){let a=A(t),[i,c]=x(null);L(()=>e.onLivePhoto(d=>{let h=d.update?.coach;c(d.holding||h===void 0?null:t.t(`portrait.coach.${h}`))}),[e,t]);let s=e.instructions==="icao",o=I(()=>ve(e),[e]),l=e.icao?.profile==="selfie",f=I(()=>s?nt.filter(d=>!l||d!=="background").map(d=>({id:d,text:a(`capture.tipsIcao.${d}`)})):void 0,[s,l,t]),k=I(()=>s&&!l?{...r.strings,"capture.tips.title":a("capture.tipsIcao.title")}:r.strings,[s,l,r.strings,t]),y=l?void 0:a("capture.tipsIcao.title"),g=I(()=>n===!0&&f!==void 0?{...r.slots,intro:m((d,h)=>p(we,{start:d,context:h,tips:f,...y!==void 0?{tipsTitle:y}:{},...o!==void 0?{retry:o}:{}}),"intro")}:r.slots,[n,f,y,o,r.slots,t]),u=l?`${(f??[]).map(d=>d.text).join(". ")}.`:a("capture.tipsIcao.summary");return p(K,{...r,...g!==void 0?{slots:g}:{},...k!==void 0?{strings:k}:{},...f!==void 0?{tips:f,tipsSummary:u}:{},coach:i})}m(Kt,"LivePhotoLiveness");function Yt({i18n:e}){let t=A(e);return v(_,{tone:"info",children:[p("strong",{children:t("portrait.retakeOnly")}),p("span",{children:t("portrait.keepCamera")})]})}m(Yt,"PortraitRetakeNotice");function Wt({i18n:e,provider:t}){let r=e.strings,n=m(a=>r[a]??Pe[e.locale][a]??"","pick");return p("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?Y(n("eid.continueHint"),{provider:t}):n("eid.continueHintGeneric")})}m(Wt,"EidContinueHint");async function rt(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(rt,"copy");function ie({url:e,i18n:t,label:r,primary:n}){let a=A(t),[i,c]=x("idle"),s=r.startsWith("inApp.")?"inApp":"handoff";return v("div",{className:"sekyro-stack sekyro-stack--1",children:[p(C,{kind:n?"primary":"secondary",full:!0,onClick:()=>{rt(e).then(o=>c(o?"copied":"failed"))},children:a(r)}),p("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:i==="idle"?"":a(`${s}.${i==="copied"?"copied":"copyFailed"}`)})]})}m(ie,"CopyLink");function Oe({url:e,i18n:t,refresh:r,footer:n,lead:a}){let i=A(t),c=F(),s=I(()=>{try{return ne(ee(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]),o=E(r);o.current=r;let l=H();return L(()=>{let f=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&o.current?.().catch(()=>{})},5e3);return()=>clearInterval(f)},[]),v("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":c,"data-testid":"sekyro-handoff",children:[v("div",{className:"sekyro-heading",children:[p("h2",{id:c,ref:l,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),a!==void 0?p("p",{children:a}):null,p("p",{className:"sekyro-text-muted",children:i("handoff.description")})]}),s!==null?v("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":i("handoff.qrAlt"),children:[p("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),p("path",{d:s.dots,className:"sekyro-qr__fg"}),p("path",{d:s.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),s.logo!==null?p("path",{d:te.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(s.logo),"data-qr-mark":""}):null]}):null,v("p",{className:"sekyro-handoff__waiting",role:"status",children:[p("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),i("handoff.waiting")]}),v(q,{children:[p(ie,{url:e,i18n:t,label:"handoff.copyLink"}),n??null]})]})}m(Oe,"HandoffView");var _e={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function Zt({i18n:e,org:t,nativeApp:r,fallbackUrl:n,refresh:a,footer:i}){let c=A(e),s=I(()=>!se(),[]),o=r.link??n,l=I(()=>{if(!s||o===void 0||o==="")return null;try{return ne(ee(o,{ecl:"H"}),{logo:!0})}catch{return null}},[s,o]),f=E(a);f.current=a,L(()=>{let h=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&f.current?.().catch(()=>{})},5e3);return()=>clearInterval(h)},[]);let[k,y]=x(!1),g=m(()=>{a!==void 0&&(y(!0),a().catch(()=>{}).finally(()=>y(!1)))},"again"),u=r.sekyroApp,d=t!==""?c(u?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):c(u?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return v(z,{tone:"brand",icon:"smartphone",title:c("needsApp.capture.title"),testId:"sekyro-native-app",actions:v(G,{children:[!s&&u&&r.sekyroAppLink!==void 0?p("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:r.sekyroAppLink,"data-testid":"sekyro-open-sekyro-app",children:c("needsApp.capture.openSekyro")}):null,a!==void 0?p(C,{kind:"secondary",full:!0,disabled:k,onClick:g,children:e.t("common.refresh")}):null,i??null]}),children:[p("p",{children:d}),l!==null?v(G,{children:[v("svg",{className:"sekyro-qr",viewBox:`0 0 ${l.size} ${l.size}`,role:"img","aria-label":c("needsApp.capture.qrAlt"),children:[p("rect",{width:l.size,height:l.size,className:"sekyro-qr__bg"}),p("path",{d:l.dots,className:"sekyro-qr__fg"}),p("path",{d:l.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),l.logo!==null?p("path",{d:te.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(l.logo),"data-qr-mark":""}):null]}),p("p",{className:"sekyro-text-muted",children:c("needsApp.capture.scan")})]}):null,u?v("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[c("needsApp.capture.getApp")," ",p("a",{href:_e.appStore,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.appStore")})," · ",p("a",{href:_e.googlePlay,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.googlePlay")})]}):null,v("p",{className:"sekyro-handoff__waiting",role:"status",children:[p("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),c("needsApp.capture.waiting")]})]})}m(Zt,"NativeAppView");var ot=["intro","data","processing","sharing","retention"];function jt({i18n:e}){let t=A(e);return p(G,{children:ot.map(r=>p("p",{children:t(`consent.human.terms.${r}`)},r))})}m(jt,"HumanConsentTerms");function Xt({url:e,i18n:t}){return I(()=>!se(),[])?p(Oe,{url:e,i18n:t}):null}m(Xt,"DesktopHandoffView");function at(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(Ae(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let r=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||r?"ios":/Android/i.test(t)?"chrome_android":"desktop"}m(at,"cameraHelpPlatform");var st={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function Jt({i18n:e,cause:t,onRetry:r,onContinue:n,handoffUrl:a,repeated:i=!1,platform:c}){let s=A(e),o=F(),l=H(),[f,k]=x("idle"),y=I(()=>a!==void 0&&!se(),[a]),g=t==="denied",u=I(()=>c??at(),[c]),d=g&&u==="in_app",[h,b]=x(!1),S=E(!1),N=E(!0);L(()=>(N.current=!0,()=>{N.current=!1}),[]);let V=m(()=>{if(!g){r();return}S.current||(S.current=!0,Ze().catch(()=>"unknown").then(D=>{S.current=!1,N.current&&(D==="denied"&&!h&&!i?b(!0):r())}))},"retry"),Le=m(()=>{n!==void 0&&(k("busy"),n(t).then(()=>k("idle"),D=>k(D instanceof Te&&D.code==="check_out_of_order"?"idle":"failed")))},"end"),B=typeof window>"u"?"":window.location.href.split("#")[0]??"",U=I(()=>d&&B!==""?Z(B):null,[d,B]),ce=v(G,{children:[d&&U!==null?v("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:U,"data-testid":"sekyro-open-browser",children:[p($,{name:"external"}),s("inApp.openBrowser")]}):null,d&&B!==""?p(ie,{url:B,i18n:e,label:"inApp.copyLink",primary:U===null}):null,p(C,{full:!0,kind:!d&&(g||n===void 0)?"primary":"secondary",onClick:V,children:e.t("common.retry")}),n!==void 0?p(C,{full:!0,kind:g?"secondary":"primary",disabled:f==="busy","aria-busy":f==="busy"||void 0,onClick:Le,children:s("capture.noCamera.continue")}):null]}),ue=f==="failed"?p(_,{tone:"danger",children:p("span",{children:e.t("errors.network_error")})}):null,pe=s(d?"capture.noCamera.inAppTitle":g?"capture.noCamera.deniedTitle":"capture.noCamera.title"),le=s(d?"capture.noCamera.inAppBody":g?"capture.noCamera.deniedBody":"capture.noCamera.body"),de=g&&!d?v(G,{children:[p("p",{"data-testid":"sekyro-camera-steps","data-platform":u,children:s(st[u])}),u!=="desktop"?p("p",{className:"sekyro-text-muted",children:s("capture.noCamera.stepsSystem")}):null]}):null,me=g&&(h||i)?p(_,{tone:"warning",children:p("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:s("capture.noCamera.stillBlocked")})}):null;return y&&a!==void 0?v("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":o,"data-testid":"sekyro-no-camera","data-cause":t,children:[p(Oe,{url:a,i18n:e}),p("h2",{id:o,ref:l,tabIndex:-1,className:"sekyro-text-body",children:pe}),p("p",{className:"sekyro-text-muted",children:le}),de,me,ue,p("div",{className:"sekyro-stack sekyro-stack--3",children:ce})]}):v(z,{tone:g?"warning":"neutral",icon:"camera",titleId:o,title:pe,testId:"sekyro-no-camera",actions:ce,children:[p("p",{children:le}),de,me,ue]})}m(Jt,"NoCameraView");function en({url:e,i18n:t,onContinue:r}){let n=A(t),a=F(),i=I(()=>Z(e),[e]);return p(z,{tone:"brand",icon:"external",titleId:a,title:n("inApp.title"),testId:"sekyro-in-app",actions:v(G,{children:[i!==null?v("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:i,"data-testid":"sekyro-open-browser",children:[p($,{name:"external"}),n("inApp.openBrowser")]}):null,p(ie,{url:e,i18n:t,label:"inApp.copyLink",primary:i===null}),p(C,{kind:"ghost",full:!0,onClick:r,children:n("inApp.continueAnyway")})]}),children:p("p",{children:n("inApp.description")})})}m(en,"InAppBrowserPrompt");var it={retake:{title:"testerGate.retakeTitle",body:"testerGate.retakeBody"},liveness:{title:"testerGate.livenessTitle",body:"testerGate.livenessBody"},no_match:{title:"testerGate.missTitle",body:"testerGate.missBody"}},ct={tester_limit_reached:"testerGate.limitBody",gate_attempts_exhausted:"testerGate.exhaustedBody",tester_gate_closed:"testerGate.closedBody"};function tn({i18n:e,onOpen:t}){let r=A(e);return p(C,{kind:"ghost",full:!0,onClick:t,"data-testid":"sekyro-tester-gate-action",children:r("testerGate.action")})}m(tn,"TesterGateAction");function nn({i18n:e,verification:t,attemptsLeft:r,livenessProps:n,onBound:a,onDone:i}){let c=A(e),s=F(),[o,l]=x("intro"),[f,k]=x(null),[y,g]=x("no_match"),u=t.testerGate,d=m(b=>{u!==void 0&&(l("checking"),u.call(t,b).then(({bound:S,missReason:N})=>{S&&a(),g(N??"no_match"),l(S?"bound":"miss")},S=>{let N=S instanceof Te?S.code:"",V=ct[N];k(V!==void 0?c(V):e.t(fe(S,e.strings))),l("failed")}))},"captured"),h=p(C,{full:!0,kind:o==="intro"?"secondary":"primary",onClick:()=>i(!0),"data-testid":"sekyro-tester-gate-continue",children:c("testerGate.continueTest")});if(o==="capture")return p(K,{...n,onCaptured:d});if(o==="checking")return p(z,{tone:"brand",icon:"face",busy:!0,live:!0,title:c("testerGate.checking"),testId:"sekyro-tester-gate-checking"});if(o==="bound")return p(z,{tone:"success",icon:"success",title:c("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:p(C,{full:!0,onClick:()=>i(!1),children:c("testerGate.continue")}),children:p("p",{children:c("testerGate.boundBody")})});if(o==="miss"||o==="failed"){let b=it[y],S=o==="miss"&&(y==="retake"||r>0);return p(z,{tone:"warning",icon:"info",title:c(o==="miss"?b.title:"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:v(G,{children:[h,S?p(C,{full:!0,kind:"secondary",onClick:()=>l("capture"),"data-testid":"sekyro-tester-gate-retry",children:c("testerGate.retry")}):null]}),children:p("p",{children:o==="miss"?c(b.body):f})})}return v("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":s,"data-testid":"sekyro-tester-gate",children:[p(ye,{id:s,title:c("testerGate.title"),lead:c("testerGate.body")}),v(q,{children:[p(C,{full:!0,onClick:()=>l("capture"),disabled:u===void 0,"data-testid":"sekyro-tester-gate-start",children:c("testerGate.start")}),h]})]})}m(nn,"TesterGateView");export{$t as ContactChoiceView,Xt as DesktopHandoffView,Wt as EidContinueHint,qt as GenericChoiceView,Oe as HandoffView,jt as HumanConsentTerms,Qt as IdentitySummaryView,en as InAppBrowserPrompt,Ut as LaneChoiceView,Et as LaneSwitch,Kt as LivePhotoLiveness,Zt as NativeAppView,Jt as NoCameraView,Yt as PortraitRetakeNotice,tn as TesterGateAction,nn as TesterGateView,at as cameraHelpPlatform};
2
+ import{a as be,c as W,d as R,e as ve,f as we,g as Ae,h as Z}from"./chunk-P7QMLT56.js";import{a as z}from"./chunk-WIHBHY2K.js";import{f as Q,j as K}from"./chunk-SRQXICOI.js";import"./chunk-2SVN4T5I.js";import"./chunk-7MMT5M4E.js";import{a as ge,b as P,c as ke}from"./chunk-55NNQK5P.js";import{a as fe}from"./chunk-A7C3KQ7K.js";import{d as Y}from"./chunk-V3BQZTXH.js";import{a as $,b as ye,d as q,e as he,q as _}from"./chunk-OLU5EOHP.js";import"./chunk-TLYACCNO.js";import{a as I,s as H}from"./chunk-MDXA7C7O.js";import{a as m}from"./chunk-2KED7D2Q.js";import{HostedApiError as Te,laneOptionsFor as Be,queryCameraPermission as Ze}from"@sekyro/web";import{detectIsMobile as se}from"@sekyro/web/core";import{useEffect as L,useId as F,useMemo as x,useRef as E,useState as N}from"react";var Se={"consent.human.terms.intro":"تؤكد Sekyro AI أن شخصًا حقيقيًا يُجري هذه الخطوة، نيابةً عن الجهة التي طلبتها.","consent.human.terms.data":"تلتقط Sekyro AI تسجيلًا قصيرًا لوجهك.","consent.human.terms.processing":"يُفحص هذا التسجيل للتأكد من أنك شخص حقيقي وحاضر، وقد يُقارَن بالوجوه التي سبق التحقق منها لدى هذه الجهة.","consent.human.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.human.terms.retention":"تُخزَّن بياناتك مشفّرة ولا يُحتفظ بها إلا للمدة التي يقتضيها القانون وإعدادات الجهة. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع الجهة التي طلبت هذا التحقق.","capture.noCamera.title":"تتطلب هذه الخطوة كاميرا","capture.noCamera.body":"اسمح بالوصول إلى الكاميرا وحاول مرة أخرى، أو تابع على هاتف مزوّد بكاميرا.","capture.noCamera.continue":"المتابعة بدون كاميرا","capture.noCamera.deniedTitle":"اسمح بالوصول إلى الكاميرا","capture.noCamera.deniedBody":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","capture.noCamera.stepsChrome":"في Chrome، اضغط على الرمز الموجود بجانب العنوان، ثم الأذونات، وفعّل الكاميرا.","capture.noCamera.stepsSamsung":"في Samsung Internet، افتح القائمة، ثم الإعدادات، المواقع والتنزيلات، أذونات المواقع، الكاميرا، واسمح لهذا الموقع.","capture.noCamera.stepsSafari":"في Safari، اضغط على زر aA في شريط العنوان، ثم إعدادات موقع الويب، واضبط الكاميرا على السماح.","capture.noCamera.stepsDesktop":"انقر على الرمز الموجود بجانب العنوان واسمح بالكاميرا لهذا الموقع.","capture.noCamera.stepsSystem":"ما زالت محظورة؟ تحقق في إعدادات هاتفك من أن متصفحك مسموح له باستخدام الكاميرا.","capture.noCamera.stillBlocked":"ما زالت الكاميرا محظورة. اتبع الخطوات أعلاه ثم أعد المحاولة.","capture.noCamera.inAppTitle":"افتح هذه الصفحة في متصفحك","capture.noCamera.inAppBody":"لا يمكن لمتصفح هذا التطبيق استخدام الكاميرا. افتح الصفحة في Chrome أو Safari للمتابعة.","choice.title":"كيف تريد المتابعة؟","choice.description":"اختر خيارًا واحدًا.","choice.switch":"استخدم خيارًا آخر","contact.title":"كيف تريد استلام الرمز؟","contact.description":"اختر خيارًا واحدًا.","contact.phone":"عبر الهاتف (واتساب أو رسالة نصية)","contact.email":"عبر البريد الإلكتروني","contact.switch":"استخدم خيارًا آخر","summary.title":"تحقق من بياناتك","summary.description":"تأكد من أن هذه بياناتك قبل الصورة الحية.","summary.fullName":"الاسم الكامل","summary.birthDate":"تاريخ الميلاد","summary.nationality":"الجنسية","summary.documentType":"الوثيقة","summary.documentNumber":"رقم الوثيقة","summary.nni":"الرقم الوطني للتعريف الموريتاني (NNI)","summary.id_number":"رقم الهوية","summary.expiryDate":"تاريخ الانتهاء","summary.portraitAlt":"الصورة المسجلة","summary.source.registry":"من سجل الحالة المدنية","summary.source.document":"مقروءة من وثيقتك","summary.source.chip":"مقروءة من شريحة وثيقتك","summary.name":"الاسم","summary.birthYear":"سنة الميلاد","summary.confirm":"تأكيد ومتابعة","summary.retakeDocument":"مسح وثيقتي مرة أخرى","summary.retakeNationalNumber":"إدخال رقمي مرة أخرى","summary.noRetake":"لم يعد بإمكانك إعادة المحاولة. تواصل مع {org} إذا كانت هذه البيانات غير صحيحة","capture.tipsIcao.title":"لصورة الهوية:","capture.tipsIcao.glasses":"انزع نظارتك","capture.tipsIcao.headwear":"انزع القبعة. يُقبل غطاء الرأس الديني إذا كان الوجه ظاهرًا بالكامل","capture.tipsIcao.expression":"حافظ على تعبير محايد وفمك مغلق","capture.tipsIcao.faceCamera":"انظر مباشرة إلى الكاميرا وعيناك مفتوحتان","capture.tipsIcao.background":"قف أمام خلفية سادة فاتحة اللون","capture.tipsIcao.lighting":"استخدم إضاءة متساوية على وجهك: دون ظلال","capture.tipsIcao.hair":"أبعد شعرك عن وجهك وعينيك","capture.tipsIcao.summary":"قف أمام جدار سادة فاتح اللون مع إضاءة متساوية على وجهك. انزع نظارتك وأي قبعة. أبعد شعرك عن وجهك، وانظر مباشرة إلى الكاميرا وعيناك مفتوحتان، وحافظ على تعبير محايد وفمك مغلق، وابقَ ثابتًا.","portrait.retakeOnly":"نجح التحقق الحي. الصورة فقط تحتاج إلى محاولة أخرى","portrait.keepCamera":"ابقَ أمام الكاميرا","handoff.description":"امسح الرمز بهاتفك للمتابعة","handoff.qrAlt":"رمز QR يفتح عملية التحقق هذه على هاتفك","handoff.copyLink":"نسخ الرابط","handoff.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة من متصفحك بدلًا من ذلك","handoff.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة على هاتفك","inApp.title":"افتح الصفحة في متصفحك","inApp.description":"لا تعمل الكاميرا جيدًا داخل هذا التطبيق. افتح الرابط في Chrome أو Safari للمتابعة.","inApp.copyLink":"نسخ الرابط","inApp.copied":"تم نسخ الرابط. الصقه في متصفحك","inApp.copyFailed":"تعذّر نسخ الرابط. انسخ عنوان هذه الصفحة بدلًا من ذلك","inApp.continueAnyway":"المتابعة هنا على أي حال","needsApp.capture.title":"تابع في التطبيق","needsApp.capture.description":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org}.","needsApp.capture.descriptionSekyro":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org} أو في تطبيق Sekyro AI.","needsApp.capture.descriptionNoOrg":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في التطبيق الذي أُعطي لك.","needsApp.capture.descriptionNoOrgSekyro":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في تطبيق Sekyro AI.","needsApp.capture.openSekyro":"افتح في تطبيق Sekyro AI","needsApp.capture.getApp":"احصل على تطبيق Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"امسح الرمز بهاتفك لفتح هذا التحقق في التطبيق.","needsApp.capture.qrAlt":"رمز QR يفتح هذا التحقق في التطبيق","needsApp.capture.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة في التطبيق","inApp.openBrowser":"افتح في المتصفح","testerGate.action":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. إذا تطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة، فستُجري هذه الجلسة فحوصات حقيقية. وإلا فلن يُحتفظ بأي شيء وستتابع باستخدام بيانات الاختبار.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"لم يُحتفظ بأي شيء. يمكنك إعادة المحاولة أو المتابعة باستخدام بيانات الاختبار.","testerGate.retakeTitle":"تعذّر علينا التحقق من وجهك بوضوح","testerGate.retakeBody":"لم يُحتفظ بأي شيء، ولا تُحتسب هذه المحاولة. واجه الكاميرا في إضاءة جيدة، وابقَ ثابتًا، ثم أعد المحاولة.","testerGate.livenessTitle":"لم يتم تأكيد الوجه الحي","testerGate.livenessBody":"لم يُحتفظ بأي شيء. يمكنك إعادة المحاولة أو المتابعة باستخدام بيانات الاختبار.","testerGate.retry":"أعد المحاولة","testerGate.continueTest":"المتابعة باستخدام بيانات الاختبار","testerGate.continue":"متابعة","testerGate.limitBody":"تم بلوغ الحد اليومي للفحوصات الحقيقية للمختبِرين. تابع باستخدام بيانات الاختبار، أو أعد المحاولة غدًا.","testerGate.exhaustedBody":"لم تتبقَّ أي محاولة في هذه الجلسة. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة.","testerGate.closedBody":"لا يمكن بدء الفحوصات الحقيقية إلا قبل أول التقاط. تابع باستخدام بيانات الاختبار، أو ابدأ جلسة جديدة."};var M={"consent.human.terms.intro":"Sekyro AI confirms that a real person is completing this step, on behalf of the organization that asked for it.","consent.human.terms.data":"Sekyro AI collects a short capture of your face.","consent.human.terms.processing":"The capture is checked to confirm that you are a real person who is present. It may be compared with faces already verified for this organization.","consent.human.terms.sharing":"The organization that requested this verification learns its outcome.","consent.human.terms.retention":"Your data is stored encrypted and kept only as long as the law and the organization's settings require. To exercise your data-protection rights, contact the organization that requested this verification.","capture.noCamera.title":"This step needs a camera","capture.noCamera.body":"Allow camera access and try again, or continue on a phone with a camera.","capture.noCamera.continue":"Continue without a camera","capture.noCamera.deniedTitle":"Allow camera access","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","capture.noCamera.stepsChrome":"In Chrome, tap the icon to the left of the address, then Permissions, and turn on Camera.","capture.noCamera.stepsSamsung":"In Samsung Internet, open the menu, then Settings, Sites and downloads, Site permissions, Camera, and allow this site.","capture.noCamera.stepsSafari":"In Safari, tap the aA button in the address bar, then Website Settings, and set Camera to Allow.","capture.noCamera.stepsDesktop":"Click the icon to the left of the address and allow the camera for this site.","capture.noCamera.stepsSystem":"Still blocked? In your phone's settings, check that your browser may use the camera.","capture.noCamera.stillBlocked":"The camera is still blocked. Follow the steps above, then try again.","capture.noCamera.inAppTitle":"Open this page in your browser","capture.noCamera.inAppBody":"This app's browser can't use your camera. Open the page in Chrome or Safari to continue.","choice.title":"Choose how to continue","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"Where to send your code","contact.description":"Choose one option.","contact.phone":"By phone (WhatsApp or SMS)","contact.email":"By email","contact.switch":"Use another option","summary.title":"Check your details","summary.description":"Make sure this is you before the live photo.","summary.fullName":"Full name","summary.birthDate":"Date of birth","summary.nationality":"Nationality","summary.documentType":"Document","summary.documentNumber":"Document number","summary.nni":"Mauritanian national ID number (NNI)","summary.id_number":"ID number","summary.expiryDate":"Expiry date","summary.portraitAlt":"Photo on record","summary.source.registry":"From the civil registry","summary.source.document":"Read from your document","summary.source.chip":"Read from your document's chip","summary.name":"Name","summary.birthYear":"Year of birth","summary.confirm":"Confirm and continue","summary.retakeDocument":"Scan my document again","summary.retakeNationalNumber":"Enter my number again","summary.noRetake":"You can't try again. Contact {org} if these details are wrong","capture.tipsIcao.title":"For your ID photo:","capture.tipsIcao.glasses":"Remove your glasses","capture.tipsIcao.headwear":"Remove hats and caps. A religious head covering is fine if your whole face shows","capture.tipsIcao.expression":"Keep a neutral expression with your mouth closed","capture.tipsIcao.faceCamera":"Look straight at the camera with your eyes open","capture.tipsIcao.background":"Stand in front of a plain, light background","capture.tipsIcao.lighting":"Use even light on your face: no shadows","capture.tipsIcao.hair":"Keep your hair away from your face and eyes","capture.tipsIcao.summary":"Stand in front of a plain, light wall with even light on your face. Remove your glasses and any hat. Keep your hair off your face, look straight at the camera with your eyes open, keep a neutral expression with your mouth closed, and hold still.","portrait.retakeOnly":"Your live check passed. Only the photo needs another try","portrait.keepCamera":"Stay in front of the camera","handoff.description":"Scan with your phone to continue","handoff.qrAlt":"QR code that opens this verification on your phone","handoff.copyLink":"Copy link","handoff.copyFailed":"We couldn't copy the link. Copy this page's address from your browser instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open in your browser","inApp.description":"The camera doesn't work well inside this app. Open the link in Chrome or Safari to continue.","inApp.copyLink":"Copy link","inApp.copied":"Link copied. Paste it in your browser","inApp.copyFailed":"We couldn't copy the link. Copy this page's address instead","inApp.continueAnyway":"Continue here anyway","needsApp.capture.title":"Continue in the app","needsApp.capture.description":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app.","needsApp.capture.descriptionSekyro":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app or in the Sekyro AI app.","needsApp.capture.descriptionNoOrg":"This verification takes the photos in a mobile app. Open it in the app you were given.","needsApp.capture.descriptionNoOrgSekyro":"This verification takes the photos in a mobile app. Open it in the Sekyro AI app.","needsApp.capture.openSekyro":"Open in the Sekyro AI app","needsApp.capture.getApp":"Get the Sekyro AI app","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scan with your phone to open this verification in the app.","needsApp.capture.qrAlt":"QR code that opens this verification in the app","needsApp.capture.waiting":"This page moves on when you finish in the app","inApp.openBrowser":"Open in browser","testerGate.action":"Run real checks as a tester","testerGate.title":"Run real checks as a tester","testerGate.body":"Look at the camera. If your face matches one of the organization's enrolled testers, this session runs real checks. If not, nothing is kept and you continue with test data.","testerGate.start":"Start","testerGate.checking":"Checking your face","testerGate.boundTitle":"Real checks are on","testerGate.boundBody":"You were recognised as an enrolled tester. The next steps run real checks.","testerGate.missTitle":"No enrolled tester matched","testerGate.missBody":"Nothing was kept. You can try again or continue with test data.","testerGate.retakeTitle":"We couldn't check your face clearly","testerGate.retakeBody":"Nothing was kept, and this try doesn't count. Face the camera in good light, keep still, and try again.","testerGate.livenessTitle":"Live face not confirmed","testerGate.livenessBody":"Nothing was kept. You can try again or continue with test data.","testerGate.retry":"Try again","testerGate.continueTest":"Continue with test data","testerGate.continue":"Continue","testerGate.limitBody":"Today's limit of real checks for testers is reached. Continue with test data, or try again tomorrow.","testerGate.exhaustedBody":"No tries are left on this session. Continue with test data, or start a new session.","testerGate.closedBody":"Real checks can start only before the first capture. Continue with test data, or start a new session."};var Ce={"consent.human.terms.intro":"Sekyro AI confirme qu'une personne réelle effectue cette étape, pour le compte de l'organisme qui l'a demandée.","consent.human.terms.data":"Sekyro AI recueille une courte capture de votre visage.","consent.human.terms.processing":"La capture est analysée pour confirmer que vous êtes une personne réelle et présente. Elle peut être comparée aux visages déjà vérifiés pour cet organisme.","consent.human.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.human.terms.retention":"Vos données sont stockées chiffrées et conservées uniquement pendant la durée exigée par la loi et les paramètres de l'organisme. Pour exercer vos droits en matière de protection des données, contactez l'organisme qui a demandé cette vérification.","capture.noCamera.title":"Une caméra est nécessaire","capture.noCamera.body":"Autorisez l'accès à la caméra et réessayez, ou continuez sur un téléphone équipé d'une caméra.","capture.noCamera.continue":"Continuer sans caméra","capture.noCamera.deniedTitle":"Autorisez la caméra","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","capture.noCamera.stepsChrome":"Dans Chrome, touchez l'icône à gauche de l'adresse, puis Autorisations, et activez Caméra.","capture.noCamera.stepsSamsung":"Dans Samsung Internet, ouvrez le menu, puis Paramètres, Sites et téléchargements, Autorisations des sites, Appareil photo, et autorisez ce site.","capture.noCamera.stepsSafari":"Dans Safari, touchez le bouton aA de la barre d'adresse, puis Réglages du site web, et réglez Caméra sur Autoriser.","capture.noCamera.stepsDesktop":"Cliquez sur l'icône à gauche de l'adresse et autorisez la caméra pour ce site.","capture.noCamera.stepsSystem":"Toujours bloquée ? Dans les réglages du téléphone, vérifiez que votre navigateur peut utiliser la caméra.","capture.noCamera.stillBlocked":"La caméra est toujours bloquée. Suivez les étapes ci-dessus, puis réessayez.","capture.noCamera.inAppTitle":"Ouvrez cette page dans votre navigateur","capture.noCamera.inAppBody":"Le navigateur de cette application ne peut pas utiliser votre caméra. Ouvrez la page dans Chrome ou Safari pour continuer.","choice.title":"Comment continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Où envoyer votre code ?","contact.description":"Choisissez une option.","contact.phone":"Par téléphone (WhatsApp ou SMS)","contact.email":"Par e-mail","contact.switch":"Utiliser une autre option","summary.title":"Vérifiez vos informations","summary.description":"Assurez-vous qu'il s'agit bien de vous avant la photo en direct.","summary.fullName":"Nom complet","summary.birthDate":"Date de naissance","summary.nationality":"Nationalité","summary.documentType":"Document","summary.documentNumber":"Numéro du document","summary.nni":"Numéro national d'identification mauritanien (NNI)","summary.id_number":"Numéro d'identité","summary.expiryDate":"Date d'expiration","summary.portraitAlt":"Photo enregistrée","summary.source.registry":"Issu de l'état civil","summary.source.document":"Lu sur votre document","summary.source.chip":"Lu sur la puce de votre document","summary.name":"Nom","summary.birthYear":"Année de naissance","summary.confirm":"Confirmer et continuer","summary.retakeDocument":"Scanner à nouveau mon document","summary.retakeNationalNumber":"Saisir à nouveau mon numéro","summary.noRetake":"Vous ne pouvez plus réessayer. Contactez {org} si ces informations sont incorrectes","capture.tipsIcao.title":"Pour votre photo d'identité :","capture.tipsIcao.glasses":"Retirez vos lunettes","capture.tipsIcao.headwear":"Retirez chapeau et casquette. Un couvre-chef religieux est accepté si tout le visage est visible","capture.tipsIcao.expression":"Gardez une expression neutre, la bouche fermée","capture.tipsIcao.faceCamera":"Regardez la caméra bien en face, les yeux ouverts","capture.tipsIcao.background":"Placez-vous devant un fond uni et clair","capture.tipsIcao.lighting":"Éclairez votre visage de façon uniforme : sans ombres","capture.tipsIcao.hair":"Dégagez vos cheveux du visage et des yeux","capture.tipsIcao.summary":"Placez-vous devant un mur uni et clair, le visage éclairé de façon uniforme. Retirez vos lunettes et tout chapeau. Dégagez vos cheveux du visage, regardez la caméra bien en face, les yeux ouverts, gardez une expression neutre, la bouche fermée, et ne bougez plus.","portrait.retakeOnly":"Votre vérification en direct est validée. Seule la photo est à refaire","portrait.keepCamera":"Restez face à la caméra","handoff.description":"Scannez avec votre téléphone pour continuer","handoff.qrAlt":"Code QR qui ouvre cette vérification sur votre téléphone","handoff.copyLink":"Copier le lien","handoff.copyFailed":"Nous n'avons pas pu copier le lien. Copiez plutôt l'adresse de cette page depuis votre navigateur","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez dans le navigateur","inApp.description":"La caméra fonctionne mal dans cette application. Ouvrez le lien dans Chrome ou Safari pour continuer.","inApp.copyLink":"Copier le lien","inApp.copied":"Lien copié. Collez-le dans votre navigateur","inApp.copyFailed":"Impossible de copier le lien. Copiez plutôt l'adresse de cette page","inApp.continueAnyway":"Continuer ici quand même","needsApp.capture.title":"Continuez dans l’application","needsApp.capture.description":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org}.","needsApp.capture.descriptionSekyro":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org} ou dans l’application Sekyro AI.","needsApp.capture.descriptionNoOrg":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application que l’on vous a indiquée.","needsApp.capture.descriptionNoOrgSekyro":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application Sekyro AI.","needsApp.capture.openSekyro":"Ouvrir dans l’application Sekyro AI","needsApp.capture.getApp":"Obtenir l’application Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scannez avec votre téléphone pour ouvrir cette vérification dans l’application.","needsApp.capture.qrAlt":"QR code qui ouvre cette vérification dans l’application","needsApp.capture.waiting":"Cette page avancera d’elle-même une fois l’étape terminée dans l’application","inApp.openBrowser":"Ouvrir dans le navigateur","testerGate.action":"Lancer de vrais contrôles en tant que testeur","testerGate.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Si votre visage correspond à l'un des testeurs inscrits de l'organisation, cette session lance de vrais contrôles. Sinon, rien n'est conservé et vous continuez avec des données de test.","testerGate.start":"Commencer","testerGate.checking":"Vérification de votre visage","testerGate.boundTitle":"Les vrais contrôles sont activés","testerGate.boundBody":"Vous avez été reconnu comme testeur inscrit. Les étapes suivantes lancent de vrais contrôles.","testerGate.missTitle":"Aucun testeur inscrit ne correspond","testerGate.missBody":"Rien n'a été conservé. Vous pouvez réessayer ou continuer avec des données de test.","testerGate.retakeTitle":"Nous n'avons pas pu vérifier votre visage clairement","testerGate.retakeBody":"Rien n'a été conservé et cet essai ne compte pas. Placez-vous face à la caméra, dans un endroit bien éclairé, restez immobile et réessayez.","testerGate.livenessTitle":"Visage en direct non confirmé","testerGate.livenessBody":"Rien n'a été conservé. Vous pouvez réessayer ou continuer avec des données de test.","testerGate.retry":"Réessayer","testerGate.continueTest":"Continuer avec des données de test","testerGate.continue":"Continuer","testerGate.limitBody":"La limite de vrais contrôles pour les testeurs est atteinte pour aujourd'hui. Continuez avec des données de test, ou réessayez demain.","testerGate.exhaustedBody":"Il ne reste plus d'essai sur cette session. Continuez avec des données de test, ou lancez une nouvelle session.","testerGate.closedBody":"Les vrais contrôles ne peuvent commencer qu'avant la première capture. Continuez avec des données de test, ou lancez une nouvelle session."};var xe={M:{perBlock:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26],blocks:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16],formatBits:0},H:{perBlock:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28],blocks:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25],formatBits:2}},Ie=20;function Fe(e){let t=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}m(Fe,"rawDataModules");function Ne(e,t){let{perBlock:r,blocks:n}=xe[t],a=r[e-1],i=n[e-1],c=Math.floor(Fe(e)/8),s=i-c%i,o=Math.floor(c/i)-a;return[a,s===i?[[i,o]]:[[s,o],[i-s,o+1]]]}m(Ne,"blockLayout");var j=m((e,t)=>Ne(e,t)[1].reduce((r,[n,a])=>r+n*a,0),"dataCapacity");function X(e,t){let r=0;for(let n=7;n>=0;n-=1)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r&255}m(X,"gfMul");function Ve(e){let t=new Array(e).fill(0);t[e-1]=1;let r=1;for(let n=0;n<e;n+=1){for(let a=0;a<e;a+=1)t[a]=X(t[a],r),a+1<e&&(t[a]=t[a]^t[a+1]);r=X(r,2)}return t}m(Ve,"rsDivisor");function De(e,t){let r=t.map(()=>0);for(let n of e){let a=n^r.shift();r.push(0),t.forEach((i,c)=>{r[c]=r[c]^X(i,a)})}return r}m(De,"rsRemainder");function He(e,t,r){let n=[],a=m((l,d)=>{for(let h=d-1;h>=0;h-=1)n.push(l>>>h&1)},"put");a(4,4),a(e.length,t<10?8:16);for(let l of e)a(l,8);let i=j(t,r)*8;a(0,Math.min(4,i-n.length)),a(0,(8-n.length%8)%8);let c=[];for(let l=0;l<n.length;l+=8)c.push(n.slice(l,l+8).reduce((d,h)=>d<<1|h,0));for(let l=236;c.length<j(t,r);l^=253)c.push(l);let[s,o]=Ne(t,r),p=Ve(s),f=[],k=0;for(let[l,d]of o)for(let h=0;h<l;h+=1){let v=c.slice(k,k+d);k+=d,f.push({data:v,ec:De(v,p)})}let y=[],g=Math.max(...f.map(l=>l.data.length));for(let l=0;l<g;l+=1)for(let d of f)l<d.data.length&&y.push(d.data[l]);for(let l=0;l<s;l+=1)for(let d of f)y.push(d.ec[l]);return y}m(He,"codewords");function ze(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=Math.ceil((e*4+4)/(t*2-2))*2,n=[6];for(let a=e*4+10;n.length<t;a-=r)n.splice(1,0,a);return n}m(ze,"alignmentPositions");var $e=[(e,t)=>(e+t)%2===0,e=>e%2===0,(e,t)=>t%3===0,(e,t)=>(e+t)%3===0,(e,t)=>(Math.floor(e/2)+Math.floor(t/3))%2===0,(e,t)=>e*t%2+e*t%3===0,(e,t)=>(e*t%2+e*t%3)%2===0,(e,t)=>((e+t)%2+e*t%3)%2===0],oe=class oe{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,r,n){this.dark[t*this.size+r]=n,this.fixed[t*this.size+r]=!0}get(t,r){return this.dark[t*this.size+r]===!0}};m(oe,"Grid");var J=oe;function qe(e,t){let r=e.size;for(let i=0;i<r;i+=1)e.set(6,i,i%2===0),e.set(i,6,i%2===0);for(let[i,c]of[[3,3],[3,r-4],[r-4,3]])for(let s=-4;s<=4;s+=1)for(let o=-4;o<=4;o+=1){let p=i+s,f=c+o;if(p<0||p>=r||f<0||f>=r)continue;let k=Math.max(Math.abs(s),Math.abs(o));e.set(p,f,k!==2&&k!==4)}let n=ze(t),a=n.length-1;if(n.forEach((i,c)=>n.forEach((s,o)=>{if(!(c===0&&o===0||c===0&&o===a||c===a&&o===0))for(let p=-2;p<=2;p+=1)for(let f=-2;f<=2;f+=1)e.set(i+p,s+f,Math.max(Math.abs(p),Math.abs(f))!==1)})),Ge(e,0),t>=7){let i=t;for(let s=0;s<12;s+=1)i=i<<1^(i>>>11)*7973;let c=t<<12|i;for(let s=0;s<18;s+=1){let o=(c>>>s&1)===1,p=r-11+s%3,f=Math.floor(s/3);e.set(p,f,o),e.set(f,p,o)}}}m(qe,"drawFunctionPatterns");function Ge(e,t,r=0){let n=e.size,a=r<<3|t,i=a;for(let o=0;o<10;o+=1)i=i<<1^(i>>>9)*1335;let c=(a<<10|i)^21522,s=m(o=>(c>>>o&1)===1,"bit");for(let o=0;o<=5;o+=1)e.set(o,8,s(o));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let o=9;o<15;o+=1)e.set(8,14-o,s(o));for(let o=0;o<8;o+=1)e.set(8,n-1-o,s(o));for(let o=8;o<15;o+=1)e.set(n-15+o,8,s(o));e.set(n-8,8,!0)}m(Ge,"drawFormat");function Ee(e,t){let r=e.size,n=0;for(let a=r-1;a>=1;a-=2){a===6&&(a=5);for(let i=0;i<r;i+=1)for(let c=0;c<2;c+=1){let s=a-c,p=(a+1&2)===0?r-1-i:i;e.fixed[p*r+s]!==!0&&(n<t.length*8&&(e.dark[p*r+s]=(t[n>>>3]>>>7-(n&7)&1)===1),n+=1)}}}m(Ee,"placeData");function Ue(e,t){let r=$e[t];for(let n=0;n<e.size;n+=1)for(let a=0;a<e.size;a+=1)e.fixed[n*e.size+a]!==!0&&r(n,a)&&(e.dark[n*e.size+a]=!e.dark[n*e.size+a])}m(Ue,"applyMask");function Qe(e){let t=e.size,r=0,n=m(i=>{let c=1;for(let s=1;s<=t;s+=1)s<t&&i(s)===i(s-1)?c+=1:(c>=5&&(r+=3+(c-5)),c=1);for(let s=0;s+10<t;s+=1){let o=[!0,!1,!0,!0,!0,!1,!0];if(!(o.every((y,g)=>i(s+g)===y)||o.every((y,g)=>i(s+4+g)===y)))continue;let f=[0,1,2,3].every(y=>!i(s+y))&&o.every((y,g)=>i(s+4+g)===y),k=o.every((y,g)=>i(s+g)===y)&&[7,8,9,10].every(y=>!i(s+y));f&&(r+=40),k&&(r+=40)}},"line");for(let i=0;i<t;i+=1)n(c=>e.get(i,c));for(let i=0;i<t;i+=1)n(c=>e.get(c,i));for(let i=0;i+1<t;i+=1)for(let c=0;c+1<t;c+=1){let s=e.get(i,c);s===e.get(i,c+1)&&s===e.get(i+1,c)&&s===e.get(i+1,c+1)&&(r+=3)}let a=e.dark.filter(Boolean).length;return r+=Math.floor(Math.abs(a*20-t*t*10)/(t*t))*10,r}m(Qe,"penalty");function ee(e,t={}){let r=t.ecl??"M",n=new TextEncoder().encode(e),a=1;for(;a<=Ie&&!(4+(a<10?8:16)+n.length*8<=j(a,r)*8);a+=1);if(a>Ie)throw new RangeError("text too long for a QR code");let i=He(n,a,r),c=m(p=>{let f=new J(a*4+17);return qe(f,a),Ee(f,i),Ue(f,p),Ge(f,p,xe[r].formatBits),f},"build"),s=null;if(t.mask!==void 0)s=c(t.mask);else{let p=Number.POSITIVE_INFINITY;for(let f=0;f<8;f+=1){let k=c(f),y=Qe(k);y<p&&(p=y,s=k)}}let o=s;return{size:o.size,get:m((p,f)=>o.get(p,f),"get")}}m(ee,"encodeQr");var te={viewBox:"0 0 100 100",d:"M22.37,0H77.63A22.37,22.37 0 0 1 100,22.37V77.63A22.37,22.37 0 0 1 77.63,100H22.37A22.37,22.37 0 0 1 0,77.63V22.37A22.37,22.37 0 0 1 22.37,0ZM48.067,21H38.308A17.308,17.308 0 0 0 21,38.308V42.543A19.886,19.886 0 0 0 40.886,62.429H60.219V57.641A4.419,4.419 0 0 0 55.8,53.222H43.463A11.416,11.416 0 0 1 32.048,41.806V38.308A8.102,8.102 0 0 1 40.149,30.206H43.648A4.419,4.419 0 0 0 48.067,25.787ZM38.676,79H59.114A19.886,19.886 0 0 0 79,59.114V57.457A19.886,19.886 0 0 0 59.114,37.571H38.676V42.359A4.419,4.419 0 0 0 43.095,46.778H56.537A11.416,11.416 0 0 1 67.952,58.194V58.378A11.416,11.416 0 0 1 56.537,69.794H43.095A4.419,4.419 0 0 0 38.676,74.213ZM51.933,21H79V37.571H69.794V30.206H51.933ZM21,71.543A7.457,7.457 0 1 0 35.914,71.543A7.457,7.457 0 1 0 21,71.543Z"},O=.42,Ke=.2,w=m(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function T(e,t,r,n){let a=`A${w(n)} ${w(n)} 0 0 1 `;return`M${w(e+n)} ${w(t)}H${w(e+r-n)}${a}${w(e+r)} ${w(t+n)}V${w(t+r-n)}${a}${w(e+r-n)} ${w(t+r)}H${w(e+n)}${a}${w(e)} ${w(t+r-n)}V${w(t+n)}${a}${w(e+n)} ${w(t)}Z`}m(T,"roundedSquare");function Ye(e){let t=(e-17)/4,r=ze(t),n=r.length-1,a=[];return r.forEach((i,c)=>r.forEach((s,o)=>{c===0&&o===0||c===0&&o===n||c===n&&o===0||a.push([i,s])})),a}m(Ye,"alignmentCentres");function ne(e,{quiet:t=4,logo:r=!1}={}){let n=e.size,a=m((l,d)=>l<7&&d<7||l<7&&d>=n-7||l>=n-7&&d<7,"isFinder"),i=Math.floor(n*Ke),c=r?i%2===0?i-1:i:0,s=(n-c)/2,o=m((l,d)=>c>0&&l>=s&&l<s+c&&d>=s&&d<s+c,"inZone"),p=Ye(n).filter(([l,d])=>!o(l,d)),f=m((l,d)=>p.some(([h,v])=>Math.abs(l-h)<=2&&Math.abs(d-v)<=2),"isAlign"),k=`a${w(O)} ${w(O)} 0 1 0 `,y="";for(let l=0;l<n;l+=1)for(let d=0;d<n;d+=1)!e.get(l,d)||a(l,d)||f(l,d)||o(l,d)||(y+=`M${w(d+t+.5-O)} ${w(l+t+.5)}${k}${w(2*O)} 0${k}${w(-2*O)} 0Z`);let g="";for(let[l,d]of[[0,0],[0,n-7],[n-7,0]]){let h=d+t,v=l+t;g+=T(h,v,7,1.6)+T(h+1,v+1,5,.6)+T(h+2,v+2,3,.6)}for(let[l,d]of p){let h=d-2+t,v=l-2+t;g+=T(h,v,5,1.2)+T(h+1,v+1,3,.5)+T(h+2,v+2,1,.5)}return{size:n+t*2,dots:y,finders:g,logo:c>0?{x:s+t+.5,y:s+t+.5,size:c-1}:null}}m(ne,"styledQr");function re(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${w(e.x)} ${w(e.y)}) scale(${t})`}m(re,"qrLogoTransform");import{useContext as We}from"react";function ae(e){let t=We(he);return e.kind!=="document"?{issuer:void 0,listed:[]}:{issuer:e.issuer??t.issuer,listed:t.listed}}m(ae,"useLaneIssuer");import{Fragment as G,jsx as u,jsxs as b}from"react/jsx-runtime";var je={en:M,fr:Ce,ar:Se,es:M,pt:M,de:M},Pe={en:P,fr:ke,ar:ge,es:P,pt:P,de:P};function C(e){let t=e.strings;return(r,n)=>Y(t[r]??je[e.locale][r]??"",n)}m(C,"flowT");function Re(e,t){let r=C(t);return e.flatMap(n=>{let a=n.service==="phone_otp"?r("contact.phone"):n.service==="email_otp"?r("contact.email"):W(n,t),i=be[n.service];return a===null?[]:[{id:n.id,label:a,...i!==void 0?{glyph:u($,{name:i})}:{}}]})}m(Re,"labelled");function Me({step:e,i18n:t,onError:r}){let n=C(t),{busy:a,error:i,run:c}=R(t,r),s=e.kind==="contact_choice";return u(Q,{title:n(s?"contact.title":"choice.title"),description:n(s?"contact.description":"choice.description"),options:Re(e.choice.options,t),busy:a,error:i,focus:!0,testId:s?"sekyro-contact-choice":"sekyro-choice",onChoose:o=>c(()=>e.choose(o))})}m(Me,"PlanChoiceView");var $t=Me,qt=Me;function Et({step:e,i18n:t,onError:r,onOpen:n}){let a=C(t),{busy:i,error:c,run:s}=R(t,r),o=e,p=e.context.switchable,{issuer:f,listed:k}=ae(e),y=p===void 0?[]:Be(p,f).switchTo.filter(A=>!k.includes(A.id)),g=o.kind==="registry"&&(o.reason==="nni_not_found"||o.reason==="registry_record_not_found")&&o.canUseDocument||o.kind==="eid"&&o.reason?.startsWith("eid_")&&o.canUseCamera,l=y.length===1?y[0]:void 0,d=l!==void 0&&(l.service==="phone_otp"||l.service==="email_otp"),h=d&&o.canSwitch&&o.switchTo!==void 0?()=>o.switchTo.call(e):o.chooseOption===void 0||l===void 0?void 0:()=>o.chooseOption.call(e,l.id);if(y.length===0||g||l!==void 0&&(h===void 0||v()===null)||l===void 0&&o.chooseOption===void 0)return null;function v(){return l===void 0?a("choice.switch"):l.service==="phone_otp"||l.service==="email_otp"?a("contact.switch"):o.kind==="registry"&&l.service==="document"?t.t("population.useDocument"):o.kind==="eid"?t.strings["eid.useCamera"]??Pe[t.locale]["eid.useCamera"]:W(l,t)}return m(v,"labelOf"),b("div",{className:"sekyro-stack sekyro-stack--1",children:[c!==null?u(_,{tone:"danger",children:u("span",{children:c})}):null,u(I,{kind:"secondary",disabled:i,"aria-busy":i||void 0,onClick:()=>h===void 0?n():s(h),"data-testid":d?"sekyro-contact-switch":"sekyro-lane-switch",children:v()})]})}m(Et,"LaneSwitch");function Ut({step:e,i18n:t,onError:r,onClose:n}){let a=C(t),{busy:i,error:c,run:s}=R(t,r),o=e.context.switchable,p=e.chooseOption,{issuer:f}=ae(e);if(o===void 0||p===void 0)return null;let k=new Set(Be(o,f).switchTo.map(y=>y.id));return u(Q,{title:a("choice.title"),description:a("choice.description"),options:Re(o.options.filter(y=>y.id===o.current||k.has(y.id)),t),...o.current!==null?{marked:o.current}:{},busy:i,error:c,focus:!0,testId:"sekyro-lane-choice",onChoose:y=>y===o.current?n():s(()=>p.call(e,y))})}m(Ut,"LaneChoiceView");var Xe=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["idNumberMasked","summary.id_number",!0],["expiryDate","summary.expiryDate",!0]];function Je(e){let[t,r]=N(null);return L(()=>{if(!e.portraitAvailable)return;let n=!0,a=null;return e.portrait().then(i=>{!n||i===null||!i.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(a=URL.createObjectURL(i),r(a))}),()=>{n=!1,a!==null&&URL.revokeObjectURL(a)}},[e.portraitAvailable]),t}m(Je,"usePortraitUrl");var et=m(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function tt(e,t){try{return new Intl.DateTimeFormat(t==="ar"?"ar-u-nu-latn":t,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))}catch{return e}}m(tt,"formatDate");function Qt({step:e,i18n:t,onError:r}){let n=C(t),a=F(),i=H(),c=Je(e),{busy:s,error:o,run:p}=R(t,r),f=e.context.orgName,k=["registry","document","chip"].find(h=>h===e.source),y=e.summaryKind==="partial",g=e.fullNameAr,l=t.locale==="ar"?g??e.fullName:e.fullName??g,d=m(h=>t.strings[`doc.type.${h}`]??h,"documentLabel");return b("section",{className:"sekyro-step","aria-labelledby":a,"data-testid":"sekyro-identity-summary",children:[b("div",{className:"sekyro-heading",children:[u("h2",{id:a,ref:i,tabIndex:-1,className:"sekyro-text-body",children:n("summary.title")}),u("p",{className:"sekyro-text-muted",children:n("summary.description")})]}),k!==void 0?u("p",{className:"sekyro-summary__source",children:n(`summary.source.${k}`)}):null,b("div",{className:"sekyro-summary",children:[c!==null?u("img",{className:"sekyro-summary__portrait",src:c,alt:n("summary.portraitAlt")}):null,u("dl",{className:"sekyro-summary__list",children:Xe.map(([h,v,A])=>{let S=h==="idNumberMasked"?e.idNumberMasked??e.nniMasked:h==="fullName"?l:e[h];return S===void 0?null:b("div",{className:"sekyro-summary__row",children:[u("dt",{className:"sekyro-text-muted",children:n(h==="fullName"&&y?"summary.name":v)}),u("dd",{children:et(S)?tt(S,t.locale):A||S===g?u("bdi",{dir:A?"ltr":"rtl",children:S}):h==="documentType"?d(S):S})]},h)})})]}),o!==null?u(_,{tone:"danger",children:u("span",{children:o})}):null,e.retakeAvailable?null:u("p",{className:"sekyro-text-muted",children:n("summary.noRetake",{org:f})}),b(q,{children:[u(I,{full:!0,disabled:s,"aria-busy":s||void 0,onClick:()=>p(()=>e.confirm()),children:n("summary.confirm")}),e.retakeAvailable?u(I,{kind:"secondary",full:!0,disabled:s,onClick:()=>p(()=>e.retake()),children:n(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}m(Qt,"IdentitySummaryView");var nt=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Kt({step:e,i18n:t,livenessProps:r,sekyroIntro:n}){let a=C(t),[i,c]=N(null);L(()=>e.onLivePhoto(d=>{let h=d.update?.coach;c(d.holding||h===void 0?null:t.t(`portrait.coach.${h}`))}),[e,t]);let s=e.instructions==="icao",o=x(()=>ve(e),[e]),p=e.icao?.profile==="selfie",f=x(()=>s?nt.filter(d=>!p||d!=="background").map(d=>({id:d,text:a(`capture.tipsIcao.${d}`)})):void 0,[s,p,t]),k=x(()=>s&&!p?{...r.strings,"capture.tips.title":a("capture.tipsIcao.title")}:r.strings,[s,p,r.strings,t]),y=p?void 0:a("capture.tipsIcao.title"),g=x(()=>n===!0&&f!==void 0?{...r.slots,intro:m((d,h)=>u(we,{start:d,context:h,tips:f,...y!==void 0?{tipsTitle:y}:{},...o!==void 0?{retry:o}:{}}),"intro")}:r.slots,[n,f,y,o,r.slots,t]),l=p?`${(f??[]).map(d=>d.text).join(". ")}.`:a("capture.tipsIcao.summary");return u(K,{...r,...g!==void 0?{slots:g}:{},...k!==void 0?{strings:k}:{},...f!==void 0?{tips:f,tipsSummary:l}:{},coach:i})}m(Kt,"LivePhotoLiveness");function Yt({i18n:e}){let t=C(e);return b(_,{tone:"info",children:[u("strong",{children:t("portrait.retakeOnly")}),u("span",{children:t("portrait.keepCamera")})]})}m(Yt,"PortraitRetakeNotice");function Wt({i18n:e,provider:t}){let r=e.strings,n=m(a=>r[a]??Pe[e.locale][a]??"","pick");return u("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?Y(n("eid.continueHint"),{provider:t}):n("eid.continueHintGeneric")})}m(Wt,"EidContinueHint");async function rt(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(rt,"copy");function ie({url:e,i18n:t,label:r,primary:n}){let a=C(t),[i,c]=N("idle"),s=r.startsWith("inApp.")?"inApp":"handoff";return b("div",{className:"sekyro-stack sekyro-stack--1",children:[u(I,{kind:n?"primary":"secondary",full:!0,onClick:()=>{rt(e).then(o=>c(o?"copied":"failed"))},children:a(r)}),u("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:i==="idle"?"":a(`${s}.${i==="copied"?"copied":"copyFailed"}`)})]})}m(ie,"CopyLink");function Oe({url:e,i18n:t,refresh:r,footer:n,lead:a}){let i=C(t),c=F(),s=x(()=>{try{return ne(ee(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]),o=E(r);o.current=r;let p=H();return L(()=>{let f=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&o.current?.().catch(()=>{})},5e3);return()=>clearInterval(f)},[]),b("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":c,"data-testid":"sekyro-handoff",children:[b("div",{className:"sekyro-heading",children:[u("h2",{id:c,ref:p,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),a!==void 0?u("p",{children:a}):null,u("p",{className:"sekyro-text-muted",children:i("handoff.description")})]}),s!==null?b("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":i("handoff.qrAlt"),children:[u("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),u("path",{d:s.dots,className:"sekyro-qr__fg"}),u("path",{d:s.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),s.logo!==null?u("path",{d:te.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(s.logo),"data-qr-mark":""}):null]}):null,b("p",{className:"sekyro-handoff__waiting",role:"status",children:[u("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),i("handoff.waiting")]}),b(q,{children:[u(ie,{url:e,i18n:t,label:"handoff.copyLink"}),n??null]})]})}m(Oe,"HandoffView");var _e={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function Zt({i18n:e,org:t,nativeApp:r,fallbackUrl:n,refresh:a,footer:i}){let c=C(e),s=x(()=>!se(),[]),o=r.link??n,p=x(()=>{if(!s||o===void 0||o==="")return null;try{return ne(ee(o,{ecl:"H"}),{logo:!0})}catch{return null}},[s,o]),f=E(a);f.current=a,L(()=>{let h=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&f.current?.().catch(()=>{})},5e3);return()=>clearInterval(h)},[]);let[k,y]=N(!1),g=m(()=>{a!==void 0&&(y(!0),a().catch(()=>{}).finally(()=>y(!1)))},"again"),l=r.sekyroApp,d=t!==""?c(l?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):c(l?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return b(z,{tone:"brand",icon:"smartphone",title:c("needsApp.capture.title"),testId:"sekyro-native-app",actions:b(G,{children:[!s&&l&&r.sekyroAppLink!==void 0?u("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:r.sekyroAppLink,"data-testid":"sekyro-open-sekyro-app",children:c("needsApp.capture.openSekyro")}):null,a!==void 0?u(I,{kind:"secondary",full:!0,disabled:k,onClick:g,children:e.t("common.refresh")}):null,i??null]}),children:[u("p",{children:d}),p!==null?b(G,{children:[b("svg",{className:"sekyro-qr",viewBox:`0 0 ${p.size} ${p.size}`,role:"img","aria-label":c("needsApp.capture.qrAlt"),children:[u("rect",{width:p.size,height:p.size,className:"sekyro-qr__bg"}),u("path",{d:p.dots,className:"sekyro-qr__fg"}),u("path",{d:p.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),p.logo!==null?u("path",{d:te.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(p.logo),"data-qr-mark":""}):null]}),u("p",{className:"sekyro-text-muted",children:c("needsApp.capture.scan")})]}):null,l?b("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[c("needsApp.capture.getApp")," ",u("a",{href:_e.appStore,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.appStore")})," · ",u("a",{href:_e.googlePlay,target:"_blank",rel:"noopener noreferrer",children:c("needsApp.capture.googlePlay")})]}):null,b("p",{className:"sekyro-handoff__waiting",role:"status",children:[u("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),c("needsApp.capture.waiting")]})]})}m(Zt,"NativeAppView");var ot=["intro","data","processing","sharing","retention"];function jt({i18n:e}){let t=C(e);return u(G,{children:ot.map(r=>u("p",{children:t(`consent.human.terms.${r}`)},r))})}m(jt,"HumanConsentTerms");function Xt({url:e,i18n:t}){return x(()=>!se(),[])?u(Oe,{url:e,i18n:t}):null}m(Xt,"DesktopHandoffView");function at(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(Ae(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let r=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||r?"ios":/Android/i.test(t)?"chrome_android":"desktop"}m(at,"cameraHelpPlatform");var st={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function Jt({i18n:e,cause:t,onRetry:r,onContinue:n,handoffUrl:a,repeated:i=!1,platform:c}){let s=C(e),o=F(),p=H(),[f,k]=N("idle"),y=x(()=>a!==void 0&&!se(),[a]),g=t==="denied",l=x(()=>c??at(),[c]),d=g&&l==="in_app",[h,v]=N(!1),A=E(!1),S=E(!0);L(()=>(S.current=!0,()=>{S.current=!1}),[]);let V=m(()=>{if(!g){r();return}A.current||(A.current=!0,Ze().catch(()=>"unknown").then(D=>{A.current=!1,S.current&&(D==="denied"&&!h&&!i?v(!0):r())}))},"retry"),Le=m(()=>{n!==void 0&&(k("busy"),n(t).then(()=>k("idle"),D=>k(D instanceof Te&&D.code==="check_out_of_order"?"idle":"failed")))},"end"),B=typeof window>"u"?"":window.location.href.split("#")[0]??"",U=x(()=>d&&B!==""?Z(B):null,[d,B]),ce=b(G,{children:[d&&U!==null?b("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:U,"data-testid":"sekyro-open-browser",children:[u($,{name:"external"}),s("inApp.openBrowser")]}):null,d&&B!==""?u(ie,{url:B,i18n:e,label:"inApp.copyLink",primary:U===null}):null,u(I,{full:!0,kind:!d&&(g||n===void 0)?"primary":"secondary",onClick:V,children:e.t("common.retry")}),n!==void 0?u(I,{full:!0,kind:g?"secondary":"primary",disabled:f==="busy","aria-busy":f==="busy"||void 0,onClick:Le,children:s("capture.noCamera.continue")}):null]}),ue=f==="failed"?u(_,{tone:"danger",children:u("span",{children:e.t("errors.network_error")})}):null,le=s(d?"capture.noCamera.inAppTitle":g?"capture.noCamera.deniedTitle":"capture.noCamera.title"),pe=s(d?"capture.noCamera.inAppBody":g?"capture.noCamera.deniedBody":"capture.noCamera.body"),de=g&&!d?b(G,{children:[u("p",{"data-testid":"sekyro-camera-steps","data-platform":l,children:s(st[l])}),l!=="desktop"?u("p",{className:"sekyro-text-muted",children:s("capture.noCamera.stepsSystem")}):null]}):null,me=g&&(h||i)?u(_,{tone:"warning",children:u("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:s("capture.noCamera.stillBlocked")})}):null;return y&&a!==void 0?b("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":o,"data-testid":"sekyro-no-camera","data-cause":t,children:[u(Oe,{url:a,i18n:e}),u("h2",{id:o,ref:p,tabIndex:-1,className:"sekyro-text-body",children:le}),u("p",{className:"sekyro-text-muted",children:pe}),de,me,ue,u("div",{className:"sekyro-stack sekyro-stack--3",children:ce})]}):b(z,{tone:g?"warning":"neutral",icon:"camera",titleId:o,title:le,testId:"sekyro-no-camera",actions:ce,children:[u("p",{children:pe}),de,me,ue]})}m(Jt,"NoCameraView");function en({url:e,i18n:t,onContinue:r}){let n=C(t),a=F(),i=x(()=>Z(e),[e]);return u(z,{tone:"brand",icon:"external",titleId:a,title:n("inApp.title"),testId:"sekyro-in-app",actions:b(G,{children:[i!==null?b("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:i,"data-testid":"sekyro-open-browser",children:[u($,{name:"external"}),n("inApp.openBrowser")]}):null,u(ie,{url:e,i18n:t,label:"inApp.copyLink",primary:i===null}),u(I,{kind:"ghost",full:!0,onClick:r,children:n("inApp.continueAnyway")})]}),children:u("p",{children:n("inApp.description")})})}m(en,"InAppBrowserPrompt");var it={retake:{title:"testerGate.retakeTitle",body:"testerGate.retakeBody"},liveness:{title:"testerGate.livenessTitle",body:"testerGate.livenessBody"},no_match:{title:"testerGate.missTitle",body:"testerGate.missBody"}},ct={tester_limit_reached:"testerGate.limitBody",gate_attempts_exhausted:"testerGate.exhaustedBody",tester_gate_closed:"testerGate.closedBody"};function tn({i18n:e,onOpen:t}){let r=C(e);return u(I,{kind:"ghost",full:!0,onClick:t,"data-testid":"sekyro-tester-gate-action",children:r("testerGate.action")})}m(tn,"TesterGateAction");function nn({i18n:e,verification:t,attemptsLeft:r,livenessProps:n,onBound:a,onDone:i}){let c=C(e),s=F(),[o,p]=N("intro"),[f,k]=N(null),[y,g]=N("no_match"),l=t.testerGate,d=m(v=>{l!==void 0&&(p("checking"),l.call(t,v).then(({bound:A,missReason:S})=>{A&&a(),g(S??"no_match"),p(A?"bound":"miss")},A=>{let S=A instanceof Te?A.code:"",V=ct[S];k(V!==void 0?c(V):e.t(fe(A,e.strings))),p("failed")}))},"captured"),h=u(I,{full:!0,kind:o==="intro"?"secondary":"primary",onClick:()=>i(!0),"data-testid":"sekyro-tester-gate-continue",children:c("testerGate.continueTest")});if(o==="capture")return u(K,{...n,onCaptured:d});if(o==="checking")return u(z,{tone:"brand",icon:"face",busy:!0,live:!0,title:c("testerGate.checking"),testId:"sekyro-tester-gate-checking"});if(o==="bound")return u(z,{tone:"success",icon:"success",title:c("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:u(I,{full:!0,onClick:()=>i(!1),children:c("testerGate.continue")}),children:u("p",{children:c("testerGate.boundBody")})});if(o==="miss"||o==="failed"){let v=it[y],A=o==="miss"&&(y==="retake"||r>0);return u(z,{tone:"warning",icon:"info",title:c(o==="miss"?v.title:"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:b(G,{children:[h,A?u(I,{full:!0,kind:"secondary",onClick:()=>p("capture"),"data-testid":"sekyro-tester-gate-retry",children:c("testerGate.retry")}):null]}),children:u("p",{children:o==="miss"?c(v.body):f})})}return b("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":s,"data-testid":"sekyro-tester-gate",children:[u(ye,{id:s,title:c("testerGate.title"),lead:c("testerGate.body")}),b(q,{children:[u(I,{full:!0,onClick:()=>p("capture"),disabled:l===void 0,"data-testid":"sekyro-tester-gate-start",children:c("testerGate.start")}),h]})]})}m(nn,"TesterGateView");export{$t as ContactChoiceView,Xt as DesktopHandoffView,Wt as EidContinueHint,qt as GenericChoiceView,Oe as HandoffView,jt as HumanConsentTerms,Qt as IdentitySummaryView,en as InAppBrowserPrompt,Ut as LaneChoiceView,Et as LaneSwitch,Kt as LivePhotoLiveness,Zt as NativeAppView,Jt as NoCameraView,Yt as PortraitRetakeNotice,tn as TesterGateAction,nn as TesterGateView,at as cameraHelpPlatform};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a as N}from"./chunk-JDBRZTDI.js";import"./chunk-HJDSATKF.js";import{a as oe}from"./chunk-B26PUCMP.js";import"./chunk-JDVMIABI.js";import"./chunk-WIHBHY2K.js";import{b as Q}from"./chunk-2SVN4T5I.js";import{a as X,b as Y,c as Z}from"./chunk-7MMT5M4E.js";import{h as te,m as ae,q as y,r as re}from"./chunk-OLU5EOHP.js";import"./chunk-TLYACCNO.js";import{a as b,s as ee}from"./chunk-MDXA7C7O.js";import{a as l}from"./chunk-2KED7D2Q.js";import{useContext as se,useEffect as ye,useRef as I,useState as c}from"react";import{jsx as e,jsxs as i}from"react/jsx-runtime";var P=["pose","eyes","mouth","lighting","background","resolution"],ne="occlusion";function Se(r){return r?.startsWith("icao_")===!0?r.slice(5):null}l(Se,"reasonCriterion");function Le({step:r,i18n:u,assetBaseUrl:M,onUpload:L}){let{t:a}=u,F=I(null),p=I(null),[o,ie]=c("idle"),[S,E]=c(null),[K,k]=c(null),[R,T]=c({facing:"user",assisted:!1}),[x,le]=c(!1),[ce,B]=c(!1),[H,de]=c(!1),ue=ee(),G=se(te),_=se(X),$=I(_);$.current=_,ye(()=>{let t=F.current;if(t===null)return;let s=r.capture({video:t,...M!==void 0?{assetBaseUrl:M}:{}});p.current=s;let h=l(()=>T({facing:s.facingMode??"user",assisted:s.captureMode==="assisted"}),"readCamera");h();let he=[s.on("state",n=>{h(),n==="mode_switch"?B(!0):n!=="starting"&&n!=="gating"&&B(!1),ie(n)}),s.on("gate",E),s.on("error",n=>{k(n);let J=$.current;J!==null&&Z(J,Y("portrait",n,0))})],D=!0;return Promise.resolve(s.canSwitchCaptureMode?.()??!1).catch(()=>!1).then(n=>{D&&le(n===!0)}),s.start().catch(()=>{}),()=>{D=!1;for(let n of he)n();s.destroy(),p.current=null}},[]);let f=o==="uploading"||o==="checking",m=o==="done",C=m&&r.reason!==void 0&&!r.uploadFailed,pe=o==="starting"||o==="idle"||o==="mode_switch"?"portrait.starting":o==="captured"?"portrait.taken":o==="uploading"?"portrait.uploading":o==="checking"?"portrait.checking":`portrait.coach.${S?.coach??"no_face"}`,O=(r.report??[]).filter(t=>!t.pass),V=r.reason!==void 0?`reasons.${r.reason}`:null,g=Se(r.reason),A=O.filter(t=>t.criterion!==g),U=new Set([...O.map(t=>t.criterion),...g!==null?[g]:[]]),fe=U.has(ne),W=l(()=>{k(null),p.current?.retry()},"retake"),w=l(t=>{let s=S?.criteria.find(h=>h.criterion===t);return s!==void 0&&(s.held||s.waived)},"met"),me=S?.ready||o==="captured"||f?1:P.filter(w).length/P.length;C&&!H&&de(!0);let j=V!==null&&(C||o==="gating"&&(g===null||!H)),ge=!C,q=o==="starting"||o==="gating"||o==="error"||o==="mode_switch",d=R.assisted?"self":"assisted",z=x&&q?{to:d,label:a(d==="assisted"?"capture.modeSwitch.toAssisted":"capture.modeSwitch.toSelfPhoto"),description:a(d==="assisted"?"capture.modeSwitch.toAssistedLabelPhoto":"capture.modeSwitch.toSelfLabelPhoto"),onSwitch:l(()=>{let t=p.current;t?.setCaptureMode(d).then(s=>{s&&(k(null),E(null),T({facing:t.facingMode??"user",assisted:d==="assisted"}))})},"onSwitch")}:null,v=ce&&q?a("capture.modeSwitch.restarted"):null;return i(oe,{testId:"sekyro-portrait",video:e("video",{ref:F,className:`sekyro-lm-video sekyro-fc-video${R.facing==="environment"?" is-rear":""}`,playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),instruction:a(pe),...v!==null?{note:v}:{},...x?{status:v}:{},progress:me,closeLabel:a("native.close"),...G!==void 0?{onClose:G}:{},...z!==null?{end:e(Q,{view:z,className:"sekyro-glass sekyro-glass--label"})}:{},children:[e("h2",{ref:ue,tabIndex:-1,className:"sekyro-visually-hidden",children:a(r.reason!==void 0?"portrait.retryTitle":"session.steps.portrait.title")}),j||K!==null||m&&(r.uploadFailed||!r.attemptsExhausted)?i("div",{className:"sekyro-fc-panel",children:[j?i(y,{tone:"warning",children:[e("span",{children:N(u)(V)||a("portrait.retryTitle")}),A.length>0?i("span",{children:[a("portrait.reportTitle"),": ",A.map(t=>a(`portrait.report.${t.criterion}`)).join(", ")]}):null,e("span",{children:re(u,r.attemptsRemaining,r.attemptsExhausted)})]}):null,K!==null?i(y,{tone:"danger",children:[e("span",{children:a("portrait.cameraBlocked")}),e("span",{children:a("portrait.cameraBlockedHint")}),e(b,{kind:"secondary",onClick:W,children:a("portrait.retryCamera")})]}):null,r.uploadFailed&&m?e(y,{tone:"danger",children:e("span",{children:a("portrait.uploadFailed")})}):null,m&&!r.attemptsExhausted?e(b,{full:!0,onClick:W,disabled:f,children:a("portrait.retake")}):null]}):null,ge?i("ul",{className:"sekyro-fc-checks","aria-label":a("portrait.checksLabel"),children:[P.map(t=>i("li",{className:w(t)?"is-met":U.has(t)?"is-flagged":void 0,"data-criterion":t,children:[e("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:e("svg",{viewBox:"0 0 18 18",children:e("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),e("span",{children:a(`portrait.criteria.${t}`)}),e("span",{className:"sekyro-visually-hidden",children:a(w(t)?"portrait.met":"portrait.notMet")})]},t)),fe?i("li",{className:"is-flagged","data-criterion":ne,children:[e("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:e("svg",{viewBox:"0 0 18 18",children:e("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),e("span",{children:a("portrait.report.occlusion")}),e("span",{className:"sekyro-visually-hidden",children:a("portrait.notMet")})]}):null]}):null,L!==void 0&&!f?e("button",{type:"button",className:"sekyro-lm-upload",onClick:L,"data-testid":"sekyro-portrait-upload-instead",children:N(u)("portrait.source.uploadInstead")}):null,f?null:e(ae,{})]})}l(Le,"PortraitCaptureView");export{Le as PortraitCaptureView};
2
+ import{a as N}from"./chunk-Q7TAM5DA.js";import"./chunk-HJDSATKF.js";import{a as oe}from"./chunk-B26PUCMP.js";import"./chunk-NZKIRHZR.js";import"./chunk-WIHBHY2K.js";import{b as Q}from"./chunk-2SVN4T5I.js";import{a as X,b as Y,c as Z}from"./chunk-7MMT5M4E.js";import{h as te,m as ae,q as y,r as re}from"./chunk-OLU5EOHP.js";import"./chunk-TLYACCNO.js";import{a as b,s as ee}from"./chunk-MDXA7C7O.js";import{a as l}from"./chunk-2KED7D2Q.js";import{useContext as se,useEffect as ye,useRef as I,useState as c}from"react";import{jsx as e,jsxs as i}from"react/jsx-runtime";var P=["pose","eyes","mouth","lighting","background","resolution"],ne="occlusion";function Se(r){return r?.startsWith("icao_")===!0?r.slice(5):null}l(Se,"reasonCriterion");function Le({step:r,i18n:u,assetBaseUrl:M,onUpload:L}){let{t:a}=u,F=I(null),p=I(null),[o,ie]=c("idle"),[S,E]=c(null),[K,k]=c(null),[R,T]=c({facing:"user",assisted:!1}),[x,le]=c(!1),[ce,B]=c(!1),[H,de]=c(!1),ue=ee(),G=se(te),_=se(X),$=I(_);$.current=_,ye(()=>{let t=F.current;if(t===null)return;let s=r.capture({video:t,...M!==void 0?{assetBaseUrl:M}:{}});p.current=s;let h=l(()=>T({facing:s.facingMode??"user",assisted:s.captureMode==="assisted"}),"readCamera");h();let he=[s.on("state",n=>{h(),n==="mode_switch"?B(!0):n!=="starting"&&n!=="gating"&&B(!1),ie(n)}),s.on("gate",E),s.on("error",n=>{k(n);let J=$.current;J!==null&&Z(J,Y("portrait",n,0))})],D=!0;return Promise.resolve(s.canSwitchCaptureMode?.()??!1).catch(()=>!1).then(n=>{D&&le(n===!0)}),s.start().catch(()=>{}),()=>{D=!1;for(let n of he)n();s.destroy(),p.current=null}},[]);let f=o==="uploading"||o==="checking",m=o==="done",C=m&&r.reason!==void 0&&!r.uploadFailed,pe=o==="starting"||o==="idle"||o==="mode_switch"?"portrait.starting":o==="captured"?"portrait.taken":o==="uploading"?"portrait.uploading":o==="checking"?"portrait.checking":`portrait.coach.${S?.coach??"no_face"}`,O=(r.report??[]).filter(t=>!t.pass),V=r.reason!==void 0?`reasons.${r.reason}`:null,g=Se(r.reason),A=O.filter(t=>t.criterion!==g),U=new Set([...O.map(t=>t.criterion),...g!==null?[g]:[]]),fe=U.has(ne),W=l(()=>{k(null),p.current?.retry()},"retake"),w=l(t=>{let s=S?.criteria.find(h=>h.criterion===t);return s!==void 0&&(s.held||s.waived)},"met"),me=S?.ready||o==="captured"||f?1:P.filter(w).length/P.length;C&&!H&&de(!0);let j=V!==null&&(C||o==="gating"&&(g===null||!H)),ge=!C,q=o==="starting"||o==="gating"||o==="error"||o==="mode_switch",d=R.assisted?"self":"assisted",z=x&&q?{to:d,label:a(d==="assisted"?"capture.modeSwitch.toAssisted":"capture.modeSwitch.toSelfPhoto"),description:a(d==="assisted"?"capture.modeSwitch.toAssistedLabelPhoto":"capture.modeSwitch.toSelfLabelPhoto"),onSwitch:l(()=>{let t=p.current;t?.setCaptureMode(d).then(s=>{s&&(k(null),E(null),T({facing:t.facingMode??"user",assisted:d==="assisted"}))})},"onSwitch")}:null,v=ce&&q?a("capture.modeSwitch.restarted"):null;return i(oe,{testId:"sekyro-portrait",video:e("video",{ref:F,className:`sekyro-lm-video sekyro-fc-video${R.facing==="environment"?" is-rear":""}`,playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),instruction:a(pe),...v!==null?{note:v}:{},...x?{status:v}:{},progress:me,closeLabel:a("native.close"),...G!==void 0?{onClose:G}:{},...z!==null?{end:e(Q,{view:z,className:"sekyro-glass sekyro-glass--label"})}:{},children:[e("h2",{ref:ue,tabIndex:-1,className:"sekyro-visually-hidden",children:a(r.reason!==void 0?"portrait.retryTitle":"session.steps.portrait.title")}),j||K!==null||m&&(r.uploadFailed||!r.attemptsExhausted)?i("div",{className:"sekyro-fc-panel",children:[j?i(y,{tone:"warning",children:[e("span",{children:N(u)(V)||a("portrait.retryTitle")}),A.length>0?i("span",{children:[a("portrait.reportTitle"),": ",A.map(t=>a(`portrait.report.${t.criterion}`)).join(", ")]}):null,e("span",{children:re(u,r.attemptsRemaining,r.attemptsExhausted)})]}):null,K!==null?i(y,{tone:"danger",children:[e("span",{children:a("portrait.cameraBlocked")}),e("span",{children:a("portrait.cameraBlockedHint")}),e(b,{kind:"secondary",onClick:W,children:a("portrait.retryCamera")})]}):null,r.uploadFailed&&m?e(y,{tone:"danger",children:e("span",{children:a("portrait.uploadFailed")})}):null,m&&!r.attemptsExhausted?e(b,{full:!0,onClick:W,disabled:f,children:a("portrait.retake")}):null]}):null,ge?i("ul",{className:"sekyro-fc-checks","aria-label":a("portrait.checksLabel"),children:[P.map(t=>i("li",{className:w(t)?"is-met":U.has(t)?"is-flagged":void 0,"data-criterion":t,children:[e("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:e("svg",{viewBox:"0 0 18 18",children:e("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),e("span",{children:a(`portrait.criteria.${t}`)}),e("span",{className:"sekyro-visually-hidden",children:a(w(t)?"portrait.met":"portrait.notMet")})]},t)),fe?i("li",{className:"is-flagged","data-criterion":ne,children:[e("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:e("svg",{viewBox:"0 0 18 18",children:e("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),e("span",{children:a("portrait.report.occlusion")}),e("span",{className:"sekyro-visually-hidden",children:a("portrait.notMet")})]}):null]}):null,L!==void 0&&!f?e("button",{type:"button",className:"sekyro-lm-upload",onClick:L,"data-testid":"sekyro-portrait-upload-instead",children:N(u)("portrait.source.uploadInstead")}):null,f?null:e(ae,{})]})}l(Le,"PortraitCaptureView");export{Le as PortraitCaptureView};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a,b,c,d,e}from"./chunk-JDBRZTDI.js";import"./chunk-HJDSATKF.js";import"./chunk-JDVMIABI.js";import"./chunk-WIHBHY2K.js";import"./chunk-OLU5EOHP.js";import"./chunk-MDXA7C7O.js";import"./chunk-2KED7D2Q.js";export{d as PortraitReviewView,e as PortraitScreens,b as PortraitSourceView,c as PortraitUploadView,a as portraitCopy};
2
+ import{a,b,c,d,e}from"./chunk-Q7TAM5DA.js";import"./chunk-HJDSATKF.js";import"./chunk-NZKIRHZR.js";import"./chunk-WIHBHY2K.js";import"./chunk-OLU5EOHP.js";import"./chunk-MDXA7C7O.js";import"./chunk-2KED7D2Q.js";export{d as PortraitReviewView,e as PortraitScreens,b as PortraitSourceView,c as PortraitUploadView,a as portraitCopy};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a as O}from"./chunk-HJDSATKF.js";import{a as H}from"./chunk-FE6AS435.js";import{d as B}from"./chunk-JDVMIABI.js";import"./chunk-WIHBHY2K.js";import{d as F}from"./chunk-V3BQZTXH.js";import{a as R,b as T,d as x,q as _,r as D}from"./chunk-OLU5EOHP.js";import"./chunk-TLYACCNO.js";import{a as y}from"./chunk-MDXA7C7O.js";import{a as d}from"./chunk-2KED7D2Q.js";import{useId as Z,useRef as ee,useState as E}from"react";var M={"poa.title":"إثبات العنوان","poa.lead":"ارفع وثيقة حديثة تُظهر اسمك وعنوانك الحالي.","poa.accepted":"الوثائق المقبولة","poa.acceptedFor":"مقبول في {country}","poa.kindDated":"{kind}، صادر خلال آخر {days} يومًا","poa.kinds.utility_bill":"فاتورة كهرباء أو ماء أو غاز","poa.kinds.telecom_bill":"فاتورة هاتف أو إنترنت","poa.kinds.bank_statement":"كشف حساب بنكي","poa.kinds.tax_notice":"إشعار ضريبي","poa.kinds.rental_agreement":"عقد إيجار","poa.kinds.government_certificate":"شهادة السكن","poa.kinds.insurance_statement":"وثيقة تأمين","poa.source.camera":"التقاط صورة","poa.source.upload":"رفع ملف","poa.source.lead":"صورة للوثيقة، أو ملف PDF أو صورة من جهازك","poa.upload.hint":"PDF أو JPEG أو PNG، بحد أقصى 3 صفحات و10 ميغابايت","poa.upload.choose":"اختيار ملف","poa.upload.addPage":"إضافة صفحة","poa.upload.pages":"{count} من 3 صفحات","poa.upload.send":"إرسال الوثيقة","poa.upload.sending":"جارٍ إرسال وثيقتك…","poa.upload.unsupported":"نوع الملف هذا غير مقبول. اختر ملف PDF أو JPEG أو PNG","poa.upload.tooManyPages":"أرسل 3 صفحات على الأكثر. احذف صفحة أو اختر ملفًا أقصر","poa.upload.tooLarge":"حجم الملف يتجاوز 10 ميغابايت. اختر ملفًا أصغر","poa.upload.failed":"تعذّر إرسال الوثيقة. تحقّق من اتصالك وحاول مرة أخرى","poa.camera.lead":"ضع الوثيقة بشكل مسطّح واملأ الإطار. التقط صورة واحدة لكل صفحة","poa.camera.capture":"التقاط الصورة","poa.camera.retake":"إعادة الالتقاط","poa.camera.next":"الصفحة التالية","poa.camera.page":"الصفحة {number}","poa.letter.title":"رسالة من صاحب الفاتورة","poa.letter.lead":"الوثيقة باسم شخص آخر. أضف رسالة موقّعة من هذا الشخص تفيد بأنك تسكن في هذا العنوان","poa.letter.send":"إرسال الرسالة","poa.licence.use":"استخدام العنوان المذكور في رخصة القيادة","poa.licence.note":"قرأنا هذا العنوان من رخصتك. لا تحتاج إلى وثيقة أخرى.","poa.retry.document_too_old":"هذه الوثيقة أقدم من المسموح. ارفع وثيقة أحدث من القائمة أدناه","poa.retry.document_date_invalid":"تاريخ الوثيقة في المستقبل. ارفع وثيقة بتاريخ اليوم أو قبله","poa.retry.document_kind_not_accepted":"نوع هذه الوثيقة غير مقبول. ارفع إحدى الوثائق المذكورة أدناه","poa.retry.name_mismatch":"الاسم في الوثيقة لا يطابق اسمك. ارفع وثيقة باسمك","poa.retry.address_mismatch":"العنوان في الوثيقة لا يطابق العنوان الذي وصلنا. ارفع وثيقة لهذا العنوان","poa.retry.holder_letter_missing":"يجب أن تكون الرسالة موقّعة وأن تذكر اسمك واسم صاحب الفاتورة. ارفع رسالة كاملة","poa.retry.unreadable":"تعذّرت قراءة الوثيقة. ارفع نسخة كاملة وأكثر وضوحًا","poa.retry.pdf_protected":"أزل كلمة المرور من ملف PDF وحاول مرة أخرى","poa.retry.provider_unavailable":"تعذّر فحص الوثيقة حاليًا. حاول مرة أخرى بعد قليل","poa.hint.blurry":"الصورة غير واضحة","poa.hint.cropped":"جزء من الوثيقة مقطوع","poa.hint.glare":"يوجد انعكاس ضوء على الوثيقة","reasons.provider_unavailable":"تعذّر فحص الوثيقة حاليًا","reasons.pdf_protected":"ملف PDF محمي بكلمة مرور أو يحتوي على محتوى نشط","reasons.document_kind_not_accepted":"نوع الوثيقة غير مقبول","reasons.document_date_invalid":"تاريخ الوثيقة في المستقبل","reasons.document_too_old":"الوثيقة قديمة جدًا","reasons.document_tampered":"يبدو أن الوثيقة قد عُدّلت","reasons.holder_letter_required":"يلزم تقديم رسالة من صاحب الفاتورة","reasons.holder_letter_missing":"رسالة صاحب الفاتورة مفقودة أو غير مكتملة","reasons.address_mismatch":"العنوان لا يطابق العنوان المقدَّم"};var v={"poa.title":"Proof of address","poa.lead":"Upload a recent document that shows your name and your current address.","poa.accepted":"Accepted documents","poa.acceptedFor":"Accepted for {country}","poa.kindDated":"{kind}, dated within the last {days} days","poa.kinds.utility_bill":"Electricity, water or gas bill","poa.kinds.telecom_bill":"Phone or internet bill","poa.kinds.bank_statement":"Bank statement","poa.kinds.tax_notice":"Tax notice","poa.kinds.rental_agreement":"Rental agreement","poa.kinds.government_certificate":"Residence certificate","poa.kinds.insurance_statement":"Insurance statement","poa.source.camera":"Take a photo","poa.source.upload":"Upload a file","poa.source.lead":"A photo of the document, or a PDF or image from your device","poa.upload.hint":"PDF, JPEG or PNG, up to 3 pages and 10 MB","poa.upload.choose":"Choose a file","poa.upload.addPage":"Add a page","poa.upload.pages":"{count} of 3 pages","poa.upload.send":"Send document","poa.upload.sending":"Sending your document…","poa.upload.unsupported":"This file type is not accepted. Choose a PDF, JPEG or PNG","poa.upload.tooManyPages":"Send at most 3 pages. Remove a page or choose a shorter file","poa.upload.tooLarge":"The file is over 10 MB. Choose a smaller file","poa.upload.failed":"We could not send the document. Check your connection and try again","poa.camera.lead":"Lay the document flat and fill the frame. Take one photo per page","poa.camera.capture":"Take photo","poa.camera.retake":"Retake","poa.camera.next":"Next page","poa.camera.page":"Page {number}","poa.letter.title":"Letter from the bill holder","poa.letter.lead":"The document is in another person's name. Add a signed letter from that person saying that you live at this address","poa.letter.send":"Send letter","poa.licence.use":"Use the address on my driver's license","poa.licence.note":"We read this address from your license. You don't need another document.","poa.retry.document_too_old":"This document is older than allowed. Upload a more recent one from the list below","poa.retry.document_date_invalid":"The date on the document is in the future. Upload a document with today's date or earlier","poa.retry.document_kind_not_accepted":"This document type is not accepted. Upload one of the documents listed below","poa.retry.name_mismatch":"The name on the document does not match yours. Upload a document in your name","poa.retry.address_mismatch":"The address on the document does not match the one we were given. Upload a document for that address","poa.retry.holder_letter_missing":"The letter must be signed and name both you and the bill holder. Upload a complete letter","poa.retry.unreadable":"We could not read the document. Upload a sharper, complete copy","poa.retry.pdf_protected":"Remove the password from the PDF and try again","poa.retry.provider_unavailable":"The document could not be checked right now. Try again in a moment","poa.hint.blurry":"The image is blurry","poa.hint.cropped":"Part of the document is cut off","poa.hint.glare":"There is glare on the document","reasons.provider_unavailable":"The document could not be checked right now","reasons.pdf_protected":"The PDF is password-protected or contains active content","reasons.document_kind_not_accepted":"The document type is not accepted","reasons.document_date_invalid":"The document date is in the future","reasons.document_too_old":"The document is too old","reasons.document_tampered":"The document appears to have been edited","reasons.holder_letter_required":"A letter from the bill holder is needed","reasons.holder_letter_missing":"The letter from the bill holder is missing or incomplete","reasons.address_mismatch":"The address does not match the one supplied"};var G={"poa.title":"Justificatif de domicile","poa.lead":"Importez un document récent qui indique votre nom et votre adresse actuelle.","poa.accepted":"Documents acceptés","poa.acceptedFor":"Accepté pour {country}","poa.kindDated":"{kind}, daté des {days} derniers jours","poa.kinds.utility_bill":"Facture d'électricité, d'eau ou de gaz","poa.kinds.telecom_bill":"Facture de téléphone ou d'internet","poa.kinds.bank_statement":"Relevé bancaire","poa.kinds.tax_notice":"Avis d'imposition","poa.kinds.rental_agreement":"Bail ou quittance de loyer","poa.kinds.government_certificate":"Certificat de résidence","poa.kinds.insurance_statement":"Attestation d'assurance","poa.source.camera":"Prendre une photo","poa.source.upload":"Importer un fichier","poa.source.lead":"Une photo du document, ou un PDF ou une image depuis votre appareil","poa.upload.hint":"PDF, JPEG ou PNG, 3 pages et 10 Mo au maximum","poa.upload.choose":"Choisir un fichier","poa.upload.addPage":"Ajouter une page","poa.upload.pages":"{count} sur 3 pages","poa.upload.send":"Envoyer le document","poa.upload.sending":"Envoi de votre document…","poa.upload.unsupported":"Ce type de fichier n'est pas accepté. Choisissez un PDF, un JPEG ou un PNG","poa.upload.tooManyPages":"Envoyez 3 pages au maximum. Retirez une page ou choisissez un fichier plus court","poa.upload.tooLarge":"Le fichier dépasse 10 Mo. Choisissez un fichier plus léger","poa.upload.failed":"Nous n'avons pas pu envoyer le document. Vérifiez votre connexion et réessayez","poa.camera.lead":"Posez le document à plat et remplissez le cadre. Prenez une photo par page","poa.camera.capture":"Prendre la photo","poa.camera.retake":"Reprendre","poa.camera.next":"Page suivante","poa.camera.page":"Page {number}","poa.letter.title":"Lettre du titulaire de la facture","poa.letter.lead":"Le document est au nom d'une autre personne. Ajoutez une lettre signée de cette personne attestant que vous habitez à cette adresse","poa.letter.send":"Envoyer la lettre","poa.licence.use":"Utiliser l'adresse de mon permis de conduire","poa.licence.note":"Nous avons lu cette adresse sur votre permis. Vous n'avez pas besoin d'un autre document.","poa.retry.document_too_old":"Ce document est plus ancien que la limite. Importez un document plus récent parmi ceux de la liste ci-dessous","poa.retry.document_date_invalid":"La date du document est dans le futur. Importez un document daté d'aujourd'hui ou d'avant","poa.retry.document_kind_not_accepted":"Ce type de document n'est pas accepté. Importez l'un des documents de la liste ci-dessous","poa.retry.name_mismatch":"Le nom sur le document ne correspond pas au vôtre. Importez un document à votre nom","poa.retry.address_mismatch":"L'adresse du document ne correspond pas à celle qui nous a été transmise. Importez un document pour cette adresse","poa.retry.holder_letter_missing":"La lettre doit être signée et nommer à la fois vous et le titulaire de la facture. Importez une lettre complète","poa.retry.unreadable":"Nous n'avons pas pu lire le document. Importez une copie plus nette et complète","poa.retry.pdf_protected":"Retirez le mot de passe du PDF et réessayez","poa.retry.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment. Réessayez dans un instant","poa.hint.blurry":"L'image est floue","poa.hint.cropped":"Une partie du document est coupée","poa.hint.glare":"Il y a un reflet sur le document","reasons.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment","reasons.pdf_protected":"Le PDF est protégé par un mot de passe ou contient du contenu actif","reasons.document_kind_not_accepted":"Ce type de document n'est pas accepté","reasons.document_date_invalid":"La date du document est dans le futur","reasons.document_too_old":"Le document est trop ancien","reasons.document_tampered":"Le document semble avoir été modifié","reasons.holder_letter_required":"Une lettre du titulaire de la facture est nécessaire","reasons.holder_letter_missing":"La lettre du titulaire de la facture est absente ou incomplète","reasons.address_mismatch":"L'adresse ne correspond pas à celle qui a été transmise"};import{useEffect as K,useRef as q,useState as S}from"react";import{Fragment as X,jsx as i,jsxs as P}from"react/jsx-runtime";function Q({blob:o,label:n}){let[e,a]=S(void 0);return K(()=>{if(typeof URL.createObjectURL!="function")return;let r=URL.createObjectURL(o);return a(r),()=>URL.revokeObjectURL(r)},[o]),i("img",{src:e,alt:n})}d(Q,"PageThumb");function J({step:o,i18n:n,c:e,title:a,notice:r,intro:c,onUpload:p}){let h=q(null),s=q(null),[l,g]=S([]),[m,b]=S(!1),[C,L]=S("idle"),[V,A]=S(!1),w=d(u=>{b(!1),u.start().catch(()=>b(!0))},"open");K(()=>{let u=h.current;if(u===null)return;let f;try{f=o.capturePage({video:u})}catch{b(!0);return}return s.current=f,w(f),()=>{f.destroy(),s.current=null}},[]);let I=l.length>=o.maxPages,$=d(async()=>{let u=s.current;if(!(u===null||I)){L("taking"),A(!1);try{await u.takePage()}catch{}g([...u.pages]),L("idle")}},"take"),W=d(u=>{let f=s.current;f!==null&&(f.removePage(u),g([...f.pages]))},"retake"),Y=d(async()=>{let u=s.current;if(!(u===null||l.length===0)){L("sending"),A(!1);try{await u.submitPages()}catch{A(!0)}L("idle")}},"send"),N=C==="sending";return P("section",{className:"sekyro-step","data-testid":"sekyro-poa-camera",children:[i(T,{title:a,lead:e("poa.camera.lead")}),r,V?i(_,{tone:"danger",children:i("span",{children:e("poa.upload.failed")})}):null,m?P(_,{tone:"danger",children:[i("span",{children:e("doc.cameraBlocked")}),i("span",{children:e("doc.cameraBlockedHint")}),s.current!==null?i(y,{kind:"secondary",onClick:()=>s.current!==null&&w(s.current),children:e("doc.retryCamera")}):null]}):null,l.length===0?c:null,i("video",{ref:h,className:"sekyro-poa-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),l.length>0?P(X,{children:[i("p",{className:"sekyro-text-muted",role:"status",children:e("poa.upload.pages",{count:l.length})}),i("ul",{className:"sekyro-poa-pages",children:l.map((u,f)=>{let z=e("poa.camera.page",{number:f+1});return P("li",{children:[i(Q,{blob:u,label:z}),i(y,{kind:"ghost",onClick:()=>W(f),disabled:N,"aria-label":`${e("poa.camera.retake")} ${z}`,children:e("poa.camera.retake")})]},f)})})]}):null,N?i("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,P(x,{children:[P(y,{full:!0,kind:l.length>0?"secondary":"primary",onClick:()=>{$()},disabled:I||m||C!=="idle"||o.attemptsExhausted,"aria-busy":C==="taking"||void 0,children:[i(R,{name:"camera"}),e("poa.camera.capture")]}),l.length>0?i(y,{full:!0,onClick:()=>{Y()},disabled:C!=="idle","aria-busy":N||void 0,children:e("poa.upload.send")}):null,p!==void 0?i(y,{full:!0,kind:"ghost",onClick:p,disabled:N,children:e("poa.source.upload")}):null]})]})}d(J,"PageCamera");import{Fragment as pe,jsx as t,jsxs as k}from"react/jsx-runtime";var oe={en:v,fr:G,ar:M,es:v,pt:v,de:v},te="image/jpeg,image/png,image/heic,image/heif,application/pdf";function ae(o){let n=o.strings,e=oe[o.locale];return(a,r)=>F(n[a]??e[a]??"",r)}d(ae,"poaCopy");function U({step:o,i18n:n,c:e}){if(o.reason===void 0)return null;let a=e(`poa.retry.${o.reason}`)||e(`reasons.${o.reason}`)||e("poa.retry.unreadable");return k(_,{tone:"warning",children:[t("span",{children:a}),t("span",{children:D(n,o.attemptsRemaining,o.attemptsExhausted)})]})}d(U,"RetryNotice");function j({step:o,i18n:n,c:e}){let a=Z(),{country:r}=o.rule,c=r===null?e("poa.accepted"):e("poa.acceptedFor",{country:H(r,n.locale)});return k("div",{className:"sekyro-poa-accepted",children:[t("p",{id:a,className:"sekyro-poa-accepted__title",children:c}),t("ul",{className:"sekyro-poa-list","aria-labelledby":a,children:o.rule.kinds.map(p=>t("li",{children:e("poa.kindDated",{kind:e(`poa.kinds.${p.kind}`)||p.kind,days:p.maxAgeDays})},p.kind))})]})}d(j,"AcceptedList");var ne={unsupported:"poa.upload.unsupported",tooMany:"poa.upload.tooManyPages",tooLarge:"poa.upload.tooLarge",failed:"poa.upload.failed"};function re(o){return o instanceof TypeError&&o.message==="unsupported_file"?"unsupported":o instanceof RangeError&&o.message==="file_too_large"?"tooLarge":o instanceof RangeError&&(o.message==="too_many_pages"||o.message==="no_pages")?"tooMany":"failed"}d(re,"refusalOf");function se({step:o,i18n:n,c:e,letter:a,onCamera:r}){let c=ee(null),[p,h]=E("idle"),s=p==="sending",l=d(async g=>{let m=Array.from(g.currentTarget.files??[]);if(g.currentTarget.value="",m.length!==0){if(m.length>o.maxPages){h("tooMany");return}h("sending");try{await(a?o.uploadHolderLetter(m):o.uploadPages(m)),h("idle")}catch(b){h(re(b))}}},"onFiles");return k("section",{className:"sekyro-step","data-testid":a?"sekyro-poa-letter":"sekyro-poa-upload",children:[t(T,{title:e(a?"poa.letter.title":"poa.title"),lead:e(a?"poa.letter.lead":"poa.lead")}),p==="idle"||s?t(U,{step:o,i18n:n,c:e}):null,p!=="idle"&&!s?t(_,{tone:"danger",children:t("span",{children:e(ne[p])})}):null,a?null:t(j,{step:o,i18n:n,c:e}),t("p",{className:"sekyro-text-muted",children:e("poa.upload.hint")}),s?t("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,t("input",{ref:c,type:"file",accept:te,multiple:!0,hidden:!0,"data-testid":"sekyro-poa-file","aria-label":e(a?"poa.letter.title":"poa.title"),onChange:g=>{l(g)}}),k(x,{children:[t(y,{full:!0,onClick:()=>c.current?.click(),disabled:s||!o.photo.uploadOffered||o.attemptsExhausted,"aria-busy":s||void 0,children:e("poa.upload.choose")}),r!==void 0?k(y,{full:!0,kind:"ghost",onClick:r,disabled:s,children:[t(R,{name:o.photo.cameraOnPhone===!0?"smartphone":"camera"}),o.photo.cameraOnPhone===!0?e("capture.source.phone"):e("poa.source.camera")]}):null]})]})}d(se,"UploadScreen");function de({step:o,c:n}){let[e,a]=E("idle"),r=o.useLicenceAddress;if(r===void 0)return null;let c=d(async()=>{a("sending");try{await r(),a("idle")}catch{a("failed")}},"onUse");return k("div",{className:"sekyro-poa-licence","data-testid":"sekyro-poa-licence",children:[t("p",{className:"sekyro-text-muted",children:n("poa.licence.note")}),e==="failed"?t(_,{tone:"danger",children:t("span",{children:n("poa.upload.failed")})}):null,t(y,{full:!0,kind:"secondary",onClick:()=>{c()},disabled:e==="sending"||o.attemptsExhausted,"aria-busy":e==="sending"||void 0,children:n("poa.licence.use")})]})}d(de,"LicenceShortcut");function we({step:o,i18n:n}){let e=ae(n),[a,r]=E(null),c=o.phase==="holder_letter",p=o.photo.source,h=p==="choice"?a??o.photo.pick:p,s=o.photo.cameraOnPhone===!0,l=o.photo.uploadOffered?()=>r("upload"):void 0,g=e(c?"poa.letter.title":"poa.title"),m;return h===null?m=t(O,{testId:"sekyro-poa-source",title:g,lead:e("poa.source.lead"),cameraLabel:e(s?"capture.source.phone":"poa.source.camera"),uploadLabel:e("poa.source.upload"),onPhone:s,notice:t(U,{step:o,i18n:n,c:e}),onCamera:()=>r("camera"),onUpload:()=>r("upload")}):h==="camera"&&s?m=t(B,{i18n:n,lead:e("handoff.lead.poa"),refresh:o.refresh,actions:l!==void 0?t(y,{kind:"ghost",full:!0,onClick:l,children:e("poa.source.upload")}):null}):h==="camera"?m=t(J,{step:o,i18n:n,c:e,title:g,notice:t(U,{step:o,i18n:n,c:e}),intro:c?null:t(j,{step:o,i18n:n,c:e}),...p==="choice"&&l!==void 0?{onUpload:l}:{}}):m=t(se,{step:o,i18n:n,c:e,letter:c,...p==="choice"?{onCamera:d(()=>r("camera"),"onCamera")}:{}}),k(pe,{children:[c?null:t(de,{step:o,c:e}),m]})}d(we,"ProofOfAddressView");export{te as POA_UPLOAD_ACCEPT,we as ProofOfAddressView,ae as poaCopy};
2
+ import{a as O}from"./chunk-HJDSATKF.js";import{a as H}from"./chunk-FE6AS435.js";import{d as B}from"./chunk-NZKIRHZR.js";import"./chunk-WIHBHY2K.js";import{d as F}from"./chunk-V3BQZTXH.js";import{a as R,b as T,d as x,q as _,r as D}from"./chunk-OLU5EOHP.js";import"./chunk-TLYACCNO.js";import{a as y}from"./chunk-MDXA7C7O.js";import{a as d}from"./chunk-2KED7D2Q.js";import{useId as Z,useRef as ee,useState as E}from"react";var M={"poa.title":"إثبات العنوان","poa.lead":"ارفع وثيقة حديثة تُظهر اسمك وعنوانك الحالي.","poa.accepted":"الوثائق المقبولة","poa.acceptedFor":"مقبول في {country}","poa.kindDated":"{kind}، صادر خلال آخر {days} يومًا","poa.kinds.utility_bill":"فاتورة كهرباء أو ماء أو غاز","poa.kinds.telecom_bill":"فاتورة هاتف أو إنترنت","poa.kinds.bank_statement":"كشف حساب بنكي","poa.kinds.tax_notice":"إشعار ضريبي","poa.kinds.rental_agreement":"عقد إيجار","poa.kinds.government_certificate":"شهادة السكن","poa.kinds.insurance_statement":"وثيقة تأمين","poa.source.camera":"التقاط صورة","poa.source.upload":"رفع ملف","poa.source.lead":"صورة للوثيقة، أو ملف PDF أو صورة من جهازك","poa.upload.hint":"PDF أو JPEG أو PNG، بحد أقصى 3 صفحات و10 ميغابايت","poa.upload.choose":"اختيار ملف","poa.upload.addPage":"إضافة صفحة","poa.upload.pages":"{count} من 3 صفحات","poa.upload.send":"إرسال الوثيقة","poa.upload.sending":"جارٍ إرسال وثيقتك…","poa.upload.unsupported":"نوع الملف هذا غير مقبول. اختر ملف PDF أو JPEG أو PNG","poa.upload.tooManyPages":"أرسل 3 صفحات على الأكثر. احذف صفحة أو اختر ملفًا أقصر","poa.upload.tooLarge":"حجم الملف يتجاوز 10 ميغابايت. اختر ملفًا أصغر","poa.upload.failed":"تعذّر إرسال الوثيقة. تحقّق من اتصالك وحاول مرة أخرى","poa.camera.lead":"ضع الوثيقة بشكل مسطّح واملأ الإطار. التقط صورة واحدة لكل صفحة","poa.camera.capture":"التقاط الصورة","poa.camera.retake":"إعادة الالتقاط","poa.camera.next":"الصفحة التالية","poa.camera.page":"الصفحة {number}","poa.letter.title":"رسالة من صاحب الفاتورة","poa.letter.lead":"الوثيقة باسم شخص آخر. أضف رسالة موقّعة من هذا الشخص تفيد بأنك تسكن في هذا العنوان","poa.letter.send":"إرسال الرسالة","poa.licence.use":"استخدام العنوان المذكور في رخصة القيادة","poa.licence.note":"قرأنا هذا العنوان من رخصتك. لا تحتاج إلى وثيقة أخرى.","poa.retry.document_too_old":"هذه الوثيقة أقدم من المسموح. ارفع وثيقة أحدث من القائمة أدناه","poa.retry.document_date_invalid":"تاريخ الوثيقة في المستقبل. ارفع وثيقة بتاريخ اليوم أو قبله","poa.retry.document_kind_not_accepted":"نوع هذه الوثيقة غير مقبول. ارفع إحدى الوثائق المذكورة أدناه","poa.retry.name_mismatch":"الاسم في الوثيقة لا يطابق اسمك. ارفع وثيقة باسمك","poa.retry.address_mismatch":"العنوان في الوثيقة لا يطابق العنوان الذي وصلنا. ارفع وثيقة لهذا العنوان","poa.retry.holder_letter_missing":"يجب أن تكون الرسالة موقّعة وأن تذكر اسمك واسم صاحب الفاتورة. ارفع رسالة كاملة","poa.retry.unreadable":"تعذّرت قراءة الوثيقة. ارفع نسخة كاملة وأكثر وضوحًا","poa.retry.pdf_protected":"أزل كلمة المرور من ملف PDF وحاول مرة أخرى","poa.retry.provider_unavailable":"تعذّر فحص الوثيقة حاليًا. حاول مرة أخرى بعد قليل","poa.hint.blurry":"الصورة غير واضحة","poa.hint.cropped":"جزء من الوثيقة مقطوع","poa.hint.glare":"يوجد انعكاس ضوء على الوثيقة","reasons.provider_unavailable":"تعذّر فحص الوثيقة حاليًا","reasons.pdf_protected":"ملف PDF محمي بكلمة مرور أو يحتوي على محتوى نشط","reasons.document_kind_not_accepted":"نوع الوثيقة غير مقبول","reasons.document_date_invalid":"تاريخ الوثيقة في المستقبل","reasons.document_too_old":"الوثيقة قديمة جدًا","reasons.document_tampered":"يبدو أن الوثيقة قد عُدّلت","reasons.holder_letter_required":"يلزم تقديم رسالة من صاحب الفاتورة","reasons.holder_letter_missing":"رسالة صاحب الفاتورة مفقودة أو غير مكتملة","reasons.address_mismatch":"العنوان لا يطابق العنوان المقدَّم"};var v={"poa.title":"Proof of address","poa.lead":"Upload a recent document that shows your name and your current address.","poa.accepted":"Accepted documents","poa.acceptedFor":"Accepted for {country}","poa.kindDated":"{kind}, dated within the last {days} days","poa.kinds.utility_bill":"Electricity, water or gas bill","poa.kinds.telecom_bill":"Phone or internet bill","poa.kinds.bank_statement":"Bank statement","poa.kinds.tax_notice":"Tax notice","poa.kinds.rental_agreement":"Rental agreement","poa.kinds.government_certificate":"Residence certificate","poa.kinds.insurance_statement":"Insurance statement","poa.source.camera":"Take a photo","poa.source.upload":"Upload a file","poa.source.lead":"A photo of the document, or a PDF or image from your device","poa.upload.hint":"PDF, JPEG or PNG, up to 3 pages and 10 MB","poa.upload.choose":"Choose a file","poa.upload.addPage":"Add a page","poa.upload.pages":"{count} of 3 pages","poa.upload.send":"Send document","poa.upload.sending":"Sending your document…","poa.upload.unsupported":"This file type is not accepted. Choose a PDF, JPEG or PNG","poa.upload.tooManyPages":"Send at most 3 pages. Remove a page or choose a shorter file","poa.upload.tooLarge":"The file is over 10 MB. Choose a smaller file","poa.upload.failed":"We could not send the document. Check your connection and try again","poa.camera.lead":"Lay the document flat and fill the frame. Take one photo per page","poa.camera.capture":"Take photo","poa.camera.retake":"Retake","poa.camera.next":"Next page","poa.camera.page":"Page {number}","poa.letter.title":"Letter from the bill holder","poa.letter.lead":"The document is in another person's name. Add a signed letter from that person saying that you live at this address","poa.letter.send":"Send letter","poa.licence.use":"Use the address on my driver's license","poa.licence.note":"We read this address from your license. You don't need another document.","poa.retry.document_too_old":"This document is older than allowed. Upload a more recent one from the list below","poa.retry.document_date_invalid":"The date on the document is in the future. Upload a document with today's date or earlier","poa.retry.document_kind_not_accepted":"This document type is not accepted. Upload one of the documents listed below","poa.retry.name_mismatch":"The name on the document does not match yours. Upload a document in your name","poa.retry.address_mismatch":"The address on the document does not match the one we were given. Upload a document for that address","poa.retry.holder_letter_missing":"The letter must be signed and name both you and the bill holder. Upload a complete letter","poa.retry.unreadable":"We could not read the document. Upload a sharper, complete copy","poa.retry.pdf_protected":"Remove the password from the PDF and try again","poa.retry.provider_unavailable":"The document could not be checked right now. Try again in a moment","poa.hint.blurry":"The image is blurry","poa.hint.cropped":"Part of the document is cut off","poa.hint.glare":"There is glare on the document","reasons.provider_unavailable":"The document could not be checked right now","reasons.pdf_protected":"The PDF is password-protected or contains active content","reasons.document_kind_not_accepted":"The document type is not accepted","reasons.document_date_invalid":"The document date is in the future","reasons.document_too_old":"The document is too old","reasons.document_tampered":"The document appears to have been edited","reasons.holder_letter_required":"A letter from the bill holder is needed","reasons.holder_letter_missing":"The letter from the bill holder is missing or incomplete","reasons.address_mismatch":"The address does not match the one supplied"};var G={"poa.title":"Justificatif de domicile","poa.lead":"Importez un document récent qui indique votre nom et votre adresse actuelle.","poa.accepted":"Documents acceptés","poa.acceptedFor":"Accepté pour {country}","poa.kindDated":"{kind}, daté des {days} derniers jours","poa.kinds.utility_bill":"Facture d'électricité, d'eau ou de gaz","poa.kinds.telecom_bill":"Facture de téléphone ou d'internet","poa.kinds.bank_statement":"Relevé bancaire","poa.kinds.tax_notice":"Avis d'imposition","poa.kinds.rental_agreement":"Bail ou quittance de loyer","poa.kinds.government_certificate":"Certificat de résidence","poa.kinds.insurance_statement":"Attestation d'assurance","poa.source.camera":"Prendre une photo","poa.source.upload":"Importer un fichier","poa.source.lead":"Une photo du document, ou un PDF ou une image depuis votre appareil","poa.upload.hint":"PDF, JPEG ou PNG, 3 pages et 10 Mo au maximum","poa.upload.choose":"Choisir un fichier","poa.upload.addPage":"Ajouter une page","poa.upload.pages":"{count} sur 3 pages","poa.upload.send":"Envoyer le document","poa.upload.sending":"Envoi de votre document…","poa.upload.unsupported":"Ce type de fichier n'est pas accepté. Choisissez un PDF, un JPEG ou un PNG","poa.upload.tooManyPages":"Envoyez 3 pages au maximum. Retirez une page ou choisissez un fichier plus court","poa.upload.tooLarge":"Le fichier dépasse 10 Mo. Choisissez un fichier plus léger","poa.upload.failed":"Nous n'avons pas pu envoyer le document. Vérifiez votre connexion et réessayez","poa.camera.lead":"Posez le document à plat et remplissez le cadre. Prenez une photo par page","poa.camera.capture":"Prendre la photo","poa.camera.retake":"Reprendre","poa.camera.next":"Page suivante","poa.camera.page":"Page {number}","poa.letter.title":"Lettre du titulaire de la facture","poa.letter.lead":"Le document est au nom d'une autre personne. Ajoutez une lettre signée de cette personne attestant que vous habitez à cette adresse","poa.letter.send":"Envoyer la lettre","poa.licence.use":"Utiliser l'adresse de mon permis de conduire","poa.licence.note":"Nous avons lu cette adresse sur votre permis. Vous n'avez pas besoin d'un autre document.","poa.retry.document_too_old":"Ce document est plus ancien que la limite. Importez un document plus récent parmi ceux de la liste ci-dessous","poa.retry.document_date_invalid":"La date du document est dans le futur. Importez un document daté d'aujourd'hui ou d'avant","poa.retry.document_kind_not_accepted":"Ce type de document n'est pas accepté. Importez l'un des documents de la liste ci-dessous","poa.retry.name_mismatch":"Le nom sur le document ne correspond pas au vôtre. Importez un document à votre nom","poa.retry.address_mismatch":"L'adresse du document ne correspond pas à celle qui nous a été transmise. Importez un document pour cette adresse","poa.retry.holder_letter_missing":"La lettre doit être signée et nommer à la fois vous et le titulaire de la facture. Importez une lettre complète","poa.retry.unreadable":"Nous n'avons pas pu lire le document. Importez une copie plus nette et complète","poa.retry.pdf_protected":"Retirez le mot de passe du PDF et réessayez","poa.retry.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment. Réessayez dans un instant","poa.hint.blurry":"L'image est floue","poa.hint.cropped":"Une partie du document est coupée","poa.hint.glare":"Il y a un reflet sur le document","reasons.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment","reasons.pdf_protected":"Le PDF est protégé par un mot de passe ou contient du contenu actif","reasons.document_kind_not_accepted":"Ce type de document n'est pas accepté","reasons.document_date_invalid":"La date du document est dans le futur","reasons.document_too_old":"Le document est trop ancien","reasons.document_tampered":"Le document semble avoir été modifié","reasons.holder_letter_required":"Une lettre du titulaire de la facture est nécessaire","reasons.holder_letter_missing":"La lettre du titulaire de la facture est absente ou incomplète","reasons.address_mismatch":"L'adresse ne correspond pas à celle qui a été transmise"};import{useEffect as K,useRef as q,useState as S}from"react";import{Fragment as X,jsx as i,jsxs as P}from"react/jsx-runtime";function Q({blob:o,label:n}){let[e,a]=S(void 0);return K(()=>{if(typeof URL.createObjectURL!="function")return;let r=URL.createObjectURL(o);return a(r),()=>URL.revokeObjectURL(r)},[o]),i("img",{src:e,alt:n})}d(Q,"PageThumb");function J({step:o,i18n:n,c:e,title:a,notice:r,intro:c,onUpload:p}){let h=q(null),s=q(null),[l,g]=S([]),[m,b]=S(!1),[C,L]=S("idle"),[V,A]=S(!1),w=d(u=>{b(!1),u.start().catch(()=>b(!0))},"open");K(()=>{let u=h.current;if(u===null)return;let f;try{f=o.capturePage({video:u})}catch{b(!0);return}return s.current=f,w(f),()=>{f.destroy(),s.current=null}},[]);let I=l.length>=o.maxPages,$=d(async()=>{let u=s.current;if(!(u===null||I)){L("taking"),A(!1);try{await u.takePage()}catch{}g([...u.pages]),L("idle")}},"take"),W=d(u=>{let f=s.current;f!==null&&(f.removePage(u),g([...f.pages]))},"retake"),Y=d(async()=>{let u=s.current;if(!(u===null||l.length===0)){L("sending"),A(!1);try{await u.submitPages()}catch{A(!0)}L("idle")}},"send"),N=C==="sending";return P("section",{className:"sekyro-step","data-testid":"sekyro-poa-camera",children:[i(T,{title:a,lead:e("poa.camera.lead")}),r,V?i(_,{tone:"danger",children:i("span",{children:e("poa.upload.failed")})}):null,m?P(_,{tone:"danger",children:[i("span",{children:e("doc.cameraBlocked")}),i("span",{children:e("doc.cameraBlockedHint")}),s.current!==null?i(y,{kind:"secondary",onClick:()=>s.current!==null&&w(s.current),children:e("doc.retryCamera")}):null]}):null,l.length===0?c:null,i("video",{ref:h,className:"sekyro-poa-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),l.length>0?P(X,{children:[i("p",{className:"sekyro-text-muted",role:"status",children:e("poa.upload.pages",{count:l.length})}),i("ul",{className:"sekyro-poa-pages",children:l.map((u,f)=>{let z=e("poa.camera.page",{number:f+1});return P("li",{children:[i(Q,{blob:u,label:z}),i(y,{kind:"ghost",onClick:()=>W(f),disabled:N,"aria-label":`${e("poa.camera.retake")} ${z}`,children:e("poa.camera.retake")})]},f)})})]}):null,N?i("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,P(x,{children:[P(y,{full:!0,kind:l.length>0?"secondary":"primary",onClick:()=>{$()},disabled:I||m||C!=="idle"||o.attemptsExhausted,"aria-busy":C==="taking"||void 0,children:[i(R,{name:"camera"}),e("poa.camera.capture")]}),l.length>0?i(y,{full:!0,onClick:()=>{Y()},disabled:C!=="idle","aria-busy":N||void 0,children:e("poa.upload.send")}):null,p!==void 0?i(y,{full:!0,kind:"ghost",onClick:p,disabled:N,children:e("poa.source.upload")}):null]})]})}d(J,"PageCamera");import{Fragment as pe,jsx as t,jsxs as k}from"react/jsx-runtime";var oe={en:v,fr:G,ar:M,es:v,pt:v,de:v},te="image/jpeg,image/png,image/heic,image/heif,application/pdf";function ae(o){let n=o.strings,e=oe[o.locale];return(a,r)=>F(n[a]??e[a]??"",r)}d(ae,"poaCopy");function U({step:o,i18n:n,c:e}){if(o.reason===void 0)return null;let a=e(`poa.retry.${o.reason}`)||e(`reasons.${o.reason}`)||e("poa.retry.unreadable");return k(_,{tone:"warning",children:[t("span",{children:a}),t("span",{children:D(n,o.attemptsRemaining,o.attemptsExhausted)})]})}d(U,"RetryNotice");function j({step:o,i18n:n,c:e}){let a=Z(),{country:r}=o.rule,c=r===null?e("poa.accepted"):e("poa.acceptedFor",{country:H(r,n.locale)});return k("div",{className:"sekyro-poa-accepted",children:[t("p",{id:a,className:"sekyro-poa-accepted__title",children:c}),t("ul",{className:"sekyro-poa-list","aria-labelledby":a,children:o.rule.kinds.map(p=>t("li",{children:e("poa.kindDated",{kind:e(`poa.kinds.${p.kind}`)||p.kind,days:p.maxAgeDays})},p.kind))})]})}d(j,"AcceptedList");var ne={unsupported:"poa.upload.unsupported",tooMany:"poa.upload.tooManyPages",tooLarge:"poa.upload.tooLarge",failed:"poa.upload.failed"};function re(o){return o instanceof TypeError&&o.message==="unsupported_file"?"unsupported":o instanceof RangeError&&o.message==="file_too_large"?"tooLarge":o instanceof RangeError&&(o.message==="too_many_pages"||o.message==="no_pages")?"tooMany":"failed"}d(re,"refusalOf");function se({step:o,i18n:n,c:e,letter:a,onCamera:r}){let c=ee(null),[p,h]=E("idle"),s=p==="sending",l=d(async g=>{let m=Array.from(g.currentTarget.files??[]);if(g.currentTarget.value="",m.length!==0){if(m.length>o.maxPages){h("tooMany");return}h("sending");try{await(a?o.uploadHolderLetter(m):o.uploadPages(m)),h("idle")}catch(b){h(re(b))}}},"onFiles");return k("section",{className:"sekyro-step","data-testid":a?"sekyro-poa-letter":"sekyro-poa-upload",children:[t(T,{title:e(a?"poa.letter.title":"poa.title"),lead:e(a?"poa.letter.lead":"poa.lead")}),p==="idle"||s?t(U,{step:o,i18n:n,c:e}):null,p!=="idle"&&!s?t(_,{tone:"danger",children:t("span",{children:e(ne[p])})}):null,a?null:t(j,{step:o,i18n:n,c:e}),t("p",{className:"sekyro-text-muted",children:e("poa.upload.hint")}),s?t("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,t("input",{ref:c,type:"file",accept:te,multiple:!0,hidden:!0,"data-testid":"sekyro-poa-file","aria-label":e(a?"poa.letter.title":"poa.title"),onChange:g=>{l(g)}}),k(x,{children:[t(y,{full:!0,onClick:()=>c.current?.click(),disabled:s||!o.photo.uploadOffered||o.attemptsExhausted,"aria-busy":s||void 0,children:e("poa.upload.choose")}),r!==void 0?k(y,{full:!0,kind:"ghost",onClick:r,disabled:s,children:[t(R,{name:o.photo.cameraOnPhone===!0?"smartphone":"camera"}),o.photo.cameraOnPhone===!0?e("capture.source.phone"):e("poa.source.camera")]}):null]})]})}d(se,"UploadScreen");function de({step:o,c:n}){let[e,a]=E("idle"),r=o.useLicenceAddress;if(r===void 0)return null;let c=d(async()=>{a("sending");try{await r(),a("idle")}catch{a("failed")}},"onUse");return k("div",{className:"sekyro-poa-licence","data-testid":"sekyro-poa-licence",children:[t("p",{className:"sekyro-text-muted",children:n("poa.licence.note")}),e==="failed"?t(_,{tone:"danger",children:t("span",{children:n("poa.upload.failed")})}):null,t(y,{full:!0,kind:"secondary",onClick:()=>{c()},disabled:e==="sending"||o.attemptsExhausted,"aria-busy":e==="sending"||void 0,children:n("poa.licence.use")})]})}d(de,"LicenceShortcut");function we({step:o,i18n:n}){let e=ae(n),[a,r]=E(null),c=o.phase==="holder_letter",p=o.photo.source,h=p==="choice"?a??o.photo.pick:p,s=o.photo.cameraOnPhone===!0,l=o.photo.uploadOffered?()=>r("upload"):void 0,g=e(c?"poa.letter.title":"poa.title"),m;return h===null?m=t(O,{testId:"sekyro-poa-source",title:g,lead:e("poa.source.lead"),cameraLabel:e(s?"capture.source.phone":"poa.source.camera"),uploadLabel:e("poa.source.upload"),onPhone:s,notice:t(U,{step:o,i18n:n,c:e}),onCamera:()=>r("camera"),onUpload:()=>r("upload")}):h==="camera"&&s?m=t(B,{i18n:n,lead:e("handoff.lead.poa"),refresh:o.refresh,actions:l!==void 0?t(y,{kind:"ghost",full:!0,onClick:l,children:e("poa.source.upload")}):null}):h==="camera"?m=t(J,{step:o,i18n:n,c:e,title:g,notice:t(U,{step:o,i18n:n,c:e}),intro:c?null:t(j,{step:o,i18n:n,c:e}),...p==="choice"&&l!==void 0?{onUpload:l}:{}}):m=t(se,{step:o,i18n:n,c:e,letter:c,...p==="choice"?{onCamera:d(()=>r("camera"),"onCamera")}:{}}),k(pe,{children:[c?null:t(de,{step:o,c:e}),m]})}d(we,"ProofOfAddressView");export{te as POA_UPLOAD_ACCEPT,we as ProofOfAddressView,ae as poaCopy};