@sekyro/elements 0.1.0-rc.7 → 0.1.0-rc.8
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 +20 -0
- package/dist/cdn/chunks/barcode-detect-C5IOXMKI-ZOZ2WOWU.js +1 -0
- package/dist/cdn/chunks/{capture-session-doc-LUA4Y7PZ-LOMSB7V7.js → capture-session-doc-YC4CT2EQ-XMNCWYSB.js} +1 -1
- package/dist/cdn/chunks/challenge-frame-5GG4NDF5-KAYYJKDP.js +1 -0
- package/dist/cdn/chunks/chunk-7CMXCKSD.js +1 -0
- package/dist/cdn/chunks/{chunk-33KMCERZ.js → chunk-A2ZKVVIE.js} +1 -1
- package/dist/cdn/chunks/{chunk-OGRBLEPE.js → chunk-CIHC5WP4.js} +1 -1
- package/dist/cdn/chunks/{chunk-F4IM73DE.js → chunk-E6ELKNG4.js} +1 -1
- package/dist/cdn/chunks/chunk-GTYN5CAI.js +25 -0
- package/dist/cdn/chunks/chunk-HMHTT2VW.js +1 -0
- package/dist/cdn/chunks/{chunk-QMITFZK4.js → chunk-HP4JH4K5.js} +1 -1
- package/dist/cdn/chunks/chunk-IXR4RRPR.js +3 -0
- package/dist/cdn/chunks/chunk-J2APPV22.js +1 -0
- package/dist/cdn/chunks/{chunk-FGBKOHVK.js → chunk-J6ERQV2N.js} +1 -1
- package/dist/cdn/chunks/chunk-KMKUWNV6.js +1 -0
- package/dist/cdn/chunks/chunk-KZ23JW5G.js +1 -0
- package/dist/cdn/chunks/{chunk-3ELDB5WG.js → chunk-N6XDQRVA.js} +1 -1
- package/dist/cdn/chunks/{chunk-HH33TJJH.js → chunk-O33NXBND.js} +1 -1
- package/dist/cdn/chunks/{chunk-M4UCDUJB.js → chunk-O3YS4LLK.js} +1 -1
- package/dist/cdn/chunks/chunk-OVZDKB3N.js +1 -0
- package/dist/cdn/chunks/chunk-P6NXHUXL.js +33 -0
- package/dist/cdn/chunks/{chunk-W4RXHXFP.js → chunk-P7PTTPLQ.js} +1 -1
- package/dist/cdn/chunks/{chunk-4FTXJ6MZ.js → chunk-S4ZSNILS.js} +1 -1
- package/dist/cdn/chunks/{chunk-D2JAXHZF.js → chunk-S7HF3KSX.js} +1 -1
- package/dist/cdn/chunks/chunk-SIBJ56BG.js +1 -0
- package/dist/cdn/chunks/{chunk-WPRIGJHG.js → chunk-SMZ7F4L7.js} +1 -1
- package/dist/cdn/chunks/{chunk-ETJPN5LO.js → chunk-T5IERZBI.js} +1 -1
- package/dist/cdn/chunks/{chunk-L2UAVB62.js → chunk-XUFK2XNN.js} +1 -1
- package/dist/cdn/chunks/chunk-YZWLMKXA.js +1 -0
- package/dist/cdn/chunks/{create-document-capture-ZTJKSEJB-NIBVRVLZ.js → create-document-capture-O64FR2DA-7SC4NDCQ.js} +1 -1
- package/dist/cdn/chunks/{detector-scanic-23DAYT3H-AJXQA7H4.js → detector-scanic-SE3CL55N-JIGLCDPS.js} +1 -1
- package/dist/cdn/chunks/document-capture-view-5FWUD45F-BUOKIKYU.js +1 -0
- package/dist/cdn/chunks/{eid-view-7CTFIZ5R-PN357YSL.js → eid-view-U2HL2IX7-JYEKGEY6.js} +1 -1
- package/dist/cdn/chunks/{email-otp-view-MB334KKV-YKOW7MU6.js → email-otp-view-CMJHROOH-ZORE2M7T.js} +1 -1
- package/dist/cdn/chunks/flow-views-O3KBN7YF-FVEPCKNG.js +1 -0
- package/dist/cdn/chunks/form-view-WVPN7ZUY-ESEVBVRS.js +1 -0
- package/dist/cdn/chunks/overlay-de-PVJMYZGV-JDDHHQJZ.js +1 -0
- package/dist/cdn/chunks/overlay-es-PZCE25XM-D7N7YW66.js +1 -0
- package/dist/cdn/chunks/overlay-pt-PZ3L6DR7-AD7SQLSO.js +1 -0
- package/dist/cdn/chunks/plan-runner-WGMNUBWJ-POS5T3PO.js +1 -0
- package/dist/cdn/chunks/{portrait-capture-view-DSUGE7PI-L7U7UVJY.js → portrait-capture-view-UYISOXXV-NMWFOXD6.js} +1 -1
- package/dist/cdn/chunks/{portrait-review-view-PPYEEMYM-V4UMKNJE.js → portrait-review-view-67VI2Q6K-WR4CEUM3.js} +1 -1
- package/dist/cdn/chunks/proof-of-address-view-EIQXYYM3-HVPMVRPP.js +1 -0
- package/dist/cdn/chunks/reader-652D2CK6.js +2 -0
- package/dist/cdn/define.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/{chunk-OSC2SC2X.js → chunk-6MLQBNF4.js} +1 -1
- package/dist/{chunk-3BGD4PJ7.js → chunk-DAAZBRNM.js} +1 -1
- package/dist/chunk-DUYCGH4R.js +33 -0
- package/dist/chunk-FAZTWW5J.js +1 -0
- package/dist/{chunk-VEOZABLV.js → chunk-HOOZLWNR.js} +1 -1
- package/dist/{chunk-KHBP6WWR.js → chunk-IB3NF7H5.js} +1 -1
- package/dist/{chunk-F2IPIZ4J.js → chunk-JIHK7L54.js} +1 -1
- package/dist/{chunk-BJ2YKUCC.js → chunk-MYYAFIK6.js} +1 -1
- package/dist/chunk-P223YKM3.js +1 -0
- package/dist/{chunk-PFH7S4E7.js → chunk-THDSSKYQ.js} +1 -1
- package/dist/chunk-TOU3UDCB.js +25 -0
- package/dist/{chunk-LNCABBX7.js → chunk-UIOHM6CB.js} +1 -1
- package/dist/chunk-V2KMG4IA.js +1 -0
- package/dist/{chunk-XLLG6AKG.js → chunk-WCPTICNC.js} +1 -1
- package/dist/chunk-ZLREPJUJ.js +1 -0
- package/dist/define.cjs +6 -6
- package/dist/define.js +1 -1
- package/dist/document-capture-view-5FWUD45F-PZAJNUII.js +1 -0
- package/dist/{eid-view-7CTFIZ5R-OL2YXQZO.js → eid-view-U2HL2IX7-ONZGT2S5.js} +1 -1
- package/dist/{email-otp-view-MB334KKV-Q7237EQV.js → email-otp-view-CMJHROOH-4DBMTA3R.js} +1 -1
- package/dist/flow-views-O3KBN7YF-I2I3K4EY.js +1 -0
- package/dist/form-view-WVPN7ZUY-Z523S2WJ.js +1 -0
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +70 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +1 -1
- package/dist/overlay-de-PVJMYZGV-75ZFRADU.js +1 -0
- package/dist/overlay-es-PZCE25XM-IEA7Y6EU.js +1 -0
- package/dist/overlay-pt-PZ3L6DR7-WMCH3XQV.js +1 -0
- package/dist/{portrait-capture-view-DSUGE7PI-HBLXJDXY.js → portrait-capture-view-UYISOXXV-SO3YYR22.js} +1 -1
- package/dist/{portrait-review-view-PPYEEMYM-W66WNNUM.js → portrait-review-view-67VI2Q6K-ELE4HPWJ.js} +1 -1
- package/dist/proof-of-address-view-EIQXYYM3-HDMZQJCO.js +1 -0
- package/dist/styles.css +80 -10
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/cdn/chunks/challenge-frame-NUGPTWFP-V3GGQN65.js +0 -1
- package/dist/cdn/chunks/chunk-AXYGICTN.js +0 -3
- package/dist/cdn/chunks/chunk-DBGVBAMW.js +0 -1
- package/dist/cdn/chunks/chunk-DQAVYXAF.js +0 -25
- package/dist/cdn/chunks/chunk-EWTKC2C2.js +0 -1
- package/dist/cdn/chunks/chunk-FWZOENNU.js +0 -1
- package/dist/cdn/chunks/chunk-NYF6B3ZA.js +0 -1
- package/dist/cdn/chunks/chunk-OPRYWIQM.js +0 -33
- package/dist/cdn/chunks/chunk-UGHWANZX.js +0 -1
- package/dist/cdn/chunks/document-capture-view-ZKT3W6UE-FQWRXOHT.js +0 -1
- package/dist/cdn/chunks/flow-views-SRAXHC6K-J3H3VF3P.js +0 -1
- package/dist/cdn/chunks/overlay-de-ILMZBGZH-DIOHROVO.js +0 -1
- package/dist/cdn/chunks/overlay-es-YLDY73HJ-LSXKLJQ2.js +0 -1
- package/dist/cdn/chunks/overlay-pt-GZXT2S6D-ASML67UA.js +0 -1
- package/dist/cdn/chunks/plan-runner-INQLWFGS-24JH5MQZ.js +0 -1
- package/dist/cdn/chunks/proof-of-address-view-2M6UDK76-ND76DOHN.js +0 -1
- package/dist/chunk-FSGDOTCB.js +0 -1
- package/dist/chunk-ULVT7UW6.js +0 -1
- package/dist/chunk-UUDX5GK4.js +0 -33
- package/dist/chunk-YQ7XHAQJ.js +0 -25
- package/dist/document-capture-view-ZKT3W6UE-5JRPJOO5.js +0 -1
- package/dist/flow-views-SRAXHC6K-DUSVVMFO.js +0 -1
- package/dist/overlay-de-ILMZBGZH-L5N7BMI4.js +0 -1
- package/dist/overlay-es-YLDY73HJ-JYBZEXG5.js +0 -1
- package/dist/overlay-pt-GZXT2S6D-WCIUJ4DI.js +0 -1
- package/dist/proof-of-address-view-2M6UDK76-27QSU4R3.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as J}from"./chunk-SIBJ56BG.js";import{a as S}from"./chunk-O33NXBND.js";import{a as q}from"./chunk-KMKUWNV6.js";import"./chunk-T5IERZBI.js";import{d as M}from"./chunk-E6ELKNG4.js";import"./chunk-J6ERQV2N.js";import{K as b,L as G,a as O,b as j,c as k,v as N,w as D,y as R}from"./chunk-GTYN5CAI.js";import{a as p}from"./chunk-5QL6W6FW.js";import{a as l,c as x}from"./chunk-4FHWXBOB.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":"العنوان لا يطابق العنوان المقدَّم"},U={"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 B({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})}l(B,"Q");p(B,"PageThumb");function $({step:a,i18n:n,c:e,title:r,notice:d,intro:m,onUpload:i}){let y=(0,f.useRef)(null),s=(0,f.useRef)(null),[c,_]=(0,f.useState)([]),[h,P]=(0,f.useState)(!1),[L,C]=(0,f.useState)("idle"),[K,F]=(0,f.useState)(!1),A=p(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 s.current=g,A(g),()=>{g.destroy(),s.current=null}},[]);let E=c.length>=a.maxPages,Q=p(async()=>{let u=s.current;if(!(u===null||E)){C("taking"),F(!1);try{await u.takePage()}catch{}_([...u.pages]),C("idle")}},"take"),X=p(u=>{let g=s.current;g!==null&&(g.removePage(u),_([...g.pages]))},"retake"),Z=p(async()=>{let u=s.current;if(!(u===null||c.length===0)){C("sending"),F(!1);try{await u.submitPages()}catch{F(!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")}),s.current!==null?(0,o.jsx)(k,{kind:"secondary",onClick:l(()=>s.current!==null&&A(s.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)(B,{blob:u,label:I}),(0,o.jsx)(k,{kind:"ghost",onClick:l(()=>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:l(()=>{Q()},"onClick"),disabled:E||h||L!=="idle"||a.attemptsExhausted,"aria-busy":L==="taking"||void 0,children:[(0,o.jsx)(N,{name:"camera"}),e("poa.camera.capture")]}),c.length>0?(0,o.jsx)(k,{full:!0,onClick:l(()=>{Z()},"onClick"),disabled:L!=="idle","aria-busy":T||void 0,children:e("poa.upload.send")}):null,i!==void 0?(0,o.jsx)(k,{full:!0,kind:"ghost",onClick:i,disabled:T,children:e("poa.source.upload")}):null]})]})}l($,"J");p($,"PageCamera");var te={en:U,fr:ae,ar:ee,es:U,pt:U,de:U},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)}l(V,"ae");p(V,"poaCopy");function z({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)})]})}l(z,"U");p(z,"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:J(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(i=>(0,t.jsx)("li",{children:e("poa.kindDated",{kind:e(`poa.kinds.${i.kind}`)||i.kind,days:i.maxAgeDays})},i.kind))})]})}l(w,"j");p(w,"AcceptedList");var re={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"}l(W,"re");p(W,"refusalOf");function H({step:a,i18n:n,c:e,letter:r,onCamera:d}){let m=(0,v.useRef)(null),[i,y]=(0,v.useState)("idle"),s=i==="sending",c=p(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")}),i==="idle"||s?(0,t.jsx)(z,{step:a,i18n:n,c:e}):null,i!=="idle"&&!s?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:e(re[i])})}):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")}),s?(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:l(_=>{c(_)},"onChange")}),(0,t.jsxs)(R,{children:[(0,t.jsx)(k,{full:!0,onClick:l(()=>m.current?.click(),"onClick"),disabled:s||!a.photo.uploadOffered||a.attemptsExhausted,"aria-busy":s||void 0,children:e("poa.upload.choose")}),d!==void 0?(0,t.jsxs)(k,{full:!0,kind:"ghost",onClick:d,disabled:s,children:[(0,t.jsx)(N,{name:a.photo.cameraOnPhone===!0?"smartphone":"camera"}),a.photo.cameraOnPhone===!0?e("capture.source.phone"):e("poa.source.camera")]}):null]})]})}l(H,"se");p(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=p(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:l(()=>{m()},"onClick"),disabled:e==="sending"||a.attemptsExhausted,"aria-busy":e==="sending"||void 0,children:n("poa.licence.use")})]})}l(Y,"de");p(Y,"LicenceShortcut");function ne({step:a,i18n:n}){let e=V(n),[r,d]=(0,v.useState)(null),m=a.phase==="holder_letter",i=a.photo.source,y=i==="choice"?r??a.photo.pick:i,s=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(s?"capture.source.phone":"poa.source.camera"),uploadLabel:e("poa.source.upload"),onPhone:s,notice:(0,t.jsx)(z,{step:a,i18n:n,c:e}),onCamera:l(()=>d("camera"),"onCamera"),onUpload:l(()=>d("upload"),"onUpload")}):y==="camera"&&s?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)($,{step:a,i18n:n,c:e,title:_,notice:(0,t.jsx)(z,{step:a,i18n:n,c:e}),intro:m?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),...i==="choice"&&c!==void 0?{onUpload:c}:{}}):h=(0,t.jsx)(H,{step:a,i18n:n,c:e,letter:m,...i==="choice"?{onCamera:p(()=>d("camera"),"onCamera")}:{}}),(0,t.jsxs)(t.Fragment,{children:[m?null:(0,t.jsx)(Y,{step:a,c:e}),h]})}l(ne,"we");p(ne,"ProofOfAddressView");export{oe as POA_UPLOAD_ACCEPT,ne as ProofOfAddressView,V as poaCopy};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-4FHWXBOB.js";var Wt=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],ft=Wt.map(([h])=>h),qr=ft.filter((h,v)=>Wt[v][1]==="L"),Qr=ft.filter((h,v)=>Wt[v][1]==="M");function tr(h){switch(h){case"Linear-Codes":return qr.reduce((v,O)=>v|tr(O),0);case"Matrix-Codes":return Qr.reduce((v,O)=>v|tr(O),0);case"Any":return(1<<Wt.length)-1;case"None":return 0;default:return 1<<ft.indexOf(h)}}a(tr,"l");function Na(h){if(h===0)return"None";let v=31-Math.clz32(h);return ft[v]}a(Na,"w");function za(h){return h.reduce((v,O)=>v|tr(O),0)}a(za,"E");var Jr=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function Va(h){return Jr.indexOf(h)}a(Va,"x");var rr=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function Ga(h){return h==="UnicodeBig"?rr.indexOf("UTF16BE"):rr.indexOf(h)}a(Ga,"B");var Kr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Za(h){return Kr[h]}a(Za,"T");var Yr=["Ignore","Read","Require"];function Xa(h){return Yr.indexOf(h)}a(Xa,"U");var te=["Plain","ECI","HRI","Hex","Escaped"];function qa(h){return te.indexOf(h)}a(qa,"p");var Rt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function Xr(h){return{...h,formats:za(h.formats),binarizer:Va(h.binarizer),eanAddOnSymbol:Xa(h.eanAddOnSymbol),textMode:qa(h.textMode),characterSet:Ga(h.characterSet)}}a(Xr,"I");var Qa={format:"QRCode",readerInit:!1,forceSquareDataMatrix:!1,ecLevel:"",scale:0,sizeHint:0,rotate:0,withHRT:!1,withQuietZones:!0};function Ja(h){return{...h,format:Na(h.format),contentType:Za(h.contentType),eccLevel:h.ecLevel}}a(Ja,"z");var Ka="2.1.0",Ya="37b847798a1af55d3a289a9516a751fcafae3c23",ti={locateFile:a((h,v)=>{let O=h.match(/_(.+?)\.wasm$/);return O?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.0/dist/${O[1]}/${h}`:v+h},"locateFile")},xt=new WeakMap;function ri(h,v){return Object.is(h,v)||Object.keys(h).length===Object.keys(v).length&&Object.keys(h).every(O=>Object.prototype.hasOwnProperty.call(v,O)&&h[O]===v[O])}a(ri,"D");function er(h,{overrides:v,equalityFn:O=ri,fireImmediately:X=!1}={}){var l;let[W,E]=(l=xt.get(h))!=null?l:[ti],k=v??W,F;if(X){if(E&&(F=O(W,k)))return E;let M=h({...k});return xt.set(h,[k,M]),M}(F??O(W,k))||xt.set(h,[k])}a(er,"S");function re(h){xt.delete(h)}a(re,"v");async function ee(h,v,O=Rt){let X={...Rt,...O},l=await er(h,{fireImmediately:!0}),W,E;if("width"in v&&"height"in v&&"data"in v){let{data:F,data:{byteLength:M},width:nt,height:dt}=v;E=l._malloc(M),l.HEAPU8.set(F,E),W=l.readBarcodesFromPixmap(E,nt,dt,Xr(X))}else{let F,M;if("buffer"in v)[F,M]=[v.byteLength,v];else if("byteLength"in v)[F,M]=[v.byteLength,new Uint8Array(v)];else if("size"in v)[F,M]=[v.size,new Uint8Array(await v.arrayBuffer())];else throw new TypeError("Invalid input type");E=l._malloc(F),l.HEAPU8.set(M,E),W=l.readBarcodesFromImage(E,F,Xr(X))}l._free(E);let k=[];for(let F=0;F<W.size();++F)k.push(Ja(W.get(F)));return k}a(ee,"Z");var ei={...Rt,formats:[...Rt.formats]},ni={...Qa};var nr=(()=>{var h,v=typeof document<"u"&&((h=document.currentScript)==null?void 0:h.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(O={}){var X,l=O,W,E,k=new Promise((t,r)=>{W=t,E=r}),F=typeof window=="object",M=typeof Bun<"u",nt=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var dt=Object.assign({},l),ar="./this.program",D="";function ie(t){return l.locateFile?l.locateFile(t,D):D+t}a(ie,"Ve");var ir,Mt;if(F||nt||M){var Ut;nt?D=self.location.href:typeof document<"u"&&((Ut=document.currentScript)===null||Ut===void 0?void 0:Ut.tagName.toUpperCase())==="SCRIPT"&&(D=document.currentScript.src),v&&(D=v),D.startsWith("blob:")?D="":D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1),nt&&(Mt=a(t=>{var r=new XMLHttpRequest;return r.open("GET",t,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)},"Cr")),ir=a(async t=>{var r=await fetch(t,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)},"Gr")}var oe=l.print||console.log.bind(console),Y=l.printErr||console.error.bind(console);Object.assign(l,dt),dt=null,l.arguments&&l.arguments,l.thisProgram&&(ar=l.thisProgram);var ht=l.wasmBinary,pt,or=!1,L,R,at,vt,tt,T,sr,ur;function cr(){var t=pt.buffer;l.HEAP8=L=new Int8Array(t),l.HEAP16=at=new Int16Array(t),l.HEAPU8=R=new Uint8Array(t),l.HEAPU16=vt=new Uint16Array(t),l.HEAP32=tt=new Int32Array(t),l.HEAPU32=T=new Uint32Array(t),l.HEAPF32=sr=new Float32Array(t),l.HEAPF64=ur=new Float64Array(t)}a(cr,"Kr");var lr=[],fr=[],dr=[];function se(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)le(l.preRun.shift());Dt(lr)}a(se,"Ne");function ue(){Dt(fr)}a(ue,"Ze");function ce(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)de(l.postRun.shift());Dt(dr)}a(ce,"ze");function le(t){lr.unshift(t)}a(le,"Ge");function fe(t){fr.unshift(t)}a(fe,"Xe");function de(t){dr.unshift(t)}a(de,"Le");var q=0,it=null;function he(t){var r;q++,(r=l.monitorRunDependencies)===null||r===void 0||r.call(l,q)}a(he,"qe");function pe(t){var r;if(q--,(r=l.monitorRunDependencies)===null||r===void 0||r.call(l,q),q==0&&it){var e=it;it=null,e()}}a(pe,"Ke");function kt(t){var r;(r=l.onAbort)===null||r===void 0||r.call(l,t),t="Aborted("+t+")",Y(t),or=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw E(e),e}a(kt,"Pr");var ve="data:application/octet-stream;base64,",hr=a(t=>t.startsWith(ve),"re");function ye(){var t="zxing_reader.wasm";return hr(t)?t:ie(t)}a(ye,"Je");var yt;function me(t){if(t==yt&&ht)return new Uint8Array(ht);if(Mt)return Mt(t);throw"both async and sync fetching of the wasm failed"}a(me,"Qe");async function ge(t){if(!ht)try{var r=await ir(t);return new Uint8Array(r)}catch{}return me(t)}a(ge,"rt");async function $e(t,r){try{var e=await ge(t),n=await WebAssembly.instantiate(e,r);return n}catch(i){Y(`failed to asynchronously prepare wasm: ${i}`),kt(i)}}a($e,"et");async function we(t,r,e){if(!t&&typeof WebAssembly.instantiateStreaming=="function"&&!hr(r)&&typeof fetch=="function")try{var n=fetch(r,{credentials:"same-origin"}),i=await WebAssembly.instantiateStreaming(n,e);return i}catch(o){Y(`wasm streaming compile failed: ${o}`),Y("falling back to ArrayBuffer instantiation")}return $e(r,e)}a(we,"tt");function be(){return{a:sa}}a(be,"nt");async function Ce(){var t;function r(o,u){return _=o.exports,pt=_.xa,cr(),Tr=_.Ba,fe(_.ya),pe(),_}a(r,"r"),he();function e(o){r(o.instance)}a(e,"t");var n=be();if(l.instantiateWasm)try{return l.instantiateWasm(n,r)}catch(o){Y(`Module.instantiateWasm callback failed with error: ${o}`),E(o)}(t=yt)!==null&&t!==void 0||(yt=ye());try{var i=await we(ht,yt,n);return e(i),i}catch(o){E(o);return}}a(Ce,"it");var Dt=a(t=>{for(;t.length>0;)t.shift()(l)},"Ar");l.noExitRuntime;var m=a(t=>Mr(t),"p"),g=a(()=>Ur(),"h"),mt=[],gt=0,Te=a(t=>{var r=new ot(t);return r.get_caught()||(r.set_caught(!0),gt--),r.set_rethrown(!1),mt.push(r),Dr(t),Rr(t)},"at"),H=0,Pe=a(()=>{y(0,0);var t=mt.pop();kr(t.excPtr),H=0},"ot");let Yt=class Yt{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){T[this.ptr+4>>2]=r}get_type(){return T[this.ptr+4>>2]}set_destructor(r){T[this.ptr+8>>2]=r}get_destructor(){return T[this.ptr+8>>2]}set_caught(r){r=r?1:0,L[this.ptr+12]=r}get_caught(){return L[this.ptr+12]!=0}set_rethrown(r){r=r?1:0,L[this.ptr+13]=r}get_rethrown(){return L[this.ptr+13]!=0}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){T[this.ptr+16>>2]=r}get_adjusted_ptr(){return T[this.ptr+16>>2]}};a(Yt,"Rr");let ot=Yt;var _e=a(t=>{throw H||(H=t),H},"st"),$t=a(t=>Wr(t),"fr"),Bt=a(t=>{var r=H;if(!r)return $t(0),0;var e=new ot(r);e.set_adjusted_ptr(r);var n=e.get_type();if(!n)return $t(0),r;for(var i of t){if(i===0||i===n)break;var o=e.ptr+16;if(Br(i,n,o))return $t(i),r}return $t(n),r},"Er"),Ae=a(()=>Bt([]),"ut"),Se=a(t=>Bt([t]),"ft"),Oe=a((t,r)=>Bt([t,r]),"lt"),je=a(()=>{var t=mt.pop();t||kt("no exception to throw");var r=t.excPtr;throw t.get_rethrown()||(mt.push(t),t.set_rethrown(!0),t.set_caught(!1),gt++),H=r,H},"ct"),Fe=a((t,r,e)=>{var n=new ot(t);throw n.init(r,e),H=t,gt++,H},"vt"),Ee=a(()=>gt,"dt"),Ie=a(()=>kt(""),"pt"),wt={},Lt=a(t=>{for(;t.length;){var r=t.pop(),e=t.pop();e(r)}},"Fr");function st(t){return this.fromWireType(T[t>>2])}a(st,"Y");var rt={},Q={},bt={},pr,Ct=a(t=>{throw new pr(t)},"vr"),J=a((t,r,e)=>{t.forEach(s=>bt[s]=r);function n(s){var c=e(s);c.length!==t.length&&Ct("Mismatched type converter count");for(var f=0;f<t.length;++f)B(t[f],c[f])}a(n,"n");var i=new Array(r.length),o=[],u=0;r.forEach((s,c)=>{Q.hasOwnProperty(s)?i[c]=Q[s]:(o.push(s),rt.hasOwnProperty(s)||(rt[s]=[]),rt[s].push(()=>{i[c]=Q[s],++u,u===o.length&&n(i)}))}),o.length===0&&n(i)},"N"),xe=a(t=>{var r=wt[t];delete wt[t];var e=r.rawConstructor,n=r.rawDestructor,i=r.fields,o=i.map(u=>u.getterReturnType).concat(i.map(u=>u.setterArgumentType));J([t],o,u=>{var s={};return i.forEach((c,f)=>{var d=c.fieldName,p=u[f],w=c.getter,C=c.getterContext,P=u[f+i.length],j=c.setter,A=c.setterContext;s[d]={read:a(S=>p.fromWireType(w(C,S)),"read"),write:a((S,K)=>{var x=[];j(A,S,P.toWireType(x,K)),Lt(x)},"write")}}),[{name:r.name,fromWireType:a(c=>{var f={};for(var d in s)f[d]=s[d].read(c);return n(c),f},"fromWireType"),toWireType:a((c,f)=>{for(var d in s)if(!(d in f))throw new TypeError(`Missing field: "${d}"`);var p=e();for(d in s)s[d].write(p,f[d]);return c!==null&&c.push(n,p),p},"toWireType"),argPackAdvance:N,readValueFromPointer:st,destructorFunction:n}]})},"ht"),Re=a((t,r,e,n,i)=>{},"_t"),We=a(()=>{for(var t=new Array(256),r=0;r<256;++r)t[r]=String.fromCharCode(r);vr=t},"gt"),vr,I=a(t=>{for(var r="",e=t;R[e];)r+=vr[R[e++]];return r},"A"),et,b=a(t=>{throw new et(t)},"y");function Me(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=r.name;if(t||b(`type "${n}" must have a positive integer typeid pointer`),Q.hasOwnProperty(t)){if(e.ignoreDuplicateRegistrations)return;b(`Cannot register type '${n}' twice`)}if(Q[t]=r,delete bt[t],rt.hasOwnProperty(t)){var i=rt[t];delete rt[t],i.forEach(o=>o())}}a(Me,"yt");function B(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Me(t,r,e)}a(B,"j");var N=8,Ue=a((t,r,e,n)=>{r=I(r),B(t,{name:r,fromWireType:a(function(i){return!!i},"fromWireType"),toWireType:a(function(i,o){return o?e:n},"toWireType"),argPackAdvance:N,readValueFromPointer:a(function(i){return this.fromWireType(R[i])},"readValueFromPointer"),destructorFunction:null})},"mt"),ke=a(t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),"$t"),Ht=a(t=>{function r(e){return e.$$.ptrType.registeredClass.name}a(r,"r"),b(r(t)+" instance already deleted")},"kr"),Nt=!1,yr=a(t=>{},"ne"),De=a(t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},"bt"),mr=a(t=>{t.count.value-=1;var r=t.count.value===0;r&&De(t)},"ie"),gr=a((t,r,e)=>{if(r===e)return t;if(e.baseClass===void 0)return null;var n=gr(t,r,e.baseClass);return n===null?null:e.downcast(n)},"ae"),$r={},Be={},Le=a((t,r)=>{for(r===void 0&&b("ptr should not be undefined");t.baseClass;)r=t.upcast(r),t=t.baseClass;return r},"Ct"),He=a((t,r)=>(r=Le(t,r),Be[r]),"Tt"),Tt=a((t,r)=>{(!r.ptrType||!r.ptr)&&Ct("makeClassHandle requires ptr and ptrType");var e=!!r.smartPtrType,n=!!r.smartPtr;return e!==n&&Ct("Both smartPtrType and smartPtr must be specified"),r.count={value:1},ut(Object.create(t,{$$:{value:r,writable:!0}}))},"dr");function Ne(t){var r=this.getPointee(t);if(!r)return this.destructor(t),null;var e=He(this.registeredClass,r);if(e!==void 0){if(e.$$.count.value===0)return e.$$.ptr=r,e.$$.smartPtr=t,e.clone();var n=e.clone();return this.destructor(t),n}function i(){return this.isSmartPointer?Tt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:t}):Tt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}a(i,"i");var o=this.registeredClass.getActualType(r),u=$r[o];if(!u)return i.call(this);var s;this.isConst?s=u.constPointerType:s=u.pointerType;var c=gr(r,this.registeredClass,s.registeredClass);return c===null?i.call(this):this.isSmartPointer?Tt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:t}):Tt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}a(Ne,"Pt");var ut=a(t=>typeof FinalizationRegistry>"u"?(ut=a(r=>r,"J"),t):(Nt=new FinalizationRegistry(r=>{mr(r.$$)}),ut=a(r=>{var e=r.$$,n=!!e.smartPtr;if(n){var i={$$:e};Nt.register(r,i,r)}return r},"J"),yr=a(r=>Nt.unregister(r),"ne"),ut(t)),"J"),ze=a(()=>{Object.assign(Pt.prototype,{isAliasOf(t){if(!(this instanceof Pt)||!(t instanceof Pt))return!1;var r=this.$$.ptrType.registeredClass,e=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,i=t.$$.ptr;r.baseClass;)e=r.upcast(e),r=r.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return r===n&&e===i},clone(){if(this.$$.ptr||Ht(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=ut(Object.create(Object.getPrototypeOf(this),{$$:{value:ke(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Ht(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&b("Object already scheduled for deletion"),yr(this),mr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ht(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&b("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}})},"At");function Pt(){}a(Pt,"pr");var _t=a((t,r)=>Object.defineProperty(r,"name",{value:t}),"hr"),wr=a((t,r,e)=>{if(t[r].overloadTable===void 0){var n=t[r];t[r]=function(){for(var i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];return t[r].overloadTable.hasOwnProperty(o.length)||b(`Function '${e}' called with an invalid number of arguments (${o.length}) - expects one of (${t[r].overloadTable})!`),t[r].overloadTable[o.length].apply(this,o)},t[r].overloadTable=[],t[r].overloadTable[n.argCount]=n}},"se"),br=a((t,r,e)=>{l.hasOwnProperty(t)?((e===void 0||l[t].overloadTable!==void 0&&l[t].overloadTable[e]!==void 0)&&b(`Cannot register public name '${t}' twice`),wr(l,t,t),l[t].overloadTable.hasOwnProperty(e)&&b(`Cannot register multiple overloads of a function with the same number of arguments (${e})!`),l[t].overloadTable[e]=r):(l[t]=r,l[t].argCount=e)},"ue"),Ve=48,Ge=57,Ze=a(t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var r=t.charCodeAt(0);return r>=Ve&&r<=Ge?`_${t}`:t},"Ft");function Xe(t,r,e,n,i,o,u,s){this.name=t,this.constructor=r,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=u,this.downcast=s,this.pureVirtualFunctions=[]}a(Xe,"kt");var zt=a((t,r,e)=>{for(;r!==e;)r.upcast||b(`Expected null or instance of ${e.name}, got an instance of ${r.name}`),t=r.upcast(t),r=r.baseClass;return t},"jr");function qe(t,r){if(r===null)return this.isReference&&b(`null is not a valid ${this.name}`),0;r.$$||b(`Cannot pass "${qt(r)}" as a ${this.name}`),r.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`);var e=r.$$.ptrType.registeredClass,n=zt(r.$$.ptr,e,this.registeredClass);return n}a(qe,"St");function Qe(t,r){var e;if(r===null)return this.isReference&&b(`null is not a valid ${this.name}`),this.isSmartPointer?(e=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,e),e):0;(!r||!r.$$)&&b(`Cannot pass "${qt(r)}" as a ${this.name}`),r.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&b(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(e=zt(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(r.$$.smartPtr===void 0&&b("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?e=r.$$.smartPtr:b(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:e=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)e=r.$$.smartPtr;else{var i=r.clone();e=this.rawShare(e,V.toHandle(()=>i.delete())),t!==null&&t.push(this.rawDestructor,e)}break;default:b("Unsupporting sharing policy")}return e}a(Qe,"jt");function Je(t,r){if(r===null)return this.isReference&&b(`null is not a valid ${this.name}`),0;r.$$||b(`Cannot pass "${qt(r)}" as a ${this.name}`),r.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&b(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var e=r.$$.ptrType.registeredClass,n=zt(r.$$.ptr,e,this.registeredClass);return n}a(Je,"Ot");var Ke=a(()=>{Object.assign(At.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var r;(r=this.rawDestructor)===null||r===void 0||r.call(this,t)},argPackAdvance:N,readValueFromPointer:st,fromWireType:Ne})},"Wt");function At(t,r,e,n,i,o,u,s,c,f,d){this.name=t,this.registeredClass=r,this.isReference=e,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=f,this.rawDestructor=d,!i&&r.baseClass===void 0?n?(this.toWireType=qe,this.destructorFunction=null):(this.toWireType=Je,this.destructorFunction=null):this.toWireType=Qe}a(At,"_r");var Cr=a((t,r,e)=>{l.hasOwnProperty(t)||Ct("Replacing nonexistent public symbol"),l[t].overloadTable!==void 0&&e!==void 0?l[t].overloadTable[e]=r:(l[t]=r,l[t].argCount=e)},"fe"),Ye=a((t,r,e)=>{t=t.replace(/p/g,"i");var n=l["dynCall_"+t];return n(r,...e)},"Dt"),St=[],Tr,$=a(t=>{var r=St[t];return r||(t>=St.length&&(St.length=t+1),St[t]=r=Tr.get(t)),r},"_"),tn=a(function(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t.includes("j"))return Ye(t,r,e);var n=$(r)(...e);return n},"Mt"),rn=a((t,r)=>function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return tn(t,r,n)},"xt"),U=a((t,r)=>{t=I(t);function e(){return t.includes("j")?rn(t,r):$(r)}a(e,"t");var n=e();return typeof n!="function"&&b(`unknown function pointer with signature ${t}: ${r}`),n},"k"),en=a((t,r)=>{var e=_t(r,function(n){this.name=r,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+`
|
|
2
|
+
`+i.replace(/^Error(:[^\n]*)?\n/,""))});return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},e},"Ut"),Pr,_r=a(t=>{var r=xr(t),e=I(r);return G(r),e},"ve"),Ot=a((t,r)=>{var e=[],n={};function i(o){if(!n[o]&&!Q[o]){if(bt[o]){bt[o].forEach(i);return}e.push(o),n[o]=!0}}throw a(i,"i"),r.forEach(i),new Pr(`${t}: `+e.map(_r).join([", "]))},"yr"),nn=a((t,r,e,n,i,o,u,s,c,f,d,p,w)=>{d=I(d),o=U(i,o),s&&(s=U(u,s)),f&&(f=U(c,f)),w=U(p,w);var C=Ze(d);br(C,function(){Ot(`Cannot construct ${d} due to unbound types`,[n])}),J([t,r,e],n?[n]:[],P=>{P=P[0];var j,A;n?(j=P.registeredClass,A=j.instancePrototype):A=Pt.prototype;var S=_t(d,function(){if(Object.getPrototypeOf(this)!==K)throw new et("Use 'new' to construct "+d);if(x.constructor_body===void 0)throw new et(d+" has no accessible constructor");for(var Gr=arguments.length,Et=new Array(Gr),It=0;It<Gr;It++)Et[It]=arguments[It];var Zr=x.constructor_body[Et.length];if(Zr===void 0)throw new et(`Tried to invoke ctor of ${d} with invalid number of parameters (${Et.length}) - expected (${Object.keys(x.constructor_body).toString()}) parameters instead!`);return Zr.apply(this,Et)}),K=Object.create(A,{constructor:{value:S}});S.prototype=K;var x=new Xe(d,S,K,w,j,o,s,f);if(x.baseClass){var Z,Ft;(Ft=(Z=x.baseClass).__derivedClasses)!==null&&Ft!==void 0||(Z.__derivedClasses=[]),x.baseClass.__derivedClasses.push(x)}var Ha=new At(d,x,!0,!1,!1),zr=new At(d+"*",x,!1,!1,!1),Vr=new At(d+" const*",x,!1,!0,!1);return $r[t]={pointerType:zr,constPointerType:Vr},Cr(C,S),[Ha,zr,Vr]})},"It"),Vt=a((t,r)=>{for(var e=[],n=0;n<t;n++)e.push(T[r+n*4>>2]);return e},"Or");function an(t){for(var r=1;r<t.length;++r)if(t[r]!==null&&t[r].destructorFunction===void 0)return!0;return!1}a(an,"Ht");function Gt(t,r,e,n,i,o){var u=r.length;u<2&&b("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=r[1]!==null&&e!==null,c=an(r),f=r[0].name!=="void",d=u-2,p=new Array(d),w=[],C=[],P=a(function(){C.length=0;var j;w.length=s?2:1,w[0]=i,s&&(j=r[1].toWireType(C,this),w[1]=j);for(var A=0;A<d;++A)p[A]=r[A+2].toWireType(C,A<0||arguments.length<=A?void 0:arguments[A]),w.push(p[A]);var S=n(...w);function K(x){if(c)Lt(C);else for(var Z=s?1:2;Z<r.length;Z++){var Ft=Z===1?j:p[Z-2];r[Z].destructorFunction!==null&&r[Z].destructorFunction(Ft)}if(f)return r[0].fromWireType(x)}return a(K,"Z"),K(S)},"b");return _t(t,P)}a(Gt,"Wr");var on=a((t,r,e,n,i,o)=>{var u=Vt(r,e);i=U(n,i),J([],[t],s=>{s=s[0];var c=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[r-1]!==void 0)throw new et(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[r-1]=()=>{Ot(`Cannot construct ${s.name} due to unbound types`,u)},J([],u,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[r-1]=Gt(c,f,null,i,o),[])),[]})},"Vt"),Ar=a(t=>{t=t.trim();let r=t.indexOf("(");return r!==-1?t.substr(0,r):t},"de"),sn=a((t,r,e,n,i,o,u,s,c,f)=>{var d=Vt(e,n);r=I(r),r=Ar(r),o=U(i,o),J([],[t],p=>{p=p[0];var w=`${p.name}.${r}`;r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&p.registeredClass.pureVirtualFunctions.push(r);function C(){Ot(`Cannot call ${w} due to unbound types`,d)}a(C,"m");var P=p.registeredClass.instancePrototype,j=P[r];return j===void 0||j.overloadTable===void 0&&j.className!==p.name&&j.argCount===e-2?(C.argCount=e-2,C.className=p.name,P[r]=C):(wr(P,r,w),P[r].overloadTable[e-2]=C),J([],d,A=>{var S=Gt(w,A,p,o,u);return P[r].overloadTable===void 0?(S.argCount=e-2,P[r]=S):P[r].overloadTable[e-2]=S,[]}),[]})},"Bt"),Zt=[],z=[],Xt=a(t=>{t>9&&--z[t+1]===0&&(z[t]=void 0,Zt.push(t))},"Mr"),un=a(()=>z.length/2-5-Zt.length,"Nt"),cn=a(()=>{z.push(0,1,void 0,1,null,1,!0,1,!1,1),l.count_emval_handles=un},"Zt"),V={toValue:a(t=>(t||b("Cannot use deleted val. handle = "+t),z[t]),"toValue"),toHandle:a(t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let r=Zt.pop()||z.length;return z[r]=t,z[r+1]=1,r}}},"toHandle")},Sr={name:"emscripten::val",fromWireType:a(t=>{var r=V.toValue(t);return Xt(t),r},"fromWireType"),toWireType:a((t,r)=>V.toHandle(r),"toWireType"),argPackAdvance:N,readValueFromPointer:st,destructorFunction:null},ln=a(t=>B(t,Sr),"zt"),qt=a(t=>{if(t===null)return"null";var r=typeof t;return r==="object"||r==="array"||r==="function"?t.toString():""+t},"xr"),fn=a((t,r)=>{switch(r){case 4:return function(e){return this.fromWireType(sr[e>>2])};case 8:return function(e){return this.fromWireType(ur[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${t}`)}},"Gt"),dn=a((t,r,e)=>{r=I(r),B(t,{name:r,fromWireType:a(n=>n,"fromWireType"),toWireType:a((n,i)=>i,"toWireType"),argPackAdvance:N,readValueFromPointer:fn(r,e),destructorFunction:null})},"Xt"),hn=a((t,r,e,n,i,o,u,s)=>{var c=Vt(r,e);t=I(t),t=Ar(t),i=U(n,i),br(t,function(){Ot(`Cannot call ${t} due to unbound types`,c)},r-1),J([],c,f=>{var d=[f[0],null].concat(f.slice(1));return Cr(t,Gt(t,d,null,i,o),r-1),[]})},"Lt"),pn=a((t,r,e)=>{switch(r){case 1:return e?n=>L[n]:n=>R[n];case 2:return e?n=>at[n>>1]:n=>vt[n>>1];case 4:return e?n=>tt[n>>2]:n=>T[n>>2];default:throw new TypeError(`invalid integer width (${r}): ${t}`)}},"qt"),vn=a((t,r,e,n,i)=>{r=I(r);var o=a(d=>d,"a");if(n===0){var u=32-8*e;o=a(d=>d<<u>>>u,"a")}var s=r.includes("unsigned"),c=a((d,p)=>{},"u"),f;s?f=a(function(d,p){return c(p,this.name),p>>>0},"l"):f=a(function(d,p){return c(p,this.name),p},"l"),B(t,{name:r,fromWireType:o,toWireType:f,argPackAdvance:N,readValueFromPointer:pn(r,e,n!==0),destructorFunction:null})},"Kt"),yn=a((t,r,e)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[r];function o(u){var s=T[u>>2],c=T[u+4>>2];return new i(L.buffer,c,s)}a(o,"a"),e=I(e),B(t,{name:e,fromWireType:o,argPackAdvance:N,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},"Yt"),mn=Object.assign({optional:!0},Sr),gn=a((t,r)=>{B(t,mn)},"Qt"),$n=a((t,r,e,n)=>{if(!(n>0))return 0;for(var i=e,o=e+n-1,u=0;u<t.length;++u){var s=t.charCodeAt(u);if(s>=55296&&s<=57343){var c=t.charCodeAt(++u);s=65536+((s&1023)<<10)|c&1023}if(s<=127){if(e>=o)break;r[e++]=s}else if(s<=2047){if(e+1>=o)break;r[e++]=192|s>>6,r[e++]=128|s&63}else if(s<=65535){if(e+2>=o)break;r[e++]=224|s>>12,r[e++]=128|s>>6&63,r[e++]=128|s&63}else{if(e+3>=o)break;r[e++]=240|s>>18,r[e++]=128|s>>12&63,r[e++]=128|s>>6&63,r[e++]=128|s&63}}return r[e]=0,e-i},"rn"),ct=a((t,r,e)=>$n(t,R,r,e),"Q"),wn=a(t=>{for(var r=0,e=0;e<t.length;++e){var n=t.charCodeAt(e);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++e):r+=3}return r},"en"),Or=typeof TextDecoder<"u"?new TextDecoder:void 0,jr=a(function(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=r+e,i=r;t[i]&&!(i>=n);)++i;if(i-r>16&&t.buffer&&Or)return Or.decode(t.subarray(r,i));for(var o="";r<i;){var u=t[r++];if(!(u&128)){o+=String.fromCharCode(u);continue}var s=t[r++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|s);continue}var c=t[r++]&63;if((u&240)==224?u=(u&15)<<12|s<<6|c:u=(u&7)<<18|s<<12|c<<6|t[r++]&63,u<65536)o+=String.fromCharCode(u);else{var f=u-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},"_e"),bn=a((t,r)=>t?jr(R,t,r):"","tn"),Cn=a((t,r)=>{r=I(r),B(t,{name:r,fromWireType(e){for(var n=T[e>>2],i=e+4,o,s,u=i,s=0;s<=n;++s){var c=i+s;if(s==n||R[c]==0){var f=c-u,d=bn(u,f);o===void 0?o=d:(o+="\0",o+=d),u=c+1}}return G(e),o},toWireType(e,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var i,o=typeof n=="string";o||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Int8Array||b("Cannot pass non-string to std::string"),o?i=wn(n):i=n.length;var u=Kt(4+i+1),s=u+4;if(T[u>>2]=i,o)ct(n,s,i+1);else if(o)for(var c=0;c<i;++c){var f=n.charCodeAt(c);f>255&&(G(s),b("String has UTF-16 code units that do not fit in 8 bits")),R[s+c]=f}else for(var c=0;c<i;++c)R[s+c]=n[c];return e!==null&&e.push(G,u),u},argPackAdvance:N,readValueFromPointer:st,destructorFunction(e){G(e)}})},"nn"),Fr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Tn=a((t,r)=>{for(var e=t,n=e>>1,i=n+r/2;!(n>=i)&&vt[n];)++n;if(e=n<<1,e-t>32&&Fr)return Fr.decode(R.subarray(t,e));for(var o="",u=0;!(u>=r/2);++u){var s=at[t+u*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},"an"),Pn=a((t,r,e)=>{var n;if((n=e)!==null&&n!==void 0||(e=2147483647),e<2)return 0;e-=2;for(var i=r,o=e<t.length*2?e/2:t.length,u=0;u<o;++u){var s=t.charCodeAt(u);at[r>>1]=s,r+=2}return at[r>>1]=0,r-i},"on"),_n=a(t=>t.length*2,"sn"),An=a((t,r)=>{for(var e=0,n="";!(e>=r/4);){var i=tt[t+e*4>>2];if(i==0)break;if(++e,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(i)}return n},"un"),Sn=a((t,r,e)=>{var n;if((n=e)!==null&&n!==void 0||(e=2147483647),e<4)return 0;for(var i=r,o=i+e-4,u=0;u<t.length;++u){var s=t.charCodeAt(u);if(s>=55296&&s<=57343){var c=t.charCodeAt(++u);s=65536+((s&1023)<<10)|c&1023}if(tt[r>>2]=s,r+=4,r+4>o)break}return tt[r>>2]=0,r-i},"fn"),On=a(t=>{for(var r=0,e=0;e<t.length;++e){var n=t.charCodeAt(e);n>=55296&&n<=57343&&++e,r+=4}return r},"ln"),jn=a((t,r,e)=>{e=I(e);var n,i,o,u;r===2?(n=Tn,i=Pn,u=_n,o=a(s=>vt[s>>1],"a")):r===4&&(n=An,i=Sn,u=On,o=a(s=>T[s>>2],"a")),B(t,{name:e,fromWireType:a(s=>{for(var c=T[s>>2],f,d=s+4,p=0;p<=c;++p){var w=s+4+p*r;if(p==c||o(w)==0){var C=w-d,P=n(d,C);f===void 0?f=P:(f+="\0",f+=P),d=w+r}}return G(s),f},"fromWireType"),toWireType:a((s,c)=>{typeof c!="string"&&b(`Cannot pass non-string to C++ string type ${e}`);var f=u(c),d=Kt(4+f+r);return T[d>>2]=f/r,i(c,d+4,f+r),s!==null&&s.push(G,d),d},"toWireType"),argPackAdvance:N,readValueFromPointer:st,destructorFunction(s){G(s)}})},"cn"),Fn=a((t,r,e,n,i,o)=>{wt[t]={name:I(r),rawConstructor:U(e,n),rawDestructor:U(i,o),fields:[]}},"vn"),En=a((t,r,e,n,i,o,u,s,c,f)=>{wt[t].fields.push({fieldName:I(r),getterReturnType:e,getter:U(n,i),getterContext:o,setterArgumentType:u,setter:U(s,c),setterContext:f})},"dn"),In=a((t,r)=>{r=I(r),B(t,{isVoid:!0,name:r,argPackAdvance:0,fromWireType:a(()=>{},"fromWireType"),toWireType:a((e,n)=>{},"toWireType")})},"pn"),xn=a((t,r,e)=>R.copyWithin(t,r,r+e),"hn"),Qt=[],Rn=a((t,r,e,n)=>(t=Qt[t],r=V.toValue(r),t(null,r,e,n)),"_n"),Wn={},Mn=a(t=>{var r=Wn[t];return r===void 0?I(t):r},"yn"),Er=a(()=>{if(typeof globalThis=="object")return globalThis;function t(r){r.$$$embind_global$$$=r;var e=typeof $$$embind_global$$$=="object"&&r.$$$embind_global$$$==r;return e||delete r.$$$embind_global$$$,e}if(a(t,"e"),typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},"ye"),Un=a(t=>t===0?V.toHandle(Er()):(t=Mn(t),V.toHandle(Er()[t])),"mn"),kn=a(t=>{var r=Qt.length;return Qt.push(t),r},"$n"),Ir=a((t,r)=>{var e=Q[t];return e===void 0&&b(`${r} has unknown type ${_r(t)}`),e},"me"),Dn=a((t,r)=>{for(var e=new Array(t),n=0;n<t;++n)e[n]=Ir(T[r+n*4>>2],"parameter "+n);return e},"bn"),Bn=Reflect.construct,Ln=a((t,r,e)=>{var n=[],i=t.toWireType(n,e);return n.length&&(T[r>>2]=V.toHandle(n)),i},"Cn"),Hn=a((t,r,e)=>{var n=Dn(t,r),i=n.shift();t--;var o=new Array(t),u=a((c,f,d,p)=>{for(var w=0,C=0;C<t;++C)o[C]=n[C].readValueFromPointer(p+w),w+=n[C].argPackAdvance;var P=e===1?Bn(f,o):f.apply(c,o);return Ln(i,d,P)},"s"),s=`methodCaller<(${n.map(c=>c.name).join(", ")}) => ${i.name}>`;return kn(_t(s,u))},"Tn"),Nn=a(t=>{t>9&&(z[t+1]+=1)},"Pn"),zn=a(t=>{var r=V.toValue(t);Lt(r),Xt(t)},"An"),Vn=a((t,r)=>{t=Ir(t,"_emval_take_value");var e=t.readValueFromPointer(r);return V.toHandle(e)},"Rn"),Gn=a((t,r,e,n)=>{var i=new Date().getFullYear(),o=new Date(i,0,1),u=new Date(i,6,1),s=o.getTimezoneOffset(),c=u.getTimezoneOffset(),f=Math.max(s,c);T[t>>2]=f*60,tt[r>>2]=+(s!=c);var d=a(C=>{var P=C>=0?"-":"+",j=Math.abs(C),A=String(Math.floor(j/60)).padStart(2,"0"),S=String(j%60).padStart(2,"0");return`UTC${P}${A}${S}`},"c"),p=d(s),w=d(c);c<s?(ct(p,e,17),ct(w,n,17)):(ct(p,n,17),ct(w,e,17))},"En"),Zn=a(()=>2147483648,"Fn"),Xn=a((t,r)=>Math.ceil(t/r)*r,"kn"),qn=a(t=>{var r=pt.buffer,e=(t-r.byteLength+65535)/65536|0;try{return pt.grow(e),cr(),1}catch{}},"Sn"),Qn=a(t=>{var r=R.length;t>>>=0;var e=Zn();if(t>e)return!1;for(var n=1;n<=4;n*=2){var i=r*(1+.2/n);i=Math.min(i,t+100663296);var o=Math.min(e,Xn(Math.max(t,i),65536)),u=qn(o);if(u)return!0}return!1},"jn"),Jt={},Jn=a(()=>ar||"./this.program","On"),lt=a(()=>{if(!lt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Jn()};for(var e in Jt)Jt[e]===void 0?delete r[e]:r[e]=Jt[e];var n=[];for(var e in r)n.push(`${e}=${r[e]}`);lt.strings=n}return lt.strings},"rr"),Kn=a((t,r)=>{for(var e=0;e<t.length;++e)L[r++]=t.charCodeAt(e);L[r]=0},"Wn"),Yn=a((t,r)=>{var e=0;return lt().forEach((n,i)=>{var o=r+e;T[t+i*4>>2]=o,Kn(n,o),e+=n.length+1}),0},"Dn"),ta=a((t,r)=>{var e=lt();T[t>>2]=e.length;var n=0;return e.forEach(i=>n+=i.length+1),T[r>>2]=n,0},"Mn"),ra=a(t=>52,"xn");function ea(t,r,e,n,i){return 70}a(ea,"Un");var na=[null,[],[]],aa=a((t,r)=>{var e=na[t];r===0||r===10?((t===1?oe:Y)(jr(e)),e.length=0):e.push(r)},"Hn"),ia=a((t,r,e,n)=>{for(var i=0,o=0;o<e;o++){var u=T[r>>2],s=T[r+4>>2];r+=8;for(var c=0;c<s;c++)aa(t,R[u+c]);i+=s}return T[n>>2]=i,0},"Vn"),oa=a(t=>t,"Bn");pr=l.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},We(),et=l.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},ze(),Ke(),Pr=l.UnboundTypeError=en(Error,"UnboundTypeError"),cn();var sa={s:Te,w:Pe,a:Ae,j:Se,l:Oe,M:je,p:Fe,ca:Ee,d:_e,Z:Ie,sa:xe,Y:Re,na:Ue,qa:nn,pa:on,D:sn,la:ln,Q:dn,R:hn,x:vn,t:yn,ra:gn,ma:Cn,N:jn,J:Fn,ta:En,oa:In,fa:xn,U:Rn,ua:Xt,wa:Un,_:Hn,S:Nn,va:zn,ka:Vn,$:Gn,da:Qn,aa:Yn,ba:ta,ea:ra,W:ea,P:ia,H:Oa,B:Fa,T:ha,O:Ua,q:Pa,b:ca,C:Sa,ha:Ia,c:fa,ga:xa,h:da,i:ga,r:$a,L:Aa,v:ba,G:Wa,I:_a,z:Ea,F:ka,X:Ba,V:La,k:va,f:pa,e:la,g:ua,K:Ma,m:ma,ia:ja,o:wa,u:Ca,ja:Ta,A:Ra,n:ya,E:Da,y:oa},_;Ce();var xr=a(t=>(xr=_.za)(t),"$e"),G=l._free=t=>(G=l._free=_.Aa)(t),Kt=l._malloc=t=>(Kt=l._malloc=_.Ca)(t),Rr=a(t=>(Rr=_.Da)(t),"be"),y=a((t,r)=>(y=_.Ea)(t,r),"d"),Wr=a(t=>(Wr=_.Fa)(t),"we"),Mr=a(t=>(Mr=_.Ga)(t),"Ce"),Ur=a(()=>(Ur=_.Ha)(),"Te"),kr=a(t=>(kr=_.Ia)(t),"Pe"),Dr=a(t=>(Dr=_.Ja)(t),"Ae"),Br=a((t,r,e)=>(Br=_.Ka)(t,r,e),"Re");l.dynCall_viijii=(t,r,e,n,i,o,u)=>(l.dynCall_viijii=_.La)(t,r,e,n,i,o,u);var Lr=l.dynCall_jiii=(t,r,e,n)=>(Lr=l.dynCall_jiii=_.Ma)(t,r,e,n);l.dynCall_jiji=(t,r,e,n,i)=>(l.dynCall_jiji=_.Na)(t,r,e,n,i);var Hr=l.dynCall_jiiii=(t,r,e,n,i)=>(Hr=l.dynCall_jiiii=_.Oa)(t,r,e,n,i);l.dynCall_iiiiij=(t,r,e,n,i,o,u)=>(l.dynCall_iiiiij=_.Pa)(t,r,e,n,i,o,u),l.dynCall_iiiiijj=(t,r,e,n,i,o,u,s,c)=>(l.dynCall_iiiiijj=_.Qa)(t,r,e,n,i,o,u,s,c),l.dynCall_iiiiiijj=(t,r,e,n,i,o,u,s,c,f)=>(l.dynCall_iiiiiijj=_.Ra)(t,r,e,n,i,o,u,s,c,f);function ua(t,r,e,n){var i=g();try{$(t)(r,e,n)}catch(o){if(m(i),o!==o+0)throw o;y(1,0)}}a(ua,"Zn");function ca(t,r){var e=g();try{return $(t)(r)}catch(n){if(m(e),n!==n+0)throw n;y(1,0)}}a(ca,"zn");function la(t,r,e){var n=g();try{$(t)(r,e)}catch(i){if(m(n),i!==i+0)throw i;y(1,0)}}a(la,"Gn");function fa(t,r,e){var n=g();try{return $(t)(r,e)}catch(i){if(m(n),i!==i+0)throw i;y(1,0)}}a(fa,"Xn");function da(t,r,e,n){var i=g();try{return $(t)(r,e,n)}catch(o){if(m(i),o!==o+0)throw o;y(1,0)}}a(da,"Ln");function ha(t,r,e,n,i){var o=g();try{return $(t)(r,e,n,i)}catch(u){if(m(o),u!==u+0)throw u;y(1,0)}}a(ha,"qn");function pa(t,r){var e=g();try{$(t)(r)}catch(n){if(m(e),n!==n+0)throw n;y(1,0)}}a(pa,"Kn");function va(t){var r=g();try{$(t)()}catch(e){if(m(r),e!==e+0)throw e;y(1,0)}}a(va,"Yn");function ya(t,r,e,n,i,o,u,s,c,f,d){var p=g();try{$(t)(r,e,n,i,o,u,s,c,f,d)}catch(w){if(m(p),w!==w+0)throw w;y(1,0)}}a(ya,"Jn");function ma(t,r,e,n,i){var o=g();try{$(t)(r,e,n,i)}catch(u){if(m(o),u!==u+0)throw u;y(1,0)}}a(ma,"Qn");function ga(t,r,e,n,i){var o=g();try{return $(t)(r,e,n,i)}catch(u){if(m(o),u!==u+0)throw u;y(1,0)}}a(ga,"ri");function $a(t,r,e,n,i,o){var u=g();try{return $(t)(r,e,n,i,o)}catch(s){if(m(u),s!==s+0)throw s;y(1,0)}}a($a,"ei");function wa(t,r,e,n,i,o){var u=g();try{$(t)(r,e,n,i,o)}catch(s){if(m(u),s!==s+0)throw s;y(1,0)}}a(wa,"ti");function ba(t,r,e,n,i,o,u){var s=g();try{return $(t)(r,e,n,i,o,u)}catch(c){if(m(s),c!==c+0)throw c;y(1,0)}}a(ba,"ni");function Ca(t,r,e,n,i,o,u,s){var c=g();try{$(t)(r,e,n,i,o,u,s)}catch(f){if(m(c),f!==f+0)throw f;y(1,0)}}a(Ca,"ii");function Ta(t,r,e,n,i,o,u,s,c){var f=g();try{$(t)(r,e,n,i,o,u,s,c)}catch(d){if(m(f),d!==d+0)throw d;y(1,0)}}a(Ta,"ai");function Pa(t){var r=g();try{return $(t)()}catch(e){if(m(r),e!==e+0)throw e;y(1,0)}}a(Pa,"oi");function _a(t,r,e,n,i,o,u,s,c){var f=g();try{return $(t)(r,e,n,i,o,u,s,c)}catch(d){if(m(f),d!==d+0)throw d;y(1,0)}}a(_a,"si");function Aa(t,r,e,n,i,o,u){var s=g();try{return $(t)(r,e,n,i,o,u)}catch(c){if(m(s),c!==c+0)throw c;y(1,0)}}a(Aa,"ui");function Sa(t,r,e,n){var i=g();try{return $(t)(r,e,n)}catch(o){if(m(i),o!==o+0)throw o;y(1,0)}}a(Sa,"fi");function Oa(t,r,e,n){var i=g();try{return $(t)(r,e,n)}catch(o){if(m(i),o!==o+0)throw o;y(1,0)}}a(Oa,"li");function ja(t,r,e,n,i,o,u,s){var c=g();try{$(t)(r,e,n,i,o,u,s)}catch(f){if(m(c),f!==f+0)throw f;y(1,0)}}a(ja,"ci");function Fa(t,r,e,n,i,o){var u=g();try{return $(t)(r,e,n,i,o)}catch(s){if(m(u),s!==s+0)throw s;y(1,0)}}a(Fa,"vi");function Ea(t,r,e,n,i,o,u,s,c,f){var d=g();try{return $(t)(r,e,n,i,o,u,s,c,f)}catch(p){if(m(d),p!==p+0)throw p;y(1,0)}}a(Ea,"di");function Ia(t,r,e){var n=g();try{return $(t)(r,e)}catch(i){if(m(n),i!==i+0)throw i;y(1,0)}}a(Ia,"pi");function xa(t,r,e,n,i){var o=g();try{return $(t)(r,e,n,i)}catch(u){if(m(o),u!==u+0)throw u;y(1,0)}}a(xa,"hi");function Ra(t,r,e,n,i,o,u,s,c,f){var d=g();try{$(t)(r,e,n,i,o,u,s,c,f)}catch(p){if(m(d),p!==p+0)throw p;y(1,0)}}a(Ra,"_i");function Wa(t,r,e,n,i,o,u,s){var c=g();try{return $(t)(r,e,n,i,o,u,s)}catch(f){if(m(c),f!==f+0)throw f;y(1,0)}}a(Wa,"gi");function Ma(t,r,e,n,i,o,u){var s=g();try{$(t)(r,e,n,i,o,u)}catch(c){if(m(s),c!==c+0)throw c;y(1,0)}}a(Ma,"yi");function Ua(t,r,e,n){var i=g();try{return $(t)(r,e,n)}catch(o){if(m(i),o!==o+0)throw o;y(1,0)}}a(Ua,"mi");function ka(t,r,e,n,i,o,u,s,c,f,d,p){var w=g();try{return $(t)(r,e,n,i,o,u,s,c,f,d,p)}catch(C){if(m(w),C!==C+0)throw C;y(1,0)}}a(ka,"$i");function Da(t,r,e,n,i,o,u,s,c,f,d,p,w,C,P,j){var A=g();try{$(t)(r,e,n,i,o,u,s,c,f,d,p,w,C,P,j)}catch(S){if(m(A),S!==S+0)throw S;y(1,0)}}a(Da,"bi");function Ba(t,r,e,n){var i=g();try{return Lr(t,r,e,n)}catch(o){if(m(i),o!==o+0)throw o;y(1,0)}}a(Ba,"wi");function La(t,r,e,n,i){var o=g();try{return Hr(t,r,e,n,i)}catch(u){if(m(o),u!==u+0)throw u;y(1,0)}}a(La,"Ci");var jt;it=a(function t(){jt||Nr(),jt||(it=t)},"e");function Nr(){if(q>0||(se(),q>0))return;function t(){var r;jt||(jt=!0,l.calledRun=!0,!or&&(ue(),W(l),(r=l.onRuntimeInitialized)===null||r===void 0||r.call(l),ce()))}a(t,"e"),l.setStatus?(l.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>l.setStatus(""),1),t()},1)):t()}if(a(Nr,"ke"),l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return Nr(),X=k,X}})();function ne(h){return er(nr,h)}a(ne,"De");function ui(){return re(nr)}a(ui,"Si");function ci(h){return ne({overrides:h,equalityFn:Object.is,fireImmediately:!0})}a(ci,"ji");function li(h){ne({overrides:h,equalityFn:Object.is,fireImmediately:!1})}a(li,"Oi");async function ae(h,v){return ee(nr,h,v)}a(ae,"Me");async function fi(h,v){return ae(h,v)}a(fi,"Wi");async function di(h,v){return ae(h,v)}a(di,"Di");var hi="5bb3ce7aeedc314e24afb873bebcf366a01c27a00b21cdf2fa98b819c005c16b";export{Ya as ZXING_CPP_COMMIT,hi as ZXING_WASM_SHA256,Ka as ZXING_WASM_VERSION,ft as barcodeFormats,Jr as binarizers,rr as characterSets,Kr as contentTypes,ei as defaultReaderOptions,Yr as eanAddOnSymbols,ci as getZXingModule,qr as linearBarcodeFormats,Qr as matrixBarcodeFormats,ne as prepareZXingModule,ui as purgeZXingModule,ae as readBarcodes,di as readBarcodesFromImageData,fi as readBarcodesFromImageFile,li as setZXingModuleOverrides,te as textModes};
|
package/dist/cdn/define.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./chunks/chunk-
|
|
1
|
+
import{g as e}from"./chunks/chunk-P6NXHUXL.js";import"./chunks/chunk-HMHTT2VW.js";import"./chunks/chunk-KZ23JW5G.js";import"./chunks/chunk-N6XDQRVA.js";import"./chunks/chunk-CIHC5WP4.js";import"./chunks/chunk-KMKUWNV6.js";import"./chunks/chunk-O3YS4LLK.js";import"./chunks/chunk-S7HF3KSX.js";import"./chunks/chunk-IXR4RRPR.js";import"./chunks/chunk-A2ZKVVIE.js";import"./chunks/chunk-T5IERZBI.js";import"./chunks/chunk-E6ELKNG4.js";import"./chunks/chunk-J6ERQV2N.js";import"./chunks/chunk-GTYN5CAI.js";import"./chunks/chunk-J2APPV22.js";import"./chunks/chunk-S4ZSNILS.js";import"./chunks/chunk-P7PTTPLQ.js";import"./chunks/chunk-P7K7ELYZ.js";import"./chunks/chunk-5QL6W6FW.js";import"./chunks/chunk-CW56KMMH.js";import"./chunks/chunk-JS2IXPNL.js";import"./chunks/chunk-4FHWXBOB.js";e();export{e as defineSekyroElements};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as r,c as t,d as o,e as i,f as a,g as f}from"./chunks/chunk-
|
|
1
|
+
import{a as e,b as r,c as t,d as o,e as i,f as a,g as f}from"./chunks/chunk-P6NXHUXL.js";import"./chunks/chunk-HMHTT2VW.js";import"./chunks/chunk-KZ23JW5G.js";import"./chunks/chunk-N6XDQRVA.js";import"./chunks/chunk-CIHC5WP4.js";import"./chunks/chunk-KMKUWNV6.js";import"./chunks/chunk-O3YS4LLK.js";import"./chunks/chunk-S7HF3KSX.js";import{a as n}from"./chunks/chunk-IXR4RRPR.js";import"./chunks/chunk-A2ZKVVIE.js";import"./chunks/chunk-T5IERZBI.js";import"./chunks/chunk-E6ELKNG4.js";import"./chunks/chunk-J6ERQV2N.js";import"./chunks/chunk-GTYN5CAI.js";import"./chunks/chunk-J2APPV22.js";import"./chunks/chunk-S4ZSNILS.js";import"./chunks/chunk-P7PTTPLQ.js";import"./chunks/chunk-P7K7ELYZ.js";import"./chunks/chunk-5QL6W6FW.js";import"./chunks/chunk-CW56KMMH.js";import"./chunks/chunk-JS2IXPNL.js";import"./chunks/chunk-4FHWXBOB.js";export{r as ATTRIBUTES,i as EVENTS,t as PROPERTIES,o as SLOTS,a as SekyroVerificationElement,e as TAG_NAME,n as createVerification,f as defineSekyroElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,c as t,v as s,w as i,y as l}from"./chunk-
|
|
1
|
+
import{b,c as t,v as s,w as i,y as l}from"./chunk-TOU3UDCB.js";import{a as o,c as k,i as r}from"./chunk-SSU37LFQ.js";var a=k(b(),1);function x({title:n,lead:d,cameraLabel:c,uploadLabel:m,notice:p,testId:e,onCamera:h,onUpload:u,onPhone:f=!1}){return(0,a.jsxs)("section",{className:"sekyro-step","data-testid":e,children:[(0,a.jsx)(i,{title:n,lead:d}),p,(0,a.jsxs)(l,{children:[(0,a.jsxs)(t,{full:!0,onClick:h,"data-testid":`${e}-camera`,children:[(0,a.jsx)(s,{name:f?"smartphone":"camera"}),c]}),(0,a.jsx)(t,{full:!0,kind:"ghost",onClick:u,"data-testid":`${e}-upload`,children:m})]})]})}o(x,"k");r(x,"PhotoSourceView");export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b}from"./chunk-
|
|
1
|
+
import{a as v,b}from"./chunk-TOU3UDCB.js";import{a,c as p,i as d}from"./chunk-SSU37LFQ.js";var r=p(v(),1),o=p(b(),1),m=p(v(),1);import{normalizeNni as C}from"@sekyro/web";function w(t,e,i){let[n,c]=(0,r.useState)(!1),s=(0,r.useRef)(i);return s.current=i,(0,r.useEffect)(()=>{t&&(c(!0),s.current())},[t,e]),[n,()=>c(!1)]}a(w,"I");d(w,"useWrongCode");function x({id:t,value:e,onChange:i,length:n=6,describedBy:c,invalid:s}){let[y,f]=(0,r.useState)(!1),[h,k]=(0,r.useState)(0);(0,r.useEffect)(()=>{s&&k(l=>l+1)},[s]);let g=(0,r.useRef)(null);(0,r.useEffect)(()=>{let l=setTimeout(()=>g.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(l)},[]);let N=e.length<n?e.length:-1;return(0,o.jsxs)("div",{className:"sekyro-otp-boxes",dir:"ltr",children:[(0,o.jsx)("div",{className:`sekyro-otp-row${h>0?" is-shaking":""}`,"aria-hidden":"true",children:Array.from({length:n},(l,u)=>(0,o.jsx)("span",{className:`sekyro-otp-box${u<e.length?" is-filled":""}${y&&u===N?" is-current":""}${s?" is-invalid":""}`,children:e[u]!==void 0?(0,o.jsx)("span",{className:"sekyro-otp-digit",children:e[u]},e[u]):null},u))},h),(0,o.jsx)("input",{ref:g,id:t,className:"sekyro-input sekyro-input--code",dir:"ltr",inputMode:"numeric",autoComplete:"one-time-code",value:e,"aria-describedby":c,"aria-invalid":s||void 0,onFocus:a(()=>f(!0),"onFocus"),onBlur:a(()=>f(!1),"onBlur"),onChange:a(l=>i(C(l.target.value).replace(/\D/g,"").slice(0,n)),"onChange")})]})}a(x,"S");d(x,"CodeInput");function I(t){let[e,i]=(0,m.useState)(()=>Date.now());return(0,m.useEffect)(()=>{if(!t)return;let n=setInterval(()=>i(Date.now()),1e3);return()=>clearInterval(n)},[t]),e}a(I,"B");d(I,"useNow");export{w as a,x as b,I as c};
|