@sekyro/elements 0.1.0-rc.30 → 0.1.0-rc.32

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 (108) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cdn/chunks/{capture-session-doc-NJKFAWHW-5ISANLWB.js → capture-session-doc-2GJ726S6-2H3IPQT3.js} +1 -1
  3. package/dist/cdn/chunks/challenge-frame-HTZ2ZBIE-5JRAFZOU.js +1 -0
  4. package/dist/cdn/chunks/chunk-647NLEGV.js +1 -0
  5. package/dist/cdn/chunks/{chunk-W2IBE5PM.js → chunk-B4B5NNWF.js} +1 -1
  6. package/dist/cdn/chunks/{chunk-IWRPGU4X.js → chunk-C4H77SCY.js} +1 -1
  7. package/dist/cdn/chunks/{chunk-KEO772AF.js → chunk-DCDSAYG4.js} +1 -1
  8. package/dist/cdn/chunks/{chunk-GR6JK2ML.js → chunk-ERJRG52Z.js} +1 -1
  9. package/dist/cdn/chunks/{chunk-FOPIRIC2.js → chunk-F3BSTTXB.js} +1 -1
  10. package/dist/cdn/chunks/{chunk-XZKF2U76.js → chunk-G4FFU5ST.js} +1 -1
  11. package/dist/cdn/chunks/chunk-GP6QFI3S.js +33 -0
  12. package/dist/cdn/chunks/chunk-HOEI5HQR.js +1 -0
  13. package/dist/cdn/chunks/{chunk-DEDYOTBZ.js → chunk-HVC5SOWQ.js} +1 -1
  14. package/dist/cdn/chunks/{chunk-2HKOE6CN.js → chunk-K3XSP444.js} +1 -1
  15. package/dist/cdn/chunks/chunk-L2THMRAZ.js +1 -0
  16. package/dist/cdn/chunks/{chunk-5KTQLZKN.js → chunk-LK5ZZB5W.js} +1 -1
  17. package/dist/cdn/chunks/{chunk-4H47RI64.js → chunk-MZETEVSB.js} +1 -1
  18. package/dist/cdn/chunks/chunk-PQGILDKC.js +1 -0
  19. package/dist/cdn/chunks/chunk-QYOVP3SU.js +1 -0
  20. package/dist/cdn/chunks/{chunk-52X5ZO4S.js → chunk-S67OYV2K.js} +1 -1
  21. package/dist/cdn/chunks/{chunk-5JSOPXYS.js → chunk-T5IBMUSY.js} +1 -1
  22. package/dist/cdn/chunks/chunk-WX5XRIRN.js +1 -0
  23. package/dist/cdn/chunks/{chunk-4GDGJEJ6.js → chunk-XVONSDHT.js} +1 -1
  24. package/dist/cdn/chunks/chunk-XY3RKF2D.js +3 -0
  25. package/dist/cdn/chunks/create-document-capture-NUZAIYUH-XUGCJ7DH.js +1 -0
  26. package/dist/cdn/chunks/{create-portrait-capture-5VGYZUOK-KTCFCHTN.js → create-portrait-capture-3MHP4DGA-4XIQSUJ3.js} +1 -1
  27. package/dist/cdn/chunks/document-capture-view-HKEUWRPE-RG7TBRYZ.js +1 -0
  28. package/dist/cdn/chunks/{eid-view-F75DTWPK-AE6YBJNY.js → eid-view-Y5OFAHVC-J7PHT73P.js} +1 -1
  29. package/dist/cdn/chunks/{email-otp-view-T3NRXENJ-K6FY5XVU.js → email-otp-view-ZEVLA5UZ-EEPZQDQ2.js} +1 -1
  30. package/dist/cdn/chunks/flow-views-ARNNXDI4-DG6547SK.js +1 -0
  31. package/dist/cdn/chunks/{form-view-7NPB2AJE-TCOF3XPH.js → form-view-PQQO4VIK-UMDKNDGI.js} +1 -1
  32. package/dist/cdn/chunks/overlay-de-QAMFKRTE-YSXFO53C.js +1 -0
  33. package/dist/cdn/chunks/overlay-es-5RUP36SI-HFW77Y5Z.js +1 -0
  34. package/dist/cdn/chunks/overlay-pt-7EUG7TIT-FUKZ7M5O.js +1 -0
  35. package/dist/cdn/chunks/plan-runner-BFNZHO4C-7RPJM7XJ.js +1 -0
  36. package/dist/cdn/chunks/portrait-capture-view-EKCFW3YQ-RBLI5X5Y.js +1 -0
  37. package/dist/cdn/chunks/portrait-review-view-NKIVRFCL-UAYMHF4D.js +1 -0
  38. package/dist/cdn/chunks/proof-of-address-view-HYTT7NHY-2DKOEB3I.js +1 -0
  39. package/dist/cdn/chunks/session-events-W5DRVA6F-BNHYAEHE.js +8 -0
  40. package/dist/cdn/chunks/session-watch-7HMFAHQI-WNCXXNDK.js +1 -0
  41. package/dist/cdn/define.js +1 -1
  42. package/dist/cdn/index.js +1 -1
  43. package/dist/{chunk-7GCPE3LG.js → chunk-25BK7D5W.js} +1 -1
  44. package/dist/chunk-2Z5FHSRB.js +33 -0
  45. package/dist/chunk-73ETQUUL.js +1 -0
  46. package/dist/{chunk-D2KOFFZS.js → chunk-B7CZCSMF.js} +1 -1
  47. package/dist/{chunk-RSXZISUG.js → chunk-ENB7AFED.js} +1 -1
  48. package/dist/{chunk-5MOE4EK4.js → chunk-FV5OWBNU.js} +1 -1
  49. package/dist/{chunk-YHJQJMRS.js → chunk-HFOCTDYM.js} +1 -1
  50. package/dist/{chunk-SCZ22CNO.js → chunk-N2BPYCKG.js} +1 -1
  51. package/dist/{chunk-Q47EK3FL.js → chunk-N3WQ4QSD.js} +1 -1
  52. package/dist/chunk-NAURWQ6C.js +1 -0
  53. package/dist/{chunk-2XRKOCPR.js → chunk-RV6PEFNT.js} +1 -1
  54. package/dist/{chunk-QDHTMKLS.js → chunk-TC5736OF.js} +1 -1
  55. package/dist/chunk-Y7JBM2YL.js +1 -0
  56. package/dist/define.cjs +5 -5
  57. package/dist/define.js +1 -1
  58. package/dist/document-capture-view-HKEUWRPE-KB4IVUEE.js +1 -0
  59. package/dist/{eid-view-F75DTWPK-QMS64USC.js → eid-view-Y5OFAHVC-NUZ7QUBA.js} +1 -1
  60. package/dist/{email-otp-view-T3NRXENJ-WF5ZRHQS.js → email-otp-view-ZEVLA5UZ-LAXHM22A.js} +1 -1
  61. package/dist/flow-views-ARNNXDI4-YXYLG7SQ.js +1 -0
  62. package/dist/{form-view-7NPB2AJE-5GEBWQJ7.js → form-view-PQQO4VIK-H7PE6SJF.js} +1 -1
  63. package/dist/index.cjs +5 -5
  64. package/dist/index.d.cts +21 -0
  65. package/dist/index.d.ts +21 -0
  66. package/dist/index.js +1 -1
  67. package/dist/overlay-de-QAMFKRTE-Q37YV6YD.js +1 -0
  68. package/dist/overlay-es-5RUP36SI-N7N3ULGK.js +1 -0
  69. package/dist/overlay-pt-7EUG7TIT-5S423QBY.js +1 -0
  70. package/dist/portrait-capture-view-EKCFW3YQ-7UBYR6BX.js +1 -0
  71. package/dist/portrait-review-view-NKIVRFCL-IP7ZWZ6B.js +1 -0
  72. package/dist/proof-of-address-view-HYTT7NHY-QFJ33FM2.js +1 -0
  73. package/dist/styles.css +5 -2
  74. package/package.json +3 -3
  75. package/sbom.cdx.json +4 -4
  76. package/dist/cdn/chunks/challenge-frame-LWDSKM5K-J3CNO3XT.js +0 -1
  77. package/dist/cdn/chunks/chunk-GORELL4J.js +0 -1
  78. package/dist/cdn/chunks/chunk-IAPQGT6L.js +0 -1
  79. package/dist/cdn/chunks/chunk-JB27ZDFD.js +0 -1
  80. package/dist/cdn/chunks/chunk-JU4XNPJJ.js +0 -1
  81. package/dist/cdn/chunks/chunk-KPUG7TMO.js +0 -33
  82. package/dist/cdn/chunks/chunk-LNE2P3TV.js +0 -1
  83. package/dist/cdn/chunks/chunk-RVL4N5KZ.js +0 -1
  84. package/dist/cdn/chunks/chunk-TBQUAM5Z.js +0 -1
  85. package/dist/cdn/chunks/chunk-X6SULJS2.js +0 -3
  86. package/dist/cdn/chunks/create-document-capture-3DB2Y3GP-SMSQUDH2.js +0 -1
  87. package/dist/cdn/chunks/document-capture-view-SCXJCJET-YFWA53XE.js +0 -1
  88. package/dist/cdn/chunks/flow-views-TVG4PFSE-2UL4L6TO.js +0 -1
  89. package/dist/cdn/chunks/overlay-de-SYWE2LZE-AZG4RYMA.js +0 -1
  90. package/dist/cdn/chunks/overlay-es-D43QR7EF-ZODSTOP2.js +0 -1
  91. package/dist/cdn/chunks/overlay-pt-2YUWBZX7-UTMWWMN7.js +0 -1
  92. package/dist/cdn/chunks/plan-runner-432VPNQW-OBQFQCWK.js +0 -1
  93. package/dist/cdn/chunks/portrait-capture-view-4HUAQUIA-G3YLZEHM.js +0 -1
  94. package/dist/cdn/chunks/portrait-review-view-VKRWP4HK-6NZPPDWZ.js +0 -1
  95. package/dist/cdn/chunks/proof-of-address-view-BXQ4O2CU-RFNWZRUP.js +0 -1
  96. package/dist/chunk-3SFLN33V.js +0 -1
  97. package/dist/chunk-4BQSPVSM.js +0 -33
  98. package/dist/chunk-CX7T4ADY.js +0 -1
  99. package/dist/chunk-L7NFG55Y.js +0 -1
  100. package/dist/chunk-ZG77WO25.js +0 -1
  101. package/dist/document-capture-view-SCXJCJET-WFZYQEU2.js +0 -1
  102. package/dist/flow-views-TVG4PFSE-OWVBXJ2R.js +0 -1
  103. package/dist/overlay-de-SYWE2LZE-QIFDHKT6.js +0 -1
  104. package/dist/overlay-es-D43QR7EF-FZNYZGGS.js +0 -1
  105. package/dist/overlay-pt-2YUWBZX7-4AFNZWV2.js +0 -1
  106. package/dist/portrait-capture-view-4HUAQUIA-LYTXJIEX.js +0 -1
  107. package/dist/portrait-review-view-VKRWP4HK-4XFARABZ.js +0 -1
  108. package/dist/proof-of-address-view-BXQ4O2CU-455UQJ3O.js +0 -1
@@ -1 +0,0 @@
1
- import{b as hr,d as fr}from"./chunk-5MOE4EK4.js";import{b as kr,c as bt}from"./chunk-QDHTMKLS.js";import{a as br}from"./chunk-XXCBLQ53.js";import{c as Ct}from"./chunk-3SFLN33V.js";import{a as ur,b as dr,c as pr,d as Ae}from"./chunk-D2KOFFZS.js";import{F as yr,K as gr,L as vr,a as K,b as de,c as te,m as lr,n as Je,p as or,q as et,r as ir,s as cr,t as kt,u as oe,v as Le,w as tt,y as mr}from"./chunk-RSXZISUG.js";import{a as l,c as U,i as s}from"./chunk-SSU37LFQ.js";var _r=U(K(),1),y=U(de(),1),re=U(de(),1),ye=U(K(),1),D=U(de(),1),C=U(K(),1),m=U(K(),1),at=U(K(),1),fe=U(de(),1),Gr=U(K(),1),X=U(K(),1),ot=U(K(),1),we=U(de(),1),Se=U(de(),1),O=U(de(),1),it=U(K(),1),pe=U(K(),1),Q=U(K(),1),L=U(K(),1),me=U(K(),1),Te=U(K(),1),Rt=U(de(),1),v=U(de(),1);import{subscribeCameraPermission as Pn}from"@sekyro/web";import{getLivenessAssetsStatus as On,preloadLivenessAssets as Bn,subscribeLivenessAssets as qn}from"@sekyro/web";import{createLivenessCapture as $n}from"@sekyro/web";function ce({className:e,children:t}){return(0,y.jsx)("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}l(ce,"ne");s(ce,"Svg");var Mt="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function wr(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,y.jsx)("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}l(wr,"ln");s(wr,"SunIcon");function Sr(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,y.jsx)("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}l(Sr,"un");s(Sr,"FaceUncoveredIcon");function xr(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),(0,y.jsx)("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),(0,y.jsx)("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}l(xr,"dn");s(xr,"PhoneEyeLevelIcon");function Nr(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),(0,y.jsx)("circle",{cx:"12",cy:"12",r:"2.8"})]})}l(Nr,"pn");s(Nr,"LookStraightIcon");function Rr(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("path",{d:Mt}),(0,y.jsx)("path",{d:"M9 13l2 2 4-4"})]})}l(Rr,"fn");s(Rr,"CameraCheckIcon");function Mr(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("path",{d:Mt}),(0,y.jsx)("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}l(Mr,"mn");s(Mr,"CameraAskIcon");function Ar(e){return(0,y.jsxs)(ce,{...e,children:[(0,y.jsx)("path",{d:Mt}),(0,y.jsx)("path",{d:"M3 3l18 18"})]})}l(Ar,"yn");s(Ar,"CameraBlockedIcon");function nt({off:e,className:t}){return(0,y.jsxs)(ce,{className:t,children:[(0,y.jsx)("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?(0,y.jsx)("path",{d:"M4 4l16 16"}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),(0,y.jsx)("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}l(nt,"Ve");s(nt,"SpeakerIcon");function Lr(e){return(0,y.jsx)(ce,{...e,children:(0,y.jsx)("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}l(Lr,"gn");s(Lr,"CheckIcon");function Er(e){return(0,y.jsxs)(ce,{className:e.className??"sekyro-spinner",children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),(0,y.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}l(Er,"hn");s(Er,"SpinnerIcon");var _t=["light","uncover","eyeLevel","straight"],Rn={light:{key:"capture.tips.light",icon:s(()=>(0,re.jsx)(wr,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:s(()=>(0,re.jsx)(Sr,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:s(()=>(0,re.jsx)(xr,{}),"icon")},straight:{key:"capture.tips.straight",icon:s(()=>(0,re.jsx)(Nr,{}),"icon")}};function Ir({tips:e}){let t=Ae(),n=(0,_r.useId)();return e.length===0?null:(0,re.jsxs)("section",{className:"sekyro-tips","aria-labelledby":n,"data-testid":"sekyro-tips",children:[(0,re.jsx)("p",{className:"sekyro-tips__title",id:n,children:t("capture.tips.title")}),(0,re.jsx)("ul",{className:"sekyro-tips__list",children:e.map(r=>{let a=typeof r=="string"?Rn[r]:void 0,o=typeof r=="string"?r:r.id,c=a!==void 0?a.icon():typeof r=="string"?void 0:r.icon,d=a!==void 0?t(a.key):typeof r=="string"?r:r.text;return(0,re.jsxs)("li",{className:"sekyro-tips__item",children:[c!=null?(0,re.jsx)("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:c}):null,(0,re.jsx)("span",{children:d})]},o)})})]})}l(Ir,"Cn");s(Ir,"TipList");var Mn=220;function Ur({title:e,description:t,options:n,busy:r,error:a,focus:o,testId:c,look:d="cards",marked:S,onChoose:p}){let w=(0,ye.useId)(),N=kt(),[j,R]=(0,ye.useState)(null),B=(0,ye.useRef)(null);(0,ye.useEffect)(()=>{a!==null&&R(null)},[a]),(0,ye.useEffect)(()=>()=>{B.current!==null&&clearTimeout(B.current)},[]);let q=s(M=>{r||j!==null||(R(M),B.current=setTimeout(()=>{B.current=null,R(null),p(M)},Mn))},"choose");return(0,D.jsxs)("section",{className:"sekyro-stack sekyro-stack--4 sekyro-choice","aria-labelledby":w,"data-testid":c,children:[(0,D.jsxs)("div",{className:d==="cards"?"sekyro-heading":"sekyro-stack sekyro-stack--1",children:[(0,D.jsx)("h2",{id:w,ref:o?N:void 0,tabIndex:-1,className:"sekyro-text-body",children:e}),t!==void 0&&t!==""?(0,D.jsx)("p",{className:"sekyro-text-muted",children:t}):null]}),a!==null?(0,D.jsx)(oe,{tone:"danger",children:(0,D.jsx)("span",{children:a})}):null,d==="buttons"?(0,D.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:n.map((M,J)=>(0,D.jsx)(te,{kind:J===0?"primary":"ghost",full:!0,disabled:r,"aria-busy":r||void 0,onClick:l(()=>p(M.id),"onClick"),children:M.label},M.id))}):(0,D.jsx)("div",{className:"sekyro-choices",children:n.map(M=>(0,D.jsxs)("button",{type:"button",className:"sekyro-card","aria-pressed":(j??S)===M.id,"aria-busy":r||void 0,disabled:r||j!==null&&j!==M.id,onClick:l(()=>q(M.id),"onClick"),children:[M.glyph!==void 0?(0,D.jsx)("span",{className:"sekyro-card__tile",children:M.glyph}):null,(0,D.jsxs)("span",{className:"sekyro-card__body",children:[(0,D.jsx)("span",{className:"sekyro-card__title",children:M.label}),M.sub!==void 0?(0,D.jsx)("span",{className:"sekyro-card__sub",children:M.sub}):null]}),(0,D.jsx)("span",{className:"sekyro-radio","aria-hidden":"true"})]},M.id))})]})}l(Ur,"bn");s(Ur,"ChoiceScreen");var jr=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera","fcv3.hold_upright","fcv3.one_face","capture.tips.summary","capture.lookAtColours"];function st(e){return e!==null&&jr.includes(e)}l(st,"he");s(st,"isVoiceKey");var An=s((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function je(e,t,n){let r;try{if(typeof e=="function")r=e(t,n);else{let a=e[n];r=a!=null&&An(a,t)?a[t]:null}}catch{return null}return typeof r=="string"&&r!==""?r:null}l(je,"Me");s(je,"resolveClip");var Ln="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",En={ar:"ar-SA",fr:"fr-FR",en:"en-US",es:"es-ES",pt:"pt-BR",de:"de-DE"};function ie(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}l(ie,"re");s(ie,"synth");function Tr(){return ie()!==null&&typeof SpeechSynthesisUtterance=="function"}l(Tr,"Lr");s(Tr,"speechAvailable");function wt(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}l(wt,"Sn");s(wt,"baseLang");function At(e,t){let n=s(a=>a.replace(/_/g,"-").toLowerCase(),"norm"),r=wt(t);return e.find(a=>n(a.lang)===n(t))??e.find(a=>wt(a.lang)===r)}l(At,"Mn");s(At,"pickVoice");function Pr(e){if(!Tr())return!1;let t=[];try{t=ie()?.getVoices()??[]}catch{return!0}return t.length===0||At(t,e)!==void 0}l(Pr,"wn");s(Pr,"speechUsable");function Or(e){let t=ie();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}l(Or,"Ln");s(Or,"subscribeVoices");function $e(e){try{let t=typeof location<"u"?location.href:"http://localhost/",n=new URL(e,t);return`clip:${n.origin}${n.pathname}`}catch{return`clip:${e}`}}l($e,"Ke");s($e,"clipIdentity");function St(e){e.pause(),e.removeAttribute("src"),e.load()}l(St,"Rn");s(St,"release");function Br(){let e=null,t=null,n=0,r=null,a=null,o=null,c=!1,d=null,S=[],p=new Map,w=s(()=>{S=ie()?.getVoices()??[]},"loadVoices"),N=!1,j=s(()=>{let h=ie();N||h===null||(N=!0,w(),h.addEventListener?.("voiceschanged",w))},"bindVoices"),R=s(()=>(e??(e=new Audio),e),"element"),B=s((h,x,_,k)=>{let u=ie();if(u!==null&&h!==""&&typeof SpeechSynthesisUtterance=="function"){j();let A=At(S,x);if(S.length===0||A!==void 0){u.cancel();let I=new SpeechSynthesisUtterance(h);I.lang=x,A!==void 0&&(I.voice=A),I.rate=.95,_!==void 0&&(I.onend=_),(_!==void 0||k!==void 0)&&(I.onerror=$=>{k!==void 0&&$.error==="not-allowed"?k():_?.()}),u.speak(I);return}}_?.()},"speak"),q=s(()=>{n+=1,r=null,a=o=null,e!==null&&(e.pause(),e.currentTime=0),ie()?.cancel()},"stop"),M=s(h=>{for(let x of h){let _=$e(x);if(p.has(_))continue;let k=new Audio;k.preload="auto",k.src=x,p.set(_,k)}},"warmClips"),J=s((h,x,_)=>{let k={utterance:h,generation:x,end:_};d=k;let u=s(()=>x===n&&d===k,"live"),A=s(()=>{u()&&(a=k)},"block");if(ie()?.cancel(),h.url!==null){let I=R();I.pause(),I.muted=!1,I.src=h.url,I.currentTime=0,I.onended=_??null;let $=s(()=>{o===k&&(o=null)},"settled"),i=I.play();if(i===void 0)return;o=k,i.then($,T=>{if($(),!u())return;let P=T?.name;if(P!=="AbortError"){if(P==="NotAllowedError")return A();h.speech?B(h.text,h.lang,_,A):_?.()}});return}h.speech?B(h.text,h.lang,_,A):_?.()},"start");return{say(h){let x=h.url!==null?$e(h.url):`tts:${h.lang}:${h.text}`;if(x===r)return;r=x,a=o=null,n+=1;let _=n,k=h.onEnd;J(h,_,k!==void 0?()=>{_===n&&k()}:void 0)},unlock({lang:h,speech:x,prefetch:_}){let k=a??(c?null:o);c=!0;let u=k!==null&&k.generation===n?k:null;a=o=null,u!==null&&J(u.utterance,u.generation,u.end);let A=R();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let T=Uint8Array.from(atob(Ln),P=>P.charCodeAt(0));t=URL.createObjectURL(new Blob([T],{type:"audio/wav"}))}let I=A.paused===!1&&t!==null&&A.src!==t;t!==null&&!I&&(u===null||u.utterance.url===null)&&(A.muted=!0,A.onended=null,A.src=t,A.play()?.catch(()=>{}));let $=ie(),i=u!==null&&u.utterance.url===null;if(x&&!i&&$!==null&&typeof SpeechSynthesisUtterance=="function"){j();let T=new SpeechSynthesisUtterance(" ");T.volume=0,T.lang=h,$.speak(T)}M(_??[])},prefetch:M,stop:q,dispose(){q(),N&&ie()?.removeEventListener?.("voiceschanged",w),N=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&St(e),e=null;for(let h of p.values())St(h);p.clear()}}}l(Br,"_n");s(Br,"createVoicePlayer");var In="sekyro.voiceGuidance";function qr(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}l(qr,"xn");s(qr,"readVoicePreference");function Vr(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}l(Vr,"En");s(Vr,"writeVoicePreference");var Ve="capture.tips.summary",Un=typeof window<"u"?C.useLayoutEffect:C.useEffect,jn=Object.freeze({});function rt(e,t){let n=new Set,r=[];for(let a of jr){let o=a===Ve?null:je(e,a,t);o===null||n.has($e(o))||(n.add($e(o)),r.push(o))}return r}l(rt,"ht");s(rt,"resolvedClipUrls");function $r({locale:e,defaultClips:t,options:n}){let r=n===!1,a=r?{}:n??{},o=a.storageKey===void 0?In:a.storageKey,[c,d]=(0,C.useState)(a.defaultEnabled??!0),S=(0,C.useRef)(c),[p,w]=(0,C.useState)(!1),[N,j]=(0,C.useState)("none"),[R,B]=(0,C.useState)(!1),q=(0,C.useRef)(!1),[M,J]=(0,C.useState)(0),h=(0,C.useRef)(null),x=(0,C.useCallback)(()=>(h.current??(h.current=Br()),h.current),[]),_=En[e],k=a.speechFallback,u=k===void 0||k===!0?!0:k===!1?!1:k.includes(e),A=a.clips??t??jn,I=(0,C.useRef)(!1),$=(0,C.useRef)(A);Un(()=>{$.current=A,S.current=c}),(0,C.useEffect)(()=>{if(r||o===null)return;let E=qr(o);E!==null&&(S.current=E,d(E))},[r,o]),(0,C.useEffect)(()=>{if(!(r||!u))return Or(()=>J(E=>E+1))},[r,u]);let i=a.clips;(0,C.useEffect)(()=>{if(r)return;let E=u&&Pr(_);w(rt(A,e).length>0||E),j(i!==void 0&&je(i,Ve,e)!==null?"partner":je(A,Ve,e)!==null||E?"default":"none")},[r,A,i,e,u,_,M]),(0,C.useEffect)(()=>{if(r||!c||!I.current)return;let E=rt(A,e);E.length>0&&x().prefetch(E)},[r,c,A,e,x]),(0,C.useEffect)(()=>()=>{h.current?.dispose(),h.current=null,I.current=!1},[]);let T=(0,C.useCallback)(E=>{r||(I.current=!0,x().unlock({lang:_,speech:u,...E?{prefetch:rt($.current,e)}:{}}))},[r,x,_,u,e]),P=(0,C.useCallback)(()=>T(S.current),[T]),z=(0,C.useCallback)(()=>{q.current=!1,B(!1)},[]),F=(0,C.useCallback)(()=>{z(),h.current?.stop()},[z]),ge=(0,C.useCallback)(()=>{q.current&&F()},[F]),he=(0,C.useCallback)((E,xe)=>{if(r)return;if(q.current){F();return}let ve=x();ve.stop(),q.current=!0,B(!0);let V=xe?.clip===!1?null:je($.current,Ve,e);ve.say({url:V,text:E,lang:_,speech:u,onEnd:z})},[r,F,x,e,_,u,z]),W=(0,C.useCallback)(E=>{r||(E?T(!0):F(),o!==null&&Vr(o,E),S.current=E,d(E))},[r,T,F,o]),Y=(0,C.useCallback)(()=>W(!S.current),[W]),ne=(0,C.useCallback)((E,xe)=>{if(r||!c)return;q.current&&z();let ve=je($.current,E,e);x().say({url:ve,text:xe,lang:_,speech:u})},[r,c,e,x,_,u,z]);return(0,C.useMemo)(()=>({supported:!r&&p,enabled:!r&&c,setEnabled:W,toggle:Y,unlock:P,speakKey:ne,stop:F,summary:r?"none":N,summaryPlaying:R,toggleSummary:he,stopSummary:ge}),[r,p,c,W,Y,P,ne,F,N,R,he,ge])}l($r,"vt");s($r,"useVoiceGuidance");function Fr(e,t,n,r){let{speakKey:a,stop:o,enabled:c}=e,d=(0,C.useRef)(!1);(0,C.useEffect)(()=>{if(!r||!c){d.current&&o(),d.current=!1;return}d.current=!0,st(t)&&t!==Ve&&n!==""&&a(t,n)},[r,c,t,n,a,o])}l(Fr,"Ct");s(Fr,"useSpeakGuidance");function lt(e,t){let n=Dr(e);return n==="face"&&(t==="lighting"||e==="liveness_inconclusive")?"again":n}l(lt,"Pn");s(lt,"retryCoachingOf");function Dr(e){switch(e){case"multiple_faces":return"one_face";case"capture_back_camera":return"front_camera";case"capture_front_camera":return"back_camera";case"capture_not_upright":return"upright";case"media_unreadable":case"clip_too_short":return"recording";case"device_integrity_failed":return"device";default:return"face"}}l(Dr,"Pr");s(Dr,"coachingOfReason");var Fe={face:{title:"capture.retryCoaching.title",tips:["capture.retryCoaching.light","capture.retryCoaching.eyeLevel","capture.retryCoaching.head"]},again:{title:"capture.retryTips.title",tips:["capture.retryCoaching.eyeLevel","capture.retryCoaching.head"]},one_face:{title:"capture.retryTips.title",tips:["capture.retryOneFace.alone","capture.retryOneFace.screens"]},front_camera:{title:"capture.retryTips.title",tips:["capture.retryFrontCamera.screenSide"]},back_camera:{title:"capture.retryTips.title",tips:["capture.retryBackCamera.backSide","capture.retryBackCamera.circle"]},upright:{title:"capture.retryTips.title",tips:["capture.retryUpright.vertical","capture.retryUpright.untilEnd"]},recording:{title:"capture.retryTips.title",tips:["capture.retryRecording.cameraOn","capture.retryRecording.stay","capture.retryRecording.network"]},device:{title:"capture.retryTips.title",tips:["capture.retryDevice.screenRecording","capture.retryDevice.phone"]}};function Hr({showCoaching:e,coaching:t="face",attemptsText:n,showRetake:r,onRetake:a}){let o=Ae(),c=(0,at.useRef)(null);return(0,at.useEffect)(()=>{r&&c.current?.focus()},[r]),!e&&!r?null:(0,fe.jsxs)("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?(0,fe.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,fe.jsx)("p",{className:"sekyro-text-body",children:o(Fe[t].title)}),(0,fe.jsx)("ul",{className:"sekyro-coaching",children:Fe[t].tips.map(d=>(0,fe.jsx)("li",{children:o(d)},d))}),n!==null?(0,fe.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:n}):null]}):null,r?(0,fe.jsx)(te,{ref:c,className:"sekyro-btn--start",onClick:a,children:o("capture.recordAgain")}):null]})}l(Hr,"Tn");s(Hr,"CapturedPanel");function Lt(){try{return!1}catch{return!1}}l(Lt,"nt");s(Lt,"isDevBuild");var Tn=(0,Gr.createContext)(null);function Kr({state:e}){let t=Ae(),[n,r]=(0,ot.useState)(!1);(0,ot.useEffect)(()=>{e!=="unknown"&&r(!0)},[e]);let a=e==="granted"?(0,we.jsx)(Rr,{}):e==="denied"?(0,we.jsx)(Ar,{}):(0,we.jsx)(Mr,{});return(0,we.jsxs)("div",{role:n?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[(0,we.jsx)("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:a}),(0,we.jsx)("span",{children:t(`capture.permission.${e}`)})]})}l(Kr,"On");s(Kr,"PermissionRow");function Zr({voice:e}){let t=Ae();if(!e.supported)return null;let n=e.enabled;return(0,Se.jsxs)("button",{type:"button",role:"switch","aria-checked":n,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:l(()=>e.toggle(),"onClick"),children:[(0,Se.jsxs)("span",{className:"sekyro-switch__label",children:[(0,Se.jsx)(nt,{off:!n}),t("capture.voiceGuidance")]}),(0,Se.jsx)("span",{className:"sekyro-switch__track","aria-hidden":"true",children:(0,Se.jsx)("span",{className:"sekyro-switch__thumb",children:n?(0,Se.jsx)(Lr,{className:"sekyro-switch__check"}):null})})]})}l(Zr,"Hn");s(Zr,"VoiceSwitch");function zr({assets:e,onRetryAssets:t,permission:n,captureMode:r="self",voice:a,tips:o,summary:c,startLabel:d,startDisabled:S,onStart:p}){let w=Ae(),N=(0,X.useRef)(c?.stop);N.current=c?.stop,(0,X.useEffect)(()=>()=>N.current?.(),[]);let j=(0,X.useRef)(null),R=(0,X.useRef)(null),B=(0,X.useRef)(null),q=(0,X.useRef)(e),M=(0,X.useRef)(!1);(0,X.useEffect)(()=>{let u=q.current;if(q.current=e,u===e)return;let A=M.current;e!=="loading"&&(M.current=!1),Wr(j.current)&&(e==="failed"?B.current?.focus():A&&R.current?.focus())},[e]);let J=(0,X.useCallback)(()=>{M.current=!0,t()},[t]),h=e==="loading",x=h||S,_=(0,X.useCallback)(()=>{x||(N.current?.(),p())},[x,p]),k;return e==="failed"?k=(0,O.jsxs)(oe,{tone:"danger",testId:"sekyro-assets-error",children:[(0,O.jsx)("p",{className:"sekyro-text-body",children:w("fcv2.err.models")}),(0,O.jsx)(te,{kind:"ghost",ref:B,className:"sekyro-btn--start",onClick:J,"data-testid":"sekyro-assets-retry",children:w("common.retry")})]}):k=(0,O.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,O.jsx)(te,{ref:R,full:!0,"data-testid":"sekyro-start","aria-disabled":x?"true":void 0,"aria-busy":h?"true":void 0,onClick:_,children:h?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Er,{}),w("capture.preparing.title")]}):d??w("capture.start")}),h?(0,O.jsx)("p",{className:"sekyro-text-muted",children:w("capture.preparing.hint")}):null]}),(0,O.jsxs)("div",{ref:j,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[r==="assisted"?(0,O.jsxs)("div",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-assisted-intro",children:[(0,O.jsx)("h2",{className:"sekyro-text-body",children:w("capture.assisted.title")}),(0,O.jsx)("p",{className:"sekyro-text-muted",children:w("capture.assisted.lead")})]}):null,o!==!1?(0,O.jsx)(Ir,{tips:o}):null,c!==void 0?(0,O.jsxs)(te,{kind:"ghost",className:"sekyro-btn--start",onClick:c.toggle,"data-testid":"sekyro-tips-listen",children:[(0,O.jsx)(nt,{off:!1}),w(c.playing?"capture.tips.stop":"capture.tips.listen")]}):null,(0,O.jsx)(Kr,{state:n}),(0,O.jsx)(Zr,{voice:a}),(0,O.jsx)("p",{className:"sekyro-text-muted",children:w("capture.securityNote")}),k,(0,O.jsx)("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?w("capture.preparing.title"):e==="ready"?w("capture.ready"):""})]})}l(zr,"Fn");s(zr,"PreCaptureScreen");function Wr(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}l(Wr,"Hr");s(Wr,"focusIsOurs");function Yr(){let[e,t]=(0,it.useState)({state:"unknown",settled:!1});return(0,it.useEffect)(()=>Pn(n=>t({state:n,settled:!0})),[]),{permission:e.state,permissionSettled:e.settled}}l(Yr,"Dn");s(Yr,"useCameraStatus");function Qr(e){return Et(e,"mobileRequired")}l(Qr,"qn");s(Qr,"useMobileRequired");function Xr(e){return Et(e,"returning").required}l(Xr,"jn");s(Xr,"useReturning");function Et(e,t){let[n,r]=(0,pe.useState)({required:!1,settled:e===void 0});return(0,pe.useEffect)(()=>{let a=e?.[t];if(e===void 0||typeof a!="function"){r({required:!1,settled:!0});return}let o=!0;return r({required:!1,settled:!1}),Promise.resolve().then(()=>a.call(e)).then(c=>{o&&r({required:c===!0,settled:!0})},()=>{o&&r({required:!1,settled:!0})}),()=>{o=!1}},[e,t]),n}l(Et,"Yn");s(Et,"useFlag");function Jr(e){let t=s(()=>e?.captureChoice??null,"initialChoice"),[n,r]=(0,pe.useState)(()=>({session:"self",choice:t(),settled:e===void 0}));(0,pe.useEffect)(()=>{let o=e?.captureMode,c=e?.captureChoice??null;if(e===void 0||typeof o!="function"){r({session:"self",choice:c,settled:!0});return}let d=!0;return r({session:"self",choice:c,settled:!1}),Promise.resolve().then(()=>o.call(e)).then(S=>{let p=e.captureChoice??null;d&&r({session:p!==null&&S===p?"choice":S==="assisted"||S==="choice"?S:"self",choice:p,settled:!0})},()=>{d&&r({session:"self",choice:null,settled:!0})}),()=>{d=!1}},[e]);let a=(0,pe.useCallback)(o=>{e?.chooseCaptureMode?.(o),r(c=>({...c,choice:o}))},[e]);return{mode:n.session==="choice"?n.choice??"self":n.session==="assisted"?"assisted":"self",session:n.session,choice:n.choice,settled:n.settled,choose:a}}l(Jr,"$n");s(Jr,"useCaptureMode");function en(e){let[t,n]=(0,pe.useState)(!1);return(0,pe.useEffect)(()=>{if(n(!1),e===void 0)return;let r=e.on("busy",()=>n(!0)),a=e.on("result",()=>n(!1));return()=>{r(),a()}},[e]),t}l(en,"zn");s(en,"useBusy");var Vn=s(()=>"idle","serverSnapshot");function xt(e){return Bn(e!==void 0?{assetBaseUrl:e}:{})}l(xt,"Qn");s(xt,"preload");function tn(e,t=!0){let n=(0,Q.useSyncExternalStore)((0,Q.useCallback)(p=>qn(p,e),[e]),()=>On(e),Vn),[r,a]=(0,Q.useState)(null),o=(0,Q.useRef)(!1),c=(0,Q.useCallback)(()=>{xt(e).then(p=>{o.current&&p==="idle"&&a({base:e})})},[e]);(0,Q.useEffect)(()=>(o.current=!0,c(),()=>{o.current=!1}),[c]);let d=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{if(n!=="idle"){d.current={base:e};return}!t||d.current===null||d.current.base!==e||(d.current=null,c())},[n,e,c,t]);let S=(0,Q.useCallback)(()=>{xt(e)},[e]);return{gate:r!==null&&r.base===e&&n==="idle"||n==="ready"?"ready":n==="failed"?"failed":"loading",retry:S}}l(tn,"Jn");s(tn,"useLivenessAssets");var Cr={progress:0,hint:null,faceDetected:!1};function rn(e){let{videoRef:t,assetBaseUrl:n}=e,r=(0,L.useRef)(e.verification).current,a=(0,L.useRef)(!1);e.verification!==r&&!a.current&&Lt()&&(a.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let o=(0,L.useRef)(null),[c,d]=(0,L.useState)("idle"),[S,p]=(0,L.useState)(Cr),[w,N]=(0,L.useState)(!1),[j,R]=(0,L.useState)(!1),[B,q]=(0,L.useState)(null),[M,J]=(0,L.useState)(!1),[h,x]=(0,L.useState)(null),[_,k]=(0,L.useState)(null),[u,A]=(0,L.useState)(null),[I,$]=(0,L.useState)(null),[i,T]=(0,L.useState)(null),[P,z]=(0,L.useState)(!1),F=(0,L.useRef)(null),ge=(0,L.useRef)("idle"),he=(0,L.useRef)(-1),[W,Y]=(0,L.useState)(0),ne=(0,L.useRef)(e);ne.current=e,(0,L.useEffect)(()=>{let ee=t.current;if(ee===null)return;let ue={video:ee,...n!==void 0?{assetBaseUrl:n}:{}},H=r!==void 0?r.liveness(ue):$n(ue);o.current=H;let Ne=s(()=>T(H.facingMode??null),"readFacing");Ne();let De=[H.on("state",b=>{b==="mode_switch"?z(!0):b!=="starting"&&b!=="gating"&&z(!1),b==="starting"?(ge.current!=="starting"&&(he.current+=1,Y(Math.max(0,he.current))),k(null),A(null),p(Cr),R(!1),N(!1),q(null),x(null),F.current=null):b==="gating"&&ge.current==="recording"&&(R(!1),N(!1),q(null),F.current=null),ge.current=b,Ne(),d(b),ne.current.onStateChange?.(b)}),H.on("gate",b=>{let ke=F.current;F.current=b.progress,N(ke!==null&&b.progress<ke-.001&&b.progress>0&&b.progress<1),b.progress>=1&&R(!0),p(b)}),H.on("frozen",({previewDataUrl:b})=>q(b)),H.on("profile",({animations:b})=>J(b==="reduced")),H.on("ramp",({colour:b})=>x(b)),H.on("captured",b=>{k(b),$(null),ne.current.onCaptured?.(b)}),H.on("error",b=>{A(b);let ke=r?.reportCaptureIssue;ke!==void 0&&bt(Ee=>ke.call(r,Ee),kr("liveness",b,Math.max(0,he.current))),ne.current.onError?.(b)}),r?.on("result",b=>{$(b),ne.current.onResult?.(b)})];return()=>{for(let b of De)b?.();o.current=null,H.destroy()}},[r,t,n]);let E=(0,L.useCallback)(()=>{o.current?.start()},[]),xe=(0,L.useCallback)(()=>{o.current?.retry()},[]),ve=(0,L.useCallback)(async()=>{let ee=o.current;return ee===null||typeof ee.canSwitchCaptureMode!="function"?!1:await ee.canSwitchCaptureMode().catch(()=>!1)===!0},[]),V=(0,L.useCallback)(async ee=>{let ue=o.current;if(ue===null||typeof ue.setCaptureMode!="function")return!1;let H=await ue.setCaptureMode(ee).catch(()=>!1)===!0;return H&&T(ue.facingMode??null),H},[]);return{state:c,gate:S,draining:w,gateLocked:j,frozenPreview:B,reduceMotion:M,rampColour:h,artifacts:_,error:u,result:I,facingMode:i,start:E,retry:xe,canSwitchCaptureMode:ve,setCaptureMode:V,modeRestarted:P,attempt:W}}l(rn,"er");s(rn,"useLivenessHandle");var Fn=new Set(["national_number"]);function Nt(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(n=>Fn.has(n));return t.length>0?{...e,options:t}:null}l(Nt,"tr");s(Nt,"pending");function nn(e){let[t,n]=(0,me.useState)(null),[r,a]=(0,me.useState)(e===void 0),[o,c]=(0,me.useState)(!1),[d,S]=(0,me.useState)(!1);(0,me.useEffect)(()=>{if(n(null),e===void 0){a(!0);return}let N=!0,j=e.methodChoice;typeof j=="function"?(a(!1),Promise.resolve().then(()=>j.call(e)).then(B=>{N&&n(Nt(B))},()=>{}).finally(()=>{N&&a(!0)})):a(!0);let R=e.on("method",B=>n(Nt(B)));return()=>{N=!1,R()}},[e]);let p=(0,me.useCallback)(async N=>{if(e===void 0)return!1;c(!0),S(!1);try{return await e.selectMethod(N),n(null),!0}catch{return S(!0),!1}finally{c(!1)}},[e]),w=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:w==="national_number"&&!d?w:null,settled:r,busy:o,failed:d,select:p}}l(nn,"nr");s(nn,"useMethodChoice");var Dn=["ar","fr","en"];function sn(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}l(sn,"io");s(sn,"isClipUrl");function an(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let n={};for(let r of Dn){let a=t[r];if(!(typeof a!="object"||a===null))for(let[o,c]of Object.entries(a))!st(o)||!sn(c)||((n[r]??(n[r]={}))[o]=c)}return Object.keys(n).length>0?n:null}l(an,"ao");s(an,"toVoiceClipMap");function ln(e){let[t,n]=(0,Te.useState)(null);(0,Te.useEffect)(()=>{if(n(null),e===void 0)return;let a=!0,o=s(d=>{if(!a)return;let S=typeof d=="object"&&d!==null&&typeof d.setId=="string"?d:null;n(p=>p?.setId===S?.setId?p:S)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(o,()=>o(null))}catch{o(null)}let c=e.on("view",d=>o(d.voice));return()=>{a=!1,c()}},[e]);let r=(0,Te.useMemo)(()=>t!==null?an(t):null,[t]);return e===void 0?null:r}l(ln,"rr");s(ln,"useServerVoiceClips");function on({voice:e}){let t=Ae();return(0,Rt.jsx)(te,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:l(()=>e.toggle(),"onClick"),children:(0,Rt.jsx)(nt,{off:!e.enabled,className:"sekyro-icon"})})}l(on,"sr");s(on,"VoiceChip");var Hn=new Set(["abandoned","not_opened","cancelled","superseded"]),Gn=800,Kn="capture.lookAtColours";function cn(e){return e===void 0||e!==!1&&e.length===_t.length&&_t.every(t=>e.includes(t))}l(cn,"mo");s(cn,"isDefaultTips");function un(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}l(un,"yo");s(un,"carriesActivation");function dn(e){return typeof e=="object"&&e!==null&&!(0,m.isValidElement)(e)&&"tone"in e&&"text"in e}l(dn,"go");s(dn,"isNoticeObject");var Zn=new Set(["nni_unbound","id_number_unbound","method_required","mobile_required","portrait_required"]);function pn(e){return e==="starting"||e==="gating"||e==="recording"||e==="mode_switch"}l(pn,"vo");s(pn,"isCapturing");function hn(e){return e==="captured"||e==="uploading"||e==="checking"}l(hn,"Co");s(hn,"isPostCapture");function zn({verification:e,locale:t,dir:n,strings:r,slots:a,autoStart:o=!1,notice:c,startDisabled:d=!1,startLabel:S,tips:p,tipsSummary:w,coach:N,voice:j,onGuidance:R,onCaptured:B,onResult:q,onError:M,onStateChange:J,assetBaseUrl:h,className:x}){let _=dr(t),k=(0,m.useMemo)(()=>ur(t,r),[t,r,_]),u=(0,m.useMemo)(()=>g=>k[g]??"",[k]),A=n??(t==="ar"?"rtl":"ltr"),I=(0,m.useRef)(null),$=(0,m.useContext)(Tn),i=rn({verification:e,videoRef:I,assetBaseUrl:h,onCaptured:B,onResult:q,onError:M,onStateChange:J}),T=tn(h,i.state==="idle"&&i.error===null),P=nn(e),z=P.choice!==null,F=Qr(e),ge=Xr(e),he=en(e),W=Yr(),Y=Jr(e),ne=Y.session==="choice",E=Y.mode==="assisted",xe=j!==!1&&j?.clips===void 0,ve=ln(xe?e:void 0),V=$r({locale:t,defaultClips:ve,options:j}),ee=E?"environment":"user",ue=Y.settled,H=(0,m.useRef)(null),Ne=(0,m.useRef)(!1),De=(0,m.useRef)(V.unlock);De.current=V.unlock,(0,m.useEffect)(()=>{let g=H.current;if(g===null)return;let le=["pointerup","touchend","click","keydown"],_e=s(()=>{for(let qe of le)g.removeEventListener(qe,Me,!0)},"disarm");function Me(qe){if(Ne.current){_e();return}un(qe)&&(Ne.current=!0,_e(),De.current())}l(Me,"Re"),s(Me,"onGesture");for(let qe of le)g.addEventListener(qe,Me,{capture:!0,passive:!0});return _e},[]);let b=(0,m.useCallback)(()=>{Ne.current||(Ne.current=!0,V.unlock()),i.start()},[V.unlock,i.start]),ke=(0,m.useCallback)(()=>i.start(),[i.start]),Ee=(0,m.useRef)(!1),Pe=i.state==="idle"&&i.error===null,Ut=!z&&!F.required&&(o===!0||o==="when-permitted"&&W.permission==="granted"),jt=Ut&&P.settled&&F.settled&&ue,gn=o==="when-permitted"&&!W.permissionSettled&&!Ee.current,Tt=Ut&&Pe&&!Ee.current,ut=(gn||Tt||!ue)&&T.gate==="ready"?"loading":T.gate;(0,m.useEffect)(()=>{!jt||!Pe||T.gate!=="ready"||Ee.current||(Ee.current=!0,ke())},[jt,Pe,T.gate,ke]);let vn=Pe&&!z&&!F.required&&!(Tt&&T.gate==="ready"),[Pt,Ot]=(0,m.useState)(!1),{canSwitchCaptureMode:Bt,setCaptureMode:qt}=i;(0,m.useEffect)(()=>{if(!Y.settled||!ne){Ot(!1);return}let g=!0;return Bt().then(le=>{g&&Ot(le)}),()=>{g=!1}},[Y.settled,ne,Bt]);let{choose:Vt}=Y,Ie=E?"self":"assisted",kn=(0,m.useCallback)(async()=>{await qt(Ie)&&Vt(Ie)},[qt,Vt,Ie]),$t=i.state!=="idle"&&i.facingMode!==null?i.facingMode:ee;(0,m.useEffect)(()=>{let g=I.current?.style;$t==="user"?g?.removeProperty("transform"):g&&(g.transform="none")},[$t]);let He=(0,m.useMemo)(()=>i.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(i.artifacts.keyframe):null,[i.artifacts]);(0,m.useEffect)(()=>{if(He!==null)return()=>URL.revokeObjectURL(He)},[He]);let Ft=i.frozenPreview??He,Ue=e!==void 0,Z=pn(i.state),be=hn(i.state),Ge=Z||be,se=i.result,Dt=i.state==="done"&&se!==null,Ke=Z&&i.rampColour!==null,dt=i.state==="recording"&&i.frozenPreview!==null&&!Ke,Ze=$!==null,Ht=Pt&&Z&&!dt?{to:Ie,label:u(Ie==="assisted"?"capture.modeSwitch.toAssisted":"capture.modeSwitch.toSelf"),description:u(Ie==="assisted"?"capture.modeSwitch.toAssistedLabel":"capture.modeSwitch.toSelfLabel"),onSwitch:s(()=>{kn()},"onSwitch")}:null,ze=i.modeRestarted&&Z?u("capture.modeSwitch.restarted"):null,Oe=be||dt,Gt=be?"checking":dt?"frozen":i.state==="recording"||Ke?"recording":i.gateLocked||i.gate.progress>=1?"locked":i.gate.faceDetected?"aligning":"seeking",We=Z?i.gate.hint:null,Ye=i.state==="starting"?"capture.preparing.title":We===null?null:We==="center"&&!i.gate.faceDetected?"fcv3.no_face":lr(We),[bn,Kt]=(0,m.useState)(null);(0,m.useEffect)(()=>{if(Ye!=="fcv3.no_face"){Kt(Ye);return}if(!Z)return;let g=setTimeout(()=>Kt(Ye),Gn);return()=>clearTimeout(g)},[Ye,Z]);let pt=Z&&!Ke&&typeof N=="string"&&N!=="",Zt=E&&Z?u("capture.assisted.stage"):null,Re=Z&&!pt?Ke?Kn:bn:null,ht=pt?N:Re===null?"":u(Re);Fr(V,Re,ht,Z);let zt=(0,m.useRef)(R);zt.current=R,(0,m.useEffect)(()=>{if(st(Re))try{zt.current?.(Re)}catch(g){console.error("[@sekyro/react] onGuidance threw:",g)}},[Re]);let Be=(0,m.useMemo)(()=>({supported:V.supported,enabled:V.enabled,setEnabled:V.setEnabled,toggle:V.toggle}),[V.supported,V.enabled,V.setEnabled,V.toggle]),ft=a?.voicePrompt,Wt=ft!==void 0,Yt=j===void 0,Qt=(0,m.useRef)(!1);(0,m.useEffect)(()=>{!Wt||!Yt||Qt.current||!Lt()||(Qt.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[Wt,Yt]);let Cn=ft!==void 0?(g,le,_e)=>ft(g,le,_e,Be):V.supported?()=>(0,v.jsx)(on,{voice:Be}):void 0,{summary:mt,summaryPlaying:Xt,toggleSummary:Jt,stopSummary:er}=V,Qe=w!==void 0&&w!=="",tr=Qe?w:u("capture.tips.summary"),rr=Qe?mt!=="none":mt==="partner"||mt==="default"&&cn(p),_n=(0,m.useMemo)(()=>rr?{playing:Xt,toggle:s(()=>Jt(tr,{clip:!Qe}),"toggle"),stop:er}:void 0,[rr,Xt,Jt,tr,er,Qe]),wn=(0,m.useMemo)(()=>({assets:ut,retryAssets:T.retry,permission:W.permission,permissionSettled:W.permissionSettled,captureMode:Y.mode,facing:ee,voice:Be}),[ut,T.retry,W.permission,W.permissionSettled,Y.mode,ee,Be]),Sn=dn(c)?(0,v.jsx)(oe,{tone:c.tone,testId:"sekyro-host-notice",children:(0,v.jsx)("span",{children:c.text})}):c??null,ae=se!==null&&se.status==="retry"?se:null,G=Dt&&se.status==="unavailable"&&!z&&se.reasonCode!=="portrait_required"?se:null,Ce=Dt&&(se.status==="verified"||se.status==="not_verified"||se.status==="review")?se:null,yt=s((g,le)=>{if(g===void 0)return null;if(g==="device_cooldown"){let Me=ir(t,le);if(Me!==null)return u(Me.key).replace("{time}",Me.time)}let _e=et(g);return _e===null?null:u(_e)},"reasonText"),gt=s(g=>{let le=g.retakeHint===void 0?null:Je(g.retakeHint);return le===null?yt(g.reasonCode):u(le)},"retryText"),nr=Ce===null?null:yt(Ce.reasonCode,Ce.retryAfter)??(Ce.status==="not_verified"&&Ce.reason!==void 0&&Hn.has(Ce.reason)?u("errors.session_expired"):null),xn=G!==null&&G.reasonCode!==void 0&&G.reasonCode!=="nni_unbound"&&G.reasonCode!=="id_number_unbound"&&G.reasonCode!=="method_required"&&G.reasonCode!=="mobile_required"&&!(G.reasonCode==="no_recorder"&&i.artifacts?.degraded==="NO_RECORDER"),Xe=G?.reasonCode,sr=i.attempt;(0,m.useEffect)(()=>{G===null||Xe===void 0||e?.reportCaptureIssue===void 0||Zn.has(Xe)||bt(g=>e.reportCaptureIssue?.(g),{check:"liveness",kind:"unavailable",phase:"upload",engineKind:Xe,attempt:Math.min(1e3,sr)})},[G,Xe,sr,e]);let ar=kt(),Nn=z&&P.auto===null&&!Z&&!be&&i.error===null,vt=(0,m.useCallback)(async g=>{await P.select(g)&&i.state==="done"&&i.retry()},[P.select,i.state,i.retry]);return(0,m.useEffect)(()=>{P.auto!==null&&!P.busy&&!Z&&!be&&vt(P.auto)},[P.auto,P.busy,Z,be,vt]),(0,v.jsx)(pr,{value:u,children:(0,v.jsxs)("div",{ref:H,className:x===void 0?"sekyro-capture":`sekyro-capture ${x}`,dir:A,lang:t,"data-testid":"sekyro-liveness-capture","data-state":i.state,children:[a?.header,ae!==null&&gt(ae)!==null&&!(Ze&&Ge)?(0,v.jsx)(oe,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:(0,v.jsx)("span",{children:gt(ae)})}):null,ze!==null&&!Ze?(0,v.jsx)(oe,{tone:"info",role:"status",testId:"sekyro-mode-switch-status",children:(0,v.jsx)("span",{children:ze})}):null,he&&be&&!Ze?(0,v.jsx)(oe,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:(0,v.jsx)("span",{children:u("capture.busy")})}):null,F.required&&Pe?(0,v.jsx)(oe,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:(0,v.jsx)("span",{children:u("reasons.mobile_required")})}):null,i.error!==null?a?.errorPanel!==void 0?a.errorPanel(i.error,i.retry):(0,v.jsxs)(oe,{tone:"danger",testId:"sekyro-error-notice",children:[(0,v.jsx)("span",{children:u(or(i.error))}),i.error.retryable?(0,v.jsx)(te,{ref:ar,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:u("common.retry")}):null]}):null,G!==null?(0,v.jsxs)(oe,{tone:"danger",testId:"sekyro-unavailable-notice",children:[(0,v.jsx)("span",{children:(G.reasonCode==="attestation"&&G.attestationError==="clock_wrong"?u("errors.device_clock"):yt(G.reasonCode))??u(G.reasonCode===void 0?"errors.session_expired":"errors.network_error")}),xn?(0,v.jsx)(te,{ref:ar,kind:"ghost",className:"sekyro-btn--start",onClick:i.retry,children:u(G.reasonCode==="attestation"?"common.retry":"capture.recordAgain")}):null]}):null,nr!==null&&Ce!==null?(0,v.jsx)(oe,{tone:Ce.status==="not_verified"?"danger":"info",testId:"sekyro-result-notice",children:(0,v.jsx)("span",{children:nr})}):null,(0,v.jsx)("div",{className:Ge?void 0:"sekyro-hidden","data-capture-live":Ge?"":void 0,children:Ze?$({videoRef:I,guidance:Oe&&Ue?u("capture.checking"):ht,coached:pt&&!(Oe&&Ue),note:Oe?Ue?u(he?"capture.busy":"capture.checkingHint"):null:ze??(ae!==null?gt(ae):Zt),settled:Oe&&Ue,progress:i.gate.progress,phase:Gt,still:Oe?Ft:null,live:Ge,modeSwitch:Ht,...Pt?{status:ze}:{},ramp:i.rampColour===null?null:{colour:i.rampColour}}):(0,v.jsx)(hr,{videoRef:I,guidanceText:ht,guidanceHint:We,guidanceKey:Re,progress:i.gate.progress,phase:Gt,draining:i.draining,stillUrl:Ft,showChecking:Ue,operatorText:Zt,voicePrompt:Cn,overlay:l(g=>(0,v.jsxs)(v.Fragment,{children:[a?.stageOverlay?.(g),(0,v.jsx)(fr,{colour:i.rampColour})]}),"overlay"),reduceMotion:i.reduceMotion,modeSwitch:Ht})}),Nn&&P.choice!==null?(0,v.jsx)(Ur,{title:u("method.title"),description:u("method.description"),options:P.choice.options.map(g=>({id:g,label:u(`method.${g}`)})),busy:P.busy,error:P.failed?u("errors.network_error"):null,focus:i.state==="done",testId:"sekyro-method",look:"buttons",onChoose:l(g=>{vt(g)},"onChoose")}):null,vn?(0,v.jsxs)(v.Fragment,{children:[ge&&a?.header===void 0&&a?.intro===void 0?(0,v.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,v.jsx)("h2",{className:"sekyro-text-body",children:u("returning.title")}),(0,v.jsx)("p",{className:"sekyro-text-muted",children:u("returning.description")})]}):null,Sn,a?.intro!==void 0?a.intro(b,wn):(0,v.jsx)(zr,{assets:ut,onRetryAssets:T.retry,permission:W.permission,captureMode:Y.mode,voice:Be,tips:p??_t,summary:_n,startLabel:S,startDisabled:d,onStart:b})]}):null,(0,v.jsx)(Hr,{showCoaching:ae!==null,coaching:lt(ae?.reasonCode,ae?.retakeHint),attemptsText:ae?.attemptsRemaining!==void 0?cr(k,t,ae.attemptsRemaining):null,showRetake:ae!==null&&!Z&&!be||!Ue&&i.state==="captured",onRetake:i.retry}),a?.footer]})})}l(zn,"Ei");s(zn,"LivenessCapture");var It=U(K(),1),ct=U(K(),1),f=U(de(),1);import{methodNameOf as fn}from"@sekyro/web";import{isInAppBrowser as rs}from"@sekyro/web/client";var _s={document:"card",population_registry:"id",national_eid:"smartphone",phone_otp:"phone",email_otp:"email"};function Wn(e,t){switch(e.service){case"document":return t.t("method.document_photo");case"population_registry":return fn(e,t.locale)??t.t("method.nationalNumber");case"national_eid":return fn(e,t.locale)??t.t("method.nationalEid");default:return null}}l(Wn,"D");s(Wn,"identityLabel");function Yn(e,t){let[n,r]=(0,It.useState)(!1),[a,o]=(0,It.useState)(null);return{busy:n,error:a,run:s(c=>{r(!0),o(null),c().then(()=>r(!1),d=>{r(!1),o(e.t(br(d,e.strings))),t?.(d)})},"run")}}l(Yn,"W");s(Yn,"useChoiceAction");function mn(){let e=`sekyro-face-light-${(0,ct.useId)().replace(/[^A-Za-z0-9_-]/g,"")}`;return(0,f.jsxs)("svg",{className:"sekyro-mark sekyro-mark--face",viewBox:"0 0 168 206","aria-hidden":"true",focusable:"false",children:[(0,f.jsx)("defs",{children:(0,f.jsx)("mask",{id:e,children:(0,f.jsx)("ellipse",{className:"sekyro-mark__arc",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"1",fill:"none",stroke:"#fff",strokeWidth:"16"})})}),(0,f.jsx)("ellipse",{cx:"84",cy:"103",rx:"64",ry:"83",fill:"none",className:"sekyro-mark__line"}),(0,f.jsx)("path",{className:"sekyro-mark__face",d:"M68 64v10M100 64v10M84 66v25q0 2-6 1M60 108q24 18 48 0"}),(0,f.jsx)("ellipse",{className:"sekyro-mark__ticks",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56"}),(0,f.jsx)("ellipse",{className:"sekyro-mark__ticks sekyro-mark__ticks--light",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56",mask:`url(#${e})`})]})}l(mn,"B");s(mn,"FaceMark");var Qn={glasses:"jGlasses",lighting:"light",faceCamera:"camera"};function Xn(e){if(!(e?.kind!=="liveness"||e.reason===void 0))return{reason:e.reason,...e.retakeHint!==void 0?{retakeHint:e.retakeHint}:{},attemptsRemaining:e.attemptsRemaining??0,attemptsExhausted:e.attemptsExhausted===!0}}l(Xn,"re");s(Xn,"faceIntroRetryOf");var Jn={"capture.retryFrontCamera.screenSide":"camera","capture.retryBackCamera.backSide":"camera","capture.retryUpright.vertical":"smartphone","capture.retryUpright.untilEnd":"smartphone","capture.retryRecording.cameraOn":"camera","capture.retryRecording.stay":"smartphone","capture.retryRecording.network":"smartphone","capture.retryDevice.screenRecording":"smartphone","capture.retryDevice.phone":"smartphone"};function es({start:e,context:t,tips:n,tipsTitle:r,human:a=!1,returning:o=!1,notice:c,retry:d}){let S=Ct(),{t:p}=S,w=d===void 0?"face":lt(d.reason,d.retakeHint),N=w==="face"?null:Fe[w].tips,j=(0,ct.useContext)(yr)?.busy===!0;return(0,f.jsxs)("section",{className:"sekyro-step",children:[(0,f.jsx)(mn,{}),t.captureMode==="assisted"?(0,f.jsx)(tt,{title:p("capture.assisted.heading"),lead:p("capture.assisted.lead")}):o?(0,f.jsx)(tt,{title:p("returning.heading"),lead:p("returning.description")}):(0,f.jsx)(tt,{title:p(a?"native.face.humanIntroTitle":"native.face.introTitle"),lead:p(a?"native.face.humanIntroLead":"native.face.introLead")}),d!==void 0?(0,f.jsx)(yn,{retry:d,title:Fe[w].title}):null,r!==void 0&&N===null?(0,f.jsx)("p",{className:"sekyro-section-label",children:r}):null,(0,f.jsx)("ul",{className:"sekyro-tiprows",children:N!==null?N.map(R=>(0,f.jsxs)("li",{children:[(0,f.jsx)(Le,{name:Jn[R]??"face"}),p(R)]},R)):n!==void 0?n.map(R=>(0,f.jsxs)("li",{children:[(0,f.jsx)(Le,{name:Qn[R.id]??"face"}),R.text]},R.id)):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("li",{children:[(0,f.jsx)(Le,{name:"light"}),p("capture.tips.light")]}),(0,f.jsxs)("li",{children:[(0,f.jsx)(Le,{name:"jGlasses"}),p("capture.tips.uncover")]}),(0,f.jsxs)("li",{children:[(0,f.jsx)(Le,{name:"smartphone"}),p("capture.tips.eyeLevel")]})]})}),c??null,c!==void 0?null:t.assets==="failed"?(0,f.jsx)(te,{kind:"secondary",full:!0,onClick:t.retryAssets,children:p("common.retry")}):null,c!==void 0?null:(0,f.jsx)(mr,{children:(0,f.jsxs)(te,{full:!0,disabled:t.assets!=="ready"||j,"aria-busy":t.assets==="loading"||void 0,onClick:e,children:[(0,f.jsx)(Le,{name:"camera"}),p("capture.start")]})})]})}l(es,"ae");s(es,"FaceIntro");var ts=new Set(["match_inconclusive","no_face_source","below_threshold"]);function yn({retry:e,title:t}){let n=Ct(),r=e.retakeHint===void 0?null:Je(e.retakeHint),a=e.reason==="probe_not_from_liveness"?"capture.retrySamePerson.message":ts.has(e.reason)?"capture.retryMatch.message":et(e.reason);return(0,f.jsxs)(gr,{tone:"warning",children:[r!==null?(0,f.jsx)("span",{children:n.t(r)}):a!==null?(0,f.jsx)("span",{children:n.t(a)}):null,r===null?(0,f.jsx)("span",{children:n.t(t)}):null,(0,f.jsx)("span",{children:vr(n,e.attemptsRemaining,e.attemptsExhausted)})]})}l(yn,"M");s(yn,"RetryNotice");function ns(e){return rs(e)}l(ns,"ce");s(ns,"isInAppBrowser");function ss(e,t){let n=t??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(!/Android/i.test(n))return null;let r;try{r=new URL(e)}catch{return null}if(r.protocol!=="https:"&&r.protocol!=="http:")return null;let a=r.protocol.slice(0,-1);return`intent://${r.host}${r.pathname}${r.search}#Intent;scheme=${a};action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(e)};end`}l(ss,"pe");s(ss,"androidBrowserIntent");export{Ur as a,Lt as b,Tn as c,Jr as d,zn as e,_s as f,Wn as g,Yn as h,Xn as i,es as j,ns as k,ss as l};
@@ -1 +0,0 @@
1
- import{b,t as r,v as l,y as o}from"./chunk-RSXZISUG.js";import{a,c as p,i}from"./chunk-SSU37LFQ.js";var s=p(b(),1);function f({tone:d,icon:n,busy:c,title:m,titleId:e,children:u,actions:t,live:y,testId:h}){let k=r();return(0,s.jsxs)("section",{className:"sekyro-step sekyro-status",...e!==void 0?{"aria-labelledby":e}:{},...y?{role:"status","aria-live":"polite"}:{},"data-testid":h,children:[(0,s.jsxs)("div",{className:"sekyro-status__body",children:[(0,s.jsx)("span",{className:`sekyro-tile sekyro-tile--${d}${c?" is-busy":""}`,"aria-hidden":"true",children:(0,s.jsx)(l,{name:n})}),(0,s.jsxs)("div",{className:"sekyro-heading sekyro-status__text",children:[(0,s.jsx)("h2",{id:e,ref:k,tabIndex:-1,className:"sekyro-text-body",children:m}),u]})]}),t!=null&&t!==!1?(0,s.jsx)(o,{children:t}):null]})}a(f,"g");i(f,"StatusPage");export{f as a};
@@ -1 +0,0 @@
1
- import{a as g}from"./chunk-L7NFG55Y.js";import{K as b,a as k,b as y,c as x}from"./chunk-RSXZISUG.js";import{a as c,c as f,i as n}from"./chunk-SSU37LFQ.js";var l=f(k(),1),t=f(k(),1),w=f(k(),1),r=f(y(),1),e=f(y(),1);var i,C=(i=class extends w.Component{constructor(){super(...arguments),this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}},c(i,"c"),i);n(C,"LoadBoundary");var j=C,F={load:n(()=>import("./flow-views-TVG4PFSE-OWVBXJ2R.js"),"load")};function S({view:s,i18n:a,quiet:o,...m}){let[d,h]=(0,t.useState)(0),u=(0,t.useMemo)(()=>(0,t.lazy)(()=>F.load().then(v=>({default:v[s]}))),[s,d]),p=(0,r.jsxs)(b,{tone:"danger",children:[(0,r.jsx)("span",{children:a.t("errors.network_error")}),(0,r.jsx)(x,{kind:"secondary",onClick:c(()=>h(v=>v+1),"onClick"),children:a.t("common.retry")})]});return(0,r.jsx)(j,{fallback:p,children:(0,r.jsx)(t.Suspense,{fallback:o===!0?null:(0,r.jsx)("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:a.t("common.loading")}),children:(0,r.jsx)(u,{...m,i18n:a})})},d)}c(S,"k");n(S,"Flow");var B=(0,l.createContext)(void 0);function H({i18n:s,lead:a,refresh:o,actions:m}){let d=(0,l.useContext)(B),[h,u]=(0,l.useState)(!1);if(d!==void 0)return(0,e.jsx)(S,{view:"HandoffView",i18n:s,url:d,lead:a,...o!==void 0?{refresh:o}:{},footer:m});let p=n(()=>{o!==void 0&&(u(!0),o().catch(()=>{}).finally(()=>u(!1)))},"again");return(0,e.jsx)(g,{tone:"brand",icon:"smartphone",title:s.t("handoff.title"),testId:"sekyro-phone-handoff",actions:(0,e.jsxs)(e.Fragment,{children:[m,o!==void 0?(0,e.jsx)(x,{kind:"secondary",full:!0,disabled:h,onClick:p,children:s.t("common.refresh")}):null]}),children:(0,e.jsx)("p",{children:a})})}c(H,"K");n(H,"PhoneHandoff");export{j as a,S as b,B as c,H as d};
@@ -1 +0,0 @@
1
- "use client";import{a as at}from"./chunk-Q47EK3FL.js";import{a as Xe}from"./chunk-HBK2ROSI.js";import{d as nt}from"./chunk-ZG77WO25.js";import"./chunk-P223YKM3.js";import{a as qe,b as Je,c as et}from"./chunk-QDHTMKLS.js";import"./chunk-L7NFG55Y.js";import{a as tt}from"./chunk-3SFLN33V.js";import"./chunk-D2KOFFZS.js";import{E as Ke,F as je,G as Qe,I as Ze,K as Q,L as le,a as Ut,b as Bt,c as A,o as We,q as Ye,v as D,w as _e,y as Ce}from"./chunk-RSXZISUG.js";import{a as l,c as Ge,i as s}from"./chunk-SSU37LFQ.js";var i=Ge(Ut(),1),n=Ge(Bt(),1);import{acceptedTypesFor as Et}from"@sekyro/web";var Vt={image:'<path d="M2 12C2 7.29 2 4.93 3.46 3.46C4.93 2 7.29 2 12 2C16.71 2 19.07 2 20.54 3.46C22 4.93 22 7.29 22 12C22 16.71 22 19.07 20.54 20.54C19.07 22 16.71 22 12 22C7.29 22 4.93 22 3.46 20.54C2 19.07 2 16.71 2 12Z" stroke="currentColor"/><path d="M14 8A2 2 0 1 0 18 8A2 2 0 1 0 14 8Z" stroke="currentColor"/><path d="M2 12.5L3.75 10.97C4.66 10.17 6.04 10.22 6.89 11.07L11.18 15.36C11.87 16.05 12.95 16.14 13.75 15.58L14.04 15.37C15.19 14.57 16.74 14.66 17.78 15.6L21 18.5" stroke="currentColor" stroke-linecap="round"/>',flashlight:'<path d="M9 11.66V19C9 19.93 9 20.4 9.15 20.77C9.36 21.26 9.74 21.64 10.23 21.85C10.6 22 11.07 22 12 22C12.93 22 13.4 22 13.77 21.85C14.26 21.64 14.64 21.26 14.85 20.77C15 20.4 15 19.93 15 19V11.66C15 10.84 15 10.43 15.15 10.06C15.3 9.7 15.59 9.41 16.17 8.83L16.17 8.83L19.41 5.59C19.7 5.3 19.85 5.15 19.92 4.97C20 4.78 20 4.58 20 4.17V4C20 3.06 20 2.59 19.71 2.29C19.41 2 18.94 2 18 2H6C5.06 2 4.59 2 4.29 2.29C4 2.59 4 3.06 4 4V4.17C4 4.58 4 4.78 4.08 4.97C4.15 5.15 4.3 5.3 4.59 5.59L7.83 8.83C8.41 9.41 8.7 9.7 8.85 10.06C9 10.43 9 10.84 9 11.66Z" stroke="currentColor" stroke-linecap="round"/><path d="M15 10H9" stroke="currentColor" stroke-linecap="round"/><path d="M12 13V15" stroke="currentColor" stroke-linecap="round"/><path d="M4.5 5H19.5" stroke="currentColor" stroke-linecap="round"/>'},Ft={"dcv3.mrz.searching":"ضع صفحة جواز السفر كاملة داخل الإطار","dcv3.mrz.showMrzSide":"اعرض الوجه الذي يحتوي على سطرين أو ثلاثة أسطر من الحروف","dcv3.mrz.reading":"جارٍ قراءة الوثيقة… ثبّتها","dcv3.mrz.moveCloser":"اقترب حتى تملأ أسطر الحروف الإطار","dcv3.mrz.turnSideways":"أدر هاتفك أفقيًا لقراءة أسطر الحروف","dcv3.mrz.glare":"أمِل الوثيقة لإزالة الانعكاس","dcv3.mrz.holdStill":"لا تتحرك","dcv3.mrz.valid":"تمت قراءة الوثيقة. جارٍ التقاط الصورة","dcv3.mrz.looksLikePassport":"يبدو أن هذا جواز سفر","dcv3.mrz.looksLikeCard":"يبدو أن هذه بطاقة تعريف أو بطاقة إقامة"},ce={"dcv3.mrz.searching":"Fit the whole passport page in the frame","dcv3.mrz.showMrzSide":"Show the side with the two or three lines of characters","dcv3.mrz.reading":"Reading the document… hold it steady","dcv3.mrz.moveCloser":"Move closer so the lines of characters fill the frame","dcv3.mrz.turnSideways":"Turn your phone sideways to read the lines of characters","dcv3.mrz.glare":"Tilt the document to remove the reflection","dcv3.mrz.holdStill":"Hold still","dcv3.mrz.valid":"Document read. Taking the photo","dcv3.mrz.looksLikePassport":"This looks like a passport","dcv3.mrz.looksLikeCard":"This looks like an identity card or residence permit"},Gt={"dcv3.mrz.searching":"Cadrez toute la page du passeport","dcv3.mrz.showMrzSide":"Montrez la face avec les deux ou trois lignes de caractères","dcv3.mrz.reading":"Lecture du document… tenez-le immobile","dcv3.mrz.moveCloser":"Rapprochez-vous pour que les lignes de caractères remplissent le cadre","dcv3.mrz.turnSideways":"Tournez votre téléphone à l’horizontale pour lire les lignes de caractères","dcv3.mrz.glare":"Inclinez le document pour supprimer le reflet","dcv3.mrz.holdStill":"Ne bougez plus","dcv3.mrz.valid":"Document lu. Prise de la photo","dcv3.mrz.looksLikePassport":"Ceci ressemble à un passeport","dcv3.mrz.looksLikeCard":"Ceci ressemble à une carte d’identité ou un titre de séjour"},Xt={"doc.uploadInstead":"رفع صورة بدلًا من ذلك","doc.uploadTitle":"ارفع صورة لوثيقتك","doc.uploadHint":"صورة واضحة للوثيقة كاملة، ملتقطة بكاميرا.","doc.uploadUnsupported":"اختر صورة للوثيقة بصيغة JPEG أو PNG أو HEIC.","doc.uploadFailed":"تعذّر إرسال هذه الصورة. أعد المحاولة.","doc.source.title":"كيف تريد إضافة وثيقتك؟","doc.source.description":"التقط صورة بالكاميرا، أو ارفع صورة للوثيقة من هذا الجهاز.","doc.source.camera":"التقاط صورة","doc.source.upload":"رفع صورة"},de={"doc.uploadInstead":"Upload a photo instead","doc.uploadTitle":"Upload a photo of your document","doc.uploadHint":"A clear photo of the whole document, taken with a camera.","doc.uploadUnsupported":"Choose a JPEG, PNG or HEIC photo of the document.","doc.uploadFailed":"We could not send this photo. Try again.","doc.source.title":"How do you want to add your document?","doc.source.description":"Take a photo with the camera, or upload a photo of the document from this device.","doc.source.camera":"Take a photo","doc.source.upload":"Upload a photo"},Wt={"doc.uploadInstead":"Téléverser une photo à la place","doc.uploadTitle":"Téléversez une photo de votre document","doc.uploadHint":"Une photo nette du document entier, prise avec un appareil photo.","doc.uploadUnsupported":"Choisissez une photo JPEG, PNG ou HEIC du document.","doc.uploadFailed":"Nous n'avons pas pu envoyer cette photo. Réessayez.","doc.source.title":"Comment voulez-vous ajouter votre document ?","doc.source.description":"Prenez une photo avec la caméra, ou importez une photo du document depuis cet appareil.","doc.source.camera":"Prendre une photo","doc.source.upload":"Importer une photo"},Yt={"native.doc.introTitle":"سنلتقط صورة لوثيقتك","native.doc.introLead":"تُلتقط الصورة تلقائيًا عندما تكون الوثيقة داخل الإطار.","native.doc.tip.flat":"ضع الوثيقة مسطحة على سطح داكن.","native.doc.tip.glare":"تجنّب انعكاسات الضوء.","native.doc.tip.frame":"أبقِ الوثيقة كاملة داخل الإطار.","native.doc.openCamera":"افتح الكاميرا","native.doc.changeDocument":"تغيير الوثيقة","native.doc.titleOf.carte_identite":"صوّر بطاقة هويتك","native.doc.titleOf.passport":"صوّر جواز سفرك","native.doc.titleOf.residence_permit":"صوّر بطاقة إقامتك","native.doc.titleOf.drivers_license":"صوّر رخصة قيادتك","native.doc.onlyType.carte_identite":"{country}: تُقبل بطاقة الهوية فقط هنا.","native.doc.onlyType.passport":"{country}: يُقبل جواز السفر فقط هنا.","native.doc.onlyType.residence_permit":"{country}: تُقبل بطاقة الإقامة فقط هنا.","native.doc.onlyType.drivers_license":"{country}: تُقبل رخصة القيادة فقط هنا.","native.scan.closer":"اقترب قليلًا","native.scan.farther":"ابتعد قليلًا","native.scan.glare":"أمِل البطاقة قليلًا لإبعاد الانعكاس.","native.scan.dark":"الإضاءة ضعيفة. انتقل إلى مكان أفضل إضاءة أو شغّل المصباح.","native.scan.darkNoLight":"الإضاءة ضعيفة. انتقل إلى مكان أفضل إضاءة.","native.scan.blurry":"الصورة غير واضحة. ثبّت الهاتف.","native.scan.holdStill":"لا تتحرك","native.scan.reading":"جارٍ التحقق من وثيقتك…","native.scan.putDown":"يمكنك وضع وثيقتك جانبًا.","native.scan.retry":"لنحاول مرة أخرى","native.scan.seenPassport":"يبدو أن هذا جواز سفر","native.scan.seenCard":"يبدو أن هذه بطاقة هوية أو بطاقة إقامة","native.scan.showInstead.carte_identite":"أظهر بطاقة هويتك بدلًا منها","native.scan.showInstead.passport":"أظهر صفحة الصورة في جواز سفرك بدلًا منها","native.scan.showInstead.residence_permit":"أظهر بطاقة إقامتك بدلًا منها","native.scan.showInstead.drivers_license":"أظهر رخصة قيادتك بدلًا منها","native.scan.expired":"انتهت صلاحية هذه الوثيقة. امسح وثيقة سارية.","native.scan.surface":"الحواف غير واضحة. ضع البطاقة على سطح أغمق."},ue={"native.doc.introTitle":"Photograph your document","native.doc.introLead":"The photo is taken by itself once the document is in the frame.","native.doc.tip.flat":"Lay it flat on a dark surface.","native.doc.tip.glare":"Avoid glare from lights.","native.doc.tip.frame":"Keep all of it in the frame.","native.doc.openCamera":"Open the camera","native.doc.changeDocument":"Change document","native.doc.titleOf.carte_identite":"Photograph your identity card","native.doc.titleOf.passport":"Photograph your passport","native.doc.titleOf.residence_permit":"Photograph your residence permit","native.doc.titleOf.drivers_license":"Photograph your driver's license","native.doc.onlyType.carte_identite":"{country}: only an identity card is accepted here.","native.doc.onlyType.passport":"{country}: only a passport is accepted here.","native.doc.onlyType.residence_permit":"{country}: only a residence permit is accepted here.","native.doc.onlyType.drivers_license":"{country}: only a driver's license is accepted here.","native.scan.closer":"Move a little closer","native.scan.farther":"Move back a little","native.scan.glare":"Tilt the card a little to move the reflection.","native.scan.dark":"Too dark. Move to better light or turn on the light.","native.scan.darkNoLight":"Too dark. Move to better light.","native.scan.blurry":"Blurry image. Hold the phone still.","native.scan.holdStill":"Hold still","native.scan.reading":"Checking your document…","native.scan.putDown":"You can put your document down.","native.scan.retry":"Let's try that again","native.scan.seenPassport":"This looks like a passport","native.scan.seenCard":"This looks like an identity card or residence permit","native.scan.showInstead.carte_identite":"Show your identity card instead","native.scan.showInstead.passport":"Show the photo page of your passport instead","native.scan.showInstead.residence_permit":"Show your residence permit instead","native.scan.showInstead.drivers_license":"Show your driver's license instead","native.scan.expired":"This document has expired. Scan a valid document.","native.scan.surface":"The edges are hard to see. Put the card on a darker surface."},Kt={"native.doc.introTitle":"Photographiez votre pièce","native.doc.introLead":"La photo se prend toute seule quand la pièce est bien cadrée.","native.doc.tip.flat":"Posez la pièce à plat sur fond sombre.","native.doc.tip.glare":"Évitez les reflets de lumière.","native.doc.tip.frame":"Gardez toute la pièce dans le cadre.","native.doc.openCamera":"Ouvrir la caméra","native.doc.changeDocument":"Changer de document","native.doc.titleOf.carte_identite":"Photographiez votre carte d'identité","native.doc.titleOf.passport":"Photographiez votre passeport","native.doc.titleOf.residence_permit":"Photographiez votre titre de séjour","native.doc.titleOf.drivers_license":"Photographiez votre permis de conduire","native.doc.onlyType.carte_identite":"{country} : seule la carte d'identité est acceptée ici.","native.doc.onlyType.passport":"{country} : seul le passeport est accepté ici.","native.doc.onlyType.residence_permit":"{country} : seul le titre de séjour est accepté ici.","native.doc.onlyType.drivers_license":"{country} : seul le permis de conduire est accepté ici.","native.scan.closer":"Approchez un peu","native.scan.farther":"Reculez un peu","native.scan.glare":"Inclinez un peu la carte pour déplacer le reflet.","native.scan.dark":"Trop sombre. Allez dans un endroit mieux éclairé ou allumez la lampe.","native.scan.darkNoLight":"Trop sombre. Allez dans un endroit mieux éclairé.","native.scan.blurry":"Image floue. Tenez le téléphone immobile.","native.scan.holdStill":"Ne bougez plus","native.scan.reading":"Vérification de votre document…","native.scan.putDown":"Vous pouvez poser votre pièce.","native.scan.retry":"Réessayons","native.scan.seenPassport":"Ceci ressemble à un passeport","native.scan.seenCard":"Ceci ressemble à une carte d'identité ou un titre de séjour","native.scan.showInstead.carte_identite":"Montrez plutôt votre carte d'identité","native.scan.showInstead.passport":"Montrez plutôt la page photo de votre passeport","native.scan.showInstead.residence_permit":"Montrez plutôt votre titre de séjour","native.scan.showInstead.drivers_license":"Montrez plutôt votre permis de conduire","native.scan.expired":"Ce document a expiré. Scannez un document valide.","native.scan.surface":"Les bords se voient mal. Posez la carte sur une surface plus sombre."},G,ot=(G=class{constructor(){this.shown=null,this.shownAt=0,this.yielded=null,this.shownPhotos=0}present(t,a,o,r,m=0){(t===null||t.key!==this.yielded)&&(this.yielded=null);let y=this.shown;return t!==null&&this.yielded===null?y?.kind==="problem"&&y.key===t.key&&y.action===t.action?(this.shownPhotos=m,!t.blocking&&a!==null&&r-this.shownAt>=3e3?(this.yielded=t.key,this.show({kind:"hint",key:a,action:null},r,m)):y):this.show({kind:"problem",key:t.key,action:t.action},r,m):y?.kind==="problem"&&t===null&&m===this.shownPhotos&&(o||r-this.shownAt<3e3)?y:a===null?this.show(null,r):y?.kind==="hint"&&y.key===a?y:this.show({kind:"hint",key:a,action:null},r)}show(t,a,o=this.shownPhotos){return this.shown=t,this.shownAt=a,this.shownPhotos=o,t}},l(G,"_e"),G);s(ot,"NoticeBand");var jt=ot,Qt=["locking","capturing"],X,rt=(X=class{constructor(){this.shown={hint:null,locking:!1,card:null,manualShutter:!1},this.candidate=null,this.candidateSince=0,this.hintShownAt=0,this.lockLostAt=null,this.detectedSince=null,this.lostSince=null,this.shutterSince=null}present(t,a){return this.presentHint(t,a),this.presentLock(t,a),this.presentCard(t,a),this.shutterSince=t.manualShutter?this.shutterSince??a:null,this.shown={...this.shown,manualShutter:this.shutterSince!==null&&a-this.shutterSince>=1e3},this.shown}presentHint(t,a){let o=t.phase==="framing"&&!(t.hint==="blurry"&&t.card===null)?t.hint:null;if(t.phase!=="framing"){this.shown={...this.shown,hint:null},this.candidate=null;return}if(o!==this.candidate&&(this.candidate=o,this.candidateSince=a),o===this.shown.hint)return;let r=a-this.candidateSince>=(o===null?0:350),m=this.shown.hint===null||a-this.hintShownAt>=2500;r&&m&&(this.shown={...this.shown,hint:o},this.hintShownAt=a)}presentLock(t,a){if(Qt.includes(t.phase)){this.shown={...this.shown,locking:!0},this.lockLostAt=null;return}if(this.shown.locking){if(t.phase!=="framing"){this.shown={...this.shown,locking:!1},this.lockLostAt=null;return}this.lockLostAt??(this.lockLostAt=a),a-this.lockLostAt>=300&&(this.shown={...this.shown,locking:!1},this.lockLostAt=null)}}presentCard(t,a){let o=t.card;if(o===null||t.phase!=="framing"){if(t.phase!=="framing"){this.shown={...this.shown,card:null},this.detectedSince=null,this.lostSince=null;return}this.detectedSince=null,this.lostSince??(this.lostSince=a),a-this.lostSince>=300&&(this.shown={...this.shown,card:null});return}if(this.lostSince=null,this.detectedSince??(this.detectedSince=a),a-this.detectedSince<250)return;let r=this.shown.card;if(r===null){this.shown={...this.shown,card:{...o}};return}let m=.35;this.shown={...this.shown,card:{fill:r.fill+(o.fill-r.fill)*m,offsetX:r.offsetX+(o.offsetX-r.offsetX)*m,offsetY:r.offsetY+(o.offsetY-r.offsetY)*m}}}},l(X,"Ce"),X);s(rt,"ScanPresenter");var Zt=rt,qt={en:ue,fr:Kt,ar:Yt,es:ue,pt:ue,de:ue},Jt=450,Ne=s(e=>(t,a)=>tt(e.strings[t]??qt[e.locale][t]??"",a),"useScanCopy");function it(e,t){try{return new Intl.DisplayNames([t],{type:"region"}).of(e)??e}catch{return e}}l(it,"Ut");s(it,"regionName");function st(e){let t=e.documentType,a=t===null?"native.doc.introTitle":`native.doc.titleOf.${t}`,o=t!==null&&e.issuer!==null&&Et(e.documents,e.issuer).length===1;return{titleKey:a,onlyKey:o?`native.doc.onlyType.${t}`:null}}l(st,"Et");s(st,"introCopy");function Z({name:e}){return(0,n.jsx)("svg",{className:"sekyro-glyph",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:Vt[e]}})}l(Z,"me");s(Z,"ScanGlyph");var en={en:ce,fr:Gt,ar:Ft,es:ce,pt:ce,de:ce},tn={en:de,fr:Wt,ar:Xt,es:de,pt:de,de},nn="image/jpeg,image/png,image/heic,image/heif";function B(e){let t=e.strings,a=s(o=>t[o]??tn[e.locale][o],"text");return{t:s(o=>a(o)??"","t")}}l(B,"G");s(B,"uploadCopy");function lt(e,t){return e===null||e.state==="fallback"||e.state==="mismatch"||e.state==="expired"?null:e.state==="searching"?t?"dcv3.mrz.searching":"dcv3.mrz.showMrzSide":e.state==="valid"?"dcv3.mrz.valid":e.coach==="holdStill"?"dcv3.mrz.holdStill":"dcv3.mrz.reading"}l(lt,"Vt");s(lt,"mrzInstruction");function ct(e){return e?.state==="reading"&&e.coach!==void 0&&e.coach!=="holdStill"?`mrz:${e.coach}`:null}l(ct,"Yt");s(ct,"mrzHint");function dt(e){return e==="carte_identite"||e==="passport"||e==="residence_permit"||e==="drivers_license"?`native.scan.showInstead.${e}`:null}l(dt,"Gt");s(dt,"showInsteadKey");var an={document_type_mismatch:"doc.reason_document_type_mismatch",document_number_invalid:"doc.reason_document_number_invalid",provider_unavailable:"doc.reason_provider_unavailable",document_type_not_supported:"doc.reason_document_type_not_supported",document_sides_mismatch:"doc.reason_document_sides_mismatch",document_side_not_read:"doc.reason_document_side_not_read",document_too_dark:"doc.reason_document_too_dark",document_glare:"doc.reason_document_glare"};function he(e){if(e.reason==="unreadable")return"doc.reason_unreadable";let t=e.reason!==void 0?an[e.reason]:void 0;return t!==void 0?t:e.reason==="tester_mismatch"?"sandboxMode.mismatchDocument":e.reason!==void 0&&e.reason!=="side_missing"?Ye(e.reason):null}l(he,"xe");s(he,"reasonOf");var ut=new Set(["document_type_not_accepted","tester_mismatch","document_type_mismatch","provider_unavailable","document_type_not_supported","document_sides_mismatch","document_side_not_read"]);function on({step:e,i18n:t,liveMrz:a,barcodeAssetBaseUrl:o,ageLead:r,...m}){let[y,h]=(0,i.useState)(!1),k=(0,i.useRef)(-1),[w,_]=(0,i.useState)("idle"),$=(0,i.useRef)(null),S=typeof e.uploadDocument=="function",b=S?e.photo?.source??"camera":"camera",M=S&&b!=="camera"&&e.photo?.uploadOffered===!0,[f,E]=(0,i.useState)(null),I=b==="upload"?"upload":b==="choice"?f??e.photo?.pick??"source":"camera",O=w==="sending"?void 0:()=>$.current?.click(),g=s(async V=>{let Y=V.currentTarget.files?.[0];if(V.currentTarget.value="",Y!==void 0){h(!1),_("sending");try{await e.uploadDocument(Y),_("idle")}catch(J){_(J instanceof TypeError&&J.message==="unsupported_file"?"unsupported":"failed")}}},"onFile"),q=M?(0,n.jsx)("input",{ref:$,type:"file",accept:nn,hidden:!0,"data-testid":"sekyro-doc-upload","aria-label":B(t).t("doc.uploadTitle"),onChange:l(V=>{g(V)},"onChange")}):null,z=B(t),W=e.photo?.cameraOnPhone===!0;return I==="camera"&&W?(0,n.jsx)(nt,{i18n:t,lead:t.t("handoff.lead.document"),refresh:e.refresh,actions:(0,n.jsx)(A,{kind:"ghost",full:!0,onClick:l(()=>E("upload"),"onClick"),children:z.t("doc.source.upload")})}):I==="source"?(0,n.jsx)(at,{testId:"sekyro-doc-source",title:z.t("doc.source.title"),lead:z.t("doc.source.description"),cameraLabel:W?t.t("capture.source.phone"):z.t("doc.source.camera"),onPhone:W,uploadLabel:z.t("doc.source.upload"),notice:(0,n.jsx)(pe,{step:e,i18n:t}),onCamera:l(()=>E("camera"),"onCamera"),onUpload:l(()=>E("upload"),"onUpload")}):I==="upload"?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(mt,{step:e,i18n:t,ageLead:r===!0,upload:w,offered:M,onPick:l(()=>$.current?.click(),"onPick"),...b==="choice"?{onCamera:s(()=>E("camera"),"onCamera")}:{},...m}),q]}):(0,n.jsxs)(n.Fragment,{children:[y?(0,n.jsx)(vt,{step:e,i18n:t,attempts:k,...a!==void 0?{liveMrz:a}:{},...o!==void 0?{barcodeAssetBaseUrl:o}:{},...M&&O!==void 0?{onUpload:O}:{},onClose:l(()=>h(!1),"onClose")}):(0,n.jsx)(pt,{step:e,i18n:t,ageLead:r===!0,onOpen:l(()=>h(!0),"onOpen"),upload:w,...M&&O!==void 0?{onUpload:O}:{},...m}),q]})}l(on,"Xn");s(on,"DocumentCaptureView");function Se({passport:e}){let t=Math.round(228/(e?1.42:1.586));return(0,n.jsxs)("svg",{className:`sekyro-mark sekyro-mark--card${e?" sekyro-mark--passport":""}`,viewBox:`-12 ${e?-22:-12} 252 ${t+(e?34:24)}`,"aria-hidden":"true",focusable:"false",children:[(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"sekyro-card-clip",children:(0,n.jsx)("rect",{width:228,height:t,rx:"12.5"})})}),e?(0,n.jsx)("rect",{className:"sekyro-mark__page",x:"10",y:"-14",width:208,height:t,rx:"10"}):null,(0,n.jsx)("rect",{className:"sekyro-mark__card",width:228,height:t,rx:"12.5"}),(0,n.jsx)("rect",{className:"sekyro-mark__photo",x:"17",y:"17",width:"55",height:t*(e?.5:.62),rx:"6"}),[0,1,2].map(a=>(0,n.jsx)("rect",{className:"sekyro-mark__text",x:"88",y:23+a*t*.12,width:100-a*20,height:"6",rx:"3"},a)),e?[0,1].map(a=>(0,n.jsx)("line",{className:"sekyro-mark__code",x1:"17",x2:211,y1:t*.75+a*11,y2:t*.75+a*11},a)):(0,n.jsx)("rect",{className:"sekyro-mark__text",x:"88",y:23+3*t*.12,width:"60",height:"6",rx:"3"}),(0,n.jsx)("g",{clipPath:"url(#sekyro-card-clip)",children:(0,n.jsx)("g",{className:"sekyro-mark__read",style:{"--sekyro-read-w":"228px"},children:(0,n.jsx)("rect",{x:"-1",width:"2",height:t,className:"sekyro-mark__beam"})})}),(0,n.jsx)("path",{className:"sekyro-mark__brackets",d:ht(-10,-10,248,t+20,16,30)})]})}l(Se,"ht");s(Se,"ScanMark");function ht(e,t,a,o,r,m){let y=Math.min(r,m*.6);return[[e,t,1,1],[e+a,t,-1,1],[e,t+o,1,-1],[e+a,t+o,-1,-1]].map(([h,k,w,_])=>`M${h} ${k+_*m}V${k+_*y}Q${h} ${k} ${h+w*y} ${k}H${h+w*m}`).join("")}l(ht,"Xt");s(ht,"brackets");function pt({step:e,i18n:t,ageLead:a,onOpen:o,onChangeCountry:r,onChangeDocument:m,upload:y,onUpload:h}){let k=Ne(t),w=B(t),_=e.documentType==="passport",$=st(e),S=he(e),b=y==="sending",M=(0,i.useContext)(je)?.busy===!0,f=Xe(e.acceptedNationalities,t);return(0,n.jsxs)("section",{className:"sekyro-step sekyro-step--doc-intro","data-testid":"sekyro-document",children:[(0,n.jsx)(Se,{passport:_}),(0,n.jsx)(_e,{title:k($.titleKey)||k("native.doc.introTitle"),lead:a?t.t("doc.ageStepUp"):k("native.doc.introLead")}),$.onlyKey!==null&&e.issuer!==null?(0,n.jsx)("p",{className:"sekyro-text-muted sekyro-doc-only",children:k($.onlyKey,{country:it(e.issuer,t.locale)})}):null,f!==null?(0,n.jsx)(Q,{tone:"info",children:f}):null,(0,n.jsx)(pe,{step:e,i18n:t}),e.reason!==void 0&&ut.has(e.reason)?null:(0,n.jsxs)("ul",{className:"sekyro-tiprows",children:[(0,n.jsxs)("li",{children:[(0,n.jsx)(D,{name:_?"passport":"card"}),k("native.doc.tip.flat")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(D,{name:"light"}),k("native.doc.tip.glare")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(Z,{name:"image"}),k("native.doc.tip.frame")]})]}),(0,n.jsx)(xe,{i18n:t,...m!==void 0?{onChangeDocument:m}:{},...r!==void 0?{onChangeCountry:r}:{}}),(0,n.jsx)($e,{i18n:t,upload:y}),b?(0,n.jsx)("p",{className:"sekyro-text-muted",role:"status",children:t.t("doc.uploading")}):h!==void 0?(0,n.jsx)("p",{className:"sekyro-text-muted",children:w.t("doc.uploadHint")}):null,(0,n.jsxs)(Ce,{children:[(0,n.jsxs)(A,{full:!0,onClick:o,disabled:b||M,children:[(0,n.jsx)(D,{name:"camera"}),k("native.doc.openCamera")]}),h!==void 0?(0,n.jsxs)(A,{full:!0,kind:"ghost",onClick:h,children:[(0,n.jsx)(Z,{name:"image"}),w.t("doc.uploadInstead")]}):null]})]})}l(pt,"Wt");s(pt,"DocumentIntro");function pe({step:e,i18n:t}){let a=he(e);return a===null&&e.reasonHidden===!0?(0,n.jsx)(Q,{tone:"info",children:(0,n.jsx)("span",{children:le(t,e.attemptsRemaining,e.attemptsExhausted)})}):a===null?null:(0,n.jsxs)(Q,{tone:"warning",children:[(0,n.jsx)("span",{children:t.t(a)}),(0,n.jsx)("span",{children:le(t,e.attemptsRemaining,e.attemptsExhausted)})]})}l(pe,"Le");s(pe,"ReasonNotice");function xe({i18n:e,onChangeCountry:t,onChangeDocument:a}){let o=Ne(e);return a===void 0&&t===void 0?null:(0,n.jsxs)("div",{className:"sekyro-links",children:[a!==void 0?(0,n.jsx)("button",{type:"button",className:"sekyro-link",onClick:a,children:o("native.doc.changeDocument")}):null,t!==void 0?(0,n.jsx)("button",{type:"button",className:"sekyro-link",onClick:t,children:e.t("native.doc.changeCountry")}):null]})}l(xe,"ft");s(xe,"ChangeLinks");function $e({i18n:e,upload:t}){return t!=="unsupported"&&t!=="failed"?null:(0,n.jsx)(Q,{tone:"warning",children:(0,n.jsx)("span",{children:B(e).t(t==="unsupported"?"doc.uploadUnsupported":"doc.uploadFailed")})})}l($e,"yt");s($e,"UploadNotice");function mt({step:e,i18n:t,ageLead:a,upload:o,offered:r,onPick:m,onCamera:y,onChangeCountry:h,onChangeDocument:k}){let w=B(t),_=o==="sending";return(0,n.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-doc-upload-screen",children:[(0,n.jsx)(Se,{passport:e.documentType==="passport"}),(0,n.jsx)(_e,{title:w.t("doc.uploadTitle"),lead:a?t.t("doc.ageStepUp"):w.t("doc.uploadHint")}),a?(0,n.jsx)("p",{className:"sekyro-text-muted",children:w.t("doc.uploadHint")}):null,(0,n.jsx)(pe,{step:e,i18n:t}),(0,n.jsx)(xe,{i18n:t,...k!==void 0?{onChangeDocument:k}:{},...h!==void 0?{onChangeCountry:h}:{}}),(0,n.jsx)($e,{i18n:t,upload:o}),_?(0,n.jsx)("p",{className:"sekyro-text-muted",role:"status",children:t.t("doc.uploading")}):null,(0,n.jsxs)(Ce,{children:[(0,n.jsxs)(A,{full:!0,onClick:m,disabled:_||!r||e.attemptsExhausted,children:[(0,n.jsx)(Z,{name:"image"}),w.t("doc.source.upload")]}),y!==void 0?(0,n.jsxs)(A,{full:!0,kind:"ghost",onClick:y,disabled:_,children:[(0,n.jsx)(D,{name:"camera"}),w.t("doc.source.camera")]}):null]})]})}l(mt,"jt");s(mt,"DocumentUploadScreen");function ze(e,t,a){let o=e*.88,r=o/a;return{x:(e-o)/2,y:t*.42-r/2,w:o,h:r}}l(ze,"ut");s(ze,"guideRect");var rn={"mrz:moveCloser":"dcv3.mrz.moveCloser","mrz:turnSideways":"dcv3.mrz.turnSideways","mrz:glare":"dcv3.mrz.glare",too_far:"native.scan.closer",too_close:"native.scan.farther",focus_far:"native.scan.farther",glare:"native.scan.glare",too_bright:"native.scan.glare",too_dark:"native.scan.dark",blurry:"native.scan.blurry",low_contrast:"native.scan.surface"},sn=s(()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0,"reduceMotion");function vt({step:e,i18n:t,liveMrz:a,barcodeAssetBaseUrl:o,onClose:r,attempts:m,onUpload:y}){let h=Ne(t),k=(0,i.useContext)(qe),w=(0,i.useRef)(k);w.current=k;let _=(0,i.useRef)(null),$=(0,i.useRef)(null),S=(0,i.useRef)(null),[b,M]=(0,i.useState)("idle"),[f,E]=(0,i.useState)(null),[I,O]=(0,i.useState)(null),[g,q]=(0,i.useState)({w:0,h:0}),[z,W]=(0,i.useState)({hint:null,locking:!1,card:null,manualShutter:!1}),[V,Y]=(0,i.useState)({}),[J,Te]=(0,i.useState)({}),[Me,Le]=(0,i.useState)(null),[Pe,bt]=(0,i.useState)(null),[Ie,He]=(0,i.useState)(0),[me,Ae]=(0,i.useState)(null),[ve,zt]=(0,i.useState)(null),[ee,Nt]=(0,i.useState)(0),te=(0,i.useRef)(0);te.current=ee;let[St,De]=(0,i.useState)(0),Oe=(0,i.useRef)(0),ne=(0,i.useRef)(null);(0,i.useEffect)(()=>{De(te.current)},[e.reason,e.attemptsRemaining]);let R=e.documentType==="passport",ae=R?1.42:1.586;Ke(!0),(0,i.useLayoutEffect)(()=>{let d=_.current;if(d===null)return;let v=s(()=>q({w:d.clientWidth,h:d.clientHeight}),"measure");if(v(),typeof ResizeObserver>"u")return;let p=new ResizeObserver(v);return p.observe(d),()=>p.disconnect()},[]);let c=ze(g.w,g.h,ae);(0,i.useEffect)(()=>{g.w===0||g.h===0||S.current?.setGuide?.({viewAspect:g.w/g.h,rect:{x:c.x/g.w,y:c.y/g.h,width:c.w/g.w,height:c.h/g.h}})},[g.w,g.h,c.x,c.y,c.w,c.h]),(0,i.useEffect)(()=>{let d=$.current;if(d===null)return;let v=e.capture({video:d,...a!==void 0?{liveMrz:a}:{},...o!==void 0?{barcodeAssetBaseUrl:o}:{}});S.current=v,Y({}),Te({}),Le(null);let p=_.current;if(p!==null&&p.clientWidth>0&&p.clientHeight>0){let u=ze(p.clientWidth,p.clientHeight,ae);v.setGuide?.({viewAspect:p.clientWidth/p.clientHeight,rect:{x:u.x/p.clientWidth,y:u.y/p.clientHeight,width:u.w/p.clientWidth,height:u.h/p.clientHeight}})}let T=new Zt,N={scan:null,feedback:null,gate:null,mrz:null},H=s(u=>{N={...N,...u};let C=N.gate?.guide,Rt={phase:N.scan?.phase??"framing",hint:N.feedback?.reticle==="coaching"?N.feedback.key:e.documentType==="drivers_license"?null:ct(N.mrz),card:C?.detected?{fill:C.fill,offsetX:C.offsetX,offsetY:C.offsetY}:null,manualShutter:N.scan?.manualShutter??!1},K=T.present(Rt,performance.now());W(j=>j.hint===K.hint&&j.locking===K.locking&&j.manualShutter===K.manualShutter&&_t(j.card,K.card)?j:K)},"present"),Ot=[v.on("state",M),v.on("feedback",u=>H({feedback:u})),v.on("gate",u=>H({gate:u})),v.on("scan",u=>{u.captured.length===0&&Oe.current>0&&De(te.current),Oe.current=u.captured.length,ne.current=(ne.current??u.captured).filter(C=>u.captured.includes(C)),E(u),H({scan:u})}),v.on("captured",u=>{Nt(C=>C+1),Y(C=>({...C,[gt(u.side,R,C)]:u.previewDataUrl})),u.photo!==void 0&&Te(C=>({...C,[u.photo]:u.previewDataUrl})),Le(u.previewDataUrl),bt(Ct(d))}),v.on("error",u=>{O(u);let C=w.current;C!==null&&et(C,Je("document",u,Math.max(0,m.current)))}),v.on("mrz",u=>{u.state==="mismatch"?zt({format:u.format??null,at:te.current}):(Ae(u),H({mrz:u}))})];return m.current+=1,v.start().catch(()=>{}),()=>{ne.current=null;for(let u of Ot)u();v.destroy(),S.current=null}},[e.issuer,e.documentType]);let L=f?.phase??"framing",P=L==="reading"||L==="result",oe=L==="flipCue"||L==="reaskRecto",U=z.locking,Re=f?.captured.length??0;(0,i.useEffect)(()=>{U&&He(d=>d+1)},[U]),(0,i.useEffect)(()=>{Re>0&&He(d=>d+1)},[Re]);let xt=f?.expected??null;(0,i.useEffect)(()=>{Ae(null)},[xt]);let ye=oe||P||e.documentType==="drivers_license"?null:lt(me,R),Ue=s(d=>t.strings[d]??en[t.locale][d],"liveText"),$t=s(d=>d.startsWith("dcv3.")?Ue(d):h(d),"copy"),ke=ye!==null?Ue(ye):h(L==="flipCue"?"doc.flip":L==="reaskRecto"?"doc.reaskRecto":P?"native.scan.reading":L==="locking"||L==="capturing"||U?"native.scan.holdStill":R?"doc.showPage":"doc.showSide"),re=e.browserCheck??null,fe=re!==null&&P,ie=he(e),Be=s(d=>({key:h(d),action:le(t,e.attemptsRemaining,e.attemptsExhausted),blocking:e.reason!==void 0&&ut.has(e.reason)}),"reasonProblem"),Ee=dt(e.documentType),Tt=me?.state==="expired"&&!oe&&!P?{key:h("native.scan.expired"),action:null,blocking:!0}:ve!==null&&ee<=ve.at+1?{key:h(ve.format==="TD3"?"native.scan.seenPassport":"native.scan.seenCard"),action:Ee===null?null:h(Ee),blocking:!0}:f?.notice==="same_face"?{key:h("doc.sameFace"),action:null,blocking:!1}:f?.notice==="reread"?ie!==null?Be(ie):{key:h("doc.reread"),action:null,blocking:!1}:f?.notice==="technical"?{key:h("native.scan.retry"),action:null,blocking:!1}:f?.notice==="blurry"?{key:h("native.scan.blurry"),action:null,blocking:!1}:ie!==null&&ee===St?Be(ie):null,Mt=f?.torchAvailable===!0&&f.torch!==!0?"native.scan.dark":"native.scan.darkNoLight",Lt=z.hint===null?null:$t(z.hint==="too_dark"?Mt:rn[z.hint]??`dcv2.${z.hint}`),Pt=z.hint==="too_dark"&&f?.torch!==!0,Ve=yt(Tt,Lt,U||L==="capturing"||P,ee),F=z.card,x=c;if(!U&&F!==null&&F.fill>=.45&&F.fill<=1.25&&!sn()){let d=c.w*F.fill,v=d/ae,p=c.x+c.w/2+c.w*Math.max(-.25,Math.min(.25,F.offsetX)),T=c.y+c.h/2+c.h*Math.max(-.25,Math.min(.25,F.offsetY));x={x:p-d/2,y:T-v/2,w:d,h:v}}let se=c.w*.045,ge=28,Fe=Math.min(se,ge*.6),It=[[x.x,x.y,1,1],[x.x+x.w,x.y,-1,1],[x.x,x.y+x.h,1,-1],[x.x+x.w,x.y+x.h,-1,-1]],Ht=U?"is-locked":Ve!==null?"is-coaching":"",At=R?[{side:"single",label:"doc.progressPage"}]:[{side:"recto",label:"doc.progressFront"},{side:"verso",label:"doc.progressBack"}],Dt=c.y+c.h+16,we={insetInlineStart:c.x,insetBlockStart:c.y,inlineSize:c.w,blockSize:c.h,borderRadius:se};return(0,n.jsx)("section",{className:"sekyro-lm","aria-label":ke,"data-testid":"sekyro-document",children:(0,n.jsxs)("div",{ref:_,className:`sekyro-lm-stage${P?" is-reading":""}${oe?" is-flip":""}`,style:{"--sekyro-guide-w":`${c.w}px`},children:[(0,n.jsx)("video",{ref:$,className:"sekyro-lm-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true",onPointerUp:l(d=>{let v=d.currentTarget,p=v.getBoundingClientRect(),T=Math.max(p.width/(v.videoWidth||1),p.height/(v.videoHeight||1)),N=v.videoWidth*T,H=v.videoHeight*T;N>0&&H>0&&S.current?.focusAt((d.clientX-p.left+(N-p.width)/2)/N,(d.clientY-p.top+(H-p.height)/2)/H)},"onPointerUp")}),g.w>0?(0,n.jsxs)(n.Fragment,{children:[P&&Pe!==null?(0,n.jsx)("img",{className:"sekyro-lm-scene",src:Pe,alt:""}):null,P&&Me!==null?(0,n.jsx)("img",{className:"sekyro-lm-frozen",src:Me,alt:"",style:we}):null,(0,n.jsxs)("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${g.w} ${g.h}`,"aria-hidden":"true",focusable:"false",children:[(0,n.jsxs)("defs",{children:[(0,n.jsxs)("linearGradient",{id:"sekyro-lm-top",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0.85"}),(0,n.jsx)("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0"})]}),(0,n.jsxs)("linearGradient",{id:"sekyro-lm-bottom",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0"}),(0,n.jsx)("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0.9"})]})]}),(0,n.jsx)("path",{className:"sekyro-lm-scrim",fillRule:"evenodd",d:`M0 0H${g.w}V${g.h}H0Z${wt(c,se)}`}),(0,n.jsx)("rect",{width:g.w,height:Math.max(0,c.y),fill:"url(#sekyro-lm-top)"}),(0,n.jsx)("rect",{y:c.y+c.h,width:g.w,height:Math.max(0,g.h-c.y-c.h),fill:"url(#sekyro-lm-bottom)"}),(0,n.jsx)("g",{className:`sekyro-lm-brackets ${Ht}`,children:It.map(([d,v,p,T],N)=>(0,n.jsx)("path",{style:{transform:`translate(${d}px, ${v}px) scale(${p}, ${T})`},d:`M0 ${ge}V${Fe}Q0 0 ${Fe} 0H${ge}`},N))}),U?(0,n.jsx)("rect",{className:"sekyro-lm-trace",x:c.x,y:c.y,width:c.w,height:c.h,rx:se,pathLength:"1",style:{animationDuration:`${Jt}ms`}}):null]}),(0,n.jsx)("div",{className:"sekyro-lm-slot",style:we,"aria-hidden":"true",children:P?(0,n.jsx)("span",{className:"sekyro-lm-read is-repeating"}):Ie>0?(0,n.jsx)("span",{className:"sekyro-lm-read"},Ie):null})]}):null,ye!==null?(0,n.jsx)("div",{className:"sekyro-lm-slot",style:we,"aria-hidden":"true",children:(0,n.jsx)("span",{"data-testid":"sekyro-mrz-strip",className:`sekyro-lm-mrz${R?" is-page":""}${me?.state==="valid"?" is-valid":""}`})}):null,(0,n.jsx)("div",{className:"sekyro-lm-instruction",style:{insetBlockStart:c.y-64},children:(0,n.jsx)("div",{role:"status","aria-live":"polite","data-testid":"sekyro-scan-instruction",children:fe?null:(0,n.jsx)(Ze,{swapKey:ke,className:"sekyro-lm-line",children:ke})})}),(0,n.jsxs)("div",{className:"sekyro-lm-below",style:{insetBlockStart:Dt,inlineSize:c.w,insetInlineStart:c.x},children:[(0,n.jsx)(kt,{band:Ve}),fe?null:P?(0,n.jsxs)("p",{className:"sekyro-lm-note",children:[(0,n.jsx)("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}),h("native.scan.putDown")]}):oe?(0,n.jsx)("div",{className:`sekyro-lm-flip${L==="reaskRecto"?" is-toFront":""}`,"data-testid":"sekyro-flip-cue","aria-hidden":"true",children:(0,n.jsxs)("span",{className:"sekyro-lm-flip-card",style:{aspectRatio:String(ae)},children:[(0,n.jsx)("span",{className:"sekyro-lm-flip-front"}),(0,n.jsx)("span",{className:"sekyro-lm-flip-back"})]})}):null]}),(0,n.jsxs)("div",{className:"sekyro-lm-controls",children:[(0,n.jsxs)("div",{className:"sekyro-lm-bar",children:[(0,n.jsx)("button",{type:"button",className:"sekyro-glass","aria-label":t.t("native.close"),onClick:r,children:(0,n.jsx)(D,{name:"close"})}),f?.torchAvailable?(0,n.jsx)("button",{type:"button",className:`sekyro-glass${f.torch?" is-on":""}${Pt?" is-cue":""}`,"aria-label":t.t("doc.torchOn"),"aria-pressed":f.torch,onClick:l(()=>S.current?.setTorch(!f.torch),"onClick"),children:(0,n.jsx)(Z,{name:"flashlight"})}):null]}),I!==null?(0,n.jsxs)("div",{className:"sekyro-lm-error",role:"alert",children:[(0,n.jsx)("p",{children:t.t("doc.cameraBlocked")}),(0,n.jsx)("p",{children:t.t(I.kind==="permission"?"doc.cameraBlockedHint":We(I.kind))}),(0,n.jsx)(A,{onClick:l(()=>{O(null),m.current+=1,S.current?.retry()},"onClick"),children:t.t("doc.retryCamera")})]}):null,re!==null&&I===null?(0,n.jsxs)("div",{className:"sekyro-lm-error",role:"alert","data-testid":"sekyro-doc-browser-check",children:[(0,n.jsx)("p",{children:t.t(re.code==="clock_wrong"?"errors.device_clock":"errors.attestation_invalid")}),(0,n.jsx)(A,{onClick:re.retry,children:t.t("common.retry")})]}):null,z.manualShutter?(0,n.jsx)("button",{type:"button",className:"sekyro-shutter","aria-label":t.t("doc.shutter"),onClick:l(()=>S.current?.shutter(),"onClick")}):null,(0,n.jsx)("ol",{className:"sekyro-lm-tray",children:At.map(({side:d,label:v})=>{let p=f?.captured.includes(d)??!1,T=ft(d,f,J,V);return(0,n.jsxs)("li",{className:p?"is-done":void 0,"aria-current":!p&&(R||f?.expected===d)?"step":void 0,children:[p?(0,n.jsxs)("span",{className:"sekyro-lm-thumb",children:[T!==void 0?(0,n.jsx)("img",{src:T,alt:""}):(0,n.jsx)(D,{name:"card"}),(0,n.jsx)("svg",{className:"sekyro-lm-check",viewBox:"0 0 18 18","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})]}):null,h(v),p&&T===void 0&&ne.current?.includes(d)?(0,n.jsx)("span",{className:"sekyro-lm-received",children:h("doc.sideReceived")}):null]},d)})}),y!==void 0?(0,n.jsx)("button",{type:"button",className:"sekyro-lm-upload",onClick:y,children:B(t).t("doc.uploadInstead")}):null,b==="uploading"||b==="checking"?null:(0,n.jsx)(Qe,{onStop:r})]}),!fe&&(b==="uploading"||b==="checking")?(0,n.jsx)("span",{className:"sekyro-visually-hidden",role:"status",children:b==="uploading"?t.t("doc.uploading"):h("native.scan.reading")}):null]})})}l(vt,"Jt");s(vt,"LumiereScan");function yt(e,t,a,o){let r=(0,i.useRef)(null);r.current??(r.current=new jt);let[m,y]=(0,i.useState)(null),h=(0,i.useRef)({problem:e,hint:t,busy:a,photos:o});h.current={problem:e,hint:t,busy:a,photos:o};let k=e===null?null:`${e.blocking}|${e.key}|${e.action??""}`;return(0,i.useEffect)(()=>{let w=s(()=>{let{problem:$,hint:S,busy:b,photos:M}=h.current;y(r.current?.present($,S,b,performance.now(),M)??null)},"run");w();let _=setInterval(w,250);return()=>clearInterval(_)},[k,t,a,o]),m}l(yt,"qt");s(yt,"useNoticeBand");function kt({band:e}){let[t,a]=(0,i.useState)(e);(0,i.useEffect)(()=>{e!==null&&a(e)},[e]);let o=e??t;return(0,n.jsx)("div",{className:`sekyro-lm-band${e!==null?" is-open":""}`,"data-testid":"sekyro-scan-notice",children:(0,n.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",children:o!==null?(0,n.jsxs)("div",{className:"sekyro-notice sekyro-notice--warning","data-kind":o.kind,"aria-hidden":e===null||void 0,children:[(0,n.jsx)("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:(0,n.jsx)(D,{name:"warning"})}),(0,n.jsxs)("div",{className:"sekyro-notice__body",children:[(0,n.jsx)("span",{children:o.key}),o.action!==null&&o.action!==""?(0,n.jsx)("span",{children:o.action}):null]})]}):null})})}l(kt,"en");s(kt,"NoticeBandView");function ft(e,t,a,o){if(t?.photos===void 0)return o[e];let r=t.photos[e];return r===void 0?void 0:a[r]}l(ft,"tn");s(ft,"thumbOf");function gt(e,t,a){return t?"single":e==="recto"||e==="verso"?e:a.recto===void 0?"recto":"verso"}l(gt,"nn");s(gt,"slotOf");function wt({x:e,y:t,w:a,h:o},r){return`M${e+r} ${t}H${e+a-r}Q${e+a} ${t} ${e+a} ${t+r}V${t+o-r}Q${e+a} ${t+o} ${e+a-r} ${t+o}H${e+r}Q${e} ${t+o} ${e} ${t+o-r}V${t+r}Q${e} ${t} ${e+r} ${t}Z`}l(wt,"on");s(wt,"roundedRect");var be=.004;function _t(e,t){return e===null||t===null?e===t:Math.abs(e.fill-t.fill)<be&&Math.abs(e.offsetX-t.offsetX)<be&&Math.abs(e.offsetY-t.offsetY)<be}l(_t,"rn");s(_t,"sameCard");function Ct(e){let t=Math.round(e.videoWidth/4),a=Math.round(e.videoHeight/4);if(t===0||a===0||typeof document>"u")return null;try{let o=document.createElement("canvas");o.width=t,o.height=a;let r=o.getContext("2d");return r===null?null:(r.drawImage(e,0,0,t,a),o.toDataURL("image/jpeg",.7))}catch{return null}}l(Ct,"an");s(Ct,"sceneSnapshot");export{on as DocumentCaptureView,Jt as LOCK_TRACE_MS,nn as UPLOAD_ACCEPT,ze as guideRect,st as introCopy,ct as mrzHint,lt as mrzInstruction,_t as sameCard,dt as showInsteadKey,gt as slotOf,ft as thumbOf};
@@ -1 +0,0 @@
1
- "use client";import{a as $,e as F,f as fe,g as j,h as B,i as ge,j as ke,k as ve,l as Q}from"./chunk-CX7T4ADY.js";import"./chunk-5MOE4EK4.js";import"./chunk-QDHTMKLS.js";import{a as S}from"./chunk-L7NFG55Y.js";import{a as be,b as R,c as Ae}from"./chunk-N2DNXUEA.js";import{a as ye}from"./chunk-XXCBLQ53.js";import{a as Y}from"./chunk-3SFLN33V.js";import"./chunk-D2KOFFZS.js";import{K as T,a as He,b as Ue,c as x,t as L,v as G,w as he,y as q}from"./chunk-RSXZISUG.js";import{a as y,c as me,i as h}from"./chunk-SSU37LFQ.js";var k=me(He(),1),r=me(Ue(),1);import{HostedApiError as Z,queryCameraPermission as Ee}from"@sekyro/web";import{detectIsMobile as K}from"@sekyro/web/core";var Fe={"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":"استخدم خيارًا آخر","choice.changeMethod":"تغيير الطريقة","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.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. يجب أن يتطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة. بعد ذلك تُجري الجلسة فحوصات حقيقية.","testerGate.notice":"يُقارَن وجهك بوجوه المختبِرين المسجَّلين لدى المؤسسة. يُحتفظ بالفيديو والنتيجة مع هذه الجلسة، ويمكن للمؤسسة الاطلاع عليهما.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"يُحتفظ بالفيديو والنتيجة مع هذه الجلسة. يمكنك إعادة المحاولة.","testerGate.retakeTitle":"تعذّر علينا التحقق من وجهك بوضوح","testerGate.retakeBody":"لا تُحتسب هذه المحاولة. يُحتفظ بالفيديو مع هذه الجلسة. واجه الكاميرا في إضاءة جيدة، وابقَ ثابتًا، ثم أعد المحاولة.","testerGate.livenessTitle":"لم يتم تأكيد الوجه الحي","testerGate.livenessBody":"يُحتفظ بالفيديو والنتيجة مع هذه الجلسة. يمكنك إعادة المحاولة.","testerGate.retry":"أعد المحاولة","testerGate.continue":"متابعة","testerGate.checkUnavailableTitle":"تعذّر إجراء فحص الأمان","testerGate.checkUnavailableBody":"حظر هذا المتصفح أو هذه الشبكة فحص الأمان، لذا لا يمكن بدء الفحوص الحقيقية هنا. أعد المحاولة أو افتح الرابط في متصفح آخر.","sandboxMode.title":"كيف تريد الاختبار؟","sandboxMode.testDataBody":"لا يُفحص أي شيء حقيقي. النتائج قيم اختبار.","sandboxMode.testerTitle":"فحوصات حقيقية (مختبِر مسجَّل)","sandboxMode.testerBody":"يُتحقق من وجهك أولًا. بعد ذلك يجب أن تطابق كل خطوة بيانات تسجيلك.","sandboxMode.noTestersTitle":"لا يوجد مختبِر مسجَّل","sandboxMode.noTestersBody":"لا يوجد أي مختبِر مسجَّل في هذه المؤسسة. اطلب من أحد المسؤولين أن يرسل إليك رابط تسجيل مختبِر من لوحة التحكم.","sandboxMode.continueTestData":"المتابعة باستخدام بيانات الاختبار","sandboxMode.boundTitle":"الفحوصات الحقيقية مفعّلة لـ {name}","sandboxMode.summaryTestDataBody":"هذه الهوية وهمية. وهي لا تطابق الرقم الذي أدخلته."},P={"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","choice.changeMethod":"Change method","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.title":"Run real checks as a tester","testerGate.body":"Look at the camera. Your face must match one of the organization's enrolled testers. Then the session runs real checks.","testerGate.notice":"Your face is compared with the organization's enrolled testers. The video and the result are kept with this session, and the organization can see them.","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":"The video and the result are kept with this session. You can try again.","testerGate.retakeTitle":"We couldn't check your face clearly","testerGate.retakeBody":"This try doesn't count. The video is kept with this session. Face the camera in good light, keep still, and try again.","testerGate.livenessTitle":"Live face not confirmed","testerGate.livenessBody":"The video and the result are kept with this session. You can try again.","testerGate.retry":"Try again","testerGate.continue":"Continue","testerGate.checkUnavailableTitle":"The security check could not run","testerGate.checkUnavailableBody":"This browser or network blocked the security check, so real checks cannot start here. Try again, or open the link in another browser.","sandboxMode.title":"How do you want to test?","sandboxMode.testDataBody":"Nothing real is checked. The results are test values.","sandboxMode.testerTitle":"Real checks (enrolled tester)","sandboxMode.testerBody":"Your face is checked first. Then every step must match your enrollment details.","sandboxMode.noTestersTitle":"No enrolled tester","sandboxMode.noTestersBody":"No tester is enrolled in this organization. Ask an admin to send you a tester enrollment link from the dashboard.","sandboxMode.continueTestData":"Continue with test data","sandboxMode.boundTitle":"Real checks are on for {name}","sandboxMode.summaryTestDataBody":"This identity is made up. It doesn't match the number you typed."},Ye={"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","choice.changeMethod":"Changer de méthode","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.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Votre visage doit correspondre à l'un des testeurs inscrits de l'organisation. Ensuite, la session lance de vrais contrôles.","testerGate.notice":"Votre visage est comparé à ceux des testeurs inscrits de l'organisation. La vidéo et le résultat sont conservés avec cette session, et l'organisation peut les voir.","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":"La vidéo et le résultat sont conservés avec cette session. Vous pouvez réessayer.","testerGate.retakeTitle":"Nous n'avons pas pu vérifier votre visage clairement","testerGate.retakeBody":"Cet essai ne compte pas. La vidéo est conservée avec cette session. 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":"La vidéo et le résultat sont conservés avec cette session. Vous pouvez réessayer.","testerGate.retry":"Réessayer","testerGate.continue":"Continuer","testerGate.checkUnavailableTitle":"Le contrôle de sécurité n’a pas pu s’exécuter","testerGate.checkUnavailableBody":"Ce navigateur ou ce réseau a bloqué le contrôle de sécurité, les vérifications réelles ne peuvent donc pas démarrer ici. Réessayez ou ouvrez le lien dans un autre navigateur.","sandboxMode.title":"Comment voulez-vous tester ?","sandboxMode.testDataBody":"Rien de réel n'est contrôlé. Les résultats sont des valeurs de test.","sandboxMode.testerTitle":"Vrais contrôles (testeur inscrit)","sandboxMode.testerBody":"Votre visage est vérifié d'abord. Ensuite chaque étape doit correspondre à vos données d'inscription.","sandboxMode.noTestersTitle":"Aucun testeur inscrit","sandboxMode.noTestersBody":"Aucun testeur n'est inscrit dans cette organisation. Demandez à un administrateur de vous envoyer un lien d'inscription testeur depuis le tableau de bord.","sandboxMode.continueTestData":"Continuer avec des données de test","sandboxMode.boundTitle":"Vrais contrôles activés pour {name}","sandboxMode.summaryTestDataBody":"Cette identité est fictive. Elle ne correspond pas au numéro saisi."},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}},Ce=20;function Ne(e){let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}y(Ne,"Pe");h(Ne,"rawDataModules");function J(e,t){let{perBlock:n,blocks:a}=xe[t],o=n[e-1],c=a[e-1],l=Math.floor(Ne(e)/8),s=c-l%c,i=Math.floor(l/c)-o;return[o,s===c?[[c,i]]:[[s,i],[c-s,i+1]]]}y(J,"Ne");h(J,"blockLayout");var W=h((e,t)=>J(e,t)[1].reduce((n,[a,o])=>n+a*o,0),"dataCapacity");function H(e,t){let n=0;for(let a=7;a>=0;a-=1)n=n<<1^(n>>>7)*285,n^=(t>>>a&1)*e;return n&255}y(H,"X");h(H,"gfMul");function Te(e){let t=new Array(e).fill(0);t[e-1]=1;let n=1;for(let a=0;a<e;a+=1){for(let o=0;o<e;o+=1)t[o]=H(t[o],n),o+1<e&&(t[o]=t[o]^t[o+1]);n=H(n,2)}return t}y(Te,"Re");h(Te,"rsDivisor");function Se(e,t){let n=t.map(()=>0);for(let a of e){let o=a^n.shift();n.push(0),t.forEach((c,l)=>{n[l]=n[l]^H(c,o)})}return n}y(Se,"Ve");h(Se,"rsRemainder");function Ie(e,t,n){let a=[],o=h((d,u)=>{for(let b=u-1;b>=0;b-=1)a.push(d>>>b&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let d of e)o(d,8);let c=W(t,n)*8;o(0,Math.min(4,c-a.length)),o(0,(8-a.length%8)%8);let l=[];for(let d=0;d<a.length;d+=8)l.push(a.slice(d,d+8).reduce((u,b)=>u<<1|b,0));for(let d=236;l.length<W(t,n);d^=253)l.push(d);let[s,i]=J(t,n),p=Te(s),m=[],f=0;for(let[d,u]of i)for(let b=0;b<d;b+=1){let A=l.slice(f,f+u);f+=u,m.push({data:A,ec:Se(A,p)})}let g=[],v=Math.max(...m.map(d=>d.data.length));for(let d=0;d<v;d+=1)for(let u of m)d<u.data.length&&g.push(u.data[d]);for(let d=0;d<s;d+=1)for(let u of m)g.push(u.ec[d]);return g}y(Ie,"Le");h(Ie,"codewords");function X(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=Math.ceil((e*4+4)/(t*2-2))*2,a=[6];for(let o=e*4+10;a.length<t;o-=n)a.splice(1,0,o);return a}y(X,"Ie");h(X,"alignmentPositions");var je=[(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],_,ze=(_=class{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,n,a){this.dark[t*this.size+n]=a,this.fixed[t*this.size+n]=!0}get(t,n){return this.dark[t*this.size+n]===!0}},y(_,"re"),_);h(ze,"Grid");var Qe=ze;function Me(e,t){let n=e.size;for(let c=0;c<n;c+=1)e.set(6,c,c%2===0),e.set(c,6,c%2===0);for(let[c,l]of[[3,3],[3,n-4],[n-4,3]])for(let s=-4;s<=4;s+=1)for(let i=-4;i<=4;i+=1){let p=c+s,m=l+i;if(p<0||p>=n||m<0||m>=n)continue;let f=Math.max(Math.abs(s),Math.abs(i));e.set(p,m,f!==2&&f!==4)}let a=X(t),o=a.length-1;if(a.forEach((c,l)=>a.forEach((s,i)=>{if(!(l===0&&i===0||l===0&&i===o||l===o&&i===0))for(let p=-2;p<=2;p+=1)for(let m=-2;m<=2;m+=1)e.set(c+p,s+m,Math.max(Math.abs(p),Math.abs(m))!==1)})),ee(e,0),t>=7){let c=t;for(let s=0;s<12;s+=1)c=c<<1^(c>>>11)*7973;let l=t<<12|c;for(let s=0;s<18;s+=1){let i=(l>>>s&1)===1,p=n-11+s%3,m=Math.floor(s/3);e.set(p,m,i),e.set(m,p,i)}}}y(Me,"De");h(Me,"drawFunctionPatterns");function ee(e,t,n=0){let a=e.size,o=n<<3|t,c=o;for(let i=0;i<10;i+=1)c=c<<1^(c>>>9)*1335;let l=(o<<10|c)^21522,s=h(i=>(l>>>i&1)===1,"bit");for(let i=0;i<=5;i+=1)e.set(i,8,s(i));e.set(7,8,s(6)),e.set(8,8,s(7)),e.set(8,7,s(8));for(let i=9;i<15;i+=1)e.set(8,14-i,s(i));for(let i=0;i<8;i+=1)e.set(8,a-1-i,s(i));for(let i=8;i<15;i+=1)e.set(a-15+i,8,s(i));e.set(a-8,8,!0)}y(ee,"Te");h(ee,"drawFormat");function Ge(e,t){let n=e.size,a=0;for(let o=n-1;o>=1;o-=2){o===6&&(o=5);for(let c=0;c<n;c+=1)for(let l=0;l<2;l+=1){let s=o-l,i=(o+1&2)===0?n-1-c:c;e.fixed[i*n+s]!==!0&&(a<t.length*8&&(e.dark[i*n+s]=(t[a>>>3]>>>7-(a&7)&1)===1),a+=1)}}}y(Ge,"Fe");h(Ge,"placeData");function Be(e,t){let n=je[t];for(let a=0;a<e.size;a+=1)for(let o=0;o<e.size;o+=1)e.fixed[a*e.size+o]!==!0&&n(a,o)&&(e.dark[a*e.size+o]=!e.dark[a*e.size+o])}y(Be,"He");h(Be,"applyMask");function _e(e){let t=e.size,n=0,a=h(c=>{let l=1;for(let s=1;s<=t;s+=1)s<t&&c(s)===c(s-1)?l+=1:(l>=5&&(n+=3+(l-5)),l=1);for(let s=0;s+10<t;s+=1){let i=[!0,!1,!0,!0,!0,!1,!0];if(!(i.every((f,g)=>c(s+g)===f)||i.every((f,g)=>c(s+4+g)===f)))continue;let p=[0,1,2,3].every(f=>!c(s+f))&&i.every((f,g)=>c(s+4+g)===f),m=i.every((f,g)=>c(s+g)===f)&&[7,8,9,10].every(f=>!c(s+f));p&&(n+=40),m&&(n+=40)}},"line");for(let c=0;c<t;c+=1)a(l=>e.get(c,l));for(let c=0;c<t;c+=1)a(l=>e.get(l,c));for(let c=0;c+1<t;c+=1)for(let l=0;l+1<t;l+=1){let s=e.get(c,l);s===e.get(c,l+1)&&s===e.get(c+1,l)&&s===e.get(c+1,l+1)&&(n+=3)}let o=e.dark.filter(Boolean).length;return n+=Math.floor(Math.abs(o*20-t*t*10)/(t*t))*10,n}y(_e,"Ee");h(_e,"penalty");function te(e,t={}){let n=t.ecl??"M",a=new TextEncoder().encode(e),o=1;for(;o<=Ce&&!(4+(o<10?8:16)+a.length*8<=W(o,n)*8);o+=1);if(o>Ce)throw new RangeError("text too long for a QR code");let c=Ie(a,o,n),l=h(p=>{let m=new Qe(o*4+17);return Me(m,o),Ge(m,c),Be(m,p),ee(m,p,xe[n].formatBits),m},"build"),s=null;if(t.mask!==void 0)s=l(t.mask);else{let p=Number.POSITIVE_INFINITY;for(let m=0;m<8;m+=1){let f=l(m),g=_e(f);g<p&&(p=g,s=f)}}let i=s;return{size:i.size,get:h((p,m)=>i.get(p,m),"get")}}y(te,"ee");h(te,"encodeQr");var De={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"},V=.42,We=.2,C=h(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function z(e,t,n,a){let o=`A${C(a)} ${C(a)} 0 0 1 `;return`M${C(e+a)} ${C(t)}H${C(e+n-a)}${o}${C(e+n)} ${C(t+a)}V${C(t+n-a)}${o}${C(e+n-a)} ${C(t+n)}H${C(e+a)}${o}${C(e)} ${C(t+n-a)}V${C(t+a)}${o}${C(e+a)} ${C(t)}Z`}y(z,"_");h(z,"roundedSquare");function Le(e){let t=(e-17)/4,n=X(t),a=n.length-1,o=[];return n.forEach((c,l)=>n.forEach((s,i)=>{l===0&&i===0||l===0&&i===a||l===a&&i===0||o.push([c,s])})),o}y(Le,"qe");h(Le,"alignmentCentres");function ae(e,{quiet:t=4,logo:n=!1}={}){let a=e.size,o=h((d,u)=>d<7&&u<7||d<7&&u>=a-7||d>=a-7&&u<7,"isFinder"),c=Math.floor(a*We),l=n?c%2===0?c-1:c:0,s=(a-l)/2,i=h((d,u)=>l>0&&d>=s&&d<s+l&&u>=s&&u<s+l,"inZone"),p=Le(a).filter(([d,u])=>!i(d,u)),m=h((d,u)=>p.some(([b,A])=>Math.abs(d-b)<=2&&Math.abs(u-A)<=2),"isAlign"),f=`a${C(V)} ${C(V)} 0 1 0 `,g="";for(let d=0;d<a;d+=1)for(let u=0;u<a;u+=1)!e.get(d,u)||o(d,u)||m(d,u)||i(d,u)||(g+=`M${C(u+t+.5-V)} ${C(d+t+.5)}${f}${C(2*V)} 0${f}${C(-2*V)} 0Z`);let v="";for(let[d,u]of[[0,0],[0,a-7],[a-7,0]]){let b=u+t,A=d+t;v+=z(b,A,7,1.6)+z(b+1,A+1,5,.6)+z(b+2,A+2,3,.6)}for(let[d,u]of p){let b=u-2+t,A=d-2+t;v+=z(b,A,5,1.2)+z(b+1,A+1,3,.5)+z(b+2,A+2,1,.5)}return{size:a+t*2,dots:g,finders:v,logo:l>0?{x:s+t+.5,y:s+t+.5,size:l-1}:null}}y(ae,"oe");h(ae,"styledQr");function re(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${C(e.x)} ${C(e.y)}) scale(${t})`}y(re,"ne");h(re,"qrLogoTransform");var Ze={en:P,fr:Ye,ar:Fe,es:P,pt:P,de:P},Ke={en:R,fr:Ae,ar:be,es:R,pt:R,de:R};function w(e){let t=e.strings;return(n,a)=>Y(t[n]??Ze[e.locale][n]??"",a)}y(w,"A");h(w,"flowT");function oe(e,t){let n=w(t);return e.flatMap(a=>{let o=a.service==="phone_otp"?n("contact.phone"):a.service==="email_otp"?n("contact.email"):j(a,t),c=fe[a.service];return o===null?[]:[{id:a.id,label:o,...c!==void 0?{glyph:(0,r.jsx)(G,{name:c})}:{}}]})}y(oe,"ze");h(oe,"labelled");function ne({step:e,i18n:t,onError:n}){let a=w(t),{busy:o,error:c,run:l}=B(t,n),s=e.kind==="contact_choice";return(0,r.jsx)($,{title:a(s?"contact.title":"choice.title"),description:a(s?"contact.description":"choice.description"),options:oe(e.choice.options,t),busy:o,error:c,focus:!0,testId:s?"sekyro-contact-choice":"sekyro-choice",onChoose:y(i=>l(()=>e.choose(i)),"onChoose")})}y(ne,"Be");h(ne,"PlanChoiceView");var zt=ne,Mt=ne;function Je({step:e,i18n:t,onError:n,onOpen:a}){let o=w(t),{busy:c,error:l,run:s}=B(t,n),i=e,p=e.context.switchable,m=p===void 0?[]:p.options.filter(A=>A.id!==p.current),f=i.kind==="registry"&&(i.reason==="nni_not_found"||i.reason==="registry_record_not_found")&&i.canUseDocument||i.kind==="eid"&&i.reason?.startsWith("eid_")&&i.canUseCamera;if(p===void 0||m.length===0||i.chooseOption===void 0||f)return null;let g=p.kind==="identity_method",v=!g&&m.length===1?m[0]:void 0,d=v!==void 0&&(v.service==="phone_otp"||v.service==="email_otp"),u=v===void 0?void 0:d&&i.canSwitch&&i.switchTo!==void 0?()=>i.switchTo.call(e):()=>i.chooseOption.call(e,v.id),b=g?o("choice.changeMethod"):v===void 0?o("choice.switch"):d?o("contact.switch"):j(v,t);return b===null?null:(0,r.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[l!==null?(0,r.jsx)(T,{tone:"danger",children:(0,r.jsx)("span",{children:l})}):null,(0,r.jsx)(x,{kind:"secondary",disabled:c,"aria-busy":c||void 0,onClick:y(()=>u===void 0?a():s(u),"onClick"),"data-testid":d?"sekyro-contact-switch":g?"sekyro-change-method":"sekyro-lane-switch",children:b})]})}y(Je,"Rt");h(Je,"LaneSwitch");function Xe({step:e,i18n:t,onError:n,onClose:a}){let o=w(t),{busy:c,error:l,run:s}=B(t,n),i=e.context.switchable,p=e.chooseOption,m=i===void 0?[]:oe(i.options,t),f=m.length>1;if((0,k.useEffect)(()=>{f||a()},[f,a]),i===void 0||p===void 0||!f)return null;let[g,v]=i.kind==="identity_method"?[t.t("method.heading"),t.t("method.lead")]:i.kind==="contact"?[o("contact.title"),o("contact.description")]:[o("choice.title"),o("choice.description")];return(0,r.jsx)($,{title:g,description:v,options:m,...i.current!==null?{marked:i.current}:{},busy:c,error:l,focus:!0,testId:"sekyro-lane-choice",onChoose:y(d=>d===i.current?a():s(()=>p.call(e,d)),"onChoose")})}y(Xe,"Vt");h(Xe,"LaneChoiceView");var et=[["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 qe(e){let[t,n]=(0,k.useState)(null);return(0,k.useEffect)(()=>{if(!e.portraitAvailable)return;let a=!0,o=null;return e.portrait().then(c=>{!a||c===null||!c.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(o=URL.createObjectURL(c),n(o))}),()=>{a=!1,o!==null&&URL.revokeObjectURL(o)}},[e.portraitAvailable]),t}y(qe,"We");h(qe,"usePortraitUrl");var tt=h(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function Re(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}}y(Re,"je");h(Re,"formatDate");function at({step:e,i18n:t,onError:n}){let a=w(t),o=(0,k.useId)(),c=L(),l=qe(e),{busy:s,error:i,run:p}=B(t,n),m=e.context.orgName,f=["registry","document","chip"].find(A=>A===e.source),g=e.summaryKind==="partial",v=e.fullNameAr,d=t.locale==="ar"?v??e.fullName:e.fullName??v,u=h(A=>t.strings[`doc.type.${A}`]??A,"documentLabel"),b=e.context.sandbox&&(e.context.sandboxRun?.mode==="simulated"||e.context.sandboxRun===void 0&&e.context.simulation!==void 0);return(0,r.jsxs)("section",{className:"sekyro-step","aria-labelledby":o,"data-testid":"sekyro-identity-summary",children:[(0,r.jsxs)("div",{className:"sekyro-heading",children:[(0,r.jsx)("h2",{id:o,ref:c,tabIndex:-1,className:"sekyro-text-body",children:a("summary.title")}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:a("summary.description")})]}),f!==void 0?(0,r.jsx)("p",{className:"sekyro-summary__source",children:a(`summary.source.${f}`)}):null,b?(0,r.jsxs)(T,{tone:"warning",children:[(0,r.jsx)("strong",{children:t.t("sandboxMode.testData")}),(0,r.jsx)("span",{children:a("sandboxMode.summaryTestDataBody")})]}):null,(0,r.jsxs)("div",{className:"sekyro-summary",children:[l!==null?(0,r.jsx)("img",{className:"sekyro-summary__portrait",src:l,alt:a("summary.portraitAlt")}):null,(0,r.jsx)("dl",{className:"sekyro-summary__list",children:et.map(([A,I,M])=>{let N=A==="idNumberMasked"?e.idNumberMasked??e.nniMasked:A==="fullName"?d:e[A];return N===void 0?null:(0,r.jsxs)("div",{className:"sekyro-summary__row",children:[(0,r.jsx)("dt",{className:"sekyro-text-muted",children:a(A==="fullName"&&g?"summary.name":I)}),(0,r.jsx)("dd",{children:tt(N)?Re(N,t.locale):M||N===v?(0,r.jsx)("bdi",{dir:M?"ltr":"rtl",children:N}):A==="documentType"?u(N):N})]},A)})})]}),i!==null?(0,r.jsx)(T,{tone:"danger",children:(0,r.jsx)("span",{children:i})}):null,e.retakeAvailable?null:(0,r.jsx)("p",{className:"sekyro-text-muted",children:a("summary.noRetake",{org:m})}),(0,r.jsxs)(q,{children:[(0,r.jsx)(x,{full:!0,disabled:s,"aria-busy":s||void 0,onClick:y(()=>p(()=>e.confirm()),"onClick"),children:a("summary.confirm")}),e.retakeAvailable?(0,r.jsx)(x,{kind:"secondary",full:!0,disabled:s,onClick:y(()=>p(()=>e.retake()),"onClick"),children:a(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}y(at,"Lt");h(at,"IdentitySummaryView");var rt=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function ot({step:e,i18n:t,livenessProps:n,sekyroIntro:a}){let o=w(t),[c,l]=(0,k.useState)(null);(0,k.useEffect)(()=>e.onLivePhoto(u=>{let b=u.update?.coach;l(u.holding||b===void 0?null:t.t(`portrait.coach.${b}`))}),[e,t]);let s=e.instructions==="icao",i=(0,k.useMemo)(()=>ge(e),[e]),p=e.icao?.profile==="selfie",m=(0,k.useMemo)(()=>s?rt.filter(u=>!p||u!=="background").map(u=>({id:u,text:o(`capture.tipsIcao.${u}`)})):void 0,[s,p,t]),f=(0,k.useMemo)(()=>s&&!p?{...n.strings,"capture.tips.title":o("capture.tipsIcao.title")}:n.strings,[s,p,n.strings,t]),g=p?void 0:o("capture.tipsIcao.title"),v=(0,k.useMemo)(()=>a===!0&&m!==void 0?{...n.slots,intro:h((u,b)=>(0,r.jsx)(ke,{start:u,context:b,tips:m,...g!==void 0?{tipsTitle:g}:{},...i!==void 0?{retry:i}:{}}),"intro")}:n.slots,[a,m,g,i,n.slots,t]),d=p?`${(m??[]).map(u=>u.text).join(". ")}.`:o("capture.tipsIcao.summary");return(0,r.jsx)(F,{...n,...v!==void 0?{slots:v}:{},...f!==void 0?{strings:f}:{},...m!==void 0?{tips:m,tipsSummary:d}:{},coach:c})}y(ot,"Ot");h(ot,"LivePhotoLiveness");function nt({i18n:e}){let t=w(e);return(0,r.jsxs)(T,{tone:"info",children:[(0,r.jsx)("strong",{children:t("portrait.retakeOnly")}),(0,r.jsx)("span",{children:t("portrait.keepCamera")})]})}y(nt,"Dt");h(nt,"PortraitRetakeNotice");function st({i18n:e,provider:t}){let n=e.strings,a=h(o=>n[o]??Ke[e.locale][o]??"","pick");return(0,r.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?Y(a("eid.continueHint"),{provider:t}):a("eid.continueHintGeneric")})}y(st,"Ft");h(st,"EidContinueHint");async function Ve(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}y(Ve,"Je");h(Ve,"copy");function U({url:e,i18n:t,label:n,primary:a}){let o=w(t),[c,l]=(0,k.useState)("idle"),s=n.startsWith("inApp.")?"inApp":"handoff";return(0,r.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,r.jsx)(x,{kind:a?"primary":"secondary",full:!0,onClick:y(()=>{Ve(e).then(i=>l(i?"copied":"failed"))},"onClick"),children:o(n)}),(0,r.jsx)("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:c==="idle"?"":o(`${s}.${c==="copied"?"copied":"copyFailed"}`)})]})}y(U,"ie");h(U,"CopyLink");function se({url:e,i18n:t,refresh:n,footer:a,lead:o}){let c=w(t),l=(0,k.useId)(),s=(0,k.useMemo)(()=>{try{return ae(te(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]),i=(0,k.useRef)(n);i.current=n;let p=L();return(0,k.useEffect)(()=>{let m=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&i.current?.().catch(()=>{})},5e3);return()=>clearInterval(m)},[]),(0,r.jsxs)("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":l,"data-testid":"sekyro-handoff",children:[(0,r.jsxs)("div",{className:"sekyro-heading",children:[(0,r.jsx)("h2",{id:l,ref:p,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),o!==void 0?(0,r.jsx)("p",{children:o}):null,(0,r.jsx)("p",{className:"sekyro-text-muted",children:c("handoff.description")})]}),s!==null?(0,r.jsxs)("svg",{className:"sekyro-qr",viewBox:`0 0 ${s.size} ${s.size}`,role:"img","aria-label":c("handoff.qrAlt"),children:[(0,r.jsx)("rect",{width:s.size,height:s.size,className:"sekyro-qr__bg"}),(0,r.jsx)("path",{d:s.dots,className:"sekyro-qr__fg"}),(0,r.jsx)("path",{d:s.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),s.logo!==null?(0,r.jsx)("path",{d:De.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(s.logo),"data-qr-mark":""}):null]}):null,(0,r.jsxs)("p",{className:"sekyro-handoff__waiting",role:"status",children:[(0,r.jsx)("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),c("handoff.waiting")]}),(0,r.jsxs)(q,{children:[(0,r.jsx)(U,{url:e,i18n:t,label:"handoff.copyLink"}),a??null]})]})}y(se,"Ge");h(se,"HandoffView");var we={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function it({i18n:e,org:t,nativeApp:n,fallbackUrl:a,refresh:o,footer:c}){let l=w(e),s=(0,k.useMemo)(()=>!K(),[]),i=n.link??a,p=(0,k.useMemo)(()=>{if(!s||i===void 0||i==="")return null;try{return ae(te(i,{ecl:"H"}),{logo:!0})}catch{return null}},[s,i]),m=(0,k.useRef)(o);m.current=o,(0,k.useEffect)(()=>{let b=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&m.current?.().catch(()=>{})},5e3);return()=>clearInterval(b)},[]);let[f,g]=(0,k.useState)(!1),v=h(()=>{o!==void 0&&(g(!0),o().catch(()=>{}).finally(()=>g(!1)))},"again"),d=n.sekyroApp,u=t!==""?l(d?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):l(d?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return(0,r.jsxs)(S,{tone:"brand",icon:"smartphone",title:l("needsApp.capture.title"),testId:"sekyro-native-app",actions:(0,r.jsxs)(r.Fragment,{children:[!s&&d&&n.sekyroAppLink!==void 0?(0,r.jsx)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:n.sekyroAppLink,"data-testid":"sekyro-open-sekyro-app",children:l("needsApp.capture.openSekyro")}):null,o!==void 0?(0,r.jsx)(x,{kind:"secondary",full:!0,disabled:f,onClick:v,children:e.t("common.refresh")}):null,c??null]}),children:[(0,r.jsx)("p",{children:u}),p!==null?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"sekyro-qr",viewBox:`0 0 ${p.size} ${p.size}`,role:"img","aria-label":l("needsApp.capture.qrAlt"),children:[(0,r.jsx)("rect",{width:p.size,height:p.size,className:"sekyro-qr__bg"}),(0,r.jsx)("path",{d:p.dots,className:"sekyro-qr__fg"}),(0,r.jsx)("path",{d:p.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),p.logo!==null?(0,r.jsx)("path",{d:De.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:re(p.logo),"data-qr-mark":""}):null]}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:l("needsApp.capture.scan")})]}):null,d?(0,r.jsxs)("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[l("needsApp.capture.getApp")," ",(0,r.jsx)("a",{href:we.appStore,target:"_blank",rel:"noopener noreferrer",children:l("needsApp.capture.appStore")})," · ",(0,r.jsx)("a",{href:we.googlePlay,target:"_blank",rel:"noopener noreferrer",children:l("needsApp.capture.googlePlay")})]}):null,(0,r.jsxs)("p",{className:"sekyro-handoff__waiting",role:"status",children:[(0,r.jsx)("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),l("needsApp.capture.waiting")]})]})}y(it,"Ht");h(it,"NativeAppView");var ct=["intro","data","processing","sharing","retention"];function lt({i18n:e}){let t=w(e);return(0,r.jsx)(r.Fragment,{children:ct.map(n=>(0,r.jsx)("p",{children:t(`consent.human.terms.${n}`)},n))})}y(lt,"Et");h(lt,"HumanConsentTerms");function dt({url:e,i18n:t}){return(0,k.useMemo)(()=>!K(),[])?(0,r.jsx)(se,{url:e,i18n:t}):null}y(dt,"$t");h(dt,"DesktopHandoffView");function Oe(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(ve(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let n=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||n?"ios":/Android/i.test(t)?"chrome_android":"desktop"}y(Oe,"tt");h(Oe,"cameraHelpPlatform");var ut={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function pt({i18n:e,cause:t,onRetry:n,onContinue:a,handoffUrl:o,repeated:c=!1,platform:l}){let s=w(e),i=(0,k.useId)(),p=L(),[m,f]=(0,k.useState)("idle"),g=(0,k.useMemo)(()=>o!==void 0&&!K(),[o]),v=t==="denied",d=(0,k.useMemo)(()=>l??Oe(),[l]),u=v&&d==="in_app",[b,A]=(0,k.useState)(!1),I=(0,k.useRef)(!1),M=(0,k.useRef)(!0);(0,k.useEffect)(()=>(M.current=!0,()=>{M.current=!1}),[]);let N=h(()=>{if(!v){n();return}I.current||(I.current=!0,Ee().catch(()=>"unknown").then(O=>{I.current=!1,M.current&&(O==="denied"&&!b&&!c?A(!0):n())}))},"retry"),Pe=h(()=>{a!==void 0&&(f("busy"),a(t).then(()=>f("idle"),O=>f(O instanceof Z&&O.code==="check_out_of_order"?"idle":"failed")))},"end"),D=typeof window>"u"?"":window.location.href.split("#")[0]??"",E=(0,k.useMemo)(()=>u&&D!==""?Q(D):null,[u,D]),ie=(0,r.jsxs)(r.Fragment,{children:[u&&E!==null?(0,r.jsxs)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:E,"data-testid":"sekyro-open-browser",children:[(0,r.jsx)(G,{name:"external"}),s("inApp.openBrowser")]}):null,u&&D!==""?(0,r.jsx)(U,{url:D,i18n:e,label:"inApp.copyLink",primary:E===null}):null,(0,r.jsx)(x,{full:!0,kind:!u&&(v||a===void 0)?"primary":"secondary",onClick:N,children:e.t("common.retry")}),a!==void 0?(0,r.jsx)(x,{full:!0,kind:v?"secondary":"primary",disabled:m==="busy","aria-busy":m==="busy"||void 0,onClick:Pe,children:s("capture.noCamera.continue")}):null]}),ce=m==="failed"?(0,r.jsx)(T,{tone:"danger",children:(0,r.jsx)("span",{children:e.t("errors.network_error")})}):null,le=s(u?"capture.noCamera.inAppTitle":v?"capture.noCamera.deniedTitle":"capture.noCamera.title"),de=s(u?"capture.noCamera.inAppBody":v?"capture.noCamera.deniedBody":"capture.noCamera.body"),ue=v&&!u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{"data-testid":"sekyro-camera-steps","data-platform":d,children:s(ut[d])}),d!=="desktop"?(0,r.jsx)("p",{className:"sekyro-text-muted",children:s("capture.noCamera.stepsSystem")}):null]}):null,pe=v&&(b||c)?(0,r.jsx)(T,{tone:"warning",children:(0,r.jsx)("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:s("capture.noCamera.stillBlocked")})}):null;return g&&o!==void 0?(0,r.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":i,"data-testid":"sekyro-no-camera","data-cause":t,children:[(0,r.jsx)(se,{url:o,i18n:e}),(0,r.jsx)("h2",{id:i,ref:p,tabIndex:-1,className:"sekyro-text-body",children:le}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:de}),ue,pe,ce,(0,r.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:ie})]}):(0,r.jsxs)(S,{tone:v?"warning":"neutral",icon:"camera",titleId:i,title:le,testId:"sekyro-no-camera",actions:ie,children:[(0,r.jsx)("p",{children:de}),ue,pe,ce]})}y(pt,"qt");h(pt,"NoCameraView");function mt({url:e,i18n:t,onContinue:n}){let a=w(t),o=(0,k.useId)(),c=(0,k.useMemo)(()=>Q(e),[e]);return(0,r.jsx)(S,{tone:"brand",icon:"external",titleId:o,title:a("inApp.title"),testId:"sekyro-in-app",actions:(0,r.jsxs)(r.Fragment,{children:[c!==null?(0,r.jsxs)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:c,"data-testid":"sekyro-open-browser",children:[(0,r.jsx)(G,{name:"external"}),a("inApp.openBrowser")]}):null,(0,r.jsx)(U,{url:e,i18n:t,label:"inApp.copyLink",primary:c===null}),(0,r.jsx)(x,{kind:"ghost",full:!0,onClick:n,children:a("inApp.continueAnyway")})]}),children:(0,r.jsx)("p",{children:a("inApp.description")})})}y(mt,"Ut");h(mt,"InAppBrowserPrompt");var ht={retake:{title:"testerGate.retakeTitle",body:"testerGate.retakeBody"},liveness:{title:"testerGate.livenessTitle",body:"testerGate.livenessBody"},no_match:{title:"testerGate.missTitle",body:"testerGate.missBody"}};function $e(e){return e instanceof Z?e.code==="attestation_invalid":e instanceof Error&&e.name==="AttestationUnavailableError"}y($e,"rt");h($e,"isCheckUnavailable");function yt({step:e,i18n:t,verification:n,onError:a}){let o=w(t),c=(0,k.useId)(),l=L(),{busy:s,error:i,run:p}=B(t,a),[m,f]=(0,k.useState)(!1),g=n.chooseSandboxMode,v=h(d=>{if(g!==void 0){if(d==="tester"&&!e.testersAvailable){f(!0);return}p(()=>g.call(n,d).catch(u=>{if(u instanceof Z&&u.code==="no_testers")return f(!0);throw u}))}},"pick");return m?(0,r.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":c,"data-testid":"sekyro-sandbox-no-testers",children:[(0,r.jsxs)("div",{className:"sekyro-heading",children:[(0,r.jsx)("h2",{id:c,ref:l,tabIndex:-1,className:"sekyro-text-body",children:o("sandboxMode.noTestersTitle")}),(0,r.jsx)("p",{className:"sekyro-text-muted",children:o("sandboxMode.noTestersBody")})]}),i!==null?(0,r.jsx)(T,{tone:"danger",children:(0,r.jsx)("span",{children:i})}):null,(0,r.jsxs)(q,{children:[(0,r.jsx)(x,{full:!0,disabled:s||g===void 0,"aria-busy":s||void 0,onClick:y(()=>v("simulated"),"onClick"),children:o("sandboxMode.continueTestData")}),(0,r.jsx)(x,{full:!0,kind:"secondary",disabled:s,onClick:y(()=>f(!1),"onClick"),children:t.t("common.back")})]})]}):(0,r.jsx)($,{title:o("sandboxMode.title"),options:[{id:"simulated",label:t.t("sandboxMode.testData"),sub:o("sandboxMode.testDataBody"),glyph:(0,r.jsx)(G,{name:"info"})},{id:"tester",label:o("sandboxMode.testerTitle"),sub:o("sandboxMode.testerBody"),glyph:(0,r.jsx)(G,{name:"face"})}],busy:s||g===void 0,error:i,focus:!0,testId:"sekyro-sandbox-mode",onChoose:y(d=>v(d==="tester"?"tester":"simulated"),"onChoose")})}y(yt,"Yt");h(yt,"SandboxModeView");function ft({i18n:e,testerName:t,onContinue:n}){let a=w(e);return(0,r.jsx)(S,{tone:"success",icon:"success",title:t!==void 0?a("sandboxMode.boundTitle",{name:t}):a("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:(0,r.jsx)(x,{full:!0,onClick:n,children:a("testerGate.continue")}),children:(0,r.jsx)("p",{children:a("testerGate.boundBody")})})}y(ft,"Qt");h(ft,"TesterBoundView");function gt({i18n:e,verification:t,attemptsLeft:n,livenessProps:a}){let o=w(e),c=(0,k.useId)(),[l,s]=(0,k.useState)("intro"),[i,p]=(0,k.useState)(null),[m,f]=(0,k.useState)("no_match"),g=t.testerGate,v=o("testerGate.notice"),d=h(b=>{g!==void 0&&(s("checking"),g.call(t,b,{evidenceNotice:v.trim()!==""}).then(({bound:A,missReason:I})=>{A||(f(I??"no_match"),s("miss"))},A=>{if($e(A)){p(null),s("unavailable");return}p(e.t(ye(A,e.strings))),s("failed")}))},"captured"),u=(0,r.jsx)(x,{full:!0,onClick:y(()=>s("capture"),"onClick"),"data-testid":"sekyro-tester-gate-retry",children:o("testerGate.retry")});if(l==="capture")return(0,r.jsx)(F,{...a,onCaptured:d});if(l==="checking")return(0,r.jsx)(S,{tone:"brand",icon:"face",busy:!0,live:!0,title:o("testerGate.checking"),testId:"sekyro-tester-gate-checking"});if(l==="unavailable")return(0,r.jsx)(S,{tone:"warning",icon:"info",title:o("testerGate.checkUnavailableTitle"),testId:"sekyro-tester-gate-unavailable",actions:u,children:(0,r.jsx)("p",{children:o("testerGate.checkUnavailableBody")})});if(l==="miss"||l==="failed"){let b=ht[m],A=l==="failed"||m==="retake"||n>0;return(0,r.jsx)(S,{tone:"warning",icon:"info",title:o(l==="miss"?b.title:"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:A?u:void 0,children:(0,r.jsx)("p",{children:l==="miss"?o(b.body):i})})}return(0,r.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":c,"data-testid":"sekyro-tester-gate",children:[(0,r.jsx)(he,{id:c,title:o("testerGate.title"),lead:o("testerGate.body")}),(0,r.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-tester-gate-notice",children:v}),(0,r.jsx)(q,{children:(0,r.jsx)(x,{full:!0,onClick:y(()=>s("capture"),"onClick"),disabled:g===void 0,"data-testid":"sekyro-tester-gate-start",children:o("testerGate.start")})})]})}y(gt,"Kt");h(gt,"TesterGateView");export{zt as ContactChoiceView,dt as DesktopHandoffView,st as EidContinueHint,Mt as GenericChoiceView,se as HandoffView,lt as HumanConsentTerms,at as IdentitySummaryView,mt as InAppBrowserPrompt,Xe as LaneChoiceView,Je as LaneSwitch,ot as LivePhotoLiveness,it as NativeAppView,pt as NoCameraView,nt as PortraitRetakeNotice,yt as SandboxModeView,ft as TesterBoundView,gt as TesterGateView,Oe as cameraHelpPlatform};