@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
@@ -0,0 +1,1761 @@
1
+ import { b as u } from "./vendor-preact-DHGqBGMH.js";
2
+ import { t as purify } from "./purify.es-CSPoFViI.js";
3
+ import { t as _defineProperty } from "./defineProperty-E9wRIIo9.js";
4
+ import { n as _classPrivateMethodInitSpec, t as _assertClassBrand } from "./assertClassBrand-DJr5K93j.js";
5
+ //#region ../../node_modules/.pnpm/marked@18.1.3/node_modules/marked/lib/marked.esm.js
6
+ var _a_brand, _Class;
7
+ /**
8
+ * marked v18.1.3 - a markdown parser
9
+ * Copyright (c) 2018-2026, MarkedJS. (MIT License)
10
+ * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
11
+ * https://github.com/markedjs/marked
12
+ */
13
+ /**
14
+ * DO NOT EDIT THIS FILE
15
+ * The code in this file is generated from files in ./src/
16
+ */
17
+ function H() {
18
+ return {
19
+ async: !1,
20
+ breaks: !1,
21
+ extensions: null,
22
+ gfm: !0,
23
+ hooks: null,
24
+ pedantic: !1,
25
+ renderer: null,
26
+ silent: !1,
27
+ tokenizer: null,
28
+ walkTokens: null
29
+ };
30
+ }
31
+ var S = H();
32
+ function se(a) {
33
+ S = a;
34
+ }
35
+ var B = { exec: () => null };
36
+ function D(a) {
37
+ let e = [];
38
+ return (t) => {
39
+ let n = Math.max(0, Math.min(3, t - 1)), s = e[n];
40
+ return s || (s = a(n), e[n] = s), s;
41
+ };
42
+ }
43
+ function c(a, e = "") {
44
+ let t = typeof a == "string" ? a : a.source, n = {
45
+ replace: (s, r) => {
46
+ let o = typeof r == "string" ? r : r.source;
47
+ return o = o.replace(T.caret, "$1"), t = t.replace(s, o), n;
48
+ },
49
+ getRegex: () => new RegExp(t, e)
50
+ };
51
+ return n;
52
+ }
53
+ var Te = ((a = "") => {
54
+ try {
55
+ return !!new RegExp("(?<=1)(?<!1)" + a);
56
+ } catch {
57
+ return !1;
58
+ }
59
+ })(), T = {
60
+ codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm,
61
+ outputLinkReplace: /\\([\[\]])/g,
62
+ indentCodeCompensation: /^(\s+)(?:```)/,
63
+ beginningSpace: /^\s+/,
64
+ endingHash: /#$/,
65
+ startingSpaceChar: /^ /,
66
+ endingSpaceChar: / $/,
67
+ endingSpaceTabChar: /[ \t]$/,
68
+ nonSpaceChar: /[^ ]/,
69
+ newLineCharGlobal: /\n/g,
70
+ tabCharGlobal: /\t/g,
71
+ leadingSpaceTab: /^[ \t]+/,
72
+ multipleSpaceGlobal: /\s+/g,
73
+ blankLine: /^[ \t]*$/,
74
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
75
+ blockquoteStart: /^ {0,3}>/,
76
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,
77
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
78
+ blockquoteMarkerWhitespace: /^( {0,3}>)([ \t]+)/gm,
79
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
80
+ listIsTask: /^\[[ xX]\][ \t]+\S/,
81
+ listReplaceTask: /^\[[ xX]\][ \t]+/,
82
+ listTaskCheckbox: /\[[ xX]\]/,
83
+ anyLine: /\n.*\n/,
84
+ hrefBrackets: /^<(.*)>$/,
85
+ tableDelimiter: /[:|]/,
86
+ tableAlignChars: /^\||\| *$/g,
87
+ tableRowBlankLine: /\n[ \t]*$/,
88
+ tableAlignRight: /^ *-+: *$/,
89
+ tableAlignCenter: /^ *:-+: *$/,
90
+ tableAlignLeft: /^ *:-+ *$/,
91
+ startATag: /^<a /i,
92
+ endATag: /^<\/a>/i,
93
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
94
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
95
+ startAngleBracket: /^</,
96
+ endAngleBracket: />$/,
97
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
98
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
99
+ numericCharacterReference: /&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,
100
+ numericCharacterReferenceOrAmpersand: /&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
101
+ escapeTest: /[&<>"']/,
102
+ escapeReplace: /[&<>"']/g,
103
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
104
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
105
+ caret: /(^|[^\[])\^/g,
106
+ percentDecode: /%25/g,
107
+ findPipe: /\|/g,
108
+ splitPipe: / \|/,
109
+ slashPipe: /\\\|/g,
110
+ carriageReturn: /\r\n|\r/g,
111
+ spaceLine: /^ +$/gm,
112
+ notSpaceStart: /^\S*/,
113
+ endingNewline: /\n$/,
114
+ listItemRegex: (a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),
115
+ nextBulletRegex: D((a) => new RegExp(`^ {0,${a}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
116
+ hrRegex: D((a) => new RegExp(`^ {0,${a}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
117
+ fencesBeginRegex: D((a) => new RegExp(`^ {0,${a}}(?:\`\`\`|~~~)`)),
118
+ headingBeginRegex: D((a) => new RegExp(`^ {0,${a}}#{1,6}(?:\\s|$)`)),
119
+ pedanticHeadingBeginRegex: D((a) => new RegExp(`^ {0,${a}}#`)),
120
+ htmlBeginRegex: D((a) => new RegExp(`^ {0,${a}}(?:</?(?:${K})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
121
+ blockquoteBeginRegex: D((a) => new RegExp(`^ {0,${a}}>`))
122
+ }, ve = /^(?:[ \t]*(?:\n|$))+/, Ze = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, He = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/, W = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, je = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, oe = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/, we = c(Oe).replace(/bull/g, oe).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}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Ge = c(Oe).replace(/bull/g, oe).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}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ae = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Ne = /^[^\n]+/, le = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/, Fe = c(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", le).replace("title", /(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(), Qe = c(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, oe).getRegex(), K = "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", ue = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ue = c("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ue).replace("tag", K).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Pe = (a) => c(ae).replace("hr", W).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", a).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", K).getRegex(), We = Pe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Ke = Pe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), pe = {
123
+ blockquote: c(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph", Ke).getRegex(),
124
+ code: Ze,
125
+ def: Fe,
126
+ fences: He,
127
+ heading: je,
128
+ hr: W,
129
+ html: Ue,
130
+ lheading: we,
131
+ list: Qe,
132
+ newline: ve,
133
+ paragraph: We,
134
+ table: B,
135
+ text: Ne
136
+ }, xe = c("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", W).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", K).getRegex(), Ve = {
137
+ ...pe,
138
+ lheading: Ge,
139
+ table: xe,
140
+ paragraph: c(ae).replace("hr", W).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", xe).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", K).getRegex()
141
+ }, Je = {
142
+ ...pe,
143
+ html: c(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment", ue).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(),
144
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
145
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
146
+ fences: B,
147
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
148
+ paragraph: c(ae).replace("hr", W).replace("heading", ` *#{1,6} *[^
149
+ ]`).replace("lheading", we).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
150
+ }, Ye = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, et = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Se = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, tt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, $ = /[\p{P}\p{S}]/u, j = /[\s\p{P}\p{S}]/u, X = /[^\s\p{P}\p{S}]/u, nt = c(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, j).getRegex(), rt = /[\p{Pi}\p{Ps}"']/u, ye = /(?!~)[\p{P}\p{S}]/u, st = /(?!~)[\s\p{P}\p{S}]/u, it = /(?:[^\s\p{P}\p{S}]|~)/u, ot = c(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _e = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, at = c(_e, "u").replace(/punct/g, $).getRegex(), lt = c(_e, "u").replace(/punct/g, ye).getRegex(), pt = c(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, rt).replace(/punct/g, $).getRegex(), $e = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ct = c($e, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, j).replace(/punct/g, $).getRegex(), ht = c($e, "gu").replace(/notPunctSpace/g, it).replace(/punctSpace/g, st).replace(/punct/g, ye).getRegex(), gt = c("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, j).replace(/punct/g, $).getRegex(), kt = c("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, j).replace(/punct/g, $).getRegex(), mt = c("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, j).replace(/punct/g, $).getRegex(), xt = c(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, $).getRegex(), Rt = c("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, j).replace(/punct/g, $).getRegex(), Tt = c(/\\(punct)/, "gu").replace(/punct/g, $).getRegex(), Ot = c(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, $).getRegex(), wt = c(/^<(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(), Pt = c(ue).replace("(?:-->|$)", "-->").getRegex(), St = c("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Pt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Le = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, re = c(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", Le).getRegex(), yt = c(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", re).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(), _t = c(/^!?\[(label)\]\[(ref)\]/).replace("label", re).replace("ref", le).getRegex(), $t = c(/^!?\[(ref)\](?:\[\])?/).replace("ref", le).getRegex(), be = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Lt = c(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", Le).getRegex(), Ct = c("reflink|nolink(?!\\()", "g").replace("reflink", c(/^!?\[(label)\]\[(ref)\]/).replace("label", Lt).replace("ref", be).getRegex()).replace("nolink", c(/^!?\[(ref)\](?:\[\])?/).replace("ref", be).getRegex()).getRegex(), Re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, At = c(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), ce = {
151
+ _backpedal: B,
152
+ anyPunctuation: Tt,
153
+ anyPunctuationOutsideCode: Ot,
154
+ autolink: wt,
155
+ blockSkip: ot,
156
+ br: Se,
157
+ code: et,
158
+ del: B,
159
+ delLDelim: B,
160
+ delRDelim: B,
161
+ emStrongLDelim: at,
162
+ emStrongRDelimAst: ct,
163
+ emStrongRDelimUnd: kt,
164
+ escape: Ye,
165
+ link: yt,
166
+ nolink: $t,
167
+ punctuation: nt,
168
+ reflink: _t,
169
+ reflinkSearch: Ct,
170
+ tag: St,
171
+ text: tt,
172
+ url: B
173
+ }, Et = {
174
+ ...ce,
175
+ emStrongLDelim: pt,
176
+ emStrongRDelimAst: gt,
177
+ emStrongRDelimUnd: mt,
178
+ link: c(/^!?\[(label)\]\((.*?)\)/).replace("label", re).getRegex(),
179
+ reflink: c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", re).getRegex()
180
+ }, ie = {
181
+ ...ce,
182
+ emStrongRDelimAst: ht,
183
+ emStrongLDelim: lt,
184
+ delLDelim: xt,
185
+ delRDelim: Rt,
186
+ url: c(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", At).replace("protocol", Re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
187
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
188
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
189
+ text: c(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", Re).replace(/emailProtocol/g, /(?:mailto|xmpp):/).replace("wwwStart", Te ? "(?<![^\\s*_~(])www\\." : "www\\.").getRegex()
190
+ }, zt = {
191
+ ...ie,
192
+ br: c(Se).replace("{2,}", "*").getRegex(),
193
+ text: c(ie.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
194
+ }, V = {
195
+ normal: pe,
196
+ gfm: Ve,
197
+ pedantic: Je
198
+ }, G = {
199
+ normal: ce,
200
+ gfm: ie,
201
+ breaks: zt,
202
+ pedantic: Et
203
+ };
204
+ var Mt = {
205
+ "&": "&amp;",
206
+ "<": "&lt;",
207
+ ">": "&gt;",
208
+ "\"": "&quot;",
209
+ "'": "&#39;"
210
+ }, Ce = (a) => Mt[a];
211
+ function P(a, e) {
212
+ if (e) {
213
+ if (T.escapeTest.test(a)) return a.replace(T.escapeReplace, Ce);
214
+ } else if (T.escapeTestNoEncode.test(a)) return a.replace(T.escapeReplaceNoEncode, Ce);
215
+ return a;
216
+ }
217
+ function Ie(a) {
218
+ return T.numericCharacterReference.test(a) ? a.replace(T.numericCharacterReferenceOrAmpersand, (e, t, n) => {
219
+ if (t === void 0 && n === void 0) return "&amp;";
220
+ let s = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
221
+ return s === 0 || s > 1114111 || s >= 55296 && s <= 57343 ? "�" : s === 38 ? "&amp;" : String.fromCodePoint(s);
222
+ }) : a;
223
+ }
224
+ function he(a) {
225
+ try {
226
+ a = encodeURI(a).replace(T.percentDecode, "%");
227
+ } catch {
228
+ return null;
229
+ }
230
+ return a;
231
+ }
232
+ function de(a, e) {
233
+ let n = a.replace(T.findPipe, (r, o, i) => {
234
+ let l = !1, p = o;
235
+ for (; --p >= 0 && i[p] === "\\";) l = !l;
236
+ return l ? "|" : " |";
237
+ }).split(T.splitPipe), s = 0;
238
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
239
+ else for (; n.length < e;) n.push("");
240
+ for (; s < n.length; s++) n[s] = n[s].trim().replace(T.slashPipe, "|");
241
+ return n;
242
+ }
243
+ function L(a, e, t) {
244
+ let n = a.length;
245
+ if (n === 0) return "";
246
+ let s = 0;
247
+ for (; s < n;) {
248
+ let r = a.charAt(n - s - 1);
249
+ if (r === e && !t) s++;
250
+ else if (r !== e && t) s++;
251
+ else break;
252
+ }
253
+ return a.slice(0, n - s);
254
+ }
255
+ function ge(a) {
256
+ let e = a.split(`
257
+ `), t = e.length - 1;
258
+ for (; t >= 0 && T.blankLine.test(e[t]);) t--;
259
+ return e.length - t <= 2 ? a : e.slice(0, t + 1).join(`
260
+ `);
261
+ }
262
+ function F(a) {
263
+ return a.trim().replace(T.multipleSpaceGlobal, " ").toLowerCase().toUpperCase().toLowerCase();
264
+ }
265
+ function ke(a, e) {
266
+ if (a.indexOf(e[0]) === -1 && a.indexOf(e[1]) === -1) return -1;
267
+ let t = 0;
268
+ for (let n = 0; n < a.length; n++) if (a[n] === "\\") n++;
269
+ else if (a[n] === e[0]) t++;
270
+ else if (a[n] === e[1] && (t--, t < 0)) return n;
271
+ return t > 0 ? -2 : -1;
272
+ }
273
+ var N = /* @__PURE__ */ new WeakMap();
274
+ function fe(a) {
275
+ let e = {
276
+ "*": -1,
277
+ _: -1
278
+ }, t = -1, n = a.length;
279
+ for (let s = 0; s < n; s++) {
280
+ let r = a[s];
281
+ if (r !== "*" && r !== "_" && r !== "~") continue;
282
+ let o = s === 0 ? `
283
+ ` : a[s - 1], i = s + 1;
284
+ for (; i < n && a[i] === r;) i++;
285
+ o !== " " && o !== " " && o !== `
286
+ ` && o !== "\r" && o !== "\f" && (r === "~" ? t = s : e[r] = s), s = i - 1;
287
+ }
288
+ return {
289
+ maskedSrc: a,
290
+ lastPossibleEmStrongCloserIndex: e,
291
+ lastPossibleDelCloserIndex: t
292
+ };
293
+ }
294
+ function Ae(a, e) {
295
+ let t = fe(e), n = N.get(a);
296
+ n ? n.push(t) : N.set(a, [t]);
297
+ }
298
+ function Ee(a) {
299
+ let e = N.get(a);
300
+ e && (e.pop(), e.length === 0 && N.delete(a));
301
+ }
302
+ function ze(a, e, t) {
303
+ let n = N.get(a)?.at(-1);
304
+ return n && n.maskedSrc === e ? n.lastPossibleEmStrongCloserIndex[t] : fe(e).lastPossibleEmStrongCloserIndex[t];
305
+ }
306
+ function Me(a, e) {
307
+ let t = N.get(a)?.at(-1);
308
+ return t && t.maskedSrc === e ? t.lastPossibleDelCloserIndex : fe(e).lastPossibleDelCloserIndex;
309
+ }
310
+ function J(a, e = 0) {
311
+ let t = e, n = "";
312
+ for (let s of a) if (s === " ") {
313
+ let r = 4 - t % 4;
314
+ n += " ".repeat(r), t += r;
315
+ } else n += s, t++;
316
+ return n;
317
+ }
318
+ function De(a, e, t, n, s) {
319
+ let r = e.href, o = e.title || null, i = a[1].replace(s.other.outputLinkReplace, "$1"), l = a[0].charAt(0) === "!", p = n.state.inLink, h = n.state.linkEmitted, u = n.state.inRawBlock;
320
+ n.state.inLink = !0, n.state.linkEmitted = !1;
321
+ let d = n.inlineTokens(i), k = n.state.linkEmitted;
322
+ if (n.state.linkEmitted = h, n.state.inLink = p, !l) {
323
+ if (k) {
324
+ n.state.inRawBlock = u;
325
+ return;
326
+ }
327
+ n.state.linkEmitted = !0;
328
+ }
329
+ return {
330
+ type: l ? "image" : "link",
331
+ raw: t,
332
+ href: r,
333
+ title: o,
334
+ text: i,
335
+ tokens: d
336
+ };
337
+ }
338
+ function Dt(a, e, t) {
339
+ let n = a.match(t.other.indentCodeCompensation);
340
+ if (n === null) return e;
341
+ let s = n[1];
342
+ return e.split(`
343
+ `).map((r) => {
344
+ let o = r.match(t.other.beginningSpace);
345
+ if (o === null) return r;
346
+ let [i] = o;
347
+ return r.slice(Math.min(i.length, s.length));
348
+ }).join(`
349
+ `);
350
+ }
351
+ function Be(a, e, t, n) {
352
+ if (!e.includes("<")) return !1;
353
+ for (let s = 0; s < e.length; s++) {
354
+ if (e[s] === "\\") {
355
+ s++;
356
+ continue;
357
+ }
358
+ if (e[s] === "`") {
359
+ let i = n.inline.code.exec(e.slice(s));
360
+ if (i) {
361
+ s += i[0].length - 1;
362
+ continue;
363
+ }
364
+ }
365
+ if (e[s] !== "<") continue;
366
+ let r = a.slice(t + s), o = n.inline.tag.exec(r) || n.inline.autolink.exec(r);
367
+ if (o) {
368
+ if (o[0].length > e.length - s) return !0;
369
+ s += o[0].length - 1;
370
+ }
371
+ }
372
+ return !1;
373
+ }
374
+ var _ = class {
375
+ constructor(e) {
376
+ _defineProperty(this, "options", void 0);
377
+ _defineProperty(this, "rules", void 0);
378
+ _defineProperty(this, "lexer", void 0);
379
+ this.options = e || S;
380
+ }
381
+ space(e) {
382
+ let t = this.rules.block.newline.exec(e);
383
+ if (t && t[0].length > 0) return {
384
+ type: "space",
385
+ raw: t[0]
386
+ };
387
+ }
388
+ code(e) {
389
+ let t = this.rules.block.code.exec(e);
390
+ if (t) {
391
+ let n = this.options.pedantic ? t[0] : ge(t[0]);
392
+ return {
393
+ type: "code",
394
+ raw: n,
395
+ codeBlockStyle: "indented",
396
+ text: n.replace(this.rules.other.codeRemoveIndent, "")
397
+ };
398
+ }
399
+ }
400
+ fences(e) {
401
+ let t = this.rules.block.fences.exec(e);
402
+ if (t) {
403
+ let n = t[0], s = Dt(n, t[3] || "", this.rules);
404
+ return {
405
+ type: "code",
406
+ raw: n,
407
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
408
+ text: s
409
+ };
410
+ }
411
+ }
412
+ heading(e) {
413
+ let t = this.rules.block.heading.exec(e);
414
+ if (t) {
415
+ let n = t[2].trim();
416
+ if (this.rules.other.endingHash.test(n)) {
417
+ let s = L(n, "#");
418
+ (this.options.pedantic || !s || this.rules.other.endingSpaceTabChar.test(s)) && (n = s.trim());
419
+ }
420
+ return {
421
+ type: "heading",
422
+ raw: L(t[0], `
423
+ `),
424
+ depth: t[1].length,
425
+ text: n,
426
+ tokens: this.lexer.inline(n)
427
+ };
428
+ }
429
+ }
430
+ hr(e) {
431
+ let t = this.rules.block.hr.exec(e);
432
+ if (t) return {
433
+ type: "hr",
434
+ raw: L(t[0], `
435
+ `)
436
+ };
437
+ }
438
+ blockquote(e) {
439
+ let t = this.rules.block.blockquote.exec(e);
440
+ if (t) {
441
+ let n = L(t[0], `
442
+ `).split(`
443
+ `), s = "", r = "", o = [];
444
+ for (; n.length > 0;) {
445
+ let i = !1, l = [], p;
446
+ for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) l.push(n[p]), i = !0;
447
+ else if (!i) l.push(n[p]);
448
+ else break;
449
+ n = n.slice(p);
450
+ let h = l.join(`
451
+ `), u = h.replace(this.rules.other.blockquoteMarkerWhitespace, (g, b, m) => b + J(m, b.length)).replace(this.rules.other.blockquoteSetextReplace, `
452
+ $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
453
+ s = s ? `${s}
454
+ ${h}` : h, r = r ? `${r}
455
+ ${u}` : u;
456
+ let d = this.lexer.state.top;
457
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(u, o, !0), this.lexer.state.top = d, n.length === 0) break;
458
+ let k = o.at(-1);
459
+ if (k?.type === "code" || k?.type === "heading" || k?.type === "hr" || k?.type === "html" || k?.type === "table") break;
460
+ if (k?.type === "blockquote") {
461
+ let g = k, b = n.join(`
462
+ `), m = g.raw + `
463
+ ` + b.replace(this.rules.other.blockquoteSetextReplace2, ""), f = this.blockquote(m);
464
+ o[o.length - 1] = f;
465
+ let y = m.substring(f.raw.length).replace(/^\n/, ""), R = y ? y.split(`
466
+ `).length : 0, A = R ? n.slice(0, -R) : n;
467
+ if (A.length > 0 && (s = `${s}
468
+ ${A.join(`
469
+ `)}`), r = r.substring(0, r.length - g.text.length) + f.text, n = n.slice(A.length), n.length > 0 && this.rules.other.blockquoteStart.test(n[0])) continue;
470
+ break;
471
+ } else if (k?.type === "list") {
472
+ let g = k, b = g.raw + `
473
+ ` + n.join(`
474
+ `), m = this.list(b);
475
+ o[o.length - 1] = m;
476
+ let f = m.raw.length > g.raw.length ? b.slice(g.raw.length + 1, m.raw.length).split(`
477
+ `).length : 0;
478
+ if (f > 0) {
479
+ let y = n.slice(0, f).join(`
480
+ `);
481
+ s = `${s}
482
+ ${y}`, r = `${r}
483
+ ${y}`;
484
+ }
485
+ n = n.slice(f);
486
+ continue;
487
+ }
488
+ }
489
+ return {
490
+ type: "blockquote",
491
+ raw: s,
492
+ tokens: o,
493
+ text: r
494
+ };
495
+ }
496
+ }
497
+ list(e) {
498
+ let t = this.rules.block.list.exec(e);
499
+ if (t) {
500
+ let n = e, s = () => n.length - e.length, r = t[1].trim(), o = r.length > 1, i = {
501
+ type: "list",
502
+ raw: "",
503
+ ordered: o,
504
+ start: o ? +r.slice(0, -1) : "",
505
+ loose: !1,
506
+ items: []
507
+ };
508
+ r = o ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = o ? r : "[*+-]");
509
+ let l = this.rules.other.listItemRegex(r), p = !1;
510
+ for (; e;) {
511
+ let u = !1, d = "";
512
+ if (!(t = l.exec(e)) || this.rules.block.hr.test(e)) break;
513
+ let k = s();
514
+ e = e.substring(t[0].length);
515
+ let g = t[2].split(`
516
+ `, 1)[0], b = t[1].length, m = this.options.pedantic ? J(g, b) : g.replace(this.rules.other.leadingSpaceTab, (v) => J(v, b)), f = e.split(`
517
+ `, 1)[0], y = !m.trim(), R = 0;
518
+ if (this.options.pedantic ? (R = 2, d = m.trimStart()) : y ? R = b + 1 : (R = m.search(this.rules.other.nonSpaceChar), R = R > 4 ? 1 : R, d = m.slice(R), R += b), y && this.rules.other.blankLine.test(f) && (e = e.substring(f.length + 1), u = !0), !u) {
519
+ let v = this.rules.other.nextBulletRegex(R), Q = this.rules.other.hrRegex(R), ee = this.rules.other.fencesBeginRegex(R), te = this.options.pedantic ? this.rules.other.pedanticHeadingBeginRegex(R) : this.rules.other.headingBeginRegex(R), M = this.rules.other.htmlBeginRegex(R), ne = this.rules.other.blockquoteBeginRegex(R);
520
+ for (; e;) {
521
+ let U = e.split(`
522
+ `, 1)[0], Z;
523
+ if (f = U, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), Z = f) : Z = f.replace(this.rules.other.leadingSpaceTab, (me) => J(me)), ee.test(f) || te.test(f) || M.test(f) || ne.test(f) || v.test(f) || Q.test(f)) break;
524
+ if (Z.search(this.rules.other.nonSpaceChar) >= R || !f.trim()) d += `
525
+ ` + Z.slice(R);
526
+ else {
527
+ if (y || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(m) || te.test(m) || M.test(m) || Q.test(m)) break;
528
+ let qe = !this.options.pedantic && /^ {0,3}(?:=+|-+) *$/.test(f) && this.rules.block.lheading.test(`${m}
529
+ ${f}`) ? ` ${Z.replace(/^ {0,3}/, "")}` : f;
530
+ d += `
531
+ ` + qe;
532
+ }
533
+ y = !f.trim(), e = e.substring(U.length + 1), m = Z.slice(R);
534
+ }
535
+ }
536
+ let A = n.slice(k, s());
537
+ i.loose || (p ? i.loose = !0 : this.rules.other.doubleBlankLine.test(A) && (p = !0)), i.items.push({
538
+ type: "list_item",
539
+ raw: A,
540
+ task: !!this.options.gfm && this.rules.other.listIsTask.test(d),
541
+ loose: !1,
542
+ text: d,
543
+ tokens: []
544
+ });
545
+ }
546
+ let h = i.items.at(-1);
547
+ if (h) h.raw = h.raw.trimEnd(), h.text = h.text.trimEnd();
548
+ else return;
549
+ i.raw = n.slice(0, s()).trimEnd();
550
+ for (let u of i.items) if (this.lexer.state.top = !1, u.tokens = this.lexer.blockTokens(u.text, []), !i.loose) {
551
+ let d = u.tokens.filter((g) => g.type === "space");
552
+ i.loose = d.length > 0 && d.some((g) => this.rules.other.anyLine.test(g.raw));
553
+ }
554
+ for (let u of i.items) {
555
+ let d = u.tokens[0];
556
+ if (u.task && (d?.type === "text" || d?.type === "paragraph")) {
557
+ u.text = u.text.replace(this.rules.other.listReplaceTask, ""), d.raw = d.raw.replace(this.rules.other.listReplaceTask, ""), d.text = d.text.replace(this.rules.other.listReplaceTask, "");
558
+ for (let g = this.lexer.inlineQueue.length - 1; g >= 0; g--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)) {
559
+ this.lexer.inlineQueue[g].src = this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask, "");
560
+ break;
561
+ }
562
+ let k = this.rules.other.listTaskCheckbox.exec(u.raw);
563
+ if (k) {
564
+ let g = {
565
+ type: "checkbox",
566
+ raw: k[0] + " ",
567
+ checked: k[0] !== "[ ]"
568
+ };
569
+ u.checked = g.checked, i.loose ? u.tokens[0] && ["paragraph", "text"].includes(u.tokens[0].type) && "tokens" in u.tokens[0] && u.tokens[0].tokens ? (u.tokens[0].raw = g.raw + u.tokens[0].raw, u.tokens[0].text = g.raw + u.tokens[0].text, u.tokens[0].tokens.unshift(g)) : u.tokens.unshift({
570
+ type: "paragraph",
571
+ raw: g.raw,
572
+ text: g.raw,
573
+ tokens: [g]
574
+ }) : u.tokens.unshift(g);
575
+ }
576
+ } else u.task && (u.task = !1);
577
+ }
578
+ if (i.loose) for (let u of i.items) {
579
+ u.loose = !0;
580
+ for (let d of u.tokens) d.type === "text" && (d.type = "paragraph");
581
+ }
582
+ return i;
583
+ }
584
+ }
585
+ html(e) {
586
+ let t = this.rules.block.html.exec(e);
587
+ if (t) {
588
+ let n = ge(t[0]);
589
+ return {
590
+ type: "html",
591
+ block: !0,
592
+ raw: n,
593
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
594
+ text: n
595
+ };
596
+ }
597
+ }
598
+ def(e) {
599
+ let t = this.rules.block.def.exec(e);
600
+ if (t) {
601
+ if (!this.rules.other.startAngleBracket.test(t[2]) && ke(t[2], "()") !== -1) return;
602
+ let n = F(t[1]), s = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
603
+ return {
604
+ type: "def",
605
+ tag: n,
606
+ raw: L(t[0], `
607
+ `),
608
+ href: s,
609
+ title: r
610
+ };
611
+ }
612
+ }
613
+ table(e) {
614
+ let t = this.rules.block.table.exec(e);
615
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
616
+ let n = de(t[1]), s = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
617
+ `) : [], o = {
618
+ type: "table",
619
+ raw: L(t[0], `
620
+ `),
621
+ header: [],
622
+ align: [],
623
+ rows: []
624
+ };
625
+ if (n.length === s.length) {
626
+ for (let i of s) this.rules.other.tableAlignRight.test(i) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(i) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(i) ? o.align.push("left") : o.align.push(null);
627
+ for (let i = 0; i < n.length; i++) o.header.push({
628
+ text: n[i],
629
+ tokens: this.lexer.inline(n[i]),
630
+ header: !0,
631
+ align: o.align[i]
632
+ });
633
+ for (let i of r) o.rows.push(de(i, o.header.length).map((l, p) => ({
634
+ text: l,
635
+ tokens: this.lexer.inline(l),
636
+ header: !1,
637
+ align: o.align[p]
638
+ })));
639
+ return o;
640
+ }
641
+ }
642
+ lheading(e) {
643
+ let t = this.rules.block.lheading.exec(e);
644
+ if (t) {
645
+ let n = t[1].trim();
646
+ return {
647
+ type: "heading",
648
+ raw: L(t[0], `
649
+ `),
650
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
651
+ text: n,
652
+ tokens: this.lexer.inline(n)
653
+ };
654
+ }
655
+ }
656
+ paragraph(e) {
657
+ let t = this.rules.block.paragraph.exec(e);
658
+ if (t) {
659
+ let n = t[1].charAt(t[1].length - 1) === `
660
+ ` ? t[1].slice(0, -1) : t[1];
661
+ return {
662
+ type: "paragraph",
663
+ raw: t[0],
664
+ text: n,
665
+ tokens: this.lexer.inline(n)
666
+ };
667
+ }
668
+ }
669
+ text(e) {
670
+ let t = this.rules.block.text.exec(e);
671
+ if (t) return {
672
+ type: "text",
673
+ raw: t[0],
674
+ text: t[0],
675
+ tokens: this.lexer.inline(t[0])
676
+ };
677
+ }
678
+ escape(e) {
679
+ let t = this.rules.inline.escape.exec(e);
680
+ if (t) return {
681
+ type: "escape",
682
+ raw: t[0],
683
+ text: t[1]
684
+ };
685
+ }
686
+ tag(e) {
687
+ let t = this.rules.inline.tag.exec(e);
688
+ 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), {
689
+ type: "html",
690
+ raw: t[0],
691
+ inLink: this.lexer.state.inLink,
692
+ inRawBlock: this.lexer.state.inRawBlock,
693
+ block: !1,
694
+ text: t[0]
695
+ };
696
+ }
697
+ link(e) {
698
+ if (this.lexer.state.linkParenPossible === !1) return;
699
+ let t = this.rules.inline.link.exec(e);
700
+ if (t) {
701
+ let n = t[0].charAt(0) === "!" ? 2 : 1;
702
+ if (!this.options.pedantic && Be(e, t[1], n, this.rules)) return;
703
+ let s = t[2].trim();
704
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(s)) {
705
+ if (!this.rules.other.endAngleBracket.test(s)) return;
706
+ let l = L(s.slice(0, -1), "\\");
707
+ if ((s.length - l.length) % 2 === 0) return;
708
+ } else {
709
+ let l = ke(t[2], "()");
710
+ if (l === -2) return;
711
+ if (l > -1) {
712
+ let h = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + l;
713
+ t[2] = t[2].substring(0, l), t[0] = t[0].substring(0, h).trim(), t[3] = "";
714
+ }
715
+ }
716
+ let r = L(t[0].slice(0, -1), "\\");
717
+ if ((t[0].length - r.length) % 2 === 0) return;
718
+ let o = t[2], i = "";
719
+ if (this.options.pedantic) {
720
+ let l = this.rules.other.pedanticHrefTitle.exec(o);
721
+ l && (o = l[1], i = l[3]);
722
+ } else i = t[3] ? t[3].slice(1, -1) : "";
723
+ return o = o.trim(), this.rules.other.startAngleBracket.test(o) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(s) ? o = o.slice(1) : o = o.slice(1, -1)), De(t, {
724
+ href: o && o.replace(this.rules.inline.anyPunctuation, "$1"),
725
+ title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
726
+ }, t[0], this.lexer, this.rules);
727
+ }
728
+ }
729
+ reflink(e, t) {
730
+ let n;
731
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
732
+ let s = n[0].charAt(0) === "!" ? 2 : 1;
733
+ if (!this.options.pedantic && Be(e, n[1], s, this.rules)) return;
734
+ let r = t[F(n[2] || n[1])];
735
+ if (!r) {
736
+ let o = n[0].charAt(0);
737
+ return {
738
+ type: "text",
739
+ raw: o,
740
+ text: o
741
+ };
742
+ }
743
+ return De(n, r, n[0], this.lexer, this.rules);
744
+ }
745
+ }
746
+ emStrong(e, t, n = "") {
747
+ let s = this.rules.inline.emStrongLDelim.exec(e);
748
+ if (!s || !s[1] && !s[2] && !s[3] && !s[4]) return;
749
+ let r = s[0][0], o = n === r, i = t.length - e.length, l = i;
750
+ for (; !this.options.pedantic && l > 0 && t[l - 1] === r;) l--;
751
+ let p = [...t.slice(Math.max(0, l - 2), l)].at(-1) ?? "", h = p === "*" || p === "_" || !!this.rules.inline.punctuation.exec(p);
752
+ l < i && (n = p);
753
+ let u = l < i ? h : !!this.rules.inline.punctuation.exec(n);
754
+ if (s[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
755
+ let d = s[1] || s[3] || "";
756
+ if (!d || !n || u) {
757
+ let k = [...s[0]].length - 1, g, b, m = k, f = 0, y = i - l + k, R = !this.options.pedantic && !!p.trim() && (!!d || r === "*" && !h);
758
+ if (r !== "*" && r !== "_") return;
759
+ let A = r === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd, v = ze(this, t, r), Q = t.length - e.length + k;
760
+ if (v < Q) return;
761
+ t = t.slice(-1 * e.length + k);
762
+ let ee = v - Q;
763
+ for (A.lastIndex = 0; (s = A.exec(t)) !== null && !(s.index > ee);) {
764
+ if (g = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !g) continue;
765
+ if (b = [...g].length, s[3] || s[4]) {
766
+ m += b;
767
+ continue;
768
+ } else if (s[5] || s[6] || R) {
769
+ if (o && (s[5] || s[6])) break;
770
+ if (y % 3 && !((y + b) % 3)) {
771
+ f += b;
772
+ continue;
773
+ }
774
+ }
775
+ if (m -= b, m > 0) continue;
776
+ b = Math.min(b, b + m + f);
777
+ let te = [...s[0]][0].length, M = e.slice(0, k + s.index + te + b);
778
+ if (Math.min(k, b) % 2) {
779
+ let U = M.slice(1, -1);
780
+ return {
781
+ type: "em",
782
+ raw: M,
783
+ text: U,
784
+ tokens: this.lexer.inlineTokens(U)
785
+ };
786
+ }
787
+ let ne = M.slice(2, -2);
788
+ return {
789
+ type: "strong",
790
+ raw: M,
791
+ text: ne,
792
+ tokens: this.lexer.inlineTokens(ne)
793
+ };
794
+ }
795
+ }
796
+ }
797
+ codespan(e) {
798
+ let t = this.rules.inline.code.exec(e);
799
+ if (t) {
800
+ let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), s = this.rules.other.nonSpaceChar.test(n), r = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
801
+ return s && r && (n = n.substring(1, n.length - 1)), {
802
+ type: "codespan",
803
+ raw: t[0],
804
+ text: n
805
+ };
806
+ }
807
+ }
808
+ br(e) {
809
+ let t = this.rules.inline.br.exec(e);
810
+ if (t) return {
811
+ type: "br",
812
+ raw: t[0]
813
+ };
814
+ }
815
+ del(e, t, n = "") {
816
+ let s = this.rules.inline.delLDelim.exec(e);
817
+ if (!s) return;
818
+ if (!(s[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
819
+ let o = [...s[0]].length - 1, i, l, p = o, h = this.rules.inline.delRDelim, u = Me(this, t), d = t.length - e.length + o;
820
+ if (u < d) return;
821
+ t = t.slice(-1 * e.length + o);
822
+ let k = u - d;
823
+ for (h.lastIndex = 0; (s = h.exec(t)) !== null && !(s.index > k);) {
824
+ if (i = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !i || (l = [...i].length, l !== o)) continue;
825
+ if (s[3] || s[4]) {
826
+ p += l;
827
+ continue;
828
+ }
829
+ if (p -= l, p > 0) continue;
830
+ l = Math.min(l, l + p);
831
+ let g = [...s[0]][0].length, b = e.slice(0, o + s.index + g + l), m = b.slice(o, -o);
832
+ return {
833
+ type: "del",
834
+ raw: b,
835
+ text: m,
836
+ tokens: this.lexer.inlineTokens(m)
837
+ };
838
+ }
839
+ }
840
+ }
841
+ autolink(e) {
842
+ let t = this.rules.inline.autolink.exec(e);
843
+ if (t) {
844
+ let n, s;
845
+ return t[2] === "@" ? (n = t[1], s = "mailto:" + n) : (n = t[1], s = n), {
846
+ type: "link",
847
+ raw: t[0],
848
+ text: n,
849
+ href: s,
850
+ autolink: !0,
851
+ tokens: [{
852
+ type: "text",
853
+ raw: n,
854
+ text: n
855
+ }]
856
+ };
857
+ }
858
+ }
859
+ url(e) {
860
+ let t;
861
+ if (t = this.rules.inline.url.exec(e)) {
862
+ let n, s;
863
+ if (t[2] === "@") n = t[0], s = "mailto:" + n;
864
+ else {
865
+ let r;
866
+ do
867
+ r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
868
+ while (r !== t[0]);
869
+ n = t[0], t[1] === "www." ? s = "http://" + t[0] : s = t[0];
870
+ }
871
+ return {
872
+ type: "link",
873
+ raw: t[0],
874
+ text: n,
875
+ href: s,
876
+ autolink: !0,
877
+ tokens: [{
878
+ type: "text",
879
+ raw: n,
880
+ text: n
881
+ }]
882
+ };
883
+ }
884
+ }
885
+ inlineText(e) {
886
+ let t = this.rules.inline.text.exec(e);
887
+ if (t) {
888
+ let n = this.lexer.state.inRawBlock;
889
+ return {
890
+ type: "text",
891
+ raw: t[0],
892
+ text: n ? t[0] : Ie(t[0]),
893
+ escaped: n
894
+ };
895
+ }
896
+ }
897
+ };
898
+ var O = (_a_brand = /* @__PURE__ */ new WeakSet(), class a {
899
+ constructor(e) {
900
+ _classPrivateMethodInitSpec(this, _a_brand);
901
+ _defineProperty(this, "tokens", void 0);
902
+ _defineProperty(this, "options", void 0);
903
+ _defineProperty(this, "state", void 0);
904
+ _defineProperty(this, "inlineQueue", void 0);
905
+ _defineProperty(this, "tokenizer", void 0);
906
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || S, this.options.tokenizer = this.options.tokenizer || new _(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
907
+ inLink: !1,
908
+ inRawBlock: !1,
909
+ linkEmitted: !1,
910
+ linkParenPossible: !0,
911
+ top: !0
912
+ };
913
+ let t = {
914
+ other: T,
915
+ block: V.normal,
916
+ inline: G.normal
917
+ };
918
+ this.options.pedantic ? (t.block = V.pedantic, t.inline = G.pedantic) : this.options.gfm && (t.block = V.gfm, this.options.breaks ? t.inline = G.breaks : t.inline = G.gfm), this.tokenizer.rules = t;
919
+ }
920
+ static get rules() {
921
+ return {
922
+ block: V,
923
+ inline: G
924
+ };
925
+ }
926
+ static lex(e, t) {
927
+ return new a(t).lex(e);
928
+ }
929
+ static lexInline(e, t) {
930
+ return new a(t).inlineTokens(e);
931
+ }
932
+ lex(e) {
933
+ e = e.replace(T.carriageReturn, `
934
+ `), this.blockTokens(e, this.tokens);
935
+ for (let t = 0; t < this.inlineQueue.length; t++) {
936
+ let n = this.inlineQueue[t];
937
+ this.state.inRawBlock = !1, this.inlineTokens(n.src, n.tokens);
938
+ }
939
+ return this.inlineQueue = [], this.tokens;
940
+ }
941
+ blockTokens(e, t = [], n = !1) {
942
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(T.tabCharGlobal, " ").replace(T.spaceLine, ""));
943
+ let s = Infinity;
944
+ for (; e;) {
945
+ if (e.length < s) s = e.length;
946
+ else {
947
+ this.infiniteLoopError(e.charCodeAt(0));
948
+ break;
949
+ }
950
+ let r;
951
+ if (this.options.extensions?.block?.some((i) => (r = i.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
952
+ if (r = this.tokenizer.space(e)) {
953
+ e = e.substring(r.raw.length);
954
+ let i = t.at(-1);
955
+ r.raw.length === 1 && i !== void 0 ? i.raw += `
956
+ ` : t.push(r);
957
+ continue;
958
+ }
959
+ if (r = this.tokenizer.code(e)) {
960
+ e = e.substring(r.raw.length);
961
+ let i = t.at(-1);
962
+ i?.type === "paragraph" || i?.type === "text" ? (i.raw += (i.raw.endsWith(`
963
+ `) ? "" : `
964
+ `) + r.raw, i.text += `
965
+ ` + r.text, this.inlineQueue.at(-1).src = i.text) : t.push(r);
966
+ continue;
967
+ }
968
+ if (r = this.tokenizer.fences(e)) {
969
+ e = e.substring(r.raw.length), t.push(r);
970
+ continue;
971
+ }
972
+ if (r = this.tokenizer.heading(e)) {
973
+ e = e.substring(r.raw.length), t.push(r);
974
+ continue;
975
+ }
976
+ if (r = this.tokenizer.hr(e)) {
977
+ e = e.substring(r.raw.length), t.push(r);
978
+ continue;
979
+ }
980
+ if (r = this.tokenizer.blockquote(e)) {
981
+ e = e.substring(r.raw.length), t.push(r);
982
+ continue;
983
+ }
984
+ if (r = this.tokenizer.list(e)) {
985
+ e = e.substring(r.raw.length), t.push(r);
986
+ continue;
987
+ }
988
+ if (r = this.tokenizer.html(e)) {
989
+ e = e.substring(r.raw.length), t.push(r);
990
+ continue;
991
+ }
992
+ if (r = this.tokenizer.def(e)) {
993
+ e = e.substring(r.raw.length);
994
+ let i = t.at(-1);
995
+ i?.type === "paragraph" || i?.type === "text" ? (i.raw += (i.raw.endsWith(`
996
+ `) ? "" : `
997
+ `) + r.raw, i.text += `
998
+ ` + r.raw, this.inlineQueue.at(-1).src = i.text) : (this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
999
+ href: r.href,
1000
+ title: r.title
1001
+ }), t.push(r));
1002
+ continue;
1003
+ }
1004
+ if (r = this.tokenizer.table(e)) {
1005
+ e = e.substring(r.raw.length), t.push(r);
1006
+ continue;
1007
+ }
1008
+ if (r = this.tokenizer.lheading(e)) {
1009
+ e = e.substring(r.raw.length), t.push(r);
1010
+ continue;
1011
+ }
1012
+ let o = e;
1013
+ if (this.options.extensions?.startBlock) {
1014
+ let i = Infinity, l = e.slice(1), p;
1015
+ this.options.extensions.startBlock.forEach((h) => {
1016
+ p = h.call({ lexer: this }, l), typeof p == "number" && p >= 0 && (i = Math.min(i, p));
1017
+ }), i < Infinity && i >= 0 && (o = e.substring(0, i + 1));
1018
+ }
1019
+ if (this.state.top && (r = this.tokenizer.paragraph(o))) {
1020
+ let i = t.at(-1);
1021
+ n && i?.type === "paragraph" ? (i.raw += (i.raw.endsWith(`
1022
+ `) ? "" : `
1023
+ `) + r.raw, i.text += `
1024
+ ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i.text) : t.push(r), n = o.length !== e.length, e = e.substring(r.raw.length);
1025
+ continue;
1026
+ }
1027
+ if (r = this.tokenizer.text(e)) {
1028
+ e = e.substring(r.raw.length);
1029
+ let i = t.at(-1);
1030
+ i?.type === "text" ? (i.raw += (i.raw.endsWith(`
1031
+ `) ? "" : `
1032
+ `) + r.raw, i.text += `
1033
+ ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i.text) : t.push(r);
1034
+ continue;
1035
+ }
1036
+ if (e) {
1037
+ this.infiniteLoopError(e.charCodeAt(0));
1038
+ break;
1039
+ }
1040
+ }
1041
+ return this.state.top = !0, t;
1042
+ }
1043
+ inline(e, t = []) {
1044
+ return this.inlineQueue.push({
1045
+ src: e,
1046
+ tokens: t
1047
+ }), t;
1048
+ }
1049
+ linkInText(e) {
1050
+ if (!e.includes("[")) return !1;
1051
+ let t = this.tokenizer.rules.inline.link;
1052
+ for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return !0;
1053
+ for (let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
1054
+ let s = n[0], r = s.lastIndexOf("[");
1055
+ if (!(s.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, F(s.slice(r + 1, -1)))) && !(r > 1 && this.linkInText(s.slice(1, r - 1)))) return !0;
1056
+ }
1057
+ return !1;
1058
+ }
1059
+ inlineTokens(e, t = []) {
1060
+ this.tokenizer.lexer = this;
1061
+ let n = this.state.linkParenPossible;
1062
+ this.state.linkParenPossible = n && e.includes(")");
1063
+ try {
1064
+ return _assertClassBrand(_a_brand, this, _e2).call(this, e, t);
1065
+ } finally {
1066
+ this.state.linkParenPossible = n;
1067
+ }
1068
+ }
1069
+ infiniteLoopError(e) {
1070
+ let t = "Infinite loop on byte: " + e;
1071
+ if (this.options.silent) console.error(t);
1072
+ else throw new Error(t);
1073
+ }
1074
+ });
1075
+ function _e2(e, t) {
1076
+ let n = e.includes("*") || e.includes("_") || e.includes("~") || this.options.hooks?.emStrongMask || this.tokenizer.emStrong !== _.prototype.emStrong || this.tokenizer.del !== _.prototype.del ? _assertClassBrand(_a_brand, this, _n2).call(this, e) : e;
1077
+ Ae(this.tokenizer, n);
1078
+ try {
1079
+ return _assertClassBrand(_a_brand, this, _t2).call(this, e, n, t);
1080
+ } finally {
1081
+ Ee(this.tokenizer);
1082
+ }
1083
+ }
1084
+ function _t2(e, t, n) {
1085
+ let s = !1, r = "", o = Infinity;
1086
+ for (; e;) {
1087
+ if (e.length < o) o = e.length;
1088
+ else {
1089
+ this.infiniteLoopError(e.charCodeAt(0));
1090
+ break;
1091
+ }
1092
+ s || (r = ""), s = !1;
1093
+ let i;
1094
+ if (this.options.extensions?.inline?.some((p) => (i = p.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1)) continue;
1095
+ if (i = this.tokenizer.escape(e)) {
1096
+ e = e.substring(i.raw.length), n.push(i);
1097
+ continue;
1098
+ }
1099
+ if (i = this.tokenizer.tag(e)) {
1100
+ e = e.substring(i.raw.length), n.push(i);
1101
+ continue;
1102
+ }
1103
+ if (i = this.tokenizer.link(e)) {
1104
+ e = e.substring(i.raw.length), n.push(i);
1105
+ continue;
1106
+ }
1107
+ if (i = this.tokenizer.reflink(e, this.tokens.links)) {
1108
+ e = e.substring(i.raw.length);
1109
+ let p = n.at(-1);
1110
+ i.type === "text" && p?.type === "text" ? (p.raw += i.raw, p.text += i.text) : n.push(i);
1111
+ continue;
1112
+ }
1113
+ if (i = this.tokenizer.emStrong(e, t, r)) {
1114
+ e = e.substring(i.raw.length), n.push(i);
1115
+ continue;
1116
+ }
1117
+ if (i = this.tokenizer.codespan(e)) {
1118
+ e = e.substring(i.raw.length), n.push(i);
1119
+ continue;
1120
+ }
1121
+ if (i = this.tokenizer.br(e)) {
1122
+ e = e.substring(i.raw.length), n.push(i);
1123
+ continue;
1124
+ }
1125
+ if (i = this.tokenizer.del(e, t, r)) {
1126
+ e = e.substring(i.raw.length), n.push(i);
1127
+ continue;
1128
+ }
1129
+ if (i = this.tokenizer.autolink(e)) {
1130
+ e = e.substring(i.raw.length), n.push(i);
1131
+ continue;
1132
+ }
1133
+ if (!this.state.inLink && (i = this.tokenizer.url(e))) {
1134
+ e = e.substring(i.raw.length), n.push(i);
1135
+ continue;
1136
+ }
1137
+ let l = e;
1138
+ if (this.options.extensions?.startInline) {
1139
+ let p = Infinity, h = e.slice(1), u;
1140
+ this.options.extensions.startInline.forEach((d) => {
1141
+ u = d.call({ lexer: this }, h), typeof u == "number" && u >= 0 && (p = Math.min(p, u));
1142
+ }), p < Infinity && p >= 0 && (l = e.substring(0, p + 1));
1143
+ }
1144
+ if (i = this.tokenizer.inlineText(l)) {
1145
+ e = e.substring(i.raw.length), i.raw.slice(-1) !== "_" && (r = i.raw.slice(-1)), s = !0;
1146
+ let p = n.at(-1);
1147
+ p?.type === "text" ? (p.raw += i.raw, p.text += i.text) : n.push(i);
1148
+ continue;
1149
+ }
1150
+ if (e) {
1151
+ this.infiniteLoopError(e.charCodeAt(0));
1152
+ break;
1153
+ }
1154
+ }
1155
+ return n;
1156
+ }
1157
+ function _n2(e) {
1158
+ let t = e;
1159
+ if (this.tokens.links && e.includes("[")) {
1160
+ let n = this.tokenizer.rules.inline.reflinkSearch, s = (r) => {
1161
+ let o = r.lastIndexOf("[");
1162
+ if (!Object.hasOwn(this.tokens.links, F(r.slice(o + 1, -1)))) return r;
1163
+ if (o > 1 && r.charAt(0) !== "!") {
1164
+ let i = r.slice(1, o - 1);
1165
+ if (this.linkInText(i)) return "[" + i.replace(n, s) + "][" + "a".repeat(r.length - o - 2) + "]";
1166
+ }
1167
+ return "[" + "a".repeat(r.length - 2) + "]";
1168
+ };
1169
+ t = t.replace(n, s);
1170
+ }
1171
+ return t = t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode, (n, s, r) => r ? "+".repeat(n.length) : s ? s + n.slice(s.length, -s.length).replace(/`/g, "+") + s : n), t = t.replace(this.tokenizer.rules.inline.blockSkip, (n, s, r) => {
1172
+ let o = r ? r.length : 0;
1173
+ return n.slice(0, o) + "[" + "a".repeat(n.length - o - 2) + "]";
1174
+ }), t = this.options.hooks?.emStrongMask?.call({ lexer: this }, t) ?? t, t;
1175
+ }
1176
+ var C = class {
1177
+ constructor(e) {
1178
+ _defineProperty(this, "options", void 0);
1179
+ _defineProperty(this, "parser", void 0);
1180
+ this.options = e || S;
1181
+ }
1182
+ space(e) {
1183
+ return "";
1184
+ }
1185
+ code({ text: e, lang: t, escaped: n }) {
1186
+ let s = (t || "").match(T.notSpaceStart)?.[0], r = e ? e.replace(T.endingNewline, "") + `
1187
+ ` : "";
1188
+ return s ? "<pre><code class=\"language-" + P(s) + "\">" + (n ? r : P(r, !0)) + `</code></pre>
1189
+ ` : "<pre><code>" + (n ? r : P(r, !0)) + `</code></pre>
1190
+ `;
1191
+ }
1192
+ blockquote({ tokens: e }) {
1193
+ return `<blockquote>
1194
+ ${this.parser.parse(e)}</blockquote>
1195
+ `;
1196
+ }
1197
+ html({ text: e }) {
1198
+ return e;
1199
+ }
1200
+ def(e) {
1201
+ return "";
1202
+ }
1203
+ heading({ tokens: e, depth: t }) {
1204
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1205
+ `;
1206
+ }
1207
+ hr(e) {
1208
+ return `<hr>
1209
+ `;
1210
+ }
1211
+ list(e) {
1212
+ let t = e.ordered, n = e.start, s = "";
1213
+ for (let i = 0; i < e.items.length; i++) {
1214
+ let l = e.items[i];
1215
+ s += this.listitem(l);
1216
+ }
1217
+ let r = t ? "ol" : "ul", o = t && n !== 1 ? " start=\"" + n + "\"" : "";
1218
+ return "<" + r + o + `>
1219
+ ` + s + "</" + r + `>
1220
+ `;
1221
+ }
1222
+ listitem(e) {
1223
+ return `<li>${this.parser.parse(e.tokens)}</li>
1224
+ `;
1225
+ }
1226
+ checkbox({ checked: e }) {
1227
+ return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1228
+ }
1229
+ paragraph({ tokens: e }) {
1230
+ return `<p>${this.parser.parseInline(e)}</p>
1231
+ `;
1232
+ }
1233
+ table(e) {
1234
+ let t = "", n = "";
1235
+ for (let r = 0; r < e.header.length; r++) n += this.tablecell(e.header[r]);
1236
+ t += this.tablerow({ text: n });
1237
+ let s = "";
1238
+ for (let r = 0; r < e.rows.length; r++) {
1239
+ let o = e.rows[r];
1240
+ n = "";
1241
+ for (let i = 0; i < o.length; i++) n += this.tablecell(o[i]);
1242
+ s += this.tablerow({ text: n });
1243
+ }
1244
+ return s && (s = `<tbody>${s}</tbody>`), `<table>
1245
+ <thead>
1246
+ ` + t + `</thead>
1247
+ ` + s + `</table>
1248
+ `;
1249
+ }
1250
+ tablerow({ text: e }) {
1251
+ return `<tr>
1252
+ ${e}</tr>
1253
+ `;
1254
+ }
1255
+ tablecell(e) {
1256
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1257
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1258
+ `;
1259
+ }
1260
+ strong({ tokens: e }) {
1261
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1262
+ }
1263
+ em({ tokens: e }) {
1264
+ return `<em>${this.parser.parseInline(e)}</em>`;
1265
+ }
1266
+ codespan({ text: e }) {
1267
+ return `<code>${P(e, !0)}</code>`;
1268
+ }
1269
+ br(e) {
1270
+ return "<br>";
1271
+ }
1272
+ del({ tokens: e }) {
1273
+ return `<del>${this.parser.parseInline(e)}</del>`;
1274
+ }
1275
+ link({ href: e, title: t, text: n, tokens: s, autolink: r }) {
1276
+ let o = r ? P(n, !0) : this.parser.parseInline(s), i = he(e);
1277
+ if (i === null) return o;
1278
+ e = P(i, r);
1279
+ let l = "<a href=\"" + e + "\"";
1280
+ return t && (l += " title=\"" + P(t) + "\""), l += ">" + o + "</a>", l;
1281
+ }
1282
+ image({ href: e, title: t, text: n, tokens: s }) {
1283
+ s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1284
+ let r = he(e);
1285
+ if (r === null) return P(n);
1286
+ e = r;
1287
+ let o = `<img src="${P(e)}" alt="${P(n)}"`;
1288
+ return t && (o += ` title="${P(t)}"`), o += ">", o;
1289
+ }
1290
+ text(e) {
1291
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : P(e.text);
1292
+ }
1293
+ };
1294
+ var E = class {
1295
+ constructor() {
1296
+ _defineProperty(this, "parser", void 0);
1297
+ }
1298
+ strong({ text: e, tokens: t }) {
1299
+ return t ? this.parser.parseInline(t, this) : e;
1300
+ }
1301
+ em({ text: e, tokens: t }) {
1302
+ return t ? this.parser.parseInline(t, this) : e;
1303
+ }
1304
+ codespan({ text: e }) {
1305
+ return e;
1306
+ }
1307
+ del({ text: e, tokens: t }) {
1308
+ return t ? this.parser.parseInline(t, this) : e;
1309
+ }
1310
+ html({ text: e }) {
1311
+ return e;
1312
+ }
1313
+ text({ text: e }) {
1314
+ return e;
1315
+ }
1316
+ link({ text: e, tokens: t }) {
1317
+ return t ? this.parser.parseInline(t, this) : e;
1318
+ }
1319
+ image({ text: e, tokens: t }) {
1320
+ return t ? this.parser.parseInline(t, this) : e;
1321
+ }
1322
+ br() {
1323
+ return "";
1324
+ }
1325
+ checkbox({ raw: e }) {
1326
+ return e;
1327
+ }
1328
+ };
1329
+ var w = class a {
1330
+ constructor(e) {
1331
+ _defineProperty(this, "options", void 0);
1332
+ _defineProperty(this, "renderer", void 0);
1333
+ _defineProperty(this, "textRenderer", void 0);
1334
+ this.options = e || S, this.options.renderer = this.options.renderer || new C(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new E(), this.textRenderer.parser = this;
1335
+ }
1336
+ static parse(e, t) {
1337
+ return new a(t).parse(e);
1338
+ }
1339
+ static parseInline(e, t) {
1340
+ return new a(t).parseInline(e);
1341
+ }
1342
+ parse(e) {
1343
+ this.renderer.parser = this;
1344
+ let t = "";
1345
+ for (let n = 0; n < e.length; n++) {
1346
+ let s = e[n];
1347
+ if (this.options.extensions?.renderers?.[s.type]) {
1348
+ let o = s, i = this.options.extensions.renderers[o.type].call({ parser: this }, o);
1349
+ if (i !== !1 || ![
1350
+ "space",
1351
+ "hr",
1352
+ "heading",
1353
+ "code",
1354
+ "table",
1355
+ "blockquote",
1356
+ "list",
1357
+ "checkbox",
1358
+ "html",
1359
+ "def",
1360
+ "paragraph",
1361
+ "text"
1362
+ ].includes(o.type)) {
1363
+ t += i || "";
1364
+ continue;
1365
+ }
1366
+ }
1367
+ let r = s;
1368
+ switch (r.type) {
1369
+ case "space":
1370
+ t += this.renderer.space(r);
1371
+ break;
1372
+ case "hr":
1373
+ t += this.renderer.hr(r);
1374
+ break;
1375
+ case "heading":
1376
+ t += this.renderer.heading(r);
1377
+ break;
1378
+ case "code":
1379
+ t += this.renderer.code(r);
1380
+ break;
1381
+ case "table":
1382
+ t += this.renderer.table(r);
1383
+ break;
1384
+ case "blockquote":
1385
+ t += this.renderer.blockquote(r);
1386
+ break;
1387
+ case "list":
1388
+ t += this.renderer.list(r);
1389
+ break;
1390
+ case "checkbox":
1391
+ t += this.renderer.checkbox(r);
1392
+ break;
1393
+ case "html":
1394
+ t += this.renderer.html(r);
1395
+ break;
1396
+ case "def":
1397
+ t += this.renderer.def(r);
1398
+ break;
1399
+ case "paragraph":
1400
+ t += this.renderer.paragraph(r);
1401
+ break;
1402
+ case "text":
1403
+ t += this.renderer.text(r);
1404
+ break;
1405
+ default: {
1406
+ let o = "Token with \"" + r.type + "\" type was not found.";
1407
+ if (this.options.silent) return console.error(o), "";
1408
+ throw new Error(o);
1409
+ }
1410
+ }
1411
+ }
1412
+ return t;
1413
+ }
1414
+ parseInline(e, t = this.renderer) {
1415
+ this.renderer.parser = this;
1416
+ let n = "";
1417
+ for (let s = 0; s < e.length; s++) {
1418
+ let r = e[s];
1419
+ if (this.options.extensions?.renderers?.[r.type]) {
1420
+ let i = this.options.extensions.renderers[r.type].call({ parser: this }, r);
1421
+ if (i !== !1 || ![
1422
+ "escape",
1423
+ "html",
1424
+ "link",
1425
+ "image",
1426
+ "checkbox",
1427
+ "strong",
1428
+ "em",
1429
+ "codespan",
1430
+ "br",
1431
+ "del",
1432
+ "text"
1433
+ ].includes(r.type)) {
1434
+ n += i || "";
1435
+ continue;
1436
+ }
1437
+ }
1438
+ let o = r;
1439
+ switch (o.type) {
1440
+ case "escape":
1441
+ n += t.text(o);
1442
+ break;
1443
+ case "html":
1444
+ n += t.html(o);
1445
+ break;
1446
+ case "link":
1447
+ n += t.link(o);
1448
+ break;
1449
+ case "image":
1450
+ n += t.image(o);
1451
+ break;
1452
+ case "checkbox":
1453
+ n += t.checkbox(o);
1454
+ break;
1455
+ case "strong":
1456
+ n += t.strong(o);
1457
+ break;
1458
+ case "em":
1459
+ n += t.em(o);
1460
+ break;
1461
+ case "codespan":
1462
+ n += t.codespan(o);
1463
+ break;
1464
+ case "br":
1465
+ n += t.br(o);
1466
+ break;
1467
+ case "del":
1468
+ n += t.del(o);
1469
+ break;
1470
+ case "text":
1471
+ n += t.text(o);
1472
+ break;
1473
+ default: {
1474
+ let i = "Token with \"" + o.type + "\" type was not found.";
1475
+ if (this.options.silent) return console.error(i), "";
1476
+ throw new Error(i);
1477
+ }
1478
+ }
1479
+ }
1480
+ return n;
1481
+ }
1482
+ };
1483
+ var I = (_Class = class {
1484
+ constructor(e) {
1485
+ _defineProperty(this, "options", void 0);
1486
+ _defineProperty(this, "block", void 0);
1487
+ this.options = e || S;
1488
+ }
1489
+ preprocess(e) {
1490
+ return e;
1491
+ }
1492
+ postprocess(e) {
1493
+ return e;
1494
+ }
1495
+ processAllTokens(e) {
1496
+ return e;
1497
+ }
1498
+ emStrongMask(e) {
1499
+ return e;
1500
+ }
1501
+ provideLexer(e = this.block) {
1502
+ return e ? O.lex : O.lexInline;
1503
+ }
1504
+ provideParser(e = this.block) {
1505
+ return e ? w.parse : w.parseInline;
1506
+ }
1507
+ }, _defineProperty(_Class, "passThroughHooks", new Set([
1508
+ "preprocess",
1509
+ "postprocess",
1510
+ "processAllTokens",
1511
+ "emStrongMask"
1512
+ ])), _defineProperty(_Class, "passThroughHooksRespectAsync", new Set([
1513
+ "preprocess",
1514
+ "postprocess",
1515
+ "processAllTokens"
1516
+ ])), _Class);
1517
+ function z(a, e) {
1518
+ if (Array.isArray(e)) for (let t = 0; t < e.length; t++) a.push(e[t]);
1519
+ else a.push(e);
1520
+ }
1521
+ var Y = class {
1522
+ constructor(...e) {
1523
+ _defineProperty(this, "defaults", H());
1524
+ _defineProperty(this, "options", this.setOptions);
1525
+ _defineProperty(this, "parse", this.parseMarkdown(!0));
1526
+ _defineProperty(this, "parseInline", this.parseMarkdown(!1));
1527
+ _defineProperty(this, "Parser", w);
1528
+ _defineProperty(this, "Renderer", C);
1529
+ _defineProperty(this, "TextRenderer", E);
1530
+ _defineProperty(this, "Lexer", O);
1531
+ _defineProperty(this, "Tokenizer", _);
1532
+ _defineProperty(this, "Hooks", I);
1533
+ this.use(...e);
1534
+ }
1535
+ walkTokens(e, t) {
1536
+ let n = [];
1537
+ for (let s of e) switch (z(n, t.call(this, s)), s.type) {
1538
+ case "table": {
1539
+ let r = s;
1540
+ for (let o of r.header) z(n, this.walkTokens(o.tokens, t));
1541
+ for (let o of r.rows) for (let i of o) z(n, this.walkTokens(i.tokens, t));
1542
+ break;
1543
+ }
1544
+ case "list": {
1545
+ let r = s;
1546
+ z(n, this.walkTokens(r.items, t));
1547
+ break;
1548
+ }
1549
+ default: {
1550
+ let r = s;
1551
+ this.defaults.extensions?.childTokens?.[r.type] ? this.defaults.extensions.childTokens[r.type].forEach((o) => {
1552
+ let i = r[o].flat(Infinity);
1553
+ z(n, this.walkTokens(i, t));
1554
+ }) : r.tokens && z(n, this.walkTokens(r.tokens, t));
1555
+ }
1556
+ }
1557
+ return n;
1558
+ }
1559
+ use(...e) {
1560
+ let t = this.defaults.extensions || {
1561
+ renderers: Object.create(null),
1562
+ childTokens: Object.create(null)
1563
+ };
1564
+ return e.forEach((n) => {
1565
+ let s = { ...n };
1566
+ if (s.async = this.defaults.async || s.async || !1, n.extensions && (n.extensions.forEach((r) => {
1567
+ if (!r.name) throw new Error("extension name required");
1568
+ if ("renderer" in r) {
1569
+ let o = t.renderers[r.name];
1570
+ o ? t.renderers[r.name] = function(...i) {
1571
+ let l = r.renderer.apply(this, i);
1572
+ return l === !1 && (l = o.apply(this, i)), l;
1573
+ } : t.renderers[r.name] = r.renderer;
1574
+ }
1575
+ if ("tokenizer" in r) {
1576
+ if (!r.level || r.level !== "block" && r.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
1577
+ let o = t[r.level];
1578
+ o ? o.unshift(r.tokenizer) : t[r.level] = [r.tokenizer], r.start && (r.level === "block" ? t.startBlock ? t.startBlock.push(r.start) : t.startBlock = [r.start] : r.level === "inline" && (t.startInline ? t.startInline.push(r.start) : t.startInline = [r.start]));
1579
+ }
1580
+ "childTokens" in r && r.childTokens && (t.childTokens[r.name] = r.childTokens);
1581
+ }), s.extensions = t), n.renderer) {
1582
+ let r = this.defaults.renderer || new C(this.defaults);
1583
+ for (let o in n.renderer) {
1584
+ if (!(o in r)) throw new Error(`renderer '${o}' does not exist`);
1585
+ if (["options", "parser"].includes(o)) continue;
1586
+ let i = o, l = n.renderer[i], p = r[i];
1587
+ r[i] = (...h) => {
1588
+ let u = l.apply(r, h);
1589
+ return u === !1 && (u = p.apply(r, h)), u === !1 ? "" : u ?? "";
1590
+ };
1591
+ }
1592
+ s.renderer = r;
1593
+ }
1594
+ if (n.tokenizer) {
1595
+ let r = this.defaults.tokenizer || new _(this.defaults);
1596
+ for (let o in n.tokenizer) {
1597
+ if (!(o in r)) throw new Error(`tokenizer '${o}' does not exist`);
1598
+ if ([
1599
+ "options",
1600
+ "rules",
1601
+ "lexer"
1602
+ ].includes(o)) continue;
1603
+ let i = o, l = n.tokenizer[i], p = r[i];
1604
+ r[i] = (...h) => {
1605
+ let u = l.apply(r, h);
1606
+ return u === !1 && (u = p.apply(r, h)), u;
1607
+ };
1608
+ }
1609
+ s.tokenizer = r;
1610
+ }
1611
+ if (n.hooks) {
1612
+ let r = this.defaults.hooks || new I();
1613
+ for (let o in n.hooks) {
1614
+ if (!(o in r)) throw new Error(`hook '${o}' does not exist`);
1615
+ if (["options", "block"].includes(o)) continue;
1616
+ let i = o, l = n.hooks[i], p = r[i];
1617
+ I.passThroughHooks.has(o) ? r[i] = (h) => {
1618
+ if (r.options.async && I.passThroughHooksRespectAsync.has(o)) return (async () => {
1619
+ let d = await l.call(r, h);
1620
+ return p.call(r, d);
1621
+ })();
1622
+ let u = l.call(r, h);
1623
+ return p.call(r, u);
1624
+ } : r[i] = (...h) => {
1625
+ if (r.options.async) return (async () => {
1626
+ let d = await l.apply(r, h);
1627
+ return d === !1 && (d = await p.apply(r, h)), d;
1628
+ })();
1629
+ let u = l.apply(r, h);
1630
+ return u === !1 && (u = p.apply(r, h)), u;
1631
+ };
1632
+ }
1633
+ s.hooks = r;
1634
+ }
1635
+ if (n.walkTokens) {
1636
+ let r = this.defaults.walkTokens, o = n.walkTokens;
1637
+ s.walkTokens = function(i) {
1638
+ let l = [];
1639
+ return z(l, o.call(this, i)), r && z(l, r.call(this, i)), l;
1640
+ };
1641
+ }
1642
+ this.defaults = {
1643
+ ...this.defaults,
1644
+ ...s
1645
+ };
1646
+ }), this;
1647
+ }
1648
+ setOptions(e) {
1649
+ return this.defaults = {
1650
+ ...this.defaults,
1651
+ ...e
1652
+ }, this;
1653
+ }
1654
+ lexer(e, t) {
1655
+ return O.lex(e, t ?? this.defaults);
1656
+ }
1657
+ parser(e, t) {
1658
+ return w.parse(e, t ?? this.defaults);
1659
+ }
1660
+ parseMarkdown(e) {
1661
+ return (n, s) => {
1662
+ let r = { ...s }, o = {
1663
+ ...this.defaults,
1664
+ ...r
1665
+ }, i = this.onError(!!o.silent, !!o.async);
1666
+ if (this.defaults.async === !0 && r.async === !1) return i(/* @__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."));
1667
+ if (typeof n > "u" || n === null) return i(/* @__PURE__ */ new Error("marked(): input parameter is undefined or null"));
1668
+ if (typeof n != "string") return i(/* @__PURE__ */ new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1669
+ if (o.hooks && (o.hooks.options = o, o.hooks.block = e), o.async) return (async () => {
1670
+ let l = o.hooks ? await o.hooks.preprocess(n) : n, h = await (o.hooks ? await o.hooks.provideLexer(e) : e ? O.lex : O.lexInline)(l, o), u = o.hooks ? await o.hooks.processAllTokens(h) : h;
1671
+ o.walkTokens && await Promise.all(this.walkTokens(u, o.walkTokens));
1672
+ let k = await (o.hooks ? await o.hooks.provideParser(e) : e ? w.parse : w.parseInline)(u, o);
1673
+ return o.hooks ? await o.hooks.postprocess(k) : k;
1674
+ })().catch(i);
1675
+ try {
1676
+ o.hooks && (n = o.hooks.preprocess(n));
1677
+ let p = (o.hooks ? o.hooks.provideLexer(e) : e ? O.lex : O.lexInline)(n, o);
1678
+ o.hooks && (p = o.hooks.processAllTokens(p)), o.walkTokens && this.walkTokens(p, o.walkTokens);
1679
+ let u = (o.hooks ? o.hooks.provideParser(e) : e ? w.parse : w.parseInline)(p, o);
1680
+ return o.hooks && (u = o.hooks.postprocess(u)), u;
1681
+ } catch (l) {
1682
+ return i(l);
1683
+ }
1684
+ };
1685
+ }
1686
+ onError(e, t) {
1687
+ return (n) => {
1688
+ if (n.message += `
1689
+ Please report this to https://github.com/markedjs/marked.`, e) {
1690
+ let s = "<p>An error occurred:</p><pre>" + P(n.message + "", !0) + "</pre>";
1691
+ return t ? Promise.resolve(s) : s;
1692
+ }
1693
+ if (t) return Promise.reject(n);
1694
+ throw n;
1695
+ };
1696
+ }
1697
+ };
1698
+ var q = new Y();
1699
+ function x(a, e) {
1700
+ return q.parse(a, e);
1701
+ }
1702
+ x.options = x.setOptions = function(a) {
1703
+ return q.setOptions(a), x.defaults = q.defaults, se(x.defaults), x;
1704
+ };
1705
+ x.getDefaults = H;
1706
+ x.defaults = S;
1707
+ function Bt(...a) {
1708
+ return q.use(...a), x.defaults = q.defaults, se(x.defaults), x;
1709
+ }
1710
+ x.use = Bt;
1711
+ x.walkTokens = function(a, e) {
1712
+ return q.walkTokens(a, e);
1713
+ };
1714
+ x.parseInline = q.parseInline;
1715
+ x.Parser = w;
1716
+ x.parser = w.parse;
1717
+ x.Renderer = C;
1718
+ x.TextRenderer = E;
1719
+ x.Lexer = O;
1720
+ x.lexer = O.lex;
1721
+ x.Tokenizer = _;
1722
+ x.Hooks = I;
1723
+ x.parse = x;
1724
+ x.options;
1725
+ x.setOptions;
1726
+ x.walkTokens;
1727
+ x.parseInline;
1728
+ w.parse;
1729
+ O.lex;
1730
+ //#endregion
1731
+ //#region src/shared/richText/richText.tsx
1732
+ function normalizeAnchorSpacing(content) {
1733
+ return content.replace(/([^\s>])(<a\b)/gu, "$1\xA0$2").replace(/(<\/a>)([\p{L}\p{N}])/gu, "$1\xA0$2");
1734
+ }
1735
+ function decorateHtml(content) {
1736
+ const doc = new DOMParser().parseFromString(content, "text/html");
1737
+ 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);
1738
+ const anchors = Array.from(doc.querySelectorAll("a"));
1739
+ for (const anchor of anchors) {
1740
+ anchor.setAttribute("target", "_blank");
1741
+ anchor.setAttribute("rel", "noopener noreferrer");
1742
+ }
1743
+ return doc.body.innerHTML;
1744
+ }
1745
+ function sanitizeHtml(content, disallowedTags) {
1746
+ const normalizedContent = normalizeAnchorSpacing(content);
1747
+ const parsed = x.parse(normalizedContent);
1748
+ return decorateHtml(purify.sanitize(parsed, { FORBID_TAGS: disallowedTags }));
1749
+ }
1750
+ function RichText({ content, class: className, disallowedTags = [] }) {
1751
+ if (!content) return null;
1752
+ return /* @__PURE__ */ u("div", {
1753
+ class: className,
1754
+ children: /* @__PURE__ */ u("div", {
1755
+ class: "IncodeRichTextMarkup",
1756
+ dangerouslySetInnerHTML: { __html: sanitizeHtml(content, disallowedTags) }
1757
+ })
1758
+ });
1759
+ }
1760
+ //#endregion
1761
+ export { RichText as t };