@openui5/sap.ui.codeeditor 1.133.0 → 1.134.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 +1 -22
  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
@@ -8,7 +8,7 @@ var DocCommentHighlightRules = function () {
8
8
  token: "comment.doc.tag",
9
9
  regex: "@\\w+(?=\\s|$)"
10
10
  }, DocCommentHighlightRules.getTagRule(), {
11
- defaultToken: "comment.doc",
11
+ defaultToken: "comment.doc.body",
12
12
  caseInsensitive: true
13
13
  }
14
14
  ]
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
23
23
  };
24
24
  DocCommentHighlightRules.getStartRule = function (start) {
25
25
  return {
26
- token: "comment.doc",
27
- regex: "\\/\\*(?=\\*)",
26
+ token: "comment.doc", // doc comment
27
+ regex: /\/\*\*(?!\/)/,
28
28
  next: start
29
29
  };
30
30
  };
31
31
  DocCommentHighlightRules.getEndRule = function (start) {
32
32
  return {
33
- token: "comment.doc",
33
+ token: "comment.doc", // closing comment
34
34
  regex: "\\*\\/",
35
35
  next: start
36
36
  };
@@ -115,7 +115,7 @@ var CssHighlightRules = function () {
115
115
  + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
116
116
  }],
117
117
  "comments": [{
118
- token: "comment",
118
+ token: "comment", // multi line comment
119
119
  regex: "\\/\\*",
120
120
  push: [{
121
121
  token: "comment",
@@ -144,10 +144,10 @@ var CssHighlightRules = function () {
144
144
  token: "constant.numeric",
145
145
  regex: numRe
146
146
  }, {
147
- token: "constant.numeric",
147
+ token: "constant.numeric", // hex6 color
148
148
  regex: "#[a-f0-9]{6}"
149
149
  }, {
150
- token: "constant.numeric",
150
+ token: "constant.numeric", // hex3 color
151
151
  regex: "#[a-f0-9]{3}"
152
152
  }, {
153
153
  token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
@@ -160,6 +160,9 @@ var CssHighlightRules = function () {
160
160
  }, {
161
161
  token: keywordMapper,
162
162
  regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
163
+ }, {
164
+ token: "paren.lparen",
165
+ regex: "\\{"
163
166
  }, {
164
167
  caseInsensitive: true
165
168
  }],
@@ -243,7 +246,7 @@ var JsDocCommentHighlightRules = function () {
243
246
  ]
244
247
  }, {
245
248
  token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
246
- regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
249
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
247
250
  next: "pop"
248
251
  }, {
249
252
  token: "rparen.doc",
@@ -303,7 +306,7 @@ var JsDocCommentHighlightRules = function () {
303
306
  },
304
307
  JsDocCommentHighlightRules.getTagRule(),
305
308
  {
306
- defaultToken: "comment.doc",
309
+ defaultToken: "comment.doc.body",
307
310
  caseInsensitive: true
308
311
  }
309
312
  ],
@@ -326,14 +329,14 @@ JsDocCommentHighlightRules.getTagRule = function (start) {
326
329
  };
327
330
  JsDocCommentHighlightRules.getStartRule = function (start) {
328
331
  return {
329
- token: "comment.doc",
330
- regex: "\\/\\*(?=\\*)",
332
+ token: "comment.doc", // doc comment
333
+ regex: /\/\*\*(?!\/)/,
331
334
  next: start
332
335
  };
333
336
  };
334
337
  JsDocCommentHighlightRules.getEndRule = function (start) {
335
338
  return {
336
- token: "comment.doc",
339
+ token: "comment.doc", // closing comment
337
340
  regex: "\\*\\/",
338
341
  next: start
339
342
  };
@@ -348,7 +351,7 @@ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocC
348
351
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
349
352
  var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
350
353
  var JavaScriptHighlightRules = function (options) {
351
- var keywordMapper = this.createKeywordMapper({
354
+ var keywords = {
352
355
  "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
353
356
  "Namespace|QName|XML|XMLList|" + // E4X
354
357
  "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
@@ -358,9 +361,9 @@ var JavaScriptHighlightRules = function (options) {
358
361
  "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
359
362
  "isNaN|parseFloat|parseInt|" +
360
363
  "JSON|Math|" + // Other
361
- "this|arguments|prototype|window|document",
364
+ "this|arguments|prototype|window|document", // Pseudo
362
365
  "keyword": "const|yield|import|get|set|async|await|" +
363
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
366
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
364
367
  "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
365
368
  "__parent__|__count__|escape|unescape|with|__proto__|" +
366
369
  "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
@@ -368,7 +371,8 @@ var JavaScriptHighlightRules = function (options) {
368
371
  "constant.language": "null|Infinity|NaN|undefined",
369
372
  "support.function": "alert",
370
373
  "constant.language.boolean": "true|false"
371
- }, "identifier");
374
+ };
375
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
372
376
  var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
373
377
  var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
374
378
  "u[0-9a-fA-F]{4}|" + // unicode
@@ -377,10 +381,16 @@ var JavaScriptHighlightRules = function (options) {
377
381
  "3[0-7][0-7]?|" + // oct
378
382
  "[4-7][0-7]?|" + //oct
379
383
  ".)";
384
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
385
+ var functionCallStartRule = {
386
+ token: ["identifier", "text", "paren.lparen"],
387
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
388
+ };
380
389
  this.$rules = {
381
390
  "no_regex": [
382
391
  DocCommentHighlightRules.getStartRule("doc-start"),
383
392
  comments("no_regex"),
393
+ functionCallStartRule,
384
394
  {
385
395
  token: "string",
386
396
  regex: "'(?=.)",
@@ -390,58 +400,36 @@ var JavaScriptHighlightRules = function (options) {
390
400
  regex: '"(?=.)',
391
401
  next: "qqstring"
392
402
  }, {
393
- token: "constant.numeric",
403
+ token: "constant.numeric", // hexadecimal, octal and binary
394
404
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
395
405
  }, {
396
- token: "constant.numeric",
406
+ token: "constant.numeric", // decimal integers and floats
397
407
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
398
- }, {
399
- token: [
400
- "storage.type", "punctuation.operator", "support.function",
401
- "punctuation.operator", "entity.name.function", "text", "keyword.operator"
402
- ],
403
- regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
404
- next: "function_arguments"
405
- }, {
406
- token: [
407
- "storage.type", "punctuation.operator", "entity.name.function", "text",
408
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
409
- ],
410
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
411
- next: "function_arguments"
412
408
  }, {
413
409
  token: [
414
410
  "entity.name.function", "text", "keyword.operator", "text", "storage.type",
415
- "text", "paren.lparen"
416
- ],
417
- regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
418
- next: "function_arguments"
419
- }, {
420
- token: [
421
- "storage.type", "punctuation.operator", "entity.name.function", "text",
422
- "keyword.operator", "text",
423
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
411
+ "text", "storage.type", "text", "paren.lparen"
424
412
  ],
425
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
413
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
426
414
  next: "function_arguments"
427
415
  }, {
428
416
  token: [
429
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
417
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
430
418
  ],
431
- regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
419
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
432
420
  next: "function_arguments"
433
421
  }, {
434
422
  token: [
435
423
  "entity.name.function", "text", "punctuation.operator",
436
- "text", "storage.type", "text", "paren.lparen"
424
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
437
425
  ],
438
- regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
426
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
439
427
  next: "function_arguments"
440
428
  }, {
441
429
  token: [
442
- "text", "text", "storage.type", "text", "paren.lparen"
430
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
443
431
  ],
444
- regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
432
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
445
433
  next: "function_arguments"
446
434
  }, {
447
435
  token: "keyword",
@@ -455,7 +443,7 @@ var JavaScriptHighlightRules = function (options) {
455
443
  regex: /that\b/
456
444
  }, {
457
445
  token: ["storage.type", "punctuation.operator", "support.function.firebug"],
458
- regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
446
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
459
447
  }, {
460
448
  token: keywordMapper,
461
449
  regex: identifierRe
@@ -490,17 +478,27 @@ var JavaScriptHighlightRules = function (options) {
490
478
  property: [{
491
479
  token: "text",
492
480
  regex: "\\s+"
481
+ }, {
482
+ token: "keyword.operator",
483
+ regex: /=/
484
+ }, {
485
+ token: [
486
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
487
+ ],
488
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
489
+ next: "function_arguments"
493
490
  }, {
494
491
  token: [
495
- "storage.type", "punctuation.operator", "entity.name.function", "text",
496
- "keyword.operator", "text",
497
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
492
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
498
493
  ],
499
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
494
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
500
495
  next: "function_arguments"
501
496
  }, {
502
497
  token: "punctuation.operator",
503
498
  regex: /[.](?![.])/
499
+ }, {
500
+ token: "support.function",
501
+ regex: "prototype"
504
502
  }, {
505
503
  token: "support.function",
506
504
  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(?=\()/
@@ -613,10 +611,10 @@ var JavaScriptHighlightRules = function (options) {
613
611
  token: "constant.language",
614
612
  regex: "null|Infinity|NaN|undefined"
615
613
  }, {
616
- token: "constant.numeric",
614
+ token: "constant.numeric", // hexadecimal, octal and binary
617
615
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
618
616
  }, {
619
- token: "constant.numeric",
617
+ token: "constant.numeric", // decimal integers and floats
620
618
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
621
619
  }, {
622
620
  token: "punctuation.operator",
@@ -725,7 +723,7 @@ var JavaScriptHighlightRules = function (options) {
725
723
  regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
726
724
  }, {
727
725
  token: "paren.lparen",
728
- regex: "(\\()(?=.+\\s*=>)",
726
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
729
727
  next: "function_arguments"
730
728
  }, {
731
729
  token: "variable.language",
@@ -783,7 +781,7 @@ function JSX() {
783
781
  value: val.substr(offset)
784
782
  }];
785
783
  },
786
- regex: "</?" + tagRegex + "",
784
+ regex: "</?(?:" + tagRegex + "|(?=>))",
787
785
  next: "jsxAttributes",
788
786
  nextState: "jsx"
789
787
  };
@@ -796,8 +794,7 @@ function JSX() {
796
794
  this.$rules.jsx = [
797
795
  jsxJsRule,
798
796
  jsxTag,
799
- { include: "reference" },
800
- { defaultToken: "string" }
797
+ { include: "reference" }, { defaultToken: "string.xml" }
801
798
  ];
802
799
  this.$rules.jsxAttributes = [{
803
800
  token: "meta.tag.punctuation.tag-close.xml",
@@ -857,7 +854,7 @@ function JSX() {
857
854
  function comments(next) {
858
855
  return [
859
856
  {
860
- token: "comment",
857
+ token: "comment", // multi line comment
861
858
  regex: /\/\*/,
862
859
  next: [
863
860
  DocCommentHighlightRules.getTagRule(),
@@ -1990,28 +1987,28 @@ sql_regcase'.split('|'));
1990
1987
  },
1991
1988
  docComment.getStartRule("doc-start"),
1992
1989
  {
1993
- token: "comment",
1990
+ token: "comment", // multi line comment
1994
1991
  regex: "\\/\\*",
1995
1992
  next: "comment"
1996
1993
  }, {
1997
1994
  token: "string.regexp",
1998
1995
  regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"
1999
1996
  }, {
2000
- token: "string",
1997
+ token: "string", // " string start
2001
1998
  regex: '"',
2002
1999
  next: "qqstring"
2003
2000
  }, {
2004
- token: "string",
2001
+ token: "string", // ' string start
2005
2002
  regex: "'",
2006
2003
  next: "qstring"
2007
2004
  }, {
2008
- token: "constant.numeric",
2005
+ token: "constant.numeric", // hex
2009
2006
  regex: "0[xX][0-9a-fA-F]+\\b"
2010
2007
  }, {
2011
- token: "constant.numeric",
2008
+ token: "constant.numeric", // float
2012
2009
  regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
2013
2010
  }, {
2014
- token: "constant.language",
2011
+ token: "constant.language", // constants
2015
2012
  regex: "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" +
2016
2013
  "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" +
2017
2014
  "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" +
@@ -2024,7 +2021,7 @@ sql_regcase'.split('|'));
2024
2021
  token: ["support.class", "keyword.operator"],
2025
2022
  regex: "\\b(\\w+)(::)"
2026
2023
  }, {
2027
- token: "constant.language",
2024
+ token: "constant.language", // constants
2028
2025
  regex: "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" +
2029
2026
  "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" +
2030
2027
  "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" +
@@ -2142,14 +2139,14 @@ var PhpHighlightRules = function () {
2142
2139
  HtmlHighlightRules.call(this);
2143
2140
  var startRules = [
2144
2141
  {
2145
- token: "support.php_tag",
2142
+ token: "support.php_tag", // php open tag
2146
2143
  regex: "<\\?(?:php|=)?",
2147
2144
  push: "php-start"
2148
2145
  }
2149
2146
  ];
2150
2147
  var endRules = [
2151
2148
  {
2152
- token: "support.php_tag",
2149
+ token: "support.php_tag", // php close tag
2153
2150
  regex: "\\?>",
2154
2151
  next: "pop"
2155
2152
  }
@@ -12909,203 +12906,679 @@ oop.inherits(FoldMode, BaseFoldMode);
12909
12906
 
12910
12907
  });
12911
12908
 
12912
- 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/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
12913
- var oop = require("../lib/oop");
12914
- var TextMode = require("./text").Mode;
12915
- var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
12916
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
12917
- var WorkerClient = require("../worker/worker_client").WorkerClient;
12918
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
12919
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
12920
- var Mode = function () {
12921
- this.HighlightRules = JavaScriptHighlightRules;
12922
- this.$outdent = new MatchingBraceOutdent();
12923
- this.$behaviour = new CstyleBehaviour();
12924
- this.foldingRules = new CStyleFoldMode();
12909
+ ace.define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"], function(require, exports, module){"use strict";
12910
+ var oop = require("../../lib/oop");
12911
+ var CstyleFoldMode = require("./cstyle").FoldMode;
12912
+ var Range = require("../../range").Range;
12913
+ var TokenIterator = require("../../token_iterator").TokenIterator;
12914
+ var FoldMode = exports.FoldMode = function () {
12925
12915
  };
12926
- oop.inherits(Mode, TextMode);
12916
+ oop.inherits(FoldMode, CstyleFoldMode);
12927
12917
  (function () {
12928
- this.lineCommentStart = "//";
12929
- this.blockComment = { start: "/*", end: "*/" };
12930
- this.$quotes = { '"': '"', "'": "'", "`": "`" };
12931
- this.$pairQuotesAfter = {
12932
- "`": /\w/
12918
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
12919
+ this.getFoldWidgetBase = this.getFoldWidget;
12920
+ this.indentKeywords = {
12921
+ "if": 1,
12922
+ "while": 1,
12923
+ "for": 1,
12924
+ "foreach": 1,
12925
+ "switch": 1,
12926
+ "else": 0,
12927
+ "elseif": 0,
12928
+ "endif": -1,
12929
+ "endwhile": -1,
12930
+ "endfor": -1,
12931
+ "endforeach": -1,
12932
+ "endswitch": -1
12933
12933
  };
12934
- this.getNextLineIndent = function (state, line, tab) {
12935
- var indent = this.$getIndent(line);
12936
- var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
12937
- var tokens = tokenizedLine.tokens;
12938
- var endState = tokenizedLine.state;
12939
- if (tokens.length && tokens[tokens.length - 1].type == "comment") {
12940
- return indent;
12934
+ this.foldingStartMarkerPhp = /(?:\s|^)(if|else|elseif|while|for|foreach|switch).*\:/i;
12935
+ this.foldingStopMarkerPhp = /(?:\s|^)(endif|endwhile|endfor|endforeach|endswitch)\;/i;
12936
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
12937
+ var line = session.doc.getLine(row);
12938
+ var match = this.foldingStartMarkerPhp.exec(line);
12939
+ if (match) {
12940
+ return this.phpBlock(session, row, match.index + 2);
12941
12941
  }
12942
- if (state == "start" || state == "no_regex") {
12943
- var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
12944
- if (match) {
12945
- indent += tab;
12946
- }
12942
+ var match = this.foldingStopMarkerPhp.exec(line);
12943
+ if (match) {
12944
+ return this.phpBlock(session, row, match.index + 2);
12947
12945
  }
12948
- else if (state == "doc-start") {
12949
- if (endState == "start" || endState == "no_regex") {
12950
- return "";
12946
+ return this.getFoldWidgetRangeBase(session, foldStyle, row);
12947
+ };
12948
+ this.getFoldWidget = function (session, foldStyle, row) {
12949
+ var line = session.getLine(row);
12950
+ var isStart = this.foldingStartMarkerPhp.test(line);
12951
+ var isEnd = this.foldingStopMarkerPhp.test(line);
12952
+ if (isStart && !isEnd) {
12953
+ var match = this.foldingStartMarkerPhp.exec(line);
12954
+ var keyword = match && match[1].toLowerCase();
12955
+ if (keyword) {
12956
+ var type = session.getTokenAt(row, match.index + 2).type;
12957
+ if (type == "keyword") {
12958
+ return "start";
12959
+ }
12951
12960
  }
12952
- var match = line.match(/^\s*(\/?)\*/);
12953
- if (match) {
12954
- if (match[1]) {
12955
- indent += " ";
12961
+ }
12962
+ if (isEnd && foldStyle === "markbeginend") {
12963
+ var match = this.foldingStopMarkerPhp.exec(line);
12964
+ var keyword = match && match[1].toLowerCase();
12965
+ if (keyword) {
12966
+ var type = session.getTokenAt(row, match.index + 2).type;
12967
+ if (type == "keyword") {
12968
+ return "end";
12956
12969
  }
12957
- indent += "* ";
12958
12970
  }
12959
12971
  }
12960
- return indent;
12961
- };
12962
- this.checkOutdent = function (state, line, input) {
12963
- return this.$outdent.checkOutdent(line, input);
12964
- };
12965
- this.autoOutdent = function (state, doc, row) {
12966
- this.$outdent.autoOutdent(doc, row);
12972
+ return this.getFoldWidgetBase(session, foldStyle, row);
12967
12973
  };
12968
- this.createWorker = function (session) {
12969
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
12970
- worker.attachToDocument(session.getDocument());
12971
- worker.on("annotate", function (results) {
12972
- session.setAnnotations(results.data);
12973
- });
12974
- worker.on("terminate", function () {
12975
- session.clearAnnotations();
12976
- });
12977
- return worker;
12974
+ this.phpBlock = function (session, row, column, tokenRange) {
12975
+ var stream = new TokenIterator(session, row, column);
12976
+ var token = stream.getCurrentToken();
12977
+ if (!token || token.type != "keyword")
12978
+ return;
12979
+ var val = token.value;
12980
+ var stack = [val];
12981
+ var dir = this.indentKeywords[val];
12982
+ if (val === "else" || val === "elseif") {
12983
+ dir = 1;
12984
+ }
12985
+ if (!dir)
12986
+ return;
12987
+ var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
12988
+ var startRow = row;
12989
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
12990
+ while (token = stream.step()) {
12991
+ if (token.type !== "keyword")
12992
+ continue;
12993
+ var level = dir * this.indentKeywords[token.value];
12994
+ if (level > 0) {
12995
+ stack.unshift(token.value);
12996
+ }
12997
+ else if (level <= 0) {
12998
+ stack.shift();
12999
+ if (!stack.length)
13000
+ break;
13001
+ if (level === 0)
13002
+ stack.unshift(token.value);
13003
+ }
13004
+ }
13005
+ if (!token)
13006
+ return null;
13007
+ if (tokenRange)
13008
+ return stream.getCurrentTokenRange();
13009
+ var row = stream.getCurrentTokenRow();
13010
+ if (dir === -1)
13011
+ return new Range(row, session.getLine(row).length, startRow, startColumn);
13012
+ else
13013
+ return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
12978
13014
  };
12979
- this.$id = "ace/mode/javascript";
12980
- this.snippetFileId = "ace/snippets/javascript";
12981
- }).call(Mode.prototype);
12982
- exports.Mode = Mode;
13015
+ }).call(FoldMode.prototype);
12983
13016
 
12984
13017
  });
12985
13018
 
12986
- ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
12987
- var propertyMap = {
12988
- "background": { "#$0": 1 },
12989
- "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
12990
- "background-image": { "url('/$0')": 1 },
12991
- "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
12992
- "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
12993
- "background-attachment": { "scroll": 1, "fixed": 1 },
12994
- "background-size": { "cover": 1, "contain": 1 },
12995
- "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
12996
- "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
12997
- "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
12998
- "border-color": { "#$0": 1 },
12999
- "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
13000
- "border-collapse": { "collapse": 1, "separate": 1 },
13001
- "bottom": { "px": 1, "em": 1, "%": 1 },
13002
- "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
13003
- "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
13004
- "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 },
13005
- "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
13006
- "empty-cells": { "show": 1, "hide": 1 },
13007
- "float": { "left": 1, "right": 1, "none": 1 },
13008
- "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 },
13009
- "font-size": { "px": 1, "em": 1, "%": 1 },
13010
- "font-weight": { "bold": 1, "normal": 1 },
13011
- "font-style": { "italic": 1, "normal": 1 },
13012
- "font-variant": { "normal": 1, "small-caps": 1 },
13013
- "height": { "px": 1, "em": 1, "%": 1 },
13014
- "left": { "px": 1, "em": 1, "%": 1 },
13015
- "letter-spacing": { "normal": 1 },
13016
- "line-height": { "normal": 1 },
13017
- "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 },
13018
- "margin": { "px": 1, "em": 1, "%": 1 },
13019
- "margin-right": { "px": 1, "em": 1, "%": 1 },
13020
- "margin-left": { "px": 1, "em": 1, "%": 1 },
13021
- "margin-top": { "px": 1, "em": 1, "%": 1 },
13022
- "margin-bottom": { "px": 1, "em": 1, "%": 1 },
13023
- "max-height": { "px": 1, "em": 1, "%": 1 },
13024
- "max-width": { "px": 1, "em": 1, "%": 1 },
13025
- "min-height": { "px": 1, "em": 1, "%": 1 },
13026
- "min-width": { "px": 1, "em": 1, "%": 1 },
13027
- "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
13028
- "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
13029
- "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
13030
- "padding": { "px": 1, "em": 1, "%": 1 },
13031
- "padding-top": { "px": 1, "em": 1, "%": 1 },
13032
- "padding-right": { "px": 1, "em": 1, "%": 1 },
13033
- "padding-bottom": { "px": 1, "em": 1, "%": 1 },
13034
- "padding-left": { "px": 1, "em": 1, "%": 1 },
13035
- "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
13036
- "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
13037
- "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
13038
- "right": { "px": 1, "em": 1, "%": 1 },
13039
- "table-layout": { "fixed": 1, "auto": 1 },
13040
- "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
13041
- "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
13042
- "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
13043
- "top": { "px": 1, "em": 1, "%": 1 },
13044
- "vertical-align": { "top": 1, "bottom": 1 },
13045
- "visibility": { "hidden": 1, "visible": 1 },
13046
- "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
13047
- "width": { "px": 1, "em": 1, "%": 1 },
13048
- "word-spacing": { "normal": 1 },
13049
- "filter": { "alpha(opacity=$0100)": 1 },
13050
- "text-shadow": { "$02px 2px 2px #777": 1 },
13051
- "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
13052
- "-moz-border-radius": 1,
13053
- "-moz-border-radius-topright": 1,
13054
- "-moz-border-radius-bottomright": 1,
13055
- "-moz-border-radius-topleft": 1,
13056
- "-moz-border-radius-bottomleft": 1,
13057
- "-webkit-border-radius": 1,
13058
- "-webkit-border-top-right-radius": 1,
13059
- "-webkit-border-top-left-radius": 1,
13060
- "-webkit-border-bottom-right-radius": 1,
13061
- "-webkit-border-bottom-left-radius": 1,
13062
- "-moz-box-shadow": 1,
13063
- "-webkit-box-shadow": 1,
13064
- "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
13065
- "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
13066
- "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
13067
- };
13068
- var CssCompletions = function () {
13019
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
13020
+ var oop = require("../../lib/oop");
13021
+ var BaseFoldMode = require("./fold_mode").FoldMode;
13022
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
13023
+ this.defaultMode = defaultMode;
13024
+ this.subModes = subModes;
13069
13025
  };
13026
+ oop.inherits(FoldMode, BaseFoldMode);
13070
13027
  (function () {
13071
- this.completionsDefined = false;
13072
- this.defineCompletions = function () {
13073
- if (document) {
13074
- var style = document.createElement('c').style;
13075
- for (var i in style) {
13076
- if (typeof style[i] !== 'string')
13077
- continue;
13078
- var name = i.replace(/[A-Z]/g, function (x) {
13079
- return '-' + x.toLowerCase();
13080
- });
13081
- if (!propertyMap.hasOwnProperty(name))
13082
- propertyMap[name] = 1;
13083
- }
13028
+ this.$getMode = function (state) {
13029
+ if (typeof state != "string")
13030
+ state = state[0];
13031
+ for (var key in this.subModes) {
13032
+ if (state.indexOf(key) === 0)
13033
+ return this.subModes[key];
13084
13034
  }
13085
- this.completionsDefined = true;
13035
+ return null;
13086
13036
  };
13087
- this.getCompletions = function (state, session, pos, prefix) {
13088
- if (!this.completionsDefined) {
13089
- this.defineCompletions();
13090
- }
13091
- if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
13092
- var line = session.getLine(pos.row).substr(0, pos.column);
13093
- var inParens = /\([^)]*$/.test(line);
13094
- if (inParens) {
13095
- line = line.substr(line.lastIndexOf('(') + 1);
13096
- }
13097
- if (/:[^;]+$/.test(line)) {
13098
- /([\w\-]+):[^:]*$/.test(line);
13099
- return this.getPropertyValueCompletions(state, session, pos, prefix);
13100
- }
13101
- else {
13102
- return this.getPropertyCompletions(state, session, pos, prefix, inParens);
13103
- }
13104
- }
13105
- return [];
13037
+ this.$tryMode = function (state, session, foldStyle, row) {
13038
+ var mode = this.$getMode(state);
13039
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
13106
13040
  };
13107
- this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
13108
- skipSemicolon = skipSemicolon || false;
13041
+ this.getFoldWidget = function (session, foldStyle, row) {
13042
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
13043
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
13044
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
13045
+ };
13046
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
13047
+ var mode = this.$getMode(session.getState(row - 1));
13048
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
13049
+ mode = this.$getMode(session.getState(row));
13050
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
13051
+ mode = this.defaultMode;
13052
+ return mode.getFoldWidgetRange(session, foldStyle, row);
13053
+ };
13054
+ }).call(FoldMode.prototype);
13055
+
13056
+ });
13057
+
13058
+ 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";
13059
+ var oop = require("../../lib/oop");
13060
+ var Range = require("../../range").Range;
13061
+ var BaseFoldMode = require("./fold_mode").FoldMode;
13062
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
13063
+ BaseFoldMode.call(this);
13064
+ this.voidElements = voidElements || {};
13065
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
13066
+ if (optionalEndTags)
13067
+ oop.mixin(this.optionalEndTags, optionalEndTags);
13068
+ };
13069
+ oop.inherits(FoldMode, BaseFoldMode);
13070
+ var Tag = function () {
13071
+ this.tagName = "";
13072
+ this.closing = false;
13073
+ this.selfClosing = false;
13074
+ this.start = { row: 0, column: 0 };
13075
+ this.end = { row: 0, column: 0 };
13076
+ };
13077
+ function is(token, type) {
13078
+ return token.type.lastIndexOf(type + ".xml") > -1;
13079
+ }
13080
+ (function () {
13081
+ this.getFoldWidget = function (session, foldStyle, row) {
13082
+ var tag = this._getFirstTagInLine(session, row);
13083
+ if (!tag)
13084
+ return this.getCommentFoldWidget(session, row);
13085
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
13086
+ return foldStyle === "markbeginend" ? "end" : "";
13087
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
13088
+ return "";
13089
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
13090
+ return "";
13091
+ return "start";
13092
+ };
13093
+ this.getCommentFoldWidget = function (session, row) {
13094
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
13095
+ return "start";
13096
+ return "";
13097
+ };
13098
+ this._getFirstTagInLine = function (session, row) {
13099
+ var tokens = session.getTokens(row);
13100
+ var tag = new Tag();
13101
+ for (var i = 0; i < tokens.length; i++) {
13102
+ var token = tokens[i];
13103
+ if (is(token, "tag-open")) {
13104
+ tag.end.column = tag.start.column + token.value.length;
13105
+ tag.closing = is(token, "end-tag-open");
13106
+ token = tokens[++i];
13107
+ if (!token)
13108
+ return null;
13109
+ tag.tagName = token.value;
13110
+ if (token.value === "") { //skip empty tag name token for fragment
13111
+ token = tokens[++i];
13112
+ if (!token)
13113
+ return null;
13114
+ tag.tagName = token.value;
13115
+ }
13116
+ tag.end.column += token.value.length;
13117
+ for (i++; i < tokens.length; i++) {
13118
+ token = tokens[i];
13119
+ tag.end.column += token.value.length;
13120
+ if (is(token, "tag-close")) {
13121
+ tag.selfClosing = token.value == '/>';
13122
+ break;
13123
+ }
13124
+ }
13125
+ return tag;
13126
+ }
13127
+ else if (is(token, "tag-close")) {
13128
+ tag.selfClosing = token.value == '/>';
13129
+ return tag;
13130
+ }
13131
+ tag.start.column += token.value.length;
13132
+ }
13133
+ return null;
13134
+ };
13135
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
13136
+ var tokens = session.getTokens(row);
13137
+ var column = 0;
13138
+ for (var i = 0; i < tokens.length; i++) {
13139
+ var token = tokens[i];
13140
+ column += token.value.length;
13141
+ if (column < startColumn - 1)
13142
+ continue;
13143
+ if (is(token, "end-tag-open")) {
13144
+ token = tokens[i + 1];
13145
+ if (is(token, "tag-name") && token.value === "") {
13146
+ token = tokens[i + 2];
13147
+ }
13148
+ if (token && token.value == tagName)
13149
+ return true;
13150
+ }
13151
+ }
13152
+ return false;
13153
+ };
13154
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
13155
+ var firstTag = this._getFirstTagInLine(session, row);
13156
+ if (!firstTag) {
13157
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
13158
+ }
13159
+ var tags = session.getMatchingTags({ row: row, column: 0 });
13160
+ if (tags) {
13161
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
13162
+ }
13163
+ };
13164
+ }).call(FoldMode.prototype);
13165
+
13166
+ });
13167
+
13168
+ 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";
13169
+ var oop = require("../../lib/oop");
13170
+ var MixedFoldMode = require("./mixed").FoldMode;
13171
+ var XmlFoldMode = require("./xml").FoldMode;
13172
+ var CStyleFoldMode = require("./cstyle").FoldMode;
13173
+ var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
13174
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
13175
+ "js-": new CStyleFoldMode(),
13176
+ "css-": new CStyleFoldMode()
13177
+ });
13178
+ };
13179
+ oop.inherits(FoldMode, MixedFoldMode);
13180
+
13181
+ });
13182
+
13183
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
13184
+ var oop = require("../../lib/oop");
13185
+ var Behaviour = require("../behaviour").Behaviour;
13186
+ var TokenIterator = require("../../token_iterator").TokenIterator;
13187
+ function is(token, type) {
13188
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
13189
+ }
13190
+ var XmlBehaviour = function () {
13191
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
13192
+ if (text == '"' || text == "'") {
13193
+ var quote = text;
13194
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
13195
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
13196
+ return {
13197
+ text: quote + selected + quote,
13198
+ selection: false
13199
+ };
13200
+ }
13201
+ var cursor = editor.getCursorPosition();
13202
+ var line = session.doc.getLine(cursor.row);
13203
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
13204
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
13205
+ var token = iterator.getCurrentToken();
13206
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
13207
+ return {
13208
+ text: "",
13209
+ selection: [1, 1]
13210
+ };
13211
+ }
13212
+ if (!token)
13213
+ token = iterator.stepBackward();
13214
+ if (!token)
13215
+ return;
13216
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
13217
+ token = iterator.stepBackward();
13218
+ }
13219
+ var rightSpace = !rightChar || rightChar.match(/\s/);
13220
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
13221
+ return {
13222
+ text: quote + quote,
13223
+ selection: [1, 1]
13224
+ };
13225
+ }
13226
+ }
13227
+ });
13228
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
13229
+ var selected = session.doc.getTextRange(range);
13230
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
13231
+ var line = session.doc.getLine(range.start.row);
13232
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
13233
+ if (rightChar == selected) {
13234
+ range.end.column++;
13235
+ return range;
13236
+ }
13237
+ }
13238
+ });
13239
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
13240
+ if (text == '>') {
13241
+ var position = editor.getSelectionRange().start;
13242
+ var iterator = new TokenIterator(session, position.row, position.column);
13243
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
13244
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
13245
+ return;
13246
+ if (is(token, "reference.attribute-value"))
13247
+ return;
13248
+ if (is(token, "attribute-value")) {
13249
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
13250
+ if (position.column < tokenEndColumn)
13251
+ return;
13252
+ if (position.column == tokenEndColumn) {
13253
+ var nextToken = iterator.stepForward();
13254
+ if (nextToken && is(nextToken, "attribute-value"))
13255
+ return;
13256
+ iterator.stepBackward();
13257
+ }
13258
+ }
13259
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
13260
+ return;
13261
+ while (!is(token, "tag-name")) {
13262
+ token = iterator.stepBackward();
13263
+ if (token.value == "<") {
13264
+ token = iterator.stepForward();
13265
+ break;
13266
+ }
13267
+ }
13268
+ var tokenRow = iterator.getCurrentTokenRow();
13269
+ var tokenColumn = iterator.getCurrentTokenColumn();
13270
+ if (is(iterator.stepBackward(), "end-tag-open"))
13271
+ return;
13272
+ var element = token.value;
13273
+ if (tokenRow == position.row)
13274
+ element = element.substring(0, position.column - tokenColumn);
13275
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
13276
+ return;
13277
+ return {
13278
+ text: ">" + "</" + element + ">",
13279
+ selection: [1, 1]
13280
+ };
13281
+ }
13282
+ });
13283
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
13284
+ if (text == "\n") {
13285
+ var cursor = editor.getCursorPosition();
13286
+ var line = session.getLine(cursor.row);
13287
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
13288
+ var token = iterator.getCurrentToken();
13289
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
13290
+ if (token.value == "/>")
13291
+ return;
13292
+ while (token && token.type.indexOf("tag-name") === -1) {
13293
+ token = iterator.stepBackward();
13294
+ }
13295
+ if (!token) {
13296
+ return;
13297
+ }
13298
+ var tag = token.value;
13299
+ var row = iterator.getCurrentTokenRow();
13300
+ token = iterator.stepBackward();
13301
+ if (!token || token.type.indexOf("end-tag") !== -1) {
13302
+ return;
13303
+ }
13304
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
13305
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
13306
+ var line = session.getLine(row);
13307
+ var nextIndent = this.$getIndent(line);
13308
+ var indent = nextIndent + session.getTabString();
13309
+ if (nextToken && nextToken.value === "</") {
13310
+ return {
13311
+ text: "\n" + indent + "\n" + nextIndent,
13312
+ selection: [1, indent.length, 1, indent.length]
13313
+ };
13314
+ }
13315
+ else {
13316
+ return {
13317
+ text: "\n" + indent
13318
+ };
13319
+ }
13320
+ }
13321
+ }
13322
+ }
13323
+ });
13324
+ };
13325
+ oop.inherits(XmlBehaviour, Behaviour);
13326
+ exports.XmlBehaviour = XmlBehaviour;
13327
+
13328
+ });
13329
+
13330
+ 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";
13331
+ var oop = require("../../lib/oop");
13332
+ var TokenIterator = require("../../token_iterator").TokenIterator;
13333
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
13334
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
13335
+ var JavaScriptBehaviour = function () {
13336
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
13337
+ this.addBehaviours(xmlBehaviours);
13338
+ this.inherit(CstyleBehaviour);
13339
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
13340
+ if (text == '>') {
13341
+ var position = editor.getSelectionRange().start;
13342
+ var iterator = new TokenIterator(session, position.row, position.column);
13343
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
13344
+ if (!token)
13345
+ return;
13346
+ if (token.value == '<') {
13347
+ return {
13348
+ text: "></>",
13349
+ selection: [1, 1]
13350
+ };
13351
+ }
13352
+ }
13353
+ });
13354
+ };
13355
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
13356
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
13357
+
13358
+ });
13359
+
13360
+ 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";
13361
+ var oop = require("../../lib/oop");
13362
+ var XmlFoldMode = require("./xml").FoldMode;
13363
+ var CFoldMode = require("./cstyle").FoldMode;
13364
+ var FoldMode = exports.FoldMode = function (commentRegex) {
13365
+ if (commentRegex) {
13366
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
13367
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
13368
+ }
13369
+ this.xmlFoldMode = new XmlFoldMode();
13370
+ };
13371
+ oop.inherits(FoldMode, CFoldMode);
13372
+ (function () {
13373
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
13374
+ this.getFoldWidgetBase = this.getFoldWidget;
13375
+ this.getFoldWidget = function (session, foldStyle, row) {
13376
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
13377
+ if (!fw) {
13378
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
13379
+ }
13380
+ return fw;
13381
+ };
13382
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
13383
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
13384
+ if (range)
13385
+ return range;
13386
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
13387
+ };
13388
+ }).call(FoldMode.prototype);
13389
+
13390
+ });
13391
+
13392
+ 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";
13393
+ var oop = require("../lib/oop");
13394
+ var TextMode = require("./text").Mode;
13395
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
13396
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
13397
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
13398
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
13399
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
13400
+ var Mode = function () {
13401
+ this.HighlightRules = JavaScriptHighlightRules;
13402
+ this.$outdent = new MatchingBraceOutdent();
13403
+ this.$behaviour = new JavaScriptBehaviour();
13404
+ this.foldingRules = new JavaScriptFoldMode();
13405
+ };
13406
+ oop.inherits(Mode, TextMode);
13407
+ (function () {
13408
+ this.lineCommentStart = "//";
13409
+ this.blockComment = { start: "/*", end: "*/" };
13410
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
13411
+ this.$pairQuotesAfter = {
13412
+ "`": /\w/
13413
+ };
13414
+ this.getNextLineIndent = function (state, line, tab) {
13415
+ var indent = this.$getIndent(line);
13416
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
13417
+ var tokens = tokenizedLine.tokens;
13418
+ var endState = tokenizedLine.state;
13419
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
13420
+ return indent;
13421
+ }
13422
+ if (state == "start" || state == "no_regex") {
13423
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
13424
+ if (match) {
13425
+ indent += tab;
13426
+ }
13427
+ }
13428
+ else if (state == "doc-start") {
13429
+ if (endState == "start" || endState == "no_regex") {
13430
+ return "";
13431
+ }
13432
+ }
13433
+ return indent;
13434
+ };
13435
+ this.checkOutdent = function (state, line, input) {
13436
+ return this.$outdent.checkOutdent(line, input);
13437
+ };
13438
+ this.autoOutdent = function (state, doc, row) {
13439
+ this.$outdent.autoOutdent(doc, row);
13440
+ };
13441
+ this.createWorker = function (session) {
13442
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
13443
+ worker.attachToDocument(session.getDocument());
13444
+ worker.on("annotate", function (results) {
13445
+ session.setAnnotations(results.data);
13446
+ });
13447
+ worker.on("terminate", function () {
13448
+ session.clearAnnotations();
13449
+ });
13450
+ return worker;
13451
+ };
13452
+ this.$id = "ace/mode/javascript";
13453
+ this.snippetFileId = "ace/snippets/javascript";
13454
+ }).call(Mode.prototype);
13455
+ exports.Mode = Mode;
13456
+
13457
+ });
13458
+
13459
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
13460
+ var propertyMap = {
13461
+ "background": { "#$0": 1 },
13462
+ "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
13463
+ "background-image": { "url('/$0')": 1 },
13464
+ "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
13465
+ "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
13466
+ "background-attachment": { "scroll": 1, "fixed": 1 },
13467
+ "background-size": { "cover": 1, "contain": 1 },
13468
+ "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
13469
+ "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
13470
+ "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
13471
+ "border-color": { "#$0": 1 },
13472
+ "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
13473
+ "border-collapse": { "collapse": 1, "separate": 1 },
13474
+ "bottom": { "px": 1, "em": 1, "%": 1 },
13475
+ "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
13476
+ "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
13477
+ "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 },
13478
+ "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
13479
+ "empty-cells": { "show": 1, "hide": 1 },
13480
+ "float": { "left": 1, "right": 1, "none": 1 },
13481
+ "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 },
13482
+ "font-size": { "px": 1, "em": 1, "%": 1 },
13483
+ "font-weight": { "bold": 1, "normal": 1 },
13484
+ "font-style": { "italic": 1, "normal": 1 },
13485
+ "font-variant": { "normal": 1, "small-caps": 1 },
13486
+ "height": { "px": 1, "em": 1, "%": 1 },
13487
+ "left": { "px": 1, "em": 1, "%": 1 },
13488
+ "letter-spacing": { "normal": 1 },
13489
+ "line-height": { "normal": 1 },
13490
+ "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 },
13491
+ "margin": { "px": 1, "em": 1, "%": 1 },
13492
+ "margin-right": { "px": 1, "em": 1, "%": 1 },
13493
+ "margin-left": { "px": 1, "em": 1, "%": 1 },
13494
+ "margin-top": { "px": 1, "em": 1, "%": 1 },
13495
+ "margin-bottom": { "px": 1, "em": 1, "%": 1 },
13496
+ "max-height": { "px": 1, "em": 1, "%": 1 },
13497
+ "max-width": { "px": 1, "em": 1, "%": 1 },
13498
+ "min-height": { "px": 1, "em": 1, "%": 1 },
13499
+ "min-width": { "px": 1, "em": 1, "%": 1 },
13500
+ "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
13501
+ "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
13502
+ "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
13503
+ "padding": { "px": 1, "em": 1, "%": 1 },
13504
+ "padding-top": { "px": 1, "em": 1, "%": 1 },
13505
+ "padding-right": { "px": 1, "em": 1, "%": 1 },
13506
+ "padding-bottom": { "px": 1, "em": 1, "%": 1 },
13507
+ "padding-left": { "px": 1, "em": 1, "%": 1 },
13508
+ "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
13509
+ "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
13510
+ "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
13511
+ "right": { "px": 1, "em": 1, "%": 1 },
13512
+ "table-layout": { "fixed": 1, "auto": 1 },
13513
+ "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
13514
+ "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
13515
+ "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
13516
+ "top": { "px": 1, "em": 1, "%": 1 },
13517
+ "vertical-align": { "top": 1, "bottom": 1 },
13518
+ "visibility": { "hidden": 1, "visible": 1 },
13519
+ "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
13520
+ "width": { "px": 1, "em": 1, "%": 1 },
13521
+ "word-spacing": { "normal": 1 },
13522
+ "filter": { "alpha(opacity=$0100)": 1 },
13523
+ "text-shadow": { "$02px 2px 2px #777": 1 },
13524
+ "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
13525
+ "-moz-border-radius": 1,
13526
+ "-moz-border-radius-topright": 1,
13527
+ "-moz-border-radius-bottomright": 1,
13528
+ "-moz-border-radius-topleft": 1,
13529
+ "-moz-border-radius-bottomleft": 1,
13530
+ "-webkit-border-radius": 1,
13531
+ "-webkit-border-top-right-radius": 1,
13532
+ "-webkit-border-top-left-radius": 1,
13533
+ "-webkit-border-bottom-right-radius": 1,
13534
+ "-webkit-border-bottom-left-radius": 1,
13535
+ "-moz-box-shadow": 1,
13536
+ "-webkit-box-shadow": 1,
13537
+ "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
13538
+ "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
13539
+ "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
13540
+ };
13541
+ var CssCompletions = function () {
13542
+ };
13543
+ (function () {
13544
+ this.completionsDefined = false;
13545
+ this.defineCompletions = function () {
13546
+ if (document) {
13547
+ var style = document.createElement('c').style;
13548
+ for (var i in style) {
13549
+ if (typeof style[i] !== 'string')
13550
+ continue;
13551
+ var name = i.replace(/[A-Z]/g, function (x) {
13552
+ return '-' + x.toLowerCase();
13553
+ });
13554
+ if (!propertyMap.hasOwnProperty(name))
13555
+ propertyMap[name] = 1;
13556
+ }
13557
+ }
13558
+ this.completionsDefined = true;
13559
+ };
13560
+ this.getCompletions = function (state, session, pos, prefix) {
13561
+ if (!this.completionsDefined) {
13562
+ this.defineCompletions();
13563
+ }
13564
+ if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
13565
+ var line = session.getLine(pos.row).substr(0, pos.column);
13566
+ var inParens = /\([^)]*$/.test(line);
13567
+ if (inParens) {
13568
+ line = line.substr(line.lastIndexOf('(') + 1);
13569
+ }
13570
+ if (/:[^;]+$/.test(line)) {
13571
+ /([\w\-]+):[^:]*$/.test(line);
13572
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
13573
+ }
13574
+ else {
13575
+ return this.getPropertyCompletions(state, session, pos, prefix, inParens);
13576
+ }
13577
+ }
13578
+ return [];
13579
+ };
13580
+ this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
13581
+ skipSemicolon = skipSemicolon || false;
13109
13582
  var properties = Object.keys(propertyMap);
13110
13583
  return properties.map(function (property) {
13111
13584
  return {
@@ -13197,390 +13670,87 @@ var CssBehaviour = function () {
13197
13670
  var line = session.doc.getLine(cursor.row);
13198
13671
  var rightChar = line.substring(cursor.column, cursor.column + 1);
13199
13672
  if (rightChar === ';') {
13200
- return {
13201
- text: '',
13202
- selection: [1, 1]
13203
- };
13204
- }
13205
- }
13206
- });
13207
- this.add("!important", "insertion", function (state, action, editor, session, text) {
13208
- if (text === '!' && editor.selection.isEmpty()) {
13209
- var cursor = editor.getCursorPosition();
13210
- var line = session.doc.getLine(cursor.row);
13211
- if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
13212
- return {
13213
- text: '!important',
13214
- selection: [10, 10]
13215
- };
13216
- }
13217
- }
13218
- });
13219
- };
13220
- oop.inherits(CssBehaviour, CstyleBehaviour);
13221
- exports.CssBehaviour = CssBehaviour;
13222
-
13223
- });
13224
-
13225
- 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";
13226
- var oop = require("../lib/oop");
13227
- var TextMode = require("./text").Mode;
13228
- var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
13229
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
13230
- var WorkerClient = require("../worker/worker_client").WorkerClient;
13231
- var CssCompletions = require("./css_completions").CssCompletions;
13232
- var CssBehaviour = require("./behaviour/css").CssBehaviour;
13233
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
13234
- var Mode = function () {
13235
- this.HighlightRules = CssHighlightRules;
13236
- this.$outdent = new MatchingBraceOutdent();
13237
- this.$behaviour = new CssBehaviour();
13238
- this.$completer = new CssCompletions();
13239
- this.foldingRules = new CStyleFoldMode();
13240
- };
13241
- oop.inherits(Mode, TextMode);
13242
- (function () {
13243
- this.foldingRules = "cStyle";
13244
- this.blockComment = { start: "/*", end: "*/" };
13245
- this.getNextLineIndent = function (state, line, tab) {
13246
- var indent = this.$getIndent(line);
13247
- var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
13248
- if (tokens.length && tokens[tokens.length - 1].type == "comment") {
13249
- return indent;
13250
- }
13251
- var match = line.match(/^.*\{\s*$/);
13252
- if (match) {
13253
- indent += tab;
13254
- }
13255
- return indent;
13256
- };
13257
- this.checkOutdent = function (state, line, input) {
13258
- return this.$outdent.checkOutdent(line, input);
13259
- };
13260
- this.autoOutdent = function (state, doc, row) {
13261
- this.$outdent.autoOutdent(doc, row);
13262
- };
13263
- this.getCompletions = function (state, session, pos, prefix) {
13264
- return this.$completer.getCompletions(state, session, pos, prefix);
13265
- };
13266
- this.createWorker = function (session) {
13267
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
13268
- worker.attachToDocument(session.getDocument());
13269
- worker.on("annotate", function (e) {
13270
- session.setAnnotations(e.data);
13271
- });
13272
- worker.on("terminate", function () {
13273
- session.clearAnnotations();
13274
- });
13275
- return worker;
13276
- };
13277
- this.$id = "ace/mode/css";
13278
- this.snippetFileId = "ace/snippets/css";
13279
- }).call(Mode.prototype);
13280
- exports.Mode = Mode;
13281
-
13282
- });
13283
-
13284
- ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module){"use strict";
13285
- var oop = require("../../lib/oop");
13286
- var Behaviour = require("../behaviour").Behaviour;
13287
- var TokenIterator = require("../../token_iterator").TokenIterator;
13288
- var lang = require("../../lib/lang");
13289
- function is(token, type) {
13290
- return token && token.type.lastIndexOf(type + ".xml") > -1;
13291
- }
13292
- var XmlBehaviour = function () {
13293
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
13294
- if (text == '"' || text == "'") {
13295
- var quote = text;
13296
- var selected = session.doc.getTextRange(editor.getSelectionRange());
13297
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
13298
- return {
13299
- text: quote + selected + quote,
13300
- selection: false
13301
- };
13302
- }
13303
- var cursor = editor.getCursorPosition();
13304
- var line = session.doc.getLine(cursor.row);
13305
- var rightChar = line.substring(cursor.column, cursor.column + 1);
13306
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
13307
- var token = iterator.getCurrentToken();
13308
- if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
13309
- return {
13310
- text: "",
13311
- selection: [1, 1]
13312
- };
13313
- }
13314
- if (!token)
13315
- token = iterator.stepBackward();
13316
- if (!token)
13317
- return;
13318
- while (is(token, "tag-whitespace") || is(token, "whitespace")) {
13319
- token = iterator.stepBackward();
13320
- }
13321
- var rightSpace = !rightChar || rightChar.match(/\s/);
13322
- if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
13323
- return {
13324
- text: quote + quote,
13325
- selection: [1, 1]
13326
- };
13327
- }
13328
- }
13329
- });
13330
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
13331
- var selected = session.doc.getTextRange(range);
13332
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
13333
- var line = session.doc.getLine(range.start.row);
13334
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
13335
- if (rightChar == selected) {
13336
- range.end.column++;
13337
- return range;
13338
- }
13339
- }
13340
- });
13341
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
13342
- if (text == '>') {
13343
- var position = editor.getSelectionRange().start;
13344
- var iterator = new TokenIterator(session, position.row, position.column);
13345
- var token = iterator.getCurrentToken() || iterator.stepBackward();
13346
- if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
13347
- return;
13348
- if (is(token, "reference.attribute-value"))
13349
- return;
13350
- if (is(token, "attribute-value")) {
13351
- var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
13352
- if (position.column < tokenEndColumn)
13353
- return;
13354
- if (position.column == tokenEndColumn) {
13355
- var nextToken = iterator.stepForward();
13356
- if (nextToken && is(nextToken, "attribute-value"))
13357
- return;
13358
- iterator.stepBackward();
13359
- }
13360
- }
13361
- if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
13362
- return;
13363
- while (!is(token, "tag-name")) {
13364
- token = iterator.stepBackward();
13365
- if (token.value == "<") {
13366
- token = iterator.stepForward();
13367
- break;
13368
- }
13673
+ return {
13674
+ text: '',
13675
+ selection: [1, 1]
13676
+ };
13369
13677
  }
13370
- var tokenRow = iterator.getCurrentTokenRow();
13371
- var tokenColumn = iterator.getCurrentTokenColumn();
13372
- if (is(iterator.stepBackward(), "end-tag-open"))
13373
- return;
13374
- var element = token.value;
13375
- if (tokenRow == position.row)
13376
- element = element.substring(0, position.column - tokenColumn);
13377
- if (this.voidElements.hasOwnProperty(element.toLowerCase()))
13378
- return;
13379
- return {
13380
- text: ">" + "</" + element + ">",
13381
- selection: [1, 1]
13382
- };
13383
13678
  }
13384
13679
  });
13385
- this.add("autoindent", "insertion", function (state, action, editor, session, text) {
13386
- if (text == "\n") {
13680
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
13681
+ if (text === '!' && editor.selection.isEmpty()) {
13387
13682
  var cursor = editor.getCursorPosition();
13388
- var line = session.getLine(cursor.row);
13389
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
13390
- var token = iterator.getCurrentToken();
13391
- if (token && token.type.indexOf("tag-close") !== -1) {
13392
- if (token.value == "/>")
13393
- return;
13394
- while (token && token.type.indexOf("tag-name") === -1) {
13395
- token = iterator.stepBackward();
13396
- }
13397
- if (!token) {
13398
- return;
13399
- }
13400
- var tag = token.value;
13401
- var row = iterator.getCurrentTokenRow();
13402
- token = iterator.stepBackward();
13403
- if (!token || token.type.indexOf("end-tag") !== -1) {
13404
- return;
13405
- }
13406
- if (this.voidElements && !this.voidElements[tag]) {
13407
- var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
13408
- var line = session.getLine(row);
13409
- var nextIndent = this.$getIndent(line);
13410
- var indent = nextIndent + session.getTabString();
13411
- if (nextToken && nextToken.value === "</") {
13412
- return {
13413
- text: "\n" + indent + "\n" + nextIndent,
13414
- selection: [1, indent.length, 1, indent.length]
13415
- };
13416
- }
13417
- else {
13418
- return {
13419
- text: "\n" + indent
13420
- };
13421
- }
13422
- }
13683
+ var line = session.doc.getLine(cursor.row);
13684
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
13685
+ return {
13686
+ text: '!important',
13687
+ selection: [10, 10]
13688
+ };
13423
13689
  }
13424
13690
  }
13425
13691
  });
13426
13692
  };
13427
- oop.inherits(XmlBehaviour, Behaviour);
13428
- exports.XmlBehaviour = XmlBehaviour;
13693
+ oop.inherits(CssBehaviour, CstyleBehaviour);
13694
+ exports.CssBehaviour = CssBehaviour;
13429
13695
 
13430
13696
  });
13431
13697
 
13432
- ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
13433
- var oop = require("../../lib/oop");
13434
- var BaseFoldMode = require("./fold_mode").FoldMode;
13435
- var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
13436
- this.defaultMode = defaultMode;
13437
- this.subModes = subModes;
13698
+ 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";
13699
+ var oop = require("../lib/oop");
13700
+ var TextMode = require("./text").Mode;
13701
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
13702
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
13703
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
13704
+ var CssCompletions = require("./css_completions").CssCompletions;
13705
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
13706
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
13707
+ var Mode = function () {
13708
+ this.HighlightRules = CssHighlightRules;
13709
+ this.$outdent = new MatchingBraceOutdent();
13710
+ this.$behaviour = new CssBehaviour();
13711
+ this.$completer = new CssCompletions();
13712
+ this.foldingRules = new CStyleFoldMode();
13438
13713
  };
13439
- oop.inherits(FoldMode, BaseFoldMode);
13714
+ oop.inherits(Mode, TextMode);
13440
13715
  (function () {
13441
- this.$getMode = function (state) {
13442
- if (typeof state != "string")
13443
- state = state[0];
13444
- for (var key in this.subModes) {
13445
- if (state.indexOf(key) === 0)
13446
- return this.subModes[key];
13716
+ this.foldingRules = "cStyle";
13717
+ this.blockComment = { start: "/*", end: "*/" };
13718
+ this.getNextLineIndent = function (state, line, tab) {
13719
+ var indent = this.$getIndent(line);
13720
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
13721
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
13722
+ return indent;
13447
13723
  }
13448
- return null;
13449
- };
13450
- this.$tryMode = function (state, session, foldStyle, row) {
13451
- var mode = this.$getMode(state);
13452
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
13453
- };
13454
- this.getFoldWidget = function (session, foldStyle, row) {
13455
- return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
13456
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
13457
- this.defaultMode.getFoldWidget(session, foldStyle, row));
13458
- };
13459
- this.getFoldWidgetRange = function (session, foldStyle, row) {
13460
- var mode = this.$getMode(session.getState(row - 1));
13461
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
13462
- mode = this.$getMode(session.getState(row));
13463
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
13464
- mode = this.defaultMode;
13465
- return mode.getFoldWidgetRange(session, foldStyle, row);
13466
- };
13467
- }).call(FoldMode.prototype);
13468
-
13469
- });
13470
-
13471
- 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";
13472
- var oop = require("../../lib/oop");
13473
- var Range = require("../../range").Range;
13474
- var BaseFoldMode = require("./fold_mode").FoldMode;
13475
- var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
13476
- BaseFoldMode.call(this);
13477
- this.voidElements = voidElements || {};
13478
- this.optionalEndTags = oop.mixin({}, this.voidElements);
13479
- if (optionalEndTags)
13480
- oop.mixin(this.optionalEndTags, optionalEndTags);
13481
- };
13482
- oop.inherits(FoldMode, BaseFoldMode);
13483
- var Tag = function () {
13484
- this.tagName = "";
13485
- this.closing = false;
13486
- this.selfClosing = false;
13487
- this.start = { row: 0, column: 0 };
13488
- this.end = { row: 0, column: 0 };
13489
- };
13490
- function is(token, type) {
13491
- return token.type.lastIndexOf(type + ".xml") > -1;
13492
- }
13493
- (function () {
13494
- this.getFoldWidget = function (session, foldStyle, row) {
13495
- var tag = this._getFirstTagInLine(session, row);
13496
- if (!tag)
13497
- return this.getCommentFoldWidget(session, row);
13498
- if (tag.closing || (!tag.tagName && tag.selfClosing))
13499
- return foldStyle === "markbeginend" ? "end" : "";
13500
- if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
13501
- return "";
13502
- if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
13503
- return "";
13504
- return "start";
13724
+ var match = line.match(/^.*\{\s*$/);
13725
+ if (match) {
13726
+ indent += tab;
13727
+ }
13728
+ return indent;
13505
13729
  };
13506
- this.getCommentFoldWidget = function (session, row) {
13507
- if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
13508
- return "start";
13509
- return "";
13730
+ this.checkOutdent = function (state, line, input) {
13731
+ return this.$outdent.checkOutdent(line, input);
13510
13732
  };
13511
- this._getFirstTagInLine = function (session, row) {
13512
- var tokens = session.getTokens(row);
13513
- var tag = new Tag();
13514
- for (var i = 0; i < tokens.length; i++) {
13515
- var token = tokens[i];
13516
- if (is(token, "tag-open")) {
13517
- tag.end.column = tag.start.column + token.value.length;
13518
- tag.closing = is(token, "end-tag-open");
13519
- token = tokens[++i];
13520
- if (!token)
13521
- return null;
13522
- tag.tagName = token.value;
13523
- tag.end.column += token.value.length;
13524
- for (i++; i < tokens.length; i++) {
13525
- token = tokens[i];
13526
- tag.end.column += token.value.length;
13527
- if (is(token, "tag-close")) {
13528
- tag.selfClosing = token.value == '/>';
13529
- break;
13530
- }
13531
- }
13532
- return tag;
13533
- }
13534
- else if (is(token, "tag-close")) {
13535
- tag.selfClosing = token.value == '/>';
13536
- return tag;
13537
- }
13538
- tag.start.column += token.value.length;
13539
- }
13540
- return null;
13733
+ this.autoOutdent = function (state, doc, row) {
13734
+ this.$outdent.autoOutdent(doc, row);
13541
13735
  };
13542
- this._findEndTagInLine = function (session, row, tagName, startColumn) {
13543
- var tokens = session.getTokens(row);
13544
- var column = 0;
13545
- for (var i = 0; i < tokens.length; i++) {
13546
- var token = tokens[i];
13547
- column += token.value.length;
13548
- if (column < startColumn)
13549
- continue;
13550
- if (is(token, "end-tag-open")) {
13551
- token = tokens[i + 1];
13552
- if (token && token.value == tagName)
13553
- return true;
13554
- }
13555
- }
13556
- return false;
13736
+ this.getCompletions = function (state, session, pos, prefix) {
13737
+ return this.$completer.getCompletions(state, session, pos, prefix);
13557
13738
  };
13558
- this.getFoldWidgetRange = function (session, foldStyle, row) {
13559
- var tags = session.getMatchingTags({ row: row, column: 0 });
13560
- if (tags) {
13561
- return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
13562
- }
13563
- else {
13564
- return this.getCommentFoldWidget(session, row)
13565
- && session.getCommentFoldRange(row, session.getLine(row).length);
13566
- }
13739
+ this.createWorker = function (session) {
13740
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
13741
+ worker.attachToDocument(session.getDocument());
13742
+ worker.on("annotate", function (e) {
13743
+ session.setAnnotations(e.data);
13744
+ });
13745
+ worker.on("terminate", function () {
13746
+ session.clearAnnotations();
13747
+ });
13748
+ return worker;
13567
13749
  };
13568
- }).call(FoldMode.prototype);
13569
-
13570
- });
13571
-
13572
- 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";
13573
- var oop = require("../../lib/oop");
13574
- var MixedFoldMode = require("./mixed").FoldMode;
13575
- var XmlFoldMode = require("./xml").FoldMode;
13576
- var CStyleFoldMode = require("./cstyle").FoldMode;
13577
- var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
13578
- MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
13579
- "js-": new CStyleFoldMode(),
13580
- "css-": new CStyleFoldMode()
13581
- });
13582
- };
13583
- oop.inherits(FoldMode, MixedFoldMode);
13750
+ this.$id = "ace/mode/css";
13751
+ this.snippetFileId = "ace/snippets/css";
13752
+ }).call(Mode.prototype);
13753
+ exports.Mode = Mode;
13584
13754
 
13585
13755
  });
13586
13756
 
@@ -13943,7 +14113,7 @@ exports.Mode = Mode;
13943
14113
 
13944
14114
  });
13945
14115
 
13946
- ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module){"use strict";
14116
+ ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/php","ace/unicode","ace/mode/folding/mixed","ace/mode/folding/html","ace/mode/folding/cstyle","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module){"use strict";
13947
14117
  var oop = require("../lib/oop");
13948
14118
  var TextMode = require("./text").Mode;
13949
14119
  var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
@@ -13951,8 +14121,11 @@ var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRul
13951
14121
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
13952
14122
  var WorkerClient = require("../worker/worker_client").WorkerClient;
13953
14123
  var PhpCompletions = require("./php_completions").PhpCompletions;
13954
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
14124
+ var PhpFoldMode = require("./folding/php").FoldMode;
13955
14125
  var unicode = require("../unicode");
14126
+ var MixedFoldMode = require("./folding/mixed").FoldMode;
14127
+ var HtmlFoldMode = require("./folding/html").FoldMode;
14128
+ var CstyleFoldMode = require("./folding/cstyle").FoldMode;
13956
14129
  var HtmlMode = require("./html").Mode;
13957
14130
  var JavaScriptMode = require("./javascript").Mode;
13958
14131
  var CssMode = require("./css").Mode;
@@ -13961,7 +14134,11 @@ var PhpMode = function (opts) {
13961
14134
  this.$outdent = new MatchingBraceOutdent();
13962
14135
  this.$behaviour = this.$defaultBehaviour;
13963
14136
  this.$completer = new PhpCompletions();
13964
- this.foldingRules = new CStyleFoldMode();
14137
+ this.foldingRules = new MixedFoldMode(new HtmlFoldMode(), {
14138
+ "js-": new CstyleFoldMode(),
14139
+ "css-": new CstyleFoldMode(),
14140
+ "php-": new PhpFoldMode()
14141
+ });
13965
14142
  };
13966
14143
  oop.inherits(PhpMode, TextMode);
13967
14144
  (function () {
@@ -14022,7 +14199,11 @@ var Mode = function (opts) {
14022
14199
  "css-": CssMode,
14023
14200
  "php-": PhpMode
14024
14201
  });
14025
- this.foldingRules.subModes["php-"] = new CStyleFoldMode();
14202
+ this.foldingRules = new MixedFoldMode(new HtmlFoldMode(), {
14203
+ "js-": new CstyleFoldMode(),
14204
+ "css-": new CstyleFoldMode(),
14205
+ "php-": new PhpFoldMode()
14206
+ });
14026
14207
  };
14027
14208
  oop.inherits(Mode, HtmlMode);
14028
14209
  (function () {