@sekyro/react 0.1.0-rc.25 → 0.1.0-rc.27
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.
- package/CHANGELOG.md +39 -0
- package/dist/chunk-2UDX3MRT.js +2 -0
- package/dist/chunk-3MCTR3RI.js +2 -0
- package/dist/chunk-5V26KZGZ.js +2 -0
- package/dist/{chunk-H52ULGOP.js → chunk-A7UG6YDG.js} +1 -1
- package/dist/{chunk-X3RL4N3W.js → chunk-CBQYUAKA.js} +1 -1
- package/dist/{chunk-RTYAGWRR.js → chunk-DTXKBOS4.js} +1 -1
- package/dist/chunk-FE6AS435.js +2 -0
- package/dist/{chunk-BDXOOTQL.js → chunk-HO5RMTZU.js} +1 -1
- package/dist/{chunk-J2W5XO7Q.js → chunk-KGUF5KAK.js} +1 -1
- package/dist/chunk-U5GKKEZQ.js +2 -0
- package/dist/{chunk-UNYAD2GI.js → chunk-VN4C5C2R.js} +1 -1
- package/dist/{chunk-YE6VVNPZ.js → chunk-VOIZLJLI.js} +1 -1
- package/dist/{chunk-MJ6TE26G.js → chunk-WVYPT45I.js} +1 -1
- package/dist/chunk-ZARKJW2C.js +2 -0
- package/dist/{chunk-6ZRCWVYJ.js → chunk-ZTCQFWDM.js} +1 -1
- package/dist/document-capture-view-5FWUD45F.js +2 -0
- package/dist/{eid-view-7CTFIZ5R.js → eid-view-U2HL2IX7.js} +1 -1
- package/dist/{email-otp-view-MB334KKV.js → email-otp-view-CMJHROOH.js} +1 -1
- package/dist/flow-views-O3KBN7YF.js +2 -0
- package/dist/form-view-WVPN7ZUY.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/overlay-de-PVJMYZGV.js +2 -0
- package/dist/overlay-es-PZCE25XM.js +2 -0
- package/dist/overlay-pt-PZ3L6DR7.js +2 -0
- package/dist/{portrait-capture-view-DSUGE7PI.js → portrait-capture-view-UYISOXXV.js} +1 -1
- package/dist/portrait-review-view-67VI2Q6K.js +2 -0
- package/dist/proof-of-address-view-EIQXYYM3.js +2 -0
- package/dist/{theme-quu7XV_Y.d.ts → theme-CMvkgsqM.d.cts} +2 -0
- package/dist/{theme-quu7XV_Y.d.cts → theme-CMvkgsqM.d.ts} +2 -0
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +89 -5
- package/dist/verification/index.d.ts +89 -5
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +80 -10
- package/package.json +3 -3
- package/sbom.cdx.json +5 -5
- package/dist/chunk-ND4YIVDH.js +0 -2
- package/dist/chunk-Q32AQDEB.js +0 -2
- package/dist/chunk-TXFU3GMZ.js +0 -2
- package/dist/chunk-XCX4NPBX.js +0 -2
- package/dist/document-capture-view-ZKT3W6UE.js +0 -2
- package/dist/flow-views-SRAXHC6K.js +0 -2
- package/dist/overlay-de-ILMZBGZH.js +0 -2
- package/dist/overlay-es-YLDY73HJ.js +0 -2
- package/dist/overlay-pt-GZXT2S6D.js +0 -2
- package/dist/portrait-review-view-PPYEEMYM.js +0 -2
- package/dist/proof-of-address-view-2M6UDK76.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as Bn}from"../chunk-RTYAGWRR.js";import{a as pe,b as V,c as An}from"../chunk-H52ULGOP.js";import{a as W,d as kn,e as vt,f as tt,g as Sn,h as bn}from"../chunk-TXFU3GMZ.js";import{a as vn,b as Cn,c as Tn}from"../chunk-GUTF3SPK.js";import{a as In,b as Rn,c as Ln,d as On,e as Mn,f as Nt}from"../chunk-UNYAD2GI.js";import{a as it}from"../chunk-MJ6TE26G.js";import{d as bt,f as yn,g as gn,j as hn}from"../chunk-XCX4NPBX.js";import{b as fn}from"../chunk-J2W5XO7Q.js";import{a as mn}from"../chunk-7MMT5M4E.js";import{a as be}from"../chunk-VRDPGOXM.js";import{a as Lo,b as Oo,c as Mo,d as Ao,e as Bo,f as Ye,g as x}from"../chunk-ND4YIVDH.js";import{a as $,b as ee,c as Nn,d as te,e as wn,f as nt,g as ot,h as Ct,i as Pn,k as rt,l as _n,m as xn,o as En,p as O,q as st}from"../chunk-BDXOOTQL.js";import"../chunk-YE6VVNPZ.js";import{a as C,c as St,j as Io,l as Ro,n as un,o as dn,p as pn,r as ze,s as xe}from"../chunk-Q32AQDEB.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as Do,useState as Dn}from"react";function wt(e){let[t,n]=Dn(()=>e?.currentStep?.()??null),[o,a]=Dn(null);return Do(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let i=!0,r=e.on("step",l=>{i&&n(l)});return e.run().then(l=>{i&&n(u=>u??l)},l=>{i&&a(l)}),()=>{i=!1,r()}},[e]),{step:t,error:o}}s(wt,"useVerificationStep");import{useEffect as xt,useId as Ho,useMemo as Uo,useRef as Et,useState as ne}from"react";var Vo="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",Vn;function Fn(e){return Vn??(Vn=new Map(Vo.split(" ").map(t=>{let[n,o]=t.slice(2).split("/");return[t.slice(0,2),[n,o]]}))),Vn.get(e.toUpperCase())}s(Fn,"entryOf");function Hn(e){return Fn(e)?.[0]}s(Hn,"dialCodeOf");function Un(e){return Fn(e)?.[1]}s(Un,"nationalPrefixOf");import{normalizeNni as Fo}from"@sekyro/web";function at(e){let t=Fo(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(at,"digitsOf");var Pt=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function lt(e,t){let n="",o=0;for(let a of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])o<e.length&&(n+=(o>0?" ":"")+e.slice(o,o+a)),o+=a;return n+e.slice(o)}s(lt,"groupDigits");function $n(e,t){let n=0;for(let o=t;o>0&&n<e.length;n+=1)e[n]!==" "&&(o-=1);return n}s($n,"caretAfter");var _t=s((e,t)=>t.find(n=>e.startsWith(n.dial)),"countryOfNumber"),Kn=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as qn,jsx as S,jsxs as K}from"react/jsx-runtime";var Gn=s((e,t,n)=>{if(e===void 0)return 0;let o=Date.parse(e)-t;return Number.isFinite(o)?Math.min(n,Math.max(0,Math.ceil(o/1e3))):0},"secondsUntil"),$o=600,Ko=30,Go=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Wo=["whatsapp","sms"],Wn=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_resend_limit","otp_number_invalid","otp_number_not_mobile"]);function zn(e){let t=at(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(zn,"normalizedPhone");var zo=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function Yo(e){let t=[];for(let n of e.phoneCountries??["MR"]){let o=e.phoneRules?.find(i=>i.code===n),a=o?.dial??Hn(n);a!==void 0&&!t.some(i=>i.code===n)&&t.push({code:n,dial:`+${a}`,...o!==void 0?{rule:o}:{}})}return t}s(Yo,"phoneCountriesOf");function Zo(e,t){if(t===null||!e.startsWith(t.dial))return zn(e);let n=e.slice(t.dial.length).replace(/\D/g,""),o=Un(t.code);return o!==void 0&&n.startsWith(o)&&(n=n.slice(o.length)),zn(t.dial+n)}s(Zo,"e164Of");var Yn=s((e,t)=>(_t(e,t)??t[0])?.code??null,"countryFor");function qo(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return n=>`${t?.of(n.code)??n.code} (${n.dial})`}s(qo,"countryLabels");var Zn="other";function Tt({step:e,locale:t,strings:n,className:o,defaultPhone:a,onError:i}){let r=x(t,n),{t:l}=r,u=Uo(()=>Yo(e),[e.phoneCountries,e.phoneRules]),p=a??u[0]?.dial??"",[m,g]=ne(()=>Yn(p,u)),b=u.map(y=>y.code).join(",");xt(()=>{if(m===null||!u.some(y=>y.code===m)){let y=Yn(p,u);g(y);let P=h.current,q=u.find(X=>X.code===y)?.dial;q!==void 0&&T(X=>P!==null&&X.startsWith(P.dial)?q+X.slice(P.dial.length):X.startsWith("+")?X:q)}},[b,p]);let d=u.find(y=>y.code===m)??null,h=Et(d);d!==null&&(h.current=d);let[v,T]=ne(p),[I,E]=ne(!1),[R,D]=ne(!1),[_,N]=ne(""),[k,A]=ne(!1),[G,Ne]=ne(null),[Me,Ae]=ne(null),[we,Y]=ne(!1),[me,Be]=ne(null),le=Et(null),ye=e.phase==="verify"&&!we,De=e.phase==="verify",Ve=Tn(De),[Xe,yt]=vn(e.reason==="otp_mismatch",e.attemptsRemaining,()=>N("")),re=Ho(),Fe=Et(null);xt(()=>{let y=setTimeout(()=>Fe.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(y)},[ye]);let ge=e.phase==="verify"?e.codeExpiresAt??"sent":null;xt(()=>{ge!==null&&(Y(!1),le.current!==null&&!Wn.has(e.reason??"")&&Be(le.current),le.current=null)},[ge]);let He=s(async y=>{A(!0),Ae(null);try{await y()}catch(P){Ae(be(P,r.strings)),i?.(P)}finally{A(!1),Ne(null)}},"run"),Z=Wo.filter(y=>(e.channels??[]).includes(y)),se=e.phoneInternational===!0,ce=I||d===null,B=ce||v.startsWith("+")&&!v.startsWith(d.dial),Q=B?void 0:d.rule,je=B?v:v.replace(d.dial,"").replace(/\D/g,""),w=Q?Pt(je,Q):je,he=B&&!ce&&!se&&e.phoneRules?.length&&!u.some(y=>y.dial.startsWith(v)),ke=he?null:Q?Q.lengths.includes(w.length)?d.dial+w:null:ce&&!v.startsWith("+")?null:Zo(v,I?null:d),ue=!e.needsPhone||ke!==null,Se=s((y,P=!1)=>{let q=e.needsPhone?P?me:{number:ke??v,shown:B||d===null?ke??v:`${d.dial} ${lt(w,Q)}`}:null;le.current=q,Ne(y??null),He(async()=>{try{await e.send({...q!==null?{phone:q.number}:{},...y!==void 0?{channel:y}:{}})}catch(X){throw le.current=null,X}})},"send"),Pe=s(y=>{He(()=>e.verify(y))},"submitCode"),f=s(y=>{y.preventDefault(),ye?Pe(_):Z.length<=1&&ue&&Se(Z[0])},"onSubmit"),L=s(y=>{let P=y.target,q=y.nativeEvent.inputType,X=Math.max(0,P.value.lastIndexOf("+")),_e=at(P.value.slice(X)),Ke=_t(_e,u),Ge=at(P.value.slice(X,P.selectionStart)).length,ht=_e,an=_e;if(D(!1),!Ke&&(ce||_e.startsWith("+")))se&&E(!0);else{let We=Ke??d,ie=Ke?_e.slice(Ke.dial.length):_e;if(g(We.code),E(!1),ie===w&&q?.startsWith("delete")&&(q.endsWith("Forward")||(Ge-=1),ie=ie.slice(0,Ge)+ie.slice(Ge+1)),We.rule){let kt=Pt(ie,We.rule),cn=ie.length-kt.length;Ge-=cn,ie=cn>0&&!Ke&&w.length===kt.length?w:kt}an=We.dial+ie,ht=lt(ie,We.rule)}T(an),P.value=ht;let ln=$n(ht,Ge);P.setSelectionRange(ln,ln)},"onNumber"),z=he?l("otp.reason_otp_destination_not_allowed"):R&&Q?l("otp.phoneLengthError",{digits:Kn(Q,l("otp.or"))}):"",Xt=u.length>1||se,de=`${re}-phone`,gt=Gn(e.codeExpiresAt,Ve,$o),Ue=Gn(e.resendAvailableAt,Ve,Ko),et=ye&&e.codeExpiresAt!==void 0&>===0,jt=e.needsPhone&&!e.attemptsExhausted,en=De&&(e.codeExpiresAt===void 0||gt>0),tn=ye&&jt?()=>Y(!0):we&&en?()=>Y(!1):null;nt(tn===null?null:k?()=>{}:tn);let $e=s(y=>l(y==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),nn=s(y=>k&&G!==null&&G===y,"busyFor"),[xo,Eo]=l("otp.sentTo",{channel:$e(e.channel)}).split("{number}"),on=e.context.simulation?.otpCode,To=e.reason==="otp_mismatch"?K(O,{tone:"danger",children:[S("span",{children:l("otp.reason_otp_mismatch")}),S("span",{children:st(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Wn.has(e.reason)?S(O,{tone:"warning",children:S("span",{children:l(`otp.reason_${e.reason}`)})}):e.reason==="tester_phone_mismatch"?S(O,{tone:"warning",children:S("span",{children:l("reasons.tester_phone_mismatch")})}):null,rn=K(qn,{children:[To,Me!==null?S(O,{tone:"danger",children:S("span",{children:l(Me)})}):null]});if(ye){let y=Z.length===0;return K("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":re,onSubmit:f,noValidate:!0,children:[S(ee,{id:re,title:l("otp.verifyTitle"),lead:on!==void 0?S(xn,{template:l("sandbox.otpHint"),code:on}):K(qn,{children:[xo,S("bdi",{dir:"ltr",className:"sekyro-mono",children:me?.shown??e.sentToMasked}),Eo]})}),rn,K("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:`${re}-code`,children:l("otp.codeLabel")}),S(Cn,{id:`${re}-code`,value:_,invalid:Xe,onChange:P=>{P!==""&&yt(),N(P),P.length===6&&_.length!==6&&!k&&!e.attemptsExhausted&&Pe(P)}}),S("span",{className:`sekyro-help sekyro-otp-expiry${et?" is-danger":""}`,"aria-hidden":!et||void 0,children:et?l("otp.expired"):l("otp.expiresIn",{time:Go(gt)})})]}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:et?l("otp.expired"):""}),K(te,{children:[S(C,{type:"submit",full:!0,disabled:k||_.length!==6||e.attemptsExhausted,"aria-busy":k||void 0,children:l("otp.verify")}),K("div",{className:"sekyro-resend-row",children:[y?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k||Ue>0,onClick:()=>Se(void 0,!0),children:Ue>0?l("otp.resendIn",{seconds:Ue}):l("otp.resend")}):Ue>0?S("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Ue})}):Z.map(P=>S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Se(P,!0),children:l("otp.resendBy",{channel:$e(P)})},P)),jt?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Y(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}let sn=qo(r.locale);return K("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":re,onSubmit:f,noValidate:!0,children:[S(ee,{id:re,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),rn,e.needsPhone?K("div",{className:"sekyro-field",children:[S("label",{className:"sekyro-label",htmlFor:de,children:l("otp.phoneLabel")}),K("div",{className:"sekyro-phone",dir:"ltr",children:[d===null||B&&!I?null:K("div",{className:"sekyro-phone__lead",children:[Xt?K("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${l("otp.countryLabel")}: ${I?l("otp.otherCountry"):sn(d)}`,value:I?Zn:d.code,onChange:y=>{D(!1);let P=u.find(q=>q.code===y.target.value);E(P===void 0),P!==void 0&&g(P.code),T(P===void 0?"":P.dial+(B?"":w))},children:[u.map(y=>S("option",{value:y.code,children:sn(y)},y.code)),se?S("option",{value:Zn,children:l("otp.otherCountry")}):null]}):null,K("span",{className:"sekyro-phone__dial",id:`${de}-dial`,"aria-hidden":Xt||void 0,children:[S("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:I?"🌐":zo(d.code)}),I?null:d.dial]})]}),S("input",{ref:Fe,id:de,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${B?"":`${de}-dial ${de}-hint `}${z?`${de}-error`:""}`.trim()||void 0,"aria-invalid":!!z||void 0,placeholder:ce?"+":void 0,value:B?v:lt(w,Q),onChange:L,onKeyDown:y=>{y.key==="Enter"&&!ue&&D(!0)},onBlur:y=>{y.relatedTarget?.tagName!=="SELECT"&&D(w!==""&&ke===null)}})]}),B?null:S("span",{className:"sekyro-help",id:`${de}-hint`,children:l("otp.phonePlaceholderGeneric")}),z?S("span",{className:"sekyro-help is-danger",id:`${de}-error`,role:"alert",children:z}):null]}):S("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),K(te,{children:[Z.length===1?S(C,{type:"submit",full:!0,disabled:k||!ue,"aria-busy":nn(Z[0])||void 0,children:l("otp.sendBy",{channel:$e(Z[0])})}):Z.length>1?K("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[S("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),S("div",{className:"sekyro-channel-row",children:Z.map(y=>K(C,{kind:"primary",disabled:k||!ue,"aria-busy":nn(y)||void 0,onClick:()=>Se(y),children:[S($,{name:y}),$e(y)]},y))})]}):S(C,{type:"submit",full:!0,disabled:k||!ue,"aria-busy":k||void 0,children:l("otp.send")}),S("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:k&&G!==null?l("otp.sending",{channel:$e(G)}):""}),we&&en?S("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:k,onClick:()=>Y(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}s(Tt,"PhoneOtpStep");import{lazy as Jo,Suspense as Qo,useMemo as Xo,useState as jo}from"react";import{jsx as Ee,jsxs as tr}from"react/jsx-runtime";var er={load:s(()=>import("../email-otp-view-MB334KKV.js"),"load")};function It({locale:e,strings:t,...n}){let o=x(e,t),[a,i]=jo(0),r=Xo(()=>Jo(()=>er.load().then(u=>({default:u.EmailOtpView}))),[a]),l=tr(O,{tone:"danger",children:[Ee("span",{children:o.t("errors.network_error")}),Ee(C,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return Ee(pe,{fallback:l,children:Ee(Qo,{fallback:Ee("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:Ee(r,{...n,i18n:o})})},a)}s(It,"EmailOtpStep");import{lazy as nr,Suspense as or,useMemo as rr,useState as sr}from"react";import{jsx as Te,jsxs as ar}from"react/jsx-runtime";var ir={load:s(()=>import("../eid-view-7CTFIZ5R.js"),"load")};function Rt({locale:e,strings:t,...n}){let o=x(e,t),[a,i]=sr(0),r=rr(()=>nr(()=>ir.load().then(u=>({default:u.EidView}))),[a]),l=ar(O,{tone:"danger",children:[Te("span",{children:o.t("errors.network_error")}),Te(C,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return Te(pe,{fallback:l,children:Te(or,{fallback:Te("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:Te(r,{...n,i18n:o})})},a)}s(Rt,"EidStep");import{useMemo as lr}from"react";import{jsx as Lt,jsxs as cr}from"react/jsx-runtime";function Ot({step:e,locale:t,strings:n,className:o,onError:a}){let i=x(t,n),{busy:r,error:l,run:u}=Ln(i,a),p=lr(()=>e.choice.options.flatMap(g=>{let b=Rn(g,i),d=In[g.service];return b===null?[]:[{id:g.id,label:b,glyph:d&&Lt($,{name:d})}]}),[e.choice.options,i]),m=e.choice.options.find(g=>g.service==="national_eid");return cr("div",{className:o,children:[Lt(yn,{title:i.t("method.heading"),description:i.t("method.description"),options:p,busy:r,error:l,focus:!0,testId:"sekyro-method",onChoose:g=>u(()=>e.choose(g))}),m?.nationalEid?.afterPass==="continue"?Lt(V,{view:"EidContinueHint",i18n:i,provider:m.nationalEid.providerName,quiet:!0}):null]})}s(Ot,"MethodChoice");import{isValidNni as ur,normalizeNni as Jn}from"@sekyro/web";import{useId as dr,useState as Mt}from"react";import{Fragment as yr,jsx as H,jsxs as Ie}from"react/jsx-runtime";var pr=new Set(["nni_not_found","registry_record_not_found"]),fr=new Set(["nni_invalid","id_number_invalid"]);function ct({step:e,locale:t,strings:n,className:o,onError:a}){let i=x(t,n),{t:r}=i,[l,u]=Mt(""),[p,m]=Mt(!1),[g,b]=Mt(null),d=dr(),h=e.attemptsExhausted,v=s(async A=>{m(!0),b(null);try{await A()}catch(G){b(be(G,i.strings)),a?.(G)}finally{m(!1)}},"run"),T=s(A=>{if(A.preventDefault(),e.source!=="typed"){v(()=>e.confirm());return}let G=Jn(l);if(!/^\d{10}$/.test(G))return b("population.invalid");if(!ur(G))return b("population.reason_id_number_invalid");v(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(G):e.submitNni(G))},"onSubmit"),I=st(i,e.attemptsRemaining,h),E=e.reason!==void 0&&pr.has(e.reason),R=e.reason!==void 0&&fr.has(e.reason),D=Ie(yr,{children:[e.reason==="registry_unavailable"?Ie(O,{tone:"warning",children:[H("span",{children:r("population.reason_registry_unavailable")}),H("span",{children:I})]}):null,E&&e.canUseDocument?Ie(O,{tone:"warning",children:[H("span",{children:r("population.reason_registry_record_not_found_or_document")}),H("span",{children:I}),H(C,{kind:"secondary",disabled:p,onClick:()=>{v(()=>e.useDocument())},children:r("population.useDocument")})]}):null,E&&!e.canUseDocument||R?Ie(O,{tone:"danger",children:[H("span",{children:r(E?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),H("span",{children:I})]}):null,h&&e.reason===void 0?H(O,{tone:"danger",children:H("span",{children:I})}):null,g!==null?H(O,{tone:"danger",children:H("span",{children:r(g)})}):null]}),[_,N,k]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return Ie("form",{className:`sekyro-step${o?` ${o}`:""}`,"aria-labelledby":d,onSubmit:T,noValidate:!0,children:[H(ee,{id:d,title:r(_),lead:r(N)}),D,e.source==="typed"?Ie("div",{className:"sekyro-field",children:[H("label",{className:"sekyro-label",htmlFor:`${d}-id-number`,children:r("population.label")}),H("input",{id:`${d}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:l,"aria-describedby":`${d}-id-number-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_id_number_invalid"||void 0,onChange:A=>{b(null),u(Jn(A.target.value).replace(/\D/g,"").slice(0,10))}}),H("span",{id:`${d}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,H(te,{children:h?null:H(C,{type:"submit",full:!0,disabled:p,"aria-busy":p||void 0,children:r(k)})})]})}s(ct,"IdNumberEntry");function mr(e){return ct(e)}s(mr,"NniEntry");import{acceptedIssuers as vr,acceptedTypesFor as to,warmDocumentCapture as Cr}from"@sekyro/web";import{lazy as Nr,Suspense as wr,useEffect as Pr,useMemo as _r,useState as Dt}from"react";import{acceptedIssuers as gr,acceptedTypesFor as At}from"@sekyro/web";import{useEffect as Qn,useId as hr,useMemo as Xn,useState as Bt}from"react";import{jsx as U,jsxs as Re}from"react/jsx-runtime";var jn=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),kr=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),Sr=220;function br(e,t,n=[],o){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let i=t.map(u=>({code:u,name:a?.of(u)??u})),r=new Intl.Collator(e),l=s(u=>{if(u===o)return-1;let p=n.indexOf(u);return p<0?n.length:p},"rank");return i.sort((u,p)=>l(u.code)-l(p.code)||r.compare(u.name,p.name))}s(br,"countryNames");function eo({step:e,i18n:t,issuer:n,onPicked:o,ageStepUp:a=!1}){let{t:i,locale:r}=t,l=Xn(()=>gr(e.documents),[e.documents]),u=Xn(()=>br(r,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[r,l,e.documents,e.detectedCountry]),p=l.length===1?l[0]:null,[m,g]=Bt(n??p),[b,d]=Bt(""),[h,v]=Bt(null),T=hr(),I=p===null?[]:At(e.documents,p),E=p!==null&&I.length===1?I[0]:null;Qn(()=>{p!==null&&E!==null&&e.selectDocument(p,E)},[p,E]);let R=s((N,k)=>{e.selectDocument(N,k),o?.()},"pick"),D=s(N=>{let k=At(e.documents,N);k.length===1?R(N,k[0]):g(N)},"chooseIssuer");if(Qn(()=>{if(h===null||m===null)return;let N=setTimeout(()=>R(m,h),Sr);return()=>clearTimeout(N)},[h]),nt(m!==null&&l.length>1&&n===void 0?()=>{g(null),v(null)}:null),E!==null)return null;if(m===null){let N=jn(b.trim()),k=N===""?u:u.filter(A=>jn(A.name).includes(N)||A.code.toLowerCase()===N);return Re("section",{className:"sekyro-step",children:[U(ee,{title:i("doc.countryTitle"),lead:i(a?"doc.ageStepUp":"doc.pickDescription")}),Re("div",{className:"sekyro-field",children:[U("label",{className:"sekyro-label",htmlFor:T,children:i("doc.countryLabel")}),U("input",{id:T,type:"search",className:"sekyro-input",placeholder:i("doc.countrySearch"),value:b,onChange:A=>d(A.target.value)})]}),k.length===0?U("p",{className:"sekyro-text-muted",children:i("doc.noCountryMatch")}):U("ul",{className:"sekyro-rows",children:k.map(A=>U("li",{children:Re("button",{type:"button",className:"sekyro-row-btn",onClick:()=>D(A.code),children:[U("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:kr(A.code)}),A.name]})},A.code))}),U(te,{children:null})]})}let _=At(e.documents,m);return Re("section",{className:"sekyro-step",children:[U(ee,{title:i("doc.pickTitle"),lead:i(a&&p!==null?"doc.ageStepUp":"native.doc.holdIt")}),U("div",{className:"sekyro-choices",children:_.map(N=>Re("button",{type:"button",className:"sekyro-card","aria-pressed":h===N,disabled:h!==null&&h!==N,onClick:()=>v(N),children:[U("span",{className:"sekyro-card__tile",children:U($,{name:N==="passport"?"passport":"card"})}),Re("span",{className:"sekyro-card__body",children:[U("span",{className:"sekyro-card__title",children:i(`doc.type.${N}`)}),U("span",{className:"sekyro-card__sub",children:i(`doc.sub.${N}`)})]}),U("span",{className:"sekyro-radio","aria-hidden":"true"})]},N))}),l.length>1?U("button",{type:"button",className:"sekyro-link",onClick:()=>{g(null),v(null)},children:i("native.doc.changeCountry")}):null,U(te,{children:null})]})}s(eo,"DocumentPicker");import{jsx as fe,jsxs as Er}from"react/jsx-runtime";var xr={load:s(()=>import("../document-capture-view-ZKT3W6UE.js"),"load")};function Vt({step:e,locale:t,strings:n,className:o,liveMrz:a}){let i=x(t,n),[r,l]=Dt(0),[u,p]=Dt(null),m=vr(e.documents),g=m.length>1,b=e.issuer!==null&&to(e.documents,e.issuer).length>1,d=e.documentType===null||e.issuer===null||u!==null,h=m.length===1&&to(e.documents,m[0]).length===1,[v]=Dt(()=>d&&!h),T=e.ageStepUp===!0,I=_r(()=>Nr(()=>xr.load().then(R=>({default:R.DocumentCaptureView}))),[r]);Pr(()=>{Cr()},[]);let E=Er(O,{tone:"danger",children:[fe("span",{children:i.t("errors.network_error")}),fe(C,{kind:"secondary",onClick:()=>l(R=>R+1),children:i.t("doc.retryCamera")})]});return fe("div",{className:o,children:d?fe(eo,{step:e,i18n:i,ageStepUp:T&&u===null&&v,...u==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>p(null)}):fe(pe,{fallback:E,children:fe(wr,{fallback:fe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:fe(I,{step:e,i18n:i,ageLead:T&&!v,liveMrz:e.documentType==="drivers_license"?void 0:a,...g?{onChangeCountry:s(()=>p("country"),"onChangeCountry")}:{},...b?{onChangeDocument:s(()=>p("document"),"onChangeDocument")}:{}})})},r)})}s(Vt,"DocumentCapture");import{warmPortraitCapture as Tr}from"@sekyro/web";import{Component as Ir,lazy as no,Suspense as oo,useContext as Rr,useEffect as Lr,useMemo as ro,useState as so}from"react";import{jsx as M,jsxs as dt}from"react/jsx-runtime";var Or={load:s(()=>import("../portrait-capture-view-DSUGE7PI.js"),"load")},Mr={load:s(()=>import("../portrait-review-view-PPYEEMYM.js"),"load")},Ht=class Ht extends Ir{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(Ht,"LoadBoundary");var ut=Ht;function Ar({step:e,i18n:t}){let{t:n}=t,o=xe();return dt("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[M("h2",{ref:o,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?M("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?dt(O,{tone:"danger",children:[M("span",{children:n("portrait.uploadFailed")}),M(C,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):M("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}s(Ar,"MatchPhase");function Ft({step:e,locale:t,strings:n,className:o,assetBaseUrl:a,verification:i}){let r=x(t,n),l=gn(i),u=Rr(rt),[p,m]=so(0),[g,b]=so(null),d=ro(()=>no(()=>Or.load().then(k=>({default:k.PortraitCaptureView}))),[p]),h=ro(()=>no(()=>Mr.load().then(k=>({default:k.PortraitScreens}))),[p]),v=typeof e.uploadPortrait=="function",T=v?e.photo?.source??"camera":"camera",I=v&&T!=="camera"&&e.photo?.uploadOffered===!0,E=T!=="upload",R=T==="upload"?"upload":T==="choice"?g??e.photo?.pick??"source":"camera",D=e.phase==="capture"&&e.photo?.cameraOnPhone===!0;if(Lr(()=>{e.phase==="capture"&&R==="camera"&&!D&&Tr()},[e.phase,R,D]),e.phase==="match")return M("div",{className:o,children:M(Ar,{step:e,i18n:r})});let _=M("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")});if(u!==null&&(u.busy||u.failed!==null)&&e.phase==="capture"&&R==="camera")return dt("section",{className:`sekyro-step${o?` ${o}`:""}`,children:[M(ee,{title:r.t("session.steps.portrait.title")}),M(te,{children:M(C,{kind:"secondary",full:!0,disabled:u.busy,onClick:u.reset,children:r.t("portrait.retryCamera")})})]});if(e.phase==="review"||R!=="camera"||D)return M("div",{className:o,children:M(ut,{fallback:M(C,{kind:"ghost",onClick:()=>m(k=>k+1),children:r.t("common.retry")}),children:M(oo,{fallback:_,children:M(h,{screen:e.phase==="review"?"review":D&&R==="camera"?"phone":R==="camera"?"review":R,step:e,i18n:r,...E?{onCamera:s(()=>b("camera"),"onCamera")}:{},onUpload:()=>b("upload"),onDeclined:()=>b(null)})})},p)});if(!l.settled)return M("div",{className:o,children:_});let N=dt(O,{tone:"danger",children:[M("span",{children:r.t("errors.network_error")}),M(C,{kind:"secondary",onClick:()=>m(k=>k+1),children:r.t("portrait.retryCamera")})]});return M("div",{className:o,children:M(ut,{fallback:N,children:M(oo,{fallback:_,children:M(d,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{},...I?{onUpload:s(()=>b("upload"),"onUpload")}:{}})})},p)})}s(Ft,"PortraitCapture");import{lazy as Br,Suspense as Dr,useMemo as Vr,useState as Fr}from"react";import{jsx as ve,jsxs as Ur}from"react/jsx-runtime";var Hr={load:s(()=>import("../proof-of-address-view-2M6UDK76.js"),"load")};function Ut({step:e,locale:t,strings:n,className:o}){let a=x(t,n),[i,r]=Fr(0),l=Vr(()=>Br(()=>Hr.load().then(p=>({default:p.ProofOfAddressView}))),[i]),u=Ur(O,{tone:"danger",children:[ve("span",{children:a.t("errors.network_error")}),ve(C,{kind:"secondary",onClick:()=>r(p=>p+1),children:a.t("common.retry")})]});return ve("div",{className:o,children:ve(pe,{fallback:u,children:ve(Dr,{fallback:ve("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:a.t("common.loading")}),children:ve(l,{step:e,i18n:a})})},i)})}s(Ut,"ProofOfAddress");import{cameraUnavailableCauseOf as ls}from"@sekyro/web";import{useCallback as oe,useContext as cs,useEffect as Qe,useId as us,useMemo as Jt,useRef as ae,useState as j}from"react";var $t={light:{lineBrand:"#0d3b66",successSoft:"#d5f0e8",successFg:"#005341",onSuccess:"#ffffff",warningSoft:"#fff7e6",warningFg:"#735003",onWarning:"#191a1b",dangerSoft:"#ffdada",dangerFg:"#ca0f07",onDanger:"#ffffff",info:"#0563d4",infoSoft:"#d3e5ff",infoFg:"#064da5",onInfo:"#ffffff"},dark:{lineBrand:"#3f80bf",successSoft:"#002c23",successFg:"#53ffd4",onSuccess:"#030303",warningSoft:"#463102",warningFg:"#ffd98a",onWarning:"#030303",dangerSoft:"#9c1008",dangerFg:"#ffbbbb",onDanger:"#030303",info:"#5da9ff",infoSoft:"#063778",infoFg:"#acd0ff",onInfo:"#030303"},sizes:{buttonHeight:"52px",controlRadius:"10px",cardRadius:"16px",fieldRadius:"10px",iconTile:"56px",iconTileRadius:"16px",headerTile:"40px",choiceTile:"40px",tileRadius:"10px",resultDisc:"64px",resultRing:"8px",progressHeight:"4px",focusRing:"2px",focusRingOffset:"2px",otpBox:"60px",choiceMinHeight:"76px",stepGap:"32px",headingGap:"12px"},motion:{page:"320ms",easeOut:"cubic-bezier(0.16, 1, 0.3, 1)"}};var Ze={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},$r=["danger","success","warning","info"];function Kt(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(Kt,"channel");function io(e){let t=Kt(parseInt(e.slice(1,3),16)),n=Kt(parseInt(e.slice(3,5),16)),o=Kt(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*o}s(io,"luminance");function Kr(e,t){let n=io(e),o=io(t),a=Math.max(n,o),i=Math.min(n,o);return(a+.05)/(i+.05)}s(Kr,"contrastRatio");function ao(e,t){return Math.min(...$r.map(n=>Kr(Ze[e][n].fg,t)))}s(ao,"worstAgainst");function lo(e,t,n){return Math.min(ao(e,t),ao(e,n))}s(lo,"worstStatusContrast");function co(e,t){return lo("light",e,t)>=lo("dark",e,t)?"light":"dark"}s(co,"statusSchemeFor");import{useRef as zr,useState as Yr}from"react";import{useEffect as Gr,useId as Wr,useRef as Gt}from"react";import{jsx as Le,jsxs as uo}from"react/jsx-runtime";function pt({open:e,title:t,closeLabel:n,onClose:o,children:a,actions:i,role:r,testId:l,returnFocus:u}){let p=Gt(null),m=Gt(null),g=Gt(!1),b=Wr();return Gr(()=>{let d=p.current;if(d!==null){if(e&&!d.open?(m.current=typeof document>"u"?null:document.activeElement,typeof d.showModal=="function"?d.showModal():d.setAttribute("open","")):!e&&d.open&&(typeof d.close=="function"?d.close():d.removeAttribute("open")),!e&&g.current){let h=u?.current??(m.current instanceof HTMLElement?m.current:null);m.current=null,h?.focus()}g.current=e}},[e,u]),Le("dialog",{ref:p,className:"sekyro-dialog","aria-labelledby":b,...r==="alertdialog"?{role:r}:{},"data-testid":l,onCancel:d=>{d.preventDefault(),o()},onClick:d=>{d.target===d.currentTarget&&o()},children:uo("div",{className:"sekyro-dialog__panel",children:[uo("div",{className:"sekyro-dialog__head",children:[Le("h2",{id:b,className:"sekyro-dialog__title",children:t}),n!==void 0?Le("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:o,children:Le($,{name:"close"})}):null]}),a!==void 0?Le("div",{className:"sekyro-dialog__body",children:a}):null,i!==void 0?Le("div",{className:"sekyro-dialog__actions",children:i}):null]})})}s(pt,"FlowDialog");import{jsx as qe,jsxs as po}from"react/jsx-runtime";var Zr=["intro","data","processing","sharing","retention"];function fo({i18n:e,purpose:t="identity"}){let{t:n}=e,[o,a]=Yr(!1),i=zr(null),[r,l=""]=n("consent.short").split("{terms}");return po("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[po("p",{className:"sekyro-consent__line",children:[r,qe("button",{ref:i,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:n("consent.termsLink")}),l]}),qe(pt,{open:o,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>a(!1),returnFocus:i,testId:"sekyro-consent-terms",children:qe("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?qe(V,{view:"HumanConsentTerms",i18n:e,quiet:!0}):Zr.map(u=>qe("p",{children:n(`consent.terms.${u}`)},u))})})]})}s(fo,"ConsentNotice");function mo(e){let t=e.trim().split(/\s+/).filter(o=>o!=="");return(t.length>=2?[t[0],t[1]].map(o=>Array.from(o??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(mo,"initials");import{useSyncExternalStore as qr}from"react";var ho=s(e=>({colors:{...e?W.dark:W.light},radius:W.radius,fontFamily:W.font}),"brandTheme"),La=ho(!1),yo=/^#[0-9a-f]{6}$/i;function Wt(e,t,n){if(t)return null;let o=vt(e).colors,a=n?.colors?.bg??o?.bg,i=n?.colors?.surface??o?.surface;return a===void 0&&i===void 0||a!==void 0&&!yo.test(a)||i!==void 0&&!yo.test(i)?null:co(a??W.light.bg,i??W.light.surface)}s(Wt,"partnerStatusScheme");function ft(e,t,n){let o=vt(e);if(n&&o.colors!==void 0){let{brand:a,brandFg:i}=o.colors;a!==void 0&&jr(a,W.dark.bg)>=3?o.colors={brand:a,ring:a,...i!==void 0?{brandFg:i}:{}}:delete o.colors}if(Wt(e,n,t)==="dark"){let a=Ze.dark;o.colors={...o.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return tt(ho(n),o,kn(t))}s(ft,"verificationTheme");function mt(e){let t=qr(Xr,Qr,()=>!1);return e==="dark"||e==="system"&&t}s(mt,"useDarkScheme");var Jr="(prefers-color-scheme: dark)",ko=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Jr):null,"media"),Qr=s(()=>ko()?.matches??!1,"prefersDark");function Xr(e){let t=ko();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(Xr,"subscribe");function jr(e,t){let[n,o]=[go(e),go(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}s(jr,"contrast");function go(e){let t=[1,3,5].map(n=>{let o=Number.parseInt(e.slice(n,n+2),16)/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(go,"luminance");var zt="sekyro.testerGate";function Yt(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}s(Yt,"store");function So(e=Date.now()){try{Yt()?.setItem(zt,String(e))}catch{}}s(So,"rememberTester");function bo(e=Date.now()){try{let t=Number(Yt()?.getItem(zt)??"");return Number.isFinite(t)&&t>0&&e-t<2592e6}catch{return!1}}s(bo,"rememberedTester");function vo(){try{Yt()?.removeItem(zt)}catch{}}s(vo,"forgetTester");import{useEffect as es,useId as ts,useState as ns}from"react";import{jsx as F,jsxs as Ce}from"react/jsx-runtime";var Co=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),os={review:{icon:"pending",tone:"info"},cooldown:{icon:"timer",tone:"info"},rejected:{icon:"close",tone:"neutral"},policy:{icon:"close",tone:"neutral"},inconclusive:{icon:"warning",tone:"neutral"},unavailable:{icon:"timer",tone:"neutral"},expired:{icon:"timer",tone:"neutral"}};function rs({screen:e}){if(e==="verified")return Ce("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[F("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"54",pathLength:"1"}),F("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),F("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]});let{icon:t,tone:n}=os[e];return F("span",{className:`sekyro-tile sekyro-tile--${n} sekyro-outcome-tile`,"aria-hidden":"true","data-screen":e,children:F($,{name:t})})}s(rs,"OutcomeMark");function ss({label:e,id:t,copied:n}){let[o,a]=ns(!1);return es(()=>{if(!o)return;let i=setTimeout(()=>a(!1),1600);return()=>clearTimeout(i)},[o]),Ce("button",{type:"button",className:`sekyro-reference${o?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[F("span",{"aria-live":"polite",children:o?n:e}),F("bdi",{dir:"ltr",children:t}),F($,{name:"copy"})]})}s(ss,"ReferenceLine");function is({step:e,t}){let n=e.context.sandbox?e.context.simulation?.reason:void 0;return n===void 0?null:Ce(ze,{tone:"warning",role:"status",testId:"sekyro-simulated-notice",children:[F("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:F($,{name:"info"})}),Ce("div",{className:"sekyro-notice__body","data-reason":n,children:[F("strong",{children:t("sandbox.simulatedTitle")}),F("span",{children:t(n==="no_testers"?"sandbox.simulatedNoTesters":"sandbox.simulatedGate")})]})]})}s(is,"SimulationNotice");function as(e,t){return e==="expired"?"native.result.expiredTitle":e!=="verified"?`session.result.${e}.title`:t.level===3?"session.result.verified.title":t.level===1&&t.assurance==="contact_phone"?"session.result.verified.titlePhone":t.level===1&&t.assurance==="contact_email"?"session.result.verified.titleEmail":t.level===1?"session.result.verified.titleContact":"session.result.verified.titleHuman"}s(as,"resultTitleKey");function Zt({step:e,locale:t,strings:n,className:o,onClose:a}){let i=x(t,n),{t:r}=i,l=ts(),u=xe(),p=e.context.orgName,m=e.reasonCode??"",g=e.display==="platform_unsupported"?"policy":e.display,b=s(h=>(p!==""||h==="verified")&&h!=="cooldown"?r(`native.result.${h}`,{org:p}):r(`session.result.${h}.description`),"partnerLine"),d;switch(e.display){case"rejected":d=Co.has(St(m))?r("session.result.detailsMismatch",{org:p}):b("rejected");break;case"policy":{if(Co.has(St(m)))d=r("session.result.detailsMismatch",{org:p});else if(m==="device_velocity_exceeded")d=r("session.result.deviceVelocity",{org:p});else if(m==="capture_tampered")d=r("session.result.deviceStop");else if(m==="camera_unavailable")d=r("reasons.camera_unavailable",{org:p});else if(m==="underage_estimated")d=r("reasons.underage_estimated");else if(m==="starter_credit_claimed")d=r("reasons.starter_credit_claimed");else if(m==="blocked_by_org")d=r("reasons.blocked_by_org");else{let h=m===""?null:dn(m);d=h!==null?r(h,{org:p}):b("policy")}break}case"cooldown":{let h=pn(i.locale,e.retryAfter);d=h!==null?r(h.key,{time:h.time}):r("session.result.cooldown.description");break}case"platform_unsupported":d=r("result.platform_unsupported");break;default:d=b(g)}return Ce("section",{className:`sekyro-result${o?` ${o}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[Ce("div",{className:"sekyro-result__body",children:[F(rs,{screen:g}),Ce("div",{className:"sekyro-heading",children:[F("h2",{id:l,ref:u,tabIndex:-1,className:"sekyro-text-body",children:r(as(g,e.result))}),F("p",{className:"sekyro-text-muted",children:d})]}),F(is,{step:e,t:r}),F(ss,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),a!==void 0?F("div",{className:"sekyro-actions",children:F(C,{full:!0,onClick:a,children:r("native.result.continue",{org:p})})}):null]})}s(Zt,"VerificationResultScreen");import{Fragment as Je,jsx as c,jsxs as J}from"react/jsx-runtime";function ds(e,t,n){let o=t?W.dark:W.light,a=t?W.roles.dark:W.roles.light,i=e.colors??{},r={},l=i.fg===o.fg&&i.surface===o.surface;i.brand===o.brand&&i.surface===o.surface&&(r["--sekyro-color-brand-soft"]=a.brandSoft),l&&(r["--sekyro-color-line"]=a.line,r["--sekyro-color-line-subtle"]=a.lineSubtle,r["--sekyro-color-line-strong"]=a.lineStrong,r["--sekyro-color-sunken"]=a.sunken),i.fgMuted===o.fgMuted&&i.surface===o.surface&&(r["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===W.font&&(r["--sekyro-font-display"]=W.fontDisplay);let u=t?$t.dark:$t.light;if(r["--sekyro-color-success-soft"]=u.successSoft,r["--sekyro-color-success-fg"]=u.successFg,r["--sekyro-color-on-success"]=u.onSuccess,r["--sekyro-color-warning-soft"]=u.warningSoft,r["--sekyro-color-warning-fg"]=u.warningFg,r["--sekyro-color-danger-soft"]=u.dangerSoft,r["--sekyro-color-danger-fg"]=u.dangerFg,r["--sekyro-color-on-danger"]=u.onDanger,r["--sekyro-color-info-soft"]=u.infoSoft,r["--sekyro-color-info-fg"]=u.infoFg,i.brand===o.brand&&(r["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let p=Ze[n];for(let m of["danger","success","warning","info"])r[`--sekyro-color-${m}-soft`]=p[m].soft,r[`--sekyro-color-${m}-fg`]=p[m].fg;r["--sekyro-color-on-success"]=p.success.on,r["--sekyro-color-on-danger"]=p.danger.on}return r}s(ds,"flowRoles");function Qt(e){let{verification:t,locale:n,strings:o,onStep:a,onResult:i}=e,{step:r,error:l}=wt(t);Qe(()=>{r!==null&&a?.(r)},[r,a]),Qe(()=>i===void 0?void 0:t.on("result",i),[t,i]);let u=mt(e.colorScheme??"light"),p=r?.context.branding,m=ft(p,e.theme,u),[g,b]=j(!1),d=`sekyro-verification${u?" sekyro-verification--dark":""}${g?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,h=ae(e.onClose);h.current=e.onClose;let v=ae(r);v.current=r;let T=oe(()=>{let _=v.current;h.current?.(_?.kind==="result"?{reason:"finished",result:_.result}:{reason:"cancelled"})},[]),[I,E]=j(null),R=oe(()=>{let _=v.current;_!==null&&_.kind!=="result"&&_.context.consentRecorded?E("close"):T()},[T]),D=Jt(()=>t.reportCaptureIssue===void 0?null:_=>t.reportCaptureIssue?.(_),[t]);return c(bn,{theme:m,className:d,children:c(Ye,{locale:n,...o!==void 0?{strings:o}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:ds(m,u,Wt(p,u,e.theme)),children:c(Pn.Provider,{value:b,children:c(Ct.Provider,{value:e.onClose!==void 0?T:void 0,children:c(ot.Provider,{value:e.onClose!==void 0?R:void 0,children:J(mn.Provider,{value:D,children:[c(hs,{...e,step:r,error:l,immersive:g,onLeaveAsk:()=>E("history"),onClosed:T}),c(ms,{open:I!==null,onStay:()=>{I==="history"&&qt(),E(null)},onLeave:()=>{let _=I;E(null),_==="close"||e.onClose!==void 0?T():typeof window<"u"&&Po()}})]})})})})})})})}s(Qt,"SekyroVerification");function ps(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,o=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof o=="string"&&o!==""&&typeof a=="string"&&a!==""?{title:o,description:a}:null}s(ps,"processingCopyOf");function fs({error:e,retry:t}){let{t:n}=x(),o=xe();return J(ze,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(un(e))}),e.retryable?c(C,{ref:o,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}s(fs,"CameraErrorNotice");var No="sekyroFlow";function wo(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[No]===!0}s(wo,"onGuard");function qt(){if(typeof window>"u"||wo())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[No]:!0},"")}s(qt,"pushGuard");function Po(){window.history.back()}s(Po,"leaveHistory");function ms({open:e,onStay:t,onLeave:n}){let{t:o}=x();return c(pt,{open:e,role:"alertdialog",title:o("leave.title"),onClose:t,testId:"sekyro-leave",actions:J(Je,{children:[c(C,{full:!0,onClick:t,children:o("leave.stay")}),c(C,{full:!0,kind:"danger",onClick:n,children:o("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:o("leave.body")})})}s(ms,"LeaveDialog");function ys(e,t){let[n,o]=j(!1),[a,i]=j(null),r=e===null?void 0:e.skipCapture,l=ae(r);l.current=r;let u=ae(!1),p=e?.key;Qe(()=>i(null),[p]);let m=oe(()=>{if(u.current)return;let h=l.current;h!==void 0&&(u.current=!0,o(!0),i(null),h().catch(v=>i(t.t(be(v,t.strings)))).finally(()=>{u.current=!1,o(!1)}))},[t]),g=oe(()=>i(null),[]),b=r!==void 0,d=t.t("sandbox.skipCapture");return Jt(()=>b?{label:d,busy:n,failed:a,run:m,reset:g}:null,[b,d,n,a,m,g])}s(ys,"useSkipCapture");function gs({skip:e}){return J(Je,{children:[e.failed!==null?c(O,{tone:"danger",children:c("span",{children:e.failed})}):null,c(C,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}s(gs,"SkipAction");function hs(e){let{step:t,error:n,slots:o,immersive:a}=e,i=x(),{t:r}=i,[l,u]=j(!1),[p,m]=j([]),g=oe(f=>(m(L=>[...L,f]),()=>m(L=>L.filter(z=>z!==f))),[]),[b,d]=j(null),h=oe(f=>d(()=>f),[]),[v,T]=j(0),[I,E]=j(null),R=ys(t,i),D=t?.context.testerGate!==void 0,[_,N]=j(!1),k=ae(null);Qe(()=>{!D||k.current!==null||(k.current=bo(),k.current&&N(!0))},[D]);let A=t?.context.purpose??"identity",G=t?.context.returning===!0,Ne=e.verification,Me=A==="human"||t?.context.cameraUnavailableHandled===!0,Ae=Ne.reportCameraUnavailable!==void 0&&Me?f=>Ne.reportCameraUnavailable?.(f)??Promise.resolve():void 0,we=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,Y=e.handoffUrl,me=oe((f,L)=>Ae===void 0?void 0:c(V,{view:"NoCameraView",i18n:i,quiet:!0,cause:L,onRetry:f,...we?{onContinue:Ae}:{},...Y!==void 0?{handoffUrl:Y}:{}}),[i,Ne,Me,we,Y]),Be=Jt(()=>On(t),[t]),le=oe((f,L)=>c(Mn,{start:f,context:L,human:A==="human",returning:G,notice:L.permissionSettled&&L.permission==="denied"?me(f,"denied"):void 0,...Be!==void 0?{retry:Be}:{}}),[A,G,me,Be]),ye=oe((f,L)=>{let z=ls(f.kind);return(z!==void 0?me(L,z):void 0)??J(Je,{children:[c(fs,{error:f,retry:L}),z!==void 0&&Y!==void 0?c(V,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:Y}):null]})},[me,Y,i]),De=ae(""),Ve=e.livenessProps?.slots?.stageOverlay,Xe=oe(f=>(f.guidance!==""&&!f.coached&&(De.current=f.guidance),c(Bn,{testId:"sekyro-capture-stage",video:c("video",{ref:f.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:f.settled?r("capture.checkingTitle"):f.guidance!==""?f.guidance:De.current,note:f.note,status:f.status,busy:f.settled,progress:f.phase==="seeking"||f.phase==="aligning"?f.progress:1,still:f.still,live:f.live,closeLabel:r("native.close"),overlay:Ve?.(f.videoRef),ramp:f.ramp?.colour??null,...f.settled?{}:{onClose:s(()=>T(L=>L+1),"onClose")},end:f.modeSwitch!=null?c(fn,{view:f.modeSwitch,className:"sekyro-glass sekyro-glass--label"}):null,children:f.settled||!f.live?null:c(_n,{onStop:()=>T(L=>L+1)})})),[r,Ve]),yt=us(),re=t,Fe=t!==null&&I===t.key&&t.context.switchable!==void 0,ge=b??(t===null||t.kind==="result"?null:Fe?()=>E(null):t.context.switchable!==void 0&&typeof re?.chooseOption=="function"?()=>E(t.key):null),He=ae(ge);He.current=ge;let Z=ae(t);Z.current=t;let se=ae({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});se.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let ce=e.backNavigation==="history";if(Qe(()=>{if(!ce||typeof window>"u")return;qt();let f=s(()=>{if(wo())return;let L=Z.current,z=He.current;z!==null?(z(),qt()):L?.kind!=="result"&&L?.context.consentRecorded===!0?se.current.ask():se.current.hostClose?se.current.closed():Po()},"onPop");return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[ce]),n!==null)return c(ze,{tone:"danger",children:c("span",{children:r(be(n,i.strings))})});if(t===null)return J("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:r("common.loading")}),c("span",{className:"sekyro-skeleton__bar is-title"}),c("span",{className:"sekyro-skeleton__bar"}),c("span",{className:"sekyro-skeleton__bar is-short"}),c("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:B}=t,Q=s(f=>{u(!0),f().finally(()=>u(!1))},"refresh"),je=o?.header??c(bs,{context:B,headerId:yt,end:o?.headerEnd,...ge!==null?{onBack:ge}:{}}),w,he=Fe;if(_&&e.verification.testerGate!==void 0)w=c(bt.Provider,{value:Xe,children:c(V,{view:"TesterGateView",i18n:i,verification:e.verification,attemptsLeft:B.testerGate?.attemptsLeft??0,livenessProps:{...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:e.livenessProps?.slots?.intro??le},locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice},onBound:()=>So(),onDone:f=>{f&&vo(),N(!1)}})});else if(he)w=c(V,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>E(null)});else switch(t.kind){case"phone_otp":w=c(Tt,{step:t});break;case"email_otp":w=c(It,{step:t});break;case"method":w=c(Ot,{step:t});break;case"registry":w=c(ct,{step:t});break;case"document":w=c(Vt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let f=e.livenessProps?.slots?.intro,L={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:f??le,...f===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:ye}:{}},...v>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};w=c(bt.Provider,{value:Xe,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(V,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:L,sekyroIntro:f===void 0},v):c(hn,{...L},v)});break}case"portrait":w=J(Je,{children:[t.retakeOnly?c(V,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,c(Ft,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"proof_of_address":w=c(Ut,{step:t});break;case"contact_choice":w=c(V,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":w=c(V,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":w=c(V,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":{let f=t.checkType==="doc_ocr"?r("handoff.lead.document"):t.checkType==="portrait_icao"?r("handoff.lead.portrait"):t.checkType==="poa"?r("handoff.lead.poa"):void 0;w=e.handoffUrl!==void 0?c(V,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh,...f!==void 0?{lead:f}:{}}):c(it,{tone:"brand",icon:"smartphone",title:r("handoff.title"),actions:c(C,{kind:"secondary",full:!0,disabled:l,onClick:()=>Q(t.refresh),children:r("common.refresh")}),children:c("p",{children:f??r("reasons.mobile_required")})});break}case"processing":{let f=ps(i.strings,t.service);w=c(it,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:f?.title??r("session.processing.title"),actions:t.stalled?c(C,{kind:"secondary",full:!0,disabled:l,onClick:()=>Q(t.refresh),children:r("common.refresh")}):null,children:c("p",{children:f?.description??r("session.processing.description")})});break}case"eid":w=c(Rt,{step:t});break;case"unsupported":{let f=t.reason==="platform_unsupported";w=c(it,{tone:"neutral",icon:"smartphone",title:r(f?"needsApp.title":"unsupported.title"),actions:c(ks,{org:B.orgName}),children:c("p",{children:f?B.orgName!==""?r("needsApp.description",{org:B.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:B.orgName})})});break}case"result":w=o?.result?.(t)??c(Ss,{step:t});break;default:{let f=t;w=null}}let ke=!a&&!B.consentRecorded&&t.kind!=="result"?c(fo,{i18n:i,purpose:B.purpose}):null,ue=R!==null&&!a&&!he&&!_?c(gs,{skip:R}):null,Se=D&&!_&&!a&&!he&&e.verification.testerGate!==void 0?c(V,{view:"TesterGateAction",i18n:i,quiet:!0,onOpen:()=>N(!0)}):null,Pe=ue===null&&Se===null?ke:J(Je,{children:[Se,ue,ke]});return c(wn.Provider,{value:h,children:c(rt.Provider,{value:R,children:c(An.Provider,{value:e.handoffUrl,children:J(Nn.Provider,{value:Pe===null?null:{node:Pe,owner:p[0]??null,claim:g},children:[a?null:je,!a&&t.kind!=="result"&&B.sections.length>1?c(vs,{context:B,current:t.section,i18n:i}):null,c(En,{pageKey:t.key,children:w}),!a&&!he&&t.kind!=="result"&&t.context.switchable!==void 0?c(V,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>E(t.key),quiet:!0},t.key):null,p.length===0?Pe:null,a?null:o?.footer!==void 0?o.footer:B.branding?.hideAttribution===!0?null:J("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c($,{name:"lock"}),r("shell.verifiedBy")]})]})})})})}s(hs,"Body");function ks({org:e}){let{t}=x(),n=cs(Ct);return n===void 0?null:c(C,{full:!0,onClick:n,children:t("native.result.continue",{org:e})})}s(ks,"BackToOrg");function Ss({step:e}){return c(ot.Consumer,{children:t=>c(Zt,{step:e,...t!==void 0?{onClose:t}:{}})})}s(Ss,"ResultPage");function bs({context:e,headerId:t,end:n,onBack:o}){let{t:a}=x(),[i,r]=j(!1),l=i?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:J("div",{className:"sekyro-org",children:[o!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:o,"data-testid":"sekyro-back",children:c($,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?c("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>r(!0)}):mo(e.orgName)}),J("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),e.sandbox?c("span",{className:"sekyro-sandbox-badge","data-testid":"sekyro-sandbox-badge",children:a("app.sandboxBadge")}):null,n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(ot.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:p,children:c($,{name:"close"})}):null})]})})}s(bs,"OrgHeader");function vs({context:e,current:t,i18n:n}){let o=t===null?-1:e.sections.indexOf(t),a=e.progress,i=a!==void 0&&a.length===e.sections.length?a:e.sections.map((r,l)=>({id:r,state:l<o?"done":l===o?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:i.map(({id:r,state:l})=>c("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${r}`]??r})},r))})}s(vs,"SectionProgress");import{useEffect as Cs,useState as _o}from"react";import{jsx as Oe}from"react/jsx-runtime";function Ns(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(Ns,"pageUrl");function ws({hostedUrl:e,inAppBrowser:t,...n}){let[o,a]=_o(t===!0);Cs(()=>{t===void 0&&Nt()&&a(!0)},[t]);let[i,r]=_o(!1),l=mt(n.colorScheme??"light"),u=n.handoffUrl??e??Ns();return o&&!i?Oe(Sn,{theme:tt(ft(void 0,void 0,l),n.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:Oe(Ye,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:Oe("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:Oe(Ps,{url:u,onContinue:()=>r(!0)})})})}):Oe(Qt,{...n,...u!==""?{handoffUrl:u}:{}})}s(ws,"SekyroFlow");function Ps({url:e,onContinue:t}){let n=x();return Oe(V,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}s(Ps,"Prompt");export{Vt as DocumentCapture,Rt as EidStep,It as EmailOtpStep,ct as IdNumberEntry,Ot as MethodChoice,mr as NniEntry,Tt as PhoneOtpStep,Ft as PortraitCapture,Ut as ProofOfAddress,ws as SekyroFlow,Qt as SekyroVerification,Ye as StepI18nProvider,Zt as VerificationResultScreen,Lo as arSteps,Oo as enSteps,Ao as formatTemplate,Mo as frSteps,Nt as isInAppBrowser,Io as loadSekyroLocale,Bo as resolveSekyroStrings,Ro as retakeHintStringKey,x as useStepI18n,wt as useVerificationStep};
|
|
2
|
+
import{a as ao}from"../chunk-DTXKBOS4.js";import{a as J,b as B,c as io}from"../chunk-A7UG6YDG.js";import{a as zt,b as Gt,d as qt,e as Yt}from"../chunk-ZARKJW2C.js";import{a as U,d as Mt,e as rt,f as Ke,g as Ht,h as Ut}from"../chunk-U5GKKEZQ.js";import{a as $t,b as Kt,c as eo}from"../chunk-GUTF3SPK.js";import{a as to,b as oo,c as no,d as ro,e as so,f as it}from"../chunk-VN4C5C2R.js";import{a as We}from"../chunk-WVYPT45I.js";import{d as nt,f as Vt,g as Ft,j as Dt}from"../chunk-2UDX3MRT.js";import{b as Lt}from"../chunk-KGUF5KAK.js";import{a as At}from"../chunk-7MMT5M4E.js";import{a as ue}from"../chunk-VRDPGOXM.js";import{a as Wo,b as Zo,c as Qo,d as Xo,e as Jo,f as Oe,g as C}from"../chunk-5V26KZGZ.js";import{a as D,b as Q,c as Wt,d as X,e as Zt,f as ze,g as Ge,h as st,i as Qt,k as qe,l as Xt,m as Jt,o as jt,p as x,q as Ye}from"../chunk-HO5RMTZU.js";import"../chunk-VOIZLJLI.js";import{a as h,c as ot,j as qo,l as Yo,n as Rt,o as Ot,p as Bt,r as Re,s as ke}from"../chunk-3MCTR3RI.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as jo,useState as lo}from"react";function at(e){let[t,n]=lo(()=>e?.currentStep?.()??null),[r,a]=lo(null);return jo(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let s=!0,o=e.on("step",l=>{s&&n(l)});return e.run().then(l=>{s&&n(u=>u??l)},l=>{s&&a(l)}),()=>{s=!1,o()}},[e]),{step:t,error:r}}i(at,"useVerificationStep");import{useEffect as co,useId as en,useMemo as tn,useRef as uo,useState as Se}from"react";import{Fragment as fo,jsx as b,jsxs as K}from"react/jsx-runtime";var po=i((e,t,n)=>{if(e===void 0)return 0;let r=Date.parse(e)-t;return Number.isFinite(r)?Math.min(n,Math.max(0,Math.ceil(r/1e3))):0},"secondsUntil"),on=600,nn=30,rn=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),sn=["whatsapp","sms"],mo=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_resend_limit","otp_number_invalid","otp_number_not_mobile"]);function an(e){let t=[];for(let n of e.phoneCountries??["MR"]){let r=e.phoneRules?.find(s=>s.code===n),a=r?.dial??zt(n);a!==void 0&&!t.some(s=>s.code===n)&&t.push({code:n,dial:`+${a}`,...r!==void 0?{rule:r}:{}})}return t}i(an,"phoneCountriesOf");function lt({step:e,locale:t,strings:n,className:r,defaultPhone:a,onError:s}){let o=C(t,n),{t:l}=o,u=tn(()=>an(e),[e.phoneCountries,e.phoneRules]),p=a??u[0]?.dial??"",f=e.phoneInternational===!0,g=qt({countries:u,international:f,closed:!!e.phoneRules?.length,defaultPhone:p}),[k,m]=Se(""),[y,w]=Se(!1),[N,O]=Se(null),[R,S]=Se(null),[I,_]=Se(!1),[W,M]=Se(null),H=uo(null),V=e.phase==="verify"&&!I,fe=e.phase==="verify",Ne=eo(fe),[Fe,De]=$t(e.reason==="otp_mismatch",e.attemptsRemaining,()=>m("")),$=en(),ie=uo(null);co(()=>{let v=setTimeout(()=>ie.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(v)},[V]);let ye=e.phase==="verify"?e.codeExpiresAt??"sent":null;co(()=>{ye!==null&&(_(!1),H.current!==null&&!mo.has(e.reason??"")&&M(H.current),H.current=null)},[ye]);let _e=i(async v=>{w(!0),S(null);try{await v()}catch(d){S(ue(d,o.strings)),s?.(d)}finally{w(!1),O(null)}},"run"),q=sn.filter(v=>(e.channels??[]).includes(v)),Pe=g.typed,te=!e.needsPhone||Pe!==null,ae=i((v,d=!1)=>{let P=e.needsPhone?d?W:{number:Pe??g.phone,shown:g.shown}:null;H.current=P,O(v??null),_e(async()=>{try{await e.send({...P!==null?{phone:P.number}:{},...v!==void 0?{channel:v}:{}})}catch(Z){throw H.current=null,Z}})},"send"),Me=i(v=>{_e(()=>e.verify(v))},"submitCode"),He=i(v=>{v.preventDefault(),V?Me(k):q.length<=1&&te&&ae(q[0])},"onSubmit"),xe=`${$}-phone`,oe=po(e.codeExpiresAt,Ne,on),ne=po(e.resendAvailableAt,Ne,nn),le=V&&e.codeExpiresAt!==void 0&&oe===0,ce=e.needsPhone&&!e.attemptsExhausted,Ie=fe&&(e.codeExpiresAt===void 0||oe>0),F=V&&ce?()=>_(!0):I&&Ie?()=>_(!1):null;ze(F===null?null:y?()=>{}:F);let re=i(v=>l(v==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),Ue=i(v=>y&&N!==null&&N===v,"busyFor"),[T,ge]=l("otp.sentTo",{channel:re(e.channel)}).split("{number}"),Te=e.context.simulation?.otpCode,$e=e.reason==="otp_mismatch"?K(x,{tone:"danger",children:[b("span",{children:l("otp.reason_otp_mismatch")}),b("span",{children:Ye(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&mo.has(e.reason)?b(x,{tone:"warning",children:b("span",{children:l(`otp.reason_${e.reason}`)})}):e.reason==="tester_phone_mismatch"?b(x,{tone:"warning",children:b("span",{children:l("reasons.tester_phone_mismatch")})}):null,Ee=K(fo,{children:[$e,R!==null?b(x,{tone:"danger",children:b("span",{children:l(R)})}):null]});if(V){let v=q.length===0;return K("form",{className:`sekyro-step sekyro-otp${r?` ${r}`:""}`,"aria-labelledby":$,onSubmit:He,noValidate:!0,children:[b(Q,{id:$,title:l("otp.verifyTitle"),lead:Te!==void 0?b(Jt,{template:l("sandbox.otpHint"),code:Te}):K(fo,{children:[T,b("bdi",{dir:"ltr",className:"sekyro-mono",children:W?.shown??e.sentToMasked}),ge]})}),Ee,K("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:`${$}-code`,children:l("otp.codeLabel")}),b(Kt,{id:`${$}-code`,value:k,invalid:Fe,onChange:d=>{d!==""&&De(),m(d),d.length===6&&k.length!==6&&!y&&!e.attemptsExhausted&&Me(d)}}),b("span",{className:`sekyro-help sekyro-otp-expiry${le?" is-danger":""}`,"aria-hidden":!le||void 0,children:le?l("otp.expired"):l("otp.expiresIn",{time:rn(oe)})})]}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:le?l("otp.expired"):""}),K(X,{children:[b(h,{type:"submit",full:!0,disabled:y||k.length!==6||e.attemptsExhausted,"aria-busy":y||void 0,children:l("otp.verify")}),K("div",{className:"sekyro-resend-row",children:[v?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y||ne>0,onClick:()=>ae(void 0,!0),children:ne>0?l("otp.resendIn",{seconds:ne}):l("otp.resend")}):ne>0?b("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:ne})}):q.map(d=>b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>ae(d,!0),children:l("otp.resendBy",{channel:re(d)})},d)),ce?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>_(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}return K("form",{className:`sekyro-step sekyro-otp${r?` ${r}`:""}`,"aria-labelledby":$,onSubmit:He,noValidate:!0,children:[b(Q,{id:$,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Ee,e.needsPhone?K("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:xe,children:l("otp.phoneLabel")}),b(Yt,{field:g,id:xe,locale:o.locale,t:l,inputRef:ie,ready:te})]}):b("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),K(X,{children:[q.length===1?b(h,{type:"submit",full:!0,disabled:y||!te,"aria-busy":Ue(q[0])||void 0,children:l("otp.sendBy",{channel:re(q[0])})}):q.length>1?K("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[b("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),b("div",{className:"sekyro-channel-row",children:q.map(v=>K(h,{kind:"primary",disabled:y||!te,"aria-busy":Ue(v)||void 0,onClick:()=>ae(v),children:[b(D,{name:v}),re(v)]},v))})]}):b(h,{type:"submit",full:!0,disabled:y||!te,"aria-busy":y||void 0,children:l("otp.send")}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y&&N!==null?l("otp.sending",{channel:re(N)}):""}),I&&Ie?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>_(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}i(lt,"PhoneOtpStep");import{lazy as ln,Suspense as cn,useMemo as un,useState as dn}from"react";import{jsx as he,jsxs as mn}from"react/jsx-runtime";var pn={load:i(()=>import("../email-otp-view-CMJHROOH.js"),"load")};function ct({locale:e,strings:t,...n}){let r=C(e,t),[a,s]=dn(0),o=un(()=>ln(()=>pn.load().then(u=>({default:u.EmailOtpView}))),[a]),l=mn(x,{tone:"danger",children:[he("span",{children:r.t("errors.network_error")}),he(h,{kind:"secondary",onClick:()=>s(u=>u+1),children:r.t("common.retry")})]});return he(J,{fallback:l,children:he(cn,{fallback:he("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:he(o,{...n,i18n:r})})},a)}i(ct,"EmailOtpStep");import{lazy as fn,Suspense as yn,useMemo as gn,useState as kn}from"react";import{jsx as be,jsxs as hn}from"react/jsx-runtime";var Sn={load:i(()=>import("../eid-view-U2HL2IX7.js"),"load")};function ut({locale:e,strings:t,...n}){let r=C(e,t),[a,s]=kn(0),o=gn(()=>fn(()=>Sn.load().then(u=>({default:u.EidView}))),[a]),l=hn(x,{tone:"danger",children:[be("span",{children:r.t("errors.network_error")}),be(h,{kind:"secondary",onClick:()=>s(u=>u+1),children:r.t("common.retry")})]});return be(J,{fallback:l,children:be(yn,{fallback:be("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:be(o,{...n,i18n:r})})},a)}i(ut,"EidStep");import{useMemo as bn}from"react";import{jsx as dt,jsxs as vn}from"react/jsx-runtime";function pt({step:e,locale:t,strings:n,className:r,onError:a}){let s=C(t,n),{busy:o,error:l,run:u}=no(s,a),p=bn(()=>e.choice.options.flatMap(g=>{let k=oo(g,s),m=to[g.service];return k===null?[]:[{id:g.id,label:k,glyph:m&&dt(D,{name:m})}]}),[e.choice.options,s]),f=e.choice.options.find(g=>g.service==="national_eid");return vn("div",{className:r,children:[dt(Vt,{title:s.t("method.heading"),description:s.t("method.description"),options:p,busy:o,error:l,focus:!0,testId:"sekyro-method",onChoose:g=>u(()=>e.choose(g))}),f?.nationalEid?.afterPass==="continue"?dt(B,{view:"EidContinueHint",i18n:s,provider:f.nationalEid.providerName,quiet:!0}):null]})}i(pt,"MethodChoice");import{isValidNni as Cn,normalizeNni as yo}from"@sekyro/web";import{useId as wn,useState as mt}from"react";import{Fragment as xn,jsx as A,jsxs as ve}from"react/jsx-runtime";var Nn=new Set(["nni_not_found","registry_record_not_found"]),_n=new Set(["nni_invalid","id_number_invalid"]);function Ze({step:e,locale:t,strings:n,className:r,onError:a}){let s=C(t,n),{t:o}=s,[l,u]=mt(""),[p,f]=mt(!1),[g,k]=mt(null),m=wn(),y=e.attemptsExhausted,w=i(async H=>{f(!0),k(null);try{await H()}catch(V){k(ue(V,s.strings)),a?.(V)}finally{f(!1)}},"run"),N=i(H=>{if(H.preventDefault(),e.source!=="typed"){w(()=>e.confirm());return}let V=yo(l);if(!/^\d{10}$/.test(V))return k("population.invalid");if(!Cn(V))return k("population.reason_id_number_invalid");w(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(V):e.submitNni(V))},"onSubmit"),O=Ye(s,e.attemptsRemaining,y),R=e.reason!==void 0&&Nn.has(e.reason),S=e.reason!==void 0&&_n.has(e.reason),I=ve(xn,{children:[e.reason==="registry_unavailable"?ve(x,{tone:"warning",children:[A("span",{children:o("population.reason_registry_unavailable")}),A("span",{children:O})]}):null,R&&e.canUseDocument?ve(x,{tone:"warning",children:[A("span",{children:o("population.reason_registry_record_not_found_or_document")}),A("span",{children:O}),A(h,{kind:"secondary",disabled:p,onClick:()=>{w(()=>e.useDocument())},children:o("population.useDocument")})]}):null,R&&!e.canUseDocument||S?ve(x,{tone:"danger",children:[A("span",{children:o(R?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),A("span",{children:O})]}):null,y&&e.reason===void 0?A(x,{tone:"danger",children:A("span",{children:O})}):null,g!==null?A(x,{tone:"danger",children:A("span",{children:o(g)})}):null]}),[_,W,M]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return ve("form",{className:`sekyro-step${r?` ${r}`:""}`,"aria-labelledby":m,onSubmit:N,noValidate:!0,children:[A(Q,{id:m,title:o(_),lead:o(W)}),I,e.source==="typed"?ve("div",{className:"sekyro-field",children:[A("label",{className:"sekyro-label",htmlFor:`${m}-id-number`,children:o("population.label")}),A("input",{id:`${m}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:l,"aria-describedby":`${m}-id-number-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_id_number_invalid"||void 0,onChange:H=>{k(null),u(yo(H.target.value).replace(/\D/g,"").slice(0,10))}}),A("span",{id:`${m}-id-number-help`,className:"sekyro-help",children:o("population.helper")})]}):null,A(X,{children:y?null:A(h,{type:"submit",full:!0,disabled:p,"aria-busy":p||void 0,children:o(M)})})]})}i(Ze,"IdNumberEntry");function Pn(e){return Ze(e)}i(Pn,"NniEntry");import{acceptedIssuers as Rn,acceptedTypesFor as bo,warmDocumentCapture as On}from"@sekyro/web";import{lazy as Bn,Suspense as Ln,useEffect as An,useMemo as Vn,useState as yt}from"react";import{acceptedIssuers as In,acceptedTypesFor as ft}from"@sekyro/web";import{useEffect as go,useMemo as ko,useState as So}from"react";import{jsx as z,jsxs as Qe}from"react/jsx-runtime";var Tn=220;function En(e,t,n=[],r){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(u=>({code:u,name:a?.of(u)??u})),o=new Intl.Collator(e),l=i(u=>{if(u===r)return-1;let p=n.indexOf(u);return p<0?n.length:p},"rank");return s.sort((u,p)=>l(u.code)-l(p.code)||o.compare(u.name,p.name))}i(En,"countryNames");function ho({step:e,i18n:t,issuer:n,onPicked:r,ageStepUp:a=!1}){let{t:s,locale:o}=t,l=ko(()=>In(e.documents),[e.documents]),u=ko(()=>En(o,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[o,l,e.documents,e.detectedCountry]),p=l.length===1?l[0]:null,[f,g]=So(n??p),[k,m]=So(null),y=p===null?[]:ft(e.documents,p),w=p!==null&&y.length===1?y[0]:null;go(()=>{p!==null&&w!==null&&e.selectDocument(p,w)},[p,w]);let N=i((S,I)=>{e.selectDocument(S,I),r?.()},"pick"),O=i(S=>{let I=ft(e.documents,S);I.length===1?N(S,I[0]):g(S)},"chooseIssuer");if(go(()=>{if(k===null||f===null)return;let S=setTimeout(()=>N(f,k),Tn);return()=>clearTimeout(S)},[k]),ze(f!==null&&l.length>1&&n===void 0?()=>{g(null),m(null)}:null),w!==null)return null;if(f===null)return Qe("section",{className:"sekyro-step",children:[z(Q,{title:s("doc.countryTitle"),lead:s(a?"doc.ageStepUp":"doc.pickDescription")}),z(Gt,{countries:u,label:s("doc.countryLabel"),searchPlaceholder:s("doc.countrySearch"),noMatch:s("doc.noCountryMatch"),onPick:O}),z(X,{children:null})]});let R=ft(e.documents,f);return Qe("section",{className:"sekyro-step",children:[z(Q,{title:s("doc.pickTitle"),lead:s(a&&p!==null?"doc.ageStepUp":"native.doc.holdIt")}),z("div",{className:"sekyro-choices",children:R.map(S=>Qe("button",{type:"button",className:"sekyro-card","aria-pressed":k===S,disabled:k!==null&&k!==S,onClick:()=>m(S),children:[z("span",{className:"sekyro-card__tile",children:z(D,{name:S==="passport"?"passport":"card"})}),Qe("span",{className:"sekyro-card__body",children:[z("span",{className:"sekyro-card__title",children:s(`doc.type.${S}`)}),z("span",{className:"sekyro-card__sub",children:s(`doc.sub.${S}`)})]}),z("span",{className:"sekyro-radio","aria-hidden":"true"})]},S))}),l.length>1?z("button",{type:"button",className:"sekyro-link",onClick:()=>{g(null),m(null)},children:s("native.doc.changeCountry")}):null,z(X,{children:null})]})}i(ho,"DocumentPicker");import{jsx as se,jsxs as Dn}from"react/jsx-runtime";var Fn={load:i(()=>import("../document-capture-view-5FWUD45F.js"),"load")};function gt({step:e,locale:t,strings:n,className:r,liveMrz:a,barcodeAssetBaseUrl:s}){let o=C(t,n),[l,u]=yt(0),[p,f]=yt(null),g=Rn(e.documents),k=g.length>1,m=e.issuer!==null&&bo(e.documents,e.issuer).length>1,y=e.documentType===null||e.issuer===null||p!==null,w=g.length===1&&bo(e.documents,g[0]).length===1,[N]=yt(()=>y&&!w),O=e.ageStepUp===!0,R=Vn(()=>Bn(()=>Fn.load().then(I=>({default:I.DocumentCaptureView}))),[l]);An(()=>{On()},[]);let S=Dn(x,{tone:"danger",children:[se("span",{children:o.t("errors.network_error")}),se(h,{kind:"secondary",onClick:()=>u(I=>I+1),children:o.t("doc.retryCamera")})]});return se("div",{className:r,children:y?se(ho,{step:e,i18n:o,ageStepUp:O&&p===null&&N,...p==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>f(null)}):se(J,{fallback:S,children:se(Ln,{fallback:se("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:se(R,{step:e,i18n:o,ageLead:O&&!N,liveMrz:e.documentType==="drivers_license"?void 0:a,barcodeAssetBaseUrl:s,...k?{onChangeCountry:i(()=>f("country"),"onChangeCountry")}:{},...m?{onChangeDocument:i(()=>f("document"),"onChangeDocument")}:{}})})},l)})}i(gt,"DocumentCapture");import{warmPortraitCapture as Mn}from"@sekyro/web";import{Component as Hn,lazy as vo,Suspense as Co,useContext as Un,useEffect as $n,useMemo as wo,useState as No}from"react";import{jsx as E,jsxs as Je}from"react/jsx-runtime";var Kn={load:i(()=>import("../portrait-capture-view-UYISOXXV.js"),"load")},zn={load:i(()=>import("../portrait-review-view-67VI2Q6K.js"),"load")},St=class St extends Hn{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(St,"LoadBoundary");var Xe=St;function Gn({step:e,i18n:t}){let{t:n}=t,r=ke();return Je("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[E("h2",{ref:r,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?E("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?Je(x,{tone:"danger",children:[E("span",{children:n("portrait.uploadFailed")}),E(h,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):E("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Gn,"MatchPhase");function kt({step:e,locale:t,strings:n,className:r,assetBaseUrl:a,verification:s}){let o=C(t,n),l=Ft(s),u=Un(qe),[p,f]=No(0),[g,k]=No(null),m=wo(()=>vo(()=>Kn.load().then(M=>({default:M.PortraitCaptureView}))),[p]),y=wo(()=>vo(()=>zn.load().then(M=>({default:M.PortraitScreens}))),[p]),w=typeof e.uploadPortrait=="function",N=w?e.photo?.source??"camera":"camera",O=w&&N!=="camera"&&e.photo?.uploadOffered===!0,R=N!=="upload",S=N==="upload"?"upload":N==="choice"?g??e.photo?.pick??"source":"camera",I=e.phase==="capture"&&e.photo?.cameraOnPhone===!0;if($n(()=>{e.phase==="capture"&&S==="camera"&&!I&&Mn()},[e.phase,S,I]),e.phase==="match")return E("div",{className:r,children:E(Gn,{step:e,i18n:o})});let _=E("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")});if(u!==null&&(u.busy||u.failed!==null)&&e.phase==="capture"&&S==="camera")return Je("section",{className:`sekyro-step${r?` ${r}`:""}`,children:[E(Q,{title:o.t("session.steps.portrait.title")}),E(X,{children:E(h,{kind:"secondary",full:!0,disabled:u.busy,onClick:u.reset,children:o.t("portrait.retryCamera")})})]});if(e.phase==="review"||S!=="camera"||I)return E("div",{className:r,children:E(Xe,{fallback:E(h,{kind:"ghost",onClick:()=>f(M=>M+1),children:o.t("common.retry")}),children:E(Co,{fallback:_,children:E(y,{screen:e.phase==="review"?"review":I&&S==="camera"?"phone":S==="camera"?"review":S,step:e,i18n:o,...R?{onCamera:i(()=>k("camera"),"onCamera")}:{},onUpload:()=>k("upload"),onDeclined:()=>k(null)})})},p)});if(!l.settled)return E("div",{className:r,children:_});let W=Je(x,{tone:"danger",children:[E("span",{children:o.t("errors.network_error")}),E(h,{kind:"secondary",onClick:()=>f(M=>M+1),children:o.t("portrait.retryCamera")})]});return E("div",{className:r,children:E(Xe,{fallback:W,children:E(Co,{fallback:_,children:E(m,{step:e,i18n:o,...a!==void 0?{assetBaseUrl:a}:{},...O?{onUpload:i(()=>k("upload"),"onUpload")}:{}})})},p)})}i(kt,"PortraitCapture");import{lazy as qn,Suspense as Yn,useMemo as Wn,useState as Zn}from"react";import{jsx as de,jsxs as Xn}from"react/jsx-runtime";var Qn={load:i(()=>import("../proof-of-address-view-EIQXYYM3.js"),"load")};function ht({step:e,locale:t,strings:n,className:r}){let a=C(t,n),[s,o]=Zn(0),l=Wn(()=>qn(()=>Qn.load().then(p=>({default:p.ProofOfAddressView}))),[s]),u=Xn(x,{tone:"danger",children:[de("span",{children:a.t("errors.network_error")}),de(h,{kind:"secondary",onClick:()=>o(p=>p+1),children:a.t("common.retry")})]});return de("div",{className:r,children:de(J,{fallback:u,children:de(Yn,{fallback:de("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:a.t("common.loading")}),children:de(l,{step:e,i18n:a})})},s)})}i(ht,"ProofOfAddress");import{lazy as Jn,Suspense as jn,useMemo as er,useState as tr}from"react";import{jsx as pe,jsxs as nr}from"react/jsx-runtime";var or={load:i(()=>import("../form-view-WVPN7ZUY.js"),"load")};function bt({step:e,locale:t,strings:n,className:r,onError:a}){let s=C(t,n),[o,l]=tr(0),u=er(()=>Jn(()=>or.load().then(f=>({default:f.FormView}))),[o]),p=nr(x,{tone:"danger",children:[pe("span",{children:s.t("errors.network_error")}),pe(h,{kind:"secondary",onClick:()=>l(f=>f+1),children:s.t("common.retry")})]});return pe("div",{className:r,children:pe(J,{fallback:p,children:pe(jn,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:pe(u,{step:e,i18n:s,...a!==void 0?{onError:a}:{}})})},o)})}i(bt,"FormStep");import{cameraUnavailableCauseOf as Nr}from"@sekyro/web";import{useCallback as j,useContext as _r,useEffect as Ve,useId as Pr,useMemo as Tt,useRef as ee,useState as Y}from"react";var vt={light:{lineBrand:"#0d3b66",successSoft:"#d5f0e8",successFg:"#005341",onSuccess:"#ffffff",warningSoft:"#fff7e6",warningFg:"#735003",onWarning:"#191a1b",dangerSoft:"#ffdada",dangerFg:"#ca0f07",onDanger:"#ffffff",info:"#0563d4",infoSoft:"#d3e5ff",infoFg:"#064da5",onInfo:"#ffffff"},dark:{lineBrand:"#3f80bf",successSoft:"#002c23",successFg:"#53ffd4",onSuccess:"#030303",warningSoft:"#463102",warningFg:"#ffd98a",onWarning:"#030303",dangerSoft:"#9c1008",dangerFg:"#ffbbbb",onDanger:"#030303",info:"#5da9ff",infoSoft:"#063778",infoFg:"#acd0ff",onInfo:"#030303"},sizes:{buttonHeight:"52px",controlRadius:"10px",cardRadius:"16px",fieldRadius:"10px",iconTile:"56px",iconTileRadius:"16px",headerTile:"40px",choiceTile:"40px",tileRadius:"10px",resultDisc:"64px",resultRing:"8px",progressHeight:"4px",focusRing:"2px",focusRingOffset:"2px",otpBox:"60px",choiceMinHeight:"76px",stepGap:"32px",headingGap:"12px"},motion:{page:"320ms",easeOut:"cubic-bezier(0.16, 1, 0.3, 1)"}};var Be={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},rr=["danger","success","warning","info"];function Ct(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}i(Ct,"channel");function _o(e){let t=Ct(parseInt(e.slice(1,3),16)),n=Ct(parseInt(e.slice(3,5),16)),r=Ct(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*r}i(_o,"luminance");function sr(e,t){let n=_o(e),r=_o(t),a=Math.max(n,r),s=Math.min(n,r);return(a+.05)/(s+.05)}i(sr,"contrastRatio");function Po(e,t){return Math.min(...rr.map(n=>sr(Be[e][n].fg,t)))}i(Po,"worstAgainst");function xo(e,t,n){return Math.min(Po(e,t),Po(e,n))}i(xo,"worstStatusContrast");function Io(e,t){return xo("light",e,t)>=xo("dark",e,t)?"light":"dark"}i(Io,"statusSchemeFor");import{useRef as lr,useState as cr}from"react";import{useEffect as ir,useId as ar,useRef as wt}from"react";import{jsx as Ce,jsxs as To}from"react/jsx-runtime";function je({open:e,title:t,closeLabel:n,onClose:r,children:a,actions:s,role:o,testId:l,returnFocus:u}){let p=wt(null),f=wt(null),g=wt(!1),k=ar();return ir(()=>{let m=p.current;if(m!==null){if(e&&!m.open?(f.current=typeof document>"u"?null:document.activeElement,typeof m.showModal=="function"?m.showModal():m.setAttribute("open","")):!e&&m.open&&(typeof m.close=="function"?m.close():m.removeAttribute("open")),!e&&g.current){let y=u?.current??(f.current instanceof HTMLElement?f.current:null);f.current=null,y?.focus()}g.current=e}},[e,u]),Ce("dialog",{ref:p,className:"sekyro-dialog","aria-labelledby":k,...o==="alertdialog"?{role:o}:{},"data-testid":l,onCancel:m=>{m.preventDefault(),r()},onClick:m=>{m.target===m.currentTarget&&r()},children:To("div",{className:"sekyro-dialog__panel",children:[To("div",{className:"sekyro-dialog__head",children:[Ce("h2",{id:k,className:"sekyro-dialog__title",children:t}),n!==void 0?Ce("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:r,children:Ce(D,{name:"close"})}):null]}),a!==void 0?Ce("div",{className:"sekyro-dialog__body",children:a}):null,s!==void 0?Ce("div",{className:"sekyro-dialog__actions",children:s}):null]})})}i(je,"FlowDialog");import{jsx as Le,jsxs as Eo}from"react/jsx-runtime";var ur=["intro","data","processing","sharing","retention"];function Ro({i18n:e,purpose:t="identity"}){let{t:n}=e,[r,a]=cr(!1),s=lr(null),[o,l=""]=n("consent.short").split("{terms}");return Eo("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[Eo("p",{className:"sekyro-consent__line",children:[o,Le("button",{ref:s,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:n("consent.termsLink")}),l]}),Le(je,{open:r,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>a(!1),returnFocus:s,testId:"sekyro-consent-terms",children:Le("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?Le(B,{view:"HumanConsentTerms",i18n:e,quiet:!0}):ur.map(u=>Le("p",{children:n(`consent.terms.${u}`)},u))})})]})}i(Ro,"ConsentNotice");function Oo(e){let t=e.trim().split(/\s+/).filter(r=>r!=="");return(t.length>=2?[t[0],t[1]].map(r=>Array.from(r??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(Oo,"initials");import{useSyncExternalStore as dr}from"react";var Ao=i(e=>({colors:{...e?U.dark:U.light},radius:U.radius,fontFamily:U.font}),"brandTheme"),Xi=Ao(!1),Bo=/^#[0-9a-f]{6}$/i;function Nt(e,t,n){if(t)return null;let r=rt(e).colors,a=n?.colors?.bg??r?.bg,s=n?.colors?.surface??r?.surface;return a===void 0&&s===void 0||a!==void 0&&!Bo.test(a)||s!==void 0&&!Bo.test(s)?null:Io(a??U.light.bg,s??U.light.surface)}i(Nt,"partnerStatusScheme");function et(e,t,n){let r=rt(e);if(n&&r.colors!==void 0){let{brand:a,brandFg:s}=r.colors;a!==void 0&&yr(a,U.dark.bg)>=3?r.colors={brand:a,ring:a,...s!==void 0?{brandFg:s}:{}}:delete r.colors}if(Nt(e,n,t)==="dark"){let a=Be.dark;r.colors={...r.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return Ke(Ao(n),r,Mt(t))}i(et,"verificationTheme");function tt(e){let t=dr(fr,mr,()=>!1);return e==="dark"||e==="system"&&t}i(tt,"useDarkScheme");var pr="(prefers-color-scheme: dark)",Vo=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(pr):null,"media"),mr=i(()=>Vo()?.matches??!1,"prefersDark");function fr(e){let t=Vo();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(fr,"subscribe");function yr(e,t){let[n,r]=[Lo(e),Lo(t)];return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}i(yr,"contrast");function Lo(e){let t=[1,3,5].map(n=>{let r=Number.parseInt(e.slice(n,n+2),16)/255;return r<=.03928?r/12.92:((r+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(Lo,"luminance");var _t="sekyro.testerGate";function Pt(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}i(Pt,"store");function Fo(e=Date.now()){try{Pt()?.setItem(_t,String(e))}catch{}}i(Fo,"rememberTester");function Do(e=Date.now()){try{let t=Number(Pt()?.getItem(_t)??"");return Number.isFinite(t)&&t>0&&e-t<2592e6}catch{return!1}}i(Do,"rememberedTester");function Mo(){try{Pt()?.removeItem(_t)}catch{}}i(Mo,"forgetTester");import{useEffect as gr,useId as kr,useState as Sr}from"react";import{jsx as L,jsxs as me}from"react/jsx-runtime";var Ho=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),hr={review:{icon:"pending",tone:"info"},cooldown:{icon:"timer",tone:"info"},rejected:{icon:"close",tone:"neutral"},policy:{icon:"close",tone:"neutral"},inconclusive:{icon:"warning",tone:"neutral"},unavailable:{icon:"timer",tone:"neutral"},expired:{icon:"timer",tone:"neutral"}};function br({screen:e}){if(e==="verified")return me("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[L("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"54",pathLength:"1"}),L("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),L("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]});let{icon:t,tone:n}=hr[e];return L("span",{className:`sekyro-tile sekyro-tile--${n} sekyro-outcome-tile`,"aria-hidden":"true","data-screen":e,children:L(D,{name:t})})}i(br,"OutcomeMark");function vr({label:e,id:t,copied:n}){let[r,a]=Sr(!1);return gr(()=>{if(!r)return;let s=setTimeout(()=>a(!1),1600);return()=>clearTimeout(s)},[r]),me("button",{type:"button",className:`sekyro-reference${r?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[L("span",{"aria-live":"polite",children:r?n:e}),L("bdi",{dir:"ltr",children:t}),L(D,{name:"copy"})]})}i(vr,"ReferenceLine");function Cr({step:e,t}){let n=e.context.sandbox?e.context.simulation?.reason:void 0;return n===void 0?null:me(Re,{tone:"warning",role:"status",testId:"sekyro-simulated-notice",children:[L("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:L(D,{name:"info"})}),me("div",{className:"sekyro-notice__body","data-reason":n,children:[L("strong",{children:t("sandbox.simulatedTitle")}),L("span",{children:t(n==="no_testers"?"sandbox.simulatedNoTesters":"sandbox.simulatedGate")})]})]})}i(Cr,"SimulationNotice");function wr(e,t){return e==="expired"?"native.result.expiredTitle":e!=="verified"?`session.result.${e}.title`:t.level===3?"session.result.verified.title":t.level===1&&t.assurance==="contact_phone"?"session.result.verified.titlePhone":t.level===1&&t.assurance==="contact_email"?"session.result.verified.titleEmail":t.level===1?"session.result.verified.titleContact":"session.result.verified.titleHuman"}i(wr,"resultTitleKey");function xt({step:e,locale:t,strings:n,className:r,onClose:a}){let s=C(t,n),{t:o}=s,l=kr(),u=ke(),p=e.context.orgName,f=e.reasonCode??"",g=e.display==="platform_unsupported"?"policy":e.display,k=i(y=>(p!==""||y==="verified")&&y!=="cooldown"?o(`native.result.${y}`,{org:p}):o(`session.result.${y}.description`),"partnerLine"),m;switch(e.display){case"rejected":m=Ho.has(ot(f))?o("session.result.detailsMismatch",{org:p}):k("rejected");break;case"policy":{if(Ho.has(ot(f)))m=o("session.result.detailsMismatch",{org:p});else if(f==="device_velocity_exceeded")m=o("session.result.deviceVelocity",{org:p});else if(f==="capture_tampered")m=o("session.result.deviceStop");else if(f==="camera_unavailable")m=o("reasons.camera_unavailable",{org:p});else if(f==="underage_estimated")m=o("reasons.underage_estimated");else if(f==="starter_credit_claimed")m=o("reasons.starter_credit_claimed");else if(f==="blocked_by_org")m=o("reasons.blocked_by_org");else{let y=f===""?null:Ot(f);m=y!==null?o(y,{org:p}):k("policy")}break}case"cooldown":{let y=Bt(s.locale,e.retryAfter);m=y!==null?o(y.key,{time:y.time}):o("session.result.cooldown.description");break}case"platform_unsupported":m=o("result.platform_unsupported");break;default:m=k(g)}return me("section",{className:`sekyro-result${r?` ${r}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[me("div",{className:"sekyro-result__body",children:[L(br,{screen:g}),me("div",{className:"sekyro-heading",children:[L("h2",{id:l,ref:u,tabIndex:-1,className:"sekyro-text-body",children:o(wr(g,e.result))}),L("p",{className:"sekyro-text-muted",children:m})]}),L(Cr,{step:e,t:o}),L(vr,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),a!==void 0?L("div",{className:"sekyro-actions",children:L(h,{full:!0,onClick:a,children:o("native.result.continue",{org:p})})}):null]})}i(xt,"VerificationResultScreen");import{Fragment as Ae,jsx as c,jsxs as G}from"react/jsx-runtime";function xr(e,t,n){let r=t?U.dark:U.light,a=t?U.roles.dark:U.roles.light,s=e.colors??{},o={},l=s.fg===r.fg&&s.surface===r.surface;s.brand===r.brand&&s.surface===r.surface&&(o["--sekyro-color-brand-soft"]=a.brandSoft),l&&(o["--sekyro-color-line"]=a.line,o["--sekyro-color-line-subtle"]=a.lineSubtle,o["--sekyro-color-line-strong"]=a.lineStrong,o["--sekyro-color-sunken"]=a.sunken),s.fgMuted===r.fgMuted&&s.surface===r.surface&&(o["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===U.font&&(o["--sekyro-font-display"]=U.fontDisplay);let u=t?vt.dark:vt.light;if(o["--sekyro-color-success-soft"]=u.successSoft,o["--sekyro-color-success-fg"]=u.successFg,o["--sekyro-color-on-success"]=u.onSuccess,o["--sekyro-color-warning-soft"]=u.warningSoft,o["--sekyro-color-warning-fg"]=u.warningFg,o["--sekyro-color-danger-soft"]=u.dangerSoft,o["--sekyro-color-danger-fg"]=u.dangerFg,o["--sekyro-color-on-danger"]=u.onDanger,o["--sekyro-color-info-soft"]=u.infoSoft,o["--sekyro-color-info-fg"]=u.infoFg,s.brand===r.brand&&(o["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let p=Be[n];for(let f of["danger","success","warning","info"])o[`--sekyro-color-${f}-soft`]=p[f].soft,o[`--sekyro-color-${f}-fg`]=p[f].fg;o["--sekyro-color-on-success"]=p.success.on,o["--sekyro-color-on-danger"]=p.danger.on}return o}i(xr,"flowRoles");function Et(e){let{verification:t,locale:n,strings:r,onStep:a,onResult:s}=e,{step:o,error:l}=at(t);Ve(()=>{o!==null&&a?.(o)},[o,a]),Ve(()=>s===void 0?void 0:t.on("result",s),[t,s]);let u=tt(e.colorScheme??"light"),p=o?.context.branding,f=et(p,e.theme,u),[g,k]=Y(!1),m=`sekyro-verification${u?" sekyro-verification--dark":""}${g?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,y=ee(e.onClose);y.current=e.onClose;let w=ee(o);w.current=o;let N=j(()=>{let _=w.current;y.current?.(_?.kind==="result"?{reason:"finished",result:_.result}:{reason:"cancelled"})},[]),[O,R]=Y(null),S=j(()=>{let _=w.current;_!==null&&_.kind!=="result"&&_.context.consentRecorded?R("close"):N()},[N]),I=Tt(()=>t.reportCaptureIssue===void 0?null:_=>t.reportCaptureIssue?.(_),[t]);return c(Ut,{theme:f,className:m,children:c(Oe,{locale:n,...r!==void 0?{strings:r}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:xr(f,u,Nt(p,u,e.theme)),children:c(Qt.Provider,{value:k,children:c(st.Provider,{value:e.onClose!==void 0?N:void 0,children:c(Ge.Provider,{value:e.onClose!==void 0?S:void 0,children:G(At.Provider,{value:I,children:[c(Br,{...e,step:o,error:l,immersive:g,onLeaveAsk:()=>R("history"),onClosed:N}),c(Er,{open:O!==null,onStay:()=>{O==="history"&&It(),R(null)},onLeave:()=>{let _=O;R(null),_==="close"||e.onClose!==void 0?N():typeof window<"u"&&zo()}})]})})})})})})})}i(Et,"SekyroVerification");function Ir(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,r=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof r=="string"&&r!==""&&typeof a=="string"&&a!==""?{title:r,description:a}:null}i(Ir,"processingCopyOf");function Tr({error:e,retry:t}){let{t:n}=C(),r=ke();return G(Re,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(Rt(e))}),e.retryable?c(h,{ref:r,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}i(Tr,"CameraErrorNotice");var $o="sekyroFlow";function Ko(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[$o]===!0}i(Ko,"onGuard");function It(){if(typeof window>"u"||Ko())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[$o]:!0},"")}i(It,"pushGuard");function zo(){window.history.back()}i(zo,"leaveHistory");function Er({open:e,onStay:t,onLeave:n}){let{t:r}=C();return c(je,{open:e,role:"alertdialog",title:r("leave.title"),onClose:t,testId:"sekyro-leave",actions:G(Ae,{children:[c(h,{full:!0,onClick:t,children:r("leave.stay")}),c(h,{full:!0,kind:"danger",onClick:n,children:r("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:r("leave.body")})})}i(Er,"LeaveDialog");function Rr(e,t){let[n,r]=Y(!1),[a,s]=Y(null),o=e===null?void 0:e.skipCapture,l=ee(o);l.current=o;let u=ee(!1),p=e?.key;Ve(()=>s(null),[p]);let f=j(()=>{if(u.current)return;let y=l.current;y!==void 0&&(u.current=!0,r(!0),s(null),y().catch(w=>s(t.t(ue(w,t.strings)))).finally(()=>{u.current=!1,r(!1)}))},[t]),g=j(()=>s(null),[]),k=o!==void 0,m=t.t("sandbox.skipCapture");return Tt(()=>k?{label:m,busy:n,failed:a,run:f,reset:g}:null,[k,m,n,a,f,g])}i(Rr,"useSkipCapture");function Or({skip:e}){return G(Ae,{children:[e.failed!==null?c(x,{tone:"danger",children:c("span",{children:e.failed})}):null,c(h,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}i(Or,"SkipAction");function Br(e){let{step:t,error:n,slots:r,immersive:a}=e,s=C(),{t:o}=s,[l,u]=Y(!1),[p,f]=Y([]),g=j(d=>(f(P=>[...P,d]),()=>f(P=>P.filter(Z=>Z!==d))),[]),[k,m]=Y(null),y=j(d=>m(()=>d),[]),[w,N]=Y(0),[O,R]=Y(null),S=Rr(t,s),I=t?.context.testerGate!==void 0,[_,W]=Y(!1),M=ee(null);Ve(()=>{!I||M.current!==null||(M.current=Do(),M.current&&W(!0))},[I]);let H=t?.context.purpose??"identity",V=t?.context.returning===!0,fe=e.verification,Ne=H==="human"||t?.context.cameraUnavailableHandled===!0,Fe=fe.reportCameraUnavailable!==void 0&&Ne?d=>fe.reportCameraUnavailable?.(d)??Promise.resolve():void 0,De=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,$=e.handoffUrl,ie=j((d,P)=>Fe===void 0?void 0:c(B,{view:"NoCameraView",i18n:s,quiet:!0,cause:P,onRetry:d,...De?{onContinue:Fe}:{},...$!==void 0?{handoffUrl:$}:{}}),[s,fe,Ne,De,$]),ye=Tt(()=>ro(t),[t]),_e=j((d,P)=>c(so,{start:d,context:P,human:H==="human",returning:V,notice:P.permissionSettled&&P.permission==="denied"?ie(d,"denied"):void 0,...ye!==void 0?{retry:ye}:{}}),[H,V,ie,ye]),q=j((d,P)=>{let Z=Nr(d.kind);return(Z!==void 0?ie(P,Z):void 0)??G(Ae,{children:[c(Tr,{error:d,retry:P}),Z!==void 0&&$!==void 0?c(B,{view:"DesktopHandoffView",i18n:s,quiet:!0,url:$}):null]})},[ie,$,s]),Pe=ee(""),te=e.livenessProps?.slots?.stageOverlay,ae=j(d=>(d.guidance!==""&&!d.coached&&(Pe.current=d.guidance),c(ao,{testId:"sekyro-capture-stage",video:c("video",{ref:d.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:d.settled?o("capture.checkingTitle"):d.guidance!==""?d.guidance:Pe.current,note:d.note,status:d.status,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:te?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>N(P=>P+1),"onClose")},end:d.modeSwitch!=null?c(Lt,{view:d.modeSwitch,className:"sekyro-glass sekyro-glass--label"}):null,children:d.settled||!d.live?null:c(Xt,{onStop:()=>N(P=>P+1)})})),[o,te]),Me=Pr(),He=t,xe=t!==null&&O===t.key&&t.context.switchable!==void 0,oe=k??(t===null||t.kind==="result"?null:xe?()=>R(null):t.context.switchable!==void 0&&typeof He?.chooseOption=="function"?()=>R(t.key):null),ne=ee(oe);ne.current=oe;let le=ee(t);le.current=t;let ce=ee({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});ce.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let Ie=e.backNavigation==="history";if(Ve(()=>{if(!Ie||typeof window>"u")return;It();let d=i(()=>{if(Ko())return;let P=le.current,Z=ne.current;Z!==null?(Z(),It()):P?.kind!=="result"&&P?.context.consentRecorded===!0?ce.current.ask():ce.current.hostClose?ce.current.closed():zo()},"onPop");return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[Ie]),n!==null)return c(Re,{tone:"danger",children:c("span",{children:o(ue(n,s.strings))})});if(t===null)return G("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:o("common.loading")}),c("span",{className:"sekyro-skeleton__bar is-title"}),c("span",{className:"sekyro-skeleton__bar"}),c("span",{className:"sekyro-skeleton__bar is-short"}),c("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:F}=t,re=i(d=>{u(!0),d().finally(()=>u(!1))},"refresh"),Ue=r?.header??c(Ar,{context:F,headerId:Me,end:r?.headerEnd,...oe!==null?{onBack:oe}:{}}),T,ge=xe;if(_&&e.verification.testerGate!==void 0)T=c(nt.Provider,{value:ae,children:c(B,{view:"TesterGateView",i18n:s,verification:e.verification,attemptsLeft:F.testerGate?.attemptsLeft??0,livenessProps:{...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:e.livenessProps?.slots?.intro??_e},locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice},onBound:()=>Fo(),onDone:d=>{d&&Mo(),W(!1)}})});else if(ge)T=c(B,{view:"LaneChoiceView",i18n:s,step:t,onClose:()=>R(null)});else switch(t.kind){case"phone_otp":T=c(lt,{step:t});break;case"email_otp":T=c(ct,{step:t});break;case"method":T=c(pt,{step:t});break;case"registry":T=c(Ze,{step:t});break;case"document":T=c(gt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{},...e.documentBarcodeAssetBaseUrl!==void 0?{barcodeAssetBaseUrl:e.documentBarcodeAssetBaseUrl}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,P={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??_e,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:q}:{}},...w>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};T=c(nt.Provider,{value:ae,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(B,{view:"LivePhotoLiveness",i18n:s,step:t,livenessProps:P,sekyroIntro:d===void 0},w):c(Dt,{...P},w)});break}case"portrait":T=G(Ae,{children:[t.retakeOnly?c(B,{view:"PortraitRetakeNotice",i18n:s,quiet:!0}):null,c(kt,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"proof_of_address":T=c(ht,{step:t});break;case"form":T=c(bt,{step:t});break;case"contact_choice":T=c(B,{view:"ContactChoiceView",i18n:s,step:t});break;case"choice":T=c(B,{view:"GenericChoiceView",i18n:s,step:t});break;case"identity_summary":T=c(B,{view:"IdentitySummaryView",i18n:s,step:t});break;case"mobile_required":{let d=t.checkType==="doc_ocr"?o("handoff.lead.document"):t.checkType==="portrait_icao"?o("handoff.lead.portrait"):t.checkType==="poa"?o("handoff.lead.poa"):void 0;T=e.handoffUrl!==void 0?c(B,{view:"HandoffView",i18n:s,url:e.handoffUrl,refresh:t.refresh,...d!==void 0?{lead:d}:{}}):c(We,{tone:"brand",icon:"smartphone",title:o("handoff.title"),actions:c(h,{kind:"secondary",full:!0,disabled:l,onClick:()=>re(t.refresh),children:o("common.refresh")}),children:c("p",{children:d??o("reasons.mobile_required")})});break}case"native_app_required":T=c(B,{view:"NativeAppView",i18n:s,org:F.orgName,nativeApp:t.nativeApp,...e.handoffUrl!==void 0?{fallbackUrl:e.handoffUrl}:{},refresh:t.refresh,footer:c(Uo,{org:F.orgName})});break;case"processing":{let d=Ir(s.strings,t.service);T=c(We,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:d?.title??o("session.processing.title"),actions:t.stalled?c(h,{kind:"secondary",full:!0,disabled:l,onClick:()=>re(t.refresh),children:o("common.refresh")}):null,children:c("p",{children:d?.description??o("session.processing.description")})});break}case"eid":T=c(ut,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";T=c(We,{tone:"neutral",icon:"smartphone",title:o(d?"needsApp.title":"unsupported.title"),actions:c(Uo,{org:F.orgName}),children:c("p",{children:d?F.orgName!==""?o("needsApp.description",{org:F.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:F.orgName})})});break}case"result":T=r?.result?.(t)??c(Lr,{step:t});break;default:{let d=t;T=null}}let Te=!a&&!F.consentRecorded&&t.kind!=="result"?c(Ro,{i18n:s,purpose:F.purpose}):null,$e=S!==null&&!a&&!ge&&!_?c(Or,{skip:S}):null,Ee=I&&!_&&!a&&!ge&&e.verification.testerGate!==void 0?c(B,{view:"TesterGateAction",i18n:s,quiet:!0,onOpen:()=>W(!0)}):null,v=$e===null&&Ee===null?Te:G(Ae,{children:[Ee,$e,Te]});return c(Zt.Provider,{value:y,children:c(qe.Provider,{value:S,children:c(io.Provider,{value:e.handoffUrl,children:G(Wt.Provider,{value:v===null?null:{node:v,owner:p[0]??null,claim:g},children:[a?null:Ue,!a&&t.kind!=="result"&&F.sections.length>1?c(Vr,{context:F,current:t.section,i18n:s}):null,c(jt,{pageKey:t.key,children:T}),!a&&!ge&&t.kind!=="result"&&t.context.switchable!==void 0?c(B,{view:"LaneSwitch",i18n:s,step:t,onOpen:()=>R(t.key),quiet:!0},t.key):null,p.length===0?v:null,a?null:r?.footer!==void 0?r.footer:F.branding?.hideAttribution===!0?null:G("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c(D,{name:"lock"}),o("shell.verifiedBy")]})]})})})})}i(Br,"Body");function Uo({org:e}){let{t}=C(),n=_r(st);return n===void 0?null:c(h,{full:!0,onClick:n,children:t("native.result.continue",{org:e})})}i(Uo,"BackToOrg");function Lr({step:e}){return c(Ge.Consumer,{children:t=>c(xt,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Lr,"ResultPage");function Ar({context:e,headerId:t,end:n,onBack:r}){let{t:a}=C(),[s,o]=Y(!1),l=s?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:G("div",{className:"sekyro-org",children:[r!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:r,"data-testid":"sekyro-back",children:c(D,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?c("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>o(!0)}):Oo(e.orgName)}),G("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),e.sandbox?c("span",{className:"sekyro-sandbox-badge","data-testid":"sekyro-sandbox-badge",children:a("app.sandboxBadge")}):null,n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(Ge.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:p,children:c(D,{name:"close"})}):null})]})})}i(Ar,"OrgHeader");function Vr({context:e,current:t,i18n:n}){let r=t===null?-1:e.sections.indexOf(t),a=e.progress,s=a!==void 0&&a.length===e.sections.length?a:e.sections.map((o,l)=>({id:o,state:l<r?"done":l===r?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:s.map(({id:o,state:l})=>c("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(Vr,"SectionProgress");import{useEffect as Fr,useState as Go}from"react";import{jsx as we}from"react/jsx-runtime";function Dr(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(Dr,"pageUrl");function Mr({hostedUrl:e,inAppBrowser:t,...n}){let[r,a]=Go(t===!0);Fr(()=>{t===void 0&&it()&&a(!0)},[t]);let[s,o]=Go(!1),l=tt(n.colorScheme??"light"),u=n.handoffUrl??e??Dr();return r&&!s?we(Ht,{theme:Ke(et(void 0,void 0,l),n.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:we(Oe,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:we("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:we(Hr,{url:u,onContinue:()=>o(!0)})})})}):we(Et,{...n,...u!==""?{handoffUrl:u}:{}})}i(Mr,"SekyroFlow");function Hr({url:e,onContinue:t}){let n=C();return we(B,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(Hr,"Prompt");export{gt as DocumentCapture,ut as EidStep,ct as EmailOtpStep,bt as FormStep,Ze as IdNumberEntry,pt as MethodChoice,Pn as NniEntry,lt as PhoneOtpStep,kt as PortraitCapture,ht as ProofOfAddress,Mr as SekyroFlow,Et as SekyroVerification,Oe as StepI18nProvider,xt as VerificationResultScreen,Wo as arSteps,Zo as enSteps,Xo as formatTemplate,Qo as frSteps,it as isInAppBrowser,qo as loadSekyroLocale,Jo as resolveSekyroStrings,Yo as retakeHintStringKey,C as useStepI18n,at as useVerificationStep};
|
package/dist/verification.css
CHANGED
|
@@ -63,6 +63,13 @@
|
|
|
63
63
|
@font-face { font-family: "Sekyro Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/SekyroInter-SemiBold.woff2") format("woff2"); unicode-range: U+0000-017F, U+02BB-02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713, U+FEFF; }
|
|
64
64
|
@font-face { font-family: "Sekyro Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/SekyroGeist-SemiBold.woff2") format("woff2"); unicode-range: U+0000-017F, U+02BB-02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713, U+FEFF; }
|
|
65
65
|
@font-face { font-family: "Sekyro Geist"; font-style: normal; font-weight: 700; font-display: swap; src: url("./fonts/SekyroGeist-Bold.woff2") format("woff2"); unicode-range: U+0000-017F, U+02BB-02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713, U+FEFF; }
|
|
66
|
+
/* Geist's metric-matched local fallbacks (in --sekyro-font-display after "Sekyro Geist"), shown while the title face
|
|
67
|
+
loads: a real bold face sized to Geist 600 (the flow-* titles), so the swap neither moves a title nor draws it in
|
|
68
|
+
synthetic bold, crowded by the titles' negative tracking. size-adjust = Geist 600's mean width over the local face
|
|
69
|
+
on French and English titles; ascent/descent = Geist's 1.005/0.295 em over size-adjust (fontTools, 2026-11-15; the
|
|
70
|
+
same method as @sekyro/brand/font-fallbacks.css, which is tuned at 650 for the website's heroes). */
|
|
71
|
+
@font-face { font-family: "Sekyro Geist Fallback"; font-style: normal; font-weight: 550 1000; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Arimo-Bold"), local("Helvetica Bold"), local("Helvetica-Bold"); ascent-override: 98.41%; descent-override: 28.89%; line-gap-override: 0%; size-adjust: 102.12%; }
|
|
72
|
+
@font-face { font-family: "Sekyro Geist Fallback Roboto"; font-style: normal; font-weight: 550 1000; src: local("Roboto Bold"), local("Roboto-Bold"); ascent-override: 92.61%; descent-override: 27.18%; line-gap-override: 0%; size-adjust: 108.52%; }
|
|
66
73
|
@font-face { font-family: "Sekyro Cairo"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/SekyroCairo-Regular.woff2") format("woff2"); unicode-range: U+0020-00FF, U+0600-06FF, U+2013-2026, U+FB50-FDFF, U+FE70-FEFC; }
|
|
67
74
|
@font-face { font-family: "Sekyro Cairo"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/SekyroCairo-SemiBold.woff2") format("woff2"); unicode-range: U+0020-00FF, U+0600-06FF, U+2013-2026, U+FB50-FDFF, U+FE70-FEFC; }
|
|
68
75
|
@font-face { font-family: "Sekyro Cairo"; font-style: normal; font-weight: 700; font-display: swap; src: url("./fonts/SekyroCairo-Bold.woff2") format("woff2"); unicode-range: U+0020-00FF, U+0600-06FF, U+2013-2026, U+FB50-FDFF, U+FE70-FEFC; }
|
|
@@ -312,27 +319,32 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
312
319
|
.sekyro-phone__lead { position: relative; display: flex; flex: none; align-items: center; align-self: stretch; margin-inline-start: -1rem; padding-inline-start: 1rem; }
|
|
313
320
|
.sekyro-phone__dial { display: inline-flex; align-items: center; gap: 6px; padding-inline-end: 0.75rem; border-inline-end: 1px solid var(--sekyro-color-line); color: var(--sekyro-color-fg); }
|
|
314
321
|
.sekyro-phone__flag { font-size: 1.25rem; line-height: 1; }
|
|
315
|
-
/* Several contact countries (
|
|
316
|
-
.
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
322
|
+
/* Several contact countries or "Another country" (phone rules spec 2026-11-02 §4.2): the segment is a button with a
|
|
323
|
+
chevron; it opens the country list under the field, as the native sheet. */
|
|
324
|
+
.sekyro-phone__pick {
|
|
325
|
+
margin-block: 0; padding-block: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
|
|
326
|
+
border-start-start-radius: var(--sekyro-radius); border-end-start-radius: var(--sekyro-radius);
|
|
320
327
|
}
|
|
321
328
|
/* The chevron is drawn here so the JS bundle carries no extra icon; the tighter segment keeps nine digits in view at 320 px. */
|
|
322
|
-
.sekyro-phone:has(.sekyro-
|
|
329
|
+
.sekyro-phone:has(.sekyro-phone__pick) { padding-inline-end: 0.5rem; }
|
|
323
330
|
/* Nine grouped digits stay in view beside the chevron on the narrowest phones (phone rules spec 2026-11-02 §4.1). */
|
|
324
|
-
@media (max-width: 359px) { .sekyro-phone:has(.sekyro-
|
|
325
|
-
.sekyro-
|
|
326
|
-
.sekyro-
|
|
331
|
+
@media (max-width: 359px) { .sekyro-phone:has(.sekyro-phone__pick) { gap: 0.5rem; padding-inline-end: 0.25rem; } }
|
|
332
|
+
.sekyro-phone__pick .sekyro-phone__dial { gap: 4px; padding-inline-end: 0.5rem; }
|
|
333
|
+
.sekyro-phone__pick .sekyro-phone__dial::after {
|
|
327
334
|
content: ""; inline-size: 7px; block-size: 7px; margin-block-start: -4px; margin-inline-start: 2px;
|
|
328
335
|
border-block-end: 1.5px solid var(--sekyro-color-fg-muted); border-inline-end: 1.5px solid var(--sekyro-color-fg-muted);
|
|
329
336
|
transform: rotate(45deg);
|
|
330
337
|
}
|
|
331
|
-
.sekyro-
|
|
338
|
+
.sekyro-phone__pick[aria-expanded="true"] .sekyro-phone__dial::after { margin-block-start: 4px; transform: rotate(-135deg); }
|
|
339
|
+
.sekyro-phone__pick:focus-visible { outline: none; }
|
|
340
|
+
.sekyro-phone__pick:focus-visible .sekyro-phone__dial { border-radius: 4px; outline: 2px solid var(--sekyro-color-ring); outline-offset: 2px; }
|
|
341
|
+
.sekyro-phone__list { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
332
342
|
.sekyro-phone__input {
|
|
333
343
|
flex: 1; min-inline-size: 0; padding: 0; border: 0; outline: none; background: transparent;
|
|
334
344
|
font: inherit; font-variant-numeric: tabular-nums; color: var(--sekyro-color-fg); caret-color: var(--sekyro-color-brand);
|
|
335
345
|
}
|
|
346
|
+
/* The Form's phone answer: the height of every other field of the form (its text role is set with the Form's fields). */
|
|
347
|
+
.sekyro-phone--compact { min-block-size: 52px; }
|
|
336
348
|
|
|
337
349
|
/* The one-time code: full-width boxes over ONE input (paste and autofill land in it). */
|
|
338
350
|
.sekyro-otp-boxes { position: relative; }
|
|
@@ -409,6 +421,11 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
409
421
|
transform: rotate(calc(45deg * var(--sekyro-inline-sign)));
|
|
410
422
|
}
|
|
411
423
|
.sekyro-row-btn__flag { font-size: 1.375rem; line-height: 1; }
|
|
424
|
+
/* Inside the rounded list (overflow hidden) the focus ring sits inside the row, so it is never clipped. */
|
|
425
|
+
.sekyro-rows .sekyro-row-btn:focus-visible { outline-offset: -2px; }
|
|
426
|
+
.sekyro-row-btn__name { flex: 1; min-inline-size: 0; }
|
|
427
|
+
/* The phone list's calling code: left to right, muted, before the row's chevron. */
|
|
428
|
+
.sekyro-row-btn__detail { color: var(--sekyro-color-fg-muted); font-variant-numeric: tabular-nums; }
|
|
412
429
|
|
|
413
430
|
/* A small label over a group (the ICAO tips' "For your ID photo:"). */
|
|
414
431
|
.sekyro-section-label { margin: 0; font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-fg-muted); }
|
|
@@ -439,6 +456,56 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
439
456
|
border: 1px solid var(--sekyro-color-line); background: var(--sekyro-color-sunken);
|
|
440
457
|
}
|
|
441
458
|
|
|
459
|
+
/* ── Form (spec 2026-11-14 §14.2): one column of questions, choices as touch rows, consents last ── */
|
|
460
|
+
/* Every answer's value in one text role, the body's (17 px: no zoom on focus in iOS Safari): text, numbers, the date's
|
|
461
|
+
parts, the country and the phone number alike. The extra class outweighs a host page's own input rules. */
|
|
462
|
+
.sekyro-root .sekyro-form.sekyro-step :is(input.sekyro-input, textarea.sekyro-input, button.sekyro-form-country, .sekyro-phone, .sekyro-phone__input) {
|
|
463
|
+
font: var(--sekyro-type-flow-body) var(--sekyro-font);
|
|
464
|
+
}
|
|
465
|
+
.sekyro-form-questions { display: flex; flex-direction: column; gap: 1.25rem; }
|
|
466
|
+
.sekyro-form-q { min-inline-size: 0; }
|
|
467
|
+
.sekyro-form-group { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; border: 0; }
|
|
468
|
+
.sekyro-form-group > legend { padding: 0; margin-block-end: 0.5rem; }
|
|
469
|
+
.sekyro-root .sekyro-form-q .sekyro-label { color: var(--sekyro-color-fg); }
|
|
470
|
+
.sekyro-form-optional { font-weight: 400; color: var(--sekyro-color-fg-muted); white-space: nowrap; }
|
|
471
|
+
.sekyro-form-choices { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
472
|
+
.sekyro-form-choice {
|
|
473
|
+
display: flex; align-items: center; gap: 0.75rem; min-block-size: 52px; padding-block: 0.75rem; padding-inline: 1rem;
|
|
474
|
+
border: 1px solid var(--sekyro-color-line); border-radius: var(--sekyro-radius); background: var(--sekyro-color-surface);
|
|
475
|
+
color: var(--sekyro-color-fg); cursor: pointer; transition: border-color 150ms, box-shadow 150ms;
|
|
476
|
+
}
|
|
477
|
+
.sekyro-form-choice > input { flex: none; inline-size: 20px; block-size: 20px; margin: 0; accent-color: var(--sekyro-color-brand); cursor: pointer; }
|
|
478
|
+
.sekyro-form-choice:has(> input:checked) { border-color: var(--sekyro-color-brand); box-shadow: inset 0 0 0 1px var(--sekyro-color-brand); }
|
|
479
|
+
.sekyro-form-choice:has(> input:focus-visible) { outline: 2px solid var(--sekyro-color-ring); outline-offset: 2px; }
|
|
480
|
+
.sekyro-form-choice:has(> input[aria-invalid="true"]) { border-color: var(--sekyro-color-danger); }
|
|
481
|
+
.sekyro-root .sekyro-form-textarea { min-block-size: 7.5rem; padding-block: 0.75rem; resize: vertical; }
|
|
482
|
+
.sekyro-form-date { display: flex; gap: 0.75rem; }
|
|
483
|
+
.sekyro-form-date > div { display: flex; flex-direction: column; gap: 0.25rem; }
|
|
484
|
+
.sekyro-form-date__day, .sekyro-form-date__month { inline-size: 4.5rem; }
|
|
485
|
+
.sekyro-form-date__year { inline-size: 6.5rem; }
|
|
486
|
+
.sekyro-form-date .sekyro-input { inline-size: 100%; text-align: center; }
|
|
487
|
+
/* A country answer: the chosen country as a field (flag, name, a chevron); the document picker's list opens under it. */
|
|
488
|
+
.sekyro-root .sekyro-form-country { display: flex; align-items: center; gap: 0.75rem; inline-size: 100%; color: var(--sekyro-color-fg); text-align: start; cursor: pointer; }
|
|
489
|
+
.sekyro-form-country::after {
|
|
490
|
+
content: ""; flex: none; margin-inline-start: auto; inline-size: 7px; block-size: 7px; margin-block-start: -4px;
|
|
491
|
+
border-block-end: 1.5px solid var(--sekyro-color-fg-muted); border-inline-end: 1.5px solid var(--sekyro-color-fg-muted);
|
|
492
|
+
transform: rotate(calc(45deg * var(--sekyro-inline-sign)));
|
|
493
|
+
}
|
|
494
|
+
.sekyro-form-country[aria-expanded="true"]::after { margin-block-start: 4px; transform: rotate(calc(-135deg * var(--sekyro-inline-sign))); }
|
|
495
|
+
.sekyro-form-country__name { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
496
|
+
.sekyro-form-country__name.is-empty { color: var(--sekyro-color-fg-subtle); }
|
|
497
|
+
.sekyro-form-country__list { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
498
|
+
.sekyro-rows--scroll { max-block-size: 18rem; overflow-y: auto; overscroll-behavior: contain; }
|
|
499
|
+
.sekyro-row-btn[aria-current="true"] { background: var(--sekyro-color-brand-soft); font-weight: 600; }
|
|
500
|
+
.sekyro-form-address { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
501
|
+
.sekyro-form-consents { gap: 0.75rem; }
|
|
502
|
+
.sekyro-form-consent { display: flex; flex-direction: column; gap: 0.375rem; }
|
|
503
|
+
.sekyro-form-consent__row { align-items: flex-start; cursor: default; }
|
|
504
|
+
.sekyro-form-consent__row > input { margin-block-start: 2px; }
|
|
505
|
+
.sekyro-form-consent__text { display: flex; flex-direction: column; gap: 0.25rem; }
|
|
506
|
+
.sekyro-form-consent__text > label { cursor: pointer; }
|
|
507
|
+
.sekyro-root .sekyro-form-consent__link { align-self: flex-start; color: var(--sekyro-color-brand); text-decoration: underline; text-underline-offset: 0.2em; }
|
|
508
|
+
|
|
442
509
|
/* ── The camera intros' marks: line geometry of what the camera will do ── */
|
|
443
510
|
.sekyro-mark { display: block; margin-inline: auto; overflow: visible; }
|
|
444
511
|
.sekyro-mark--card { inline-size: min(100%, 15.75rem); margin-block: 0.75rem; }
|
|
@@ -462,6 +529,9 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
462
529
|
.sekyro-root .sekyro-result { display: flex; flex-direction: column; flex: 1; padding-block-start: 2rem; }
|
|
463
530
|
.sekyro-result__body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; flex: 1; padding-block-end: 2rem; text-align: center; }
|
|
464
531
|
.sekyro-root .sekyro-result .sekyro-heading { align-items: center; }
|
|
532
|
+
/* The result's title is the flow's hero role (28/34, Geist 600, -0.015em), as on iOS and Android (ResultScreen). */
|
|
533
|
+
.sekyro-root .sekyro-result .sekyro-heading > h2 { font: var(--sekyro-type-flow-hero) var(--sekyro-font-display); letter-spacing: var(--sekyro-tracking-flow-hero); }
|
|
534
|
+
.sekyro-root [lang="ar"] .sekyro-result .sekyro-heading > h2 { font-family: var(--sekyro-font-arabic); line-height: 1.4; }
|
|
465
535
|
/* The simulated Sandbox session's notice: the width of the column, read from the start like every notice. */
|
|
466
536
|
.sekyro-result__body .sekyro-notice { align-self: stretch; text-align: start; }
|
|
467
537
|
/* The verified mark (136 px, as before the 2026-11-05 refresh): the soft success band draws itself round, the disc springs in, the check is traced. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/react",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
4
|
-
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (
|
|
3
|
+
"version": "0.1.0-rc.27",
|
|
4
|
+
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (Arabic, French, English, Spanish, Portuguese and German, RTL-safe, WCAG AAA defaults)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"strings:steps": "node scripts/gen-step-strings.mjs"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
78
|
+
"@sekyro/web": "^0.1.0-rc.29 || ^0.2.0-rc.0",
|
|
79
79
|
"react": ">=18.2",
|
|
80
80
|
"react-dom": ">=18.2"
|
|
81
81
|
},
|
package/sbom.cdx.json
CHANGED
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "react",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/react@0.1.0-rc.
|
|
102
|
-
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (
|
|
100
|
+
"version": "0.1.0-rc.27",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.27",
|
|
102
|
+
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (Arabic, French, English, Spanish, Portuguese and German, RTL-safe, WCAG AAA defaults)",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
105
105
|
"license": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.27?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"components": [],
|
|
148
148
|
"dependencies": [
|
|
149
149
|
{
|
|
150
|
-
"ref": "@sekyro/react@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/react@0.1.0-rc.27"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|