@arcgis/coding-components 5.0.0-next.39 → 5.0.0-next.41

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 (119) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/3WIRROBH.js +4 -0
  3. package/dist/cdn/{AFUBHK37.js → 42JQRIXR.js} +5 -5
  4. package/dist/cdn/4R4DUTCV.js +6 -0
  5. package/dist/cdn/5PJI5QQB.js +37 -0
  6. package/dist/cdn/{A3HSJCES.js → 5UEEUMXL.js} +2 -2
  7. package/dist/cdn/6CKRGIHZ.js +6 -0
  8. package/dist/cdn/7EJZH64Z.js +4 -0
  9. package/dist/cdn/7XW6IKKV.js +4 -0
  10. package/dist/cdn/{IQRXXWGC.js → A3TLL6LG.js} +2 -2
  11. package/dist/cdn/AKWJLYC3.js +4 -0
  12. package/dist/cdn/ASRHMURK.js +4 -0
  13. package/dist/cdn/{V2PRLYOK.js → BMXVKJ7B.js} +2 -2
  14. package/dist/cdn/{32D5TXZE.js → CJ65XLTF.js} +2 -2
  15. package/dist/cdn/{22UJ2NCC.js → D726IUEN.js} +2 -2
  16. package/dist/cdn/DRX5YPAV.js +4 -0
  17. package/dist/cdn/DUJT7B4V.js +4 -0
  18. package/dist/cdn/{LWCU6T2S.js → E2PW5KNS.js} +2 -2
  19. package/dist/cdn/FF6CRCZF.js +4 -0
  20. package/dist/cdn/{5A2OAIPG.js → FYVNN5SL.js} +2 -2
  21. package/dist/cdn/GACCOEJE.js +4 -0
  22. package/dist/cdn/GUM3FUHK.js +4 -0
  23. package/dist/cdn/{XQUZTH64.js → HPZKKREG.js} +2 -2
  24. package/dist/cdn/{HW6JQO5U.js → I2ZZVQNR.js} +2 -2
  25. package/dist/cdn/{65R5LFH4.js → IDPVSJSA.js} +1 -1
  26. package/dist/cdn/JJXU7RKH.js +4 -0
  27. package/dist/cdn/KVOGU23G.js +4 -0
  28. package/dist/cdn/MG7IUFZ5.js +4 -0
  29. package/dist/cdn/{B7UCVBR4.js → MPI3VJ27.js} +2 -2
  30. package/dist/cdn/{463DHUPJ.js → NRSCYJ4X.js} +2 -2
  31. package/dist/cdn/{MSV35DG3.js → NSG3IIH4.js} +1 -1
  32. package/dist/cdn/{SO6A33RQ.js → QB4B762H.js} +1 -1
  33. package/dist/cdn/SNG6BXOJ.js +4 -0
  34. package/dist/cdn/TA3A544D.js +69 -0
  35. package/dist/cdn/TDR5QOYK.js +4 -0
  36. package/dist/cdn/{YVZP32LA.js → UNGROWHP.js} +2 -2
  37. package/dist/cdn/{NBILS2PA.js → UOMZGMYC.js} +2 -2
  38. package/dist/cdn/V3QS3R7T.js +6 -0
  39. package/dist/cdn/{LUBHSH6S.js → VOYE3SWE.js} +15 -15
  40. package/dist/cdn/{PNX3P5LX.js → VRR5O4LN.js} +2 -2
  41. package/dist/cdn/{5AE3XQBB.js → W3FWYOGY.js} +1 -1
  42. package/dist/cdn/WB62GWRN.js +4 -0
  43. package/dist/cdn/{GYFX6FDB.js → WS4TV7BI.js} +2 -2
  44. package/dist/cdn/{6DXNKA5R.js → WXEVTZGW.js} +2 -2
  45. package/dist/cdn/{WPDOXZMT.js → XNU7TDA3.js} +2 -2
  46. package/dist/cdn/{KMM2L2UC.js → XSTPZUAO.js} +2 -2
  47. package/dist/cdn/{QV5P6IW2.js → XV2IY5HJ.js} +2 -2
  48. package/dist/cdn/{DJBX4N35.js → YIFRYPQP.js} +2 -2
  49. package/dist/cdn/assets/code-editor/sql-expr.worker.js +2107 -2107
  50. package/dist/cdn/index.js +3 -3
  51. package/dist/cdn/main.css +1 -1
  52. package/dist/chunks/arcade-contribution.js +97 -0
  53. package/dist/chunks/arcade-defaults.js +1 -1
  54. package/dist/chunks/arcade-executor.js +1 -1
  55. package/dist/chunks/arcade-mode.js +1 -1
  56. package/dist/chunks/arcade-service-accessors.js +75 -6
  57. package/dist/chunks/colorize.js +26 -0
  58. package/dist/chunks/editor.js +1 -1
  59. package/dist/chunks/fields.js +1 -1
  60. package/dist/chunks/language-defaults-base.js +37 -36
  61. package/dist/chunks/markdown.js +64 -91
  62. package/dist/chunks/monaco-importer.js +8 -93
  63. package/dist/chunks/runtime.js +1 -1
  64. package/dist/chunks/sql-expr-defaults.js +1 -1
  65. package/dist/chunks/sql-expr-mode.js +1 -1
  66. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  67. package/dist/chunks/useT9n.js +1 -1
  68. package/dist/chunks/utilities.js +90 -0
  69. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +3 -3
  70. package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +1 -0
  71. package/dist/components/arcgis-arcade-coding-assistant/index.js +1 -0
  72. package/dist/components/arcgis-arcade-editor/customElement.js +2 -3
  73. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  74. package/dist/components/arcgis-arcade-suggestions/customElement.js +6 -5
  75. package/dist/components/arcgis-code-editor/customElement.js +3 -3
  76. package/dist/components/arcgis-code-viewer/customElement.d.ts +63 -0
  77. package/dist/components/arcgis-code-viewer/customElement.js +119 -0
  78. package/dist/components/arcgis-code-viewer/index.d.ts +1 -0
  79. package/dist/components/arcgis-code-viewer/index.js +1 -0
  80. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  81. package/dist/components/arcgis-language-api-panel/customElement.js +24 -28
  82. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  83. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  84. package/dist/docs/api.json +144 -2
  85. package/dist/docs/docs.json +116 -2
  86. package/dist/docs/vscode.html-custom-data.json +22 -0
  87. package/dist/docs/web-types.json +40 -1
  88. package/dist/index.d.ts +5 -0
  89. package/dist/index.js +1 -1
  90. package/dist/loader.js +5 -4
  91. package/dist/monacoStyles.js +1 -1
  92. package/dist/types/lumina.d.ts +5 -0
  93. package/dist/types/preact.d.ts +6 -0
  94. package/dist/types/preact10.d.ts +7 -0
  95. package/dist/types/react.d.ts +7 -0
  96. package/dist/types/stencil.d.ts +5 -0
  97. package/dist/utils/colorize.d.ts +1 -1
  98. package/dist/utils/monaco-languages.d.ts +4 -0
  99. package/package.json +6 -5
  100. package/dist/cdn/36J7OXKL.js +0 -4
  101. package/dist/cdn/5HDJXUGY.js +0 -4
  102. package/dist/cdn/77G2EUBD.js +0 -4
  103. package/dist/cdn/BC25UYFG.js +0 -4
  104. package/dist/cdn/BEW42V7C.js +0 -4
  105. package/dist/cdn/DQFS5S4N.js +0 -4
  106. package/dist/cdn/FNKWDH6V.js +0 -4
  107. package/dist/cdn/FZYOFX2D.js +0 -6
  108. package/dist/cdn/GQJM6PDN.js +0 -104
  109. package/dist/cdn/IJJXIW5Z.js +0 -4
  110. package/dist/cdn/KFRXV3AL.js +0 -4
  111. package/dist/cdn/LPXQ3NWM.js +0 -4
  112. package/dist/cdn/M4276KFE.js +0 -4
  113. package/dist/cdn/SPZVHSF2.js +0 -4
  114. package/dist/cdn/TIYSNFGO.js +0 -4
  115. package/dist/cdn/USHS6Y7V.js +0 -6
  116. package/dist/cdn/X2NBZ5GC.js +0 -4
  117. package/dist/cdn/XAAE3RER.js +0 -4
  118. package/dist/chunks/setup-monaco.js +0 -74
  119. package/dist/chunks/sql-expr-contribution.js +0 -85
@@ -1,38 +1,12 @@
1
- import { i as we } from "./monaco-importer.js";
2
- import { StandaloneServices as ie } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
3
- import { IStandaloneThemeService as ae } from "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
4
- import { generateTokensCSSForColorMap as ye } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
5
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
6
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
7
- v5.0.0-next.39 */
8
- async function Se(r, e) {
9
- return await (await we()).colorize(r, e, { tabSize: 2 });
10
- }
11
- async function ht(r, e) {
12
- if (!r)
13
- return;
14
- const n = Array.from(
15
- r.querySelectorAll("code.language-arcade, code.language-sql"),
16
- async (s) => await $e(s, s.textContent, e)
17
- );
18
- await Promise.all(n);
19
- }
20
- async function $e(r, e, n) {
21
- !r || r.tagName !== "CODE" || (r.innerHTML = await Se(e ?? "", n));
22
- }
23
- function pt() {
24
- const e = ie.get(ae).getColorTheme();
25
- return ye(e.tokenTheme.getColorMap());
26
- }
27
- function ut(r) {
28
- return ie.get(ae).onDidColorThemeChange(() => r());
29
- }
3
+ v5.0.0-next.41 */
30
4
  function H() {
31
5
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
32
6
  }
33
- var $ = H();
34
- function oe(r) {
35
- $ = r;
7
+ var R = H();
8
+ function ie(r) {
9
+ R = r;
36
10
  }
37
11
  var _ = { exec: () => null };
38
12
  function p(r, e = "") {
@@ -42,8 +16,8 @@ function p(r, e = "") {
42
16
  }, getRegex: () => new RegExp(n, e) };
43
17
  return s;
44
18
  }
45
- var 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]\] /, listReplaceTask: /^\[[ 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: (r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), htmlBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i") }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ze = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ae = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, N = /(?:[*+-]|\d{1,9}[.)])/, ce = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, he = p(ce).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(ce).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(), Q = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ce = /^[^\n]+/, j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", j).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ie = p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, N).getRegex(), E = "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]*?(?:-->|$))/, ve = 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", E).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), pe = p(Q).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), Le = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", pe).getRegex(), F = { blockquote: Le, code: Te, def: Pe, fences: ze, heading: Ae, hr: C, html: ve, lheading: he, list: Ie, newline: Re, paragraph: pe, table: _, text: Ce }, ee = p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), Ee = { ...F, lheading: _e, table: ee, paragraph: p(Q).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ee).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", E).getRegex() }, qe = { ...F, 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(Q).replace("hr", C).replace("heading", ` *#{1,6} *[^
46
- ]`).replace("lheading", he).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ue = /^( {2,}|\\)\n(?!\s*$)/, Me = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, q = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ge = /[^\s\p{P}\p{S}]/u, De = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ke = /(?!~)[\p{P}\p{S}]/u, Oe = /(?!~)[\s\p{P}\p{S}]/u, He = /(?:[^\s\p{P}\p{S}]|~)/u, Ne = p(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), fe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Qe = p(fe, "u").replace(/punct/g, q).getRegex(), je = p(fe, "u").replace(/punct/g, ke).getRegex(), de = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ge = p(de, "gu").replace(/notPunctSpace/g, ge).replace(/punctSpace/g, W).replace(/punct/g, q).getRegex(), Fe = p(de, "gu").replace(/notPunctSpace/g, He).replace(/punctSpace/g, Oe).replace(/punct/g, ke).getRegex(), We = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ge).replace(/punctSpace/g, W).replace(/punct/g, q).getRegex(), Xe = p(/\\(punct)/, "gu").replace(/punct/g, q).getRegex(), Ue = 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(), Je = p(G).replace("(?:-->|$)", "-->").getRegex(), Ke = 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", Je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), I = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ve = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", I).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xe = p(/^!?\[(label)\]\[(ref)\]/).replace("label", I).replace("ref", j).getRegex(), be = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex(), Ye = p("reflink|nolink(?!\\()", "g").replace("reflink", xe).replace("nolink", be).getRegex(), te = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: _, anyPunctuation: Xe, autolink: Ue, blockSkip: Ne, br: ue, code: Ze, del: _, emStrongLDelim: Qe, emStrongRDelimAst: Ge, emStrongRDelimUnd: We, escape: Be, link: Ve, nolink: be, punctuation: De, reflink: xe, reflinkSearch: Ye, tag: Ke, text: Me, url: _ }, et = { ...X, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", I).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", I).getRegex() }, M = { ...X, emStrongRDelimAst: Fe, emStrongLDelim: je, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", te).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", te).getRegex() }, tt = { ...M, br: p(ue).replace("{2,}", "*").getRegex(), text: p(M.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, P = { normal: F, gfm: Ee, pedantic: qe }, T = { normal: X, gfm: M, breaks: tt, pedantic: et }, rt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, re = (r) => rt[r];
19
+ var 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]\] /, listReplaceTask: /^\[[ 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: (r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), htmlBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i") }, 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|$)|$)/, P = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q = /(?:[*+-]|\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, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), $e = p(ae).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), N = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Re = /^[^\n]+/, j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = 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(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(), B = "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", B).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ce = p(N).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", B).getRegex(), Ae = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ce).getRegex(), F = { blockquote: Ae, code: we, def: Se, fences: me, heading: ye, hr: P, html: ze, lheading: oe, list: Te, newline: be, paragraph: ce, table: _, text: Re }, ee = p("^ *([^\\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", B).getRegex(), _e = { ...F, lheading: $e, table: ee, paragraph: p(N).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ee).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", B).getRegex() }, Pe = { ...F, 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(N).replace("hr", P).replace("heading", ` *#{1,6} *[^
20
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ie = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Le = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, he = /^( {2,}|\\)\n(?!\s*$)/, qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, C = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, pe = /[^\s\p{P}\p{S}]/u, ve = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, Ce = /(?:[^\s\p{P}\p{S}]|~)/u, Ee = p(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ge = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ze = p(ge, "u").replace(/punct/g, C).getRegex(), Me = p(ge, "u").replace(/punct/g, ue).getRegex(), ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = p(ke, "gu").replace(/notPunctSpace/g, pe).replace(/punctSpace/g, W).replace(/punct/g, C).getRegex(), Oe = p(ke, "gu").replace(/notPunctSpace/g, Ce).replace(/punctSpace/g, Be).replace(/punct/g, ue).getRegex(), He = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, pe).replace(/punctSpace/g, W).replace(/punct/g, C).getRegex(), Qe = p(/\\(punct)/, "gu").replace(/punct/g, C).getRegex(), Ne = 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(), je = p(G).replace("(?:-->|$)", "-->").getRegex(), Ge = 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", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), L = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Fe = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", L).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), fe = p(/^!?\[(label)\]\[(ref)\]/).replace("label", L).replace("ref", j).getRegex(), de = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex(), We = p("reflink|nolink(?!\\()", "g").replace("reflink", fe).replace("nolink", de).getRegex(), te = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: _, anyPunctuation: Qe, autolink: Ne, blockSkip: Ee, br: he, code: Le, del: _, emStrongLDelim: Ze, emStrongRDelimAst: De, emStrongRDelimUnd: He, escape: Ie, link: Fe, nolink: de, punctuation: ve, reflink: fe, reflinkSearch: We, tag: Ge, text: qe, url: _ }, Xe = { ...X, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", L).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", L).getRegex() }, M = { ...X, emStrongRDelimAst: Oe, emStrongLDelim: Me, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", te).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", te).getRegex() }, Ue = { ...M, br: p(he).replace("{2,}", "*").getRegex(), text: p(M.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: F, gfm: _e, pedantic: Pe }, T = { normal: X, gfm: M, breaks: Ue, pedantic: Xe }, Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, re = (r) => Je[r];
47
21
  function y(r, e) {
48
22
  if (e) {
49
23
  if (x.escapeTest.test(r)) return r.replace(x.escapeReplace, re);
@@ -77,7 +51,7 @@ function z(r, e, n) {
77
51
  t++;
78
52
  return r.slice(0, s - t);
79
53
  }
80
- function nt(r, e) {
54
+ function Ke(r, e) {
81
55
  if (r.indexOf(e[1]) === -1) return -1;
82
56
  let n = 0;
83
57
  for (let s = 0; s < r.length; s++) if (r[s] === "\\") s++;
@@ -91,7 +65,7 @@ function le(r, e, n, s, t) {
91
65
  let o = { type: r[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: l, text: a, tokens: s.inlineTokens(a) };
92
66
  return s.state.inLink = !1, o;
93
67
  }
94
- function st(r, e, n) {
68
+ function Ve(r, e, n) {
95
69
  let s = r.match(n.other.indentCodeCompensation);
96
70
  if (s === null) return e;
97
71
  let t = s[1];
@@ -104,12 +78,12 @@ function st(r, e, n) {
104
78
  }).join(`
105
79
  `);
106
80
  }
107
- var v = class {
81
+ var q = class {
108
82
  options;
109
83
  rules;
110
84
  lexer;
111
85
  constructor(r) {
112
- this.options = r || $;
86
+ this.options = r || R;
113
87
  }
114
88
  space(r) {
115
89
  let e = this.rules.block.newline.exec(r);
@@ -126,7 +100,7 @@ var v = class {
126
100
  fences(r) {
127
101
  let e = this.rules.block.fences.exec(r);
128
102
  if (e) {
129
- let n = e[0], s = st(n, e[3] || "", this.rules);
103
+ let n = e[0], s = Ve(n, e[3] || "", this.rules);
130
104
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
131
105
  }
132
106
  }
@@ -197,24 +171,24 @@ ${h}` : h;
197
171
  if (!(e = i.exec(r)) || this.rules.block.hr.test(r)) break;
198
172
  c = e[0], r = r.substring(c.length);
199
173
  let u = e[2].split(`
200
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (B) => " ".repeat(3 * B.length)), k = r.split(`
174
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (E) => " ".repeat(3 * E.length)), k = r.split(`
201
175
  `, 1)[0], d = !u.trim(), f = 0;
202
176
  if (this.options.pedantic ? (f = 2, h = u.trimStart()) : d ? f = e[1].length + 1 : (f = e[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, h = u.slice(f), f += e[1].length), d && this.rules.other.blankLine.test(k) && (c += k + `
203
177
  `, r = r.substring(k.length + 1), o = !0), !o) {
204
- let B = this.rules.other.nextBulletRegex(f), K = this.rules.other.hrRegex(f), V = this.rules.other.fencesBeginRegex(f), Y = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f);
178
+ let E = this.rules.other.nextBulletRegex(f), K = this.rules.other.hrRegex(f), V = this.rules.other.fencesBeginRegex(f), Y = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
205
179
  for (; r; ) {
206
180
  let Z = r.split(`
207
- `, 1)[0], R;
208
- if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), R = k) : R = k.replace(this.rules.other.tabCharGlobal, " "), V.test(k) || Y.test(k) || me.test(k) || B.test(k) || K.test(k)) break;
209
- if (R.search(this.rules.other.nonSpaceChar) >= f || !k.trim()) h += `
210
- ` + R.slice(f);
181
+ `, 1)[0], S;
182
+ if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), S = k) : S = k.replace(this.rules.other.tabCharGlobal, " "), V.test(k) || Y.test(k) || xe.test(k) || E.test(k) || K.test(k)) break;
183
+ if (S.search(this.rules.other.nonSpaceChar) >= f || !k.trim()) h += `
184
+ ` + S.slice(f);
211
185
  else {
212
186
  if (d || u.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || V.test(u) || Y.test(u) || K.test(u)) break;
213
187
  h += `
214
188
  ` + k;
215
189
  }
216
190
  !d && !k.trim() && (d = !0), c += Z + `
217
- `, r = r.substring(Z.length + 1), u = R.slice(f);
191
+ `, r = r.substring(Z.length + 1), u = S.slice(f);
218
192
  }
219
193
  }
220
194
  t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(c) && (l = !0));
@@ -289,7 +263,7 @@ ${h}` : h;
289
263
  let i = z(n.slice(0, -1), "\\");
290
264
  if ((n.length - i.length) % 2 === 0) return;
291
265
  } else {
292
- let i = nt(e[2], "()");
266
+ let i = Ke(e[2], "()");
293
267
  if (i === -2) return;
294
268
  if (i > -1) {
295
269
  let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
@@ -384,19 +358,19 @@ ${h}` : h;
384
358
  return { type: "text", raw: e[0], text: e[0], escaped: n };
385
359
  }
386
360
  }
387
- }, m = class D {
361
+ }, w = class D {
388
362
  tokens;
389
363
  options;
390
364
  state;
391
365
  tokenizer;
392
366
  inlineQueue;
393
367
  constructor(e) {
394
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || $, this.options.tokenizer = this.options.tokenizer || new v(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
395
- let n = { other: x, block: P.normal, inline: T.normal };
396
- this.options.pedantic ? (n.block = P.pedantic, n.inline = T.pedantic) : this.options.gfm && (n.block = P.gfm, this.options.breaks ? n.inline = T.breaks : n.inline = T.gfm), this.tokenizer.rules = n;
368
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new q(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
369
+ let n = { other: x, block: I.normal, inline: T.normal };
370
+ this.options.pedantic ? (n.block = I.pedantic, n.inline = T.pedantic) : this.options.gfm && (n.block = I.gfm, this.options.breaks ? n.inline = T.breaks : n.inline = T.gfm), this.tokenizer.rules = n;
397
371
  }
398
372
  static get rules() {
399
- return { block: P, inline: T };
373
+ return { block: I, inline: T };
400
374
  }
401
375
  static lex(e, n) {
402
376
  return new D(n).lex(e);
@@ -590,11 +564,11 @@ ${h}` : h;
590
564
  }
591
565
  return n;
592
566
  }
593
- }, L = class {
567
+ }, v = class {
594
568
  options;
595
569
  parser;
596
570
  constructor(r) {
597
- this.options = r || $;
571
+ this.options = r || R;
598
572
  }
599
573
  space(r) {
600
574
  return "";
@@ -740,12 +714,12 @@ ${r}</tr>
740
714
  br() {
741
715
  return "";
742
716
  }
743
- }, w = class O {
717
+ }, m = class O {
744
718
  options;
745
719
  renderer;
746
720
  textRenderer;
747
721
  constructor(e) {
748
- this.options = e || $, this.options.renderer = this.options.renderer || new L(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new U();
722
+ this.options = e || R, this.options.renderer = this.options.renderer || new v(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new U();
749
723
  }
750
724
  static parse(e, n) {
751
725
  return new O(n).parse(e);
@@ -888,7 +862,7 @@ ${r}</tr>
888
862
  options;
889
863
  block;
890
864
  constructor(r) {
891
- this.options = r || $;
865
+ this.options = r || R;
892
866
  }
893
867
  static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
894
868
  static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
@@ -905,21 +879,21 @@ ${r}</tr>
905
879
  return r;
906
880
  }
907
881
  provideLexer() {
908
- return this.block ? m.lex : m.lexInline;
882
+ return this.block ? w.lex : w.lexInline;
909
883
  }
910
884
  provideParser() {
911
- return this.block ? w.parse : w.parseInline;
885
+ return this.block ? m.parse : m.parseInline;
912
886
  }
913
- }, lt = class {
887
+ }, Ye = class {
914
888
  defaults = H();
915
889
  options = this.setOptions;
916
890
  parse = this.parseMarkdown(!0);
917
891
  parseInline = this.parseMarkdown(!1);
918
- Parser = w;
919
- Renderer = L;
892
+ Parser = m;
893
+ Renderer = v;
920
894
  TextRenderer = U;
921
- Lexer = m;
922
- Tokenizer = v;
895
+ Lexer = w;
896
+ Tokenizer = q;
923
897
  Hooks = A;
924
898
  constructor(...r) {
925
899
  this.use(...r);
@@ -968,7 +942,7 @@ ${r}</tr>
968
942
  }
969
943
  "childTokens" in t && t.childTokens && (e.childTokens[t.name] = t.childTokens);
970
944
  }), s.extensions = e), n.renderer) {
971
- let t = this.defaults.renderer || new L(this.defaults);
945
+ let t = this.defaults.renderer || new v(this.defaults);
972
946
  for (let i in n.renderer) {
973
947
  if (!(i in t)) throw new Error(`renderer '${i}' does not exist`);
974
948
  if (["options", "parser"].includes(i)) continue;
@@ -981,7 +955,7 @@ ${r}</tr>
981
955
  s.renderer = t;
982
956
  }
983
957
  if (n.tokenizer) {
984
- let t = this.defaults.tokenizer || new v(this.defaults);
958
+ let t = this.defaults.tokenizer || new q(this.defaults);
985
959
  for (let i in n.tokenizer) {
986
960
  if (!(i in t)) throw new Error(`tokenizer '${i}' does not exist`);
987
961
  if (["options", "rules", "lexer"].includes(i)) continue;
@@ -1031,10 +1005,10 @@ ${r}</tr>
1031
1005
  return this.defaults = { ...this.defaults, ...r }, this;
1032
1006
  }
1033
1007
  lexer(r, e) {
1034
- return m.lex(r, e ?? this.defaults);
1008
+ return w.lex(r, e ?? this.defaults);
1035
1009
  }
1036
1010
  parser(r, e) {
1037
- return w.parse(r, e ?? this.defaults);
1011
+ return m.parse(r, e ?? this.defaults);
1038
1012
  }
1039
1013
  parseMarkdown(r) {
1040
1014
  return (e, n) => {
@@ -1043,16 +1017,16 @@ ${r}</tr>
1043
1017
  if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
1044
1018
  if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1045
1019
  if (t.hooks && (t.hooks.options = t, t.hooks.block = r), t.async) return (async () => {
1046
- let l = t.hooks ? await t.hooks.preprocess(e) : e, a = await (t.hooks ? await t.hooks.provideLexer() : r ? m.lex : m.lexInline)(l, t), o = t.hooks ? await t.hooks.processAllTokens(a) : a;
1020
+ let l = t.hooks ? await t.hooks.preprocess(e) : e, a = await (t.hooks ? await t.hooks.provideLexer() : r ? w.lex : w.lexInline)(l, t), o = t.hooks ? await t.hooks.processAllTokens(a) : a;
1047
1021
  t.walkTokens && await Promise.all(this.walkTokens(o, t.walkTokens));
1048
- let c = await (t.hooks ? await t.hooks.provideParser() : r ? w.parse : w.parseInline)(o, t);
1022
+ let c = await (t.hooks ? await t.hooks.provideParser() : r ? m.parse : m.parseInline)(o, t);
1049
1023
  return t.hooks ? await t.hooks.postprocess(c) : c;
1050
1024
  })().catch(i);
1051
1025
  try {
1052
1026
  t.hooks && (e = t.hooks.preprocess(e));
1053
- let l = (t.hooks ? t.hooks.provideLexer() : r ? m.lex : m.lexInline)(e, t);
1027
+ let l = (t.hooks ? t.hooks.provideLexer() : r ? w.lex : w.lexInline)(e, t);
1054
1028
  t.hooks && (l = t.hooks.processAllTokens(l)), t.walkTokens && this.walkTokens(l, t.walkTokens);
1055
- let a = (t.hooks ? t.hooks.provideParser() : r ? w.parse : w.parseInline)(l, t);
1029
+ let a = (t.hooks ? t.hooks.provideParser() : r ? m.parse : m.parseInline)(l, t);
1056
1030
  return t.hooks && (a = t.hooks.postprocess(a)), a;
1057
1031
  } catch (l) {
1058
1032
  return i(l);
@@ -1070,29 +1044,29 @@ Please report this to https://github.com/markedjs/marked.`, r) {
1070
1044
  throw n;
1071
1045
  };
1072
1046
  }
1073
- }, S = new lt();
1047
+ }, $ = new Ye();
1074
1048
  function g(r, e) {
1075
- return S.parse(r, e);
1049
+ return $.parse(r, e);
1076
1050
  }
1077
1051
  g.options = g.setOptions = function(r) {
1078
- return S.setOptions(r), g.defaults = S.defaults, oe(g.defaults), g;
1052
+ return $.setOptions(r), g.defaults = $.defaults, ie(g.defaults), g;
1079
1053
  };
1080
1054
  g.getDefaults = H;
1081
- g.defaults = $;
1055
+ g.defaults = R;
1082
1056
  g.use = function(...r) {
1083
- return S.use(...r), g.defaults = S.defaults, oe(g.defaults), g;
1057
+ return $.use(...r), g.defaults = $.defaults, ie(g.defaults), g;
1084
1058
  };
1085
1059
  g.walkTokens = function(r, e) {
1086
- return S.walkTokens(r, e);
1060
+ return $.walkTokens(r, e);
1087
1061
  };
1088
- g.parseInline = S.parseInline;
1089
- g.Parser = w;
1090
- g.parser = w.parse;
1091
- g.Renderer = L;
1062
+ g.parseInline = $.parseInline;
1063
+ g.Parser = m;
1064
+ g.parser = m.parse;
1065
+ g.Renderer = v;
1092
1066
  g.TextRenderer = U;
1093
- g.Lexer = m;
1094
- g.lexer = m.lex;
1095
- g.Tokenizer = v;
1067
+ g.Lexer = w;
1068
+ g.lexer = w.lex;
1069
+ g.Tokenizer = q;
1096
1070
  g.Hooks = A;
1097
1071
  g.parse = g;
1098
1072
  g.options;
@@ -1100,8 +1074,8 @@ g.setOptions;
1100
1074
  g.use;
1101
1075
  g.walkTokens;
1102
1076
  g.parseInline;
1103
- w.parse;
1104
- m.lex;
1077
+ m.parse;
1078
+ w.lex;
1105
1079
  g.use({
1106
1080
  gfm: !0,
1107
1081
  breaks: !0,
@@ -1110,16 +1084,15 @@ g.use({
1110
1084
  link({ href: r, title: e, tokens: n }) {
1111
1085
  const s = this.parser.parseInline(n);
1112
1086
  return `<calcite-link href="${r}" title="${e ?? s}" target="Arcade Help">${s}</calcite-link>`;
1087
+ },
1088
+ code({ lang: r, text: e }) {
1089
+ return `<arcgis-code-viewer language="${r === "sql" ? "arcgis-sql-expression" : r}">${e}</arcgis-code-viewer>`;
1113
1090
  }
1114
1091
  }
1115
1092
  });
1116
- function gt(r) {
1093
+ function et(r) {
1117
1094
  return r == null ? "" : g.parse(typeof r == "string" ? r : r.value, { async: !1 });
1118
1095
  }
1119
1096
  export {
1120
- ht as a,
1121
- $e as b,
1122
- gt as c,
1123
- pt as g,
1124
- ut as o
1097
+ et as c
1125
1098
  };
@@ -1,103 +1,18 @@
1
- import { createFilterExpression as f } from "@arcgis/toolkit/string";
2
- import { format as p } from "@arcgis/arcade-languageservice";
3
1
  import "monaco-editor";
4
2
  import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
5
3
  import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
6
4
  import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
7
5
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
6
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
9
- v5.0.0-next.39 */
10
- function $(e, n, l, i) {
11
- if (!n)
12
- return [];
13
- const t = Array.isArray(n) ? n : [n];
14
- if (!t.length)
15
- return [];
16
- const m = f(l);
17
- return e.filter((o) => t.some((a) => m.test(String(o[a] ?? ""))));
18
- }
19
- function E(e) {
20
- return e ? `${e.portal.url}/home/item.html?id=${e.id}` : "";
21
- }
22
- function M(e, n, l = "add", i) {
23
- if (!e)
24
- return;
25
- const t = e.getSelection(), m = t && (t.startLineNumber !== t.endLineNumber || t.startColumn !== t.endColumn);
26
- let o = [];
27
- const a = e.getValue() ?? "";
28
- if (l === "replace") {
29
- const u = `${i}
30
- ${n}`, s = e.getModel(), r = s?.getLineCount() ?? 1, c = s?.getLineMaxColumn(r) ?? 1;
31
- o = [
32
- {
33
- range: {
34
- startLineNumber: 1,
35
- startColumn: 1,
36
- endLineNumber: r,
37
- endColumn: c
38
- },
39
- text: u
40
- }
41
- ];
42
- } else {
43
- const u = m ? {
44
- startLineNumber: t.startLineNumber,
45
- startColumn: t.startColumn,
46
- endLineNumber: t.endLineNumber,
47
- endColumn: t.endColumn
48
- } : (() => {
49
- const r = e.getPosition();
50
- return {
51
- startLineNumber: r?.lineNumber ?? 1,
52
- startColumn: r?.column ?? 1,
53
- endLineNumber: r?.lineNumber ?? 1,
54
- endColumn: r?.column ?? 1
55
- };
56
- })();
57
- let s = !1;
58
- if (i) {
59
- const r = i.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
60
- s = !new RegExp(`^\\s*${r}\\s*$`, "mu").test(a);
61
- }
62
- s && o.push({
63
- range: {
64
- startLineNumber: 1,
65
- startColumn: 1,
66
- endLineNumber: 1,
67
- endColumn: 1
68
- },
69
- text: `${i}
70
- `
71
- }), o.push({
72
- range: u,
73
- text: n
74
- });
75
- }
76
- try {
77
- e.pushUndoStop(), e.executeEdits("insertText", o), e.pushUndoStop(), e.focus();
78
- } catch (u) {
79
- console.error("Failed to edit model:", u);
80
- }
81
- }
82
- function R(e) {
83
- try {
84
- return p(e);
85
- } catch {
86
- return e;
87
- }
88
- }
89
- const g = async () => {
90
- const { editor: e } = await import("monaco-editor/esm/vs/editor/editor.api.js");
91
- return e;
7
+ v5.0.0-next.41 */
8
+ const r = async () => {
9
+ const { editor: t } = await import("monaco-editor/esm/vs/editor/editor.api.js");
10
+ return t;
92
11
  };
93
- let d = null;
94
- async function S() {
95
- return d ??= g(), await d;
12
+ let o = null;
13
+ async function c() {
14
+ return o ??= r(), await o;
96
15
  }
97
16
  export {
98
- R as a,
99
- M as e,
100
- $ as f,
101
- S as i,
102
- E as p
17
+ c as i
103
18
  };
@@ -3,7 +3,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
3
3
  import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
4
4
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
6
- v5.0.0-next.39 */
6
+ v5.0.0-next.41 */
7
7
  const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
8
8
  t.t = s;
9
9
  t.o = r;
@@ -4,7 +4,7 @@ import { fetchT9nStringsBundle as M } from "@arcgis/toolkit/intl";
4
4
  import { g as b } from "./runtime.js";
5
5
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
6
6
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
7
- v5.0.0-next.39 */
7
+ v5.0.0-next.41 */
8
8
  const x = (r) => {
9
9
  const e = r.variables[0], i = e && e.type === "featureSet" ? A(e) : void 0, { apiVersion: t, bundles: o, hiddenApiItems: s } = r.toEditorProfileDefinition();
10
10
  return {
@@ -9,7 +9,7 @@ import { debounce as N } from "@arcgis/toolkit/function";
9
9
  import { g as f } from "./sql-expr-service-accessors.js";
10
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
12
- v5.0.0-next.39 */
12
+ v5.0.0-next.41 */
13
13
  let h = new _();
14
14
  class k {
15
15
  constructor(e) {
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.39 */
3
+ v5.0.0-next.41 */
4
4
  async function t() {
5
5
  return await import("./sql-expr-mode.js");
6
6
  }
@@ -2,7 +2,7 @@ import { makeT9nController as o } from "@arcgis/lumina/controllers";
2
2
  import { g as t } from "./runtime.js";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
5
- v5.0.0-next.39 */
5
+ v5.0.0-next.41 */
6
6
  const s = o(t);
7
7
  export {
8
8
  s as u