@arcgis/coding-components 5.1.0-next.68 → 5.1.0-next.69

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 (40) hide show
  1. package/dist/cdn/{7N4GXW32.js → 3LECXAJI.js} +1 -1
  2. package/dist/cdn/{OM6WYQFV.js → 7FXL4QAP.js} +1 -1
  3. package/dist/cdn/{4EQ6MSLU.js → BJTGRXGY.js} +1 -1
  4. package/dist/cdn/{FLEAIHCQ.js → CI3IE4R3.js} +1 -1
  5. package/dist/cdn/{CIGWH7A3.js → CQKFZRQD.js} +1 -1
  6. package/dist/cdn/{LCIIA4UY.js → DEALVFQZ.js} +1 -1
  7. package/dist/cdn/{RRW7ORAI.js → DYYV7I6L.js} +1 -1
  8. package/dist/cdn/{WLHOOVAR.js → DZKQZQ5P.js} +1 -1
  9. package/dist/cdn/{QWRY5R2W.js → EB53JBE3.js} +1 -1
  10. package/dist/cdn/{HUPOXAQ5.js → GD2V6SXJ.js} +1 -1
  11. package/dist/cdn/{WEH53PAQ.js → H4D2W77C.js} +1 -1
  12. package/dist/cdn/{XGQHHSHY.js → KLOOWPON.js} +1 -1
  13. package/dist/cdn/{KC77WBZW.js → KRMU5UC3.js} +1 -1
  14. package/dist/cdn/{JRLRJ7TP.js → O7AMROTW.js} +1 -1
  15. package/dist/cdn/{GJKC6KKP.js → PZMGIOMS.js} +1 -1
  16. package/dist/cdn/{T752M2BH.js → QYQ6NQEA.js} +1 -1
  17. package/dist/cdn/{M3NPOHPJ.js → VA6AYYIY.js} +1 -1
  18. package/dist/cdn/{DOENRIOY.js → X4VNFU43.js} +1 -1
  19. package/dist/cdn/{Z5EGFQ6Z.js → XD7OBH4F.js} +1 -1
  20. package/dist/cdn/{KGFDJHXG.js → XOEPYC7M.js} +1 -1
  21. package/dist/cdn/{VR3U6I7F.js → XQFWSRRS.js} +20 -15
  22. package/dist/cdn/{3KONJCSO.js → Z245S42K.js} +1 -1
  23. package/dist/cdn/assets/code-editor/arcade.worker.js +2 -8
  24. package/dist/cdn/assets/code-editor/css.worker.js +1 -1
  25. package/dist/cdn/assets/code-editor/editor.worker.js +1 -1
  26. package/dist/cdn/assets/code-editor/html.worker.js +1 -1
  27. package/dist/cdn/assets/code-editor/json.worker.js +1 -1
  28. package/dist/cdn/assets/code-editor/sql-expr.worker.js +10 -9
  29. package/dist/cdn/assets/code-editor/sql-layer.worker.js +1 -1
  30. package/dist/cdn/assets/code-editor/ts.worker.js +51 -125
  31. package/dist/cdn/index.js +1 -1
  32. package/dist/chunks/markdown.js +66 -53
  33. package/dist/chunks/sql-expr-defaults.js +3 -6
  34. package/dist/components/arcgis-arcade-editor/customElement.js +12 -6
  35. package/dist/components/arcgis-editor-variables/customElement.js +1 -6
  36. package/dist/docs/api.json +1 -1
  37. package/dist/docs/docs.json +1 -1
  38. package/dist/docs/web-types.json +1 -1
  39. package/package.json +5 -5
  40. /package/dist/cdn/{DIIOEJQ7.js → FQENPQFS.js} +0 -0
@@ -2,11 +2,11 @@
2
2
  function H() {
3
3
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
4
4
  }
5
- var R = H();
6
- function le(n) {
7
- R = n;
5
+ var T = H();
6
+ function ie(n) {
7
+ T = n;
8
8
  }
9
- var $ = { exec: () => null };
9
+ var S = { exec: () => null };
10
10
  function p(n, e = "") {
11
11
  let r = typeof n == "string" ? n : n.source, s = { replace: (t, i) => {
12
12
  let l = typeof i == "string" ? i : i.source;
@@ -14,14 +14,14 @@ function p(n, e = "") {
14
14
  }, getRegex: () => new RegExp(r, e) };
15
15
  return s;
16
16
  }
17
- var xe = (() => {
17
+ var be = (() => {
18
18
  try {
19
19
  return !!new RegExp("(?<=1)(?<!1)");
20
20
  } catch {
21
21
  return !1;
22
22
  }
23
- })(), 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, 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, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}>`) }, be = /^(?:[ \t]*(?:\n|$))+/, we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, me = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, N = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ae = p(ie).replace(/bull/g, N).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 = p(ie).replace(/bull/g, N).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(), O = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Se = /^[^\n]+/, j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Re = p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", j).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Te = p(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, N).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", G = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ze = p("^ {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", G).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = p(O).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Ae = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), X = { blockquote: Ae, code: we, def: Re, fences: me, heading: ye, hr: I, html: ze, lheading: ae, list: Te, newline: be, paragraph: oe, table: $, text: Se }, Y = p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = { ...X, lheading: $e, table: Y, paragraph: p(O).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Y).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Pe = { ...X, html: p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", G).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: $, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: p(O).replace("hr", I).replace("heading", ` *#{1,6} *[^
24
- ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ie = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Le = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ce = /^( {2,}|\\)\n(?!\s*$)/, qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, T = /[\p{P}\p{S}]/u, E = /[\s\p{P}\p{S}]/u, W = /[^\s\p{P}\p{S}]/u, Be = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, E).getRegex(), he = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, ve = /(?:[^\s\p{P}\p{S}]|~)/u, Ee = p(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", xe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), pe = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ze = p(pe, "u").replace(/punct/g, T).getRegex(), De = p(pe, "u").replace(/punct/g, he).getRegex(), ue = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Me = p(ue, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, E).replace(/punct/g, T).getRegex(), Qe = p(ue, "gu").replace(/notPunctSpace/g, ve).replace(/punctSpace/g, Ce).replace(/punct/g, he).getRegex(), He = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, E).replace(/punct/g, T).getRegex(), Ne = p(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, T).getRegex(), Oe = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", je = p(Oe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, E).replace(/punct/g, T).getRegex(), Ge = p(/\\(punct)/, "gu").replace(/punct/g, T).getRegex(), Xe = p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), We = p(G).replace("(?:-->|$)", "-->").getRegex(), Fe = p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ue = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ge = p(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", j).getRegex(), ke = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex(), Je = p("reflink|nolink(?!\\()", "g").replace("reflink", ge).replace("nolink", ke).getRegex(), ee = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, F = { _backpedal: $, anyPunctuation: Ge, autolink: Xe, blockSkip: Ee, br: ce, code: Le, del: $, delLDelim: $, delRDelim: $, emStrongLDelim: Ze, emStrongRDelimAst: Me, emStrongRDelimUnd: He, escape: Ie, link: Ue, nolink: ke, punctuation: Be, reflink: ge, reflinkSearch: Je, tag: Fe, text: qe, url: $ }, Ke = { ...F, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, D = { ...F, emStrongRDelimAst: Qe, emStrongLDelim: De, delLDelim: Ne, delRDelim: je, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ee).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: p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ee).getRegex() }, Ve = { ...D, br: p(ce).replace("{2,}", "*").getRegex(), text: p(D.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, L = { normal: X, gfm: _e, pedantic: Pe }, A = { normal: F, gfm: D, breaks: Ve, pedantic: Ke }, Ye = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, te = (n) => Ye[n];
23
+ })(), 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, 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, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}>`) }, we = /^(?:[ \t]*(?:\n|$))+/, me = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, $e = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, j = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ae = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = p(ae).replace(/bull/g, j).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(), Se = p(ae).replace(/bull/g, j).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(), N = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Re = /^[^\n]+/, O = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Te = p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", O).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ze = p(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", G = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ae = p("^ {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", G).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ce = p(N).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ce).getRegex(), X = { blockquote: _e, code: me, def: Te, fences: ye, heading: $e, hr: I, html: Ae, lheading: oe, list: ze, newline: we, paragraph: ce, table: S, text: Re }, Y = p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Pe = { ...X, lheading: Se, table: Y, paragraph: p(N).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Y).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Ie = { ...X, html: p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", G).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: S, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: p(N).replace("hr", I).replace("heading", ` *#{1,6} *[^
24
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Le = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, qe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, he = /^( {2,}|\\)\n(?!\s*$)/, Be = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, E = /[\s\p{P}\p{S}]/u, W = /[^\s\p{P}\p{S}]/u, Ce = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, E).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, ve = /(?!~)[\s\p{P}\p{S}]/u, Ee = /(?:[^\s\p{P}\p{S}]|~)/u, Ze = p(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, De = p(ue, "u").replace(/punct/g, z).getRegex(), Me = p(ue, "u").replace(/punct/g, pe).getRegex(), ge = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Qe = p(ge, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, E).replace(/punct/g, z).getRegex(), He = p(ge, "gu").replace(/notPunctSpace/g, Ee).replace(/punctSpace/g, ve).replace(/punct/g, pe).getRegex(), je = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, E).replace(/punct/g, z).getRegex(), Ne = p(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), Oe = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ge = p(Oe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, E).replace(/punct/g, z).getRegex(), Xe = p(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), We = p(/^<(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(), Fe = p(G).replace("(?:-->|$)", "-->").getRegex(), Ue = p("^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", Fe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Je = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ke = p(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", O).getRegex(), fe = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", O).getRegex(), Ke = p("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", fe).getRegex(), ee = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, F = { _backpedal: S, anyPunctuation: Xe, autolink: We, blockSkip: Ze, br: he, code: qe, del: S, delLDelim: S, delRDelim: S, emStrongLDelim: De, emStrongRDelimAst: Qe, emStrongRDelimUnd: je, escape: Le, link: Je, nolink: fe, punctuation: Ce, reflink: ke, reflinkSearch: Ke, tag: Ue, text: Be, url: S }, Ve = { ...F, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, D = { ...F, emStrongRDelimAst: He, emStrongLDelim: Me, delLDelim: Ne, delRDelim: Ge, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ee).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: p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ee).getRegex() }, Ye = { ...D, br: p(he).replace("{2,}", "*").getRegex(), text: p(D.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, L = { normal: X, gfm: Pe, pedantic: Ie }, _ = { normal: F, gfm: D, breaks: Ye, pedantic: Ve }, et = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, te = (n) => et[n];
25
25
  function m(n, e) {
26
26
  if (e) {
27
27
  if (x.escapeTest.test(n)) return n.replace(x.escapeReplace, te);
@@ -47,7 +47,7 @@ function ne(n, e) {
47
47
  for (; t < s.length; t++) s[t] = s[t].trim().replace(x.slashPipe, "|");
48
48
  return s;
49
49
  }
50
- function _(n, e, r) {
50
+ function $(n, e, r) {
51
51
  let s = n.length;
52
52
  if (s === 0) return "";
53
53
  let t = 0;
@@ -55,7 +55,14 @@ function _(n, e, r) {
55
55
  t++;
56
56
  return n.slice(0, s - t);
57
57
  }
58
- function et(n, e) {
58
+ function se(n) {
59
+ let e = n.split(`
60
+ `), r = e.length - 1;
61
+ for (; r >= 0 && !e[r].trim(); ) r--;
62
+ return e.length - r <= 2 ? n : e.slice(0, r + 1).join(`
63
+ `);
64
+ }
65
+ function tt(n, e) {
59
66
  if (n.indexOf(e[1]) === -1) return -1;
60
67
  let r = 0;
61
68
  for (let s = 0; s < n.length; s++) if (n[s] === "\\") s++;
@@ -63,7 +70,7 @@ function et(n, e) {
63
70
  else if (n[s] === e[1] && (r--, r < 0)) return s;
64
71
  return r > 0 ? -2 : -1;
65
72
  }
66
- function tt(n, e = 0) {
73
+ function rt(n, e = 0) {
67
74
  let r = e, s = "";
68
75
  for (let t of n) if (t === " ") {
69
76
  let i = 4 - r % 4;
@@ -71,13 +78,13 @@ function tt(n, e = 0) {
71
78
  } else s += t, r++;
72
79
  return s;
73
80
  }
74
- function se(n, e, r, s, t) {
81
+ function le(n, e, r, s, t) {
75
82
  let i = e.href, l = e.title || null, o = n[1].replace(t.other.outputLinkReplace, "$1");
76
83
  s.state.inLink = !0;
77
84
  let a = { type: n[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: o, tokens: s.inlineTokens(o) };
78
85
  return s.state.inLink = !1, a;
79
86
  }
80
- function rt(n, e, r) {
87
+ function nt(n, e, r) {
81
88
  let s = n.match(r.other.indentCodeCompensation);
82
89
  if (s === null) return e;
83
90
  let t = s[1];
@@ -95,7 +102,7 @@ var B = class {
95
102
  rules;
96
103
  lexer;
97
104
  constructor(n) {
98
- this.options = n || R;
105
+ this.options = n || T;
99
106
  }
100
107
  space(n) {
101
108
  let e = this.rules.block.newline.exec(n);
@@ -104,15 +111,14 @@ var B = class {
104
111
  code(n) {
105
112
  let e = this.rules.block.code.exec(n);
106
113
  if (e) {
107
- let r = e[0].replace(this.rules.other.codeRemoveIndent, "");
108
- return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : _(r, `
109
- `) };
114
+ let r = this.options.pedantic ? e[0] : se(e[0]), s = r.replace(this.rules.other.codeRemoveIndent, "");
115
+ return { type: "code", raw: r, codeBlockStyle: "indented", text: s };
110
116
  }
111
117
  }
112
118
  fences(n) {
113
119
  let e = this.rules.block.fences.exec(n);
114
120
  if (e) {
115
- let r = e[0], s = rt(r, e[3] || "", this.rules);
121
+ let r = e[0], s = nt(r, e[3] || "", this.rules);
116
122
  return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
117
123
  }
118
124
  }
@@ -121,21 +127,22 @@ var B = class {
121
127
  if (e) {
122
128
  let r = e[2].trim();
123
129
  if (this.rules.other.endingHash.test(r)) {
124
- let s = _(r, "#");
130
+ let s = $(r, "#");
125
131
  (this.options.pedantic || !s || this.rules.other.endingSpaceChar.test(s)) && (r = s.trim());
126
132
  }
127
- return { type: "heading", raw: e[0], depth: e[1].length, text: r, tokens: this.lexer.inline(r) };
133
+ return { type: "heading", raw: $(e[0], `
134
+ `), depth: e[1].length, text: r, tokens: this.lexer.inline(r) };
128
135
  }
129
136
  }
130
137
  hr(n) {
131
138
  let e = this.rules.block.hr.exec(n);
132
- if (e) return { type: "hr", raw: _(e[0], `
139
+ if (e) return { type: "hr", raw: $(e[0], `
133
140
  `) };
134
141
  }
135
142
  blockquote(n) {
136
143
  let e = this.rules.block.blockquote.exec(n);
137
144
  if (e) {
138
- let r = _(e[0], `
145
+ let r = $(e[0], `
139
146
  `).split(`
140
147
  `), s = "", t = "", i = [];
141
148
  for (; r.length > 0; ) {
@@ -182,25 +189,25 @@ ${c}` : c;
182
189
  let a = !1, h = "", c = "";
183
190
  if (!(e = i.exec(n)) || this.rules.block.hr.test(n)) break;
184
191
  h = e[0], n = n.substring(h.length);
185
- let g = tt(e[2].split(`
192
+ let g = rt(e[2].split(`
186
193
  `, 1)[0], e[1].length), u = n.split(`
187
194
  `, 1)[0], d = !g.trim(), f = 0;
188
195
  if (this.options.pedantic ? (f = 2, c = g.trimStart()) : d ? f = e[1].length + 1 : (f = g.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = g.slice(f), f += e[1].length), d && this.rules.other.blankLine.test(u) && (h += u + `
189
196
  `, n = n.substring(u.length + 1), a = !0), !a) {
190
- let y = this.rules.other.nextBulletRegex(f), J = this.rules.other.hrRegex(f), K = this.rules.other.fencesBeginRegex(f), V = this.rules.other.headingBeginRegex(f), fe = this.rules.other.htmlBeginRegex(f), de = this.rules.other.blockquoteBeginRegex(f);
197
+ let y = this.rules.other.nextBulletRegex(f), J = this.rules.other.hrRegex(f), K = this.rules.other.fencesBeginRegex(f), V = this.rules.other.headingBeginRegex(f), de = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
191
198
  for (; n; ) {
192
199
  let Z = n.split(`
193
- `, 1)[0], z;
194
- if (u = Z, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), z = u) : z = u.replace(this.rules.other.tabCharGlobal, " "), K.test(u) || V.test(u) || fe.test(u) || de.test(u) || y.test(u) || J.test(u)) break;
195
- if (z.search(this.rules.other.nonSpaceChar) >= f || !u.trim()) c += `
196
- ` + z.slice(f);
200
+ `, 1)[0], A;
201
+ if (u = Z, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), A = u) : A = u.replace(this.rules.other.tabCharGlobal, " "), K.test(u) || V.test(u) || de.test(u) || xe.test(u) || y.test(u) || J.test(u)) break;
202
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !u.trim()) c += `
203
+ ` + A.slice(f);
197
204
  else {
198
205
  if (d || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || K.test(g) || V.test(g) || J.test(g)) break;
199
206
  c += `
200
207
  ` + u;
201
208
  }
202
209
  d = !u.trim(), h += Z + `
203
- `, n = n.substring(Z.length + 1), g = z.slice(f);
210
+ `, n = n.substring(Z.length + 1), g = A.slice(f);
204
211
  }
205
212
  }
206
213
  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(c), loose: !1, text: c, tokens: [] }), t.raw += h;
@@ -238,20 +245,25 @@ ${c}` : c;
238
245
  }
239
246
  html(n) {
240
247
  let e = this.rules.block.html.exec(n);
241
- if (e) return { type: "html", block: !0, raw: e[0], pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: e[0] };
248
+ if (e) {
249
+ let r = se(e[0]);
250
+ return { type: "html", block: !0, raw: r, pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: r };
251
+ }
242
252
  }
243
253
  def(n) {
244
254
  let e = this.rules.block.def.exec(n);
245
255
  if (e) {
246
256
  let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), s = 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];
247
- return { type: "def", tag: r, raw: e[0], href: s, title: t };
257
+ return { type: "def", tag: r, raw: $(e[0], `
258
+ `), href: s, title: t };
248
259
  }
249
260
  }
250
261
  table(n) {
251
262
  let e = this.rules.block.table.exec(n);
252
263
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
253
264
  let r = ne(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), t = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
254
- `) : [], i = { type: "table", raw: e[0], header: [], align: [], rows: [] };
265
+ `) : [], i = { type: "table", raw: $(e[0], `
266
+ `), header: [], align: [], rows: [] };
255
267
  if (r.length === s.length) {
256
268
  for (let l of s) 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);
257
269
  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] });
@@ -263,7 +275,8 @@ ${c}` : c;
263
275
  let e = this.rules.block.lheading.exec(n);
264
276
  if (e) {
265
277
  let r = e[1].trim();
266
- return { type: "heading", raw: e[0], depth: e[2].charAt(0) === "=" ? 1 : 2, text: r, tokens: this.lexer.inline(r) };
278
+ return { type: "heading", raw: $(e[0], `
279
+ `), depth: e[2].charAt(0) === "=" ? 1 : 2, text: r, tokens: this.lexer.inline(r) };
267
280
  }
268
281
  }
269
282
  paragraph(n) {
@@ -292,10 +305,10 @@ ${c}` : c;
292
305
  let r = e[2].trim();
293
306
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
294
307
  if (!this.rules.other.endAngleBracket.test(r)) return;
295
- let i = _(r.slice(0, -1), "\\");
308
+ let i = $(r.slice(0, -1), "\\");
296
309
  if ((r.length - i.length) % 2 === 0) return;
297
310
  } else {
298
- let i = et(e[2], "()");
311
+ let i = tt(e[2], "()");
299
312
  if (i === -2) return;
300
313
  if (i > -1) {
301
314
  let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
@@ -307,7 +320,7 @@ ${c}` : c;
307
320
  let i = this.rules.other.pedanticHrefTitle.exec(s);
308
321
  i && (s = i[1], t = i[3]);
309
322
  } else t = e[3] ? e[3].slice(1, -1) : "";
310
- return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? s = s.slice(1) : s = s.slice(1, -1)), se(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
323
+ return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? s = s.slice(1) : s = s.slice(1, -1)), le(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
311
324
  }
312
325
  }
313
326
  reflink(n, e) {
@@ -318,7 +331,7 @@ ${c}` : c;
318
331
  let i = r[0].charAt(0);
319
332
  return { type: "text", raw: i, text: i };
320
333
  }
321
- return se(r, t, r[0], this.lexer, this.rules);
334
+ return le(r, t, r[0], this.lexer, this.rules);
322
335
  }
323
336
  }
324
337
  emStrong(n, e, r = "") {
@@ -410,12 +423,12 @@ ${c}` : c;
410
423
  inlineQueue;
411
424
  tokenizer;
412
425
  constructor(e) {
413
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new B(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
414
- let r = { other: x, block: L.normal, inline: A.normal };
415
- this.options.pedantic ? (r.block = L.pedantic, r.inline = A.pedantic) : this.options.gfm && (r.block = L.gfm, this.options.breaks ? r.inline = A.breaks : r.inline = A.gfm), this.tokenizer.rules = r;
426
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new B(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
427
+ let r = { other: x, block: L.normal, inline: _.normal };
428
+ this.options.pedantic ? (r.block = L.pedantic, r.inline = _.pedantic) : this.options.gfm && (r.block = L.gfm, this.options.breaks ? r.inline = _.breaks : r.inline = _.gfm), this.tokenizer.rules = r;
416
429
  }
417
430
  static get rules() {
418
- return { block: L, inline: A };
431
+ return { block: L, inline: _ };
419
432
  }
420
433
  static lex(e, r) {
421
434
  return new M(r).lex(e);
@@ -615,7 +628,7 @@ ${c}` : c;
615
628
  options;
616
629
  parser;
617
630
  constructor(n) {
618
- this.options = n || R;
631
+ this.options = n || T;
619
632
  }
620
633
  space(n) {
621
634
  return "";
@@ -764,7 +777,7 @@ ${n}</tr>
764
777
  renderer;
765
778
  textRenderer;
766
779
  constructor(e) {
767
- this.options = e || R, this.options.renderer = this.options.renderer || new C(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new U();
780
+ this.options = e || T, this.options.renderer = this.options.renderer || new C(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new U();
768
781
  }
769
782
  static parse(e, r) {
770
783
  return new Q(r).parse(e);
@@ -914,7 +927,7 @@ ${n}</tr>
914
927
  options;
915
928
  block;
916
929
  constructor(n) {
917
- this.options = n || R;
930
+ this.options = n || T;
918
931
  }
919
932
  static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
920
933
  static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
@@ -936,7 +949,7 @@ ${n}</tr>
936
949
  provideParser(n = this.block) {
937
950
  return n ? w.parse : w.parseInline;
938
951
  }
939
- }, nt = class {
952
+ }, st = class {
940
953
  defaults = H();
941
954
  options = this.setOptions;
942
955
  parse = this.parseMarkdown(!0);
@@ -1096,22 +1109,22 @@ Please report this to https://github.com/markedjs/marked.`, n) {
1096
1109
  throw r;
1097
1110
  };
1098
1111
  }
1099
- }, S = new nt();
1112
+ }, R = new st();
1100
1113
  function k(n, e) {
1101
- return S.parse(n, e);
1114
+ return R.parse(n, e);
1102
1115
  }
1103
1116
  k.options = k.setOptions = function(n) {
1104
- return S.setOptions(n), k.defaults = S.defaults, le(k.defaults), k;
1117
+ return R.setOptions(n), k.defaults = R.defaults, ie(k.defaults), k;
1105
1118
  };
1106
1119
  k.getDefaults = H;
1107
- k.defaults = R;
1120
+ k.defaults = T;
1108
1121
  k.use = function(...n) {
1109
- return S.use(...n), k.defaults = S.defaults, le(k.defaults), k;
1122
+ return R.use(...n), k.defaults = R.defaults, ie(k.defaults), k;
1110
1123
  };
1111
1124
  k.walkTokens = function(n, e) {
1112
- return S.walkTokens(n, e);
1125
+ return R.walkTokens(n, e);
1113
1126
  };
1114
- k.parseInline = S.parseInline;
1127
+ k.parseInline = R.parseInline;
1115
1128
  k.Parser = w;
1116
1129
  k.parser = w.parse;
1117
1130
  k.Renderer = C;
@@ -1142,9 +1155,9 @@ k.use({
1142
1155
  }
1143
1156
  }
1144
1157
  });
1145
- function st(n) {
1158
+ function lt(n) {
1146
1159
  return n == null ? "" : k.parse(typeof n == "string" ? n : n.value, { async: !1 });
1147
1160
  }
1148
1161
  export {
1149
- st as c
1162
+ lt as c
1150
1163
  };
@@ -62,12 +62,9 @@ function E(r) {
62
62
  if (r.disabledVariables?.includes(e.name))
63
63
  return;
64
64
  const o = r.definitions[e.name];
65
- switch (e.type) {
66
- case "featureSet":
67
- return u(o) ? i.variables.push({ ...e, type: e.type, definition: o }) : void 0;
68
- default:
69
- throw Error(`sdkVariable type not supported (yet) type: ${e.type}`);
70
- }
65
+ if (e.type === "featureSet")
66
+ return u(o) ? i.variables.push({ ...e, type: e.type, definition: o }) : void 0;
67
+ throw Error(`sdkVariable type not supported (yet) type: ${e.type}`);
71
68
  }), i;
72
69
  }
73
70
  const d = "arcgis-sql-expression";
@@ -68,7 +68,9 @@ async function Q({
68
68
  }
69
69
  class X extends k {
70
70
  constructor() {
71
- super(...arguments), this._codeEditorElt = O(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = F(), this._modelId = M(), this._openArcadeHelp = () => void window.open(L, "Arcade Help"), this._toggleSidePanel = (e) => {
71
+ super(...arguments), this._codeEditorElt = O(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = F(), this._modelId = M(), this._openArcadeHelp = () => {
72
+ window.open(L, "Arcade Help");
73
+ }, this._toggleSidePanel = (e) => {
72
74
  if (!e.target)
73
75
  return;
74
76
  const t = e.target?.dataset.panelName ?? "none";
@@ -146,10 +148,12 @@ class X extends k {
146
148
  this._executionResult = { type: "error", value: "Missing editor profile", error: null };
147
149
  return;
148
150
  }
149
- this._showExecutionPanel = !0, this._executingScript = !0, this._consoleLogs = [], setTimeout(() => void (async () => {
150
- const d = this._codeEditorElt.value?.value;
151
- this._executionResult = await x(t.definition, d, e, (n) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, n], 0)), this._executingScript = !1;
152
- })(), 0);
151
+ this._showExecutionPanel = !0, this._executingScript = !0, this._consoleLogs = [], setTimeout(() => {
152
+ (async () => {
153
+ const d = this._codeEditorElt.value?.value;
154
+ this._executionResult = await x(t.definition, d, e, (n) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, n], 0)), this._executingScript = !1;
155
+ })();
156
+ }, 0);
153
157
  }
154
158
  _toggleShowExecutionPanel() {
155
159
  this._showExecutionPanel = !this._showExecutionPanel;
@@ -201,7 +205,9 @@ class X extends k {
201
205
  }));
202
206
  }
203
207
  renderMainActionBar() {
204
- return this.testData ? i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => void this._executeScript().catch(r(this))}></calcite-action>${this._executionResult ? i`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
208
+ return this.testData ? i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => {
209
+ this._executeScript().catch(r(this));
210
+ }}></calcite-action>${this._executionResult ? i`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
205
211
  }
206
212
  renderMainPanel() {
207
213
  return i`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${c.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${N(this._codeEditorElt)}></arcgis-code-editor>`;
@@ -112,12 +112,7 @@ class C extends f {
112
112
  return s.length ? s.map((r) => this.renderEditorVariable(r)) : i`<div class="notice-container">${this.messages.noitems}</div>`;
113
113
  }
114
114
  renderEditorVariable(e) {
115
- switch (e.type) {
116
- case "group":
117
- return this._isRootPresentation("featureSetRoot") && e.isHeader ? i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>` : this._isRootPresentation("featureSetRoot") && e._label?.code === "fields" ? this.renderEditorVariables(e) : i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;
118
- default:
119
- return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${(t) => this._emitItemSelected(t, e)} @keydown=${(t) => this._emitItemSelected(t, e)}>${e.isCollection ? i`<calcite-action slot=actions-end .text=${this.messages.expand ?? ""} scale=s icon=chevron-right icon-flip-rtl @click=${(t) => this._showCollectionPanel(t, e)} @keydown=${$}></calcite-action>` : null}${e.icon ? i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>` : null}</calcite-list-item>`;
120
- }
115
+ return e.type === "group" ? this._isRootPresentation("featureSetRoot") && e.isHeader ? i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>` : this._isRootPresentation("featureSetRoot") && e._label?.code === "fields" ? this.renderEditorVariables(e) : i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>` : i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${(t) => this._emitItemSelected(t, e)} @keydown=${(t) => this._emitItemSelected(t, e)}>${e.isCollection ? i`<calcite-action slot=actions-end .text=${this.messages.expand ?? ""} scale=s icon=chevron-right icon-flip-rtl @click=${(t) => this._showCollectionPanel(t, e)} @keydown=${$}></calcite-action>` : null}${e.icon ? i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>` : null}</calcite-list-item>`;
121
116
  }
122
117
  render() {
123
118
  return this.closed ? null : this.loading && !this.variable ? i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.heading ?? this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader></calcite-flow-item></calcite-flow>` : !this.loading && (!this.variable || this.variable?.loaded && !this.variable?.variables.length) ? i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.heading ?? this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.profileempty}</div></calcite-flow-item></calcite-flow>` : i`<calcite-flow ${d(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable, !0, this._flowItemRenderers.length === 0)}${this._flowItemRenderers.map((e, t, s) => (