@incodetech/web 2.4.1-agentic → 2.4.1-agentic.2

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.
Files changed (299) hide show
  1. package/THIRD_PARTY_NOTICES.txt +1 -4
  2. package/dist/{GeolocationPermissionDenied-CUt-uebQ.js → GeolocationPermissionDenied-ClGp0a23.js} +13 -8
  3. package/dist/ae-signature/ae-signature.es.js +4 -4
  4. package/dist/{af-ZA-BWKMRc6V.js → af-ZA-BKpmmWDe.js} +75 -865
  5. package/dist/{ageVerification-CMIp0I--.js → ageVerification-CtuJDuRV.js} +11 -8
  6. package/dist/{am-DPyjIvQV.js → am-CW_ro5Ws.js} +75 -865
  7. package/dist/antifraud/antifraud.es.js +5 -4
  8. package/dist/{applyStudioConfig-DxtP9221.js → applyStudioConfig-C6-Ak0q6.js} +5 -4
  9. package/dist/{ar-AE-CxCvbyoW.js → ar-AE-D9h8UMbm.js} +75 -865
  10. package/dist/{ar-10SoqF1i.js → ar-B5ToweVl.js} +75 -865
  11. package/dist/{ar-EG-B1hHB55j.js → ar-EG-DQqE9B26.js} +75 -865
  12. package/dist/assertClassBrand-DJr5K93j.js +17 -0
  13. package/dist/asset-Ctwd_20H.js +355 -0
  14. package/dist/authentication/authentication.es.js +7 -5
  15. package/dist/{autoFocusTitle-BxsSeMSB.js → autoFocusTitle-CzaCWWW5.js} +2 -2
  16. package/dist/{az-cmuBNn_5.js → az-DAZq-CQj.js} +75 -865
  17. package/dist/{back-horizontal-hint-Dl2C4J4u.js → back-horizontal-hint-qzSaNkEU.js} +1 -1
  18. package/dist/{back-vertical-hint-CM4_HjWk.js → back-vertical-hint-DkYLOege.js} +1 -1
  19. package/dist/base.css +1 -1
  20. package/dist/{baseTutorial-BGU2Gcly.js → baseTutorial-CF6WiVYt.js} +10 -7
  21. package/dist/{bn-CuGYlngZ.js → bn-DRTyq2Y9.js} +75 -865
  22. package/dist/{bottomSheet-x20yd6eP.js → bottomSheet-DylE2INk.js} +3 -3
  23. package/dist/{bs-vwpJzaHm.js → bs-B8q0B86-.js} +75 -865
  24. package/dist/{ca-DXZs5vtr.js → ca-DvsHXRB-.js} +75 -865
  25. package/dist/cameraOverlay-DNf0PEF4.js +2 -0
  26. package/dist/{cameraOverlayHeader-BxutAKy-.js → cameraOverlayHeader-CuVGnyXI.js} +9 -8
  27. package/dist/{cameraView-DVzaEGW8.js → cameraView-D9ZxLKtA.js} +3 -3
  28. package/dist/capture-0jMDSGCE.js +762 -0
  29. package/dist/{tutorial-BKPHj5To.js → capture-BlGlXoTx.js} +13 -36
  30. package/dist/capture-DKBA5j5A.js +3 -0
  31. package/dist/capture-D_Dwrj1F.js +2 -0
  32. package/dist/captureButtonIcon-A9kn2E_m.js +1 -0
  33. package/dist/captureFocusContext-9789qOe3.js +729 -0
  34. package/dist/captureFooter-B6WUFQCV.js +47 -0
  35. package/dist/{ceb-CmhS_VOs.js → ceb-pvlomXHV.js} +75 -865
  36. package/dist/certificate-issuance/certificate-issuance.es.js +23 -13
  37. package/dist/{check-icon-BWTjhSuA.js → check-icon-BdHltEK6.js} +1 -1
  38. package/dist/{checkbox-BC26Qbxh.js → checkbox-BwUQ0Rs9.js} +4 -4
  39. package/dist/chooser-CmG71-lh.js +1589 -0
  40. package/dist/connectionError-DexRpKWs.js +90 -0
  41. package/dist/consent/consent.es.js +16 -12
  42. package/dist/{countryFlag-DXSVHiby.js → countryFlag-CQMfCnE9.js} +1 -1
  43. package/dist/{countrySelector-0PDDFsZF.js → countrySelector-C0OEKMqL.js} +4 -4
  44. package/dist/cross-document-data-match/cross-document-data-match.es.js +5 -4
  45. package/dist/{cs-CZ-Dg5O-Vom.js → cs-CZ-GgvnJLMj.js} +75 -865
  46. package/dist/{cs-CoJlE7De.js → cs-DB5PLEdt.js} +75 -865
  47. package/dist/curp-validation/curp-validation.es.js +34 -19
  48. package/dist/curp-validation/styles.css +1 -1
  49. package/dist/curp-validation/styles.css.js +1 -1
  50. package/dist/{customFields-COYGTuuK.js → customFields-DQgRumW0.js} +17 -11
  51. package/dist/{customWatchlist-B0wY6Rwb.js → customWatchlist-BbC0fA-6.js} +8 -6
  52. package/dist/{da-DK-C_JAndM-.js → da-DK-ZhpcfE_F.js} +75 -865
  53. package/dist/{dashboardTheme-COBidrbH.js → dashboardTheme-DtXsx9IK.js} +1 -1
  54. package/dist/{dateInputComposed-QkmLGLHg.js → dateInputComposed-1IcnucPq.js} +5 -5
  55. package/dist/dateInputComposed-BFlCk-sg.js +1 -0
  56. package/dist/{de-11hHLedu.js → de-DEBjzaow.js} +75 -865
  57. package/dist/{denied-Btt81vUD.js → denied-CwdVWAUw.js} +12 -9
  58. package/dist/devWarn-CW20j1Qd.js +9 -0
  59. package/dist/{deviceWallet-BeTpokSL.js → deviceWallet-CMjguFJO.js} +4 -4
  60. package/dist/{digitalIdRedirect-BnljwZV3.js → digitalIdRedirect-MNty16-5.js} +4 -4
  61. package/dist/{digitalIdUpload-DNhqqMHT.js → digitalIdUpload-CUzTaoaI.js} +39 -15
  62. package/dist/document-capture/document-capture.es.js +1 -1
  63. package/dist/document-capture/styles.css +1 -1
  64. package/dist/document-capture/styles.css.js +1 -1
  65. package/dist/documentCapture-CnHv9nyT.js +2 -0
  66. package/dist/{documentCapture-uAKPK1U-.js → documentCapture-Cs2zEfJD.js} +94 -32
  67. package/dist/dropdownComposed-C9sLQE6i.js +1 -0
  68. package/dist/{dropdownComposed-D_RQd0Z9.js → dropdownComposed-x3ewHxbT.js} +4 -4
  69. package/dist/dynamic-forms/dynamic-forms.es.js +20 -15
  70. package/dist/ekyb/ekyb.es.js +1 -1
  71. package/dist/ekybModule-B5IEiSyi.js +2 -0
  72. package/dist/{ekybModule-Bsqag_MS.js → ekybModule-C5hEBLMs.js} +27 -23
  73. package/dist/ekyc/ekyc.es.js +1 -1
  74. package/dist/ekycModule-B7OFnP3H.js +2 -0
  75. package/dist/{ekycModule-WlhVn8AO.js → ekycModule-TVKk0qdS.js} +26 -20
  76. package/dist/{el-CRGmVrep.js → el-Dplr_D5N.js} +75 -865
  77. package/dist/{el-GR-CjtJiRTo.js → el-GR-IZ4reOR7.js} +75 -865
  78. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  79. package/dist/{electronic-signature-Cm2BEiQu.js → electronic-signature-BMda_cf3.js} +49 -34
  80. package/dist/email/email.es.js +15 -11
  81. package/dist/{emailInput-JmK2JIFS.js → emailInput-BI8gWC0D.js} +4 -4
  82. package/dist/{en-DG-Cruu6Woh.js → en-DG-C6tsWvHi.js} +75 -865
  83. package/dist/{en-CSjoG3e4.js → en-Db1L_u7B.js} +75 -865
  84. package/dist/{errorContent-zY4jb6uY.js → errorContent-pPAgyy2i.js} +10 -7
  85. package/dist/es-419-DxKrJq7W.js +5 -0
  86. package/dist/{es-C_LAY-Yu.js → es-C5unKsaF.js} +75 -865
  87. package/dist/{es-ES-D7O0P5Mg.js → es-ES-sHbsufzT.js} +75 -865
  88. package/dist/{es-MX-DVzFaANh.js → es-MX-Cd_DCR0A.js} +75 -865
  89. package/dist/{et-DdSwjU5d.js → et-BoGq2cx8.js} +76 -866
  90. package/dist/{expiredId-DpbWqSzB.js → expiredId-DWjw94rT.js} +12 -8
  91. package/dist/extensibility.es.js +85 -41
  92. package/dist/{fa-IR-CdK8XLkS.js → fa-IR-DuUxGXrf.js} +75 -865
  93. package/dist/face-match/face-match.es.js +1 -1
  94. package/dist/faceMatch-B2aMz3X2.js +2 -0
  95. package/dist/{faceMatch-B0IzR9_u.js → faceMatch-DV7NxYu_.js} +15 -10
  96. package/dist/{fi-FI-CYlEPu44.js → fi-FI-DMOBNTjA.js} +75 -865
  97. package/dist/field-comparison/field-comparison.es.js +1 -1
  98. package/dist/fieldComparison-BY2XXsp3.js +2 -0
  99. package/dist/{fieldComparison-OwGIeOM5.js → fieldComparison-CFLU1h6n.js} +15 -11
  100. package/dist/{fieldLabelHint-gdoE5nLQ.js → fieldLabelHint-CjrLxBaj.js} +3 -3
  101. package/dist/{finalSuccessScreen-BM9oeJDH.js → finalSuccessScreen-C50L96j9.js} +20 -16
  102. package/dist/fiscal-qr/fiscal-qr.es.js +24 -18
  103. package/dist/flipAnimation-8x-qdtF_.js +33 -0
  104. package/dist/flipCapturedCardEligibility-DLr9F2g2.js +210 -0
  105. package/dist/flow/flow.es.js +183 -167
  106. package/dist/flow/shell/styles.css +1 -1
  107. package/dist/flow/shell/styles.css.js +1 -1
  108. package/dist/flow/styles.css +1 -1
  109. package/dist/{formField-C3MNhFKI.js → formField-CfQKYeGF.js} +3 -3
  110. package/dist/{fr-CA-DD_s9NuV.js → fr-CA-DZ8jlsp3.js} +75 -865
  111. package/dist/{fr-C4cP8ZNE.js → fr-DSR-AP0e.js} +75 -865
  112. package/dist/{front-horizontal-hint-Dol0Lpc6.js → front-horizontal-hint-DOphQZg2.js} +1 -1
  113. package/dist/{front-vertical-hint-CAhAzw92.js → front-vertical-hint-S6PcS9_m.js} +1 -1
  114. package/dist/geolocation/geolocation.es.js +15 -10
  115. package/dist/government-validation/government-validation.es.js +7 -6
  116. package/dist/{he-D3fvMZAl.js → he-N5dfJeyd.js} +75 -865
  117. package/dist/{hi-DLf6_opn.js → hi-JR6K9zbd.js} +75 -865
  118. package/dist/{hmn-DzoODzbN.js → hmn-j2YA7FxW.js} +75 -865
  119. package/dist/{homeScreen-D1Xd93In.js → homeScreen-C3pPw52y.js} +17 -11
  120. package/dist/{incodeComponent-C1Bz5Qou.js → hooks-BFP0WaJM.js} +14 -308
  121. package/dist/{hr-C-jP0DrB.js → hr-8cOdwB0t.js} +75 -865
  122. package/dist/{ht-CVt9koJf.js → ht-DDNL4C__.js} +75 -865
  123. package/dist/{hu-9fSzIeAd.js → hu-CynQQUFQ.js} +75 -865
  124. package/dist/i18n-Dp014ljG.js +942 -0
  125. package/dist/{icons-BdiCuWFP.js → icons-c-hFaG4L.js} +129 -32
  126. package/dist/id/id.es.js +101 -197
  127. package/dist/id/styles.css +1 -1
  128. package/dist/id/styles.css.js +1 -1
  129. package/dist/{id-back-of-card-CHFxXTEq.js → id-back-of-card-Bk6ZQUE9.js} +1 -1
  130. package/dist/{id-back-of-card-vertical-CUBdKGbw.js → id-back-of-card-vertical-BZo00s50.js} +1 -1
  131. package/dist/{id-front-of-card-DplNJr13.js → id-front-of-card-BJ96se7u.js} +1 -1
  132. package/dist/{id-front-of-card-vertical-D1duHEsV.js → id-front-of-card-vertical-DSfJB0lX.js} +1 -1
  133. package/dist/{id-Dgi5uGHK.js → id-o_Yg0n8W.js} +75 -865
  134. package/dist/id-selfie-flow/id-selfie-flow.es.js +12 -11
  135. package/dist/id-selfie-flow/styles.css +1 -1
  136. package/dist/id-verification/id-verification.es.js +6 -5
  137. package/dist/idFlipTransition-DXdtXYza.js +158 -0
  138. package/dist/{idOcr-sknZwQNF.js → idOcr-CjqfkRJ7.js} +18 -14
  139. package/dist/identity-reuse/identity-reuse.es.js +28 -17
  140. package/dist/incodeComponent-DtKh-UUm.js +237 -0
  141. package/dist/{incodeModule-DJToJb00.js → incodeModule-DCHXAeYU.js} +5 -5
  142. package/dist/index.es.js +4 -3
  143. package/dist/{inputComposed-BuE0iZlw.js → inputComposed-CmVsaHOa.js} +4 -4
  144. package/dist/inputComposed-DvGrso7g.js +1 -0
  145. package/dist/{it-CEFstYFG.js → it-BXevrtHn.js} +75 -865
  146. package/dist/{ja-BNdVd9B6.js → ja-DiTXnTx-.js} +75 -865
  147. package/dist/{ja-JP-B5TPMV1q.js → ja-JP-D1IRWR-p.js} +75 -865
  148. package/dist/{jv-CMxkkXUk.js → jv-Us70GzGp.js} +75 -865
  149. package/dist/{ka-C70bUmEK.js → ka-BSsWQ4yU.js} +75 -865
  150. package/dist/{kk-C_55EmWt.js → kk-D5R6r4H7.js} +75 -865
  151. package/dist/{km-D4Ig0NhN.js → km-CCCb2Rnt.js} +79 -869
  152. package/dist/{ko-KP-BwBB8ahu.js → ko-KP-JF4khv1Y.js} +75 -865
  153. package/dist/{ko-DfUa3dzQ.js → ko-kQioCg2w.js} +75 -865
  154. package/dist/{ky-CnJichOm.js → ky-CLOemVjC.js} +75 -865
  155. package/dist/kyb-checks/kyb-checks.es.js +2 -0
  156. package/dist/kyb-checks/styles.css +2 -0
  157. package/dist/kyb-checks/styles.css.js +1 -0
  158. package/dist/kybChecksModule-C6Y9Hxpr.js +329 -0
  159. package/dist/kybChecksModule-r3MIpFhS.js +2 -0
  160. package/dist/{lo-ww1DXVAP.js → lo-tzHUt1CQ.js} +75 -865
  161. package/dist/{lt-IJ8qpluI.js → lt-B2ZI-Cgu.js} +76 -866
  162. package/dist/{lv-DMfsmqyK.js → lv-BJnxtSYw.js} +76 -866
  163. package/dist/{mandatoryConsent-Bp8sQoiu.js → mandatoryConsent-BiQuEZRu.js} +20 -14
  164. package/dist/{manualCaptureButton-Cd-FY05-.js → manualCaptureButton-BRSmPTeR.js} +8 -7
  165. package/dist/{manualCaptureButton-BXOTp2PS.js → manualCaptureButton-Dw0MMSkc.js} +17 -13
  166. package/dist/{mk-ByafmFak.js → mk-Cj7Iw2Q4.js} +75 -865
  167. package/dist/{mn-DjO9p3xN.js → mn-CA_rNxtz.js} +75 -865
  168. package/dist/{ms-3Vf1QpHl.js → ms-BydA1Zjz.js} +75 -865
  169. package/dist/{my-C5hpE5P1.js → my-gFKufKaG.js} +75 -865
  170. package/dist/{nb-NO-DGCWCOul.js → nb-NO-CDsGQbOZ.js} +75 -865
  171. package/dist/{ne-CpJxcVhV.js → ne-Cyfi0vFI.js} +75 -865
  172. package/dist/{nl-R2RykJHB.js → nl-e1gbmAFO.js} +75 -865
  173. package/dist/{numberedStep-CqgNwc_a.js → numberedStep-CeN77hnQ.js} +1 -1
  174. package/dist/{optionAccessibleLabel-BQl8HooZ.js → optionAccessibleLabel-BTUieMxH.js} +6 -6
  175. package/dist/{otpInput-B_iLvmIn.js → otpInput-D3L3QhnR.js} +24 -17
  176. package/dist/{page-utEpSa9Z.js → page-U6jZ7BBI.js} +69 -23
  177. package/dist/{pageUiConfig-rOL18JSI.js → pageUiConfig-Qf6ItVv9.js} +6 -14
  178. package/dist/{passport-horizontal-hint-BfTXA2LB.js → passport-horizontal-hint-Ddsh6fUS.js} +1 -1
  179. package/dist/{passport-vertical-hint-C7dzd2ks.js → passport-vertical-hint-Dukxq6-T.js} +1 -1
  180. package/dist/{passwordInputComposed-NtiseM85.js → passwordInputComposed-CW_1DcB8.js} +5 -5
  181. package/dist/{pdf-BnPw8ZaT.js → pdf-Bd5QplFS.js} +2 -17
  182. package/dist/{pdfViewer-DNMZsDFD.js → pdfViewer-BrqSEtbr.js} +11 -14
  183. package/dist/pdfViewer-rDnnHzmw.js +2 -0
  184. package/dist/{permissions-CCEc9lKM.js → permissions-3LgeouU9.js} +36 -22
  185. package/dist/phone/phone.es.js +16 -12
  186. package/dist/{phoneInputComposed-ByiK_6Hu.js → phoneInputComposed-DlJMTavK.js} +6 -6
  187. package/dist/{pl-B1LgnPj1.js → pl-BSMcCWS-.js} +75 -865
  188. package/dist/preloadableLazy-C8_OYaTC.js +37 -0
  189. package/dist/{processing-Ci_Kl-Rh.js → processing-B5EH7yNg.js} +2 -2
  190. package/dist/{progressBar-Caj-Vu1e.js → progressBar-CSpS29pV.js} +2 -2
  191. package/dist/{pt-CPVeH0hD.js → pt-BNFC2quK.js} +75 -865
  192. package/dist/{pt-BR-DSJDHb-K.js → pt-BR-bH8DC2gH.js} +75 -865
  193. package/dist/{pt-PT-BWJTVPZY.js → pt-PT-B8PXmgwU.js} +75 -865
  194. package/dist/qe-signature/qe-signature.es.js +4 -4
  195. package/dist/{radioGroupComposed-CocqpoKe.js → radioGroupComposed-CW8ElYSR.js} +4 -4
  196. package/dist/radioGroupComposed-flIYNffL.js +1 -0
  197. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +19 -21
  198. package/dist/redirect-to-mobile/styles.css +1 -1
  199. package/dist/redirect-to-mobile/styles.css.js +1 -1
  200. package/dist/{registerIncodeElement-Dtw9dM3O.js → registerIncodeElement-oiLvm6xq.js} +1 -1
  201. package/dist/{reload-icon-BR1POqkD.js → reload-icon-FD2e9Wet.js} +1 -1
  202. package/dist/{resendTimer-ODOCcKyh.js → resendTimer-D1H3gwkI.js} +2 -2
  203. package/dist/richText-sUdTiRDE.js +1761 -0
  204. package/dist/{ro-8gGEWeHO.js → ro-DnN8QNYa.js} +75 -865
  205. package/dist/{ru-C4EVku5S.js → ru-DAwUFXHq.js} +75 -865
  206. package/dist/{ru-RU-Dr0NOGjg.js → ru-RU-Coxt0VCU.js} +75 -865
  207. package/dist/{sanitizeSvg-ilJ8VQmH.js → sanitizeSvg-OdNh1mqY.js} +1 -1
  208. package/dist/selfie/selfie.es.js +30 -14
  209. package/dist/selfie/styles.css +1 -1
  210. package/dist/selfie/styles.css.js +1 -1
  211. package/dist/signature/signature.es.js +18 -13
  212. package/dist/{sk-BSTzMa__.js → sk-AB8sSlNw.js} +77 -867
  213. package/dist/{sl-_HvO-HVX.js → sl-6Dfzfi7s.js} +75 -865
  214. package/dist/{smsTabContent-CWBrtP4u.js → smsTabContent-CBEKgzFv.js} +32 -23
  215. package/dist/{so-pyCaqonl.js → so-X5BdrDvV.js} +75 -865
  216. package/dist/spacer-Jaru_3sb.js +82 -0
  217. package/dist/spinner-51btbot0.js +407 -0
  218. package/dist/{sr-Bpxtt0kk.js → sr-JHjMcbGs.js} +75 -865
  219. package/dist/{sr-Latn-BjueCJSI.js → sr-Latn-DgT7eTG2.js} +80 -870
  220. package/dist/sr-YU-BBhB_G63.js +5 -0
  221. package/dist/{sv-SE-sv5v6ZWe.js → sv-SE-CvX8mC8T.js} +75 -865
  222. package/dist/{sw-BseJSmdR.js → sw-CN0TdnY4.js} +75 -865
  223. package/dist/{th-C2G8Ur12.js → th-BmFntKib.js} +75 -865
  224. package/dist/{th-TH-D0WNW-3l.js → th-TH-CWr4z3JK.js} +75 -865
  225. package/dist/themes/dark.css +1 -1
  226. package/dist/themes/light.css +1 -1
  227. package/dist/{tl-PH-CwafDrED.js → tl-PH-BRIbtBRN.js} +75 -865
  228. package/dist/{tl-CBOmxz5r.js → tl-rzkk5P_n.js} +75 -865
  229. package/dist/{tr-C4iH8UJx.js → tr-DKuVBwqW.js} +76 -866
  230. package/dist/{transitionSpinner-DbrWrpRU.js → transitionSpinner-Di0XBAix.js} +5 -4
  231. package/dist/tutorial-C9psDR2i.js +28 -0
  232. package/dist/types/extensibility.d.ts +6 -1
  233. package/dist/types/index.d.ts +4 -0
  234. package/dist/types/kyb-checks.d.ts +209 -0
  235. package/dist/{typography-BF9d8wEc.js → typography-CiGhKJGx.js} +2 -2
  236. package/dist/uiConfig-BJAuZQWc.js +77 -0
  237. package/dist/{uk-BGYlvKb_.js → uk-CXjqq4lX.js} +75 -865
  238. package/dist/{uk-UA-CbxzkCL_.js → uk-UA-BIE9WByU.js} +75 -865
  239. package/dist/{ur-BQgtsAfv.js → ur-vNGesC3r.js} +75 -865
  240. package/dist/{useCameraPreview-BmkAmzAs.js → useCameraPreview-Bd7AYE9h.js} +1 -1
  241. package/dist/useCaptureHelpButton-Dj-jESrS.js +43 -0
  242. package/dist/{useIsDarkTheme-COJZngNK.js → useIsDarkTheme-Bu9CvKxW.js} +1 -1
  243. package/dist/{useModuleLoader-CceEKjsh.js → useModuleLoader-BBCNkJmc.js} +2 -2
  244. package/dist/{uz-DqOg1Fdv.js → uz-Gmw1XRgv.js} +75 -865
  245. package/dist/{vendor-preact-C0jX1Cbq.js → vendor-preact-DHGqBGMH.js} +19 -1
  246. package/dist/{verificationResult-m99Ragq6.js → verificationResult-Clxdxm_s.js} +18 -10
  247. package/dist/{vi-COxdKkHn.js → vi-DTxxRUw0.js} +75 -865
  248. package/dist/video-selfie/video-selfie.es.js +50 -33
  249. package/dist/watchlist/watchlist.es.js +8 -6
  250. package/dist/{watchlistForBusiness-C2zxbavl.js → watchlistForBusiness-CpFp2EYX.js} +16 -11
  251. package/dist/{withEndScreenTexts-BwNU-8-X.js → withEndScreenTexts-DhN_T_kp.js} +204 -41
  252. package/dist/workflow/styles.css +1 -1
  253. package/dist/workflow/workflow.es.js +19 -15
  254. package/dist/{zh-CN-DfvYQGdE.js → zh-CN-aB48G_R1.js} +76 -866
  255. package/dist/{zh-CPQoDPxf.js → zh-DjtyfO4e.js} +75 -865
  256. package/dist/{zh-HANT-B4LzHH2y.js → zh-HANT-8p8SH8C3.js} +75 -865
  257. package/dist/{zh-TW-DtvvhBYL.js → zh-TW-CCsz9gKq.js} +75 -865
  258. package/package.json +22 -10
  259. package/dist/browser-ponyfill-CHlXHPpU.js +0 -441
  260. package/dist/cameraOverlay-Be1PFI8S.js +0 -2
  261. package/dist/dateInputComposed-CONPVayx.js +0 -1
  262. package/dist/devWarn-Cr7MglXv.js +0 -2628
  263. package/dist/documentCapture-DGCraCO3.js +0 -2
  264. package/dist/dropdownComposed-DyZXfcTf.js +0 -1
  265. package/dist/ekybModule-D-czIusz.js +0 -2
  266. package/dist/ekycModule-CkBRa6h2.js +0 -2
  267. package/dist/es-419-CTB15v-l.js +0 -3231
  268. package/dist/esm-BTUEHyry.js +0 -430
  269. package/dist/faceMatch-CRbIcwK2.js +0 -2
  270. package/dist/fieldComparison-DKQNK0-r.js +0 -2
  271. package/dist/flipAnimation-D-5tokFC.js +0 -3275
  272. package/dist/inputComposed-5mLbxAZJ.js +0 -1
  273. package/dist/pdfViewer-7FzYV8l3.js +0 -2
  274. package/dist/radioGroupComposed-DlQ-fNrF.js +0 -1
  275. package/dist/richText-CRWB2afV.js +0 -1549
  276. package/dist/spacer-CwyNauIk.js +0 -733
  277. package/dist/spinner-DEZJxLSc.js +0 -88
  278. package/dist/sr-YU-xCb5qxap.js +0 -3235
  279. package/dist/useCaptureHelpButton-D40hYyD7.js +0 -88
  280. /package/dist/{aligndevicelottie-BHWuptBk.js → aligndevicelottie-BEKzL4SB.js} +0 -0
  281. /package/dist/{back-tutorial-BYZr11eV.js → back-tutorial-B9W63fa-.js} +0 -0
  282. /package/dist/{backdevicelottie-JflQKxT_.js → backdevicelottie-DsN8QBV3.js} +0 -0
  283. /package/dist/{blurdevicelottie-CWuMQEHL.js → blurdevicelottie-DkV7Kwo4.js} +0 -0
  284. /package/dist/{countryDefinitions-6FOOLcB2.js → countryDefinitions-RBVGM1D_.js} +0 -0
  285. /package/dist/{defineProperty-CUC2zCmh.js → defineProperty-E9wRIIo9.js} +0 -0
  286. /package/dist/{flip-animation-BqTKEBcW.js → flip-animation-DJVnWWL5.js} +0 -0
  287. /package/dist/{frontdevicelottie-BWD-NCfG.js → frontdevicelottie-DiW1Wmya.js} +0 -0
  288. /package/dist/{glaredevicelottie-Cjy50jGc.js → glaredevicelottie-CK-fnX_s.js} +0 -0
  289. /package/dist/{helpButtonConfig-BFragC_J.js → helpButtonConfig-CjbrBQaV.js} +0 -0
  290. /package/dist/{id-laser-h-By7lMim8.js → id-laser-h-6Am_cjM8.js} +0 -0
  291. /package/dist/{id-laser-v-BCPAN2x5.js → id-laser-v-DXoF3flH.js} +0 -0
  292. /package/dist/{id-tutorial-B9cUQuf0.js → id-tutorial-DkKH3eTE.js} +0 -0
  293. /package/dist/{lottie_light-DywVSPMT.js → lottie_light-B819EhaL.js} +0 -0
  294. /package/dist/{passport-tutorial-TSZzEGqb.js → passport-tutorial-D3Fpk-Tj.js} +0 -0
  295. /package/dist/{pdf.worker.min-D7ZNTVBZ.js → pdf.worker.min-DzBNMoKS.js} +0 -0
  296. /package/dist/{policyUrls-Bpacx_pp.js → policyUrls-Benduf-R.js} +0 -0
  297. /package/dist/{purify.es-DZazHwBu.js → purify.es-CSPoFViI.js} +0 -0
  298. /package/dist/{realtimeFeedbackConfig-DeZksjlR.js → realtimeFeedbackConfig-tBX94SOm.js} +0 -0
  299. /package/dist/{selfieTutorial-CLJAEuXG.js → selfieTutorial-DnsRD1Z9.js} +0 -0
@@ -1,1549 +0,0 @@
1
- import { v as u } from "./vendor-preact-C0jX1Cbq.js";
2
- import { t as purify } from "./purify.es-DZazHwBu.js";
3
- import { t as _defineProperty } from "./defineProperty-CUC2zCmh.js";
4
- //#region ../../node_modules/.pnpm/marked@17.0.5/node_modules/marked/lib/marked.esm.js
5
- var _Class;
6
- /**
7
- * marked v17.0.5 - a markdown parser
8
- * Copyright (c) 2018-2026, MarkedJS. (MIT License)
9
- * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
10
- * https://github.com/markedjs/marked
11
- */
12
- /**
13
- * DO NOT EDIT THIS FILE
14
- * The code in this file is generated from files in ./src/
15
- */
16
- function M() {
17
- return {
18
- async: !1,
19
- breaks: !1,
20
- extensions: null,
21
- gfm: !0,
22
- hooks: null,
23
- pedantic: !1,
24
- renderer: null,
25
- silent: !1,
26
- tokenizer: null,
27
- walkTokens: null
28
- };
29
- }
30
- var T = M();
31
- function G(u) {
32
- T = u;
33
- }
34
- var _ = { exec: () => null };
35
- function k(u, e = "") {
36
- let t = typeof u == "string" ? u : u.source, n = {
37
- replace: (r, i) => {
38
- let s = typeof i == "string" ? i : i.source;
39
- return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
40
- },
41
- getRegex: () => new RegExp(t, e)
42
- };
43
- return n;
44
- }
45
- var be = (() => {
46
- try {
47
- return true;
48
- } catch {
49
- return !1;
50
- }
51
- })(), m = {
52
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
53
- outputLinkReplace: /\\([\[\]])/g,
54
- indentCodeCompensation: /^(\s+)(?:```)/,
55
- beginningSpace: /^\s+/,
56
- endingHash: /#$/,
57
- startingSpaceChar: /^ /,
58
- endingSpaceChar: / $/,
59
- nonSpaceChar: /[^ ]/,
60
- newLineCharGlobal: /\n/g,
61
- tabCharGlobal: /\t/g,
62
- multipleSpaceGlobal: /\s+/g,
63
- blankLine: /^[ \t]*$/,
64
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
65
- blockquoteStart: /^ {0,3}>/,
66
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
67
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
68
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
69
- listIsTask: /^\[[ xX]\] +\S/,
70
- listReplaceTask: /^\[[ xX]\] +/,
71
- listTaskCheckbox: /\[[ xX]\]/,
72
- anyLine: /\n.*\n/,
73
- hrefBrackets: /^<(.*)>$/,
74
- tableDelimiter: /[:|]/,
75
- tableAlignChars: /^\||\| *$/g,
76
- tableRowBlankLine: /\n[ \t]*$/,
77
- tableAlignRight: /^ *-+: *$/,
78
- tableAlignCenter: /^ *:-+: *$/,
79
- tableAlignLeft: /^ *:-+ *$/,
80
- startATag: /^<a /i,
81
- endATag: /^<\/a>/i,
82
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
83
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
84
- startAngleBracket: /^</,
85
- endAngleBracket: />$/,
86
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
87
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
88
- escapeTest: /[&<>"']/,
89
- escapeReplace: /[&<>"']/g,
90
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
91
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
92
- caret: /(^|[^\[])\^/g,
93
- percentDecode: /%25/g,
94
- findPipe: /\|/g,
95
- splitPipe: / \|/,
96
- slashPipe: /\\\|/g,
97
- carriageReturn: /\r\n|\r/g,
98
- spaceLine: /^ +$/gm,
99
- notSpaceStart: /^\S*/,
100
- endingNewline: /\n$/,
101
- listItemRegex: (u) => new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),
102
- nextBulletRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
103
- hrRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
104
- fencesBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:\`\`\`|~~~)`),
105
- headingBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}#`),
106
- htmlBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}<(?:[a-z].*>|!--)`, "i"),
107
- blockquoteBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}>`)
108
- }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ye = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _e = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), K = {
109
- blockquote: k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(),
110
- code: Te,
111
- def: Se,
112
- fences: Oe,
113
- heading: we,
114
- hr: C,
115
- html: _e,
116
- lheading: ie,
117
- list: $e,
118
- newline: Re,
119
- paragraph: oe,
120
- table: _,
121
- text: Pe
122
- }, ne = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Me = {
123
- ...K,
124
- lheading: ye,
125
- table: ne,
126
- paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex()
127
- }, ze = {
128
- ...K,
129
- html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
130
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
131
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
132
- fences: _,
133
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
134
- paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
135
- ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
136
- }, Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, H = /[\s\p{P}\p{S}]/u, W = /[^\s\p{P}\p{S}]/u, Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex(), le = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, De = /(?:[^\s\p{P}\p{S}]|~)/u, qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ve = k(ue, "u").replace(/punct/g, z).getRegex(), He = k(ue, "u").replace(/punct/g, le).getRegex(), pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex(), Ne = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), Fe = k("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ue = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), Ke = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), We = k(U).replace("(?:-->|$)", "-->").getRegex(), Xe = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex(), he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex(), re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = {
137
- _backpedal: _,
138
- anyPunctuation: Ue,
139
- autolink: Ke,
140
- blockSkip: qe,
141
- br: ae,
142
- code: Ie,
143
- del: _,
144
- delLDelim: _,
145
- delRDelim: _,
146
- emStrongLDelim: ve,
147
- emStrongRDelimAst: Ze,
148
- emStrongRDelimUnd: Ne,
149
- escape: Ee,
150
- link: Je,
151
- nolink: he,
152
- punctuation: Ce,
153
- reflink: ce,
154
- reflinkSearch: Ve,
155
- tag: Xe,
156
- text: Ae,
157
- url: _
158
- }, Ye = {
159
- ...X,
160
- link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(),
161
- reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex()
162
- }, N = {
163
- ...X,
164
- emStrongRDelimAst: Ge,
165
- emStrongLDelim: He,
166
- delLDelim: Qe,
167
- delRDelim: Fe,
168
- url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
169
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
170
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
171
- text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex()
172
- }, et = {
173
- ...N,
174
- br: k(ae).replace("{2,}", "*").getRegex(),
175
- text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
176
- }, B = {
177
- normal: K,
178
- gfm: Me,
179
- pedantic: ze
180
- }, E = {
181
- normal: X,
182
- gfm: N,
183
- breaks: et,
184
- pedantic: Ye
185
- };
186
- var tt = {
187
- "&": "&amp;",
188
- "<": "&lt;",
189
- ">": "&gt;",
190
- "\"": "&quot;",
191
- "'": "&#39;"
192
- }, ke = (u) => tt[u];
193
- function O(u, e) {
194
- if (e) {
195
- if (m.escapeTest.test(u)) return u.replace(m.escapeReplace, ke);
196
- } else if (m.escapeTestNoEncode.test(u)) return u.replace(m.escapeReplaceNoEncode, ke);
197
- return u;
198
- }
199
- function J(u) {
200
- try {
201
- u = encodeURI(u).replace(m.percentDecode, "%");
202
- } catch {
203
- return null;
204
- }
205
- return u;
206
- }
207
- function V(u, e) {
208
- let n = u.replace(m.findPipe, (i, s, a) => {
209
- let o = !1, l = s;
210
- for (; --l >= 0 && a[l] === "\\";) o = !o;
211
- return o ? "|" : " |";
212
- }).split(m.splitPipe), r = 0;
213
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
214
- else for (; n.length < e;) n.push("");
215
- for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
216
- return n;
217
- }
218
- function I(u, e, t) {
219
- let n = u.length;
220
- if (n === 0) return "";
221
- let r = 0;
222
- for (; r < n;) {
223
- let i = u.charAt(n - r - 1);
224
- if (i === e && !t) r++;
225
- else if (i !== e && t) r++;
226
- else break;
227
- }
228
- return u.slice(0, n - r);
229
- }
230
- function de(u, e) {
231
- if (u.indexOf(e[1]) === -1) return -1;
232
- let t = 0;
233
- for (let n = 0; n < u.length; n++) if (u[n] === "\\") n++;
234
- else if (u[n] === e[0]) t++;
235
- else if (u[n] === e[1] && (t--, t < 0)) return n;
236
- return t > 0 ? -2 : -1;
237
- }
238
- function ge(u, e = 0) {
239
- let t = e, n = "";
240
- for (let r of u) if (r === " ") {
241
- let i = 4 - t % 4;
242
- n += " ".repeat(i), t += i;
243
- } else n += r, t++;
244
- return n;
245
- }
246
- function fe(u, e, t, n, r) {
247
- let i = e.href, s = e.title || null, a = u[1].replace(r.other.outputLinkReplace, "$1");
248
- n.state.inLink = !0;
249
- let o = {
250
- type: u[0].charAt(0) === "!" ? "image" : "link",
251
- raw: t,
252
- href: i,
253
- title: s,
254
- text: a,
255
- tokens: n.inlineTokens(a)
256
- };
257
- return n.state.inLink = !1, o;
258
- }
259
- function nt(u, e, t) {
260
- let n = u.match(t.other.indentCodeCompensation);
261
- if (n === null) return e;
262
- let r = n[1];
263
- return e.split(`
264
- `).map((i) => {
265
- let s = i.match(t.other.beginningSpace);
266
- if (s === null) return i;
267
- let [a] = s;
268
- return a.length >= r.length ? i.slice(r.length) : i;
269
- }).join(`
270
- `);
271
- }
272
- var w = class {
273
- constructor(e) {
274
- _defineProperty(this, "options", void 0);
275
- _defineProperty(this, "rules", void 0);
276
- _defineProperty(this, "lexer", void 0);
277
- this.options = e || T;
278
- }
279
- space(e) {
280
- let t = this.rules.block.newline.exec(e);
281
- if (t && t[0].length > 0) return {
282
- type: "space",
283
- raw: t[0]
284
- };
285
- }
286
- code(e) {
287
- let t = this.rules.block.code.exec(e);
288
- if (t) {
289
- let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
290
- return {
291
- type: "code",
292
- raw: t[0],
293
- codeBlockStyle: "indented",
294
- text: this.options.pedantic ? n : I(n, `
295
- `)
296
- };
297
- }
298
- }
299
- fences(e) {
300
- let t = this.rules.block.fences.exec(e);
301
- if (t) {
302
- let n = t[0], r = nt(n, t[3] || "", this.rules);
303
- return {
304
- type: "code",
305
- raw: n,
306
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
307
- text: r
308
- };
309
- }
310
- }
311
- heading(e) {
312
- let t = this.rules.block.heading.exec(e);
313
- if (t) {
314
- let n = t[2].trim();
315
- if (this.rules.other.endingHash.test(n)) {
316
- let r = I(n, "#");
317
- (this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
318
- }
319
- return {
320
- type: "heading",
321
- raw: t[0],
322
- depth: t[1].length,
323
- text: n,
324
- tokens: this.lexer.inline(n)
325
- };
326
- }
327
- }
328
- hr(e) {
329
- let t = this.rules.block.hr.exec(e);
330
- if (t) return {
331
- type: "hr",
332
- raw: I(t[0], `
333
- `)
334
- };
335
- }
336
- blockquote(e) {
337
- let t = this.rules.block.blockquote.exec(e);
338
- if (t) {
339
- let n = I(t[0], `
340
- `).split(`
341
- `), r = "", i = "", s = [];
342
- for (; n.length > 0;) {
343
- let a = !1, o = [], l;
344
- for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) o.push(n[l]), a = !0;
345
- else if (!a) o.push(n[l]);
346
- else break;
347
- n = n.slice(l);
348
- let p = o.join(`
349
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
350
- $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
351
- r = r ? `${r}
352
- ${p}` : p, i = i ? `${i}
353
- ${c}` : c;
354
- let d = this.lexer.state.top;
355
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, s, !0), this.lexer.state.top = d, n.length === 0) break;
356
- let h = s.at(-1);
357
- if (h?.type === "code") break;
358
- if (h?.type === "blockquote") {
359
- let R = h, f = R.raw + `
360
- ` + n.join(`
361
- `), S = this.blockquote(f);
362
- s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
363
- break;
364
- } else if (h?.type === "list") {
365
- let R = h, f = R.raw + `
366
- ` + n.join(`
367
- `), S = this.list(f);
368
- s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
369
- `);
370
- continue;
371
- }
372
- }
373
- return {
374
- type: "blockquote",
375
- raw: r,
376
- tokens: s,
377
- text: i
378
- };
379
- }
380
- }
381
- list(e) {
382
- let t = this.rules.block.list.exec(e);
383
- if (t) {
384
- let n = t[1].trim(), r = n.length > 1, i = {
385
- type: "list",
386
- raw: "",
387
- ordered: r,
388
- start: r ? +n.slice(0, -1) : "",
389
- loose: !1,
390
- items: []
391
- };
392
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
393
- let s = this.rules.other.listItemRegex(n), a = !1;
394
- for (; e;) {
395
- let l = !1, p = "", c = "";
396
- if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
397
- p = t[0], e = e.substring(p.length);
398
- let d = ge(t[2].split(`
399
- `, 1)[0], t[1].length), h = e.split(`
400
- `, 1)[0], R = !d.trim(), f = 0;
401
- if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
402
- `, e = e.substring(h.length + 1), l = !0), !l) {
403
- let S = this.rules.other.nextBulletRegex(f), Y = this.rules.other.hrRegex(f), ee = this.rules.other.fencesBeginRegex(f), te = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
404
- for (; e;) {
405
- let Z = e.split(`
406
- `, 1)[0], A;
407
- if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), ee.test(h) || te.test(h) || me.test(h) || xe.test(h) || S.test(h) || Y.test(h)) break;
408
- if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
409
- ` + A.slice(f);
410
- else {
411
- if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
412
- c += `
413
- ` + h;
414
- }
415
- R = !h.trim(), p += Z + `
416
- `, e = e.substring(Z.length + 1), d = A.slice(f);
417
- }
418
- }
419
- i.loose || (a ? i.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (a = !0)), i.items.push({
420
- type: "list_item",
421
- raw: p,
422
- task: !!this.options.gfm && this.rules.other.listIsTask.test(c),
423
- loose: !1,
424
- text: c,
425
- tokens: []
426
- }), i.raw += p;
427
- }
428
- let o = i.items.at(-1);
429
- if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
430
- else return;
431
- i.raw = i.raw.trimEnd();
432
- for (let l of i.items) {
433
- if (this.lexer.state.top = !1, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
434
- if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), l.tokens[0]?.type === "text" || l.tokens[0]?.type === "paragraph") {
435
- l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
436
- for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
437
- this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
438
- break;
439
- }
440
- }
441
- let p = this.rules.other.listTaskCheckbox.exec(l.raw);
442
- if (p) {
443
- let c = {
444
- type: "checkbox",
445
- raw: p[0] + " ",
446
- checked: p[0] !== "[ ]"
447
- };
448
- l.checked = c.checked, i.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({
449
- type: "paragraph",
450
- raw: c.raw,
451
- text: c.raw,
452
- tokens: [c]
453
- }) : l.tokens.unshift(c);
454
- }
455
- }
456
- if (!i.loose) {
457
- let p = l.tokens.filter((d) => d.type === "space");
458
- i.loose = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
459
- }
460
- }
461
- if (i.loose) for (let l of i.items) {
462
- l.loose = !0;
463
- for (let p of l.tokens) p.type === "text" && (p.type = "paragraph");
464
- }
465
- return i;
466
- }
467
- }
468
- html(e) {
469
- let t = this.rules.block.html.exec(e);
470
- if (t) return {
471
- type: "html",
472
- block: !0,
473
- raw: t[0],
474
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
475
- text: t[0]
476
- };
477
- }
478
- def(e) {
479
- let t = this.rules.block.def.exec(e);
480
- if (t) {
481
- let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
482
- return {
483
- type: "def",
484
- tag: n,
485
- raw: t[0],
486
- href: r,
487
- title: i
488
- };
489
- }
490
- }
491
- table(e) {
492
- let t = this.rules.block.table.exec(e);
493
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
494
- let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
495
- `) : [], s = {
496
- type: "table",
497
- raw: t[0],
498
- header: [],
499
- align: [],
500
- rows: []
501
- };
502
- if (n.length === r.length) {
503
- for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
504
- for (let a = 0; a < n.length; a++) s.header.push({
505
- text: n[a],
506
- tokens: this.lexer.inline(n[a]),
507
- header: !0,
508
- align: s.align[a]
509
- });
510
- for (let a of i) s.rows.push(V(a, s.header.length).map((o, l) => ({
511
- text: o,
512
- tokens: this.lexer.inline(o),
513
- header: !1,
514
- align: s.align[l]
515
- })));
516
- return s;
517
- }
518
- }
519
- lheading(e) {
520
- let t = this.rules.block.lheading.exec(e);
521
- if (t) {
522
- let n = t[1].trim();
523
- return {
524
- type: "heading",
525
- raw: t[0],
526
- depth: t[2].charAt(0) === "=" ? 1 : 2,
527
- text: n,
528
- tokens: this.lexer.inline(n)
529
- };
530
- }
531
- }
532
- paragraph(e) {
533
- let t = this.rules.block.paragraph.exec(e);
534
- if (t) {
535
- let n = t[1].charAt(t[1].length - 1) === `
536
- ` ? t[1].slice(0, -1) : t[1];
537
- return {
538
- type: "paragraph",
539
- raw: t[0],
540
- text: n,
541
- tokens: this.lexer.inline(n)
542
- };
543
- }
544
- }
545
- text(e) {
546
- let t = this.rules.block.text.exec(e);
547
- if (t) return {
548
- type: "text",
549
- raw: t[0],
550
- text: t[0],
551
- tokens: this.lexer.inline(t[0])
552
- };
553
- }
554
- escape(e) {
555
- let t = this.rules.inline.escape.exec(e);
556
- if (t) return {
557
- type: "escape",
558
- raw: t[0],
559
- text: t[1]
560
- };
561
- }
562
- tag(e) {
563
- let t = this.rules.inline.tag.exec(e);
564
- if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
565
- type: "html",
566
- raw: t[0],
567
- inLink: this.lexer.state.inLink,
568
- inRawBlock: this.lexer.state.inRawBlock,
569
- block: !1,
570
- text: t[0]
571
- };
572
- }
573
- link(e) {
574
- let t = this.rules.inline.link.exec(e);
575
- if (t) {
576
- let n = t[2].trim();
577
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
578
- if (!this.rules.other.endAngleBracket.test(n)) return;
579
- let s = I(n.slice(0, -1), "\\");
580
- if ((n.length - s.length) % 2 === 0) return;
581
- } else {
582
- let s = de(t[2], "()");
583
- if (s === -2) return;
584
- if (s > -1) {
585
- let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
586
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
587
- }
588
- }
589
- let r = t[2], i = "";
590
- if (this.options.pedantic) {
591
- let s = this.rules.other.pedanticHrefTitle.exec(r);
592
- s && (r = s[1], i = s[3]);
593
- } else i = t[3] ? t[3].slice(1, -1) : "";
594
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, {
595
- href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
596
- title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
597
- }, t[0], this.lexer, this.rules);
598
- }
599
- }
600
- reflink(e, t) {
601
- let n;
602
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
603
- let i = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
604
- if (!i) {
605
- let s = n[0].charAt(0);
606
- return {
607
- type: "text",
608
- raw: s,
609
- text: s
610
- };
611
- }
612
- return fe(n, i, n[0], this.lexer, this.rules);
613
- }
614
- }
615
- emStrong(e, t, n = "") {
616
- let r = this.rules.inline.emStrongLDelim.exec(e);
617
- if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
618
- if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
619
- let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
620
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null;) {
621
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
622
- if (o = [...a].length, r[3] || r[4]) {
623
- l += o;
624
- continue;
625
- } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
626
- p += o;
627
- continue;
628
- }
629
- if (l -= o, l > 0) continue;
630
- o = Math.min(o, o + l + p);
631
- let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
632
- if (Math.min(s, o) % 2) {
633
- let f = h.slice(1, -1);
634
- return {
635
- type: "em",
636
- raw: h,
637
- text: f,
638
- tokens: this.lexer.inlineTokens(f)
639
- };
640
- }
641
- let R = h.slice(2, -2);
642
- return {
643
- type: "strong",
644
- raw: h,
645
- text: R,
646
- tokens: this.lexer.inlineTokens(R)
647
- };
648
- }
649
- }
650
- }
651
- codespan(e) {
652
- let t = this.rules.inline.code.exec(e);
653
- if (t) {
654
- let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
655
- return r && i && (n = n.substring(1, n.length - 1)), {
656
- type: "codespan",
657
- raw: t[0],
658
- text: n
659
- };
660
- }
661
- }
662
- br(e) {
663
- let t = this.rules.inline.br.exec(e);
664
- if (t) return {
665
- type: "br",
666
- raw: t[0]
667
- };
668
- }
669
- del(e, t, n = "") {
670
- let r = this.rules.inline.delLDelim.exec(e);
671
- if (!r) return;
672
- if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
673
- let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
674
- for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null;) {
675
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
676
- if (r[3] || r[4]) {
677
- l += o;
678
- continue;
679
- }
680
- if (l -= o, l > 0) continue;
681
- o = Math.min(o, o + l);
682
- let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
683
- return {
684
- type: "del",
685
- raw: d,
686
- text: h,
687
- tokens: this.lexer.inlineTokens(h)
688
- };
689
- }
690
- }
691
- }
692
- autolink(e) {
693
- let t = this.rules.inline.autolink.exec(e);
694
- if (t) {
695
- let n, r;
696
- return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), {
697
- type: "link",
698
- raw: t[0],
699
- text: n,
700
- href: r,
701
- tokens: [{
702
- type: "text",
703
- raw: n,
704
- text: n
705
- }]
706
- };
707
- }
708
- }
709
- url(e) {
710
- let t;
711
- if (t = this.rules.inline.url.exec(e)) {
712
- let n, r;
713
- if (t[2] === "@") n = t[0], r = "mailto:" + n;
714
- else {
715
- let i;
716
- do
717
- i = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
718
- while (i !== t[0]);
719
- n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
720
- }
721
- return {
722
- type: "link",
723
- raw: t[0],
724
- text: n,
725
- href: r,
726
- tokens: [{
727
- type: "text",
728
- raw: n,
729
- text: n
730
- }]
731
- };
732
- }
733
- }
734
- inlineText(e) {
735
- let t = this.rules.inline.text.exec(e);
736
- if (t) {
737
- let n = this.lexer.state.inRawBlock;
738
- return {
739
- type: "text",
740
- raw: t[0],
741
- text: t[0],
742
- escaped: n
743
- };
744
- }
745
- }
746
- };
747
- var x = class u {
748
- constructor(e) {
749
- _defineProperty(this, "tokens", void 0);
750
- _defineProperty(this, "options", void 0);
751
- _defineProperty(this, "state", void 0);
752
- _defineProperty(this, "inlineQueue", void 0);
753
- _defineProperty(this, "tokenizer", void 0);
754
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
755
- inLink: !1,
756
- inRawBlock: !1,
757
- top: !0
758
- };
759
- let t = {
760
- other: m,
761
- block: B.normal,
762
- inline: E.normal
763
- };
764
- this.options.pedantic ? (t.block = B.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
765
- }
766
- static get rules() {
767
- return {
768
- block: B,
769
- inline: E
770
- };
771
- }
772
- static lex(e, t) {
773
- return new u(t).lex(e);
774
- }
775
- static lexInline(e, t) {
776
- return new u(t).inlineTokens(e);
777
- }
778
- lex(e) {
779
- e = e.replace(m.carriageReturn, `
780
- `), this.blockTokens(e, this.tokens);
781
- for (let t = 0; t < this.inlineQueue.length; t++) {
782
- let n = this.inlineQueue[t];
783
- this.inlineTokens(n.src, n.tokens);
784
- }
785
- return this.inlineQueue = [], this.tokens;
786
- }
787
- blockTokens(e, t = [], n = !1) {
788
- for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e;) {
789
- let r;
790
- if (this.options.extensions?.block?.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
791
- if (r = this.tokenizer.space(e)) {
792
- e = e.substring(r.raw.length);
793
- let s = t.at(-1);
794
- r.raw.length === 1 && s !== void 0 ? s.raw += `
795
- ` : t.push(r);
796
- continue;
797
- }
798
- if (r = this.tokenizer.code(e)) {
799
- e = e.substring(r.raw.length);
800
- let s = t.at(-1);
801
- s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
802
- `) ? "" : `
803
- `) + r.raw, s.text += `
804
- ` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
805
- continue;
806
- }
807
- if (r = this.tokenizer.fences(e)) {
808
- e = e.substring(r.raw.length), t.push(r);
809
- continue;
810
- }
811
- if (r = this.tokenizer.heading(e)) {
812
- e = e.substring(r.raw.length), t.push(r);
813
- continue;
814
- }
815
- if (r = this.tokenizer.hr(e)) {
816
- e = e.substring(r.raw.length), t.push(r);
817
- continue;
818
- }
819
- if (r = this.tokenizer.blockquote(e)) {
820
- e = e.substring(r.raw.length), t.push(r);
821
- continue;
822
- }
823
- if (r = this.tokenizer.list(e)) {
824
- e = e.substring(r.raw.length), t.push(r);
825
- continue;
826
- }
827
- if (r = this.tokenizer.html(e)) {
828
- e = e.substring(r.raw.length), t.push(r);
829
- continue;
830
- }
831
- if (r = this.tokenizer.def(e)) {
832
- e = e.substring(r.raw.length);
833
- let s = t.at(-1);
834
- s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
835
- `) ? "" : `
836
- `) + r.raw, s.text += `
837
- ` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
838
- href: r.href,
839
- title: r.title
840
- }, t.push(r));
841
- continue;
842
- }
843
- if (r = this.tokenizer.table(e)) {
844
- e = e.substring(r.raw.length), t.push(r);
845
- continue;
846
- }
847
- if (r = this.tokenizer.lheading(e)) {
848
- e = e.substring(r.raw.length), t.push(r);
849
- continue;
850
- }
851
- let i = e;
852
- if (this.options.extensions?.startBlock) {
853
- let s = Infinity, a = e.slice(1), o;
854
- this.options.extensions.startBlock.forEach((l) => {
855
- o = l.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
856
- }), s < Infinity && s >= 0 && (i = e.substring(0, s + 1));
857
- }
858
- if (this.state.top && (r = this.tokenizer.paragraph(i))) {
859
- let s = t.at(-1);
860
- n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
861
- `) ? "" : `
862
- `) + r.raw, s.text += `
863
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
864
- continue;
865
- }
866
- if (r = this.tokenizer.text(e)) {
867
- e = e.substring(r.raw.length);
868
- let s = t.at(-1);
869
- s?.type === "text" ? (s.raw += (s.raw.endsWith(`
870
- `) ? "" : `
871
- `) + r.raw, s.text += `
872
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
873
- continue;
874
- }
875
- if (e) {
876
- let s = "Infinite loop on byte: " + e.charCodeAt(0);
877
- if (this.options.silent) {
878
- console.error(s);
879
- break;
880
- } else throw new Error(s);
881
- }
882
- }
883
- return this.state.top = !0, t;
884
- }
885
- inline(e, t = []) {
886
- return this.inlineQueue.push({
887
- src: e,
888
- tokens: t
889
- }), t;
890
- }
891
- inlineTokens(e, t = []) {
892
- this.tokenizer.lexer = this;
893
- let n = e, r = null;
894
- if (this.tokens.links) {
895
- let o = Object.keys(this.tokens.links);
896
- if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null;) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
897
- }
898
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
899
- let i;
900
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
901
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
902
- let s = !1, a = "";
903
- for (; e;) {
904
- s || (a = ""), s = !1;
905
- let o;
906
- if (this.options.extensions?.inline?.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1)) continue;
907
- if (o = this.tokenizer.escape(e)) {
908
- e = e.substring(o.raw.length), t.push(o);
909
- continue;
910
- }
911
- if (o = this.tokenizer.tag(e)) {
912
- e = e.substring(o.raw.length), t.push(o);
913
- continue;
914
- }
915
- if (o = this.tokenizer.link(e)) {
916
- e = e.substring(o.raw.length), t.push(o);
917
- continue;
918
- }
919
- if (o = this.tokenizer.reflink(e, this.tokens.links)) {
920
- e = e.substring(o.raw.length);
921
- let p = t.at(-1);
922
- o.type === "text" && p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
923
- continue;
924
- }
925
- if (o = this.tokenizer.emStrong(e, n, a)) {
926
- e = e.substring(o.raw.length), t.push(o);
927
- continue;
928
- }
929
- if (o = this.tokenizer.codespan(e)) {
930
- e = e.substring(o.raw.length), t.push(o);
931
- continue;
932
- }
933
- if (o = this.tokenizer.br(e)) {
934
- e = e.substring(o.raw.length), t.push(o);
935
- continue;
936
- }
937
- if (o = this.tokenizer.del(e, n, a)) {
938
- e = e.substring(o.raw.length), t.push(o);
939
- continue;
940
- }
941
- if (o = this.tokenizer.autolink(e)) {
942
- e = e.substring(o.raw.length), t.push(o);
943
- continue;
944
- }
945
- if (!this.state.inLink && (o = this.tokenizer.url(e))) {
946
- e = e.substring(o.raw.length), t.push(o);
947
- continue;
948
- }
949
- let l = e;
950
- if (this.options.extensions?.startInline) {
951
- let p = Infinity, c = e.slice(1), d;
952
- this.options.extensions.startInline.forEach((h) => {
953
- d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
954
- }), p < Infinity && p >= 0 && (l = e.substring(0, p + 1));
955
- }
956
- if (o = this.tokenizer.inlineText(l)) {
957
- e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = !0;
958
- let p = t.at(-1);
959
- p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
960
- continue;
961
- }
962
- if (e) {
963
- let p = "Infinite loop on byte: " + e.charCodeAt(0);
964
- if (this.options.silent) {
965
- console.error(p);
966
- break;
967
- } else throw new Error(p);
968
- }
969
- }
970
- return t;
971
- }
972
- };
973
- var y = class {
974
- constructor(e) {
975
- _defineProperty(this, "options", void 0);
976
- _defineProperty(this, "parser", void 0);
977
- this.options = e || T;
978
- }
979
- space(e) {
980
- return "";
981
- }
982
- code({ text: e, lang: t, escaped: n }) {
983
- let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
984
- `;
985
- return r ? "<pre><code class=\"language-" + O(r) + "\">" + (n ? i : O(i, !0)) + `</code></pre>
986
- ` : "<pre><code>" + (n ? i : O(i, !0)) + `</code></pre>
987
- `;
988
- }
989
- blockquote({ tokens: e }) {
990
- return `<blockquote>
991
- ${this.parser.parse(e)}</blockquote>
992
- `;
993
- }
994
- html({ text: e }) {
995
- return e;
996
- }
997
- def(e) {
998
- return "";
999
- }
1000
- heading({ tokens: e, depth: t }) {
1001
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1002
- `;
1003
- }
1004
- hr(e) {
1005
- return `<hr>
1006
- `;
1007
- }
1008
- list(e) {
1009
- let t = e.ordered, n = e.start, r = "";
1010
- for (let a = 0; a < e.items.length; a++) {
1011
- let o = e.items[a];
1012
- r += this.listitem(o);
1013
- }
1014
- let i = t ? "ol" : "ul", s = t && n !== 1 ? " start=\"" + n + "\"" : "";
1015
- return "<" + i + s + `>
1016
- ` + r + "</" + i + `>
1017
- `;
1018
- }
1019
- listitem(e) {
1020
- return `<li>${this.parser.parse(e.tokens)}</li>
1021
- `;
1022
- }
1023
- checkbox({ checked: e }) {
1024
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1025
- }
1026
- paragraph({ tokens: e }) {
1027
- return `<p>${this.parser.parseInline(e)}</p>
1028
- `;
1029
- }
1030
- table(e) {
1031
- let t = "", n = "";
1032
- for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
1033
- t += this.tablerow({ text: n });
1034
- let r = "";
1035
- for (let i = 0; i < e.rows.length; i++) {
1036
- let s = e.rows[i];
1037
- n = "";
1038
- for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
1039
- r += this.tablerow({ text: n });
1040
- }
1041
- return r && (r = `<tbody>${r}</tbody>`), `<table>
1042
- <thead>
1043
- ` + t + `</thead>
1044
- ` + r + `</table>
1045
- `;
1046
- }
1047
- tablerow({ text: e }) {
1048
- return `<tr>
1049
- ${e}</tr>
1050
- `;
1051
- }
1052
- tablecell(e) {
1053
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1054
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1055
- `;
1056
- }
1057
- strong({ tokens: e }) {
1058
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1059
- }
1060
- em({ tokens: e }) {
1061
- return `<em>${this.parser.parseInline(e)}</em>`;
1062
- }
1063
- codespan({ text: e }) {
1064
- return `<code>${O(e, !0)}</code>`;
1065
- }
1066
- br(e) {
1067
- return "<br>";
1068
- }
1069
- del({ tokens: e }) {
1070
- return `<del>${this.parser.parseInline(e)}</del>`;
1071
- }
1072
- link({ href: e, title: t, tokens: n }) {
1073
- let r = this.parser.parseInline(n), i = J(e);
1074
- if (i === null) return r;
1075
- e = i;
1076
- let s = "<a href=\"" + e + "\"";
1077
- return t && (s += " title=\"" + O(t) + "\""), s += ">" + r + "</a>", s;
1078
- }
1079
- image({ href: e, title: t, text: n, tokens: r }) {
1080
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1081
- let i = J(e);
1082
- if (i === null) return O(n);
1083
- e = i;
1084
- let s = `<img src="${e}" alt="${O(n)}"`;
1085
- return t && (s += ` title="${O(t)}"`), s += ">", s;
1086
- }
1087
- text(e) {
1088
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
1089
- }
1090
- };
1091
- var $ = class {
1092
- strong({ text: e }) {
1093
- return e;
1094
- }
1095
- em({ text: e }) {
1096
- return e;
1097
- }
1098
- codespan({ text: e }) {
1099
- return e;
1100
- }
1101
- del({ text: e }) {
1102
- return e;
1103
- }
1104
- html({ text: e }) {
1105
- return e;
1106
- }
1107
- text({ text: e }) {
1108
- return e;
1109
- }
1110
- link({ text: e }) {
1111
- return "" + e;
1112
- }
1113
- image({ text: e }) {
1114
- return "" + e;
1115
- }
1116
- br() {
1117
- return "";
1118
- }
1119
- checkbox({ raw: e }) {
1120
- return e;
1121
- }
1122
- };
1123
- var b = class u {
1124
- constructor(e) {
1125
- _defineProperty(this, "options", void 0);
1126
- _defineProperty(this, "renderer", void 0);
1127
- _defineProperty(this, "textRenderer", void 0);
1128
- this.options = e || T, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
1129
- }
1130
- static parse(e, t) {
1131
- return new u(t).parse(e);
1132
- }
1133
- static parseInline(e, t) {
1134
- return new u(t).parseInline(e);
1135
- }
1136
- parse(e) {
1137
- this.renderer.parser = this;
1138
- let t = "";
1139
- for (let n = 0; n < e.length; n++) {
1140
- let r = e[n];
1141
- if (this.options.extensions?.renderers?.[r.type]) {
1142
- let s = r, a = this.options.extensions.renderers[s.type].call({ parser: this }, s);
1143
- if (a !== !1 || ![
1144
- "space",
1145
- "hr",
1146
- "heading",
1147
- "code",
1148
- "table",
1149
- "blockquote",
1150
- "list",
1151
- "html",
1152
- "def",
1153
- "paragraph",
1154
- "text"
1155
- ].includes(s.type)) {
1156
- t += a || "";
1157
- continue;
1158
- }
1159
- }
1160
- let i = r;
1161
- switch (i.type) {
1162
- case "space":
1163
- t += this.renderer.space(i);
1164
- break;
1165
- case "hr":
1166
- t += this.renderer.hr(i);
1167
- break;
1168
- case "heading":
1169
- t += this.renderer.heading(i);
1170
- break;
1171
- case "code":
1172
- t += this.renderer.code(i);
1173
- break;
1174
- case "table":
1175
- t += this.renderer.table(i);
1176
- break;
1177
- case "blockquote":
1178
- t += this.renderer.blockquote(i);
1179
- break;
1180
- case "list":
1181
- t += this.renderer.list(i);
1182
- break;
1183
- case "checkbox":
1184
- t += this.renderer.checkbox(i);
1185
- break;
1186
- case "html":
1187
- t += this.renderer.html(i);
1188
- break;
1189
- case "def":
1190
- t += this.renderer.def(i);
1191
- break;
1192
- case "paragraph":
1193
- t += this.renderer.paragraph(i);
1194
- break;
1195
- case "text":
1196
- t += this.renderer.text(i);
1197
- break;
1198
- default: {
1199
- let s = "Token with \"" + i.type + "\" type was not found.";
1200
- if (this.options.silent) return console.error(s), "";
1201
- throw new Error(s);
1202
- }
1203
- }
1204
- }
1205
- return t;
1206
- }
1207
- parseInline(e, t = this.renderer) {
1208
- this.renderer.parser = this;
1209
- let n = "";
1210
- for (let r = 0; r < e.length; r++) {
1211
- let i = e[r];
1212
- if (this.options.extensions?.renderers?.[i.type]) {
1213
- let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1214
- if (a !== !1 || ![
1215
- "escape",
1216
- "html",
1217
- "link",
1218
- "image",
1219
- "strong",
1220
- "em",
1221
- "codespan",
1222
- "br",
1223
- "del",
1224
- "text"
1225
- ].includes(i.type)) {
1226
- n += a || "";
1227
- continue;
1228
- }
1229
- }
1230
- let s = i;
1231
- switch (s.type) {
1232
- case "escape":
1233
- n += t.text(s);
1234
- break;
1235
- case "html":
1236
- n += t.html(s);
1237
- break;
1238
- case "link":
1239
- n += t.link(s);
1240
- break;
1241
- case "image":
1242
- n += t.image(s);
1243
- break;
1244
- case "checkbox":
1245
- n += t.checkbox(s);
1246
- break;
1247
- case "strong":
1248
- n += t.strong(s);
1249
- break;
1250
- case "em":
1251
- n += t.em(s);
1252
- break;
1253
- case "codespan":
1254
- n += t.codespan(s);
1255
- break;
1256
- case "br":
1257
- n += t.br(s);
1258
- break;
1259
- case "del":
1260
- n += t.del(s);
1261
- break;
1262
- case "text":
1263
- n += t.text(s);
1264
- break;
1265
- default: {
1266
- let a = "Token with \"" + s.type + "\" type was not found.";
1267
- if (this.options.silent) return console.error(a), "";
1268
- throw new Error(a);
1269
- }
1270
- }
1271
- }
1272
- return n;
1273
- }
1274
- };
1275
- var P = (_Class = class {
1276
- constructor(e) {
1277
- _defineProperty(this, "options", void 0);
1278
- _defineProperty(this, "block", void 0);
1279
- this.options = e || T;
1280
- }
1281
- preprocess(e) {
1282
- return e;
1283
- }
1284
- postprocess(e) {
1285
- return e;
1286
- }
1287
- processAllTokens(e) {
1288
- return e;
1289
- }
1290
- emStrongMask(e) {
1291
- return e;
1292
- }
1293
- provideLexer() {
1294
- return this.block ? x.lex : x.lexInline;
1295
- }
1296
- provideParser() {
1297
- return this.block ? b.parse : b.parseInline;
1298
- }
1299
- }, _defineProperty(_Class, "passThroughHooks", new Set([
1300
- "preprocess",
1301
- "postprocess",
1302
- "processAllTokens",
1303
- "emStrongMask"
1304
- ])), _defineProperty(_Class, "passThroughHooksRespectAsync", new Set([
1305
- "preprocess",
1306
- "postprocess",
1307
- "processAllTokens"
1308
- ])), _Class);
1309
- var D = class {
1310
- constructor(...e) {
1311
- _defineProperty(this, "defaults", M());
1312
- _defineProperty(this, "options", this.setOptions);
1313
- _defineProperty(this, "parse", this.parseMarkdown(!0));
1314
- _defineProperty(this, "parseInline", this.parseMarkdown(!1));
1315
- _defineProperty(this, "Parser", b);
1316
- _defineProperty(this, "Renderer", y);
1317
- _defineProperty(this, "TextRenderer", $);
1318
- _defineProperty(this, "Lexer", x);
1319
- _defineProperty(this, "Tokenizer", w);
1320
- _defineProperty(this, "Hooks", P);
1321
- this.use(...e);
1322
- }
1323
- walkTokens(e, t) {
1324
- let n = [];
1325
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
1326
- case "table": {
1327
- let i = r;
1328
- for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
1329
- for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
1330
- break;
1331
- }
1332
- case "list": {
1333
- let i = r;
1334
- n = n.concat(this.walkTokens(i.items, t));
1335
- break;
1336
- }
1337
- default: {
1338
- let i = r;
1339
- this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
1340
- let a = i[s].flat(Infinity);
1341
- n = n.concat(this.walkTokens(a, t));
1342
- }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
1343
- }
1344
- }
1345
- return n;
1346
- }
1347
- use(...e) {
1348
- let t = this.defaults.extensions || {
1349
- renderers: {},
1350
- childTokens: {}
1351
- };
1352
- return e.forEach((n) => {
1353
- let r = { ...n };
1354
- if (r.async = this.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((i) => {
1355
- if (!i.name) throw new Error("extension name required");
1356
- if ("renderer" in i) {
1357
- let s = t.renderers[i.name];
1358
- s ? t.renderers[i.name] = function(...a) {
1359
- let o = i.renderer.apply(this, a);
1360
- return o === !1 && (o = s.apply(this, a)), o;
1361
- } : t.renderers[i.name] = i.renderer;
1362
- }
1363
- if ("tokenizer" in i) {
1364
- if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
1365
- let s = t[i.level];
1366
- s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
1367
- }
1368
- "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
1369
- }), r.extensions = t), n.renderer) {
1370
- let i = this.defaults.renderer || new y(this.defaults);
1371
- for (let s in n.renderer) {
1372
- if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
1373
- if (["options", "parser"].includes(s)) continue;
1374
- let a = s, o = n.renderer[a], l = i[a];
1375
- i[a] = (...p) => {
1376
- let c = o.apply(i, p);
1377
- return c === !1 && (c = l.apply(i, p)), c || "";
1378
- };
1379
- }
1380
- r.renderer = i;
1381
- }
1382
- if (n.tokenizer) {
1383
- let i = this.defaults.tokenizer || new w(this.defaults);
1384
- for (let s in n.tokenizer) {
1385
- if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
1386
- if ([
1387
- "options",
1388
- "rules",
1389
- "lexer"
1390
- ].includes(s)) continue;
1391
- let a = s, o = n.tokenizer[a], l = i[a];
1392
- i[a] = (...p) => {
1393
- let c = o.apply(i, p);
1394
- return c === !1 && (c = l.apply(i, p)), c;
1395
- };
1396
- }
1397
- r.tokenizer = i;
1398
- }
1399
- if (n.hooks) {
1400
- let i = this.defaults.hooks || new P();
1401
- for (let s in n.hooks) {
1402
- if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
1403
- if (["options", "block"].includes(s)) continue;
1404
- let a = s, o = n.hooks[a], l = i[a];
1405
- P.passThroughHooks.has(s) ? i[a] = (p) => {
1406
- if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
1407
- let d = await o.call(i, p);
1408
- return l.call(i, d);
1409
- })();
1410
- let c = o.call(i, p);
1411
- return l.call(i, c);
1412
- } : i[a] = (...p) => {
1413
- if (this.defaults.async) return (async () => {
1414
- let d = await o.apply(i, p);
1415
- return d === !1 && (d = await l.apply(i, p)), d;
1416
- })();
1417
- let c = o.apply(i, p);
1418
- return c === !1 && (c = l.apply(i, p)), c;
1419
- };
1420
- }
1421
- r.hooks = i;
1422
- }
1423
- if (n.walkTokens) {
1424
- let i = this.defaults.walkTokens, s = n.walkTokens;
1425
- r.walkTokens = function(a) {
1426
- let o = [];
1427
- return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
1428
- };
1429
- }
1430
- this.defaults = {
1431
- ...this.defaults,
1432
- ...r
1433
- };
1434
- }), this;
1435
- }
1436
- setOptions(e) {
1437
- return this.defaults = {
1438
- ...this.defaults,
1439
- ...e
1440
- }, this;
1441
- }
1442
- lexer(e, t) {
1443
- return x.lex(e, t ?? this.defaults);
1444
- }
1445
- parser(e, t) {
1446
- return b.parse(e, t ?? this.defaults);
1447
- }
1448
- parseMarkdown(e) {
1449
- return (n, r) => {
1450
- let i = { ...r }, s = {
1451
- ...this.defaults,
1452
- ...i
1453
- }, a = this.onError(!!s.silent, !!s.async);
1454
- if (this.defaults.async === !0 && i.async === !1) return a(/* @__PURE__ */ new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1455
- if (typeof n > "u" || n === null) return a(/* @__PURE__ */ new Error("marked(): input parameter is undefined or null"));
1456
- if (typeof n != "string") return a(/* @__PURE__ */ new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1457
- if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
1458
- let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
1459
- s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
1460
- let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
1461
- return s.hooks ? await s.hooks.postprocess(h) : h;
1462
- })().catch(a);
1463
- try {
1464
- s.hooks && (n = s.hooks.preprocess(n));
1465
- let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
1466
- s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
1467
- let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
1468
- return s.hooks && (c = s.hooks.postprocess(c)), c;
1469
- } catch (o) {
1470
- return a(o);
1471
- }
1472
- };
1473
- }
1474
- onError(e, t) {
1475
- return (n) => {
1476
- if (n.message += `
1477
- Please report this to https://github.com/markedjs/marked.`, e) {
1478
- let r = "<p>An error occurred:</p><pre>" + O(n.message + "", !0) + "</pre>";
1479
- return t ? Promise.resolve(r) : r;
1480
- }
1481
- if (t) return Promise.reject(n);
1482
- throw n;
1483
- };
1484
- }
1485
- };
1486
- var L = new D();
1487
- function g(u, e) {
1488
- return L.parse(u, e);
1489
- }
1490
- g.options = g.setOptions = function(u) {
1491
- return L.setOptions(u), g.defaults = L.defaults, G(g.defaults), g;
1492
- };
1493
- g.getDefaults = M;
1494
- g.defaults = T;
1495
- g.use = function(...u) {
1496
- return L.use(...u), g.defaults = L.defaults, G(g.defaults), g;
1497
- };
1498
- g.walkTokens = function(u, e) {
1499
- return L.walkTokens(u, e);
1500
- };
1501
- g.parseInline = L.parseInline;
1502
- g.Parser = b;
1503
- g.parser = b.parse;
1504
- g.Renderer = y;
1505
- g.TextRenderer = $;
1506
- g.Lexer = x;
1507
- g.lexer = x.lex;
1508
- g.Tokenizer = w;
1509
- g.Hooks = P;
1510
- g.parse = g;
1511
- g.options;
1512
- g.setOptions;
1513
- g.use;
1514
- g.walkTokens;
1515
- g.parseInline;
1516
- b.parse;
1517
- x.lex;
1518
- //#endregion
1519
- //#region src/shared/richText/richText.tsx
1520
- function normalizeAnchorSpacing(content) {
1521
- return content.replace(/([^\s>])(<a\b)/gu, "$1\xA0$2").replace(/(<\/a>)([\p{L}\p{N}])/gu, "$1\xA0$2");
1522
- }
1523
- function decorateHtml(content) {
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);
1526
- const anchors = Array.from(doc.querySelectorAll("a"));
1527
- for (const anchor of anchors) {
1528
- anchor.setAttribute("target", "_blank");
1529
- anchor.setAttribute("rel", "noopener noreferrer");
1530
- }
1531
- return doc.body.innerHTML;
1532
- }
1533
- function sanitizeHtml(content, disallowedTags) {
1534
- const normalizedContent = normalizeAnchorSpacing(content);
1535
- const parsed = g.parse(normalizedContent);
1536
- return decorateHtml(purify.sanitize(parsed, { FORBID_TAGS: disallowedTags }));
1537
- }
1538
- function RichText({ content, class: className, disallowedTags = [] }) {
1539
- if (!content) return null;
1540
- return /* @__PURE__ */ u("div", {
1541
- class: className,
1542
- children: /* @__PURE__ */ u("div", {
1543
- class: "IncodeRichTextMarkup",
1544
- dangerouslySetInnerHTML: { __html: sanitizeHtml(content, disallowedTags) }
1545
- })
1546
- });
1547
- }
1548
- //#endregion
1549
- export { RichText as t };