@sekyro/elements 0.1.0-rc.1 → 0.1.0-rc.10

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 (148) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +8 -9
  3. package/custom-elements.json +2 -2
  4. package/dist/cdn/chunks/{background-monitor-GCMNCJMG-UXYQ5GX7.js → background-monitor-A7FKJOAG-K3WF3C2D.js} +1 -1
  5. package/dist/cdn/chunks/barcode-detect-C5IOXMKI-ZOZ2WOWU.js +1 -0
  6. package/dist/cdn/chunks/{camera-trait-HVV5ZEDI-JB4HN6S3.js → camera-trait-V4UAOPIQ-TFCPOCSU.js} +1 -1
  7. package/dist/cdn/chunks/{capture-session-doc-ELX6VK6Z-SDM3ILRA.js → capture-session-doc-2LIRRKFX-GZQBYOR3.js} +1 -1
  8. package/dist/cdn/chunks/challenge-frame-YAQJ5YMB-MHZYRGKY.js +1 -0
  9. package/dist/cdn/chunks/chunk-52CHUGVC.js +3 -0
  10. package/dist/cdn/chunks/chunk-574O5HZZ.js +1 -0
  11. package/dist/cdn/chunks/chunk-5FPDMYLD.js +33 -0
  12. package/dist/cdn/chunks/{chunk-6H22RNSK.js → chunk-6N4AXKCS.js} +1 -1
  13. package/dist/cdn/chunks/chunk-BIK4PGBE.js +1 -0
  14. package/dist/cdn/chunks/{chunk-FEWP7HBJ.js → chunk-BZDKXIWD.js} +1 -1
  15. package/dist/cdn/chunks/{chunk-D334IAZJ.js → chunk-CW56KMMH.js} +1 -1
  16. package/dist/cdn/chunks/{chunk-BF6SE2AC.js → chunk-FVMJYXGV.js} +1 -1
  17. package/dist/cdn/chunks/{chunk-36WGD7QV.js → chunk-JDANRDDK.js} +1 -1
  18. package/dist/cdn/chunks/chunk-LAF6JZRH.js +1 -0
  19. package/dist/cdn/chunks/{chunk-FCTRNWRU.js → chunk-MDDGAHO6.js} +1 -1
  20. package/dist/cdn/chunks/{chunk-LYYAVERP.js → chunk-MZ6WG3QQ.js} +1 -1
  21. package/dist/cdn/chunks/{chunk-FDWO4KXK.js → chunk-NNYJYD3Q.js} +1 -1
  22. package/dist/cdn/chunks/{chunk-ZIC5GEH2.js → chunk-NT7PZPBW.js} +1 -1
  23. package/dist/cdn/chunks/chunk-PH7RJ5GZ.js +1 -0
  24. package/dist/cdn/chunks/{chunk-T4M2J44L.js → chunk-Q5ZVLMKQ.js} +1 -1
  25. package/dist/cdn/chunks/chunk-Q6GRUOR3.js +1 -0
  26. package/dist/cdn/chunks/chunk-SIBJ56BG.js +1 -0
  27. package/dist/cdn/chunks/{chunk-CYGAKCKG.js → chunk-SJAQ7DUY.js} +1 -1
  28. package/dist/cdn/chunks/{chunk-X767DBO7.js → chunk-SVROKIYG.js} +1 -1
  29. package/dist/cdn/chunks/{chunk-JM3CYFFZ.js → chunk-UQKRYXN5.js} +1 -1
  30. package/dist/cdn/chunks/chunk-WKQRKYX4.js +25 -0
  31. package/dist/cdn/chunks/chunk-X42LECG5.js +1 -0
  32. package/dist/cdn/chunks/chunk-X7QE75V5.js +1 -0
  33. package/dist/cdn/chunks/{chunk-IBOJTLL7.js → chunk-Y6PC7FZV.js} +1 -1
  34. package/dist/cdn/chunks/{chunk-KLE75SX4.js → chunk-YGXNL7S2.js} +1 -1
  35. package/dist/cdn/chunks/{chunk-BZ37D4FR.js → chunk-YPIQ6IU7.js} +1 -1
  36. package/dist/cdn/chunks/chunk-YZWLMKXA.js +1 -0
  37. package/dist/cdn/chunks/{chunk-7Y73DZJB.js → chunk-ZRL6E7XH.js} +1 -1
  38. package/dist/cdn/chunks/create-document-capture-X35M4UAK-BB2SCTPK.js +1 -0
  39. package/dist/cdn/chunks/create-portrait-capture-5VGYZUOK-N3333DJC.js +1 -0
  40. package/dist/cdn/chunks/{detector-scanic-F3Y5X3DF-FGVR4NEM.js → detector-scanic-KMAVOHGF-NFYSZ7GU.js} +1 -1
  41. package/dist/cdn/chunks/document-capture-view-QMXAAYA2-5HJJKIZ4.js +1 -0
  42. package/dist/cdn/chunks/{eid-view-RZS6MLT6-35VSHTV3.js → eid-view-3QTJORA7-S7APLLOM.js} +1 -1
  43. package/dist/cdn/chunks/email-otp-view-6MD74OFN-PRYGFOHY.js +1 -0
  44. package/dist/cdn/chunks/flow-views-AEVFAZOT-DUBO6WU5.js +1 -0
  45. package/dist/cdn/chunks/form-view-YAGVGWMI-7BEAIBSC.js +1 -0
  46. package/dist/cdn/chunks/icao-gate-T3BTOKFJ-BWMLKL7A.js +1 -0
  47. package/dist/cdn/chunks/icao-tuning-4ETMF53W-FRBTB5R7.js +1 -0
  48. package/dist/cdn/chunks/{landmarker-3BBP3RBY-DDXMOLGK.js → landmarker-KB7LVXAU-F7BQTP3H.js} +1 -1
  49. package/dist/cdn/chunks/mrz-band-VYHOTDHY-VEZ2J5IL.js +1 -0
  50. package/dist/cdn/chunks/overlay-de-U5AM34SS-UPJSNTKZ.js +1 -0
  51. package/dist/cdn/chunks/overlay-es-LS4JWU5J-UFZMJAU6.js +1 -0
  52. package/dist/cdn/chunks/overlay-pt-M4ZJJRFE-HJIXIX5G.js +1 -0
  53. package/dist/cdn/chunks/plan-runner-T2ZTSBI4-SEXJ6KJP.js +1 -0
  54. package/dist/cdn/chunks/{portrait-capture-view-GQIBQY4U-TJUYRCTI.js → portrait-capture-view-6EUUL2QA-7F2WSHIW.js} +1 -1
  55. package/dist/cdn/chunks/portrait-review-view-TTVTYGLG-SVRXTB4Q.js +1 -0
  56. package/dist/cdn/chunks/{print-4WOMNRBE-DNXJ7ERA.js → print-SEWS3VHQ-HWJTHADG.js} +1 -1
  57. package/dist/cdn/chunks/proof-of-address-view-5WWGRXJL-JQWHMWVI.js +1 -0
  58. package/dist/cdn/chunks/reader-652D2CK6.js +2 -0
  59. package/dist/cdn/chunks/upload-file-EGXXM6TQ-NNVVB5QQ.js +1 -0
  60. package/dist/cdn/define.js +1 -1
  61. package/dist/cdn/index.js +1 -1
  62. package/dist/{chunk-B6A5RXN4.js → chunk-2WPZFQUP.js} +1 -1
  63. package/dist/chunk-BCDTYNQ3.js +1 -0
  64. package/dist/{chunk-IBPUWYHJ.js → chunk-DMESMWZ7.js} +1 -1
  65. package/dist/chunk-F2IYM4GV.js +1 -0
  66. package/dist/chunk-F67N4IZQ.js +1 -0
  67. package/dist/{chunk-RMV3BNWO.js → chunk-GIMNUGVE.js} +1 -1
  68. package/dist/chunk-K5DAJSLX.js +25 -0
  69. package/dist/{chunk-QE2B3MSJ.js → chunk-M3SKGQUG.js} +1 -1
  70. package/dist/{chunk-ESSKMX7I.js → chunk-NQQZCBHQ.js} +1 -1
  71. package/dist/chunk-P223YKM3.js +1 -0
  72. package/dist/{chunk-XEY5ANJ6.js → chunk-PCLZBE2D.js} +1 -1
  73. package/dist/{chunk-AGPBG22V.js → chunk-SSSIPHG7.js} +1 -1
  74. package/dist/chunk-W23RACX3.js +33 -0
  75. package/dist/{chunk-IGC6OQZ2.js → chunk-XJJ3KCLT.js} +1 -1
  76. package/dist/{chunk-6NQ7EWA4.js → chunk-YC4IK7VG.js} +1 -1
  77. package/dist/{chunk-SEE6MST7.js → chunk-YZ6YGLNN.js} +1 -1
  78. package/dist/define.cjs +6 -6
  79. package/dist/define.js +1 -1
  80. package/dist/document-capture-view-QMXAAYA2-62JPLXV7.js +1 -0
  81. package/dist/{eid-view-RZS6MLT6-2W2T3AWK.js → eid-view-3QTJORA7-TLA52WL7.js} +1 -1
  82. package/dist/email-otp-view-6MD74OFN-WVIWSE4A.js +1 -0
  83. package/dist/flow-views-AEVFAZOT-PKXWQC2K.js +1 -0
  84. package/dist/form-view-YAGVGWMI-CWM5GSJJ.js +1 -0
  85. package/dist/index.cjs +6 -6
  86. package/dist/index.d.cts +154 -6
  87. package/dist/index.d.ts +154 -6
  88. package/dist/index.js +1 -1
  89. package/dist/overlay-de-U5AM34SS-ISYPWAT7.js +1 -0
  90. package/dist/overlay-es-LS4JWU5J-2VRTV7R4.js +1 -0
  91. package/dist/overlay-pt-M4ZJJRFE-UCQAZFCI.js +1 -0
  92. package/dist/{portrait-capture-view-GQIBQY4U-AFPEUDLY.js → portrait-capture-view-6EUUL2QA-ZTAGMPU2.js} +1 -1
  93. package/dist/portrait-review-view-TTVTYGLG-HVTGBDRR.js +1 -0
  94. package/dist/proof-of-address-view-5WWGRXJL-3BWMP23I.js +1 -0
  95. package/dist/styles.css +109 -18
  96. package/package.json +2 -2
  97. package/sbom.cdx.json +153 -0
  98. package/dist/cdn/chunks/chunk-5FLR7RPJ.js +0 -1
  99. package/dist/cdn/chunks/chunk-CFJJD6T2.js +0 -1
  100. package/dist/cdn/chunks/chunk-CMS5FVGM.js +0 -1
  101. package/dist/cdn/chunks/chunk-HQF66Y6S.js +0 -1
  102. package/dist/cdn/chunks/chunk-PUO2VWDE.js +0 -33
  103. package/dist/cdn/chunks/chunk-U3UDWPBG.js +0 -1
  104. package/dist/cdn/chunks/chunk-X3BGM3B2.js +0 -1
  105. package/dist/cdn/chunks/chunk-YWPZG2MZ.js +0 -25
  106. package/dist/cdn/chunks/chunk-ZKLSZJFN.js +0 -1
  107. package/dist/cdn/chunks/create-document-capture-UHZJUZHC-YYZNCSW6.js +0 -1
  108. package/dist/cdn/chunks/create-portrait-capture-VRZZOMJS-I4FBRNBP.js +0 -1
  109. package/dist/cdn/chunks/document-capture-view-JE6IX4IE-2454PW6Z.js +0 -1
  110. package/dist/cdn/chunks/email-otp-view-WUQ5OGDD-YDSUKAN2.js +0 -1
  111. package/dist/cdn/chunks/flow-views-5L7JF3MM-M6C3RXSX.js +0 -1
  112. package/dist/cdn/chunks/icao-gate-SO6YJ7RV-MPW6W3QN.js +0 -1
  113. package/dist/cdn/chunks/icao-tuning-DCZCMCEQ-ZQSK7ZOV.js +0 -1
  114. package/dist/cdn/chunks/mrz-band-DCXFWDBD-OPMO6HYS.js +0 -1
  115. package/dist/cdn/chunks/overlay-de-JQ2FDZBA-HLFTXIF6.js +0 -1
  116. package/dist/cdn/chunks/overlay-es-WDYRSRHH-UXHTYCHD.js +0 -1
  117. package/dist/cdn/chunks/overlay-pt-AQMDWDWX-BD7TO6Y4.js +0 -1
  118. package/dist/cdn/chunks/plan-runner-ZHOYMRAO-RDS523K5.js +0 -1
  119. package/dist/cdn/chunks/portrait-review-view-XOQYQNU7-LPONGGFW.js +0 -1
  120. package/dist/cdn/chunks/turnstile-N4K4U2AI-SLP55XAA.js +0 -1
  121. package/dist/cdn/chunks/upload-file-C4MFKLT3-DXCNEDXP.js +0 -1
  122. package/dist/chunk-72JW2LCH.js +0 -25
  123. package/dist/chunk-7URX73UH.js +0 -1
  124. package/dist/chunk-EIRNIJXL.js +0 -1
  125. package/dist/chunk-ZDF5JILV.js +0 -33
  126. package/dist/document-capture-view-JE6IX4IE-5HJYAEDX.js +0 -1
  127. package/dist/email-otp-view-WUQ5OGDD-NGI6PBX3.js +0 -1
  128. package/dist/flow-views-5L7JF3MM-P55CCCOH.js +0 -1
  129. package/dist/overlay-de-JQ2FDZBA-FR25JPE4.js +0 -1
  130. package/dist/overlay-es-WDYRSRHH-PFDMX5D2.js +0 -1
  131. package/dist/overlay-pt-AQMDWDWX-LTD4N2DW.js +0 -1
  132. package/dist/portrait-review-view-XOQYQNU7-IPKAZBP6.js +0 -1
  133. /package/dist/cdn/chunks/{chunk-SK6UAYX2.js → chunk-2FETDQV5.js} +0 -0
  134. /package/dist/cdn/chunks/{chunk-RK4HVNRS.js → chunk-5QL6W6FW.js} +0 -0
  135. /package/dist/cdn/chunks/{chunk-HDJ6JFXX.js → chunk-IO7MUUC6.js} +0 -0
  136. /package/dist/cdn/chunks/{chunk-RRLXNT33.js → chunk-JS2IXPNL.js} +0 -0
  137. /package/dist/cdn/chunks/{chunk-ET7NCKUV.js → chunk-KHSYTJ46.js} +0 -0
  138. /package/dist/cdn/chunks/{chunk-CMDITVXF.js → chunk-KVTY4E6J.js} +0 -0
  139. /package/dist/cdn/chunks/{chunk-7HJH5Q4M.js → chunk-L22GFJQV.js} +0 -0
  140. /package/dist/cdn/chunks/{chunk-FAIDO3QL.js → chunk-L244IUB3.js} +0 -0
  141. /package/dist/cdn/chunks/{chunk-UZWMCNZI.js → chunk-P7K7ELYZ.js} +0 -0
  142. /package/dist/cdn/chunks/{chunk-JOZCJGRV.js → chunk-YVQ6LFN4.js} +0 -0
  143. /package/dist/cdn/chunks/{clip-inspect-HZ7N2YOP-DCDXB76T.js → clip-inspect-DLJXVKV6-TNHTD4LV.js} +0 -0
  144. /package/dist/cdn/chunks/{keyframe-rank-R4NPQGN3-VRURE6OQ.js → keyframe-rank-YAJLYJYF-WCA6RPMD.js} +0 -0
  145. /package/dist/cdn/chunks/{scanic-ml-stub-XPNKT2N3-YSXFN7KY.js → scanic-ml-stub-KW7IZHUT-XLERBDWM.js} +0 -0
  146. /package/dist/cdn/chunks/{segmenter-3CVPTZMM-WGI6XGWN.js → segmenter-USLNBX65-HFEEUGXG.js} +0 -0
  147. /package/dist/{chunk-TPIBYY2S.js → chunk-N2DNXUEA.js} +0 -0
  148. /package/dist/{chunk-RPLVIGTS.js → chunk-SSU37LFQ.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as xr}from"./chunk-FDWO4KXK.js";import{c as _t}from"./chunk-X3BGM3B2.js";import{b as gr,d as kr}from"./chunk-36WGD7QV.js";import{b as Sr,c as bt}from"./chunk-FCTRNWRU.js";import{a as mr,b as yr,c as vr,d as Le}from"./chunk-LYYAVERP.js";import{F as _r,K as Cr,L as wr,a as D,b as de,c as X,m as dr,n as Je,p as pr,q as Xe,r as hr,s as fr,t as kt,u as se,v as Ae,w as et,y as br}from"./chunk-YWPZG2MZ.js";import{b as or,c as lr,d as cr,g as ur}from"./chunk-ZKLSZJFN.js";import{b as gt}from"./chunk-6H22RNSK.js";import{a as s}from"./chunk-RK4HVNRS.js";import{f as ir}from"./chunk-D334IAZJ.js";import{a as i,c as E}from"./chunk-4FHWXBOB.js";var Mr=E(D(),1),v=E(de(),1),ee=E(de(),1),ye=E(D(),1),B=E(de(),1),_=E(D(),1),y=E(D(),1),st=E(D(),1),fe=E(de(),1),Qr=E(D(),1),Y=E(D(),1),it=E(D(),1),we=E(de(),1),Se=E(de(),1),U=E(de(),1);var ot=E(D(),1),pe=E(D(),1);var Q=E(D(),1);var M=E(D(),1),me=E(D(),1),Te=E(D(),1),Mt=E(de(),1),k=E(de(),1);function ie({className:e,children:t}){return(0,v.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})}i(ie,"te");s(ie,"Svg");var Rt="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function Rr(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,v.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"})]})}i(Rr,"cn");s(Rr,"SunIcon");function Lr(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,v.jsx)("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}i(Lr,"ln");s(Lr,"FaceUncoveredIcon");function Ar(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.jsx)("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),(0,v.jsx)("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),(0,v.jsx)("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}i(Ar,"un");s(Ar,"PhoneEyeLevelIcon");function Er(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.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,v.jsx)("circle",{cx:"12",cy:"12",r:"2.8"})]})}i(Er,"dn");s(Er,"LookStraightIcon");function Ir(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.jsx)("path",{d:Rt}),(0,v.jsx)("path",{d:"M9 13l2 2 4-4"})]})}i(Ir,"pn");s(Ir,"CameraCheckIcon");function Ur(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.jsx)("path",{d:Rt}),(0,v.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"})]})}i(Ur,"fn");s(Ur,"CameraAskIcon");function jr(e){return(0,v.jsxs)(ie,{...e,children:[(0,v.jsx)("path",{d:Rt}),(0,v.jsx)("path",{d:"M3 3l18 18"})]})}i(jr,"mn");s(jr,"CameraBlockedIcon");function rt({off:e,className:t}){return(0,v.jsxs)(ie,{className:t,children:[(0,v.jsx)("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?(0,v.jsx)("path",{d:"M4 4l16 16"}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),(0,v.jsx)("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}i(rt,"Ve");s(rt,"SpeakerIcon");function Tr(e){return(0,v.jsx)(ie,{...e,children:(0,v.jsx)("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}i(Tr,"yn");s(Tr,"CheckIcon");function Pr(e){return(0,v.jsxs)(ie,{className:e.className??"sekyro-spinner",children:[(0,v.jsx)("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),(0,v.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}i(Pr,"gn");s(Pr,"SpinnerIcon");var Ct=["light","uncover","eyeLevel","straight"],An={light:{key:"capture.tips.light",icon:s(()=>(0,ee.jsx)(Rr,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:s(()=>(0,ee.jsx)(Lr,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:s(()=>(0,ee.jsx)(Ar,{}),"icon")},straight:{key:"capture.tips.straight",icon:s(()=>(0,ee.jsx)(Er,{}),"icon")}};function Or({tips:e}){let t=Le(),n=(0,Mr.useId)();return e.length===0?null:(0,ee.jsxs)("section",{className:"sekyro-tips","aria-labelledby":n,"data-testid":"sekyro-tips",children:[(0,ee.jsx)("p",{className:"sekyro-tips__title",id:n,children:t("capture.tips.title")}),(0,ee.jsx)("ul",{className:"sekyro-tips__list",children:e.map(r=>{let a=typeof r=="string"?An[r]:void 0,o=typeof r=="string"?r:r.id,l=a!==void 0?a.icon():typeof r=="string"?void 0:r.icon,u=a!==void 0?t(a.key):typeof r=="string"?r:r.text;return(0,ee.jsxs)("li",{className:"sekyro-tips__item",children:[l!=null?(0,ee.jsx)("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:l}):null,(0,ee.jsx)("span",{children:u})]},o)})})]})}i(Or,"vn");s(Or,"TipList");var En=220;function Br({title:e,description:t,options:n,busy:r,error:a,focus:o,testId:l,look:u="cards",marked:S,onChoose:h}){let w=(0,ye.useId)(),x=kt(),[I,d]=(0,ye.useState)(null),N=(0,ye.useRef)(null);(0,ye.useEffect)(()=>{a!==null&&d(null)},[a]),(0,ye.useEffect)(()=>()=>{N.current!==null&&clearTimeout(N.current)},[]);let R=s(p=>{r||I!==null||(d(p),N.current=setTimeout(()=>{N.current=null,d(null),h(p)},En))},"choose");return(0,B.jsxs)("section",{className:"sekyro-stack sekyro-stack--4 sekyro-choice","aria-labelledby":w,"data-testid":l,children:[(0,B.jsxs)("div",{className:u==="cards"?"sekyro-heading":"sekyro-stack sekyro-stack--1",children:[(0,B.jsx)("h2",{id:w,ref:o?x:void 0,tabIndex:-1,className:"sekyro-text-body",children:e}),t!==void 0&&t!==""?(0,B.jsx)("p",{className:"sekyro-text-muted",children:t}):null]}),a!==null?(0,B.jsx)(se,{tone:"danger",children:(0,B.jsx)("span",{children:a})}):null,u==="buttons"?(0,B.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:n.map((p,j)=>(0,B.jsx)(X,{kind:j===0?"primary":"ghost",full:!0,disabled:r,"aria-busy":r||void 0,onClick:i(()=>h(p.id),"onClick"),children:p.label},p.id))}):(0,B.jsx)("div",{className:"sekyro-choices",children:n.map(p=>(0,B.jsxs)("button",{type:"button",className:"sekyro-card","aria-pressed":(I??S)===p.id,"aria-busy":r||void 0,disabled:r||I!==null&&I!==p.id,onClick:i(()=>R(p.id),"onClick"),children:[p.glyph!==void 0?(0,B.jsx)("span",{className:"sekyro-card__tile",children:p.glyph}):null,(0,B.jsxs)("span",{className:"sekyro-card__body",children:[(0,B.jsx)("span",{className:"sekyro-card__title",children:p.label}),p.sub!==void 0?(0,B.jsx)("span",{className:"sekyro-card__sub",children:p.sub}):null]}),(0,B.jsx)("span",{className:"sekyro-radio","aria-hidden":"true"})]},p.id))})]})}i(Br,"kn");s(Br,"ChoiceScreen");var qr=["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"];function nt(e){return e!==null&&qr.includes(e)}i(nt,"he");s(nt,"isVoiceKey");var In=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&&In(a,t)?a[t]:null}}catch{return null}return typeof r=="string"&&r!==""?r:null}i(je,"Me");s(je,"resolveClip");var Un="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",jn={ar:"ar-SA",fr:"fr-FR",en:"en-US",es:"es-ES",pt:"pt-BR",de:"de-DE"};function ae(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}i(ae,"ne");s(ae,"synth");function Vr(){return ae()!==null&&typeof SpeechSynthesisUtterance=="function"}i(Vr,"wr");s(Vr,"speechAvailable");function wt(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}i(wt,"bn");s(wt,"baseLang");function Lt(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)}i(Lt,"Vn");s(Lt,"pickVoice");function Hr(e){if(!Vr())return!1;let t=[];try{t=ae()?.getVoices()??[]}catch{return!0}return t.length===0||Lt(t,e)!==void 0}i(Hr,"Mn");s(Hr,"speechUsable");function Dr(e){let t=ae();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}i(Dr,"wn");s(Dr,"subscribeVoices");function He(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}`}}i(He,"Ke");s(He,"clipIdentity");function St(e){e.pause(),e.removeAttribute("src"),e.load()}i(St,"Sn");s(St,"release");function $r(){let e=null,t=null,n=0,r=null,a=[],o=new Map,l=s(()=>{a=ae()?.getVoices()??[]},"loadVoices"),u=!1,S=s(()=>{let d=ae();u||d===null||(u=!0,l(),d.addEventListener?.("voiceschanged",l))},"bindVoices"),h=s(()=>(e??(e=new Audio),e),"element"),w=s((d,N,R)=>{let p=ae();if(p!==null&&d!==""&&typeof SpeechSynthesisUtterance=="function"){S();let j=Lt(a,N);if(a.length===0||j!==void 0){p.cancel();let C=new SpeechSynthesisUtterance(d);C.lang=N,j!==void 0&&(C.voice=j),C.rate=.95,R!==void 0&&(C.onend=C.onerror=R),p.speak(C);return}}R?.()},"speak"),x=s(()=>{n+=1,r=null,e!==null&&(e.pause(),e.currentTime=0),ae()?.cancel()},"stop"),I=s(d=>{for(let N of d){let R=He(N);if(o.has(R))continue;let p=new Audio;p.preload="auto",p.src=N,o.set(R,p)}},"warmClips");return{say(d){let N=d.url!==null?He(d.url):`tts:${d.lang}:${d.text}`;if(N===r)return;r=N,n+=1;let R=n,p=d.onEnd,j=p!==void 0?()=>{R===n&&p()}:void 0;if(ae()?.cancel(),d.url!==null){let C=h();C.pause(),C.muted=!1,C.src=d.url,C.currentTime=0,C.onended=j??null,C.play()?.catch(A=>{R===n&&A?.name!=="AbortError"&&(d.speech?w(d.text,d.lang,j):j?.())});return}d.speech?w(d.text,d.lang,j):j?.()},unlock({lang:d,speech:N,prefetch:R}){let p=h();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let A=Uint8Array.from(atob(Un),q=>q.charCodeAt(0));t=URL.createObjectURL(new Blob([A],{type:"audio/wav"}))}let j=p.paused===!1&&t!==null&&p.src!==t;t!==null&&!j&&(p.muted=!0,p.onended=null,p.src=t,p.play()?.catch(()=>{}));let C=ae();if(N&&C!==null&&typeof SpeechSynthesisUtterance=="function"){S();let A=new SpeechSynthesisUtterance(" ");A.volume=0,A.lang=d,C.speak(A)}I(R??[])},prefetch:I,stop:x,dispose(){x(),u&&ae()?.removeEventListener?.("voiceschanged",l),u=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&St(e),e=null;for(let d of o.values())St(d);o.clear()}}}i($r,"Ln");s($r,"createVoicePlayer");var Tn="sekyro.voiceGuidance";function Fr(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}}i(Fr,"xn");s(Fr,"readVoicePreference");function Gr(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}i(Gr,"In");s(Gr,"writeVoicePreference");var Ve="capture.tips.summary",Pn=typeof window<"u"?_.useLayoutEffect:_.useEffect,On=Object.freeze({});function tt(e,t){let n=new Set,r=[];for(let a of qr){let o=a===Ve?null:je(e,a,t);o===null||n.has(He(o))||(n.add(He(o)),r.push(o))}return r}i(tt,"gt");s(tt,"resolvedClipUrls");function Kr({locale:e,defaultClips:t,options:n}){let r=n===!1,a=r?{}:n??{},o=a.storageKey===void 0?Tn:a.storageKey,[l,u]=(0,_.useState)(a.defaultEnabled??!0),S=(0,_.useRef)(l),[h,w]=(0,_.useState)(!1),[x,I]=(0,_.useState)("none"),[d,N]=(0,_.useState)(!1),R=(0,_.useRef)(!1),[p,j]=(0,_.useState)(0),C=(0,_.useRef)(null),A=(0,_.useCallback)(()=>(C.current??(C.current=$r()),C.current),[]),q=jn[e],$=a.speechFallback,f=$===void 0||$===!0?!0:$===!1?!1:$.includes(e),F=a.clips??t??On,oe=(0,_.useRef)(!1),le=(0,_.useRef)(F);Pn(()=>{le.current=F,S.current=l}),(0,_.useEffect)(()=>{if(r||o===null)return;let L=Fr(o);L!==null&&(S.current=L,u(L))},[r,o]),(0,_.useEffect)(()=>{if(!(r||!f))return Dr(()=>j(L=>L+1))},[r,f]);let c=a.clips;(0,_.useEffect)(()=>{if(r)return;let L=f&&Hr(q);w(tt(F,e).length>0||L),I(c!==void 0&&je(c,Ve,e)!==null?"partner":je(F,Ve,e)!==null||L?"default":"none")},[r,F,c,e,f,q,p]),(0,_.useEffect)(()=>{if(r||!l||!oe.current)return;let L=tt(F,e);L.length>0&&A().prefetch(L)},[r,l,F,e,A]),(0,_.useEffect)(()=>()=>{C.current?.dispose(),C.current=null,oe.current=!1},[]);let V=(0,_.useCallback)(L=>{r||(oe.current=!0,A().unlock({lang:q,speech:f,...L?{prefetch:tt(le.current,e)}:{}}))},[r,A,q,f,e]),T=(0,_.useCallback)(()=>V(S.current),[V]),G=(0,_.useCallback)(()=>{R.current=!1,N(!1)},[]),O=(0,_.useCallback)(()=>{G(),C.current?.stop()},[G]),ve=(0,_.useCallback)(()=>{R.current&&O()},[O]),he=(0,_.useCallback)((L,xe)=>{if(r)return;if(R.current){O();return}let ge=A();ge.stop(),R.current=!0,N(!0);let P=xe?.clip===!1?null:je(le.current,Ve,e);ge.say({url:P,text:L,lang:q,speech:f,onEnd:G})},[r,O,A,e,q,f,G]),K=(0,_.useCallback)(L=>{r||(L?V(!0):O(),o!==null&&Gr(o,L),S.current=L,u(L))},[r,V,O,o]),z=(0,_.useCallback)(()=>K(!S.current),[K]),te=(0,_.useCallback)((L,xe)=>{if(r||!l)return;R.current&&G();let ge=je(le.current,L,e);A().say({url:ge,text:xe,lang:q,speech:f})},[r,l,e,A,q,f,G]);return(0,_.useMemo)(()=>({supported:!r&&h,enabled:!r&&l,setEnabled:K,toggle:z,unlock:T,speakKey:te,stop:O,summary:r?"none":x,summaryPlaying:d,toggleSummary:he,stopSummary:ve}),[r,h,l,K,z,T,te,O,x,d,he,ve])}i(Kr,"ht");s(Kr,"useVoiceGuidance");function zr(e,t,n,r){let{speakKey:a,stop:o,enabled:l}=e,u=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(!r||!l){u.current&&o(),u.current=!1;return}u.current=!0,nt(t)&&t!==Ve&&n!==""&&a(t,n)},[r,l,t,n,a,o])}i(zr,"vt");s(zr,"useSpeakGuidance");function at(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"}}i(at,"Pn");s(at,"retryCoachingOf");var De={face:{title:"capture.retryCoaching.title",tips:["capture.retryCoaching.light","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 Zr({showCoaching:e,coaching:t="face",attemptsText:n,showRetake:r,onRetake:a}){let o=Le(),l=(0,st.useRef)(null);return(0,st.useEffect)(()=>{r&&l.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(De[t].title)}),(0,fe.jsx)("ul",{className:"sekyro-coaching",children:De[t].tips.map(u=>(0,fe.jsx)("li",{children:o(u)},u))}),n!==null?(0,fe.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:n}):null]}):null,r?(0,fe.jsx)(X,{ref:l,className:"sekyro-btn--start",onClick:a,children:o("capture.recordAgain")}):null]})}i(Zr,"An");s(Zr,"CapturedPanel");function At(){try{return!1}catch{return!1}}i(At,"tt");s(At,"isDevBuild");var Bn=(0,Qr.createContext)(null);function Wr({state:e}){let t=Le(),[n,r]=(0,it.useState)(!1);(0,it.useEffect)(()=>{e!=="unknown"&&r(!0)},[e]);let a=e==="granted"?(0,we.jsx)(Ir,{}):e==="denied"?(0,we.jsx)(jr,{}):(0,we.jsx)(Ur,{});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}`)})]})}i(Wr,"Kn");s(Wr,"PermissionRow");function Yr({voice:e}){let t=Le();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:i(()=>e.toggle(),"onClick"),children:[(0,Se.jsxs)("span",{className:"sekyro-switch__label",children:[(0,Se.jsx)(rt,{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)(Tr,{className:"sekyro-switch__check"}):null})})]})}i(Yr,"Un");s(Yr,"VoiceSwitch");function Jr({assets:e,onRetryAssets:t,permission:n,captureMode:r="self",voice:a,tips:o,summary:l,startLabel:u,startDisabled:S,onStart:h}){let w=Le(),x=(0,Y.useRef)(l?.stop);x.current=l?.stop,(0,Y.useEffect)(()=>()=>x.current?.(),[]);let I=(0,Y.useRef)(null),d=(0,Y.useRef)(null),N=(0,Y.useRef)(null),R=(0,Y.useRef)(e),p=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{let f=R.current;if(R.current=e,f===e)return;let F=p.current;e!=="loading"&&(p.current=!1),Xr(I.current)&&(e==="failed"?N.current?.focus():F&&d.current?.focus())},[e]);let j=(0,Y.useCallback)(()=>{p.current=!0,t()},[t]),C=e==="loading",A=C||S,q=(0,Y.useCallback)(()=>{A||(x.current?.(),h())},[A,h]),$;return e==="failed"?$=(0,U.jsxs)(se,{tone:"danger",testId:"sekyro-assets-error",children:[(0,U.jsx)("p",{className:"sekyro-text-body",children:w("fcv2.err.models")}),(0,U.jsx)(X,{kind:"ghost",ref:N,className:"sekyro-btn--start",onClick:j,"data-testid":"sekyro-assets-retry",children:w("common.retry")})]}):$=(0,U.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,U.jsx)(X,{ref:d,full:!0,"data-testid":"sekyro-start","aria-disabled":A?"true":void 0,"aria-busy":C?"true":void 0,onClick:q,children:C?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Pr,{}),w("capture.preparing.title")]}):u??w("capture.start")}),C?(0,U.jsx)("p",{className:"sekyro-text-muted",children:w("capture.preparing.hint")}):null]}),(0,U.jsxs)("div",{ref:I,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[r==="assisted"?(0,U.jsxs)("div",{className:"sekyro-stack sekyro-stack--1","data-testid":"sekyro-assisted-intro",children:[(0,U.jsx)("h2",{className:"sekyro-text-body",children:w("capture.assisted.title")}),(0,U.jsx)("p",{className:"sekyro-text-muted",children:w("capture.assisted.lead")})]}):null,o!==!1?(0,U.jsx)(Or,{tips:o}):null,l!==void 0?(0,U.jsxs)(X,{kind:"ghost",className:"sekyro-btn--start",onClick:l.toggle,"data-testid":"sekyro-tips-listen",children:[(0,U.jsx)(rt,{off:!1}),w(l.playing?"capture.tips.stop":"capture.tips.listen")]}):null,(0,U.jsx)(Wr,{state:n}),(0,U.jsx)(Yr,{voice:a}),(0,U.jsx)("p",{className:"sekyro-text-muted",children:w("capture.securityNote")}),$,(0,U.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"):""})]})}i(Jr,"Gn");s(Jr,"PreCaptureScreen");function Xr(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}i(Xr,"Or");s(Xr,"focusIsOurs");function en(){let[e,t]=(0,ot.useState)({state:"unknown",settled:!1});return(0,ot.useEffect)(()=>ir(n=>t({state:n,settled:!0})),[]),{permission:e.state,permissionSettled:e.settled}}i(en,"Fn");s(en,"useCameraStatus");function tn(e){return Et(e,"mobileRequired")}i(tn,"qn");s(tn,"useMobileRequired");function rn(e){return Et(e,"returning").required}i(rn,"Dn");s(rn,"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(l=>{o&&r({required:l===!0,settled:!0})},()=>{o&&r({required:!1,settled:!0})}),()=>{o=!1}},[e,t]),n}i(Et,"jn");s(Et,"useFlag");function nn(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,l=e?.captureChoice??null;if(e===void 0||typeof o!="function"){r({session:"self",choice:l,settled:!0});return}let u=!0;return r({session:"self",choice:l,settled:!1}),Promise.resolve().then(()=>o.call(e)).then(S=>{let h=e.captureChoice??null;u&&r({session:h!==null&&S===h?"choice":S==="assisted"||S==="choice"?S:"self",choice:h,settled:!0})},()=>{u&&r({session:"self",choice:null,settled:!0})}),()=>{u=!1}},[e]);let a=(0,pe.useCallback)(o=>{e?.chooseCaptureMode?.(o),r(l=>({...l,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}}i(nn,"$n");s(nn,"useCaptureMode");function sn(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}i(sn,"zn");s(sn,"useBusy");var qn=s(()=>"idle","serverSnapshot");function xt(e){return or(e!==void 0?{assetBaseUrl:e}:{})}i(xt,"Wn");s(xt,"preload");function an(e,t=!0){let n=(0,Q.useSyncExternalStore)((0,Q.useCallback)(h=>cr(h,e),[e]),()=>lr(e),qn),[r,a]=(0,Q.useState)(null),o=(0,Q.useRef)(!1),l=(0,Q.useCallback)(()=>{xt(e).then(h=>{o.current&&h==="idle"&&a({base:e})})},[e]);(0,Q.useEffect)(()=>(o.current=!0,l(),()=>{o.current=!1}),[l]);let u=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{if(n!=="idle"){u.current={base:e};return}!t||u.current===null||u.current.base!==e||(u.current=null,l())},[n,e,l,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}}i(an,"Qn");s(an,"useLivenessAssets");var Nr={progress:0,hint:null,faceDetected:!1};function on(e){let{videoRef:t,assetBaseUrl:n}=e,r=(0,M.useRef)(e.verification).current,a=(0,M.useRef)(!1);e.verification!==r&&!a.current&&At()&&(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,M.useRef)(null),[l,u]=(0,M.useState)("idle"),[S,h]=(0,M.useState)(Nr),[w,x]=(0,M.useState)(!1),[I,d]=(0,M.useState)(!1),[N,R]=(0,M.useState)(null),[p,j]=(0,M.useState)(!1),[C,A]=(0,M.useState)(null),[q,$]=(0,M.useState)(null),[f,F]=(0,M.useState)(null),[oe,le]=(0,M.useState)(null),[c,V]=(0,M.useState)(null),[T,G]=(0,M.useState)(!1),O=(0,M.useRef)(null),ve=(0,M.useRef)("idle"),he=(0,M.useRef)(-1),[K,z]=(0,M.useState)(0),te=(0,M.useRef)(e);te.current=e,(0,M.useEffect)(()=>{let J=t.current;if(J===null)return;let ce={video:J,...n!==void 0?{assetBaseUrl:n}:{}},H=r!==void 0?r.liveness(ce):ur(ce);o.current=H;let Ne=s(()=>V(H.facingMode??null),"readFacing");Ne();let $e=[H.on("state",b=>{b==="mode_switch"?G(!0):b!=="starting"&&b!=="gating"&&G(!1),b==="starting"?(ve.current!=="starting"&&(he.current+=1,z(Math.max(0,he.current))),$(null),F(null),h(Nr),d(!1),x(!1),R(null),A(null),O.current=null):b==="gating"&&ve.current==="recording"&&(d(!1),x(!1),R(null),O.current=null),ve.current=b,Ne(),u(b),te.current.onStateChange?.(b)}),H.on("gate",b=>{let ke=O.current;O.current=b.progress,x(ke!==null&&b.progress<ke-.001&&b.progress>0&&b.progress<1),b.progress>=1&&d(!0),h(b)}),H.on("frozen",({previewDataUrl:b})=>R(b)),H.on("profile",({animations:b})=>j(b==="reduced")),H.on("ramp",({colour:b})=>A(b)),H.on("captured",b=>{$(b),le(null),te.current.onCaptured?.(b)}),H.on("error",b=>{F(b);let ke=r?.reportCaptureIssue;ke!==void 0&&bt(Ee=>ke.call(r,Ee),Sr("liveness",b,Math.max(0,he.current))),te.current.onError?.(b)}),r?.on("result",b=>{le(b),te.current.onResult?.(b)})];return()=>{for(let b of $e)b?.();o.current=null,H.destroy()}},[r,t,n]);let L=(0,M.useCallback)(()=>{o.current?.start()},[]),xe=(0,M.useCallback)(()=>{o.current?.retry()},[]),ge=(0,M.useCallback)(async()=>{let J=o.current;return J===null||typeof J.canSwitchCaptureMode!="function"?!1:await J.canSwitchCaptureMode().catch(()=>!1)===!0},[]),P=(0,M.useCallback)(async J=>{let ce=o.current;if(ce===null||typeof ce.setCaptureMode!="function")return!1;let H=await ce.setCaptureMode(J).catch(()=>!1)===!0;return H&&V(ce.facingMode??null),H},[]);return{state:l,gate:S,draining:w,gateLocked:I,frozenPreview:N,reduceMotion:p,rampColour:C,artifacts:q,error:f,result:oe,facingMode:c,start:L,retry:xe,canSwitchCaptureMode:ge,setCaptureMode:P,modeRestarted:T,attempt:K}}i(on,"Xn");s(on,"useLivenessHandle");var Vn=new Set(["national_number"]);function Nt(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(n=>Vn.has(n));return t.length>0?{...e,options:t}:null}i(Nt,"er");s(Nt,"pending");function ln(e){let[t,n]=(0,me.useState)(null),[r,a]=(0,me.useState)(e===void 0),[o,l]=(0,me.useState)(!1),[u,S]=(0,me.useState)(!1);(0,me.useEffect)(()=>{if(n(null),e===void 0){a(!0);return}let x=!0,I=e.methodChoice;typeof I=="function"?(a(!1),Promise.resolve().then(()=>I.call(e)).then(N=>{x&&n(Nt(N))},()=>{}).finally(()=>{x&&a(!0)})):a(!0);let d=e.on("method",N=>n(Nt(N)));return()=>{x=!1,d()}},[e]);let h=(0,me.useCallback)(async x=>{if(e===void 0)return!1;l(!0),S(!1);try{return await e.selectMethod(x),n(null),!0}catch{return S(!0),!1}finally{l(!1)}},[e]),w=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:w==="national_number"&&!u?w:null,settled:r,busy:o,failed:u,select:h}}i(ln,"tr");s(ln,"useMethodChoice");var Hn=["ar","fr","en"];function cn(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}i(cn,"oo");s(cn,"isClipUrl");function un(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let n={};for(let r of Hn){let a=t[r];if(!(typeof a!="object"||a===null))for(let[o,l]of Object.entries(a))!nt(o)||!cn(l)||((n[r]??(n[r]={}))[o]=l)}return Object.keys(n).length>0?n:null}i(un,"so");s(un,"toVoiceClipMap");function dn(e){let[t,n]=(0,Te.useState)(null);(0,Te.useEffect)(()=>{if(n(null),e===void 0)return;let a=!0,o=s(u=>{if(!a)return;let S=typeof u=="object"&&u!==null&&typeof u.setId=="string"?u:null;n(h=>h?.setId===S?.setId?h:S)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(o,()=>o(null))}catch{o(null)}let l=e.on("view",u=>o(u.voice));return()=>{a=!1,l()}},[e]);let r=(0,Te.useMemo)(()=>t!==null?un(t):null,[t]);return e===void 0?null:r}i(dn,"nr");s(dn,"useServerVoiceClips");function pn({voice:e}){let t=Le();return(0,Mt.jsx)(X,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:i(()=>e.toggle(),"onClick"),children:(0,Mt.jsx)(rt,{off:!e.enabled,className:"sekyro-icon"})})}i(pn,"or");s(pn,"VoiceChip");var Dn=new Set(["abandoned","not_opened","cancelled","superseded"]),$n=800;function hn(e){return e===void 0||e!==!1&&e.length===Ct.length&&Ct.every(t=>e.includes(t))}i(hn,"uo");s(hn,"isDefaultTips");function fn(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}i(fn,"po");s(fn,"carriesActivation");function mn(e){return typeof e=="object"&&e!==null&&!(0,y.isValidElement)(e)&&"tone"in e&&"text"in e}i(mn,"fo");s(mn,"isNoticeObject");var Fn=new Set(["nni_unbound","id_number_unbound","method_required","mobile_required","portrait_required"]);function yn(e){return e==="starting"||e==="gating"||e==="recording"||e==="mode_switch"}i(yn,"yo");s(yn,"isCapturing");function vn(e){return e==="captured"||e==="uploading"||e==="checking"}i(vn,"go");s(vn,"isPostCapture");function Gn({verification:e,locale:t,dir:n,strings:r,slots:a,autoStart:o=!1,notice:l,startDisabled:u=!1,startLabel:S,tips:h,tipsSummary:w,coach:x,voice:I,onGuidance:d,onCaptured:N,onResult:R,onError:p,onStateChange:j,assetBaseUrl:C,className:A}){let q=yr(t),$=(0,y.useMemo)(()=>mr(t,r),[t,r,q]),f=(0,y.useMemo)(()=>g=>$[g]??"",[$]),F=n??(t==="ar"?"rtl":"ltr"),oe=(0,y.useRef)(null),le=(0,y.useContext)(Bn),c=on({verification:e,videoRef:oe,assetBaseUrl:C,onCaptured:N,onResult:R,onError:p,onStateChange:j}),V=an(C,c.state==="idle"&&c.error===null),T=ln(e),G=T.choice!==null,O=tn(e),ve=rn(e),he=sn(e),K=en(),z=nn(e),te=z.session==="choice",L=z.mode==="assisted",xe=I!==!1&&I?.clips===void 0,ge=dn(xe?e:void 0),P=Kr({locale:t,defaultClips:ge,options:I}),J=L?"environment":"user",ce=z.settled,H=(0,y.useRef)(null),Ne=(0,y.useRef)(!1),$e=(0,y.useRef)(P.unlock);$e.current=P.unlock,(0,y.useEffect)(()=>{let g=H.current;if(g===null)return;let ne=["pointerup","touchend","click","keydown"],Ce=s(()=>{for(let qe of ne)g.removeEventListener(qe,Re,!0)},"disarm");function Re(qe){if(Ne.current){Ce();return}fn(qe)&&(Ne.current=!0,Ce(),$e.current())}i(Re,"Re"),s(Re,"onGesture");for(let qe of ne)g.addEventListener(qe,Re,{capture:!0,passive:!0});return Ce},[]);let b=(0,y.useCallback)(()=>{Ne.current||(Ne.current=!0,P.unlock()),c.start()},[P.unlock,c.start]),ke=(0,y.useCallback)(()=>c.start(),[c.start]),Ee=(0,y.useRef)(!1),Pe=c.state==="idle"&&c.error===null,Ut=!G&&!O.required&&(o===!0||o==="when-permitted"&&K.permission==="granted"),jt=Ut&&T.settled&&O.settled&&ce,bn=o==="when-permitted"&&!K.permissionSettled&&!Ee.current,Tt=Ut&&Pe&&!Ee.current,ct=(bn||Tt||!ce)&&V.gate==="ready"?"loading":V.gate;(0,y.useEffect)(()=>{!jt||!Pe||V.gate!=="ready"||Ee.current||(Ee.current=!0,ke())},[jt,Pe,V.gate,ke]);let _n=Pe&&!G&&!O.required&&!(Tt&&V.gate==="ready"),[Pt,Ot]=(0,y.useState)(!1),{canSwitchCaptureMode:Bt,setCaptureMode:qt}=c;(0,y.useEffect)(()=>{if(!z.settled||!te){Ot(!1);return}let g=!0;return Bt().then(ne=>{g&&Ot(ne)}),()=>{g=!1}},[z.settled,te,Bt]);let{choose:Vt}=z,Ie=L?"self":"assisted",Cn=(0,y.useCallback)(async()=>{await qt(Ie)&&Vt(Ie)},[qt,Vt,Ie]),Ht=c.state!=="idle"&&c.facingMode!==null?c.facingMode:J;(0,y.useEffect)(()=>{let g=oe.current?.style;Ht==="user"?g?.removeProperty("transform"):g&&(g.transform="none")},[Ht]);let Fe=(0,y.useMemo)(()=>c.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(c.artifacts.keyframe):null,[c.artifacts]);(0,y.useEffect)(()=>{if(Fe!==null)return()=>URL.revokeObjectURL(Fe)},[Fe]);let Dt=c.frozenPreview??Fe,Ue=e!==void 0,Z=yn(c.state),be=vn(c.state),Ge=Z||be,re=c.result,$t=c.state==="done"&&re!==null,ut=c.state==="recording"&&c.frozenPreview!==null,Ke=le!==null,Ft=Pt&&Z&&!ut?{to:Ie,label:f(Ie==="assisted"?"capture.modeSwitch.toAssisted":"capture.modeSwitch.toSelf"),description:f(Ie==="assisted"?"capture.modeSwitch.toAssistedLabel":"capture.modeSwitch.toSelfLabel"),onSwitch:s(()=>{Cn()},"onSwitch")}:null,ze=c.modeRestarted&&Z?f("capture.modeSwitch.restarted"):null,Oe=be||ut,Gt=be?"checking":ut?"frozen":c.state==="recording"?"recording":c.gateLocked||c.gate.progress>=1?"locked":c.gate.faceDetected?"aligning":"seeking",Ze=Z?c.gate.hint:null,Qe=c.state==="starting"?"capture.preparing.title":Ze===null?null:Ze==="center"&&!c.gate.faceDetected?"fcv3.no_face":dr(Ze),[wn,Kt]=(0,y.useState)(null);(0,y.useEffect)(()=>{if(Qe!=="fcv3.no_face"){Kt(Qe);return}if(!Z)return;let g=setTimeout(()=>Kt(Qe),$n);return()=>clearTimeout(g)},[Qe,Z]);let dt=Z&&typeof x=="string"&&x!=="",zt=L&&Z?f("capture.assisted.stage"):null,Me=Z&&!dt?wn:null,pt=dt?x:Me===null?"":f(Me);zr(P,Me,pt,Z);let Zt=(0,y.useRef)(d);Zt.current=d,(0,y.useEffect)(()=>{if(nt(Me))try{Zt.current?.(Me)}catch(g){console.error("[@sekyro/react] onGuidance threw:",g)}},[Me]);let Be=(0,y.useMemo)(()=>({supported:P.supported,enabled:P.enabled,setEnabled:P.setEnabled,toggle:P.toggle}),[P.supported,P.enabled,P.setEnabled,P.toggle]),ht=a?.voicePrompt,Qt=ht!==void 0,Wt=I===void 0,Yt=(0,y.useRef)(!1);(0,y.useEffect)(()=>{!Qt||!Wt||Yt.current||!At()||(Yt.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."))},[Qt,Wt]);let Sn=ht!==void 0?(g,ne,Ce)=>ht(g,ne,Ce,Be):P.supported?()=>(0,k.jsx)(pn,{voice:Be}):void 0,{summary:ft,summaryPlaying:Jt,toggleSummary:Xt,stopSummary:er}=P,We=w!==void 0&&w!=="",tr=We?w:f("capture.tips.summary"),rr=We?ft!=="none":ft==="partner"||ft==="default"&&hn(h),xn=(0,y.useMemo)(()=>rr?{playing:Jt,toggle:s(()=>Xt(tr,{clip:!We}),"toggle"),stop:er}:void 0,[rr,Jt,Xt,tr,er,We]),Nn=(0,y.useMemo)(()=>({assets:ct,retryAssets:V.retry,permission:K.permission,permissionSettled:K.permissionSettled,captureMode:z.mode,facing:J,voice:Be}),[ct,V.retry,K.permission,K.permissionSettled,z.mode,J,Be]),Mn=mn(l)?(0,k.jsx)(se,{tone:l.tone,testId:"sekyro-host-notice",children:(0,k.jsx)("span",{children:l.text})}):l??null,ue=re!==null&&re.status==="retry"?re:null,W=$t&&re.status==="unavailable"&&!G&&re.reasonCode!=="portrait_required"?re:null,_e=$t&&(re.status==="verified"||re.status==="not_verified"||re.status==="review")?re:null,mt=s((g,ne)=>{if(g===void 0)return null;if(g==="device_cooldown"){let Re=hr(t,ne);if(Re!==null)return f(Re.key).replace("{time}",Re.time)}let Ce=Xe(g);return Ce===null?null:f(Ce)},"reasonText"),yt=s(g=>{let ne=g.retakeHint===void 0?null:Je(g.retakeHint);return ne===null?mt(g.reasonCode):f(ne)},"retryText"),nr=_e===null?null:mt(_e.reasonCode,_e.retryAfter)??(_e.status==="not_verified"&&_e.reason!==void 0&&Dn.has(_e.reason)?f("errors.session_expired"):null),Rn=W!==null&&W.reasonCode!==void 0&&W.reasonCode!=="nni_unbound"&&W.reasonCode!=="id_number_unbound"&&W.reasonCode!=="method_required"&&W.reasonCode!=="mobile_required"&&!(W.reasonCode==="no_recorder"&&c.artifacts?.degraded==="NO_RECORDER"),Ye=W?.reasonCode,sr=c.attempt;(0,y.useEffect)(()=>{W===null||Ye===void 0||e?.reportCaptureIssue===void 0||Fn.has(Ye)||bt(g=>e.reportCaptureIssue?.(g),{check:"liveness",kind:"unavailable",phase:"upload",engineKind:Ye,attempt:Math.min(1e3,sr)})},[W,Ye,sr,e]);let ar=kt(),Ln=G&&T.auto===null&&!Z&&!be&&c.error===null,vt=(0,y.useCallback)(async g=>{await T.select(g)&&c.state==="done"&&c.retry()},[T.select,c.state,c.retry]);return(0,y.useEffect)(()=>{T.auto!==null&&!T.busy&&!Z&&!be&&vt(T.auto)},[T.auto,T.busy,Z,be,vt]),(0,k.jsx)(vr,{value:f,children:(0,k.jsxs)("div",{ref:H,className:A===void 0?"sekyro-capture":`sekyro-capture ${A}`,dir:F,lang:t,"data-testid":"sekyro-liveness-capture","data-state":c.state,children:[a?.header,ue!==null&&yt(ue)!==null&&!(Ke&&Ge)?(0,k.jsx)(se,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:(0,k.jsx)("span",{children:yt(ue)})}):null,ze!==null&&!Ke?(0,k.jsx)(se,{tone:"info",role:"status",testId:"sekyro-mode-switch-status",children:(0,k.jsx)("span",{children:ze})}):null,he&&be&&!Ke?(0,k.jsx)(se,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:(0,k.jsx)("span",{children:f("capture.busy")})}):null,O.required&&Pe?(0,k.jsx)(se,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:(0,k.jsx)("span",{children:f("reasons.mobile_required")})}):null,c.error!==null?a?.errorPanel!==void 0?a.errorPanel(c.error,c.retry):(0,k.jsxs)(se,{tone:"danger",testId:"sekyro-error-notice",children:[(0,k.jsx)("span",{children:f(pr(c.error))}),c.error.retryable?(0,k.jsx)(X,{ref:ar,kind:"ghost",className:"sekyro-btn--start",onClick:c.retry,children:f("common.retry")}):null]}):null,W!==null?(0,k.jsxs)(se,{tone:"danger",testId:"sekyro-unavailable-notice",children:[(0,k.jsx)("span",{children:mt(W.reasonCode)??f(W.reasonCode===void 0?"errors.session_expired":"errors.network_error")}),Rn?(0,k.jsx)(X,{ref:ar,kind:"ghost",className:"sekyro-btn--start",onClick:c.retry,children:f("capture.recordAgain")}):null]}):null,nr!==null&&_e!==null?(0,k.jsx)(se,{tone:_e.status==="not_verified"?"danger":"info",testId:"sekyro-result-notice",children:(0,k.jsx)("span",{children:nr})}):null,(0,k.jsx)("div",{className:Ge?void 0:"sekyro-hidden","data-capture-live":Ge?"":void 0,children:Ke?le({videoRef:oe,guidance:Oe&&Ue?f("capture.checking"):pt,coached:dt&&!(Oe&&Ue),note:Oe?Ue?f(he?"capture.busy":"capture.checkingHint"):null:ze??(ue!==null?yt(ue):zt),settled:Oe&&Ue,progress:c.gate.progress,phase:Gt,still:Oe?Dt:null,live:Ge,modeSwitch:Ft,...Pt?{status:ze}:{},ramp:c.rampColour===null?null:{colour:c.rampColour}}):(0,k.jsx)(gr,{videoRef:oe,guidanceText:pt,guidanceHint:Ze,guidanceKey:Me,progress:c.gate.progress,phase:Gt,draining:c.draining,stillUrl:Dt,showChecking:Ue,operatorText:zt,voicePrompt:Sn,overlay:i(g=>(0,k.jsxs)(k.Fragment,{children:[a?.stageOverlay?.(g),(0,k.jsx)(kr,{colour:c.rampColour})]}),"overlay"),reduceMotion:c.reduceMotion,modeSwitch:Ft})}),Ln&&T.choice!==null?(0,k.jsx)(Br,{title:f("method.title"),description:f("method.description"),options:T.choice.options.map(g=>({id:g,label:f(`method.${g}`)})),busy:T.busy,error:T.failed?f("errors.network_error"):null,focus:c.state==="done",testId:"sekyro-method",look:"buttons",onChoose:i(g=>{vt(g)},"onChoose")}):null,_n?(0,k.jsxs)(k.Fragment,{children:[ve&&a?.header===void 0&&a?.intro===void 0?(0,k.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,k.jsx)("h2",{className:"sekyro-text-body",children:f("returning.title")}),(0,k.jsx)("p",{className:"sekyro-text-muted",children:f("returning.description")})]}):null,Mn,a?.intro!==void 0?a.intro(b,Nn):(0,k.jsx)(Jr,{assets:ct,onRetryAssets:V.retry,permission:K.permission,captureMode:z.mode,voice:Be,tips:h??Ct,summary:xn,startLabel:S,startDisabled:u,onStart:b})]}):null,(0,k.jsx)(Zr,{showCoaching:ue!==null,coaching:at(ue?.reasonCode),attemptsText:ue?.attemptsRemaining!==void 0?fr($,t,ue.attemptsRemaining):null,showRetake:ue!==null&&!Z&&!be||!Ue&&c.state==="captured",onRetake:c.retry}),a?.footer]})})}i(Gn,"_i");s(Gn,"LivenessCapture");var It=E(D(),1),lt=E(D(),1),m=E(de(),1);var ks={document:"card",population_registry:"id",national_eid:"smartphone",phone_otp:"phone",email_otp:"email"};function Kn(e,t){switch(e.service){case"document":return t.t("method.document_photo");case"population_registry":return t.t("method.national_number");case"national_eid":{let n=e.nationalEid?.providerName;return n?t.t("method.national_eid",{provider:n}):t.t("method.national_eidGeneric")}default:return null}}i(Kn,"Y");s(Kn,"identityLabel");function zn(e,t){let[n,r]=(0,It.useState)(!1),[a,o]=(0,It.useState)(null);return{busy:n,error:a,run:s(l=>{r(!0),o(null),l().then(()=>r(!1),u=>{r(!1),o(e.t(xr(u,e.strings))),t?.(u)})},"run")}}i(zn,"q");s(zn,"useChoiceAction");function gn(){let e=`sekyro-face-light-${(0,lt.useId)().replace(/[^A-Za-z0-9_-]/g,"")}`;return(0,m.jsxs)("svg",{className:"sekyro-mark sekyro-mark--face",viewBox:"0 0 168 206","aria-hidden":"true",focusable:"false",children:[(0,m.jsx)("defs",{children:(0,m.jsx)("mask",{id:e,children:(0,m.jsx)("ellipse",{className:"sekyro-mark__arc",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"1",fill:"none",stroke:"#fff",strokeWidth:"16"})})}),(0,m.jsx)("ellipse",{cx:"84",cy:"103",rx:"64",ry:"83",fill:"none",className:"sekyro-mark__line"}),(0,m.jsx)("path",{className:"sekyro-mark__face",d:"M68 64v10M100 64v10M84 66v25q0 2-6 1M60 108q24 18 48 0"}),(0,m.jsx)("ellipse",{className:"sekyro-mark__ticks",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56"}),(0,m.jsx)("ellipse",{className:"sekyro-mark__ticks sekyro-mark__ticks--light",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56",mask:`url(#${e})`})]})}i(gn,"O");s(gn,"FaceMark");var Zn={glasses:"jGlasses",lighting:"light",faceCamera:"camera"};function Qn(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}}i(Qn,"te");s(Qn,"faceIntroRetryOf");var Wn={"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 Yn({start:e,context:t,tips:n,tipsTitle:r,human:a=!1,returning:o=!1,notice:l,retry:u}){let S=_t(),{t:h}=S,w=u===void 0?"face":at(u.reason),x=w==="face"?null:De[w].tips,I=(0,lt.useContext)(_r)?.busy===!0;return(0,m.jsxs)("section",{className:"sekyro-step",children:[(0,m.jsx)(gn,{}),t.captureMode==="assisted"?(0,m.jsx)(et,{title:h("capture.assisted.heading"),lead:h("capture.assisted.lead")}):o?(0,m.jsx)(et,{title:h("returning.heading"),lead:h("returning.description")}):(0,m.jsx)(et,{title:h(a?"native.face.humanIntroTitle":"native.face.introTitle"),lead:h(a?"native.face.humanIntroLead":"native.face.introLead")}),u!==void 0?(0,m.jsx)(kn,{retry:u,title:De[w].title}):null,r!==void 0&&x===null?(0,m.jsx)("p",{className:"sekyro-section-label",children:r}):null,(0,m.jsx)("ul",{className:"sekyro-tiprows",children:x!==null?x.map(d=>(0,m.jsxs)("li",{children:[(0,m.jsx)(Ae,{name:Wn[d]??"face"}),h(d)]},d)):n!==void 0?n.map(d=>(0,m.jsxs)("li",{children:[(0,m.jsx)(Ae,{name:Zn[d.id]??"face"}),d.text]},d.id)):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("li",{children:[(0,m.jsx)(Ae,{name:"light"}),h("capture.tips.light")]}),(0,m.jsxs)("li",{children:[(0,m.jsx)(Ae,{name:"jGlasses"}),h("capture.tips.uncover")]}),(0,m.jsxs)("li",{children:[(0,m.jsx)(Ae,{name:"smartphone"}),h("capture.tips.eyeLevel")]})]})}),l??null,l!==void 0?null:t.assets==="failed"?(0,m.jsx)(X,{kind:"secondary",full:!0,onClick:t.retryAssets,children:h("common.retry")}):null,l!==void 0?null:(0,m.jsx)(br,{children:(0,m.jsxs)(X,{full:!0,disabled:t.assets!=="ready"||I,"aria-busy":t.assets==="loading"||void 0,onClick:e,children:[(0,m.jsx)(Ae,{name:"camera"}),h("capture.start")]})})]})}i(Yn,"ne");s(Yn,"FaceIntro");var Jn=new Set(["match_inconclusive","no_face_source","below_threshold"]);function kn({retry:e,title:t}){let n=_t(),r=e.retakeHint===void 0?null:Je(e.retakeHint),a=e.reason==="probe_not_from_liveness"?"capture.retrySamePerson.message":Jn.has(e.reason)?"capture.retryMatch.message":Xe(e.reason);return(0,m.jsxs)(Cr,{tone:"warning",children:[r!==null?(0,m.jsx)("span",{children:n.t(r)}):a!==null?(0,m.jsx)("span",{children:n.t(a)}):null,r===null?(0,m.jsx)("span",{children:n.t(t)}):null,(0,m.jsx)("span",{children:wr(n,e.attemptsRemaining,e.attemptsExhausted)})]})}i(kn,"T");s(kn,"RetryNotice");function Xn(e){return gt(e)}i(Xn,"se");s(Xn,"isInAppBrowser");function es(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`}i(es,"ce");s(es,"androidBrowserIntent");export{Br as a,At as b,Bn as c,nn as d,Gn as e,ks as f,Kn as g,zn as h,Qn as i,Yn as j,Xn as k,es as l};