ace-rails-ap 0.0.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. data/lib/ace/rails/version.rb +1 -1
  2. data/vendor/assets/javascripts/ace.js +15680 -1
  3. data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
  4. data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
  5. data/vendor/assets/javascripts/mode-c9search.js +275 -0
  6. data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
  7. data/vendor/assets/javascripts/mode-clojure.js +364 -1
  8. data/vendor/assets/javascripts/mode-coffee.js +527 -1
  9. data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
  10. data/vendor/assets/javascripts/mode-csharp.js +633 -1
  11. data/vendor/assets/javascripts/mode-css.js +499 -1
  12. data/vendor/assets/javascripts/mode-diff.js +250 -0
  13. data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
  14. data/vendor/assets/javascripts/mode-golang.js +681 -1
  15. data/vendor/assets/javascripts/mode-groovy.js +1240 -1
  16. data/vendor/assets/javascripts/mode-haxe.js +633 -1
  17. data/vendor/assets/javascripts/mode-html.js +2064 -1
  18. data/vendor/assets/javascripts/mode-java.js +1202 -1
  19. data/vendor/assets/javascripts/mode-javascript.js +1069 -1
  20. data/vendor/assets/javascripts/mode-json.js +588 -1
  21. data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
  22. data/vendor/assets/javascripts/mode-latex.js +95 -1
  23. data/vendor/assets/javascripts/mode-less.js +512 -1
  24. data/vendor/assets/javascripts/mode-liquid.js +1125 -1
  25. data/vendor/assets/javascripts/mode-lua.js +551 -1
  26. data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
  27. data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
  28. data/vendor/assets/javascripts/mode-markdown.js +2369 -1
  29. data/vendor/assets/javascripts/mode-ocaml.js +464 -1
  30. data/vendor/assets/javascripts/mode-perl.js +432 -1
  31. data/vendor/assets/javascripts/mode-pgsql.js +970 -1
  32. data/vendor/assets/javascripts/mode-php.js +1718 -1
  33. data/vendor/assets/javascripts/mode-powershell.js +610 -1
  34. data/vendor/assets/javascripts/mode-python.js +397 -1
  35. data/vendor/assets/javascripts/mode-ruby.js +318 -1
  36. data/vendor/assets/javascripts/mode-scad.js +732 -1
  37. data/vendor/assets/javascripts/mode-scala.js +1237 -1
  38. data/vendor/assets/javascripts/mode-scss.js +537 -1
  39. data/vendor/assets/javascripts/mode-sh.js +250 -1
  40. data/vendor/assets/javascripts/mode-sql.js +140 -1
  41. data/vendor/assets/javascripts/mode-svg.js +1681 -1
  42. data/vendor/assets/javascripts/mode-tcl.js +320 -0
  43. data/vendor/assets/javascripts/mode-textile.js +182 -1
  44. data/vendor/assets/javascripts/mode-xml.js +829 -1
  45. data/vendor/assets/javascripts/mode-xquery.js +605 -1
  46. data/vendor/assets/javascripts/mode-yaml.js +189 -0
  47. data/vendor/assets/javascripts/theme-chrome.js +213 -1
  48. data/vendor/assets/javascripts/theme-clouds.js +167 -1
  49. data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
  50. data/vendor/assets/javascripts/theme-cobalt.js +194 -1
  51. data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
  52. data/vendor/assets/javascripts/theme-dawn.js +198 -1
  53. data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
  54. data/vendor/assets/javascripts/theme-eclipse.js +157 -1
  55. data/vendor/assets/javascripts/theme-github.js +182 -0
  56. data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
  57. data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
  58. data/vendor/assets/javascripts/theme-merbivore.js +189 -1
  59. data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
  60. data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
  61. data/vendor/assets/javascripts/theme-monokai.js +194 -1
  62. data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
  63. data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
  64. data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
  65. data/vendor/assets/javascripts/theme-textmate.js +216 -0
  66. data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
  67. data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
  68. data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
  69. data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
  70. data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
  71. data/vendor/assets/javascripts/theme-twilight.js +211 -1
  72. data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
  73. data/vendor/assets/javascripts/worker-coffee.js +83 -893
  74. data/vendor/assets/javascripts/worker-css.js +88 -1402
  75. data/vendor/assets/javascripts/worker-javascript.js +97 -812
  76. data/vendor/assets/javascripts/worker-json.js +84 -761
  77. data/vendor/assets/javascripts/worker-xquery.js +66464 -0
  78. metadata +12 -195
  79. data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
  80. data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
  81. data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
  82. data/vendor/assets/javascripts/ace-compat.js +0 -1
  83. data/vendor/assets/javascripts/ace-noconflict.js +0 -10
  84. data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
  85. data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
  86. data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
  87. data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
  88. data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
  89. data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
  90. data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
  91. data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
  92. data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
  93. data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
  94. data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
  95. data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
  96. data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
  97. data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
  98. data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
  99. data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
  100. data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
  101. data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
  102. data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
  103. data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
  104. data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
  105. data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
  106. data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
  107. data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
  108. data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
  109. data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
  110. data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
  111. data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
  112. data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
  113. data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
  114. data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
  115. data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
  116. data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
  117. data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
  118. data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
  119. data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
  120. data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
  121. data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
  122. data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
  123. data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
  124. data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
  125. data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
  126. data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
  127. data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
  128. data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
  129. data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
  130. data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
  131. data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
  132. data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
  133. data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
  134. data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
  135. data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
  136. data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
  137. data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
  138. data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
  139. data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
  140. data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
  141. data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
  142. data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
  143. data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
  144. data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
  145. data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
  146. data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
  147. data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
  148. data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
  149. data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
  150. data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
  151. data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
  152. data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
  153. data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
  154. data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
  155. data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
  156. data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
  157. data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
  158. data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
  159. data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
  160. data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
  161. data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
  162. data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
  163. data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
  164. data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
  165. data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
  166. data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
  167. data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
  168. data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
  169. data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
  170. data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
  171. data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
  172. data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
  173. data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
  174. data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
  175. data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
  176. data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
  177. data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
  178. data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
  179. data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
  180. data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
  181. data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
  182. data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
  183. data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
  184. data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
  185. data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
  186. data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
  187. data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
  188. data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
  189. data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
  190. data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
  191. data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
  192. data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
  193. data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
  194. data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
  195. data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
  196. data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
  197. data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
  198. data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
  199. data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
  200. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
  201. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
  202. data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
  203. data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
  204. data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
  205. data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
  206. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
  207. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
  208. data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
  209. data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
  210. data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
  211. data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
  212. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
  213. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
  214. data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
  215. data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
  216. data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
  217. data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
  218. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
  219. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
  220. data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
  221. data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
  222. data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
  223. data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
  224. data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
  225. data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
  226. data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
  227. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
  228. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
  229. data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
  230. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
  231. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
  232. data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
  233. data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
  234. data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
  235. data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
  236. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
  237. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
  238. data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
  239. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
  240. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
  241. data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
  242. data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
  243. data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
  244. data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
  245. data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
  246. data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
  247. data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
  248. data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
  249. data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
  250. data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
  251. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
  252. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
  253. data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
  254. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
  255. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
  256. data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
  257. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
  258. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
  259. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
  260. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
  261. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
  262. data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
  263. data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
  264. data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
  265. data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
  266. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
  267. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
@@ -1 +1,1240 @@
1
- define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/groovy_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./groovy_highlight_rules").GroovyHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)}),define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[f.getEndRule("start")])};d.inherits(h,g),b.GroovyHighlightRules=h})
1
+ define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
2
+
3
+
4
+ var oop = require("../lib/oop");
5
+ var JavaScriptMode = require("./javascript").Mode;
6
+ var Tokenizer = require("../tokenizer").Tokenizer;
7
+ var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
8
+
9
+ var Mode = function() {
10
+ JavaScriptMode.call(this);
11
+ this.$tokenizer = new Tokenizer(new GroovyHighlightRules().getRules());
12
+ };
13
+ oop.inherits(Mode, JavaScriptMode);
14
+
15
+ (function() {
16
+
17
+ this.createWorker = function(session) {
18
+ return null;
19
+ };
20
+
21
+ }).call(Mode.prototype);
22
+
23
+ exports.Mode = Mode;
24
+ });
25
+
26
+ define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
27
+
28
+
29
+ var oop = require("../lib/oop");
30
+ var TextMode = require("./text").Mode;
31
+ var Tokenizer = require("../tokenizer").Tokenizer;
32
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
33
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
34
+ var Range = require("../range").Range;
35
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
36
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
37
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
38
+
39
+ var Mode = function() {
40
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
41
+ this.$outdent = new MatchingBraceOutdent();
42
+ this.$behaviour = new CstyleBehaviour();
43
+ this.foldingRules = new CStyleFoldMode();
44
+ };
45
+ oop.inherits(Mode, TextMode);
46
+
47
+ (function() {
48
+
49
+
50
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
51
+ var outdent = true;
52
+ var re = /^(\s*)\/\//;
53
+
54
+ for (var i=startRow; i<= endRow; i++) {
55
+ if (!re.test(doc.getLine(i))) {
56
+ outdent = false;
57
+ break;
58
+ }
59
+ }
60
+
61
+ if (outdent) {
62
+ var deleteRange = new Range(0, 0, 0, 0);
63
+ for (var i=startRow; i<= endRow; i++)
64
+ {
65
+ var line = doc.getLine(i);
66
+ var m = line.match(re);
67
+ deleteRange.start.row = i;
68
+ deleteRange.end.row = i;
69
+ deleteRange.end.column = m[0].length;
70
+ doc.replace(deleteRange, m[1]);
71
+ }
72
+ }
73
+ else {
74
+ doc.indentRows(startRow, endRow, "//");
75
+ }
76
+ };
77
+
78
+ this.getNextLineIndent = function(state, line, tab) {
79
+ var indent = this.$getIndent(line);
80
+
81
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
82
+ var tokens = tokenizedLine.tokens;
83
+ var endState = tokenizedLine.state;
84
+
85
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
86
+ return indent;
87
+ }
88
+
89
+ if (state == "start" || state == "regex_allowed") {
90
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
91
+ if (match) {
92
+ indent += tab;
93
+ }
94
+ } else if (state == "doc-start") {
95
+ if (endState == "start" || state == "regex_allowed") {
96
+ return "";
97
+ }
98
+ var match = line.match(/^\s*(\/?)\*/);
99
+ if (match) {
100
+ if (match[1]) {
101
+ indent += " ";
102
+ }
103
+ indent += "* ";
104
+ }
105
+ }
106
+
107
+ return indent;
108
+ };
109
+
110
+ this.checkOutdent = function(state, line, input) {
111
+ return this.$outdent.checkOutdent(line, input);
112
+ };
113
+
114
+ this.autoOutdent = function(state, doc, row) {
115
+ this.$outdent.autoOutdent(doc, row);
116
+ };
117
+
118
+ this.createWorker = function(session) {
119
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
120
+ worker.attachToDocument(session.getDocument());
121
+
122
+ worker.on("jslint", function(results) {
123
+ var errors = [];
124
+ for (var i=0; i<results.data.length; i++) {
125
+ var error = results.data[i];
126
+ if (error)
127
+ errors.push({
128
+ row: error.line-1,
129
+ column: error.character-1,
130
+ text: error.reason,
131
+ type: "warning",
132
+ lint: error
133
+ });
134
+ }
135
+ session.setAnnotations(errors);
136
+ });
137
+
138
+ worker.on("narcissus", function(e) {
139
+ session.setAnnotations([e.data]);
140
+ });
141
+
142
+ worker.on("terminate", function() {
143
+ session.clearAnnotations();
144
+ });
145
+
146
+ return worker;
147
+ };
148
+
149
+ }).call(Mode.prototype);
150
+
151
+ exports.Mode = Mode;
152
+ });
153
+
154
+ define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
155
+
156
+
157
+ var oop = require("../lib/oop");
158
+ var lang = require("../lib/lang");
159
+ var unicode = require("../unicode");
160
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
161
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
162
+
163
+ var JavaScriptHighlightRules = function() {
164
+
165
+ // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
166
+ var globals = lang.arrayToMap(
167
+ // Constructors
168
+ ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
169
+ // E4X
170
+ "Namespace|QName|XML|XMLList|" +
171
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
172
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
173
+ // Errors
174
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
175
+ "SyntaxError|TypeError|URIError|" +
176
+ // Non-constructor functions
177
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
178
+ "isNaN|parseFloat|parseInt|" +
179
+ // Other
180
+ "JSON|Math|" +
181
+ // Pseudo
182
+ "this|arguments|prototype|window|document"
183
+ ).split("|")
184
+ );
185
+
186
+ var keywords = lang.arrayToMap(
187
+ ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
188
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
189
+ "const|yield|import|get|set").split("|")
190
+ );
191
+
192
+ // keywords which can be followed by regular expressions
193
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
194
+
195
+ var deprecated = lang.arrayToMap(
196
+ ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
197
+ );
198
+
199
+ var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
200
+
201
+ var buildinConstants = lang.arrayToMap(
202
+ ("null|Infinity|NaN|undefined").split("|")
203
+ );
204
+
205
+ var futureReserved = lang.arrayToMap(
206
+ ("class|enum|extends|super|export|implements|private|" +
207
+ "public|interface|package|protected|static").split("|")
208
+ );
209
+
210
+ // TODO: Unicode escape sequences
211
+ var identifierRe = "[" + unicode.packages.L + "\\$_]["
212
+ + unicode.packages.L
213
+ + unicode.packages.Mn + unicode.packages.Mc
214
+ + unicode.packages.Nd
215
+ + unicode.packages.Pc + "\\$_]*\\b";
216
+
217
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
218
+ "u[0-9a-fA-F]{4}|" + // unicode
219
+ "[0-2][0-7]{0,2}|" + // oct
220
+ "3[0-6][0-7]?|" + // oct
221
+ "37[0-7]?|" + // oct
222
+ "[4-7][0-7]?|" + //oct
223
+ ".)";
224
+
225
+ // regexp must not have capturing parentheses. Use (?:) instead.
226
+ // regexps are ordered -> the first match is used
227
+
228
+ this.$rules = {
229
+ "start" : [
230
+ {
231
+ token : "comment",
232
+ regex : /\/\/.*$/
233
+ },
234
+ DocCommentHighlightRules.getStartRule("doc-start"),
235
+ {
236
+ token : "comment", // multi line comment
237
+ merge : true,
238
+ regex : /\/\*/,
239
+ next : "comment"
240
+ }, {
241
+ token : "string",
242
+ regex : "'(?=.)",
243
+ next : "qstring"
244
+ }, {
245
+ token : "string",
246
+ regex : '"(?=.)',
247
+ next : "qqstring"
248
+ }, {
249
+ token : "constant.numeric", // hex
250
+ regex : /0[xX][0-9a-fA-F]+\b/
251
+ }, {
252
+ token : "constant.numeric", // float
253
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
254
+ }, { // match stuff like: Sound.prototype.play = function() { }
255
+ token : [
256
+ "storage.type",
257
+ "punctuation.operator",
258
+ "support.function",
259
+ "punctuation.operator",
260
+ "entity.name.function",
261
+ "text",
262
+ "keyword.operator",
263
+ "text",
264
+ "storage.type",
265
+ "text",
266
+ "paren.lparen"
267
+ ],
268
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
269
+ next: "function_arguments"
270
+ }, { // match stuff like: Sound.prototype.play = myfunc
271
+ token : [
272
+ "storage.type",
273
+ "punctuation.operator",
274
+ "support.function",
275
+ "punctuation.operator",
276
+ "entity.name.function",
277
+ "text",
278
+ "keyword.operator",
279
+ "text"
280
+ ],
281
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)",
282
+ next: "function_arguments"
283
+ }, { // match stuff like: Sound.play = function() { }
284
+ token : [
285
+ "storage.type",
286
+ "punctuation.operator",
287
+ "entity.name.function",
288
+ "text",
289
+ "keyword.operator",
290
+ "text",
291
+ "storage.type",
292
+ "text",
293
+ "paren.lparen"
294
+ ],
295
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
296
+ next: "function_arguments"
297
+ }, { // match stuff like: play = function() { }
298
+ token : [
299
+ "entity.name.function",
300
+ "text",
301
+ "keyword.operator",
302
+ "text",
303
+ "storage.type",
304
+ "text",
305
+ "paren.lparen"
306
+ ],
307
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
308
+ next: "function_arguments"
309
+ }, { // match stuff like: Sound.play = function play() { }
310
+ token : [
311
+ "storage.type",
312
+ "punctuation.operator",
313
+ "entity.name.function",
314
+ "text",
315
+ "keyword.operator",
316
+ "text",
317
+ "storage.type",
318
+ "text",
319
+ "entity.name.function",
320
+ "text",
321
+ "paren.lparen"
322
+ ],
323
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
324
+ next: "function_arguments"
325
+ }, { // match regular function like: function myFunc(arg) { }
326
+ token : [
327
+ "storage.type",
328
+ "text",
329
+ "entity.name.function",
330
+ "text",
331
+ "paren.lparen"
332
+ ],
333
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
334
+ next: "function_arguments"
335
+ }, { // match stuff like: foobar: function() { }
336
+ token : [
337
+ "entity.name.function",
338
+ "text",
339
+ "punctuation.operator",
340
+ "text",
341
+ "storage.type",
342
+ "text",
343
+ "paren.lparen"
344
+ ],
345
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
346
+ next: "function_arguments"
347
+ }, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
348
+ token : [
349
+ "text",
350
+ "text",
351
+ "storage.type",
352
+ "text",
353
+ "paren.lparen"
354
+ ],
355
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
356
+ next: "function_arguments"
357
+ }, {
358
+ token : "constant.language.boolean",
359
+ regex : /(?:true|false)\b/
360
+ }, {
361
+ token : "keyword",
362
+ regex : "(?:" + kwBeforeRe + ")\\b",
363
+ next : "regex_allowed"
364
+ }, {
365
+ token : ["punctuation.operator", "support.function"],
366
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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(?=\()/
367
+ }, {
368
+ token : ["punctuation.operator", "support.function.dom"],
369
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
370
+ }, {
371
+ token : ["punctuation.operator", "support.constant"],
372
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
373
+ }, {
374
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
375
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
376
+ }, {
377
+ token : function(value) {
378
+ if (globals.hasOwnProperty(value))
379
+ return "variable.language";
380
+ else if (deprecated.hasOwnProperty(value))
381
+ return "invalid.deprecated";
382
+ else if (definitions.hasOwnProperty(value))
383
+ return "storage.type";
384
+ else if (keywords.hasOwnProperty(value))
385
+ return "keyword";
386
+ else if (buildinConstants.hasOwnProperty(value))
387
+ return "constant.language";
388
+ else if (futureReserved.hasOwnProperty(value))
389
+ return "invalid.illegal";
390
+ else if (value == "debugger")
391
+ return "invalid.deprecated";
392
+ else
393
+ return "identifier";
394
+ },
395
+ regex : identifierRe
396
+ }, {
397
+ token : "keyword.operator",
398
+ regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,
399
+ next : "regex_allowed"
400
+ }, {
401
+ token : "punctuation.operator",
402
+ regex : /\?|\:|\,|\;|\./,
403
+ next : "regex_allowed"
404
+ }, {
405
+ token : "paren.lparen",
406
+ regex : /[\[({]/,
407
+ next : "regex_allowed"
408
+ }, {
409
+ token : "paren.rparen",
410
+ regex : /[\])}]/
411
+ }, {
412
+ token : "keyword.operator",
413
+ regex : /\/=?/,
414
+ next : "regex_allowed"
415
+ }, {
416
+ token: "comment",
417
+ regex: /^#!.*$/
418
+ }, {
419
+ token : "text",
420
+ regex : /\s+/
421
+ }
422
+ ],
423
+ // regular expressions are only allowed after certain tokens. This
424
+ // makes sure we don't mix up regexps with the divison operator
425
+ "regex_allowed": [
426
+ DocCommentHighlightRules.getStartRule("doc-start"),
427
+ {
428
+ token : "comment", // multi line comment
429
+ merge : true,
430
+ regex : "\\/\\*",
431
+ next : "comment_regex_allowed"
432
+ }, {
433
+ token : "comment",
434
+ regex : "\\/\\/.*$"
435
+ }, {
436
+ token: "string.regexp",
437
+ regex: "\\/",
438
+ next: "regex",
439
+ merge: true
440
+ }, {
441
+ token : "text",
442
+ regex : "\\s+"
443
+ }, {
444
+ // immediately return to the start mode without matching
445
+ // anything
446
+ token: "empty",
447
+ regex: "",
448
+ next: "start"
449
+ }
450
+ ],
451
+ "regex": [
452
+ {
453
+ token: "regexp.keyword.operator",
454
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
455
+ }, {
456
+ // flag
457
+ token: "string.regexp",
458
+ regex: "/\\w*",
459
+ next: "start",
460
+ merge: true
461
+ }, {
462
+ token: "string.regexp",
463
+ regex: "[^\\\\/\\[]+",
464
+ merge: true
465
+ }, {
466
+ token: "string.regexp.charachterclass",
467
+ regex: "\\[",
468
+ next: "regex_character_class",
469
+ merge: true
470
+ }, {
471
+ token: "empty",
472
+ regex: "",
473
+ next: "start"
474
+ }
475
+ ],
476
+ "regex_character_class": [
477
+ {
478
+ token: "regexp.keyword.operator",
479
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
480
+ }, {
481
+ token: "string.regexp.charachterclass",
482
+ regex: "]",
483
+ next: "regex",
484
+ merge: true
485
+ }, {
486
+ token: "string.regexp.charachterclass",
487
+ regex: "[^\\\\\\]]+",
488
+ merge: true
489
+ }, {
490
+ token: "empty",
491
+ regex: "",
492
+ next: "start"
493
+ }
494
+ ],
495
+ "function_arguments": [
496
+ {
497
+ token: "variable.parameter",
498
+ regex: identifierRe
499
+ }, {
500
+ token: "punctuation.operator",
501
+ regex: "[, ]+",
502
+ merge: true
503
+ }, {
504
+ token: "punctuation.operator",
505
+ regex: "$",
506
+ merge: true
507
+ }, {
508
+ token: "empty",
509
+ regex: "",
510
+ next: "start"
511
+ }
512
+ ],
513
+ "comment_regex_allowed" : [
514
+ {
515
+ token : "comment", // closing comment
516
+ regex : ".*?\\*\\/",
517
+ merge : true,
518
+ next : "regex_allowed"
519
+ }, {
520
+ token : "comment", // comment spanning whole line
521
+ merge : true,
522
+ regex : ".+"
523
+ }
524
+ ],
525
+ "comment" : [
526
+ {
527
+ token : "comment", // closing comment
528
+ regex : ".*?\\*\\/",
529
+ merge : true,
530
+ next : "start"
531
+ }, {
532
+ token : "comment", // comment spanning whole line
533
+ merge : true,
534
+ regex : ".+"
535
+ }
536
+ ],
537
+ "qqstring" : [
538
+ {
539
+ token : "constant.language.escape",
540
+ regex : escapedRe
541
+ }, {
542
+ token : "string",
543
+ regex : '[^"\\\\]+',
544
+ merge : true
545
+ }, {
546
+ token : "string",
547
+ regex : "\\\\$",
548
+ next : "qqstring",
549
+ merge : true
550
+ }, {
551
+ token : "string",
552
+ regex : '"|$',
553
+ next : "start",
554
+ merge : true
555
+ }
556
+ ],
557
+ "qstring" : [
558
+ {
559
+ token : "constant.language.escape",
560
+ regex : escapedRe
561
+ }, {
562
+ token : "string",
563
+ regex : "[^'\\\\]+",
564
+ merge : true
565
+ }, {
566
+ token : "string",
567
+ regex : "\\\\$",
568
+ next : "qstring",
569
+ merge : true
570
+ }, {
571
+ token : "string",
572
+ regex : "'|$",
573
+ next : "start",
574
+ merge : true
575
+ }
576
+ ]
577
+ };
578
+
579
+ this.embedRules(DocCommentHighlightRules, "doc-",
580
+ [ DocCommentHighlightRules.getEndRule("start") ]);
581
+ };
582
+
583
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
584
+
585
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
586
+ });
587
+
588
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
589
+
590
+
591
+ var oop = require("../lib/oop");
592
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
593
+
594
+ var DocCommentHighlightRules = function() {
595
+
596
+ this.$rules = {
597
+ "start" : [ {
598
+ token : "comment.doc.tag",
599
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
600
+ }, {
601
+ token : "comment.doc",
602
+ merge : true,
603
+ regex : "\\s+"
604
+ }, {
605
+ token : "comment.doc",
606
+ merge : true,
607
+ regex : "TODO"
608
+ }, {
609
+ token : "comment.doc",
610
+ merge : true,
611
+ regex : "[^@\\*]+"
612
+ }, {
613
+ token : "comment.doc",
614
+ merge : true,
615
+ regex : "."
616
+ }]
617
+ };
618
+ };
619
+
620
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
621
+
622
+ DocCommentHighlightRules.getStartRule = function(start) {
623
+ return {
624
+ token : "comment.doc", // doc comment
625
+ merge : true,
626
+ regex : "\\/\\*(?=\\*)",
627
+ next : start
628
+ };
629
+ };
630
+
631
+ DocCommentHighlightRules.getEndRule = function (start) {
632
+ return {
633
+ token : "comment.doc", // closing comment
634
+ merge : true,
635
+ regex : "\\*\\/",
636
+ next : start
637
+ };
638
+ };
639
+
640
+
641
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
642
+
643
+ });
644
+
645
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
646
+
647
+
648
+ var Range = require("../range").Range;
649
+
650
+ var MatchingBraceOutdent = function() {};
651
+
652
+ (function() {
653
+
654
+ this.checkOutdent = function(line, input) {
655
+ if (! /^\s+$/.test(line))
656
+ return false;
657
+
658
+ return /^\s*\}/.test(input);
659
+ };
660
+
661
+ this.autoOutdent = function(doc, row) {
662
+ var line = doc.getLine(row);
663
+ var match = line.match(/^(\s*\})/);
664
+
665
+ if (!match) return 0;
666
+
667
+ var column = match[1].length;
668
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
669
+
670
+ if (!openBracePos || openBracePos.row == row) return 0;
671
+
672
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
673
+ doc.replace(new Range(row, 0, row, column-1), indent);
674
+ };
675
+
676
+ this.$getIndent = function(line) {
677
+ var match = line.match(/^(\s+)/);
678
+ if (match) {
679
+ return match[1];
680
+ }
681
+
682
+ return "";
683
+ };
684
+
685
+ }).call(MatchingBraceOutdent.prototype);
686
+
687
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
688
+ });
689
+
690
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
691
+
692
+
693
+ var oop = require("../../lib/oop");
694
+ var Behaviour = require("../behaviour").Behaviour;
695
+
696
+ var CstyleBehaviour = function () {
697
+
698
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
699
+ if (text == '{') {
700
+ var selection = editor.getSelectionRange();
701
+ var selected = session.doc.getTextRange(selection);
702
+ if (selected !== "") {
703
+ return {
704
+ text: '{' + selected + '}',
705
+ selection: false
706
+ };
707
+ } else {
708
+ return {
709
+ text: '{}',
710
+ selection: [1, 1]
711
+ };
712
+ }
713
+ } else if (text == '}') {
714
+ var cursor = editor.getCursorPosition();
715
+ var line = session.doc.getLine(cursor.row);
716
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
717
+ if (rightChar == '}') {
718
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
719
+ if (matching !== null) {
720
+ return {
721
+ text: '',
722
+ selection: [1, 1]
723
+ };
724
+ }
725
+ }
726
+ } else if (text == "\n") {
727
+ var cursor = editor.getCursorPosition();
728
+ var line = session.doc.getLine(cursor.row);
729
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
730
+ if (rightChar == '}') {
731
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
732
+ if (!openBracePos)
733
+ return null;
734
+
735
+ var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
736
+ var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
737
+
738
+ return {
739
+ text: '\n' + indent + '\n' + next_indent,
740
+ selection: [1, indent.length, 1, indent.length]
741
+ };
742
+ }
743
+ }
744
+ });
745
+
746
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
747
+ var selected = session.doc.getTextRange(range);
748
+ if (!range.isMultiLine() && selected == '{') {
749
+ var line = session.doc.getLine(range.start.row);
750
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
751
+ if (rightChar == '}') {
752
+ range.end.column++;
753
+ return range;
754
+ }
755
+ }
756
+ });
757
+
758
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
759
+ if (text == '(') {
760
+ var selection = editor.getSelectionRange();
761
+ var selected = session.doc.getTextRange(selection);
762
+ if (selected !== "") {
763
+ return {
764
+ text: '(' + selected + ')',
765
+ selection: false
766
+ };
767
+ } else {
768
+ return {
769
+ text: '()',
770
+ selection: [1, 1]
771
+ };
772
+ }
773
+ } else if (text == ')') {
774
+ var cursor = editor.getCursorPosition();
775
+ var line = session.doc.getLine(cursor.row);
776
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
777
+ if (rightChar == ')') {
778
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
779
+ if (matching !== null) {
780
+ return {
781
+ text: '',
782
+ selection: [1, 1]
783
+ };
784
+ }
785
+ }
786
+ }
787
+ });
788
+
789
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
790
+ var selected = session.doc.getTextRange(range);
791
+ if (!range.isMultiLine() && selected == '(') {
792
+ var line = session.doc.getLine(range.start.row);
793
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
794
+ if (rightChar == ')') {
795
+ range.end.column++;
796
+ return range;
797
+ }
798
+ }
799
+ });
800
+
801
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
802
+ if (text == '[') {
803
+ var selection = editor.getSelectionRange();
804
+ var selected = session.doc.getTextRange(selection);
805
+ if (selected !== "") {
806
+ return {
807
+ text: '[' + selected + ']',
808
+ selection: false
809
+ };
810
+ } else {
811
+ return {
812
+ text: '[]',
813
+ selection: [1, 1]
814
+ };
815
+ }
816
+ } else if (text == ']') {
817
+ var cursor = editor.getCursorPosition();
818
+ var line = session.doc.getLine(cursor.row);
819
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
820
+ if (rightChar == ']') {
821
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
822
+ if (matching !== null) {
823
+ return {
824
+ text: '',
825
+ selection: [1, 1]
826
+ };
827
+ }
828
+ }
829
+ }
830
+ });
831
+
832
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
833
+ var selected = session.doc.getTextRange(range);
834
+ if (!range.isMultiLine() && selected == '[') {
835
+ var line = session.doc.getLine(range.start.row);
836
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
837
+ if (rightChar == ']') {
838
+ range.end.column++;
839
+ return range;
840
+ }
841
+ }
842
+ });
843
+
844
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
845
+ if (text == '"' || text == "'") {
846
+ var quote = text;
847
+ var selection = editor.getSelectionRange();
848
+ var selected = session.doc.getTextRange(selection);
849
+ if (selected !== "") {
850
+ return {
851
+ text: quote + selected + quote,
852
+ selection: false
853
+ };
854
+ } else {
855
+ var cursor = editor.getCursorPosition();
856
+ var line = session.doc.getLine(cursor.row);
857
+ var leftChar = line.substring(cursor.column-1, cursor.column);
858
+
859
+ // We're escaped.
860
+ if (leftChar == '\\') {
861
+ return null;
862
+ }
863
+
864
+ // Find what token we're inside.
865
+ var tokens = session.getTokens(selection.start.row);
866
+ var col = 0, token;
867
+ var quotepos = -1; // Track whether we're inside an open quote.
868
+
869
+ for (var x = 0; x < tokens.length; x++) {
870
+ token = tokens[x];
871
+ if (token.type == "string") {
872
+ quotepos = -1;
873
+ } else if (quotepos < 0) {
874
+ quotepos = token.value.indexOf(quote);
875
+ }
876
+ if ((token.value.length + col) > selection.start.column) {
877
+ break;
878
+ }
879
+ col += tokens[x].value.length;
880
+ }
881
+
882
+ // Try and be smart about when we auto insert.
883
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
884
+ return {
885
+ text: quote + quote,
886
+ selection: [1,1]
887
+ };
888
+ } else if (token && token.type === "string") {
889
+ // Ignore input and move right one if we're typing over the closing quote.
890
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
891
+ if (rightChar == quote) {
892
+ return {
893
+ text: '',
894
+ selection: [1, 1]
895
+ };
896
+ }
897
+ }
898
+ }
899
+ }
900
+ });
901
+
902
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
903
+ var selected = session.doc.getTextRange(range);
904
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
905
+ var line = session.doc.getLine(range.start.row);
906
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
907
+ if (rightChar == '"') {
908
+ range.end.column++;
909
+ return range;
910
+ }
911
+ }
912
+ });
913
+
914
+ };
915
+
916
+ oop.inherits(CstyleBehaviour, Behaviour);
917
+
918
+ exports.CstyleBehaviour = CstyleBehaviour;
919
+ });
920
+
921
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
922
+
923
+
924
+ var oop = require("../../lib/oop");
925
+ var Range = require("../../range").Range;
926
+ var BaseFoldMode = require("./fold_mode").FoldMode;
927
+
928
+ var FoldMode = exports.FoldMode = function() {};
929
+ oop.inherits(FoldMode, BaseFoldMode);
930
+
931
+ (function() {
932
+
933
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
934
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
935
+
936
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
937
+ var line = session.getLine(row);
938
+ var match = line.match(this.foldingStartMarker);
939
+ if (match) {
940
+ var i = match.index;
941
+
942
+ if (match[1])
943
+ return this.openingBracketBlock(session, match[1], row, i);
944
+
945
+ var range = session.getCommentFoldRange(row, i + match[0].length);
946
+ range.end.column -= 2;
947
+ return range;
948
+ }
949
+
950
+ if (foldStyle !== "markbeginend")
951
+ return;
952
+
953
+ var match = line.match(this.foldingStopMarker);
954
+ if (match) {
955
+ var i = match.index + match[0].length;
956
+
957
+ if (match[2]) {
958
+ var range = session.getCommentFoldRange(row, i);
959
+ range.end.column -= 2;
960
+ return range;
961
+ }
962
+
963
+ var end = {row: row, column: i};
964
+ var start = session.$findOpeningBracket(match[1], end);
965
+
966
+ if (!start)
967
+ return;
968
+
969
+ start.column++;
970
+ end.column--;
971
+
972
+ return Range.fromPoints(start, end);
973
+ }
974
+ };
975
+
976
+ }).call(FoldMode.prototype);
977
+
978
+ });
979
+
980
+ define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
981
+
982
+
983
+ var Range = require("../../range").Range;
984
+
985
+ var FoldMode = exports.FoldMode = function() {};
986
+
987
+ (function() {
988
+
989
+ this.foldingStartMarker = null;
990
+ this.foldingStopMarker = null;
991
+
992
+ // must return "" if there's no fold, to enable caching
993
+ this.getFoldWidget = function(session, foldStyle, row) {
994
+ var line = session.getLine(row);
995
+ if (this.foldingStartMarker.test(line))
996
+ return "start";
997
+ if (foldStyle == "markbeginend"
998
+ && this.foldingStopMarker
999
+ && this.foldingStopMarker.test(line))
1000
+ return "end";
1001
+ return "";
1002
+ };
1003
+
1004
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
1005
+ return null;
1006
+ };
1007
+
1008
+ this.indentationBlock = function(session, row, column) {
1009
+ var re = /\S/;
1010
+ var line = session.getLine(row);
1011
+ var startLevel = line.search(re);
1012
+ if (startLevel == -1)
1013
+ return;
1014
+
1015
+ var startColumn = column || line.length;
1016
+ var maxRow = session.getLength();
1017
+ var startRow = row;
1018
+ var endRow = row;
1019
+
1020
+ while (++row < maxRow) {
1021
+ var level = session.getLine(row).search(re);
1022
+
1023
+ if (level == -1)
1024
+ continue;
1025
+
1026
+ if (level <= startLevel)
1027
+ break;
1028
+
1029
+ endRow = row;
1030
+ }
1031
+
1032
+ if (endRow > startRow) {
1033
+ var endColumn = session.getLine(endRow).length;
1034
+ return new Range(startRow, startColumn, endRow, endColumn);
1035
+ }
1036
+ };
1037
+
1038
+ this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
1039
+ var start = {row: row, column: column + 1};
1040
+ var end = session.$findClosingBracket(bracket, start, typeRe);
1041
+ if (!end)
1042
+ return;
1043
+
1044
+ var fw = session.foldWidgets[end.row];
1045
+ if (fw == null)
1046
+ fw = this.getFoldWidget(session, end.row);
1047
+
1048
+ if (fw == "start" && end.row > start.row) {
1049
+ end.row --;
1050
+ end.column = session.getLine(end.row).length;
1051
+ }
1052
+ return Range.fromPoints(start, end);
1053
+ };
1054
+
1055
+ }).call(FoldMode.prototype);
1056
+
1057
+ });
1058
+ define('ace/mode/groovy_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1059
+
1060
+
1061
+ var oop = require("../lib/oop");
1062
+ var lang = require("../lib/lang");
1063
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
1064
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1065
+
1066
+ var GroovyHighlightRules = function() {
1067
+
1068
+ var keywords = lang.arrayToMap(
1069
+ ("assert|with|abstract|continue|for|new|switch|" +
1070
+ "assert|default|goto|package|synchronized|" +
1071
+ "boolean|do|if|private|this|" +
1072
+ "break|double|implements|protected|throw|" +
1073
+ "byte|else|import|public|throws|" +
1074
+ "case|enum|instanceof|return|transient|" +
1075
+ "catch|extends|int|short|try|" +
1076
+ "char|final|interface|static|void|" +
1077
+ "class|finally|long|strictfp|volatile|" +
1078
+ "def|float|native|super|while").split("|")
1079
+ );
1080
+
1081
+ var buildinConstants = lang.arrayToMap(
1082
+ ("null|Infinity|NaN|undefined").split("|")
1083
+ );
1084
+
1085
+ var langClasses = lang.arrayToMap(
1086
+ ("AbstractMethodError|AssertionError|ClassCircularityError|"+
1087
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
1088
+ "ExceptionInInitializerError|IllegalAccessError|"+
1089
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
1090
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
1091
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
1092
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
1093
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
1094
+ "InstantiationException|IndexOutOfBoundsException|"+
1095
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
1096
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
1097
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
1098
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
1099
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
1100
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
1101
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
1102
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
1103
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
1104
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
1105
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
1106
+ "ArrayStoreException|ClassCastException|LinkageError|"+
1107
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
1108
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
1109
+ "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
1110
+ );
1111
+
1112
+ var importClasses = lang.arrayToMap(
1113
+ ("").split("|")
1114
+ );
1115
+ // regexp must not have capturing parentheses. Use (?:) instead.
1116
+ // regexps are ordered -> the first match is used
1117
+
1118
+ this.$rules = {
1119
+ "start" : [
1120
+ {
1121
+ token : "comment",
1122
+ regex : "\\/\\/.*$"
1123
+ },
1124
+ DocCommentHighlightRules.getStartRule("doc-start"),
1125
+ {
1126
+ token : "comment", // multi line comment
1127
+ merge : true,
1128
+ regex : "\\/\\*",
1129
+ next : "comment"
1130
+ }, {
1131
+ token : "string.regexp",
1132
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
1133
+ }, {
1134
+ token : "string",
1135
+ regex : '"""',
1136
+ next : "qqstring"
1137
+ }, {
1138
+ token : "string",
1139
+ regex : "'''",
1140
+ next : "qstring"
1141
+ }, {
1142
+ token : "string", // single line
1143
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1144
+ }, {
1145
+ token : "string", // single line
1146
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1147
+ }, {
1148
+ token : "constant.numeric", // hex
1149
+ regex : "0[xX][0-9a-fA-F]+\\b"
1150
+ }, {
1151
+ token : "constant.numeric", // float
1152
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1153
+ }, {
1154
+ token : "constant.language.boolean",
1155
+ regex : "(?:true|false)\\b"
1156
+ }, {
1157
+ token : function(value) {
1158
+ if (value == "this")
1159
+ return "variable.language";
1160
+ else if (keywords.hasOwnProperty(value))
1161
+ return "keyword";
1162
+ else if (langClasses.hasOwnProperty(value))
1163
+ return "support.function";
1164
+ else if (importClasses.hasOwnProperty(value))
1165
+ return "support.function";
1166
+ else if (buildinConstants.hasOwnProperty(value))
1167
+ return "constant.language";
1168
+ else
1169
+ return "identifier";
1170
+ },
1171
+ // TODO: Unicode escape sequences
1172
+ // TODO: Unicode identifiers
1173
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
1174
+ }, {
1175
+ token : "keyword.operator",
1176
+ regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
1177
+ }, {
1178
+ token : "lparen",
1179
+ regex : "[[({]"
1180
+ }, {
1181
+ token : "rparen",
1182
+ regex : "[\\])}]"
1183
+ }, {
1184
+ token : "text",
1185
+ regex : "\\s+"
1186
+ }
1187
+ ],
1188
+ "comment" : [
1189
+ {
1190
+ token : "comment", // closing comment
1191
+ regex : ".*?\\*\\/",
1192
+ next : "start"
1193
+ }, {
1194
+ token : "comment", // comment spanning whole line
1195
+ merge : true,
1196
+ regex : ".+"
1197
+ }
1198
+ ],
1199
+ "qqstring" : [
1200
+ {
1201
+ token : "constant.language.escape",
1202
+ regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/
1203
+ }, {
1204
+ token : "constant.language.escape",
1205
+ regex : /\$[\w\d]+/
1206
+ }, {
1207
+ token : "constant.language.escape",
1208
+ regex : /\$\{[^"\}]+\}?/
1209
+ }, {
1210
+ token : "string",
1211
+ regex : '"{3,5}',
1212
+ next : "start"
1213
+ }, {
1214
+ token : "string",
1215
+ regex : '.+?'
1216
+ }
1217
+ ],
1218
+ "qstring" : [
1219
+ {
1220
+ token : "constant.language.escape",
1221
+ regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/
1222
+ }, {
1223
+ token : "string",
1224
+ regex : "'{3,5}",
1225
+ next : "start"
1226
+ }, {
1227
+ token : "string",
1228
+ regex : ".+?"
1229
+ }
1230
+ ]
1231
+ };
1232
+
1233
+ this.embedRules(DocCommentHighlightRules, "doc-",
1234
+ [ DocCommentHighlightRules.getEndRule("start") ]);
1235
+ };
1236
+
1237
+ oop.inherits(GroovyHighlightRules, TextHighlightRules);
1238
+
1239
+ exports.GroovyHighlightRules = GroovyHighlightRules;
1240
+ });