@sekyro/elements 0.1.0-rc.4 → 0.1.0-rc.6
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 +17 -0
- package/README.md +8 -9
- package/custom-elements.json +2 -2
- package/dist/cdn/chunks/{capture-session-doc-FRBI7OKF-AIBTLOVK.js → capture-session-doc-LUA4Y7PZ-LOMSB7V7.js} +1 -1
- package/dist/cdn/chunks/{chunk-5K4YQOZN.js → chunk-33KMCERZ.js} +1 -1
- package/dist/cdn/chunks/{chunk-UGP2ZH7W.js → chunk-3ELDB5WG.js} +1 -1
- package/dist/cdn/chunks/chunk-4FTXJ6MZ.js +1 -0
- package/dist/cdn/chunks/{chunk-HMNCXTZQ.js → chunk-AXYGICTN.js} +2 -2
- package/dist/cdn/chunks/{chunk-AOM2HJGY.js → chunk-D2JAXHZF.js} +1 -1
- package/dist/cdn/chunks/{chunk-COQQVNNG.js → chunk-DBGVBAMW.js} +1 -1
- package/dist/cdn/chunks/{chunk-SIPFHN7E.js → chunk-DQAVYXAF.js} +1 -1
- package/dist/cdn/chunks/{chunk-QOZB3DLY.js → chunk-ETJPN5LO.js} +1 -1
- package/dist/cdn/chunks/{chunk-X4MIUKLT.js → chunk-F4IM73DE.js} +1 -1
- package/dist/cdn/chunks/{chunk-LA2MA2UQ.js → chunk-FGBKOHVK.js} +1 -1
- package/dist/cdn/chunks/{chunk-RPCMWL2U.js → chunk-FWZOENNU.js} +1 -1
- package/dist/cdn/chunks/{chunk-H22YHQ6V.js → chunk-HH33TJJH.js} +1 -1
- package/dist/cdn/chunks/{chunk-G2RZQTCT.js → chunk-L2UAVB62.js} +1 -1
- package/dist/cdn/chunks/{chunk-AN2KDTP4.js → chunk-M4UCDUJB.js} +1 -1
- package/dist/cdn/chunks/chunk-NYF6B3ZA.js +1 -0
- package/dist/cdn/chunks/{chunk-AKUFZTNC.js → chunk-OGRBLEPE.js} +1 -1
- package/dist/cdn/chunks/chunk-OPRYWIQM.js +33 -0
- package/dist/cdn/chunks/{chunk-5ZNWYB3D.js → chunk-QMITFZK4.js} +1 -1
- package/dist/cdn/chunks/chunk-UGHWANZX.js +1 -0
- package/dist/cdn/chunks/{chunk-GIGTK355.js → chunk-W4RXHXFP.js} +1 -1
- package/dist/cdn/chunks/{create-document-capture-2YBCDEUB-GYUIXEAL.js → create-document-capture-ZTJKSEJB-NIBVRVLZ.js} +1 -1
- package/dist/cdn/chunks/{document-capture-view-UL3ISHNS-E6AP35NA.js → document-capture-view-ZKT3W6UE-FQWRXOHT.js} +1 -1
- package/dist/cdn/chunks/{eid-view-FKFEF42L-4OPACR2A.js → eid-view-7CTFIZ5R-PN357YSL.js} +1 -1
- package/dist/cdn/chunks/{email-otp-view-NRZCAJJ4-UFM2YDCD.js → email-otp-view-MB334KKV-YKOW7MU6.js} +1 -1
- package/dist/cdn/chunks/{flow-views-N7LBFI55-36234BJJ.js → flow-views-SRAXHC6K-J3H3VF3P.js} +1 -1
- package/dist/cdn/chunks/overlay-de-ILMZBGZH-DIOHROVO.js +1 -0
- package/dist/cdn/chunks/overlay-es-YLDY73HJ-LSXKLJQ2.js +1 -0
- package/dist/cdn/chunks/overlay-pt-GZXT2S6D-ASML67UA.js +1 -0
- package/dist/cdn/chunks/plan-runner-INQLWFGS-24JH5MQZ.js +1 -0
- package/dist/cdn/chunks/{portrait-capture-view-6KZGPAJU-CFUUPI5B.js → portrait-capture-view-DSUGE7PI-L7U7UVJY.js} +1 -1
- package/dist/cdn/chunks/{portrait-review-view-TBSABVSX-J5ZCIFSX.js → portrait-review-view-PPYEEMYM-V4UMKNJE.js} +1 -1
- package/dist/cdn/chunks/{proof-of-address-view-3GG3XEQK-7DFCRBNZ.js → proof-of-address-view-2M6UDK76-ND76DOHN.js} +1 -1
- package/dist/cdn/define.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/{chunk-UXPM24JI.js → chunk-3BGD4PJ7.js} +1 -1
- package/dist/{chunk-PMIO3U3J.js → chunk-BJ2YKUCC.js} +1 -1
- package/dist/{chunk-JUB6FRPB.js → chunk-F2IPIZ4J.js} +1 -1
- package/dist/{chunk-A75VY7L7.js → chunk-FSGDOTCB.js} +1 -1
- package/dist/{chunk-CFERAKA2.js → chunk-KHBP6WWR.js} +1 -1
- package/dist/{chunk-JCCTKW23.js → chunk-LNCABBX7.js} +1 -1
- package/dist/{chunk-PNTIMH72.js → chunk-OSC2SC2X.js} +1 -1
- package/dist/{chunk-2FHYNKUL.js → chunk-PFH7S4E7.js} +1 -1
- package/dist/chunk-ULVT7UW6.js +1 -0
- package/dist/chunk-UUDX5GK4.js +33 -0
- package/dist/{chunk-UZJG5SPC.js → chunk-VEOZABLV.js} +1 -1
- package/dist/{chunk-YPBTBTOU.js → chunk-XLLG6AKG.js} +1 -1
- package/dist/{chunk-APM7FCA2.js → chunk-YQ7XHAQJ.js} +1 -1
- package/dist/define.cjs +5 -5
- package/dist/define.js +1 -1
- package/dist/{document-capture-view-UL3ISHNS-K636D7VR.js → document-capture-view-ZKT3W6UE-5JRPJOO5.js} +1 -1
- package/dist/{eid-view-FKFEF42L-ZXQWPIIA.js → eid-view-7CTFIZ5R-OL2YXQZO.js} +1 -1
- package/dist/{email-otp-view-NRZCAJJ4-RANTR7SO.js → email-otp-view-MB334KKV-Q7237EQV.js} +1 -1
- package/dist/{flow-views-N7LBFI55-DZ3PH2EP.js → flow-views-SRAXHC6K-DUSVVMFO.js} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +1 -1
- package/dist/overlay-de-ILMZBGZH-L5N7BMI4.js +1 -0
- package/dist/overlay-es-YLDY73HJ-JYBZEXG5.js +1 -0
- package/dist/overlay-pt-GZXT2S6D-WCIUJ4DI.js +1 -0
- package/dist/{portrait-capture-view-6KZGPAJU-LAGNB7A4.js → portrait-capture-view-DSUGE7PI-HBLXJDXY.js} +1 -1
- package/dist/{portrait-review-view-TBSABVSX-MLNZZBL5.js → portrait-review-view-PPYEEMYM-W66WNNUM.js} +1 -1
- package/dist/{proof-of-address-view-3GG3XEQK-FWM7OQ4K.js → proof-of-address-view-2M6UDK76-27QSU4R3.js} +1 -1
- package/dist/styles.css +14 -8
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/cdn/chunks/chunk-FYPP4Q7V.js +0 -33
- package/dist/cdn/chunks/chunk-H5GXVL63.js +0 -1
- package/dist/cdn/chunks/chunk-KLODCY6G.js +0 -1
- package/dist/cdn/chunks/chunk-YRTHQZAW.js +0 -1
- package/dist/cdn/chunks/overlay-de-KYSF3MDD-XORYFTYU.js +0 -1
- package/dist/cdn/chunks/overlay-es-36H5G6S5-22UFLFPZ.js +0 -1
- package/dist/cdn/chunks/overlay-pt-EB4UDBFE-CWJXQDCQ.js +0 -1
- package/dist/cdn/chunks/plan-runner-KQM7I4MR-HEXIU27Q.js +0 -1
- package/dist/chunk-LYFBZCIH.js +0 -33
- package/dist/chunk-WBXQX6DQ.js +0 -1
- package/dist/overlay-de-KYSF3MDD-2ZNXM2N7.js +0 -1
- package/dist/overlay-es-36H5G6S5-VQWD57TO.js +0 -1
- package/dist/overlay-pt-EB4UDBFE-6VWPTFO2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as N}from"./chunk-
|
|
1
|
+
"use client";import{a as N}from"./chunk-VEOZABLV.js";import"./chunk-OSC2SC2X.js";import{a as te}from"./chunk-PFH7S4E7.js";import"./chunk-XLLG6AKG.js";import{c as X}from"./chunk-LNCABBX7.js";import{a as ae,b as re,c as ie}from"./chunk-F2IPIZ4J.js";import"./chunk-BJ2YKUCC.js";import"./chunk-KHBP6WWR.js";import{B as Y,G as Z,K as f,L as ee,a as ke,b as ye,c as C,t as Q}from"./chunk-YQ7XHAQJ.js";import{a as S,c as O,i as n}from"./chunk-SSU37LFQ.js";var i=O(ke(),1),e=O(ye(),1);var x=["pose","eyes","mouth","lighting","background","resolution"],se="occlusion";function le(r){return r?.startsWith("icao_")===!0?r.slice(5):null}S(le,"Se");n(le,"reasonCriterion");function ve({step:r,i18n:c,assetBaseUrl:M,onUpload:P}){let{t:a}=c,B=(0,i.useRef)(null),p=(0,i.useRef)(null),[s,oe]=(0,i.useState)("idle"),[k,L]=(0,i.useState)(null),[_,y]=(0,i.useState)(null),[$,E]=(0,i.useState)({facing:"user",assisted:!1}),[F,ne]=(0,i.useState)(!1),[de,I]=(0,i.useState)(!1),[j,ce]=(0,i.useState)(!1),pe=Q(),T=(0,i.useContext)(Y),U=(0,i.useContext)(ae),A=(0,i.useRef)(U);A.current=U,(0,i.useEffect)(()=>{let t=B.current;if(t===null)return;let l=r.capture({video:t,...M!==void 0?{assetBaseUrl:M}:{}});p.current=l;let g=n(()=>E({facing:l.facingMode??"user",assisted:l.captureMode==="assisted"}),"readCamera");g();let fe=[l.on("state",o=>{g(),o==="mode_switch"?I(!0):o!=="starting"&&o!=="gating"&&I(!1),oe(o)}),l.on("gate",L),l.on("error",o=>{y(o);let K=A.current;K!==null&&ie(K,re("portrait",o,0))})],J=!0;return Promise.resolve(l.canSwitchCaptureMode?.()??!1).catch(()=>!1).then(o=>{J&&ne(o===!0)}),l.start().catch(()=>{}),()=>{J=!1;for(let o of fe)o();l.destroy(),p.current=null}},[]);let u=s==="uploading"||s==="checking",h=s==="done",v=h&&r.reason!==void 0&&!r.uploadFailed,ue=s==="starting"||s==="idle"||s==="mode_switch"?"portrait.starting":s==="captured"?"portrait.taken":s==="uploading"?"portrait.uploading":s==="checking"?"portrait.checking":`portrait.coach.${k?.coach??"no_face"}`,R=(r.report??[]).filter(t=>!t.pass),V=r.reason!==void 0?`reasons.${r.reason}`:null,m=le(r.reason),q=R.filter(t=>t.criterion!==m),H=new Set([...R.map(t=>t.criterion),...m!==null?[m]:[]]),he=H.has(se),W=n(()=>{y(null),p.current?.retry()},"retake"),w=n(t=>{let l=k?.criteria.find(g=>g.criterion===t);return l!==void 0&&(l.held||l.waived)},"met"),me=k?.ready||s==="captured"||u?1:x.filter(w).length/x.length;v&&!j&&ce(!0);let z=V!==null&&(v||s==="gating"&&(m===null||!j)),ge=!v,D=s==="starting"||s==="gating"||s==="error"||s==="mode_switch",d=$.assisted?"self":"assisted",G=F&&D?{to:d,label:a(d==="assisted"?"capture.modeSwitch.toAssisted":"capture.modeSwitch.toSelfPhoto"),description:a(d==="assisted"?"capture.modeSwitch.toAssistedLabelPhoto":"capture.modeSwitch.toSelfLabelPhoto"),onSwitch:n(()=>{let t=p.current;t?.setCaptureMode(d).then(l=>{l&&(y(null),L(null),E({facing:t.facingMode??"user",assisted:d==="assisted"}))})},"onSwitch")}:null,b=de&&D?a("capture.modeSwitch.restarted"):null;return(0,e.jsxs)(te,{testId:"sekyro-portrait",video:(0,e.jsx)("video",{ref:B,className:`sekyro-lm-video sekyro-fc-video${$.facing==="environment"?" is-rear":""}`,playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),instruction:a(ue),...b!==null?{note:b}:{},...F?{status:b}:{},progress:me,closeLabel:a("native.close"),...T!==void 0?{onClose:T}:{},...G!==null?{end:(0,e.jsx)(X,{view:G,className:"sekyro-glass sekyro-glass--label"})}:{},children:[(0,e.jsx)("h2",{ref:pe,tabIndex:-1,className:"sekyro-visually-hidden",children:a(r.reason!==void 0?"portrait.retryTitle":"session.steps.portrait.title")}),z||_!==null||h&&(r.uploadFailed||!r.attemptsExhausted)?(0,e.jsxs)("div",{className:"sekyro-fc-panel",children:[z?(0,e.jsxs)(f,{tone:"warning",children:[(0,e.jsx)("span",{children:N(c)(V)||a("portrait.retryTitle")}),q.length>0?(0,e.jsxs)("span",{children:[a("portrait.reportTitle"),": ",q.map(t=>a(`portrait.report.${t.criterion}`)).join(", ")]}):null,(0,e.jsx)("span",{children:ee(c,r.attemptsRemaining,r.attemptsExhausted)})]}):null,_!==null?(0,e.jsxs)(f,{tone:"danger",children:[(0,e.jsx)("span",{children:a("portrait.cameraBlocked")}),(0,e.jsx)("span",{children:a("portrait.cameraBlockedHint")}),(0,e.jsx)(C,{kind:"secondary",onClick:W,children:a("portrait.retryCamera")})]}):null,r.uploadFailed&&h?(0,e.jsx)(f,{tone:"danger",children:(0,e.jsx)("span",{children:a("portrait.uploadFailed")})}):null,h&&!r.attemptsExhausted?(0,e.jsx)(C,{full:!0,onClick:W,disabled:u,children:a("portrait.retake")}):null]}):null,ge?(0,e.jsxs)("ul",{className:"sekyro-fc-checks","aria-label":a("portrait.checksLabel"),children:[x.map(t=>(0,e.jsxs)("li",{className:w(t)?"is-met":H.has(t)?"is-flagged":void 0,"data-criterion":t,children:[(0,e.jsx)("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:(0,e.jsx)("svg",{viewBox:"0 0 18 18",children:(0,e.jsx)("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),(0,e.jsx)("span",{children:a(`portrait.criteria.${t}`)}),(0,e.jsx)("span",{className:"sekyro-visually-hidden",children:a(w(t)?"portrait.met":"portrait.notMet")})]},t)),he?(0,e.jsxs)("li",{className:"is-flagged","data-criterion":se,children:[(0,e.jsx)("span",{className:"sekyro-fc-mark","aria-hidden":"true",children:(0,e.jsx)("svg",{viewBox:"0 0 18 18",children:(0,e.jsx)("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})}),(0,e.jsx)("span",{children:a("portrait.report.occlusion")}),(0,e.jsx)("span",{className:"sekyro-visually-hidden",children:a("portrait.notMet")})]}):null]}):null,P!==void 0&&!u?(0,e.jsx)("button",{type:"button",className:"sekyro-lm-upload",onClick:P,"data-testid":"sekyro-portrait-upload-instead",children:N(c)("portrait.source.uploadInstead")}):null,u?null:(0,e.jsx)(Z,{})]})}S(ve,"Le");n(ve,"PortraitCaptureView");export{ve as PortraitCaptureView};
|
package/dist/{portrait-review-view-TBSABVSX-MLNZZBL5.js → portrait-review-view-PPYEEMYM-W66WNNUM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as r,b as t,c as i,d as o,e as a}from"./chunk-
|
|
1
|
+
"use client";import{a as r,b as t,c as i,d as o,e as a}from"./chunk-VEOZABLV.js";import"./chunk-OSC2SC2X.js";import"./chunk-XLLG6AKG.js";import"./chunk-BJ2YKUCC.js";import"./chunk-YQ7XHAQJ.js";import"./chunk-SSU37LFQ.js";export{o as PortraitReviewView,a as PortraitScreens,t as PortraitSourceView,i as PortraitUploadView,r as portraitCopy};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as S}from"./chunk-PNTIMH72.js";import{d as M}from"./chunk-YPBTBTOU.js";import"./chunk-PMIO3U3J.js";import{a as q}from"./chunk-WBXQX6DQ.js";import"./chunk-CFERAKA2.js";import{K as b,L as G,a as O,b as j,c as k,v as F,w as D,y as R}from"./chunk-APM7FCA2.js";import{a as s,c as x,i}from"./chunk-SSU37LFQ.js";var v=x(O(),1),f=x(O(),1),o=x(j(),1),t=x(j(),1);var ee={"poa.title":"إثبات العنوان","poa.lead":"ارفع وثيقة حديثة تُظهر اسمك وعنوانك الحالي.","poa.accepted":"الوثائق المقبولة","poa.acceptedFor":"مقبول في {country}","poa.kindDated":"{kind}، صادر خلال آخر {days} يومًا","poa.kinds.utility_bill":"فاتورة كهرباء أو ماء أو غاز","poa.kinds.telecom_bill":"فاتورة هاتف أو إنترنت","poa.kinds.bank_statement":"كشف حساب بنكي","poa.kinds.tax_notice":"إشعار ضريبي","poa.kinds.rental_agreement":"عقد إيجار","poa.kinds.government_certificate":"شهادة السكن","poa.kinds.insurance_statement":"وثيقة تأمين","poa.source.camera":"التقاط صورة","poa.source.upload":"رفع ملف","poa.source.lead":"صورة للوثيقة، أو ملف PDF أو صورة من جهازك","poa.upload.hint":"PDF أو JPEG أو PNG، بحد أقصى 3 صفحات و10 ميغابايت","poa.upload.choose":"اختيار ملف","poa.upload.addPage":"إضافة صفحة","poa.upload.pages":"{count} من 3 صفحات","poa.upload.send":"إرسال الوثيقة","poa.upload.sending":"جارٍ إرسال وثيقتك…","poa.upload.unsupported":"نوع الملف هذا غير مقبول. اختر ملف PDF أو JPEG أو PNG","poa.upload.tooManyPages":"أرسل 3 صفحات على الأكثر. احذف صفحة أو اختر ملفًا أقصر","poa.upload.tooLarge":"حجم الملف يتجاوز 10 ميغابايت. اختر ملفًا أصغر","poa.upload.failed":"تعذّر إرسال الوثيقة. تحقّق من اتصالك وحاول مرة أخرى","poa.camera.lead":"ضع الوثيقة بشكل مسطّح واملأ الإطار. التقط صورة واحدة لكل صفحة","poa.camera.capture":"التقاط الصورة","poa.camera.retake":"إعادة الالتقاط","poa.camera.next":"الصفحة التالية","poa.camera.page":"الصفحة {number}","poa.letter.title":"رسالة من صاحب الفاتورة","poa.letter.lead":"الوثيقة باسم شخص آخر. أضف رسالة موقّعة من هذا الشخص تفيد بأنك تسكن في هذا العنوان","poa.letter.send":"إرسال الرسالة","poa.licence.use":"استخدام العنوان المذكور في رخصة القيادة","poa.licence.note":"قرأنا هذا العنوان من رخصتك. لا تحتاج إلى وثيقة أخرى.","poa.retry.document_too_old":"هذه الوثيقة أقدم من المسموح. ارفع وثيقة أحدث من القائمة أدناه","poa.retry.document_date_invalid":"تاريخ الوثيقة في المستقبل. ارفع وثيقة بتاريخ اليوم أو قبله","poa.retry.document_kind_not_accepted":"نوع هذه الوثيقة غير مقبول. ارفع إحدى الوثائق المذكورة أدناه","poa.retry.name_mismatch":"الاسم في الوثيقة لا يطابق اسمك. ارفع وثيقة باسمك","poa.retry.address_mismatch":"العنوان في الوثيقة لا يطابق العنوان الذي وصلنا. ارفع وثيقة لهذا العنوان","poa.retry.holder_letter_missing":"يجب أن تكون الرسالة موقّعة وأن تذكر اسمك واسم صاحب الفاتورة. ارفع رسالة كاملة","poa.retry.unreadable":"تعذّرت قراءة الوثيقة. ارفع نسخة كاملة وأكثر وضوحًا","poa.retry.pdf_protected":"أزل كلمة المرور من ملف PDF وحاول مرة أخرى","poa.retry.provider_unavailable":"تعذّر فحص الوثيقة حاليًا. حاول مرة أخرى بعد قليل","poa.hint.blurry":"الصورة غير واضحة","poa.hint.cropped":"جزء من الوثيقة مقطوع","poa.hint.glare":"يوجد انعكاس ضوء على الوثيقة","reasons.provider_unavailable":"تعذّر فحص الوثيقة حاليًا","reasons.pdf_protected":"ملف PDF محمي بكلمة مرور أو يحتوي على محتوى نشط","reasons.document_kind_not_accepted":"نوع الوثيقة غير مقبول","reasons.document_date_invalid":"تاريخ الوثيقة في المستقبل","reasons.document_too_old":"الوثيقة قديمة جدًا","reasons.document_tampered":"يبدو أن الوثيقة قد عُدّلت","reasons.holder_letter_required":"يلزم تقديم رسالة من صاحب الفاتورة","reasons.holder_letter_missing":"رسالة صاحب الفاتورة مفقودة أو غير مكتملة","reasons.address_mismatch":"العنوان لا يطابق العنوان المقدَّم"},z={"poa.title":"Proof of address","poa.lead":"Upload a recent document that shows your name and your current address.","poa.accepted":"Accepted documents","poa.acceptedFor":"Accepted for {country}","poa.kindDated":"{kind}, dated within the last {days} days","poa.kinds.utility_bill":"Electricity, water or gas bill","poa.kinds.telecom_bill":"Phone or internet bill","poa.kinds.bank_statement":"Bank statement","poa.kinds.tax_notice":"Tax notice","poa.kinds.rental_agreement":"Rental agreement","poa.kinds.government_certificate":"Residence certificate","poa.kinds.insurance_statement":"Insurance statement","poa.source.camera":"Take a photo","poa.source.upload":"Upload a file","poa.source.lead":"A photo of the document, or a PDF or image from your device","poa.upload.hint":"PDF, JPEG or PNG, up to 3 pages and 10 MB","poa.upload.choose":"Choose a file","poa.upload.addPage":"Add a page","poa.upload.pages":"{count} of 3 pages","poa.upload.send":"Send document","poa.upload.sending":"Sending your document…","poa.upload.unsupported":"This file type is not accepted. Choose a PDF, JPEG or PNG","poa.upload.tooManyPages":"Send at most 3 pages. Remove a page or choose a shorter file","poa.upload.tooLarge":"The file is over 10 MB. Choose a smaller file","poa.upload.failed":"We could not send the document. Check your connection and try again","poa.camera.lead":"Lay the document flat and fill the frame. Take one photo per page","poa.camera.capture":"Take photo","poa.camera.retake":"Retake","poa.camera.next":"Next page","poa.camera.page":"Page {number}","poa.letter.title":"Letter from the bill holder","poa.letter.lead":"The document is in another person's name. Add a signed letter from that person saying that you live at this address","poa.letter.send":"Send letter","poa.licence.use":"Use the address on my driver's license","poa.licence.note":"We read this address from your license. You don't need another document.","poa.retry.document_too_old":"This document is older than allowed. Upload a more recent one from the list below","poa.retry.document_date_invalid":"The date on the document is in the future. Upload a document with today's date or earlier","poa.retry.document_kind_not_accepted":"This document type is not accepted. Upload one of the documents listed below","poa.retry.name_mismatch":"The name on the document does not match yours. Upload a document in your name","poa.retry.address_mismatch":"The address on the document does not match the one we were given. Upload a document for that address","poa.retry.holder_letter_missing":"The letter must be signed and name both you and the bill holder. Upload a complete letter","poa.retry.unreadable":"We could not read the document. Upload a sharper, complete copy","poa.retry.pdf_protected":"Remove the password from the PDF and try again","poa.retry.provider_unavailable":"The document could not be checked right now. Try again in a moment","poa.hint.blurry":"The image is blurry","poa.hint.cropped":"Part of the document is cut off","poa.hint.glare":"There is glare on the document","reasons.provider_unavailable":"The document could not be checked right now","reasons.pdf_protected":"The PDF is password-protected or contains active content","reasons.document_kind_not_accepted":"The document type is not accepted","reasons.document_date_invalid":"The document date is in the future","reasons.document_too_old":"The document is too old","reasons.document_tampered":"The document appears to have been edited","reasons.holder_letter_required":"A letter from the bill holder is needed","reasons.holder_letter_missing":"The letter from the bill holder is missing or incomplete","reasons.address_mismatch":"The address does not match the one supplied"},ae={"poa.title":"Justificatif de domicile","poa.lead":"Importez un document récent qui indique votre nom et votre adresse actuelle.","poa.accepted":"Documents acceptés","poa.acceptedFor":"Accepté pour {country}","poa.kindDated":"{kind}, daté des {days} derniers jours","poa.kinds.utility_bill":"Facture d'électricité, d'eau ou de gaz","poa.kinds.telecom_bill":"Facture de téléphone ou d'internet","poa.kinds.bank_statement":"Relevé bancaire","poa.kinds.tax_notice":"Avis d'imposition","poa.kinds.rental_agreement":"Bail ou quittance de loyer","poa.kinds.government_certificate":"Certificat de résidence","poa.kinds.insurance_statement":"Attestation d'assurance","poa.source.camera":"Prendre une photo","poa.source.upload":"Importer un fichier","poa.source.lead":"Une photo du document, ou un PDF ou une image depuis votre appareil","poa.upload.hint":"PDF, JPEG ou PNG, 3 pages et 10 Mo au maximum","poa.upload.choose":"Choisir un fichier","poa.upload.addPage":"Ajouter une page","poa.upload.pages":"{count} sur 3 pages","poa.upload.send":"Envoyer le document","poa.upload.sending":"Envoi de votre document…","poa.upload.unsupported":"Ce type de fichier n'est pas accepté. Choisissez un PDF, un JPEG ou un PNG","poa.upload.tooManyPages":"Envoyez 3 pages au maximum. Retirez une page ou choisissez un fichier plus court","poa.upload.tooLarge":"Le fichier dépasse 10 Mo. Choisissez un fichier plus léger","poa.upload.failed":"Nous n'avons pas pu envoyer le document. Vérifiez votre connexion et réessayez","poa.camera.lead":"Posez le document à plat et remplissez le cadre. Prenez une photo par page","poa.camera.capture":"Prendre la photo","poa.camera.retake":"Reprendre","poa.camera.next":"Page suivante","poa.camera.page":"Page {number}","poa.letter.title":"Lettre du titulaire de la facture","poa.letter.lead":"Le document est au nom d'une autre personne. Ajoutez une lettre signée de cette personne attestant que vous habitez à cette adresse","poa.letter.send":"Envoyer la lettre","poa.licence.use":"Utiliser l'adresse de mon permis de conduire","poa.licence.note":"Nous avons lu cette adresse sur votre permis. Vous n'avez pas besoin d'un autre document.","poa.retry.document_too_old":"Ce document est plus ancien que la limite. Importez un document plus récent parmi ceux de la liste ci-dessous","poa.retry.document_date_invalid":"La date du document est dans le futur. Importez un document daté d'aujourd'hui ou d'avant","poa.retry.document_kind_not_accepted":"Ce type de document n'est pas accepté. Importez l'un des documents de la liste ci-dessous","poa.retry.name_mismatch":"Le nom sur le document ne correspond pas au vôtre. Importez un document à votre nom","poa.retry.address_mismatch":"L'adresse du document ne correspond pas à celle qui nous a été transmise. Importez un document pour cette adresse","poa.retry.holder_letter_missing":"La lettre doit être signée et nommer à la fois vous et le titulaire de la facture. Importez une lettre complète","poa.retry.unreadable":"Nous n'avons pas pu lire le document. Importez une copie plus nette et complète","poa.retry.pdf_protected":"Retirez le mot de passe du PDF et réessayez","poa.retry.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment. Réessayez dans un instant","poa.hint.blurry":"L'image est floue","poa.hint.cropped":"Une partie du document est coupée","poa.hint.glare":"Il y a un reflet sur le document","reasons.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment","reasons.pdf_protected":"Le PDF est protégé par un mot de passe ou contient du contenu actif","reasons.document_kind_not_accepted":"Ce type de document n'est pas accepté","reasons.document_date_invalid":"La date du document est dans le futur","reasons.document_too_old":"Le document est trop ancien","reasons.document_tampered":"Le document semble avoir été modifié","reasons.holder_letter_required":"Une lettre du titulaire de la facture est nécessaire","reasons.holder_letter_missing":"La lettre du titulaire de la facture est absente ou incomplète","reasons.address_mismatch":"L'adresse ne correspond pas à celle qui a été transmise"};function J({blob:a,label:n}){let[e,r]=(0,f.useState)(void 0);return(0,f.useEffect)(()=>{if(typeof URL.createObjectURL!="function")return;let d=URL.createObjectURL(a);return r(d),()=>URL.revokeObjectURL(d)},[a]),(0,o.jsx)("img",{src:e,alt:n})}s(J,"Q");i(J,"PageThumb");function B({step:a,i18n:n,c:e,title:r,notice:d,intro:m,onUpload:p}){let y=(0,f.useRef)(null),l=(0,f.useRef)(null),[c,_]=(0,f.useState)([]),[h,P]=(0,f.useState)(!1),[L,C]=(0,f.useState)("idle"),[K,U]=(0,f.useState)(!1),A=i(u=>{P(!1),u.start().catch(()=>P(!0))},"open");(0,f.useEffect)(()=>{let u=y.current;if(u===null)return;let g;try{g=a.capturePage({video:u})}catch{P(!0);return}return l.current=g,A(g),()=>{g.destroy(),l.current=null}},[]);let E=c.length>=a.maxPages,Q=i(async()=>{let u=l.current;if(!(u===null||E)){C("taking"),U(!1);try{await u.takePage()}catch{}_([...u.pages]),C("idle")}},"take"),X=i(u=>{let g=l.current;g!==null&&(g.removePage(u),_([...g.pages]))},"retake"),Z=i(async()=>{let u=l.current;if(!(u===null||c.length===0)){C("sending"),U(!1);try{await u.submitPages()}catch{U(!0)}C("idle")}},"send"),T=L==="sending";return(0,o.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-poa-camera",children:[(0,o.jsx)(D,{title:r,lead:e("poa.camera.lead")}),d,K?(0,o.jsx)(b,{tone:"danger",children:(0,o.jsx)("span",{children:e("poa.upload.failed")})}):null,h?(0,o.jsxs)(b,{tone:"danger",children:[(0,o.jsx)("span",{children:e("doc.cameraBlocked")}),(0,o.jsx)("span",{children:e("doc.cameraBlockedHint")}),l.current!==null?(0,o.jsx)(k,{kind:"secondary",onClick:s(()=>l.current!==null&&A(l.current),"onClick"),children:e("doc.retryCamera")}):null]}):null,c.length===0?m:null,(0,o.jsx)("video",{ref:y,className:"sekyro-poa-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),c.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"sekyro-text-muted",role:"status",children:e("poa.upload.pages",{count:c.length})}),(0,o.jsx)("ul",{className:"sekyro-poa-pages",children:c.map((u,g)=>{let I=e("poa.camera.page",{number:g+1});return(0,o.jsxs)("li",{children:[(0,o.jsx)(J,{blob:u,label:I}),(0,o.jsx)(k,{kind:"ghost",onClick:s(()=>X(g),"onClick"),disabled:T,"aria-label":`${e("poa.camera.retake")} ${I}`,children:e("poa.camera.retake")})]},g)})})]}):null,T?(0,o.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,(0,o.jsxs)(R,{children:[(0,o.jsxs)(k,{full:!0,kind:c.length>0?"secondary":"primary",onClick:s(()=>{Q()},"onClick"),disabled:E||h||L!=="idle"||a.attemptsExhausted,"aria-busy":L==="taking"||void 0,children:[(0,o.jsx)(F,{name:"camera"}),e("poa.camera.capture")]}),c.length>0?(0,o.jsx)(k,{full:!0,onClick:s(()=>{Z()},"onClick"),disabled:L!=="idle","aria-busy":T||void 0,children:e("poa.upload.send")}):null,p!==void 0?(0,o.jsx)(k,{full:!0,kind:"ghost",onClick:p,disabled:T,children:e("poa.source.upload")}):null]})]})}s(B,"K");i(B,"PageCamera");function $(a,n){try{let e=new Intl.DisplayNames([n],{type:"region",fallback:"code"}).of(a);return e!==void 0&&e!==""?e:a}catch{return a}}s($,"J");i($,"regionName");var te={en:z,fr:ae,ar:ee,es:z,pt:z,de:z},oe="image/jpeg,image/png,image/heic,image/heif,application/pdf";function V(a){let n=a.strings,e=te[a.locale];return(r,d)=>q(n[r]??e[r]??"",d)}s(V,"ae");i(V,"poaCopy");function N({step:a,i18n:n,c:e}){if(a.reason===void 0)return null;let r=e(`poa.retry.${a.reason}`)||e(`reasons.${a.reason}`)||e("poa.retry.unreadable");return(0,t.jsxs)(b,{tone:"warning",children:[(0,t.jsx)("span",{children:r}),(0,t.jsx)("span",{children:G(n,a.attemptsRemaining,a.attemptsExhausted)})]})}s(N,"U");i(N,"RetryNotice");function w({step:a,i18n:n,c:e}){let r=(0,v.useId)(),{country:d}=a.rule,m=d===null?e("poa.accepted"):e("poa.acceptedFor",{country:$(d,n.locale)});return(0,t.jsxs)("div",{className:"sekyro-poa-accepted",children:[(0,t.jsx)("p",{id:r,className:"sekyro-poa-accepted__title",children:m}),(0,t.jsx)("ul",{className:"sekyro-poa-list","aria-labelledby":r,children:a.rule.kinds.map(p=>(0,t.jsx)("li",{children:e("poa.kindDated",{kind:e(`poa.kinds.${p.kind}`)||p.kind,days:p.maxAgeDays})},p.kind))})]})}s(w,"j");i(w,"AcceptedList");var ne={unsupported:"poa.upload.unsupported",tooMany:"poa.upload.tooManyPages",tooLarge:"poa.upload.tooLarge",failed:"poa.upload.failed"};function W(a){return a instanceof TypeError&&a.message==="unsupported_file"?"unsupported":a instanceof RangeError&&a.message==="file_too_large"?"tooLarge":a instanceof RangeError&&(a.message==="too_many_pages"||a.message==="no_pages")?"tooMany":"failed"}s(W,"re");i(W,"refusalOf");function H({step:a,i18n:n,c:e,letter:r,onCamera:d}){let m=(0,v.useRef)(null),[p,y]=(0,v.useState)("idle"),l=p==="sending",c=i(async _=>{let h=Array.from(_.currentTarget.files??[]);if(_.currentTarget.value="",h.length!==0){if(h.length>a.maxPages){y("tooMany");return}y("sending");try{await(r?a.uploadHolderLetter(h):a.uploadPages(h)),y("idle")}catch(P){y(W(P))}}},"onFiles");return(0,t.jsxs)("section",{className:"sekyro-step","data-testid":r?"sekyro-poa-letter":"sekyro-poa-upload",children:[(0,t.jsx)(D,{title:e(r?"poa.letter.title":"poa.title"),lead:e(r?"poa.letter.lead":"poa.lead")}),p==="idle"||l?(0,t.jsx)(N,{step:a,i18n:n,c:e}):null,p!=="idle"&&!l?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:e(ne[p])})}):null,r?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),(0,t.jsx)("p",{className:"sekyro-text-muted",children:e("poa.upload.hint")}),l?(0,t.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,(0,t.jsx)("input",{ref:m,type:"file",accept:oe,multiple:!0,hidden:!0,"data-testid":"sekyro-poa-file","aria-label":e(r?"poa.letter.title":"poa.title"),onChange:s(_=>{c(_)},"onChange")}),(0,t.jsxs)(R,{children:[(0,t.jsx)(k,{full:!0,onClick:s(()=>m.current?.click(),"onClick"),disabled:l||!a.photo.uploadOffered||a.attemptsExhausted,"aria-busy":l||void 0,children:e("poa.upload.choose")}),d!==void 0?(0,t.jsxs)(k,{full:!0,kind:"ghost",onClick:d,disabled:l,children:[(0,t.jsx)(F,{name:a.photo.cameraOnPhone===!0?"smartphone":"camera"}),a.photo.cameraOnPhone===!0?e("capture.source.phone"):e("poa.source.camera")]}):null]})]})}s(H,"se");i(H,"UploadScreen");function Y({step:a,c:n}){let[e,r]=(0,v.useState)("idle"),d=a.useLicenceAddress;if(d===void 0)return null;let m=i(async()=>{r("sending");try{await d(),r("idle")}catch{r("failed")}},"onUse");return(0,t.jsxs)("div",{className:"sekyro-poa-licence","data-testid":"sekyro-poa-licence",children:[(0,t.jsx)("p",{className:"sekyro-text-muted",children:n("poa.licence.note")}),e==="failed"?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:n("poa.upload.failed")})}):null,(0,t.jsx)(k,{full:!0,kind:"secondary",onClick:s(()=>{m()},"onClick"),disabled:e==="sending"||a.attemptsExhausted,"aria-busy":e==="sending"||void 0,children:n("poa.licence.use")})]})}s(Y,"de");i(Y,"LicenceShortcut");function re({step:a,i18n:n}){let e=V(n),[r,d]=(0,v.useState)(null),m=a.phase==="holder_letter",p=a.photo.source,y=p==="choice"?r??a.photo.pick:p,l=a.photo.cameraOnPhone===!0,c=a.photo.uploadOffered?()=>d("upload"):void 0,_=e(m?"poa.letter.title":"poa.title"),h;return y===null?h=(0,t.jsx)(S,{testId:"sekyro-poa-source",title:_,lead:e("poa.source.lead"),cameraLabel:e(l?"capture.source.phone":"poa.source.camera"),uploadLabel:e("poa.source.upload"),onPhone:l,notice:(0,t.jsx)(N,{step:a,i18n:n,c:e}),onCamera:s(()=>d("camera"),"onCamera"),onUpload:s(()=>d("upload"),"onUpload")}):y==="camera"&&l?h=(0,t.jsx)(M,{i18n:n,lead:e("handoff.lead.poa"),refresh:a.refresh,actions:c!==void 0?(0,t.jsx)(k,{kind:"ghost",full:!0,onClick:c,children:e("poa.source.upload")}):null}):y==="camera"?h=(0,t.jsx)(B,{step:a,i18n:n,c:e,title:_,notice:(0,t.jsx)(N,{step:a,i18n:n,c:e}),intro:m?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),...p==="choice"&&c!==void 0?{onUpload:c}:{}}):h=(0,t.jsx)(H,{step:a,i18n:n,c:e,letter:m,...p==="choice"?{onCamera:i(()=>d("camera"),"onCamera")}:{}}),(0,t.jsxs)(t.Fragment,{children:[m?null:(0,t.jsx)(Y,{step:a,c:e}),h]})}s(re,"ze");i(re,"ProofOfAddressView");export{oe as POA_UPLOAD_ACCEPT,re as ProofOfAddressView,V as poaCopy};
|
|
1
|
+
"use client";import{a as S}from"./chunk-OSC2SC2X.js";import{d as M}from"./chunk-XLLG6AKG.js";import"./chunk-BJ2YKUCC.js";import{a as q}from"./chunk-ULVT7UW6.js";import"./chunk-KHBP6WWR.js";import{K as b,L as G,a as O,b as j,c as k,v as F,w as D,y as R}from"./chunk-YQ7XHAQJ.js";import{a as s,c as x,i}from"./chunk-SSU37LFQ.js";var v=x(O(),1),f=x(O(),1),o=x(j(),1),t=x(j(),1);var ee={"poa.title":"إثبات العنوان","poa.lead":"ارفع وثيقة حديثة تُظهر اسمك وعنوانك الحالي.","poa.accepted":"الوثائق المقبولة","poa.acceptedFor":"مقبول في {country}","poa.kindDated":"{kind}، صادر خلال آخر {days} يومًا","poa.kinds.utility_bill":"فاتورة كهرباء أو ماء أو غاز","poa.kinds.telecom_bill":"فاتورة هاتف أو إنترنت","poa.kinds.bank_statement":"كشف حساب بنكي","poa.kinds.tax_notice":"إشعار ضريبي","poa.kinds.rental_agreement":"عقد إيجار","poa.kinds.government_certificate":"شهادة السكن","poa.kinds.insurance_statement":"وثيقة تأمين","poa.source.camera":"التقاط صورة","poa.source.upload":"رفع ملف","poa.source.lead":"صورة للوثيقة، أو ملف PDF أو صورة من جهازك","poa.upload.hint":"PDF أو JPEG أو PNG، بحد أقصى 3 صفحات و10 ميغابايت","poa.upload.choose":"اختيار ملف","poa.upload.addPage":"إضافة صفحة","poa.upload.pages":"{count} من 3 صفحات","poa.upload.send":"إرسال الوثيقة","poa.upload.sending":"جارٍ إرسال وثيقتك…","poa.upload.unsupported":"نوع الملف هذا غير مقبول. اختر ملف PDF أو JPEG أو PNG","poa.upload.tooManyPages":"أرسل 3 صفحات على الأكثر. احذف صفحة أو اختر ملفًا أقصر","poa.upload.tooLarge":"حجم الملف يتجاوز 10 ميغابايت. اختر ملفًا أصغر","poa.upload.failed":"تعذّر إرسال الوثيقة. تحقّق من اتصالك وحاول مرة أخرى","poa.camera.lead":"ضع الوثيقة بشكل مسطّح واملأ الإطار. التقط صورة واحدة لكل صفحة","poa.camera.capture":"التقاط الصورة","poa.camera.retake":"إعادة الالتقاط","poa.camera.next":"الصفحة التالية","poa.camera.page":"الصفحة {number}","poa.letter.title":"رسالة من صاحب الفاتورة","poa.letter.lead":"الوثيقة باسم شخص آخر. أضف رسالة موقّعة من هذا الشخص تفيد بأنك تسكن في هذا العنوان","poa.letter.send":"إرسال الرسالة","poa.licence.use":"استخدام العنوان المذكور في رخصة القيادة","poa.licence.note":"قرأنا هذا العنوان من رخصتك. لا تحتاج إلى وثيقة أخرى.","poa.retry.document_too_old":"هذه الوثيقة أقدم من المسموح. ارفع وثيقة أحدث من القائمة أدناه","poa.retry.document_date_invalid":"تاريخ الوثيقة في المستقبل. ارفع وثيقة بتاريخ اليوم أو قبله","poa.retry.document_kind_not_accepted":"نوع هذه الوثيقة غير مقبول. ارفع إحدى الوثائق المذكورة أدناه","poa.retry.name_mismatch":"الاسم في الوثيقة لا يطابق اسمك. ارفع وثيقة باسمك","poa.retry.address_mismatch":"العنوان في الوثيقة لا يطابق العنوان الذي وصلنا. ارفع وثيقة لهذا العنوان","poa.retry.holder_letter_missing":"يجب أن تكون الرسالة موقّعة وأن تذكر اسمك واسم صاحب الفاتورة. ارفع رسالة كاملة","poa.retry.unreadable":"تعذّرت قراءة الوثيقة. ارفع نسخة كاملة وأكثر وضوحًا","poa.retry.pdf_protected":"أزل كلمة المرور من ملف PDF وحاول مرة أخرى","poa.retry.provider_unavailable":"تعذّر فحص الوثيقة حاليًا. حاول مرة أخرى بعد قليل","poa.hint.blurry":"الصورة غير واضحة","poa.hint.cropped":"جزء من الوثيقة مقطوع","poa.hint.glare":"يوجد انعكاس ضوء على الوثيقة","reasons.provider_unavailable":"تعذّر فحص الوثيقة حاليًا","reasons.pdf_protected":"ملف PDF محمي بكلمة مرور أو يحتوي على محتوى نشط","reasons.document_kind_not_accepted":"نوع الوثيقة غير مقبول","reasons.document_date_invalid":"تاريخ الوثيقة في المستقبل","reasons.document_too_old":"الوثيقة قديمة جدًا","reasons.document_tampered":"يبدو أن الوثيقة قد عُدّلت","reasons.holder_letter_required":"يلزم تقديم رسالة من صاحب الفاتورة","reasons.holder_letter_missing":"رسالة صاحب الفاتورة مفقودة أو غير مكتملة","reasons.address_mismatch":"العنوان لا يطابق العنوان المقدَّم"},z={"poa.title":"Proof of address","poa.lead":"Upload a recent document that shows your name and your current address.","poa.accepted":"Accepted documents","poa.acceptedFor":"Accepted for {country}","poa.kindDated":"{kind}, dated within the last {days} days","poa.kinds.utility_bill":"Electricity, water or gas bill","poa.kinds.telecom_bill":"Phone or internet bill","poa.kinds.bank_statement":"Bank statement","poa.kinds.tax_notice":"Tax notice","poa.kinds.rental_agreement":"Rental agreement","poa.kinds.government_certificate":"Residence certificate","poa.kinds.insurance_statement":"Insurance statement","poa.source.camera":"Take a photo","poa.source.upload":"Upload a file","poa.source.lead":"A photo of the document, or a PDF or image from your device","poa.upload.hint":"PDF, JPEG or PNG, up to 3 pages and 10 MB","poa.upload.choose":"Choose a file","poa.upload.addPage":"Add a page","poa.upload.pages":"{count} of 3 pages","poa.upload.send":"Send document","poa.upload.sending":"Sending your document…","poa.upload.unsupported":"This file type is not accepted. Choose a PDF, JPEG or PNG","poa.upload.tooManyPages":"Send at most 3 pages. Remove a page or choose a shorter file","poa.upload.tooLarge":"The file is over 10 MB. Choose a smaller file","poa.upload.failed":"We could not send the document. Check your connection and try again","poa.camera.lead":"Lay the document flat and fill the frame. Take one photo per page","poa.camera.capture":"Take photo","poa.camera.retake":"Retake","poa.camera.next":"Next page","poa.camera.page":"Page {number}","poa.letter.title":"Letter from the bill holder","poa.letter.lead":"The document is in another person's name. Add a signed letter from that person saying that you live at this address","poa.letter.send":"Send letter","poa.licence.use":"Use the address on my driver's license","poa.licence.note":"We read this address from your license. You don't need another document.","poa.retry.document_too_old":"This document is older than allowed. Upload a more recent one from the list below","poa.retry.document_date_invalid":"The date on the document is in the future. Upload a document with today's date or earlier","poa.retry.document_kind_not_accepted":"This document type is not accepted. Upload one of the documents listed below","poa.retry.name_mismatch":"The name on the document does not match yours. Upload a document in your name","poa.retry.address_mismatch":"The address on the document does not match the one we were given. Upload a document for that address","poa.retry.holder_letter_missing":"The letter must be signed and name both you and the bill holder. Upload a complete letter","poa.retry.unreadable":"We could not read the document. Upload a sharper, complete copy","poa.retry.pdf_protected":"Remove the password from the PDF and try again","poa.retry.provider_unavailable":"The document could not be checked right now. Try again in a moment","poa.hint.blurry":"The image is blurry","poa.hint.cropped":"Part of the document is cut off","poa.hint.glare":"There is glare on the document","reasons.provider_unavailable":"The document could not be checked right now","reasons.pdf_protected":"The PDF is password-protected or contains active content","reasons.document_kind_not_accepted":"The document type is not accepted","reasons.document_date_invalid":"The document date is in the future","reasons.document_too_old":"The document is too old","reasons.document_tampered":"The document appears to have been edited","reasons.holder_letter_required":"A letter from the bill holder is needed","reasons.holder_letter_missing":"The letter from the bill holder is missing or incomplete","reasons.address_mismatch":"The address does not match the one supplied"},ae={"poa.title":"Justificatif de domicile","poa.lead":"Importez un document récent qui indique votre nom et votre adresse actuelle.","poa.accepted":"Documents acceptés","poa.acceptedFor":"Accepté pour {country}","poa.kindDated":"{kind}, daté des {days} derniers jours","poa.kinds.utility_bill":"Facture d'électricité, d'eau ou de gaz","poa.kinds.telecom_bill":"Facture de téléphone ou d'internet","poa.kinds.bank_statement":"Relevé bancaire","poa.kinds.tax_notice":"Avis d'imposition","poa.kinds.rental_agreement":"Bail ou quittance de loyer","poa.kinds.government_certificate":"Certificat de résidence","poa.kinds.insurance_statement":"Attestation d'assurance","poa.source.camera":"Prendre une photo","poa.source.upload":"Importer un fichier","poa.source.lead":"Une photo du document, ou un PDF ou une image depuis votre appareil","poa.upload.hint":"PDF, JPEG ou PNG, 3 pages et 10 Mo au maximum","poa.upload.choose":"Choisir un fichier","poa.upload.addPage":"Ajouter une page","poa.upload.pages":"{count} sur 3 pages","poa.upload.send":"Envoyer le document","poa.upload.sending":"Envoi de votre document…","poa.upload.unsupported":"Ce type de fichier n'est pas accepté. Choisissez un PDF, un JPEG ou un PNG","poa.upload.tooManyPages":"Envoyez 3 pages au maximum. Retirez une page ou choisissez un fichier plus court","poa.upload.tooLarge":"Le fichier dépasse 10 Mo. Choisissez un fichier plus léger","poa.upload.failed":"Nous n'avons pas pu envoyer le document. Vérifiez votre connexion et réessayez","poa.camera.lead":"Posez le document à plat et remplissez le cadre. Prenez une photo par page","poa.camera.capture":"Prendre la photo","poa.camera.retake":"Reprendre","poa.camera.next":"Page suivante","poa.camera.page":"Page {number}","poa.letter.title":"Lettre du titulaire de la facture","poa.letter.lead":"Le document est au nom d'une autre personne. Ajoutez une lettre signée de cette personne attestant que vous habitez à cette adresse","poa.letter.send":"Envoyer la lettre","poa.licence.use":"Utiliser l'adresse de mon permis de conduire","poa.licence.note":"Nous avons lu cette adresse sur votre permis. Vous n'avez pas besoin d'un autre document.","poa.retry.document_too_old":"Ce document est plus ancien que la limite. Importez un document plus récent parmi ceux de la liste ci-dessous","poa.retry.document_date_invalid":"La date du document est dans le futur. Importez un document daté d'aujourd'hui ou d'avant","poa.retry.document_kind_not_accepted":"Ce type de document n'est pas accepté. Importez l'un des documents de la liste ci-dessous","poa.retry.name_mismatch":"Le nom sur le document ne correspond pas au vôtre. Importez un document à votre nom","poa.retry.address_mismatch":"L'adresse du document ne correspond pas à celle qui nous a été transmise. Importez un document pour cette adresse","poa.retry.holder_letter_missing":"La lettre doit être signée et nommer à la fois vous et le titulaire de la facture. Importez une lettre complète","poa.retry.unreadable":"Nous n'avons pas pu lire le document. Importez une copie plus nette et complète","poa.retry.pdf_protected":"Retirez le mot de passe du PDF et réessayez","poa.retry.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment. Réessayez dans un instant","poa.hint.blurry":"L'image est floue","poa.hint.cropped":"Une partie du document est coupée","poa.hint.glare":"Il y a un reflet sur le document","reasons.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment","reasons.pdf_protected":"Le PDF est protégé par un mot de passe ou contient du contenu actif","reasons.document_kind_not_accepted":"Ce type de document n'est pas accepté","reasons.document_date_invalid":"La date du document est dans le futur","reasons.document_too_old":"Le document est trop ancien","reasons.document_tampered":"Le document semble avoir été modifié","reasons.holder_letter_required":"Une lettre du titulaire de la facture est nécessaire","reasons.holder_letter_missing":"La lettre du titulaire de la facture est absente ou incomplète","reasons.address_mismatch":"L'adresse ne correspond pas à celle qui a été transmise"};function J({blob:a,label:n}){let[e,r]=(0,f.useState)(void 0);return(0,f.useEffect)(()=>{if(typeof URL.createObjectURL!="function")return;let d=URL.createObjectURL(a);return r(d),()=>URL.revokeObjectURL(d)},[a]),(0,o.jsx)("img",{src:e,alt:n})}s(J,"Q");i(J,"PageThumb");function B({step:a,i18n:n,c:e,title:r,notice:d,intro:m,onUpload:p}){let y=(0,f.useRef)(null),l=(0,f.useRef)(null),[c,_]=(0,f.useState)([]),[h,P]=(0,f.useState)(!1),[L,C]=(0,f.useState)("idle"),[K,U]=(0,f.useState)(!1),A=i(u=>{P(!1),u.start().catch(()=>P(!0))},"open");(0,f.useEffect)(()=>{let u=y.current;if(u===null)return;let g;try{g=a.capturePage({video:u})}catch{P(!0);return}return l.current=g,A(g),()=>{g.destroy(),l.current=null}},[]);let E=c.length>=a.maxPages,Q=i(async()=>{let u=l.current;if(!(u===null||E)){C("taking"),U(!1);try{await u.takePage()}catch{}_([...u.pages]),C("idle")}},"take"),X=i(u=>{let g=l.current;g!==null&&(g.removePage(u),_([...g.pages]))},"retake"),Z=i(async()=>{let u=l.current;if(!(u===null||c.length===0)){C("sending"),U(!1);try{await u.submitPages()}catch{U(!0)}C("idle")}},"send"),T=L==="sending";return(0,o.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-poa-camera",children:[(0,o.jsx)(D,{title:r,lead:e("poa.camera.lead")}),d,K?(0,o.jsx)(b,{tone:"danger",children:(0,o.jsx)("span",{children:e("poa.upload.failed")})}):null,h?(0,o.jsxs)(b,{tone:"danger",children:[(0,o.jsx)("span",{children:e("doc.cameraBlocked")}),(0,o.jsx)("span",{children:e("doc.cameraBlockedHint")}),l.current!==null?(0,o.jsx)(k,{kind:"secondary",onClick:s(()=>l.current!==null&&A(l.current),"onClick"),children:e("doc.retryCamera")}):null]}):null,c.length===0?m:null,(0,o.jsx)("video",{ref:y,className:"sekyro-poa-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),c.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"sekyro-text-muted",role:"status",children:e("poa.upload.pages",{count:c.length})}),(0,o.jsx)("ul",{className:"sekyro-poa-pages",children:c.map((u,g)=>{let I=e("poa.camera.page",{number:g+1});return(0,o.jsxs)("li",{children:[(0,o.jsx)(J,{blob:u,label:I}),(0,o.jsx)(k,{kind:"ghost",onClick:s(()=>X(g),"onClick"),disabled:T,"aria-label":`${e("poa.camera.retake")} ${I}`,children:e("poa.camera.retake")})]},g)})})]}):null,T?(0,o.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,(0,o.jsxs)(R,{children:[(0,o.jsxs)(k,{full:!0,kind:c.length>0?"secondary":"primary",onClick:s(()=>{Q()},"onClick"),disabled:E||h||L!=="idle"||a.attemptsExhausted,"aria-busy":L==="taking"||void 0,children:[(0,o.jsx)(F,{name:"camera"}),e("poa.camera.capture")]}),c.length>0?(0,o.jsx)(k,{full:!0,onClick:s(()=>{Z()},"onClick"),disabled:L!=="idle","aria-busy":T||void 0,children:e("poa.upload.send")}):null,p!==void 0?(0,o.jsx)(k,{full:!0,kind:"ghost",onClick:p,disabled:T,children:e("poa.source.upload")}):null]})]})}s(B,"K");i(B,"PageCamera");function $(a,n){try{let e=new Intl.DisplayNames([n],{type:"region",fallback:"code"}).of(a);return e!==void 0&&e!==""?e:a}catch{return a}}s($,"J");i($,"regionName");var te={en:z,fr:ae,ar:ee,es:z,pt:z,de:z},oe="image/jpeg,image/png,image/heic,image/heif,application/pdf";function V(a){let n=a.strings,e=te[a.locale];return(r,d)=>q(n[r]??e[r]??"",d)}s(V,"ae");i(V,"poaCopy");function N({step:a,i18n:n,c:e}){if(a.reason===void 0)return null;let r=e(`poa.retry.${a.reason}`)||e(`reasons.${a.reason}`)||e("poa.retry.unreadable");return(0,t.jsxs)(b,{tone:"warning",children:[(0,t.jsx)("span",{children:r}),(0,t.jsx)("span",{children:G(n,a.attemptsRemaining,a.attemptsExhausted)})]})}s(N,"U");i(N,"RetryNotice");function w({step:a,i18n:n,c:e}){let r=(0,v.useId)(),{country:d}=a.rule,m=d===null?e("poa.accepted"):e("poa.acceptedFor",{country:$(d,n.locale)});return(0,t.jsxs)("div",{className:"sekyro-poa-accepted",children:[(0,t.jsx)("p",{id:r,className:"sekyro-poa-accepted__title",children:m}),(0,t.jsx)("ul",{className:"sekyro-poa-list","aria-labelledby":r,children:a.rule.kinds.map(p=>(0,t.jsx)("li",{children:e("poa.kindDated",{kind:e(`poa.kinds.${p.kind}`)||p.kind,days:p.maxAgeDays})},p.kind))})]})}s(w,"j");i(w,"AcceptedList");var ne={unsupported:"poa.upload.unsupported",tooMany:"poa.upload.tooManyPages",tooLarge:"poa.upload.tooLarge",failed:"poa.upload.failed"};function W(a){return a instanceof TypeError&&a.message==="unsupported_file"?"unsupported":a instanceof RangeError&&a.message==="file_too_large"?"tooLarge":a instanceof RangeError&&(a.message==="too_many_pages"||a.message==="no_pages")?"tooMany":"failed"}s(W,"re");i(W,"refusalOf");function H({step:a,i18n:n,c:e,letter:r,onCamera:d}){let m=(0,v.useRef)(null),[p,y]=(0,v.useState)("idle"),l=p==="sending",c=i(async _=>{let h=Array.from(_.currentTarget.files??[]);if(_.currentTarget.value="",h.length!==0){if(h.length>a.maxPages){y("tooMany");return}y("sending");try{await(r?a.uploadHolderLetter(h):a.uploadPages(h)),y("idle")}catch(P){y(W(P))}}},"onFiles");return(0,t.jsxs)("section",{className:"sekyro-step","data-testid":r?"sekyro-poa-letter":"sekyro-poa-upload",children:[(0,t.jsx)(D,{title:e(r?"poa.letter.title":"poa.title"),lead:e(r?"poa.letter.lead":"poa.lead")}),p==="idle"||l?(0,t.jsx)(N,{step:a,i18n:n,c:e}):null,p!=="idle"&&!l?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:e(ne[p])})}):null,r?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),(0,t.jsx)("p",{className:"sekyro-text-muted",children:e("poa.upload.hint")}),l?(0,t.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,(0,t.jsx)("input",{ref:m,type:"file",accept:oe,multiple:!0,hidden:!0,"data-testid":"sekyro-poa-file","aria-label":e(r?"poa.letter.title":"poa.title"),onChange:s(_=>{c(_)},"onChange")}),(0,t.jsxs)(R,{children:[(0,t.jsx)(k,{full:!0,onClick:s(()=>m.current?.click(),"onClick"),disabled:l||!a.photo.uploadOffered||a.attemptsExhausted,"aria-busy":l||void 0,children:e("poa.upload.choose")}),d!==void 0?(0,t.jsxs)(k,{full:!0,kind:"ghost",onClick:d,disabled:l,children:[(0,t.jsx)(F,{name:a.photo.cameraOnPhone===!0?"smartphone":"camera"}),a.photo.cameraOnPhone===!0?e("capture.source.phone"):e("poa.source.camera")]}):null]})]})}s(H,"se");i(H,"UploadScreen");function Y({step:a,c:n}){let[e,r]=(0,v.useState)("idle"),d=a.useLicenceAddress;if(d===void 0)return null;let m=i(async()=>{r("sending");try{await d(),r("idle")}catch{r("failed")}},"onUse");return(0,t.jsxs)("div",{className:"sekyro-poa-licence","data-testid":"sekyro-poa-licence",children:[(0,t.jsx)("p",{className:"sekyro-text-muted",children:n("poa.licence.note")}),e==="failed"?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:n("poa.upload.failed")})}):null,(0,t.jsx)(k,{full:!0,kind:"secondary",onClick:s(()=>{m()},"onClick"),disabled:e==="sending"||a.attemptsExhausted,"aria-busy":e==="sending"||void 0,children:n("poa.licence.use")})]})}s(Y,"de");i(Y,"LicenceShortcut");function re({step:a,i18n:n}){let e=V(n),[r,d]=(0,v.useState)(null),m=a.phase==="holder_letter",p=a.photo.source,y=p==="choice"?r??a.photo.pick:p,l=a.photo.cameraOnPhone===!0,c=a.photo.uploadOffered?()=>d("upload"):void 0,_=e(m?"poa.letter.title":"poa.title"),h;return y===null?h=(0,t.jsx)(S,{testId:"sekyro-poa-source",title:_,lead:e("poa.source.lead"),cameraLabel:e(l?"capture.source.phone":"poa.source.camera"),uploadLabel:e("poa.source.upload"),onPhone:l,notice:(0,t.jsx)(N,{step:a,i18n:n,c:e}),onCamera:s(()=>d("camera"),"onCamera"),onUpload:s(()=>d("upload"),"onUpload")}):y==="camera"&&l?h=(0,t.jsx)(M,{i18n:n,lead:e("handoff.lead.poa"),refresh:a.refresh,actions:c!==void 0?(0,t.jsx)(k,{kind:"ghost",full:!0,onClick:c,children:e("poa.source.upload")}):null}):y==="camera"?h=(0,t.jsx)(B,{step:a,i18n:n,c:e,title:_,notice:(0,t.jsx)(N,{step:a,i18n:n,c:e}),intro:m?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),...p==="choice"&&c!==void 0?{onUpload:c}:{}}):h=(0,t.jsx)(H,{step:a,i18n:n,c:e,letter:m,...p==="choice"?{onCamera:i(()=>d("camera"),"onCamera")}:{}}),(0,t.jsxs)(t.Fragment,{children:[m?null:(0,t.jsx)(Y,{step:a,c:e}),h]})}s(re,"ze");i(re,"ProofOfAddressView");export{oe as POA_UPLOAD_ACCEPT,re as ProofOfAddressView,V as poaCopy};
|
package/dist/styles.css
CHANGED
|
@@ -1160,14 +1160,20 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
1160
1160
|
.sekyro-root .sekyro-result { display: flex; flex-direction: column; flex: 1; padding-block-start: 2rem; }
|
|
1161
1161
|
.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; }
|
|
1162
1162
|
.sekyro-root .sekyro-result .sekyro-heading { align-items: center; }
|
|
1163
|
-
/* The
|
|
1164
|
-
.sekyro-
|
|
1165
|
-
|
|
1166
|
-
.sekyro-
|
|
1163
|
+
/* The simulated Sandbox session's notice: the width of the column, read from the start like every notice. */
|
|
1164
|
+
.sekyro-result__body .sekyro-notice { align-self: stretch; text-align: start; }
|
|
1165
|
+
/* 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. */
|
|
1166
|
+
.sekyro-outcome { inline-size: 136px; block-size: 136px; }
|
|
1167
|
+
.sekyro-outcome__ring {
|
|
1168
|
+
fill: none; stroke: var(--sekyro-color-success-soft, color-mix(in srgb, var(--sekyro-color-success) 14%, var(--sekyro-color-surface))); stroke-width: 12; stroke-linecap: butt;
|
|
1169
|
+
stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: center; transform-box: fill-box;
|
|
1170
|
+
animation: sekyro-draw 450ms ease-out forwards;
|
|
1171
|
+
}
|
|
1172
|
+
.sekyro-outcome__disc { fill: var(--sekyro-color-success); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) 380ms both; }
|
|
1167
1173
|
@keyframes sekyro-fill { from { opacity: 0; transform: scale(0.86); } }
|
|
1168
1174
|
.sekyro-outcome__glyph {
|
|
1169
|
-
fill: none; stroke: var(--sekyro-color-on-success, var(--sekyro-color-surface)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
|
|
1170
|
-
stroke-dasharray: 1; stroke-dashoffset: 1; animation: sekyro-draw 320ms ease-out
|
|
1175
|
+
fill: none; stroke: var(--sekyro-color-on-success, var(--sekyro-color-surface)); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
|
|
1176
|
+
stroke-dasharray: 1; stroke-dashoffset: 1; animation: sekyro-draw 320ms ease-out 620ms forwards;
|
|
1171
1177
|
}
|
|
1172
1178
|
@keyframes sekyro-draw { to { stroke-dashoffset: 0; } }
|
|
1173
1179
|
.sekyro-outcome-tile { animation: sekyro-fill 380ms var(--sekyro-spring) both; }
|
|
@@ -1428,8 +1434,8 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
1428
1434
|
.sekyro-lm-read, .sekyro-lm-flip-card { animation: none; }
|
|
1429
1435
|
.sekyro-lm-flip-card { transform: rotateY(180deg); }
|
|
1430
1436
|
.sekyro-lm-read.is-repeating { transform: translateX(calc(var(--sekyro-guide-w) * 0.5 * var(--sekyro-inline-sign))); }
|
|
1431
|
-
.sekyro-outcome__glyph { animation: none; stroke-dashoffset: 0; }
|
|
1432
|
-
.sekyro-
|
|
1437
|
+
.sekyro-outcome__ring, .sekyro-outcome__glyph { animation: none; stroke-dashoffset: 0; }
|
|
1438
|
+
.sekyro-outcome__disc, .sekyro-outcome-tile, .sekyro-dialog[open], .sekyro-skeleton__bar, .sekyro-handoff__pulse { animation: none; }
|
|
1433
1439
|
.sekyro-tile.is-busy { animation: none; }
|
|
1434
1440
|
.sekyro-lm-brackets > path, .sekyro-progress__bar::before, .sekyro-root .sekyro-btn, .sekyro-card { transition: none; }
|
|
1435
1441
|
.sekyro-root .sekyro-btn:active, .sekyro-card:active { transform: none; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/elements",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.6",
|
|
4
4
|
"description": "Sekyro AI custom elements: <sekyro-verification> for Vue, Angular, Svelte and plain HTML, the @sekyro/react flow with React bundled inside",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"api:check": "api-extractor run"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
97
|
+
"@sekyro/web": "^0.1.0-rc.28 || ^0.2.0-rc.0"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@microsoft/api-extractor": "^7.59.4",
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "elements",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/elements@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.6",
|
|
101
|
+
"bom-ref": "@sekyro/elements@0.1.0-rc.6",
|
|
102
102
|
"description": "Sekyro AI custom elements: <sekyro-verification> for Vue, Angular, Svelte and plain HTML, the @sekyro/react flow with React bundled inside",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/elements@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/elements@0.1.0-rc.6?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-elements",
|
|
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/elements@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/elements@0.1.0-rc.6"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|