aibox-custom-component-packages 0.0.7 → 0.0.9

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 (323) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +6 -786
  2. package/es/ApplicationTypeTag.mjs +2 -58
  3. package/es/AuthSection.mjs +3 -199
  4. package/es/AutoShowTooltip.mjs +2 -90
  5. package/es/AvailableRangePreview.mjs +2 -7
  6. package/es/AvailableRangeSetting.mjs +5 -272
  7. package/es/CodeView.mjs +6 -7
  8. package/es/CommonTagsList.mjs +3 -209
  9. package/es/CreateMcpForm.mjs +10 -384
  10. package/es/CustomSidebar.mjs +2 -712
  11. package/es/CustomTitle.mjs +6 -7
  12. package/es/CustomToggle.mjs +2 -170
  13. package/es/DialogContainer.mjs +2 -136
  14. package/es/DocSyncSelect.mjs +2 -0
  15. package/es/FileDisplay.mjs +4 -6
  16. package/es/FilePreview.mjs +3 -179
  17. package/es/FileUploader.mjs +2 -268
  18. package/es/Logo.mjs +2 -0
  19. package/es/McpFormDialog.mjs +11 -8
  20. package/es/McpParamsSet.mjs +8 -630
  21. package/es/MdEditor.mjs +2 -201
  22. package/es/PageContainer.mjs +4 -362
  23. package/es/ParameterTable.mjs +6 -2288
  24. package/es/PublishRecord.mjs +2 -179
  25. package/es/RadioGroup.mjs +2 -119
  26. package/es/SourcePublish.mjs +7 -1154
  27. package/es/Table.mjs +6 -10
  28. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  29. package/es/assets/AiboxTable.css +1 -1
  30. package/es/assets/ApplicationTypeTag.css +1 -1
  31. package/es/assets/AuthSection.css +1 -1
  32. package/es/assets/AutoShowTooltip.css +1 -1
  33. package/es/assets/AvailableRangePreview.css +1 -0
  34. package/es/assets/CodeView.css +1 -0
  35. package/es/assets/CommonTagsList.css +1 -1
  36. package/es/assets/CreateMcpForm.css +1 -1
  37. package/es/assets/CustomSidebar.css +1 -1
  38. package/es/assets/CustomToggle.css +1 -1
  39. package/es/assets/DialogContainer.css +1 -1
  40. package/es/assets/DocSyncSelect.css +1 -0
  41. package/es/assets/FileDisplay.css +1 -0
  42. package/es/assets/FilePreview.css +1 -1
  43. package/es/assets/FileUploader.css +1 -1
  44. package/es/assets/Logo.css +1 -0
  45. package/es/assets/{index2.css → McpFormDialog.css} +1 -1
  46. package/es/assets/McpParamsSet.css +1 -1
  47. package/es/assets/MdEditor.css +1 -1
  48. package/es/assets/PageContainer.css +1 -1
  49. package/es/assets/ParameterTable.css +1 -1
  50. package/es/assets/PublishRecord.css +1 -1
  51. package/es/assets/RadioGroup.css +1 -1
  52. package/es/assets/SourcePublish.css +1 -1
  53. package/es/assets/layout.css +1 -1
  54. package/es/assets/legacy.css +1 -0
  55. package/es/assets/usePreview.css +10 -1
  56. package/es/chunks/AddOrEditSupplierDialog.BKR0RsiJ.js +721 -0
  57. package/es/chunks/AddOrEditSupplierDialog.CjNRipPe.js +721 -0
  58. package/es/chunks/AiboxTable.CrWMAX84.js +635 -0
  59. package/es/chunks/ApplicationTypeTag.Cbdi0D65.js +47 -0
  60. package/es/chunks/AuthSection.DWD_FxtJ.js +201 -0
  61. package/es/chunks/AutoShowTooltip.C_DI9t2Z.js +82 -0
  62. package/es/chunks/AvailableRangePreview.Bz9QkkAM.js +194 -0
  63. package/es/chunks/AvailableRangeSetting.Bq_K1zar.js +229 -0
  64. package/es/chunks/CodeView.CWuSIL_F.js +148 -0
  65. package/es/chunks/CommonTagsList.DSPdgjc3.js +156 -0
  66. package/es/chunks/CreateMcpForm.BBVVd2RN.js +308 -0
  67. package/es/chunks/CreateMcpForm.C8YfDSEM.js +308 -0
  68. package/es/chunks/CustomSidebar.BSGAhmVY.js +585 -0
  69. package/es/chunks/CustomToggle.BxxsaD-W.js +181 -0
  70. package/es/chunks/DialogContainer.DL7aTMDS.js +129 -0
  71. package/es/chunks/DocSyncSelect.Kk88o9gO.js +2290 -0
  72. package/es/chunks/FileDisplay.B5laA4uX.js +1649 -0
  73. package/es/chunks/FileDisplay.BCTNdpl9.js +1649 -0
  74. package/es/chunks/FileDisplay.CBNYrdsK.js +1560 -0
  75. package/es/chunks/FileDisplay.CJ7KCID6.js +1650 -0
  76. package/es/chunks/FilePreview.B9u8ODHp.js +123 -0
  77. package/es/chunks/FilePreview.De4zHsfc.js +123 -0
  78. package/es/chunks/FileUploader.DD-lopf-.js +216 -0
  79. package/es/chunks/Logo.0myMjGux.js +62 -0
  80. package/es/chunks/McpFormDialog.4HDExbTn.js +297 -0
  81. package/es/chunks/McpFormDialog.DNzqqhaX.js +297 -0
  82. package/es/chunks/McpParamsSet.Tlo_lPn-.js +501 -0
  83. package/es/chunks/MdEditor.DtL0Se7T.js +163 -0
  84. package/es/chunks/PageContainer.DXddaRs1.js +462 -0
  85. package/es/chunks/ParameterTable.BCdnj1gW.js +2010 -0
  86. package/es/chunks/PublishRecord.DEzC7hmP.js +133 -0
  87. package/es/chunks/RadioGroup.Czc1JtkN.js +107 -0
  88. package/es/chunks/SourcePublish.Dx-ltk9U.js +956 -0
  89. package/es/chunks/_plugin-vue_export-helper.Ct3qlEzt.js +8 -0
  90. package/es/chunks/chunk.EU29TkMc.js +20 -0
  91. package/es/chunks/config.MfNKPMiA.js +35 -0
  92. package/es/chunks/config.l1J_qxeB.js +270 -0
  93. package/es/chunks/enums.DDPWAqdV.js +13 -0
  94. package/es/chunks/field-types.zf28gvKR.js +7 -0
  95. package/es/chunks/files.DvOT1nf3.js +14 -0
  96. package/es/chunks/i18n.CxsxtRq_.js +418 -0
  97. package/es/chunks/layout.C9wKDpv-.js +19 -0
  98. package/es/chunks/publish.Z0XAASut.js +50 -0
  99. package/es/chunks/request.CfOHcfgX.js +5 -0
  100. package/es/chunks/usePreview.CMMjOD_o.js +148 -0
  101. package/es/chunks/usePreview.agdxmOk8.js +126 -0
  102. package/es/chunks/withinstall.dLh4K-0g.js +7 -0
  103. package/es/index.mjs +258 -328
  104. package/index.css +1 -1
  105. package/lib/AddOrEditSupplierDialog.js +1 -1
  106. package/lib/ApplicationTypeTag.js +1 -1
  107. package/lib/AuthSection.js +1 -1
  108. package/lib/AutoShowTooltip.js +1 -1
  109. package/lib/AvailableRangePreview.js +1 -1
  110. package/lib/AvailableRangeSetting.js +1 -1
  111. package/lib/CodeView.js +1 -1
  112. package/lib/CommonTagsList.js +1 -1
  113. package/lib/CreateMcpForm.js +1 -1
  114. package/lib/CustomSidebar.js +1 -1
  115. package/lib/CustomTitle.js +1 -1
  116. package/lib/CustomToggle.js +1 -1
  117. package/lib/DialogContainer.js +1 -1
  118. package/lib/DocSyncSelect.js +1 -0
  119. package/lib/FileDisplay.js +1 -1
  120. package/lib/FilePreview.js +1 -1
  121. package/lib/FileUploader.js +1 -1
  122. package/lib/Logo.js +1 -0
  123. package/lib/McpFormDialog.js +1 -1
  124. package/lib/McpParamsSet.js +1 -1
  125. package/lib/MdEditor.js +1 -1
  126. package/lib/PageContainer.js +1 -1
  127. package/lib/ParameterTable.js +1 -1
  128. package/lib/PublishRecord.js +1 -5
  129. package/lib/RadioGroup.js +1 -1
  130. package/lib/SourcePublish.js +1 -1
  131. package/lib/Table.js +1 -1
  132. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  133. package/lib/assets/AiboxTable.css +1 -1
  134. package/lib/assets/ApplicationTypeTag.css +1 -1
  135. package/lib/assets/AuthSection.css +1 -1
  136. package/lib/assets/AutoShowTooltip.css +1 -1
  137. package/lib/assets/AvailableRangePreview.css +1 -0
  138. package/lib/assets/CodeView.css +1 -0
  139. package/lib/assets/CommonTagsList.css +1 -1
  140. package/lib/assets/CreateMcpForm.css +1 -1
  141. package/lib/assets/CustomSidebar.css +1 -1
  142. package/lib/assets/CustomToggle.css +1 -1
  143. package/lib/assets/DialogContainer.css +1 -1
  144. package/lib/assets/DocSyncSelect.css +1 -0
  145. package/lib/assets/FileDisplay.css +1 -0
  146. package/lib/assets/FilePreview.css +1 -1
  147. package/lib/assets/FileUploader.css +1 -1
  148. package/lib/assets/Logo.css +1 -0
  149. package/lib/assets/{index2.css → McpFormDialog.css} +1 -1
  150. package/lib/assets/McpParamsSet.css +1 -1
  151. package/lib/assets/MdEditor.css +1 -1
  152. package/lib/assets/PageContainer.css +1 -1
  153. package/lib/assets/ParameterTable.css +1 -1
  154. package/lib/assets/PublishRecord.css +1 -1
  155. package/lib/assets/RadioGroup.css +1 -1
  156. package/lib/assets/SourcePublish.css +1 -1
  157. package/lib/assets/layout.css +1 -1
  158. package/lib/assets/legacy.css +1 -0
  159. package/lib/assets/usePreview.css +10 -1
  160. package/lib/chunks/AddOrEditSupplierDialog.D0DSQZiS.js +1 -0
  161. package/lib/chunks/AddOrEditSupplierDialog.XtPxc5yr.js +1 -0
  162. package/lib/chunks/AiboxTable.DFyqwoGc.js +1 -0
  163. package/lib/chunks/ApplicationTypeTag.CZReMt-9.js +1 -0
  164. package/lib/chunks/AuthSection.CP9c-YTW.js +1 -0
  165. package/lib/chunks/AutoShowTooltip.D3QQ36Bm.js +1 -0
  166. package/lib/chunks/AvailableRangePreview.DvREyHNH.js +1 -0
  167. package/lib/chunks/AvailableRangeSetting.DDHTOLJA.js +1 -0
  168. package/lib/chunks/CodeView.DeBxLqyC.js +1 -0
  169. package/lib/chunks/CommonTagsList.DbNcVId5.js +1 -0
  170. package/lib/chunks/CreateMcpForm.Cm9eHXWg.js +1 -0
  171. package/lib/chunks/CreateMcpForm.DNijYbgd.js +1 -0
  172. package/lib/chunks/CustomSidebar.Dojb1xoS.js +1 -0
  173. package/lib/chunks/CustomToggle.Dz7MRyOY.js +1 -0
  174. package/lib/chunks/DialogContainer.C0Hsohgn.js +1 -0
  175. package/lib/chunks/DocSyncSelect.1gaXRzps.js +2 -0
  176. package/lib/chunks/FileDisplay.B4gn0Jhp.js +59 -0
  177. package/lib/chunks/FileDisplay.B7JWIcFg.js +59 -0
  178. package/lib/chunks/FileDisplay.BSNmvK44.js +59 -0
  179. package/lib/chunks/FileDisplay.DjtHza32.js +59 -0
  180. package/lib/chunks/FilePreview.DX9e8_nx.js +1 -0
  181. package/lib/chunks/FilePreview.b1Gine59.js +1 -0
  182. package/lib/chunks/FileUploader.6IW_QL-h.js +1 -0
  183. package/lib/chunks/Logo.Jr7hhaH0.js +1 -0
  184. package/lib/chunks/McpFormDialog.CL2bInts.js +6 -0
  185. package/lib/chunks/McpFormDialog.DbhQIwYW.js +6 -0
  186. package/lib/chunks/McpParamsSet.BYrxVvDL.js +1 -0
  187. package/lib/chunks/MdEditor.rVQbuxCg.js +1 -0
  188. package/lib/chunks/PageContainer.elwvD8VL.js +1 -0
  189. package/lib/chunks/ParameterTable.CeufAEXh.js +1 -0
  190. package/lib/chunks/PublishRecord.B7xYlRKJ.js +5 -0
  191. package/lib/chunks/RadioGroup.cl57IvY3.js +1 -0
  192. package/lib/chunks/SourcePublish.K4tntn9l.js +1 -0
  193. package/lib/chunks/_plugin-vue_export-helper.Bgn9wawX.js +1 -0
  194. package/lib/chunks/chunk.BbA6Ugdl.js +1 -0
  195. package/lib/chunks/config.CDNV0bUm.js +1 -0
  196. package/lib/chunks/config.CZl1kYtI.js +1 -0
  197. package/lib/chunks/enums.DbdzzIzx.js +1 -0
  198. package/lib/chunks/field-types.C6f_z2S_.js +1 -0
  199. package/lib/chunks/files.BEXWmB32.js +1 -0
  200. package/lib/chunks/i18n.BGe5gOau.js +1 -0
  201. package/lib/chunks/layout.CK394aWE.js +1 -0
  202. package/lib/chunks/publish.DsepP8ll.js +1 -0
  203. package/lib/chunks/request.BuoFTs7h.js +1 -0
  204. package/lib/chunks/usePreview.7CCbmgQM.js +1 -0
  205. package/lib/chunks/usePreview.Dmhz8azZ.js +1 -0
  206. package/lib/chunks/withinstall.65aRnaVc.js +1 -0
  207. package/lib/index.js +2 -1
  208. package/package.json +6 -6
  209. package/es/AiboxTabs.mjs +0 -71
  210. package/es/ExampleComponent.mjs +0 -35
  211. package/es/assets/AiboxTabs.css +0 -1
  212. package/es/assets/BackBar.css +0 -1
  213. package/es/assets/ExampleComponent.css +0 -1
  214. package/es/assets/index.css +0 -1
  215. package/es/assets/index3.css +0 -1
  216. package/es/assets/index4.css +0 -1
  217. package/es/assets/index5.css +0 -1
  218. package/es/assets/index6.css +0 -1
  219. package/es/chunks/AiboxTable.DUGBBVXh.js +0 -645
  220. package/es/chunks/BackBar.B5Er8ZdJ.js +0 -645
  221. package/es/chunks/BackBar.Bc2NIuzk.js +0 -645
  222. package/es/chunks/BackBar.Cv1wxUcM.js +0 -645
  223. package/es/chunks/BackBar.DJV4JaUM.js +0 -645
  224. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
  225. package/es/chunks/config.8htFF04x.js +0 -325
  226. package/es/chunks/config.BPp4hMBq.js +0 -325
  227. package/es/chunks/config.BU21Gda2.js +0 -49
  228. package/es/chunks/config.BzCGum_W.js +0 -49
  229. package/es/chunks/config.CFWGjEdA.js +0 -49
  230. package/es/chunks/config.CfWAdyUH.js +0 -325
  231. package/es/chunks/config.DPkdwjwD.js +0 -49
  232. package/es/chunks/config.DTMcCH58.js +0 -325
  233. package/es/chunks/config.Dklrsn-B.js +0 -49
  234. package/es/chunks/config.DqhQdkz7.js +0 -325
  235. package/es/chunks/config.RrNwuFkQ.js +0 -325
  236. package/es/chunks/config.gNZ_rT87.js +0 -325
  237. package/es/chunks/enums.CfSBDD6u.js +0 -83
  238. package/es/chunks/enums.DuBbLcd-.js +0 -83
  239. package/es/chunks/enums.Dvec-maC.js +0 -62
  240. package/es/chunks/field-types.CPnMOjle.js +0 -13
  241. package/es/chunks/files.cduUqjHX.js +0 -16
  242. package/es/chunks/i18n.DDMVloiU.js +0 -443
  243. package/es/chunks/i18n.DmqkiK-h.js +0 -444
  244. package/es/chunks/i18n.Vhq-tZPw.js +0 -94
  245. package/es/chunks/i18n.k9Q_HVMs.js +0 -443
  246. package/es/chunks/i18n.ro9yz7rE.js +0 -94
  247. package/es/chunks/index.BSA3IKSF.js +0 -111
  248. package/es/chunks/index.BT1khSY9.js +0 -111
  249. package/es/chunks/index.CDvh263l.js +0 -257
  250. package/es/chunks/index.CLyfh6p1.js +0 -257
  251. package/es/chunks/index.CSjjAi3w.js +0 -396
  252. package/es/chunks/index.CdEBk4F_.js +0 -134
  253. package/es/chunks/index.CgbxJCEU.js +0 -265
  254. package/es/chunks/index.CuDwuRO7.js +0 -265
  255. package/es/chunks/index.DB0ayMv8.js +0 -257
  256. package/es/chunks/index.DWR4lc30.js +0 -203
  257. package/es/chunks/index.GuEzdh6b.js +0 -257
  258. package/es/chunks/index.aMb6IVQD.js +0 -257
  259. package/es/chunks/index.bCzIhWFw.js +0 -7
  260. package/es/chunks/index.ml5i7aB5.js +0 -257
  261. package/es/chunks/index.s-YxIOfq.js +0 -301
  262. package/es/chunks/index.uOZzvHrF.js +0 -135
  263. package/es/chunks/layout.BREUWPEJ.js +0 -26
  264. package/es/chunks/publish.BCb7nCo9.js +0 -50
  265. package/es/chunks/publish.D6friivo.js +0 -50
  266. package/es/chunks/publish.DlD0o09n.js +0 -50
  267. package/es/chunks/publish.Dqzn7qEl.js +0 -50
  268. package/es/chunks/request.24c3shPx.js +0 -5
  269. package/es/chunks/usePreview.B5lboHeg.js +0 -153
  270. package/es/chunks/usePreview.C36fNlVd.js +0 -153
  271. package/es/i18n.mjs +0 -17
  272. package/lib/AiboxTabs.js +0 -1
  273. package/lib/ExampleComponent.js +0 -1
  274. package/lib/assets/AiboxTabs.css +0 -1
  275. package/lib/assets/BackBar.css +0 -1
  276. package/lib/assets/ExampleComponent.css +0 -1
  277. package/lib/assets/index.css +0 -1
  278. package/lib/assets/index3.css +0 -1
  279. package/lib/assets/index4.css +0 -1
  280. package/lib/assets/index5.css +0 -1
  281. package/lib/assets/index6.css +0 -1
  282. package/lib/chunks/AiboxTable.BnoHJ7xL.js +0 -1
  283. package/lib/chunks/BackBar.C8Xrc6qW.js +0 -1
  284. package/lib/chunks/BackBar.CZsNxoX1.js +0 -1
  285. package/lib/chunks/BackBar.s5_vN6jt.js +0 -1
  286. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +0 -1
  287. package/lib/chunks/config.1oaIKLGn.js +0 -1
  288. package/lib/chunks/config.B0XKkp1w.js +0 -1
  289. package/lib/chunks/config.BCAuBVxV.js +0 -1
  290. package/lib/chunks/config.BF7MO0O5.js +0 -1
  291. package/lib/chunks/config.Bs7sh3aP.js +0 -1
  292. package/lib/chunks/config.C1w4hgfw.js +0 -1
  293. package/lib/chunks/config.ClERt2RF.js +0 -1
  294. package/lib/chunks/enums.Dmq4PdUc.js +0 -1
  295. package/lib/chunks/enums.DnuzPZCR.js +0 -1
  296. package/lib/chunks/field-types.Ch_2yDfg.js +0 -1
  297. package/lib/chunks/files.B3-8UC0v.js +0 -1
  298. package/lib/chunks/i18n.CL5L6nx6.js +0 -1
  299. package/lib/chunks/i18n.DgOp_D7R.js +0 -1
  300. package/lib/chunks/i18n.aAXi5igh.js +0 -1
  301. package/lib/chunks/index.BNqTEn3K.js +0 -1
  302. package/lib/chunks/index.BZcSlgOO.js +0 -1
  303. package/lib/chunks/index.Bc71XWQn.js +0 -1
  304. package/lib/chunks/index.Bk-RwmaH.js +0 -1
  305. package/lib/chunks/index.BsN4urmi.js +0 -1
  306. package/lib/chunks/index.CH7XdMru.js +0 -1
  307. package/lib/chunks/index.CaidDlAx.js +0 -1
  308. package/lib/chunks/index.CkihWzK6.js +0 -1
  309. package/lib/chunks/index.D7wBInWr.js +0 -1
  310. package/lib/chunks/index.DGWHQFdx.js +0 -6
  311. package/lib/chunks/index.DME62Yfo.js +0 -1
  312. package/lib/chunks/index.DWohILMv.js +0 -1
  313. package/lib/chunks/index.LK2ulXTE.js +0 -1
  314. package/lib/chunks/index.qDAoOzk9.js +0 -1
  315. package/lib/chunks/index.s8vGOJKG.js +0 -1
  316. package/lib/chunks/layout.sgE9JoNq.js +0 -1
  317. package/lib/chunks/publish.3TrK3fZf.js +0 -1
  318. package/lib/chunks/publish.Bw1acrSu.js +0 -1
  319. package/lib/chunks/publish.CA1uSVnm.js +0 -1
  320. package/lib/chunks/request.D8T4MgGX.js +0 -1
  321. package/lib/chunks/usePreview.2PZJSy5w.js +0 -1
  322. package/lib/chunks/usePreview.E5SeS2uw.js +0 -1
  323. package/lib/i18n.js +0 -1
@@ -0,0 +1,1649 @@
1
+ import { C as e, E as t, O as n, S as r, T as i, _ as a, g as o, t as s, w as c, y as l } from "./usePreview.CMMjOD_o.js";
2
+ import { t as u } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
3
+ import { Fragment as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as ee, createVNode as g, normalizeClass as te, openBlock as _, ref as v, renderList as ne, resolveDirective as re, resolveDynamicComponent as ie, toDisplayString as ae, unref as y, withCtx as b, withDirectives as oe } from "vue";
4
+ import { ElDialog as se, ElIcon as ce, ElImage as le } from "element-plus";
5
+ import { Error as ue } from "color-message-aibox-vue";
6
+ import { useRouter as de } from "vue-router";
7
+ import '../assets/FileDisplay.css';//#region ../../../node_modules/.pnpm/marked@17.0.1/node_modules/marked/lib/marked.esm.js
8
+ function x() {
9
+ return {
10
+ async: !1,
11
+ breaks: !1,
12
+ extensions: null,
13
+ gfm: !0,
14
+ hooks: null,
15
+ pedantic: !1,
16
+ renderer: null,
17
+ silent: !1,
18
+ tokenizer: null,
19
+ walkTokens: null
20
+ };
21
+ }
22
+ var S = x();
23
+ function C(e) {
24
+ S = e;
25
+ }
26
+ var w = { exec: () => null };
27
+ function T(e, t = "") {
28
+ let n = typeof e == "string" ? e : e.source, r = {
29
+ replace: (e, t) => {
30
+ let i = typeof t == "string" ? t : t.source;
31
+ return i = i.replace(D.caret, "$1"), n = n.replace(e, i), r;
32
+ },
33
+ getRegex: () => new RegExp(n, t)
34
+ };
35
+ return r;
36
+ }
37
+ var E = (() => {
38
+ try {
39
+ return !0;
40
+ } catch {
41
+ return !1;
42
+ }
43
+ })(), D = {
44
+ codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
45
+ outputLinkReplace: /\\([\[\]])/g,
46
+ indentCodeCompensation: /^(\s+)(?:```)/,
47
+ beginningSpace: /^\s+/,
48
+ endingHash: /#$/,
49
+ startingSpaceChar: /^ /,
50
+ endingSpaceChar: / $/,
51
+ nonSpaceChar: /[^ ]/,
52
+ newLineCharGlobal: /\n/g,
53
+ tabCharGlobal: /\t/g,
54
+ multipleSpaceGlobal: /\s+/g,
55
+ blankLine: /^[ \t]*$/,
56
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
57
+ blockquoteStart: /^ {0,3}>/,
58
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
59
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
60
+ listReplaceTabs: /^\t+/,
61
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
62
+ listIsTask: /^\[[ xX]\] +\S/,
63
+ listReplaceTask: /^\[[ xX]\] +/,
64
+ listTaskCheckbox: /\[[ xX]\]/,
65
+ anyLine: /\n.*\n/,
66
+ hrefBrackets: /^<(.*)>$/,
67
+ tableDelimiter: /[:|]/,
68
+ tableAlignChars: /^\||\| *$/g,
69
+ tableRowBlankLine: /\n[ \t]*$/,
70
+ tableAlignRight: /^ *-+: *$/,
71
+ tableAlignCenter: /^ *:-+: *$/,
72
+ tableAlignLeft: /^ *:-+ *$/,
73
+ startATag: /^<a /i,
74
+ endATag: /^<\/a>/i,
75
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
76
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
77
+ startAngleBracket: /^</,
78
+ endAngleBracket: />$/,
79
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
80
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
81
+ escapeTest: /[&<>"']/,
82
+ escapeReplace: /[&<>"']/g,
83
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
84
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
85
+ unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,
86
+ caret: /(^|[^\[])\^/g,
87
+ percentDecode: /%25/g,
88
+ findPipe: /\|/g,
89
+ splitPipe: / \|/,
90
+ slashPipe: /\\\|/g,
91
+ carriageReturn: /\r\n|\r/g,
92
+ spaceLine: /^ +$/gm,
93
+ notSpaceStart: /^\S*/,
94
+ endingNewline: /\n$/,
95
+ listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
96
+ nextBulletRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
97
+ hrRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
98
+ fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
99
+ headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
100
+ htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
101
+ }, O = /^(?:[ \t]*(?:\n|$))+/, fe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, k = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, me = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, A = /(?:[*+-]|\d{1,9}[.)])/, he = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ge = T(he).replace(/bull/g, A).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(), _e = T(he).replace(/bull/g, A).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]+)*)/, ve = /^[^\n]+/, M = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ye = T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", M).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), be = T(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, A).getRegex(), N = "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", P = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xe = T("^ {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", P).replace("tag", N).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Se = T(j).replace("hr", k).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex(), F = {
102
+ blockquote: T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Se).getRegex(),
103
+ code: fe,
104
+ def: ye,
105
+ fences: pe,
106
+ heading: me,
107
+ hr: k,
108
+ html: xe,
109
+ lheading: ge,
110
+ list: be,
111
+ newline: O,
112
+ paragraph: Se,
113
+ table: w,
114
+ text: ve
115
+ }, Ce = T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", k).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex(), we = {
116
+ ...F,
117
+ lheading: _e,
118
+ table: Ce,
119
+ paragraph: T(j).replace("hr", k).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ce).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex()
120
+ }, Te = {
121
+ ...F,
122
+ html: T("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", P).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(),
123
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
124
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
125
+ fences: w,
126
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
127
+ paragraph: T(j).replace("hr", k).replace("heading", " *#{1,6} *[^\n]").replace("lheading", ge).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
128
+ }, Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Oe = /^( {2,}|\\)\n(?!\s*$)/, ke = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, I = /[\p{P}\p{S}]/u, L = /[\s\p{P}\p{S}]/u, Ae = /[^\s\p{P}\p{S}]/u, je = T(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, L).getRegex(), Me = /(?!~)[\p{P}\p{S}]/u, Ne = /(?!~)[\s\p{P}\p{S}]/u, Pe = /(?:[^\s\p{P}\p{S}]|~)/u, Fe = T(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", E ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ie = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Le = T(Ie, "u").replace(/punct/g, I).getRegex(), Re = T(Ie, "u").replace(/punct/g, Me).getRegex(), ze = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Be = T(ze, "gu").replace(/notPunctSpace/g, Ae).replace(/punctSpace/g, L).replace(/punct/g, I).getRegex(), Ve = T(ze, "gu").replace(/notPunctSpace/g, Pe).replace(/punctSpace/g, Ne).replace(/punct/g, Me).getRegex(), He = T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ae).replace(/punctSpace/g, L).replace(/punct/g, I).getRegex(), Ue = T(/\\(punct)/, "gu").replace(/punct/g, I).getRegex(), We = T(/^<(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(), Ge = T(P).replace("(?:-->|$)", "-->").getRegex(), Ke = T("^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", Ge).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), R = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, qe = T(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", R).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Je = T(/^!?\[(label)\]\[(ref)\]/).replace("label", R).replace("ref", M).getRegex(), Ye = T(/^!?\[(ref)\](?:\[\])?/).replace("ref", M).getRegex(), Xe = T("reflink|nolink(?!\\()", "g").replace("reflink", Je).replace("nolink", Ye).getRegex(), Ze = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, z = {
129
+ _backpedal: w,
130
+ anyPunctuation: Ue,
131
+ autolink: We,
132
+ blockSkip: Fe,
133
+ br: Oe,
134
+ code: De,
135
+ del: w,
136
+ emStrongLDelim: Le,
137
+ emStrongRDelimAst: Be,
138
+ emStrongRDelimUnd: He,
139
+ escape: Ee,
140
+ link: qe,
141
+ nolink: Ye,
142
+ punctuation: je,
143
+ reflink: Je,
144
+ reflinkSearch: Xe,
145
+ tag: Ke,
146
+ text: ke,
147
+ url: w
148
+ }, Qe = {
149
+ ...z,
150
+ link: T(/^!?\[(label)\]\((.*?)\)/).replace("label", R).getRegex(),
151
+ reflink: T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", R).getRegex()
152
+ }, B = {
153
+ ...z,
154
+ emStrongRDelimAst: Ve,
155
+ emStrongLDelim: Re,
156
+ url: T(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ze).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
157
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
158
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
159
+ text: T(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ze).getRegex()
160
+ }, $e = {
161
+ ...B,
162
+ br: T(Oe).replace("{2,}", "*").getRegex(),
163
+ text: T(B.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
164
+ }, V = {
165
+ normal: F,
166
+ gfm: we,
167
+ pedantic: Te
168
+ }, H = {
169
+ normal: z,
170
+ gfm: B,
171
+ breaks: $e,
172
+ pedantic: Qe
173
+ }, et = {
174
+ "&": "&amp;",
175
+ "<": "&lt;",
176
+ ">": "&gt;",
177
+ "\"": "&quot;",
178
+ "'": "&#39;"
179
+ }, tt = (e) => et[e];
180
+ function U(e, t) {
181
+ if (t) {
182
+ if (D.escapeTest.test(e)) return e.replace(D.escapeReplace, tt);
183
+ } else if (D.escapeTestNoEncode.test(e)) return e.replace(D.escapeReplaceNoEncode, tt);
184
+ return e;
185
+ }
186
+ function nt(e) {
187
+ try {
188
+ e = encodeURI(e).replace(D.percentDecode, "%");
189
+ } catch {
190
+ return null;
191
+ }
192
+ return e;
193
+ }
194
+ function rt(e, t) {
195
+ let n = e.replace(D.findPipe, (e, t, n) => {
196
+ let r = !1, i = t;
197
+ for (; --i >= 0 && n[i] === "\\";) r = !r;
198
+ return r ? "|" : " |";
199
+ }).split(D.splitPipe), r = 0;
200
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
201
+ else for (; n.length < t;) n.push("");
202
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(D.slashPipe, "|");
203
+ return n;
204
+ }
205
+ function W(e, t, n) {
206
+ let r = e.length;
207
+ if (r === 0) return "";
208
+ let i = 0;
209
+ for (; i < r;) {
210
+ let a = e.charAt(r - i - 1);
211
+ if (a === t && !n) i++;
212
+ else if (a !== t && n) i++;
213
+ else break;
214
+ }
215
+ return e.slice(0, r - i);
216
+ }
217
+ function it(e, t) {
218
+ if (e.indexOf(t[1]) === -1) return -1;
219
+ let n = 0;
220
+ for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
221
+ else if (e[r] === t[0]) n++;
222
+ else if (e[r] === t[1] && (n--, n < 0)) return r;
223
+ return n > 0 ? -2 : -1;
224
+ }
225
+ function at(e, t, n, r, i) {
226
+ let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
227
+ r.state.inLink = !0;
228
+ let c = {
229
+ type: e[0].charAt(0) === "!" ? "image" : "link",
230
+ raw: n,
231
+ href: a,
232
+ title: o,
233
+ text: s,
234
+ tokens: r.inlineTokens(s)
235
+ };
236
+ return r.state.inLink = !1, c;
237
+ }
238
+ function ot(e, t, n) {
239
+ let r = e.match(n.other.indentCodeCompensation);
240
+ if (r === null) return t;
241
+ let i = r[1];
242
+ return t.split("\n").map((e) => {
243
+ let t = e.match(n.other.beginningSpace);
244
+ if (t === null) return e;
245
+ let [r] = t;
246
+ return r.length >= i.length ? e.slice(i.length) : e;
247
+ }).join("\n");
248
+ }
249
+ var G = class {
250
+ options;
251
+ rules;
252
+ lexer;
253
+ constructor(e) {
254
+ this.options = e || S;
255
+ }
256
+ space(e) {
257
+ let t = this.rules.block.newline.exec(e);
258
+ if (t && t[0].length > 0) return {
259
+ type: "space",
260
+ raw: t[0]
261
+ };
262
+ }
263
+ code(e) {
264
+ let t = this.rules.block.code.exec(e);
265
+ if (t) {
266
+ let e = t[0].replace(this.rules.other.codeRemoveIndent, "");
267
+ return {
268
+ type: "code",
269
+ raw: t[0],
270
+ codeBlockStyle: "indented",
271
+ text: this.options.pedantic ? e : W(e, "\n")
272
+ };
273
+ }
274
+ }
275
+ fences(e) {
276
+ let t = this.rules.block.fences.exec(e);
277
+ if (t) {
278
+ let e = t[0], n = ot(e, t[3] || "", this.rules);
279
+ return {
280
+ type: "code",
281
+ raw: e,
282
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
283
+ text: n
284
+ };
285
+ }
286
+ }
287
+ heading(e) {
288
+ let t = this.rules.block.heading.exec(e);
289
+ if (t) {
290
+ let e = t[2].trim();
291
+ if (this.rules.other.endingHash.test(e)) {
292
+ let t = W(e, "#");
293
+ (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
294
+ }
295
+ return {
296
+ type: "heading",
297
+ raw: t[0],
298
+ depth: t[1].length,
299
+ text: e,
300
+ tokens: this.lexer.inline(e)
301
+ };
302
+ }
303
+ }
304
+ hr(e) {
305
+ let t = this.rules.block.hr.exec(e);
306
+ if (t) return {
307
+ type: "hr",
308
+ raw: W(t[0], "\n")
309
+ };
310
+ }
311
+ blockquote(e) {
312
+ let t = this.rules.block.blockquote.exec(e);
313
+ if (t) {
314
+ let e = W(t[0], "\n").split("\n"), n = "", r = "", i = [];
315
+ for (; e.length > 0;) {
316
+ let t = !1, a = [], o;
317
+ for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
318
+ else if (!t) a.push(e[o]);
319
+ else break;
320
+ e = e.slice(o);
321
+ let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
322
+ n = n ? `${n}
323
+ ${s}` : s, r = r ? `${r}
324
+ ${c}` : c;
325
+ let l = this.lexer.state.top;
326
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
327
+ let u = i.at(-1);
328
+ if (u?.type === "code") break;
329
+ if (u?.type === "blockquote") {
330
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
331
+ i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
332
+ break;
333
+ } else if (u?.type === "list") {
334
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
335
+ i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
336
+ continue;
337
+ }
338
+ }
339
+ return {
340
+ type: "blockquote",
341
+ raw: n,
342
+ tokens: i,
343
+ text: r
344
+ };
345
+ }
346
+ }
347
+ list(e) {
348
+ let t = this.rules.block.list.exec(e);
349
+ if (t) {
350
+ let n = t[1].trim(), r = n.length > 1, i = {
351
+ type: "list",
352
+ raw: "",
353
+ ordered: r,
354
+ start: r ? +n.slice(0, -1) : "",
355
+ loose: !1,
356
+ items: []
357
+ };
358
+ n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
359
+ let a = this.rules.other.listItemRegex(n), o = !1;
360
+ for (; e;) {
361
+ let n = !1, r = "", s = "";
362
+ if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
363
+ r = t[0], e = e.substring(r.length);
364
+ let c = t[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (e) => " ".repeat(3 * e.length)), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
365
+ if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = t[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
366
+ let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d);
367
+ for (; e;) {
368
+ let f = e.split("\n", 1)[0], p;
369
+ if (l = f, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), p = l) : p = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
370
+ if (p.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + p.slice(d);
371
+ else {
372
+ if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
373
+ s += "\n" + l;
374
+ }
375
+ !u && !l.trim() && (u = !0), r += f + "\n", e = e.substring(f.length + 1), c = p.slice(d);
376
+ }
377
+ }
378
+ i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
379
+ type: "list_item",
380
+ raw: r,
381
+ task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
382
+ loose: !1,
383
+ text: s,
384
+ tokens: []
385
+ }), i.raw += r;
386
+ }
387
+ let s = i.items.at(-1);
388
+ if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
389
+ else return;
390
+ i.raw = i.raw.trimEnd();
391
+ for (let e of i.items) {
392
+ if (this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []), e.task) {
393
+ if (e.text = e.text.replace(this.rules.other.listReplaceTask, ""), e.tokens[0]?.type === "text" || e.tokens[0]?.type === "paragraph") {
394
+ e.tokens[0].raw = e.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), e.tokens[0].text = e.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
395
+ for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
396
+ this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
397
+ break;
398
+ }
399
+ }
400
+ let t = this.rules.other.listTaskCheckbox.exec(e.raw);
401
+ if (t) {
402
+ let n = {
403
+ type: "checkbox",
404
+ raw: t[0] + " ",
405
+ checked: t[0] !== "[ ]"
406
+ };
407
+ e.checked = n.checked, i.loose ? e.tokens[0] && ["paragraph", "text"].includes(e.tokens[0].type) && "tokens" in e.tokens[0] && e.tokens[0].tokens ? (e.tokens[0].raw = n.raw + e.tokens[0].raw, e.tokens[0].text = n.raw + e.tokens[0].text, e.tokens[0].tokens.unshift(n)) : e.tokens.unshift({
408
+ type: "paragraph",
409
+ raw: n.raw,
410
+ text: n.raw,
411
+ tokens: [n]
412
+ }) : e.tokens.unshift(n);
413
+ }
414
+ }
415
+ if (!i.loose) {
416
+ let t = e.tokens.filter((e) => e.type === "space");
417
+ i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
418
+ }
419
+ }
420
+ if (i.loose) for (let e of i.items) {
421
+ e.loose = !0;
422
+ for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
423
+ }
424
+ return i;
425
+ }
426
+ }
427
+ html(e) {
428
+ let t = this.rules.block.html.exec(e);
429
+ if (t) return {
430
+ type: "html",
431
+ block: !0,
432
+ raw: t[0],
433
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
434
+ text: t[0]
435
+ };
436
+ }
437
+ def(e) {
438
+ let t = this.rules.block.def.exec(e);
439
+ if (t) {
440
+ let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = 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];
441
+ return {
442
+ type: "def",
443
+ tag: e,
444
+ raw: t[0],
445
+ href: n,
446
+ title: r
447
+ };
448
+ }
449
+ }
450
+ table(e) {
451
+ let t = this.rules.block.table.exec(e);
452
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
453
+ let n = rt(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
454
+ type: "table",
455
+ raw: t[0],
456
+ header: [],
457
+ align: [],
458
+ rows: []
459
+ };
460
+ if (n.length === r.length) {
461
+ for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
462
+ for (let e = 0; e < n.length; e++) a.header.push({
463
+ text: n[e],
464
+ tokens: this.lexer.inline(n[e]),
465
+ header: !0,
466
+ align: a.align[e]
467
+ });
468
+ for (let e of i) a.rows.push(rt(e, a.header.length).map((e, t) => ({
469
+ text: e,
470
+ tokens: this.lexer.inline(e),
471
+ header: !1,
472
+ align: a.align[t]
473
+ })));
474
+ return a;
475
+ }
476
+ }
477
+ lheading(e) {
478
+ let t = this.rules.block.lheading.exec(e);
479
+ if (t) return {
480
+ type: "heading",
481
+ raw: t[0],
482
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
483
+ text: t[1],
484
+ tokens: this.lexer.inline(t[1])
485
+ };
486
+ }
487
+ paragraph(e) {
488
+ let t = this.rules.block.paragraph.exec(e);
489
+ if (t) {
490
+ let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
491
+ return {
492
+ type: "paragraph",
493
+ raw: t[0],
494
+ text: e,
495
+ tokens: this.lexer.inline(e)
496
+ };
497
+ }
498
+ }
499
+ text(e) {
500
+ let t = this.rules.block.text.exec(e);
501
+ if (t) return {
502
+ type: "text",
503
+ raw: t[0],
504
+ text: t[0],
505
+ tokens: this.lexer.inline(t[0])
506
+ };
507
+ }
508
+ escape(e) {
509
+ let t = this.rules.inline.escape.exec(e);
510
+ if (t) return {
511
+ type: "escape",
512
+ raw: t[0],
513
+ text: t[1]
514
+ };
515
+ }
516
+ tag(e) {
517
+ let t = this.rules.inline.tag.exec(e);
518
+ 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), {
519
+ type: "html",
520
+ raw: t[0],
521
+ inLink: this.lexer.state.inLink,
522
+ inRawBlock: this.lexer.state.inRawBlock,
523
+ block: !1,
524
+ text: t[0]
525
+ };
526
+ }
527
+ link(e) {
528
+ let t = this.rules.inline.link.exec(e);
529
+ if (t) {
530
+ let e = t[2].trim();
531
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
532
+ if (!this.rules.other.endAngleBracket.test(e)) return;
533
+ let t = W(e.slice(0, -1), "\\");
534
+ if ((e.length - t.length) % 2 == 0) return;
535
+ } else {
536
+ let e = it(t[2], "()");
537
+ if (e === -2) return;
538
+ if (e > -1) {
539
+ let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
540
+ t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
541
+ }
542
+ }
543
+ let n = t[2], r = "";
544
+ if (this.options.pedantic) {
545
+ let e = this.rules.other.pedanticHrefTitle.exec(n);
546
+ e && (n = e[1], r = e[3]);
547
+ } else r = t[3] ? t[3].slice(1, -1) : "";
548
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), at(t, {
549
+ href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
550
+ title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
551
+ }, t[0], this.lexer, this.rules);
552
+ }
553
+ }
554
+ reflink(e, t) {
555
+ let n;
556
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
557
+ let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
558
+ if (!e) {
559
+ let e = n[0].charAt(0);
560
+ return {
561
+ type: "text",
562
+ raw: e,
563
+ text: e
564
+ };
565
+ }
566
+ return at(n, e, n[0], this.lexer, this.rules);
567
+ }
568
+ }
569
+ emStrong(e, t, n = "") {
570
+ let r = this.rules.inline.emStrongLDelim.exec(e);
571
+ if (!(!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[2]) || !n || this.rules.inline.punctuation.exec(n))) {
572
+ let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
573
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) != null;) {
574
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
575
+ if (a = [...i].length, r[3] || r[4]) {
576
+ o += a;
577
+ continue;
578
+ } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
579
+ s += a;
580
+ continue;
581
+ }
582
+ if (o -= a, o > 0) continue;
583
+ a = Math.min(a, a + o + s);
584
+ let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
585
+ if (Math.min(n, a) % 2) {
586
+ let e = c.slice(1, -1);
587
+ return {
588
+ type: "em",
589
+ raw: c,
590
+ text: e,
591
+ tokens: this.lexer.inlineTokens(e)
592
+ };
593
+ }
594
+ let l = c.slice(2, -2);
595
+ return {
596
+ type: "strong",
597
+ raw: c,
598
+ text: l,
599
+ tokens: this.lexer.inlineTokens(l)
600
+ };
601
+ }
602
+ }
603
+ }
604
+ codespan(e) {
605
+ let t = this.rules.inline.code.exec(e);
606
+ if (t) {
607
+ let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
608
+ return n && r && (e = e.substring(1, e.length - 1)), {
609
+ type: "codespan",
610
+ raw: t[0],
611
+ text: e
612
+ };
613
+ }
614
+ }
615
+ br(e) {
616
+ let t = this.rules.inline.br.exec(e);
617
+ if (t) return {
618
+ type: "br",
619
+ raw: t[0]
620
+ };
621
+ }
622
+ del(e) {
623
+ let t = this.rules.inline.del.exec(e);
624
+ if (t) return {
625
+ type: "del",
626
+ raw: t[0],
627
+ text: t[2],
628
+ tokens: this.lexer.inlineTokens(t[2])
629
+ };
630
+ }
631
+ autolink(e) {
632
+ let t = this.rules.inline.autolink.exec(e);
633
+ if (t) {
634
+ let e, n;
635
+ return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
636
+ type: "link",
637
+ raw: t[0],
638
+ text: e,
639
+ href: n,
640
+ tokens: [{
641
+ type: "text",
642
+ raw: e,
643
+ text: e
644
+ }]
645
+ };
646
+ }
647
+ }
648
+ url(e) {
649
+ let t;
650
+ if (t = this.rules.inline.url.exec(e)) {
651
+ let e, n;
652
+ if (t[2] === "@") e = t[0], n = "mailto:" + e;
653
+ else {
654
+ let r;
655
+ do
656
+ r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
657
+ while (r !== t[0]);
658
+ e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
659
+ }
660
+ return {
661
+ type: "link",
662
+ raw: t[0],
663
+ text: e,
664
+ href: n,
665
+ tokens: [{
666
+ type: "text",
667
+ raw: e,
668
+ text: e
669
+ }]
670
+ };
671
+ }
672
+ }
673
+ inlineText(e) {
674
+ let t = this.rules.inline.text.exec(e);
675
+ if (t) {
676
+ let e = this.lexer.state.inRawBlock;
677
+ return {
678
+ type: "text",
679
+ raw: t[0],
680
+ text: t[0],
681
+ escaped: e
682
+ };
683
+ }
684
+ }
685
+ }, K = class e {
686
+ tokens;
687
+ options;
688
+ state;
689
+ inlineQueue;
690
+ tokenizer;
691
+ constructor(e) {
692
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || S, this.options.tokenizer = this.options.tokenizer || new G(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
693
+ inLink: !1,
694
+ inRawBlock: !1,
695
+ top: !0
696
+ };
697
+ let t = {
698
+ other: D,
699
+ block: V.normal,
700
+ inline: H.normal
701
+ };
702
+ this.options.pedantic ? (t.block = V.pedantic, t.inline = H.pedantic) : this.options.gfm && (t.block = V.gfm, this.options.breaks ? t.inline = H.breaks : t.inline = H.gfm), this.tokenizer.rules = t;
703
+ }
704
+ static get rules() {
705
+ return {
706
+ block: V,
707
+ inline: H
708
+ };
709
+ }
710
+ static lex(t, n) {
711
+ return new e(n).lex(t);
712
+ }
713
+ static lexInline(t, n) {
714
+ return new e(n).inlineTokens(t);
715
+ }
716
+ lex(e) {
717
+ e = e.replace(D.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
718
+ for (let e = 0; e < this.inlineQueue.length; e++) {
719
+ let t = this.inlineQueue[e];
720
+ this.inlineTokens(t.src, t.tokens);
721
+ }
722
+ return this.inlineQueue = [], this.tokens;
723
+ }
724
+ blockTokens(e, t = [], n = !1) {
725
+ for (this.options.pedantic && (e = e.replace(D.tabCharGlobal, " ").replace(D.spaceLine, "")); e;) {
726
+ let r;
727
+ if (this.options.extensions?.block?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
728
+ if (r = this.tokenizer.space(e)) {
729
+ e = e.substring(r.raw.length);
730
+ let n = t.at(-1);
731
+ r.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(r);
732
+ continue;
733
+ }
734
+ if (r = this.tokenizer.code(e)) {
735
+ e = e.substring(r.raw.length);
736
+ let n = t.at(-1);
737
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + r.raw, n.text += "\n" + r.text, this.inlineQueue.at(-1).src = n.text) : t.push(r);
738
+ continue;
739
+ }
740
+ if (r = this.tokenizer.fences(e)) {
741
+ e = e.substring(r.raw.length), t.push(r);
742
+ continue;
743
+ }
744
+ if (r = this.tokenizer.heading(e)) {
745
+ e = e.substring(r.raw.length), t.push(r);
746
+ continue;
747
+ }
748
+ if (r = this.tokenizer.hr(e)) {
749
+ e = e.substring(r.raw.length), t.push(r);
750
+ continue;
751
+ }
752
+ if (r = this.tokenizer.blockquote(e)) {
753
+ e = e.substring(r.raw.length), t.push(r);
754
+ continue;
755
+ }
756
+ if (r = this.tokenizer.list(e)) {
757
+ e = e.substring(r.raw.length), t.push(r);
758
+ continue;
759
+ }
760
+ if (r = this.tokenizer.html(e)) {
761
+ e = e.substring(r.raw.length), t.push(r);
762
+ continue;
763
+ }
764
+ if (r = this.tokenizer.def(e)) {
765
+ e = e.substring(r.raw.length);
766
+ let n = t.at(-1);
767
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + r.raw, n.text += "\n" + r.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
768
+ href: r.href,
769
+ title: r.title
770
+ }, t.push(r));
771
+ continue;
772
+ }
773
+ if (r = this.tokenizer.table(e)) {
774
+ e = e.substring(r.raw.length), t.push(r);
775
+ continue;
776
+ }
777
+ if (r = this.tokenizer.lheading(e)) {
778
+ e = e.substring(r.raw.length), t.push(r);
779
+ continue;
780
+ }
781
+ let i = e;
782
+ if (this.options.extensions?.startBlock) {
783
+ let t = Infinity, n = e.slice(1), r;
784
+ this.options.extensions.startBlock.forEach((e) => {
785
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
786
+ }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
787
+ }
788
+ if (this.state.top && (r = this.tokenizer.paragraph(i))) {
789
+ let a = t.at(-1);
790
+ n && a?.type === "paragraph" ? (a.raw += (a.raw.endsWith("\n") ? "" : "\n") + r.raw, a.text += "\n" + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = a.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
791
+ continue;
792
+ }
793
+ if (r = this.tokenizer.text(e)) {
794
+ e = e.substring(r.raw.length);
795
+ let n = t.at(-1);
796
+ n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + r.raw, n.text += "\n" + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(r);
797
+ continue;
798
+ }
799
+ if (e) {
800
+ let t = "Infinite loop on byte: " + e.charCodeAt(0);
801
+ if (this.options.silent) {
802
+ console.error(t);
803
+ break;
804
+ } else throw Error(t);
805
+ }
806
+ }
807
+ return this.state.top = !0, t;
808
+ }
809
+ inline(e, t = []) {
810
+ return this.inlineQueue.push({
811
+ src: e,
812
+ tokens: t
813
+ }), t;
814
+ }
815
+ inlineTokens(e, t = []) {
816
+ let n = e, r = null;
817
+ if (this.tokens.links) {
818
+ let e = Object.keys(this.tokens.links);
819
+ if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null;) e.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));
820
+ }
821
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
822
+ let i;
823
+ 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);
824
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
825
+ let a = !1, o = "";
826
+ for (; e;) {
827
+ a || (o = ""), a = !1;
828
+ let r;
829
+ if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
830
+ if (r = this.tokenizer.escape(e)) {
831
+ e = e.substring(r.raw.length), t.push(r);
832
+ continue;
833
+ }
834
+ if (r = this.tokenizer.tag(e)) {
835
+ e = e.substring(r.raw.length), t.push(r);
836
+ continue;
837
+ }
838
+ if (r = this.tokenizer.link(e)) {
839
+ e = e.substring(r.raw.length), t.push(r);
840
+ continue;
841
+ }
842
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
843
+ e = e.substring(r.raw.length);
844
+ let n = t.at(-1);
845
+ r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
846
+ continue;
847
+ }
848
+ if (r = this.tokenizer.emStrong(e, n, o)) {
849
+ e = e.substring(r.raw.length), t.push(r);
850
+ continue;
851
+ }
852
+ if (r = this.tokenizer.codespan(e)) {
853
+ e = e.substring(r.raw.length), t.push(r);
854
+ continue;
855
+ }
856
+ if (r = this.tokenizer.br(e)) {
857
+ e = e.substring(r.raw.length), t.push(r);
858
+ continue;
859
+ }
860
+ if (r = this.tokenizer.del(e)) {
861
+ e = e.substring(r.raw.length), t.push(r);
862
+ continue;
863
+ }
864
+ if (r = this.tokenizer.autolink(e)) {
865
+ e = e.substring(r.raw.length), t.push(r);
866
+ continue;
867
+ }
868
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
869
+ e = e.substring(r.raw.length), t.push(r);
870
+ continue;
871
+ }
872
+ let i = e;
873
+ if (this.options.extensions?.startInline) {
874
+ let t = Infinity, n = e.slice(1), r;
875
+ this.options.extensions.startInline.forEach((e) => {
876
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
877
+ }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
878
+ }
879
+ if (r = this.tokenizer.inlineText(i)) {
880
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
881
+ let n = t.at(-1);
882
+ n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
883
+ continue;
884
+ }
885
+ if (e) {
886
+ let t = "Infinite loop on byte: " + e.charCodeAt(0);
887
+ if (this.options.silent) {
888
+ console.error(t);
889
+ break;
890
+ } else throw Error(t);
891
+ }
892
+ }
893
+ return t;
894
+ }
895
+ }, q = class {
896
+ options;
897
+ parser;
898
+ constructor(e) {
899
+ this.options = e || S;
900
+ }
901
+ space(e) {
902
+ return "";
903
+ }
904
+ code({ text: e, lang: t, escaped: n }) {
905
+ let r = (t || "").match(D.notSpaceStart)?.[0], i = e.replace(D.endingNewline, "") + "\n";
906
+ return r ? "<pre><code class=\"language-" + U(r) + "\">" + (n ? i : U(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : U(i, !0)) + "</code></pre>\n";
907
+ }
908
+ blockquote({ tokens: e }) {
909
+ return `<blockquote>
910
+ ${this.parser.parse(e)}</blockquote>
911
+ `;
912
+ }
913
+ html({ text: e }) {
914
+ return e;
915
+ }
916
+ def(e) {
917
+ return "";
918
+ }
919
+ heading({ tokens: e, depth: t }) {
920
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
921
+ `;
922
+ }
923
+ hr(e) {
924
+ return "<hr>\n";
925
+ }
926
+ list(e) {
927
+ let t = e.ordered, n = e.start, r = "";
928
+ for (let t = 0; t < e.items.length; t++) {
929
+ let n = e.items[t];
930
+ r += this.listitem(n);
931
+ }
932
+ let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
933
+ return "<" + i + a + ">\n" + r + "</" + i + ">\n";
934
+ }
935
+ listitem(e) {
936
+ return `<li>${this.parser.parse(e.tokens)}</li>
937
+ `;
938
+ }
939
+ checkbox({ checked: e }) {
940
+ return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
941
+ }
942
+ paragraph({ tokens: e }) {
943
+ return `<p>${this.parser.parseInline(e)}</p>
944
+ `;
945
+ }
946
+ table(e) {
947
+ let t = "", n = "";
948
+ for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
949
+ t += this.tablerow({ text: n });
950
+ let r = "";
951
+ for (let t = 0; t < e.rows.length; t++) {
952
+ let i = e.rows[t];
953
+ n = "";
954
+ for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
955
+ r += this.tablerow({ text: n });
956
+ }
957
+ return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
958
+ }
959
+ tablerow({ text: e }) {
960
+ return `<tr>
961
+ ${e}</tr>
962
+ `;
963
+ }
964
+ tablecell(e) {
965
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
966
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
967
+ `;
968
+ }
969
+ strong({ tokens: e }) {
970
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
971
+ }
972
+ em({ tokens: e }) {
973
+ return `<em>${this.parser.parseInline(e)}</em>`;
974
+ }
975
+ codespan({ text: e }) {
976
+ return `<code>${U(e, !0)}</code>`;
977
+ }
978
+ br(e) {
979
+ return "<br>";
980
+ }
981
+ del({ tokens: e }) {
982
+ return `<del>${this.parser.parseInline(e)}</del>`;
983
+ }
984
+ link({ href: e, title: t, tokens: n }) {
985
+ let r = this.parser.parseInline(n), i = nt(e);
986
+ if (i === null) return r;
987
+ e = i;
988
+ let a = "<a href=\"" + e + "\"";
989
+ return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
990
+ }
991
+ image({ href: e, title: t, text: n, tokens: r }) {
992
+ r && (n = this.parser.parseInline(r, this.parser.textRenderer));
993
+ let i = nt(e);
994
+ if (i === null) return U(n);
995
+ e = i;
996
+ let a = `<img src="${e}" alt="${n}"`;
997
+ return t && (a += ` title="${U(t)}"`), a += ">", a;
998
+ }
999
+ text(e) {
1000
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1001
+ }
1002
+ }, J = class {
1003
+ strong({ text: e }) {
1004
+ return e;
1005
+ }
1006
+ em({ text: e }) {
1007
+ return e;
1008
+ }
1009
+ codespan({ text: e }) {
1010
+ return e;
1011
+ }
1012
+ del({ text: e }) {
1013
+ return e;
1014
+ }
1015
+ html({ text: e }) {
1016
+ return e;
1017
+ }
1018
+ text({ text: e }) {
1019
+ return e;
1020
+ }
1021
+ link({ text: e }) {
1022
+ return "" + e;
1023
+ }
1024
+ image({ text: e }) {
1025
+ return "" + e;
1026
+ }
1027
+ br() {
1028
+ return "";
1029
+ }
1030
+ checkbox({ raw: e }) {
1031
+ return e;
1032
+ }
1033
+ }, Y = class e {
1034
+ options;
1035
+ renderer;
1036
+ textRenderer;
1037
+ constructor(e) {
1038
+ this.options = e || S, this.options.renderer = this.options.renderer || new q(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new J();
1039
+ }
1040
+ static parse(t, n) {
1041
+ return new e(n).parse(t);
1042
+ }
1043
+ static parseInline(t, n) {
1044
+ return new e(n).parseInline(t);
1045
+ }
1046
+ parse(e) {
1047
+ let t = "";
1048
+ for (let n = 0; n < e.length; n++) {
1049
+ let r = e[n];
1050
+ if (this.options.extensions?.renderers?.[r.type]) {
1051
+ let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1052
+ if (n !== !1 || ![
1053
+ "space",
1054
+ "hr",
1055
+ "heading",
1056
+ "code",
1057
+ "table",
1058
+ "blockquote",
1059
+ "list",
1060
+ "html",
1061
+ "def",
1062
+ "paragraph",
1063
+ "text"
1064
+ ].includes(e.type)) {
1065
+ t += n || "";
1066
+ continue;
1067
+ }
1068
+ }
1069
+ let i = r;
1070
+ switch (i.type) {
1071
+ case "space":
1072
+ t += this.renderer.space(i);
1073
+ break;
1074
+ case "hr":
1075
+ t += this.renderer.hr(i);
1076
+ break;
1077
+ case "heading":
1078
+ t += this.renderer.heading(i);
1079
+ break;
1080
+ case "code":
1081
+ t += this.renderer.code(i);
1082
+ break;
1083
+ case "table":
1084
+ t += this.renderer.table(i);
1085
+ break;
1086
+ case "blockquote":
1087
+ t += this.renderer.blockquote(i);
1088
+ break;
1089
+ case "list":
1090
+ t += this.renderer.list(i);
1091
+ break;
1092
+ case "checkbox":
1093
+ t += this.renderer.checkbox(i);
1094
+ break;
1095
+ case "html":
1096
+ t += this.renderer.html(i);
1097
+ break;
1098
+ case "def":
1099
+ t += this.renderer.def(i);
1100
+ break;
1101
+ case "paragraph":
1102
+ t += this.renderer.paragraph(i);
1103
+ break;
1104
+ case "text":
1105
+ t += this.renderer.text(i);
1106
+ break;
1107
+ default: {
1108
+ let e = "Token with \"" + i.type + "\" type was not found.";
1109
+ if (this.options.silent) return console.error(e), "";
1110
+ throw Error(e);
1111
+ }
1112
+ }
1113
+ }
1114
+ return t;
1115
+ }
1116
+ parseInline(e, t = this.renderer) {
1117
+ let n = "";
1118
+ for (let r = 0; r < e.length; r++) {
1119
+ let i = e[r];
1120
+ if (this.options.extensions?.renderers?.[i.type]) {
1121
+ let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1122
+ if (e !== !1 || ![
1123
+ "escape",
1124
+ "html",
1125
+ "link",
1126
+ "image",
1127
+ "strong",
1128
+ "em",
1129
+ "codespan",
1130
+ "br",
1131
+ "del",
1132
+ "text"
1133
+ ].includes(i.type)) {
1134
+ n += e || "";
1135
+ continue;
1136
+ }
1137
+ }
1138
+ let a = i;
1139
+ switch (a.type) {
1140
+ case "escape":
1141
+ n += t.text(a);
1142
+ break;
1143
+ case "html":
1144
+ n += t.html(a);
1145
+ break;
1146
+ case "link":
1147
+ n += t.link(a);
1148
+ break;
1149
+ case "image":
1150
+ n += t.image(a);
1151
+ break;
1152
+ case "checkbox":
1153
+ n += t.checkbox(a);
1154
+ break;
1155
+ case "strong":
1156
+ n += t.strong(a);
1157
+ break;
1158
+ case "em":
1159
+ n += t.em(a);
1160
+ break;
1161
+ case "codespan":
1162
+ n += t.codespan(a);
1163
+ break;
1164
+ case "br":
1165
+ n += t.br(a);
1166
+ break;
1167
+ case "del":
1168
+ n += t.del(a);
1169
+ break;
1170
+ case "text":
1171
+ n += t.text(a);
1172
+ break;
1173
+ default: {
1174
+ let e = "Token with \"" + a.type + "\" type was not found.";
1175
+ if (this.options.silent) return console.error(e), "";
1176
+ throw Error(e);
1177
+ }
1178
+ }
1179
+ }
1180
+ return n;
1181
+ }
1182
+ }, X = class {
1183
+ options;
1184
+ block;
1185
+ constructor(e) {
1186
+ this.options = e || S;
1187
+ }
1188
+ static passThroughHooks = new Set([
1189
+ "preprocess",
1190
+ "postprocess",
1191
+ "processAllTokens",
1192
+ "emStrongMask"
1193
+ ]);
1194
+ static passThroughHooksRespectAsync = new Set([
1195
+ "preprocess",
1196
+ "postprocess",
1197
+ "processAllTokens"
1198
+ ]);
1199
+ preprocess(e) {
1200
+ return e;
1201
+ }
1202
+ postprocess(e) {
1203
+ return e;
1204
+ }
1205
+ processAllTokens(e) {
1206
+ return e;
1207
+ }
1208
+ emStrongMask(e) {
1209
+ return e;
1210
+ }
1211
+ provideLexer() {
1212
+ return this.block ? K.lex : K.lexInline;
1213
+ }
1214
+ provideParser() {
1215
+ return this.block ? Y.parse : Y.parseInline;
1216
+ }
1217
+ }, Z = new class {
1218
+ defaults = x();
1219
+ options = this.setOptions;
1220
+ parse = this.parseMarkdown(!0);
1221
+ parseInline = this.parseMarkdown(!1);
1222
+ Parser = Y;
1223
+ Renderer = q;
1224
+ TextRenderer = J;
1225
+ Lexer = K;
1226
+ Tokenizer = G;
1227
+ Hooks = X;
1228
+ constructor(...e) {
1229
+ this.use(...e);
1230
+ }
1231
+ walkTokens(e, t) {
1232
+ let n = [];
1233
+ for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
1234
+ case "table": {
1235
+ let e = r;
1236
+ for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
1237
+ for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
1238
+ break;
1239
+ }
1240
+ case "list": {
1241
+ let e = r;
1242
+ n = n.concat(this.walkTokens(e.items, t));
1243
+ break;
1244
+ }
1245
+ default: {
1246
+ let e = r;
1247
+ this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
1248
+ let i = e[r].flat(Infinity);
1249
+ n = n.concat(this.walkTokens(i, t));
1250
+ }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
1251
+ }
1252
+ }
1253
+ return n;
1254
+ }
1255
+ use(...e) {
1256
+ let t = this.defaults.extensions || {
1257
+ renderers: {},
1258
+ childTokens: {}
1259
+ };
1260
+ return e.forEach((e) => {
1261
+ let n = { ...e };
1262
+ if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
1263
+ if (!e.name) throw Error("extension name required");
1264
+ if ("renderer" in e) {
1265
+ let n = t.renderers[e.name];
1266
+ n ? t.renderers[e.name] = function(...t) {
1267
+ let r = e.renderer.apply(this, t);
1268
+ return r === !1 && (r = n.apply(this, t)), r;
1269
+ } : t.renderers[e.name] = e.renderer;
1270
+ }
1271
+ if ("tokenizer" in e) {
1272
+ if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
1273
+ let n = t[e.level];
1274
+ n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
1275
+ }
1276
+ "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
1277
+ }), n.extensions = t), e.renderer) {
1278
+ let t = this.defaults.renderer || new q(this.defaults);
1279
+ for (let n in e.renderer) {
1280
+ if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
1281
+ if (["options", "parser"].includes(n)) continue;
1282
+ let r = n, i = e.renderer[r], a = t[r];
1283
+ t[r] = (...e) => {
1284
+ let n = i.apply(t, e);
1285
+ return n === !1 && (n = a.apply(t, e)), n || "";
1286
+ };
1287
+ }
1288
+ n.renderer = t;
1289
+ }
1290
+ if (e.tokenizer) {
1291
+ let t = this.defaults.tokenizer || new G(this.defaults);
1292
+ for (let n in e.tokenizer) {
1293
+ if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
1294
+ if ([
1295
+ "options",
1296
+ "rules",
1297
+ "lexer"
1298
+ ].includes(n)) continue;
1299
+ let r = n, i = e.tokenizer[r], a = t[r];
1300
+ t[r] = (...e) => {
1301
+ let n = i.apply(t, e);
1302
+ return n === !1 && (n = a.apply(t, e)), n;
1303
+ };
1304
+ }
1305
+ n.tokenizer = t;
1306
+ }
1307
+ if (e.hooks) {
1308
+ let t = this.defaults.hooks || new X();
1309
+ for (let n in e.hooks) {
1310
+ if (!(n in t)) throw Error(`hook '${n}' does not exist`);
1311
+ if (["options", "block"].includes(n)) continue;
1312
+ let r = n, i = e.hooks[r], a = t[r];
1313
+ X.passThroughHooks.has(n) ? t[r] = (e) => {
1314
+ if (this.defaults.async && X.passThroughHooksRespectAsync.has(n)) return (async () => {
1315
+ let n = await i.call(t, e);
1316
+ return a.call(t, n);
1317
+ })();
1318
+ let r = i.call(t, e);
1319
+ return a.call(t, r);
1320
+ } : t[r] = (...e) => {
1321
+ if (this.defaults.async) return (async () => {
1322
+ let n = await i.apply(t, e);
1323
+ return n === !1 && (n = await a.apply(t, e)), n;
1324
+ })();
1325
+ let n = i.apply(t, e);
1326
+ return n === !1 && (n = a.apply(t, e)), n;
1327
+ };
1328
+ }
1329
+ n.hooks = t;
1330
+ }
1331
+ if (e.walkTokens) {
1332
+ let t = this.defaults.walkTokens, r = e.walkTokens;
1333
+ n.walkTokens = function(e) {
1334
+ let n = [];
1335
+ return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
1336
+ };
1337
+ }
1338
+ this.defaults = {
1339
+ ...this.defaults,
1340
+ ...n
1341
+ };
1342
+ }), this;
1343
+ }
1344
+ setOptions(e) {
1345
+ return this.defaults = {
1346
+ ...this.defaults,
1347
+ ...e
1348
+ }, this;
1349
+ }
1350
+ lexer(e, t) {
1351
+ return K.lex(e, t ?? this.defaults);
1352
+ }
1353
+ parser(e, t) {
1354
+ return Y.parse(e, t ?? this.defaults);
1355
+ }
1356
+ parseMarkdown(e) {
1357
+ return (t, n) => {
1358
+ let r = { ...n }, i = {
1359
+ ...this.defaults,
1360
+ ...r
1361
+ }, a = this.onError(!!i.silent, !!i.async);
1362
+ if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1363
+ if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
1364
+ if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
1365
+ if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
1366
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer() : e ? K.lex : K.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
1367
+ i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
1368
+ let o = await (i.hooks ? await i.hooks.provideParser() : e ? Y.parse : Y.parseInline)(a, i);
1369
+ return i.hooks ? await i.hooks.postprocess(o) : o;
1370
+ })().catch(a);
1371
+ try {
1372
+ i.hooks && (t = i.hooks.preprocess(t));
1373
+ let n = (i.hooks ? i.hooks.provideLexer() : e ? K.lex : K.lexInline)(t, i);
1374
+ i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
1375
+ let r = (i.hooks ? i.hooks.provideParser() : e ? Y.parse : Y.parseInline)(n, i);
1376
+ return i.hooks && (r = i.hooks.postprocess(r)), r;
1377
+ } catch (e) {
1378
+ return a(e);
1379
+ }
1380
+ };
1381
+ }
1382
+ onError(e, t) {
1383
+ return (n) => {
1384
+ if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
1385
+ let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
1386
+ return t ? Promise.resolve(e) : e;
1387
+ }
1388
+ if (t) return Promise.reject(n);
1389
+ throw n;
1390
+ };
1391
+ }
1392
+ }();
1393
+ function Q(e, t) {
1394
+ return Z.parse(e, t);
1395
+ }
1396
+ Q.options = Q.setOptions = function(e) {
1397
+ return Z.setOptions(e), Q.defaults = Z.defaults, C(Q.defaults), Q;
1398
+ }, Q.getDefaults = x, Q.defaults = S, Q.use = function(...e) {
1399
+ return Z.use(...e), Q.defaults = Z.defaults, C(Q.defaults), Q;
1400
+ }, Q.walkTokens = function(e, t) {
1401
+ return Z.walkTokens(e, t);
1402
+ }, Q.parseInline = Z.parseInline, Q.Parser = Y, Q.parser = Y.parse, Q.Renderer = q, Q.TextRenderer = J, Q.Lexer = K, Q.lexer = K.lex, Q.Tokenizer = G, Q.Hooks = X, Q.parse = Q, Q.options, Q.setOptions, Q.use, Q.walkTokens, Q.parseInline, Y.parse, K.lex;
1403
+ //#endregion
1404
+ //#region utils/index.js
1405
+ var st = (e, t) => {
1406
+ let n;
1407
+ return function() {
1408
+ let r = this, i = arguments;
1409
+ n && clearTimeout(n), n = setTimeout(() => {
1410
+ e.apply(r, i);
1411
+ }, t);
1412
+ };
1413
+ }, ct = (e, t) => {
1414
+ let n, r = !0;
1415
+ return function() {
1416
+ let i = this, a = arguments;
1417
+ if (r) {
1418
+ e.apply(i, a), r = !1, n = setTimeout(() => {
1419
+ n = null, r = !0;
1420
+ }, t);
1421
+ return;
1422
+ }
1423
+ n ||= setTimeout(() => {
1424
+ e.apply(i, a), n = null, r = !0;
1425
+ }, t);
1426
+ };
1427
+ };
1428
+ function lt(e, t) {
1429
+ return window.sessionStorage.setItem(e, JSON.stringify(t));
1430
+ }
1431
+ function ut(e) {
1432
+ return JSON.parse(window.sessionStorage.getItem(e));
1433
+ }
1434
+ function dt(e) {
1435
+ return window.sessionStorage.removeItem(e);
1436
+ }
1437
+ function ft() {
1438
+ return window.sessionStorage.clear();
1439
+ }
1440
+ function pt(e) {
1441
+ let t = Number(e);
1442
+ return t ? t / 1e3 + "s" : "";
1443
+ }
1444
+ var mt = (e) => {
1445
+ if (!e) return "";
1446
+ let t = 0;
1447
+ for (; Math.abs(e) >= 1024 && (e /= 1024, t++, t !== 4););
1448
+ return Math.round(e * 100) / 100 + " " + [
1449
+ "B",
1450
+ "KB",
1451
+ "MB",
1452
+ "GB",
1453
+ "TB"
1454
+ ][t];
1455
+ }, $ = v({}), ht = (e) => {
1456
+ if (!e) return "";
1457
+ let t = Q.parse(e).replace(/>(\s+)</g, "><"), n = t.match(/<img[^>]+src="([^"]+)"[^>]*>/g);
1458
+ return n && n.forEach((e) => {
1459
+ let n = e.match(/src="([^"]+)"/);
1460
+ if (n && n[1]) {
1461
+ let r = n[1];
1462
+ if (!$.value[r]) {
1463
+ $.value[r] = "loading";
1464
+ let e = new Image();
1465
+ e.onload = () => {
1466
+ $.value[r] = "loaded";
1467
+ }, e.onerror = () => {
1468
+ $.value[r] = "error";
1469
+ }, e.src = r;
1470
+ }
1471
+ let i;
1472
+ i = $.value[r] === "loaded" ? e : $.value[r] === "error" ? `<div class="el-image__error" data-src='${n[1]}'><div class="image-slot"><i class="el-icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" t="1742463877500" class="icon" viewBox="0 0 1356 1024" version="1.1" p-id="4463" width="264.84375" height="200"><path d="M564.44449572 836.7634306l128.677796-204.53166511-78.14075901-43.48311004-67.64039324 78.75274348a32.20971115 32.20971115 0 0 1-45.96325785 2.995503l-111.12350325-99.68905577a32.20971115 32.20971115 0 0 0-45.83441924 2.83445505l-103.32875321 118.85383398-28.28012581-404.36071319q-3.3498102-48.18572778 44.83591758-51.53553797l311.72558369-21.838184L597.23398201 164.38571167 254.26497816 188.38194626A96.62913347 96.62913347 0 0 0 164.62535234 291.51744152l33.17600217 474.03031841a96.62913347 96.62913347 0 0 0 103.10328527 89.63962582l263.57206593-18.42395514z m84.90479874 1.67490545l299.45368385 20.93631228a96.62913347 96.62913347 0 0 0 103.13549526-89.63962649l33.14379285-474.03031771A96.62913347 96.62913347 0 0 0 995.41043062 192.56920886L772.32597104 176.94749877 737.70053205 223.00738594l254.36008835 17.77976067q48.18572778 3.38201953 44.83591824 51.56774731l-28.24791716 403.90977733-181.179625-210.97360762a32.20971115 32.20971115 0 0 0-45.70557994-3.18876161l-78.14075902 68.76773284 115.02087861 86.96622006-169.32645166 200.63429045z m-159.1159731-480.63330951a88.15797897 88.15797897 0 1 0-59.33028802 107.35496719l59.36249802-107.35496719z" p-id="4464"/></svg></i></div></div>` : "<div class=\"el-space__item\"><div class=\"el-skeleton is-animated\"><div class=\"el-skeleton__item el-skeleton__image\" style=\"width: 120px; height: 120px;\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" t=\"1742463703310\" class=\"icon\" viewBox=\"0 0 1282 1024\" version=\"1.1\" p-id=\"4321\" width=\"250.390625\" height=\"200\"><path d=\"M164.38571167 759.1138438V264.8861562a100.50044453 100.50044453 0 0 1 100.50044453-100.50044453h670.00296545a100.50044453 100.50044453 0 0 1 100.50044454 100.50044453v494.22768759a100.50044453 100.50044453 0 0 1-100.50044454 100.50044454H264.8861562a100.50044453 100.50044453 0 0 1-100.50044453-100.50044454z m820.75363192-73.0973238V264.8861562q0-50.25022262-50.25022194-50.25022191H264.8861562Q214.63593429 214.63593429 214.63593429 264.8861562v421.59936608l115.84351257-115.84351258a33.50014841 33.50014841 0 0 1 47.73771135 0.3685017l108.03797766 111.52199347a33.50014841 33.50014841 0 0 0 47.90521187 0.23450113l200.06288588-202.50839652a33.50014841 33.50014841 0 0 1 47.63721077 0l203.2788992 205.75791052zM407.46278744 466.69104932a91.68990581 91.68990581 0 1 0-1e-8-183.34631097 91.68990581 91.68990581 0 0 0 0 183.34631097z\" p-id=\"4322\"/></svg></div></div></div>", t = t.replace(e, i);
1473
+ }
1474
+ }), t;
1475
+ }, gt = (e) => {
1476
+ if (typeof e != "string") return !1;
1477
+ let t = e.trim().toLowerCase();
1478
+ if (/^<!doctype\s+html[\s>]/.test(t) || /^<html[\s>]/.test(t)) return !0;
1479
+ let n = t.indexOf("<head"), r = t.indexOf("<body");
1480
+ return !!(n !== -1 && r !== -1 && n < r || t.includes("<html") && t.includes("<head") && t.includes("<body"));
1481
+ }, _t = (e) => {
1482
+ e && (e.onload = () => {
1483
+ try {
1484
+ let t = e.contentDocument || e.contentWindow.document;
1485
+ e.style.height = t.body.scrollHeight + 100 + "px";
1486
+ } catch {
1487
+ e.style.height = "800px";
1488
+ }
1489
+ });
1490
+ }, vt = ["src"], yt = ["src"], bt = /* @__PURE__ */ u({
1491
+ __name: "MediaPreviewDialog",
1492
+ setup(e, { expose: t }) {
1493
+ let n = v(!1), r = v({
1494
+ url: "",
1495
+ name: "",
1496
+ suffix: ""
1497
+ }), a = (e = {}) => {
1498
+ r.value = {
1499
+ url: e.url || "",
1500
+ name: e.name || "",
1501
+ suffix: e.suffix || ""
1502
+ }, n.value = !0;
1503
+ }, s = () => {
1504
+ n.value = !1;
1505
+ }, c = () => {
1506
+ r.value = {
1507
+ url: "",
1508
+ name: "",
1509
+ suffix: ""
1510
+ };
1511
+ };
1512
+ return t({
1513
+ open: a,
1514
+ close: s
1515
+ }), (e, t) => (_(), f(y(se), {
1516
+ modelValue: n.value,
1517
+ "onUpdate:modelValue": t[0] ||= (e) => n.value = e,
1518
+ title: r.value.name || "媒体预览",
1519
+ width: "720px",
1520
+ "append-to-body": "",
1521
+ "destroy-on-close": "",
1522
+ onClosed: c
1523
+ }, {
1524
+ default: b(() => [y(o)(r.value.suffix) ? (_(), m("audio", {
1525
+ key: 0,
1526
+ src: r.value.url,
1527
+ controls: "",
1528
+ autoplay: "",
1529
+ class: "media-preview-dialog__player"
1530
+ }, null, 8, vt)) : y(i)(r.value.suffix) ? (_(), m("video", {
1531
+ key: 1,
1532
+ src: r.value.url,
1533
+ controls: "",
1534
+ autoplay: "",
1535
+ class: "media-preview-dialog__player media-preview-dialog__player--video"
1536
+ }, null, 8, yt)) : p("", !0)]),
1537
+ _: 1
1538
+ }, 8, ["modelValue", "title"]));
1539
+ }
1540
+ }, [["__scopeId", "data-v-5175f835"]]), xt = {
1541
+ key: 0,
1542
+ class: "file-display"
1543
+ }, St = ["onClick"], Ct = {
1544
+ key: 0,
1545
+ class: "file-img__failed w-full h-full flex items-center justify-center"
1546
+ }, wt = { class: "file-display__item--name text-ellipsis" }, Tt = { class: "file-display__item--size" }, Et = /* @__PURE__ */ u({
1547
+ __name: "index",
1548
+ props: {
1549
+ fileList: {
1550
+ type: Array,
1551
+ default: () => []
1552
+ },
1553
+ showRemove: {
1554
+ type: Boolean,
1555
+ default: !0
1556
+ },
1557
+ showLoading: {
1558
+ type: Boolean,
1559
+ default: !1
1560
+ }
1561
+ },
1562
+ emits: ["remove-file"],
1563
+ setup(u, { emit: se }) {
1564
+ let { previewImage: x } = s(), S = v(null), C = null;
1565
+ try {
1566
+ C = de();
1567
+ } catch {
1568
+ C = null;
1569
+ }
1570
+ let w = se, T = (e, t) => {
1571
+ w("remove-file", e, t);
1572
+ }, E = (e = {}) => e.effectiveUrl || e.url || "", D = (n = "") => r(n) || t(n) || a(n) || c(n) || e(n), O = (e = {}) => !!E(e), fe = (e = {}) => {
1573
+ if (!O(e)) return;
1574
+ let t = E(e);
1575
+ if (l(e.suffix, t)) {
1576
+ x(t);
1577
+ return;
1578
+ }
1579
+ if (o(e.suffix) || i(e.suffix)) {
1580
+ S.value?.open({
1581
+ url: t,
1582
+ name: e.name || "",
1583
+ suffix: e.suffix || ""
1584
+ });
1585
+ return;
1586
+ }
1587
+ if (D(e.suffix) && C) {
1588
+ let n = C.resolve({
1589
+ name: "FilePreview",
1590
+ params: { id: e.bnid || "direct" },
1591
+ query: {
1592
+ type: String(e.suffix || "").toLowerCase(),
1593
+ name: e.name || "",
1594
+ src: t
1595
+ }
1596
+ });
1597
+ window.open(n.href, "_blank");
1598
+ return;
1599
+ }
1600
+ window.open(t, "_blank");
1601
+ };
1602
+ return (e, t) => {
1603
+ let r = re("loading"), i = re("ellipsis-tooltip");
1604
+ return _(), m(d, null, [u.fileList.length ? (_(), m("div", xt, [(_(!0), m(d, null, ne(u.fileList, (e, t) => (_(), m("div", {
1605
+ key: t,
1606
+ class: "file-display__item"
1607
+ }, [
1608
+ oe((_(), m("div", {
1609
+ class: te(["file-img overflow-hidden", { "file-img--disabled": !O(e) }]),
1610
+ onClick: (t) => fe(e)
1611
+ }, [e.failed && u.showLoading ? (_(), m("div", Ct, [g(y(ce), {
1612
+ size: "22px",
1613
+ color: "#f56c6c"
1614
+ }, {
1615
+ default: b(() => [g(y(ue))]),
1616
+ _: 1
1617
+ })])) : (_(), m(d, { key: 1 }, [y(l)(e.suffix, E(e)) ? (_(), f(y(le), {
1618
+ key: 0,
1619
+ src: E(e),
1620
+ "zoom-rate": 1.2,
1621
+ "max-scale": 7,
1622
+ "min-scale": .2,
1623
+ fit: "cover"
1624
+ }, null, 8, ["src"])) : (_(), f(y(ce), {
1625
+ key: 1,
1626
+ size: "38px"
1627
+ }, {
1628
+ default: b(() => [(_(), f(ie(y(n)(e))))]),
1629
+ _: 2
1630
+ }, 1024))], 64))], 10, St)), [[r, !e.bnid && !e.failed && u.showLoading]]),
1631
+ h("div", null, [oe((_(), m("p", wt, [ee(ae(e.name), 1)])), [[i, e.name]]), h("p", Tt, [h("span", null, ae(y(mt)(e.size)), 1)])]),
1632
+ u.showRemove ? (_(), f(y(ce), {
1633
+ key: 0,
1634
+ class: "icon-remove",
1635
+ size: "18",
1636
+ onClick: (n) => T(t, e.bnid)
1637
+ }, {
1638
+ default: b(() => [g(y(ue))]),
1639
+ _: 1
1640
+ }, 8, ["onClick"])) : p("", !0)
1641
+ ]))), 128))])) : p("", !0), g(bt, {
1642
+ ref_key: "mediaPreviewDialogRef",
1643
+ ref: S
1644
+ }, null, 512)], 64);
1645
+ };
1646
+ }
1647
+ }, [["__scopeId", "data-v-7c542f62"]]);
1648
+ //#endregion
1649
+ export { gt as a, dt as c, ct as d, pt as f, ut as i, _t as l, st as n, ht as o, mt as r, ft as s, Et as t, lt as u };