@sekyro/react 0.1.0-rc.13 → 0.1.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +6 -4
  3. package/dist/{chunk-PTPTDOWD.js → chunk-6EP4O2CE.js} +1 -1
  4. package/dist/{chunk-K7YYCJUR.js → chunk-AIBCIUYT.js} +1 -1
  5. package/dist/{chunk-34326C2I.js → chunk-IJE64ZEN.js} +1 -1
  6. package/dist/{chunk-LNZR3RXG.js → chunk-JCCXPYU4.js} +1 -1
  7. package/dist/{chunk-Y37ZXFOA.js → chunk-TLHEN5T3.js} +1 -1
  8. package/dist/{chunk-IDZNOWTO.js → chunk-TS3UFW5B.js} +1 -1
  9. package/dist/{chunk-Z5UFPMM6.js → chunk-UFAOAYQY.js} +1 -1
  10. package/dist/chunk-VKSX4KC3.js +2 -0
  11. package/dist/{chunk-4ZN7GIYK.js → chunk-Z43XZ75N.js} +1 -1
  12. package/dist/{document-capture-view-LR4OLZPG.js → document-capture-view-6NADWNPQ.js} +1 -1
  13. package/dist/{eid-view-OZETO2IS.js → eid-view-BKKVB5QT.js} +1 -1
  14. package/dist/{email-otp-view-2I346KUZ.js → email-otp-view-56JMHX3M.js} +1 -1
  15. package/dist/{flow-views-KKP7HKFG.js → flow-views-7FMODRP7.js} +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/{overlay-de-UTUY4YEE.js → overlay-de-PSIG4NLI.js} +1 -1
  19. package/dist/{overlay-es-XQFAQT24.js → overlay-es-36OOIBXG.js} +1 -1
  20. package/dist/{overlay-pt-2YEUC3J2.js → overlay-pt-NWIPFF4D.js} +1 -1
  21. package/dist/{portrait-capture-view-TNKPPDYM.js → portrait-capture-view-JYTBBXFU.js} +1 -1
  22. package/dist/verification/index.cjs +1 -1
  23. package/dist/verification/index.d.cts +7 -2
  24. package/dist/verification/index.d.ts +7 -2
  25. package/dist/verification/index.js +1 -1
  26. package/dist/verification.css +17 -7
  27. package/package.json +2 -2
  28. package/sbom.cdx.json +4 -4
  29. package/dist/chunk-WAVBS3GL.js +0 -2
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{a as U,b as R,c as N,d as Y}from"./chunk-IDZNOWTO.js";import{a as K}from"./chunk-PYAJMHZH.js";import{e as M,h as B}from"./chunk-Z5UFPMM6.js";import"./chunk-LNZR3RXG.js";import"./chunk-PTPTDOWD.js";import{a as E,b as I,c as H}from"./chunk-H2KIOYQU.js";import"./chunk-VRDPGOXM.js";import{d as P}from"./chunk-WAVBS3GL.js";import{a as x}from"./chunk-K7YYCJUR.js";import{a as w,u as S}from"./chunk-34326C2I.js";import{a as m}from"./chunk-2KED7D2Q.js";import{HostedApiError as fe}from"@sekyro/web";import{detectIsMobile as J}from"@sekyro/web/core";import{useEffect as q,useId as F,useMemo as C,useRef as ye,useState as _}from"react";var $={"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":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","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":"المتابعة هنا على أي حال"};var A={"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 to continue","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","choice.title":"How do you want to continue?","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"How do you want to get 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 this page 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"};var G={"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":"Cette étape nécessite une caméra","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 l'accès à la caméra pour continuer","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","choice.title":"Comment voulez-vous continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Comment voulez-vous recevoir 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 cette page dans votre 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"};var D=[[10,[[1,16]]],[16,[[1,28]]],[26,[[1,44]]],[18,[[2,32]]],[24,[[2,43]]],[16,[[4,27]]],[18,[[4,31]]],[22,[[2,38],[2,39]]],[22,[[3,36],[2,37]]],[26,[[4,43],[1,44]]],[30,[[1,50],[4,51]]],[22,[[6,36],[2,37]]],[22,[[8,37],[1,38]]],[24,[[4,40],[5,41]]],[24,[[5,41],[5,42]]],[28,[[7,45],[3,46]]],[28,[[10,46],[1,47]]],[26,[[9,43],[4,44]]],[26,[[3,44],[11,45]]],[26,[[3,41],[13,42]]]],Q=D.length,re=0,L=m(e=>(D[e-1]?.[1]??[]).reduce((t,[n,o])=>t+n*o,0),"dataCapacity");function T(e,t){let n=0;for(let o=7;o>=0;o-=1)n=n<<1^(n>>>7)*285,n^=(t>>>o&1)*e;return n&255}m(T,"gfMul");function ae(e){let t=new Array(e).fill(0);t[e-1]=1;let n=1;for(let o=0;o<e;o+=1){for(let a=0;a<e;a+=1)t[a]=T(t[a],n),a+1<e&&(t[a]=t[a]^t[a+1]);n=T(n,2)}return t}m(ae,"rsDivisor");function ie(e,t){let n=t.map(()=>0);for(let o of e){let a=o^n.shift();n.push(0),t.forEach((i,s)=>{n[s]=n[s]^T(i,a)})}return n}m(ie,"rsRemainder");function se(e,t){let n=[],o=m((p,d)=>{for(let b=d-1;b>=0;b-=1)n.push(p>>>b&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let p of e)o(p,8);let a=L(t)*8;o(0,Math.min(4,a-n.length)),o(0,(8-n.length%8)%8);let i=[];for(let p=0;p<n.length;p+=8)i.push(n.slice(p,p+8).reduce((d,b)=>d<<1|b,0));for(let p=236;i.length<L(t);p^=253)i.push(p);let[s,r]=D[t-1],c=ae(s),u=[],f=0;for(let[p,d]of r)for(let b=0;b<p;b+=1){let v=i.slice(f,f+d);f+=d,u.push({data:v,ec:ie(v,c)})}let h=[],y=Math.max(...u.map(p=>p.data.length));for(let p=0;p<y;p+=1)for(let d of u)p<d.data.length&&h.push(d.data[p]);for(let p=0;p<s;p+=1)for(let d of u)h.push(d.ec[p]);return h}m(se,"codewords");function ce(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=Math.ceil((e*4+4)/(t*2-2))*2,o=[6];for(let a=e*4+10;o.length<t;a-=n)o.splice(1,0,a);return o}m(ce,"alignmentPositions");var ue=[(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],O=class O{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,n,o){this.dark[t*this.size+n]=o,this.fixed[t*this.size+n]=!0}get(t,n){return this.dark[t*this.size+n]===!0}};m(O,"Grid");var V=O;function le(e,t){let n=e.size;for(let i=0;i<n;i+=1)e.set(6,i,i%2===0),e.set(i,6,i%2===0);for(let[i,s]of[[3,3],[3,n-4],[n-4,3]])for(let r=-4;r<=4;r+=1)for(let c=-4;c<=4;c+=1){let u=i+r,f=s+c;if(u<0||u>=n||f<0||f>=n)continue;let h=Math.max(Math.abs(r),Math.abs(c));e.set(u,f,h!==2&&h!==4)}let o=ce(t),a=o.length-1;if(o.forEach((i,s)=>o.forEach((r,c)=>{if(!(s===0&&c===0||s===0&&c===a||s===a&&c===0))for(let u=-2;u<=2;u+=1)for(let f=-2;f<=2;f+=1)e.set(i+u,r+f,Math.max(Math.abs(u),Math.abs(f))!==1)})),W(e,0),t>=7){let i=t;for(let r=0;r<12;r+=1)i=i<<1^(i>>>11)*7973;let s=t<<12|i;for(let r=0;r<18;r+=1){let c=(s>>>r&1)===1,u=n-11+r%3,f=Math.floor(r/3);e.set(u,f,c),e.set(f,u,c)}}}m(le,"drawFunctionPatterns");function W(e,t){let n=e.size,o=re<<3|t,a=o;for(let r=0;r<10;r+=1)a=a<<1^(a>>>9)*1335;let i=(o<<10|a)^21522,s=m(r=>(i>>>r&1)===1,"bit");for(let r=0;r<=5;r+=1)e.set(r,8,s(r));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let r=9;r<15;r+=1)e.set(8,14-r,s(r));for(let r=0;r<8;r+=1)e.set(8,n-1-r,s(r));for(let r=8;r<15;r+=1)e.set(n-15+r,8,s(r));e.set(n-8,8,!0)}m(W,"drawFormat");function me(e,t){let n=e.size,o=0;for(let a=n-1;a>=1;a-=2){a===6&&(a=5);for(let i=0;i<n;i+=1)for(let s=0;s<2;s+=1){let r=a-s,u=(a+1&2)===0?n-1-i:i;e.fixed[u*n+r]!==!0&&(o<t.length*8&&(e.dark[u*n+r]=(t[o>>>3]>>>7-(o&7)&1)===1),o+=1)}}}m(me,"placeData");function pe(e,t){let n=ue[t];for(let o=0;o<e.size;o+=1)for(let a=0;a<e.size;a+=1)e.fixed[o*e.size+a]!==!0&&n(o,a)&&(e.dark[o*e.size+a]=!e.dark[o*e.size+a])}m(pe,"applyMask");function de(e){let t=e.size,n=0,o=m(i=>{let s=1;for(let r=1;r<=t;r+=1)r<t&&i(r)===i(r-1)?s+=1:(s>=5&&(n+=3+(s-5)),s=1);for(let r=0;r+10<t;r+=1){let c=[!0,!1,!0,!0,!0,!1,!0];if(!(c.every((y,p)=>i(r+p)===y)||c.every((y,p)=>i(r+4+p)===y)))continue;let f=[0,1,2,3].every(y=>!i(r+y))&&c.every((y,p)=>i(r+4+p)===y),h=c.every((y,p)=>i(r+p)===y)&&[7,8,9,10].every(y=>!i(r+y));f&&(n+=40),h&&(n+=40)}},"line");for(let i=0;i<t;i+=1)o(s=>e.get(i,s));for(let i=0;i<t;i+=1)o(s=>e.get(s,i));for(let i=0;i+1<t;i+=1)for(let s=0;s+1<t;s+=1){let r=e.get(i,s);r===e.get(i,s+1)&&r===e.get(i+1,s)&&r===e.get(i+1,s+1)&&(n+=3)}let a=e.dark.filter(Boolean).length;return n+=Math.floor(Math.abs(a*20-t*t*10)/(t*t))*10,n}m(de,"penalty");function j(e,t={}){let n=new TextEncoder().encode(e),o=1;for(;o<=Q&&!(4+(o<10?8:16)+n.length*8<=L(o)*8);o+=1);if(o>Q)throw new RangeError("text too long for a QR code");let a=se(n,o),i=m(c=>{let u=new V(o*4+17);return le(u,o),me(u,a),pe(u,c),W(u,c),u},"build"),s=null;if(t.mask!==void 0)s=i(t.mask);else{let c=Number.POSITIVE_INFINITY;for(let u=0;u<8;u+=1){let f=i(u),h=de(f);h<c&&(c=h,s=f)}}let r=s;return{size:r.size,get:m((c,u)=>r.get(c,u),"get")}}m(j,"encodeQr");function X(e,t=4){let n=[];for(let o=0;o<e.size;o+=1)for(let a=0;a<e.size;a+=1)e.get(o,a)&&n.push(`M${a+t} ${o+t}h1v1h-1z`);return{size:e.size+t*2,d:n.join("")}}m(X,"qrPath");import{Fragment as Ce,jsx as l,jsxs as k}from"react/jsx-runtime";var he={en:A,fr:G,ar:$,es:A,pt:A,de:A},Z={en:I,fr:H,ar:E,es:I,pt:I,de:I};function g(e){let t=e.strings;return(n,o)=>P(t[n]??he[e.locale][n]??"",o)}m(g,"flowT");function ee(e,t){let n=g(t);return e.flatMap(o=>{let a=o.service==="phone_otp"?n("contact.phone"):o.service==="email_otp"?n("contact.email"):R(o,t),i=U[o.service];return a===null?[]:[{id:o.id,label:a,...i!==void 0?{glyph:l(K,{name:i})}:{}}]})}m(ee,"labelled");function te({step:e,i18n:t,onError:n}){let o=g(t),{busy:a,error:i,run:s}=N(t,n),r=e.kind==="contact_choice";return l(M,{title:o(r?"contact.title":"choice.title"),description:o(r?"contact.description":"choice.description"),options:ee(e.choice.options,t),busy:a,error:i,focus:!0,testId:r?"sekyro-contact-choice":"sekyro-choice",onChoose:c=>s(()=>e.choose(c))})}m(te,"PlanChoiceView");var Ge=te,Qe=te;function We({step:e,i18n:t,onError:n,onOpen:o}){let a=g(t),{busy:i,error:s,run:r}=N(t,n),c=e,u=e.context.switchable,f=u===void 0?[]:u.options.filter(v=>v.id!==u.current),h=c.kind==="registry"&&(c.reason==="nni_not_found"||c.reason==="registry_record_not_found")&&c.canUseDocument||c.kind==="eid"&&c.reason?.startsWith("eid_")&&c.canUseCamera,y=f.length===1?f[0]:void 0,p=y!==void 0&&(y.service==="phone_otp"||y.service==="email_otp"),d=p&&c.canSwitch&&c.switchTo!==void 0?()=>c.switchTo.call(e):c.chooseOption===void 0||y===void 0?void 0:()=>c.chooseOption.call(e,y.id);if(f.length===0||h||y!==void 0&&(d===void 0||b()===null)||y===void 0&&c.chooseOption===void 0)return null;function b(){return y===void 0?a("choice.switch"):y.service==="phone_otp"||y.service==="email_otp"?a("contact.switch"):c.kind==="registry"&&y.service==="document"?t.t("population.useDocument"):c.kind==="eid"?t.strings["eid.useCamera"]??Z[t.locale]["eid.useCamera"]:R(y,t)}return m(b,"labelOf"),k("div",{className:"sekyro-stack sekyro-stack--1",children:[s!==null?l(x,{tone:"danger",children:l("span",{children:s})}):null,l(w,{kind:"ghost",disabled:i,"aria-busy":i||void 0,onClick:()=>d===void 0?o():r(d),"data-testid":p?"sekyro-contact-switch":"sekyro-lane-switch",children:b()})]})}m(We,"LaneSwitch");function je({step:e,i18n:t,onError:n,onClose:o}){let a=g(t),{busy:i,error:s,run:r}=N(t,n),c=e.context.switchable,u=e.chooseOption;return c===void 0||u===void 0?null:l(M,{title:a("choice.title"),description:a("choice.description"),options:ee(c.options,t),...c.current!==null?{marked:c.current}:{},busy:i,error:s,focus:!0,testId:"sekyro-lane-choice",onChoose:f=>f===c.current?o():r(()=>u.call(e,f))})}m(je,"LaneChoiceView");var be=[["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 ke(e){let[t,n]=_(null);return q(()=>{if(!e.portraitAvailable)return;let o=!0,a=null;return e.portrait().then(i=>{!o||i===null||!i.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(a=URL.createObjectURL(i),n(a))}),()=>{o=!1,a!==null&&URL.revokeObjectURL(a)}},[e.portraitAvailable]),t}m(ke,"usePortraitUrl");function Xe({step:e,i18n:t,onError:n}){let o=g(t),a=F(),i=S(),s=ke(e),{busy:r,error:c,run:u}=N(t,n),f=e.context.orgName,h=["registry","document","chip"].find(d=>d===e.source),y=e.summaryKind==="partial",p=m(d=>t.strings[`doc.type.${d}`]??d,"documentLabel");return k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":a,"data-testid":"sekyro-identity-summary",children:[k("div",{className:"sekyro-stack sekyro-stack--1",children:[l("h2",{id:a,ref:i,tabIndex:-1,className:"sekyro-text-body",children:o("summary.title")}),l("p",{className:"sekyro-text-muted",children:o("summary.description")}),h!==void 0?l("p",{className:"sekyro-text-muted",children:o(`summary.source.${h}`)}):null]}),k("div",{className:"sekyro-summary",children:[s!==null?l("img",{className:"sekyro-summary__portrait",src:s,alt:o("summary.portraitAlt")}):null,l("dl",{className:"sekyro-summary__list",children:be.map(([d,b,v])=>{let z=d==="idNumberMasked"?e.idNumberMasked??e.nniMasked:e[d];return z===void 0?null:k("div",{className:"sekyro-summary__row",children:[l("dt",{className:"sekyro-text-muted",children:o(d==="fullName"&&y?"summary.name":b)}),l("dd",{children:v?l("bdi",{dir:"ltr",children:z}):d==="documentType"?p(z):z})]},d)})})]}),c!==null?l(x,{tone:"danger",children:l("span",{children:c})}):null,k("div",{className:"sekyro-stack sekyro-stack--3",children:[l(w,{full:!0,disabled:r,"aria-busy":r||void 0,onClick:()=>u(()=>e.confirm()),children:o("summary.confirm")}),e.retakeAvailable?l(w,{kind:"ghost",full:!0,disabled:r,onClick:()=>u(()=>e.retake()),children:o(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):l("p",{className:"sekyro-text-muted",children:o("summary.noRetake",{org:f})})]})]})}m(Xe,"IdentitySummaryView");var ge=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Je({step:e,i18n:t,livenessProps:n,sekyroIntro:o}){let a=g(t),[i,s]=_(null);q(()=>e.onLivePhoto(d=>{let b=d.update?.coach;s(d.holding||b===void 0?null:t.t(`portrait.coach.${b}`))}),[e,t]);let r=e.instructions==="icao",c=e.icao?.profile==="selfie",u=C(()=>r?ge.filter(d=>!c||d!=="background").map(d=>({id:d,text:a(`capture.tipsIcao.${d}`)})):void 0,[r,c,t]),f=C(()=>r&&!c?{...n.strings,"capture.tips.title":a("capture.tipsIcao.title")}:n.strings,[r,c,n.strings,t]),h=c?void 0:a("capture.tipsIcao.title"),y=C(()=>o===!0&&u!==void 0?{...n.slots,intro:m((d,b)=>l(Y,{start:d,context:b,tips:u,...h!==void 0?{tipsTitle:h}:{}}),"intro")}:n.slots,[o,u,h,n.slots,t]),p=c?`${(u??[]).map(d=>d.text).join(". ")}.`:a("capture.tipsIcao.summary");return l(B,{...n,...y!==void 0?{slots:y}:{},...f!==void 0?{strings:f}:{},...u!==void 0?{tips:u,tipsSummary:p}:{},coach:i})}m(Je,"LivePhotoLiveness");function Ze({i18n:e}){let t=g(e);return k(x,{tone:"info",children:[l("strong",{children:t("portrait.retakeOnly")}),l("span",{children:t("portrait.keepCamera")})]})}m(Ze,"PortraitRetakeNotice");function et({i18n:e,provider:t}){let n=e.strings,o=m(a=>n[a]??Z[e.locale][a]??"","pick");return l("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?P(o("eid.continueHint"),{provider:t}):o("eid.continueHintGeneric")})}m(et,"EidContinueHint");async function we(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(we,"copy");function oe({url:e,i18n:t,label:n}){let o=g(t),[a,i]=_("idle"),s=n.startsWith("inApp.")?"inApp":"handoff";return k("div",{className:"sekyro-stack sekyro-stack--1",children:[l(w,{kind:"ghost",onClick:()=>{we(e).then(r=>i(r?"copied":"failed"))},children:o(n)}),l("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:a==="idle"?"":o(`${s}.${a==="copied"?"copied":"copyFailed"}`)})]})}m(oe,"CopyLink");function ne({url:e,i18n:t,refresh:n,footer:o}){let a=g(t),i=F(),s=C(()=>{try{return X(j(e))}catch{return null}},[e]),r=ye(n);r.current=n;let c=S();return q(()=>{let u=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&r.current?.().catch(()=>{})},5e3);return()=>clearInterval(u)},[]),k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":i,"data-testid":"sekyro-handoff",children:[l("h2",{id:i,ref:c,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),l("p",{className:"sekyro-text-muted",children:a("handoff.description")}),s!==null?k("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":a("handoff.qrAlt"),shapeRendering:"crispEdges",children:[l("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),l("path",{d:s.d,className:"sekyro-qr__fg"})]}):null,l(oe,{url:e,i18n:t,label:"handoff.copyLink"}),l("p",{className:"sekyro-text-muted",children:a("handoff.waiting")}),o??null]})}m(ne,"HandoffView");var ve=["intro","data","processing","sharing","retention"];function tt({i18n:e}){let t=g(e);return l(Ce,{children:ve.map(n=>l("p",{children:t(`consent.human.terms.${n}`)},n))})}m(tt,"HumanConsentTerms");function ot({url:e,i18n:t}){return C(()=>!J(),[])?l(ne,{url:e,i18n:t}):null}m(ot,"DesktopHandoffView");function nt({i18n:e,cause:t,onRetry:n,onContinue:o,handoffUrl:a}){let i=g(e),s=F(),r=S(),[c,u]=_("idle"),f=C(()=>a!==void 0&&!J(),[a]),h=t==="denied",y=m(()=>{o!==void 0&&(u("busy"),o(t).then(()=>u("idle"),p=>u(p instanceof fe&&p.code==="check_out_of_order"?"idle":"failed")))},"end");return k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":s,"data-testid":"sekyro-no-camera","data-cause":t,children:[f&&a!==void 0?l(ne,{url:a,i18n:e}):null,l("h2",{id:s,ref:r,tabIndex:-1,className:"sekyro-text-body",children:i(h?"capture.noCamera.deniedTitle":"capture.noCamera.title")}),l("p",{className:"sekyro-text-muted",children:i(h?"capture.noCamera.deniedBody":"capture.noCamera.body")}),c==="failed"?l(x,{tone:"danger",children:l("span",{children:e.t("errors.network_error")})}):null,l(w,{kind:h?"primary":"ghost",onClick:n,children:e.t("common.retry")}),o!==void 0?l(w,{kind:"ghost",disabled:c==="busy","aria-busy":c==="busy"||void 0,onClick:y,children:i("capture.noCamera.continue")}):null]})}m(nt,"NoCameraView");function rt({url:e,i18n:t,onContinue:n}){let o=g(t),a=F(),i=S();return k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":a,"data-testid":"sekyro-in-app",children:[l("h2",{id:a,ref:i,tabIndex:-1,className:"sekyro-text-body",children:o("inApp.title")}),l("p",{className:"sekyro-text-muted",children:o("inApp.description")}),l(oe,{url:e,i18n:t,label:"inApp.copyLink"}),l(w,{kind:"ghost",onClick:n,children:o("inApp.continueAnyway")})]})}m(rt,"InAppBrowserPrompt");export{Ge as ContactChoiceView,ot as DesktopHandoffView,et as EidContinueHint,Qe as GenericChoiceView,ne as HandoffView,tt as HumanConsentTerms,Xe as IdentitySummaryView,rt as InAppBrowserPrompt,je as LaneChoiceView,We as LaneSwitch,Je as LivePhotoLiveness,nt as NoCameraView,Ze as PortraitRetakeNotice};
2
+ import{a as U,b as R,c as N,d as Y}from"./chunk-TS3UFW5B.js";import{a as K}from"./chunk-PYAJMHZH.js";import{e as M,h as B}from"./chunk-UFAOAYQY.js";import"./chunk-JCCXPYU4.js";import"./chunk-6EP4O2CE.js";import{a as E,b as I,c as H}from"./chunk-H2KIOYQU.js";import"./chunk-VRDPGOXM.js";import{d as P}from"./chunk-VKSX4KC3.js";import{a as x}from"./chunk-AIBCIUYT.js";import{a as w,u as S}from"./chunk-IJE64ZEN.js";import{a as m}from"./chunk-2KED7D2Q.js";import{HostedApiError as fe}from"@sekyro/web";import{detectIsMobile as J}from"@sekyro/web/core";import{useEffect as q,useId as F,useMemo as C,useRef as ye,useState as _}from"react";var $={"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":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","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":"المتابعة هنا على أي حال"};var A={"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 to continue","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","choice.title":"How do you want to continue?","choice.description":"Choose one option.","choice.switch":"Use another option","contact.title":"How do you want to get 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 this page 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"};var G={"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":"Cette étape nécessite une caméra","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 l'accès à la caméra pour continuer","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","choice.title":"Comment voulez-vous continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","contact.title":"Comment voulez-vous recevoir 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 cette page dans votre 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"};var D=[[10,[[1,16]]],[16,[[1,28]]],[26,[[1,44]]],[18,[[2,32]]],[24,[[2,43]]],[16,[[4,27]]],[18,[[4,31]]],[22,[[2,38],[2,39]]],[22,[[3,36],[2,37]]],[26,[[4,43],[1,44]]],[30,[[1,50],[4,51]]],[22,[[6,36],[2,37]]],[22,[[8,37],[1,38]]],[24,[[4,40],[5,41]]],[24,[[5,41],[5,42]]],[28,[[7,45],[3,46]]],[28,[[10,46],[1,47]]],[26,[[9,43],[4,44]]],[26,[[3,44],[11,45]]],[26,[[3,41],[13,42]]]],Q=D.length,re=0,L=m(e=>(D[e-1]?.[1]??[]).reduce((t,[n,o])=>t+n*o,0),"dataCapacity");function T(e,t){let n=0;for(let o=7;o>=0;o-=1)n=n<<1^(n>>>7)*285,n^=(t>>>o&1)*e;return n&255}m(T,"gfMul");function ae(e){let t=new Array(e).fill(0);t[e-1]=1;let n=1;for(let o=0;o<e;o+=1){for(let a=0;a<e;a+=1)t[a]=T(t[a],n),a+1<e&&(t[a]=t[a]^t[a+1]);n=T(n,2)}return t}m(ae,"rsDivisor");function ie(e,t){let n=t.map(()=>0);for(let o of e){let a=o^n.shift();n.push(0),t.forEach((i,s)=>{n[s]=n[s]^T(i,a)})}return n}m(ie,"rsRemainder");function se(e,t){let n=[],o=m((p,d)=>{for(let b=d-1;b>=0;b-=1)n.push(p>>>b&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let p of e)o(p,8);let a=L(t)*8;o(0,Math.min(4,a-n.length)),o(0,(8-n.length%8)%8);let i=[];for(let p=0;p<n.length;p+=8)i.push(n.slice(p,p+8).reduce((d,b)=>d<<1|b,0));for(let p=236;i.length<L(t);p^=253)i.push(p);let[s,r]=D[t-1],c=ae(s),u=[],f=0;for(let[p,d]of r)for(let b=0;b<p;b+=1){let v=i.slice(f,f+d);f+=d,u.push({data:v,ec:ie(v,c)})}let h=[],y=Math.max(...u.map(p=>p.data.length));for(let p=0;p<y;p+=1)for(let d of u)p<d.data.length&&h.push(d.data[p]);for(let p=0;p<s;p+=1)for(let d of u)h.push(d.ec[p]);return h}m(se,"codewords");function ce(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=Math.ceil((e*4+4)/(t*2-2))*2,o=[6];for(let a=e*4+10;o.length<t;a-=n)o.splice(1,0,a);return o}m(ce,"alignmentPositions");var ue=[(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],O=class O{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,n,o){this.dark[t*this.size+n]=o,this.fixed[t*this.size+n]=!0}get(t,n){return this.dark[t*this.size+n]===!0}};m(O,"Grid");var V=O;function le(e,t){let n=e.size;for(let i=0;i<n;i+=1)e.set(6,i,i%2===0),e.set(i,6,i%2===0);for(let[i,s]of[[3,3],[3,n-4],[n-4,3]])for(let r=-4;r<=4;r+=1)for(let c=-4;c<=4;c+=1){let u=i+r,f=s+c;if(u<0||u>=n||f<0||f>=n)continue;let h=Math.max(Math.abs(r),Math.abs(c));e.set(u,f,h!==2&&h!==4)}let o=ce(t),a=o.length-1;if(o.forEach((i,s)=>o.forEach((r,c)=>{if(!(s===0&&c===0||s===0&&c===a||s===a&&c===0))for(let u=-2;u<=2;u+=1)for(let f=-2;f<=2;f+=1)e.set(i+u,r+f,Math.max(Math.abs(u),Math.abs(f))!==1)})),W(e,0),t>=7){let i=t;for(let r=0;r<12;r+=1)i=i<<1^(i>>>11)*7973;let s=t<<12|i;for(let r=0;r<18;r+=1){let c=(s>>>r&1)===1,u=n-11+r%3,f=Math.floor(r/3);e.set(u,f,c),e.set(f,u,c)}}}m(le,"drawFunctionPatterns");function W(e,t){let n=e.size,o=re<<3|t,a=o;for(let r=0;r<10;r+=1)a=a<<1^(a>>>9)*1335;let i=(o<<10|a)^21522,s=m(r=>(i>>>r&1)===1,"bit");for(let r=0;r<=5;r+=1)e.set(r,8,s(r));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let r=9;r<15;r+=1)e.set(8,14-r,s(r));for(let r=0;r<8;r+=1)e.set(8,n-1-r,s(r));for(let r=8;r<15;r+=1)e.set(n-15+r,8,s(r));e.set(n-8,8,!0)}m(W,"drawFormat");function me(e,t){let n=e.size,o=0;for(let a=n-1;a>=1;a-=2){a===6&&(a=5);for(let i=0;i<n;i+=1)for(let s=0;s<2;s+=1){let r=a-s,u=(a+1&2)===0?n-1-i:i;e.fixed[u*n+r]!==!0&&(o<t.length*8&&(e.dark[u*n+r]=(t[o>>>3]>>>7-(o&7)&1)===1),o+=1)}}}m(me,"placeData");function pe(e,t){let n=ue[t];for(let o=0;o<e.size;o+=1)for(let a=0;a<e.size;a+=1)e.fixed[o*e.size+a]!==!0&&n(o,a)&&(e.dark[o*e.size+a]=!e.dark[o*e.size+a])}m(pe,"applyMask");function de(e){let t=e.size,n=0,o=m(i=>{let s=1;for(let r=1;r<=t;r+=1)r<t&&i(r)===i(r-1)?s+=1:(s>=5&&(n+=3+(s-5)),s=1);for(let r=0;r+10<t;r+=1){let c=[!0,!1,!0,!0,!0,!1,!0];if(!(c.every((y,p)=>i(r+p)===y)||c.every((y,p)=>i(r+4+p)===y)))continue;let f=[0,1,2,3].every(y=>!i(r+y))&&c.every((y,p)=>i(r+4+p)===y),h=c.every((y,p)=>i(r+p)===y)&&[7,8,9,10].every(y=>!i(r+y));f&&(n+=40),h&&(n+=40)}},"line");for(let i=0;i<t;i+=1)o(s=>e.get(i,s));for(let i=0;i<t;i+=1)o(s=>e.get(s,i));for(let i=0;i+1<t;i+=1)for(let s=0;s+1<t;s+=1){let r=e.get(i,s);r===e.get(i,s+1)&&r===e.get(i+1,s)&&r===e.get(i+1,s+1)&&(n+=3)}let a=e.dark.filter(Boolean).length;return n+=Math.floor(Math.abs(a*20-t*t*10)/(t*t))*10,n}m(de,"penalty");function j(e,t={}){let n=new TextEncoder().encode(e),o=1;for(;o<=Q&&!(4+(o<10?8:16)+n.length*8<=L(o)*8);o+=1);if(o>Q)throw new RangeError("text too long for a QR code");let a=se(n,o),i=m(c=>{let u=new V(o*4+17);return le(u,o),me(u,a),pe(u,c),W(u,c),u},"build"),s=null;if(t.mask!==void 0)s=i(t.mask);else{let c=Number.POSITIVE_INFINITY;for(let u=0;u<8;u+=1){let f=i(u),h=de(f);h<c&&(c=h,s=f)}}let r=s;return{size:r.size,get:m((c,u)=>r.get(c,u),"get")}}m(j,"encodeQr");function X(e,t=4){let n=[];for(let o=0;o<e.size;o+=1)for(let a=0;a<e.size;a+=1)e.get(o,a)&&n.push(`M${a+t} ${o+t}h1v1h-1z`);return{size:e.size+t*2,d:n.join("")}}m(X,"qrPath");import{Fragment as Ce,jsx as l,jsxs as k}from"react/jsx-runtime";var he={en:A,fr:G,ar:$,es:A,pt:A,de:A},Z={en:I,fr:H,ar:E,es:I,pt:I,de:I};function g(e){let t=e.strings;return(n,o)=>P(t[n]??he[e.locale][n]??"",o)}m(g,"flowT");function ee(e,t){let n=g(t);return e.flatMap(o=>{let a=o.service==="phone_otp"?n("contact.phone"):o.service==="email_otp"?n("contact.email"):R(o,t),i=U[o.service];return a===null?[]:[{id:o.id,label:a,...i!==void 0?{glyph:l(K,{name:i})}:{}}]})}m(ee,"labelled");function te({step:e,i18n:t,onError:n}){let o=g(t),{busy:a,error:i,run:s}=N(t,n),r=e.kind==="contact_choice";return l(M,{title:o(r?"contact.title":"choice.title"),description:o(r?"contact.description":"choice.description"),options:ee(e.choice.options,t),busy:a,error:i,focus:!0,testId:r?"sekyro-contact-choice":"sekyro-choice",onChoose:c=>s(()=>e.choose(c))})}m(te,"PlanChoiceView");var Ge=te,Qe=te;function We({step:e,i18n:t,onError:n,onOpen:o}){let a=g(t),{busy:i,error:s,run:r}=N(t,n),c=e,u=e.context.switchable,f=u===void 0?[]:u.options.filter(v=>v.id!==u.current),h=c.kind==="registry"&&(c.reason==="nni_not_found"||c.reason==="registry_record_not_found")&&c.canUseDocument||c.kind==="eid"&&c.reason?.startsWith("eid_")&&c.canUseCamera,y=f.length===1?f[0]:void 0,p=y!==void 0&&(y.service==="phone_otp"||y.service==="email_otp"),d=p&&c.canSwitch&&c.switchTo!==void 0?()=>c.switchTo.call(e):c.chooseOption===void 0||y===void 0?void 0:()=>c.chooseOption.call(e,y.id);if(f.length===0||h||y!==void 0&&(d===void 0||b()===null)||y===void 0&&c.chooseOption===void 0)return null;function b(){return y===void 0?a("choice.switch"):y.service==="phone_otp"||y.service==="email_otp"?a("contact.switch"):c.kind==="registry"&&y.service==="document"?t.t("population.useDocument"):c.kind==="eid"?t.strings["eid.useCamera"]??Z[t.locale]["eid.useCamera"]:R(y,t)}return m(b,"labelOf"),k("div",{className:"sekyro-stack sekyro-stack--1",children:[s!==null?l(x,{tone:"danger",children:l("span",{children:s})}):null,l(w,{kind:"ghost",disabled:i,"aria-busy":i||void 0,onClick:()=>d===void 0?o():r(d),"data-testid":p?"sekyro-contact-switch":"sekyro-lane-switch",children:b()})]})}m(We,"LaneSwitch");function je({step:e,i18n:t,onError:n,onClose:o}){let a=g(t),{busy:i,error:s,run:r}=N(t,n),c=e.context.switchable,u=e.chooseOption;return c===void 0||u===void 0?null:l(M,{title:a("choice.title"),description:a("choice.description"),options:ee(c.options,t),...c.current!==null?{marked:c.current}:{},busy:i,error:s,focus:!0,testId:"sekyro-lane-choice",onChoose:f=>f===c.current?o():r(()=>u.call(e,f))})}m(je,"LaneChoiceView");var be=[["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 ke(e){let[t,n]=_(null);return q(()=>{if(!e.portraitAvailable)return;let o=!0,a=null;return e.portrait().then(i=>{!o||i===null||!i.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(a=URL.createObjectURL(i),n(a))}),()=>{o=!1,a!==null&&URL.revokeObjectURL(a)}},[e.portraitAvailable]),t}m(ke,"usePortraitUrl");function Xe({step:e,i18n:t,onError:n}){let o=g(t),a=F(),i=S(),s=ke(e),{busy:r,error:c,run:u}=N(t,n),f=e.context.orgName,h=["registry","document","chip"].find(d=>d===e.source),y=e.summaryKind==="partial",p=m(d=>t.strings[`doc.type.${d}`]??d,"documentLabel");return k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":a,"data-testid":"sekyro-identity-summary",children:[k("div",{className:"sekyro-stack sekyro-stack--1",children:[l("h2",{id:a,ref:i,tabIndex:-1,className:"sekyro-text-body",children:o("summary.title")}),l("p",{className:"sekyro-text-muted",children:o("summary.description")}),h!==void 0?l("p",{className:"sekyro-text-muted",children:o(`summary.source.${h}`)}):null]}),k("div",{className:"sekyro-summary",children:[s!==null?l("img",{className:"sekyro-summary__portrait",src:s,alt:o("summary.portraitAlt")}):null,l("dl",{className:"sekyro-summary__list",children:be.map(([d,b,v])=>{let z=d==="idNumberMasked"?e.idNumberMasked??e.nniMasked:e[d];return z===void 0?null:k("div",{className:"sekyro-summary__row",children:[l("dt",{className:"sekyro-text-muted",children:o(d==="fullName"&&y?"summary.name":b)}),l("dd",{children:v?l("bdi",{dir:"ltr",children:z}):d==="documentType"?p(z):z})]},d)})})]}),c!==null?l(x,{tone:"danger",children:l("span",{children:c})}):null,k("div",{className:"sekyro-stack sekyro-stack--3",children:[l(w,{full:!0,disabled:r,"aria-busy":r||void 0,onClick:()=>u(()=>e.confirm()),children:o("summary.confirm")}),e.retakeAvailable?l(w,{kind:"ghost",full:!0,disabled:r,onClick:()=>u(()=>e.retake()),children:o(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):l("p",{className:"sekyro-text-muted",children:o("summary.noRetake",{org:f})})]})]})}m(Xe,"IdentitySummaryView");var ge=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function Je({step:e,i18n:t,livenessProps:n,sekyroIntro:o}){let a=g(t),[i,s]=_(null);q(()=>e.onLivePhoto(d=>{let b=d.update?.coach;s(d.holding||b===void 0?null:t.t(`portrait.coach.${b}`))}),[e,t]);let r=e.instructions==="icao",c=e.icao?.profile==="selfie",u=C(()=>r?ge.filter(d=>!c||d!=="background").map(d=>({id:d,text:a(`capture.tipsIcao.${d}`)})):void 0,[r,c,t]),f=C(()=>r&&!c?{...n.strings,"capture.tips.title":a("capture.tipsIcao.title")}:n.strings,[r,c,n.strings,t]),h=c?void 0:a("capture.tipsIcao.title"),y=C(()=>o===!0&&u!==void 0?{...n.slots,intro:m((d,b)=>l(Y,{start:d,context:b,tips:u,...h!==void 0?{tipsTitle:h}:{}}),"intro")}:n.slots,[o,u,h,n.slots,t]),p=c?`${(u??[]).map(d=>d.text).join(". ")}.`:a("capture.tipsIcao.summary");return l(B,{...n,...y!==void 0?{slots:y}:{},...f!==void 0?{strings:f}:{},...u!==void 0?{tips:u,tipsSummary:p}:{},coach:i})}m(Je,"LivePhotoLiveness");function Ze({i18n:e}){let t=g(e);return k(x,{tone:"info",children:[l("strong",{children:t("portrait.retakeOnly")}),l("span",{children:t("portrait.keepCamera")})]})}m(Ze,"PortraitRetakeNotice");function et({i18n:e,provider:t}){let n=e.strings,o=m(a=>n[a]??Z[e.locale][a]??"","pick");return l("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?P(o("eid.continueHint"),{provider:t}):o("eid.continueHintGeneric")})}m(et,"EidContinueHint");async function we(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(we,"copy");function oe({url:e,i18n:t,label:n}){let o=g(t),[a,i]=_("idle"),s=n.startsWith("inApp.")?"inApp":"handoff";return k("div",{className:"sekyro-stack sekyro-stack--1",children:[l(w,{kind:"ghost",onClick:()=>{we(e).then(r=>i(r?"copied":"failed"))},children:o(n)}),l("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:a==="idle"?"":o(`${s}.${a==="copied"?"copied":"copyFailed"}`)})]})}m(oe,"CopyLink");function ne({url:e,i18n:t,refresh:n,footer:o}){let a=g(t),i=F(),s=C(()=>{try{return X(j(e))}catch{return null}},[e]),r=ye(n);r.current=n;let c=S();return q(()=>{let u=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&r.current?.().catch(()=>{})},5e3);return()=>clearInterval(u)},[]),k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":i,"data-testid":"sekyro-handoff",children:[l("h2",{id:i,ref:c,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),l("p",{className:"sekyro-text-muted",children:a("handoff.description")}),s!==null?k("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":a("handoff.qrAlt"),shapeRendering:"crispEdges",children:[l("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),l("path",{d:s.d,className:"sekyro-qr__fg"})]}):null,l(oe,{url:e,i18n:t,label:"handoff.copyLink"}),l("p",{className:"sekyro-text-muted",children:a("handoff.waiting")}),o??null]})}m(ne,"HandoffView");var ve=["intro","data","processing","sharing","retention"];function tt({i18n:e}){let t=g(e);return l(Ce,{children:ve.map(n=>l("p",{children:t(`consent.human.terms.${n}`)},n))})}m(tt,"HumanConsentTerms");function ot({url:e,i18n:t}){return C(()=>!J(),[])?l(ne,{url:e,i18n:t}):null}m(ot,"DesktopHandoffView");function nt({i18n:e,cause:t,onRetry:n,onContinue:o,handoffUrl:a}){let i=g(e),s=F(),r=S(),[c,u]=_("idle"),f=C(()=>a!==void 0&&!J(),[a]),h=t==="denied",y=m(()=>{o!==void 0&&(u("busy"),o(t).then(()=>u("idle"),p=>u(p instanceof fe&&p.code==="check_out_of_order"?"idle":"failed")))},"end");return k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":s,"data-testid":"sekyro-no-camera","data-cause":t,children:[f&&a!==void 0?l(ne,{url:a,i18n:e}):null,l("h2",{id:s,ref:r,tabIndex:-1,className:"sekyro-text-body",children:i(h?"capture.noCamera.deniedTitle":"capture.noCamera.title")}),l("p",{className:"sekyro-text-muted",children:i(h?"capture.noCamera.deniedBody":"capture.noCamera.body")}),c==="failed"?l(x,{tone:"danger",children:l("span",{children:e.t("errors.network_error")})}):null,l(w,{kind:h?"primary":"ghost",onClick:n,children:e.t("common.retry")}),o!==void 0?l(w,{kind:"ghost",disabled:c==="busy","aria-busy":c==="busy"||void 0,onClick:y,children:i("capture.noCamera.continue")}):null]})}m(nt,"NoCameraView");function rt({url:e,i18n:t,onContinue:n}){let o=g(t),a=F(),i=S();return k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":a,"data-testid":"sekyro-in-app",children:[l("h2",{id:a,ref:i,tabIndex:-1,className:"sekyro-text-body",children:o("inApp.title")}),l("p",{className:"sekyro-text-muted",children:o("inApp.description")}),l(oe,{url:e,i18n:t,label:"inApp.copyLink"}),l(w,{kind:"ghost",onClick:n,children:o("inApp.continueAnyway")})]})}m(rt,"InAppBrowserPrompt");export{Ge as ContactChoiceView,ot as DesktopHandoffView,et as EidContinueHint,Qe as GenericChoiceView,ne as HandoffView,tt as HumanConsentTerms,Xe as IdentitySummaryView,rt as InAppBrowserPrompt,je as LaneChoiceView,We as LaneSwitch,Je as LivePhotoLiveness,nt as NoCameraView,Ze as PortraitRetakeNotice};