@touchvue/chat 1.0.0-beta.1

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 (876) hide show
  1. package/README.md +70 -0
  2. package/es/_virtual/_commonjsHelpers.mjs +6 -0
  3. package/es/_virtual/_commonjsHelpers.mjs.map +1 -0
  4. package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  5. package/es/_virtual/_plugin-vue_export-helper.mjs.map +1 -0
  6. package/es/_virtual/emphasis.mjs +4 -0
  7. package/es/_virtual/emphasis.mjs.map +1 -0
  8. package/es/_virtual/html_re.mjs +4 -0
  9. package/es/_virtual/html_re.mjs.map +1 -0
  10. package/es/_virtual/index.mjs +4 -0
  11. package/es/_virtual/index.mjs.map +1 -0
  12. package/es/_virtual/index2.mjs +4 -0
  13. package/es/_virtual/index2.mjs.map +1 -0
  14. package/es/_virtual/index3.mjs +4 -0
  15. package/es/_virtual/index3.mjs.map +1 -0
  16. package/es/_virtual/strikethrough.mjs +4 -0
  17. package/es/_virtual/strikethrough.mjs.map +1 -0
  18. package/es/_virtual/utils.mjs +4 -0
  19. package/es/_virtual/utils.mjs.map +1 -0
  20. package/es/assets/Avatar-AI-8c9ec26060b39bf7.png +0 -0
  21. package/es/assets/bgimage-ef345ea032b1fc13.png +0 -0
  22. package/es/assets/icon-ac4086674fbfd358.png +0 -0
  23. package/es/assets/link-45d328ddcc34e562.png +0 -0
  24. package/es/index.d.ts +9 -0
  25. package/es/index.mjs +30 -0
  26. package/es/index.mjs.map +1 -0
  27. package/es/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.mjs +4253 -0
  28. package/es/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.mjs.map +1 -0
  29. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.mjs +2524 -0
  30. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.mjs.map +1 -0
  31. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.mjs +120 -0
  32. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.mjs.map +1 -0
  33. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.mjs +201 -0
  34. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.mjs.map +1 -0
  35. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.mjs +176 -0
  36. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.mjs.map +1 -0
  37. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.mjs +508 -0
  38. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.mjs.map +1 -0
  39. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.mjs +316 -0
  40. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.mjs.map +1 -0
  41. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.mjs +471 -0
  42. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.mjs.map +1 -0
  43. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.mjs +448 -0
  44. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.mjs.map +1 -0
  45. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.mjs +615 -0
  46. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.mjs.map +1 -0
  47. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.mjs +278 -0
  48. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.mjs.map +1 -0
  49. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.mjs +206 -0
  50. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.mjs.map +1 -0
  51. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.mjs +133 -0
  52. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.mjs.map +1 -0
  53. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.mjs +93 -0
  54. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.mjs.map +1 -0
  55. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.mjs +206 -0
  56. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.mjs.map +1 -0
  57. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.mjs +166 -0
  58. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.mjs.map +1 -0
  59. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.mjs +93 -0
  60. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.mjs.map +1 -0
  61. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.mjs +81 -0
  62. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.mjs.map +1 -0
  63. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.mjs +181 -0
  64. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.mjs.map +1 -0
  65. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.mjs +331 -0
  66. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.mjs.map +1 -0
  67. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.mjs +180 -0
  68. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.mjs.map +1 -0
  69. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.mjs +359 -0
  70. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.mjs.map +1 -0
  71. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.mjs +180 -0
  72. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.mjs.map +1 -0
  73. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.mjs +188 -0
  74. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.mjs.map +1 -0
  75. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.mjs +70 -0
  76. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.mjs.map +1 -0
  77. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.mjs +57 -0
  78. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.mjs.map +1 -0
  79. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.mjs +423 -0
  80. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.mjs.map +1 -0
  81. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.mjs +291 -0
  82. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.mjs.map +1 -0
  83. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.mjs +118 -0
  84. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.mjs.map +1 -0
  85. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.mjs +89 -0
  86. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.mjs.map +1 -0
  87. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.mjs +113 -0
  88. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.mjs.map +1 -0
  89. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.mjs +128 -0
  90. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.mjs.map +1 -0
  91. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.mjs +522 -0
  92. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.mjs.map +1 -0
  93. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.mjs +211 -0
  94. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.mjs.map +1 -0
  95. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.mjs +338 -0
  96. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.mjs.map +1 -0
  97. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.mjs +109 -0
  98. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.mjs.map +1 -0
  99. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.mjs +453 -0
  100. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.mjs.map +1 -0
  101. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.mjs +238 -0
  102. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.mjs.map +1 -0
  103. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.mjs +394 -0
  104. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.mjs.map +1 -0
  105. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.mjs +153 -0
  106. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.mjs.map +1 -0
  107. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.mjs +140 -0
  108. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.mjs.map +1 -0
  109. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.mjs +147 -0
  110. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.mjs.map +1 -0
  111. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.mjs +214 -0
  112. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.mjs.map +1 -0
  113. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.mjs +37 -0
  114. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.mjs.map +1 -0
  115. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.mjs +706 -0
  116. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.mjs.map +1 -0
  117. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.mjs +880 -0
  118. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.mjs.map +1 -0
  119. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.mjs +704 -0
  120. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.mjs.map +1 -0
  121. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.mjs +31 -0
  122. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.mjs.map +1 -0
  123. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.mjs +116 -0
  124. package/es/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.mjs.map +1 -0
  125. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.mjs +638 -0
  126. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.mjs.map +1 -0
  127. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.mjs +196 -0
  128. package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.mjs.map +1 -0
  129. package/es/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs +146 -0
  130. package/es/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs.map +1 -0
  131. package/es/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs +142 -0
  132. package/es/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs.map +1 -0
  133. package/es/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs +206 -0
  134. package/es/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs.map +1 -0
  135. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.mjs +24 -0
  136. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.mjs.map +1 -0
  137. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.mjs +1909 -0
  138. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.mjs.map +1 -0
  139. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.mjs +45 -0
  140. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.mjs.map +1 -0
  141. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.mjs +18 -0
  142. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.mjs.map +1 -0
  143. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.mjs +61 -0
  144. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.mjs.map +1 -0
  145. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.mjs +6 -0
  146. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.mjs.map +1 -0
  147. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.mjs +88 -0
  148. package/es/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.mjs.map +1 -0
  149. package/es/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs +355 -0
  150. package/es/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs.map +1 -0
  151. package/es/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs +126 -0
  152. package/es/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs.map +1 -0
  153. package/es/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs +126 -0
  154. package/es/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs.map +1 -0
  155. package/es/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs +63 -0
  156. package/es/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs.map +1 -0
  157. package/es/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs +63 -0
  158. package/es/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs.map +1 -0
  159. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.mjs +9 -0
  160. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.mjs.map +1 -0
  161. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.mjs +7 -0
  162. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.mjs.map +1 -0
  163. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.mjs +67 -0
  164. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.mjs.map +1 -0
  165. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.mjs +29 -0
  166. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.mjs.map +1 -0
  167. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.mjs +324 -0
  168. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.mjs.map +1 -0
  169. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.mjs +11 -0
  170. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.mjs.map +1 -0
  171. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +83 -0
  172. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +1 -0
  173. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +44 -0
  174. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +1 -0
  175. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +56 -0
  176. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +1 -0
  177. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.mjs +596 -0
  178. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.mjs.map +1 -0
  179. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.mjs +138 -0
  180. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.mjs.map +1 -0
  181. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.mjs +69 -0
  182. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.mjs.map +1 -0
  183. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
  184. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.mjs.map +1 -0
  185. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.mjs +78 -0
  186. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.mjs.map +1 -0
  187. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.mjs +39 -0
  188. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.mjs.map +1 -0
  189. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.mjs +59 -0
  190. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.mjs.map +1 -0
  191. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.mjs +346 -0
  192. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.mjs.map +1 -0
  193. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.mjs +354 -0
  194. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.mjs.map +1 -0
  195. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.mjs +286 -0
  196. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +1 -0
  197. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.mjs +32 -0
  198. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.mjs.map +1 -0
  199. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.mjs +96 -0
  200. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.mjs.map +1 -0
  201. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.mjs +57 -0
  202. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.mjs.map +1 -0
  203. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.mjs +47 -0
  204. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.mjs.map +1 -0
  205. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.mjs +76 -0
  206. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +1 -0
  207. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.mjs +81 -0
  208. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +1 -0
  209. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.mjs +366 -0
  210. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.mjs.map +1 -0
  211. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.mjs +50 -0
  212. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +1 -0
  213. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.mjs +197 -0
  214. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.mjs.map +1 -0
  215. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.mjs +234 -0
  216. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +1 -0
  217. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.mjs +223 -0
  218. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.mjs.map +1 -0
  219. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.mjs +16 -0
  220. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.mjs.map +1 -0
  221. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.mjs +14 -0
  222. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.mjs.map +1 -0
  223. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.mjs +132 -0
  224. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +1 -0
  225. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.mjs +19 -0
  226. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +1 -0
  227. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.mjs +97 -0
  228. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +1 -0
  229. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +202 -0
  230. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +1 -0
  231. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.mjs +21 -0
  232. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +1 -0
  233. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.mjs +74 -0
  234. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +1 -0
  235. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.mjs +61 -0
  236. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +1 -0
  237. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +128 -0
  238. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +1 -0
  239. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +130 -0
  240. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +1 -0
  241. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.mjs +51 -0
  242. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +1 -0
  243. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.mjs +54 -0
  244. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +1 -0
  245. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +48 -0
  246. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +1 -0
  247. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.mjs +154 -0
  248. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.mjs.map +1 -0
  249. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.mjs +150 -0
  250. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.mjs.map +1 -0
  251. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.mjs +48 -0
  252. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +1 -0
  253. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +156 -0
  254. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +1 -0
  255. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +130 -0
  256. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +1 -0
  257. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.mjs +56 -0
  258. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.mjs.map +1 -0
  259. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.mjs +33 -0
  260. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.mjs.map +1 -0
  261. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.mjs +199 -0
  262. package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.mjs.map +1 -0
  263. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.mjs +121 -0
  264. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.mjs.map +1 -0
  265. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.mjs +97 -0
  266. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.mjs.map +1 -0
  267. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.mjs +24 -0
  268. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.mjs.map +1 -0
  269. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.mjs +13 -0
  270. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.mjs.map +1 -0
  271. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.mjs +292 -0
  272. package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.mjs.map +1 -0
  273. package/es/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.mjs +136 -0
  274. package/es/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.mjs.map +1 -0
  275. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.mjs +12 -0
  276. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.mjs.map +1 -0
  277. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.mjs +12 -0
  278. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.mjs.map +1 -0
  279. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.mjs +4 -0
  280. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.mjs.map +1 -0
  281. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.mjs +12 -0
  282. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.mjs.map +1 -0
  283. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.mjs +23 -0
  284. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.mjs.map +1 -0
  285. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.mjs +12 -0
  286. package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.mjs.map +1 -0
  287. package/es/package.json.css +1 -0
  288. package/es/package.json.mjs +101 -0
  289. package/es/package.json.mjs.map +1 -0
  290. package/es/packages/components/index.mjs +3 -0
  291. package/es/packages/components/index.mjs.map +1 -0
  292. package/es/packages/components/package.json.mjs +36 -0
  293. package/es/packages/components/package.json.mjs.map +1 -0
  294. package/es/packages/components/resolver.mjs +31 -0
  295. package/es/packages/components/resolver.mjs.map +1 -0
  296. package/es/packages/components/touchchat/component/CardView.vue.mjs +7 -0
  297. package/es/packages/components/touchchat/component/CardView.vue.mjs.map +1 -0
  298. package/es/packages/components/touchchat/component/CardView.vue2.mjs +135 -0
  299. package/es/packages/components/touchchat/component/CardView.vue2.mjs.map +1 -0
  300. package/es/packages/components/touchchat/component/FileView.vue.mjs +7 -0
  301. package/es/packages/components/touchchat/component/FileView.vue.mjs.map +1 -0
  302. package/es/packages/components/touchchat/component/FileView.vue2.mjs +62 -0
  303. package/es/packages/components/touchchat/component/FileView.vue2.mjs.map +1 -0
  304. package/es/packages/components/touchchat/component/HelloChat.vue.mjs +7 -0
  305. package/es/packages/components/touchchat/component/HelloChat.vue.mjs.map +1 -0
  306. package/es/packages/components/touchchat/component/HelloChat.vue2.mjs +58 -0
  307. package/es/packages/components/touchchat/component/HelloChat.vue2.mjs.map +1 -0
  308. package/es/packages/components/touchchat/component/ImageView.vue.mjs +7 -0
  309. package/es/packages/components/touchchat/component/ImageView.vue.mjs.map +1 -0
  310. package/es/packages/components/touchchat/component/ImageView.vue2.mjs +31 -0
  311. package/es/packages/components/touchchat/component/ImageView.vue2.mjs.map +1 -0
  312. package/es/packages/components/touchchat/component/LinkView.vue.mjs +7 -0
  313. package/es/packages/components/touchchat/component/LinkView.vue.mjs.map +1 -0
  314. package/es/packages/components/touchchat/component/LinkView.vue2.mjs +75 -0
  315. package/es/packages/components/touchchat/component/LinkView.vue2.mjs.map +1 -0
  316. package/es/packages/components/touchchat/img/AI.png.mjs +4 -0
  317. package/es/packages/components/touchchat/img/AI.png.mjs.map +1 -0
  318. package/es/packages/components/touchchat/img/asir.png.mjs +4 -0
  319. package/es/packages/components/touchchat/img/asir.png.mjs.map +1 -0
  320. package/es/packages/components/touchchat/img/bgimage.png.mjs +4 -0
  321. package/es/packages/components/touchchat/img/bgimage.png.mjs.map +1 -0
  322. package/es/packages/components/touchchat/img/file.png.mjs +4 -0
  323. package/es/packages/components/touchchat/img/file.png.mjs.map +1 -0
  324. package/es/packages/components/touchchat/img/link.png.mjs +4 -0
  325. package/es/packages/components/touchchat/img/link.png.mjs.map +1 -0
  326. package/es/packages/components/touchchat/index.mjs +9 -0
  327. package/es/packages/components/touchchat/index.mjs.map +1 -0
  328. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs +7 -0
  329. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs.map +1 -0
  330. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs +342 -0
  331. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs.map +1 -0
  332. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs +7 -0
  333. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs.map +1 -0
  334. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs +182 -0
  335. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs.map +1 -0
  336. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs +7 -0
  337. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs.map +1 -0
  338. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs +450 -0
  339. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs.map +1 -0
  340. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs +7 -0
  341. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs.map +1 -0
  342. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs +105 -0
  343. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs.map +1 -0
  344. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs +7 -0
  345. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs.map +1 -0
  346. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs +267 -0
  347. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs.map +1 -0
  348. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs +7 -0
  349. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs.map +1 -0
  350. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs +843 -0
  351. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs.map +1 -0
  352. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs +7 -0
  353. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs.map +1 -0
  354. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs +212 -0
  355. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs.map +1 -0
  356. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs +7 -0
  357. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs.map +1 -0
  358. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs +133 -0
  359. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs.map +1 -0
  360. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue.mjs +7 -0
  361. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue.mjs.map +1 -0
  362. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.mjs +632 -0
  363. package/es/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.mjs.map +1 -0
  364. package/es/packages/components/touchchat/src/AiRobot/Content.vue.mjs +7 -0
  365. package/es/packages/components/touchchat/src/AiRobot/Content.vue.mjs.map +1 -0
  366. package/es/packages/components/touchchat/src/AiRobot/Content.vue2.mjs +263 -0
  367. package/es/packages/components/touchchat/src/AiRobot/Content.vue2.mjs.map +1 -0
  368. package/es/packages/components/touchchat/src/AiRobot/Header.vue.mjs +7 -0
  369. package/es/packages/components/touchchat/src/AiRobot/Header.vue.mjs.map +1 -0
  370. package/es/packages/components/touchchat/src/AiRobot/Header.vue2.mjs +197 -0
  371. package/es/packages/components/touchchat/src/AiRobot/Header.vue2.mjs.map +1 -0
  372. package/es/packages/components/touchchat/src/AiRobot/Input.vue.mjs +7 -0
  373. package/es/packages/components/touchchat/src/AiRobot/Input.vue.mjs.map +1 -0
  374. package/es/packages/components/touchchat/src/AiRobot/Input.vue2.mjs +67 -0
  375. package/es/packages/components/touchchat/src/AiRobot/Input.vue2.mjs.map +1 -0
  376. package/es/packages/components/touchchat/src/AiRobot/Scene.vue.mjs +7 -0
  377. package/es/packages/components/touchchat/src/AiRobot/Scene.vue.mjs.map +1 -0
  378. package/es/packages/components/touchchat/src/AiRobot/Scene.vue2.mjs +48 -0
  379. package/es/packages/components/touchchat/src/AiRobot/Scene.vue2.mjs.map +1 -0
  380. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.mjs +7 -0
  381. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.mjs.map +1 -0
  382. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.mjs +267 -0
  383. package/es/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.mjs.map +1 -0
  384. package/es/packages/components/touchchat/src/AiRobot/component/face.vue.mjs +7 -0
  385. package/es/packages/components/touchchat/src/AiRobot/component/face.vue.mjs.map +1 -0
  386. package/es/packages/components/touchchat/src/AiRobot/component/face.vue2.mjs +89 -0
  387. package/es/packages/components/touchchat/src/AiRobot/component/face.vue2.mjs.map +1 -0
  388. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue.mjs +7 -0
  389. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue.mjs.map +1 -0
  390. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue2.mjs +64 -0
  391. package/es/packages/components/touchchat/src/AiRobot/component/letter.vue2.mjs.map +1 -0
  392. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.mjs +7 -0
  393. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.mjs.map +1 -0
  394. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.mjs +36 -0
  395. package/es/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.mjs.map +1 -0
  396. package/es/packages/components/touchchat/src/AiRobot/component/start.vue.mjs +7 -0
  397. package/es/packages/components/touchchat/src/AiRobot/component/start.vue.mjs.map +1 -0
  398. package/es/packages/components/touchchat/src/AiRobot/component/start.vue2.mjs +36 -0
  399. package/es/packages/components/touchchat/src/AiRobot/component/start.vue2.mjs.map +1 -0
  400. package/es/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.mjs +4 -0
  401. package/es/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.mjs.map +1 -0
  402. package/es/packages/components/touchchat/src/AiRobot/img/icon.png.mjs +4 -0
  403. package/es/packages/components/touchchat/src/AiRobot/img/icon.png.mjs.map +1 -0
  404. package/es/packages/components/touchchat/src/AiRobot/index.vue.mjs +7 -0
  405. package/es/packages/components/touchchat/src/AiRobot/index.vue.mjs.map +1 -0
  406. package/es/packages/components/touchchat/src/AiRobot/index.vue2.mjs +81 -0
  407. package/es/packages/components/touchchat/src/AiRobot/index.vue2.mjs.map +1 -0
  408. package/es/packages/components/touchchat/src/index.vue.mjs +7 -0
  409. package/es/packages/components/touchchat/src/index.vue.mjs.map +1 -0
  410. package/es/packages/components/touchchat/src/index.vue2.mjs +147 -0
  411. package/es/packages/components/touchchat/src/index.vue2.mjs.map +1 -0
  412. package/es/packages/components/touchchat/utils/chatRobot.mjs +111 -0
  413. package/es/packages/components/touchchat/utils/chatRobot.mjs.map +1 -0
  414. package/es/packages/components/touchchat/utils/deepCloneDom.mjs +59 -0
  415. package/es/packages/components/touchchat/utils/deepCloneDom.mjs.map +1 -0
  416. package/es/packages/components/touchchat/utils/fetchStream.mjs +103 -0
  417. package/es/packages/components/touchchat/utils/fetchStream.mjs.map +1 -0
  418. package/es/packages/components/touchchat/utils/hight-it.mjs +114 -0
  419. package/es/packages/components/touchchat/utils/hight-it.mjs.map +1 -0
  420. package/es/packages/components/touchchat/utils/markdown.mjs +42 -0
  421. package/es/packages/components/touchchat/utils/markdown.mjs.map +1 -0
  422. package/es/packages/components/touchchat/utils/socket.mjs +196 -0
  423. package/es/packages/components/touchchat/utils/socket.mjs.map +1 -0
  424. package/es/packages/components/touchchat/utils/tools.mjs +74 -0
  425. package/es/packages/components/touchchat/utils/tools.mjs.map +1 -0
  426. package/es/packages/components/touchchat/utils/uuid.mjs +15 -0
  427. package/es/packages/components/touchchat/utils/uuid.mjs.map +1 -0
  428. package/es/packages/utils/config.mjs +18 -0
  429. package/es/packages/utils/config.mjs.map +1 -0
  430. package/es/packages/utils/index.mjs +3 -0
  431. package/es/packages/utils/index.mjs.map +1 -0
  432. package/es/packages/utils/package.json.mjs +36 -0
  433. package/es/packages/utils/package.json.mjs.map +1 -0
  434. package/es/packages/utils/types.mjs +23 -0
  435. package/es/packages/utils/types.mjs.map +1 -0
  436. package/global.d.ts +9 -0
  437. package/lib/_virtual/_commonjsHelpers.js +8 -0
  438. package/lib/_virtual/_commonjsHelpers.js.map +1 -0
  439. package/lib/_virtual/_plugin-vue_export-helper.js +14 -0
  440. package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
  441. package/lib/_virtual/emphasis.js +6 -0
  442. package/lib/_virtual/emphasis.js.map +1 -0
  443. package/lib/_virtual/html_re.js +6 -0
  444. package/lib/_virtual/html_re.js.map +1 -0
  445. package/lib/_virtual/index.js +6 -0
  446. package/lib/_virtual/index.js.map +1 -0
  447. package/lib/_virtual/index2.js +6 -0
  448. package/lib/_virtual/index2.js.map +1 -0
  449. package/lib/_virtual/index3.js +6 -0
  450. package/lib/_virtual/index3.js.map +1 -0
  451. package/lib/_virtual/strikethrough.js +6 -0
  452. package/lib/_virtual/strikethrough.js.map +1 -0
  453. package/lib/_virtual/utils.js +6 -0
  454. package/lib/_virtual/utils.js.map +1 -0
  455. package/lib/assets/Avatar-AI-8c9ec26060b39bf7.png +0 -0
  456. package/lib/assets/bgimage-ef345ea032b1fc13.png +0 -0
  457. package/lib/assets/icon-ac4086674fbfd358.png +0 -0
  458. package/lib/assets/link-45d328ddcc34e562.png +0 -0
  459. package/lib/index.d.ts +9 -0
  460. package/lib/index.js +36 -0
  461. package/lib/index.js.map +1 -0
  462. package/lib/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.js +6380 -0
  463. package/lib/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.js.map +1 -0
  464. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.js +2528 -0
  465. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/core.js.map +1 -0
  466. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.js +124 -0
  467. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/actionscript.js.map +1 -0
  468. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.js +205 -0
  469. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ada.js.map +1 -0
  470. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.js +180 -0
  471. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/bash.js.map +1 -0
  472. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.js +512 -0
  473. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c-like.js.map +1 -0
  474. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.js +320 -0
  475. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/c.js.map +1 -0
  476. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.js +475 -0
  477. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/cpp.js.map +1 -0
  478. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.js +452 -0
  479. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/csharp.js.map +1 -0
  480. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.js +619 -0
  481. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/css.js.map +1 -0
  482. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.js +282 -0
  483. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/d.js.map +1 -0
  484. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.js +210 -0
  485. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/dart.js.map +1 -0
  486. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.js +137 -0
  487. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/delphi.js.map +1 -0
  488. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.js +97 -0
  489. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang-repl.js.map +1 -0
  490. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.js +210 -0
  491. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/erlang.js.map +1 -0
  492. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.js +170 -0
  493. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fortran.js.map +1 -0
  494. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.js +97 -0
  495. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/fsharp.js.map +1 -0
  496. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.js +85 -0
  497. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/go.js.map +1 -0
  498. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.js +185 -0
  499. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/groovy.js.map +1 -0
  500. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.js +335 -0
  501. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/handlebars.js.map +1 -0
  502. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.js +184 -0
  503. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/haskell.js.map +1 -0
  504. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.js +363 -0
  505. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/htmlbars.js.map +1 -0
  506. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.js +184 -0
  507. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ini.js.map +1 -0
  508. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.js +192 -0
  509. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/java.js.map +1 -0
  510. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.js +74 -0
  511. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/json.js.map +1 -0
  512. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.js +61 -0
  513. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia-repl.js.map +1 -0
  514. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.js +427 -0
  515. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/julia.js.map +1 -0
  516. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.js +295 -0
  517. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/kotlin.js.map +1 -0
  518. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.js +122 -0
  519. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lisp.js.map +1 -0
  520. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.js +93 -0
  521. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/lua.js.map +1 -0
  522. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.js +117 -0
  523. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/matlab.js.map +1 -0
  524. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.js +132 -0
  525. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/objectivec.js.map +1 -0
  526. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.js +526 -0
  527. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/perl.js.map +1 -0
  528. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.js +215 -0
  529. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/php.js.map +1 -0
  530. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.js +342 -0
  531. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/powershell.js.map +1 -0
  532. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.js +113 -0
  533. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/prolog.js.map +1 -0
  534. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.js +457 -0
  535. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/python.js.map +1 -0
  536. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.js +242 -0
  537. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/r.js.map +1 -0
  538. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.js +398 -0
  539. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/ruby.js.map +1 -0
  540. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.js +157 -0
  541. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/rust.js.map +1 -0
  542. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.js +144 -0
  543. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sas.js.map +1 -0
  544. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.js +151 -0
  545. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scala.js.map +1 -0
  546. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.js +218 -0
  547. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/scheme.js.map +1 -0
  548. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.js +41 -0
  549. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/shell.js.map +1 -0
  550. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.js +710 -0
  551. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/sql.js.map +1 -0
  552. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.js +884 -0
  553. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/swift.js.map +1 -0
  554. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.js +708 -0
  555. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/typescript.js.map +1 -0
  556. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.js +35 -0
  557. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript-html.js.map +1 -0
  558. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.js +120 -0
  559. package/lib/node_modules/.pnpm/highlight.js@10.7.2/node_modules/highlight.js/lib/languages/vbscript.js.map +1 -0
  560. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.js +640 -0
  561. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.js.map +1 -0
  562. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.js +198 -0
  563. package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.js.map +1 -0
  564. package/lib/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.js +150 -0
  565. package/lib/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.js.map +1 -0
  566. package/lib/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.js +146 -0
  567. package/lib/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.js.map +1 -0
  568. package/lib/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.js +210 -0
  569. package/lib/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.js.map +1 -0
  570. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.js +28 -0
  571. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/bare.js.map +1 -0
  572. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.js +1913 -0
  573. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/full.js.map +1 -0
  574. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.js +49 -0
  575. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/data/shortcuts.js.map +1 -0
  576. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.js +22 -0
  577. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/full.js.map +1 -0
  578. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.js +65 -0
  579. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/normalize_opts.js.map +1 -0
  580. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.js +10 -0
  581. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/render.js.map +1 -0
  582. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.js +92 -0
  583. package/lib/node_modules/.pnpm/markdown-it-emoji@3.0.0/node_modules/markdown-it-emoji/lib/replace.js.map +1 -0
  584. package/lib/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.js +359 -0
  585. package/lib/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.js.map +1 -0
  586. package/lib/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.js +130 -0
  587. package/lib/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.js.map +1 -0
  588. package/lib/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.js +130 -0
  589. package/lib/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.js.map +1 -0
  590. package/lib/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.js +67 -0
  591. package/lib/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.js.map +1 -0
  592. package/lib/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.js +67 -0
  593. package/lib/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.js.map +1 -0
  594. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.js +13 -0
  595. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.js.map +1 -0
  596. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.js +9 -0
  597. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.js.map +1 -0
  598. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.js +69 -0
  599. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.js.map +1 -0
  600. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.js +33 -0
  601. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.js.map +1 -0
  602. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.js +326 -0
  603. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.js.map +1 -0
  604. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.js +15 -0
  605. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.js.map +1 -0
  606. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.js +85 -0
  607. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.js.map +1 -0
  608. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.js +46 -0
  609. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.js.map +1 -0
  610. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.js +58 -0
  611. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.js.map +1 -0
  612. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.js +598 -0
  613. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.js.map +1 -0
  614. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.js +140 -0
  615. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.js.map +1 -0
  616. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.js +71 -0
  617. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.js.map +1 -0
  618. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.js +199 -0
  619. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.js.map +1 -0
  620. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.js +80 -0
  621. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.js.map +1 -0
  622. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.js +41 -0
  623. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.js.map +1 -0
  624. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.js +61 -0
  625. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.js.map +1 -0
  626. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.js +348 -0
  627. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.js.map +1 -0
  628. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.js +356 -0
  629. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.js.map +1 -0
  630. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.js +288 -0
  631. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.js.map +1 -0
  632. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.js +34 -0
  633. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.js.map +1 -0
  634. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.js +98 -0
  635. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.js.map +1 -0
  636. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.js +59 -0
  637. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.js.map +1 -0
  638. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.js +49 -0
  639. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.js.map +1 -0
  640. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.js +78 -0
  641. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.js.map +1 -0
  642. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.js +83 -0
  643. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.js.map +1 -0
  644. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.js +368 -0
  645. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.js.map +1 -0
  646. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.js +52 -0
  647. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.js.map +1 -0
  648. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.js +199 -0
  649. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.js.map +1 -0
  650. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.js +236 -0
  651. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.js.map +1 -0
  652. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.js +225 -0
  653. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.js.map +1 -0
  654. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.js +18 -0
  655. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.js.map +1 -0
  656. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.js +16 -0
  657. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.js.map +1 -0
  658. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.js +134 -0
  659. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.js.map +1 -0
  660. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.js +21 -0
  661. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.js.map +1 -0
  662. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.js +99 -0
  663. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.js.map +1 -0
  664. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.js +204 -0
  665. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.js.map +1 -0
  666. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.js +23 -0
  667. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.js.map +1 -0
  668. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.js +76 -0
  669. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.js.map +1 -0
  670. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.js +63 -0
  671. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.js.map +1 -0
  672. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +130 -0
  673. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.js.map +1 -0
  674. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.js +134 -0
  675. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.js.map +1 -0
  676. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.js +53 -0
  677. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.js.map +1 -0
  678. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.js +56 -0
  679. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.js.map +1 -0
  680. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.js +50 -0
  681. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.js.map +1 -0
  682. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.js +156 -0
  683. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.js.map +1 -0
  684. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.js +152 -0
  685. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.js.map +1 -0
  686. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.js +50 -0
  687. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.js.map +1 -0
  688. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.js +158 -0
  689. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.js.map +1 -0
  690. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.js +134 -0
  691. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.js.map +1 -0
  692. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.js +58 -0
  693. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.js.map +1 -0
  694. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.js +35 -0
  695. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.js.map +1 -0
  696. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.js +201 -0
  697. package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.js.map +1 -0
  698. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js +123 -0
  699. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js.map +1 -0
  700. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js +99 -0
  701. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js.map +1 -0
  702. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js +26 -0
  703. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js.map +1 -0
  704. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js +17 -0
  705. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js.map +1 -0
  706. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js +294 -0
  707. package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js.map +1 -0
  708. package/lib/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.js +138 -0
  709. package/lib/node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.js.map +1 -0
  710. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js +14 -0
  711. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js.map +1 -0
  712. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js +14 -0
  713. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js.map +1 -0
  714. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js +6 -0
  715. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js.map +1 -0
  716. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js +14 -0
  717. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js.map +1 -0
  718. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js +25 -0
  719. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js.map +1 -0
  720. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js +14 -0
  721. package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js.map +1 -0
  722. package/lib/package.json.css +1 -0
  723. package/lib/package.json.js +120 -0
  724. package/lib/package.json.js.map +1 -0
  725. package/lib/packages/components/index.js +11 -0
  726. package/lib/packages/components/index.js.map +1 -0
  727. package/lib/packages/components/package.json.js +47 -0
  728. package/lib/packages/components/package.json.js.map +1 -0
  729. package/lib/packages/components/resolver.js +36 -0
  730. package/lib/packages/components/resolver.js.map +1 -0
  731. package/lib/packages/components/touchchat/component/CardView.vue.js +11 -0
  732. package/lib/packages/components/touchchat/component/CardView.vue.js.map +1 -0
  733. package/lib/packages/components/touchchat/component/CardView.vue2.js +139 -0
  734. package/lib/packages/components/touchchat/component/CardView.vue2.js.map +1 -0
  735. package/lib/packages/components/touchchat/component/FileView.vue.js +11 -0
  736. package/lib/packages/components/touchchat/component/FileView.vue.js.map +1 -0
  737. package/lib/packages/components/touchchat/component/FileView.vue2.js +66 -0
  738. package/lib/packages/components/touchchat/component/FileView.vue2.js.map +1 -0
  739. package/lib/packages/components/touchchat/component/HelloChat.vue.js +11 -0
  740. package/lib/packages/components/touchchat/component/HelloChat.vue.js.map +1 -0
  741. package/lib/packages/components/touchchat/component/HelloChat.vue2.js +62 -0
  742. package/lib/packages/components/touchchat/component/HelloChat.vue2.js.map +1 -0
  743. package/lib/packages/components/touchchat/component/ImageView.vue.js +11 -0
  744. package/lib/packages/components/touchchat/component/ImageView.vue.js.map +1 -0
  745. package/lib/packages/components/touchchat/component/ImageView.vue2.js +35 -0
  746. package/lib/packages/components/touchchat/component/ImageView.vue2.js.map +1 -0
  747. package/lib/packages/components/touchchat/component/LinkView.vue.js +11 -0
  748. package/lib/packages/components/touchchat/component/LinkView.vue.js.map +1 -0
  749. package/lib/packages/components/touchchat/component/LinkView.vue2.js +79 -0
  750. package/lib/packages/components/touchchat/component/LinkView.vue2.js.map +1 -0
  751. package/lib/packages/components/touchchat/img/AI.png.js +8 -0
  752. package/lib/packages/components/touchchat/img/AI.png.js.map +1 -0
  753. package/lib/packages/components/touchchat/img/asir.png.js +8 -0
  754. package/lib/packages/components/touchchat/img/asir.png.js.map +1 -0
  755. package/lib/packages/components/touchchat/img/bgimage.png.js +8 -0
  756. package/lib/packages/components/touchchat/img/bgimage.png.js.map +1 -0
  757. package/lib/packages/components/touchchat/img/file.png.js +8 -0
  758. package/lib/packages/components/touchchat/img/file.png.js.map +1 -0
  759. package/lib/packages/components/touchchat/img/link.png.js +8 -0
  760. package/lib/packages/components/touchchat/img/link.png.js.map +1 -0
  761. package/lib/packages/components/touchchat/index.js +12 -0
  762. package/lib/packages/components/touchchat/index.js.map +1 -0
  763. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js +11 -0
  764. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js.map +1 -0
  765. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js +346 -0
  766. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js.map +1 -0
  767. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js +11 -0
  768. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js.map +1 -0
  769. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js +186 -0
  770. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js.map +1 -0
  771. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js +11 -0
  772. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js.map +1 -0
  773. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js +454 -0
  774. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js.map +1 -0
  775. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js +11 -0
  776. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js.map +1 -0
  777. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js +109 -0
  778. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js.map +1 -0
  779. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js +11 -0
  780. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js.map +1 -0
  781. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js +271 -0
  782. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js.map +1 -0
  783. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js +11 -0
  784. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js.map +1 -0
  785. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js +847 -0
  786. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js.map +1 -0
  787. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js +11 -0
  788. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js.map +1 -0
  789. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js +216 -0
  790. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js.map +1 -0
  791. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js +11 -0
  792. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js.map +1 -0
  793. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js +137 -0
  794. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js.map +1 -0
  795. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue.js +11 -0
  796. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue.js.map +1 -0
  797. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.js +636 -0
  798. package/lib/packages/components/touchchat/src/AiRobot/ChatPanel.vue2.js.map +1 -0
  799. package/lib/packages/components/touchchat/src/AiRobot/Content.vue.js +11 -0
  800. package/lib/packages/components/touchchat/src/AiRobot/Content.vue.js.map +1 -0
  801. package/lib/packages/components/touchchat/src/AiRobot/Content.vue2.js +267 -0
  802. package/lib/packages/components/touchchat/src/AiRobot/Content.vue2.js.map +1 -0
  803. package/lib/packages/components/touchchat/src/AiRobot/Header.vue.js +11 -0
  804. package/lib/packages/components/touchchat/src/AiRobot/Header.vue.js.map +1 -0
  805. package/lib/packages/components/touchchat/src/AiRobot/Header.vue2.js +201 -0
  806. package/lib/packages/components/touchchat/src/AiRobot/Header.vue2.js.map +1 -0
  807. package/lib/packages/components/touchchat/src/AiRobot/Input.vue.js +11 -0
  808. package/lib/packages/components/touchchat/src/AiRobot/Input.vue.js.map +1 -0
  809. package/lib/packages/components/touchchat/src/AiRobot/Input.vue2.js +71 -0
  810. package/lib/packages/components/touchchat/src/AiRobot/Input.vue2.js.map +1 -0
  811. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue.js +11 -0
  812. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue.js.map +1 -0
  813. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue2.js +52 -0
  814. package/lib/packages/components/touchchat/src/AiRobot/Scene.vue2.js.map +1 -0
  815. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.js +11 -0
  816. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue.js.map +1 -0
  817. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.js +271 -0
  818. package/lib/packages/components/touchchat/src/AiRobot/component/HelloChat.vue2.js.map +1 -0
  819. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue.js +11 -0
  820. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue.js.map +1 -0
  821. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue2.js +93 -0
  822. package/lib/packages/components/touchchat/src/AiRobot/component/face.vue2.js.map +1 -0
  823. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue.js +11 -0
  824. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue.js.map +1 -0
  825. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue2.js +68 -0
  826. package/lib/packages/components/touchchat/src/AiRobot/component/letter.vue2.js.map +1 -0
  827. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.js +11 -0
  828. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue.js.map +1 -0
  829. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.js +40 -0
  830. package/lib/packages/components/touchchat/src/AiRobot/component/meterialPrepare.vue2.js.map +1 -0
  831. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue.js +11 -0
  832. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue.js.map +1 -0
  833. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue2.js +40 -0
  834. package/lib/packages/components/touchchat/src/AiRobot/component/start.vue2.js.map +1 -0
  835. package/lib/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.js +8 -0
  836. package/lib/packages/components/touchchat/src/AiRobot/img/Avatar-AI.png.js.map +1 -0
  837. package/lib/packages/components/touchchat/src/AiRobot/img/icon.png.js +8 -0
  838. package/lib/packages/components/touchchat/src/AiRobot/img/icon.png.js.map +1 -0
  839. package/lib/packages/components/touchchat/src/AiRobot/index.vue.js +11 -0
  840. package/lib/packages/components/touchchat/src/AiRobot/index.vue.js.map +1 -0
  841. package/lib/packages/components/touchchat/src/AiRobot/index.vue2.js +85 -0
  842. package/lib/packages/components/touchchat/src/AiRobot/index.vue2.js.map +1 -0
  843. package/lib/packages/components/touchchat/src/index.vue.js +11 -0
  844. package/lib/packages/components/touchchat/src/index.vue.js.map +1 -0
  845. package/lib/packages/components/touchchat/src/index.vue2.js +151 -0
  846. package/lib/packages/components/touchchat/src/index.vue2.js.map +1 -0
  847. package/lib/packages/components/touchchat/utils/chatRobot.js +113 -0
  848. package/lib/packages/components/touchchat/utils/chatRobot.js.map +1 -0
  849. package/lib/packages/components/touchchat/utils/deepCloneDom.js +61 -0
  850. package/lib/packages/components/touchchat/utils/deepCloneDom.js.map +1 -0
  851. package/lib/packages/components/touchchat/utils/fetchStream.js +105 -0
  852. package/lib/packages/components/touchchat/utils/fetchStream.js.map +1 -0
  853. package/lib/packages/components/touchchat/utils/hight-it.js +118 -0
  854. package/lib/packages/components/touchchat/utils/hight-it.js.map +1 -0
  855. package/lib/packages/components/touchchat/utils/markdown.js +46 -0
  856. package/lib/packages/components/touchchat/utils/markdown.js.map +1 -0
  857. package/lib/packages/components/touchchat/utils/socket.js +199 -0
  858. package/lib/packages/components/touchchat/utils/socket.js.map +1 -0
  859. package/lib/packages/components/touchchat/utils/tools.js +79 -0
  860. package/lib/packages/components/touchchat/utils/tools.js.map +1 -0
  861. package/lib/packages/components/touchchat/utils/uuid.js +19 -0
  862. package/lib/packages/components/touchchat/utils/uuid.js.map +1 -0
  863. package/lib/packages/utils/config.js +21 -0
  864. package/lib/packages/utils/config.js.map +1 -0
  865. package/lib/packages/utils/index.js +12 -0
  866. package/lib/packages/utils/index.js.map +1 -0
  867. package/lib/packages/utils/package.json.js +50 -0
  868. package/lib/packages/utils/package.json.js.map +1 -0
  869. package/lib/packages/utils/types.js +26 -0
  870. package/lib/packages/utils/types.js.map +1 -0
  871. package/package.json +83 -0
  872. package/theme/components/index.css +3 -0
  873. package/theme/img/default.png +0 -0
  874. package/theme/index.css +6 -0
  875. package/theme/skin/default.css +6 -0
  876. package/types/global.d.ts +9 -0
@@ -0,0 +1,2528 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _commonjsHelpers = require('../../../../../../_virtual/_commonjsHelpers.js');
6
+
7
+ function deepFreeze(obj) {
8
+ if (obj instanceof Map) {
9
+ obj.clear = obj.delete = obj.set = function () {
10
+ throw new Error('map is read-only');
11
+ };
12
+ } else if (obj instanceof Set) {
13
+ obj.add = obj.clear = obj.delete = function () {
14
+ throw new Error('set is read-only');
15
+ };
16
+ }
17
+
18
+ // Freeze self
19
+ Object.freeze(obj);
20
+
21
+ Object.getOwnPropertyNames(obj).forEach(function (name) {
22
+ var prop = obj[name];
23
+
24
+ // Freeze prop if it is an object
25
+ if (typeof prop == 'object' && !Object.isFrozen(prop)) {
26
+ deepFreeze(prop);
27
+ }
28
+ });
29
+
30
+ return obj;
31
+ }
32
+
33
+ var deepFreezeEs6 = deepFreeze;
34
+ var _default = deepFreeze;
35
+ deepFreezeEs6.default = _default;
36
+
37
+ /** @implements CallbackResponse */
38
+ class Response {
39
+ /**
40
+ * @param {CompiledMode} mode
41
+ */
42
+ constructor(mode) {
43
+ // eslint-disable-next-line no-undefined
44
+ if (mode.data === undefined) mode.data = {};
45
+
46
+ this.data = mode.data;
47
+ this.isMatchIgnored = false;
48
+ }
49
+
50
+ ignoreMatch() {
51
+ this.isMatchIgnored = true;
52
+ }
53
+ }
54
+
55
+ /**
56
+ * @param {string} value
57
+ * @returns {string}
58
+ */
59
+ function escapeHTML(value) {
60
+ return value
61
+ .replace(/&/g, '&')
62
+ .replace(/</g, '&lt;')
63
+ .replace(/>/g, '&gt;')
64
+ .replace(/"/g, '&quot;')
65
+ .replace(/'/g, '&#x27;');
66
+ }
67
+
68
+ /**
69
+ * performs a shallow merge of multiple objects into one
70
+ *
71
+ * @template T
72
+ * @param {T} original
73
+ * @param {Record<string,any>[]} objects
74
+ * @returns {T} a single new object
75
+ */
76
+ function inherit(original, ...objects) {
77
+ /** @type Record<string,any> */
78
+ const result = Object.create(null);
79
+
80
+ for (const key in original) {
81
+ result[key] = original[key];
82
+ }
83
+ objects.forEach(function(obj) {
84
+ for (const key in obj) {
85
+ result[key] = obj[key];
86
+ }
87
+ });
88
+ return /** @type {T} */ (result);
89
+ }
90
+
91
+ /**
92
+ * @typedef {object} Renderer
93
+ * @property {(text: string) => void} addText
94
+ * @property {(node: Node) => void} openNode
95
+ * @property {(node: Node) => void} closeNode
96
+ * @property {() => string} value
97
+ */
98
+
99
+ /** @typedef {{kind?: string, sublanguage?: boolean}} Node */
100
+ /** @typedef {{walk: (r: Renderer) => void}} Tree */
101
+ /** */
102
+
103
+ const SPAN_CLOSE = '</span>';
104
+
105
+ /**
106
+ * Determines if a node needs to be wrapped in <span>
107
+ *
108
+ * @param {Node} node */
109
+ const emitsWrappingTags = (node) => {
110
+ return !!node.kind;
111
+ };
112
+
113
+ /** @type {Renderer} */
114
+ class HTMLRenderer {
115
+ /**
116
+ * Creates a new HTMLRenderer
117
+ *
118
+ * @param {Tree} parseTree - the parse tree (must support `walk` API)
119
+ * @param {{classPrefix: string}} options
120
+ */
121
+ constructor(parseTree, options) {
122
+ this.buffer = "";
123
+ this.classPrefix = options.classPrefix;
124
+ parseTree.walk(this);
125
+ }
126
+
127
+ /**
128
+ * Adds texts to the output stream
129
+ *
130
+ * @param {string} text */
131
+ addText(text) {
132
+ this.buffer += escapeHTML(text);
133
+ }
134
+
135
+ /**
136
+ * Adds a node open to the output stream (if needed)
137
+ *
138
+ * @param {Node} node */
139
+ openNode(node) {
140
+ if (!emitsWrappingTags(node)) return;
141
+
142
+ let className = node.kind;
143
+ if (!node.sublanguage) {
144
+ className = `${this.classPrefix}${className}`;
145
+ }
146
+ this.span(className);
147
+ }
148
+
149
+ /**
150
+ * Adds a node close to the output stream (if needed)
151
+ *
152
+ * @param {Node} node */
153
+ closeNode(node) {
154
+ if (!emitsWrappingTags(node)) return;
155
+
156
+ this.buffer += SPAN_CLOSE;
157
+ }
158
+
159
+ /**
160
+ * returns the accumulated buffer
161
+ */
162
+ value() {
163
+ return this.buffer;
164
+ }
165
+
166
+ // helpers
167
+
168
+ /**
169
+ * Builds a span element
170
+ *
171
+ * @param {string} className */
172
+ span(className) {
173
+ this.buffer += `<span class="${className}">`;
174
+ }
175
+ }
176
+
177
+ /** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */
178
+ /** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */
179
+ /** */
180
+
181
+ class TokenTree {
182
+ constructor() {
183
+ /** @type DataNode */
184
+ this.rootNode = { children: [] };
185
+ this.stack = [this.rootNode];
186
+ }
187
+
188
+ get top() {
189
+ return this.stack[this.stack.length - 1];
190
+ }
191
+
192
+ get root() { return this.rootNode; }
193
+
194
+ /** @param {Node} node */
195
+ add(node) {
196
+ this.top.children.push(node);
197
+ }
198
+
199
+ /** @param {string} kind */
200
+ openNode(kind) {
201
+ /** @type Node */
202
+ const node = { kind, children: [] };
203
+ this.add(node);
204
+ this.stack.push(node);
205
+ }
206
+
207
+ closeNode() {
208
+ if (this.stack.length > 1) {
209
+ return this.stack.pop();
210
+ }
211
+ // eslint-disable-next-line no-undefined
212
+ return undefined;
213
+ }
214
+
215
+ closeAllNodes() {
216
+ while (this.closeNode());
217
+ }
218
+
219
+ toJSON() {
220
+ return JSON.stringify(this.rootNode, null, 4);
221
+ }
222
+
223
+ /**
224
+ * @typedef { import("./html_renderer").Renderer } Renderer
225
+ * @param {Renderer} builder
226
+ */
227
+ walk(builder) {
228
+ // this does not
229
+ return this.constructor._walk(builder, this.rootNode);
230
+ // this works
231
+ // return TokenTree._walk(builder, this.rootNode);
232
+ }
233
+
234
+ /**
235
+ * @param {Renderer} builder
236
+ * @param {Node} node
237
+ */
238
+ static _walk(builder, node) {
239
+ if (typeof node === "string") {
240
+ builder.addText(node);
241
+ } else if (node.children) {
242
+ builder.openNode(node);
243
+ node.children.forEach((child) => this._walk(builder, child));
244
+ builder.closeNode(node);
245
+ }
246
+ return builder;
247
+ }
248
+
249
+ /**
250
+ * @param {Node} node
251
+ */
252
+ static _collapse(node) {
253
+ if (typeof node === "string") return;
254
+ if (!node.children) return;
255
+
256
+ if (node.children.every(el => typeof el === "string")) {
257
+ // node.text = node.children.join("");
258
+ // delete node.children;
259
+ node.children = [node.children.join("")];
260
+ } else {
261
+ node.children.forEach((child) => {
262
+ TokenTree._collapse(child);
263
+ });
264
+ }
265
+ }
266
+ }
267
+
268
+ /**
269
+ Currently this is all private API, but this is the minimal API necessary
270
+ that an Emitter must implement to fully support the parser.
271
+
272
+ Minimal interface:
273
+
274
+ - addKeyword(text, kind)
275
+ - addText(text)
276
+ - addSublanguage(emitter, subLanguageName)
277
+ - finalize()
278
+ - openNode(kind)
279
+ - closeNode()
280
+ - closeAllNodes()
281
+ - toHTML()
282
+
283
+ */
284
+
285
+ /**
286
+ * @implements {Emitter}
287
+ */
288
+ class TokenTreeEmitter extends TokenTree {
289
+ /**
290
+ * @param {*} options
291
+ */
292
+ constructor(options) {
293
+ super();
294
+ this.options = options;
295
+ }
296
+
297
+ /**
298
+ * @param {string} text
299
+ * @param {string} kind
300
+ */
301
+ addKeyword(text, kind) {
302
+ if (text === "") { return; }
303
+
304
+ this.openNode(kind);
305
+ this.addText(text);
306
+ this.closeNode();
307
+ }
308
+
309
+ /**
310
+ * @param {string} text
311
+ */
312
+ addText(text) {
313
+ if (text === "") { return; }
314
+
315
+ this.add(text);
316
+ }
317
+
318
+ /**
319
+ * @param {Emitter & {root: DataNode}} emitter
320
+ * @param {string} name
321
+ */
322
+ addSublanguage(emitter, name) {
323
+ /** @type DataNode */
324
+ const node = emitter.root;
325
+ node.kind = name;
326
+ node.sublanguage = true;
327
+ this.add(node);
328
+ }
329
+
330
+ toHTML() {
331
+ const renderer = new HTMLRenderer(this, this.options);
332
+ return renderer.value();
333
+ }
334
+
335
+ finalize() {
336
+ return true;
337
+ }
338
+ }
339
+
340
+ /**
341
+ * @param {string} value
342
+ * @returns {RegExp}
343
+ * */
344
+ function escape(value) {
345
+ return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
346
+ }
347
+
348
+ /**
349
+ * @param {RegExp | string } re
350
+ * @returns {string}
351
+ */
352
+ function source(re) {
353
+ if (!re) return null;
354
+ if (typeof re === "string") return re;
355
+
356
+ return re.source;
357
+ }
358
+
359
+ /**
360
+ * @param {...(RegExp | string) } args
361
+ * @returns {string}
362
+ */
363
+ function concat(...args) {
364
+ const joined = args.map((x) => source(x)).join("");
365
+ return joined;
366
+ }
367
+
368
+ /**
369
+ * Any of the passed expresssions may match
370
+ *
371
+ * Creates a huge this | this | that | that match
372
+ * @param {(RegExp | string)[] } args
373
+ * @returns {string}
374
+ */
375
+ function either(...args) {
376
+ const joined = '(' + args.map((x) => source(x)).join("|") + ")";
377
+ return joined;
378
+ }
379
+
380
+ /**
381
+ * @param {RegExp} re
382
+ * @returns {number}
383
+ */
384
+ function countMatchGroups(re) {
385
+ return (new RegExp(re.toString() + '|')).exec('').length - 1;
386
+ }
387
+
388
+ /**
389
+ * Does lexeme start with a regular expression match at the beginning
390
+ * @param {RegExp} re
391
+ * @param {string} lexeme
392
+ */
393
+ function startsWith(re, lexeme) {
394
+ const match = re && re.exec(lexeme);
395
+ return match && match.index === 0;
396
+ }
397
+
398
+ // BACKREF_RE matches an open parenthesis or backreference. To avoid
399
+ // an incorrect parse, it additionally matches the following:
400
+ // - [...] elements, where the meaning of parentheses and escapes change
401
+ // - other escape sequences, so we do not misparse escape sequences as
402
+ // interesting elements
403
+ // - non-matching or lookahead parentheses, which do not capture. These
404
+ // follow the '(' with a '?'.
405
+ const BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
406
+
407
+ // join logically computes regexps.join(separator), but fixes the
408
+ // backreferences so they continue to match.
409
+ // it also places each individual regular expression into it's own
410
+ // match group, keeping track of the sequencing of those match groups
411
+ // is currently an exercise for the caller. :-)
412
+ /**
413
+ * @param {(string | RegExp)[]} regexps
414
+ * @param {string} separator
415
+ * @returns {string}
416
+ */
417
+ function join(regexps, separator = "|") {
418
+ let numCaptures = 0;
419
+
420
+ return regexps.map((regex) => {
421
+ numCaptures += 1;
422
+ const offset = numCaptures;
423
+ let re = source(regex);
424
+ let out = '';
425
+
426
+ while (re.length > 0) {
427
+ const match = BACKREF_RE.exec(re);
428
+ if (!match) {
429
+ out += re;
430
+ break;
431
+ }
432
+ out += re.substring(0, match.index);
433
+ re = re.substring(match.index + match[0].length);
434
+ if (match[0][0] === '\\' && match[1]) {
435
+ // Adjust the backreference.
436
+ out += '\\' + String(Number(match[1]) + offset);
437
+ } else {
438
+ out += match[0];
439
+ if (match[0] === '(') {
440
+ numCaptures++;
441
+ }
442
+ }
443
+ }
444
+ return out;
445
+ }).map(re => `(${re})`).join(separator);
446
+ }
447
+
448
+ // Common regexps
449
+ const MATCH_NOTHING_RE = /\b\B/;
450
+ const IDENT_RE = '[a-zA-Z]\\w*';
451
+ const UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
452
+ const NUMBER_RE = '\\b\\d+(\\.\\d+)?';
453
+ const C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
454
+ const BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
455
+ const RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
456
+
457
+ /**
458
+ * @param { Partial<Mode> & {binary?: string | RegExp} } opts
459
+ */
460
+ const SHEBANG = (opts = {}) => {
461
+ const beginShebang = /^#![ ]*\//;
462
+ if (opts.binary) {
463
+ opts.begin = concat(
464
+ beginShebang,
465
+ /.*\b/,
466
+ opts.binary,
467
+ /\b.*/);
468
+ }
469
+ return inherit({
470
+ className: 'meta',
471
+ begin: beginShebang,
472
+ end: /$/,
473
+ relevance: 0,
474
+ /** @type {ModeCallback} */
475
+ "on:begin": (m, resp) => {
476
+ if (m.index !== 0) resp.ignoreMatch();
477
+ }
478
+ }, opts);
479
+ };
480
+
481
+ // Common modes
482
+ const BACKSLASH_ESCAPE = {
483
+ begin: '\\\\[\\s\\S]', relevance: 0
484
+ };
485
+ const APOS_STRING_MODE = {
486
+ className: 'string',
487
+ begin: '\'',
488
+ end: '\'',
489
+ illegal: '\\n',
490
+ contains: [BACKSLASH_ESCAPE]
491
+ };
492
+ const QUOTE_STRING_MODE = {
493
+ className: 'string',
494
+ begin: '"',
495
+ end: '"',
496
+ illegal: '\\n',
497
+ contains: [BACKSLASH_ESCAPE]
498
+ };
499
+ const PHRASAL_WORDS_MODE = {
500
+ begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
501
+ };
502
+ /**
503
+ * Creates a comment mode
504
+ *
505
+ * @param {string | RegExp} begin
506
+ * @param {string | RegExp} end
507
+ * @param {Mode | {}} [modeOptions]
508
+ * @returns {Partial<Mode>}
509
+ */
510
+ const COMMENT = function(begin, end, modeOptions = {}) {
511
+ const mode = inherit(
512
+ {
513
+ className: 'comment',
514
+ begin,
515
+ end,
516
+ contains: []
517
+ },
518
+ modeOptions
519
+ );
520
+ mode.contains.push(PHRASAL_WORDS_MODE);
521
+ mode.contains.push({
522
+ className: 'doctag',
523
+ begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',
524
+ relevance: 0
525
+ });
526
+ return mode;
527
+ };
528
+ const C_LINE_COMMENT_MODE = COMMENT('//', '$');
529
+ const C_BLOCK_COMMENT_MODE = COMMENT('/\\*', '\\*/');
530
+ const HASH_COMMENT_MODE = COMMENT('#', '$');
531
+ const NUMBER_MODE = {
532
+ className: 'number',
533
+ begin: NUMBER_RE,
534
+ relevance: 0
535
+ };
536
+ const C_NUMBER_MODE = {
537
+ className: 'number',
538
+ begin: C_NUMBER_RE,
539
+ relevance: 0
540
+ };
541
+ const BINARY_NUMBER_MODE = {
542
+ className: 'number',
543
+ begin: BINARY_NUMBER_RE,
544
+ relevance: 0
545
+ };
546
+ const CSS_NUMBER_MODE = {
547
+ className: 'number',
548
+ begin: NUMBER_RE + '(' +
549
+ '%|em|ex|ch|rem' +
550
+ '|vw|vh|vmin|vmax' +
551
+ '|cm|mm|in|pt|pc|px' +
552
+ '|deg|grad|rad|turn' +
553
+ '|s|ms' +
554
+ '|Hz|kHz' +
555
+ '|dpi|dpcm|dppx' +
556
+ ')?',
557
+ relevance: 0
558
+ };
559
+ const REGEXP_MODE = {
560
+ // this outer rule makes sure we actually have a WHOLE regex and not simply
561
+ // an expression such as:
562
+ //
563
+ // 3 / something
564
+ //
565
+ // (which will then blow up when regex's `illegal` sees the newline)
566
+ begin: /(?=\/[^/\n]*\/)/,
567
+ contains: [{
568
+ className: 'regexp',
569
+ begin: /\//,
570
+ end: /\/[gimuy]*/,
571
+ illegal: /\n/,
572
+ contains: [
573
+ BACKSLASH_ESCAPE,
574
+ {
575
+ begin: /\[/,
576
+ end: /\]/,
577
+ relevance: 0,
578
+ contains: [BACKSLASH_ESCAPE]
579
+ }
580
+ ]
581
+ }]
582
+ };
583
+ const TITLE_MODE = {
584
+ className: 'title',
585
+ begin: IDENT_RE,
586
+ relevance: 0
587
+ };
588
+ const UNDERSCORE_TITLE_MODE = {
589
+ className: 'title',
590
+ begin: UNDERSCORE_IDENT_RE,
591
+ relevance: 0
592
+ };
593
+ const METHOD_GUARD = {
594
+ // excludes method names from keyword processing
595
+ begin: '\\.\\s*' + UNDERSCORE_IDENT_RE,
596
+ relevance: 0
597
+ };
598
+
599
+ /**
600
+ * Adds end same as begin mechanics to a mode
601
+ *
602
+ * Your mode must include at least a single () match group as that first match
603
+ * group is what is used for comparison
604
+ * @param {Partial<Mode>} mode
605
+ */
606
+ const END_SAME_AS_BEGIN = function(mode) {
607
+ return Object.assign(mode,
608
+ {
609
+ /** @type {ModeCallback} */
610
+ 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },
611
+ /** @type {ModeCallback} */
612
+ 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }
613
+ });
614
+ };
615
+
616
+ var MODES = /*#__PURE__*/Object.freeze({
617
+ __proto__: null,
618
+ MATCH_NOTHING_RE: MATCH_NOTHING_RE,
619
+ IDENT_RE: IDENT_RE,
620
+ UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,
621
+ NUMBER_RE: NUMBER_RE,
622
+ C_NUMBER_RE: C_NUMBER_RE,
623
+ BINARY_NUMBER_RE: BINARY_NUMBER_RE,
624
+ RE_STARTERS_RE: RE_STARTERS_RE,
625
+ SHEBANG: SHEBANG,
626
+ BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,
627
+ APOS_STRING_MODE: APOS_STRING_MODE,
628
+ QUOTE_STRING_MODE: QUOTE_STRING_MODE,
629
+ PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,
630
+ COMMENT: COMMENT,
631
+ C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,
632
+ C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,
633
+ HASH_COMMENT_MODE: HASH_COMMENT_MODE,
634
+ NUMBER_MODE: NUMBER_MODE,
635
+ C_NUMBER_MODE: C_NUMBER_MODE,
636
+ BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,
637
+ CSS_NUMBER_MODE: CSS_NUMBER_MODE,
638
+ REGEXP_MODE: REGEXP_MODE,
639
+ TITLE_MODE: TITLE_MODE,
640
+ UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,
641
+ METHOD_GUARD: METHOD_GUARD,
642
+ END_SAME_AS_BEGIN: END_SAME_AS_BEGIN
643
+ });
644
+
645
+ // Grammar extensions / plugins
646
+ // See: https://github.com/highlightjs/highlight.js/issues/2833
647
+
648
+ // Grammar extensions allow "syntactic sugar" to be added to the grammar modes
649
+ // without requiring any underlying changes to the compiler internals.
650
+
651
+ // `compileMatch` being the perfect small example of now allowing a grammar
652
+ // author to write `match` when they desire to match a single expression rather
653
+ // than being forced to use `begin`. The extension then just moves `match` into
654
+ // `begin` when it runs. Ie, no features have been added, but we've just made
655
+ // the experience of writing (and reading grammars) a little bit nicer.
656
+
657
+ // ------
658
+
659
+ // TODO: We need negative look-behind support to do this properly
660
+ /**
661
+ * Skip a match if it has a preceding dot
662
+ *
663
+ * This is used for `beginKeywords` to prevent matching expressions such as
664
+ * `bob.keyword.do()`. The mode compiler automatically wires this up as a
665
+ * special _internal_ 'on:begin' callback for modes with `beginKeywords`
666
+ * @param {RegExpMatchArray} match
667
+ * @param {CallbackResponse} response
668
+ */
669
+ function skipIfhasPrecedingDot(match, response) {
670
+ const before = match.input[match.index - 1];
671
+ if (before === ".") {
672
+ response.ignoreMatch();
673
+ }
674
+ }
675
+
676
+
677
+ /**
678
+ * `beginKeywords` syntactic sugar
679
+ * @type {CompilerExt}
680
+ */
681
+ function beginKeywords(mode, parent) {
682
+ if (!parent) return;
683
+ if (!mode.beginKeywords) return;
684
+
685
+ // for languages with keywords that include non-word characters checking for
686
+ // a word boundary is not sufficient, so instead we check for a word boundary
687
+ // or whitespace - this does no harm in any case since our keyword engine
688
+ // doesn't allow spaces in keywords anyways and we still check for the boundary
689
+ // first
690
+ mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\.)(?=\\b|\\s)';
691
+ mode.__beforeBegin = skipIfhasPrecedingDot;
692
+ mode.keywords = mode.keywords || mode.beginKeywords;
693
+ delete mode.beginKeywords;
694
+
695
+ // prevents double relevance, the keywords themselves provide
696
+ // relevance, the mode doesn't need to double it
697
+ // eslint-disable-next-line no-undefined
698
+ if (mode.relevance === undefined) mode.relevance = 0;
699
+ }
700
+
701
+ /**
702
+ * Allow `illegal` to contain an array of illegal values
703
+ * @type {CompilerExt}
704
+ */
705
+ function compileIllegal(mode, _parent) {
706
+ if (!Array.isArray(mode.illegal)) return;
707
+
708
+ mode.illegal = either(...mode.illegal);
709
+ }
710
+
711
+ /**
712
+ * `match` to match a single expression for readability
713
+ * @type {CompilerExt}
714
+ */
715
+ function compileMatch(mode, _parent) {
716
+ if (!mode.match) return;
717
+ if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
718
+
719
+ mode.begin = mode.match;
720
+ delete mode.match;
721
+ }
722
+
723
+ /**
724
+ * provides the default 1 relevance to all modes
725
+ * @type {CompilerExt}
726
+ */
727
+ function compileRelevance(mode, _parent) {
728
+ // eslint-disable-next-line no-undefined
729
+ if (mode.relevance === undefined) mode.relevance = 1;
730
+ }
731
+
732
+ // keywords that should have no default relevance value
733
+ const COMMON_KEYWORDS = [
734
+ 'of',
735
+ 'and',
736
+ 'for',
737
+ 'in',
738
+ 'not',
739
+ 'or',
740
+ 'if',
741
+ 'then',
742
+ 'parent', // common variable name
743
+ 'list', // common variable name
744
+ 'value' // common variable name
745
+ ];
746
+
747
+ const DEFAULT_KEYWORD_CLASSNAME = "keyword";
748
+
749
+ /**
750
+ * Given raw keywords from a language definition, compile them.
751
+ *
752
+ * @param {string | Record<string,string|string[]> | Array<string>} rawKeywords
753
+ * @param {boolean} caseInsensitive
754
+ */
755
+ function compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {
756
+ /** @type KeywordDict */
757
+ const compiledKeywords = {};
758
+
759
+ // input can be a string of keywords, an array of keywords, or a object with
760
+ // named keys representing className (which can then point to a string or array)
761
+ if (typeof rawKeywords === 'string') {
762
+ compileList(className, rawKeywords.split(" "));
763
+ } else if (Array.isArray(rawKeywords)) {
764
+ compileList(className, rawKeywords);
765
+ } else {
766
+ Object.keys(rawKeywords).forEach(function(className) {
767
+ // collapse all our objects back into the parent object
768
+ Object.assign(
769
+ compiledKeywords,
770
+ compileKeywords(rawKeywords[className], caseInsensitive, className)
771
+ );
772
+ });
773
+ }
774
+ return compiledKeywords;
775
+
776
+ // ---
777
+
778
+ /**
779
+ * Compiles an individual list of keywords
780
+ *
781
+ * Ex: "for if when while|5"
782
+ *
783
+ * @param {string} className
784
+ * @param {Array<string>} keywordList
785
+ */
786
+ function compileList(className, keywordList) {
787
+ if (caseInsensitive) {
788
+ keywordList = keywordList.map(x => x.toLowerCase());
789
+ }
790
+ keywordList.forEach(function(keyword) {
791
+ const pair = keyword.split('|');
792
+ compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];
793
+ });
794
+ }
795
+ }
796
+
797
+ /**
798
+ * Returns the proper score for a given keyword
799
+ *
800
+ * Also takes into account comment keywords, which will be scored 0 UNLESS
801
+ * another score has been manually assigned.
802
+ * @param {string} keyword
803
+ * @param {string} [providedScore]
804
+ */
805
+ function scoreForKeyword(keyword, providedScore) {
806
+ // manual scores always win over common keywords
807
+ // so you can force a score of 1 if you really insist
808
+ if (providedScore) {
809
+ return Number(providedScore);
810
+ }
811
+
812
+ return commonKeyword(keyword) ? 0 : 1;
813
+ }
814
+
815
+ /**
816
+ * Determines if a given keyword is common or not
817
+ *
818
+ * @param {string} keyword */
819
+ function commonKeyword(keyword) {
820
+ return COMMON_KEYWORDS.includes(keyword.toLowerCase());
821
+ }
822
+
823
+ // compilation
824
+
825
+ /**
826
+ * Compiles a language definition result
827
+ *
828
+ * Given the raw result of a language definition (Language), compiles this so
829
+ * that it is ready for highlighting code.
830
+ * @param {Language} language
831
+ * @param {{plugins: HLJSPlugin[]}} opts
832
+ * @returns {CompiledLanguage}
833
+ */
834
+ function compileLanguage(language, { plugins }) {
835
+ /**
836
+ * Builds a regex with the case sensativility of the current language
837
+ *
838
+ * @param {RegExp | string} value
839
+ * @param {boolean} [global]
840
+ */
841
+ function langRe(value, global) {
842
+ return new RegExp(
843
+ source(value),
844
+ 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')
845
+ );
846
+ }
847
+
848
+ /**
849
+ Stores multiple regular expressions and allows you to quickly search for
850
+ them all in a string simultaneously - returning the first match. It does
851
+ this by creating a huge (a|b|c) regex - each individual item wrapped with ()
852
+ and joined by `|` - using match groups to track position. When a match is
853
+ found checking which position in the array has content allows us to figure
854
+ out which of the original regexes / match groups triggered the match.
855
+
856
+ The match object itself (the result of `Regex.exec`) is returned but also
857
+ enhanced by merging in any meta-data that was registered with the regex.
858
+ This is how we keep track of which mode matched, and what type of rule
859
+ (`illegal`, `begin`, end, etc).
860
+ */
861
+ class MultiRegex {
862
+ constructor() {
863
+ this.matchIndexes = {};
864
+ // @ts-ignore
865
+ this.regexes = [];
866
+ this.matchAt = 1;
867
+ this.position = 0;
868
+ }
869
+
870
+ // @ts-ignore
871
+ addRule(re, opts) {
872
+ opts.position = this.position++;
873
+ // @ts-ignore
874
+ this.matchIndexes[this.matchAt] = opts;
875
+ this.regexes.push([opts, re]);
876
+ this.matchAt += countMatchGroups(re) + 1;
877
+ }
878
+
879
+ compile() {
880
+ if (this.regexes.length === 0) {
881
+ // avoids the need to check length every time exec is called
882
+ // @ts-ignore
883
+ this.exec = () => null;
884
+ }
885
+ const terminators = this.regexes.map(el => el[1]);
886
+ this.matcherRe = langRe(join(terminators), true);
887
+ this.lastIndex = 0;
888
+ }
889
+
890
+ /** @param {string} s */
891
+ exec(s) {
892
+ this.matcherRe.lastIndex = this.lastIndex;
893
+ const match = this.matcherRe.exec(s);
894
+ if (!match) { return null; }
895
+
896
+ // eslint-disable-next-line no-undefined
897
+ const i = match.findIndex((el, i) => i > 0 && el !== undefined);
898
+ // @ts-ignore
899
+ const matchData = this.matchIndexes[i];
900
+ // trim off any earlier non-relevant match groups (ie, the other regex
901
+ // match groups that make up the multi-matcher)
902
+ match.splice(0, i);
903
+
904
+ return Object.assign(match, matchData);
905
+ }
906
+ }
907
+
908
+ /*
909
+ Created to solve the key deficiently with MultiRegex - there is no way to
910
+ test for multiple matches at a single location. Why would we need to do
911
+ that? In the future a more dynamic engine will allow certain matches to be
912
+ ignored. An example: if we matched say the 3rd regex in a large group but
913
+ decided to ignore it - we'd need to started testing again at the 4th
914
+ regex... but MultiRegex itself gives us no real way to do that.
915
+
916
+ So what this class creates MultiRegexs on the fly for whatever search
917
+ position they are needed.
918
+
919
+ NOTE: These additional MultiRegex objects are created dynamically. For most
920
+ grammars most of the time we will never actually need anything more than the
921
+ first MultiRegex - so this shouldn't have too much overhead.
922
+
923
+ Say this is our search group, and we match regex3, but wish to ignore it.
924
+
925
+ regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0
926
+
927
+ What we need is a new MultiRegex that only includes the remaining
928
+ possibilities:
929
+
930
+ regex4 | regex5 ' ie, startAt = 3
931
+
932
+ This class wraps all that complexity up in a simple API... `startAt` decides
933
+ where in the array of expressions to start doing the matching. It
934
+ auto-increments, so if a match is found at position 2, then startAt will be
935
+ set to 3. If the end is reached startAt will return to 0.
936
+
937
+ MOST of the time the parser will be setting startAt manually to 0.
938
+ */
939
+ class ResumableMultiRegex {
940
+ constructor() {
941
+ // @ts-ignore
942
+ this.rules = [];
943
+ // @ts-ignore
944
+ this.multiRegexes = [];
945
+ this.count = 0;
946
+
947
+ this.lastIndex = 0;
948
+ this.regexIndex = 0;
949
+ }
950
+
951
+ // @ts-ignore
952
+ getMatcher(index) {
953
+ if (this.multiRegexes[index]) return this.multiRegexes[index];
954
+
955
+ const matcher = new MultiRegex();
956
+ this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
957
+ matcher.compile();
958
+ this.multiRegexes[index] = matcher;
959
+ return matcher;
960
+ }
961
+
962
+ resumingScanAtSamePosition() {
963
+ return this.regexIndex !== 0;
964
+ }
965
+
966
+ considerAll() {
967
+ this.regexIndex = 0;
968
+ }
969
+
970
+ // @ts-ignore
971
+ addRule(re, opts) {
972
+ this.rules.push([re, opts]);
973
+ if (opts.type === "begin") this.count++;
974
+ }
975
+
976
+ /** @param {string} s */
977
+ exec(s) {
978
+ const m = this.getMatcher(this.regexIndex);
979
+ m.lastIndex = this.lastIndex;
980
+ let result = m.exec(s);
981
+
982
+ // The following is because we have no easy way to say "resume scanning at the
983
+ // existing position but also skip the current rule ONLY". What happens is
984
+ // all prior rules are also skipped which can result in matching the wrong
985
+ // thing. Example of matching "booger":
986
+
987
+ // our matcher is [string, "booger", number]
988
+ //
989
+ // ....booger....
990
+
991
+ // if "booger" is ignored then we'd really need a regex to scan from the
992
+ // SAME position for only: [string, number] but ignoring "booger" (if it
993
+ // was the first match), a simple resume would scan ahead who knows how
994
+ // far looking only for "number", ignoring potential string matches (or
995
+ // future "booger" matches that might be valid.)
996
+
997
+ // So what we do: We execute two matchers, one resuming at the same
998
+ // position, but the second full matcher starting at the position after:
999
+
1000
+ // /--- resume first regex match here (for [number])
1001
+ // |/---- full match here for [string, "booger", number]
1002
+ // vv
1003
+ // ....booger....
1004
+
1005
+ // Which ever results in a match first is then used. So this 3-4 step
1006
+ // process essentially allows us to say "match at this position, excluding
1007
+ // a prior rule that was ignored".
1008
+ //
1009
+ // 1. Match "booger" first, ignore. Also proves that [string] does non match.
1010
+ // 2. Resume matching for [number]
1011
+ // 3. Match at index + 1 for [string, "booger", number]
1012
+ // 4. If #2 and #3 result in matches, which came first?
1013
+ if (this.resumingScanAtSamePosition()) {
1014
+ if (result && result.index === this.lastIndex) ; else { // use the second matcher result
1015
+ const m2 = this.getMatcher(0);
1016
+ m2.lastIndex = this.lastIndex + 1;
1017
+ result = m2.exec(s);
1018
+ }
1019
+ }
1020
+
1021
+ if (result) {
1022
+ this.regexIndex += result.position + 1;
1023
+ if (this.regexIndex === this.count) {
1024
+ // wrap-around to considering all matches again
1025
+ this.considerAll();
1026
+ }
1027
+ }
1028
+
1029
+ return result;
1030
+ }
1031
+ }
1032
+
1033
+ /**
1034
+ * Given a mode, builds a huge ResumableMultiRegex that can be used to walk
1035
+ * the content and find matches.
1036
+ *
1037
+ * @param {CompiledMode} mode
1038
+ * @returns {ResumableMultiRegex}
1039
+ */
1040
+ function buildModeRegex(mode) {
1041
+ const mm = new ResumableMultiRegex();
1042
+
1043
+ mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: "begin" }));
1044
+
1045
+ if (mode.terminatorEnd) {
1046
+ mm.addRule(mode.terminatorEnd, { type: "end" });
1047
+ }
1048
+ if (mode.illegal) {
1049
+ mm.addRule(mode.illegal, { type: "illegal" });
1050
+ }
1051
+
1052
+ return mm;
1053
+ }
1054
+
1055
+ /** skip vs abort vs ignore
1056
+ *
1057
+ * @skip - The mode is still entered and exited normally (and contains rules apply),
1058
+ * but all content is held and added to the parent buffer rather than being
1059
+ * output when the mode ends. Mostly used with `sublanguage` to build up
1060
+ * a single large buffer than can be parsed by sublanguage.
1061
+ *
1062
+ * - The mode begin ands ends normally.
1063
+ * - Content matched is added to the parent mode buffer.
1064
+ * - The parser cursor is moved forward normally.
1065
+ *
1066
+ * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it
1067
+ * never matched) but DOES NOT continue to match subsequent `contains`
1068
+ * modes. Abort is bad/suboptimal because it can result in modes
1069
+ * farther down not getting applied because an earlier rule eats the
1070
+ * content but then aborts.
1071
+ *
1072
+ * - The mode does not begin.
1073
+ * - Content matched by `begin` is added to the mode buffer.
1074
+ * - The parser cursor is moved forward accordingly.
1075
+ *
1076
+ * @ignore - Ignores the mode (as if it never matched) and continues to match any
1077
+ * subsequent `contains` modes. Ignore isn't technically possible with
1078
+ * the current parser implementation.
1079
+ *
1080
+ * - The mode does not begin.
1081
+ * - Content matched by `begin` is ignored.
1082
+ * - The parser cursor is not moved forward.
1083
+ */
1084
+
1085
+ /**
1086
+ * Compiles an individual mode
1087
+ *
1088
+ * This can raise an error if the mode contains certain detectable known logic
1089
+ * issues.
1090
+ * @param {Mode} mode
1091
+ * @param {CompiledMode | null} [parent]
1092
+ * @returns {CompiledMode | never}
1093
+ */
1094
+ function compileMode(mode, parent) {
1095
+ const cmode = /** @type CompiledMode */ (mode);
1096
+ if (mode.isCompiled) return cmode;
1097
+
1098
+ [
1099
+ // do this early so compiler extensions generally don't have to worry about
1100
+ // the distinction between match/begin
1101
+ compileMatch
1102
+ ].forEach(ext => ext(mode, parent));
1103
+
1104
+ language.compilerExtensions.forEach(ext => ext(mode, parent));
1105
+
1106
+ // __beforeBegin is considered private API, internal use only
1107
+ mode.__beforeBegin = null;
1108
+
1109
+ [
1110
+ beginKeywords,
1111
+ // do this later so compiler extensions that come earlier have access to the
1112
+ // raw array if they wanted to perhaps manipulate it, etc.
1113
+ compileIllegal,
1114
+ // default to 1 relevance if not specified
1115
+ compileRelevance
1116
+ ].forEach(ext => ext(mode, parent));
1117
+
1118
+ mode.isCompiled = true;
1119
+
1120
+ let keywordPattern = null;
1121
+ if (typeof mode.keywords === "object") {
1122
+ keywordPattern = mode.keywords.$pattern;
1123
+ delete mode.keywords.$pattern;
1124
+ }
1125
+
1126
+ if (mode.keywords) {
1127
+ mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
1128
+ }
1129
+
1130
+ // both are not allowed
1131
+ if (mode.lexemes && keywordPattern) {
1132
+ throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");
1133
+ }
1134
+
1135
+ // `mode.lexemes` was the old standard before we added and now recommend
1136
+ // using `keywords.$pattern` to pass the keyword pattern
1137
+ keywordPattern = keywordPattern || mode.lexemes || /\w+/;
1138
+ cmode.keywordPatternRe = langRe(keywordPattern, true);
1139
+
1140
+ if (parent) {
1141
+ if (!mode.begin) mode.begin = /\B|\b/;
1142
+ cmode.beginRe = langRe(mode.begin);
1143
+ if (mode.endSameAsBegin) mode.end = mode.begin;
1144
+ if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
1145
+ if (mode.end) cmode.endRe = langRe(mode.end);
1146
+ cmode.terminatorEnd = source(mode.end) || '';
1147
+ if (mode.endsWithParent && parent.terminatorEnd) {
1148
+ cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;
1149
+ }
1150
+ }
1151
+ if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));
1152
+ if (!mode.contains) mode.contains = [];
1153
+
1154
+ mode.contains = [].concat(...mode.contains.map(function(c) {
1155
+ return expandOrCloneMode(c === 'self' ? mode : c);
1156
+ }));
1157
+ mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });
1158
+
1159
+ if (mode.starts) {
1160
+ compileMode(mode.starts, parent);
1161
+ }
1162
+
1163
+ cmode.matcher = buildModeRegex(cmode);
1164
+ return cmode;
1165
+ }
1166
+
1167
+ if (!language.compilerExtensions) language.compilerExtensions = [];
1168
+
1169
+ // self is not valid at the top-level
1170
+ if (language.contains && language.contains.includes('self')) {
1171
+ throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
1172
+ }
1173
+
1174
+ // we need a null object, which inherit will guarantee
1175
+ language.classNameAliases = inherit(language.classNameAliases || {});
1176
+
1177
+ return compileMode(/** @type Mode */ (language));
1178
+ }
1179
+
1180
+ /**
1181
+ * Determines if a mode has a dependency on it's parent or not
1182
+ *
1183
+ * If a mode does have a parent dependency then often we need to clone it if
1184
+ * it's used in multiple places so that each copy points to the correct parent,
1185
+ * where-as modes without a parent can often safely be re-used at the bottom of
1186
+ * a mode chain.
1187
+ *
1188
+ * @param {Mode | null} mode
1189
+ * @returns {boolean} - is there a dependency on the parent?
1190
+ * */
1191
+ function dependencyOnParent(mode) {
1192
+ if (!mode) return false;
1193
+
1194
+ return mode.endsWithParent || dependencyOnParent(mode.starts);
1195
+ }
1196
+
1197
+ /**
1198
+ * Expands a mode or clones it if necessary
1199
+ *
1200
+ * This is necessary for modes with parental dependenceis (see notes on
1201
+ * `dependencyOnParent`) and for nodes that have `variants` - which must then be
1202
+ * exploded into their own individual modes at compile time.
1203
+ *
1204
+ * @param {Mode} mode
1205
+ * @returns {Mode | Mode[]}
1206
+ * */
1207
+ function expandOrCloneMode(mode) {
1208
+ if (mode.variants && !mode.cachedVariants) {
1209
+ mode.cachedVariants = mode.variants.map(function(variant) {
1210
+ return inherit(mode, { variants: null }, variant);
1211
+ });
1212
+ }
1213
+
1214
+ // EXPAND
1215
+ // if we have variants then essentially "replace" the mode with the variants
1216
+ // this happens in compileMode, where this function is called from
1217
+ if (mode.cachedVariants) {
1218
+ return mode.cachedVariants;
1219
+ }
1220
+
1221
+ // CLONE
1222
+ // if we have dependencies on parents then we need a unique
1223
+ // instance of ourselves, so we can be reused with many
1224
+ // different parents without issue
1225
+ if (dependencyOnParent(mode)) {
1226
+ return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });
1227
+ }
1228
+
1229
+ if (Object.isFrozen(mode)) {
1230
+ return inherit(mode);
1231
+ }
1232
+
1233
+ // no special dependency issues, just return ourselves
1234
+ return mode;
1235
+ }
1236
+
1237
+ var version = "10.7.2";
1238
+
1239
+ // @ts-nocheck
1240
+
1241
+ function hasValueOrEmptyAttribute(value) {
1242
+ return Boolean(value || value === "");
1243
+ }
1244
+
1245
+ function BuildVuePlugin(hljs) {
1246
+ const Component = {
1247
+ props: ["language", "code", "autodetect"],
1248
+ data: function() {
1249
+ return {
1250
+ detectedLanguage: "",
1251
+ unknownLanguage: false
1252
+ };
1253
+ },
1254
+ computed: {
1255
+ className() {
1256
+ if (this.unknownLanguage) return "";
1257
+
1258
+ return "hljs " + this.detectedLanguage;
1259
+ },
1260
+ highlighted() {
1261
+ // no idea what language to use, return raw code
1262
+ if (!this.autoDetect && !hljs.getLanguage(this.language)) {
1263
+ console.warn(`The language "${this.language}" you specified could not be found.`);
1264
+ this.unknownLanguage = true;
1265
+ return escapeHTML(this.code);
1266
+ }
1267
+
1268
+ let result = {};
1269
+ if (this.autoDetect) {
1270
+ result = hljs.highlightAuto(this.code);
1271
+ this.detectedLanguage = result.language;
1272
+ } else {
1273
+ result = hljs.highlight(this.language, this.code, this.ignoreIllegals);
1274
+ this.detectedLanguage = this.language;
1275
+ }
1276
+ return result.value;
1277
+ },
1278
+ autoDetect() {
1279
+ return !this.language || hasValueOrEmptyAttribute(this.autodetect);
1280
+ },
1281
+ ignoreIllegals() {
1282
+ return true;
1283
+ }
1284
+ },
1285
+ // this avoids needing to use a whole Vue compilation pipeline just
1286
+ // to build Highlight.js
1287
+ render(createElement) {
1288
+ return createElement("pre", {}, [
1289
+ createElement("code", {
1290
+ class: this.className,
1291
+ domProps: { innerHTML: this.highlighted }
1292
+ })
1293
+ ]);
1294
+ }
1295
+ // template: `<pre><code :class="className" v-html="highlighted"></code></pre>`
1296
+ };
1297
+
1298
+ const VuePlugin = {
1299
+ install(Vue) {
1300
+ Vue.component('highlightjs', Component);
1301
+ }
1302
+ };
1303
+
1304
+ return { Component, VuePlugin };
1305
+ }
1306
+
1307
+ /* plugin itself */
1308
+
1309
+ /** @type {HLJSPlugin} */
1310
+ const mergeHTMLPlugin = {
1311
+ "after:highlightElement": ({ el, result, text }) => {
1312
+ const originalStream = nodeStream(el);
1313
+ if (!originalStream.length) return;
1314
+
1315
+ const resultNode = document.createElement('div');
1316
+ resultNode.innerHTML = result.value;
1317
+ result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
1318
+ }
1319
+ };
1320
+
1321
+ /* Stream merging support functions */
1322
+
1323
+ /**
1324
+ * @typedef Event
1325
+ * @property {'start'|'stop'} event
1326
+ * @property {number} offset
1327
+ * @property {Node} node
1328
+ */
1329
+
1330
+ /**
1331
+ * @param {Node} node
1332
+ */
1333
+ function tag(node) {
1334
+ return node.nodeName.toLowerCase();
1335
+ }
1336
+
1337
+ /**
1338
+ * @param {Node} node
1339
+ */
1340
+ function nodeStream(node) {
1341
+ /** @type Event[] */
1342
+ const result = [];
1343
+ (function _nodeStream(node, offset) {
1344
+ for (let child = node.firstChild; child; child = child.nextSibling) {
1345
+ if (child.nodeType === 3) {
1346
+ offset += child.nodeValue.length;
1347
+ } else if (child.nodeType === 1) {
1348
+ result.push({
1349
+ event: 'start',
1350
+ offset: offset,
1351
+ node: child
1352
+ });
1353
+ offset = _nodeStream(child, offset);
1354
+ // Prevent void elements from having an end tag that would actually
1355
+ // double them in the output. There are more void elements in HTML
1356
+ // but we list only those realistically expected in code display.
1357
+ if (!tag(child).match(/br|hr|img|input/)) {
1358
+ result.push({
1359
+ event: 'stop',
1360
+ offset: offset,
1361
+ node: child
1362
+ });
1363
+ }
1364
+ }
1365
+ }
1366
+ return offset;
1367
+ })(node, 0);
1368
+ return result;
1369
+ }
1370
+
1371
+ /**
1372
+ * @param {any} original - the original stream
1373
+ * @param {any} highlighted - stream of the highlighted source
1374
+ * @param {string} value - the original source itself
1375
+ */
1376
+ function mergeStreams(original, highlighted, value) {
1377
+ let processed = 0;
1378
+ let result = '';
1379
+ const nodeStack = [];
1380
+
1381
+ function selectStream() {
1382
+ if (!original.length || !highlighted.length) {
1383
+ return original.length ? original : highlighted;
1384
+ }
1385
+ if (original[0].offset !== highlighted[0].offset) {
1386
+ return (original[0].offset < highlighted[0].offset) ? original : highlighted;
1387
+ }
1388
+
1389
+ /*
1390
+ To avoid starting the stream just before it should stop the order is
1391
+ ensured that original always starts first and closes last:
1392
+
1393
+ if (event1 == 'start' && event2 == 'start')
1394
+ return original;
1395
+ if (event1 == 'start' && event2 == 'stop')
1396
+ return highlighted;
1397
+ if (event1 == 'stop' && event2 == 'start')
1398
+ return original;
1399
+ if (event1 == 'stop' && event2 == 'stop')
1400
+ return highlighted;
1401
+
1402
+ ... which is collapsed to:
1403
+ */
1404
+ return highlighted[0].event === 'start' ? original : highlighted;
1405
+ }
1406
+
1407
+ /**
1408
+ * @param {Node} node
1409
+ */
1410
+ function open(node) {
1411
+ /** @param {Attr} attr */
1412
+ function attributeString(attr) {
1413
+ return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"';
1414
+ }
1415
+ // @ts-ignore
1416
+ result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';
1417
+ }
1418
+
1419
+ /**
1420
+ * @param {Node} node
1421
+ */
1422
+ function close(node) {
1423
+ result += '</' + tag(node) + '>';
1424
+ }
1425
+
1426
+ /**
1427
+ * @param {Event} event
1428
+ */
1429
+ function render(event) {
1430
+ (event.event === 'start' ? open : close)(event.node);
1431
+ }
1432
+
1433
+ while (original.length || highlighted.length) {
1434
+ let stream = selectStream();
1435
+ result += escapeHTML(value.substring(processed, stream[0].offset));
1436
+ processed = stream[0].offset;
1437
+ if (stream === original) {
1438
+ /*
1439
+ On any opening or closing tag of the original markup we first close
1440
+ the entire highlighted node stack, then render the original tag along
1441
+ with all the following original tags at the same offset and then
1442
+ reopen all the tags on the highlighted stack.
1443
+ */
1444
+ nodeStack.reverse().forEach(close);
1445
+ do {
1446
+ render(stream.splice(0, 1)[0]);
1447
+ stream = selectStream();
1448
+ } while (stream === original && stream.length && stream[0].offset === processed);
1449
+ nodeStack.reverse().forEach(open);
1450
+ } else {
1451
+ if (stream[0].event === 'start') {
1452
+ nodeStack.push(stream[0].node);
1453
+ } else {
1454
+ nodeStack.pop();
1455
+ }
1456
+ render(stream.splice(0, 1)[0]);
1457
+ }
1458
+ }
1459
+ return result + escapeHTML(value.substr(processed));
1460
+ }
1461
+
1462
+ /*
1463
+
1464
+ For the reasoning behind this please see:
1465
+ https://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419
1466
+
1467
+ */
1468
+
1469
+ /**
1470
+ * @type {Record<string, boolean>}
1471
+ */
1472
+ const seenDeprecations = {};
1473
+
1474
+ /**
1475
+ * @param {string} message
1476
+ */
1477
+ const error = (message) => {
1478
+ console.error(message);
1479
+ };
1480
+
1481
+ /**
1482
+ * @param {string} message
1483
+ * @param {any} args
1484
+ */
1485
+ const warn = (message, ...args) => {
1486
+ console.log(`WARN: ${message}`, ...args);
1487
+ };
1488
+
1489
+ /**
1490
+ * @param {string} version
1491
+ * @param {string} message
1492
+ */
1493
+ const deprecated = (version, message) => {
1494
+ if (seenDeprecations[`${version}/${message}`]) return;
1495
+
1496
+ console.log(`Deprecated as of ${version}. ${message}`);
1497
+ seenDeprecations[`${version}/${message}`] = true;
1498
+ };
1499
+
1500
+ /*
1501
+ Syntax highlighting with language autodetection.
1502
+ https://highlightjs.org/
1503
+ */
1504
+
1505
+ const escape$1 = escapeHTML;
1506
+ const inherit$1 = inherit;
1507
+ const NO_MATCH = Symbol("nomatch");
1508
+
1509
+ /**
1510
+ * @param {any} hljs - object that is extended (legacy)
1511
+ * @returns {HLJSApi}
1512
+ */
1513
+ const HLJS = function(hljs) {
1514
+ // Global internal variables used within the highlight.js library.
1515
+ /** @type {Record<string, Language>} */
1516
+ const languages = Object.create(null);
1517
+ /** @type {Record<string, string>} */
1518
+ const aliases = Object.create(null);
1519
+ /** @type {HLJSPlugin[]} */
1520
+ const plugins = [];
1521
+
1522
+ // safe/production mode - swallows more errors, tries to keep running
1523
+ // even if a single syntax or parse hits a fatal error
1524
+ let SAFE_MODE = true;
1525
+ const fixMarkupRe = /(^(<[^>]+>|\t|)+|\n)/gm;
1526
+ const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
1527
+ /** @type {Language} */
1528
+ const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };
1529
+
1530
+ // Global options used when within external APIs. This is modified when
1531
+ // calling the `hljs.configure` function.
1532
+ /** @type HLJSOptions */
1533
+ let options = {
1534
+ noHighlightRe: /^(no-?highlight)$/i,
1535
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
1536
+ classPrefix: 'hljs-',
1537
+ tabReplace: null,
1538
+ useBR: false,
1539
+ languages: null,
1540
+ // beta configuration options, subject to change, welcome to discuss
1541
+ // https://github.com/highlightjs/highlight.js/issues/1086
1542
+ __emitter: TokenTreeEmitter
1543
+ };
1544
+
1545
+ /* Utility functions */
1546
+
1547
+ /**
1548
+ * Tests a language name to see if highlighting should be skipped
1549
+ * @param {string} languageName
1550
+ */
1551
+ function shouldNotHighlight(languageName) {
1552
+ return options.noHighlightRe.test(languageName);
1553
+ }
1554
+
1555
+ /**
1556
+ * @param {HighlightedHTMLElement} block - the HTML element to determine language for
1557
+ */
1558
+ function blockLanguage(block) {
1559
+ let classes = block.className + ' ';
1560
+
1561
+ classes += block.parentNode ? block.parentNode.className : '';
1562
+
1563
+ // language-* takes precedence over non-prefixed class names.
1564
+ const match = options.languageDetectRe.exec(classes);
1565
+ if (match) {
1566
+ const language = getLanguage(match[1]);
1567
+ if (!language) {
1568
+ warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
1569
+ warn("Falling back to no-highlight mode for this block.", block);
1570
+ }
1571
+ return language ? match[1] : 'no-highlight';
1572
+ }
1573
+
1574
+ return classes
1575
+ .split(/\s+/)
1576
+ .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));
1577
+ }
1578
+
1579
+ /**
1580
+ * Core highlighting function.
1581
+ *
1582
+ * OLD API
1583
+ * highlight(lang, code, ignoreIllegals, continuation)
1584
+ *
1585
+ * NEW API
1586
+ * highlight(code, {lang, ignoreIllegals})
1587
+ *
1588
+ * @param {string} codeOrlanguageName - the language to use for highlighting
1589
+ * @param {string | HighlightOptions} optionsOrCode - the code to highlight
1590
+ * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
1591
+ * @param {CompiledMode} [continuation] - current continuation mode, if any
1592
+ *
1593
+ * @returns {HighlightResult} Result - an object that represents the result
1594
+ * @property {string} language - the language name
1595
+ * @property {number} relevance - the relevance score
1596
+ * @property {string} value - the highlighted HTML code
1597
+ * @property {string} code - the original raw code
1598
+ * @property {CompiledMode} top - top of the current mode stack
1599
+ * @property {boolean} illegal - indicates whether any illegal matches were found
1600
+ */
1601
+ function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {
1602
+ let code = "";
1603
+ let languageName = "";
1604
+ if (typeof optionsOrCode === "object") {
1605
+ code = codeOrlanguageName;
1606
+ ignoreIllegals = optionsOrCode.ignoreIllegals;
1607
+ languageName = optionsOrCode.language;
1608
+ // continuation not supported at all via the new API
1609
+ // eslint-disable-next-line no-undefined
1610
+ continuation = undefined;
1611
+ } else {
1612
+ // old API
1613
+ deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
1614
+ deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
1615
+ languageName = codeOrlanguageName;
1616
+ code = optionsOrCode;
1617
+ }
1618
+
1619
+ /** @type {BeforeHighlightContext} */
1620
+ const context = {
1621
+ code,
1622
+ language: languageName
1623
+ };
1624
+ // the plugin can change the desired language or the code to be highlighted
1625
+ // just be changing the object it was passed
1626
+ fire("before:highlight", context);
1627
+
1628
+ // a before plugin can usurp the result completely by providing it's own
1629
+ // in which case we don't even need to call highlight
1630
+ const result = context.result
1631
+ ? context.result
1632
+ : _highlight(context.language, context.code, ignoreIllegals, continuation);
1633
+
1634
+ result.code = context.code;
1635
+ // the plugin can change anything in result to suite it
1636
+ fire("after:highlight", result);
1637
+
1638
+ return result;
1639
+ }
1640
+
1641
+ /**
1642
+ * private highlight that's used internally and does not fire callbacks
1643
+ *
1644
+ * @param {string} languageName - the language to use for highlighting
1645
+ * @param {string} codeToHighlight - the code to highlight
1646
+ * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
1647
+ * @param {CompiledMode?} [continuation] - current continuation mode, if any
1648
+ * @returns {HighlightResult} - result of the highlight operation
1649
+ */
1650
+ function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
1651
+ /**
1652
+ * Return keyword data if a match is a keyword
1653
+ * @param {CompiledMode} mode - current mode
1654
+ * @param {RegExpMatchArray} match - regexp match data
1655
+ * @returns {KeywordData | false}
1656
+ */
1657
+ function keywordData(mode, match) {
1658
+ const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];
1659
+ return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];
1660
+ }
1661
+
1662
+ function processKeywords() {
1663
+ if (!top.keywords) {
1664
+ emitter.addText(modeBuffer);
1665
+ return;
1666
+ }
1667
+
1668
+ let lastIndex = 0;
1669
+ top.keywordPatternRe.lastIndex = 0;
1670
+ let match = top.keywordPatternRe.exec(modeBuffer);
1671
+ let buf = "";
1672
+
1673
+ while (match) {
1674
+ buf += modeBuffer.substring(lastIndex, match.index);
1675
+ const data = keywordData(top, match);
1676
+ if (data) {
1677
+ const [kind, keywordRelevance] = data;
1678
+ emitter.addText(buf);
1679
+ buf = "";
1680
+
1681
+ relevance += keywordRelevance;
1682
+ if (kind.startsWith("_")) {
1683
+ // _ implied for relevance only, do not highlight
1684
+ // by applying a class name
1685
+ buf += match[0];
1686
+ } else {
1687
+ const cssClass = language.classNameAliases[kind] || kind;
1688
+ emitter.addKeyword(match[0], cssClass);
1689
+ }
1690
+ } else {
1691
+ buf += match[0];
1692
+ }
1693
+ lastIndex = top.keywordPatternRe.lastIndex;
1694
+ match = top.keywordPatternRe.exec(modeBuffer);
1695
+ }
1696
+ buf += modeBuffer.substr(lastIndex);
1697
+ emitter.addText(buf);
1698
+ }
1699
+
1700
+ function processSubLanguage() {
1701
+ if (modeBuffer === "") return;
1702
+ /** @type HighlightResult */
1703
+ let result = null;
1704
+
1705
+ if (typeof top.subLanguage === 'string') {
1706
+ if (!languages[top.subLanguage]) {
1707
+ emitter.addText(modeBuffer);
1708
+ return;
1709
+ }
1710
+ result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
1711
+ continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);
1712
+ } else {
1713
+ result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
1714
+ }
1715
+
1716
+ // Counting embedded language score towards the host language may be disabled
1717
+ // with zeroing the containing mode relevance. Use case in point is Markdown that
1718
+ // allows XML everywhere and makes every XML snippet to have a much larger Markdown
1719
+ // score.
1720
+ if (top.relevance > 0) {
1721
+ relevance += result.relevance;
1722
+ }
1723
+ emitter.addSublanguage(result.emitter, result.language);
1724
+ }
1725
+
1726
+ function processBuffer() {
1727
+ if (top.subLanguage != null) {
1728
+ processSubLanguage();
1729
+ } else {
1730
+ processKeywords();
1731
+ }
1732
+ modeBuffer = '';
1733
+ }
1734
+
1735
+ /**
1736
+ * @param {Mode} mode - new mode to start
1737
+ */
1738
+ function startNewMode(mode) {
1739
+ if (mode.className) {
1740
+ emitter.openNode(language.classNameAliases[mode.className] || mode.className);
1741
+ }
1742
+ top = Object.create(mode, { parent: { value: top } });
1743
+ return top;
1744
+ }
1745
+
1746
+ /**
1747
+ * @param {CompiledMode } mode - the mode to potentially end
1748
+ * @param {RegExpMatchArray} match - the latest match
1749
+ * @param {string} matchPlusRemainder - match plus remainder of content
1750
+ * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode
1751
+ */
1752
+ function endOfMode(mode, match, matchPlusRemainder) {
1753
+ let matched = startsWith(mode.endRe, matchPlusRemainder);
1754
+
1755
+ if (matched) {
1756
+ if (mode["on:end"]) {
1757
+ const resp = new Response(mode);
1758
+ mode["on:end"](match, resp);
1759
+ if (resp.isMatchIgnored) matched = false;
1760
+ }
1761
+
1762
+ if (matched) {
1763
+ while (mode.endsParent && mode.parent) {
1764
+ mode = mode.parent;
1765
+ }
1766
+ return mode;
1767
+ }
1768
+ }
1769
+ // even if on:end fires an `ignore` it's still possible
1770
+ // that we might trigger the end node because of a parent mode
1771
+ if (mode.endsWithParent) {
1772
+ return endOfMode(mode.parent, match, matchPlusRemainder);
1773
+ }
1774
+ }
1775
+
1776
+ /**
1777
+ * Handle matching but then ignoring a sequence of text
1778
+ *
1779
+ * @param {string} lexeme - string containing full match text
1780
+ */
1781
+ function doIgnore(lexeme) {
1782
+ if (top.matcher.regexIndex === 0) {
1783
+ // no more regexs to potentially match here, so we move the cursor forward one
1784
+ // space
1785
+ modeBuffer += lexeme[0];
1786
+ return 1;
1787
+ } else {
1788
+ // no need to move the cursor, we still have additional regexes to try and
1789
+ // match at this very spot
1790
+ resumeScanAtSamePosition = true;
1791
+ return 0;
1792
+ }
1793
+ }
1794
+
1795
+ /**
1796
+ * Handle the start of a new potential mode match
1797
+ *
1798
+ * @param {EnhancedMatch} match - the current match
1799
+ * @returns {number} how far to advance the parse cursor
1800
+ */
1801
+ function doBeginMatch(match) {
1802
+ const lexeme = match[0];
1803
+ const newMode = match.rule;
1804
+
1805
+ const resp = new Response(newMode);
1806
+ // first internal before callbacks, then the public ones
1807
+ const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
1808
+ for (const cb of beforeCallbacks) {
1809
+ if (!cb) continue;
1810
+ cb(match, resp);
1811
+ if (resp.isMatchIgnored) return doIgnore(lexeme);
1812
+ }
1813
+
1814
+ if (newMode && newMode.endSameAsBegin) {
1815
+ newMode.endRe = escape(lexeme);
1816
+ }
1817
+
1818
+ if (newMode.skip) {
1819
+ modeBuffer += lexeme;
1820
+ } else {
1821
+ if (newMode.excludeBegin) {
1822
+ modeBuffer += lexeme;
1823
+ }
1824
+ processBuffer();
1825
+ if (!newMode.returnBegin && !newMode.excludeBegin) {
1826
+ modeBuffer = lexeme;
1827
+ }
1828
+ }
1829
+ startNewMode(newMode);
1830
+ // if (mode["after:begin"]) {
1831
+ // let resp = new Response(mode);
1832
+ // mode["after:begin"](match, resp);
1833
+ // }
1834
+ return newMode.returnBegin ? 0 : lexeme.length;
1835
+ }
1836
+
1837
+ /**
1838
+ * Handle the potential end of mode
1839
+ *
1840
+ * @param {RegExpMatchArray} match - the current match
1841
+ */
1842
+ function doEndMatch(match) {
1843
+ const lexeme = match[0];
1844
+ const matchPlusRemainder = codeToHighlight.substr(match.index);
1845
+
1846
+ const endMode = endOfMode(top, match, matchPlusRemainder);
1847
+ if (!endMode) { return NO_MATCH; }
1848
+
1849
+ const origin = top;
1850
+ if (origin.skip) {
1851
+ modeBuffer += lexeme;
1852
+ } else {
1853
+ if (!(origin.returnEnd || origin.excludeEnd)) {
1854
+ modeBuffer += lexeme;
1855
+ }
1856
+ processBuffer();
1857
+ if (origin.excludeEnd) {
1858
+ modeBuffer = lexeme;
1859
+ }
1860
+ }
1861
+ do {
1862
+ if (top.className) {
1863
+ emitter.closeNode();
1864
+ }
1865
+ if (!top.skip && !top.subLanguage) {
1866
+ relevance += top.relevance;
1867
+ }
1868
+ top = top.parent;
1869
+ } while (top !== endMode.parent);
1870
+ if (endMode.starts) {
1871
+ if (endMode.endSameAsBegin) {
1872
+ endMode.starts.endRe = endMode.endRe;
1873
+ }
1874
+ startNewMode(endMode.starts);
1875
+ }
1876
+ return origin.returnEnd ? 0 : lexeme.length;
1877
+ }
1878
+
1879
+ function processContinuations() {
1880
+ const list = [];
1881
+ for (let current = top; current !== language; current = current.parent) {
1882
+ if (current.className) {
1883
+ list.unshift(current.className);
1884
+ }
1885
+ }
1886
+ list.forEach(item => emitter.openNode(item));
1887
+ }
1888
+
1889
+ /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */
1890
+ let lastMatch = {};
1891
+
1892
+ /**
1893
+ * Process an individual match
1894
+ *
1895
+ * @param {string} textBeforeMatch - text preceeding the match (since the last match)
1896
+ * @param {EnhancedMatch} [match] - the match itself
1897
+ */
1898
+ function processLexeme(textBeforeMatch, match) {
1899
+ const lexeme = match && match[0];
1900
+
1901
+ // add non-matched text to the current mode buffer
1902
+ modeBuffer += textBeforeMatch;
1903
+
1904
+ if (lexeme == null) {
1905
+ processBuffer();
1906
+ return 0;
1907
+ }
1908
+
1909
+ // we've found a 0 width match and we're stuck, so we need to advance
1910
+ // this happens when we have badly behaved rules that have optional matchers to the degree that
1911
+ // sometimes they can end up matching nothing at all
1912
+ // Ref: https://github.com/highlightjs/highlight.js/issues/2140
1913
+ if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
1914
+ // spit the "skipped" character that our regex choked on back into the output sequence
1915
+ modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
1916
+ if (!SAFE_MODE) {
1917
+ /** @type {AnnotatedError} */
1918
+ const err = new Error('0 width match regex');
1919
+ err.languageName = languageName;
1920
+ err.badRule = lastMatch.rule;
1921
+ throw err;
1922
+ }
1923
+ return 1;
1924
+ }
1925
+ lastMatch = match;
1926
+
1927
+ if (match.type === "begin") {
1928
+ return doBeginMatch(match);
1929
+ } else if (match.type === "illegal" && !ignoreIllegals) {
1930
+ // illegal match, we do not continue processing
1931
+ /** @type {AnnotatedError} */
1932
+ const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
1933
+ err.mode = top;
1934
+ throw err;
1935
+ } else if (match.type === "end") {
1936
+ const processed = doEndMatch(match);
1937
+ if (processed !== NO_MATCH) {
1938
+ return processed;
1939
+ }
1940
+ }
1941
+
1942
+ // edge case for when illegal matches $ (end of line) which is technically
1943
+ // a 0 width match but not a begin/end match so it's not caught by the
1944
+ // first handler (when ignoreIllegals is true)
1945
+ if (match.type === "illegal" && lexeme === "") {
1946
+ // advance so we aren't stuck in an infinite loop
1947
+ return 1;
1948
+ }
1949
+
1950
+ // infinite loops are BAD, this is a last ditch catch all. if we have a
1951
+ // decent number of iterations yet our index (cursor position in our
1952
+ // parsing) still 3x behind our index then something is very wrong
1953
+ // so we bail
1954
+ if (iterations > 100000 && iterations > match.index * 3) {
1955
+ const err = new Error('potential infinite loop, way more iterations than matches');
1956
+ throw err;
1957
+ }
1958
+
1959
+ /*
1960
+ Why might be find ourselves here? Only one occasion now. An end match that was
1961
+ triggered but could not be completed. When might this happen? When an `endSameasBegin`
1962
+ rule sets the end rule to a specific match. Since the overall mode termination rule that's
1963
+ being used to scan the text isn't recompiled that means that any match that LOOKS like
1964
+ the end (but is not, because it is not an exact match to the beginning) will
1965
+ end up here. A definite end match, but when `doEndMatch` tries to "reapply"
1966
+ the end rule and fails to match, we wind up here, and just silently ignore the end.
1967
+
1968
+ This causes no real harm other than stopping a few times too many.
1969
+ */
1970
+
1971
+ modeBuffer += lexeme;
1972
+ return lexeme.length;
1973
+ }
1974
+
1975
+ const language = getLanguage(languageName);
1976
+ if (!language) {
1977
+ error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
1978
+ throw new Error('Unknown language: "' + languageName + '"');
1979
+ }
1980
+
1981
+ const md = compileLanguage(language, { plugins });
1982
+ let result = '';
1983
+ /** @type {CompiledMode} */
1984
+ let top = continuation || md;
1985
+ /** @type Record<string,CompiledMode> */
1986
+ const continuations = {}; // keep continuations for sub-languages
1987
+ const emitter = new options.__emitter(options);
1988
+ processContinuations();
1989
+ let modeBuffer = '';
1990
+ let relevance = 0;
1991
+ let index = 0;
1992
+ let iterations = 0;
1993
+ let resumeScanAtSamePosition = false;
1994
+
1995
+ try {
1996
+ top.matcher.considerAll();
1997
+
1998
+ for (;;) {
1999
+ iterations++;
2000
+ if (resumeScanAtSamePosition) {
2001
+ // only regexes not matched previously will now be
2002
+ // considered for a potential match
2003
+ resumeScanAtSamePosition = false;
2004
+ } else {
2005
+ top.matcher.considerAll();
2006
+ }
2007
+ top.matcher.lastIndex = index;
2008
+
2009
+ const match = top.matcher.exec(codeToHighlight);
2010
+ // console.log("match", match[0], match.rule && match.rule.begin)
2011
+
2012
+ if (!match) break;
2013
+
2014
+ const beforeMatch = codeToHighlight.substring(index, match.index);
2015
+ const processedCount = processLexeme(beforeMatch, match);
2016
+ index = match.index + processedCount;
2017
+ }
2018
+ processLexeme(codeToHighlight.substr(index));
2019
+ emitter.closeAllNodes();
2020
+ emitter.finalize();
2021
+ result = emitter.toHTML();
2022
+
2023
+ return {
2024
+ // avoid possible breakage with v10 clients expecting
2025
+ // this to always be an integer
2026
+ relevance: Math.floor(relevance),
2027
+ value: result,
2028
+ language: languageName,
2029
+ illegal: false,
2030
+ emitter: emitter,
2031
+ top: top
2032
+ };
2033
+ } catch (err) {
2034
+ if (err.message && err.message.includes('Illegal')) {
2035
+ return {
2036
+ illegal: true,
2037
+ illegalBy: {
2038
+ msg: err.message,
2039
+ context: codeToHighlight.slice(index - 100, index + 100),
2040
+ mode: err.mode
2041
+ },
2042
+ sofar: result,
2043
+ relevance: 0,
2044
+ value: escape$1(codeToHighlight),
2045
+ emitter: emitter
2046
+ };
2047
+ } else if (SAFE_MODE) {
2048
+ return {
2049
+ illegal: false,
2050
+ relevance: 0,
2051
+ value: escape$1(codeToHighlight),
2052
+ emitter: emitter,
2053
+ language: languageName,
2054
+ top: top,
2055
+ errorRaised: err
2056
+ };
2057
+ } else {
2058
+ throw err;
2059
+ }
2060
+ }
2061
+ }
2062
+
2063
+ /**
2064
+ * returns a valid highlight result, without actually doing any actual work,
2065
+ * auto highlight starts with this and it's possible for small snippets that
2066
+ * auto-detection may not find a better match
2067
+ * @param {string} code
2068
+ * @returns {HighlightResult}
2069
+ */
2070
+ function justTextHighlightResult(code) {
2071
+ const result = {
2072
+ relevance: 0,
2073
+ emitter: new options.__emitter(options),
2074
+ value: escape$1(code),
2075
+ illegal: false,
2076
+ top: PLAINTEXT_LANGUAGE
2077
+ };
2078
+ result.emitter.addText(code);
2079
+ return result;
2080
+ }
2081
+
2082
+ /**
2083
+ Highlighting with language detection. Accepts a string with the code to
2084
+ highlight. Returns an object with the following properties:
2085
+
2086
+ - language (detected language)
2087
+ - relevance (int)
2088
+ - value (an HTML string with highlighting markup)
2089
+ - second_best (object with the same structure for second-best heuristically
2090
+ detected language, may be absent)
2091
+
2092
+ @param {string} code
2093
+ @param {Array<string>} [languageSubset]
2094
+ @returns {AutoHighlightResult}
2095
+ */
2096
+ function highlightAuto(code, languageSubset) {
2097
+ languageSubset = languageSubset || options.languages || Object.keys(languages);
2098
+ const plaintext = justTextHighlightResult(code);
2099
+
2100
+ const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>
2101
+ _highlight(name, code, false)
2102
+ );
2103
+ results.unshift(plaintext); // plaintext is always an option
2104
+
2105
+ const sorted = results.sort((a, b) => {
2106
+ // sort base on relevance
2107
+ if (a.relevance !== b.relevance) return b.relevance - a.relevance;
2108
+
2109
+ // always award the tie to the base language
2110
+ // ie if C++ and Arduino are tied, it's more likely to be C++
2111
+ if (a.language && b.language) {
2112
+ if (getLanguage(a.language).supersetOf === b.language) {
2113
+ return 1;
2114
+ } else if (getLanguage(b.language).supersetOf === a.language) {
2115
+ return -1;
2116
+ }
2117
+ }
2118
+
2119
+ // otherwise say they are equal, which has the effect of sorting on
2120
+ // relevance while preserving the original ordering - which is how ties
2121
+ // have historically been settled, ie the language that comes first always
2122
+ // wins in the case of a tie
2123
+ return 0;
2124
+ });
2125
+
2126
+ const [best, secondBest] = sorted;
2127
+
2128
+ /** @type {AutoHighlightResult} */
2129
+ const result = best;
2130
+ result.second_best = secondBest;
2131
+
2132
+ return result;
2133
+ }
2134
+
2135
+ /**
2136
+ Post-processing of the highlighted markup:
2137
+
2138
+ - replace TABs with something more useful
2139
+ - replace real line-breaks with '<br>' for non-pre containers
2140
+
2141
+ @param {string} html
2142
+ @returns {string}
2143
+ */
2144
+ function fixMarkup(html) {
2145
+ if (!(options.tabReplace || options.useBR)) {
2146
+ return html;
2147
+ }
2148
+
2149
+ return html.replace(fixMarkupRe, match => {
2150
+ if (match === '\n') {
2151
+ return options.useBR ? '<br>' : match;
2152
+ } else if (options.tabReplace) {
2153
+ return match.replace(/\t/g, options.tabReplace);
2154
+ }
2155
+ return match;
2156
+ });
2157
+ }
2158
+
2159
+ /**
2160
+ * Builds new class name for block given the language name
2161
+ *
2162
+ * @param {HTMLElement} element
2163
+ * @param {string} [currentLang]
2164
+ * @param {string} [resultLang]
2165
+ */
2166
+ function updateClassName(element, currentLang, resultLang) {
2167
+ const language = currentLang ? aliases[currentLang] : resultLang;
2168
+
2169
+ element.classList.add("hljs");
2170
+ if (language) element.classList.add(language);
2171
+ }
2172
+
2173
+ /** @type {HLJSPlugin} */
2174
+ const brPlugin = {
2175
+ "before:highlightElement": ({ el }) => {
2176
+ if (options.useBR) {
2177
+ el.innerHTML = el.innerHTML.replace(/\n/g, '').replace(/<br[ /]*>/g, '\n');
2178
+ }
2179
+ },
2180
+ "after:highlightElement": ({ result }) => {
2181
+ if (options.useBR) {
2182
+ result.value = result.value.replace(/\n/g, "<br>");
2183
+ }
2184
+ }
2185
+ };
2186
+
2187
+ const TAB_REPLACE_RE = /^(<[^>]+>|\t)+/gm;
2188
+ /** @type {HLJSPlugin} */
2189
+ const tabReplacePlugin = {
2190
+ "after:highlightElement": ({ result }) => {
2191
+ if (options.tabReplace) {
2192
+ result.value = result.value.replace(TAB_REPLACE_RE, (m) =>
2193
+ m.replace(/\t/g, options.tabReplace)
2194
+ );
2195
+ }
2196
+ }
2197
+ };
2198
+
2199
+ /**
2200
+ * Applies highlighting to a DOM node containing code. Accepts a DOM node and
2201
+ * two optional parameters for fixMarkup.
2202
+ *
2203
+ * @param {HighlightedHTMLElement} element - the HTML element to highlight
2204
+ */
2205
+ function highlightElement(element) {
2206
+ /** @type HTMLElement */
2207
+ let node = null;
2208
+ const language = blockLanguage(element);
2209
+
2210
+ if (shouldNotHighlight(language)) return;
2211
+
2212
+ // support for v10 API
2213
+ fire("before:highlightElement",
2214
+ { el: element, language: language });
2215
+
2216
+ node = element;
2217
+ const text = node.textContent;
2218
+ const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);
2219
+
2220
+ // support for v10 API
2221
+ fire("after:highlightElement", { el: element, result, text });
2222
+
2223
+ element.innerHTML = result.value;
2224
+ updateClassName(element, language, result.language);
2225
+ element.result = {
2226
+ language: result.language,
2227
+ // TODO: remove with version 11.0
2228
+ re: result.relevance,
2229
+ relavance: result.relevance
2230
+ };
2231
+ if (result.second_best) {
2232
+ element.second_best = {
2233
+ language: result.second_best.language,
2234
+ // TODO: remove with version 11.0
2235
+ re: result.second_best.relevance,
2236
+ relavance: result.second_best.relevance
2237
+ };
2238
+ }
2239
+ }
2240
+
2241
+ /**
2242
+ * Updates highlight.js global options with the passed options
2243
+ *
2244
+ * @param {Partial<HLJSOptions>} userOptions
2245
+ */
2246
+ function configure(userOptions) {
2247
+ if (userOptions.useBR) {
2248
+ deprecated("10.3.0", "'useBR' will be removed entirely in v11.0");
2249
+ deprecated("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559");
2250
+ }
2251
+ options = inherit$1(options, userOptions);
2252
+ }
2253
+
2254
+ /**
2255
+ * Highlights to all <pre><code> blocks on a page
2256
+ *
2257
+ * @type {Function & {called?: boolean}}
2258
+ */
2259
+ // TODO: remove v12, deprecated
2260
+ const initHighlighting = () => {
2261
+ if (initHighlighting.called) return;
2262
+ initHighlighting.called = true;
2263
+
2264
+ deprecated("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead.");
2265
+
2266
+ const blocks = document.querySelectorAll('pre code');
2267
+ blocks.forEach(highlightElement);
2268
+ };
2269
+
2270
+ // Higlights all when DOMContentLoaded fires
2271
+ // TODO: remove v12, deprecated
2272
+ function initHighlightingOnLoad() {
2273
+ deprecated("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead.");
2274
+ wantsHighlight = true;
2275
+ }
2276
+
2277
+ let wantsHighlight = false;
2278
+
2279
+ /**
2280
+ * auto-highlights all pre>code elements on the page
2281
+ */
2282
+ function highlightAll() {
2283
+ // if we are called too early in the loading process
2284
+ if (document.readyState === "loading") {
2285
+ wantsHighlight = true;
2286
+ return;
2287
+ }
2288
+
2289
+ const blocks = document.querySelectorAll('pre code');
2290
+ blocks.forEach(highlightElement);
2291
+ }
2292
+
2293
+ function boot() {
2294
+ // if a highlight was requested before DOM was loaded, do now
2295
+ if (wantsHighlight) highlightAll();
2296
+ }
2297
+
2298
+ // make sure we are in the browser environment
2299
+ if (typeof window !== 'undefined' && window.addEventListener) {
2300
+ window.addEventListener('DOMContentLoaded', boot, false);
2301
+ }
2302
+
2303
+ /**
2304
+ * Register a language grammar module
2305
+ *
2306
+ * @param {string} languageName
2307
+ * @param {LanguageFn} languageDefinition
2308
+ */
2309
+ function registerLanguage(languageName, languageDefinition) {
2310
+ let lang = null;
2311
+ try {
2312
+ lang = languageDefinition(hljs);
2313
+ } catch (error$1) {
2314
+ error("Language definition for '{}' could not be registered.".replace("{}", languageName));
2315
+ // hard or soft error
2316
+ if (!SAFE_MODE) { throw error$1; } else { error(error$1); }
2317
+ // languages that have serious errors are replaced with essentially a
2318
+ // "plaintext" stand-in so that the code blocks will still get normal
2319
+ // css classes applied to them - and one bad language won't break the
2320
+ // entire highlighter
2321
+ lang = PLAINTEXT_LANGUAGE;
2322
+ }
2323
+ // give it a temporary name if it doesn't have one in the meta-data
2324
+ if (!lang.name) lang.name = languageName;
2325
+ languages[languageName] = lang;
2326
+ lang.rawDefinition = languageDefinition.bind(null, hljs);
2327
+
2328
+ if (lang.aliases) {
2329
+ registerAliases(lang.aliases, { languageName });
2330
+ }
2331
+ }
2332
+
2333
+ /**
2334
+ * Remove a language grammar module
2335
+ *
2336
+ * @param {string} languageName
2337
+ */
2338
+ function unregisterLanguage(languageName) {
2339
+ delete languages[languageName];
2340
+ for (const alias of Object.keys(aliases)) {
2341
+ if (aliases[alias] === languageName) {
2342
+ delete aliases[alias];
2343
+ }
2344
+ }
2345
+ }
2346
+
2347
+ /**
2348
+ * @returns {string[]} List of language internal names
2349
+ */
2350
+ function listLanguages() {
2351
+ return Object.keys(languages);
2352
+ }
2353
+
2354
+ /**
2355
+ intended usage: When one language truly requires another
2356
+
2357
+ Unlike `getLanguage`, this will throw when the requested language
2358
+ is not available.
2359
+
2360
+ @param {string} name - name of the language to fetch/require
2361
+ @returns {Language | never}
2362
+ */
2363
+ function requireLanguage(name) {
2364
+ deprecated("10.4.0", "requireLanguage will be removed entirely in v11.");
2365
+ deprecated("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844");
2366
+
2367
+ const lang = getLanguage(name);
2368
+ if (lang) { return lang; }
2369
+
2370
+ const err = new Error('The \'{}\' language is required, but not loaded.'.replace('{}', name));
2371
+ throw err;
2372
+ }
2373
+
2374
+ /**
2375
+ * @param {string} name - name of the language to retrieve
2376
+ * @returns {Language | undefined}
2377
+ */
2378
+ function getLanguage(name) {
2379
+ name = (name || '').toLowerCase();
2380
+ return languages[name] || languages[aliases[name]];
2381
+ }
2382
+
2383
+ /**
2384
+ *
2385
+ * @param {string|string[]} aliasList - single alias or list of aliases
2386
+ * @param {{languageName: string}} opts
2387
+ */
2388
+ function registerAliases(aliasList, { languageName }) {
2389
+ if (typeof aliasList === 'string') {
2390
+ aliasList = [aliasList];
2391
+ }
2392
+ aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });
2393
+ }
2394
+
2395
+ /**
2396
+ * Determines if a given language has auto-detection enabled
2397
+ * @param {string} name - name of the language
2398
+ */
2399
+ function autoDetection(name) {
2400
+ const lang = getLanguage(name);
2401
+ return lang && !lang.disableAutodetect;
2402
+ }
2403
+
2404
+ /**
2405
+ * Upgrades the old highlightBlock plugins to the new
2406
+ * highlightElement API
2407
+ * @param {HLJSPlugin} plugin
2408
+ */
2409
+ function upgradePluginAPI(plugin) {
2410
+ // TODO: remove with v12
2411
+ if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) {
2412
+ plugin["before:highlightElement"] = (data) => {
2413
+ plugin["before:highlightBlock"](
2414
+ Object.assign({ block: data.el }, data)
2415
+ );
2416
+ };
2417
+ }
2418
+ if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) {
2419
+ plugin["after:highlightElement"] = (data) => {
2420
+ plugin["after:highlightBlock"](
2421
+ Object.assign({ block: data.el }, data)
2422
+ );
2423
+ };
2424
+ }
2425
+ }
2426
+
2427
+ /**
2428
+ * @param {HLJSPlugin} plugin
2429
+ */
2430
+ function addPlugin(plugin) {
2431
+ upgradePluginAPI(plugin);
2432
+ plugins.push(plugin);
2433
+ }
2434
+
2435
+ /**
2436
+ *
2437
+ * @param {PluginEvent} event
2438
+ * @param {any} args
2439
+ */
2440
+ function fire(event, args) {
2441
+ const cb = event;
2442
+ plugins.forEach(function(plugin) {
2443
+ if (plugin[cb]) {
2444
+ plugin[cb](args);
2445
+ }
2446
+ });
2447
+ }
2448
+
2449
+ /**
2450
+ Note: fixMarkup is deprecated and will be removed entirely in v11
2451
+
2452
+ @param {string} arg
2453
+ @returns {string}
2454
+ */
2455
+ function deprecateFixMarkup(arg) {
2456
+ deprecated("10.2.0", "fixMarkup will be removed entirely in v11.0");
2457
+ deprecated("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534");
2458
+
2459
+ return fixMarkup(arg);
2460
+ }
2461
+
2462
+ /**
2463
+ *
2464
+ * @param {HighlightedHTMLElement} el
2465
+ */
2466
+ function deprecateHighlightBlock(el) {
2467
+ deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
2468
+ deprecated("10.7.0", "Please use highlightElement now.");
2469
+
2470
+ return highlightElement(el);
2471
+ }
2472
+
2473
+ /* Interface definition */
2474
+ Object.assign(hljs, {
2475
+ highlight,
2476
+ highlightAuto,
2477
+ highlightAll,
2478
+ fixMarkup: deprecateFixMarkup,
2479
+ highlightElement,
2480
+ // TODO: Remove with v12 API
2481
+ highlightBlock: deprecateHighlightBlock,
2482
+ configure,
2483
+ initHighlighting,
2484
+ initHighlightingOnLoad,
2485
+ registerLanguage,
2486
+ unregisterLanguage,
2487
+ listLanguages,
2488
+ getLanguage,
2489
+ registerAliases,
2490
+ requireLanguage,
2491
+ autoDetection,
2492
+ inherit: inherit$1,
2493
+ addPlugin,
2494
+ // plugins for frameworks
2495
+ vuePlugin: BuildVuePlugin(hljs).VuePlugin
2496
+ });
2497
+
2498
+ hljs.debugMode = function() { SAFE_MODE = false; };
2499
+ hljs.safeMode = function() { SAFE_MODE = true; };
2500
+ hljs.versionString = version;
2501
+
2502
+ for (const key in MODES) {
2503
+ // @ts-ignore
2504
+ if (typeof MODES[key] === "object") {
2505
+ // @ts-ignore
2506
+ deepFreezeEs6(MODES[key]);
2507
+ }
2508
+ }
2509
+
2510
+ // merge all the modes/regexs into our main object
2511
+ Object.assign(hljs, MODES);
2512
+
2513
+ // built-in plugins, likely to be moved out of core in the future
2514
+ hljs.addPlugin(brPlugin); // slated to be removed in v11
2515
+ hljs.addPlugin(mergeHTMLPlugin);
2516
+ hljs.addPlugin(tabReplacePlugin);
2517
+ return hljs;
2518
+ };
2519
+
2520
+ // export an "instance" of the highlighter
2521
+ var highlight = HLJS({});
2522
+
2523
+ var core = highlight;
2524
+
2525
+ var hljs = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(core);
2526
+
2527
+ exports.default = hljs;
2528
+ //# sourceMappingURL=core.js.map