@incodetech/web 2.4.1-agentic → 2.4.1-agentic.1
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/THIRD_PARTY_NOTICES.txt +1 -4
- package/dist/{GeolocationPermissionDenied-CUt-uebQ.js → GeolocationPermissionDenied-ClGp0a23.js} +13 -8
- package/dist/ae-signature/ae-signature.es.js +4 -4
- package/dist/{af-ZA-BWKMRc6V.js → af-ZA-BKpmmWDe.js} +75 -865
- package/dist/{ageVerification-CMIp0I--.js → ageVerification-CtuJDuRV.js} +11 -8
- package/dist/{am-DPyjIvQV.js → am-CW_ro5Ws.js} +75 -865
- package/dist/antifraud/antifraud.es.js +5 -4
- package/dist/{applyStudioConfig-DxtP9221.js → applyStudioConfig-C6-Ak0q6.js} +5 -4
- package/dist/{ar-AE-CxCvbyoW.js → ar-AE-D9h8UMbm.js} +75 -865
- package/dist/{ar-10SoqF1i.js → ar-B5ToweVl.js} +75 -865
- package/dist/{ar-EG-B1hHB55j.js → ar-EG-DQqE9B26.js} +75 -865
- package/dist/assertClassBrand-DJr5K93j.js +17 -0
- package/dist/asset-Ctwd_20H.js +355 -0
- package/dist/authentication/authentication.es.js +7 -5
- package/dist/{autoFocusTitle-BxsSeMSB.js → autoFocusTitle-CzaCWWW5.js} +2 -2
- package/dist/{az-cmuBNn_5.js → az-DAZq-CQj.js} +75 -865
- package/dist/{back-horizontal-hint-Dl2C4J4u.js → back-horizontal-hint-qzSaNkEU.js} +1 -1
- package/dist/{back-vertical-hint-CM4_HjWk.js → back-vertical-hint-DkYLOege.js} +1 -1
- package/dist/base.css +1 -1
- package/dist/{baseTutorial-BGU2Gcly.js → baseTutorial-CF6WiVYt.js} +10 -7
- package/dist/{bn-CuGYlngZ.js → bn-DRTyq2Y9.js} +75 -865
- package/dist/{bottomSheet-x20yd6eP.js → bottomSheet-DylE2INk.js} +3 -3
- package/dist/{bs-vwpJzaHm.js → bs-B8q0B86-.js} +75 -865
- package/dist/{ca-DXZs5vtr.js → ca-DvsHXRB-.js} +75 -865
- package/dist/cameraOverlay-DNf0PEF4.js +2 -0
- package/dist/{cameraOverlayHeader-BxutAKy-.js → cameraOverlayHeader-CuVGnyXI.js} +9 -8
- package/dist/{cameraView-DVzaEGW8.js → cameraView-D9ZxLKtA.js} +3 -3
- package/dist/capture-0jMDSGCE.js +762 -0
- package/dist/{tutorial-BKPHj5To.js → capture-BlGlXoTx.js} +13 -36
- package/dist/capture-DKBA5j5A.js +3 -0
- package/dist/capture-D_Dwrj1F.js +2 -0
- package/dist/captureButtonIcon-A9kn2E_m.js +1 -0
- package/dist/captureFocusContext-9789qOe3.js +729 -0
- package/dist/captureFooter-B6WUFQCV.js +47 -0
- package/dist/{ceb-CmhS_VOs.js → ceb-pvlomXHV.js} +75 -865
- package/dist/certificate-issuance/certificate-issuance.es.js +23 -13
- package/dist/{check-icon-BWTjhSuA.js → check-icon-BdHltEK6.js} +1 -1
- package/dist/{checkbox-BC26Qbxh.js → checkbox-BwUQ0Rs9.js} +4 -4
- package/dist/chooser-CmG71-lh.js +1589 -0
- package/dist/connectionError-DexRpKWs.js +90 -0
- package/dist/consent/consent.es.js +16 -12
- package/dist/{countryFlag-DXSVHiby.js → countryFlag-CQMfCnE9.js} +1 -1
- package/dist/{countrySelector-0PDDFsZF.js → countrySelector-C0OEKMqL.js} +4 -4
- package/dist/cross-document-data-match/cross-document-data-match.es.js +5 -4
- package/dist/{cs-CZ-Dg5O-Vom.js → cs-CZ-GgvnJLMj.js} +75 -865
- package/dist/{cs-CoJlE7De.js → cs-DB5PLEdt.js} +75 -865
- package/dist/curp-validation/curp-validation.es.js +34 -19
- package/dist/curp-validation/styles.css +1 -1
- package/dist/curp-validation/styles.css.js +1 -1
- package/dist/{customFields-COYGTuuK.js → customFields-DQgRumW0.js} +17 -11
- package/dist/{customWatchlist-B0wY6Rwb.js → customWatchlist-BbC0fA-6.js} +8 -6
- package/dist/{da-DK-C_JAndM-.js → da-DK-ZhpcfE_F.js} +75 -865
- package/dist/{dashboardTheme-COBidrbH.js → dashboardTheme-DtXsx9IK.js} +1 -1
- package/dist/{dateInputComposed-QkmLGLHg.js → dateInputComposed-1IcnucPq.js} +5 -5
- package/dist/dateInputComposed-BFlCk-sg.js +1 -0
- package/dist/{de-11hHLedu.js → de-DEBjzaow.js} +75 -865
- package/dist/{denied-Btt81vUD.js → denied-CwdVWAUw.js} +12 -9
- package/dist/devWarn-CW20j1Qd.js +9 -0
- package/dist/{deviceWallet-BeTpokSL.js → deviceWallet-CMjguFJO.js} +4 -4
- package/dist/{digitalIdRedirect-BnljwZV3.js → digitalIdRedirect-MNty16-5.js} +4 -4
- package/dist/{digitalIdUpload-DNhqqMHT.js → digitalIdUpload-CUzTaoaI.js} +39 -15
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +1 -1
- package/dist/document-capture/styles.css.js +1 -1
- package/dist/{documentCapture-uAKPK1U-.js → documentCapture-BUMyJ8vw.js} +94 -32
- package/dist/documentCapture-rECLkwpi.js +2 -0
- package/dist/dropdownComposed-C9sLQE6i.js +1 -0
- package/dist/{dropdownComposed-D_RQd0Z9.js → dropdownComposed-x3ewHxbT.js} +4 -4
- package/dist/dynamic-forms/dynamic-forms.es.js +20 -15
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekybModule-B5IEiSyi.js +2 -0
- package/dist/{ekybModule-Bsqag_MS.js → ekybModule-C5hEBLMs.js} +27 -23
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekycModule-B7OFnP3H.js +2 -0
- package/dist/{ekycModule-WlhVn8AO.js → ekycModule-TVKk0qdS.js} +26 -20
- package/dist/{el-CRGmVrep.js → el-Dplr_D5N.js} +75 -865
- package/dist/{el-GR-CjtJiRTo.js → el-GR-IZ4reOR7.js} +75 -865
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{electronic-signature-Cm2BEiQu.js → electronic-signature-BMda_cf3.js} +49 -34
- package/dist/email/email.es.js +15 -11
- package/dist/{emailInput-JmK2JIFS.js → emailInput-BI8gWC0D.js} +4 -4
- package/dist/{en-DG-Cruu6Woh.js → en-DG-C6tsWvHi.js} +75 -865
- package/dist/{en-CSjoG3e4.js → en-Db1L_u7B.js} +75 -865
- package/dist/{errorContent-zY4jb6uY.js → errorContent-pPAgyy2i.js} +10 -7
- package/dist/es-419-DxKrJq7W.js +5 -0
- package/dist/{es-C_LAY-Yu.js → es-C5unKsaF.js} +75 -865
- package/dist/{es-ES-D7O0P5Mg.js → es-ES-sHbsufzT.js} +75 -865
- package/dist/{es-MX-DVzFaANh.js → es-MX-Cd_DCR0A.js} +75 -865
- package/dist/{et-DdSwjU5d.js → et-BoGq2cx8.js} +76 -866
- package/dist/{expiredId-DpbWqSzB.js → expiredId-DWjw94rT.js} +12 -8
- package/dist/extensibility.es.js +85 -41
- package/dist/{fa-IR-CdK8XLkS.js → fa-IR-DuUxGXrf.js} +75 -865
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/faceMatch-B2aMz3X2.js +2 -0
- package/dist/{faceMatch-B0IzR9_u.js → faceMatch-DV7NxYu_.js} +15 -10
- package/dist/{fi-FI-CYlEPu44.js → fi-FI-DMOBNTjA.js} +75 -865
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-BY2XXsp3.js +2 -0
- package/dist/{fieldComparison-OwGIeOM5.js → fieldComparison-CFLU1h6n.js} +15 -11
- package/dist/{fieldLabelHint-gdoE5nLQ.js → fieldLabelHint-CjrLxBaj.js} +3 -3
- package/dist/{finalSuccessScreen-BM9oeJDH.js → finalSuccessScreen-C50L96j9.js} +20 -16
- package/dist/fiscal-qr/fiscal-qr.es.js +24 -18
- package/dist/flipAnimation-8x-qdtF_.js +33 -0
- package/dist/flipCapturedCardEligibility-DLr9F2g2.js +210 -0
- package/dist/flow/flow.es.js +183 -167
- package/dist/flow/shell/styles.css +1 -1
- package/dist/flow/shell/styles.css.js +1 -1
- package/dist/flow/styles.css +1 -1
- package/dist/{formField-C3MNhFKI.js → formField-CfQKYeGF.js} +3 -3
- package/dist/{fr-CA-DD_s9NuV.js → fr-CA-DZ8jlsp3.js} +75 -865
- package/dist/{fr-C4cP8ZNE.js → fr-DSR-AP0e.js} +75 -865
- package/dist/{front-horizontal-hint-Dol0Lpc6.js → front-horizontal-hint-DOphQZg2.js} +1 -1
- package/dist/{front-vertical-hint-CAhAzw92.js → front-vertical-hint-S6PcS9_m.js} +1 -1
- package/dist/geolocation/geolocation.es.js +15 -10
- package/dist/government-validation/government-validation.es.js +7 -6
- package/dist/{he-D3fvMZAl.js → he-N5dfJeyd.js} +75 -865
- package/dist/{hi-DLf6_opn.js → hi-JR6K9zbd.js} +75 -865
- package/dist/{hmn-DzoODzbN.js → hmn-j2YA7FxW.js} +75 -865
- package/dist/{homeScreen-D1Xd93In.js → homeScreen-C3pPw52y.js} +17 -11
- package/dist/{incodeComponent-C1Bz5Qou.js → hooks-BFP0WaJM.js} +14 -308
- package/dist/{hr-C-jP0DrB.js → hr-8cOdwB0t.js} +75 -865
- package/dist/{ht-CVt9koJf.js → ht-DDNL4C__.js} +75 -865
- package/dist/{hu-9fSzIeAd.js → hu-CynQQUFQ.js} +75 -865
- package/dist/i18n-Dp014ljG.js +942 -0
- package/dist/{icons-BdiCuWFP.js → icons-c-hFaG4L.js} +129 -32
- package/dist/id/id.es.js +101 -197
- package/dist/id/styles.css +1 -1
- package/dist/id/styles.css.js +1 -1
- package/dist/{id-back-of-card-CHFxXTEq.js → id-back-of-card-Bk6ZQUE9.js} +1 -1
- package/dist/{id-back-of-card-vertical-CUBdKGbw.js → id-back-of-card-vertical-BZo00s50.js} +1 -1
- package/dist/{id-front-of-card-DplNJr13.js → id-front-of-card-BJ96se7u.js} +1 -1
- package/dist/{id-front-of-card-vertical-D1duHEsV.js → id-front-of-card-vertical-DSfJB0lX.js} +1 -1
- package/dist/{id-Dgi5uGHK.js → id-o_Yg0n8W.js} +75 -865
- package/dist/id-selfie-flow/id-selfie-flow.es.js +12 -11
- package/dist/id-selfie-flow/styles.css +1 -1
- package/dist/id-verification/id-verification.es.js +6 -5
- package/dist/idFlipTransition-DXdtXYza.js +158 -0
- package/dist/{idOcr-sknZwQNF.js → idOcr-CjqfkRJ7.js} +18 -14
- package/dist/identity-reuse/identity-reuse.es.js +28 -18
- package/dist/incodeComponent-DtKh-UUm.js +237 -0
- package/dist/{incodeModule-DJToJb00.js → incodeModule-DCHXAeYU.js} +5 -5
- package/dist/index.es.js +4 -3
- package/dist/{inputComposed-BuE0iZlw.js → inputComposed-CmVsaHOa.js} +4 -4
- package/dist/inputComposed-DvGrso7g.js +1 -0
- package/dist/{it-CEFstYFG.js → it-BXevrtHn.js} +75 -865
- package/dist/{ja-BNdVd9B6.js → ja-DiTXnTx-.js} +75 -865
- package/dist/{ja-JP-B5TPMV1q.js → ja-JP-D1IRWR-p.js} +75 -865
- package/dist/{jv-CMxkkXUk.js → jv-Us70GzGp.js} +75 -865
- package/dist/{ka-C70bUmEK.js → ka-BSsWQ4yU.js} +75 -865
- package/dist/{kk-C_55EmWt.js → kk-D5R6r4H7.js} +75 -865
- package/dist/{km-D4Ig0NhN.js → km-CCCb2Rnt.js} +79 -869
- package/dist/{ko-KP-BwBB8ahu.js → ko-KP-JF4khv1Y.js} +75 -865
- package/dist/{ko-DfUa3dzQ.js → ko-kQioCg2w.js} +75 -865
- package/dist/{ky-CnJichOm.js → ky-CLOemVjC.js} +75 -865
- package/dist/kyb-checks/kyb-checks.es.js +2 -0
- package/dist/kyb-checks/styles.css +2 -0
- package/dist/kyb-checks/styles.css.js +1 -0
- package/dist/kybChecksModule-C6Y9Hxpr.js +329 -0
- package/dist/kybChecksModule-r3MIpFhS.js +2 -0
- package/dist/{lo-ww1DXVAP.js → lo-tzHUt1CQ.js} +75 -865
- package/dist/{lt-IJ8qpluI.js → lt-B2ZI-Cgu.js} +76 -866
- package/dist/{lv-DMfsmqyK.js → lv-BJnxtSYw.js} +76 -866
- package/dist/{mandatoryConsent-Bp8sQoiu.js → mandatoryConsent-BiQuEZRu.js} +20 -14
- package/dist/{manualCaptureButton-Cd-FY05-.js → manualCaptureButton-BRSmPTeR.js} +8 -7
- package/dist/{manualCaptureButton-BXOTp2PS.js → manualCaptureButton-Dw0MMSkc.js} +17 -13
- package/dist/{mk-ByafmFak.js → mk-Cj7Iw2Q4.js} +75 -865
- package/dist/{mn-DjO9p3xN.js → mn-CA_rNxtz.js} +75 -865
- package/dist/{ms-3Vf1QpHl.js → ms-BydA1Zjz.js} +75 -865
- package/dist/{my-C5hpE5P1.js → my-gFKufKaG.js} +75 -865
- package/dist/{nb-NO-DGCWCOul.js → nb-NO-CDsGQbOZ.js} +75 -865
- package/dist/{ne-CpJxcVhV.js → ne-Cyfi0vFI.js} +75 -865
- package/dist/{nl-R2RykJHB.js → nl-e1gbmAFO.js} +75 -865
- package/dist/{numberedStep-CqgNwc_a.js → numberedStep-CeN77hnQ.js} +1 -1
- package/dist/{optionAccessibleLabel-BQl8HooZ.js → optionAccessibleLabel-BTUieMxH.js} +6 -6
- package/dist/{otpInput-B_iLvmIn.js → otpInput-D3L3QhnR.js} +24 -17
- package/dist/{page-utEpSa9Z.js → page-U6jZ7BBI.js} +69 -23
- package/dist/{pageUiConfig-rOL18JSI.js → pageUiConfig-Qf6ItVv9.js} +6 -14
- package/dist/{passport-horizontal-hint-BfTXA2LB.js → passport-horizontal-hint-Ddsh6fUS.js} +1 -1
- package/dist/{passport-vertical-hint-C7dzd2ks.js → passport-vertical-hint-Dukxq6-T.js} +1 -1
- package/dist/{passwordInputComposed-NtiseM85.js → passwordInputComposed-CW_1DcB8.js} +5 -5
- package/dist/{pdf-BnPw8ZaT.js → pdf-Bd5QplFS.js} +2 -17
- package/dist/{pdfViewer-DNMZsDFD.js → pdfViewer-BrqSEtbr.js} +11 -14
- package/dist/pdfViewer-rDnnHzmw.js +2 -0
- package/dist/{permissions-CCEc9lKM.js → permissions-KUDhffd9.js} +36 -23
- package/dist/phone/phone.es.js +16 -12
- package/dist/{phoneInputComposed-ByiK_6Hu.js → phoneInputComposed-DlJMTavK.js} +6 -6
- package/dist/{pl-B1LgnPj1.js → pl-BSMcCWS-.js} +75 -865
- package/dist/preloadableLazy-C8_OYaTC.js +37 -0
- package/dist/{processing-Ci_Kl-Rh.js → processing-B5EH7yNg.js} +2 -2
- package/dist/{progressBar-Caj-Vu1e.js → progressBar-CSpS29pV.js} +2 -2
- package/dist/{pt-CPVeH0hD.js → pt-BNFC2quK.js} +75 -865
- package/dist/{pt-BR-DSJDHb-K.js → pt-BR-bH8DC2gH.js} +75 -865
- package/dist/{pt-PT-BWJTVPZY.js → pt-PT-B8PXmgwU.js} +75 -865
- package/dist/qe-signature/qe-signature.es.js +4 -4
- package/dist/{radioGroupComposed-CocqpoKe.js → radioGroupComposed-CW8ElYSR.js} +4 -4
- package/dist/radioGroupComposed-flIYNffL.js +1 -0
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +19 -21
- package/dist/redirect-to-mobile/styles.css +1 -1
- package/dist/redirect-to-mobile/styles.css.js +1 -1
- package/dist/{registerIncodeElement-Dtw9dM3O.js → registerIncodeElement-oiLvm6xq.js} +1 -1
- package/dist/{reload-icon-BR1POqkD.js → reload-icon-FD2e9Wet.js} +1 -1
- package/dist/{resendTimer-ODOCcKyh.js → resendTimer-D1H3gwkI.js} +2 -2
- package/dist/richText-sUdTiRDE.js +1761 -0
- package/dist/{ro-8gGEWeHO.js → ro-DnN8QNYa.js} +75 -865
- package/dist/{ru-C4EVku5S.js → ru-DAwUFXHq.js} +75 -865
- package/dist/{ru-RU-Dr0NOGjg.js → ru-RU-Coxt0VCU.js} +75 -865
- package/dist/{sanitizeSvg-ilJ8VQmH.js → sanitizeSvg-OdNh1mqY.js} +1 -1
- package/dist/selfie/selfie.es.js +30 -14
- package/dist/selfie/styles.css +1 -1
- package/dist/selfie/styles.css.js +1 -1
- package/dist/signature/signature.es.js +18 -13
- package/dist/{sk-BSTzMa__.js → sk-AB8sSlNw.js} +77 -867
- package/dist/{sl-_HvO-HVX.js → sl-6Dfzfi7s.js} +75 -865
- package/dist/{smsTabContent-CWBrtP4u.js → smsTabContent-CBEKgzFv.js} +32 -23
- package/dist/{so-pyCaqonl.js → so-X5BdrDvV.js} +75 -865
- package/dist/spacer-Jaru_3sb.js +82 -0
- package/dist/spinner-51btbot0.js +407 -0
- package/dist/{sr-Bpxtt0kk.js → sr-JHjMcbGs.js} +75 -865
- package/dist/{sr-Latn-BjueCJSI.js → sr-Latn-DgT7eTG2.js} +80 -870
- package/dist/sr-YU-BBhB_G63.js +5 -0
- package/dist/{sv-SE-sv5v6ZWe.js → sv-SE-CvX8mC8T.js} +75 -865
- package/dist/{sw-BseJSmdR.js → sw-CN0TdnY4.js} +75 -865
- package/dist/{th-C2G8Ur12.js → th-BmFntKib.js} +75 -865
- package/dist/{th-TH-D0WNW-3l.js → th-TH-CWr4z3JK.js} +75 -865
- package/dist/themes/dark.css +1 -1
- package/dist/themes/light.css +1 -1
- package/dist/{tl-PH-CwafDrED.js → tl-PH-BRIbtBRN.js} +75 -865
- package/dist/{tl-CBOmxz5r.js → tl-rzkk5P_n.js} +75 -865
- package/dist/{tr-C4iH8UJx.js → tr-DKuVBwqW.js} +76 -866
- package/dist/{transitionSpinner-DbrWrpRU.js → transitionSpinner-Di0XBAix.js} +5 -4
- package/dist/tutorial-C9psDR2i.js +28 -0
- package/dist/types/extensibility.d.ts +6 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/kyb-checks.d.ts +209 -0
- package/dist/{typography-BF9d8wEc.js → typography-CiGhKJGx.js} +2 -2
- package/dist/uiConfig-BJAuZQWc.js +77 -0
- package/dist/{uk-BGYlvKb_.js → uk-CXjqq4lX.js} +75 -865
- package/dist/{uk-UA-CbxzkCL_.js → uk-UA-BIE9WByU.js} +75 -865
- package/dist/{ur-BQgtsAfv.js → ur-vNGesC3r.js} +75 -865
- package/dist/{useCameraPreview-BmkAmzAs.js → useCameraPreview-Bd7AYE9h.js} +1 -1
- package/dist/useCaptureHelpButton-Dj-jESrS.js +43 -0
- package/dist/{useIsDarkTheme-COJZngNK.js → useIsDarkTheme-Bu9CvKxW.js} +1 -1
- package/dist/{useModuleLoader-CceEKjsh.js → useModuleLoader-BBCNkJmc.js} +2 -2
- package/dist/{uz-DqOg1Fdv.js → uz-Gmw1XRgv.js} +75 -865
- package/dist/{vendor-preact-C0jX1Cbq.js → vendor-preact-DHGqBGMH.js} +19 -1
- package/dist/{verificationResult-m99Ragq6.js → verificationResult-Clxdxm_s.js} +18 -10
- package/dist/{vi-COxdKkHn.js → vi-DTxxRUw0.js} +75 -865
- package/dist/video-selfie/video-selfie.es.js +50 -33
- package/dist/watchlist/watchlist.es.js +8 -6
- package/dist/{watchlistForBusiness-C2zxbavl.js → watchlistForBusiness-CpFp2EYX.js} +16 -11
- package/dist/{withEndScreenTexts-BwNU-8-X.js → withEndScreenTexts-Bd3mof3s.js} +204 -41
- package/dist/workflow/styles.css +1 -1
- package/dist/workflow/workflow.es.js +19 -15
- package/dist/{zh-CN-DfvYQGdE.js → zh-CN-aB48G_R1.js} +76 -866
- package/dist/{zh-CPQoDPxf.js → zh-DjtyfO4e.js} +75 -865
- package/dist/{zh-HANT-B4LzHH2y.js → zh-HANT-8p8SH8C3.js} +75 -865
- package/dist/{zh-TW-DtvvhBYL.js → zh-TW-CCsz9gKq.js} +75 -865
- package/package.json +22 -10
- package/dist/browser-ponyfill-CHlXHPpU.js +0 -441
- package/dist/cameraOverlay-Be1PFI8S.js +0 -2
- package/dist/dateInputComposed-CONPVayx.js +0 -1
- package/dist/devWarn-Cr7MglXv.js +0 -2628
- package/dist/documentCapture-DGCraCO3.js +0 -2
- package/dist/dropdownComposed-DyZXfcTf.js +0 -1
- package/dist/ekybModule-D-czIusz.js +0 -2
- package/dist/ekycModule-CkBRa6h2.js +0 -2
- package/dist/es-419-CTB15v-l.js +0 -3231
- package/dist/esm-BTUEHyry.js +0 -430
- package/dist/faceMatch-CRbIcwK2.js +0 -2
- package/dist/fieldComparison-DKQNK0-r.js +0 -2
- package/dist/flipAnimation-D-5tokFC.js +0 -3275
- package/dist/inputComposed-5mLbxAZJ.js +0 -1
- package/dist/pdfViewer-7FzYV8l3.js +0 -2
- package/dist/radioGroupComposed-DlQ-fNrF.js +0 -1
- package/dist/richText-CRWB2afV.js +0 -1549
- package/dist/spacer-CwyNauIk.js +0 -733
- package/dist/spinner-DEZJxLSc.js +0 -88
- package/dist/sr-YU-xCb5qxap.js +0 -3235
- package/dist/useCaptureHelpButton-D40hYyD7.js +0 -88
- /package/dist/{aligndevicelottie-BHWuptBk.js → aligndevicelottie-BEKzL4SB.js} +0 -0
- /package/dist/{back-tutorial-BYZr11eV.js → back-tutorial-B9W63fa-.js} +0 -0
- /package/dist/{backdevicelottie-JflQKxT_.js → backdevicelottie-DsN8QBV3.js} +0 -0
- /package/dist/{blurdevicelottie-CWuMQEHL.js → blurdevicelottie-DkV7Kwo4.js} +0 -0
- /package/dist/{countryDefinitions-6FOOLcB2.js → countryDefinitions-RBVGM1D_.js} +0 -0
- /package/dist/{defineProperty-CUC2zCmh.js → defineProperty-E9wRIIo9.js} +0 -0
- /package/dist/{flip-animation-BqTKEBcW.js → flip-animation-DJVnWWL5.js} +0 -0
- /package/dist/{frontdevicelottie-BWD-NCfG.js → frontdevicelottie-DiW1Wmya.js} +0 -0
- /package/dist/{glaredevicelottie-Cjy50jGc.js → glaredevicelottie-CK-fnX_s.js} +0 -0
- /package/dist/{helpButtonConfig-BFragC_J.js → helpButtonConfig-CjbrBQaV.js} +0 -0
- /package/dist/{id-laser-h-By7lMim8.js → id-laser-h-6Am_cjM8.js} +0 -0
- /package/dist/{id-laser-v-BCPAN2x5.js → id-laser-v-DXoF3flH.js} +0 -0
- /package/dist/{id-tutorial-B9cUQuf0.js → id-tutorial-DkKH3eTE.js} +0 -0
- /package/dist/{lottie_light-DywVSPMT.js → lottie_light-B819EhaL.js} +0 -0
- /package/dist/{passport-tutorial-TSZzEGqb.js → passport-tutorial-D3Fpk-Tj.js} +0 -0
- /package/dist/{pdf.worker.min-D7ZNTVBZ.js → pdf.worker.min-DzBNMoKS.js} +0 -0
- /package/dist/{policyUrls-Bpacx_pp.js → policyUrls-Benduf-R.js} +0 -0
- /package/dist/{purify.es-DZazHwBu.js → purify.es-CSPoFViI.js} +0 -0
- /package/dist/{realtimeFeedbackConfig-DeZksjlR.js → realtimeFeedbackConfig-tBX94SOm.js} +0 -0
- /package/dist/{selfieTutorial-CLJAEuXG.js → selfieTutorial-DnsRD1Z9.js} +0 -0
|
@@ -0,0 +1,942 @@
|
|
|
1
|
+
import { _ as q, b as u, d as T, m as d, r as C, w as k, x as K, y } from "./vendor-preact-DHGqBGMH.js";
|
|
2
|
+
//#region src/i18n/bundledTranslationLoaders.ts
|
|
3
|
+
var bundledTranslationLoaders = {
|
|
4
|
+
"en": () => import("./en-Db1L_u7B.js"),
|
|
5
|
+
"en-DG": () => import("./en-DG-C6tsWvHi.js"),
|
|
6
|
+
"es": () => import("./es-C5unKsaF.js"),
|
|
7
|
+
"es-ES": () => import("./es-ES-sHbsufzT.js"),
|
|
8
|
+
"sr": () => import("./sr-JHjMcbGs.js"),
|
|
9
|
+
"sr-Latn": () => import("./sr-Latn-DgT7eTG2.js"),
|
|
10
|
+
"fr": () => import("./fr-DSR-AP0e.js"),
|
|
11
|
+
"pt-BR": () => import("./pt-BR-bH8DC2gH.js"),
|
|
12
|
+
"pt": () => import("./pt-BNFC2quK.js"),
|
|
13
|
+
"bn": () => import("./bn-DRTyq2Y9.js"),
|
|
14
|
+
"zh": () => import("./zh-DjtyfO4e.js"),
|
|
15
|
+
"hi": () => import("./hi-JR6K9zbd.js"),
|
|
16
|
+
"id": () => import("./id-o_Yg0n8W.js"),
|
|
17
|
+
"ms": () => import("./ms-BydA1Zjz.js"),
|
|
18
|
+
"tr": () => import("./tr-DKuVBwqW.js"),
|
|
19
|
+
"vi": () => import("./vi-DTxxRUw0.js"),
|
|
20
|
+
"ht": () => import("./ht-DDNL4C__.js"),
|
|
21
|
+
"it": () => import("./it-BXevrtHn.js"),
|
|
22
|
+
"de": () => import("./de-DEBjzaow.js"),
|
|
23
|
+
"nl": () => import("./nl-e1gbmAFO.js"),
|
|
24
|
+
"tl-PH": () => import("./tl-PH-BRIbtBRN.js"),
|
|
25
|
+
"pl": () => import("./pl-BSMcCWS-.js"),
|
|
26
|
+
"hu": () => import("./hu-CynQQUFQ.js"),
|
|
27
|
+
"ro": () => import("./ro-DnN8QNYa.js"),
|
|
28
|
+
"hmn": () => import("./hmn-j2YA7FxW.js"),
|
|
29
|
+
"so": () => import("./so-X5BdrDvV.js"),
|
|
30
|
+
"ca": () => import("./ca-DvsHXRB-.js"),
|
|
31
|
+
"af-ZA": () => import("./af-ZA-BKpmmWDe.js"),
|
|
32
|
+
"ar": () => import("./ar-B5ToweVl.js"),
|
|
33
|
+
"ar-EG": () => import("./ar-EG-DQqE9B26.js"),
|
|
34
|
+
"ar-AE": () => import("./ar-AE-D9h8UMbm.js"),
|
|
35
|
+
"zh-CN": () => import("./zh-CN-aB48G_R1.js"),
|
|
36
|
+
"zh-TW": () => import("./zh-TW-CCsz9gKq.js"),
|
|
37
|
+
"zh-HANT": () => import("./zh-HANT-8p8SH8C3.js"),
|
|
38
|
+
"cs-CZ": () => import("./cs-CZ-GgvnJLMj.js"),
|
|
39
|
+
"da-DK": () => import("./da-DK-ZhpcfE_F.js"),
|
|
40
|
+
"fi-FI": () => import("./fi-FI-DMOBNTjA.js"),
|
|
41
|
+
"fr-CA": () => import("./fr-CA-DZ8jlsp3.js"),
|
|
42
|
+
"el-GR": () => import("./el-GR-IZ4reOR7.js"),
|
|
43
|
+
"he": () => import("./he-N5dfJeyd.js"),
|
|
44
|
+
"ja": () => import("./ja-DiTXnTx-.js"),
|
|
45
|
+
"ja-JP": () => import("./ja-JP-D1IRWR-p.js"),
|
|
46
|
+
"ko-KP": () => import("./ko-KP-JF4khv1Y.js"),
|
|
47
|
+
"nb-NO": () => import("./nb-NO-CDsGQbOZ.js"),
|
|
48
|
+
"fa-IR": () => import("./fa-IR-DuUxGXrf.js"),
|
|
49
|
+
"pt-PT": () => import("./pt-PT-B8PXmgwU.js"),
|
|
50
|
+
"ru-RU": () => import("./ru-RU-Coxt0VCU.js"),
|
|
51
|
+
"sr-YU": () => import("./sr-YU-BBhB_G63.js"),
|
|
52
|
+
"es-419": () => import("./es-419-DxKrJq7W.js"),
|
|
53
|
+
"es-MX": () => import("./es-MX-Cd_DCR0A.js"),
|
|
54
|
+
"sv-SE": () => import("./sv-SE-CvX8mC8T.js"),
|
|
55
|
+
"th-TH": () => import("./th-TH-CWr4z3JK.js"),
|
|
56
|
+
"uk-UA": () => import("./uk-UA-BIE9WByU.js"),
|
|
57
|
+
"am": () => import("./am-CW_ro5Ws.js"),
|
|
58
|
+
"az": () => import("./az-DAZq-CQj.js"),
|
|
59
|
+
"bs": () => import("./bs-B8q0B86-.js"),
|
|
60
|
+
"my": () => import("./my-gFKufKaG.js"),
|
|
61
|
+
"ceb": () => import("./ceb-pvlomXHV.js"),
|
|
62
|
+
"cs": () => import("./cs-DB5PLEdt.js"),
|
|
63
|
+
"et": () => import("./et-BoGq2cx8.js"),
|
|
64
|
+
"ka": () => import("./ka-BSsWQ4yU.js"),
|
|
65
|
+
"el": () => import("./el-Dplr_D5N.js"),
|
|
66
|
+
"jv": () => import("./jv-Us70GzGp.js"),
|
|
67
|
+
"kk": () => import("./kk-D5R6r4H7.js"),
|
|
68
|
+
"km": () => import("./km-CCCb2Rnt.js"),
|
|
69
|
+
"ko": () => import("./ko-kQioCg2w.js"),
|
|
70
|
+
"ky": () => import("./ky-CLOemVjC.js"),
|
|
71
|
+
"lo": () => import("./lo-tzHUt1CQ.js"),
|
|
72
|
+
"lv": () => import("./lv-BJnxtSYw.js"),
|
|
73
|
+
"lt": () => import("./lt-B2ZI-Cgu.js"),
|
|
74
|
+
"mk": () => import("./mk-Cj7Iw2Q4.js"),
|
|
75
|
+
"mn": () => import("./mn-CA_rNxtz.js"),
|
|
76
|
+
"ne": () => import("./ne-Cyfi0vFI.js"),
|
|
77
|
+
"ru": () => import("./ru-DAwUFXHq.js"),
|
|
78
|
+
"sk": () => import("./sk-AB8sSlNw.js"),
|
|
79
|
+
"sl": () => import("./sl-6Dfzfi7s.js"),
|
|
80
|
+
"sw": () => import("./sw-CN0TdnY4.js"),
|
|
81
|
+
"tl": () => import("./tl-rzkk5P_n.js"),
|
|
82
|
+
"th": () => import("./th-BmFntKib.js"),
|
|
83
|
+
"uk": () => import("./uk-CXjqq4lX.js"),
|
|
84
|
+
"ur": () => import("./ur-vNGesC3r.js"),
|
|
85
|
+
"uz": () => import("./uz-Gmw1XRgv.js"),
|
|
86
|
+
"hr": () => import("./hr-8cOdwB0t.js")
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/i18n/bundledTranslationsBackend.ts
|
|
90
|
+
async function loadBundledCatalog(language) {
|
|
91
|
+
const load = bundledTranslationLoaders[language];
|
|
92
|
+
if (!load) throw new Error(`Unsupported bundled language: ${language}`);
|
|
93
|
+
return (await load()).default;
|
|
94
|
+
}
|
|
95
|
+
var supportedLanguages = [
|
|
96
|
+
"en",
|
|
97
|
+
"en-DG",
|
|
98
|
+
"es",
|
|
99
|
+
"es-ES",
|
|
100
|
+
"sr",
|
|
101
|
+
"sr-Latn",
|
|
102
|
+
"fr",
|
|
103
|
+
"pt-BR",
|
|
104
|
+
"pt",
|
|
105
|
+
"bn",
|
|
106
|
+
"zh",
|
|
107
|
+
"hi",
|
|
108
|
+
"id",
|
|
109
|
+
"ms",
|
|
110
|
+
"tr",
|
|
111
|
+
"vi",
|
|
112
|
+
"ht",
|
|
113
|
+
"it",
|
|
114
|
+
"de",
|
|
115
|
+
"nl",
|
|
116
|
+
"tl-PH",
|
|
117
|
+
"pl",
|
|
118
|
+
"hu",
|
|
119
|
+
"ro",
|
|
120
|
+
"hmn",
|
|
121
|
+
"so",
|
|
122
|
+
"ca",
|
|
123
|
+
"af-ZA",
|
|
124
|
+
"ar",
|
|
125
|
+
"ar-EG",
|
|
126
|
+
"ar-AE",
|
|
127
|
+
"zh-CN",
|
|
128
|
+
"zh-TW",
|
|
129
|
+
"zh-HANT",
|
|
130
|
+
"cs-CZ",
|
|
131
|
+
"da-DK",
|
|
132
|
+
"fi-FI",
|
|
133
|
+
"fr-CA",
|
|
134
|
+
"el-GR",
|
|
135
|
+
"he",
|
|
136
|
+
"ja",
|
|
137
|
+
"ja-JP",
|
|
138
|
+
"ko-KP",
|
|
139
|
+
"nb-NO",
|
|
140
|
+
"fa-IR",
|
|
141
|
+
"pt-PT",
|
|
142
|
+
"ru-RU",
|
|
143
|
+
"sr-YU",
|
|
144
|
+
"es-419",
|
|
145
|
+
"es-MX",
|
|
146
|
+
"sv-SE",
|
|
147
|
+
"th-TH",
|
|
148
|
+
"uk-UA",
|
|
149
|
+
"am",
|
|
150
|
+
"az",
|
|
151
|
+
"bs",
|
|
152
|
+
"my",
|
|
153
|
+
"ceb",
|
|
154
|
+
"cs",
|
|
155
|
+
"et",
|
|
156
|
+
"ka",
|
|
157
|
+
"el",
|
|
158
|
+
"jv",
|
|
159
|
+
"kk",
|
|
160
|
+
"km",
|
|
161
|
+
"ko",
|
|
162
|
+
"ky",
|
|
163
|
+
"lo",
|
|
164
|
+
"lv",
|
|
165
|
+
"lt",
|
|
166
|
+
"mk",
|
|
167
|
+
"mn",
|
|
168
|
+
"ne",
|
|
169
|
+
"ru",
|
|
170
|
+
"sk",
|
|
171
|
+
"sl",
|
|
172
|
+
"sw",
|
|
173
|
+
"tl",
|
|
174
|
+
"th",
|
|
175
|
+
"uk",
|
|
176
|
+
"ur",
|
|
177
|
+
"uz",
|
|
178
|
+
"hr"
|
|
179
|
+
];
|
|
180
|
+
var languageMetadata = {
|
|
181
|
+
en: { emoji: "🇺🇸" },
|
|
182
|
+
"en-DG": { emoji: "🇬🇧" },
|
|
183
|
+
es: { emoji: "🇪🇸" },
|
|
184
|
+
"es-ES": { emoji: "🇪🇸" },
|
|
185
|
+
sr: { emoji: "🇷🇸" },
|
|
186
|
+
"sr-Latn": { emoji: "🇷🇸" },
|
|
187
|
+
fr: { emoji: "🇫🇷" },
|
|
188
|
+
"pt-BR": { emoji: "🇧🇷" },
|
|
189
|
+
pt: { emoji: "🇵🇹" },
|
|
190
|
+
bn: { emoji: "🇧🇩" },
|
|
191
|
+
zh: { emoji: "🇨🇳" },
|
|
192
|
+
hi: { emoji: "🇮🇳" },
|
|
193
|
+
id: { emoji: "🇮🇩" },
|
|
194
|
+
ms: { emoji: "🇲🇾" },
|
|
195
|
+
tr: { emoji: "🇹🇷" },
|
|
196
|
+
vi: { emoji: "🇻🇳" },
|
|
197
|
+
ht: { emoji: "🇭🇹" },
|
|
198
|
+
it: { emoji: "🇮🇹" },
|
|
199
|
+
de: { emoji: "🇩🇪" },
|
|
200
|
+
nl: { emoji: "🇳🇱" },
|
|
201
|
+
"tl-PH": { emoji: "🇵🇭" },
|
|
202
|
+
pl: { emoji: "🇵🇱" },
|
|
203
|
+
hu: { emoji: "🇭🇺" },
|
|
204
|
+
ro: { emoji: "🇷🇴" },
|
|
205
|
+
hmn: { emoji: "🌐" },
|
|
206
|
+
so: { emoji: "🇸🇴" },
|
|
207
|
+
ca: { emoji: "🇪🇸" },
|
|
208
|
+
"af-ZA": { emoji: "🇿🇦" },
|
|
209
|
+
ar: { emoji: "🇸🇦" },
|
|
210
|
+
"ar-EG": { emoji: "🇪🇬" },
|
|
211
|
+
"ar-AE": { emoji: "🇦🇪" },
|
|
212
|
+
"zh-CN": { emoji: "🇨🇳" },
|
|
213
|
+
"zh-TW": { emoji: "🇹🇼" },
|
|
214
|
+
"zh-HANT": { emoji: "🇹🇼" },
|
|
215
|
+
"cs-CZ": { emoji: "🇨🇿" },
|
|
216
|
+
"da-DK": { emoji: "🇩🇰" },
|
|
217
|
+
"fi-FI": { emoji: "🇫🇮" },
|
|
218
|
+
"fr-CA": { emoji: "🇨🇦" },
|
|
219
|
+
"el-GR": { emoji: "🇬🇷" },
|
|
220
|
+
he: { emoji: "🇮🇱" },
|
|
221
|
+
ja: { emoji: "🇯🇵" },
|
|
222
|
+
"ja-JP": { emoji: "🇯🇵" },
|
|
223
|
+
"ko-KP": { emoji: "🇰🇵" },
|
|
224
|
+
"nb-NO": { emoji: "🇳🇴" },
|
|
225
|
+
"fa-IR": { emoji: "🇮🇷" },
|
|
226
|
+
"pt-PT": { emoji: "🇵🇹" },
|
|
227
|
+
"ru-RU": { emoji: "🇷🇺" },
|
|
228
|
+
"sr-YU": { emoji: "🇷🇸" },
|
|
229
|
+
"es-419": { emoji: "🌎" },
|
|
230
|
+
"es-MX": { emoji: "🇲🇽" },
|
|
231
|
+
"sv-SE": { emoji: "🇸🇪" },
|
|
232
|
+
"th-TH": { emoji: "🇹🇭" },
|
|
233
|
+
"uk-UA": { emoji: "🇺🇦" },
|
|
234
|
+
am: { emoji: "🇪🇹" },
|
|
235
|
+
az: { emoji: "🇦🇿" },
|
|
236
|
+
bs: { emoji: "🇧🇦" },
|
|
237
|
+
my: { emoji: "🇲🇲" },
|
|
238
|
+
ceb: { emoji: "🇵🇭" },
|
|
239
|
+
cs: { emoji: "🇨🇿" },
|
|
240
|
+
et: { emoji: "🇪🇪" },
|
|
241
|
+
ka: { emoji: "🇬🇪" },
|
|
242
|
+
el: { emoji: "🇬🇷" },
|
|
243
|
+
jv: { emoji: "🇮🇩" },
|
|
244
|
+
kk: { emoji: "🇰🇿" },
|
|
245
|
+
km: { emoji: "🇰🇭" },
|
|
246
|
+
ko: { emoji: "🇰🇷" },
|
|
247
|
+
ky: { emoji: "🇰🇬" },
|
|
248
|
+
lo: { emoji: "🇱🇦" },
|
|
249
|
+
lv: { emoji: "🇱🇻" },
|
|
250
|
+
lt: { emoji: "🇱🇹" },
|
|
251
|
+
mk: { emoji: "🇲🇰" },
|
|
252
|
+
mn: { emoji: "🇲🇳" },
|
|
253
|
+
ne: { emoji: "🇳🇵" },
|
|
254
|
+
ru: { emoji: "🇷🇺" },
|
|
255
|
+
sk: { emoji: "🇸🇰" },
|
|
256
|
+
sl: { emoji: "🇸🇮" },
|
|
257
|
+
sw: { emoji: "🇹🇿" },
|
|
258
|
+
tl: { emoji: "🇵🇭" },
|
|
259
|
+
th: { emoji: "🇹🇭" },
|
|
260
|
+
uk: { emoji: "🇺🇦" },
|
|
261
|
+
ur: { emoji: "🇵🇰" },
|
|
262
|
+
uz: { emoji: "🇺🇿" },
|
|
263
|
+
hr: { emoji: "🇭🇷" }
|
|
264
|
+
};
|
|
265
|
+
function getLanguageEmoji(language) {
|
|
266
|
+
const directMatch = languageMetadata[language];
|
|
267
|
+
if (directMatch) return directMatch.emoji;
|
|
268
|
+
return languageMetadata[language.split("-")[0] || language]?.emoji ?? "🌐";
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/i18n/translator.ts
|
|
272
|
+
/** A failed load the translator retries, like http-backend's `retry` flag. */
|
|
273
|
+
var RetryableLoadError = class extends Error {};
|
|
274
|
+
var MAX_RETRIES = 5;
|
|
275
|
+
var FIRST_RETRY_MS = 350;
|
|
276
|
+
var RTL_LANGUAGES = [
|
|
277
|
+
"ar",
|
|
278
|
+
"he",
|
|
279
|
+
"iw",
|
|
280
|
+
"fa",
|
|
281
|
+
"ur",
|
|
282
|
+
"ps",
|
|
283
|
+
"ug",
|
|
284
|
+
"yi",
|
|
285
|
+
"dv",
|
|
286
|
+
"ckb"
|
|
287
|
+
];
|
|
288
|
+
var hasOwn = (object, key) => Object.prototype.hasOwnProperty.call(object, key);
|
|
289
|
+
var isPlainValue = (value) => [
|
|
290
|
+
"string",
|
|
291
|
+
"number",
|
|
292
|
+
"boolean"
|
|
293
|
+
].includes(typeof value);
|
|
294
|
+
function canonical(code) {
|
|
295
|
+
if (!code.includes("-")) return code;
|
|
296
|
+
try {
|
|
297
|
+
return Intl.getCanonicalLocales(code)[0] ?? code;
|
|
298
|
+
} catch {
|
|
299
|
+
return code;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function scriptPart(code) {
|
|
303
|
+
const parts = code.replace("_", "-").split("-");
|
|
304
|
+
if (parts.length < 3) return null;
|
|
305
|
+
parts.pop();
|
|
306
|
+
if (parts[parts.length - 1]?.toLowerCase() === "x") return null;
|
|
307
|
+
return canonical(parts.join("-"));
|
|
308
|
+
}
|
|
309
|
+
function languagePart(code) {
|
|
310
|
+
const cleaned = code.replace("_", "-");
|
|
311
|
+
return cleaned.includes("-") ? canonical(cleaned.split("-")[0] ?? "") : cleaned;
|
|
312
|
+
}
|
|
313
|
+
/** i18next `getPath`: walks `a.b.c`, stopping at strings and missing keys. */
|
|
314
|
+
function getPath(object, path) {
|
|
315
|
+
let current = object;
|
|
316
|
+
for (let index = 0; index < path.length - 1; index += 1) {
|
|
317
|
+
if (!current || typeof current === "string") return void 0;
|
|
318
|
+
current = hasOwn(current, path[index]) ? current[path[index]] : {};
|
|
319
|
+
}
|
|
320
|
+
if (!current || typeof current === "string") return void 0;
|
|
321
|
+
const last = path[path.length - 1];
|
|
322
|
+
return hasOwn(current, last) ? current[last] : void 0;
|
|
323
|
+
}
|
|
324
|
+
/** i18next `deepFind`: also matches flat keys that contain the separator. */
|
|
325
|
+
function deepFind(object, key) {
|
|
326
|
+
if (!object || typeof object !== "object") return void 0;
|
|
327
|
+
const record = object;
|
|
328
|
+
if (record[key]) return hasOwn(record, key) ? record[key] : void 0;
|
|
329
|
+
const tokens = key.split(".");
|
|
330
|
+
let current = record;
|
|
331
|
+
for (let index = 0; index < tokens.length;) {
|
|
332
|
+
if (!current || typeof current !== "object") return void 0;
|
|
333
|
+
let next;
|
|
334
|
+
let nextPath = "";
|
|
335
|
+
for (let end = index; end < tokens.length; end += 1) {
|
|
336
|
+
nextPath += (end === index ? "" : ".") + tokens[end];
|
|
337
|
+
next = current[nextPath];
|
|
338
|
+
if (next !== void 0) {
|
|
339
|
+
if (isPlainValue(next) && end < tokens.length - 1) continue;
|
|
340
|
+
index = end + 1;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
current = next;
|
|
345
|
+
}
|
|
346
|
+
return current;
|
|
347
|
+
}
|
|
348
|
+
function lookup(object, key) {
|
|
349
|
+
return getPath(object, key.split(".")) || deepFind(object, key);
|
|
350
|
+
}
|
|
351
|
+
function deepExtend(target, source) {
|
|
352
|
+
for (const prop in source) {
|
|
353
|
+
if (prop === "__proto__" || prop === "constructor") continue;
|
|
354
|
+
const from = source[prop];
|
|
355
|
+
const to = target[prop];
|
|
356
|
+
if (!(prop in target)) target[prop] = from;
|
|
357
|
+
else if (typeof to === "string" || typeof from === "string") target[prop] = from;
|
|
358
|
+
else deepExtend(to, from);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
/** `{{name}}` and `{{- name}}`; a variable not passed keeps its placeholder. */
|
|
362
|
+
function interpolate(text, opt) {
|
|
363
|
+
if (typeof text !== "string") return text;
|
|
364
|
+
const data = opt.replace && typeof opt.replace === "object" ? opt.replace : opt;
|
|
365
|
+
let result = text;
|
|
366
|
+
for (const pattern of [/\{\{-(.+?)\}\}/g, /\{\{(.+?)\}\}/g]) {
|
|
367
|
+
let match;
|
|
368
|
+
let replaces = 0;
|
|
369
|
+
while (match = pattern.exec(result)) {
|
|
370
|
+
const name = (match[1] ?? "").trim();
|
|
371
|
+
let value = lookup(data, name.split(",")[0].trim());
|
|
372
|
+
if (value === void 0) {
|
|
373
|
+
if (!hasOwn(opt, name)) continue;
|
|
374
|
+
value = "";
|
|
375
|
+
}
|
|
376
|
+
const replacement = value == null ? "" : `${value}`;
|
|
377
|
+
result = result.replace(match[0], replacement.replace(/\$/g, "$$$$"));
|
|
378
|
+
pattern.lastIndex += replacement.length - match[0].length;
|
|
379
|
+
replaces += 1;
|
|
380
|
+
if (replaces >= 1e3) break;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return result;
|
|
384
|
+
}
|
|
385
|
+
var pluralRules = /* @__PURE__ */ new Map();
|
|
386
|
+
function pluralRule(language) {
|
|
387
|
+
const code = language.replace("_", "-");
|
|
388
|
+
if (!pluralRules.has(code)) {
|
|
389
|
+
let rule;
|
|
390
|
+
try {
|
|
391
|
+
rule = new Intl.PluralRules(code);
|
|
392
|
+
} catch {
|
|
393
|
+
rule = /-|_/.test(language) ? pluralRule(languagePart(language)) : null;
|
|
394
|
+
}
|
|
395
|
+
pluralRules.set(code, rule);
|
|
396
|
+
}
|
|
397
|
+
return pluralRules.get(code) ?? null;
|
|
398
|
+
}
|
|
399
|
+
function pluralSuffix(language, count) {
|
|
400
|
+
const rule = pluralRule(language);
|
|
401
|
+
return `_${rule ? rule.select(count) : count === 1 ? "one" : "other"}`;
|
|
402
|
+
}
|
|
403
|
+
/** i18next's default overload: `t(key, 'default', { ...options })`. */
|
|
404
|
+
function toOptions(defaultValueOrOptions, options) {
|
|
405
|
+
if (typeof defaultValueOrOptions === "object") return { ...defaultValueOrOptions };
|
|
406
|
+
const result = {};
|
|
407
|
+
if (typeof defaultValueOrOptions === "string") result.defaultValue = defaultValueOrOptions;
|
|
408
|
+
if (options && typeof options === "object") Object.assign(result, options);
|
|
409
|
+
return result;
|
|
410
|
+
}
|
|
411
|
+
function createTranslator(options) {
|
|
412
|
+
const supported = [...options.supportedLngs, "cimode"];
|
|
413
|
+
const isSupported = (code) => code !== null && supported.includes(code);
|
|
414
|
+
const store = {};
|
|
415
|
+
const loadStates = /* @__PURE__ */ new Map();
|
|
416
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
417
|
+
let changingTo;
|
|
418
|
+
let currentLanguage = "";
|
|
419
|
+
let initialized = false;
|
|
420
|
+
const emit = (event, ...args) => {
|
|
421
|
+
for (const listener of [...listeners.get(event) ?? []]) listener(...args);
|
|
422
|
+
};
|
|
423
|
+
const hasTranslations = (language) => Object.keys(store[language] ?? {}).length > 0;
|
|
424
|
+
function bestMatch(codes) {
|
|
425
|
+
for (const code of codes) if (isSupported(canonical(code))) return canonical(code);
|
|
426
|
+
for (const code of codes) {
|
|
427
|
+
const script = scriptPart(code);
|
|
428
|
+
if (script !== null && isSupported(script)) return script;
|
|
429
|
+
const base = languagePart(code);
|
|
430
|
+
if (isSupported(base)) return base;
|
|
431
|
+
const found = supported.find((candidate) => candidate === base || (candidate.includes("-") || base.includes("-")) && (candidate.indexOf("-") > 0 && !base.includes("-") && candidate.slice(0, candidate.indexOf("-")) === base || candidate.startsWith(base) && base.length > 1));
|
|
432
|
+
if (found) return found;
|
|
433
|
+
}
|
|
434
|
+
return options.fallbackLng;
|
|
435
|
+
}
|
|
436
|
+
function hierarchy(code) {
|
|
437
|
+
const codes = [];
|
|
438
|
+
const add = (candidate) => {
|
|
439
|
+
if (candidate !== null && isSupported(candidate)) codes.push(candidate);
|
|
440
|
+
};
|
|
441
|
+
if (code.includes("-") || code.includes("_")) {
|
|
442
|
+
add(canonical(code));
|
|
443
|
+
if (options.load === "all") {
|
|
444
|
+
add(scriptPart(code));
|
|
445
|
+
add(languagePart(code));
|
|
446
|
+
}
|
|
447
|
+
} else add(code);
|
|
448
|
+
if (!codes.includes(options.fallbackLng)) add(options.fallbackLng);
|
|
449
|
+
return codes;
|
|
450
|
+
}
|
|
451
|
+
async function readCatalog(language) {
|
|
452
|
+
for (let attempt = 0, wait = FIRST_RETRY_MS;; attempt += 1, wait *= 2) try {
|
|
453
|
+
const catalog = await options.loadCatalog(language);
|
|
454
|
+
store[language] = {
|
|
455
|
+
...store[language],
|
|
456
|
+
...catalog
|
|
457
|
+
};
|
|
458
|
+
loadStates.set(language, "loaded");
|
|
459
|
+
return;
|
|
460
|
+
} catch (error) {
|
|
461
|
+
if (!(error instanceof RetryableLoadError)) {
|
|
462
|
+
loadStates.set(language, "failed");
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
if (attempt >= MAX_RETRIES) {
|
|
466
|
+
loadStates.set(language, "retryable");
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
await new Promise((resolve) => setTimeout(resolve, wait));
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
const pendingLoads = /* @__PURE__ */ new Map();
|
|
473
|
+
/**
|
|
474
|
+
* Like i18next's backend connector: a language with a bundle (even one only
|
|
475
|
+
* from `addResourceBundle`) is not loaded, and a failed load is not retried
|
|
476
|
+
* unless it was retryable. Resolves `undefined` when nothing is left to load.
|
|
477
|
+
*/
|
|
478
|
+
function loadLanguage(language) {
|
|
479
|
+
if (language in store) {
|
|
480
|
+
loadStates.set(language, "loaded");
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
if (loadStates.get(language) === "failed") return void 0;
|
|
484
|
+
let pending = pendingLoads.get(language);
|
|
485
|
+
if (!pending) {
|
|
486
|
+
loadStates.set(language, "pending");
|
|
487
|
+
pending = readCatalog(language).finally(() => {
|
|
488
|
+
pendingLoads.delete(language);
|
|
489
|
+
emit("loaded");
|
|
490
|
+
});
|
|
491
|
+
pendingLoads.set(language, pending);
|
|
492
|
+
}
|
|
493
|
+
return pending;
|
|
494
|
+
}
|
|
495
|
+
/** `undefined` when everything is loaded, so the caller finishes at once. */
|
|
496
|
+
function loadResources(language) {
|
|
497
|
+
if (language.toLowerCase() === "cimode") return void 0;
|
|
498
|
+
const loads = hierarchy(language).filter((code) => code !== "cimode").map(loadLanguage).filter((load) => load !== void 0);
|
|
499
|
+
return loads.length > 0 ? Promise.all(loads) : void 0;
|
|
500
|
+
}
|
|
501
|
+
/** Runs `onDone` synchronously when no catalog needs loading, as i18next does. */
|
|
502
|
+
function applyLanguage(requested, onDone) {
|
|
503
|
+
changingTo = requested;
|
|
504
|
+
emit("languageChanging", requested);
|
|
505
|
+
const candidates = requested ? [requested] : options.detector.detect();
|
|
506
|
+
const first = candidates[0];
|
|
507
|
+
const language = first !== void 0 && hasTranslations(first) ? first : bestMatch(candidates);
|
|
508
|
+
if (!currentLanguage) currentLanguage = language;
|
|
509
|
+
options.detector.cacheUserLanguage(language);
|
|
510
|
+
const done = () => {
|
|
511
|
+
if (changingTo === requested) {
|
|
512
|
+
currentLanguage = language;
|
|
513
|
+
changingTo = void 0;
|
|
514
|
+
emit("languageChanged", language);
|
|
515
|
+
}
|
|
516
|
+
onDone();
|
|
517
|
+
};
|
|
518
|
+
const loading = loadResources(language);
|
|
519
|
+
if (loading) loading.then(done);
|
|
520
|
+
else done();
|
|
521
|
+
}
|
|
522
|
+
/** i18next `resolvedLanguage`: the first language in the chain with text. */
|
|
523
|
+
function resolvedLanguage() {
|
|
524
|
+
return hierarchy(currentLanguage).find((code) => code !== "cimode" && hasTranslations(code)) ?? currentLanguage;
|
|
525
|
+
}
|
|
526
|
+
const translator = {
|
|
527
|
+
get isInitialized() {
|
|
528
|
+
return initialized;
|
|
529
|
+
},
|
|
530
|
+
get language() {
|
|
531
|
+
return currentLanguage;
|
|
532
|
+
},
|
|
533
|
+
t: ((keys, defaultValueOrOptions, maybeOptions) => {
|
|
534
|
+
const opt = toOptions(defaultValueOrOptions, maybeOptions);
|
|
535
|
+
if (keys == null) return "";
|
|
536
|
+
const list = Array.isArray(keys) ? keys : [String(keys)];
|
|
537
|
+
const split = (raw) => {
|
|
538
|
+
if (raw.indexOf(":") < 0) return {
|
|
539
|
+
namespace: "default",
|
|
540
|
+
key: raw
|
|
541
|
+
};
|
|
542
|
+
const parts = raw.split(":");
|
|
543
|
+
return {
|
|
544
|
+
namespace: parts.shift(),
|
|
545
|
+
key: parts.join(".")
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
const { key } = split(list[list.length - 1]);
|
|
549
|
+
const language = currentLanguage;
|
|
550
|
+
if (language.toLowerCase() === "cimode") return key;
|
|
551
|
+
const count = opt.count;
|
|
552
|
+
const needsPlural = count !== void 0 && typeof count !== "string";
|
|
553
|
+
const zeroLookup = needsPlural && count === 0;
|
|
554
|
+
let found;
|
|
555
|
+
for (const raw of list) {
|
|
556
|
+
if (found != null) break;
|
|
557
|
+
const { namespace, key: candidateKey } = split(raw);
|
|
558
|
+
for (const code of hierarchy(language)) {
|
|
559
|
+
if (found != null) break;
|
|
560
|
+
const finalKeys = [candidateKey];
|
|
561
|
+
if (needsPlural) {
|
|
562
|
+
finalKeys.push(candidateKey + pluralSuffix(code, count));
|
|
563
|
+
if (zeroLookup) finalKeys.push(`${candidateKey}_zero`);
|
|
564
|
+
}
|
|
565
|
+
let possibleKey;
|
|
566
|
+
while ((possibleKey = finalKeys.pop()) && found == null) found = namespace === "default" ? lookup(store[code], possibleKey) : void 0;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
const suffix = needsPlural ? pluralSuffix(language, count) : "";
|
|
570
|
+
const defaultValue = zeroLookup && opt.defaultValue_zero || opt[`defaultValue${suffix}`] || opt.defaultValue;
|
|
571
|
+
const hasDefault = Object.keys(opt).some((name) => name.startsWith("defaultValue") && opt[name] !== void 0);
|
|
572
|
+
const forObjectCheck = !found && hasDefault ? defaultValue : found;
|
|
573
|
+
if (forObjectCheck && !isPlainValue(forObjectCheck) && !["[object Function]", "[object RegExp]"].includes(Object.prototype.toString.call(forObjectCheck))) return `key '${key} (${language})' returned an object instead of string.`;
|
|
574
|
+
let result = found;
|
|
575
|
+
let usedDefault = false;
|
|
576
|
+
let usedKey = false;
|
|
577
|
+
if (result == null && hasDefault) {
|
|
578
|
+
usedDefault = true;
|
|
579
|
+
result = defaultValue;
|
|
580
|
+
}
|
|
581
|
+
if (result == null) {
|
|
582
|
+
usedKey = true;
|
|
583
|
+
result = key;
|
|
584
|
+
}
|
|
585
|
+
result = interpolate(result, opt);
|
|
586
|
+
if (usedKey || usedDefault) return options.parseMissingKeyHandler(key, usedDefault ? result : void 0);
|
|
587
|
+
return result;
|
|
588
|
+
}),
|
|
589
|
+
changeLanguage(requested) {
|
|
590
|
+
return new Promise((resolve) => {
|
|
591
|
+
applyLanguage(requested, () => resolve(translator.t));
|
|
592
|
+
});
|
|
593
|
+
},
|
|
594
|
+
dir(language) {
|
|
595
|
+
const code = language || resolvedLanguage();
|
|
596
|
+
if (!code) return "rtl";
|
|
597
|
+
try {
|
|
598
|
+
const info = new Intl.Locale(code).getTextInfo?.();
|
|
599
|
+
if (info?.direction) return info.direction;
|
|
600
|
+
} catch {}
|
|
601
|
+
if (code.toLowerCase().indexOf("-latn") > 1) return "ltr";
|
|
602
|
+
return RTL_LANGUAGES.includes(languagePart(code)) || code.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
603
|
+
},
|
|
604
|
+
on(event, listener) {
|
|
605
|
+
if (!listeners.has(event)) listeners.set(event, /* @__PURE__ */ new Set());
|
|
606
|
+
listeners.get(event).add(listener);
|
|
607
|
+
},
|
|
608
|
+
off(event, listener) {
|
|
609
|
+
if (listener) listeners.get(event)?.delete(listener);
|
|
610
|
+
else listeners.delete(event);
|
|
611
|
+
},
|
|
612
|
+
addResourceBundle(language, resources) {
|
|
613
|
+
store[language] ??= {};
|
|
614
|
+
deepExtend(store[language], JSON.parse(JSON.stringify(resources)));
|
|
615
|
+
},
|
|
616
|
+
hasLoadedNamespace() {
|
|
617
|
+
return initialized && hierarchy(currentLanguage).every((code) => loadStates.get(code) !== "pending");
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
applyLanguage(options.lng, () => {
|
|
621
|
+
initialized = true;
|
|
622
|
+
emit("initialized");
|
|
623
|
+
});
|
|
624
|
+
return translator;
|
|
625
|
+
}
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region src/i18n/lazyHttpBackend.ts
|
|
628
|
+
/**
|
|
629
|
+
* Loads catalogs from `loadPath` (`{{lng}}` and `{{ns}}` placeholders) with
|
|
630
|
+
* i18next-http-backend's rules: a network error or a 5xx is retried, a 4xx or
|
|
631
|
+
* a body that is not JSON is not.
|
|
632
|
+
*/
|
|
633
|
+
function createRemoteCatalogLoader(loadPath) {
|
|
634
|
+
return async (language) => {
|
|
635
|
+
const url = loadPath.replaceAll("{{lng}}", language).replaceAll("{{ns}}", "default");
|
|
636
|
+
let response;
|
|
637
|
+
try {
|
|
638
|
+
response = await fetch(url, {
|
|
639
|
+
mode: "cors",
|
|
640
|
+
credentials: "same-origin",
|
|
641
|
+
cache: "default"
|
|
642
|
+
});
|
|
643
|
+
} catch (error) {
|
|
644
|
+
throw new RetryableLoadError(`failed loading ${url}: ${String(error)}`);
|
|
645
|
+
}
|
|
646
|
+
if (response.status >= 500 && response.status < 600) throw new RetryableLoadError(`failed loading ${url}; status code: ${response.status}`);
|
|
647
|
+
if (!response.ok) throw new Error(`failed loading ${url}; status code: ${response.status}`);
|
|
648
|
+
return await response.json();
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
//#endregion
|
|
652
|
+
//#region src/i18n/setup.ts
|
|
653
|
+
var LANGUAGE_STORAGE_KEY = "incode:i18n:language";
|
|
654
|
+
var camelToStartCase = (text) => {
|
|
655
|
+
const result = text.replace(/([A-Z])/g, " $1");
|
|
656
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
657
|
+
};
|
|
658
|
+
var keyToStartCase = (key, defaultValue) => {
|
|
659
|
+
if (defaultValue) return defaultValue;
|
|
660
|
+
const splitKey = key.split(".");
|
|
661
|
+
const missingKey = splitKey[splitKey.length - 1];
|
|
662
|
+
return camelToStartCase(missingKey || "missing key");
|
|
663
|
+
};
|
|
664
|
+
function readNavigatorLanguage() {
|
|
665
|
+
if (typeof navigator === "undefined") return "en";
|
|
666
|
+
const languageFromBrowser = navigator.language;
|
|
667
|
+
if (!languageFromBrowser) return null;
|
|
668
|
+
if (supportedLanguages.includes(languageFromBrowser)) return languageFromBrowser;
|
|
669
|
+
return languageFromBrowser.split("-")[0];
|
|
670
|
+
}
|
|
671
|
+
function readHtmlLanguage() {
|
|
672
|
+
if (typeof document === "undefined") return null;
|
|
673
|
+
return document.documentElement?.getAttribute("lang") ?? null;
|
|
674
|
+
}
|
|
675
|
+
function createLanguageDetector(skipInitialLanguageCache) {
|
|
676
|
+
let skipNextCache = skipInitialLanguageCache;
|
|
677
|
+
return {
|
|
678
|
+
detect: () => [
|
|
679
|
+
readQueryLanguage(),
|
|
680
|
+
readStoredLanguage(),
|
|
681
|
+
readStorageLanguage(() => sessionStorage),
|
|
682
|
+
readNavigatorLanguage(),
|
|
683
|
+
readHtmlLanguage()
|
|
684
|
+
].filter((language) => !!language),
|
|
685
|
+
cacheUserLanguage(language) {
|
|
686
|
+
if (skipNextCache) {
|
|
687
|
+
skipNextCache = false;
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
if (language === "cimode") return;
|
|
691
|
+
try {
|
|
692
|
+
localStorage.setItem(LANGUAGE_STORAGE_KEY, language);
|
|
693
|
+
} catch {}
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
function applyOverrides(i18nInstance, translations) {
|
|
698
|
+
for (const [langCode, value] of Object.entries(translations)) if (value) i18nInstance.addResourceBundle(langCode, value);
|
|
699
|
+
}
|
|
700
|
+
function readStorageLanguage(getStorage) {
|
|
701
|
+
try {
|
|
702
|
+
return getStorage().getItem(LANGUAGE_STORAGE_KEY);
|
|
703
|
+
} catch {
|
|
704
|
+
return null;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
function readStoredLanguage() {
|
|
708
|
+
return readStorageLanguage(() => localStorage);
|
|
709
|
+
}
|
|
710
|
+
function readQueryLanguage() {
|
|
711
|
+
if (typeof window === "undefined") return null;
|
|
712
|
+
return new URLSearchParams(window.location.search).get("lang") || null;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* TODO(form-definitions): temporary. Lists in the console, once each, the keys
|
|
716
|
+
* the SDK asks for that i18nexus doesn't have yet (such as the new eKYC labels
|
|
717
|
+
* and error messages), so they're easy to create. Remove once they exist.
|
|
718
|
+
*/
|
|
719
|
+
function createMissingKeyReporter(getInstance) {
|
|
720
|
+
return (key) => {};
|
|
721
|
+
}
|
|
722
|
+
function createI18n(options = {}) {
|
|
723
|
+
const { lang, loadPath, skipRemoteLoad, translations } = options;
|
|
724
|
+
const reportMissingKey = createMissingKeyReporter(() => i18nInstance);
|
|
725
|
+
const queryLang = readQueryLanguage();
|
|
726
|
+
const languageDetector = createLanguageDetector(queryLang !== null);
|
|
727
|
+
const storedLang = readStoredLanguage();
|
|
728
|
+
const resolvedLoadPath = loadPath ?? void 0;
|
|
729
|
+
const remoteLoadEnabled = skipRemoteLoad !== true && resolvedLoadPath !== void 0;
|
|
730
|
+
const i18nInstance = createTranslator({
|
|
731
|
+
lng: queryLang ?? storedLang ?? lang,
|
|
732
|
+
fallbackLng: "en",
|
|
733
|
+
load: remoteLoadEnabled ? "all" : "currentOnly",
|
|
734
|
+
supportedLngs: supportedLanguages,
|
|
735
|
+
detector: languageDetector,
|
|
736
|
+
loadCatalog: remoteLoadEnabled && resolvedLoadPath !== void 0 ? createRemoteCatalogLoader(resolvedLoadPath) : loadBundledCatalog,
|
|
737
|
+
parseMissingKeyHandler: (key, defaultValue) => {
|
|
738
|
+
reportMissingKey(key);
|
|
739
|
+
return keyToStartCase(key, defaultValue);
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
if (translations) {
|
|
743
|
+
applyOverrides(i18nInstance, translations);
|
|
744
|
+
i18nInstance.on("loaded", () => {
|
|
745
|
+
applyOverrides(i18nInstance, translations);
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
return i18nInstance;
|
|
749
|
+
}
|
|
750
|
+
//#endregion
|
|
751
|
+
//#region src/i18n/instance.ts
|
|
752
|
+
var TRANSLATION_EVENTS = [
|
|
753
|
+
"languageChanged",
|
|
754
|
+
"initialized",
|
|
755
|
+
"loaded"
|
|
756
|
+
];
|
|
757
|
+
var i18nInstance = null;
|
|
758
|
+
var version = 0;
|
|
759
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
760
|
+
function notify() {
|
|
761
|
+
version += 1;
|
|
762
|
+
for (const listener of listeners) listener();
|
|
763
|
+
}
|
|
764
|
+
function bindTranslationEvents(instance) {
|
|
765
|
+
for (const event of TRANSLATION_EVENTS) instance.on(event, notify);
|
|
766
|
+
}
|
|
767
|
+
function unbindTranslationEvents(instance) {
|
|
768
|
+
for (const event of TRANSLATION_EVENTS) instance.off(event, notify);
|
|
769
|
+
}
|
|
770
|
+
function setI18nInstance(instance) {
|
|
771
|
+
if (i18nInstance === instance) return;
|
|
772
|
+
if (i18nInstance) unbindTranslationEvents(i18nInstance);
|
|
773
|
+
i18nInstance = instance;
|
|
774
|
+
bindTranslationEvents(instance);
|
|
775
|
+
notify();
|
|
776
|
+
}
|
|
777
|
+
function hasI18nInstance() {
|
|
778
|
+
return i18nInstance !== null;
|
|
779
|
+
}
|
|
780
|
+
function getI18nInstance() {
|
|
781
|
+
if (!i18nInstance) {
|
|
782
|
+
i18nInstance = createI18n();
|
|
783
|
+
bindTranslationEvents(i18nInstance);
|
|
784
|
+
}
|
|
785
|
+
return i18nInstance;
|
|
786
|
+
}
|
|
787
|
+
function getI18nVersion() {
|
|
788
|
+
return version;
|
|
789
|
+
}
|
|
790
|
+
function subscribeToI18n(listener) {
|
|
791
|
+
listeners.add(listener);
|
|
792
|
+
return () => {
|
|
793
|
+
listeners.delete(listener);
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
//#endregion
|
|
797
|
+
//#region src/shared/icons/arrowIcon.tsx
|
|
798
|
+
var ArrowIcon = ({ class: className }) => /* @__PURE__ */ u("svg", {
|
|
799
|
+
width: "13",
|
|
800
|
+
height: "14",
|
|
801
|
+
viewBox: "0 0 13 14",
|
|
802
|
+
fill: "none",
|
|
803
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
804
|
+
"aria-hidden": "true",
|
|
805
|
+
class: className,
|
|
806
|
+
children: /* @__PURE__ */ u("path", {
|
|
807
|
+
d: "M0 8.08V5.92h9.198l-4.5-4.05L6.228.34 12.6 6.28v1.422L6.228 13.66l-1.53-1.53 4.5-4.05z",
|
|
808
|
+
fill: "currentColor"
|
|
809
|
+
})
|
|
810
|
+
});
|
|
811
|
+
//#endregion
|
|
812
|
+
//#region src/i18n/useTranslation.ts
|
|
813
|
+
function useTranslation() {
|
|
814
|
+
const i18nInstance = getI18nInstance();
|
|
815
|
+
const [, forceUpdate] = d(0);
|
|
816
|
+
const [ready, setReady] = d(i18nInstance.isInitialized);
|
|
817
|
+
y(() => {
|
|
818
|
+
const handleLanguageChanged = () => {
|
|
819
|
+
forceUpdate((n) => n + 1);
|
|
820
|
+
};
|
|
821
|
+
const handleInitialized = () => {
|
|
822
|
+
setReady(true);
|
|
823
|
+
forceUpdate((n) => n + 1);
|
|
824
|
+
};
|
|
825
|
+
i18nInstance.on("languageChanged", handleLanguageChanged);
|
|
826
|
+
i18nInstance.on("initialized", handleInitialized);
|
|
827
|
+
i18nInstance.on("loaded", handleLanguageChanged);
|
|
828
|
+
if (i18nInstance.isInitialized) setReady(true);
|
|
829
|
+
return () => {
|
|
830
|
+
i18nInstance.off("languageChanged", handleLanguageChanged);
|
|
831
|
+
i18nInstance.off("initialized", handleInitialized);
|
|
832
|
+
i18nInstance.off("loaded", handleLanguageChanged);
|
|
833
|
+
};
|
|
834
|
+
}, [i18nInstance]);
|
|
835
|
+
return {
|
|
836
|
+
t: T(() => i18nInstance.t.bind(i18nInstance), [i18nInstance]),
|
|
837
|
+
ready,
|
|
838
|
+
i18n: i18nInstance
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
//#endregion
|
|
842
|
+
//#region src/i18n/Trans.tsx
|
|
843
|
+
var Trans = ({ i18nKey, boldClass = "IncodeTransBold", arrowClass = "IncodeTransArrow", components, defaultValue }) => {
|
|
844
|
+
const { t } = useTranslation();
|
|
845
|
+
const text = defaultValue ? t(i18nKey, { defaultValue }) : t(i18nKey);
|
|
846
|
+
const builtInPattern = "<strong>|<\\/strong>|<br\\s*\\/?>|<arrow\\s*\\/>";
|
|
847
|
+
const componentPattern = components ? Object.keys(components).map((name) => `<${name}>|<\\/${name}>`).join("|") : "";
|
|
848
|
+
const fullPattern = componentPattern ? `${builtInPattern}|${componentPattern}` : builtInPattern;
|
|
849
|
+
const parts = text.split(new RegExp(`(${fullPattern})`, "g"));
|
|
850
|
+
let isBold = false;
|
|
851
|
+
let activeComponent = null;
|
|
852
|
+
return /* @__PURE__ */ u(k, { children: parts.map((part, index) => {
|
|
853
|
+
if (part === "<strong>") {
|
|
854
|
+
isBold = true;
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
857
|
+
if (part === "</strong>") {
|
|
858
|
+
isBold = false;
|
|
859
|
+
return null;
|
|
860
|
+
}
|
|
861
|
+
if (/^<br\s*\/?>$/.test(part)) return /* @__PURE__ */ u("br", {}, index);
|
|
862
|
+
if (/^<arrow\s*\/>$/.test(part)) return /* @__PURE__ */ u(ArrowIcon, { class: arrowClass }, index);
|
|
863
|
+
if (components) {
|
|
864
|
+
const openMatch = part.match(/^<(\w+)>$/);
|
|
865
|
+
if (openMatch && components[openMatch[1]]) {
|
|
866
|
+
activeComponent = openMatch[1];
|
|
867
|
+
return null;
|
|
868
|
+
}
|
|
869
|
+
const closeMatch = part.match(/^<\/(\w+)>$/);
|
|
870
|
+
if (closeMatch && components[closeMatch[1]]) {
|
|
871
|
+
activeComponent = null;
|
|
872
|
+
return null;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
if (!part) return null;
|
|
876
|
+
if (activeComponent && components) return K(components[activeComponent], { key: index }, part);
|
|
877
|
+
return isBold ? /* @__PURE__ */ u("span", {
|
|
878
|
+
class: boldClass,
|
|
879
|
+
children: part
|
|
880
|
+
}, index) : /* @__PURE__ */ u(k, { children: part }, index);
|
|
881
|
+
}) });
|
|
882
|
+
};
|
|
883
|
+
//#endregion
|
|
884
|
+
//#region src/i18n/translateText.ts
|
|
885
|
+
/**
|
|
886
|
+
* Translates a served text, showing `text` when `key` has no translation.
|
|
887
|
+
*
|
|
888
|
+
* `text` goes in as `defaultValue`, which i18next returns literally. Never use
|
|
889
|
+
* the array form `t([key, text])`: it looks `text` up as a key, so a text
|
|
890
|
+
* with a `.` renders blank and one with a `:` is split as a namespace.
|
|
891
|
+
*/
|
|
892
|
+
function translateText(t, served) {
|
|
893
|
+
if (!served) return void 0;
|
|
894
|
+
return t(served.key, {
|
|
895
|
+
...served.params,
|
|
896
|
+
defaultValue: served.text
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
//#endregion
|
|
900
|
+
//#region src/i18n/fallbackTranslations.ts
|
|
901
|
+
/**
|
|
902
|
+
* Last-resort English copy for keys a screen may read before the translation
|
|
903
|
+
* bundle loads (see `useTranslationWithFallback`). One fallback per key,
|
|
904
|
+
* defined once.
|
|
905
|
+
*/
|
|
906
|
+
var I18N_LOCAL = {
|
|
907
|
+
"common.close": "Close",
|
|
908
|
+
"unsupportedBrowser.title": "Unsupported browser",
|
|
909
|
+
"unsupportedBrowser.betterExperience": "For a better experience, open this link in",
|
|
910
|
+
"unsupportedBrowser.or": "or",
|
|
911
|
+
"unsupportedBrowser.copyLink": "Copy link",
|
|
912
|
+
"unsupportedBrowser.continueAnyways": "Continue anyway",
|
|
913
|
+
"unsupportedBrowser.linkCopied": "Link copied",
|
|
914
|
+
"connectionError.title": "No internet connection",
|
|
915
|
+
"connectionError.subtitle": "Wait for the internet to return to continue the process or connect to an available network.",
|
|
916
|
+
"connectionError.refresh": "Refresh"
|
|
917
|
+
};
|
|
918
|
+
//#endregion
|
|
919
|
+
//#region src/i18n/useTranslationWithFallback.ts
|
|
920
|
+
/**
|
|
921
|
+
* `useTranslation()`, but a bare `t(key)` picks up its `I18N_LOCAL` fallback
|
|
922
|
+
* automatically. Any explicit second argument is forwarded untouched. Use
|
|
923
|
+
* this only on screens that can render before the bundle loads — see
|
|
924
|
+
* `BrowserNotSupported`.
|
|
925
|
+
*/
|
|
926
|
+
function useTranslationWithFallback() {
|
|
927
|
+
const { t, ready, i18n } = useTranslation();
|
|
928
|
+
C(subscribeToI18n, getI18nVersion);
|
|
929
|
+
return {
|
|
930
|
+
t: q((key, defaultValueOrOptions, options) => {
|
|
931
|
+
if (typeof defaultValueOrOptions === "string") return options === void 0 ? t(key, defaultValueOrOptions) : t(key, defaultValueOrOptions, options);
|
|
932
|
+
if (defaultValueOrOptions !== void 0) return t(key, defaultValueOrOptions);
|
|
933
|
+
if (typeof key !== "string") return t(key);
|
|
934
|
+
const fallback = I18N_LOCAL[key];
|
|
935
|
+
return fallback ? t(key, { defaultValue: fallback }) : t(key);
|
|
936
|
+
}, [t]),
|
|
937
|
+
ready,
|
|
938
|
+
i18n
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
//#endregion
|
|
942
|
+
export { getI18nInstance as a, createI18n as c, supportedLanguages as d, useTranslation as i, readStoredLanguage as l, translateText as n, hasI18nInstance as o, Trans as r, setI18nInstance as s, useTranslationWithFallback as t, getLanguageEmoji as u };
|