aibox-custom-component-packages 0.0.21 → 0.0.23

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 (122) hide show
  1. package/es/AiboxTabs.mjs +71 -0
  2. package/es/DocSyncSelect.mjs +1 -1
  3. package/es/ExampleComponent.mjs +35 -0
  4. package/es/SourcePublish.mjs +1 -1
  5. package/es/assets/AiboxTabs.css +1 -0
  6. package/es/assets/BackBar.css +1 -0
  7. package/es/assets/DocSyncSelect.css +1 -1
  8. package/es/assets/ExampleComponent.css +1 -0
  9. package/es/assets/SourcePublish.css +1 -1
  10. package/es/assets/index.css +1 -0
  11. package/es/assets/index2.css +1 -0
  12. package/es/assets/index3.css +1 -0
  13. package/es/assets/index4.css +1 -0
  14. package/es/chunks/AiboxTable.CF4T_OCu.js +645 -0
  15. package/es/chunks/BackBar.Bc2NIuzk.js +645 -0
  16. package/es/chunks/{DocSyncSelect.DlJXL1lq.js → DocSyncSelect.dhZh4w45.js} +3 -3
  17. package/es/chunks/{SourcePublish.BjY8OTLS.js → SourcePublish.CjzqOFwj.js} +23 -10
  18. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
  19. package/es/chunks/config.8htFF04x.js +325 -0
  20. package/es/chunks/config.BU21Gda2.js +49 -0
  21. package/es/chunks/config.DPkdwjwD.js +49 -0
  22. package/es/chunks/config.gNZ_rT87.js +325 -0
  23. package/es/chunks/enums.CfSBDD6u.js +83 -0
  24. package/es/chunks/enums.WrpwbF4w.js +14 -0
  25. package/es/chunks/field-types.CPnMOjle.js +13 -0
  26. package/es/chunks/files.cduUqjHX.js +16 -0
  27. package/es/chunks/i18n.DmqkiK-h.js +444 -0
  28. package/es/chunks/i18n.k9Q_HVMs.js +443 -0
  29. package/es/chunks/index.BDd6hHiU.js +172 -0
  30. package/es/chunks/index.CF_YHLP5.js +257 -0
  31. package/es/chunks/index.DM3o2YX3.js +398 -0
  32. package/es/chunks/index.Dx-mCS4E.js +1298 -0
  33. package/es/chunks/index.bCzIhWFw.js +7 -0
  34. package/es/chunks/index.ml5i7aB5.js +257 -0
  35. package/es/chunks/layout.CygCXa6s.js +26 -0
  36. package/es/chunks/publish.D6friivo.js +50 -0
  37. package/es/chunks/publish.DlD0o09n.js +50 -0
  38. package/es/chunks/request.24c3shPx.js +5 -0
  39. package/es/chunks/usePreview.BHvXwaNi.js +157 -0
  40. package/es/index.mjs +2 -2
  41. package/lib/AiboxTabs.js +1 -0
  42. package/lib/DocSyncSelect.js +1 -1
  43. package/lib/ExampleComponent.js +1 -0
  44. package/lib/SourcePublish.js +1 -1
  45. package/lib/assets/AiboxTabs.css +1 -0
  46. package/lib/assets/BackBar.css +1 -0
  47. package/lib/assets/DocSyncSelect.css +1 -1
  48. package/lib/assets/ExampleComponent.css +1 -0
  49. package/lib/assets/SourcePublish.css +1 -1
  50. package/lib/assets/index.css +1 -0
  51. package/lib/assets/index2.css +1 -0
  52. package/lib/assets/index3.css +1 -0
  53. package/lib/assets/index4.css +1 -0
  54. package/lib/chunks/AiboxTable.CJOPGJtU.js +1 -0
  55. package/lib/chunks/BackBar.CZsNxoX1.js +1 -0
  56. package/lib/chunks/{DocSyncSelect.1gaXRzps.js → DocSyncSelect.kDNcepY-.js} +2 -2
  57. package/lib/chunks/SourcePublish.eOSEULjP.js +1 -0
  58. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
  59. package/lib/chunks/config.1oaIKLGn.js +1 -0
  60. package/lib/chunks/config.B0XKkp1w.js +1 -0
  61. package/lib/chunks/config.BCAuBVxV.js +1 -0
  62. package/lib/chunks/config.BF7MO0O5.js +1 -0
  63. package/lib/chunks/enums.Dmq4PdUc.js +1 -0
  64. package/lib/chunks/enums.DpU2er5r.js +1 -0
  65. package/lib/chunks/field-types.Ch_2yDfg.js +1 -0
  66. package/lib/chunks/files.B3-8UC0v.js +1 -0
  67. package/lib/chunks/i18n.CL5L6nx6.js +1 -0
  68. package/lib/chunks/i18n.DgOp_D7R.js +1 -0
  69. package/lib/chunks/index.4hFddClT.js +6 -0
  70. package/lib/chunks/index.BNivYbtq.js +1 -0
  71. package/lib/chunks/index.B_keI1Aq.js +1 -0
  72. package/lib/chunks/index.Bk-RwmaH.js +1 -0
  73. package/lib/chunks/index.CJFk1R2u.js +59 -0
  74. package/lib/chunks/index.CkihWzK6.js +1 -0
  75. package/lib/chunks/layout.DbBSbLgm.js +1 -0
  76. package/lib/chunks/publish.3TrK3fZf.js +1 -0
  77. package/lib/chunks/publish.Bw1acrSu.js +1 -0
  78. package/lib/chunks/request.D8T4MgGX.js +1 -0
  79. package/lib/chunks/usePreview.BojIDW7Z.js +1 -0
  80. package/lib/index.js +1 -1
  81. package/package.json +5 -5
  82. package/es/chunks/AddOrEditSupplierDialog.BCiXcUBu.js +0 -721
  83. package/es/chunks/AiboxTable.B_Yli5E8.js +0 -635
  84. package/es/chunks/ApplicationTypeTag.BbJwXyVa.js +0 -47
  85. package/es/chunks/AuthSection.CLi8HcIx.js +0 -201
  86. package/es/chunks/AvailableRangePreview.BgeL_bMq.js +0 -194
  87. package/es/chunks/AvailableRangeSetting.CGJxgfPT.js +0 -229
  88. package/es/chunks/CodeView.CWbewuHs.js +0 -148
  89. package/es/chunks/CommonTagsList.CJdBie2N.js +0 -156
  90. package/es/chunks/CreateMcpForm.C0HqvD-g.js +0 -308
  91. package/es/chunks/FileUploader.BSIhrd9M.js +0 -216
  92. package/es/chunks/McpFormDialog.CDH31D2Q.js +0 -297
  93. package/es/chunks/McpParamsSet.Bx3aRL9j.js +0 -501
  94. package/es/chunks/MdEditor.Bb9S_hso.js +0 -163
  95. package/es/chunks/ParameterTable.CoRz_932.js +0 -2010
  96. package/es/chunks/PublishRecord.C8h1tu3w.js +0 -133
  97. package/es/chunks/SourcePublish.CebmryAz.js +0 -966
  98. package/es/chunks/SourcePublish.Dk7O9GzI.js +0 -968
  99. package/es/chunks/config.CIQoQGOb.js +0 -35
  100. package/es/chunks/config.lm2B-n0s.js +0 -270
  101. package/es/chunks/i18n.CIhVBbR3.js +0 -418
  102. package/lib/chunks/AddOrEditSupplierDialog.XtPxc5yr.js +0 -1
  103. package/lib/chunks/AiboxTable.DFyqwoGc.js +0 -1
  104. package/lib/chunks/ApplicationTypeTag.CZReMt-9.js +0 -1
  105. package/lib/chunks/AuthSection.CP9c-YTW.js +0 -1
  106. package/lib/chunks/AvailableRangePreview.DvREyHNH.js +0 -1
  107. package/lib/chunks/AvailableRangeSetting.DDHTOLJA.js +0 -1
  108. package/lib/chunks/CodeView.DeBxLqyC.js +0 -1
  109. package/lib/chunks/CommonTagsList.QEP4G-Em.js +0 -1
  110. package/lib/chunks/CreateMcpForm.B2o0Ghjg.js +0 -1
  111. package/lib/chunks/FileUploader.6IW_QL-h.js +0 -1
  112. package/lib/chunks/McpFormDialog.FwXnBBd2.js +0 -6
  113. package/lib/chunks/McpParamsSet.BYrxVvDL.js +0 -1
  114. package/lib/chunks/MdEditor.Cp24y4DJ.js +0 -1
  115. package/lib/chunks/ParameterTable.CeufAEXh.js +0 -1
  116. package/lib/chunks/PublishRecord.BVndvj7F.js +0 -5
  117. package/lib/chunks/SourcePublish.Bz8MaRPm.js +0 -1
  118. package/lib/chunks/SourcePublish.I7ORXPok.js +0 -1
  119. package/lib/chunks/SourcePublish.OeB6i-Iu.js +0 -1
  120. package/lib/chunks/config.B9Di8LtU.js +0 -1
  121. package/lib/chunks/config.CZl1kYtI.js +0 -1
  122. package/lib/chunks/i18n.BGe5gOau.js +0 -1
@@ -0,0 +1,1298 @@
1
+ import { ref as Be, resolveDirective as ae, createElementBlock as R, createCommentVNode as oe, openBlock as w, Fragment as ce, renderList as Pe, withDirectives as he, createElementVNode as Q, createBlock as C, createVNode as H, unref as S, withCtx as j, resolveDynamicComponent as Ce, createTextVNode as Ee, toDisplayString as pe } from "vue";
2
+ import { u as qe, i as ue, a as Ze } from "./usePreview.BHvXwaNi.js";
3
+ import { ElIcon as G, ElImage as Me } from "element-plus";
4
+ import { Error as ge } from "color-message-aibox-vue";
5
+ import { _ as De } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import '../assets/index2.css';function W() {
7
+ return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
8
+ }
9
+ var v = W();
10
+ function me(s) {
11
+ v = s;
12
+ }
13
+ var B = { exec: () => null };
14
+ function u(s, e = "") {
15
+ let r = typeof s == "string" ? s : s.source, n = { replace: (t, i) => {
16
+ let l = typeof i == "string" ? i : i.source;
17
+ return l = l.replace(x.caret, "$1"), r = r.replace(t, l), n;
18
+ }, getRegex: () => new RegExp(r, e) };
19
+ return n;
20
+ }
21
+ var Ne = (() => {
22
+ try {
23
+ return !!new RegExp("(?<=1)(?<!1)");
24
+ } catch {
25
+ return !1;
26
+ }
27
+ })(), x = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (s) => new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}#`), htmlBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}<(?:[a-z].*>|!--)`, "i") }, Oe = /^(?:[ \t]*(?:\n|$))+/, Qe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, He = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, P = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, je = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, X = /(?:[*+-]|\d{1,9}[.)])/, ye = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Se = u(ye).replace(/bull/g, X).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(), Ge = u(ye).replace(/bull/g, X).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]+)*)/, Fe = /^[^\n]+/, K = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ue = u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", K).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ve = u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, X).getRegex(), D = "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", Y = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, We = u("^ {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", Y).replace("tag", D).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), $e = u(J).replace("hr", P).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", D).getRegex(), Xe = u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", $e).getRegex(), ee = { blockquote: Xe, code: Qe, def: Ue, fences: He, heading: je, hr: P, html: We, lheading: Se, list: Ve, newline: Oe, paragraph: $e, table: B, text: Fe }, ke = u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", P).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", D).getRegex(), Je = { ...ee, lheading: Ge, table: ke, paragraph: u(J).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ke).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", D).getRegex() }, Ke = { ...ee, html: u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Y).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(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: B, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: u(J).replace("hr", P).replace("heading", ` *#{1,6} *[^
28
+ ]`).replace("lheading", Se).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ye = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, et = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Re = /^( {2,}|\\)\n(?!\s*$)/, tt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, N = /[\p{P}\p{S}]/u, te = /[\s\p{P}\p{S}]/u, Te = /[^\s\p{P}\p{S}]/u, rt = u(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, te).getRegex(), ve = /(?!~)[\p{P}\p{S}]/u, st = /(?!~)[\s\p{P}\p{S}]/u, nt = /(?:[^\s\p{P}\p{S}]|~)/u, lt = u(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ne ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _e = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, it = u(_e, "u").replace(/punct/g, N).getRegex(), at = u(_e, "u").replace(/punct/g, ve).getRegex(), ze = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ot = u(ze, "gu").replace(/notPunctSpace/g, Te).replace(/punctSpace/g, te).replace(/punct/g, N).getRegex(), ct = u(ze, "gu").replace(/notPunctSpace/g, nt).replace(/punctSpace/g, st).replace(/punct/g, ve).getRegex(), ht = u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Te).replace(/punctSpace/g, te).replace(/punct/g, N).getRegex(), pt = u(/\\(punct)/, "gu").replace(/punct/g, N).getRegex(), ut = u(/^<(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(), gt = u(Y).replace("(?:-->|$)", "-->").getRegex(), kt = u("^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", gt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, dt = u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ae = u(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", K).getRegex(), Ie = u(/^!?\[(ref)\](?:\[\])?/).replace("ref", K).getRegex(), ft = u("reflink|nolink(?!\\()", "g").replace("reflink", Ae).replace("nolink", Ie).getRegex(), de = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, re = { _backpedal: B, anyPunctuation: pt, autolink: ut, blockSkip: lt, br: Re, code: et, del: B, emStrongLDelim: it, emStrongRDelimAst: ot, emStrongRDelimUnd: ht, escape: Ye, link: dt, nolink: Ie, punctuation: rt, reflink: Ae, reflinkSearch: ft, tag: kt, text: tt, url: B }, xt = { ...re, link: u(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, F = { ...re, emStrongRDelimAst: ct, emStrongLDelim: at, url: u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", de).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: u(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", de).getRegex() }, bt = { ...F, br: u(Re).replace("{2,}", "*").getRegex(), text: u(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, E = { normal: ee, gfm: Je, pedantic: Ke }, A = { normal: re, gfm: F, breaks: bt, pedantic: xt }, wt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, fe = (s) => wt[s];
29
+ function $(s, e) {
30
+ if (e) {
31
+ if (x.escapeTest.test(s)) return s.replace(x.escapeReplace, fe);
32
+ } else if (x.escapeTestNoEncode.test(s)) return s.replace(x.escapeReplaceNoEncode, fe);
33
+ return s;
34
+ }
35
+ function xe(s) {
36
+ try {
37
+ s = encodeURI(s).replace(x.percentDecode, "%");
38
+ } catch {
39
+ return null;
40
+ }
41
+ return s;
42
+ }
43
+ function be(s, e) {
44
+ let r = s.replace(x.findPipe, (i, l, c) => {
45
+ let a = !1, h = l;
46
+ for (; --h >= 0 && c[h] === "\\"; ) a = !a;
47
+ return a ? "|" : " |";
48
+ }), n = r.split(x.splitPipe), t = 0;
49
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
50
+ else for (; n.length < e; ) n.push("");
51
+ for (; t < n.length; t++) n[t] = n[t].trim().replace(x.slashPipe, "|");
52
+ return n;
53
+ }
54
+ function I(s, e, r) {
55
+ let n = s.length;
56
+ if (n === 0) return "";
57
+ let t = 0;
58
+ for (; t < n && s.charAt(n - t - 1) === e; )
59
+ t++;
60
+ return s.slice(0, n - t);
61
+ }
62
+ function mt(s, e) {
63
+ if (s.indexOf(e[1]) === -1) return -1;
64
+ let r = 0;
65
+ for (let n = 0; n < s.length; n++) if (s[n] === "\\") n++;
66
+ else if (s[n] === e[0]) r++;
67
+ else if (s[n] === e[1] && (r--, r < 0)) return n;
68
+ return r > 0 ? -2 : -1;
69
+ }
70
+ function we(s, e, r, n, t) {
71
+ let i = e.href, l = e.title || null, c = s[1].replace(t.other.outputLinkReplace, "$1");
72
+ n.state.inLink = !0;
73
+ let a = { type: s[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: c, tokens: n.inlineTokens(c) };
74
+ return n.state.inLink = !1, a;
75
+ }
76
+ function yt(s, e, r) {
77
+ let n = s.match(r.other.indentCodeCompensation);
78
+ if (n === null) return e;
79
+ let t = n[1];
80
+ return e.split(`
81
+ `).map((i) => {
82
+ let l = i.match(r.other.beginningSpace);
83
+ if (l === null) return i;
84
+ let [c] = l;
85
+ return c.length >= t.length ? i.slice(t.length) : i;
86
+ }).join(`
87
+ `);
88
+ }
89
+ var Z = class {
90
+ options;
91
+ rules;
92
+ lexer;
93
+ constructor(s) {
94
+ this.options = s || v;
95
+ }
96
+ space(s) {
97
+ let e = this.rules.block.newline.exec(s);
98
+ if (e && e[0].length > 0) return { type: "space", raw: e[0] };
99
+ }
100
+ code(s) {
101
+ let e = this.rules.block.code.exec(s);
102
+ if (e) {
103
+ let r = e[0].replace(this.rules.other.codeRemoveIndent, "");
104
+ return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : I(r, `
105
+ `) };
106
+ }
107
+ }
108
+ fences(s) {
109
+ let e = this.rules.block.fences.exec(s);
110
+ if (e) {
111
+ let r = e[0], n = yt(r, e[3] || "", this.rules);
112
+ return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: n };
113
+ }
114
+ }
115
+ heading(s) {
116
+ let e = this.rules.block.heading.exec(s);
117
+ if (e) {
118
+ let r = e[2].trim();
119
+ if (this.rules.other.endingHash.test(r)) {
120
+ let n = I(r, "#");
121
+ (this.options.pedantic || !n || this.rules.other.endingSpaceChar.test(n)) && (r = n.trim());
122
+ }
123
+ return { type: "heading", raw: e[0], depth: e[1].length, text: r, tokens: this.lexer.inline(r) };
124
+ }
125
+ }
126
+ hr(s) {
127
+ let e = this.rules.block.hr.exec(s);
128
+ if (e) return { type: "hr", raw: I(e[0], `
129
+ `) };
130
+ }
131
+ blockquote(s) {
132
+ let e = this.rules.block.blockquote.exec(s);
133
+ if (e) {
134
+ let r = I(e[0], `
135
+ `).split(`
136
+ `), n = "", t = "", i = [];
137
+ for (; r.length > 0; ) {
138
+ let l = !1, c = [], a;
139
+ for (a = 0; a < r.length; a++) if (this.rules.other.blockquoteStart.test(r[a])) c.push(r[a]), l = !0;
140
+ else if (!l) c.push(r[a]);
141
+ else break;
142
+ r = r.slice(a);
143
+ let h = c.join(`
144
+ `), o = h.replace(this.rules.other.blockquoteSetextReplace, `
145
+ $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
146
+ n = n ? `${n}
147
+ ${h}` : h, t = t ? `${t}
148
+ ${o}` : o;
149
+ let g = this.lexer.state.top;
150
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(o, i, !0), this.lexer.state.top = g, r.length === 0) break;
151
+ let p = i.at(-1);
152
+ if (p?.type === "code") break;
153
+ if (p?.type === "blockquote") {
154
+ let f = p, d = f.raw + `
155
+ ` + r.join(`
156
+ `), b = this.blockquote(d);
157
+ i[i.length - 1] = b, n = n.substring(0, n.length - f.raw.length) + b.raw, t = t.substring(0, t.length - f.text.length) + b.text;
158
+ break;
159
+ } else if (p?.type === "list") {
160
+ let f = p, d = f.raw + `
161
+ ` + r.join(`
162
+ `), b = this.list(d);
163
+ i[i.length - 1] = b, n = n.substring(0, n.length - p.raw.length) + b.raw, t = t.substring(0, t.length - f.raw.length) + b.raw, r = d.substring(i.at(-1).raw.length).split(`
164
+ `);
165
+ continue;
166
+ }
167
+ }
168
+ return { type: "blockquote", raw: n, tokens: i, text: t };
169
+ }
170
+ }
171
+ list(s) {
172
+ let e = this.rules.block.list.exec(s);
173
+ if (e) {
174
+ let r = e[1].trim(), n = r.length > 1, t = { type: "list", raw: "", ordered: n, start: n ? +r.slice(0, -1) : "", loose: !1, items: [] };
175
+ r = n ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = n ? r : "[*+-]");
176
+ let i = this.rules.other.listItemRegex(r), l = !1;
177
+ for (; s; ) {
178
+ let a = !1, h = "", o = "";
179
+ if (!(e = i.exec(s)) || this.rules.block.hr.test(s)) break;
180
+ h = e[0], s = s.substring(h.length);
181
+ let g = e[2].split(`
182
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (b) => " ".repeat(3 * b.length)), p = s.split(`
183
+ `, 1)[0], f = !g.trim(), d = 0;
184
+ if (this.options.pedantic ? (d = 2, o = g.trimStart()) : f ? d = e[1].length + 1 : (d = e[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, o = g.slice(d), d += e[1].length), f && this.rules.other.blankLine.test(p) && (h += p + `
185
+ `, s = s.substring(p.length + 1), a = !0), !a) {
186
+ let b = this.rules.other.nextBulletRegex(d), ne = this.rules.other.hrRegex(d), le = this.rules.other.fencesBeginRegex(d), ie = this.rules.other.headingBeginRegex(d), Le = this.rules.other.htmlBeginRegex(d);
187
+ for (; s; ) {
188
+ let O = s.split(`
189
+ `, 1)[0], z;
190
+ if (p = O, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), z = p) : z = p.replace(this.rules.other.tabCharGlobal, " "), le.test(p) || ie.test(p) || Le.test(p) || b.test(p) || ne.test(p)) break;
191
+ if (z.search(this.rules.other.nonSpaceChar) >= d || !p.trim()) o += `
192
+ ` + z.slice(d);
193
+ else {
194
+ if (f || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || le.test(g) || ie.test(g) || ne.test(g)) break;
195
+ o += `
196
+ ` + p;
197
+ }
198
+ !f && !p.trim() && (f = !0), h += O + `
199
+ `, s = s.substring(O.length + 1), g = z.slice(d);
200
+ }
201
+ }
202
+ t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0)), t.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(o), loose: !1, text: o, tokens: [] }), t.raw += h;
203
+ }
204
+ let c = t.items.at(-1);
205
+ if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
206
+ else return;
207
+ t.raw = t.raw.trimEnd();
208
+ for (let a of t.items) {
209
+ if (this.lexer.state.top = !1, a.tokens = this.lexer.blockTokens(a.text, []), a.task) {
210
+ if (a.text = a.text.replace(this.rules.other.listReplaceTask, ""), a.tokens[0]?.type === "text" || a.tokens[0]?.type === "paragraph") {
211
+ a.tokens[0].raw = a.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), a.tokens[0].text = a.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
212
+ for (let o = this.lexer.inlineQueue.length - 1; o >= 0; o--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[o].src)) {
213
+ this.lexer.inlineQueue[o].src = this.lexer.inlineQueue[o].src.replace(this.rules.other.listReplaceTask, "");
214
+ break;
215
+ }
216
+ }
217
+ let h = this.rules.other.listTaskCheckbox.exec(a.raw);
218
+ if (h) {
219
+ let o = { type: "checkbox", raw: h[0] + " ", checked: h[0] !== "[ ]" };
220
+ a.checked = o.checked, t.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = o.raw + a.tokens[0].raw, a.tokens[0].text = o.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(o)) : a.tokens.unshift({ type: "paragraph", raw: o.raw, text: o.raw, tokens: [o] }) : a.tokens.unshift(o);
221
+ }
222
+ }
223
+ if (!t.loose) {
224
+ let h = a.tokens.filter((g) => g.type === "space"), o = h.length > 0 && h.some((g) => this.rules.other.anyLine.test(g.raw));
225
+ t.loose = o;
226
+ }
227
+ }
228
+ if (t.loose) for (let a of t.items) {
229
+ a.loose = !0;
230
+ for (let h of a.tokens) h.type === "text" && (h.type = "paragraph");
231
+ }
232
+ return t;
233
+ }
234
+ }
235
+ html(s) {
236
+ let e = this.rules.block.html.exec(s);
237
+ if (e) return { type: "html", block: !0, raw: e[0], pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: e[0] };
238
+ }
239
+ def(s) {
240
+ let e = this.rules.block.def.exec(s);
241
+ if (e) {
242
+ let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", t = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
243
+ return { type: "def", tag: r, raw: e[0], href: n, title: t };
244
+ }
245
+ }
246
+ table(s) {
247
+ let e = this.rules.block.table.exec(s);
248
+ if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
249
+ let r = be(e[1]), n = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), t = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
250
+ `) : [], i = { type: "table", raw: e[0], header: [], align: [], rows: [] };
251
+ if (r.length === n.length) {
252
+ for (let l of n) this.rules.other.tableAlignRight.test(l) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? i.align.push("left") : i.align.push(null);
253
+ for (let l = 0; l < r.length; l++) i.header.push({ text: r[l], tokens: this.lexer.inline(r[l]), header: !0, align: i.align[l] });
254
+ for (let l of t) i.rows.push(be(l, i.header.length).map((c, a) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: i.align[a] })));
255
+ return i;
256
+ }
257
+ }
258
+ lheading(s) {
259
+ let e = this.rules.block.lheading.exec(s);
260
+ if (e) return { type: "heading", raw: e[0], depth: e[2].charAt(0) === "=" ? 1 : 2, text: e[1], tokens: this.lexer.inline(e[1]) };
261
+ }
262
+ paragraph(s) {
263
+ let e = this.rules.block.paragraph.exec(s);
264
+ if (e) {
265
+ let r = e[1].charAt(e[1].length - 1) === `
266
+ ` ? e[1].slice(0, -1) : e[1];
267
+ return { type: "paragraph", raw: e[0], text: r, tokens: this.lexer.inline(r) };
268
+ }
269
+ }
270
+ text(s) {
271
+ let e = this.rules.block.text.exec(s);
272
+ if (e) return { type: "text", raw: e[0], text: e[0], tokens: this.lexer.inline(e[0]) };
273
+ }
274
+ escape(s) {
275
+ let e = this.rules.inline.escape.exec(s);
276
+ if (e) return { type: "escape", raw: e[0], text: e[1] };
277
+ }
278
+ tag(s) {
279
+ let e = this.rules.inline.tag.exec(s);
280
+ if (e) return !this.lexer.state.inLink && this.rules.other.startATag.test(e[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(e[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(e[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(e[0]) && (this.lexer.state.inRawBlock = !1), { type: "html", raw: e[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: !1, text: e[0] };
281
+ }
282
+ link(s) {
283
+ let e = this.rules.inline.link.exec(s);
284
+ if (e) {
285
+ let r = e[2].trim();
286
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
287
+ if (!this.rules.other.endAngleBracket.test(r)) return;
288
+ let i = I(r.slice(0, -1), "\\");
289
+ if ((r.length - i.length) % 2 === 0) return;
290
+ } else {
291
+ let i = mt(e[2], "()");
292
+ if (i === -2) return;
293
+ if (i > -1) {
294
+ let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
295
+ e[2] = e[2].substring(0, i), e[0] = e[0].substring(0, l).trim(), e[3] = "";
296
+ }
297
+ }
298
+ let n = e[2], t = "";
299
+ if (this.options.pedantic) {
300
+ let i = this.rules.other.pedanticHrefTitle.exec(n);
301
+ i && (n = i[1], t = i[3]);
302
+ } else t = e[3] ? e[3].slice(1, -1) : "";
303
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? n = n.slice(1) : n = n.slice(1, -1)), we(e, { href: n && n.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
304
+ }
305
+ }
306
+ reflink(s, e) {
307
+ let r;
308
+ if ((r = this.rules.inline.reflink.exec(s)) || (r = this.rules.inline.nolink.exec(s))) {
309
+ let n = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), t = e[n.toLowerCase()];
310
+ if (!t) {
311
+ let i = r[0].charAt(0);
312
+ return { type: "text", raw: i, text: i };
313
+ }
314
+ return we(r, t, r[0], this.lexer, this.rules);
315
+ }
316
+ }
317
+ emStrong(s, e, r = "") {
318
+ let n = this.rules.inline.emStrongLDelim.exec(s);
319
+ if (!(!n || n[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(n[1] || n[2]) || !r || this.rules.inline.punctuation.exec(r))) {
320
+ let t = [...n[0]].length - 1, i, l, c = t, a = 0, h = n[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
321
+ for (h.lastIndex = 0, e = e.slice(-1 * s.length + t); (n = h.exec(e)) != null; ) {
322
+ if (i = n[1] || n[2] || n[3] || n[4] || n[5] || n[6], !i) continue;
323
+ if (l = [...i].length, n[3] || n[4]) {
324
+ c += l;
325
+ continue;
326
+ } else if ((n[5] || n[6]) && t % 3 && !((t + l) % 3)) {
327
+ a += l;
328
+ continue;
329
+ }
330
+ if (c -= l, c > 0) continue;
331
+ l = Math.min(l, l + c + a);
332
+ let o = [...n[0]][0].length, g = s.slice(0, t + n.index + o + l);
333
+ if (Math.min(t, l) % 2) {
334
+ let f = g.slice(1, -1);
335
+ return { type: "em", raw: g, text: f, tokens: this.lexer.inlineTokens(f) };
336
+ }
337
+ let p = g.slice(2, -2);
338
+ return { type: "strong", raw: g, text: p, tokens: this.lexer.inlineTokens(p) };
339
+ }
340
+ }
341
+ }
342
+ codespan(s) {
343
+ let e = this.rules.inline.code.exec(s);
344
+ if (e) {
345
+ let r = e[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(r), t = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r);
346
+ return n && t && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: e[0], text: r };
347
+ }
348
+ }
349
+ br(s) {
350
+ let e = this.rules.inline.br.exec(s);
351
+ if (e) return { type: "br", raw: e[0] };
352
+ }
353
+ del(s) {
354
+ let e = this.rules.inline.del.exec(s);
355
+ if (e) return { type: "del", raw: e[0], text: e[2], tokens: this.lexer.inlineTokens(e[2]) };
356
+ }
357
+ autolink(s) {
358
+ let e = this.rules.inline.autolink.exec(s);
359
+ if (e) {
360
+ let r, n;
361
+ return e[2] === "@" ? (r = e[1], n = "mailto:" + r) : (r = e[1], n = r), { type: "link", raw: e[0], text: r, href: n, tokens: [{ type: "text", raw: r, text: r }] };
362
+ }
363
+ }
364
+ url(s) {
365
+ let e;
366
+ if (e = this.rules.inline.url.exec(s)) {
367
+ let r, n;
368
+ if (e[2] === "@") r = e[0], n = "mailto:" + r;
369
+ else {
370
+ let t;
371
+ do
372
+ t = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? "";
373
+ while (t !== e[0]);
374
+ r = e[0], e[1] === "www." ? n = "http://" + e[0] : n = e[0];
375
+ }
376
+ return { type: "link", raw: e[0], text: r, href: n, tokens: [{ type: "text", raw: r, text: r }] };
377
+ }
378
+ }
379
+ inlineText(s) {
380
+ let e = this.rules.inline.text.exec(s);
381
+ if (e) {
382
+ let r = this.lexer.state.inRawBlock;
383
+ return { type: "text", raw: e[0], text: e[0], escaped: r };
384
+ }
385
+ }
386
+ }, m = class U {
387
+ tokens;
388
+ options;
389
+ state;
390
+ inlineQueue;
391
+ tokenizer;
392
+ constructor(e) {
393
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || v, this.options.tokenizer = this.options.tokenizer || new Z(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
394
+ let r = { other: x, block: E.normal, inline: A.normal };
395
+ this.options.pedantic ? (r.block = E.pedantic, r.inline = A.pedantic) : this.options.gfm && (r.block = E.gfm, this.options.breaks ? r.inline = A.breaks : r.inline = A.gfm), this.tokenizer.rules = r;
396
+ }
397
+ static get rules() {
398
+ return { block: E, inline: A };
399
+ }
400
+ static lex(e, r) {
401
+ return new U(r).lex(e);
402
+ }
403
+ static lexInline(e, r) {
404
+ return new U(r).inlineTokens(e);
405
+ }
406
+ lex(e) {
407
+ e = e.replace(x.carriageReturn, `
408
+ `), this.blockTokens(e, this.tokens);
409
+ for (let r = 0; r < this.inlineQueue.length; r++) {
410
+ let n = this.inlineQueue[r];
411
+ this.inlineTokens(n.src, n.tokens);
412
+ }
413
+ return this.inlineQueue = [], this.tokens;
414
+ }
415
+ blockTokens(e, r = [], n = !1) {
416
+ for (this.options.pedantic && (e = e.replace(x.tabCharGlobal, " ").replace(x.spaceLine, "")); e; ) {
417
+ let t;
418
+ if (this.options.extensions?.block?.some((l) => (t = l.call({ lexer: this }, e, r)) ? (e = e.substring(t.raw.length), r.push(t), !0) : !1)) continue;
419
+ if (t = this.tokenizer.space(e)) {
420
+ e = e.substring(t.raw.length);
421
+ let l = r.at(-1);
422
+ t.raw.length === 1 && l !== void 0 ? l.raw += `
423
+ ` : r.push(t);
424
+ continue;
425
+ }
426
+ if (t = this.tokenizer.code(e)) {
427
+ e = e.substring(t.raw.length);
428
+ let l = r.at(-1);
429
+ l?.type === "paragraph" || l?.type === "text" ? (l.raw += (l.raw.endsWith(`
430
+ `) ? "" : `
431
+ `) + t.raw, l.text += `
432
+ ` + t.text, this.inlineQueue.at(-1).src = l.text) : r.push(t);
433
+ continue;
434
+ }
435
+ if (t = this.tokenizer.fences(e)) {
436
+ e = e.substring(t.raw.length), r.push(t);
437
+ continue;
438
+ }
439
+ if (t = this.tokenizer.heading(e)) {
440
+ e = e.substring(t.raw.length), r.push(t);
441
+ continue;
442
+ }
443
+ if (t = this.tokenizer.hr(e)) {
444
+ e = e.substring(t.raw.length), r.push(t);
445
+ continue;
446
+ }
447
+ if (t = this.tokenizer.blockquote(e)) {
448
+ e = e.substring(t.raw.length), r.push(t);
449
+ continue;
450
+ }
451
+ if (t = this.tokenizer.list(e)) {
452
+ e = e.substring(t.raw.length), r.push(t);
453
+ continue;
454
+ }
455
+ if (t = this.tokenizer.html(e)) {
456
+ e = e.substring(t.raw.length), r.push(t);
457
+ continue;
458
+ }
459
+ if (t = this.tokenizer.def(e)) {
460
+ e = e.substring(t.raw.length);
461
+ let l = r.at(-1);
462
+ l?.type === "paragraph" || l?.type === "text" ? (l.raw += (l.raw.endsWith(`
463
+ `) ? "" : `
464
+ `) + t.raw, l.text += `
465
+ ` + t.raw, this.inlineQueue.at(-1).src = l.text) : this.tokens.links[t.tag] || (this.tokens.links[t.tag] = { href: t.href, title: t.title }, r.push(t));
466
+ continue;
467
+ }
468
+ if (t = this.tokenizer.table(e)) {
469
+ e = e.substring(t.raw.length), r.push(t);
470
+ continue;
471
+ }
472
+ if (t = this.tokenizer.lheading(e)) {
473
+ e = e.substring(t.raw.length), r.push(t);
474
+ continue;
475
+ }
476
+ let i = e;
477
+ if (this.options.extensions?.startBlock) {
478
+ let l = 1 / 0, c = e.slice(1), a;
479
+ this.options.extensions.startBlock.forEach((h) => {
480
+ a = h.call({ lexer: this }, c), typeof a == "number" && a >= 0 && (l = Math.min(l, a));
481
+ }), l < 1 / 0 && l >= 0 && (i = e.substring(0, l + 1));
482
+ }
483
+ if (this.state.top && (t = this.tokenizer.paragraph(i))) {
484
+ let l = r.at(-1);
485
+ n && l?.type === "paragraph" ? (l.raw += (l.raw.endsWith(`
486
+ `) ? "" : `
487
+ `) + t.raw, l.text += `
488
+ ` + t.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(t), n = i.length !== e.length, e = e.substring(t.raw.length);
489
+ continue;
490
+ }
491
+ if (t = this.tokenizer.text(e)) {
492
+ e = e.substring(t.raw.length);
493
+ let l = r.at(-1);
494
+ l?.type === "text" ? (l.raw += (l.raw.endsWith(`
495
+ `) ? "" : `
496
+ `) + t.raw, l.text += `
497
+ ` + t.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(t);
498
+ continue;
499
+ }
500
+ if (e) {
501
+ let l = "Infinite loop on byte: " + e.charCodeAt(0);
502
+ if (this.options.silent) {
503
+ console.error(l);
504
+ break;
505
+ } else throw new Error(l);
506
+ }
507
+ }
508
+ return this.state.top = !0, r;
509
+ }
510
+ inline(e, r = []) {
511
+ return this.inlineQueue.push({ src: e, tokens: r }), r;
512
+ }
513
+ inlineTokens(e, r = []) {
514
+ let n = e, t = null;
515
+ if (this.tokens.links) {
516
+ let a = Object.keys(this.tokens.links);
517
+ if (a.length > 0) for (; (t = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) a.includes(t[0].slice(t[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, t.index) + "[" + "a".repeat(t[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
518
+ }
519
+ for (; (t = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, t.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
520
+ let i;
521
+ for (; (t = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = t[2] ? t[2].length : 0, n = n.slice(0, t.index + i) + "[" + "a".repeat(t[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
522
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
523
+ let l = !1, c = "";
524
+ for (; e; ) {
525
+ l || (c = ""), l = !1;
526
+ let a;
527
+ if (this.options.extensions?.inline?.some((o) => (a = o.call({ lexer: this }, e, r)) ? (e = e.substring(a.raw.length), r.push(a), !0) : !1)) continue;
528
+ if (a = this.tokenizer.escape(e)) {
529
+ e = e.substring(a.raw.length), r.push(a);
530
+ continue;
531
+ }
532
+ if (a = this.tokenizer.tag(e)) {
533
+ e = e.substring(a.raw.length), r.push(a);
534
+ continue;
535
+ }
536
+ if (a = this.tokenizer.link(e)) {
537
+ e = e.substring(a.raw.length), r.push(a);
538
+ continue;
539
+ }
540
+ if (a = this.tokenizer.reflink(e, this.tokens.links)) {
541
+ e = e.substring(a.raw.length);
542
+ let o = r.at(-1);
543
+ a.type === "text" && o?.type === "text" ? (o.raw += a.raw, o.text += a.text) : r.push(a);
544
+ continue;
545
+ }
546
+ if (a = this.tokenizer.emStrong(e, n, c)) {
547
+ e = e.substring(a.raw.length), r.push(a);
548
+ continue;
549
+ }
550
+ if (a = this.tokenizer.codespan(e)) {
551
+ e = e.substring(a.raw.length), r.push(a);
552
+ continue;
553
+ }
554
+ if (a = this.tokenizer.br(e)) {
555
+ e = e.substring(a.raw.length), r.push(a);
556
+ continue;
557
+ }
558
+ if (a = this.tokenizer.del(e)) {
559
+ e = e.substring(a.raw.length), r.push(a);
560
+ continue;
561
+ }
562
+ if (a = this.tokenizer.autolink(e)) {
563
+ e = e.substring(a.raw.length), r.push(a);
564
+ continue;
565
+ }
566
+ if (!this.state.inLink && (a = this.tokenizer.url(e))) {
567
+ e = e.substring(a.raw.length), r.push(a);
568
+ continue;
569
+ }
570
+ let h = e;
571
+ if (this.options.extensions?.startInline) {
572
+ let o = 1 / 0, g = e.slice(1), p;
573
+ this.options.extensions.startInline.forEach((f) => {
574
+ p = f.call({ lexer: this }, g), typeof p == "number" && p >= 0 && (o = Math.min(o, p));
575
+ }), o < 1 / 0 && o >= 0 && (h = e.substring(0, o + 1));
576
+ }
577
+ if (a = this.tokenizer.inlineText(h)) {
578
+ e = e.substring(a.raw.length), a.raw.slice(-1) !== "_" && (c = a.raw.slice(-1)), l = !0;
579
+ let o = r.at(-1);
580
+ o?.type === "text" ? (o.raw += a.raw, o.text += a.text) : r.push(a);
581
+ continue;
582
+ }
583
+ if (e) {
584
+ let o = "Infinite loop on byte: " + e.charCodeAt(0);
585
+ if (this.options.silent) {
586
+ console.error(o);
587
+ break;
588
+ } else throw new Error(o);
589
+ }
590
+ }
591
+ return r;
592
+ }
593
+ }, M = class {
594
+ options;
595
+ parser;
596
+ constructor(s) {
597
+ this.options = s || v;
598
+ }
599
+ space(s) {
600
+ return "";
601
+ }
602
+ code({ text: s, lang: e, escaped: r }) {
603
+ let n = (e || "").match(x.notSpaceStart)?.[0], t = s.replace(x.endingNewline, "") + `
604
+ `;
605
+ return n ? '<pre><code class="language-' + $(n) + '">' + (r ? t : $(t, !0)) + `</code></pre>
606
+ ` : "<pre><code>" + (r ? t : $(t, !0)) + `</code></pre>
607
+ `;
608
+ }
609
+ blockquote({ tokens: s }) {
610
+ return `<blockquote>
611
+ ${this.parser.parse(s)}</blockquote>
612
+ `;
613
+ }
614
+ html({ text: s }) {
615
+ return s;
616
+ }
617
+ def(s) {
618
+ return "";
619
+ }
620
+ heading({ tokens: s, depth: e }) {
621
+ return `<h${e}>${this.parser.parseInline(s)}</h${e}>
622
+ `;
623
+ }
624
+ hr(s) {
625
+ return `<hr>
626
+ `;
627
+ }
628
+ list(s) {
629
+ let e = s.ordered, r = s.start, n = "";
630
+ for (let l = 0; l < s.items.length; l++) {
631
+ let c = s.items[l];
632
+ n += this.listitem(c);
633
+ }
634
+ let t = e ? "ol" : "ul", i = e && r !== 1 ? ' start="' + r + '"' : "";
635
+ return "<" + t + i + `>
636
+ ` + n + "</" + t + `>
637
+ `;
638
+ }
639
+ listitem(s) {
640
+ return `<li>${this.parser.parse(s.tokens)}</li>
641
+ `;
642
+ }
643
+ checkbox({ checked: s }) {
644
+ return "<input " + (s ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
645
+ }
646
+ paragraph({ tokens: s }) {
647
+ return `<p>${this.parser.parseInline(s)}</p>
648
+ `;
649
+ }
650
+ table(s) {
651
+ let e = "", r = "";
652
+ for (let t = 0; t < s.header.length; t++) r += this.tablecell(s.header[t]);
653
+ e += this.tablerow({ text: r });
654
+ let n = "";
655
+ for (let t = 0; t < s.rows.length; t++) {
656
+ let i = s.rows[t];
657
+ r = "";
658
+ for (let l = 0; l < i.length; l++) r += this.tablecell(i[l]);
659
+ n += this.tablerow({ text: r });
660
+ }
661
+ return n && (n = `<tbody>${n}</tbody>`), `<table>
662
+ <thead>
663
+ ` + e + `</thead>
664
+ ` + n + `</table>
665
+ `;
666
+ }
667
+ tablerow({ text: s }) {
668
+ return `<tr>
669
+ ${s}</tr>
670
+ `;
671
+ }
672
+ tablecell(s) {
673
+ let e = this.parser.parseInline(s.tokens), r = s.header ? "th" : "td";
674
+ return (s.align ? `<${r} align="${s.align}">` : `<${r}>`) + e + `</${r}>
675
+ `;
676
+ }
677
+ strong({ tokens: s }) {
678
+ return `<strong>${this.parser.parseInline(s)}</strong>`;
679
+ }
680
+ em({ tokens: s }) {
681
+ return `<em>${this.parser.parseInline(s)}</em>`;
682
+ }
683
+ codespan({ text: s }) {
684
+ return `<code>${$(s, !0)}</code>`;
685
+ }
686
+ br(s) {
687
+ return "<br>";
688
+ }
689
+ del({ tokens: s }) {
690
+ return `<del>${this.parser.parseInline(s)}</del>`;
691
+ }
692
+ link({ href: s, title: e, tokens: r }) {
693
+ let n = this.parser.parseInline(r), t = xe(s);
694
+ if (t === null) return n;
695
+ s = t;
696
+ let i = '<a href="' + s + '"';
697
+ return e && (i += ' title="' + $(e) + '"'), i += ">" + n + "</a>", i;
698
+ }
699
+ image({ href: s, title: e, text: r, tokens: n }) {
700
+ n && (r = this.parser.parseInline(n, this.parser.textRenderer));
701
+ let t = xe(s);
702
+ if (t === null) return $(r);
703
+ s = t;
704
+ let i = `<img src="${s}" alt="${r}"`;
705
+ return e && (i += ` title="${$(e)}"`), i += ">", i;
706
+ }
707
+ text(s) {
708
+ return "tokens" in s && s.tokens ? this.parser.parseInline(s.tokens) : "escaped" in s && s.escaped ? s.text : $(s.text);
709
+ }
710
+ }, se = class {
711
+ strong({ text: s }) {
712
+ return s;
713
+ }
714
+ em({ text: s }) {
715
+ return s;
716
+ }
717
+ codespan({ text: s }) {
718
+ return s;
719
+ }
720
+ del({ text: s }) {
721
+ return s;
722
+ }
723
+ html({ text: s }) {
724
+ return s;
725
+ }
726
+ text({ text: s }) {
727
+ return s;
728
+ }
729
+ link({ text: s }) {
730
+ return "" + s;
731
+ }
732
+ image({ text: s }) {
733
+ return "" + s;
734
+ }
735
+ br() {
736
+ return "";
737
+ }
738
+ checkbox({ raw: s }) {
739
+ return s;
740
+ }
741
+ }, y = class V {
742
+ options;
743
+ renderer;
744
+ textRenderer;
745
+ constructor(e) {
746
+ this.options = e || v, this.options.renderer = this.options.renderer || new M(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new se();
747
+ }
748
+ static parse(e, r) {
749
+ return new V(r).parse(e);
750
+ }
751
+ static parseInline(e, r) {
752
+ return new V(r).parseInline(e);
753
+ }
754
+ parse(e) {
755
+ let r = "";
756
+ for (let n = 0; n < e.length; n++) {
757
+ let t = e[n];
758
+ if (this.options.extensions?.renderers?.[t.type]) {
759
+ let l = t, c = this.options.extensions.renderers[l.type].call({ parser: this }, l);
760
+ if (c !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(l.type)) {
761
+ r += c || "";
762
+ continue;
763
+ }
764
+ }
765
+ let i = t;
766
+ switch (i.type) {
767
+ case "space": {
768
+ r += this.renderer.space(i);
769
+ break;
770
+ }
771
+ case "hr": {
772
+ r += this.renderer.hr(i);
773
+ break;
774
+ }
775
+ case "heading": {
776
+ r += this.renderer.heading(i);
777
+ break;
778
+ }
779
+ case "code": {
780
+ r += this.renderer.code(i);
781
+ break;
782
+ }
783
+ case "table": {
784
+ r += this.renderer.table(i);
785
+ break;
786
+ }
787
+ case "blockquote": {
788
+ r += this.renderer.blockquote(i);
789
+ break;
790
+ }
791
+ case "list": {
792
+ r += this.renderer.list(i);
793
+ break;
794
+ }
795
+ case "checkbox": {
796
+ r += this.renderer.checkbox(i);
797
+ break;
798
+ }
799
+ case "html": {
800
+ r += this.renderer.html(i);
801
+ break;
802
+ }
803
+ case "def": {
804
+ r += this.renderer.def(i);
805
+ break;
806
+ }
807
+ case "paragraph": {
808
+ r += this.renderer.paragraph(i);
809
+ break;
810
+ }
811
+ case "text": {
812
+ r += this.renderer.text(i);
813
+ break;
814
+ }
815
+ default: {
816
+ let l = 'Token with "' + i.type + '" type was not found.';
817
+ if (this.options.silent) return console.error(l), "";
818
+ throw new Error(l);
819
+ }
820
+ }
821
+ }
822
+ return r;
823
+ }
824
+ parseInline(e, r = this.renderer) {
825
+ let n = "";
826
+ for (let t = 0; t < e.length; t++) {
827
+ let i = e[t];
828
+ if (this.options.extensions?.renderers?.[i.type]) {
829
+ let c = this.options.extensions.renderers[i.type].call({ parser: this }, i);
830
+ if (c !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
831
+ n += c || "";
832
+ continue;
833
+ }
834
+ }
835
+ let l = i;
836
+ switch (l.type) {
837
+ case "escape": {
838
+ n += r.text(l);
839
+ break;
840
+ }
841
+ case "html": {
842
+ n += r.html(l);
843
+ break;
844
+ }
845
+ case "link": {
846
+ n += r.link(l);
847
+ break;
848
+ }
849
+ case "image": {
850
+ n += r.image(l);
851
+ break;
852
+ }
853
+ case "checkbox": {
854
+ n += r.checkbox(l);
855
+ break;
856
+ }
857
+ case "strong": {
858
+ n += r.strong(l);
859
+ break;
860
+ }
861
+ case "em": {
862
+ n += r.em(l);
863
+ break;
864
+ }
865
+ case "codespan": {
866
+ n += r.codespan(l);
867
+ break;
868
+ }
869
+ case "br": {
870
+ n += r.br(l);
871
+ break;
872
+ }
873
+ case "del": {
874
+ n += r.del(l);
875
+ break;
876
+ }
877
+ case "text": {
878
+ n += r.text(l);
879
+ break;
880
+ }
881
+ default: {
882
+ let c = 'Token with "' + l.type + '" type was not found.';
883
+ if (this.options.silent) return console.error(c), "";
884
+ throw new Error(c);
885
+ }
886
+ }
887
+ }
888
+ return n;
889
+ }
890
+ }, L = class {
891
+ options;
892
+ block;
893
+ constructor(s) {
894
+ this.options = s || v;
895
+ }
896
+ static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
897
+ static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
898
+ preprocess(s) {
899
+ return s;
900
+ }
901
+ postprocess(s) {
902
+ return s;
903
+ }
904
+ processAllTokens(s) {
905
+ return s;
906
+ }
907
+ emStrongMask(s) {
908
+ return s;
909
+ }
910
+ provideLexer() {
911
+ return this.block ? m.lex : m.lexInline;
912
+ }
913
+ provideParser() {
914
+ return this.block ? y.parse : y.parseInline;
915
+ }
916
+ }, St = class {
917
+ defaults = W();
918
+ options = this.setOptions;
919
+ parse = this.parseMarkdown(!0);
920
+ parseInline = this.parseMarkdown(!1);
921
+ Parser = y;
922
+ Renderer = M;
923
+ TextRenderer = se;
924
+ Lexer = m;
925
+ Tokenizer = Z;
926
+ Hooks = L;
927
+ constructor(...s) {
928
+ this.use(...s);
929
+ }
930
+ walkTokens(s, e) {
931
+ let r = [];
932
+ for (let n of s) switch (r = r.concat(e.call(this, n)), n.type) {
933
+ case "table": {
934
+ let t = n;
935
+ for (let i of t.header) r = r.concat(this.walkTokens(i.tokens, e));
936
+ for (let i of t.rows) for (let l of i) r = r.concat(this.walkTokens(l.tokens, e));
937
+ break;
938
+ }
939
+ case "list": {
940
+ let t = n;
941
+ r = r.concat(this.walkTokens(t.items, e));
942
+ break;
943
+ }
944
+ default: {
945
+ let t = n;
946
+ this.defaults.extensions?.childTokens?.[t.type] ? this.defaults.extensions.childTokens[t.type].forEach((i) => {
947
+ let l = t[i].flat(1 / 0);
948
+ r = r.concat(this.walkTokens(l, e));
949
+ }) : t.tokens && (r = r.concat(this.walkTokens(t.tokens, e)));
950
+ }
951
+ }
952
+ return r;
953
+ }
954
+ use(...s) {
955
+ let e = this.defaults.extensions || { renderers: {}, childTokens: {} };
956
+ return s.forEach((r) => {
957
+ let n = { ...r };
958
+ if (n.async = this.defaults.async || n.async || !1, r.extensions && (r.extensions.forEach((t) => {
959
+ if (!t.name) throw new Error("extension name required");
960
+ if ("renderer" in t) {
961
+ let i = e.renderers[t.name];
962
+ i ? e.renderers[t.name] = function(...l) {
963
+ let c = t.renderer.apply(this, l);
964
+ return c === !1 && (c = i.apply(this, l)), c;
965
+ } : e.renderers[t.name] = t.renderer;
966
+ }
967
+ if ("tokenizer" in t) {
968
+ if (!t.level || t.level !== "block" && t.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
969
+ let i = e[t.level];
970
+ i ? i.unshift(t.tokenizer) : e[t.level] = [t.tokenizer], t.start && (t.level === "block" ? e.startBlock ? e.startBlock.push(t.start) : e.startBlock = [t.start] : t.level === "inline" && (e.startInline ? e.startInline.push(t.start) : e.startInline = [t.start]));
971
+ }
972
+ "childTokens" in t && t.childTokens && (e.childTokens[t.name] = t.childTokens);
973
+ }), n.extensions = e), r.renderer) {
974
+ let t = this.defaults.renderer || new M(this.defaults);
975
+ for (let i in r.renderer) {
976
+ if (!(i in t)) throw new Error(`renderer '${i}' does not exist`);
977
+ if (["options", "parser"].includes(i)) continue;
978
+ let l = i, c = r.renderer[l], a = t[l];
979
+ t[l] = (...h) => {
980
+ let o = c.apply(t, h);
981
+ return o === !1 && (o = a.apply(t, h)), o || "";
982
+ };
983
+ }
984
+ n.renderer = t;
985
+ }
986
+ if (r.tokenizer) {
987
+ let t = this.defaults.tokenizer || new Z(this.defaults);
988
+ for (let i in r.tokenizer) {
989
+ if (!(i in t)) throw new Error(`tokenizer '${i}' does not exist`);
990
+ if (["options", "rules", "lexer"].includes(i)) continue;
991
+ let l = i, c = r.tokenizer[l], a = t[l];
992
+ t[l] = (...h) => {
993
+ let o = c.apply(t, h);
994
+ return o === !1 && (o = a.apply(t, h)), o;
995
+ };
996
+ }
997
+ n.tokenizer = t;
998
+ }
999
+ if (r.hooks) {
1000
+ let t = this.defaults.hooks || new L();
1001
+ for (let i in r.hooks) {
1002
+ if (!(i in t)) throw new Error(`hook '${i}' does not exist`);
1003
+ if (["options", "block"].includes(i)) continue;
1004
+ let l = i, c = r.hooks[l], a = t[l];
1005
+ L.passThroughHooks.has(i) ? t[l] = (h) => {
1006
+ if (this.defaults.async && L.passThroughHooksRespectAsync.has(i)) return (async () => {
1007
+ let g = await c.call(t, h);
1008
+ return a.call(t, g);
1009
+ })();
1010
+ let o = c.call(t, h);
1011
+ return a.call(t, o);
1012
+ } : t[l] = (...h) => {
1013
+ if (this.defaults.async) return (async () => {
1014
+ let g = await c.apply(t, h);
1015
+ return g === !1 && (g = await a.apply(t, h)), g;
1016
+ })();
1017
+ let o = c.apply(t, h);
1018
+ return o === !1 && (o = a.apply(t, h)), o;
1019
+ };
1020
+ }
1021
+ n.hooks = t;
1022
+ }
1023
+ if (r.walkTokens) {
1024
+ let t = this.defaults.walkTokens, i = r.walkTokens;
1025
+ n.walkTokens = function(l) {
1026
+ let c = [];
1027
+ return c.push(i.call(this, l)), t && (c = c.concat(t.call(this, l))), c;
1028
+ };
1029
+ }
1030
+ this.defaults = { ...this.defaults, ...n };
1031
+ }), this;
1032
+ }
1033
+ setOptions(s) {
1034
+ return this.defaults = { ...this.defaults, ...s }, this;
1035
+ }
1036
+ lexer(s, e) {
1037
+ return m.lex(s, e ?? this.defaults);
1038
+ }
1039
+ parser(s, e) {
1040
+ return y.parse(s, e ?? this.defaults);
1041
+ }
1042
+ parseMarkdown(s) {
1043
+ return (e, r) => {
1044
+ let n = { ...r }, t = { ...this.defaults, ...n }, i = this.onError(!!t.silent, !!t.async);
1045
+ if (this.defaults.async === !0 && n.async === !1) return i(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."));
1046
+ if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
1047
+ if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1048
+ if (t.hooks && (t.hooks.options = t, t.hooks.block = s), t.async) return (async () => {
1049
+ let l = t.hooks ? await t.hooks.preprocess(e) : e, c = await (t.hooks ? await t.hooks.provideLexer() : s ? m.lex : m.lexInline)(l, t), a = t.hooks ? await t.hooks.processAllTokens(c) : c;
1050
+ t.walkTokens && await Promise.all(this.walkTokens(a, t.walkTokens));
1051
+ let h = await (t.hooks ? await t.hooks.provideParser() : s ? y.parse : y.parseInline)(a, t);
1052
+ return t.hooks ? await t.hooks.postprocess(h) : h;
1053
+ })().catch(i);
1054
+ try {
1055
+ t.hooks && (e = t.hooks.preprocess(e));
1056
+ let l = (t.hooks ? t.hooks.provideLexer() : s ? m.lex : m.lexInline)(e, t);
1057
+ t.hooks && (l = t.hooks.processAllTokens(l)), t.walkTokens && this.walkTokens(l, t.walkTokens);
1058
+ let c = (t.hooks ? t.hooks.provideParser() : s ? y.parse : y.parseInline)(l, t);
1059
+ return t.hooks && (c = t.hooks.postprocess(c)), c;
1060
+ } catch (l) {
1061
+ return i(l);
1062
+ }
1063
+ };
1064
+ }
1065
+ onError(s, e) {
1066
+ return (r) => {
1067
+ if (r.message += `
1068
+ Please report this to https://github.com/markedjs/marked.`, s) {
1069
+ let n = "<p>An error occurred:</p><pre>" + $(r.message + "", !0) + "</pre>";
1070
+ return e ? Promise.resolve(n) : n;
1071
+ }
1072
+ if (e) return Promise.reject(r);
1073
+ throw r;
1074
+ };
1075
+ }
1076
+ }, T = new St();
1077
+ function k(s, e) {
1078
+ return T.parse(s, e);
1079
+ }
1080
+ k.options = k.setOptions = function(s) {
1081
+ return T.setOptions(s), k.defaults = T.defaults, me(k.defaults), k;
1082
+ };
1083
+ k.getDefaults = W;
1084
+ k.defaults = v;
1085
+ k.use = function(...s) {
1086
+ return T.use(...s), k.defaults = T.defaults, me(k.defaults), k;
1087
+ };
1088
+ k.walkTokens = function(s, e) {
1089
+ return T.walkTokens(s, e);
1090
+ };
1091
+ k.parseInline = T.parseInline;
1092
+ k.Parser = y;
1093
+ k.parser = y.parse;
1094
+ k.Renderer = M;
1095
+ k.TextRenderer = se;
1096
+ k.Lexer = m;
1097
+ k.lexer = m.lex;
1098
+ k.Tokenizer = Z;
1099
+ k.Hooks = L;
1100
+ k.parse = k;
1101
+ k.options;
1102
+ k.setOptions;
1103
+ k.use;
1104
+ k.walkTokens;
1105
+ k.parseInline;
1106
+ y.parse;
1107
+ m.lex;
1108
+ const Et = (s, e) => {
1109
+ let r;
1110
+ return function() {
1111
+ const n = this, t = arguments;
1112
+ r && clearTimeout(r), r = setTimeout(() => {
1113
+ s.apply(n, t);
1114
+ }, e);
1115
+ };
1116
+ }, qt = (s, e) => {
1117
+ let r, n = !0;
1118
+ return function() {
1119
+ const t = this, i = arguments;
1120
+ if (n) {
1121
+ s.apply(t, i), n = !1, r = setTimeout(() => {
1122
+ r = null, n = !0;
1123
+ }, e);
1124
+ return;
1125
+ }
1126
+ r || (r = setTimeout(() => {
1127
+ s.apply(t, i), r = null, n = !0;
1128
+ }, e));
1129
+ };
1130
+ };
1131
+ function Zt(s, e) {
1132
+ return window.sessionStorage.setItem(s, JSON.stringify(e));
1133
+ }
1134
+ function Mt(s) {
1135
+ return JSON.parse(window.sessionStorage.getItem(s));
1136
+ }
1137
+ function Dt(s) {
1138
+ return window.sessionStorage.removeItem(s);
1139
+ }
1140
+ function Nt() {
1141
+ return window.sessionStorage.clear();
1142
+ }
1143
+ function Ot(s) {
1144
+ const e = Number(s);
1145
+ return e ? e / 1e3 + "s" : "";
1146
+ }
1147
+ const $t = (s) => {
1148
+ if (!s) return "";
1149
+ let e = 0;
1150
+ for (; Math.abs(s) >= 1024 && (s = s / 1024, e++, e !== 4); )
1151
+ ;
1152
+ const r = ["B", "KB", "MB", "GB", "TB"];
1153
+ return Math.round(s * 100) / 100 + " " + r[e];
1154
+ }, _ = Be({}), Qt = (s) => {
1155
+ if (!s) return "";
1156
+ let e = k.parse(s).replace(/>(\s+)</g, "><");
1157
+ const r = e.match(/<img[^>]+src="([^"]+)"[^>]*>/g);
1158
+ return r && r.forEach((n) => {
1159
+ const t = n.match(/src="([^"]+)"/);
1160
+ if (t && t[1]) {
1161
+ const i = t[1];
1162
+ if (!_.value[i]) {
1163
+ _.value[i] = "loading";
1164
+ const c = new Image();
1165
+ c.onload = () => {
1166
+ _.value[i] = "loaded";
1167
+ }, c.onerror = () => {
1168
+ _.value[i] = "error";
1169
+ }, c.src = i;
1170
+ }
1171
+ let l;
1172
+ _.value[i] === "loaded" ? l = n : _.value[i] === "error" ? l = `<div class="el-image__error" data-src='${t[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>` : l = '<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>', e = e.replace(n, l);
1173
+ }
1174
+ }), e;
1175
+ }, Ht = (s) => {
1176
+ if (typeof s != "string") return !1;
1177
+ const e = s.trim().toLowerCase();
1178
+ if (/^<!doctype\s+html[\s>]/.test(e) || /^<html[\s>]/.test(e)) return !0;
1179
+ const r = e.indexOf("<head"), n = e.indexOf("<body");
1180
+ return !!(r !== -1 && n !== -1 && r < n || e.includes("<html") && e.includes("<head") && e.includes("<body"));
1181
+ }, jt = (s) => {
1182
+ s && (s.onload = () => {
1183
+ try {
1184
+ const e = s.contentDocument || s.contentWindow.document;
1185
+ s.style.height = e.body.scrollHeight + 100 + "px";
1186
+ } catch {
1187
+ s.style.height = "800px";
1188
+ }
1189
+ });
1190
+ }, Rt = {
1191
+ key: 0,
1192
+ class: "file-display"
1193
+ }, Tt = { class: "file-img overflow-hidden" }, vt = {
1194
+ key: 0,
1195
+ class: "file-img__failed w-full h-full flex items-center justify-center"
1196
+ }, _t = { class: "file-display__item--name text-ellipsis" }, zt = { class: "file-display__item--size" }, At = {
1197
+ __name: "index",
1198
+ props: {
1199
+ fileList: {
1200
+ type: Array,
1201
+ default: () => []
1202
+ },
1203
+ showRemove: {
1204
+ type: Boolean,
1205
+ default: !0
1206
+ },
1207
+ showLoading: {
1208
+ type: Boolean,
1209
+ default: !1
1210
+ }
1211
+ },
1212
+ emits: ["remove-file"],
1213
+ setup(s, { emit: e }) {
1214
+ const { previewImage: r } = qe(), n = e, t = (l, c) => {
1215
+ n("remove-file", l, c);
1216
+ }, i = (l) => {
1217
+ ue(l.suffix, l.url) ? r(l.url) : window.open(l.url, "_blank");
1218
+ };
1219
+ return (l, c) => {
1220
+ const a = ae("loading"), h = ae("ellipsis-tooltip");
1221
+ return s.fileList.length ? (w(), R("div", Rt, [
1222
+ (w(!0), R(ce, null, Pe(s.fileList, (o, g) => (w(), R("div", {
1223
+ key: g,
1224
+ class: "file-display__item"
1225
+ }, [
1226
+ he((w(), R("div", Tt, [
1227
+ o.failed && s.showLoading ? (w(), R("div", vt, [
1228
+ H(S(G), {
1229
+ size: "22px",
1230
+ color: "#f56c6c"
1231
+ }, {
1232
+ default: j(() => [
1233
+ H(S(ge))
1234
+ ]),
1235
+ _: 1
1236
+ })
1237
+ ])) : (w(), R(ce, { key: 1 }, [
1238
+ S(ue)(o.suffix, o.url) ? (w(), C(S(Me), {
1239
+ key: 0,
1240
+ src: o.url,
1241
+ "zoom-rate": 1.2,
1242
+ "max-scale": 7,
1243
+ "min-scale": 0.2,
1244
+ onClick: (p) => i(o),
1245
+ fit: "cover"
1246
+ }, null, 8, ["src", "onClick"])) : (w(), C(S(G), {
1247
+ key: 1,
1248
+ size: "38px"
1249
+ }, {
1250
+ default: j(() => [
1251
+ (w(), C(Ce(S(Ze)(o))))
1252
+ ]),
1253
+ _: 2
1254
+ }, 1024))
1255
+ ], 64))
1256
+ ])), [
1257
+ [a, !o.bnid && !o.failed && s.showLoading]
1258
+ ]),
1259
+ Q("div", null, [
1260
+ he((w(), R("p", _t, [
1261
+ Ee(pe(o.name), 1)
1262
+ ])), [
1263
+ [h, o.name]
1264
+ ]),
1265
+ Q("p", zt, [
1266
+ Q("span", null, pe(S($t)(o.size)), 1)
1267
+ ])
1268
+ ]),
1269
+ s.showRemove ? (w(), C(S(G), {
1270
+ key: 0,
1271
+ class: "icon-remove",
1272
+ size: "18",
1273
+ onClick: (p) => t(g, o.bnid)
1274
+ }, {
1275
+ default: j(() => [
1276
+ H(S(ge))
1277
+ ]),
1278
+ _: 1
1279
+ }, 8, ["onClick"])) : oe("", !0)
1280
+ ]))), 128))
1281
+ ])) : oe("", !0);
1282
+ };
1283
+ }
1284
+ }, Gt = /* @__PURE__ */ De(At, [["__scopeId", "data-v-23669daf"]]);
1285
+ export {
1286
+ Nt as a,
1287
+ Ot as b,
1288
+ Ht as c,
1289
+ Et as d,
1290
+ jt as e,
1291
+ $t as f,
1292
+ Mt as g,
1293
+ Gt as i,
1294
+ Qt as m,
1295
+ Dt as r,
1296
+ Zt as s,
1297
+ qt as t
1298
+ };