bedrock_sass 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (534) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -5
  3. data/assets/_vendor/ace/ace.js +21635 -0
  4. data/assets/_vendor/ace/ext-beautify.js +318 -0
  5. data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +277 -0
  6. data/assets/_vendor/ace/ext-emmet.js +1226 -0
  7. data/assets/_vendor/ace/ext-error_marker.js +10 -0
  8. data/assets/_vendor/ace/ext-keybinding_menu.js +189 -0
  9. data/assets/_vendor/ace/ext-language_tools.js +1997 -0
  10. data/assets/_vendor/ace/ext-linking.js +65 -0
  11. data/assets/_vendor/ace/ext-modelist.js +228 -0
  12. data/assets/_vendor/ace/ext-options.js +750 -0
  13. data/assets/_vendor/ace/ext-rtl.js +110 -0
  14. data/assets/_vendor/ace/ext-searchbox.js +512 -0
  15. data/assets/_vendor/ace/ext-settings_menu.js +771 -0
  16. data/assets/_vendor/ace/ext-spellcheck.js +75 -0
  17. data/assets/_vendor/ace/ext-split.js +208 -0
  18. data/assets/_vendor/ace/ext-static_highlight.js +226 -0
  19. data/assets/_vendor/ace/ext-statusbar.js +57 -0
  20. data/assets/_vendor/ace/ext-textarea.js +567 -0
  21. data/assets/_vendor/ace/ext-themelist.js +67 -0
  22. data/assets/_vendor/ace/ext-whitespace.js +210 -0
  23. data/assets/_vendor/ace/keybinding-emacs.js +1165 -0
  24. data/assets/_vendor/ace/keybinding-vim.js +5673 -0
  25. data/assets/_vendor/ace/mode-abap.js +222 -0
  26. data/assets/_vendor/ace/mode-abc.js +267 -0
  27. data/assets/_vendor/ace/mode-actionscript.js +274 -0
  28. data/assets/_vendor/ace/mode-ada.js +138 -0
  29. data/assets/_vendor/ace/mode-apache_conf.js +363 -0
  30. data/assets/_vendor/ace/mode-applescript.js +279 -0
  31. data/assets/_vendor/ace/mode-asciidoc.js +349 -0
  32. data/assets/_vendor/ace/mode-asl.js +422 -0
  33. data/assets/_vendor/ace/mode-assembly_x86.js +193 -0
  34. data/assets/_vendor/ace/mode-autohotkey.js +243 -0
  35. data/assets/_vendor/ace/mode-batchfile.js +230 -0
  36. data/assets/_vendor/ace/mode-bro.js +334 -0
  37. data/assets/_vendor/ace/mode-c9search.js +294 -0
  38. data/assets/_vendor/ace/mode-c_cpp.js +502 -0
  39. data/assets/_vendor/ace/mode-cirru.js +211 -0
  40. data/assets/_vendor/ace/mode-clojure.js +314 -0
  41. data/assets/_vendor/ace/mode-cobol.js +102 -0
  42. data/assets/_vendor/ace/mode-coffee.js +400 -0
  43. data/assets/_vendor/ace/mode-coldfusion.js +2596 -0
  44. data/assets/_vendor/ace/mode-csharp.js +502 -0
  45. data/assets/_vendor/ace/mode-csound_document.js +3749 -0
  46. data/assets/_vendor/ace/mode-csound_orchestra.js +2687 -0
  47. data/assets/_vendor/ace/mode-csound_score.js +454 -0
  48. data/assets/_vendor/ace/mode-csp.js +60 -0
  49. data/assets/_vendor/ace/mode-css.js +723 -0
  50. data/assets/_vendor/ace/mode-curly.js +2564 -0
  51. data/assets/_vendor/ace/mode-d.js +520 -0
  52. data/assets/_vendor/ace/mode-dart.js +703 -0
  53. data/assets/_vendor/ace/mode-diff.js +146 -0
  54. data/assets/_vendor/ace/mode-django.js +2594 -0
  55. data/assets/_vendor/ace/mode-dockerfile.js +498 -0
  56. data/assets/_vendor/ace/mode-dot.js +418 -0
  57. data/assets/_vendor/ace/mode-drools.js +496 -0
  58. data/assets/_vendor/ace/mode-edifact.js +165 -0
  59. data/assets/_vendor/ace/mode-eiffel.js +136 -0
  60. data/assets/_vendor/ace/mode-ejs.js +3026 -0
  61. data/assets/_vendor/ace/mode-elixir.js +501 -0
  62. data/assets/_vendor/ace/mode-elm.js +307 -0
  63. data/assets/_vendor/ace/mode-erlang.js +1009 -0
  64. data/assets/_vendor/ace/mode-forth.js +297 -0
  65. data/assets/_vendor/ace/mode-fortran.js +431 -0
  66. data/assets/_vendor/ace/mode-fsharp.js +314 -0
  67. data/assets/_vendor/ace/mode-ftl.js +1192 -0
  68. data/assets/_vendor/ace/mode-gcode.js +94 -0
  69. data/assets/_vendor/ace/mode-gherkin.js +172 -0
  70. data/assets/_vendor/ace/mode-gitignore.js +60 -0
  71. data/assets/_vendor/ace/mode-glsl.js +579 -0
  72. data/assets/_vendor/ace/mode-gobstones.js +929 -0
  73. data/assets/_vendor/ace/mode-golang.js +414 -0
  74. data/assets/_vendor/ace/mode-graphqlschema.js +214 -0
  75. data/assets/_vendor/ace/mode-groovy.js +986 -0
  76. data/assets/_vendor/ace/mode-haml.js +1555 -0
  77. data/assets/_vendor/ace/mode-handlebars.js +2622 -0
  78. data/assets/_vendor/ace/mode-haskell.js +379 -0
  79. data/assets/_vendor/ace/mode-haskell_cabal.js +142 -0
  80. data/assets/_vendor/ace/mode-haxe.js +386 -0
  81. data/assets/_vendor/ace/mode-hjson.js +353 -0
  82. data/assets/_vendor/ace/mode-html.js +2509 -0
  83. data/assets/_vendor/ace/mode-html_elixir.js +3087 -0
  84. data/assets/_vendor/ace/mode-html_ruby.js +3043 -0
  85. data/assets/_vendor/ace/mode-ini.js +163 -0
  86. data/assets/_vendor/ace/mode-io.js +253 -0
  87. data/assets/_vendor/ace/mode-jack.js +347 -0
  88. data/assets/_vendor/ace/mode-jade.js +2126 -0
  89. data/assets/_vendor/ace/mode-java.js +975 -0
  90. data/assets/_vendor/ace/mode-javascript.js +797 -0
  91. data/assets/_vendor/ace/mode-json.js +327 -0
  92. data/assets/_vendor/ace/mode-jsoniq.js +4940 -0
  93. data/assets/_vendor/ace/mode-jsp.js +1430 -0
  94. data/assets/_vendor/ace/mode-jssm.js +325 -0
  95. data/assets/_vendor/ace/mode-jsx.js +412 -0
  96. data/assets/_vendor/ace/mode-julia.js +303 -0
  97. data/assets/_vendor/ace/mode-kotlin.js +795 -0
  98. data/assets/_vendor/ace/mode-latex.js +297 -0
  99. data/assets/_vendor/ace/mode-less.js +841 -0
  100. data/assets/_vendor/ace/mode-liquid.js +1193 -0
  101. data/assets/_vendor/ace/mode-lisp.js +112 -0
  102. data/assets/_vendor/ace/mode-livescript.js +280 -0
  103. data/assets/_vendor/ace/mode-logiql.js +317 -0
  104. data/assets/_vendor/ace/mode-lsl.js +343 -0
  105. data/assets/_vendor/ace/mode-lua.js +432 -0
  106. data/assets/_vendor/ace/mode-luapage.js +3007 -0
  107. data/assets/_vendor/ace/mode-lucene.js +87 -0
  108. data/assets/_vendor/ace/mode-makefile.js +410 -0
  109. data/assets/_vendor/ace/mode-markdown.js +3189 -0
  110. data/assets/_vendor/ace/mode-mask.js +1802 -0
  111. data/assets/_vendor/ace/mode-matlab.js +264 -0
  112. data/assets/_vendor/ace/mode-maze.js +291 -0
  113. data/assets/_vendor/ace/mode-mel.js +263 -0
  114. data/assets/_vendor/ace/mode-mixal.js +123 -0
  115. data/assets/_vendor/ace/mode-mushcode.js +681 -0
  116. data/assets/_vendor/ace/mode-mysql.js +168 -0
  117. data/assets/_vendor/ace/mode-nix.js +646 -0
  118. data/assets/_vendor/ace/mode-nsis.js +312 -0
  119. data/assets/_vendor/ace/mode-objectivec.js +739 -0
  120. data/assets/_vendor/ace/mode-ocaml.js +422 -0
  121. data/assets/_vendor/ace/mode-pascal.js +205 -0
  122. data/assets/_vendor/ace/mode-perl.js +380 -0
  123. data/assets/_vendor/ace/mode-pgsql.js +1508 -0
  124. data/assets/_vendor/ace/mode-php.js +13088 -0
  125. data/assets/_vendor/ace/mode-php_laravel_blade.js +13289 -0
  126. data/assets/_vendor/ace/mode-pig.js +310 -0
  127. data/assets/_vendor/ace/mode-plain_text.js +33 -0
  128. data/assets/_vendor/ace/mode-powershell.js +418 -0
  129. data/assets/_vendor/ace/mode-praat.js +478 -0
  130. data/assets/_vendor/ace/mode-prolog.js +371 -0
  131. data/assets/_vendor/ace/mode-properties.js +81 -0
  132. data/assets/_vendor/ace/mode-protobuf.js +592 -0
  133. data/assets/_vendor/ace/mode-puppet.js +370 -0
  134. data/assets/_vendor/ace/mode-python.js +273 -0
  135. data/assets/_vendor/ace/mode-r.js +310 -0
  136. data/assets/_vendor/ace/mode-razor.js +2869 -0
  137. data/assets/_vendor/ace/mode-rdoc.js +243 -0
  138. data/assets/_vendor/ace/mode-red.js +450 -0
  139. data/assets/_vendor/ace/mode-redshift.js +361 -0
  140. data/assets/_vendor/ace/mode-rhtml.js +2806 -0
  141. data/assets/_vendor/ace/mode-rst.js +257 -0
  142. data/assets/_vendor/ace/mode-ruby.js +497 -0
  143. data/assets/_vendor/ace/mode-rust.js +279 -0
  144. data/assets/_vendor/ace/mode-sass.js +441 -0
  145. data/assets/_vendor/ace/mode-scad.js +414 -0
  146. data/assets/_vendor/ace/mode-scala.js +982 -0
  147. data/assets/_vendor/ace/mode-scheme.js +232 -0
  148. data/assets/_vendor/ace/mode-scss.js +606 -0
  149. data/assets/_vendor/ace/mode-sh.js +447 -0
  150. data/assets/_vendor/ace/mode-sjs.js +1014 -0
  151. data/assets/_vendor/ace/mode-slim.js +4736 -0
  152. data/assets/_vendor/ace/mode-smarty.js +2635 -0
  153. data/assets/_vendor/ace/mode-snippets.js +207 -0
  154. data/assets/_vendor/ace/mode-soy_template.js +2847 -0
  155. data/assets/_vendor/ace/mode-space.js +168 -0
  156. data/assets/_vendor/ace/mode-sparql.js +320 -0
  157. data/assets/_vendor/ace/mode-sql.js +111 -0
  158. data/assets/_vendor/ace/mode-sqlserver.js +444 -0
  159. data/assets/_vendor/ace/mode-stylus.js +471 -0
  160. data/assets/_vendor/ace/mode-svg.js +1581 -0
  161. data/assets/_vendor/ace/mode-swift.js +390 -0
  162. data/assets/_vendor/ace/mode-tcl.js +383 -0
  163. data/assets/_vendor/ace/mode-terraform.js +398 -0
  164. data/assets/_vendor/ace/mode-tex.js +159 -0
  165. data/assets/_vendor/ace/mode-text.js +10 -0
  166. data/assets/_vendor/ace/mode-textile.js +150 -0
  167. data/assets/_vendor/ace/mode-toml.js +154 -0
  168. data/assets/_vendor/ace/mode-tsx.js +887 -0
  169. data/assets/_vendor/ace/mode-turtle.js +296 -0
  170. data/assets/_vendor/ace/mode-twig.js +2693 -0
  171. data/assets/_vendor/ace/mode-typescript.js +868 -0
  172. data/assets/_vendor/ace/mode-vala.js +676 -0
  173. data/assets/_vendor/ace/mode-vbscript.js +207 -0
  174. data/assets/_vendor/ace/mode-velocity.js +2790 -0
  175. data/assets/_vendor/ace/mode-verilog.js +119 -0
  176. data/assets/_vendor/ace/mode-vhdl.js +118 -0
  177. data/assets/_vendor/ace/mode-wollok.js +911 -0
  178. data/assets/_vendor/ace/mode-xml.js +677 -0
  179. data/assets/_vendor/ace/mode-xquery.js +4922 -0
  180. data/assets/_vendor/ace/mode-yaml.js +300 -0
  181. data/assets/_vendor/ace/snippets/abap.js +15 -0
  182. data/assets/_vendor/ace/snippets/abc.js +46 -0
  183. data/assets/_vendor/ace/snippets/actionscript.js +172 -0
  184. data/assets/_vendor/ace/snippets/ada.js +15 -0
  185. data/assets/_vendor/ace/snippets/apache_conf.js +15 -0
  186. data/assets/_vendor/ace/snippets/applescript.js +15 -0
  187. data/assets/_vendor/ace/snippets/asciidoc.js +15 -0
  188. data/assets/_vendor/ace/snippets/asl.js +14 -0
  189. data/assets/_vendor/ace/snippets/assembly_x86.js +15 -0
  190. data/assets/_vendor/ace/snippets/autohotkey.js +15 -0
  191. data/assets/_vendor/ace/snippets/batchfile.js +15 -0
  192. data/assets/_vendor/ace/snippets/bro.js +15 -0
  193. data/assets/_vendor/ace/snippets/c9search.js +15 -0
  194. data/assets/_vendor/ace/snippets/c_cpp.js +146 -0
  195. data/assets/_vendor/ace/snippets/cirru.js +15 -0
  196. data/assets/_vendor/ace/snippets/clojure.js +105 -0
  197. data/assets/_vendor/ace/snippets/cobol.js +15 -0
  198. data/assets/_vendor/ace/snippets/coffee.js +110 -0
  199. data/assets/_vendor/ace/snippets/coldfusion.js +15 -0
  200. data/assets/_vendor/ace/snippets/csharp.js +15 -0
  201. data/assets/_vendor/ace/snippets/csound_document.js +25 -0
  202. data/assets/_vendor/ace/snippets/csound_orchestra.js +62 -0
  203. data/assets/_vendor/ace/snippets/csound_score.js +15 -0
  204. data/assets/_vendor/ace/snippets/csp.js +15 -0
  205. data/assets/_vendor/ace/snippets/css.js +982 -0
  206. data/assets/_vendor/ace/snippets/curly.js +15 -0
  207. data/assets/_vendor/ace/snippets/d.js +15 -0
  208. data/assets/_vendor/ace/snippets/dart.js +98 -0
  209. data/assets/_vendor/ace/snippets/diff.js +26 -0
  210. data/assets/_vendor/ace/snippets/django.js +123 -0
  211. data/assets/_vendor/ace/snippets/dockerfile.js +15 -0
  212. data/assets/_vendor/ace/snippets/dot.js +15 -0
  213. data/assets/_vendor/ace/snippets/drools.js +34 -0
  214. data/assets/_vendor/ace/snippets/edifact.js +255 -0
  215. data/assets/_vendor/ace/snippets/eiffel.js +15 -0
  216. data/assets/_vendor/ace/snippets/ejs.js +15 -0
  217. data/assets/_vendor/ace/snippets/elixir.js +15 -0
  218. data/assets/_vendor/ace/snippets/elm.js +15 -0
  219. data/assets/_vendor/ace/snippets/erlang.js +175 -0
  220. data/assets/_vendor/ace/snippets/forth.js +15 -0
  221. data/assets/_vendor/ace/snippets/fortran.js +15 -0
  222. data/assets/_vendor/ace/snippets/fsharp.js +15 -0
  223. data/assets/_vendor/ace/snippets/ftl.js +15 -0
  224. data/assets/_vendor/ace/snippets/gcode.js +15 -0
  225. data/assets/_vendor/ace/snippets/gherkin.js +15 -0
  226. data/assets/_vendor/ace/snippets/gitignore.js +15 -0
  227. data/assets/_vendor/ace/snippets/glsl.js +15 -0
  228. data/assets/_vendor/ace/snippets/gobstones.js +49 -0
  229. data/assets/_vendor/ace/snippets/golang.js +15 -0
  230. data/assets/_vendor/ace/snippets/graphqlschema.js +47 -0
  231. data/assets/_vendor/ace/snippets/groovy.js +15 -0
  232. data/assets/_vendor/ace/snippets/haml.js +35 -0
  233. data/assets/_vendor/ace/snippets/handlebars.js +15 -0
  234. data/assets/_vendor/ace/snippets/haskell.js +97 -0
  235. data/assets/_vendor/ace/snippets/haskell_cabal.js +15 -0
  236. data/assets/_vendor/ace/snippets/haxe.js +15 -0
  237. data/assets/_vendor/ace/snippets/hjson.js +15 -0
  238. data/assets/_vendor/ace/snippets/html.js +870 -0
  239. data/assets/_vendor/ace/snippets/html_elixir.js +15 -0
  240. data/assets/_vendor/ace/snippets/html_ruby.js +15 -0
  241. data/assets/_vendor/ace/snippets/ini.js +15 -0
  242. data/assets/_vendor/ace/snippets/io.js +77 -0
  243. data/assets/_vendor/ace/snippets/jack.js +15 -0
  244. data/assets/_vendor/ace/snippets/jade.js +15 -0
  245. data/assets/_vendor/ace/snippets/java.js +255 -0
  246. data/assets/_vendor/ace/snippets/javascript.js +210 -0
  247. data/assets/_vendor/ace/snippets/json.js +15 -0
  248. data/assets/_vendor/ace/snippets/jsoniq.js +76 -0
  249. data/assets/_vendor/ace/snippets/jsp.js +114 -0
  250. data/assets/_vendor/ace/snippets/jssm.js +15 -0
  251. data/assets/_vendor/ace/snippets/jsx.js +15 -0
  252. data/assets/_vendor/ace/snippets/julia.js +15 -0
  253. data/assets/_vendor/ace/snippets/kotlin.js +15 -0
  254. data/assets/_vendor/ace/snippets/latex.js +15 -0
  255. data/assets/_vendor/ace/snippets/less.js +15 -0
  256. data/assets/_vendor/ace/snippets/liquid.js +15 -0
  257. data/assets/_vendor/ace/snippets/lisp.js +15 -0
  258. data/assets/_vendor/ace/snippets/livescript.js +15 -0
  259. data/assets/_vendor/ace/snippets/logiql.js +15 -0
  260. data/assets/_vendor/ace/snippets/lsl.js +1247 -0
  261. data/assets/_vendor/ace/snippets/lua.js +36 -0
  262. data/assets/_vendor/ace/snippets/luapage.js +15 -0
  263. data/assets/_vendor/ace/snippets/lucene.js +15 -0
  264. data/assets/_vendor/ace/snippets/makefile.js +19 -0
  265. data/assets/_vendor/ace/snippets/markdown.js +103 -0
  266. data/assets/_vendor/ace/snippets/mask.js +15 -0
  267. data/assets/_vendor/ace/snippets/matlab.js +15 -0
  268. data/assets/_vendor/ace/snippets/maze.js +24 -0
  269. data/assets/_vendor/ace/snippets/mel.js +15 -0
  270. data/assets/_vendor/ace/snippets/mixal.js +15 -0
  271. data/assets/_vendor/ace/snippets/mushcode.js +15 -0
  272. data/assets/_vendor/ace/snippets/mysql.js +15 -0
  273. data/assets/_vendor/ace/snippets/nix.js +15 -0
  274. data/assets/_vendor/ace/snippets/nsis.js +15 -0
  275. data/assets/_vendor/ace/snippets/objectivec.js +15 -0
  276. data/assets/_vendor/ace/snippets/ocaml.js +15 -0
  277. data/assets/_vendor/ace/snippets/pascal.js +15 -0
  278. data/assets/_vendor/ace/snippets/perl.js +362 -0
  279. data/assets/_vendor/ace/snippets/pgsql.js +15 -0
  280. data/assets/_vendor/ace/snippets/php.js +398 -0
  281. data/assets/_vendor/ace/snippets/php_laravel_blade.js +15 -0
  282. data/assets/_vendor/ace/snippets/pig.js +15 -0
  283. data/assets/_vendor/ace/snippets/plain_text.js +15 -0
  284. data/assets/_vendor/ace/snippets/powershell.js +15 -0
  285. data/assets/_vendor/ace/snippets/praat.js +15 -0
  286. data/assets/_vendor/ace/snippets/prolog.js +15 -0
  287. data/assets/_vendor/ace/snippets/properties.js +15 -0
  288. data/assets/_vendor/ace/snippets/protobuf.js +15 -0
  289. data/assets/_vendor/ace/snippets/puppet.js +15 -0
  290. data/assets/_vendor/ace/snippets/python.js +173 -0
  291. data/assets/_vendor/ace/snippets/r.js +136 -0
  292. data/assets/_vendor/ace/snippets/razor.js +18 -0
  293. data/assets/_vendor/ace/snippets/rdoc.js +15 -0
  294. data/assets/_vendor/ace/snippets/red.js +15 -0
  295. data/assets/_vendor/ace/snippets/redshift.js +15 -0
  296. data/assets/_vendor/ace/snippets/rhtml.js +15 -0
  297. data/assets/_vendor/ace/snippets/rst.js +37 -0
  298. data/assets/_vendor/ace/snippets/ruby.js +943 -0
  299. data/assets/_vendor/ace/snippets/rust.js +15 -0
  300. data/assets/_vendor/ace/snippets/sass.js +15 -0
  301. data/assets/_vendor/ace/snippets/scad.js +15 -0
  302. data/assets/_vendor/ace/snippets/scala.js +15 -0
  303. data/assets/_vendor/ace/snippets/scheme.js +15 -0
  304. data/assets/_vendor/ace/snippets/scss.js +15 -0
  305. data/assets/_vendor/ace/snippets/sh.js +98 -0
  306. data/assets/_vendor/ace/snippets/sjs.js +15 -0
  307. data/assets/_vendor/ace/snippets/slim.js +15 -0
  308. data/assets/_vendor/ace/snippets/smarty.js +15 -0
  309. data/assets/_vendor/ace/snippets/snippets.js +24 -0
  310. data/assets/_vendor/ace/snippets/soy_template.js +15 -0
  311. data/assets/_vendor/ace/snippets/space.js +15 -0
  312. data/assets/_vendor/ace/snippets/sparql.js +15 -0
  313. data/assets/_vendor/ace/snippets/sql.js +41 -0
  314. data/assets/_vendor/ace/snippets/sqlserver.js +84 -0
  315. data/assets/_vendor/ace/snippets/stylus.js +15 -0
  316. data/assets/_vendor/ace/snippets/svg.js +15 -0
  317. data/assets/_vendor/ace/snippets/swift.js +15 -0
  318. data/assets/_vendor/ace/snippets/tcl.js +107 -0
  319. data/assets/_vendor/ace/snippets/terraform.js +15 -0
  320. data/assets/_vendor/ace/snippets/tex.js +205 -0
  321. data/assets/_vendor/ace/snippets/text.js +15 -0
  322. data/assets/_vendor/ace/snippets/textile.js +45 -0
  323. data/assets/_vendor/ace/snippets/toml.js +15 -0
  324. data/assets/_vendor/ace/snippets/tsx.js +15 -0
  325. data/assets/_vendor/ace/snippets/turtle.js +15 -0
  326. data/assets/_vendor/ace/snippets/twig.js +15 -0
  327. data/assets/_vendor/ace/snippets/typescript.js +15 -0
  328. data/assets/_vendor/ace/snippets/vala.js +201 -0
  329. data/assets/_vendor/ace/snippets/vbscript.js +15 -0
  330. data/assets/_vendor/ace/snippets/velocity.js +44 -0
  331. data/assets/_vendor/ace/snippets/verilog.js +15 -0
  332. data/assets/_vendor/ace/snippets/vhdl.js +15 -0
  333. data/assets/_vendor/ace/snippets/wollok.js +99 -0
  334. data/assets/_vendor/ace/snippets/xml.js +15 -0
  335. data/assets/_vendor/ace/snippets/xquery.js +76 -0
  336. data/assets/_vendor/ace/snippets/yaml.js +15 -0
  337. data/assets/_vendor/ace/theme-ambiance.js +185 -0
  338. data/assets/_vendor/ace/theme-chaos.js +164 -0
  339. data/assets/_vendor/ace/theme-chrome.js +136 -0
  340. data/assets/_vendor/ace/theme-clouds.js +103 -0
  341. data/assets/_vendor/ace/theme-clouds_midnight.js +104 -0
  342. data/assets/_vendor/ace/theme-cobalt.js +121 -0
  343. data/assets/_vendor/ace/theme-crimson_editor.js +126 -0
  344. data/assets/_vendor/ace/theme-dawn.js +116 -0
  345. data/assets/_vendor/ace/theme-dracula.js +136 -0
  346. data/assets/_vendor/ace/theme-dreamweaver.js +149 -0
  347. data/assets/_vendor/ace/theme-eclipse.js +106 -0
  348. data/assets/_vendor/ace/theme-github.js +110 -0
  349. data/assets/_vendor/ace/theme-gob.js +120 -0
  350. data/assets/_vendor/ace/theme-gruvbox.js +90 -0
  351. data/assets/_vendor/ace/theme-idle_fingers.js +104 -0
  352. data/assets/_vendor/ace/theme-iplastic.js +129 -0
  353. data/assets/_vendor/ace/theme-katzenmilch.js +129 -0
  354. data/assets/_vendor/ace/theme-kr_theme.js +112 -0
  355. data/assets/_vendor/ace/theme-kuroir.js +69 -0
  356. data/assets/_vendor/ace/theme-merbivore.js +103 -0
  357. data/assets/_vendor/ace/theme-merbivore_soft.js +104 -0
  358. data/assets/_vendor/ace/theme-mono_industrial.js +115 -0
  359. data/assets/_vendor/ace/theme-monokai.js +113 -0
  360. data/assets/_vendor/ace/theme-pastel_on_dark.js +116 -0
  361. data/assets/_vendor/ace/theme-solarized_dark.js +96 -0
  362. data/assets/_vendor/ace/theme-solarized_light.js +99 -0
  363. data/assets/_vendor/ace/theme-sqlserver.js +146 -0
  364. data/assets/_vendor/ace/theme-terminal.js +122 -0
  365. data/assets/_vendor/ace/theme-textmate.js +138 -0
  366. data/assets/_vendor/ace/theme-tomorrow.js +116 -0
  367. data/assets/_vendor/ace/theme-tomorrow_night.js +116 -0
  368. data/assets/_vendor/ace/theme-tomorrow_night_blue.js +114 -0
  369. data/assets/_vendor/ace/theme-tomorrow_night_bright.js +129 -0
  370. data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +116 -0
  371. data/assets/_vendor/ace/theme-twilight.js +117 -0
  372. data/assets/_vendor/ace/theme-vibrant_ink.js +102 -0
  373. data/assets/_vendor/ace/theme-xcode.js +96 -0
  374. data/assets/_vendor/ace/worker-coffee.js +2165 -0
  375. data/assets/_vendor/ace/worker-css.js +8764 -0
  376. data/assets/_vendor/ace/worker-html.js +11614 -0
  377. data/assets/_vendor/ace/worker-javascript.js +12491 -0
  378. data/assets/_vendor/ace/worker-json.js +2396 -0
  379. data/assets/_vendor/ace/worker-lua.js +3637 -0
  380. data/assets/_vendor/ace/worker-php.js +4313 -0
  381. data/assets/_vendor/ace/worker-xml.js +3899 -0
  382. data/assets/_vendor/ace/worker-xquery.js +70688 -0
  383. data/assets/_vendor/motion-ui/_settings.scss +1 -0
  384. data/assets/_vendor/motion-ui/effects/_fade.scss +1 -4
  385. data/assets/_vendor/motion-ui/effects/_hinge.scss +4 -3
  386. data/assets/_vendor/motion-ui/effects/_shake.scss +1 -1
  387. data/assets/_vendor/motion-ui/effects/_slide.scss +4 -3
  388. data/assets/_vendor/motion-ui/effects/_spin.scss +4 -3
  389. data/assets/_vendor/motion-ui/effects/_wiggle.scss +1 -1
  390. data/assets/_vendor/motion-ui/effects/_zoom.scss +2 -2
  391. data/assets/_vendor/motion-ui/motion-ui.scss +2 -0
  392. data/assets/_vendor/motion-ui/transitions/_fade.scss +6 -4
  393. data/assets/_vendor/motion-ui/transitions/_hinge.scss +3 -2
  394. data/assets/_vendor/motion-ui/transitions/_slide.scss +3 -2
  395. data/assets/_vendor/motion-ui/transitions/_spin.scss +2 -1
  396. data/assets/_vendor/motion-ui/transitions/_zoom.scss +6 -4
  397. data/assets/_vendor/motion-ui/util/_animation.scss +1 -1
  398. data/assets/_vendor/motion-ui/util/_args.scss +2 -2
  399. data/assets/_vendor/motion-ui/util/_function.scss +94 -0
  400. data/assets/_vendor/motion-ui/util/_keyframe.scss +5 -5
  401. data/assets/_vendor/motion-ui/util/_series.scss +20 -17
  402. data/assets/_vendor/motion-ui/util/_string.scss +36 -0
  403. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +136 -404
  404. data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -1
  405. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +103 -323
  406. data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -1
  407. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +153 -377
  408. data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -1
  409. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -427
  410. data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -1
  411. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +197 -579
  412. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
  413. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +88 -251
  414. data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -1
  415. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1243 -818
  416. data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -1
  417. data/assets/_vendor/tinymce/plugins/code/plugin.js +82 -326
  418. data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -1
  419. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +829 -1444
  420. data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -1
  421. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +111 -257
  422. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -1
  423. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +141 -469
  424. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -1
  425. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +57 -261
  426. data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -1
  427. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +78 -247
  428. data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -1
  429. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +463 -906
  430. data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -1
  431. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +149 -427
  432. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  433. data/assets/_vendor/tinymce/plugins/help/plugin.js +634 -1434
  434. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
  435. data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -185
  436. data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -1
  437. data/assets/_vendor/tinymce/plugins/image/plugin.js +1147 -1508
  438. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
  439. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3319 -4079
  440. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -2
  441. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -543
  442. data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -1
  443. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +151 -460
  444. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  445. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +204 -379
  446. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -1
  447. data/assets/_vendor/tinymce/plugins/link/plugin.js +644 -1162
  448. data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -1
  449. data/assets/_vendor/tinymce/plugins/lists/plugin.js +1005 -1875
  450. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
  451. data/assets/_vendor/tinymce/plugins/media/plugin.js +1066 -1926
  452. data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -1
  453. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +70 -298
  454. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
  455. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +96 -294
  456. data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -1
  457. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +92 -337
  458. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -1
  459. data/assets/_vendor/tinymce/plugins/paste/plugin.js +1363 -2801
  460. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
  461. data/assets/_vendor/tinymce/plugins/preview/plugin.js +106 -393
  462. data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -1
  463. data/assets/_vendor/tinymce/plugins/print/plugin.js +29 -185
  464. data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -1
  465. data/assets/_vendor/tinymce/plugins/save/plugin.js +100 -350
  466. data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -1
  467. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +491 -865
  468. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  469. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +630 -1292
  470. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
  471. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +96 -391
  472. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -1
  473. data/assets/_vendor/tinymce/plugins/table/plugin.js +9537 -14920
  474. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -5
  475. data/assets/_vendor/tinymce/plugins/template/plugin.js +309 -771
  476. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
  477. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +319 -592
  478. data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -1
  479. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +326 -674
  480. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
  481. data/assets/_vendor/tinymce/plugins/toc/plugin.js +199 -530
  482. data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -1
  483. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +112 -436
  484. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -1
  485. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +428 -1248
  486. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  487. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +307 -699
  488. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
  489. data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -1
  490. data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -1
  491. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  492. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -1
  493. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  494. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  495. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
  496. data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +1 -1
  497. data/assets/_vendor/tinymce/themes/inlite/theme.js +9693 -18245
  498. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -5
  499. data/assets/_vendor/tinymce/themes/mobile/theme.js +12629 -22467
  500. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -8
  501. data/assets/_vendor/tinymce/themes/modern/theme.js +9510 -17780
  502. data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -5
  503. data/assets/_vendor/tinymce/tinymce.js +25087 -42606
  504. data/assets/_vendor/yoastseo/css/_icons.scss +7 -7
  505. data/assets/_vendor/yoastseo/css/_snippet-editor.scss +1 -1
  506. data/assets/bedrock/js/bedrock.js +1 -71697
  507. data/assets/bedrock/scss/_bedrock-components.scss +20 -0
  508. data/assets/bedrock/scss/_bedrock-settings.scss +12 -4
  509. data/assets/bedrock/scss/_foundation-settings.scss +4 -2
  510. data/assets/bedrock/scss/components/ace-editor.scss +21 -0
  511. data/assets/bedrock/scss/components/attachments-grid.scss +18 -15
  512. data/assets/bedrock/scss/components/date-picker.scss +146 -0
  513. data/assets/bedrock/scss/components/dropzone-upload.scss +7 -0
  514. data/assets/bedrock/scss/components/file-input.scss +7 -0
  515. data/assets/bedrock/scss/components/file-preview.scss +36 -0
  516. data/assets/bedrock/scss/components/frame-embed.scss +23 -0
  517. data/assets/bedrock/scss/components/global.scss +27 -0
  518. data/assets/bedrock/scss/components/helper-classes.scss +1 -0
  519. data/assets/bedrock/scss/components/icon-box.scss +38 -0
  520. data/assets/bedrock/scss/components/item-list.scss +66 -0
  521. data/assets/bedrock/scss/components/lists.scss +58 -0
  522. data/assets/bedrock/scss/components/off-canvas-menu.scss +27 -15
  523. data/assets/bedrock/scss/components/place-autocomplete.scss +90 -0
  524. data/assets/bedrock/scss/components/rrule-generator.scss +102 -0
  525. data/assets/bedrock/scss/components/rrule-reveal.scss +14 -0
  526. data/assets/bedrock/scss/components/select-box.scss +1 -0
  527. data/assets/bedrock/scss/components/seo-analysis.scss +5 -0
  528. data/assets/bedrock/scss/components/textarea.scss +14 -2
  529. data/assets/bedrock/scss/components/tiny-mce-editor.scss +5 -16
  530. data/lib/bedrock_sass.rb +5 -0
  531. data/lib/bedrock_sass/version.rb +1 -1
  532. data/lib/tasks/before_assets_precompile.rake +1 -0
  533. metadata +395 -4
  534. data/CODE_OF_CONDUCT.md +0 -74
@@ -0,0 +1,361 @@
1
+ define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
+
7
+ var DocCommentHighlightRules = function() {
8
+ this.$rules = {
9
+ "start" : [ {
10
+ token : "comment.doc.tag",
11
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
12
+ },
13
+ DocCommentHighlightRules.getTagRule(),
14
+ {
15
+ defaultToken : "comment.doc",
16
+ caseInsensitive: true
17
+ }]
18
+ };
19
+ };
20
+
21
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
22
+
23
+ DocCommentHighlightRules.getTagRule = function(start) {
24
+ return {
25
+ token : "comment.doc.tag.storage.type",
26
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
27
+ };
28
+ };
29
+
30
+ DocCommentHighlightRules.getStartRule = function(start) {
31
+ return {
32
+ token : "comment.doc", // doc comment
33
+ regex : "\\/\\*(?=\\*)",
34
+ next : start
35
+ };
36
+ };
37
+
38
+ DocCommentHighlightRules.getEndRule = function (start) {
39
+ return {
40
+ token : "comment.doc", // closing comment
41
+ regex : "\\*\\/",
42
+ next : start
43
+ };
44
+ };
45
+
46
+
47
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
48
+
49
+ });
50
+
51
+ define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
52
+ "use strict";
53
+
54
+ var oop = require("../lib/oop");
55
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
56
+
57
+ var JsonHighlightRules = function() {
58
+ this.$rules = {
59
+ "start" : [
60
+ {
61
+ token : "variable", // single line
62
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
63
+ }, {
64
+ token : "string", // single line
65
+ regex : '"',
66
+ next : "string"
67
+ }, {
68
+ token : "constant.numeric", // hex
69
+ regex : "0[xX][0-9a-fA-F]+\\b"
70
+ }, {
71
+ token : "constant.numeric", // float
72
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
73
+ }, {
74
+ token : "constant.language.boolean",
75
+ regex : "(?:true|false)\\b"
76
+ }, {
77
+ token : "text", // single quoted strings are not allowed
78
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
79
+ }, {
80
+ token : "comment", // comments are not allowed, but who cares?
81
+ regex : "\\/\\/.*$"
82
+ }, {
83
+ token : "comment.start", // comments are not allowed, but who cares?
84
+ regex : "\\/\\*",
85
+ next : "comment"
86
+ }, {
87
+ token : "paren.lparen",
88
+ regex : "[[({]"
89
+ }, {
90
+ token : "paren.rparen",
91
+ regex : "[\\])}]"
92
+ }, {
93
+ token : "text",
94
+ regex : "\\s+"
95
+ }
96
+ ],
97
+ "string" : [
98
+ {
99
+ token : "constant.language.escape",
100
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
101
+ }, {
102
+ token : "string",
103
+ regex : '"|$',
104
+ next : "start"
105
+ }, {
106
+ defaultToken : "string"
107
+ }
108
+ ],
109
+ "comment" : [
110
+ {
111
+ token : "comment.end", // comments are not allowed, but who cares?
112
+ regex : "\\*\\/",
113
+ next : "start"
114
+ }, {
115
+ defaultToken: "comment"
116
+ }
117
+ ]
118
+ };
119
+
120
+ };
121
+
122
+ oop.inherits(JsonHighlightRules, TextHighlightRules);
123
+
124
+ exports.JsonHighlightRules = JsonHighlightRules;
125
+ });
126
+
127
+ define("ace/mode/redshift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/json_highlight_rules"], function(require, exports, module) {
128
+
129
+ var oop = require("../lib/oop");
130
+ var lang = require("../lib/lang");
131
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
132
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
133
+ var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules;
134
+
135
+ var RedshiftHighlightRules = function() {
136
+ var keywords = (
137
+ "aes128|aes256|all|allowoverwrite|analyse|analyze|and|any|array|as|asc|authorization|backup|" +
138
+ "between|binary|blanksasnull|both|bytedict|bzip2|case|cast|check|collate|column|constraint|create|credentials|" +
139
+ "cross|current_date|current_time|current_timestamp|current_user|current_user_id|default|deferrable|deflate|defrag|delta|" +
140
+ "delta32k|desc|disable|distinct|do|else|emptyasnull|enable|encode|encrypt|encryption|end|except|explicit|false|for|foreign|" +
141
+ "freeze|from|full|globaldict256|globaldict64k|grant|group|gzip|having|identity|ignore|ilike|in|initially|inner|intersect|into|is|" +
142
+ "isnull|join|leading|left|like|limit|localtime|localtimestamp|lun|luns|lzo|lzop|minus|mostly13|mostly32|mostly8|natural|new|not|notnull|" +
143
+ "null|nulls|off|offline|offset|old|on|only|open|or|order|outer|overlaps|parallel|partition|percent|permissions|placing|primary|raw|readratio|" +
144
+ "recover|references|rejectlog|resort|restore|right|select|session_user|similar|some|sysdate|system|table|tag|tdes|text255|text32k|then|timestamp|" +
145
+ "to|top|trailing|true|truncatecolumns|union|unique|user|using|verbose|wallet|when|where|with|without"
146
+ );
147
+
148
+
149
+ var builtinFunctions = (
150
+ "current_schema|current_schemas|has_database_privilege|has_schema_privilege|has_table_privilege|age|current_time|current_timestamp|localtime|" +
151
+ "isfinite|now|ascii|get_bit|get_byte|octet_length|set_bit|set_byte|to_ascii|avg|count|listagg|max|min|stddev_samp|stddev_pop|sum|var_samp|var_pop|" +
152
+ "bit_and|bit_or|bool_and|bool_or|avg|count|cume_dist|dense_rank|first_value|last_value|lag|lead|listagg|max|median|min|nth_value|ntile|percent_rank|" +
153
+ "percentile_cont|percentile_disc|rank|ratio_to_report|row_number|case|coalesce|decode|greatest|least|nvl|nvl2|nullif|add_months|age|convert_timezone|" +
154
+ "current_date|timeofday|current_time|current_timestamp|date_cmp|date_cmp_timestamp|date_part_year|dateadd|datediff|date_part|date_trunc|extract|getdate|" +
155
+ "interval_cmp|isfinite|last_day|localtime|localtimestamp|months_between|next_day|now|sysdate|timestamp_cmp|timestamp_cmp_date|trunc|abs|acos|asin|atan|" +
156
+ "atan2|cbrt|ceiling|ceil|checksum|cos|cot|degrees|dexp|dlog1|dlog10|exp|floor|ln|log|mod|pi|power|radians|random|round|sin|sign|sqrt|tan|trunc|ascii|" +
157
+ "bpcharcmp|btrim|bttext_pattern_cmp|char_length|character_length|charindex|chr|concat|crc32|func_sha1|get_bit|get_byte|initcap|left|right|len|length|" +
158
+ "lower|lpad|rpad|ltrim|md5|octet_length|position|quote_ident|quote_literal|regexp_count|regexp_instr|regexp_replace|regexp_substr|repeat|replace|replicate|" +
159
+ "reverse|rtrim|set_bit|set_byte|split_part|strpos|strtol|substring|textlen|to_ascii|to_hex|translate|trim|upper|json_array_length|json_extract_array_element_text|" +
160
+ "json_extract_path_text|cast|convert|to_char|to_date|to_number|current_database|current_schema|current_schemas|current_user|current_user_id|has_database_privilege|" +
161
+ "has_schema_privilege|has_table_privilege|pg_backend_pid|pg_last_copy_count|pg_last_copy_id|pg_last_query_id|pg_last_unload_count|session_user|slice_num|user|version"
162
+ );
163
+
164
+ var keywordMapper = this.createKeywordMapper({
165
+ "support.function": builtinFunctions,
166
+ "keyword": keywords
167
+ }, "identifier", true);
168
+
169
+
170
+ var sqlRules = [{
171
+ token : "string", // single line string -- assume dollar strings if multi-line for now
172
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
173
+ }, {
174
+ token : "variable.language", // pg identifier
175
+ regex : '".*?"'
176
+ }, {
177
+ token : "constant.numeric", // float
178
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
179
+ }, {
180
+ token : keywordMapper,
181
+ regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
182
+ }, {
183
+ token : "keyword.operator",
184
+ regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
185
+ "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
186
+ "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
187
+ "~=|~>=~|~>~|~~|~~\\*"
188
+ }, {
189
+ token : "paren.lparen",
190
+ regex : "[\\(]"
191
+ }, {
192
+ token : "paren.rparen",
193
+ regex : "[\\)]"
194
+ }, {
195
+ token : "text",
196
+ regex : "\\s+"
197
+ }
198
+ ];
199
+
200
+
201
+ this.$rules = {
202
+ "start" : [{
203
+ token : "comment",
204
+ regex : "--.*$"
205
+ },
206
+ DocCommentHighlightRules.getStartRule("doc-start"),
207
+ {
208
+ token : "comment", // multi-line comment
209
+ regex : "\\/\\*",
210
+ next : "comment"
211
+ },{
212
+ token : "keyword.statementBegin",
213
+ regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
214
+ next : "statement"
215
+ },{
216
+ token : "support.buildin", // psql directive
217
+ regex : "^\\\\[\\S]+.*$"
218
+ }
219
+ ],
220
+
221
+ "statement" : [{
222
+ token : "comment",
223
+ regex : "--.*$"
224
+ }, {
225
+ token : "comment", // multi-line comment
226
+ regex : "\\/\\*",
227
+ next : "commentStatement"
228
+ }, {
229
+ token : "statementEnd",
230
+ regex : ";",
231
+ next : "start"
232
+ }, {
233
+ token : "string",
234
+ regex : "\\$json\\$",
235
+ next : "json-start"
236
+ }, {
237
+ token : "string",
238
+ regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
239
+ next : "dollarSql"
240
+ }, {
241
+ token : "string",
242
+ regex : "\\$[\\w_0-9]*\\$",
243
+ next : "dollarStatementString"
244
+ }
245
+ ].concat(sqlRules),
246
+
247
+ "dollarSql" : [{
248
+ token : "comment",
249
+ regex : "--.*$"
250
+ }, {
251
+ token : "comment", // multi-line comment
252
+ regex : "\\/\\*",
253
+ next : "commentDollarSql"
254
+ }, {
255
+ token : "string", // end quoting with dollar at the start of a line
256
+ regex : "^\\$[\\w_0-9]*\\$",
257
+ next : "statement"
258
+ }, {
259
+ token : "string",
260
+ regex : "\\$[\\w_0-9]*\\$",
261
+ next : "dollarSqlString"
262
+ }
263
+ ].concat(sqlRules),
264
+
265
+ "comment" : [{
266
+ token : "comment", // closing comment
267
+ regex : ".*?\\*\\/",
268
+ next : "start"
269
+ }, {
270
+ token : "comment", // comment spanning whole line
271
+ regex : ".+"
272
+ }
273
+ ],
274
+
275
+ "commentStatement" : [{
276
+ token : "comment", // closing comment
277
+ regex : ".*?\\*\\/",
278
+ next : "statement"
279
+ }, {
280
+ token : "comment", // comment spanning whole line
281
+ regex : ".+"
282
+ }
283
+ ],
284
+
285
+ "commentDollarSql" : [{
286
+ token : "comment", // closing comment
287
+ regex : ".*?\\*\\/",
288
+ next : "dollarSql"
289
+ }, {
290
+ token : "comment", // comment spanning whole line
291
+ regex : ".+"
292
+ }
293
+ ],
294
+
295
+ "dollarStatementString" : [{
296
+ token : "string", // closing dollarstring
297
+ regex : ".*?\\$[\\w_0-9]*\\$",
298
+ next : "statement"
299
+ }, {
300
+ token : "string", // dollarstring spanning whole line
301
+ regex : ".+"
302
+ }
303
+ ],
304
+
305
+ "dollarSqlString" : [{
306
+ token : "string", // closing dollarstring
307
+ regex : ".*?\\$[\\w_0-9]*\\$",
308
+ next : "dollarSql"
309
+ }, {
310
+ token : "string", // dollarstring spanning whole line
311
+ regex : ".+"
312
+ }
313
+ ]
314
+ };
315
+
316
+ this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
317
+ this.embedRules(JsonHighlightRules, "json-", [{token : "string", regex : "\\$json\\$", next : "statement"}]);
318
+ };
319
+
320
+ oop.inherits(RedshiftHighlightRules, TextHighlightRules);
321
+
322
+ exports.RedshiftHighlightRules = RedshiftHighlightRules;
323
+ });
324
+
325
+ define("ace/mode/redshift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/redshift_highlight_rules","ace/range"], function(require, exports, module) {
326
+
327
+ var oop = require("../lib/oop");
328
+ var TextMode = require("../mode/text").Mode;
329
+ var RedshiftHighlightRules = require("./redshift_highlight_rules").RedshiftHighlightRules;
330
+ var Range = require("../range").Range;
331
+
332
+ var Mode = function() {
333
+ this.HighlightRules = RedshiftHighlightRules;
334
+ };
335
+ oop.inherits(Mode, TextMode);
336
+
337
+ (function() {
338
+ this.lineCommentStart = "--";
339
+ this.blockComment = {start: "/*", end: "*/"};
340
+
341
+ this.getNextLineIndent = function(state, line, tab) {
342
+ if (state == "start" || state == "keyword.statementEnd") {
343
+ return "";
344
+ } else {
345
+ return this.$getIndent(line); // Keep whatever indent the previous line has
346
+ }
347
+ };
348
+
349
+ this.$id = "ace/mode/redshift";
350
+ }).call(Mode.prototype);
351
+
352
+ exports.Mode = Mode;
353
+ });
354
+ (function() {
355
+ window.require(["ace/mode/redshift"], function(m) {
356
+ if (typeof module == "object" && typeof exports == "object" && module) {
357
+ module.exports = m;
358
+ }
359
+ });
360
+ })();
361
+
@@ -0,0 +1,2806 @@
1
+ define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
+
7
+ var DocCommentHighlightRules = function() {
8
+ this.$rules = {
9
+ "start" : [ {
10
+ token : "comment.doc.tag",
11
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
12
+ },
13
+ DocCommentHighlightRules.getTagRule(),
14
+ {
15
+ defaultToken : "comment.doc",
16
+ caseInsensitive: true
17
+ }]
18
+ };
19
+ };
20
+
21
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
22
+
23
+ DocCommentHighlightRules.getTagRule = function(start) {
24
+ return {
25
+ token : "comment.doc.tag.storage.type",
26
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
27
+ };
28
+ };
29
+
30
+ DocCommentHighlightRules.getStartRule = function(start) {
31
+ return {
32
+ token : "comment.doc", // doc comment
33
+ regex : "\\/\\*(?=\\*)",
34
+ next : start
35
+ };
36
+ };
37
+
38
+ DocCommentHighlightRules.getEndRule = function (start) {
39
+ return {
40
+ token : "comment.doc", // closing comment
41
+ regex : "\\*\\/",
42
+ next : start
43
+ };
44
+ };
45
+
46
+
47
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
48
+
49
+ });
50
+
51
+ define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
52
+ "use strict";
53
+
54
+ var oop = require("../lib/oop");
55
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
56
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
57
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
58
+
59
+ var JavaScriptHighlightRules = function(options) {
60
+ var keywordMapper = this.createKeywordMapper({
61
+ "variable.language":
62
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
63
+ "Namespace|QName|XML|XMLList|" + // E4X
64
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
65
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
66
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
67
+ "SyntaxError|TypeError|URIError|" +
68
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
69
+ "isNaN|parseFloat|parseInt|" +
70
+ "JSON|Math|" + // Other
71
+ "this|arguments|prototype|window|document" , // Pseudo
72
+ "keyword":
73
+ "const|yield|import|get|set|async|await|" +
74
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
75
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
76
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
77
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
78
+ "storage.type":
79
+ "const|let|var|function",
80
+ "constant.language":
81
+ "null|Infinity|NaN|undefined",
82
+ "support.function":
83
+ "alert",
84
+ "constant.language.boolean": "true|false"
85
+ }, "identifier");
86
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
87
+
88
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
89
+ "u[0-9a-fA-F]{4}|" + // unicode
90
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
91
+ "[0-2][0-7]{0,2}|" + // oct
92
+ "3[0-7][0-7]?|" + // oct
93
+ "[4-7][0-7]?|" + //oct
94
+ ".)";
95
+ this.$rules = {
96
+ "no_regex" : [
97
+ DocCommentHighlightRules.getStartRule("doc-start"),
98
+ comments("no_regex"),
99
+ {
100
+ token : "string",
101
+ regex : "'(?=.)",
102
+ next : "qstring"
103
+ }, {
104
+ token : "string",
105
+ regex : '"(?=.)',
106
+ next : "qqstring"
107
+ }, {
108
+ token : "constant.numeric", // hexadecimal, octal and binary
109
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
110
+ }, {
111
+ token : "constant.numeric", // decimal integers and floats
112
+ regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
113
+ }, {
114
+ token : [
115
+ "storage.type", "punctuation.operator", "support.function",
116
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
117
+ ],
118
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
119
+ next: "function_arguments"
120
+ }, {
121
+ token : [
122
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
123
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
124
+ ],
125
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
126
+ next: "function_arguments"
127
+ }, {
128
+ token : [
129
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
130
+ "text", "paren.lparen"
131
+ ],
132
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
133
+ next: "function_arguments"
134
+ }, {
135
+ token : [
136
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
137
+ "keyword.operator", "text",
138
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
139
+ ],
140
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
141
+ next: "function_arguments"
142
+ }, {
143
+ token : [
144
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
145
+ ],
146
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
147
+ next: "function_arguments"
148
+ }, {
149
+ token : [
150
+ "entity.name.function", "text", "punctuation.operator",
151
+ "text", "storage.type", "text", "paren.lparen"
152
+ ],
153
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
154
+ next: "function_arguments"
155
+ }, {
156
+ token : [
157
+ "text", "text", "storage.type", "text", "paren.lparen"
158
+ ],
159
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
160
+ next: "function_arguments"
161
+ }, {
162
+ token : "keyword",
163
+ regex : "from(?=\\s*('|\"))"
164
+ }, {
165
+ token : "keyword",
166
+ regex : "(?:" + kwBeforeRe + ")\\b",
167
+ next : "start"
168
+ }, {
169
+ token : ["support.constant"],
170
+ regex : /that\b/
171
+ }, {
172
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
173
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
174
+ }, {
175
+ token : keywordMapper,
176
+ regex : identifierRe
177
+ }, {
178
+ token : "punctuation.operator",
179
+ regex : /[.](?![.])/,
180
+ next : "property"
181
+ }, {
182
+ token : "storage.type",
183
+ regex : /=>/,
184
+ next : "start"
185
+ }, {
186
+ token : "keyword.operator",
187
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
188
+ next : "start"
189
+ }, {
190
+ token : "punctuation.operator",
191
+ regex : /[?:,;.]/,
192
+ next : "start"
193
+ }, {
194
+ token : "paren.lparen",
195
+ regex : /[\[({]/,
196
+ next : "start"
197
+ }, {
198
+ token : "paren.rparen",
199
+ regex : /[\])}]/
200
+ }, {
201
+ token: "comment",
202
+ regex: /^#!.*$/
203
+ }
204
+ ],
205
+ property: [{
206
+ token : "text",
207
+ regex : "\\s+"
208
+ }, {
209
+ token : [
210
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
211
+ "keyword.operator", "text",
212
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
213
+ ],
214
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
215
+ next: "function_arguments"
216
+ }, {
217
+ token : "punctuation.operator",
218
+ regex : /[.](?![.])/
219
+ }, {
220
+ token : "support.function",
221
+ 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|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(?=\()/
222
+ }, {
223
+ token : "support.function.dom",
224
+ regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
225
+ }, {
226
+ token : "support.constant",
227
+ 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/
228
+ }, {
229
+ token : "identifier",
230
+ regex : identifierRe
231
+ }, {
232
+ regex: "",
233
+ token: "empty",
234
+ next: "no_regex"
235
+ }
236
+ ],
237
+ "start": [
238
+ DocCommentHighlightRules.getStartRule("doc-start"),
239
+ comments("start"),
240
+ {
241
+ token: "string.regexp",
242
+ regex: "\\/",
243
+ next: "regex"
244
+ }, {
245
+ token : "text",
246
+ regex : "\\s+|^$",
247
+ next : "start"
248
+ }, {
249
+ token: "empty",
250
+ regex: "",
251
+ next: "no_regex"
252
+ }
253
+ ],
254
+ "regex": [
255
+ {
256
+ token: "regexp.keyword.operator",
257
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
258
+ }, {
259
+ token: "string.regexp",
260
+ regex: "/[sxngimy]*",
261
+ next: "no_regex"
262
+ }, {
263
+ token : "invalid",
264
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
265
+ }, {
266
+ token : "constant.language.escape",
267
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
268
+ }, {
269
+ token : "constant.language.delimiter",
270
+ regex: /\|/
271
+ }, {
272
+ token: "constant.language.escape",
273
+ regex: /\[\^?/,
274
+ next: "regex_character_class"
275
+ }, {
276
+ token: "empty",
277
+ regex: "$",
278
+ next: "no_regex"
279
+ }, {
280
+ defaultToken: "string.regexp"
281
+ }
282
+ ],
283
+ "regex_character_class": [
284
+ {
285
+ token: "regexp.charclass.keyword.operator",
286
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
287
+ }, {
288
+ token: "constant.language.escape",
289
+ regex: "]",
290
+ next: "regex"
291
+ }, {
292
+ token: "constant.language.escape",
293
+ regex: "-"
294
+ }, {
295
+ token: "empty",
296
+ regex: "$",
297
+ next: "no_regex"
298
+ }, {
299
+ defaultToken: "string.regexp.charachterclass"
300
+ }
301
+ ],
302
+ "function_arguments": [
303
+ {
304
+ token: "variable.parameter",
305
+ regex: identifierRe
306
+ }, {
307
+ token: "punctuation.operator",
308
+ regex: "[, ]+"
309
+ }, {
310
+ token: "punctuation.operator",
311
+ regex: "$"
312
+ }, {
313
+ token: "empty",
314
+ regex: "",
315
+ next: "no_regex"
316
+ }
317
+ ],
318
+ "qqstring" : [
319
+ {
320
+ token : "constant.language.escape",
321
+ regex : escapedRe
322
+ }, {
323
+ token : "string",
324
+ regex : "\\\\$",
325
+ consumeLineEnd : true
326
+ }, {
327
+ token : "string",
328
+ regex : '"|$',
329
+ next : "no_regex"
330
+ }, {
331
+ defaultToken: "string"
332
+ }
333
+ ],
334
+ "qstring" : [
335
+ {
336
+ token : "constant.language.escape",
337
+ regex : escapedRe
338
+ }, {
339
+ token : "string",
340
+ regex : "\\\\$",
341
+ consumeLineEnd : true
342
+ }, {
343
+ token : "string",
344
+ regex : "'|$",
345
+ next : "no_regex"
346
+ }, {
347
+ defaultToken: "string"
348
+ }
349
+ ]
350
+ };
351
+
352
+
353
+ if (!options || !options.noES6) {
354
+ this.$rules.no_regex.unshift({
355
+ regex: "[{}]", onMatch: function(val, state, stack) {
356
+ this.next = val == "{" ? this.nextState : "";
357
+ if (val == "{" && stack.length) {
358
+ stack.unshift("start", state);
359
+ }
360
+ else if (val == "}" && stack.length) {
361
+ stack.shift();
362
+ this.next = stack.shift();
363
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
364
+ return "paren.quasi.end";
365
+ }
366
+ return val == "{" ? "paren.lparen" : "paren.rparen";
367
+ },
368
+ nextState: "start"
369
+ }, {
370
+ token : "string.quasi.start",
371
+ regex : /`/,
372
+ push : [{
373
+ token : "constant.language.escape",
374
+ regex : escapedRe
375
+ }, {
376
+ token : "paren.quasi.start",
377
+ regex : /\${/,
378
+ push : "start"
379
+ }, {
380
+ token : "string.quasi.end",
381
+ regex : /`/,
382
+ next : "pop"
383
+ }, {
384
+ defaultToken: "string.quasi"
385
+ }]
386
+ });
387
+
388
+ if (!options || options.jsx != false)
389
+ JSX.call(this);
390
+ }
391
+
392
+ this.embedRules(DocCommentHighlightRules, "doc-",
393
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
394
+
395
+ this.normalizeRules();
396
+ };
397
+
398
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
399
+
400
+ function JSX() {
401
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
402
+ var jsxTag = {
403
+ onMatch : function(val, state, stack) {
404
+ var offset = val.charAt(1) == "/" ? 2 : 1;
405
+ if (offset == 1) {
406
+ if (state != this.nextState)
407
+ stack.unshift(this.next, this.nextState, 0);
408
+ else
409
+ stack.unshift(this.next);
410
+ stack[2]++;
411
+ } else if (offset == 2) {
412
+ if (state == this.nextState) {
413
+ stack[1]--;
414
+ if (!stack[1] || stack[1] < 0) {
415
+ stack.shift();
416
+ stack.shift();
417
+ }
418
+ }
419
+ }
420
+ return [{
421
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
422
+ value: val.slice(0, offset)
423
+ }, {
424
+ type: "meta.tag.tag-name.xml",
425
+ value: val.substr(offset)
426
+ }];
427
+ },
428
+ regex : "</?" + tagRegex + "",
429
+ next: "jsxAttributes",
430
+ nextState: "jsx"
431
+ };
432
+ this.$rules.start.unshift(jsxTag);
433
+ var jsxJsRule = {
434
+ regex: "{",
435
+ token: "paren.quasi.start",
436
+ push: "start"
437
+ };
438
+ this.$rules.jsx = [
439
+ jsxJsRule,
440
+ jsxTag,
441
+ {include : "reference"},
442
+ {defaultToken: "string"}
443
+ ];
444
+ this.$rules.jsxAttributes = [{
445
+ token : "meta.tag.punctuation.tag-close.xml",
446
+ regex : "/?>",
447
+ onMatch : function(value, currentState, stack) {
448
+ if (currentState == stack[0])
449
+ stack.shift();
450
+ if (value.length == 2) {
451
+ if (stack[0] == this.nextState)
452
+ stack[1]--;
453
+ if (!stack[1] || stack[1] < 0) {
454
+ stack.splice(0, 2);
455
+ }
456
+ }
457
+ this.next = stack[0] || "start";
458
+ return [{type: this.token, value: value}];
459
+ },
460
+ nextState: "jsx"
461
+ },
462
+ jsxJsRule,
463
+ comments("jsxAttributes"),
464
+ {
465
+ token : "entity.other.attribute-name.xml",
466
+ regex : tagRegex
467
+ }, {
468
+ token : "keyword.operator.attribute-equals.xml",
469
+ regex : "="
470
+ }, {
471
+ token : "text.tag-whitespace.xml",
472
+ regex : "\\s+"
473
+ }, {
474
+ token : "string.attribute-value.xml",
475
+ regex : "'",
476
+ stateName : "jsx_attr_q",
477
+ push : [
478
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
479
+ {include : "reference"},
480
+ {defaultToken : "string.attribute-value.xml"}
481
+ ]
482
+ }, {
483
+ token : "string.attribute-value.xml",
484
+ regex : '"',
485
+ stateName : "jsx_attr_qq",
486
+ push : [
487
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
488
+ {include : "reference"},
489
+ {defaultToken : "string.attribute-value.xml"}
490
+ ]
491
+ },
492
+ jsxTag
493
+ ];
494
+ this.$rules.reference = [{
495
+ token : "constant.language.escape.reference.xml",
496
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
497
+ }];
498
+ }
499
+
500
+ function comments(next) {
501
+ return [
502
+ {
503
+ token : "comment", // multi line comment
504
+ regex : /\/\*/,
505
+ next: [
506
+ DocCommentHighlightRules.getTagRule(),
507
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
508
+ {defaultToken : "comment", caseInsensitive: true}
509
+ ]
510
+ }, {
511
+ token : "comment",
512
+ regex : "\\/\\/",
513
+ next: [
514
+ DocCommentHighlightRules.getTagRule(),
515
+ {token : "comment", regex : "$|^", next : next || "pop"},
516
+ {defaultToken : "comment", caseInsensitive: true}
517
+ ]
518
+ }
519
+ ];
520
+ }
521
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
522
+ });
523
+
524
+ define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
525
+ "use strict";
526
+
527
+ var Range = require("../range").Range;
528
+
529
+ var MatchingBraceOutdent = function() {};
530
+
531
+ (function() {
532
+
533
+ this.checkOutdent = function(line, input) {
534
+ if (! /^\s+$/.test(line))
535
+ return false;
536
+
537
+ return /^\s*\}/.test(input);
538
+ };
539
+
540
+ this.autoOutdent = function(doc, row) {
541
+ var line = doc.getLine(row);
542
+ var match = line.match(/^(\s*\})/);
543
+
544
+ if (!match) return 0;
545
+
546
+ var column = match[1].length;
547
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
548
+
549
+ if (!openBracePos || openBracePos.row == row) return 0;
550
+
551
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
552
+ doc.replace(new Range(row, 0, row, column-1), indent);
553
+ };
554
+
555
+ this.$getIndent = function(line) {
556
+ return line.match(/^\s*/)[0];
557
+ };
558
+
559
+ }).call(MatchingBraceOutdent.prototype);
560
+
561
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
562
+ });
563
+
564
+ define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
565
+ "use strict";
566
+
567
+ var oop = require("../../lib/oop");
568
+ var Range = require("../../range").Range;
569
+ var BaseFoldMode = require("./fold_mode").FoldMode;
570
+
571
+ var FoldMode = exports.FoldMode = function(commentRegex) {
572
+ if (commentRegex) {
573
+ this.foldingStartMarker = new RegExp(
574
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
575
+ );
576
+ this.foldingStopMarker = new RegExp(
577
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
578
+ );
579
+ }
580
+ };
581
+ oop.inherits(FoldMode, BaseFoldMode);
582
+
583
+ (function() {
584
+
585
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
586
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
587
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
588
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
589
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
590
+ this._getFoldWidgetBase = this.getFoldWidget;
591
+ this.getFoldWidget = function(session, foldStyle, row) {
592
+ var line = session.getLine(row);
593
+
594
+ if (this.singleLineBlockCommentRe.test(line)) {
595
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
596
+ return "";
597
+ }
598
+
599
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
600
+
601
+ if (!fw && this.startRegionRe.test(line))
602
+ return "start"; // lineCommentRegionStart
603
+
604
+ return fw;
605
+ };
606
+
607
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
608
+ var line = session.getLine(row);
609
+
610
+ if (this.startRegionRe.test(line))
611
+ return this.getCommentRegionBlock(session, line, row);
612
+
613
+ var match = line.match(this.foldingStartMarker);
614
+ if (match) {
615
+ var i = match.index;
616
+
617
+ if (match[1])
618
+ return this.openingBracketBlock(session, match[1], row, i);
619
+
620
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
621
+
622
+ if (range && !range.isMultiLine()) {
623
+ if (forceMultiline) {
624
+ range = this.getSectionRange(session, row);
625
+ } else if (foldStyle != "all")
626
+ range = null;
627
+ }
628
+
629
+ return range;
630
+ }
631
+
632
+ if (foldStyle === "markbegin")
633
+ return;
634
+
635
+ var match = line.match(this.foldingStopMarker);
636
+ if (match) {
637
+ var i = match.index + match[0].length;
638
+
639
+ if (match[1])
640
+ return this.closingBracketBlock(session, match[1], row, i);
641
+
642
+ return session.getCommentFoldRange(row, i, -1);
643
+ }
644
+ };
645
+
646
+ this.getSectionRange = function(session, row) {
647
+ var line = session.getLine(row);
648
+ var startIndent = line.search(/\S/);
649
+ var startRow = row;
650
+ var startColumn = line.length;
651
+ row = row + 1;
652
+ var endRow = row;
653
+ var maxRow = session.getLength();
654
+ while (++row < maxRow) {
655
+ line = session.getLine(row);
656
+ var indent = line.search(/\S/);
657
+ if (indent === -1)
658
+ continue;
659
+ if (startIndent > indent)
660
+ break;
661
+ var subRange = this.getFoldWidgetRange(session, "all", row);
662
+
663
+ if (subRange) {
664
+ if (subRange.start.row <= startRow) {
665
+ break;
666
+ } else if (subRange.isMultiLine()) {
667
+ row = subRange.end.row;
668
+ } else if (startIndent == indent) {
669
+ break;
670
+ }
671
+ }
672
+ endRow = row;
673
+ }
674
+
675
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
676
+ };
677
+ this.getCommentRegionBlock = function(session, line, row) {
678
+ var startColumn = line.search(/\s*$/);
679
+ var maxRow = session.getLength();
680
+ var startRow = row;
681
+
682
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
683
+ var depth = 1;
684
+ while (++row < maxRow) {
685
+ line = session.getLine(row);
686
+ var m = re.exec(line);
687
+ if (!m) continue;
688
+ if (m[1]) depth--;
689
+ else depth++;
690
+
691
+ if (!depth) break;
692
+ }
693
+
694
+ var endRow = row;
695
+ if (endRow > startRow) {
696
+ return new Range(startRow, startColumn, endRow, line.length);
697
+ }
698
+ };
699
+
700
+ }).call(FoldMode.prototype);
701
+
702
+ });
703
+
704
+ 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) {
705
+ "use strict";
706
+
707
+ var oop = require("../lib/oop");
708
+ var TextMode = require("./text").Mode;
709
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
710
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
711
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
712
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
713
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
714
+
715
+ var Mode = function() {
716
+ this.HighlightRules = JavaScriptHighlightRules;
717
+
718
+ this.$outdent = new MatchingBraceOutdent();
719
+ this.$behaviour = new CstyleBehaviour();
720
+ this.foldingRules = new CStyleFoldMode();
721
+ };
722
+ oop.inherits(Mode, TextMode);
723
+
724
+ (function() {
725
+
726
+ this.lineCommentStart = "//";
727
+ this.blockComment = {start: "/*", end: "*/"};
728
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
729
+
730
+ this.getNextLineIndent = function(state, line, tab) {
731
+ var indent = this.$getIndent(line);
732
+
733
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
734
+ var tokens = tokenizedLine.tokens;
735
+ var endState = tokenizedLine.state;
736
+
737
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
738
+ return indent;
739
+ }
740
+
741
+ if (state == "start" || state == "no_regex") {
742
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
743
+ if (match) {
744
+ indent += tab;
745
+ }
746
+ } else if (state == "doc-start") {
747
+ if (endState == "start" || endState == "no_regex") {
748
+ return "";
749
+ }
750
+ var match = line.match(/^\s*(\/?)\*/);
751
+ if (match) {
752
+ if (match[1]) {
753
+ indent += " ";
754
+ }
755
+ indent += "* ";
756
+ }
757
+ }
758
+
759
+ return indent;
760
+ };
761
+
762
+ this.checkOutdent = function(state, line, input) {
763
+ return this.$outdent.checkOutdent(line, input);
764
+ };
765
+
766
+ this.autoOutdent = function(state, doc, row) {
767
+ this.$outdent.autoOutdent(doc, row);
768
+ };
769
+
770
+ this.createWorker = function(session) {
771
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
772
+ worker.attachToDocument(session.getDocument());
773
+
774
+ worker.on("annotate", function(results) {
775
+ session.setAnnotations(results.data);
776
+ });
777
+
778
+ worker.on("terminate", function() {
779
+ session.clearAnnotations();
780
+ });
781
+
782
+ return worker;
783
+ };
784
+
785
+ this.$id = "ace/mode/javascript";
786
+ }).call(Mode.prototype);
787
+
788
+ exports.Mode = Mode;
789
+ });
790
+
791
+ define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
792
+ "use strict";
793
+
794
+ var oop = require("../lib/oop");
795
+ var lang = require("../lib/lang");
796
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
797
+ var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
798
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
799
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
800
+ var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
801
+ var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
802
+
803
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
804
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
805
+ var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
806
+
807
+ var CssHighlightRules = function() {
808
+
809
+ var keywordMapper = this.createKeywordMapper({
810
+ "support.function": supportFunction,
811
+ "support.constant": supportConstant,
812
+ "support.type": supportType,
813
+ "support.constant.color": supportConstantColor,
814
+ "support.constant.fonts": supportConstantFonts
815
+ }, "text", true);
816
+ this.$rules = {
817
+ "start" : [{
818
+ include : ["strings", "url", "comments"]
819
+ }, {
820
+ token: "paren.lparen",
821
+ regex: "\\{",
822
+ next: "ruleset"
823
+ }, {
824
+ token: "paren.rparen",
825
+ regex: "\\}"
826
+ }, {
827
+ token: "string",
828
+ regex: "@(?!viewport)",
829
+ next: "media"
830
+ }, {
831
+ token: "keyword",
832
+ regex: "#[a-z0-9-_]+"
833
+ }, {
834
+ token: "keyword",
835
+ regex: "%"
836
+ }, {
837
+ token: "variable",
838
+ regex: "\\.[a-z0-9-_]+"
839
+ }, {
840
+ token: "string",
841
+ regex: ":[a-z0-9-_]+"
842
+ }, {
843
+ token : "constant.numeric",
844
+ regex : numRe
845
+ }, {
846
+ token: "constant",
847
+ regex: "[a-z0-9-_]+"
848
+ }, {
849
+ caseInsensitive: true
850
+ }],
851
+
852
+ "media": [{
853
+ include : ["strings", "url", "comments"]
854
+ }, {
855
+ token: "paren.lparen",
856
+ regex: "\\{",
857
+ next: "start"
858
+ }, {
859
+ token: "paren.rparen",
860
+ regex: "\\}",
861
+ next: "start"
862
+ }, {
863
+ token: "string",
864
+ regex: ";",
865
+ next: "start"
866
+ }, {
867
+ token: "keyword",
868
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
869
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
870
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
871
+ }],
872
+
873
+ "comments" : [{
874
+ token: "comment", // multi line comment
875
+ regex: "\\/\\*",
876
+ push: [{
877
+ token : "comment",
878
+ regex : "\\*\\/",
879
+ next : "pop"
880
+ }, {
881
+ defaultToken : "comment"
882
+ }]
883
+ }],
884
+
885
+ "ruleset" : [{
886
+ regex : "-(webkit|ms|moz|o)-",
887
+ token : "text"
888
+ }, {
889
+ token : "punctuation.operator",
890
+ regex : "[:;]"
891
+ }, {
892
+ token : "paren.rparen",
893
+ regex : "\\}",
894
+ next : "start"
895
+ }, {
896
+ include : ["strings", "url", "comments"]
897
+ }, {
898
+ token : ["constant.numeric", "keyword"],
899
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
900
+ }, {
901
+ token : "constant.numeric",
902
+ regex : numRe
903
+ }, {
904
+ token : "constant.numeric", // hex6 color
905
+ regex : "#[a-f0-9]{6}"
906
+ }, {
907
+ token : "constant.numeric", // hex3 color
908
+ regex : "#[a-f0-9]{3}"
909
+ }, {
910
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
911
+ regex : pseudoElements
912
+ }, {
913
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
914
+ regex : pseudoClasses
915
+ }, {
916
+ include: "url"
917
+ }, {
918
+ token : keywordMapper,
919
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
920
+ }, {
921
+ caseInsensitive: true
922
+ }],
923
+
924
+ url: [{
925
+ token : "support.function",
926
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
927
+ push: [{
928
+ token : "support.function",
929
+ regex : "\\)",
930
+ next : "pop"
931
+ }, {
932
+ defaultToken: "string"
933
+ }]
934
+ }],
935
+
936
+ strings: [{
937
+ token : "string.start",
938
+ regex : "'",
939
+ push : [{
940
+ token : "string.end",
941
+ regex : "'|$",
942
+ next: "pop"
943
+ }, {
944
+ include : "escapes"
945
+ }, {
946
+ token : "constant.language.escape",
947
+ regex : /\\$/,
948
+ consumeLineEnd: true
949
+ }, {
950
+ defaultToken: "string"
951
+ }]
952
+ }, {
953
+ token : "string.start",
954
+ regex : '"',
955
+ push : [{
956
+ token : "string.end",
957
+ regex : '"|$',
958
+ next: "pop"
959
+ }, {
960
+ include : "escapes"
961
+ }, {
962
+ token : "constant.language.escape",
963
+ regex : /\\$/,
964
+ consumeLineEnd: true
965
+ }, {
966
+ defaultToken: "string"
967
+ }]
968
+ }],
969
+ escapes: [{
970
+ token : "constant.language.escape",
971
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
972
+ }]
973
+
974
+ };
975
+
976
+ this.normalizeRules();
977
+ };
978
+
979
+ oop.inherits(CssHighlightRules, TextHighlightRules);
980
+
981
+ exports.CssHighlightRules = CssHighlightRules;
982
+
983
+ });
984
+
985
+ define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
986
+ "use strict";
987
+
988
+ var propertyMap = {
989
+ "background": {"#$0": 1},
990
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
991
+ "background-image": {"url('/$0')": 1},
992
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
993
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
994
+ "background-attachment": {"scroll": 1, "fixed": 1},
995
+ "background-size": {"cover": 1, "contain": 1},
996
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
997
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
998
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
999
+ "border-color": {"#$0": 1},
1000
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
1001
+ "border-collapse": {"collapse": 1, "separate": 1},
1002
+ "bottom": {"px": 1, "em": 1, "%": 1},
1003
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
1004
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
1005
+ "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},
1006
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
1007
+ "empty-cells": {"show": 1, "hide": 1},
1008
+ "float": {"left": 1, "right": 1, "none": 1},
1009
+ "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},
1010
+ "font-size": {"px": 1, "em": 1, "%": 1},
1011
+ "font-weight": {"bold": 1, "normal": 1},
1012
+ "font-style": {"italic": 1, "normal": 1},
1013
+ "font-variant": {"normal": 1, "small-caps": 1},
1014
+ "height": {"px": 1, "em": 1, "%": 1},
1015
+ "left": {"px": 1, "em": 1, "%": 1},
1016
+ "letter-spacing": {"normal": 1},
1017
+ "line-height": {"normal": 1},
1018
+ "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},
1019
+ "margin": {"px": 1, "em": 1, "%": 1},
1020
+ "margin-right": {"px": 1, "em": 1, "%": 1},
1021
+ "margin-left": {"px": 1, "em": 1, "%": 1},
1022
+ "margin-top": {"px": 1, "em": 1, "%": 1},
1023
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
1024
+ "max-height": {"px": 1, "em": 1, "%": 1},
1025
+ "max-width": {"px": 1, "em": 1, "%": 1},
1026
+ "min-height": {"px": 1, "em": 1, "%": 1},
1027
+ "min-width": {"px": 1, "em": 1, "%": 1},
1028
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1029
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1030
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1031
+ "padding": {"px": 1, "em": 1, "%": 1},
1032
+ "padding-top": {"px": 1, "em": 1, "%": 1},
1033
+ "padding-right": {"px": 1, "em": 1, "%": 1},
1034
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
1035
+ "padding-left": {"px": 1, "em": 1, "%": 1},
1036
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1037
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1038
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
1039
+ "right": {"px": 1, "em": 1, "%": 1},
1040
+ "table-layout": {"fixed": 1, "auto": 1},
1041
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
1042
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
1043
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
1044
+ "top": {"px": 1, "em": 1, "%": 1},
1045
+ "vertical-align": {"top": 1, "bottom": 1},
1046
+ "visibility": {"hidden": 1, "visible": 1},
1047
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
1048
+ "width": {"px": 1, "em": 1, "%": 1},
1049
+ "word-spacing": {"normal": 1},
1050
+ "filter": {"alpha(opacity=$0100)": 1},
1051
+
1052
+ "text-shadow": {"$02px 2px 2px #777": 1},
1053
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
1054
+ "-moz-border-radius": 1,
1055
+ "-moz-border-radius-topright": 1,
1056
+ "-moz-border-radius-bottomright": 1,
1057
+ "-moz-border-radius-topleft": 1,
1058
+ "-moz-border-radius-bottomleft": 1,
1059
+ "-webkit-border-radius": 1,
1060
+ "-webkit-border-top-right-radius": 1,
1061
+ "-webkit-border-top-left-radius": 1,
1062
+ "-webkit-border-bottom-right-radius": 1,
1063
+ "-webkit-border-bottom-left-radius": 1,
1064
+ "-moz-box-shadow": 1,
1065
+ "-webkit-box-shadow": 1,
1066
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1067
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1068
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
1069
+ };
1070
+
1071
+ var CssCompletions = function() {
1072
+
1073
+ };
1074
+
1075
+ (function() {
1076
+
1077
+ this.completionsDefined = false;
1078
+
1079
+ this.defineCompletions = function() {
1080
+ if (document) {
1081
+ var style = document.createElement('c').style;
1082
+
1083
+ for (var i in style) {
1084
+ if (typeof style[i] !== 'string')
1085
+ continue;
1086
+
1087
+ var name = i.replace(/[A-Z]/g, function(x) {
1088
+ return '-' + x.toLowerCase();
1089
+ });
1090
+
1091
+ if (!propertyMap.hasOwnProperty(name))
1092
+ propertyMap[name] = 1;
1093
+ }
1094
+ }
1095
+
1096
+ this.completionsDefined = true;
1097
+ };
1098
+
1099
+ this.getCompletions = function(state, session, pos, prefix) {
1100
+ if (!this.completionsDefined) {
1101
+ this.defineCompletions();
1102
+ }
1103
+
1104
+ var token = session.getTokenAt(pos.row, pos.column);
1105
+
1106
+ if (!token)
1107
+ return [];
1108
+ if (state==='ruleset'){
1109
+ var line = session.getLine(pos.row).substr(0, pos.column);
1110
+ if (/:[^;]+$/.test(line)) {
1111
+ /([\w\-]+):[^:]*$/.test(line);
1112
+
1113
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
1114
+ } else {
1115
+ return this.getPropertyCompletions(state, session, pos, prefix);
1116
+ }
1117
+ }
1118
+
1119
+ return [];
1120
+ };
1121
+
1122
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
1123
+ var properties = Object.keys(propertyMap);
1124
+ return properties.map(function(property){
1125
+ return {
1126
+ caption: property,
1127
+ snippet: property + ': $0;',
1128
+ meta: "property",
1129
+ score: 1000000
1130
+ };
1131
+ });
1132
+ };
1133
+
1134
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
1135
+ var line = session.getLine(pos.row).substr(0, pos.column);
1136
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1137
+
1138
+ if (!property)
1139
+ return [];
1140
+ var values = [];
1141
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
1142
+ values = Object.keys(propertyMap[property]);
1143
+ }
1144
+ return values.map(function(value){
1145
+ return {
1146
+ caption: value,
1147
+ snippet: value,
1148
+ meta: "property value",
1149
+ score: 1000000
1150
+ };
1151
+ });
1152
+ };
1153
+
1154
+ }).call(CssCompletions.prototype);
1155
+
1156
+ exports.CssCompletions = CssCompletions;
1157
+ });
1158
+
1159
+ define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
1160
+ "use strict";
1161
+
1162
+ var oop = require("../../lib/oop");
1163
+ var Behaviour = require("../behaviour").Behaviour;
1164
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1165
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1166
+
1167
+ var CssBehaviour = function () {
1168
+
1169
+ this.inherit(CstyleBehaviour);
1170
+
1171
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
1172
+ if (text === ':' && editor.selection.isEmpty()) {
1173
+ var cursor = editor.getCursorPosition();
1174
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1175
+ var token = iterator.getCurrentToken();
1176
+ if (token && token.value.match(/\s+/)) {
1177
+ token = iterator.stepBackward();
1178
+ }
1179
+ if (token && token.type === 'support.type') {
1180
+ var line = session.doc.getLine(cursor.row);
1181
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1182
+ if (rightChar === ':') {
1183
+ return {
1184
+ text: '',
1185
+ selection: [1, 1]
1186
+ };
1187
+ }
1188
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1189
+ return {
1190
+ text: ':;',
1191
+ selection: [1, 1]
1192
+ };
1193
+ }
1194
+ }
1195
+ }
1196
+ });
1197
+
1198
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
1199
+ var selected = session.doc.getTextRange(range);
1200
+ if (!range.isMultiLine() && selected === ':') {
1201
+ var cursor = editor.getCursorPosition();
1202
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1203
+ var token = iterator.getCurrentToken();
1204
+ if (token && token.value.match(/\s+/)) {
1205
+ token = iterator.stepBackward();
1206
+ }
1207
+ if (token && token.type === 'support.type') {
1208
+ var line = session.doc.getLine(range.start.row);
1209
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
1210
+ if (rightChar === ';') {
1211
+ range.end.column ++;
1212
+ return range;
1213
+ }
1214
+ }
1215
+ }
1216
+ });
1217
+
1218
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1219
+ if (text === ';' && editor.selection.isEmpty()) {
1220
+ var cursor = editor.getCursorPosition();
1221
+ var line = session.doc.getLine(cursor.row);
1222
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1223
+ if (rightChar === ';') {
1224
+ return {
1225
+ text: '',
1226
+ selection: [1, 1]
1227
+ };
1228
+ }
1229
+ }
1230
+ });
1231
+
1232
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
1233
+ if (text === '!' && editor.selection.isEmpty()) {
1234
+ var cursor = editor.getCursorPosition();
1235
+ var line = session.doc.getLine(cursor.row);
1236
+
1237
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1238
+ return {
1239
+ text: '!important',
1240
+ selection: [10, 10]
1241
+ };
1242
+ }
1243
+ }
1244
+ });
1245
+
1246
+ };
1247
+ oop.inherits(CssBehaviour, CstyleBehaviour);
1248
+
1249
+ exports.CssBehaviour = CssBehaviour;
1250
+ });
1251
+
1252
+ 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) {
1253
+ "use strict";
1254
+
1255
+ var oop = require("../lib/oop");
1256
+ var TextMode = require("./text").Mode;
1257
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1258
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1259
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1260
+ var CssCompletions = require("./css_completions").CssCompletions;
1261
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
1262
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1263
+
1264
+ var Mode = function() {
1265
+ this.HighlightRules = CssHighlightRules;
1266
+ this.$outdent = new MatchingBraceOutdent();
1267
+ this.$behaviour = new CssBehaviour();
1268
+ this.$completer = new CssCompletions();
1269
+ this.foldingRules = new CStyleFoldMode();
1270
+ };
1271
+ oop.inherits(Mode, TextMode);
1272
+
1273
+ (function() {
1274
+
1275
+ this.foldingRules = "cStyle";
1276
+ this.blockComment = {start: "/*", end: "*/"};
1277
+
1278
+ this.getNextLineIndent = function(state, line, tab) {
1279
+ var indent = this.$getIndent(line);
1280
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1281
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
1282
+ return indent;
1283
+ }
1284
+
1285
+ var match = line.match(/^.*\{\s*$/);
1286
+ if (match) {
1287
+ indent += tab;
1288
+ }
1289
+
1290
+ return indent;
1291
+ };
1292
+
1293
+ this.checkOutdent = function(state, line, input) {
1294
+ return this.$outdent.checkOutdent(line, input);
1295
+ };
1296
+
1297
+ this.autoOutdent = function(state, doc, row) {
1298
+ this.$outdent.autoOutdent(doc, row);
1299
+ };
1300
+
1301
+ this.getCompletions = function(state, session, pos, prefix) {
1302
+ return this.$completer.getCompletions(state, session, pos, prefix);
1303
+ };
1304
+
1305
+ this.createWorker = function(session) {
1306
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1307
+ worker.attachToDocument(session.getDocument());
1308
+
1309
+ worker.on("annotate", function(e) {
1310
+ session.setAnnotations(e.data);
1311
+ });
1312
+
1313
+ worker.on("terminate", function() {
1314
+ session.clearAnnotations();
1315
+ });
1316
+
1317
+ return worker;
1318
+ };
1319
+
1320
+ this.$id = "ace/mode/css";
1321
+ }).call(Mode.prototype);
1322
+
1323
+ exports.Mode = Mode;
1324
+
1325
+ });
1326
+
1327
+ define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
1328
+ "use strict";
1329
+
1330
+ var oop = require("../lib/oop");
1331
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1332
+
1333
+ var XmlHighlightRules = function(normalize) {
1334
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
1335
+
1336
+ this.$rules = {
1337
+ start : [
1338
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
1339
+ {
1340
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
1341
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
1342
+ },
1343
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
1344
+ {
1345
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
1346
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
1347
+ },
1348
+ {include : "tag"},
1349
+ {token : "text.end-tag-open.xml", regex: "</"},
1350
+ {token : "text.tag-open.xml", regex: "<"},
1351
+ {include : "reference"},
1352
+ {defaultToken : "text.xml"}
1353
+ ],
1354
+
1355
+ processing_instruction : [{
1356
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
1357
+ regex : tagRegex
1358
+ }, {
1359
+ token : "keyword.operator.decl-attribute-equals.xml",
1360
+ regex : "="
1361
+ }, {
1362
+ include: "whitespace"
1363
+ }, {
1364
+ include: "string"
1365
+ }, {
1366
+ token : "punctuation.xml-decl.xml",
1367
+ regex : "\\?>",
1368
+ next : "start"
1369
+ }],
1370
+
1371
+ doctype : [
1372
+ {include : "whitespace"},
1373
+ {include : "string"},
1374
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
1375
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
1376
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
1377
+ ],
1378
+
1379
+ int_subset : [{
1380
+ token : "text.xml",
1381
+ regex : "\\s+"
1382
+ }, {
1383
+ token: "punctuation.int-subset.xml",
1384
+ regex: "]",
1385
+ next: "pop"
1386
+ }, {
1387
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
1388
+ regex : "(<\\!)(" + tagRegex + ")",
1389
+ push : [{
1390
+ token : "text",
1391
+ regex : "\\s+"
1392
+ },
1393
+ {
1394
+ token : "punctuation.markup-decl.xml",
1395
+ regex : ">",
1396
+ next : "pop"
1397
+ },
1398
+ {include : "string"}]
1399
+ }],
1400
+
1401
+ cdata : [
1402
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
1403
+ {token : "text.xml", regex : "\\s+"},
1404
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
1405
+ ],
1406
+
1407
+ comment : [
1408
+ {token : "comment.end.xml", regex : "-->", next : "start"},
1409
+ {defaultToken : "comment.xml"}
1410
+ ],
1411
+
1412
+ reference : [{
1413
+ token : "constant.language.escape.reference.xml",
1414
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1415
+ }],
1416
+
1417
+ attr_reference : [{
1418
+ token : "constant.language.escape.reference.attribute-value.xml",
1419
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1420
+ }],
1421
+
1422
+ tag : [{
1423
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
1424
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
1425
+ next: [
1426
+ {include : "attributes"},
1427
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
1428
+ ]
1429
+ }],
1430
+
1431
+ tag_whitespace : [
1432
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
1433
+ ],
1434
+ whitespace : [
1435
+ {token : "text.whitespace.xml", regex : "\\s+"}
1436
+ ],
1437
+ string: [{
1438
+ token : "string.xml",
1439
+ regex : "'",
1440
+ push : [
1441
+ {token : "string.xml", regex: "'", next: "pop"},
1442
+ {defaultToken : "string.xml"}
1443
+ ]
1444
+ }, {
1445
+ token : "string.xml",
1446
+ regex : '"',
1447
+ push : [
1448
+ {token : "string.xml", regex: '"', next: "pop"},
1449
+ {defaultToken : "string.xml"}
1450
+ ]
1451
+ }],
1452
+
1453
+ attributes: [{
1454
+ token : "entity.other.attribute-name.xml",
1455
+ regex : tagRegex
1456
+ }, {
1457
+ token : "keyword.operator.attribute-equals.xml",
1458
+ regex : "="
1459
+ }, {
1460
+ include: "tag_whitespace"
1461
+ }, {
1462
+ include: "attribute_value"
1463
+ }],
1464
+
1465
+ attribute_value: [{
1466
+ token : "string.attribute-value.xml",
1467
+ regex : "'",
1468
+ push : [
1469
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
1470
+ {include : "attr_reference"},
1471
+ {defaultToken : "string.attribute-value.xml"}
1472
+ ]
1473
+ }, {
1474
+ token : "string.attribute-value.xml",
1475
+ regex : '"',
1476
+ push : [
1477
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
1478
+ {include : "attr_reference"},
1479
+ {defaultToken : "string.attribute-value.xml"}
1480
+ ]
1481
+ }]
1482
+ };
1483
+
1484
+ if (this.constructor === XmlHighlightRules)
1485
+ this.normalizeRules();
1486
+ };
1487
+
1488
+
1489
+ (function() {
1490
+
1491
+ this.embedTagRules = function(HighlightRules, prefix, tag){
1492
+ this.$rules.tag.unshift({
1493
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1494
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
1495
+ next: [
1496
+ {include : "attributes"},
1497
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
1498
+ ]
1499
+ });
1500
+
1501
+ this.$rules[tag + "-end"] = [
1502
+ {include : "attributes"},
1503
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
1504
+ onMatch : function(value, currentState, stack) {
1505
+ stack.splice(0);
1506
+ return this.token;
1507
+ }}
1508
+ ];
1509
+
1510
+ this.embedRules(HighlightRules, prefix, [{
1511
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1512
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
1513
+ next: tag + "-end"
1514
+ }, {
1515
+ token: "string.cdata.xml",
1516
+ regex : "<\\!\\[CDATA\\["
1517
+ }, {
1518
+ token: "string.cdata.xml",
1519
+ regex : "\\]\\]>"
1520
+ }]);
1521
+ };
1522
+
1523
+ }).call(TextHighlightRules.prototype);
1524
+
1525
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
1526
+
1527
+ exports.XmlHighlightRules = XmlHighlightRules;
1528
+ });
1529
+
1530
+ define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
1531
+ "use strict";
1532
+
1533
+ var oop = require("../lib/oop");
1534
+ var lang = require("../lib/lang");
1535
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1536
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1537
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1538
+
1539
+ var tagMap = lang.createMap({
1540
+ a : 'anchor',
1541
+ button : 'form',
1542
+ form : 'form',
1543
+ img : 'image',
1544
+ input : 'form',
1545
+ label : 'form',
1546
+ option : 'form',
1547
+ script : 'script',
1548
+ select : 'form',
1549
+ textarea : 'form',
1550
+ style : 'style',
1551
+ table : 'table',
1552
+ tbody : 'table',
1553
+ td : 'table',
1554
+ tfoot : 'table',
1555
+ th : 'table',
1556
+ tr : 'table'
1557
+ });
1558
+
1559
+ var HtmlHighlightRules = function() {
1560
+ XmlHighlightRules.call(this);
1561
+
1562
+ this.addRules({
1563
+ attributes: [{
1564
+ include : "tag_whitespace"
1565
+ }, {
1566
+ token : "entity.other.attribute-name.xml",
1567
+ regex : "[-_a-zA-Z0-9:.]+"
1568
+ }, {
1569
+ token : "keyword.operator.attribute-equals.xml",
1570
+ regex : "=",
1571
+ push : [{
1572
+ include: "tag_whitespace"
1573
+ }, {
1574
+ token : "string.unquoted.attribute-value.html",
1575
+ regex : "[^<>='\"`\\s]+",
1576
+ next : "pop"
1577
+ }, {
1578
+ token : "empty",
1579
+ regex : "",
1580
+ next : "pop"
1581
+ }]
1582
+ }, {
1583
+ include : "attribute_value"
1584
+ }],
1585
+ tag: [{
1586
+ token : function(start, tag) {
1587
+ var group = tagMap[tag];
1588
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1589
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1590
+ },
1591
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
1592
+ next: "tag_stuff"
1593
+ }],
1594
+ tag_stuff: [
1595
+ {include : "attributes"},
1596
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
1597
+ ]
1598
+ });
1599
+
1600
+ this.embedTagRules(CssHighlightRules, "css-", "style");
1601
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
1602
+
1603
+ if (this.constructor === HtmlHighlightRules)
1604
+ this.normalizeRules();
1605
+ };
1606
+
1607
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1608
+
1609
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1610
+ });
1611
+
1612
+ define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
1613
+ "use strict";
1614
+
1615
+ var oop = require("../../lib/oop");
1616
+ var Behaviour = require("../behaviour").Behaviour;
1617
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1618
+ var lang = require("../../lib/lang");
1619
+
1620
+ function is(token, type) {
1621
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1622
+ }
1623
+
1624
+ var XmlBehaviour = function () {
1625
+
1626
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1627
+ if (text == '"' || text == "'") {
1628
+ var quote = text;
1629
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
1630
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1631
+ return {
1632
+ text: quote + selected + quote,
1633
+ selection: false
1634
+ };
1635
+ }
1636
+
1637
+ var cursor = editor.getCursorPosition();
1638
+ var line = session.doc.getLine(cursor.row);
1639
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1640
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1641
+ var token = iterator.getCurrentToken();
1642
+
1643
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1644
+ return {
1645
+ text: "",
1646
+ selection: [1, 1]
1647
+ };
1648
+ }
1649
+
1650
+ if (!token)
1651
+ token = iterator.stepBackward();
1652
+
1653
+ if (!token)
1654
+ return;
1655
+
1656
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1657
+ token = iterator.stepBackward();
1658
+ }
1659
+ var rightSpace = !rightChar || rightChar.match(/\s/);
1660
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1661
+ return {
1662
+ text: quote + quote,
1663
+ selection: [1, 1]
1664
+ };
1665
+ }
1666
+ }
1667
+ });
1668
+
1669
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
1670
+ var selected = session.doc.getTextRange(range);
1671
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1672
+ var line = session.doc.getLine(range.start.row);
1673
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1674
+ if (rightChar == selected) {
1675
+ range.end.column++;
1676
+ return range;
1677
+ }
1678
+ }
1679
+ });
1680
+
1681
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1682
+ if (text == '>') {
1683
+ var position = editor.getSelectionRange().start;
1684
+ var iterator = new TokenIterator(session, position.row, position.column);
1685
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1686
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1687
+ return;
1688
+ if (is(token, "reference.attribute-value"))
1689
+ return;
1690
+ if (is(token, "attribute-value")) {
1691
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1692
+ if (position.column < tokenEndColumn)
1693
+ return;
1694
+ if (position.column == tokenEndColumn) {
1695
+ var nextToken = iterator.stepForward();
1696
+ if (nextToken && is(nextToken, "attribute-value"))
1697
+ return;
1698
+ iterator.stepBackward();
1699
+ }
1700
+ }
1701
+
1702
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1703
+ return;
1704
+ while (!is(token, "tag-name")) {
1705
+ token = iterator.stepBackward();
1706
+ if (token.value == "<") {
1707
+ token = iterator.stepForward();
1708
+ break;
1709
+ }
1710
+ }
1711
+
1712
+ var tokenRow = iterator.getCurrentTokenRow();
1713
+ var tokenColumn = iterator.getCurrentTokenColumn();
1714
+ if (is(iterator.stepBackward(), "end-tag-open"))
1715
+ return;
1716
+
1717
+ var element = token.value;
1718
+ if (tokenRow == position.row)
1719
+ element = element.substring(0, position.column - tokenColumn);
1720
+
1721
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1722
+ return;
1723
+
1724
+ return {
1725
+ text: ">" + "</" + element + ">",
1726
+ selection: [1, 1]
1727
+ };
1728
+ }
1729
+ });
1730
+
1731
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1732
+ if (text == "\n") {
1733
+ var cursor = editor.getCursorPosition();
1734
+ var line = session.getLine(cursor.row);
1735
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1736
+ var token = iterator.getCurrentToken();
1737
+
1738
+ if (token && token.type.indexOf("tag-close") !== -1) {
1739
+ if (token.value == "/>")
1740
+ return;
1741
+ while (token && token.type.indexOf("tag-name") === -1) {
1742
+ token = iterator.stepBackward();
1743
+ }
1744
+
1745
+ if (!token) {
1746
+ return;
1747
+ }
1748
+
1749
+ var tag = token.value;
1750
+ var row = iterator.getCurrentTokenRow();
1751
+ token = iterator.stepBackward();
1752
+ if (!token || token.type.indexOf("end-tag") !== -1) {
1753
+ return;
1754
+ }
1755
+
1756
+ if (this.voidElements && !this.voidElements[tag]) {
1757
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
1758
+ var line = session.getLine(row);
1759
+ var nextIndent = this.$getIndent(line);
1760
+ var indent = nextIndent + session.getTabString();
1761
+
1762
+ if (nextToken && nextToken.value === "</") {
1763
+ return {
1764
+ text: "\n" + indent + "\n" + nextIndent,
1765
+ selection: [1, indent.length, 1, indent.length]
1766
+ };
1767
+ } else {
1768
+ return {
1769
+ text: "\n" + indent
1770
+ };
1771
+ }
1772
+ }
1773
+ }
1774
+ }
1775
+ });
1776
+
1777
+ };
1778
+
1779
+ oop.inherits(XmlBehaviour, Behaviour);
1780
+
1781
+ exports.XmlBehaviour = XmlBehaviour;
1782
+ });
1783
+
1784
+ define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
1785
+ "use strict";
1786
+
1787
+ var oop = require("../../lib/oop");
1788
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1789
+
1790
+ var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
1791
+ this.defaultMode = defaultMode;
1792
+ this.subModes = subModes;
1793
+ };
1794
+ oop.inherits(FoldMode, BaseFoldMode);
1795
+
1796
+ (function() {
1797
+
1798
+
1799
+ this.$getMode = function(state) {
1800
+ if (typeof state != "string")
1801
+ state = state[0];
1802
+ for (var key in this.subModes) {
1803
+ if (state.indexOf(key) === 0)
1804
+ return this.subModes[key];
1805
+ }
1806
+ return null;
1807
+ };
1808
+
1809
+ this.$tryMode = function(state, session, foldStyle, row) {
1810
+ var mode = this.$getMode(state);
1811
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1812
+ };
1813
+
1814
+ this.getFoldWidget = function(session, foldStyle, row) {
1815
+ return (
1816
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
1817
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
1818
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
1819
+ );
1820
+ };
1821
+
1822
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
1823
+ var mode = this.$getMode(session.getState(row-1));
1824
+
1825
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1826
+ mode = this.$getMode(session.getState(row));
1827
+
1828
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1829
+ mode = this.defaultMode;
1830
+
1831
+ return mode.getFoldWidgetRange(session, foldStyle, row);
1832
+ };
1833
+
1834
+ }).call(FoldMode.prototype);
1835
+
1836
+ });
1837
+
1838
+ define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
1839
+ "use strict";
1840
+
1841
+ var oop = require("../../lib/oop");
1842
+ var lang = require("../../lib/lang");
1843
+ var Range = require("../../range").Range;
1844
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1845
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1846
+
1847
+ var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
1848
+ BaseFoldMode.call(this);
1849
+ this.voidElements = voidElements || {};
1850
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1851
+ if (optionalEndTags)
1852
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1853
+
1854
+ };
1855
+ oop.inherits(FoldMode, BaseFoldMode);
1856
+
1857
+ var Tag = function() {
1858
+ this.tagName = "";
1859
+ this.closing = false;
1860
+ this.selfClosing = false;
1861
+ this.start = {row: 0, column: 0};
1862
+ this.end = {row: 0, column: 0};
1863
+ };
1864
+
1865
+ function is(token, type) {
1866
+ return token.type.lastIndexOf(type + ".xml") > -1;
1867
+ }
1868
+
1869
+ (function() {
1870
+
1871
+ this.getFoldWidget = function(session, foldStyle, row) {
1872
+ var tag = this._getFirstTagInLine(session, row);
1873
+
1874
+ if (!tag)
1875
+ return this.getCommentFoldWidget(session, row);
1876
+
1877
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1878
+ return foldStyle == "markbeginend" ? "end" : "";
1879
+
1880
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1881
+ return "";
1882
+
1883
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1884
+ return "";
1885
+
1886
+ return "start";
1887
+ };
1888
+
1889
+ this.getCommentFoldWidget = function(session, row) {
1890
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1891
+ return "start";
1892
+ return "";
1893
+ };
1894
+ this._getFirstTagInLine = function(session, row) {
1895
+ var tokens = session.getTokens(row);
1896
+ var tag = new Tag();
1897
+
1898
+ for (var i = 0; i < tokens.length; i++) {
1899
+ var token = tokens[i];
1900
+ if (is(token, "tag-open")) {
1901
+ tag.end.column = tag.start.column + token.value.length;
1902
+ tag.closing = is(token, "end-tag-open");
1903
+ token = tokens[++i];
1904
+ if (!token)
1905
+ return null;
1906
+ tag.tagName = token.value;
1907
+ tag.end.column += token.value.length;
1908
+ for (i++; i < tokens.length; i++) {
1909
+ token = tokens[i];
1910
+ tag.end.column += token.value.length;
1911
+ if (is(token, "tag-close")) {
1912
+ tag.selfClosing = token.value == '/>';
1913
+ break;
1914
+ }
1915
+ }
1916
+ return tag;
1917
+ } else if (is(token, "tag-close")) {
1918
+ tag.selfClosing = token.value == '/>';
1919
+ return tag;
1920
+ }
1921
+ tag.start.column += token.value.length;
1922
+ }
1923
+
1924
+ return null;
1925
+ };
1926
+
1927
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
1928
+ var tokens = session.getTokens(row);
1929
+ var column = 0;
1930
+ for (var i = 0; i < tokens.length; i++) {
1931
+ var token = tokens[i];
1932
+ column += token.value.length;
1933
+ if (column < startColumn)
1934
+ continue;
1935
+ if (is(token, "end-tag-open")) {
1936
+ token = tokens[i + 1];
1937
+ if (token && token.value == tagName)
1938
+ return true;
1939
+ }
1940
+ }
1941
+ return false;
1942
+ };
1943
+ this._readTagForward = function(iterator) {
1944
+ var token = iterator.getCurrentToken();
1945
+ if (!token)
1946
+ return null;
1947
+
1948
+ var tag = new Tag();
1949
+ do {
1950
+ if (is(token, "tag-open")) {
1951
+ tag.closing = is(token, "end-tag-open");
1952
+ tag.start.row = iterator.getCurrentTokenRow();
1953
+ tag.start.column = iterator.getCurrentTokenColumn();
1954
+ } else if (is(token, "tag-name")) {
1955
+ tag.tagName = token.value;
1956
+ } else if (is(token, "tag-close")) {
1957
+ tag.selfClosing = token.value == "/>";
1958
+ tag.end.row = iterator.getCurrentTokenRow();
1959
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1960
+ iterator.stepForward();
1961
+ return tag;
1962
+ }
1963
+ } while(token = iterator.stepForward());
1964
+
1965
+ return null;
1966
+ };
1967
+
1968
+ this._readTagBackward = function(iterator) {
1969
+ var token = iterator.getCurrentToken();
1970
+ if (!token)
1971
+ return null;
1972
+
1973
+ var tag = new Tag();
1974
+ do {
1975
+ if (is(token, "tag-open")) {
1976
+ tag.closing = is(token, "end-tag-open");
1977
+ tag.start.row = iterator.getCurrentTokenRow();
1978
+ tag.start.column = iterator.getCurrentTokenColumn();
1979
+ iterator.stepBackward();
1980
+ return tag;
1981
+ } else if (is(token, "tag-name")) {
1982
+ tag.tagName = token.value;
1983
+ } else if (is(token, "tag-close")) {
1984
+ tag.selfClosing = token.value == "/>";
1985
+ tag.end.row = iterator.getCurrentTokenRow();
1986
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1987
+ }
1988
+ } while(token = iterator.stepBackward());
1989
+
1990
+ return null;
1991
+ };
1992
+
1993
+ this._pop = function(stack, tag) {
1994
+ while (stack.length) {
1995
+
1996
+ var top = stack[stack.length-1];
1997
+ if (!tag || top.tagName == tag.tagName) {
1998
+ return stack.pop();
1999
+ }
2000
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
2001
+ stack.pop();
2002
+ continue;
2003
+ } else {
2004
+ return null;
2005
+ }
2006
+ }
2007
+ };
2008
+
2009
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2010
+ var firstTag = this._getFirstTagInLine(session, row);
2011
+
2012
+ if (!firstTag) {
2013
+ return this.getCommentFoldWidget(session, row)
2014
+ && session.getCommentFoldRange(row, session.getLine(row).length);
2015
+ }
2016
+
2017
+ var isBackward = firstTag.closing || firstTag.selfClosing;
2018
+ var stack = [];
2019
+ var tag;
2020
+
2021
+ if (!isBackward) {
2022
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
2023
+ var start = {
2024
+ row: row,
2025
+ column: firstTag.start.column + firstTag.tagName.length + 2
2026
+ };
2027
+ if (firstTag.start.row == firstTag.end.row)
2028
+ start.column = firstTag.end.column;
2029
+ while (tag = this._readTagForward(iterator)) {
2030
+ if (tag.selfClosing) {
2031
+ if (!stack.length) {
2032
+ tag.start.column += tag.tagName.length + 2;
2033
+ tag.end.column -= 2;
2034
+ return Range.fromPoints(tag.start, tag.end);
2035
+ } else
2036
+ continue;
2037
+ }
2038
+
2039
+ if (tag.closing) {
2040
+ this._pop(stack, tag);
2041
+ if (stack.length == 0)
2042
+ return Range.fromPoints(start, tag.start);
2043
+ }
2044
+ else {
2045
+ stack.push(tag);
2046
+ }
2047
+ }
2048
+ }
2049
+ else {
2050
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
2051
+ var end = {
2052
+ row: row,
2053
+ column: firstTag.start.column
2054
+ };
2055
+
2056
+ while (tag = this._readTagBackward(iterator)) {
2057
+ if (tag.selfClosing) {
2058
+ if (!stack.length) {
2059
+ tag.start.column += tag.tagName.length + 2;
2060
+ tag.end.column -= 2;
2061
+ return Range.fromPoints(tag.start, tag.end);
2062
+ } else
2063
+ continue;
2064
+ }
2065
+
2066
+ if (!tag.closing) {
2067
+ this._pop(stack, tag);
2068
+ if (stack.length == 0) {
2069
+ tag.start.column += tag.tagName.length + 2;
2070
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
2071
+ tag.start.column = tag.end.column;
2072
+ return Range.fromPoints(tag.start, end);
2073
+ }
2074
+ }
2075
+ else {
2076
+ stack.push(tag);
2077
+ }
2078
+ }
2079
+ }
2080
+
2081
+ };
2082
+
2083
+ }).call(FoldMode.prototype);
2084
+
2085
+ });
2086
+
2087
+ 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) {
2088
+ "use strict";
2089
+
2090
+ var oop = require("../../lib/oop");
2091
+ var MixedFoldMode = require("./mixed").FoldMode;
2092
+ var XmlFoldMode = require("./xml").FoldMode;
2093
+ var CStyleFoldMode = require("./cstyle").FoldMode;
2094
+
2095
+ var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
2096
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2097
+ "js-": new CStyleFoldMode(),
2098
+ "css-": new CStyleFoldMode()
2099
+ });
2100
+ };
2101
+
2102
+ oop.inherits(FoldMode, MixedFoldMode);
2103
+
2104
+ });
2105
+
2106
+ define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
2107
+ "use strict";
2108
+
2109
+ var TokenIterator = require("../token_iterator").TokenIterator;
2110
+
2111
+ var commonAttributes = [
2112
+ "accesskey",
2113
+ "class",
2114
+ "contenteditable",
2115
+ "contextmenu",
2116
+ "dir",
2117
+ "draggable",
2118
+ "dropzone",
2119
+ "hidden",
2120
+ "id",
2121
+ "inert",
2122
+ "itemid",
2123
+ "itemprop",
2124
+ "itemref",
2125
+ "itemscope",
2126
+ "itemtype",
2127
+ "lang",
2128
+ "spellcheck",
2129
+ "style",
2130
+ "tabindex",
2131
+ "title",
2132
+ "translate"
2133
+ ];
2134
+
2135
+ var eventAttributes = [
2136
+ "onabort",
2137
+ "onblur",
2138
+ "oncancel",
2139
+ "oncanplay",
2140
+ "oncanplaythrough",
2141
+ "onchange",
2142
+ "onclick",
2143
+ "onclose",
2144
+ "oncontextmenu",
2145
+ "oncuechange",
2146
+ "ondblclick",
2147
+ "ondrag",
2148
+ "ondragend",
2149
+ "ondragenter",
2150
+ "ondragleave",
2151
+ "ondragover",
2152
+ "ondragstart",
2153
+ "ondrop",
2154
+ "ondurationchange",
2155
+ "onemptied",
2156
+ "onended",
2157
+ "onerror",
2158
+ "onfocus",
2159
+ "oninput",
2160
+ "oninvalid",
2161
+ "onkeydown",
2162
+ "onkeypress",
2163
+ "onkeyup",
2164
+ "onload",
2165
+ "onloadeddata",
2166
+ "onloadedmetadata",
2167
+ "onloadstart",
2168
+ "onmousedown",
2169
+ "onmousemove",
2170
+ "onmouseout",
2171
+ "onmouseover",
2172
+ "onmouseup",
2173
+ "onmousewheel",
2174
+ "onpause",
2175
+ "onplay",
2176
+ "onplaying",
2177
+ "onprogress",
2178
+ "onratechange",
2179
+ "onreset",
2180
+ "onscroll",
2181
+ "onseeked",
2182
+ "onseeking",
2183
+ "onselect",
2184
+ "onshow",
2185
+ "onstalled",
2186
+ "onsubmit",
2187
+ "onsuspend",
2188
+ "ontimeupdate",
2189
+ "onvolumechange",
2190
+ "onwaiting"
2191
+ ];
2192
+
2193
+ var globalAttributes = commonAttributes.concat(eventAttributes);
2194
+
2195
+ var attributeMap = {
2196
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
2197
+ "abbr": {},
2198
+ "address": {},
2199
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2200
+ "article": {"pubdate": 1},
2201
+ "aside": {},
2202
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2203
+ "b": {},
2204
+ "base": {"href": 1, "target": 1},
2205
+ "bdi": {},
2206
+ "bdo": {},
2207
+ "blockquote": {"cite": 1},
2208
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
2209
+ "br": {},
2210
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
2211
+ "canvas": {"width": 1, "height": 1},
2212
+ "caption": {},
2213
+ "cite": {},
2214
+ "code": {},
2215
+ "col": {"span": 1},
2216
+ "colgroup": {"span": 1},
2217
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2218
+ "data": {},
2219
+ "datalist": {},
2220
+ "dd": {},
2221
+ "del": {"cite": 1, "datetime": 1},
2222
+ "details": {"open": 1},
2223
+ "dfn": {},
2224
+ "dialog": {"open": 1},
2225
+ "div": {},
2226
+ "dl": {},
2227
+ "dt": {},
2228
+ "em": {},
2229
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2230
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
2231
+ "figcaption": {},
2232
+ "figure": {},
2233
+ "footer": {},
2234
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
2235
+ "h1": {},
2236
+ "h2": {},
2237
+ "h3": {},
2238
+ "h4": {},
2239
+ "h5": {},
2240
+ "h6": {},
2241
+ "head": {},
2242
+ "header": {},
2243
+ "hr": {},
2244
+ "html": {"manifest": 1},
2245
+ "i": {},
2246
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
2247
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2248
+ "input": {
2249
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
2250
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
2251
+ "ins": {"cite": 1, "datetime": 1},
2252
+ "kbd": {},
2253
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2254
+ "label": {"form": 1, "for": 1},
2255
+ "legend": {},
2256
+ "li": {"value": 1},
2257
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
2258
+ "main": {},
2259
+ "map": {"name": 1},
2260
+ "mark": {},
2261
+ "math": {},
2262
+ "menu": {"type": 1, "label": 1},
2263
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2264
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2265
+ "nav": {},
2266
+ "noscript": {"href": 1},
2267
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2268
+ "ol": {"start": 1, "reversed": 1},
2269
+ "optgroup": {"disabled": 1, "label": 1},
2270
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2271
+ "output": {"for": 1, "form": 1, "name": 1},
2272
+ "p": {},
2273
+ "param": {"name": 1, "value": 1},
2274
+ "pre": {},
2275
+ "progress": {"value": 1, "max": 1},
2276
+ "q": {"cite": 1},
2277
+ "rp": {},
2278
+ "rt": {},
2279
+ "ruby": {},
2280
+ "s": {},
2281
+ "samp": {},
2282
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2283
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2284
+ "small": {},
2285
+ "source": {"src": 1, "type": 1, "media": 1},
2286
+ "span": {},
2287
+ "strong": {},
2288
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2289
+ "sub": {},
2290
+ "sup": {},
2291
+ "svg": {},
2292
+ "table": {"summary": 1},
2293
+ "tbody": {},
2294
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2295
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
2296
+ "tfoot": {},
2297
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2298
+ "thead": {},
2299
+ "time": {"datetime": 1},
2300
+ "title": {},
2301
+ "tr": {},
2302
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2303
+ "section": {},
2304
+ "summary": {},
2305
+ "u": {},
2306
+ "ul": {},
2307
+ "var": {},
2308
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
2309
+ "wbr": {}
2310
+ };
2311
+
2312
+ var elements = Object.keys(attributeMap);
2313
+
2314
+ function is(token, type) {
2315
+ return token.type.lastIndexOf(type + ".xml") > -1;
2316
+ }
2317
+
2318
+ function findTagName(session, pos) {
2319
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2320
+ var token = iterator.getCurrentToken();
2321
+ while (token && !is(token, "tag-name")){
2322
+ token = iterator.stepBackward();
2323
+ }
2324
+ if (token)
2325
+ return token.value;
2326
+ }
2327
+
2328
+ function findAttributeName(session, pos) {
2329
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2330
+ var token = iterator.getCurrentToken();
2331
+ while (token && !is(token, "attribute-name")){
2332
+ token = iterator.stepBackward();
2333
+ }
2334
+ if (token)
2335
+ return token.value;
2336
+ }
2337
+
2338
+ var HtmlCompletions = function() {
2339
+
2340
+ };
2341
+
2342
+ (function() {
2343
+
2344
+ this.getCompletions = function(state, session, pos, prefix) {
2345
+ var token = session.getTokenAt(pos.row, pos.column);
2346
+
2347
+ if (!token)
2348
+ return [];
2349
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2350
+ return this.getTagCompletions(state, session, pos, prefix);
2351
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2352
+ return this.getAttributeCompletions(state, session, pos, prefix);
2353
+ if (is(token, "attribute-value"))
2354
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
2355
+ var line = session.getLine(pos.row).substr(0, pos.column);
2356
+ if (/&[a-z]*$/i.test(line))
2357
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
2358
+
2359
+ return [];
2360
+ };
2361
+
2362
+ this.getTagCompletions = function(state, session, pos, prefix) {
2363
+ return elements.map(function(element){
2364
+ return {
2365
+ value: element,
2366
+ meta: "tag",
2367
+ score: 1000000
2368
+ };
2369
+ });
2370
+ };
2371
+
2372
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
2373
+ var tagName = findTagName(session, pos);
2374
+ if (!tagName)
2375
+ return [];
2376
+ var attributes = globalAttributes;
2377
+ if (tagName in attributeMap) {
2378
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2379
+ }
2380
+ return attributes.map(function(attribute){
2381
+ return {
2382
+ caption: attribute,
2383
+ snippet: attribute + '="$0"',
2384
+ meta: "attribute",
2385
+ score: 1000000
2386
+ };
2387
+ });
2388
+ };
2389
+
2390
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
2391
+ var tagName = findTagName(session, pos);
2392
+ var attributeName = findAttributeName(session, pos);
2393
+
2394
+ if (!tagName)
2395
+ return [];
2396
+ var values = [];
2397
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2398
+ values = Object.keys(attributeMap[tagName][attributeName]);
2399
+ }
2400
+ return values.map(function(value){
2401
+ return {
2402
+ caption: value,
2403
+ snippet: value,
2404
+ meta: "attribute value",
2405
+ score: 1000000
2406
+ };
2407
+ });
2408
+ };
2409
+
2410
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
2411
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
2412
+
2413
+ return values.map(function(value){
2414
+ return {
2415
+ caption: value,
2416
+ snippet: value,
2417
+ meta: "html entity",
2418
+ score: 1000000
2419
+ };
2420
+ });
2421
+ };
2422
+
2423
+ }).call(HtmlCompletions.prototype);
2424
+
2425
+ exports.HtmlCompletions = HtmlCompletions;
2426
+ });
2427
+
2428
+ define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
2429
+ "use strict";
2430
+
2431
+ var oop = require("../lib/oop");
2432
+ var lang = require("../lib/lang");
2433
+ var TextMode = require("./text").Mode;
2434
+ var JavaScriptMode = require("./javascript").Mode;
2435
+ var CssMode = require("./css").Mode;
2436
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2437
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2438
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2439
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2440
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2441
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2442
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2443
+
2444
+ var Mode = function(options) {
2445
+ this.fragmentContext = options && options.fragmentContext;
2446
+ this.HighlightRules = HtmlHighlightRules;
2447
+ this.$behaviour = new XmlBehaviour();
2448
+ this.$completer = new HtmlCompletions();
2449
+
2450
+ this.createModeDelegates({
2451
+ "js-": JavaScriptMode,
2452
+ "css-": CssMode
2453
+ });
2454
+
2455
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2456
+ };
2457
+ oop.inherits(Mode, TextMode);
2458
+
2459
+ (function() {
2460
+
2461
+ this.blockComment = {start: "<!--", end: "-->"};
2462
+
2463
+ this.voidElements = lang.arrayToMap(voidElements);
2464
+
2465
+ this.getNextLineIndent = function(state, line, tab) {
2466
+ return this.$getIndent(line);
2467
+ };
2468
+
2469
+ this.checkOutdent = function(state, line, input) {
2470
+ return false;
2471
+ };
2472
+
2473
+ this.getCompletions = function(state, session, pos, prefix) {
2474
+ return this.$completer.getCompletions(state, session, pos, prefix);
2475
+ };
2476
+
2477
+ this.createWorker = function(session) {
2478
+ if (this.constructor != Mode)
2479
+ return;
2480
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2481
+ worker.attachToDocument(session.getDocument());
2482
+
2483
+ if (this.fragmentContext)
2484
+ worker.call("setOptions", [{context: this.fragmentContext}]);
2485
+
2486
+ worker.on("error", function(e) {
2487
+ session.setAnnotations(e.data);
2488
+ });
2489
+
2490
+ worker.on("terminate", function() {
2491
+ session.clearAnnotations();
2492
+ });
2493
+
2494
+ return worker;
2495
+ };
2496
+
2497
+ this.$id = "ace/mode/html";
2498
+ }).call(Mode.prototype);
2499
+
2500
+ exports.Mode = Mode;
2501
+ });
2502
+
2503
+ define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
2504
+ "use strict";
2505
+
2506
+ var oop = require("../lib/oop");
2507
+ var lang = require("../lib/lang");
2508
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2509
+
2510
+ var TexHighlightRules = function(textClass) {
2511
+
2512
+ if (!textClass)
2513
+ textClass = "text";
2514
+ this.$rules = {
2515
+ "start" : [
2516
+ {
2517
+ token : "comment",
2518
+ regex : "%.*$"
2519
+ }, {
2520
+ token : textClass, // non-command
2521
+ regex : "\\\\[$&%#\\{\\}]"
2522
+ }, {
2523
+ token : "keyword", // command
2524
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
2525
+ next : "nospell"
2526
+ }, {
2527
+ token : "keyword", // command
2528
+ regex : "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"
2529
+ }, {
2530
+ token : "paren.keyword.operator",
2531
+ regex : "[[({]"
2532
+ }, {
2533
+ token : "paren.keyword.operator",
2534
+ regex : "[\\])}]"
2535
+ }, {
2536
+ token : textClass,
2537
+ regex : "\\s+"
2538
+ }
2539
+ ],
2540
+ "nospell" : [
2541
+ {
2542
+ token : "comment",
2543
+ regex : "%.*$",
2544
+ next : "start"
2545
+ }, {
2546
+ token : "nospell." + textClass, // non-command
2547
+ regex : "\\\\[$&%#\\{\\}]"
2548
+ }, {
2549
+ token : "keyword", // command
2550
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
2551
+ }, {
2552
+ token : "keyword", // command
2553
+ regex : "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",
2554
+ next : "start"
2555
+ }, {
2556
+ token : "paren.keyword.operator",
2557
+ regex : "[[({]"
2558
+ }, {
2559
+ token : "paren.keyword.operator",
2560
+ regex : "[\\])]"
2561
+ }, {
2562
+ token : "paren.keyword.operator",
2563
+ regex : "}",
2564
+ next : "start"
2565
+ }, {
2566
+ token : "nospell." + textClass,
2567
+ regex : "\\s+"
2568
+ }, {
2569
+ token : "nospell." + textClass,
2570
+ regex : "\\w+"
2571
+ }
2572
+ ]
2573
+ };
2574
+ };
2575
+
2576
+ oop.inherits(TexHighlightRules, TextHighlightRules);
2577
+
2578
+ exports.TexHighlightRules = TexHighlightRules;
2579
+ });
2580
+
2581
+ define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module)
2582
+ {
2583
+
2584
+ var oop = require("../lib/oop");
2585
+ var lang = require("../lib/lang");
2586
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2587
+ var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
2588
+
2589
+ var RHighlightRules = function()
2590
+ {
2591
+
2592
+ var keywords = lang.arrayToMap(
2593
+ ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass")
2594
+ .split("|")
2595
+ );
2596
+
2597
+ var buildinConstants = lang.arrayToMap(
2598
+ ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" +
2599
+ "NA_complex_").split("|")
2600
+ );
2601
+ this.$rules = {
2602
+ "start" : [
2603
+ {
2604
+ token : "comment.sectionhead",
2605
+ regex : "#+(?!').*(?:----|====|####)\\s*$"
2606
+ },
2607
+ {
2608
+ token : "comment",
2609
+ regex : "#+'",
2610
+ next : "rd-start"
2611
+ },
2612
+ {
2613
+ token : "comment",
2614
+ regex : "#.*$"
2615
+ },
2616
+ {
2617
+ token : "string", // multi line string start
2618
+ regex : '["]',
2619
+ next : "qqstring"
2620
+ },
2621
+ {
2622
+ token : "string", // multi line string start
2623
+ regex : "[']",
2624
+ next : "qstring"
2625
+ },
2626
+ {
2627
+ token : "constant.numeric", // hex
2628
+ regex : "0[xX][0-9a-fA-F]+[Li]?\\b"
2629
+ },
2630
+ {
2631
+ token : "constant.numeric", // explicit integer
2632
+ regex : "\\d+L\\b"
2633
+ },
2634
+ {
2635
+ token : "constant.numeric", // number
2636
+ regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"
2637
+ },
2638
+ {
2639
+ token : "constant.numeric", // number with leading decimal
2640
+ regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"
2641
+ },
2642
+ {
2643
+ token : "constant.language.boolean",
2644
+ regex : "(?:TRUE|FALSE|T|F)\\b"
2645
+ },
2646
+ {
2647
+ token : "identifier",
2648
+ regex : "`.*?`"
2649
+ },
2650
+ {
2651
+ onMatch : function(value) {
2652
+ if (keywords[value])
2653
+ return "keyword";
2654
+ else if (buildinConstants[value])
2655
+ return "constant.language";
2656
+ else if (value == '...' || value.match(/^\.\.\d+$/))
2657
+ return "variable.language";
2658
+ else
2659
+ return "identifier";
2660
+ },
2661
+ regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b"
2662
+ },
2663
+ {
2664
+ token : "keyword.operator",
2665
+ regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"
2666
+ },
2667
+ {
2668
+ token : "keyword.operator", // infix operators
2669
+ regex : "%.*?%"
2670
+ },
2671
+ {
2672
+ token : "paren.keyword.operator",
2673
+ regex : "[[({]"
2674
+ },
2675
+ {
2676
+ token : "paren.keyword.operator",
2677
+ regex : "[\\])}]"
2678
+ },
2679
+ {
2680
+ token : "text",
2681
+ regex : "\\s+"
2682
+ }
2683
+ ],
2684
+ "qqstring" : [
2685
+ {
2686
+ token : "string",
2687
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
2688
+ next : "start"
2689
+ },
2690
+ {
2691
+ token : "string",
2692
+ regex : '.+'
2693
+ }
2694
+ ],
2695
+ "qstring" : [
2696
+ {
2697
+ token : "string",
2698
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
2699
+ next : "start"
2700
+ },
2701
+ {
2702
+ token : "string",
2703
+ regex : '.+'
2704
+ }
2705
+ ]
2706
+ };
2707
+
2708
+ var rdRules = new TexHighlightRules("comment").getRules();
2709
+ for (var i = 0; i < rdRules["start"].length; i++) {
2710
+ rdRules["start"][i].token += ".virtual-comment";
2711
+ }
2712
+
2713
+ this.addRules(rdRules, "rd-");
2714
+ this.$rules["rd-start"].unshift({
2715
+ token: "text",
2716
+ regex: "^",
2717
+ next: "start"
2718
+ });
2719
+ this.$rules["rd-start"].unshift({
2720
+ token : "keyword",
2721
+ regex : "@(?!@)[^ ]*"
2722
+ });
2723
+ this.$rules["rd-start"].unshift({
2724
+ token : "comment",
2725
+ regex : "@@"
2726
+ });
2727
+ this.$rules["rd-start"].push({
2728
+ token : "comment",
2729
+ regex : "[^%\\\\[({\\])}]+"
2730
+ });
2731
+ };
2732
+
2733
+ oop.inherits(RHighlightRules, TextHighlightRules);
2734
+
2735
+ exports.RHighlightRules = RHighlightRules;
2736
+ });
2737
+
2738
+ define("ace/mode/rhtml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/r_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
2739
+ "use strict";
2740
+
2741
+ var oop = require("../lib/oop");
2742
+ var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
2743
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2744
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2745
+
2746
+ var RHtmlHighlightRules = function() {
2747
+ HtmlHighlightRules.call(this);
2748
+
2749
+ this.$rules["start"].unshift({
2750
+ token: "support.function.codebegin",
2751
+ regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
2752
+ next: "r-start"
2753
+ });
2754
+
2755
+ this.embedRules(RHighlightRules, "r-", [{
2756
+ token: "support.function.codeend",
2757
+ regex: "^\\s*end.rcode\\s*-->",
2758
+ next: "start"
2759
+ }], ["start"]);
2760
+
2761
+ this.normalizeRules();
2762
+ };
2763
+ oop.inherits(RHtmlHighlightRules, TextHighlightRules);
2764
+
2765
+ exports.RHtmlHighlightRules = RHtmlHighlightRules;
2766
+ });
2767
+
2768
+ define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"], function(require, exports, module) {
2769
+ "use strict";
2770
+
2771
+ var oop = require("../lib/oop");
2772
+ var HtmlMode = require("./html").Mode;
2773
+
2774
+ var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
2775
+
2776
+ var Mode = function(doc, session) {
2777
+ HtmlMode.call(this);
2778
+ this.$session = session;
2779
+ this.HighlightRules = RHtmlHighlightRules;
2780
+ };
2781
+ oop.inherits(Mode, HtmlMode);
2782
+
2783
+ (function() {
2784
+ this.insertChunkInfo = {
2785
+ value: "<!--begin.rcode\n\nend.rcode-->\n",
2786
+ position: {row: 0, column: 15}
2787
+ };
2788
+
2789
+ this.getLanguageMode = function(position)
2790
+ {
2791
+ return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML';
2792
+ };
2793
+
2794
+ this.$id = "ace/mode/rhtml";
2795
+ }).call(Mode.prototype);
2796
+
2797
+ exports.Mode = Mode;
2798
+ });
2799
+ (function() {
2800
+ window.require(["ace/mode/rhtml"], function(m) {
2801
+ if (typeof module == "object" && typeof exports == "object" && module) {
2802
+ module.exports = m;
2803
+ }
2804
+ });
2805
+ })();
2806
+