@openui5/sap.ui.codeeditor 1.133.1 → 1.135.0

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 (450) hide show
  1. package/.reuse/dep5 +0 -7
  2. package/THIRDPARTY.txt +2 -23
  3. package/package.json +2 -2
  4. package/src/sap/ui/codeeditor/.library +2 -2
  5. package/src/sap/ui/codeeditor/CodeEditor.js +4 -4
  6. package/src/sap/ui/codeeditor/js/ace/ace.js +6564 -6162
  7. package/src/sap/ui/codeeditor/js/ace/css/ace.css +55 -23
  8. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-1.png +0 -0
  9. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-2.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/main-10.svg +4 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/main-11.svg +5 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/main-12.svg +4 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/main-24.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/main-25.svg +1 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/main-26.png +0 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +8 -6
  28. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +4 -6
  29. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +8 -3
  30. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +5 -3
  31. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor.css +221 -0
  32. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor_dark.css +224 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/theme/github_light_default.css +164 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +2 -2
  35. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +0 -0
  36. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +1 -6
  37. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +4 -2
  38. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +0 -0
  39. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +24 -6
  40. package/src/sap/ui/codeeditor/js/ace/ext-error_marker.js +0 -0
  41. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +198 -87
  42. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +8 -5
  43. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +180 -79
  44. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +0 -0
  45. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +7 -3
  46. package/src/sap/ui/codeeditor/js/ace/ext-options.js +12 -5
  47. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +202 -116
  48. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +0 -0
  49. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +14 -12
  50. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +12 -5
  51. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +0 -0
  52. package/src/sap/ui/codeeditor/js/ace/ext-split.js +2 -1
  53. package/src/sap/ui/codeeditor/js/ace/ext-static_highlight.js +0 -0
  54. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +0 -0
  55. package/src/sap/ui/codeeditor/js/ace/ext-textarea.js +476 -3
  56. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +6 -2
  57. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +0 -0
  58. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +13 -6
  59. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +748 -373
  60. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +0 -0
  61. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +3 -3
  64. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +0 -0
  65. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +6 -6
  66. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +3 -3
  67. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +3 -3
  68. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +0 -0
  69. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +14 -14
  70. package/src/sap/ui/codeeditor/js/ace/mode-assembly_arm32.js +185 -0
  71. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +0 -0
  72. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +377 -317
  73. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +0 -0
  74. package/src/sap/ui/codeeditor/js/ace/mode-basic.js +201 -0
  75. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +0 -0
  76. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +1 -1
  77. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +13 -13
  78. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +0 -0
  79. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +13 -13
  80. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +3 -3
  81. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +0 -0
  82. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +377 -317
  83. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +6 -6
  84. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +9 -9
  85. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +75 -78
  86. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +22 -22
  87. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +0 -0
  88. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +0 -0
  89. package/src/sap/ui/codeeditor/js/ace/mode-css.js +6 -3
  90. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +377 -317
  91. package/src/sap/ui/codeeditor/js/ace/mode-d.js +12 -12
  92. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +17 -17
  93. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +0 -0
  94. package/src/sap/ui/codeeditor/js/ace/mode-django.js +377 -317
  95. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +3 -3
  96. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +6 -6
  97. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +18 -18
  98. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +4 -4
  99. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +4 -4
  100. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +402 -342
  101. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +0 -0
  102. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +0 -0
  103. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +15 -15
  104. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +7 -7
  105. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +0 -0
  106. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +12 -12
  107. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +0 -0
  108. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +54 -57
  109. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +4 -4
  110. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +3 -3
  111. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +1 -1
  112. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +13 -13
  113. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +371 -65
  114. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +10 -10
  115. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +0 -0
  116. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +381 -75
  117. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +84 -87
  118. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +379 -319
  119. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +0 -0
  120. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +1 -1
  121. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +10 -10
  122. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +0 -0
  123. package/src/sap/ui/codeeditor/js/ace/mode-html.js +377 -317
  124. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +472 -412
  125. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +484 -424
  126. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +0 -0
  127. package/src/sap/ui/codeeditor/js/ace/mode-io.js +0 -0
  128. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +2 -2
  129. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +67 -70
  130. package/src/sap/ui/codeeditor/js/ace/mode-java.js +383 -77
  131. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +371 -65
  132. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +7 -7
  133. package/src/sap/ui/codeeditor/js/ace/mode-json.js +8 -8
  134. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +8 -8
  135. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +4 -5
  136. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +67 -70
  137. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +0 -0
  138. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +960 -89
  139. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +0 -0
  140. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +0 -0
  141. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +0 -0
  142. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +381 -321
  143. package/src/sap/ui/codeeditor/js/ace/mode-less.js +12 -9
  144. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +385 -325
  145. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +2 -2
  146. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +0 -0
  147. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +0 -0
  148. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +6 -9
  149. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +0 -0
  150. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +5 -5
  151. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +382 -322
  152. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +0 -0
  153. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +3 -3
  154. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +474 -414
  155. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +53 -56
  156. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +1 -1
  157. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +0 -0
  158. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +0 -0
  159. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +1 -1
  160. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +0 -0
  161. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +7 -7
  162. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +7 -7
  163. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +16 -16
  164. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +0 -0
  165. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +379 -319
  166. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +15 -15
  167. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +7 -7
  168. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +10 -10
  169. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +0 -0
  170. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +6 -6
  171. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +98 -104
  172. package/src/sap/ui/codeeditor/js/ace/mode-php.js +797 -616
  173. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +797 -616
  174. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +0 -0
  175. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +0 -0
  176. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +3 -3
  177. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +6 -6
  178. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +0 -0
  179. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +0 -0
  180. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +0 -0
  181. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +18 -18
  182. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +7 -4
  183. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +0 -0
  184. package/src/sap/ui/codeeditor/js/ace/mode-python.js +17 -17
  185. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +5 -5
  186. package/src/sap/ui/codeeditor/js/ace/mode-r.js +13 -13
  187. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +8 -8
  188. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +386 -326
  189. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +6 -6
  190. package/src/sap/ui/codeeditor/js/ace/mode-red.js +0 -0
  191. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +32 -32
  192. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +390 -330
  193. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +0 -0
  194. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +25 -25
  195. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +39 -32
  196. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +13 -13
  197. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +14 -11
  198. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +14 -14
  199. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +381 -75
  200. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +2 -2
  201. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +10 -10
  202. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +14 -11
  203. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +3 -3
  204. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +371 -65
  205. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +521 -461
  206. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +377 -317
  207. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +0 -0
  208. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +377 -317
  209. package/src/sap/ui/codeeditor/js/ace/mode-space.js +0 -0
  210. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +0 -0
  211. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +12 -6
  212. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +5 -5
  213. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +10 -7
  214. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +132 -75
  215. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +5 -4
  216. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +7 -7
  217. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +0 -0
  218. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +6 -6
  219. package/src/sap/ui/codeeditor/js/ace/mode-text.js +0 -0
  220. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +0 -0
  221. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +0 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +492 -182
  223. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +0 -0
  224. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +379 -319
  225. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +371 -65
  226. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +0 -0
  227. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +0 -0
  228. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +387 -327
  229. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +1 -1
  230. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +4 -4
  231. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +377 -317
  232. package/src/sap/ui/codeeditor/js/ace/mode-vue.js +3834 -0
  233. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +382 -76
  234. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +18 -10
  235. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +4 -5
  236. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +5 -5
  237. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +2 -2
  238. package/src/sap/ui/codeeditor/js/ace/mode-zig.js +585 -0
  239. package/src/sap/ui/codeeditor/js/ace/snippets/abap.js +0 -0
  240. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +0 -0
  241. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +0 -0
  242. package/src/sap/ui/codeeditor/js/ace/snippets/ada.js +0 -0
  243. package/src/sap/ui/codeeditor/js/ace/snippets/apache_conf.js +0 -0
  244. package/src/sap/ui/codeeditor/js/ace/snippets/applescript.js +0 -0
  245. package/src/sap/ui/codeeditor/js/ace/snippets/asciidoc.js +0 -0
  246. package/src/sap/ui/codeeditor/js/ace/snippets/asl.js +0 -0
  247. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_arm32.js +9 -0
  248. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_x86.js +0 -0
  249. package/src/sap/ui/codeeditor/js/ace/snippets/autohotkey.js +0 -0
  250. package/src/sap/ui/codeeditor/js/ace/snippets/basic.js +9 -0
  251. package/src/sap/ui/codeeditor/js/ace/snippets/batchfile.js +0 -0
  252. package/src/sap/ui/codeeditor/js/ace/snippets/c9search.js +0 -0
  253. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +0 -0
  254. package/src/sap/ui/codeeditor/js/ace/snippets/cirru.js +0 -0
  255. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +0 -0
  256. package/src/sap/ui/codeeditor/js/ace/snippets/cobol.js +0 -0
  257. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +0 -0
  258. package/src/sap/ui/codeeditor/js/ace/snippets/coldfusion.js +0 -0
  259. package/src/sap/ui/codeeditor/js/ace/snippets/csharp.js +0 -0
  260. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +0 -0
  261. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +0 -0
  262. package/src/sap/ui/codeeditor/js/ace/snippets/csound_score.js +0 -0
  263. package/src/sap/ui/codeeditor/js/ace/snippets/csp.js +0 -0
  264. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +0 -0
  265. package/src/sap/ui/codeeditor/js/ace/snippets/curly.js +0 -0
  266. package/src/sap/ui/codeeditor/js/ace/snippets/d.js +0 -0
  267. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +0 -0
  268. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +0 -0
  269. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +0 -0
  270. package/src/sap/ui/codeeditor/js/ace/snippets/dockerfile.js +0 -0
  271. package/src/sap/ui/codeeditor/js/ace/snippets/dot.js +0 -0
  272. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +0 -0
  273. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +0 -0
  274. package/src/sap/ui/codeeditor/js/ace/snippets/eiffel.js +0 -0
  275. package/src/sap/ui/codeeditor/js/ace/snippets/ejs.js +0 -0
  276. package/src/sap/ui/codeeditor/js/ace/snippets/elixir.js +0 -0
  277. package/src/sap/ui/codeeditor/js/ace/snippets/elm.js +0 -0
  278. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +0 -0
  279. package/src/sap/ui/codeeditor/js/ace/snippets/forth.js +0 -0
  280. package/src/sap/ui/codeeditor/js/ace/snippets/fortran.js +0 -0
  281. package/src/sap/ui/codeeditor/js/ace/snippets/fsharp.js +0 -0
  282. package/src/sap/ui/codeeditor/js/ace/snippets/ftl.js +0 -0
  283. package/src/sap/ui/codeeditor/js/ace/snippets/gcode.js +0 -0
  284. package/src/sap/ui/codeeditor/js/ace/snippets/gherkin.js +0 -0
  285. package/src/sap/ui/codeeditor/js/ace/snippets/gitignore.js +0 -0
  286. package/src/sap/ui/codeeditor/js/ace/snippets/glsl.js +0 -0
  287. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +0 -0
  288. package/src/sap/ui/codeeditor/js/ace/snippets/golang.js +0 -0
  289. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +0 -0
  290. package/src/sap/ui/codeeditor/js/ace/snippets/groovy.js +0 -0
  291. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +0 -0
  292. package/src/sap/ui/codeeditor/js/ace/snippets/handlebars.js +0 -0
  293. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +0 -0
  294. package/src/sap/ui/codeeditor/js/ace/snippets/haskell_cabal.js +0 -0
  295. package/src/sap/ui/codeeditor/js/ace/snippets/haxe.js +0 -0
  296. package/src/sap/ui/codeeditor/js/ace/snippets/hjson.js +0 -0
  297. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +0 -0
  298. package/src/sap/ui/codeeditor/js/ace/snippets/html_elixir.js +0 -0
  299. package/src/sap/ui/codeeditor/js/ace/snippets/html_ruby.js +0 -0
  300. package/src/sap/ui/codeeditor/js/ace/snippets/ini.js +0 -0
  301. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +0 -0
  302. package/src/sap/ui/codeeditor/js/ace/snippets/jack.js +0 -0
  303. package/src/sap/ui/codeeditor/js/ace/snippets/jade.js +0 -0
  304. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +0 -0
  305. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +0 -0
  306. package/src/sap/ui/codeeditor/js/ace/snippets/json.js +0 -0
  307. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +0 -0
  308. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +0 -0
  309. package/src/sap/ui/codeeditor/js/ace/snippets/jssm.js +0 -0
  310. package/src/sap/ui/codeeditor/js/ace/snippets/jsx.js +0 -0
  311. package/src/sap/ui/codeeditor/js/ace/snippets/julia.js +0 -0
  312. package/src/sap/ui/codeeditor/js/ace/snippets/kotlin.js +0 -0
  313. package/src/sap/ui/codeeditor/js/ace/snippets/latex.js +0 -0
  314. package/src/sap/ui/codeeditor/js/ace/snippets/less.js +0 -0
  315. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +0 -0
  316. package/src/sap/ui/codeeditor/js/ace/snippets/lisp.js +0 -0
  317. package/src/sap/ui/codeeditor/js/ace/snippets/livescript.js +0 -0
  318. package/src/sap/ui/codeeditor/js/ace/snippets/logiql.js +0 -0
  319. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +0 -0
  320. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +0 -0
  321. package/src/sap/ui/codeeditor/js/ace/snippets/luapage.js +0 -0
  322. package/src/sap/ui/codeeditor/js/ace/snippets/lucene.js +0 -0
  323. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +0 -0
  324. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +0 -0
  325. package/src/sap/ui/codeeditor/js/ace/snippets/mask.js +0 -0
  326. package/src/sap/ui/codeeditor/js/ace/snippets/matlab.js +0 -0
  327. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +0 -0
  328. package/src/sap/ui/codeeditor/js/ace/snippets/mel.js +0 -0
  329. package/src/sap/ui/codeeditor/js/ace/snippets/mixal.js +0 -0
  330. package/src/sap/ui/codeeditor/js/ace/snippets/mushcode.js +0 -0
  331. package/src/sap/ui/codeeditor/js/ace/snippets/mysql.js +0 -0
  332. package/src/sap/ui/codeeditor/js/ace/snippets/nix.js +0 -0
  333. package/src/sap/ui/codeeditor/js/ace/snippets/nsis.js +0 -0
  334. package/src/sap/ui/codeeditor/js/ace/snippets/objectivec.js +0 -0
  335. package/src/sap/ui/codeeditor/js/ace/snippets/ocaml.js +0 -0
  336. package/src/sap/ui/codeeditor/js/ace/snippets/pascal.js +0 -0
  337. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +0 -0
  338. package/src/sap/ui/codeeditor/js/ace/snippets/pgsql.js +0 -0
  339. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +0 -0
  340. package/src/sap/ui/codeeditor/js/ace/snippets/php_laravel_blade.js +0 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/pig.js +0 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/plain_text.js +0 -0
  343. package/src/sap/ui/codeeditor/js/ace/snippets/powershell.js +0 -0
  344. package/src/sap/ui/codeeditor/js/ace/snippets/praat.js +0 -0
  345. package/src/sap/ui/codeeditor/js/ace/snippets/prolog.js +0 -0
  346. package/src/sap/ui/codeeditor/js/ace/snippets/properties.js +0 -0
  347. package/src/sap/ui/codeeditor/js/ace/snippets/protobuf.js +0 -0
  348. package/src/sap/ui/codeeditor/js/ace/snippets/puppet.js +0 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +0 -0
  350. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +0 -0
  351. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +0 -0
  352. package/src/sap/ui/codeeditor/js/ace/snippets/rdoc.js +0 -0
  353. package/src/sap/ui/codeeditor/js/ace/snippets/red.js +0 -0
  354. package/src/sap/ui/codeeditor/js/ace/snippets/redshift.js +0 -0
  355. package/src/sap/ui/codeeditor/js/ace/snippets/rhtml.js +0 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +0 -0
  357. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +0 -0
  358. package/src/sap/ui/codeeditor/js/ace/snippets/rust.js +0 -0
  359. package/src/sap/ui/codeeditor/js/ace/snippets/sass.js +0 -0
  360. package/src/sap/ui/codeeditor/js/ace/snippets/scad.js +0 -0
  361. package/src/sap/ui/codeeditor/js/ace/snippets/scala.js +0 -0
  362. package/src/sap/ui/codeeditor/js/ace/snippets/scheme.js +0 -0
  363. package/src/sap/ui/codeeditor/js/ace/snippets/scss.js +0 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +0 -0
  365. package/src/sap/ui/codeeditor/js/ace/snippets/sjs.js +0 -0
  366. package/src/sap/ui/codeeditor/js/ace/snippets/slim.js +0 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/smarty.js +0 -0
  368. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +0 -0
  369. package/src/sap/ui/codeeditor/js/ace/snippets/soy_template.js +0 -0
  370. package/src/sap/ui/codeeditor/js/ace/snippets/space.js +0 -0
  371. package/src/sap/ui/codeeditor/js/ace/snippets/sparql.js +0 -0
  372. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +0 -0
  373. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +0 -0
  374. package/src/sap/ui/codeeditor/js/ace/snippets/stylus.js +0 -0
  375. package/src/sap/ui/codeeditor/js/ace/snippets/svg.js +0 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/swift.js +0 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +0 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/terraform.js +0 -0
  379. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +0 -0
  380. package/src/sap/ui/codeeditor/js/ace/snippets/text.js +0 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +0 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/toml.js +0 -0
  383. package/src/sap/ui/codeeditor/js/ace/snippets/tsx.js +0 -0
  384. package/src/sap/ui/codeeditor/js/ace/snippets/turtle.js +0 -0
  385. package/src/sap/ui/codeeditor/js/ace/snippets/twig.js +0 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/typescript.js +0 -0
  387. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +0 -0
  388. package/src/sap/ui/codeeditor/js/ace/snippets/vbscript.js +0 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +0 -0
  390. package/src/sap/ui/codeeditor/js/ace/snippets/verilog.js +0 -0
  391. package/src/sap/ui/codeeditor/js/ace/snippets/vhdl.js +0 -0
  392. package/src/sap/ui/codeeditor/js/ace/snippets/vue.js +9 -0
  393. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +0 -0
  394. package/src/sap/ui/codeeditor/js/ace/snippets/xml.js +0 -0
  395. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +0 -0
  396. package/src/sap/ui/codeeditor/js/ace/snippets/yaml.js +0 -0
  397. package/src/sap/ui/codeeditor/js/ace/snippets/zig.js +9 -0
  398. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +0 -0
  399. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +0 -0
  400. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +0 -0
  401. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor.js +18 -0
  402. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor_dark.js +18 -0
  403. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +0 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +0 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +0 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +0 -0
  407. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +0 -0
  408. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +0 -0
  409. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +0 -0
  410. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +0 -0
  411. package/src/sap/ui/codeeditor/js/ace/theme-github.js +0 -0
  412. package/src/sap/ui/codeeditor/js/ace/theme-github_light_default.js +18 -0
  413. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +0 -0
  414. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +0 -0
  415. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +0 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +0 -0
  417. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +0 -0
  418. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +0 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +0 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +0 -0
  421. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +0 -0
  422. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +0 -0
  423. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +0 -0
  424. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +0 -0
  425. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +1 -1
  426. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +0 -0
  427. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +0 -0
  428. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +0 -0
  429. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +0 -0
  430. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +0 -0
  431. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +0 -0
  432. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +0 -0
  433. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +0 -0
  434. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +0 -0
  435. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +0 -0
  436. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +0 -0
  437. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +0 -0
  438. package/src/sap/ui/codeeditor/js/ace/worker-base.js +3 -13
  439. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +3 -13
  440. package/src/sap/ui/codeeditor/js/ace/worker-css.js +3 -13
  441. package/src/sap/ui/codeeditor/js/ace/worker-html.js +3 -13
  442. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +3 -13
  443. package/src/sap/ui/codeeditor/js/ace/worker-json.js +3 -13
  444. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +3 -13
  445. package/src/sap/ui/codeeditor/js/ace/worker-php.js +3 -13
  446. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +8 -15
  447. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +3 -13
  448. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +6 -16
  449. package/src/sap/ui/codeeditor/library.js +2 -2
  450. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
@@ -0,0 +1,3834 @@
1
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
2
+ var oop = require("../../lib/oop");
3
+ var BaseFoldMode = require("./fold_mode").FoldMode;
4
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
5
+ this.defaultMode = defaultMode;
6
+ this.subModes = subModes;
7
+ };
8
+ oop.inherits(FoldMode, BaseFoldMode);
9
+ (function () {
10
+ this.$getMode = function (state) {
11
+ if (typeof state != "string")
12
+ state = state[0];
13
+ for (var key in this.subModes) {
14
+ if (state.indexOf(key) === 0)
15
+ return this.subModes[key];
16
+ }
17
+ return null;
18
+ };
19
+ this.$tryMode = function (state, session, foldStyle, row) {
20
+ var mode = this.$getMode(state);
21
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
22
+ };
23
+ this.getFoldWidget = function (session, foldStyle, row) {
24
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
25
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
26
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
27
+ };
28
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
29
+ var mode = this.$getMode(session.getState(row - 1));
30
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
31
+ mode = this.$getMode(session.getState(row));
32
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
33
+ mode = this.defaultMode;
34
+ return mode.getFoldWidgetRange(session, foldStyle, row);
35
+ };
36
+ }).call(FoldMode.prototype);
37
+
38
+ });
39
+
40
+ ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
41
+ var oop = require("../../lib/oop");
42
+ var Range = require("../../range").Range;
43
+ var BaseFoldMode = require("./fold_mode").FoldMode;
44
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
45
+ BaseFoldMode.call(this);
46
+ this.voidElements = voidElements || {};
47
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
48
+ if (optionalEndTags)
49
+ oop.mixin(this.optionalEndTags, optionalEndTags);
50
+ };
51
+ oop.inherits(FoldMode, BaseFoldMode);
52
+ var Tag = function () {
53
+ this.tagName = "";
54
+ this.closing = false;
55
+ this.selfClosing = false;
56
+ this.start = { row: 0, column: 0 };
57
+ this.end = { row: 0, column: 0 };
58
+ };
59
+ function is(token, type) {
60
+ return token.type.lastIndexOf(type + ".xml") > -1;
61
+ }
62
+ (function () {
63
+ this.getFoldWidget = function (session, foldStyle, row) {
64
+ var tag = this._getFirstTagInLine(session, row);
65
+ if (!tag)
66
+ return this.getCommentFoldWidget(session, row);
67
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
68
+ return foldStyle === "markbeginend" ? "end" : "";
69
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
70
+ return "";
71
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
72
+ return "";
73
+ return "start";
74
+ };
75
+ this.getCommentFoldWidget = function (session, row) {
76
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
77
+ return "start";
78
+ return "";
79
+ };
80
+ this._getFirstTagInLine = function (session, row) {
81
+ var tokens = session.getTokens(row);
82
+ var tag = new Tag();
83
+ for (var i = 0; i < tokens.length; i++) {
84
+ var token = tokens[i];
85
+ if (is(token, "tag-open")) {
86
+ tag.end.column = tag.start.column + token.value.length;
87
+ tag.closing = is(token, "end-tag-open");
88
+ token = tokens[++i];
89
+ if (!token)
90
+ return null;
91
+ tag.tagName = token.value;
92
+ if (token.value === "") { //skip empty tag name token for fragment
93
+ token = tokens[++i];
94
+ if (!token)
95
+ return null;
96
+ tag.tagName = token.value;
97
+ }
98
+ tag.end.column += token.value.length;
99
+ for (i++; i < tokens.length; i++) {
100
+ token = tokens[i];
101
+ tag.end.column += token.value.length;
102
+ if (is(token, "tag-close")) {
103
+ tag.selfClosing = token.value == '/>';
104
+ break;
105
+ }
106
+ }
107
+ return tag;
108
+ }
109
+ else if (is(token, "tag-close")) {
110
+ tag.selfClosing = token.value == '/>';
111
+ return tag;
112
+ }
113
+ tag.start.column += token.value.length;
114
+ }
115
+ return null;
116
+ };
117
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
118
+ var tokens = session.getTokens(row);
119
+ var column = 0;
120
+ for (var i = 0; i < tokens.length; i++) {
121
+ var token = tokens[i];
122
+ column += token.value.length;
123
+ if (column < startColumn - 1)
124
+ continue;
125
+ if (is(token, "end-tag-open")) {
126
+ token = tokens[i + 1];
127
+ if (is(token, "tag-name") && token.value === "") {
128
+ token = tokens[i + 2];
129
+ }
130
+ if (token && token.value == tagName)
131
+ return true;
132
+ }
133
+ }
134
+ return false;
135
+ };
136
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
137
+ var firstTag = this._getFirstTagInLine(session, row);
138
+ if (!firstTag) {
139
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
140
+ }
141
+ var tags = session.getMatchingTags({ row: row, column: 0 });
142
+ if (tags) {
143
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
144
+ }
145
+ };
146
+ }).call(FoldMode.prototype);
147
+
148
+ });
149
+
150
+ ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
151
+ var oop = require("../../lib/oop");
152
+ var Range = require("../../range").Range;
153
+ var BaseFoldMode = require("./fold_mode").FoldMode;
154
+ var FoldMode = exports.FoldMode = function (commentRegex) {
155
+ if (commentRegex) {
156
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
157
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
158
+ }
159
+ };
160
+ oop.inherits(FoldMode, BaseFoldMode);
161
+ (function () {
162
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
163
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
164
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
165
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
166
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
167
+ this._getFoldWidgetBase = this.getFoldWidget;
168
+ this.getFoldWidget = function (session, foldStyle, row) {
169
+ var line = session.getLine(row);
170
+ if (this.singleLineBlockCommentRe.test(line)) {
171
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
172
+ return "";
173
+ }
174
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
175
+ if (!fw && this.startRegionRe.test(line))
176
+ return "start"; // lineCommentRegionStart
177
+ return fw;
178
+ };
179
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
180
+ var line = session.getLine(row);
181
+ if (this.startRegionRe.test(line))
182
+ return this.getCommentRegionBlock(session, line, row);
183
+ var match = line.match(this.foldingStartMarker);
184
+ if (match) {
185
+ var i = match.index;
186
+ if (match[1])
187
+ return this.openingBracketBlock(session, match[1], row, i);
188
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
189
+ if (range && !range.isMultiLine()) {
190
+ if (forceMultiline) {
191
+ range = this.getSectionRange(session, row);
192
+ }
193
+ else if (foldStyle != "all")
194
+ range = null;
195
+ }
196
+ return range;
197
+ }
198
+ if (foldStyle === "markbegin")
199
+ return;
200
+ var match = line.match(this.foldingStopMarker);
201
+ if (match) {
202
+ var i = match.index + match[0].length;
203
+ if (match[1])
204
+ return this.closingBracketBlock(session, match[1], row, i);
205
+ return session.getCommentFoldRange(row, i, -1);
206
+ }
207
+ };
208
+ this.getSectionRange = function (session, row) {
209
+ var line = session.getLine(row);
210
+ var startIndent = line.search(/\S/);
211
+ var startRow = row;
212
+ var startColumn = line.length;
213
+ row = row + 1;
214
+ var endRow = row;
215
+ var maxRow = session.getLength();
216
+ while (++row < maxRow) {
217
+ line = session.getLine(row);
218
+ var indent = line.search(/\S/);
219
+ if (indent === -1)
220
+ continue;
221
+ if (startIndent > indent)
222
+ break;
223
+ var subRange = this.getFoldWidgetRange(session, "all", row);
224
+ if (subRange) {
225
+ if (subRange.start.row <= startRow) {
226
+ break;
227
+ }
228
+ else if (subRange.isMultiLine()) {
229
+ row = subRange.end.row;
230
+ }
231
+ else if (startIndent == indent) {
232
+ break;
233
+ }
234
+ }
235
+ endRow = row;
236
+ }
237
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
238
+ };
239
+ this.getCommentRegionBlock = function (session, line, row) {
240
+ var startColumn = line.search(/\s*$/);
241
+ var maxRow = session.getLength();
242
+ var startRow = row;
243
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
244
+ var depth = 1;
245
+ while (++row < maxRow) {
246
+ line = session.getLine(row);
247
+ var m = re.exec(line);
248
+ if (!m)
249
+ continue;
250
+ if (m[1])
251
+ depth--;
252
+ else
253
+ depth++;
254
+ if (!depth)
255
+ break;
256
+ }
257
+ var endRow = row;
258
+ if (endRow > startRow) {
259
+ return new Range(startRow, startColumn, endRow, line.length);
260
+ }
261
+ };
262
+ }).call(FoldMode.prototype);
263
+
264
+ });
265
+
266
+ ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
267
+ var oop = require("../../lib/oop");
268
+ var MixedFoldMode = require("./mixed").FoldMode;
269
+ var XmlFoldMode = require("./xml").FoldMode;
270
+ var CStyleFoldMode = require("./cstyle").FoldMode;
271
+ var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
272
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
273
+ "js-": new CStyleFoldMode(),
274
+ "css-": new CStyleFoldMode()
275
+ });
276
+ };
277
+ oop.inherits(FoldMode, MixedFoldMode);
278
+
279
+ });
280
+
281
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
282
+ var oop = require("../../lib/oop");
283
+ var Behaviour = require("../behaviour").Behaviour;
284
+ var TokenIterator = require("../../token_iterator").TokenIterator;
285
+ function is(token, type) {
286
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
287
+ }
288
+ var XmlBehaviour = function () {
289
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
290
+ if (text == '"' || text == "'") {
291
+ var quote = text;
292
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
293
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
294
+ return {
295
+ text: quote + selected + quote,
296
+ selection: false
297
+ };
298
+ }
299
+ var cursor = editor.getCursorPosition();
300
+ var line = session.doc.getLine(cursor.row);
301
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
302
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
303
+ var token = iterator.getCurrentToken();
304
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
305
+ return {
306
+ text: "",
307
+ selection: [1, 1]
308
+ };
309
+ }
310
+ if (!token)
311
+ token = iterator.stepBackward();
312
+ if (!token)
313
+ return;
314
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
315
+ token = iterator.stepBackward();
316
+ }
317
+ var rightSpace = !rightChar || rightChar.match(/\s/);
318
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
319
+ return {
320
+ text: quote + quote,
321
+ selection: [1, 1]
322
+ };
323
+ }
324
+ }
325
+ });
326
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
327
+ var selected = session.doc.getTextRange(range);
328
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
329
+ var line = session.doc.getLine(range.start.row);
330
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
331
+ if (rightChar == selected) {
332
+ range.end.column++;
333
+ return range;
334
+ }
335
+ }
336
+ });
337
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
338
+ if (text == '>') {
339
+ var position = editor.getSelectionRange().start;
340
+ var iterator = new TokenIterator(session, position.row, position.column);
341
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
342
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
343
+ return;
344
+ if (is(token, "reference.attribute-value"))
345
+ return;
346
+ if (is(token, "attribute-value")) {
347
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
348
+ if (position.column < tokenEndColumn)
349
+ return;
350
+ if (position.column == tokenEndColumn) {
351
+ var nextToken = iterator.stepForward();
352
+ if (nextToken && is(nextToken, "attribute-value"))
353
+ return;
354
+ iterator.stepBackward();
355
+ }
356
+ }
357
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
358
+ return;
359
+ while (!is(token, "tag-name")) {
360
+ token = iterator.stepBackward();
361
+ if (token.value == "<") {
362
+ token = iterator.stepForward();
363
+ break;
364
+ }
365
+ }
366
+ var tokenRow = iterator.getCurrentTokenRow();
367
+ var tokenColumn = iterator.getCurrentTokenColumn();
368
+ if (is(iterator.stepBackward(), "end-tag-open"))
369
+ return;
370
+ var element = token.value;
371
+ if (tokenRow == position.row)
372
+ element = element.substring(0, position.column - tokenColumn);
373
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
374
+ return;
375
+ return {
376
+ text: ">" + "</" + element + ">",
377
+ selection: [1, 1]
378
+ };
379
+ }
380
+ });
381
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
382
+ if (text == "\n") {
383
+ var cursor = editor.getCursorPosition();
384
+ var line = session.getLine(cursor.row);
385
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
386
+ var token = iterator.getCurrentToken();
387
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
388
+ if (token.value == "/>")
389
+ return;
390
+ while (token && token.type.indexOf("tag-name") === -1) {
391
+ token = iterator.stepBackward();
392
+ }
393
+ if (!token) {
394
+ return;
395
+ }
396
+ var tag = token.value;
397
+ var row = iterator.getCurrentTokenRow();
398
+ token = iterator.stepBackward();
399
+ if (!token || token.type.indexOf("end-tag") !== -1) {
400
+ return;
401
+ }
402
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
403
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
404
+ var line = session.getLine(row);
405
+ var nextIndent = this.$getIndent(line);
406
+ var indent = nextIndent + session.getTabString();
407
+ if (nextToken && nextToken.value === "</") {
408
+ return {
409
+ text: "\n" + indent + "\n" + nextIndent,
410
+ selection: [1, indent.length, 1, indent.length]
411
+ };
412
+ }
413
+ else {
414
+ return {
415
+ text: "\n" + indent
416
+ };
417
+ }
418
+ }
419
+ }
420
+ }
421
+ });
422
+ };
423
+ oop.inherits(XmlBehaviour, Behaviour);
424
+ exports.XmlBehaviour = XmlBehaviour;
425
+
426
+ });
427
+
428
+ ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict";
429
+ var TokenIterator = require("../token_iterator").TokenIterator;
430
+ var commonAttributes = [
431
+ "accesskey",
432
+ "class",
433
+ "contenteditable",
434
+ "contextmenu",
435
+ "dir",
436
+ "draggable",
437
+ "dropzone",
438
+ "hidden",
439
+ "id",
440
+ "inert",
441
+ "itemid",
442
+ "itemprop",
443
+ "itemref",
444
+ "itemscope",
445
+ "itemtype",
446
+ "lang",
447
+ "spellcheck",
448
+ "style",
449
+ "tabindex",
450
+ "title",
451
+ "translate"
452
+ ];
453
+ var eventAttributes = [
454
+ "onabort",
455
+ "onblur",
456
+ "oncancel",
457
+ "oncanplay",
458
+ "oncanplaythrough",
459
+ "onchange",
460
+ "onclick",
461
+ "onclose",
462
+ "oncontextmenu",
463
+ "oncuechange",
464
+ "ondblclick",
465
+ "ondrag",
466
+ "ondragend",
467
+ "ondragenter",
468
+ "ondragleave",
469
+ "ondragover",
470
+ "ondragstart",
471
+ "ondrop",
472
+ "ondurationchange",
473
+ "onemptied",
474
+ "onended",
475
+ "onerror",
476
+ "onfocus",
477
+ "oninput",
478
+ "oninvalid",
479
+ "onkeydown",
480
+ "onkeypress",
481
+ "onkeyup",
482
+ "onload",
483
+ "onloadeddata",
484
+ "onloadedmetadata",
485
+ "onloadstart",
486
+ "onmousedown",
487
+ "onmousemove",
488
+ "onmouseout",
489
+ "onmouseover",
490
+ "onmouseup",
491
+ "onmousewheel",
492
+ "onpause",
493
+ "onplay",
494
+ "onplaying",
495
+ "onprogress",
496
+ "onratechange",
497
+ "onreset",
498
+ "onscroll",
499
+ "onseeked",
500
+ "onseeking",
501
+ "onselect",
502
+ "onshow",
503
+ "onstalled",
504
+ "onsubmit",
505
+ "onsuspend",
506
+ "ontimeupdate",
507
+ "onvolumechange",
508
+ "onwaiting"
509
+ ];
510
+ var globalAttributes = commonAttributes.concat(eventAttributes);
511
+ var attributeMap = {
512
+ "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 },
513
+ "abbr": {},
514
+ "address": {},
515
+ "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 },
516
+ "article": { "pubdate": 1 },
517
+ "aside": {},
518
+ "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
519
+ "b": {},
520
+ "base": { "href": 1, "target": 1 },
521
+ "bdi": {},
522
+ "bdo": {},
523
+ "blockquote": { "cite": 1 },
524
+ "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 },
525
+ "br": {},
526
+ "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } },
527
+ "canvas": { "width": 1, "height": 1 },
528
+ "caption": {},
529
+ "cite": {},
530
+ "code": {},
531
+ "col": { "span": 1 },
532
+ "colgroup": { "span": 1 },
533
+ "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 },
534
+ "data": {},
535
+ "datalist": {},
536
+ "dd": {},
537
+ "del": { "cite": 1, "datetime": 1 },
538
+ "details": { "open": 1 },
539
+ "dfn": {},
540
+ "dialog": { "open": 1 },
541
+ "div": {},
542
+ "dl": {},
543
+ "dt": {},
544
+ "em": {},
545
+ "embed": { "src": 1, "height": 1, "width": 1, "type": 1 },
546
+ "fieldset": { "disabled": 1, "form": 1, "name": 1 },
547
+ "figcaption": {},
548
+ "figure": {},
549
+ "footer": {},
550
+ "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } },
551
+ "h1": {},
552
+ "h2": {},
553
+ "h3": {},
554
+ "h4": {},
555
+ "h5": {},
556
+ "h6": {},
557
+ "head": {},
558
+ "header": {},
559
+ "hr": {},
560
+ "html": { "manifest": 1 },
561
+ "i": {},
562
+ "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } },
563
+ "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 },
564
+ "input": {
565
+ "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 },
566
+ "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1
567
+ },
568
+ "ins": { "cite": 1, "datetime": 1 },
569
+ "kbd": {},
570
+ "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 },
571
+ "label": { "form": 1, "for": 1 },
572
+ "legend": {},
573
+ "li": { "value": 1 },
574
+ "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 },
575
+ "main": {},
576
+ "map": { "name": 1 },
577
+ "mark": {},
578
+ "math": {},
579
+ "menu": { "type": 1, "label": 1 },
580
+ "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 },
581
+ "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 },
582
+ "nav": {},
583
+ "noscript": { "href": 1 },
584
+ "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 },
585
+ "ol": { "start": 1, "reversed": 1 },
586
+ "optgroup": { "disabled": 1, "label": 1 },
587
+ "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 },
588
+ "output": { "for": 1, "form": 1, "name": 1 },
589
+ "p": {},
590
+ "param": { "name": 1, "value": 1 },
591
+ "pre": {},
592
+ "progress": { "value": 1, "max": 1 },
593
+ "q": { "cite": 1 },
594
+ "rp": {},
595
+ "rt": {},
596
+ "ruby": {},
597
+ "s": {},
598
+ "samp": {},
599
+ "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 },
600
+ "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } },
601
+ "small": {},
602
+ "source": { "src": 1, "type": 1, "media": 1 },
603
+ "span": {},
604
+ "strong": {},
605
+ "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 },
606
+ "sub": {},
607
+ "sup": {},
608
+ "svg": {},
609
+ "table": { "summary": 1 },
610
+ "tbody": {},
611
+ "td": { "headers": 1, "rowspan": 1, "colspan": 1 },
612
+ "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } },
613
+ "tfoot": {},
614
+ "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 },
615
+ "thead": {},
616
+ "time": { "datetime": 1 },
617
+ "title": {},
618
+ "tr": {},
619
+ "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 },
620
+ "section": {},
621
+ "summary": {},
622
+ "u": {},
623
+ "ul": {},
624
+ "var": {},
625
+ "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
626
+ "wbr": {}
627
+ };
628
+ var elements = Object.keys(attributeMap);
629
+ function is(token, type) {
630
+ return token.type.lastIndexOf(type + ".xml") > -1;
631
+ }
632
+ function findTagName(session, pos) {
633
+ var iterator = new TokenIterator(session, pos.row, pos.column);
634
+ var token = iterator.getCurrentToken();
635
+ while (token && !is(token, "tag-name")) {
636
+ token = iterator.stepBackward();
637
+ }
638
+ if (token)
639
+ return token.value;
640
+ }
641
+ function findAttributeName(session, pos) {
642
+ var iterator = new TokenIterator(session, pos.row, pos.column);
643
+ var token = iterator.getCurrentToken();
644
+ while (token && !is(token, "attribute-name")) {
645
+ token = iterator.stepBackward();
646
+ }
647
+ if (token)
648
+ return token.value;
649
+ }
650
+ var HtmlCompletions = function () {
651
+ };
652
+ (function () {
653
+ this.getCompletions = function (state, session, pos, prefix) {
654
+ var token = session.getTokenAt(pos.row, pos.column);
655
+ if (!token)
656
+ return [];
657
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
658
+ return this.getTagCompletions(state, session, pos, prefix);
659
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
660
+ return this.getAttributeCompletions(state, session, pos, prefix);
661
+ if (is(token, "attribute-value"))
662
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
663
+ var line = session.getLine(pos.row).substr(0, pos.column);
664
+ if (/&[a-z]*$/i.test(line))
665
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
666
+ return [];
667
+ };
668
+ this.getTagCompletions = function (state, session, pos, prefix) {
669
+ return elements.map(function (element) {
670
+ return {
671
+ value: element,
672
+ meta: "tag",
673
+ score: 1000000
674
+ };
675
+ });
676
+ };
677
+ this.getAttributeCompletions = function (state, session, pos, prefix) {
678
+ var tagName = findTagName(session, pos);
679
+ if (!tagName)
680
+ return [];
681
+ var attributes = globalAttributes;
682
+ if (tagName in attributeMap) {
683
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
684
+ }
685
+ return attributes.map(function (attribute) {
686
+ return {
687
+ caption: attribute,
688
+ snippet: attribute + '="$0"',
689
+ meta: "attribute",
690
+ score: 1000000
691
+ };
692
+ });
693
+ };
694
+ this.getAttributeValueCompletions = function (state, session, pos, prefix) {
695
+ var tagName = findTagName(session, pos);
696
+ var attributeName = findAttributeName(session, pos);
697
+ if (!tagName)
698
+ return [];
699
+ var values = [];
700
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
701
+ values = Object.keys(attributeMap[tagName][attributeName]);
702
+ }
703
+ return values.map(function (value) {
704
+ return {
705
+ caption: value,
706
+ snippet: value,
707
+ meta: "attribute value",
708
+ score: 1000000
709
+ };
710
+ });
711
+ };
712
+ this.getHTMLEntityCompletions = function (state, session, pos, prefix) {
713
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
714
+ return values.map(function (value) {
715
+ return {
716
+ caption: value,
717
+ snippet: value,
718
+ meta: "html entity",
719
+ score: 1000000
720
+ };
721
+ });
722
+ };
723
+ }).call(HtmlCompletions.prototype);
724
+ exports.HtmlCompletions = HtmlCompletions;
725
+
726
+ });
727
+
728
+ ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
729
+ var oop = require("../lib/oop");
730
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
731
+ var JsDocCommentHighlightRules = function () {
732
+ this.$rules = {
733
+ "start": [
734
+ {
735
+ token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
736
+ regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
737
+ push: [
738
+ {
739
+ token: "lparen.doc",
740
+ regex: "{",
741
+ push: [
742
+ {
743
+ include: "doc-syntax"
744
+ }, {
745
+ token: "rparen.doc",
746
+ regex: "}|(?=$)",
747
+ next: "pop"
748
+ }
749
+ ]
750
+ }, {
751
+ token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
752
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
753
+ next: "pop"
754
+ }, {
755
+ token: "rparen.doc",
756
+ regex: "}|(?=$)",
757
+ next: "pop"
758
+ }, {
759
+ include: "doc-syntax"
760
+ }, {
761
+ defaultToken: "text.doc"
762
+ }
763
+ ]
764
+ }, {
765
+ token: ["comment.doc.tag", "text.doc", "lparen.doc"],
766
+ regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
767
+ + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
768
+ push: [
769
+ {
770
+ token: "lparen.doc",
771
+ regex: "{",
772
+ push: [
773
+ {
774
+ include: "doc-syntax"
775
+ }, {
776
+ token: "rparen.doc",
777
+ regex: "}|(?=$)",
778
+ next: "pop"
779
+ }
780
+ ]
781
+ }, {
782
+ token: "rparen.doc",
783
+ regex: "}|(?=$)",
784
+ next: "pop"
785
+ }, {
786
+ include: "doc-syntax"
787
+ }, {
788
+ defaultToken: "text.doc"
789
+ }
790
+ ]
791
+ }, {
792
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
793
+ regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
794
+ + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
795
+ + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
796
+ + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
797
+ }, {
798
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
799
+ regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
800
+ }, {
801
+ token: "comment.doc.tag",
802
+ regex: "@access\\s+(?:private|public|protected)"
803
+ }, {
804
+ token: "comment.doc.tag",
805
+ regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
806
+ }, {
807
+ token: "comment.doc.tag",
808
+ regex: "@\\w+(?=\\s|$)"
809
+ },
810
+ JsDocCommentHighlightRules.getTagRule(),
811
+ {
812
+ defaultToken: "comment.doc.body",
813
+ caseInsensitive: true
814
+ }
815
+ ],
816
+ "doc-syntax": [{
817
+ token: "operator.doc",
818
+ regex: /[|:]/
819
+ }, {
820
+ token: "paren.doc",
821
+ regex: /[\[\]]/
822
+ }]
823
+ };
824
+ this.normalizeRules();
825
+ };
826
+ oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
827
+ JsDocCommentHighlightRules.getTagRule = function (start) {
828
+ return {
829
+ token: "comment.doc.tag.storage.type",
830
+ regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
831
+ };
832
+ };
833
+ JsDocCommentHighlightRules.getStartRule = function (start) {
834
+ return {
835
+ token: "comment.doc", // doc comment
836
+ regex: /\/\*\*(?!\/)/,
837
+ next: start
838
+ };
839
+ };
840
+ JsDocCommentHighlightRules.getEndRule = function (start) {
841
+ return {
842
+ token: "comment.doc", // closing comment
843
+ regex: "\\*\\/",
844
+ next: start
845
+ };
846
+ };
847
+ exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
848
+
849
+ });
850
+
851
+ ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
852
+ var oop = require("../lib/oop");
853
+ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
854
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
855
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
856
+ var JavaScriptHighlightRules = function (options) {
857
+ var keywords = {
858
+ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
859
+ "Namespace|QName|XML|XMLList|" + // E4X
860
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
861
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
862
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
863
+ "SyntaxError|TypeError|URIError|" +
864
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
865
+ "isNaN|parseFloat|parseInt|" +
866
+ "JSON|Math|" + // Other
867
+ "this|arguments|prototype|window|document", // Pseudo
868
+ "keyword": "const|yield|import|get|set|async|await|" +
869
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
870
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
871
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
872
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
873
+ "storage.type": "const|let|var|function",
874
+ "constant.language": "null|Infinity|NaN|undefined",
875
+ "support.function": "alert",
876
+ "constant.language.boolean": "true|false"
877
+ };
878
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
879
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
880
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
881
+ "u[0-9a-fA-F]{4}|" + // unicode
882
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
883
+ "[0-2][0-7]{0,2}|" + // oct
884
+ "3[0-7][0-7]?|" + // oct
885
+ "[4-7][0-7]?|" + //oct
886
+ ".)";
887
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
888
+ var functionCallStartRule = {
889
+ token: ["identifier", "text", "paren.lparen"],
890
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
891
+ };
892
+ this.$rules = {
893
+ "no_regex": [
894
+ DocCommentHighlightRules.getStartRule("doc-start"),
895
+ comments("no_regex"),
896
+ functionCallStartRule,
897
+ {
898
+ token: "string",
899
+ regex: "'(?=.)",
900
+ next: "qstring"
901
+ }, {
902
+ token: "string",
903
+ regex: '"(?=.)',
904
+ next: "qqstring"
905
+ }, {
906
+ token: "constant.numeric", // hexadecimal, octal and binary
907
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
908
+ }, {
909
+ token: "constant.numeric", // decimal integers and floats
910
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
911
+ }, {
912
+ token: [
913
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
914
+ "text", "storage.type", "text", "paren.lparen"
915
+ ],
916
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
917
+ next: "function_arguments"
918
+ }, {
919
+ token: [
920
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
921
+ ],
922
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
923
+ next: "function_arguments"
924
+ }, {
925
+ token: [
926
+ "entity.name.function", "text", "punctuation.operator",
927
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
928
+ ],
929
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
930
+ next: "function_arguments"
931
+ }, {
932
+ token: [
933
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
934
+ ],
935
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
936
+ next: "function_arguments"
937
+ }, {
938
+ token: "keyword",
939
+ regex: "from(?=\\s*('|\"))"
940
+ }, {
941
+ token: "keyword",
942
+ regex: "(?:" + kwBeforeRe + ")\\b",
943
+ next: "start"
944
+ }, {
945
+ token: "support.constant",
946
+ regex: /that\b/
947
+ }, {
948
+ token: ["storage.type", "punctuation.operator", "support.function.firebug"],
949
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
950
+ }, {
951
+ token: keywordMapper,
952
+ regex: identifierRe
953
+ }, {
954
+ token: "punctuation.operator",
955
+ regex: /[.](?![.])/,
956
+ next: "property"
957
+ }, {
958
+ token: "storage.type",
959
+ regex: /=>/,
960
+ next: "start"
961
+ }, {
962
+ token: "keyword.operator",
963
+ regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
964
+ next: "start"
965
+ }, {
966
+ token: "punctuation.operator",
967
+ regex: /[?:,;.]/,
968
+ next: "start"
969
+ }, {
970
+ token: "paren.lparen",
971
+ regex: /[\[({]/,
972
+ next: "start"
973
+ }, {
974
+ token: "paren.rparen",
975
+ regex: /[\])}]/
976
+ }, {
977
+ token: "comment",
978
+ regex: /^#!.*$/
979
+ }
980
+ ],
981
+ property: [{
982
+ token: "text",
983
+ regex: "\\s+"
984
+ }, {
985
+ token: "keyword.operator",
986
+ regex: /=/
987
+ }, {
988
+ token: [
989
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
990
+ ],
991
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
992
+ next: "function_arguments"
993
+ }, {
994
+ token: [
995
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
996
+ ],
997
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
998
+ next: "function_arguments"
999
+ }, {
1000
+ token: "punctuation.operator",
1001
+ regex: /[.](?![.])/
1002
+ }, {
1003
+ token: "support.function",
1004
+ regex: "prototype"
1005
+ }, {
1006
+ token: "support.function",
1007
+ regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
1008
+ }, {
1009
+ token: "support.function.dom",
1010
+ regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
1011
+ }, {
1012
+ token: "support.constant",
1013
+ regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
1014
+ }, {
1015
+ token: "identifier",
1016
+ regex: identifierRe
1017
+ }, {
1018
+ regex: "",
1019
+ token: "empty",
1020
+ next: "no_regex"
1021
+ }
1022
+ ],
1023
+ "start": [
1024
+ DocCommentHighlightRules.getStartRule("doc-start"),
1025
+ comments("start"),
1026
+ {
1027
+ token: "string.regexp",
1028
+ regex: "\\/",
1029
+ next: "regex"
1030
+ }, {
1031
+ token: "text",
1032
+ regex: "\\s+|^$",
1033
+ next: "start"
1034
+ }, {
1035
+ token: "empty",
1036
+ regex: "",
1037
+ next: "no_regex"
1038
+ }
1039
+ ],
1040
+ "regex": [
1041
+ {
1042
+ token: "regexp.keyword.operator",
1043
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
1044
+ }, {
1045
+ token: "string.regexp",
1046
+ regex: "/[sxngimy]*",
1047
+ next: "no_regex"
1048
+ }, {
1049
+ token: "invalid",
1050
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
1051
+ }, {
1052
+ token: "constant.language.escape",
1053
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
1054
+ }, {
1055
+ token: "constant.language.delimiter",
1056
+ regex: /\|/
1057
+ }, {
1058
+ token: "constant.language.escape",
1059
+ regex: /\[\^?/,
1060
+ next: "regex_character_class"
1061
+ }, {
1062
+ token: "empty",
1063
+ regex: "$",
1064
+ next: "no_regex"
1065
+ }, {
1066
+ defaultToken: "string.regexp"
1067
+ }
1068
+ ],
1069
+ "regex_character_class": [
1070
+ {
1071
+ token: "regexp.charclass.keyword.operator",
1072
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
1073
+ }, {
1074
+ token: "constant.language.escape",
1075
+ regex: "]",
1076
+ next: "regex"
1077
+ }, {
1078
+ token: "constant.language.escape",
1079
+ regex: "-"
1080
+ }, {
1081
+ token: "empty",
1082
+ regex: "$",
1083
+ next: "no_regex"
1084
+ }, {
1085
+ defaultToken: "string.regexp.charachterclass"
1086
+ }
1087
+ ],
1088
+ "default_parameter": [
1089
+ {
1090
+ token: "string",
1091
+ regex: "'(?=.)",
1092
+ push: [
1093
+ {
1094
+ token: "string",
1095
+ regex: "'|$",
1096
+ next: "pop"
1097
+ }, {
1098
+ include: "qstring"
1099
+ }
1100
+ ]
1101
+ }, {
1102
+ token: "string",
1103
+ regex: '"(?=.)',
1104
+ push: [
1105
+ {
1106
+ token: "string",
1107
+ regex: '"|$',
1108
+ next: "pop"
1109
+ }, {
1110
+ include: "qqstring"
1111
+ }
1112
+ ]
1113
+ }, {
1114
+ token: "constant.language",
1115
+ regex: "null|Infinity|NaN|undefined"
1116
+ }, {
1117
+ token: "constant.numeric", // hexadecimal, octal and binary
1118
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
1119
+ }, {
1120
+ token: "constant.numeric", // decimal integers and floats
1121
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
1122
+ }, {
1123
+ token: "punctuation.operator",
1124
+ regex: ",",
1125
+ next: "function_arguments"
1126
+ }, {
1127
+ token: "text",
1128
+ regex: "\\s+"
1129
+ }, {
1130
+ token: "punctuation.operator",
1131
+ regex: "$"
1132
+ }, {
1133
+ token: "empty",
1134
+ regex: "",
1135
+ next: "no_regex"
1136
+ }
1137
+ ],
1138
+ "function_arguments": [
1139
+ comments("function_arguments"),
1140
+ {
1141
+ token: "variable.parameter",
1142
+ regex: identifierRe
1143
+ }, {
1144
+ token: "punctuation.operator",
1145
+ regex: ","
1146
+ }, {
1147
+ token: "text",
1148
+ regex: "\\s+"
1149
+ }, {
1150
+ token: "punctuation.operator",
1151
+ regex: "$"
1152
+ }, {
1153
+ token: "empty",
1154
+ regex: "",
1155
+ next: "no_regex"
1156
+ }
1157
+ ],
1158
+ "qqstring": [
1159
+ {
1160
+ token: "constant.language.escape",
1161
+ regex: escapedRe
1162
+ }, {
1163
+ token: "string",
1164
+ regex: "\\\\$",
1165
+ consumeLineEnd: true
1166
+ }, {
1167
+ token: "string",
1168
+ regex: '"|$',
1169
+ next: "no_regex"
1170
+ }, {
1171
+ defaultToken: "string"
1172
+ }
1173
+ ],
1174
+ "qstring": [
1175
+ {
1176
+ token: "constant.language.escape",
1177
+ regex: escapedRe
1178
+ }, {
1179
+ token: "string",
1180
+ regex: "\\\\$",
1181
+ consumeLineEnd: true
1182
+ }, {
1183
+ token: "string",
1184
+ regex: "'|$",
1185
+ next: "no_regex"
1186
+ }, {
1187
+ defaultToken: "string"
1188
+ }
1189
+ ]
1190
+ };
1191
+ if (!options || !options.noES6) {
1192
+ this.$rules.no_regex.unshift({
1193
+ regex: "[{}]", onMatch: function (val, state, stack) {
1194
+ this.next = val == "{" ? this.nextState : "";
1195
+ if (val == "{" && stack.length) {
1196
+ stack.unshift("start", state);
1197
+ }
1198
+ else if (val == "}" && stack.length) {
1199
+ stack.shift();
1200
+ this.next = stack.shift();
1201
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
1202
+ return "paren.quasi.end";
1203
+ }
1204
+ return val == "{" ? "paren.lparen" : "paren.rparen";
1205
+ },
1206
+ nextState: "start"
1207
+ }, {
1208
+ token: "string.quasi.start",
1209
+ regex: /`/,
1210
+ push: [{
1211
+ token: "constant.language.escape",
1212
+ regex: escapedRe
1213
+ }, {
1214
+ token: "paren.quasi.start",
1215
+ regex: /\${/,
1216
+ push: "start"
1217
+ }, {
1218
+ token: "string.quasi.end",
1219
+ regex: /`/,
1220
+ next: "pop"
1221
+ }, {
1222
+ defaultToken: "string.quasi"
1223
+ }]
1224
+ }, {
1225
+ token: ["variable.parameter", "text"],
1226
+ regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
1227
+ }, {
1228
+ token: "paren.lparen",
1229
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
1230
+ next: "function_arguments"
1231
+ }, {
1232
+ token: "variable.language",
1233
+ regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
1234
+ });
1235
+ this.$rules["function_arguments"].unshift({
1236
+ token: "keyword.operator",
1237
+ regex: "=",
1238
+ next: "default_parameter"
1239
+ }, {
1240
+ token: "keyword.operator",
1241
+ regex: "\\.{3}"
1242
+ });
1243
+ this.$rules["property"].unshift({
1244
+ token: "support.function",
1245
+ regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
1246
+ + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
1247
+ }, {
1248
+ token: "constant.language",
1249
+ regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
1250
+ });
1251
+ if (!options || options.jsx != false)
1252
+ JSX.call(this);
1253
+ }
1254
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
1255
+ this.normalizeRules();
1256
+ };
1257
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
1258
+ function JSX() {
1259
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
1260
+ var jsxTag = {
1261
+ onMatch: function (val, state, stack) {
1262
+ var offset = val.charAt(1) == "/" ? 2 : 1;
1263
+ if (offset == 1) {
1264
+ if (state != this.nextState)
1265
+ stack.unshift(this.next, this.nextState, 0);
1266
+ else
1267
+ stack.unshift(this.next);
1268
+ stack[2]++;
1269
+ }
1270
+ else if (offset == 2) {
1271
+ if (state == this.nextState) {
1272
+ stack[1]--;
1273
+ if (!stack[1] || stack[1] < 0) {
1274
+ stack.shift();
1275
+ stack.shift();
1276
+ }
1277
+ }
1278
+ }
1279
+ return [{
1280
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
1281
+ value: val.slice(0, offset)
1282
+ }, {
1283
+ type: "meta.tag.tag-name.xml",
1284
+ value: val.substr(offset)
1285
+ }];
1286
+ },
1287
+ regex: "</?(?:" + tagRegex + "|(?=>))",
1288
+ next: "jsxAttributes",
1289
+ nextState: "jsx"
1290
+ };
1291
+ this.$rules.start.unshift(jsxTag);
1292
+ var jsxJsRule = {
1293
+ regex: "{",
1294
+ token: "paren.quasi.start",
1295
+ push: "start"
1296
+ };
1297
+ this.$rules.jsx = [
1298
+ jsxJsRule,
1299
+ jsxTag,
1300
+ { include: "reference" }, { defaultToken: "string.xml" }
1301
+ ];
1302
+ this.$rules.jsxAttributes = [{
1303
+ token: "meta.tag.punctuation.tag-close.xml",
1304
+ regex: "/?>",
1305
+ onMatch: function (value, currentState, stack) {
1306
+ if (currentState == stack[0])
1307
+ stack.shift();
1308
+ if (value.length == 2) {
1309
+ if (stack[0] == this.nextState)
1310
+ stack[1]--;
1311
+ if (!stack[1] || stack[1] < 0) {
1312
+ stack.splice(0, 2);
1313
+ }
1314
+ }
1315
+ this.next = stack[0] || "start";
1316
+ return [{ type: this.token, value: value }];
1317
+ },
1318
+ nextState: "jsx"
1319
+ },
1320
+ jsxJsRule,
1321
+ comments("jsxAttributes"),
1322
+ {
1323
+ token: "entity.other.attribute-name.xml",
1324
+ regex: tagRegex
1325
+ }, {
1326
+ token: "keyword.operator.attribute-equals.xml",
1327
+ regex: "="
1328
+ }, {
1329
+ token: "text.tag-whitespace.xml",
1330
+ regex: "\\s+"
1331
+ }, {
1332
+ token: "string.attribute-value.xml",
1333
+ regex: "'",
1334
+ stateName: "jsx_attr_q",
1335
+ push: [
1336
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
1337
+ { include: "reference" },
1338
+ { defaultToken: "string.attribute-value.xml" }
1339
+ ]
1340
+ }, {
1341
+ token: "string.attribute-value.xml",
1342
+ regex: '"',
1343
+ stateName: "jsx_attr_qq",
1344
+ push: [
1345
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
1346
+ { include: "reference" },
1347
+ { defaultToken: "string.attribute-value.xml" }
1348
+ ]
1349
+ },
1350
+ jsxTag
1351
+ ];
1352
+ this.$rules.reference = [{
1353
+ token: "constant.language.escape.reference.xml",
1354
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1355
+ }];
1356
+ }
1357
+ function comments(next) {
1358
+ return [
1359
+ {
1360
+ token: "comment", // multi line comment
1361
+ regex: /\/\*/,
1362
+ next: [
1363
+ DocCommentHighlightRules.getTagRule(),
1364
+ { token: "comment", regex: "\\*\\/", next: next || "pop" },
1365
+ { defaultToken: "comment", caseInsensitive: true }
1366
+ ]
1367
+ }, {
1368
+ token: "comment",
1369
+ regex: "\\/\\/",
1370
+ next: [
1371
+ DocCommentHighlightRules.getTagRule(),
1372
+ { token: "comment", regex: "$|^", next: next || "pop" },
1373
+ { defaultToken: "comment", caseInsensitive: true }
1374
+ ]
1375
+ }
1376
+ ];
1377
+ }
1378
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
1379
+
1380
+ });
1381
+
1382
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
1383
+ var Range = require("../range").Range;
1384
+ var MatchingBraceOutdent = function () { };
1385
+ (function () {
1386
+ this.checkOutdent = function (line, input) {
1387
+ if (!/^\s+$/.test(line))
1388
+ return false;
1389
+ return /^\s*\}/.test(input);
1390
+ };
1391
+ this.autoOutdent = function (doc, row) {
1392
+ var line = doc.getLine(row);
1393
+ var match = line.match(/^(\s*\})/);
1394
+ if (!match)
1395
+ return 0;
1396
+ var column = match[1].length;
1397
+ var openBracePos = doc.findMatchingBracket({ row: row, column: column });
1398
+ if (!openBracePos || openBracePos.row == row)
1399
+ return 0;
1400
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1401
+ doc.replace(new Range(row, 0, row, column - 1), indent);
1402
+ };
1403
+ this.$getIndent = function (line) {
1404
+ return line.match(/^\s*/)[0];
1405
+ };
1406
+ }).call(MatchingBraceOutdent.prototype);
1407
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1408
+
1409
+ });
1410
+
1411
+ ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
1412
+ var oop = require("../../lib/oop");
1413
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1414
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
1415
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1416
+ var JavaScriptBehaviour = function () {
1417
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
1418
+ this.addBehaviours(xmlBehaviours);
1419
+ this.inherit(CstyleBehaviour);
1420
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
1421
+ if (text == '>') {
1422
+ var position = editor.getSelectionRange().start;
1423
+ var iterator = new TokenIterator(session, position.row, position.column);
1424
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1425
+ if (!token)
1426
+ return;
1427
+ if (token.value == '<') {
1428
+ return {
1429
+ text: "></>",
1430
+ selection: [1, 1]
1431
+ };
1432
+ }
1433
+ }
1434
+ });
1435
+ };
1436
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
1437
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
1438
+
1439
+ });
1440
+
1441
+ ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1442
+ var oop = require("../../lib/oop");
1443
+ var XmlFoldMode = require("./xml").FoldMode;
1444
+ var CFoldMode = require("./cstyle").FoldMode;
1445
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1446
+ if (commentRegex) {
1447
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1448
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1449
+ }
1450
+ this.xmlFoldMode = new XmlFoldMode();
1451
+ };
1452
+ oop.inherits(FoldMode, CFoldMode);
1453
+ (function () {
1454
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
1455
+ this.getFoldWidgetBase = this.getFoldWidget;
1456
+ this.getFoldWidget = function (session, foldStyle, row) {
1457
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
1458
+ if (!fw) {
1459
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
1460
+ }
1461
+ return fw;
1462
+ };
1463
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1464
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
1465
+ if (range)
1466
+ return range;
1467
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
1468
+ };
1469
+ }).call(FoldMode.prototype);
1470
+
1471
+ });
1472
+
1473
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
1474
+ var oop = require("../lib/oop");
1475
+ var TextMode = require("./text").Mode;
1476
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1477
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1478
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1479
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
1480
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
1481
+ var Mode = function () {
1482
+ this.HighlightRules = JavaScriptHighlightRules;
1483
+ this.$outdent = new MatchingBraceOutdent();
1484
+ this.$behaviour = new JavaScriptBehaviour();
1485
+ this.foldingRules = new JavaScriptFoldMode();
1486
+ };
1487
+ oop.inherits(Mode, TextMode);
1488
+ (function () {
1489
+ this.lineCommentStart = "//";
1490
+ this.blockComment = { start: "/*", end: "*/" };
1491
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
1492
+ this.$pairQuotesAfter = {
1493
+ "`": /\w/
1494
+ };
1495
+ this.getNextLineIndent = function (state, line, tab) {
1496
+ var indent = this.$getIndent(line);
1497
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1498
+ var tokens = tokenizedLine.tokens;
1499
+ var endState = tokenizedLine.state;
1500
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1501
+ return indent;
1502
+ }
1503
+ if (state == "start" || state == "no_regex") {
1504
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1505
+ if (match) {
1506
+ indent += tab;
1507
+ }
1508
+ }
1509
+ else if (state == "doc-start") {
1510
+ if (endState == "start" || endState == "no_regex") {
1511
+ return "";
1512
+ }
1513
+ }
1514
+ return indent;
1515
+ };
1516
+ this.checkOutdent = function (state, line, input) {
1517
+ return this.$outdent.checkOutdent(line, input);
1518
+ };
1519
+ this.autoOutdent = function (state, doc, row) {
1520
+ this.$outdent.autoOutdent(doc, row);
1521
+ };
1522
+ this.createWorker = function (session) {
1523
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1524
+ worker.attachToDocument(session.getDocument());
1525
+ worker.on("annotate", function (results) {
1526
+ session.setAnnotations(results.data);
1527
+ });
1528
+ worker.on("terminate", function () {
1529
+ session.clearAnnotations();
1530
+ });
1531
+ return worker;
1532
+ };
1533
+ this.$id = "ace/mode/javascript";
1534
+ this.snippetFileId = "ace/snippets/javascript";
1535
+ }).call(Mode.prototype);
1536
+ exports.Mode = Mode;
1537
+
1538
+ });
1539
+
1540
+ ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
1541
+ var oop = require("../lib/oop");
1542
+ var lang = require("../lib/lang");
1543
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1544
+ var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
1545
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
1546
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
1547
+ var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
1548
+ var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
1549
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
1550
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
1551
+ var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
1552
+ var CssHighlightRules = function () {
1553
+ var keywordMapper = this.createKeywordMapper({
1554
+ "support.function": supportFunction,
1555
+ "support.constant": supportConstant,
1556
+ "support.type": supportType,
1557
+ "support.constant.color": supportConstantColor,
1558
+ "support.constant.fonts": supportConstantFonts
1559
+ }, "text", true);
1560
+ this.$rules = {
1561
+ "start": [{
1562
+ include: ["strings", "url", "comments"]
1563
+ }, {
1564
+ token: "paren.lparen",
1565
+ regex: "\\{",
1566
+ next: "ruleset"
1567
+ }, {
1568
+ token: "paren.rparen",
1569
+ regex: "\\}"
1570
+ }, {
1571
+ token: "string",
1572
+ regex: "@(?!viewport)",
1573
+ next: "media"
1574
+ }, {
1575
+ token: "keyword",
1576
+ regex: "#[a-z0-9-_]+"
1577
+ }, {
1578
+ token: "keyword",
1579
+ regex: "%"
1580
+ }, {
1581
+ token: "variable",
1582
+ regex: "\\.[a-z0-9-_]+"
1583
+ }, {
1584
+ token: "string",
1585
+ regex: ":[a-z0-9-_]+"
1586
+ }, {
1587
+ token: "constant.numeric",
1588
+ regex: numRe
1589
+ }, {
1590
+ token: "constant",
1591
+ regex: "[a-z0-9-_]+"
1592
+ }, {
1593
+ caseInsensitive: true
1594
+ }],
1595
+ "media": [{
1596
+ include: ["strings", "url", "comments"]
1597
+ }, {
1598
+ token: "paren.lparen",
1599
+ regex: "\\{",
1600
+ next: "start"
1601
+ }, {
1602
+ token: "paren.rparen",
1603
+ regex: "\\}",
1604
+ next: "start"
1605
+ }, {
1606
+ token: "string",
1607
+ regex: ";",
1608
+ next: "start"
1609
+ }, {
1610
+ token: "keyword",
1611
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
1612
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
1613
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
1614
+ }],
1615
+ "comments": [{
1616
+ token: "comment", // multi line comment
1617
+ regex: "\\/\\*",
1618
+ push: [{
1619
+ token: "comment",
1620
+ regex: "\\*\\/",
1621
+ next: "pop"
1622
+ }, {
1623
+ defaultToken: "comment"
1624
+ }]
1625
+ }],
1626
+ "ruleset": [{
1627
+ regex: "-(webkit|ms|moz|o)-",
1628
+ token: "text"
1629
+ }, {
1630
+ token: "punctuation.operator",
1631
+ regex: "[:;]"
1632
+ }, {
1633
+ token: "paren.rparen",
1634
+ regex: "\\}",
1635
+ next: "start"
1636
+ }, {
1637
+ include: ["strings", "url", "comments"]
1638
+ }, {
1639
+ token: ["constant.numeric", "keyword"],
1640
+ regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
1641
+ }, {
1642
+ token: "constant.numeric",
1643
+ regex: numRe
1644
+ }, {
1645
+ token: "constant.numeric", // hex6 color
1646
+ regex: "#[a-f0-9]{6}"
1647
+ }, {
1648
+ token: "constant.numeric", // hex3 color
1649
+ regex: "#[a-f0-9]{3}"
1650
+ }, {
1651
+ token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
1652
+ regex: pseudoElements
1653
+ }, {
1654
+ token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
1655
+ regex: pseudoClasses
1656
+ }, {
1657
+ include: "url"
1658
+ }, {
1659
+ token: keywordMapper,
1660
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1661
+ }, {
1662
+ token: "paren.lparen",
1663
+ regex: "\\{"
1664
+ }, {
1665
+ caseInsensitive: true
1666
+ }],
1667
+ url: [{
1668
+ token: "support.function",
1669
+ regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
1670
+ push: [{
1671
+ token: "support.function",
1672
+ regex: "\\)",
1673
+ next: "pop"
1674
+ }, {
1675
+ defaultToken: "string"
1676
+ }]
1677
+ }],
1678
+ strings: [{
1679
+ token: "string.start",
1680
+ regex: "'",
1681
+ push: [{
1682
+ token: "string.end",
1683
+ regex: "'|$",
1684
+ next: "pop"
1685
+ }, {
1686
+ include: "escapes"
1687
+ }, {
1688
+ token: "constant.language.escape",
1689
+ regex: /\\$/,
1690
+ consumeLineEnd: true
1691
+ }, {
1692
+ defaultToken: "string"
1693
+ }]
1694
+ }, {
1695
+ token: "string.start",
1696
+ regex: '"',
1697
+ push: [{
1698
+ token: "string.end",
1699
+ regex: '"|$',
1700
+ next: "pop"
1701
+ }, {
1702
+ include: "escapes"
1703
+ }, {
1704
+ token: "constant.language.escape",
1705
+ regex: /\\$/,
1706
+ consumeLineEnd: true
1707
+ }, {
1708
+ defaultToken: "string"
1709
+ }]
1710
+ }],
1711
+ escapes: [{
1712
+ token: "constant.language.escape",
1713
+ regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
1714
+ }]
1715
+ };
1716
+ this.normalizeRules();
1717
+ };
1718
+ oop.inherits(CssHighlightRules, TextHighlightRules);
1719
+ exports.CssHighlightRules = CssHighlightRules;
1720
+
1721
+ });
1722
+
1723
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
1724
+ var propertyMap = {
1725
+ "background": { "#$0": 1 },
1726
+ "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
1727
+ "background-image": { "url('/$0')": 1 },
1728
+ "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
1729
+ "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
1730
+ "background-attachment": { "scroll": 1, "fixed": 1 },
1731
+ "background-size": { "cover": 1, "contain": 1 },
1732
+ "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1733
+ "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1734
+ "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
1735
+ "border-color": { "#$0": 1 },
1736
+ "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
1737
+ "border-collapse": { "collapse": 1, "separate": 1 },
1738
+ "bottom": { "px": 1, "em": 1, "%": 1 },
1739
+ "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
1740
+ "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
1741
+ "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 },
1742
+ "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
1743
+ "empty-cells": { "show": 1, "hide": 1 },
1744
+ "float": { "left": 1, "right": 1, "none": 1 },
1745
+ "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 },
1746
+ "font-size": { "px": 1, "em": 1, "%": 1 },
1747
+ "font-weight": { "bold": 1, "normal": 1 },
1748
+ "font-style": { "italic": 1, "normal": 1 },
1749
+ "font-variant": { "normal": 1, "small-caps": 1 },
1750
+ "height": { "px": 1, "em": 1, "%": 1 },
1751
+ "left": { "px": 1, "em": 1, "%": 1 },
1752
+ "letter-spacing": { "normal": 1 },
1753
+ "line-height": { "normal": 1 },
1754
+ "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 },
1755
+ "margin": { "px": 1, "em": 1, "%": 1 },
1756
+ "margin-right": { "px": 1, "em": 1, "%": 1 },
1757
+ "margin-left": { "px": 1, "em": 1, "%": 1 },
1758
+ "margin-top": { "px": 1, "em": 1, "%": 1 },
1759
+ "margin-bottom": { "px": 1, "em": 1, "%": 1 },
1760
+ "max-height": { "px": 1, "em": 1, "%": 1 },
1761
+ "max-width": { "px": 1, "em": 1, "%": 1 },
1762
+ "min-height": { "px": 1, "em": 1, "%": 1 },
1763
+ "min-width": { "px": 1, "em": 1, "%": 1 },
1764
+ "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1765
+ "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1766
+ "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1767
+ "padding": { "px": 1, "em": 1, "%": 1 },
1768
+ "padding-top": { "px": 1, "em": 1, "%": 1 },
1769
+ "padding-right": { "px": 1, "em": 1, "%": 1 },
1770
+ "padding-bottom": { "px": 1, "em": 1, "%": 1 },
1771
+ "padding-left": { "px": 1, "em": 1, "%": 1 },
1772
+ "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1773
+ "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1774
+ "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
1775
+ "right": { "px": 1, "em": 1, "%": 1 },
1776
+ "table-layout": { "fixed": 1, "auto": 1 },
1777
+ "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
1778
+ "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
1779
+ "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
1780
+ "top": { "px": 1, "em": 1, "%": 1 },
1781
+ "vertical-align": { "top": 1, "bottom": 1 },
1782
+ "visibility": { "hidden": 1, "visible": 1 },
1783
+ "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
1784
+ "width": { "px": 1, "em": 1, "%": 1 },
1785
+ "word-spacing": { "normal": 1 },
1786
+ "filter": { "alpha(opacity=$0100)": 1 },
1787
+ "text-shadow": { "$02px 2px 2px #777": 1 },
1788
+ "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
1789
+ "-moz-border-radius": 1,
1790
+ "-moz-border-radius-topright": 1,
1791
+ "-moz-border-radius-bottomright": 1,
1792
+ "-moz-border-radius-topleft": 1,
1793
+ "-moz-border-radius-bottomleft": 1,
1794
+ "-webkit-border-radius": 1,
1795
+ "-webkit-border-top-right-radius": 1,
1796
+ "-webkit-border-top-left-radius": 1,
1797
+ "-webkit-border-bottom-right-radius": 1,
1798
+ "-webkit-border-bottom-left-radius": 1,
1799
+ "-moz-box-shadow": 1,
1800
+ "-webkit-box-shadow": 1,
1801
+ "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1802
+ "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1803
+ "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
1804
+ };
1805
+ var CssCompletions = function () {
1806
+ };
1807
+ (function () {
1808
+ this.completionsDefined = false;
1809
+ this.defineCompletions = function () {
1810
+ if (document) {
1811
+ var style = document.createElement('c').style;
1812
+ for (var i in style) {
1813
+ if (typeof style[i] !== 'string')
1814
+ continue;
1815
+ var name = i.replace(/[A-Z]/g, function (x) {
1816
+ return '-' + x.toLowerCase();
1817
+ });
1818
+ if (!propertyMap.hasOwnProperty(name))
1819
+ propertyMap[name] = 1;
1820
+ }
1821
+ }
1822
+ this.completionsDefined = true;
1823
+ };
1824
+ this.getCompletions = function (state, session, pos, prefix) {
1825
+ if (!this.completionsDefined) {
1826
+ this.defineCompletions();
1827
+ }
1828
+ if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
1829
+ var line = session.getLine(pos.row).substr(0, pos.column);
1830
+ var inParens = /\([^)]*$/.test(line);
1831
+ if (inParens) {
1832
+ line = line.substr(line.lastIndexOf('(') + 1);
1833
+ }
1834
+ if (/:[^;]+$/.test(line)) {
1835
+ /([\w\-]+):[^:]*$/.test(line);
1836
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
1837
+ }
1838
+ else {
1839
+ return this.getPropertyCompletions(state, session, pos, prefix, inParens);
1840
+ }
1841
+ }
1842
+ return [];
1843
+ };
1844
+ this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
1845
+ skipSemicolon = skipSemicolon || false;
1846
+ var properties = Object.keys(propertyMap);
1847
+ return properties.map(function (property) {
1848
+ return {
1849
+ caption: property,
1850
+ snippet: property + ': $0' + (skipSemicolon ? '' : ';'),
1851
+ meta: "property",
1852
+ score: 1000000
1853
+ };
1854
+ });
1855
+ };
1856
+ this.getPropertyValueCompletions = function (state, session, pos, prefix) {
1857
+ var line = session.getLine(pos.row).substr(0, pos.column);
1858
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1859
+ if (!property)
1860
+ return [];
1861
+ var values = [];
1862
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
1863
+ values = Object.keys(propertyMap[property]);
1864
+ }
1865
+ return values.map(function (value) {
1866
+ return {
1867
+ caption: value,
1868
+ snippet: value,
1869
+ meta: "property value",
1870
+ score: 1000000
1871
+ };
1872
+ });
1873
+ };
1874
+ }).call(CssCompletions.prototype);
1875
+ exports.CssCompletions = CssCompletions;
1876
+
1877
+ });
1878
+
1879
+ ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict";
1880
+ var oop = require("../../lib/oop");
1881
+ var Behaviour = require("../behaviour").Behaviour;
1882
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1883
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1884
+ var CssBehaviour = function () {
1885
+ this.inherit(CstyleBehaviour);
1886
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
1887
+ if (text === ':' && editor.selection.isEmpty()) {
1888
+ var cursor = editor.getCursorPosition();
1889
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1890
+ var token = iterator.getCurrentToken();
1891
+ if (token && token.value.match(/\s+/)) {
1892
+ token = iterator.stepBackward();
1893
+ }
1894
+ if (token && token.type === 'support.type') {
1895
+ var line = session.doc.getLine(cursor.row);
1896
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1897
+ if (rightChar === ':') {
1898
+ return {
1899
+ text: '',
1900
+ selection: [1, 1]
1901
+ };
1902
+ }
1903
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1904
+ return {
1905
+ text: ':;',
1906
+ selection: [1, 1]
1907
+ };
1908
+ }
1909
+ }
1910
+ }
1911
+ });
1912
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
1913
+ var selected = session.doc.getTextRange(range);
1914
+ if (!range.isMultiLine() && selected === ':') {
1915
+ var cursor = editor.getCursorPosition();
1916
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1917
+ var token = iterator.getCurrentToken();
1918
+ if (token && token.value.match(/\s+/)) {
1919
+ token = iterator.stepBackward();
1920
+ }
1921
+ if (token && token.type === 'support.type') {
1922
+ var line = session.doc.getLine(range.start.row);
1923
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
1924
+ if (rightChar === ';') {
1925
+ range.end.column++;
1926
+ return range;
1927
+ }
1928
+ }
1929
+ }
1930
+ });
1931
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1932
+ if (text === ';' && editor.selection.isEmpty()) {
1933
+ var cursor = editor.getCursorPosition();
1934
+ var line = session.doc.getLine(cursor.row);
1935
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1936
+ if (rightChar === ';') {
1937
+ return {
1938
+ text: '',
1939
+ selection: [1, 1]
1940
+ };
1941
+ }
1942
+ }
1943
+ });
1944
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
1945
+ if (text === '!' && editor.selection.isEmpty()) {
1946
+ var cursor = editor.getCursorPosition();
1947
+ var line = session.doc.getLine(cursor.row);
1948
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1949
+ return {
1950
+ text: '!important',
1951
+ selection: [10, 10]
1952
+ };
1953
+ }
1954
+ }
1955
+ });
1956
+ };
1957
+ oop.inherits(CssBehaviour, CstyleBehaviour);
1958
+ exports.CssBehaviour = CssBehaviour;
1959
+
1960
+ });
1961
+
1962
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1963
+ var oop = require("../lib/oop");
1964
+ var TextMode = require("./text").Mode;
1965
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1966
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1967
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1968
+ var CssCompletions = require("./css_completions").CssCompletions;
1969
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
1970
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1971
+ var Mode = function () {
1972
+ this.HighlightRules = CssHighlightRules;
1973
+ this.$outdent = new MatchingBraceOutdent();
1974
+ this.$behaviour = new CssBehaviour();
1975
+ this.$completer = new CssCompletions();
1976
+ this.foldingRules = new CStyleFoldMode();
1977
+ };
1978
+ oop.inherits(Mode, TextMode);
1979
+ (function () {
1980
+ this.foldingRules = "cStyle";
1981
+ this.blockComment = { start: "/*", end: "*/" };
1982
+ this.getNextLineIndent = function (state, line, tab) {
1983
+ var indent = this.$getIndent(line);
1984
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1985
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1986
+ return indent;
1987
+ }
1988
+ var match = line.match(/^.*\{\s*$/);
1989
+ if (match) {
1990
+ indent += tab;
1991
+ }
1992
+ return indent;
1993
+ };
1994
+ this.checkOutdent = function (state, line, input) {
1995
+ return this.$outdent.checkOutdent(line, input);
1996
+ };
1997
+ this.autoOutdent = function (state, doc, row) {
1998
+ this.$outdent.autoOutdent(doc, row);
1999
+ };
2000
+ this.getCompletions = function (state, session, pos, prefix) {
2001
+ return this.$completer.getCompletions(state, session, pos, prefix);
2002
+ };
2003
+ this.createWorker = function (session) {
2004
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
2005
+ worker.attachToDocument(session.getDocument());
2006
+ worker.on("annotate", function (e) {
2007
+ session.setAnnotations(e.data);
2008
+ });
2009
+ worker.on("terminate", function () {
2010
+ session.clearAnnotations();
2011
+ });
2012
+ return worker;
2013
+ };
2014
+ this.$id = "ace/mode/css";
2015
+ this.snippetFileId = "ace/snippets/css";
2016
+ }).call(Mode.prototype);
2017
+ exports.Mode = Mode;
2018
+
2019
+ });
2020
+
2021
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2022
+ var oop = require("../lib/oop");
2023
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2024
+ var XmlHighlightRules = function (normalize) {
2025
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
2026
+ this.$rules = {
2027
+ start: [
2028
+ { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
2029
+ {
2030
+ token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
2031
+ regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
2032
+ },
2033
+ { token: "comment.start.xml", regex: "<\\!--", next: "comment" },
2034
+ {
2035
+ token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
2036
+ regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
2037
+ },
2038
+ { include: "tag" },
2039
+ { token: "text.end-tag-open.xml", regex: "</" },
2040
+ { token: "text.tag-open.xml", regex: "<" },
2041
+ { include: "reference" },
2042
+ { defaultToken: "text.xml" }
2043
+ ],
2044
+ processing_instruction: [{
2045
+ token: "entity.other.attribute-name.decl-attribute-name.xml",
2046
+ regex: tagRegex
2047
+ }, {
2048
+ token: "keyword.operator.decl-attribute-equals.xml",
2049
+ regex: "="
2050
+ }, {
2051
+ include: "whitespace"
2052
+ }, {
2053
+ include: "string"
2054
+ }, {
2055
+ token: "punctuation.xml-decl.xml",
2056
+ regex: "\\?>",
2057
+ next: "start"
2058
+ }],
2059
+ doctype: [
2060
+ { include: "whitespace" },
2061
+ { include: "string" },
2062
+ { token: "xml-pe.doctype.xml", regex: ">", next: "start" },
2063
+ { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
2064
+ { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
2065
+ ],
2066
+ int_subset: [{
2067
+ token: "text.xml",
2068
+ regex: "\\s+"
2069
+ }, {
2070
+ token: "punctuation.int-subset.xml",
2071
+ regex: "]",
2072
+ next: "pop"
2073
+ }, {
2074
+ token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
2075
+ regex: "(<\\!)(" + tagRegex + ")",
2076
+ push: [{
2077
+ token: "text",
2078
+ regex: "\\s+"
2079
+ },
2080
+ {
2081
+ token: "punctuation.markup-decl.xml",
2082
+ regex: ">",
2083
+ next: "pop"
2084
+ },
2085
+ { include: "string" }]
2086
+ }],
2087
+ cdata: [
2088
+ { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
2089
+ { token: "text.xml", regex: "\\s+" },
2090
+ { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
2091
+ ],
2092
+ comment: [
2093
+ { token: "comment.end.xml", regex: "-->", next: "start" },
2094
+ { defaultToken: "comment.xml" }
2095
+ ],
2096
+ reference: [{
2097
+ token: "constant.language.escape.reference.xml",
2098
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
2099
+ }],
2100
+ attr_reference: [{
2101
+ token: "constant.language.escape.reference.attribute-value.xml",
2102
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
2103
+ }],
2104
+ tag: [{
2105
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
2106
+ regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
2107
+ next: [
2108
+ { include: "attributes" },
2109
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
2110
+ ]
2111
+ }],
2112
+ tag_whitespace: [
2113
+ { token: "text.tag-whitespace.xml", regex: "\\s+" }
2114
+ ],
2115
+ whitespace: [
2116
+ { token: "text.whitespace.xml", regex: "\\s+" }
2117
+ ],
2118
+ string: [{
2119
+ token: "string.xml",
2120
+ regex: "'",
2121
+ push: [
2122
+ { token: "string.xml", regex: "'", next: "pop" },
2123
+ { defaultToken: "string.xml" }
2124
+ ]
2125
+ }, {
2126
+ token: "string.xml",
2127
+ regex: '"',
2128
+ push: [
2129
+ { token: "string.xml", regex: '"', next: "pop" },
2130
+ { defaultToken: "string.xml" }
2131
+ ]
2132
+ }],
2133
+ attributes: [{
2134
+ token: "entity.other.attribute-name.xml",
2135
+ regex: tagRegex
2136
+ }, {
2137
+ token: "keyword.operator.attribute-equals.xml",
2138
+ regex: "="
2139
+ }, {
2140
+ include: "tag_whitespace"
2141
+ }, {
2142
+ include: "attribute_value"
2143
+ }],
2144
+ attribute_value: [{
2145
+ token: "string.attribute-value.xml",
2146
+ regex: "'",
2147
+ push: [
2148
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
2149
+ { include: "attr_reference" },
2150
+ { defaultToken: "string.attribute-value.xml" }
2151
+ ]
2152
+ }, {
2153
+ token: "string.attribute-value.xml",
2154
+ regex: '"',
2155
+ push: [
2156
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
2157
+ { include: "attr_reference" },
2158
+ { defaultToken: "string.attribute-value.xml" }
2159
+ ]
2160
+ }]
2161
+ };
2162
+ if (this.constructor === XmlHighlightRules)
2163
+ this.normalizeRules();
2164
+ };
2165
+ (function () {
2166
+ this.embedTagRules = function (HighlightRules, prefix, tag) {
2167
+ this.$rules.tag.unshift({
2168
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
2169
+ regex: "(<)(" + tag + "(?=\\s|>|$))",
2170
+ next: [
2171
+ { include: "attributes" },
2172
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
2173
+ ]
2174
+ });
2175
+ this.$rules[tag + "-end"] = [
2176
+ { include: "attributes" },
2177
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
2178
+ onMatch: function (value, currentState, stack) {
2179
+ stack.splice(0);
2180
+ return this.token;
2181
+ } }
2182
+ ];
2183
+ this.embedRules(HighlightRules, prefix, [{
2184
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
2185
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
2186
+ next: tag + "-end"
2187
+ }, {
2188
+ token: "string.cdata.xml",
2189
+ regex: "<\\!\\[CDATA\\["
2190
+ }, {
2191
+ token: "string.cdata.xml",
2192
+ regex: "\\]\\]>"
2193
+ }]);
2194
+ };
2195
+ }).call(TextHighlightRules.prototype);
2196
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
2197
+ exports.XmlHighlightRules = XmlHighlightRules;
2198
+
2199
+ });
2200
+
2201
+ ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
2202
+ var oop = require("../lib/oop");
2203
+ var lang = require("../lib/lang");
2204
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
2205
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
2206
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
2207
+ var tagMap = lang.createMap({
2208
+ a: 'anchor',
2209
+ button: 'form',
2210
+ form: 'form',
2211
+ img: 'image',
2212
+ input: 'form',
2213
+ label: 'form',
2214
+ option: 'form',
2215
+ script: 'script',
2216
+ select: 'form',
2217
+ textarea: 'form',
2218
+ style: 'style',
2219
+ table: 'table',
2220
+ tbody: 'table',
2221
+ td: 'table',
2222
+ tfoot: 'table',
2223
+ th: 'table',
2224
+ tr: 'table'
2225
+ });
2226
+ var HtmlHighlightRules = function () {
2227
+ XmlHighlightRules.call(this);
2228
+ this.addRules({
2229
+ attributes: [{
2230
+ include: "tag_whitespace"
2231
+ }, {
2232
+ token: "entity.other.attribute-name.xml",
2233
+ regex: "[-_a-zA-Z0-9:.]+"
2234
+ }, {
2235
+ token: "keyword.operator.attribute-equals.xml",
2236
+ regex: "=",
2237
+ push: [{
2238
+ include: "tag_whitespace"
2239
+ }, {
2240
+ token: "string.unquoted.attribute-value.html",
2241
+ regex: "[^<>='\"`\\s]+",
2242
+ next: "pop"
2243
+ }, {
2244
+ token: "empty",
2245
+ regex: "",
2246
+ next: "pop"
2247
+ }]
2248
+ }, {
2249
+ include: "attribute_value"
2250
+ }],
2251
+ tag: [{
2252
+ token: function (start, tag) {
2253
+ var group = tagMap[tag];
2254
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
2255
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
2256
+ },
2257
+ regex: "(</?)([-_a-zA-Z0-9:.]+)",
2258
+ next: "tag_stuff"
2259
+ }],
2260
+ tag_stuff: [
2261
+ { include: "attributes" },
2262
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
2263
+ ]
2264
+ });
2265
+ this.embedTagRules(CssHighlightRules, "css-", "style");
2266
+ this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script");
2267
+ if (this.constructor === HtmlHighlightRules)
2268
+ this.normalizeRules();
2269
+ };
2270
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
2271
+ exports.HtmlHighlightRules = HtmlHighlightRules;
2272
+
2273
+ });
2274
+
2275
+ ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict";
2276
+ var oop = require("../lib/oop");
2277
+ var lang = require("../lib/lang");
2278
+ var TextMode = require("./text").Mode;
2279
+ var JavaScriptMode = require("./javascript").Mode;
2280
+ var CssMode = require("./css").Mode;
2281
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2282
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2283
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2284
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2285
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2286
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2287
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2288
+ var Mode = function (options) {
2289
+ this.fragmentContext = options && options.fragmentContext;
2290
+ this.HighlightRules = HtmlHighlightRules;
2291
+ this.$behaviour = new XmlBehaviour();
2292
+ this.$completer = new HtmlCompletions();
2293
+ this.createModeDelegates({
2294
+ "js-": JavaScriptMode,
2295
+ "css-": CssMode
2296
+ });
2297
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2298
+ };
2299
+ oop.inherits(Mode, TextMode);
2300
+ (function () {
2301
+ this.blockComment = { start: "<!--", end: "-->" };
2302
+ this.voidElements = lang.arrayToMap(voidElements);
2303
+ this.getNextLineIndent = function (state, line, tab) {
2304
+ return this.$getIndent(line);
2305
+ };
2306
+ this.checkOutdent = function (state, line, input) {
2307
+ return false;
2308
+ };
2309
+ this.getCompletions = function (state, session, pos, prefix) {
2310
+ return this.$completer.getCompletions(state, session, pos, prefix);
2311
+ };
2312
+ this.createWorker = function (session) {
2313
+ if (this.constructor != Mode)
2314
+ return;
2315
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2316
+ worker.attachToDocument(session.getDocument());
2317
+ if (this.fragmentContext)
2318
+ worker.call("setOptions", [{ context: this.fragmentContext }]);
2319
+ worker.on("error", function (e) {
2320
+ session.setAnnotations(e.data);
2321
+ });
2322
+ worker.on("terminate", function () {
2323
+ session.clearAnnotations();
2324
+ });
2325
+ return worker;
2326
+ };
2327
+ this.$id = "ace/mode/html";
2328
+ this.snippetFileId = "ace/snippets/html";
2329
+ }).call(Mode.prototype);
2330
+ exports.Mode = Mode;
2331
+
2332
+ });
2333
+
2334
+ ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module){/*
2335
+ THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 21e323af-f665-4161-96e7-5087d262557e) */
2336
+ "use strict";
2337
+ var oop = require("../lib/oop");
2338
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
2339
+ var TypeScriptHighlightRules = function (options) {
2340
+ var tsRules = [
2341
+ {
2342
+ token: ["storage.type", "text", "entity.name.function.ts"],
2343
+ regex: "(function)(\\s+)([a-zA-Z0-9\$_\u00a1-\uffff][a-zA-Z0-9\d\$_\u00a1-\uffff]*)"
2344
+ },
2345
+ {
2346
+ token: "keyword",
2347
+ regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)"
2348
+ },
2349
+ {
2350
+ token: ["keyword", "storage.type.variable.ts"],
2351
+ regex: "(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)"
2352
+ },
2353
+ {
2354
+ token: "keyword",
2355
+ regex: "\\b(?:super|export|import|keyof|infer)\\b"
2356
+ },
2357
+ {
2358
+ token: ["storage.type.variable.ts"],
2359
+ regex: "(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))"
2360
+ }
2361
+ ];
2362
+ var JSRules = new JavaScriptHighlightRules({ jsx: (options && options.jsx) == true }).getRules();
2363
+ JSRules.no_regex = tsRules.concat(JSRules.no_regex);
2364
+ this.$rules = JSRules;
2365
+ };
2366
+ oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
2367
+ exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
2368
+
2369
+ });
2370
+
2371
+ ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2372
+ var oop = require("../lib/oop");
2373
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2374
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
2375
+ function CoffeeHighlightRules() {
2376
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
2377
+ var keywords = ("this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
2378
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
2379
+ "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
2380
+ "or|on|unless|until|and|yes|yield|export|import|default");
2381
+ var langConstant = ("true|false|null|undefined|NaN|Infinity");
2382
+ var illegal = ("case|const|function|var|void|with|enum|implements|" +
2383
+ "interface|let|package|private|protected|public|static");
2384
+ var supportClass = ("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
2385
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
2386
+ "SyntaxError|TypeError|URIError|" +
2387
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
2388
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray");
2389
+ var supportFunction = ("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
2390
+ "encodeURIComponent|decodeURI|decodeURIComponent|String|");
2391
+ var variableLanguage = ("window|arguments|prototype|document");
2392
+ var keywordMapper = this.createKeywordMapper({
2393
+ "keyword": keywords,
2394
+ "constant.language": langConstant,
2395
+ "invalid.illegal": illegal,
2396
+ "language.support.class": supportClass,
2397
+ "language.support.function": supportFunction,
2398
+ "variable.language": variableLanguage
2399
+ }, "identifier");
2400
+ var functionRule = {
2401
+ token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
2402
+ regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source
2403
+ };
2404
+ var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
2405
+ this.$rules = {
2406
+ start: [
2407
+ {
2408
+ token: "constant.numeric",
2409
+ regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
2410
+ }, {
2411
+ stateName: "qdoc",
2412
+ token: "string", regex: "'''", next: [
2413
+ { token: "string", regex: "'''", next: "start" },
2414
+ { token: "constant.language.escape", regex: stringEscape },
2415
+ { defaultToken: "string" }
2416
+ ]
2417
+ }, {
2418
+ stateName: "qqdoc",
2419
+ token: "string",
2420
+ regex: '"""',
2421
+ next: [
2422
+ { token: "string", regex: '"""', next: "start" },
2423
+ { token: "paren.string", regex: '#{', push: "start" },
2424
+ { token: "constant.language.escape", regex: stringEscape },
2425
+ { defaultToken: "string" }
2426
+ ]
2427
+ }, {
2428
+ stateName: "qstring",
2429
+ token: "string", regex: "'", next: [
2430
+ { token: "string", regex: "'", next: "start" },
2431
+ { token: "constant.language.escape", regex: stringEscape },
2432
+ { defaultToken: "string" }
2433
+ ]
2434
+ }, {
2435
+ stateName: "qqstring",
2436
+ token: "string.start", regex: '"', next: [
2437
+ { token: "string.end", regex: '"', next: "start" },
2438
+ { token: "paren.string", regex: '#{', push: "start" },
2439
+ { token: "constant.language.escape", regex: stringEscape },
2440
+ { defaultToken: "string" }
2441
+ ]
2442
+ }, {
2443
+ stateName: "js",
2444
+ token: "string", regex: "`", next: [
2445
+ { token: "string", regex: "`", next: "start" },
2446
+ { token: "constant.language.escape", regex: stringEscape },
2447
+ { defaultToken: "string" }
2448
+ ]
2449
+ }, {
2450
+ regex: "[{}]", onMatch: function (val, state, stack) {
2451
+ this.next = "";
2452
+ if (val == "{" && stack.length) {
2453
+ stack.unshift("start", state);
2454
+ return "paren";
2455
+ }
2456
+ if (val == "}" && stack.length) {
2457
+ stack.shift();
2458
+ this.next = stack.shift() || "";
2459
+ if (this.next.indexOf("string") != -1)
2460
+ return "paren.string";
2461
+ }
2462
+ return "paren";
2463
+ }
2464
+ }, {
2465
+ token: "string.regex",
2466
+ regex: "///",
2467
+ next: "heregex"
2468
+ }, {
2469
+ token: "string.regex",
2470
+ regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
2471
+ }, {
2472
+ token: "comment",
2473
+ regex: "###(?!#)",
2474
+ next: "comment"
2475
+ }, {
2476
+ token: "comment",
2477
+ regex: "#.*"
2478
+ }, {
2479
+ token: ["punctuation.operator", "text", "identifier"],
2480
+ regex: "(\\.)(\\s*)(" + illegal + ")"
2481
+ }, {
2482
+ token: "punctuation.operator",
2483
+ regex: "\\.{1,3}"
2484
+ }, {
2485
+ token: ["keyword", "text", "language.support.class",
2486
+ "text", "keyword", "text", "language.support.class"],
2487
+ regex: "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?"
2488
+ }, {
2489
+ token: ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token),
2490
+ regex: "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex
2491
+ },
2492
+ functionRule,
2493
+ {
2494
+ token: "variable",
2495
+ regex: "@(?:" + identifier + ")?"
2496
+ }, {
2497
+ token: keywordMapper,
2498
+ regex: identifier
2499
+ }, {
2500
+ token: "punctuation.operator",
2501
+ regex: "\\,|\\."
2502
+ }, {
2503
+ token: "storage.type",
2504
+ regex: "[\\-=]>"
2505
+ }, {
2506
+ token: "keyword.operator",
2507
+ regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
2508
+ }, {
2509
+ token: "paren.lparen",
2510
+ regex: "[({[]"
2511
+ }, {
2512
+ token: "paren.rparen",
2513
+ regex: "[\\]})]"
2514
+ }, {
2515
+ token: "text",
2516
+ regex: "\\s+"
2517
+ }
2518
+ ],
2519
+ heregex: [{
2520
+ token: "string.regex",
2521
+ regex: '.*?///[imgy]{0,4}',
2522
+ next: "start"
2523
+ }, {
2524
+ token: "comment.regex",
2525
+ regex: "\\s+(?:#.*)?"
2526
+ }, {
2527
+ token: "string.regex",
2528
+ regex: "\\S+"
2529
+ }],
2530
+ comment: [{
2531
+ token: "comment",
2532
+ regex: '###',
2533
+ next: "start"
2534
+ }, {
2535
+ defaultToken: "comment"
2536
+ }]
2537
+ };
2538
+ this.normalizeRules();
2539
+ }
2540
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
2541
+
2542
+ });
2543
+
2544
+ ace.define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){/*
2545
+ THIS FILE WAS AUTOGENERATED BY Stylus.tmlanguage (UUID: 60519324-6A3A-4382-9E0B-546993A3869A) */
2546
+ "use strict";
2547
+ var oop = require("../lib/oop");
2548
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2549
+ var CssHighlightRules = require("./css_highlight_rules");
2550
+ var StylusHighlightRules = function () {
2551
+ var keywordMapper = this.createKeywordMapper({
2552
+ "support.type": CssHighlightRules.supportType,
2553
+ "support.function": CssHighlightRules.supportFunction,
2554
+ "support.constant": CssHighlightRules.supportConstant,
2555
+ "support.constant.color": CssHighlightRules.supportConstantColor,
2556
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
2557
+ }, "text", true);
2558
+ this.$rules = {
2559
+ start: [
2560
+ {
2561
+ token: "comment",
2562
+ regex: /\/\/.*$/
2563
+ },
2564
+ {
2565
+ token: "comment", // multi line comment
2566
+ regex: /\/\*/,
2567
+ next: "comment"
2568
+ },
2569
+ {
2570
+ token: ["entity.name.function.stylus", "text"],
2571
+ regex: "^([-a-zA-Z_][-\\w]*)?(\\()"
2572
+ },
2573
+ {
2574
+ token: ["entity.other.attribute-name.class.stylus"],
2575
+ regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"
2576
+ },
2577
+ {
2578
+ token: ["entity.language.stylus"],
2579
+ regex: "^ *&"
2580
+ },
2581
+ {
2582
+ token: ["variable.language.stylus"],
2583
+ regex: "(arguments)"
2584
+ },
2585
+ {
2586
+ token: ["keyword.stylus"],
2587
+ regex: "@[-\\w]+"
2588
+ },
2589
+ {
2590
+ token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
2591
+ regex: CssHighlightRules.pseudoElements
2592
+ }, {
2593
+ token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
2594
+ regex: CssHighlightRules.pseudoClasses
2595
+ },
2596
+ {
2597
+ token: ["entity.name.tag.stylus"],
2598
+ regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"
2599
+ },
2600
+ {
2601
+ token: "constant.numeric", // hex6 color
2602
+ regex: "#[a-fA-F0-9]{6}"
2603
+ },
2604
+ {
2605
+ token: "constant.numeric", // hex3 color
2606
+ regex: "#[a-fA-F0-9]{3}"
2607
+ },
2608
+ {
2609
+ token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"],
2610
+ regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)"
2611
+ },
2612
+ {
2613
+ token: "meta.vendor-prefix.stylus",
2614
+ regex: "-webkit-|-moz\\-|-ms-|-o-"
2615
+ },
2616
+ {
2617
+ token: "keyword.control.stylus",
2618
+ regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"
2619
+ },
2620
+ {
2621
+ token: "keyword.operator.stylus",
2622
+ regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="
2623
+ },
2624
+ {
2625
+ token: "keyword.operator.stylus",
2626
+ regex: "(?:in|is(?:nt)?|not)\\b"
2627
+ },
2628
+ {
2629
+ token: "string",
2630
+ regex: "'(?=.)",
2631
+ next: "qstring"
2632
+ }, {
2633
+ token: "string",
2634
+ regex: '"(?=.)',
2635
+ next: "qqstring"
2636
+ },
2637
+ {
2638
+ token: "constant.numeric",
2639
+ regex: CssHighlightRules.numRe
2640
+ },
2641
+ {
2642
+ token: "keyword",
2643
+ regex: "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"
2644
+ },
2645
+ {
2646
+ token: keywordMapper,
2647
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
2648
+ }
2649
+ ],
2650
+ "comment": [
2651
+ {
2652
+ token: "comment", // closing comment
2653
+ regex: "\\*\\/",
2654
+ next: "start"
2655
+ }, {
2656
+ defaultToken: "comment"
2657
+ }
2658
+ ],
2659
+ "qqstring": [
2660
+ {
2661
+ token: "string",
2662
+ regex: '[^"\\\\]+'
2663
+ },
2664
+ {
2665
+ token: "string",
2666
+ regex: "\\\\$",
2667
+ next: "qqstring"
2668
+ },
2669
+ {
2670
+ token: "string",
2671
+ regex: '"|$',
2672
+ next: "start"
2673
+ }
2674
+ ],
2675
+ "qstring": [
2676
+ {
2677
+ token: "string",
2678
+ regex: "[^'\\\\]+"
2679
+ },
2680
+ {
2681
+ token: "string",
2682
+ regex: "\\\\$",
2683
+ next: "qstring"
2684
+ },
2685
+ {
2686
+ token: "string",
2687
+ regex: "'|$",
2688
+ next: "start"
2689
+ }
2690
+ ]
2691
+ };
2692
+ };
2693
+ oop.inherits(StylusHighlightRules, TextHighlightRules);
2694
+ exports.StylusHighlightRules = StylusHighlightRules;
2695
+
2696
+ });
2697
+
2698
+ ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict";
2699
+ var oop = require("../lib/oop");
2700
+ var lang = require("../lib/lang");
2701
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2702
+ var CssHighlightRules = require("./css_highlight_rules");
2703
+ var ScssHighlightRules = function () {
2704
+ var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|"));
2705
+ var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
2706
+ "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
2707
+ "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
2708
+ "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
2709
+ "scale_color|transparentize|type_of|unit|unitless|unquote").split("|"));
2710
+ var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|"));
2711
+ var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|"));
2712
+ var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|"));
2713
+ var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
2714
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
2715
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
2716
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
2717
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
2718
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
2719
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
2720
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
2721
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|"));
2722
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
2723
+ this.$rules = {
2724
+ "start": [
2725
+ {
2726
+ token: "comment",
2727
+ regex: "\\/\\/.*$"
2728
+ },
2729
+ {
2730
+ token: "comment", // multi line comment
2731
+ regex: "\\/\\*",
2732
+ next: "comment"
2733
+ }, {
2734
+ token: "string", // single line
2735
+ regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
2736
+ }, {
2737
+ token: "string", // multi line string start
2738
+ regex: '["].*\\\\$',
2739
+ next: "qqstring"
2740
+ }, {
2741
+ token: "string", // single line
2742
+ regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
2743
+ }, {
2744
+ token: "string", // multi line string start
2745
+ regex: "['].*\\\\$",
2746
+ next: "qstring"
2747
+ }, {
2748
+ token: "constant.numeric",
2749
+ regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
2750
+ }, {
2751
+ token: "constant.numeric", // hex6 color
2752
+ regex: "#[a-f0-9]{6}"
2753
+ }, {
2754
+ token: "constant.numeric", // hex3 color
2755
+ regex: "#[a-f0-9]{3}"
2756
+ }, {
2757
+ token: "constant.numeric",
2758
+ regex: numRe
2759
+ }, {
2760
+ token: ["support.function", "string", "support.function"],
2761
+ regex: "(url\\()(.*)(\\))"
2762
+ }, {
2763
+ token: function (value) {
2764
+ if (properties.hasOwnProperty(value.toLowerCase()))
2765
+ return "support.type";
2766
+ if (keywords.hasOwnProperty(value))
2767
+ return "keyword";
2768
+ else if (constants.hasOwnProperty(value))
2769
+ return "constant.language";
2770
+ else if (functions.hasOwnProperty(value))
2771
+ return "support.function";
2772
+ else if (colors.hasOwnProperty(value.toLowerCase()))
2773
+ return "support.constant.color";
2774
+ else if (tags.hasOwnProperty(value.toLowerCase()))
2775
+ return "variable.language";
2776
+ else
2777
+ return "text";
2778
+ },
2779
+ regex: "\\-?[@a-z_][@a-z0-9_\\-]*"
2780
+ }, {
2781
+ token: "variable",
2782
+ regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b"
2783
+ }, {
2784
+ token: "variable.language",
2785
+ regex: "#[a-z0-9-_]+"
2786
+ }, {
2787
+ token: "variable.language",
2788
+ regex: "\\.[a-z0-9-_]+"
2789
+ }, {
2790
+ token: "variable.language",
2791
+ regex: ":[a-z0-9-_]+"
2792
+ }, {
2793
+ token: "constant",
2794
+ regex: "[a-z0-9-_]+"
2795
+ }, {
2796
+ token: "keyword.operator",
2797
+ regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
2798
+ }, {
2799
+ token: "paren.lparen",
2800
+ regex: "[[({]"
2801
+ }, {
2802
+ token: "paren.rparen",
2803
+ regex: "[\\])}]"
2804
+ }, {
2805
+ token: "text",
2806
+ regex: "\\s+"
2807
+ }, {
2808
+ caseInsensitive: true
2809
+ }
2810
+ ],
2811
+ "comment": [
2812
+ {
2813
+ token: "comment", // closing comment
2814
+ regex: "\\*\\/",
2815
+ next: "start"
2816
+ }, {
2817
+ defaultToken: "comment"
2818
+ }
2819
+ ],
2820
+ "qqstring": [
2821
+ {
2822
+ token: "string",
2823
+ regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
2824
+ next: "start"
2825
+ }, {
2826
+ token: "string",
2827
+ regex: '.+'
2828
+ }
2829
+ ],
2830
+ "qstring": [
2831
+ {
2832
+ token: "string",
2833
+ regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
2834
+ next: "start"
2835
+ }, {
2836
+ token: "string",
2837
+ regex: '.+'
2838
+ }
2839
+ ]
2840
+ };
2841
+ };
2842
+ oop.inherits(ScssHighlightRules, TextHighlightRules);
2843
+ exports.ScssHighlightRules = ScssHighlightRules;
2844
+
2845
+ });
2846
+
2847
+ ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module){"use strict";
2848
+ var oop = require("../lib/oop");
2849
+ var lang = require("../lib/lang");
2850
+ var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
2851
+ var SassHighlightRules = function () {
2852
+ ScssHighlightRules.call(this);
2853
+ var start = this.$rules.start;
2854
+ if (start[1].token == "comment") {
2855
+ start.splice(1, 1, {
2856
+ onMatch: function (value, currentState, stack) {
2857
+ stack.unshift(this.next, -1, value.length - 2, currentState);
2858
+ return "comment";
2859
+ },
2860
+ regex: /^\s*\/\*/,
2861
+ next: "comment"
2862
+ }, {
2863
+ token: "error.invalid",
2864
+ regex: "/\\*|[{;}]"
2865
+ }, {
2866
+ token: "support.type",
2867
+ regex: /^\s*:[\w\-]+\s/
2868
+ });
2869
+ this.$rules.comment = [
2870
+ { regex: /^\s*/, onMatch: function (value, currentState, stack) {
2871
+ if (stack[1] === -1)
2872
+ stack[1] = Math.max(stack[2], value.length - 1);
2873
+ if (value.length <= stack[1]) { stack.shift();
2874
+ stack.shift();
2875
+ stack.shift();
2876
+ this.next = stack.shift();
2877
+ return "text";
2878
+ }
2879
+ else {
2880
+ this.next = "";
2881
+ return "comment";
2882
+ }
2883
+ }, next: "start" },
2884
+ { defaultToken: "comment" }
2885
+ ];
2886
+ }
2887
+ };
2888
+ oop.inherits(SassHighlightRules, ScssHighlightRules);
2889
+ exports.SassHighlightRules = SassHighlightRules;
2890
+
2891
+ });
2892
+
2893
+ ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict";
2894
+ var oop = require("../lib/oop");
2895
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2896
+ var CssHighlightRules = require('./css_highlight_rules');
2897
+ var LessHighlightRules = function () {
2898
+ var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" +
2899
+ "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" +
2900
+ "or|and|when|not";
2901
+ var keywords = keywordList.split('|');
2902
+ var properties = CssHighlightRules.supportType.split('|');
2903
+ var keywordMapper = this.createKeywordMapper({
2904
+ "support.constant": CssHighlightRules.supportConstant,
2905
+ "keyword": keywordList,
2906
+ "support.constant.color": CssHighlightRules.supportConstantColor,
2907
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
2908
+ }, "identifier", true);
2909
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
2910
+ this.$rules = {
2911
+ "start": [
2912
+ {
2913
+ token: "comment",
2914
+ regex: "\\/\\/.*$"
2915
+ },
2916
+ {
2917
+ token: "comment", // multi line comment
2918
+ regex: "\\/\\*",
2919
+ next: "comment"
2920
+ }, {
2921
+ token: "string", // single line
2922
+ regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
2923
+ }, {
2924
+ token: "string", // single line
2925
+ regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
2926
+ }, {
2927
+ token: ["constant.numeric", "keyword"],
2928
+ regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
2929
+ }, {
2930
+ token: "constant.numeric", // hex6 color
2931
+ regex: "#[a-f0-9]{6}"
2932
+ }, {
2933
+ token: "constant.numeric", // hex3 color
2934
+ regex: "#[a-f0-9]{3}"
2935
+ }, {
2936
+ token: "constant.numeric",
2937
+ regex: numRe
2938
+ }, {
2939
+ token: ["support.function", "paren.lparen", "string", "paren.rparen"],
2940
+ regex: "(url)(\\()(.*)(\\))"
2941
+ }, {
2942
+ token: ["support.function", "paren.lparen"],
2943
+ regex: "(:extend|[a-z0-9_\\-]+)(\\()"
2944
+ }, {
2945
+ token: function (value) {
2946
+ if (keywords.indexOf(value.toLowerCase()) > -1)
2947
+ return "keyword";
2948
+ else
2949
+ return "variable";
2950
+ },
2951
+ regex: "[@\\$][a-z0-9_\\-@\\$]*\\b"
2952
+ }, {
2953
+ token: "variable",
2954
+ regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"
2955
+ }, {
2956
+ token: function (first, second) {
2957
+ if (properties.indexOf(first.toLowerCase()) > -1) {
2958
+ return ["support.type.property", "text"];
2959
+ }
2960
+ else {
2961
+ return ["support.type.unknownProperty", "text"];
2962
+ }
2963
+ },
2964
+ regex: "([a-z0-9-_]+)(\\s*:)"
2965
+ }, {
2966
+ token: "keyword",
2967
+ regex: "&" // special case - always treat as keyword
2968
+ }, {
2969
+ token: keywordMapper,
2970
+ regex: "\\-?[@a-z_][@a-z0-9_\\-]*"
2971
+ }, {
2972
+ token: "variable.language",
2973
+ regex: "#[a-z0-9-_]+"
2974
+ }, {
2975
+ token: "variable.language",
2976
+ regex: "\\.[a-z0-9-_]+"
2977
+ }, {
2978
+ token: "variable.language",
2979
+ regex: ":[a-z_][a-z0-9-_]*"
2980
+ }, {
2981
+ token: "constant",
2982
+ regex: "[a-z0-9-_]+"
2983
+ }, {
2984
+ token: "keyword.operator",
2985
+ regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*"
2986
+ }, {
2987
+ token: "paren.lparen",
2988
+ regex: "[[({]"
2989
+ }, {
2990
+ token: "paren.rparen",
2991
+ regex: "[\\])}]"
2992
+ }, {
2993
+ token: "text",
2994
+ regex: "\\s+"
2995
+ }, {
2996
+ caseInsensitive: true
2997
+ }
2998
+ ],
2999
+ "comment": [
3000
+ {
3001
+ token: "comment", // closing comment
3002
+ regex: "\\*\\/",
3003
+ next: "start"
3004
+ }, {
3005
+ defaultToken: "comment"
3006
+ }
3007
+ ]
3008
+ };
3009
+ this.normalizeRules();
3010
+ };
3011
+ oop.inherits(LessHighlightRules, TextHighlightRules);
3012
+ exports.LessHighlightRules = LessHighlightRules;
3013
+
3014
+ });
3015
+
3016
+ ace.define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
3017
+ var modes = require("../config").$modes;
3018
+ var oop = require("../lib/oop");
3019
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3020
+ var SlimHighlightRules = function () {
3021
+ this.$rules = {
3022
+ "start": [
3023
+ {
3024
+ token: "keyword",
3025
+ regex: /^(\s*)(\w+):\s*/,
3026
+ onMatch: function (value, state, stack, line) {
3027
+ var indent = /^\s*/.exec(line)[0];
3028
+ var m = value.match(/^(\s*)(\w+):/);
3029
+ var language = m[2];
3030
+ if (!/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(language))
3031
+ language = "";
3032
+ stack.unshift("language-embed", [], [indent, language], state);
3033
+ return this.token;
3034
+ },
3035
+ stateName: "language-embed",
3036
+ next: [{
3037
+ token: "string",
3038
+ regex: /^(\s*)/,
3039
+ onMatch: function (value, state, stack, line) {
3040
+ var indent = stack[2][0];
3041
+ if (indent.length >= value.length) {
3042
+ stack.splice(0, 3);
3043
+ this.next = stack.shift();
3044
+ return this.token;
3045
+ }
3046
+ this.next = "";
3047
+ return [{ type: "text", value: indent }];
3048
+ },
3049
+ next: ""
3050
+ }, {
3051
+ token: "string",
3052
+ regex: /.+/,
3053
+ onMatch: function (value, state, stack, line) {
3054
+ var indent = stack[2][0];
3055
+ var language = stack[2][1];
3056
+ var embedState = stack[1];
3057
+ if (modes[language]) {
3058
+ var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0));
3059
+ stack[1] = data.state;
3060
+ return data.tokens;
3061
+ }
3062
+ return this.token;
3063
+ }
3064
+ }]
3065
+ },
3066
+ {
3067
+ token: 'constant.begin.javascript.filter.slim',
3068
+ regex: '^(\\s*)():$'
3069
+ }, {
3070
+ token: 'constant.begin..filter.slim',
3071
+ regex: '^(\\s*)(ruby):$'
3072
+ }, {
3073
+ token: 'constant.begin.coffeescript.filter.slim',
3074
+ regex: '^(\\s*)():$'
3075
+ }, {
3076
+ token: 'constant.begin..filter.slim',
3077
+ regex: '^(\\s*)(markdown):$'
3078
+ }, {
3079
+ token: 'constant.begin.css.filter.slim',
3080
+ regex: '^(\\s*)():$'
3081
+ }, {
3082
+ token: 'constant.begin.scss.filter.slim',
3083
+ regex: '^(\\s*)():$'
3084
+ }, {
3085
+ token: 'constant.begin..filter.slim',
3086
+ regex: '^(\\s*)(sass):$'
3087
+ }, {
3088
+ token: 'constant.begin..filter.slim',
3089
+ regex: '^(\\s*)(less):$'
3090
+ }, {
3091
+ token: 'constant.begin..filter.slim',
3092
+ regex: '^(\\s*)(erb):$'
3093
+ }, {
3094
+ token: 'keyword.html.tags.slim',
3095
+ regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b'
3096
+ }, {
3097
+ token: 'keyword.slim',
3098
+ regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)'
3099
+ }, {
3100
+ token: "string",
3101
+ regex: /^(\s*)('|\||\/|(\/!))\s*/,
3102
+ onMatch: function (val, state, stack, line) {
3103
+ var indent = /^\s*/.exec(line)[0];
3104
+ if (stack.length < 1) {
3105
+ stack.push(this.next);
3106
+ }
3107
+ else {
3108
+ stack[0] = "mlString";
3109
+ }
3110
+ if (stack.length < 2) {
3111
+ stack.push(indent.length);
3112
+ }
3113
+ else {
3114
+ stack[1] = indent.length;
3115
+ }
3116
+ return this.token;
3117
+ },
3118
+ next: "mlString"
3119
+ }, {
3120
+ token: 'keyword.control.slim',
3121
+ regex: '^(\\s*)(\\-|==|=)',
3122
+ push: [{
3123
+ token: 'control.end.slim',
3124
+ regex: '$',
3125
+ next: "pop"
3126
+ }, {
3127
+ include: "rubyline"
3128
+ }, {
3129
+ include: "misc"
3130
+ }]
3131
+ }, {
3132
+ token: 'paren',
3133
+ regex: '\\(',
3134
+ push: [{
3135
+ token: 'paren',
3136
+ regex: '\\)',
3137
+ next: "pop"
3138
+ }, {
3139
+ include: "misc"
3140
+ }]
3141
+ }, {
3142
+ token: 'paren',
3143
+ regex: '\\[',
3144
+ push: [{
3145
+ token: 'paren',
3146
+ regex: '\\]',
3147
+ next: "pop"
3148
+ }, {
3149
+ include: "misc"
3150
+ }]
3151
+ }, {
3152
+ include: "misc"
3153
+ }
3154
+ ],
3155
+ "mlString": [{
3156
+ token: "indent",
3157
+ regex: /^\s*/,
3158
+ onMatch: function (val, state, stack) {
3159
+ var curIndent = stack[1];
3160
+ if (curIndent >= val.length) {
3161
+ this.next = "start";
3162
+ stack.splice(0);
3163
+ }
3164
+ else {
3165
+ this.next = "mlString";
3166
+ }
3167
+ return this.token;
3168
+ },
3169
+ next: "start"
3170
+ }, {
3171
+ defaultToken: "string"
3172
+ }],
3173
+ "rubyline": [{
3174
+ token: "keyword.operator.ruby.embedded.slim",
3175
+ regex: "(==|=)(<>|><|<'|'<|<|>)?|-"
3176
+ }, {
3177
+ token: "list.ruby.operators.slim",
3178
+ regex: "(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b"
3179
+ }, {
3180
+ token: "string",
3181
+ regex: "['](.)*?[']"
3182
+ }, {
3183
+ token: "string",
3184
+ regex: "[\"](.)*?[\"]"
3185
+ }],
3186
+ "misc": [{
3187
+ token: 'class.variable.slim',
3188
+ regex: '\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b'
3189
+ }, {
3190
+ token: "list.meta.slim",
3191
+ regex: "(\\b)(true|false|nil)(\\b)"
3192
+ }, {
3193
+ token: 'keyword.operator.equals.slim',
3194
+ regex: '='
3195
+ }, {
3196
+ token: "string",
3197
+ regex: "['](.)*?[']"
3198
+ }, {
3199
+ token: "string",
3200
+ regex: "[\"](.)*?[\"]"
3201
+ }]
3202
+ };
3203
+ this.normalizeRules();
3204
+ };
3205
+ oop.inherits(SlimHighlightRules, TextHighlightRules);
3206
+ exports.SlimHighlightRules = SlimHighlightRules;
3207
+
3208
+ });
3209
+
3210
+ ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict";
3211
+ var modes = require("../config").$modes;
3212
+ var oop = require("../lib/oop");
3213
+ var lang = require("../lib/lang");
3214
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3215
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
3216
+ var escaped = function (ch) {
3217
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
3218
+ };
3219
+ var MarkdownHighlightRules = function () {
3220
+ HtmlHighlightRules.call(this);
3221
+ var codeBlockStartRule = {
3222
+ token: "support.function",
3223
+ regex: /^\s*(```+[^`]*|~~~+[^~]*)$/,
3224
+ onMatch: function (value, state, stack, line) {
3225
+ var m = value.match(/^(\s*)([`~]+)(.*)/);
3226
+ var language = /[\w-]+|$/.exec(m[3])[0];
3227
+ if (!modes[language])
3228
+ language = "";
3229
+ stack.unshift("githubblock", [], [m[1], m[2], language], state);
3230
+ return this.token;
3231
+ },
3232
+ next: "githubblock"
3233
+ };
3234
+ var codeBlockRules = [{
3235
+ token: "support.function",
3236
+ regex: ".*",
3237
+ onMatch: function (value, state, stack, line) {
3238
+ var embedState = stack[1];
3239
+ var indent = stack[2][0];
3240
+ var endMarker = stack[2][1];
3241
+ var language = stack[2][2];
3242
+ var m = /^(\s*)(`+|~+)\s*$/.exec(value);
3243
+ if (m && m[1].length < indent.length + 3
3244
+ && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) {
3245
+ stack.splice(0, 3);
3246
+ this.next = stack.shift();
3247
+ return this.token;
3248
+ }
3249
+ this.next = "";
3250
+ if (language && modes[language]) {
3251
+ var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0));
3252
+ stack[1] = data.state;
3253
+ return data.tokens;
3254
+ }
3255
+ return this.token;
3256
+ }
3257
+ }];
3258
+ this.$rules["start"].unshift({
3259
+ token: "empty_line",
3260
+ regex: '^$',
3261
+ next: "allowBlock"
3262
+ }, {
3263
+ token: "markup.heading.1",
3264
+ regex: "^=+(?=\\s*$)"
3265
+ }, {
3266
+ token: "markup.heading.2",
3267
+ regex: "^\\-+(?=\\s*$)"
3268
+ }, {
3269
+ token: function (value) {
3270
+ return "markup.heading." + value.length;
3271
+ },
3272
+ regex: /^#{1,6}(?=\s|$)/,
3273
+ next: "header"
3274
+ }, codeBlockStartRule, {
3275
+ token: "string.blockquote",
3276
+ regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
3277
+ next: "blockquote"
3278
+ }, {
3279
+ token: "constant",
3280
+ regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",
3281
+ next: "allowBlock"
3282
+ }, {
3283
+ token: "markup.list",
3284
+ regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
3285
+ next: "listblock-start"
3286
+ }, {
3287
+ include: "basic"
3288
+ });
3289
+ this.addRules({
3290
+ "basic": [{
3291
+ token: "constant.language.escape",
3292
+ regex: /\\[\\`*_{}\[\]()#+\-.!]/
3293
+ }, {
3294
+ token: "support.function",
3295
+ regex: "(`+)(.*?[^`])(\\1)"
3296
+ }, {
3297
+ token: ["text", "constant", "text", "url", "string", "text"],
3298
+ regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
3299
+ }, {
3300
+ token: ["text", "string", "text", "constant", "text"],
3301
+ regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])"
3302
+ }, {
3303
+ token: ["text", "string", "text", "markup.underline", "string", "text"],
3304
+ regex: "(\\!?\\[)(" + // [
3305
+ escaped("]") + // link text or alt text
3306
+ ")(\\]\\()" + // ](
3307
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image
3308
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
3309
+ "(\\))" // )
3310
+ }, {
3311
+ token: "string.strong",
3312
+ regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
3313
+ }, {
3314
+ token: "string.emphasis",
3315
+ regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
3316
+ }, {
3317
+ token: ["text", "url", "text"],
3318
+ regex: "(<)(" +
3319
+ "(?:https?|ftp|dict):[^'\">\\s]+" +
3320
+ "|" +
3321
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" +
3322
+ ")(>)"
3323
+ }],
3324
+ "allowBlock": [
3325
+ { token: "support.function", regex: "^ {4}.+", next: "allowBlock" },
3326
+ { token: "empty_line", regex: '^$', next: "allowBlock" },
3327
+ { token: "empty", regex: "", next: "start" }
3328
+ ],
3329
+ "header": [{
3330
+ regex: "$",
3331
+ next: "start"
3332
+ }, {
3333
+ include: "basic"
3334
+ }, {
3335
+ defaultToken: "heading"
3336
+ }],
3337
+ "listblock-start": [{
3338
+ token: "support.variable",
3339
+ regex: /(?:\[[ x]\])?/,
3340
+ next: "listblock"
3341
+ }],
3342
+ "listblock": [{
3343
+ token: "empty_line",
3344
+ regex: "^$",
3345
+ next: "start"
3346
+ }, {
3347
+ token: "markup.list",
3348
+ regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
3349
+ next: "listblock-start"
3350
+ }, {
3351
+ include: "basic", noEscape: true
3352
+ },
3353
+ codeBlockStartRule,
3354
+ {
3355
+ defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly
3356
+ }],
3357
+ "blockquote": [{
3358
+ token: "empty_line",
3359
+ regex: "^\\s*$",
3360
+ next: "start"
3361
+ }, {
3362
+ token: "string.blockquote",
3363
+ regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
3364
+ next: "blockquote"
3365
+ }, {
3366
+ include: "basic", noEscape: true
3367
+ }, {
3368
+ defaultToken: "string.blockquote"
3369
+ }],
3370
+ "githubblock": codeBlockRules
3371
+ });
3372
+ this.normalizeRules();
3373
+ };
3374
+ oop.inherits(MarkdownHighlightRules, TextHighlightRules);
3375
+ exports.MarkdownHighlightRules = MarkdownHighlightRules;
3376
+
3377
+ });
3378
+
3379
+ ace.define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){/*
3380
+ THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: C5B73B98-5F2A-42E3-9F0E-028A74A9FE4B)
3381
+ */
3382
+ "use strict";
3383
+ var oop = require("../lib/oop");
3384
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3385
+ var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
3386
+ var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
3387
+ var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
3388
+ var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
3389
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
3390
+ function mixin_embed(tag, prefix) {
3391
+ return {
3392
+ token: "entity.name.function.jade",
3393
+ regex: "^\\s*\\:" + tag,
3394
+ next: prefix + "start"
3395
+ };
3396
+ }
3397
+ var JadeHighlightRules = function () {
3398
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
3399
+ "u[0-9a-fA-F]{4}|" + // unicode
3400
+ "[0-2][0-7]{0,2}|" + // oct
3401
+ "3[0-6][0-7]?|" + // oct
3402
+ "37[0-7]?|" + // oct
3403
+ "[4-7][0-7]?|" + //oct
3404
+ ".)";
3405
+ this.$rules =
3406
+ {
3407
+ "start": [
3408
+ {
3409
+ token: "keyword.control.import.include.jade",
3410
+ regex: "\\s*\\binclude\\b"
3411
+ },
3412
+ {
3413
+ token: "keyword.other.doctype.jade",
3414
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
3415
+ },
3416
+ {
3417
+ onMatch: function (value, currentState, stack) {
3418
+ stack.unshift(this.next, value.length - 2, currentState);
3419
+ return "comment";
3420
+ },
3421
+ regex: /^\s*\/\//,
3422
+ next: "comment_block"
3423
+ },
3424
+ mixin_embed("markdown", "markdown-"),
3425
+ mixin_embed("sass", "sass-"),
3426
+ mixin_embed("less", "less-"),
3427
+ mixin_embed("coffee", "coffee-"),
3428
+ {
3429
+ token: ["storage.type.function.jade",
3430
+ "entity.name.function.jade",
3431
+ "punctuation.definition.parameters.begin.jade",
3432
+ "variable.parameter.function.jade",
3433
+ "punctuation.definition.parameters.end.jade"
3434
+ ],
3435
+ regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"
3436
+ },
3437
+ {
3438
+ token: ["storage.type.function.jade", "entity.name.function.jade"],
3439
+ regex: "^(\\s*mixin)( [\\w\\-]+)"
3440
+ },
3441
+ {
3442
+ token: "source.js.embedded.jade",
3443
+ regex: "^\\s*(?:-|=|!=)",
3444
+ next: "js-start"
3445
+ },
3446
+ {
3447
+ token: "string.interpolated.jade",
3448
+ regex: "[#!]\\{[^\\}]+\\}"
3449
+ },
3450
+ {
3451
+ token: "meta.tag.any.jade",
3452
+ regex: /^\s*(?!\w+:)(?:[\w-]+|(?=\.|#)])/,
3453
+ next: "tag_single"
3454
+ },
3455
+ {
3456
+ token: "suport.type.attribute.id.jade",
3457
+ regex: "#\\w+"
3458
+ },
3459
+ {
3460
+ token: "suport.type.attribute.class.jade",
3461
+ regex: "\\.\\w+"
3462
+ },
3463
+ {
3464
+ token: "punctuation",
3465
+ regex: "\\s*(?:\\()",
3466
+ next: "tag_attributes"
3467
+ }
3468
+ ],
3469
+ "comment_block": [
3470
+ { regex: /^\s*(?:\/\/)?/, onMatch: function (value, currentState, stack) {
3471
+ if (value.length <= stack[1]) {
3472
+ if (value.slice(-1) == "/") {
3473
+ stack[1] = value.length - 2;
3474
+ this.next = "";
3475
+ return "comment";
3476
+ }
3477
+ stack.shift();
3478
+ stack.shift();
3479
+ this.next = stack.shift();
3480
+ return "text";
3481
+ }
3482
+ else {
3483
+ this.next = "";
3484
+ return "comment";
3485
+ }
3486
+ }, next: "start" },
3487
+ { defaultToken: "comment" }
3488
+ ],
3489
+ "tag_single": [
3490
+ {
3491
+ token: "entity.other.attribute-name.class.jade",
3492
+ regex: "\\.[\\w-]+"
3493
+ },
3494
+ {
3495
+ token: "entity.other.attribute-name.id.jade",
3496
+ regex: "#[\\w-]+"
3497
+ },
3498
+ {
3499
+ token: ["text", "punctuation"],
3500
+ regex: "($)|((?!\\.|#|=|-))",
3501
+ next: "start"
3502
+ }
3503
+ ],
3504
+ "tag_attributes": [
3505
+ {
3506
+ token: "string",
3507
+ regex: "'(?=.)",
3508
+ next: "qstring"
3509
+ },
3510
+ {
3511
+ token: "string",
3512
+ regex: '"(?=.)',
3513
+ next: "qqstring"
3514
+ },
3515
+ {
3516
+ token: ["entity.other.attribute-name.jade", "punctuation"],
3517
+ regex: "([a-zA-Z:\\.-]+)(=)?",
3518
+ next: "attribute_strings"
3519
+ },
3520
+ {
3521
+ token: "punctuation",
3522
+ regex: "\\)",
3523
+ next: "start"
3524
+ }
3525
+ ],
3526
+ "attribute_strings": [
3527
+ {
3528
+ token: "string",
3529
+ regex: "'(?=.)",
3530
+ next: "qstring"
3531
+ },
3532
+ {
3533
+ token: "string",
3534
+ regex: '"(?=.)',
3535
+ next: "qqstring"
3536
+ },
3537
+ {
3538
+ token: "string",
3539
+ regex: '(?=\\S)',
3540
+ next: "tag_attributes"
3541
+ }
3542
+ ],
3543
+ "qqstring": [
3544
+ {
3545
+ token: "constant.language.escape",
3546
+ regex: escapedRe
3547
+ }, {
3548
+ token: "string",
3549
+ regex: '[^"\\\\]+'
3550
+ }, {
3551
+ token: "string",
3552
+ regex: "\\\\$",
3553
+ next: "qqstring"
3554
+ }, {
3555
+ token: "string",
3556
+ regex: '"|$',
3557
+ next: "tag_attributes"
3558
+ }
3559
+ ],
3560
+ "qstring": [
3561
+ {
3562
+ token: "constant.language.escape",
3563
+ regex: escapedRe
3564
+ }, {
3565
+ token: "string",
3566
+ regex: "[^'\\\\]+"
3567
+ }, {
3568
+ token: "string",
3569
+ regex: "\\\\$",
3570
+ next: "qstring"
3571
+ }, {
3572
+ token: "string",
3573
+ regex: "'|$",
3574
+ next: "tag_attributes"
3575
+ }
3576
+ ]
3577
+ };
3578
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
3579
+ token: "text",
3580
+ regex: ".$",
3581
+ next: "start"
3582
+ }]);
3583
+ };
3584
+ oop.inherits(JadeHighlightRules, TextHighlightRules);
3585
+ exports.JadeHighlightRules = JadeHighlightRules;
3586
+
3587
+ });
3588
+
3589
+ ace.define("ace/mode/vue_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/typescript_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/stylus_highlight_rules","ace/mode/sass_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/tokenizer","ace/mode/slim_highlight_rules","ace/mode/jade_highlight_rules","ace/mode/javascript"], function(require, exports, module){"use strict";
3590
+ var __read = (this && this.__read) || function (o, n) {
3591
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3592
+ if (!m) return o;
3593
+ var i = m.call(o), r, ar = [], e;
3594
+ try {
3595
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3596
+ }
3597
+ catch (error) { e = { error: error }; }
3598
+ finally {
3599
+ try {
3600
+ if (r && !r.done && (m = i["return"])) m.call(i);
3601
+ }
3602
+ finally { if (e) throw e.error; }
3603
+ }
3604
+ return ar;
3605
+ };
3606
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3607
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3608
+ if (ar || !(i in from)) {
3609
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
3610
+ ar[i] = from[i];
3611
+ }
3612
+ }
3613
+ return to.concat(ar || Array.prototype.slice.call(from));
3614
+ };
3615
+ var oop = require("../lib/oop");
3616
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
3617
+ var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
3618
+ var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
3619
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
3620
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
3621
+ var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
3622
+ var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
3623
+ var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
3624
+ var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
3625
+ var Tokenizer = require("../tokenizer").Tokenizer;
3626
+ var SlimHighlightRules = require("./slim_highlight_rules").SlimHighlightRules;
3627
+ var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
3628
+ var JavaScriptMode = require("./javascript").Mode;
3629
+ var VueHighlightRules = function (options) {
3630
+ this.embedLangRules = function (HighlightRules, tag, value, attribute) {
3631
+ var condition = attribute ? "(?=[^>]*" + attribute + "\\s*=\\s*['\"]" + value + "['\"]))" : "(?=\\s|>|$))";
3632
+ this.$rules.start.unshift({
3633
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
3634
+ regex: "(<)(" + tag + condition,
3635
+ next: [
3636
+ {
3637
+ token: "meta.tag.punctuation.tag-close." + tag + ".xml",
3638
+ regex: "/?>",
3639
+ next: value + "-start"
3640
+ }, { include: "attributes" }
3641
+ ]
3642
+ });
3643
+ this.$rules[tag + "-end"] = [
3644
+ { include: "attributes" }, {
3645
+ token: "meta.tag.punctuation.tag-close.xml",
3646
+ regex: "/?>",
3647
+ next: "start",
3648
+ onMatch: function (value, currentState, stack) {
3649
+ stack.splice(0);
3650
+ return this.token;
3651
+ }
3652
+ }
3653
+ ];
3654
+ this.embedRules(HighlightRules, value + "-", [
3655
+ {
3656
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
3657
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
3658
+ next: tag + "-end"
3659
+ }, {
3660
+ token: "string.cdata.xml",
3661
+ regex: "<\\!\\[CDATA\\["
3662
+ }, {
3663
+ token: "string.cdata.xml",
3664
+ regex: "\\]\\]>"
3665
+ }
3666
+ ]);
3667
+ };
3668
+ var vueRules = [
3669
+ {
3670
+ include: "vue-interpolations"
3671
+ }
3672
+ ];
3673
+ var VueRules = new HtmlHighlightRules().getRules();
3674
+ VueRules.start = vueRules.concat(VueRules.start);
3675
+ VueRules["vue-interpolations"] = [
3676
+ {
3677
+ token: "punctuation",
3678
+ regex: /\{\{\{?/,
3679
+ next: "js-interpolation-start"
3680
+ }
3681
+ ];
3682
+ var self = this;
3683
+ VueRules.tag_stuff.unshift({
3684
+ token: "string",
3685
+ regex: /(?:\b(v-)|(:|@))(\[?[a-zA-Z\-.]+\]?)(?:(\:\[?[a-zA-Z\-]+\]?))?((?:\.[a-zA-Z\-]+)*)(\s*)(=)(\s*)(["'])/,
3686
+ onMatch: function (value, currentState, stack) {
3687
+ var quote = value[value.length - 1];
3688
+ stack.unshift(quote, currentState);
3689
+ var values = new RegExp(this.regex).exec(value);
3690
+ if (!values)
3691
+ return "text";
3692
+ var tokens = [];
3693
+ var types = [
3694
+ "entity.other.attribute-name.xml", "punctuation.separator.key-value.xml",
3695
+ "entity.other.attribute-name.xml", "entity.other.attribute-name.xml", "entity.other.attribute-name.xml",
3696
+ "text", "punctuation.separator.key-value.xml", "text", "string"
3697
+ ];
3698
+ for (var i = 0, l = types.length; i < l; i++) {
3699
+ if (values[i + 1])
3700
+ tokens[tokens.length] = {
3701
+ type: types[i],
3702
+ value: values[i + 1]
3703
+ };
3704
+ }
3705
+ return tokens;
3706
+ },
3707
+ next: [
3708
+ {
3709
+ token: "string",
3710
+ regex: /$/,
3711
+ next: "tag_stuff"
3712
+ }, {
3713
+ token: "string",
3714
+ regex: /.*/,
3715
+ onMatch: function (value, currentState, stack, line) {
3716
+ var quote = stack[0];
3717
+ var parts = value.split(quote);
3718
+ var text = parts[0];
3719
+ this.next = "";
3720
+ if (parts.length > 1) {
3721
+ stack.shift();
3722
+ var nextState = stack.shift();
3723
+ var currentData = new Tokenizer(self.$rules).getLineTokens(parts.slice(1).join(quote), nextState);
3724
+ currentData.tokens.unshift({
3725
+ type: "string",
3726
+ value: quote
3727
+ });
3728
+ this.next = Array.isArray(currentData.state) ? currentData.state[currentData.state.length - 1]
3729
+ : currentData.state;
3730
+ }
3731
+ var data = new JavaScriptMode().getTokenizer().getLineTokens(text, "start");
3732
+ var tokens = data.tokens;
3733
+ if (currentData) {
3734
+ tokens.push.apply(tokens, __spreadArray([], __read(currentData.tokens), false));
3735
+ }
3736
+ return tokens;
3737
+ }
3738
+ }
3739
+ ]
3740
+ }, {
3741
+ token: "string",
3742
+ regex: '"',
3743
+ next: [
3744
+ {
3745
+ token: "string",
3746
+ regex: '"|$',
3747
+ next: "tag_stuff"
3748
+ }, {
3749
+ include: "vue-interpolations"
3750
+ }, {
3751
+ defaultToken: "string"
3752
+ }
3753
+ ]
3754
+ }, {
3755
+ token: "string",
3756
+ regex: "'",
3757
+ next: [
3758
+ {
3759
+ token: "string",
3760
+ regex: "'|$",
3761
+ next: "tag_stuff"
3762
+ }, {
3763
+ include: "vue-interpolations"
3764
+ }, {
3765
+ defaultToken: "string"
3766
+ }
3767
+ ]
3768
+ });
3769
+ this.$rules = VueRules;
3770
+ this.embedRules(JavaScriptHighlightRules, "js-interpolation-", [
3771
+ {
3772
+ token: "punctuation",
3773
+ regex: /\}\}\}?/,
3774
+ next: "start"
3775
+ }
3776
+ ]);
3777
+ this.embedLangRules(CssHighlightRules, "style", "css");
3778
+ this.embedLangRules(StylusHighlightRules, "style", "stylus", "lang");
3779
+ this.embedLangRules(SassHighlightRules, "style", "sass", "lang");
3780
+ this.embedLangRules(ScssHighlightRules, "style", "scss", "lang");
3781
+ this.embedLangRules(LessHighlightRules, "style", "less", "lang");
3782
+ this.embedLangRules(TypeScriptHighlightRules, "script", "ts", "lang");
3783
+ this.embedLangRules(CoffeeHighlightRules, "script", "coffee", "lang");
3784
+ this.embedLangRules(SlimHighlightRules, "template", "slm", "lang");
3785
+ this.embedLangRules(JadeHighlightRules, "template", "jade", "lang");
3786
+ this.embedLangRules(StylusHighlightRules, "template", "stylus", "lang");
3787
+ this.normalizeRules();
3788
+ };
3789
+ oop.inherits(VueHighlightRules, HtmlHighlightRules);
3790
+ exports.VueHighlightRules = VueHighlightRules;
3791
+
3792
+ });
3793
+
3794
+ ace.define("ace/mode/vue",["require","exports","module","ace/lib/oop","ace/mode/folding/html","ace/lib/lang","ace/mode/behaviour/xml","ace/mode/html_completions","ace/mode/html","ace/mode/vue_highlight_rules"], function(require, exports, module){"use strict";
3795
+ var oop = require("../lib/oop");
3796
+ var HtmlFoldMode = require("./folding/html").FoldMode;
3797
+ var lang = require("../lib/lang");
3798
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
3799
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
3800
+ var HTMLMode = require("./html").Mode;
3801
+ var VueHighlightRules = require("./vue_highlight_rules").VueHighlightRules;
3802
+ var voidElements = [
3803
+ "area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source",
3804
+ "track", "wbr"
3805
+ ];
3806
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
3807
+ var Mode = function () {
3808
+ this.HighlightRules = VueHighlightRules;
3809
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
3810
+ this.$behaviour = new XmlBehaviour();
3811
+ this.$completer = new HtmlCompletions();
3812
+ };
3813
+ oop.inherits(Mode, HTMLMode);
3814
+ (function () {
3815
+ this.blockComment = {
3816
+ start: "<!--",
3817
+ end: "-->"
3818
+ };
3819
+ this.voidElements = lang.arrayToMap(voidElements);
3820
+ this.getCompletions = function (state, session, pos, prefix) {
3821
+ return this.$completer.getCompletions(state, session, pos, prefix);
3822
+ };
3823
+ this.$id = "ace/mode/vue";
3824
+ }).call(Mode.prototype);
3825
+ exports.Mode = Mode;
3826
+
3827
+ }); (function() {
3828
+ ace.require(["ace/mode/vue"], function(m) {
3829
+ if (typeof module == "object" && typeof exports == "object" && module) {
3830
+ module.exports = m;
3831
+ }
3832
+ });
3833
+ })();
3834
+