@incodetech/web 2.2.0-rc.8 → 2.3.0-rc.0
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 +398 -0
- package/dist/ae-signature/ae-signature.es.js +4 -4
- package/dist/af-ZA-DTqKc5t4.js +3041 -0
- package/dist/am-EGNy2cbo.js +3041 -0
- package/dist/antifraud/antifraud.es.js +4 -4
- package/dist/ar-AE-Cb55U6s-.js +3057 -0
- package/dist/ar-EG-C8ucZII6.js +3057 -0
- package/dist/ar-MUpu33jy.js +3057 -0
- package/dist/assets/dm-sans-latin-400-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-500-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-600-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-700-normal.woff2 +0 -0
- package/dist/assets/rethink-sans-latin-800-normal.woff2 +0 -0
- package/dist/authentication/authentication.es.js +15 -11
- package/dist/{autoFocusTitle-DB-23sv_.js → autoFocusTitle-CIbcUW_x.js} +2 -2
- package/dist/az-DlXjPSya.js +3041 -0
- package/dist/{back-horizontal-hint-CjdigFZj.js → back-horizontal-hint-UQ7Nof6k.js} +1 -1
- package/dist/{back-vertical-hint-OhaKsINF.js → back-vertical-hint-Crc8ybfk.js} +1 -1
- package/dist/base.css +917 -283
- package/dist/baseTutorial-DkL0vjUa.js +172 -0
- package/dist/bn-BuTjJr44.js +3041 -0
- package/dist/bottomSheet-DtUFrIAG.js +101 -0
- package/dist/bs-DUzGtLhU.js +3045 -0
- package/dist/ca-B6SY43GQ.js +3041 -0
- package/dist/cameraOverlay-Dn0r4NR9.js +2 -0
- package/dist/cameraOverlayHeader-CsokPtuL.js +43 -0
- package/dist/cameraView-DrTBPNWX.js +49 -0
- package/dist/captureFooter-DWCaAdIU.js +67 -0
- package/dist/ceb-DmXy5txv.js +3041 -0
- package/dist/certificate-issuance/certificate-issuance.es.js +19 -14
- package/dist/certificate-issuance/styles.css.js +1 -0
- package/dist/{checkbox-FGA-Ij-D.js → checkbox-D0wfscwg.js} +9 -8
- package/dist/{connectionError-BurQq_4R.js → connectionError-B61O7L3N.js} +4 -4
- package/dist/consent/consent.es.js +26 -33
- package/dist/consent/styles.css +4 -4
- package/dist/consent/styles.css.js +1 -0
- package/dist/countries-5e8kwG_m.js +8560 -0
- package/dist/{countrySelector-COZ7XQHp.js → countrySelector-C60Cdc5P.js} +8 -10
- package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
- package/dist/cs-CZ-Gn3ZmW27.js +3049 -0
- package/dist/cs-dsQ7umNS.js +3049 -0
- package/dist/curp-validation/curp-validation.es.js +15 -22
- package/dist/curp-validation/styles.css.js +1 -0
- package/dist/custom-fields/styles.css.js +1 -0
- package/dist/{customFields-rVMTo1Yu.js → customFields-BdnLB6L1.js} +44 -19
- package/dist/{customWatchlist-DgpXtVRf.js → customWatchlist-DzeHJAa3.js} +14 -11
- package/dist/da-DK-CFQaOERk.js +3041 -0
- package/dist/{dashboardTheme-BUDq5UYs.js → dashboardTheme-BwKtcRSO.js} +31 -7
- package/dist/{dateInputComposed-DSgV0wnb.js → dateInputComposed-BcmKKwRL.js} +5 -5
- package/dist/dateInputComposed-DPM6l_SL.js +1 -0
- package/dist/de-BqG02U9o.js +3041 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +4 -4
- package/dist/document-capture/styles.css.js +1 -0
- package/dist/{documentCapture-sZj09g0I.js → documentCapture-CoMsW_gC.js} +16 -17
- package/dist/documentCapture-DMxz9eqT.js +2 -0
- package/dist/dropdownComposed-CXwC9j18.js +1 -0
- package/dist/{dropdownComposed-CEegNzG4.js → dropdownComposed-DYdI3B4r.js} +9 -9
- package/dist/{dynamicForms-t3vepXqJ.js → dynamic-forms/dynamic-forms.es.js} +24 -19
- package/dist/dynamic-forms/styles.css +5 -0
- package/dist/dynamic-forms/styles.css.js +1 -0
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +15 -13
- package/dist/ekyb/styles.css.js +1 -0
- package/dist/{ekybModule-Dvkf5WAr.js → ekybModule-BRh9D01p.js} +17 -30
- package/dist/ekybModule-C5NPsc0F.js +2 -0
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +17 -16
- package/dist/ekyc/styles.css.js +1 -0
- package/dist/{ekycModule-C5QXVGP7.js → ekycModule-Da6Bl3jg.js} +14 -29
- package/dist/ekycModule-DwKPvgA8.js +2 -0
- package/dist/el-BP_RmMeB.js +3041 -0
- package/dist/el-GR-9I2fVd-W.js +3041 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/electronic-signature/styles.css +62 -2
- package/dist/electronic-signature/styles.css.js +1 -0
- package/dist/{electronic-signature-CyE8F7LZ.js → electronic-signature-KFF7qbid.js} +65 -18
- package/dist/email/email.es.js +9 -8
- package/dist/email/styles.css.js +1 -0
- package/dist/{emailInput-CsT8_C01.js → emailInput-B_qAEKBC.js} +4 -4
- package/dist/en-DG-poeSJZ7W.js +3041 -0
- package/dist/en-DnIfMNS1.js +3041 -0
- package/dist/errorContent-CMNfCIo_.js +58 -0
- package/dist/es-2x55EFTs.js +3041 -0
- package/dist/es-419-DgAnO5DV.js +3041 -0
- package/dist/es-ES-BSnroYMU.js +3041 -0
- package/dist/es-MX-CfztSSs4.js +3041 -0
- package/dist/et-CPoI8fYI.js +3041 -0
- package/dist/{expiredId-BQ1uPh7b.js → expiredId-DJYL_--M.js} +22 -27
- package/dist/extensibility.es.js +701 -24
- package/dist/fa-IR-CVf6F8GG.js +3041 -0
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +76 -40
- package/dist/face-match/styles.css.js +1 -0
- package/dist/{faceMatch-Rf-MMdto.js → faceMatch-CwoYbKBB.js} +7 -8
- package/dist/faceMatch-DCkrehin.js +2 -0
- package/dist/fi-FI-A4oUFztt.js +3041 -0
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/field-comparison/styles.css +12 -0
- package/dist/field-comparison/styles.css.js +1 -0
- package/dist/{fieldComparison-BnGj3nNp.js → fieldComparison-D2WI5cYb.js} +27 -11
- package/dist/fieldComparison-OwqIkMRe.js +2 -0
- package/dist/fieldLabelHint-CxjArYkQ.js +16 -0
- package/dist/{finalSuccessScreen-B9uB3bST.js → finalSuccessScreen-BtJ5o2pi.js} +13 -14
- package/dist/fiscal-qr/fiscal-qr.es.js +22 -9
- package/dist/fiscal-qr/styles.css +13 -1
- package/dist/fiscal-qr/styles.css.js +1 -0
- package/dist/{extensibility-C5XqL_A3.js → flipAnimation-Bb5FQVF-.js} +608 -1005
- package/dist/flow/flow.es.js +308 -62
- package/dist/flow/shell/styles.css +402 -0
- package/dist/flow/shell/styles.css.js +1 -0
- package/dist/flow/styles.css +582 -312
- package/dist/formField-CBwWQ7wD.js +60 -0
- package/dist/fr-CA-CI4CD8PC.js +3045 -0
- package/dist/fr-ON88Zj-c.js +3045 -0
- package/dist/{front-horizontal-hint-Bhz1rq-w.js → front-horizontal-hint-mgovnJf3.js} +1 -1
- package/dist/{front-vertical-hint-C4FC1ksx.js → front-vertical-hint-qXMVdLri.js} +1 -1
- package/dist/geolocation/geolocation.es.js +9 -9
- package/dist/geolocation/styles.css +4 -4
- package/dist/geolocation/styles.css.js +1 -0
- package/dist/government-validation/government-validation.es.js +38 -86
- package/dist/government-validation/styles.css +2 -38
- package/dist/government-validation/styles.css.js +1 -0
- package/dist/he-pbmbYdr4.js +3049 -0
- package/dist/hi-DUIfQ6FS.js +3041 -0
- package/dist/hmn-DL-aQCTc.js +3041 -0
- package/dist/{homeScreen-Bv9mUUOF.js → homeScreen-vLMuzGDq.js} +8 -7
- package/dist/hr-DfJZSVnR.js +3045 -0
- package/dist/ht-DkZi3f0t.js +3041 -0
- package/dist/hu-ClhgOpVy.js +3041 -0
- package/dist/{icons-ChHV5iHi.js → icons-eIgP34nj.js} +99 -11
- package/dist/id/id.es.js +575 -62
- package/dist/id/styles.css +114 -45
- package/dist/id/styles.css.js +1 -0
- package/dist/id-DzyWelEE.js +3035 -0
- package/dist/{id-back-of-card-C4XViC7W.js → id-back-of-card-B6EcmiCs.js} +1 -1
- package/dist/{id-back-of-card-vertical-DCz0rj8m.js → id-back-of-card-vertical-B3FXhPpj.js} +1 -1
- package/dist/{id-front-of-card-CUA1ocVF.js → id-front-of-card-V_BlLaZr.js} +1 -1
- package/dist/{id-front-of-card-vertical-Ddm_BwD3.js → id-front-of-card-vertical-CuZjL8kc.js} +1 -1
- package/dist/id-ocr/styles.css.js +1 -0
- package/dist/id-selfie-flow/id-selfie-flow.es.js +10 -9
- package/dist/id-selfie-flow/styles.css +40 -8
- package/dist/id-verification/id-verification.es.js +5 -5
- package/dist/{idOcr-Da1-2sWY.js → idOcr-C5R3RWuL.js} +13 -16
- package/dist/identity-reuse/identity-reuse.es.js +8 -113
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-DeIDDejm.js → incode-logo-BzJOZr3f.js} +1 -64
- package/dist/{incodeComponent-BtFz-bx2.js → incodeComponent-D3_BSWan.js} +192 -22
- package/dist/{incodeModule-9K8KUs61.js → incodeModule-BQgvYKyr.js} +3 -3
- package/dist/index.es.js +4 -3
- package/dist/{inputComposed-C2zTEXsp.js → inputComposed-CTZnsHLi.js} +9 -9
- package/dist/inputComposed-wy0-orhJ.js +1 -0
- package/dist/it-D_u7w6N4.js +3041 -0
- package/dist/ja-Drh4oAoU.js +3035 -0
- package/dist/ja-JP-Pdxq82Pi.js +3035 -0
- package/dist/jv-DFcKF0Jp.js +3035 -0
- package/dist/ka--2y3Ae63.js +3041 -0
- package/dist/kk-CAs7inco.js +3041 -0
- package/dist/km-BlxkLYfw.js +3035 -0
- package/dist/ko-B1XhW0dx.js +3035 -0
- package/dist/ko-KP-DO1TCCY3.js +3035 -0
- package/dist/ky-BN92RThU.js +3041 -0
- package/dist/lo-DPUo8xJT.js +3035 -0
- package/dist/lt-CYBwI4Sq.js +3049 -0
- package/dist/lv-eBlwWu05.js +3045 -0
- package/dist/{mandatoryConsent-CxShVycM.js → mandatoryConsent-D96_9XTp.js} +10 -7
- package/dist/manualCaptureButton-C9H2_SJS.js +63 -0
- package/dist/{manualCaptureButton-DzJFIEfu.js → manualCaptureButton-igyQk3Yb.js} +10 -55
- package/dist/mk-QMUTND8Y.js +3041 -0
- package/dist/mn-CCTUOA1D.js +3041 -0
- package/dist/{modal-BH2wi8Q0.js → modal-CmF_MYIK.js} +7 -6
- package/dist/{modal.hooks-DcakflQ4.js → modal.hooks-B0Wrc9s2.js} +7 -1
- package/dist/ms-BKJgaJfx.js +3035 -0
- package/dist/my-DyLbN8b0.js +3035 -0
- package/dist/nb-NO-TVHxhuqB.js +3041 -0
- package/dist/ne-gBLZraiK.js +3041 -0
- package/dist/nl-CrO6Mvej.js +3041 -0
- package/dist/{numberedStep-DqtXyT11.js → numberedStep-DYznpDKc.js} +1 -1
- package/dist/{optionAccessibleLabel-C5iZCrlq.js → optionAccessibleLabel-CqBUOBxK.js} +6 -6
- package/dist/{otpInput-CvPR3ZpP.js → otpInput-tEovwPs7.js} +8 -83
- package/dist/{passport-horizontal-hint-DzkhjC8Q.js → passport-horizontal-hint-6Ghn2EEN.js} +1 -1
- package/dist/{passport-vertical-hint-Bd0BQn2Y.js → passport-vertical-hint-UPFFpdf4.js} +1 -1
- package/dist/passwordInputComposed-DNlYgHHW.js +74 -0
- package/dist/{pdf-BUoY_2gv.js → pdf-CFubyG0B.js} +1 -1
- package/dist/{pdfViewer-TTZmPABh.js → pdfViewer-4u14PDPr.js} +4 -4
- package/dist/pdfViewer-e2o97yIv.js +2 -0
- package/dist/{manualCaptureButton-D58WsS-x.js → permissions-DowRodJj.js} +200 -105
- package/dist/phone/phone.es.js +10 -9
- package/dist/phone/styles.css +1 -1
- package/dist/phone/styles.css.js +1 -0
- package/dist/{phoneInputComposed-byyszNoS.js → phoneInputComposed-B6sv-uB2.js} +20 -8412
- package/dist/pl-Bde7cCcc.js +3049 -0
- package/dist/{processing-B2eaSGLu.js → processing-s6GfNwuL.js} +2 -2
- package/dist/pt-BR-DFr2fPNi.js +3041 -0
- package/dist/pt-DhDCeOLY.js +3041 -0
- package/dist/pt-PT-CpiPMuNf.js +3041 -0
- package/dist/qe-signature/qe-signature.es.js +4 -4
- package/dist/radioGroupComposed-CJkzLiFc.js +1 -0
- package/dist/{radioGroupComposed-DQzTWutW.js → radioGroupComposed-DmoMukus.js} +15 -71
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +34 -178
- package/dist/redirect-to-mobile/styles.css +2 -27
- package/dist/redirect-to-mobile/styles.css.js +1 -0
- package/dist/{registerIncodeElement-DW2PE_DX.js → registerIncodeElement-CbZczi4S.js} +1 -1
- package/dist/resendTimer-Cskll9rx.js +79 -0
- package/dist/{useModuleLoader-DxOEZ0vn.js → resolveApiKey-CB1_7ISm.js} +70 -222
- package/dist/{richText-CEwM8jib.js → richText-C8-Ny2SD.js} +9 -9
- package/dist/ro-B_ITJxYh.js +3045 -0
- package/dist/ru-Cg4U-rYv.js +3049 -0
- package/dist/ru-RU-fR_tbAfz.js +3049 -0
- package/dist/selfie/selfie.es.js +184 -8
- package/dist/selfie/styles.css +225 -36
- package/dist/selfie/styles.css.js +1 -0
- package/dist/signature/signature.es.js +8 -9
- package/dist/signature/styles.css.js +1 -0
- package/dist/sk-DbraxlnX.js +3049 -0
- package/dist/sl-DXgvmUsz.js +3049 -0
- package/dist/smsTabContent-Dado9q8t.js +172 -0
- package/dist/so-HI13bXme.js +3041 -0
- package/dist/{spacer-DLEDuWEx.js → spacer-ayyj5lMa.js} +10 -10
- package/dist/spinner-Z-5sEEDQ.js +88 -0
- package/dist/sr-DAb2JkvB.js +3045 -0
- package/dist/sr-Latn-DzSc6KyA.js +3045 -0
- package/dist/sr-YU-C9HskKa8.js +3045 -0
- package/dist/{statusPage-BF4qGjF3.js → statusPage-Bqz3Ci4f.js} +4 -4
- package/dist/sv-SE-B3X2fvQj.js +3041 -0
- package/dist/sw-BVL9Boua.js +3041 -0
- package/dist/{tabs-BGL1oRLb.js → tabs-B-ERCzA4.js} +2 -2
- package/dist/th-Cq87oDI8.js +3035 -0
- package/dist/th-TH-CY5gd6Bd.js +3035 -0
- package/dist/themes/dark.css +125 -0
- package/dist/themes/light.css +124 -0
- package/dist/tl-DUm9tRZ_.js +3041 -0
- package/dist/tl-PH-CNYNkY1M.js +3041 -0
- package/dist/tr-Cg3WJqb6.js +3041 -0
- package/dist/{tutorial-LQuJ4dse.js → tutorial-CHNfV-I3.js} +40 -226
- package/dist/types/certificate-issuance.d.ts +4 -4
- package/dist/types/dynamic-forms.d.ts +177 -0
- package/dist/types/extensibility.d.ts +75 -23
- package/dist/types/flow.d.ts +37 -0
- package/dist/types/government-validation.d.ts +2 -1
- package/dist/types/index.d.ts +28 -4
- package/dist/types/video-selfie.d.ts +6 -161
- package/dist/typography-ikD4-Z8S.js +53 -0
- package/dist/{uiConfig-Dqnjankd.js → uiConfig-C1jdTj-i.js} +184 -8
- package/dist/uk-C7hhE-77.js +3049 -0
- package/dist/uk-UA-DRsynQ5S.js +3049 -0
- package/dist/ur-BEX50SCe.js +3041 -0
- package/dist/useCoverMedia-VLw3OYN_.js +149 -0
- package/dist/useModuleLoader-DpcbSKBH.js +176 -0
- package/dist/uz-BYlUXaIK.js +3041 -0
- package/dist/{vendor-preact-BPXMFRom.js → vendor-preact-C0jX1Cbq.js} +68 -181
- package/dist/{verificationResult-q_zD_Pxh.js → verificationResult-B26DDXFT.js} +32 -25
- package/dist/vi-DddAM-WF.js +3035 -0
- package/dist/video-selfie/styles.css +51 -17
- package/dist/video-selfie/styles.css.js +1 -0
- package/dist/video-selfie/video-selfie.es.js +35 -23
- package/dist/watchlist/watchlist.es.js +7 -7
- package/dist/watchlist-for-business/styles.css.js +1 -0
- package/dist/{watchlistForBusiness-C_zqdY4P.js → watchlistForBusiness-o4F6Czxp.js} +28 -16
- package/dist/workflow/styles.css +1073 -356
- package/dist/workflow/workflow.es.js +17 -15
- package/dist/zh-CN-B8y9prPe.js +3035 -0
- package/dist/zh-HANT-ChrXbHBA.js +3035 -0
- package/dist/zh-TW-DrkMIR_e.js +3035 -0
- package/dist/zh-aG_wPYUs.js +3035 -0
- package/package.json +32 -22
- package/dist/bottomSheet-BWEUBq8m.js +0 -38
- package/dist/dateInputComposed-BGC37jC7.js +0 -1
- package/dist/documentCapture-CO9kIxru.js +0 -2
- package/dist/dropdownComposed-Bf4EcKFw.js +0 -1
- package/dist/ekybModule-uN0ComAn.js +0 -2
- package/dist/ekycModule-B7KRJ7l3.js +0 -2
- package/dist/faceMatch-DjD2hgBp.js +0 -2
- package/dist/fieldComparison-DFH4hUM_.js +0 -2
- package/dist/inputComposed-kKtrvJU5.js +0 -1
- package/dist/pdfViewer-C1B-07Wu.js +0 -2
- package/dist/requiredLabelHint-Dx0WS2cR.js +0 -17
- package/dist/snackbar-eBOj46AK.js +0 -16
- package/dist/spinner-CJCOHUKx.js +0 -95
- package/dist/successIcon-DS8BLsgy.js +0 -30
- package/dist/types/dynamic-forms/styles.d.ts +0 -1
- /package/dist/{aligndevicelottie-CfoZ5Uus.js → aligndevicelottie-B12hbVhG.js} +0 -0
- /package/dist/{back-tutorial-BHyRHyET.js → back-tutorial-XdmQ0Wml.js} +0 -0
- /package/dist/{backdevicelottie-yKkczgFy.js → backdevicelottie-m_DOD8xE.js} +0 -0
- /package/dist/{blurdevicelottie-8BbophdM.js → blurdevicelottie-DQo_hTMD.js} +0 -0
- /package/dist/{browser-ponyfill-CBjGwwPW.js → browser-ponyfill-ZkeBm4ji.js} +0 -0
- /package/dist/{defineProperty-BbpBna-2.js → defineProperty-BojnCa44.js} +0 -0
- /package/dist/{flip-animation-CvN8FLNc.js → flip-animation-VicedlT5.js} +0 -0
- /package/dist/{frontdevicelottie-CFcahVLk.js → frontdevicelottie-CyIerlMv.js} +0 -0
- /package/dist/{glaredevicelottie-Cnvah0kz.js → glaredevicelottie-QM2C6Ivp.js} +0 -0
- /package/dist/{id-laser-h-BaUHzX-d.js → id-laser-h-B0-iXcvl.js} +0 -0
- /package/dist/{id-laser-v-Dv9yEYJE.js → id-laser-v-Bqh6vimi.js} +0 -0
- /package/dist/{id-tutorial-BOOsXlAJ.js → id-tutorial-IhmAzrIF.js} +0 -0
- /package/dist/{lottie_light-Bv56F2Ae.js → lottie_light-CzZ3CHBk.js} +0 -0
- /package/dist/{passport-tutorial-CeSup6m9.js → passport-tutorial-61vlloJS.js} +0 -0
- /package/dist/{selfieTutorial-CYa8bq6B.js → selfieTutorial-BRQ2QNxQ.js} +0 -0
|
@@ -1,12 +1,31 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
3
|
-
import { a as getStandaloneSetupPolicy, n as preloadDashboardTheme } from "./dashboardTheme-
|
|
4
|
-
import "./incodeComponent-
|
|
5
|
-
import {
|
|
6
|
-
import { initializeWasmUtil,
|
|
1
|
+
import { c as setI18nInstance, l as createI18n, s as hasI18nInstance } from "./uiConfig-C1jdTj-i.js";
|
|
2
|
+
import { v as u } from "./vendor-preact-C0jX1Cbq.js";
|
|
3
|
+
import { a as getStandaloneSetupPolicy, n as preloadDashboardTheme } from "./dashboardTheme-BwKtcRSO.js";
|
|
4
|
+
import "./incodeComponent-D3_BSWan.js";
|
|
5
|
+
import { x as Button } from "./icons-eIgP34nj.js";
|
|
6
|
+
import { initializeWasmUtil, resolveWasmConfigForPipelines, setWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
|
|
7
7
|
import { isDesktopOrEmulated } from "@incodetech/core/device";
|
|
8
|
-
import { createOrchestratedFlowManager, getFlow
|
|
8
|
+
import { createOrchestratedFlowManager, getFlow } from "@incodetech/core/flow";
|
|
9
9
|
import { getFinishStatus, initializeSession } from "@incodetech/core/session";
|
|
10
|
+
//#region src/shared/selfLoading/resolveSessionLanguage.ts
|
|
11
|
+
function normalizeSessionLanguage(language) {
|
|
12
|
+
const prefix = language?.toLowerCase().split("-")[0];
|
|
13
|
+
if (prefix === "es") return "es-ES";
|
|
14
|
+
if (prefix === "pt") return "pt-BR";
|
|
15
|
+
return "en-US";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolve the locale sent while creating a self-loading session.
|
|
19
|
+
*
|
|
20
|
+
* A language selected in the SDK Settings UI takes precedence over the host's
|
|
21
|
+
* configured default. Otherwise the configured language wins, followed by the
|
|
22
|
+
* active i18n language (from setup or browser detection). The selected value
|
|
23
|
+
* is collapsed to the three locales accepted by `/omni/start`.
|
|
24
|
+
*/
|
|
25
|
+
function resolveSessionLanguage(configuredLanguage, activeLanguage, storedLanguage) {
|
|
26
|
+
return normalizeSessionLanguage(storedLanguage ? activeLanguage : configuredLanguage ?? activeLanguage);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
10
29
|
//#region src/shared/device/redirectDeviceClassification.ts
|
|
11
30
|
function isDesktopOrEmulated$1() {
|
|
12
31
|
return isDesktopOrEmulated();
|
|
@@ -14,7 +33,7 @@ function isDesktopOrEmulated$1() {
|
|
|
14
33
|
//#endregion
|
|
15
34
|
//#region src/modules/flow/flowInit.ts
|
|
16
35
|
var lazyIdModule = () => import("./id/id.es.js").then((m) => m.Id);
|
|
17
|
-
var loadLazyHomeScreen = () => import("./homeScreen-
|
|
36
|
+
var loadLazyHomeScreen = () => import("./homeScreen-vLMuzGDq.js").then((m) => m.HomeScreen);
|
|
18
37
|
var homeScreenPreloadPromise;
|
|
19
38
|
/**
|
|
20
39
|
* Headless flow keys: backend-only steps with no UI. `<incode-flow>` renders
|
|
@@ -78,31 +97,31 @@ var LAZY_UI_MODULES = {
|
|
|
78
97
|
ID_CAPTURE: lazyIdModule,
|
|
79
98
|
TUTORIAL_ID: lazyIdModule,
|
|
80
99
|
SECOND_ID: lazyIdModule,
|
|
81
|
-
FACE_MATCH: () => import("./faceMatch-
|
|
100
|
+
FACE_MATCH: () => import("./faceMatch-DCkrehin.js").then((m) => m.FaceMatch),
|
|
82
101
|
CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((m) => m.CurpValidation),
|
|
83
102
|
GOVT_VALIDATION_PROVISIONING: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
|
|
84
103
|
INE_VALIDATION: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
|
|
85
104
|
GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((m) => m.Geolocation),
|
|
86
|
-
EXTERNAL_VERIFICATION: () => import("./ekycModule-
|
|
87
|
-
EKYB: () => import("./ekybModule-
|
|
88
|
-
DOCUMENT_CAPTURE: () => import("./documentCapture-
|
|
89
|
-
ADDRESS: () => import("./documentCapture-
|
|
105
|
+
EXTERNAL_VERIFICATION: () => import("./ekycModule-DwKPvgA8.js").then((m) => m.EkycModule),
|
|
106
|
+
EKYB: () => import("./ekybModule-C5NPsc0F.js").then((m) => m.EkybModule),
|
|
107
|
+
DOCUMENT_CAPTURE: () => import("./documentCapture-DMxz9eqT.js").then((m) => m.DocumentCapture),
|
|
108
|
+
ADDRESS: () => import("./documentCapture-DMxz9eqT.js").then((m) => m.DocumentCapture),
|
|
90
109
|
COMBINED_CONSENT: () => import("./consent/consent.es.js").then((m) => m.Consent),
|
|
91
|
-
MANDATORY_CONSENT: () => import("./mandatoryConsent-
|
|
92
|
-
ML_CONSENT: () => import("./mandatoryConsent-
|
|
110
|
+
MANDATORY_CONSENT: () => import("./mandatoryConsent-D96_9XTp.js").then((m) => m.MandatoryConsent),
|
|
111
|
+
ML_CONSENT: () => import("./mandatoryConsent-D96_9XTp.js").then((m) => m.MandatoryConsent),
|
|
93
112
|
SIGNATURE: () => import("./signature/signature.es.js").then((m) => m.Signature),
|
|
94
|
-
ID_OCR: () => import("./idOcr-
|
|
113
|
+
ID_OCR: () => import("./idOcr-C5R3RWuL.js").then((m) => m.IdOcr),
|
|
95
114
|
ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((m) => m.Antifraud),
|
|
96
|
-
CUSTOM_FIELDS: () => import("./customFields-
|
|
115
|
+
CUSTOM_FIELDS: () => import("./customFields-BdnLB6L1.js").then((m) => m.CustomFields),
|
|
97
116
|
WATCHLIST: () => import("./watchlist/watchlist.es.js").then((m) => m.Watchlist),
|
|
98
|
-
WATCHLIST_BUSINESS: () => import("./watchlistForBusiness-
|
|
99
|
-
INCODE_WATCHLIST: () => import("./customWatchlist-
|
|
117
|
+
WATCHLIST_BUSINESS: () => import("./watchlistForBusiness-o4F6Czxp.js").then((m) => m.WatchlistForBusiness),
|
|
118
|
+
INCODE_WATCHLIST: () => import("./customWatchlist-DzeHJAa3.js").then((m) => m.CustomWatchlist),
|
|
100
119
|
AE_SIGNATURE: () => import("./ae-signature/ae-signature.es.js").then((m) => m.AeSignature),
|
|
101
120
|
QE_SIGNATURE: () => import("./qe-signature/qe-signature.es.js").then((m) => m.QeSignature),
|
|
102
121
|
CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((m) => m.CrossDocumentDataMatch),
|
|
103
|
-
DYNAMIC_FORMS: () => import("./
|
|
122
|
+
DYNAMIC_FORMS: () => import("./dynamic-forms/dynamic-forms.es.js").then((m) => m.DynamicForms),
|
|
104
123
|
CERTIFICATE_ISSUANCE: () => import("./certificate-issuance/certificate-issuance.es.js").then((m) => m.CertificateIssuance),
|
|
105
|
-
FIELD_COMPARISON: () => import("./fieldComparison-
|
|
124
|
+
FIELD_COMPARISON: () => import("./fieldComparison-OwqIkMRe.js").then((m) => m.FieldComparison),
|
|
106
125
|
FISCAL_QR: () => import("./fiscal-qr/fiscal-qr.es.js").then((m) => m.FiscalQr),
|
|
107
126
|
VIDEO_ONBOARDING: () => import("./video-selfie/video-selfie.es.js").then((m) => m.VideoSelfie)
|
|
108
127
|
};
|
|
@@ -118,9 +137,8 @@ function preloadHomeScreen() {
|
|
|
118
137
|
}
|
|
119
138
|
var redirectToMobilePreloadPromise;
|
|
120
139
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* orchestrator injects REDIRECT_TO_MOBILE as the first step.
|
|
140
|
+
* Prefetches redirect UI and core together when the normalized flow selects
|
|
141
|
+
* redirect first. Device classification alone does not require QR.
|
|
124
142
|
*/
|
|
125
143
|
function preloadRedirectToMobile() {
|
|
126
144
|
if (redirectToMobilePreloadPromise) return;
|
|
@@ -135,6 +153,7 @@ function preloadRedirectToMobile() {
|
|
|
135
153
|
});
|
|
136
154
|
}
|
|
137
155
|
function createFlowManager(options = {}) {
|
|
156
|
+
if (options.enableHome === true) preloadHomeScreen();
|
|
138
157
|
const scopedLazyModules = {};
|
|
139
158
|
const isDesktop = options.isDesktop ?? isDesktopOrEmulated$1();
|
|
140
159
|
const { enableHome, ...flowFetchOptions } = options;
|
|
@@ -144,12 +163,17 @@ function createFlowManager(options = {}) {
|
|
|
144
163
|
};
|
|
145
164
|
const manager = createOrchestratedFlowManager({
|
|
146
165
|
enableHome,
|
|
166
|
+
deferActivation: true,
|
|
147
167
|
getFlow: async (signal) => {
|
|
148
168
|
const flow = await getFlow(signal, {
|
|
149
169
|
...flowFetchOptions,
|
|
150
|
-
isDesktop
|
|
170
|
+
isDesktop,
|
|
171
|
+
deferActivation: true
|
|
151
172
|
});
|
|
173
|
+
if (flow.flowModules[0]?.key === "REDIRECT_TO_MOBILE") preloadRedirectToMobile();
|
|
152
174
|
const scopedRegistry = buildLazyCoreRegistryForFlow(flow.flowModules ?? []);
|
|
175
|
+
const consentLoader = getLazyCoreMachineLoader("MANDATORY_CONSENT");
|
|
176
|
+
if (consentLoader && !scopedRegistry.MANDATORY_CONSENT) scopedRegistry.MANDATORY_CONSENT = consentLoader;
|
|
153
177
|
for (const key of Object.keys(scopedLazyModules)) delete scopedLazyModules[key];
|
|
154
178
|
Object.assign(scopedLazyModules, scopedRegistry);
|
|
155
179
|
return flow;
|
|
@@ -172,17 +196,21 @@ function createFlowManager(options = {}) {
|
|
|
172
196
|
async function setupSDK(options) {
|
|
173
197
|
const sessionOptions = { token: options.token };
|
|
174
198
|
if (options.preloadFlow !== void 0) sessionOptions.preloadFlow = options.preloadFlow;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
setI18nInstance(createI18n(options.lang ? { lang: options.lang } : void 0));
|
|
199
|
+
if (options.awaitFingerprint !== void 0) sessionOptions.awaitFingerprint = options.awaitFingerprint;
|
|
200
|
+
const sessionReady = initializeSession(sessionOptions);
|
|
201
|
+
if (!hasI18nInstance()) setI18nInstance(createI18n(options.lang ? { lang: options.lang } : void 0));
|
|
202
|
+
await sessionReady;
|
|
178
203
|
}
|
|
179
204
|
async function initializeFlowManager(options) {
|
|
180
205
|
const { token, lang, flowManager } = options;
|
|
181
|
-
|
|
206
|
+
const sessionReady = setupSDK({
|
|
182
207
|
token,
|
|
183
|
-
lang
|
|
208
|
+
lang,
|
|
209
|
+
preloadFlow: true,
|
|
210
|
+
awaitFingerprint: false
|
|
184
211
|
});
|
|
185
212
|
flowManager.load();
|
|
213
|
+
await sessionReady;
|
|
186
214
|
}
|
|
187
215
|
async function fetchTheme(token) {
|
|
188
216
|
try {
|
|
@@ -201,23 +229,17 @@ async function fetchTheme(token) {
|
|
|
201
229
|
return {};
|
|
202
230
|
}
|
|
203
231
|
}
|
|
204
|
-
function warmupWasmIfNeeded(
|
|
205
|
-
if (
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
};
|
|
216
|
-
setWasmConfig(configToStore);
|
|
217
|
-
warmupWasm(resolved).then(() => initializeWasmUtil(configToStore)).then(() => upgradeToWasmHttpClient(configToStore)).catch((error) => {
|
|
218
|
-
console.error("WASM warmup failed:", error);
|
|
219
|
-
});
|
|
220
|
-
}
|
|
232
|
+
async function warmupWasmIfNeeded(pipelines, wasmConfig) {
|
|
233
|
+
if (pipelines.length === 0) return;
|
|
234
|
+
const resolved = resolveWasmConfigForPipelines(pipelines, wasmConfig);
|
|
235
|
+
const configToStore = {
|
|
236
|
+
...resolved,
|
|
237
|
+
pipelines: resolved.pipelines ? [...resolved.pipelines] : void 0
|
|
238
|
+
};
|
|
239
|
+
setWasmConfig(configToStore);
|
|
240
|
+
await warmupWasm(resolved);
|
|
241
|
+
await initializeWasmUtil(configToStore);
|
|
242
|
+
await upgradeToWasmHttpClient(configToStore);
|
|
221
243
|
}
|
|
222
244
|
function preloadFirstModule(managerState) {
|
|
223
245
|
const firstStep = managerState.currentStep;
|
|
@@ -288,178 +310,4 @@ async function resolveApiKey(config) {
|
|
|
288
310
|
throw new Error("Self-loading mode requires apiKey or clientId");
|
|
289
311
|
}
|
|
290
312
|
//#endregion
|
|
291
|
-
|
|
292
|
-
var HeadlessWorkflowModule = () => null;
|
|
293
|
-
var lazyHeadlessWorkflowModule = () => Promise.resolve(HeadlessWorkflowModule);
|
|
294
|
-
var HEADLESS_WORKFLOW_MODULE_KEYS = new Set(["IDENTITY_SEARCH"]);
|
|
295
|
-
//#endregion
|
|
296
|
-
//#region src/modules/flow/useModuleLoader.ts
|
|
297
|
-
function getLoadErrorMessage(error, fallbackMessage) {
|
|
298
|
-
return error instanceof Error ? error.message : fallbackMessage;
|
|
299
|
-
}
|
|
300
|
-
var loadedComponents = /* @__PURE__ */ new WeakMap();
|
|
301
|
-
var inflightLoaders = /* @__PURE__ */ new WeakMap();
|
|
302
|
-
function getLoaderKey(loader) {
|
|
303
|
-
return loader;
|
|
304
|
-
}
|
|
305
|
-
function getCachedComponent(loader) {
|
|
306
|
-
if (!loader) return void 0;
|
|
307
|
-
return loadedComponents.get(getLoaderKey(loader));
|
|
308
|
-
}
|
|
309
|
-
function loadComponent(loader) {
|
|
310
|
-
const key = getLoaderKey(loader);
|
|
311
|
-
const cached = loadedComponents.get(key);
|
|
312
|
-
if (cached) return Promise.resolve(cached);
|
|
313
|
-
const inflight = inflightLoaders.get(key);
|
|
314
|
-
if (inflight) return inflight;
|
|
315
|
-
const promise = loader().then((Component) => {
|
|
316
|
-
loadedComponents.set(key, Component);
|
|
317
|
-
inflightLoaders.delete(key);
|
|
318
|
-
return Component;
|
|
319
|
-
}).catch((error) => {
|
|
320
|
-
inflightLoaders.delete(key);
|
|
321
|
-
throw error;
|
|
322
|
-
});
|
|
323
|
-
inflightLoaders.set(key, promise);
|
|
324
|
-
return promise;
|
|
325
|
-
}
|
|
326
|
-
function computeInitialState(loader) {
|
|
327
|
-
if (!loader) return { status: "idle" };
|
|
328
|
-
const cached = getCachedComponent(loader);
|
|
329
|
-
if (cached) return {
|
|
330
|
-
status: "loaded",
|
|
331
|
-
Component: cached
|
|
332
|
-
};
|
|
333
|
-
return { status: "loading" };
|
|
334
|
-
}
|
|
335
|
-
function resolveModuleLoader(moduleKey, modules, headlessModuleKeys) {
|
|
336
|
-
if (!moduleKey) return void 0;
|
|
337
|
-
return modules[moduleKey] ?? (headlessModuleKeys?.has(moduleKey) ? lazyHeadlessWorkflowModule : void 0);
|
|
338
|
-
}
|
|
339
|
-
function useLazyComponentLoader(options) {
|
|
340
|
-
const { loader, onLoading, onLoaded, onError } = options;
|
|
341
|
-
const [state, setState] = d(() => computeInitialState(loader));
|
|
342
|
-
const prevLoaderRef = A(loader);
|
|
343
|
-
const onLoadingRef = A(onLoading);
|
|
344
|
-
const onLoadedRef = A(onLoaded);
|
|
345
|
-
const onErrorRef = A(onError);
|
|
346
|
-
y(() => {
|
|
347
|
-
onLoadingRef.current = onLoading;
|
|
348
|
-
onLoadedRef.current = onLoaded;
|
|
349
|
-
onErrorRef.current = onError;
|
|
350
|
-
}, [
|
|
351
|
-
onLoading,
|
|
352
|
-
onLoaded,
|
|
353
|
-
onError
|
|
354
|
-
]);
|
|
355
|
-
if (prevLoaderRef.current !== loader) {
|
|
356
|
-
prevLoaderRef.current = loader;
|
|
357
|
-
setState(computeInitialState(loader));
|
|
358
|
-
}
|
|
359
|
-
y(() => {
|
|
360
|
-
if (!loader) return;
|
|
361
|
-
if (getCachedComponent(loader)) {
|
|
362
|
-
onLoadedRef.current?.();
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
onLoadingRef.current?.();
|
|
366
|
-
let cancelled = false;
|
|
367
|
-
loadComponent(loader).then((Component) => {
|
|
368
|
-
if (!cancelled) {
|
|
369
|
-
setState({
|
|
370
|
-
status: "loaded",
|
|
371
|
-
Component
|
|
372
|
-
});
|
|
373
|
-
onLoadedRef.current?.();
|
|
374
|
-
}
|
|
375
|
-
}).catch((error) => {
|
|
376
|
-
if (!cancelled) {
|
|
377
|
-
const errorMessage = getLoadErrorMessage(error, "Failed to load component");
|
|
378
|
-
setState({
|
|
379
|
-
status: "error",
|
|
380
|
-
error: errorMessage
|
|
381
|
-
});
|
|
382
|
-
onErrorRef.current?.(errorMessage);
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
return () => {
|
|
386
|
-
cancelled = true;
|
|
387
|
-
};
|
|
388
|
-
}, [loader]);
|
|
389
|
-
return state;
|
|
390
|
-
}
|
|
391
|
-
function useModuleLoader(options) {
|
|
392
|
-
const { moduleKey, modules, headlessModuleKeys, onModuleLoading, onModuleLoaded, onError } = options;
|
|
393
|
-
const [unsupportedModuleKey, setUnsupportedModuleKey] = d(void 0);
|
|
394
|
-
const loader = resolveModuleLoader(moduleKey, modules, headlessModuleKeys);
|
|
395
|
-
const state = useLazyComponentLoader({
|
|
396
|
-
loader,
|
|
397
|
-
onLoading: moduleKey ? () => onModuleLoading?.(moduleKey) : void 0,
|
|
398
|
-
onLoaded: moduleKey ? () => onModuleLoaded?.(moduleKey) : void 0,
|
|
399
|
-
onError: moduleKey ? (errorMessage) => onError?.(`Failed to load ${moduleKey}: ${errorMessage}`) : void 0
|
|
400
|
-
});
|
|
401
|
-
y(() => {
|
|
402
|
-
if (!moduleKey) {
|
|
403
|
-
setUnsupportedModuleKey(void 0);
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (!loader) setUnsupportedModuleKey(moduleKey);
|
|
407
|
-
else setUnsupportedModuleKey(void 0);
|
|
408
|
-
}, [loader, moduleKey]);
|
|
409
|
-
if (!moduleKey) return { status: "idle" };
|
|
410
|
-
if (unsupportedModuleKey) return {
|
|
411
|
-
status: "unsupported",
|
|
412
|
-
moduleKey: unsupportedModuleKey
|
|
413
|
-
};
|
|
414
|
-
if (state.status === "idle" || state.status === "loading") return {
|
|
415
|
-
status: "loading",
|
|
416
|
-
moduleKey
|
|
417
|
-
};
|
|
418
|
-
if (state.status === "error") return {
|
|
419
|
-
status: "error",
|
|
420
|
-
moduleKey,
|
|
421
|
-
error: state.error
|
|
422
|
-
};
|
|
423
|
-
return {
|
|
424
|
-
status: "loaded",
|
|
425
|
-
moduleKey,
|
|
426
|
-
Component: state.Component
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
function useModulePreloader(options) {
|
|
430
|
-
const { moduleKey, modules } = options;
|
|
431
|
-
const loader = moduleKey ? modules[moduleKey] : void 0;
|
|
432
|
-
const state = useLazyComponentLoader({ loader });
|
|
433
|
-
return loader != null && state.status === "loaded";
|
|
434
|
-
}
|
|
435
|
-
function schedulePrefetch(run) {
|
|
436
|
-
if (typeof requestIdleCallback !== "undefined") requestIdleCallback(() => {
|
|
437
|
-
run();
|
|
438
|
-
});
|
|
439
|
-
else setTimeout(run, 0);
|
|
440
|
-
}
|
|
441
|
-
function usePrefetchNextModule(steps, currentStepIndex, modules, currentModuleLoaded) {
|
|
442
|
-
const prefetchedRef = A(/* @__PURE__ */ new Set());
|
|
443
|
-
y(() => {
|
|
444
|
-
if (!currentModuleLoaded) return;
|
|
445
|
-
if (currentStepIndex < steps.length - 1) {
|
|
446
|
-
const nextStep = steps[currentStepIndex + 1];
|
|
447
|
-
if (nextStep && !prefetchedRef.current.has(nextStep)) {
|
|
448
|
-
prefetchedRef.current.add(nextStep);
|
|
449
|
-
const loader = modules[nextStep];
|
|
450
|
-
if (loader) schedulePrefetch(() => {
|
|
451
|
-
loader().catch(() => {
|
|
452
|
-
prefetchedRef.current.delete(nextStep);
|
|
453
|
-
});
|
|
454
|
-
});
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}, [
|
|
458
|
-
steps,
|
|
459
|
-
currentStepIndex,
|
|
460
|
-
modules,
|
|
461
|
-
currentModuleLoaded
|
|
462
|
-
]);
|
|
463
|
-
}
|
|
464
|
-
//#endregion
|
|
465
|
-
export { warmupWasmIfNeeded as _, resolveApiKey as a, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, setupSDK as g, preloadRedirectToMobile as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadHomeScreen as m, useModulePreloader as n, extractIncodeStatus as o, preloadFirstModule as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, isDesktopOrEmulated$1 as v };
|
|
313
|
+
export { LAZY_UI_MODULES as a, initializeFlowManager as c, setupSDK as d, warmupWasmIfNeeded as f, HEADLESS_FLOW_MODULE_KEYS as i, preloadFirstModule as l, resolveSessionLanguage as m, extractIncodeStatus as n, createFlowManager as o, isDesktopOrEmulated$1 as p, UnsupportedModule as r, fetchTheme as s, resolveApiKey as t, preloadHomeScreen as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as purify } from "./spacer-
|
|
3
|
-
import { t as _defineProperty } from "./defineProperty-
|
|
1
|
+
import { v as u } from "./vendor-preact-C0jX1Cbq.js";
|
|
2
|
+
import { u as purify } from "./spacer-ayyj5lMa.js";
|
|
3
|
+
import { t as _defineProperty } from "./defineProperty-BojnCa44.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/marked@17.0.5/node_modules/marked/lib/marked.esm.js
|
|
5
5
|
var _Class;
|
|
6
6
|
/**
|
|
@@ -1520,8 +1520,9 @@ x.lex;
|
|
|
1520
1520
|
function normalizeAnchorSpacing(content) {
|
|
1521
1521
|
return content.replace(/([^\s>])(<a\b)/gu, "$1\xA0$2").replace(/(<\/a>)([\p{L}\p{N}])/gu, "$1\xA0$2");
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function decorateHtml(content) {
|
|
1524
1524
|
const doc = new DOMParser().parseFromString(content, "text/html");
|
|
1525
|
+
for (const element of Array.from(doc.body.querySelectorAll("*"))) for (const attribute of Array.from(element.attributes)) if (attribute.name.startsWith("on")) element.removeAttribute(attribute.name);
|
|
1525
1526
|
const anchors = Array.from(doc.querySelectorAll("a"));
|
|
1526
1527
|
for (const anchor of anchors) {
|
|
1527
1528
|
anchor.setAttribute("target", "_blank");
|
|
@@ -1532,16 +1533,15 @@ function decorateAnchors(content) {
|
|
|
1532
1533
|
function sanitizeHtml(content, disallowedTags) {
|
|
1533
1534
|
const normalizedContent = normalizeAnchorSpacing(content);
|
|
1534
1535
|
const parsed = g.parse(normalizedContent);
|
|
1535
|
-
return
|
|
1536
|
+
return decorateHtml(purify.sanitize(parsed, { FORBID_TAGS: disallowedTags }));
|
|
1536
1537
|
}
|
|
1537
1538
|
function RichText({ content, class: className, disallowedTags = [] }) {
|
|
1538
1539
|
if (!content) return null;
|
|
1539
1540
|
return /* @__PURE__ */ u("div", {
|
|
1540
1541
|
class: className,
|
|
1541
|
-
children: /* @__PURE__ */ u(
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
trim: false
|
|
1542
|
+
children: /* @__PURE__ */ u("div", {
|
|
1543
|
+
class: "IncodeRichTextMarkup",
|
|
1544
|
+
dangerouslySetInnerHTML: { __html: sanitizeHtml(content, disallowedTags) }
|
|
1545
1545
|
})
|
|
1546
1546
|
});
|
|
1547
1547
|
}
|