@omicronenergy/oscd-ui 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (716) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/custom-elements.json +12341 -8939
  3. package/dist/ace-editor/OscdAceEditor.d.ts +34 -0
  4. package/dist/ace-editor/OscdAceEditor.js +33 -0
  5. package/dist/ace-editor/OscdAceEditor.js.map +1 -0
  6. package/dist/ace-editor/OscdAceEditor.spec.d.ts +1 -0
  7. package/dist/ace-editor/OscdAceEditor.spec.js +16 -0
  8. package/dist/ace-editor/OscdAceEditor.spec.js.map +1 -0
  9. package/dist/ace-editor/OscdAceEditor.stories.d.ts +28 -0
  10. package/dist/ace-editor/OscdAceEditor.stories.js +22 -0
  11. package/dist/ace-editor/OscdAceEditor.stories.js.map +1 -0
  12. package/dist/ace-editor/ace/ace.js +22045 -0
  13. package/dist/ace-editor/ace/ext-beautify.js +343 -0
  14. package/dist/ace-editor/ace/ext-code_lens.js +204 -0
  15. package/dist/ace-editor/ace/ext-command_bar.js +469 -0
  16. package/dist/ace-editor/ace/ext-diff.js +4270 -0
  17. package/dist/ace-editor/ace/ext-elastic_tabstops_lite.js +238 -0
  18. package/dist/ace-editor/ace/ext-emmet.js +1303 -0
  19. package/dist/ace-editor/ace/ext-error_marker.js +9 -0
  20. package/dist/ace-editor/ace/ext-hardwrap.js +127 -0
  21. package/dist/ace-editor/ace/ext-inline_autocomplete.js +3547 -0
  22. package/dist/ace-editor/ace/ext-keybinding_menu.js +185 -0
  23. package/dist/ace-editor/ace/ext-language_tools.js +2724 -0
  24. package/dist/ace-editor/ace/ext-linking.js +66 -0
  25. package/dist/ace-editor/ace/ext-modelist.js +279 -0
  26. package/dist/ace-editor/ace/ext-options.js +862 -0
  27. package/dist/ace-editor/ace/ext-prompt.js +3164 -0
  28. package/dist/ace-editor/ace/ext-rtl.js +146 -0
  29. package/dist/ace-editor/ace/ext-searchbox.js +385 -0
  30. package/dist/ace-editor/ace/ext-settings_menu.js +862 -0
  31. package/dist/ace-editor/ace/ext-simple_tokenizer.js +137 -0
  32. package/dist/ace-editor/ace/ext-spellcheck.js +79 -0
  33. package/dist/ace-editor/ace/ext-split.js +203 -0
  34. package/dist/ace-editor/ace/ext-static_highlight.js +194 -0
  35. package/dist/ace-editor/ace/ext-statusbar.js +63 -0
  36. package/dist/ace-editor/ace/ext-textarea.js +400 -0
  37. package/dist/ace-editor/ace/ext-themelist.js +80 -0
  38. package/dist/ace-editor/ace/ext-whitespace.js +201 -0
  39. package/dist/ace-editor/ace/ext-whitespaces_in_selection.js +325 -0
  40. package/dist/ace-editor/ace/keybinding-emacs.js +1067 -0
  41. package/dist/ace-editor/ace/keybinding-sublime.js +409 -0
  42. package/dist/ace-editor/ace/keybinding-vim.js +7101 -0
  43. package/dist/ace-editor/ace/keybinding-vscode.js +255 -0
  44. package/dist/ace-editor/ace/mode-abap.js +200 -0
  45. package/dist/ace-editor/ace/mode-abc.js +243 -0
  46. package/dist/ace-editor/ace/mode-actionscript.js +234 -0
  47. package/dist/ace-editor/ace/mode-ada.js +108 -0
  48. package/dist/ace-editor/ace/mode-alda.js +279 -0
  49. package/dist/ace-editor/ace/mode-apache_conf.js +318 -0
  50. package/dist/ace-editor/ace/mode-apex.js +402 -0
  51. package/dist/ace-editor/ace/mode-applescript.js +232 -0
  52. package/dist/ace-editor/ace/mode-aql.js +92 -0
  53. package/dist/ace-editor/ace/mode-asciidoc.js +311 -0
  54. package/dist/ace-editor/ace/mode-asl.js +357 -0
  55. package/dist/ace-editor/ace/mode-assembly_arm32.js +185 -0
  56. package/dist/ace-editor/ace/mode-assembly_x86.js +170 -0
  57. package/dist/ace-editor/ace/mode-astro.js +2475 -0
  58. package/dist/ace-editor/ace/mode-autohotkey.js +208 -0
  59. package/dist/ace-editor/ace/mode-basic.js +201 -0
  60. package/dist/ace-editor/ace/mode-batchfile.js +199 -0
  61. package/dist/ace-editor/ace/mode-bibtex.js +318 -0
  62. package/dist/ace-editor/ace/mode-c9search.js +250 -0
  63. package/dist/ace-editor/ace/mode-c_cpp.js +417 -0
  64. package/dist/ace-editor/ace/mode-cedar.js +289 -0
  65. package/dist/ace-editor/ace/mode-cedarschema.js +275 -0
  66. package/dist/ace-editor/ace/mode-cirru.js +192 -0
  67. package/dist/ace-editor/ace/mode-clojure.js +322 -0
  68. package/dist/ace-editor/ace/mode-clue.js +361 -0
  69. package/dist/ace-editor/ace/mode-cobol.js +82 -0
  70. package/dist/ace-editor/ace/mode-coffee.js +335 -0
  71. package/dist/ace-editor/ace/mode-coldfusion.js +2410 -0
  72. package/dist/ace-editor/ace/mode-crystal.js +586 -0
  73. package/dist/ace-editor/ace/mode-csharp.js +413 -0
  74. package/dist/ace-editor/ace/mode-csound_document.js +4073 -0
  75. package/dist/ace-editor/ace/mode-csound_orchestra.js +2923 -0
  76. package/dist/ace-editor/ace/mode-csound_score.js +409 -0
  77. package/dist/ace-editor/ace/mode-csp.js +59 -0
  78. package/dist/ace-editor/ace/mode-css.js +632 -0
  79. package/dist/ace-editor/ace/mode-csv.js +97 -0
  80. package/dist/ace-editor/ace/mode-curly.js +2382 -0
  81. package/dist/ace-editor/ace/mode-cuttlefish.js +56 -0
  82. package/dist/ace-editor/ace/mode-d.js +450 -0
  83. package/dist/ace-editor/ace/mode-dart.js +618 -0
  84. package/dist/ace-editor/ace/mode-diff.js +129 -0
  85. package/dist/ace-editor/ace/mode-django.js +2423 -0
  86. package/dist/ace-editor/ace/mode-dockerfile.js +427 -0
  87. package/dist/ace-editor/ace/mode-dot.js +348 -0
  88. package/dist/ace-editor/ace/mode-drools.js +607 -0
  89. package/dist/ace-editor/ace/mode-edifact.js +130 -0
  90. package/dist/ace-editor/ace/mode-eiffel.js +120 -0
  91. package/dist/ace-editor/ace/mode-ejs.js +3278 -0
  92. package/dist/ace-editor/ace/mode-elixir.js +443 -0
  93. package/dist/ace-editor/ace/mode-elm.js +274 -0
  94. package/dist/ace-editor/ace/mode-erlang.js +836 -0
  95. package/dist/ace-editor/ace/mode-flix.js +163 -0
  96. package/dist/ace-editor/ace/mode-forth.js +253 -0
  97. package/dist/ace-editor/ace/mode-fortran.js +361 -0
  98. package/dist/ace-editor/ace/mode-fsharp.js +277 -0
  99. package/dist/ace-editor/ace/mode-fsl.js +226 -0
  100. package/dist/ace-editor/ace/mode-ftl.js +1256 -0
  101. package/dist/ace-editor/ace/mode-gcode.js +74 -0
  102. package/dist/ace-editor/ace/mode-gherkin.js +154 -0
  103. package/dist/ace-editor/ace/mode-gitignore.js +49 -0
  104. package/dist/ace-editor/ace/mode-glsl.js +475 -0
  105. package/dist/ace-editor/ace/mode-gobstones.js +1460 -0
  106. package/dist/ace-editor/ace/mode-golang.js +341 -0
  107. package/dist/ace-editor/ace/mode-graphqlschema.js +174 -0
  108. package/dist/ace-editor/ace/mode-groovy.js +1402 -0
  109. package/dist/ace-editor/ace/mode-groq.js +288 -0
  110. package/dist/ace-editor/ace/mode-haml.js +1907 -0
  111. package/dist/ace-editor/ace/mode-handlebars.js +2439 -0
  112. package/dist/ace-editor/ace/mode-haskell.js +324 -0
  113. package/dist/ace-editor/ace/mode-haskell_cabal.js +135 -0
  114. package/dist/ace-editor/ace/mode-haxe.js +313 -0
  115. package/dist/ace-editor/ace/mode-hjson.js +318 -0
  116. package/dist/ace-editor/ace/mode-html.js +2340 -0
  117. package/dist/ace-editor/ace/mode-html_elixir.js +2846 -0
  118. package/dist/ace-editor/ace/mode-html_ruby.js +3295 -0
  119. package/dist/ace-editor/ace/mode-ini.js +138 -0
  120. package/dist/ace-editor/ace/mode-io.js +210 -0
  121. package/dist/ace-editor/ace/mode-ion.js +477 -0
  122. package/dist/ace-editor/ace/mode-jack.js +293 -0
  123. package/dist/ace-editor/ace/mode-jade.js +2018 -0
  124. package/dist/ace-editor/ace/mode-java.js +1566 -0
  125. package/dist/ace-editor/ace/mode-javascript.js +1192 -0
  126. package/dist/ace-editor/ace/mode-jexl.js +270 -0
  127. package/dist/ace-editor/ace/mode-json.js +275 -0
  128. package/dist/ace-editor/ace/mode-json5.js +308 -0
  129. package/dist/ace-editor/ace/mode-jsoniq.js +2577 -0
  130. package/dist/ace-editor/ace/mode-jsp.js +1619 -0
  131. package/dist/ace-editor/ace/mode-jssm.js +293 -0
  132. package/dist/ace-editor/ace/mode-jsx.js +1210 -0
  133. package/dist/ace-editor/ace/mode-julia.js +254 -0
  134. package/dist/ace-editor/ace/mode-kotlin.js +445 -0
  135. package/dist/ace-editor/ace/mode-latex.js +252 -0
  136. package/dist/ace-editor/ace/mode-latte.js +2523 -0
  137. package/dist/ace-editor/ace/mode-less.js +742 -0
  138. package/dist/ace-editor/ace/mode-liquid.js +2742 -0
  139. package/dist/ace-editor/ace/mode-lisp.js +104 -0
  140. package/dist/ace-editor/ace/mode-livescript.js +272 -0
  141. package/dist/ace-editor/ace/mode-logiql.js +272 -0
  142. package/dist/ace-editor/ace/mode-logtalk.js +309 -0
  143. package/dist/ace-editor/ace/mode-lsl.js +287 -0
  144. package/dist/ace-editor/ace/mode-lua.js +393 -0
  145. package/dist/ace-editor/ace/mode-luapage.js +2786 -0
  146. package/dist/ace-editor/ace/mode-lucene.js +145 -0
  147. package/dist/ace-editor/ace/mode-makefile.js +374 -0
  148. package/dist/ace-editor/ace/mode-mariadb.js +149 -0
  149. package/dist/ace-editor/ace/mode-markdown.js +2936 -0
  150. package/dist/ace-editor/ace/mode-mask.js +1758 -0
  151. package/dist/ace-editor/ace/mode-matlab.js +239 -0
  152. package/dist/ace-editor/ace/mode-maze.js +256 -0
  153. package/dist/ace-editor/ace/mode-mediawiki.js +580 -0
  154. package/dist/ace-editor/ace/mode-mel.js +213 -0
  155. package/dist/ace-editor/ace/mode-mips.js +231 -0
  156. package/dist/ace-editor/ace/mode-mixal.js +110 -0
  157. package/dist/ace-editor/ace/mode-mushcode.js +642 -0
  158. package/dist/ace-editor/ace/mode-mysql.js +150 -0
  159. package/dist/ace-editor/ace/mode-nasal.js +513 -0
  160. package/dist/ace-editor/ace/mode-nginx.js +262 -0
  161. package/dist/ace-editor/ace/mode-nim.js +325 -0
  162. package/dist/ace-editor/ace/mode-nix.js +555 -0
  163. package/dist/ace-editor/ace/mode-nsis.js +279 -0
  164. package/dist/ace-editor/ace/mode-nunjucks.js +2678 -0
  165. package/dist/ace-editor/ace/mode-objectivec.js +626 -0
  166. package/dist/ace-editor/ace/mode-ocaml.js +378 -0
  167. package/dist/ace-editor/ace/mode-odin.js +449 -0
  168. package/dist/ace-editor/ace/mode-partiql.js +750 -0
  169. package/dist/ace-editor/ace/mode-pascal.js +204 -0
  170. package/dist/ace-editor/ace/mode-perl.js +318 -0
  171. package/dist/ace-editor/ace/mode-pgsql.js +1861 -0
  172. package/dist/ace-editor/ace/mode-php.js +14079 -0
  173. package/dist/ace-editor/ace/mode-php_laravel_blade.js +14267 -0
  174. package/dist/ace-editor/ace/mode-pig.js +278 -0
  175. package/dist/ace-editor/ace/mode-plain_text.js +27 -0
  176. package/dist/ace-editor/ace/mode-plsql.js +268 -0
  177. package/dist/ace-editor/ace/mode-powershell.js +567 -0
  178. package/dist/ace-editor/ace/mode-praat.js +412 -0
  179. package/dist/ace-editor/ace/mode-prisma.js +457 -0
  180. package/dist/ace-editor/ace/mode-prolog.js +305 -0
  181. package/dist/ace-editor/ace/mode-properties.js +69 -0
  182. package/dist/ace-editor/ace/mode-protobuf.js +498 -0
  183. package/dist/ace-editor/ace/mode-prql.js +323 -0
  184. package/dist/ace-editor/ace/mode-puppet.js +316 -0
  185. package/dist/ace-editor/ace/mode-python.js +476 -0
  186. package/dist/ace-editor/ace/mode-qml.js +346 -0
  187. package/dist/ace-editor/ace/mode-r.js +387 -0
  188. package/dist/ace-editor/ace/mode-raku.js +516 -0
  189. package/dist/ace-editor/ace/mode-razor.js +2698 -0
  190. package/dist/ace-editor/ace/mode-rdoc.js +286 -0
  191. package/dist/ace-editor/ace/mode-red.js +388 -0
  192. package/dist/ace-editor/ace/mode-redshift.js +321 -0
  193. package/dist/ace-editor/ace/mode-rhtml.js +2751 -0
  194. package/dist/ace-editor/ace/mode-robot.js +168 -0
  195. package/dist/ace-editor/ace/mode-rst.js +245 -0
  196. package/dist/ace-editor/ace/mode-ruby.js +921 -0
  197. package/dist/ace-editor/ace/mode-rust.js +393 -0
  198. package/dist/ace-editor/ace/mode-sac.js +349 -0
  199. package/dist/ace-editor/ace/mode-sass.js +480 -0
  200. package/dist/ace-editor/ace/mode-scad.js +350 -0
  201. package/dist/ace-editor/ace/mode-scala.js +1396 -0
  202. package/dist/ace-editor/ace/mode-scheme.js +210 -0
  203. package/dist/ace-editor/ace/mode-scrypt.js +317 -0
  204. package/dist/ace-editor/ace/mode-scss.js +768 -0
  205. package/dist/ace-editor/ace/mode-sh.js +387 -0
  206. package/dist/ace-editor/ace/mode-sjs.js +1394 -0
  207. package/dist/ace-editor/ace/mode-slim.js +4771 -0
  208. package/dist/ace-editor/ace/mode-smarty.js +2437 -0
  209. package/dist/ace-editor/ace/mode-smithy.js +456 -0
  210. package/dist/ace-editor/ace/mode-snippets.js +183 -0
  211. package/dist/ace-editor/ace/mode-soy_template.js +2612 -0
  212. package/dist/ace-editor/ace/mode-space.js +151 -0
  213. package/dist/ace-editor/ace/mode-sparql.js +288 -0
  214. package/dist/ace-editor/ace/mode-sql.js +221 -0
  215. package/dist/ace-editor/ace/mode-sqlserver.js +391 -0
  216. package/dist/ace-editor/ace/mode-stylus.js +443 -0
  217. package/dist/ace-editor/ace/mode-svg.js +1488 -0
  218. package/dist/ace-editor/ace/mode-swift.js +342 -0
  219. package/dist/ace-editor/ace/mode-tcl.js +338 -0
  220. package/dist/ace-editor/ace/mode-terraform.js +346 -0
  221. package/dist/ace-editor/ace/mode-tex.js +212 -0
  222. package/dist/ace-editor/ace/mode-text.js +9 -0
  223. package/dist/ace-editor/ace/mode-textile.js +125 -0
  224. package/dist/ace-editor/ace/mode-toml.js +129 -0
  225. package/dist/ace-editor/ace/mode-tsv.js +124 -0
  226. package/dist/ace-editor/ace/mode-tsx.js +1277 -0
  227. package/dist/ace-editor/ace/mode-turtle.js +264 -0
  228. package/dist/ace-editor/ace/mode-twig.js +2503 -0
  229. package/dist/ace-editor/ace/mode-typescript.js +1255 -0
  230. package/dist/ace-editor/ace/mode-vala.js +554 -0
  231. package/dist/ace-editor/ace/mode-vbscript.js +731 -0
  232. package/dist/ace-editor/ace/mode-velocity.js +2581 -0
  233. package/dist/ace-editor/ace/mode-verilog.js +98 -0
  234. package/dist/ace-editor/ace/mode-vhdl.js +94 -0
  235. package/dist/ace-editor/ace/mode-visualforce.js +2455 -0
  236. package/dist/ace-editor/ace/mode-vue.js +3835 -0
  237. package/dist/ace-editor/ace/mode-wollok.js +1330 -0
  238. package/dist/ace-editor/ace/mode-xml.js +477 -0
  239. package/dist/ace-editor/ace/mode-xquery.js +2589 -0
  240. package/dist/ace-editor/ace/mode-yaml.js +395 -0
  241. package/dist/ace-editor/ace/mode-zeek.js +502 -0
  242. package/dist/ace-editor/ace/mode-zig.js +585 -0
  243. package/dist/ace-editor/ace/snippets/abap.js +9 -0
  244. package/dist/ace-editor/ace/snippets/abc.js +16 -0
  245. package/dist/ace-editor/ace/snippets/actionscript.js +16 -0
  246. package/dist/ace-editor/ace/snippets/ada.js +9 -0
  247. package/dist/ace-editor/ace/snippets/alda.js +9 -0
  248. package/dist/ace-editor/ace/snippets/apache_conf.js +9 -0
  249. package/dist/ace-editor/ace/snippets/apex.js +9 -0
  250. package/dist/ace-editor/ace/snippets/applescript.js +9 -0
  251. package/dist/ace-editor/ace/snippets/aql.js +9 -0
  252. package/dist/ace-editor/ace/snippets/asciidoc.js +9 -0
  253. package/dist/ace-editor/ace/snippets/asl.js +9 -0
  254. package/dist/ace-editor/ace/snippets/assembly_arm32.js +9 -0
  255. package/dist/ace-editor/ace/snippets/assembly_x86.js +9 -0
  256. package/dist/ace-editor/ace/snippets/astro.js +9 -0
  257. package/dist/ace-editor/ace/snippets/autohotkey.js +9 -0
  258. package/dist/ace-editor/ace/snippets/basic.js +9 -0
  259. package/dist/ace-editor/ace/snippets/batchfile.js +9 -0
  260. package/dist/ace-editor/ace/snippets/bibtex.js +9 -0
  261. package/dist/ace-editor/ace/snippets/c9search.js +9 -0
  262. package/dist/ace-editor/ace/snippets/c_cpp.js +16 -0
  263. package/dist/ace-editor/ace/snippets/cedar.js +16 -0
  264. package/dist/ace-editor/ace/snippets/cedarschema.js +16 -0
  265. package/dist/ace-editor/ace/snippets/cirru.js +9 -0
  266. package/dist/ace-editor/ace/snippets/clojure.js +16 -0
  267. package/dist/ace-editor/ace/snippets/clue.js +9 -0
  268. package/dist/ace-editor/ace/snippets/cobol.js +9 -0
  269. package/dist/ace-editor/ace/snippets/coffee.js +16 -0
  270. package/dist/ace-editor/ace/snippets/coldfusion.js +9 -0
  271. package/dist/ace-editor/ace/snippets/crystal.js +9 -0
  272. package/dist/ace-editor/ace/snippets/csharp.js +9 -0
  273. package/dist/ace-editor/ace/snippets/csound_document.js +16 -0
  274. package/dist/ace-editor/ace/snippets/csound_orchestra.js +16 -0
  275. package/dist/ace-editor/ace/snippets/csound_score.js +9 -0
  276. package/dist/ace-editor/ace/snippets/csp.js +9 -0
  277. package/dist/ace-editor/ace/snippets/css.js +16 -0
  278. package/dist/ace-editor/ace/snippets/csv.js +9 -0
  279. package/dist/ace-editor/ace/snippets/curly.js +9 -0
  280. package/dist/ace-editor/ace/snippets/cuttlefish.js +9 -0
  281. package/dist/ace-editor/ace/snippets/d.js +9 -0
  282. package/dist/ace-editor/ace/snippets/dart.js +16 -0
  283. package/dist/ace-editor/ace/snippets/diff.js +16 -0
  284. package/dist/ace-editor/ace/snippets/django.js +16 -0
  285. package/dist/ace-editor/ace/snippets/dockerfile.js +9 -0
  286. package/dist/ace-editor/ace/snippets/dot.js +9 -0
  287. package/dist/ace-editor/ace/snippets/drools.js +16 -0
  288. package/dist/ace-editor/ace/snippets/edifact.js +16 -0
  289. package/dist/ace-editor/ace/snippets/eiffel.js +9 -0
  290. package/dist/ace-editor/ace/snippets/ejs.js +9 -0
  291. package/dist/ace-editor/ace/snippets/elixir.js +9 -0
  292. package/dist/ace-editor/ace/snippets/elm.js +9 -0
  293. package/dist/ace-editor/ace/snippets/erlang.js +16 -0
  294. package/dist/ace-editor/ace/snippets/flix.js +9 -0
  295. package/dist/ace-editor/ace/snippets/forth.js +9 -0
  296. package/dist/ace-editor/ace/snippets/fortran.js +9 -0
  297. package/dist/ace-editor/ace/snippets/fsharp.js +9 -0
  298. package/dist/ace-editor/ace/snippets/fsl.js +16 -0
  299. package/dist/ace-editor/ace/snippets/ftl.js +9 -0
  300. package/dist/ace-editor/ace/snippets/gcode.js +9 -0
  301. package/dist/ace-editor/ace/snippets/gherkin.js +9 -0
  302. package/dist/ace-editor/ace/snippets/gitignore.js +9 -0
  303. package/dist/ace-editor/ace/snippets/glsl.js +9 -0
  304. package/dist/ace-editor/ace/snippets/gobstones.js +16 -0
  305. package/dist/ace-editor/ace/snippets/golang.js +9 -0
  306. package/dist/ace-editor/ace/snippets/graphqlschema.js +16 -0
  307. package/dist/ace-editor/ace/snippets/groovy.js +9 -0
  308. package/dist/ace-editor/ace/snippets/groq.js +9 -0
  309. package/dist/ace-editor/ace/snippets/haml.js +16 -0
  310. package/dist/ace-editor/ace/snippets/handlebars.js +9 -0
  311. package/dist/ace-editor/ace/snippets/haskell.js +16 -0
  312. package/dist/ace-editor/ace/snippets/haskell_cabal.js +9 -0
  313. package/dist/ace-editor/ace/snippets/haxe.js +9 -0
  314. package/dist/ace-editor/ace/snippets/hjson.js +9 -0
  315. package/dist/ace-editor/ace/snippets/html.js +16 -0
  316. package/dist/ace-editor/ace/snippets/html_elixir.js +9 -0
  317. package/dist/ace-editor/ace/snippets/html_ruby.js +9 -0
  318. package/dist/ace-editor/ace/snippets/ini.js +9 -0
  319. package/dist/ace-editor/ace/snippets/io.js +74 -0
  320. package/dist/ace-editor/ace/snippets/ion.js +9 -0
  321. package/dist/ace-editor/ace/snippets/jack.js +9 -0
  322. package/dist/ace-editor/ace/snippets/jade.js +9 -0
  323. package/dist/ace-editor/ace/snippets/java.js +16 -0
  324. package/dist/ace-editor/ace/snippets/javascript.js +16 -0
  325. package/dist/ace-editor/ace/snippets/jexl.js +9 -0
  326. package/dist/ace-editor/ace/snippets/json.js +9 -0
  327. package/dist/ace-editor/ace/snippets/json5.js +9 -0
  328. package/dist/ace-editor/ace/snippets/jsoniq.js +78 -0
  329. package/dist/ace-editor/ace/snippets/jsp.js +16 -0
  330. package/dist/ace-editor/ace/snippets/jssm.js +9 -0
  331. package/dist/ace-editor/ace/snippets/jsx.js +9 -0
  332. package/dist/ace-editor/ace/snippets/julia.js +9 -0
  333. package/dist/ace-editor/ace/snippets/kotlin.js +9 -0
  334. package/dist/ace-editor/ace/snippets/latex.js +9 -0
  335. package/dist/ace-editor/ace/snippets/latte.js +9 -0
  336. package/dist/ace-editor/ace/snippets/less.js +9 -0
  337. package/dist/ace-editor/ace/snippets/liquid.js +16 -0
  338. package/dist/ace-editor/ace/snippets/lisp.js +9 -0
  339. package/dist/ace-editor/ace/snippets/livescript.js +9 -0
  340. package/dist/ace-editor/ace/snippets/logiql.js +9 -0
  341. package/dist/ace-editor/ace/snippets/logtalk.js +9 -0
  342. package/dist/ace-editor/ace/snippets/lsl.js +16 -0
  343. package/dist/ace-editor/ace/snippets/lua.js +16 -0
  344. package/dist/ace-editor/ace/snippets/luapage.js +9 -0
  345. package/dist/ace-editor/ace/snippets/lucene.js +9 -0
  346. package/dist/ace-editor/ace/snippets/makefile.js +16 -0
  347. package/dist/ace-editor/ace/snippets/mariadb.js +9 -0
  348. package/dist/ace-editor/ace/snippets/markdown.js +16 -0
  349. package/dist/ace-editor/ace/snippets/mask.js +9 -0
  350. package/dist/ace-editor/ace/snippets/matlab.js +9 -0
  351. package/dist/ace-editor/ace/snippets/maze.js +16 -0
  352. package/dist/ace-editor/ace/snippets/mediawiki.js +9 -0
  353. package/dist/ace-editor/ace/snippets/mel.js +9 -0
  354. package/dist/ace-editor/ace/snippets/mips.js +9 -0
  355. package/dist/ace-editor/ace/snippets/mixal.js +9 -0
  356. package/dist/ace-editor/ace/snippets/mushcode.js +9 -0
  357. package/dist/ace-editor/ace/snippets/mysql.js +9 -0
  358. package/dist/ace-editor/ace/snippets/nasal.js +9 -0
  359. package/dist/ace-editor/ace/snippets/nginx.js +9 -0
  360. package/dist/ace-editor/ace/snippets/nim.js +9 -0
  361. package/dist/ace-editor/ace/snippets/nix.js +9 -0
  362. package/dist/ace-editor/ace/snippets/nsis.js +9 -0
  363. package/dist/ace-editor/ace/snippets/nunjucks.js +9 -0
  364. package/dist/ace-editor/ace/snippets/objectivec.js +9 -0
  365. package/dist/ace-editor/ace/snippets/ocaml.js +9 -0
  366. package/dist/ace-editor/ace/snippets/odin.js +9 -0
  367. package/dist/ace-editor/ace/snippets/partiql.js +9 -0
  368. package/dist/ace-editor/ace/snippets/pascal.js +9 -0
  369. package/dist/ace-editor/ace/snippets/perl.js +16 -0
  370. package/dist/ace-editor/ace/snippets/pgsql.js +9 -0
  371. package/dist/ace-editor/ace/snippets/php.js +16 -0
  372. package/dist/ace-editor/ace/snippets/php_laravel_blade.js +9 -0
  373. package/dist/ace-editor/ace/snippets/pig.js +9 -0
  374. package/dist/ace-editor/ace/snippets/plain_text.js +9 -0
  375. package/dist/ace-editor/ace/snippets/plsql.js +9 -0
  376. package/dist/ace-editor/ace/snippets/powershell.js +9 -0
  377. package/dist/ace-editor/ace/snippets/praat.js +9 -0
  378. package/dist/ace-editor/ace/snippets/prisma.js +9 -0
  379. package/dist/ace-editor/ace/snippets/prolog.js +9 -0
  380. package/dist/ace-editor/ace/snippets/properties.js +9 -0
  381. package/dist/ace-editor/ace/snippets/protobuf.js +9 -0
  382. package/dist/ace-editor/ace/snippets/prql.js +9 -0
  383. package/dist/ace-editor/ace/snippets/puppet.js +9 -0
  384. package/dist/ace-editor/ace/snippets/python.js +16 -0
  385. package/dist/ace-editor/ace/snippets/qml.js +9 -0
  386. package/dist/ace-editor/ace/snippets/r.js +16 -0
  387. package/dist/ace-editor/ace/snippets/raku.js +9 -0
  388. package/dist/ace-editor/ace/snippets/razor.js +16 -0
  389. package/dist/ace-editor/ace/snippets/rdoc.js +9 -0
  390. package/dist/ace-editor/ace/snippets/red.js +9 -0
  391. package/dist/ace-editor/ace/snippets/redshift.js +9 -0
  392. package/dist/ace-editor/ace/snippets/rhtml.js +9 -0
  393. package/dist/ace-editor/ace/snippets/robot.js +16 -0
  394. package/dist/ace-editor/ace/snippets/rst.js +16 -0
  395. package/dist/ace-editor/ace/snippets/ruby.js +16 -0
  396. package/dist/ace-editor/ace/snippets/rust.js +9 -0
  397. package/dist/ace-editor/ace/snippets/sac.js +9 -0
  398. package/dist/ace-editor/ace/snippets/sass.js +9 -0
  399. package/dist/ace-editor/ace/snippets/scad.js +9 -0
  400. package/dist/ace-editor/ace/snippets/scala.js +9 -0
  401. package/dist/ace-editor/ace/snippets/scheme.js +9 -0
  402. package/dist/ace-editor/ace/snippets/scrypt.js +9 -0
  403. package/dist/ace-editor/ace/snippets/scss.js +9 -0
  404. package/dist/ace-editor/ace/snippets/sh.js +16 -0
  405. package/dist/ace-editor/ace/snippets/sjs.js +9 -0
  406. package/dist/ace-editor/ace/snippets/slim.js +9 -0
  407. package/dist/ace-editor/ace/snippets/smarty.js +9 -0
  408. package/dist/ace-editor/ace/snippets/smithy.js +9 -0
  409. package/dist/ace-editor/ace/snippets/snippets.js +16 -0
  410. package/dist/ace-editor/ace/snippets/soy_template.js +9 -0
  411. package/dist/ace-editor/ace/snippets/space.js +9 -0
  412. package/dist/ace-editor/ace/snippets/sparql.js +9 -0
  413. package/dist/ace-editor/ace/snippets/sql.js +16 -0
  414. package/dist/ace-editor/ace/snippets/sqlserver.js +16 -0
  415. package/dist/ace-editor/ace/snippets/stylus.js +9 -0
  416. package/dist/ace-editor/ace/snippets/svg.js +9 -0
  417. package/dist/ace-editor/ace/snippets/swift.js +9 -0
  418. package/dist/ace-editor/ace/snippets/tcl.js +16 -0
  419. package/dist/ace-editor/ace/snippets/terraform.js +9 -0
  420. package/dist/ace-editor/ace/snippets/tex.js +16 -0
  421. package/dist/ace-editor/ace/snippets/text.js +9 -0
  422. package/dist/ace-editor/ace/snippets/textile.js +16 -0
  423. package/dist/ace-editor/ace/snippets/toml.js +9 -0
  424. package/dist/ace-editor/ace/snippets/tsv.js +9 -0
  425. package/dist/ace-editor/ace/snippets/tsx.js +9 -0
  426. package/dist/ace-editor/ace/snippets/turtle.js +9 -0
  427. package/dist/ace-editor/ace/snippets/twig.js +9 -0
  428. package/dist/ace-editor/ace/snippets/typescript.js +9 -0
  429. package/dist/ace-editor/ace/snippets/vala.js +199 -0
  430. package/dist/ace-editor/ace/snippets/vbscript.js +9 -0
  431. package/dist/ace-editor/ace/snippets/velocity.js +17 -0
  432. package/dist/ace-editor/ace/snippets/verilog.js +9 -0
  433. package/dist/ace-editor/ace/snippets/vhdl.js +9 -0
  434. package/dist/ace-editor/ace/snippets/visualforce.js +9 -0
  435. package/dist/ace-editor/ace/snippets/vue.js +9 -0
  436. package/dist/ace-editor/ace/snippets/wollok.js +16 -0
  437. package/dist/ace-editor/ace/snippets/xml.js +9 -0
  438. package/dist/ace-editor/ace/snippets/xquery.js +78 -0
  439. package/dist/ace-editor/ace/snippets/yaml.js +9 -0
  440. package/dist/ace-editor/ace/snippets/zeek.js +9 -0
  441. package/dist/ace-editor/ace/snippets/zig.js +9 -0
  442. package/dist/ace-editor/ace/theme-ambiance.js +18 -0
  443. package/dist/ace-editor/ace/theme-chaos.js +18 -0
  444. package/dist/ace-editor/ace/theme-chrome.js +18 -0
  445. package/dist/ace-editor/ace/theme-cloud9_day.js +19 -0
  446. package/dist/ace-editor/ace/theme-cloud9_night.js +18 -0
  447. package/dist/ace-editor/ace/theme-cloud9_night_low_color.js +18 -0
  448. package/dist/ace-editor/ace/theme-cloud_editor.js +19 -0
  449. package/dist/ace-editor/ace/theme-cloud_editor_dark.js +19 -0
  450. package/dist/ace-editor/ace/theme-clouds.js +18 -0
  451. package/dist/ace-editor/ace/theme-clouds_midnight.js +18 -0
  452. package/dist/ace-editor/ace/theme-cobalt.js +18 -0
  453. package/dist/ace-editor/ace/theme-crimson_editor.js +18 -0
  454. package/dist/ace-editor/ace/theme-dawn.js +18 -0
  455. package/dist/ace-editor/ace/theme-dracula.js +19 -0
  456. package/dist/ace-editor/ace/theme-dreamweaver.js +18 -0
  457. package/dist/ace-editor/ace/theme-eclipse.js +19 -0
  458. package/dist/ace-editor/ace/theme-github.js +18 -0
  459. package/dist/ace-editor/ace/theme-github_dark.js +18 -0
  460. package/dist/ace-editor/ace/theme-github_light_default.js +18 -0
  461. package/dist/ace-editor/ace/theme-gob.js +18 -0
  462. package/dist/ace-editor/ace/theme-gruvbox.js +18 -0
  463. package/dist/ace-editor/ace/theme-gruvbox_dark_hard.js +18 -0
  464. package/dist/ace-editor/ace/theme-gruvbox_light_hard.js +18 -0
  465. package/dist/ace-editor/ace/theme-idle_fingers.js +18 -0
  466. package/dist/ace-editor/ace/theme-iplastic.js +18 -0
  467. package/dist/ace-editor/ace/theme-katzenmilch.js +18 -0
  468. package/dist/ace-editor/ace/theme-kr_theme.js +18 -0
  469. package/dist/ace-editor/ace/theme-kuroir.js +18 -0
  470. package/dist/ace-editor/ace/theme-merbivore.js +18 -0
  471. package/dist/ace-editor/ace/theme-merbivore_soft.js +18 -0
  472. package/dist/ace-editor/ace/theme-mono_industrial.js +18 -0
  473. package/dist/ace-editor/ace/theme-monokai.js +18 -0
  474. package/dist/ace-editor/ace/theme-nord_dark.js +19 -0
  475. package/dist/ace-editor/ace/theme-one_dark.js +18 -0
  476. package/dist/ace-editor/ace/theme-pastel_on_dark.js +18 -0
  477. package/dist/ace-editor/ace/theme-solarized_dark.js +18 -0
  478. package/dist/ace-editor/ace/theme-solarized_light.js +18 -0
  479. package/dist/ace-editor/ace/theme-sqlserver.js +18 -0
  480. package/dist/ace-editor/ace/theme-terminal.js +18 -0
  481. package/dist/ace-editor/ace/theme-textmate.js +16 -0
  482. package/dist/ace-editor/ace/theme-tomorrow.js +18 -0
  483. package/dist/ace-editor/ace/theme-tomorrow_night.js +18 -0
  484. package/dist/ace-editor/ace/theme-tomorrow_night_blue.js +18 -0
  485. package/dist/ace-editor/ace/theme-tomorrow_night_bright.js +18 -0
  486. package/dist/ace-editor/ace/theme-tomorrow_night_eighties.js +18 -0
  487. package/dist/ace-editor/ace/theme-twilight.js +18 -0
  488. package/dist/ace-editor/ace/theme-vibrant_ink.js +18 -0
  489. package/dist/ace-editor/ace/theme-xcode.js +18 -0
  490. package/dist/ace-editor/ace/worker-base.js +1337 -0
  491. package/dist/ace-editor/ace/worker-coffee.js +1386 -0
  492. package/dist/ace-editor/ace/worker-css.js +8918 -0
  493. package/dist/ace-editor/ace/worker-html.js +10848 -0
  494. package/dist/ace-editor/ace/worker-javascript.js +15358 -0
  495. package/dist/ace-editor/ace/worker-json.js +1631 -0
  496. package/dist/ace-editor/ace/worker-lua.js +3524 -0
  497. package/dist/ace-editor/ace/worker-php.js +3793 -0
  498. package/dist/ace-editor/ace/worker-xml.js +3127 -0
  499. package/dist/ace-editor/ace/worker-xquery.js +57584 -0
  500. package/dist/ace-editor/ace/worker-yaml.js +5824 -0
  501. package/dist/ace-editor/internal/AceEditor.d.ts +22 -0
  502. package/dist/ace-editor/internal/AceEditor.js +113 -0
  503. package/dist/ace-editor/internal/AceEditor.js.map +1 -0
  504. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.d.ts +55 -0
  505. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js +205 -0
  506. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js.map +1 -0
  507. package/dist/ace-editor/internal/ace-editor-base/debounce.d.ts +24 -0
  508. package/dist/ace-editor/internal/ace-editor-base/debounce.js +41 -0
  509. package/dist/ace-editor/internal/ace-editor-base/debounce.js.map +1 -0
  510. package/dist/ace-editor/internal/ace-editor-base/property-decorators.d.ts +66 -0
  511. package/dist/ace-editor/internal/ace-editor-base/property-decorators.js +171 -0
  512. package/dist/ace-editor/internal/ace-editor-base/property-decorators.js.map +1 -0
  513. package/dist/ace-editor/internal/ace-theme-oscd.d.ts +1 -0
  514. package/dist/ace-editor/internal/ace-theme-oscd.js +247 -0
  515. package/dist/ace-editor/internal/ace-theme-oscd.js.map +1 -0
  516. package/dist/ace-editor/internal/ace.config.d.ts +54 -0
  517. package/dist/ace-editor/internal/ace.config.js +61 -0
  518. package/dist/ace-editor/internal/ace.config.js.map +1 -0
  519. package/dist/ace-editor/oscd-ace-editor.d.ts +2 -0
  520. package/dist/ace-editor/oscd-ace-editor.js +4 -0
  521. package/dist/ace-editor/oscd-ace-editor.js.map +1 -0
  522. package/dist/action-icon/OscdActionIcon.js +1 -3
  523. package/dist/action-icon/OscdActionIcon.js.map +1 -1
  524. package/dist/action-list/OscdActionList.js +8 -8
  525. package/dist/action-list/OscdActionList.js.map +1 -1
  526. package/dist/action-pane/OscdActionPane.js +1 -3
  527. package/dist/action-pane/OscdActionPane.js.map +1 -1
  528. package/dist/action-tree/OscdActionTree.js +23 -23
  529. package/dist/action-tree/OscdActionTree.js.map +1 -1
  530. package/dist/app-bar/OscdAppBar.d.ts +1 -1
  531. package/dist/app-bar/OscdAppBar.js +1 -1
  532. package/dist/app-bar/OscdAppBar.js.map +1 -1
  533. package/dist/app-bar/oscd-app-bar.d.ts +1 -1
  534. package/dist/app-bar/oscd-app-bar.js +1 -1
  535. package/dist/app-bar/oscd-app-bar.js.map +1 -1
  536. package/dist/button/OscdElevatedButton.d.ts +1 -1
  537. package/dist/button/OscdElevatedButton.js +1 -1
  538. package/dist/button/OscdElevatedButton.js.map +1 -1
  539. package/dist/button/OscdFilledButton.d.ts +1 -1
  540. package/dist/button/OscdFilledButton.js +1 -1
  541. package/dist/button/OscdFilledButton.js.map +1 -1
  542. package/dist/button/OscdFilledTonalButton.d.ts +1 -1
  543. package/dist/button/OscdFilledTonalButton.js +1 -1
  544. package/dist/button/OscdFilledTonalButton.js.map +1 -1
  545. package/dist/button/OscdOutlinedButton.d.ts +1 -1
  546. package/dist/button/OscdOutlinedButton.js +1 -1
  547. package/dist/button/OscdOutlinedButton.js.map +1 -1
  548. package/dist/button/OscdTextButton.d.ts +1 -1
  549. package/dist/button/OscdTextButton.js +1 -1
  550. package/dist/button/OscdTextButton.js.map +1 -1
  551. package/dist/checkbox/OscdCheckbox.d.ts +1 -1
  552. package/dist/checkbox/OscdCheckbox.js +1 -1
  553. package/dist/checkbox/OscdCheckbox.js.map +1 -1
  554. package/dist/chips/OscdAssistChip.d.ts +1 -1
  555. package/dist/chips/OscdAssistChip.js +1 -1
  556. package/dist/chips/OscdAssistChip.js.map +1 -1
  557. package/dist/chips/OscdChipSet.d.ts +1 -1
  558. package/dist/chips/OscdChipSet.js.map +1 -1
  559. package/dist/chips/OscdFilterChip.d.ts +1 -1
  560. package/dist/chips/OscdFilterChip.js +1 -1
  561. package/dist/chips/OscdFilterChip.js.map +1 -1
  562. package/dist/chips/OscdInputChip.d.ts +1 -1
  563. package/dist/chips/OscdInputChip.js +1 -1
  564. package/dist/chips/OscdInputChip.js.map +1 -1
  565. package/dist/chips/OscdSuggestionChip.d.ts +1 -1
  566. package/dist/chips/OscdSuggestionChip.js +1 -1
  567. package/dist/chips/OscdSuggestionChip.js.map +1 -1
  568. package/dist/decorators/localstorage.js.map +1 -1
  569. package/dist/dialog/OscdDialog.d.ts +1 -1
  570. package/dist/dialog/OscdDialog.js +1 -1
  571. package/dist/dialog/OscdDialog.js.map +1 -1
  572. package/dist/dialog/warning/OscdWarnDialog.d.ts +31 -0
  573. package/dist/dialog/warning/OscdWarnDialog.js +74 -0
  574. package/dist/dialog/warning/OscdWarnDialog.js.map +1 -0
  575. package/dist/dialog/warning/oscd-warn-dialog.d.ts +2 -0
  576. package/dist/dialog/warning/oscd-warn-dialog.js +4 -0
  577. package/dist/dialog/warning/oscd-warn-dialog.js.map +1 -0
  578. package/dist/divider/OscdDivider.d.ts +1 -1
  579. package/dist/divider/OscdDivider.js.map +1 -1
  580. package/dist/elevation/OscdElevation.d.ts +1 -1
  581. package/dist/elevation/OscdElevation.js.map +1 -1
  582. package/dist/fab/OscdBrandedFab.d.ts +1 -1
  583. package/dist/fab/OscdBrandedFab.js +1 -1
  584. package/dist/fab/OscdBrandedFab.js.map +1 -1
  585. package/dist/fab/OscdFab.d.ts +1 -1
  586. package/dist/fab/OscdFab.js +1 -1
  587. package/dist/fab/OscdFab.js.map +1 -1
  588. package/dist/field/OscdFilledField.d.ts +1 -1
  589. package/dist/field/OscdFilledField.js.map +1 -1
  590. package/dist/field/OscdOutlinedField.d.ts +1 -1
  591. package/dist/field/OscdOutlinedField.js.map +1 -1
  592. package/dist/filter-button/OscdFilterButton.js.map +1 -1
  593. package/dist/focus/OscdFocusRing.d.ts +1 -1
  594. package/dist/focus/OscdFocusRing.js.map +1 -1
  595. package/dist/icon/OscdIcon.d.ts +1 -1
  596. package/dist/icon/OscdIcon.js +1 -1
  597. package/dist/icon/OscdIcon.js.map +1 -1
  598. package/dist/icon/internal/icon.d.ts +1 -1
  599. package/dist/icon/internal/icon.js +1 -1
  600. package/dist/icon/internal/icon.js.map +1 -1
  601. package/dist/iconbutton/OscdFilledIconButton.d.ts +1 -1
  602. package/dist/iconbutton/OscdFilledIconButton.js +1 -1
  603. package/dist/iconbutton/OscdFilledIconButton.js.map +1 -1
  604. package/dist/iconbutton/OscdFilledTonalIconButton.d.ts +1 -1
  605. package/dist/iconbutton/OscdFilledTonalIconButton.js +1 -1
  606. package/dist/iconbutton/OscdFilledTonalIconButton.js.map +1 -1
  607. package/dist/iconbutton/OscdIconButton.d.ts +1 -1
  608. package/dist/iconbutton/OscdIconButton.js +1 -1
  609. package/dist/iconbutton/OscdIconButton.js.map +1 -1
  610. package/dist/iconbutton/OscdOutlinedIconButton.d.ts +1 -1
  611. package/dist/iconbutton/OscdOutlinedIconButton.js +1 -1
  612. package/dist/iconbutton/OscdOutlinedIconButton.js.map +1 -1
  613. package/dist/labs/badge/OscdBadge.d.ts +1 -1
  614. package/dist/labs/badge/OscdBadge.js.map +1 -1
  615. package/dist/labs/card/OscdElevatedCard.d.ts +1 -1
  616. package/dist/labs/card/OscdElevatedCard.js +1 -1
  617. package/dist/labs/card/OscdElevatedCard.js.map +1 -1
  618. package/dist/labs/card/OscdFilledCard.d.ts +1 -1
  619. package/dist/labs/card/OscdFilledCard.js +1 -1
  620. package/dist/labs/card/OscdFilledCard.js.map +1 -1
  621. package/dist/labs/card/OscdOutlinedCard.d.ts +1 -1
  622. package/dist/labs/card/OscdOutlinedCard.js +1 -1
  623. package/dist/labs/card/OscdOutlinedCard.js.map +1 -1
  624. package/dist/labs/item/OscdItem.d.ts +1 -1
  625. package/dist/labs/item/OscdItem.js.map +1 -1
  626. package/dist/labs/navigationbar/OscdNavigationBar.d.ts +1 -1
  627. package/dist/labs/navigationbar/OscdNavigationBar.js +1 -1
  628. package/dist/labs/navigationbar/OscdNavigationBar.js.map +1 -1
  629. package/dist/labs/navigationtab/OscdNavigationTab.d.ts +1 -1
  630. package/dist/labs/navigationtab/OscdNavigationTab.js +1 -1
  631. package/dist/labs/navigationtab/OscdNavigationTab.js.map +1 -1
  632. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.d.ts +1 -1
  633. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js +1 -1
  634. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js.map +1 -1
  635. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.d.ts +1 -1
  636. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.js.map +1 -1
  637. package/dist/list/OscdList.d.ts +1 -1
  638. package/dist/list/OscdList.js.map +1 -1
  639. package/dist/list/OscdListItem.d.ts +1 -1
  640. package/dist/list/OscdListItem.js +1 -1
  641. package/dist/list/OscdListItem.js.map +1 -1
  642. package/dist/menu/OscdMenu.d.ts +1 -1
  643. package/dist/menu/OscdMenu.js +1 -1
  644. package/dist/menu/OscdMenu.js.map +1 -1
  645. package/dist/menu/OscdMenuItem.d.ts +1 -1
  646. package/dist/menu/OscdMenuItem.js +1 -1
  647. package/dist/menu/OscdMenuItem.js.map +1 -1
  648. package/dist/menu/OscdSubMenu.d.ts +1 -1
  649. package/dist/menu/OscdSubMenu.js.map +1 -1
  650. package/dist/navigation-drawer/OscdNavigationDrawer.d.ts +1 -1
  651. package/dist/navigation-drawer/OscdNavigationDrawer.js +1 -1
  652. package/dist/navigation-drawer/OscdNavigationDrawer.js.map +1 -1
  653. package/dist/navigation-drawer/OscdNavigationDrawerHeader.d.ts +1 -1
  654. package/dist/navigation-drawer/OscdNavigationDrawerHeader.js +1 -1
  655. package/dist/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -1
  656. package/dist/progress/OscdCircularProgress.d.ts +1 -1
  657. package/dist/progress/OscdCircularProgress.js.map +1 -1
  658. package/dist/progress/OscdLinearProgress.d.ts +1 -1
  659. package/dist/progress/OscdLinearProgress.js.map +1 -1
  660. package/dist/radio/OscdRadio.d.ts +1 -1
  661. package/dist/radio/OscdRadio.js +1 -1
  662. package/dist/radio/OscdRadio.js.map +1 -1
  663. package/dist/ripple/OscdRipple.d.ts +1 -1
  664. package/dist/ripple/OscdRipple.js.map +1 -1
  665. package/dist/scl-checkbox/OscdSclCheckbox.js +1 -3
  666. package/dist/scl-checkbox/OscdSclCheckbox.js.map +1 -1
  667. package/dist/scl-icon/OscdSclIcon.d.ts +1 -1
  668. package/dist/scl-icon/OscdSclIcon.js +1 -1
  669. package/dist/scl-icon/OscdSclIcon.js.map +1 -1
  670. package/dist/search-field/internal/OutlinedSearchField.js.map +1 -1
  671. package/dist/select/OscdFilledSelect.d.ts +1 -1
  672. package/dist/select/OscdFilledSelect.js +1 -1
  673. package/dist/select/OscdFilledSelect.js.map +1 -1
  674. package/dist/select/OscdOutlinedSelect.d.ts +1 -1
  675. package/dist/select/OscdOutlinedSelect.js +1 -1
  676. package/dist/select/OscdOutlinedSelect.js.map +1 -1
  677. package/dist/select/OscdSelectOption.d.ts +1 -1
  678. package/dist/select/OscdSelectOption.js +1 -1
  679. package/dist/select/OscdSelectOption.js.map +1 -1
  680. package/dist/selection-list/OscdSelectionList.js.map +1 -1
  681. package/dist/slider/OscdSlider.d.ts +1 -1
  682. package/dist/slider/OscdSlider.js +1 -1
  683. package/dist/slider/OscdSlider.js.map +1 -1
  684. package/dist/switch/OscdSwitch.d.ts +1 -1
  685. package/dist/switch/OscdSwitch.js +1 -1
  686. package/dist/switch/OscdSwitch.js.map +1 -1
  687. package/dist/tabs/OscdPrimaryTab.d.ts +1 -1
  688. package/dist/tabs/OscdPrimaryTab.js +1 -1
  689. package/dist/tabs/OscdPrimaryTab.js.map +1 -1
  690. package/dist/tabs/OscdPrimaryTab.stories.js +1 -3
  691. package/dist/tabs/OscdPrimaryTab.stories.js.map +1 -1
  692. package/dist/tabs/OscdSecondaryTab.d.ts +1 -1
  693. package/dist/tabs/OscdSecondaryTab.js +1 -1
  694. package/dist/tabs/OscdSecondaryTab.js.map +1 -1
  695. package/dist/tabs/OscdSecondaryTab.stories.js +1 -3
  696. package/dist/tabs/OscdSecondaryTab.stories.js.map +1 -1
  697. package/dist/tabs/OscdTabs.d.ts +1 -1
  698. package/dist/tabs/OscdTabs.js +1 -1
  699. package/dist/tabs/OscdTabs.js.map +1 -1
  700. package/dist/textfield/OscdFilledTextField.d.ts +1 -1
  701. package/dist/textfield/OscdFilledTextField.js +1 -1
  702. package/dist/textfield/OscdFilledTextField.js.map +1 -1
  703. package/dist/textfield/OscdOutlinedTextField.d.ts +1 -1
  704. package/dist/textfield/OscdOutlinedTextField.js +1 -1
  705. package/dist/textfield/OscdOutlinedTextField.js.map +1 -1
  706. package/dist/tree/OscdTree.stories.js.map +1 -1
  707. package/dist/tree/internal/Tree.js +2 -2
  708. package/dist/tree/internal/Tree.js.map +1 -1
  709. package/dist/tree-grid/OscdTreeGrid.js +1 -4
  710. package/dist/tree-grid/OscdTreeGrid.js.map +1 -1
  711. package/dist/utils/storybook/getStorybookHelpers.js +2 -2
  712. package/dist/utils/storybook/getStorybookHelpers.js.map +1 -1
  713. package/dist/utils/storybook/getStorybookMeta.d.ts +5 -0
  714. package/dist/utils/storybook/getStorybookMeta.js +2 -1
  715. package/dist/utils/storybook/getStorybookMeta.js.map +1 -1
  716. package/package.json +39 -71
@@ -0,0 +1,4771 @@
1
+ ace.define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2
+ var modes = require("../config").$modes;
3
+ var oop = require("../lib/oop");
4
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
5
+ var SlimHighlightRules = function () {
6
+ this.$rules = {
7
+ "start": [
8
+ {
9
+ token: "keyword",
10
+ regex: /^(\s*)(\w+):\s*/,
11
+ onMatch: function (value, state, stack, line) {
12
+ var indent = /^\s*/.exec(line)[0];
13
+ var m = value.match(/^(\s*)(\w+):/);
14
+ var language = m[2];
15
+ if (!/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(language))
16
+ language = "";
17
+ stack.unshift("language-embed", [], [indent, language], state);
18
+ return this.token;
19
+ },
20
+ stateName: "language-embed",
21
+ next: [{
22
+ token: "string",
23
+ regex: /^(\s*)/,
24
+ onMatch: function (value, state, stack, line) {
25
+ var indent = stack[2][0];
26
+ if (indent.length >= value.length) {
27
+ stack.splice(0, 3);
28
+ this.next = stack.shift();
29
+ return this.token;
30
+ }
31
+ this.next = "";
32
+ return [{ type: "text", value: indent }];
33
+ },
34
+ next: ""
35
+ }, {
36
+ token: "string",
37
+ regex: /.+/,
38
+ onMatch: function (value, state, stack, line) {
39
+ var indent = stack[2][0];
40
+ var language = stack[2][1];
41
+ var embedState = stack[1];
42
+ if (modes[language]) {
43
+ var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0));
44
+ stack[1] = data.state;
45
+ return data.tokens;
46
+ }
47
+ return this.token;
48
+ }
49
+ }]
50
+ },
51
+ {
52
+ token: 'constant.begin.javascript.filter.slim',
53
+ regex: '^(\\s*)():$'
54
+ }, {
55
+ token: 'constant.begin..filter.slim',
56
+ regex: '^(\\s*)(ruby):$'
57
+ }, {
58
+ token: 'constant.begin.coffeescript.filter.slim',
59
+ regex: '^(\\s*)():$'
60
+ }, {
61
+ token: 'constant.begin..filter.slim',
62
+ regex: '^(\\s*)(markdown):$'
63
+ }, {
64
+ token: 'constant.begin.css.filter.slim',
65
+ regex: '^(\\s*)():$'
66
+ }, {
67
+ token: 'constant.begin.scss.filter.slim',
68
+ regex: '^(\\s*)():$'
69
+ }, {
70
+ token: 'constant.begin..filter.slim',
71
+ regex: '^(\\s*)(sass):$'
72
+ }, {
73
+ token: 'constant.begin..filter.slim',
74
+ regex: '^(\\s*)(less):$'
75
+ }, {
76
+ token: 'constant.begin..filter.slim',
77
+ regex: '^(\\s*)(erb):$'
78
+ }, {
79
+ token: 'keyword.html.tags.slim',
80
+ regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b'
81
+ }, {
82
+ token: 'keyword.slim',
83
+ regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)'
84
+ }, {
85
+ token: "string",
86
+ regex: /^(\s*)('|\||\/|(\/!))\s*/,
87
+ onMatch: function (val, state, stack, line) {
88
+ var indent = /^\s*/.exec(line)[0];
89
+ if (stack.length < 1) {
90
+ stack.push(this.next);
91
+ }
92
+ else {
93
+ stack[0] = "mlString";
94
+ }
95
+ if (stack.length < 2) {
96
+ stack.push(indent.length);
97
+ }
98
+ else {
99
+ stack[1] = indent.length;
100
+ }
101
+ return this.token;
102
+ },
103
+ next: "mlString"
104
+ }, {
105
+ token: 'keyword.control.slim',
106
+ regex: '^(\\s*)(\\-|==|=)',
107
+ push: [{
108
+ token: 'control.end.slim',
109
+ regex: '$',
110
+ next: "pop"
111
+ }, {
112
+ include: "rubyline"
113
+ }, {
114
+ include: "misc"
115
+ }]
116
+ }, {
117
+ token: 'paren',
118
+ regex: '\\(',
119
+ push: [{
120
+ token: 'paren',
121
+ regex: '\\)',
122
+ next: "pop"
123
+ }, {
124
+ include: "misc"
125
+ }]
126
+ }, {
127
+ token: 'paren',
128
+ regex: '\\[',
129
+ push: [{
130
+ token: 'paren',
131
+ regex: '\\]',
132
+ next: "pop"
133
+ }, {
134
+ include: "misc"
135
+ }]
136
+ }, {
137
+ include: "misc"
138
+ }
139
+ ],
140
+ "mlString": [{
141
+ token: "indent",
142
+ regex: /^\s*/,
143
+ onMatch: function (val, state, stack) {
144
+ var curIndent = stack[1];
145
+ if (curIndent >= val.length) {
146
+ this.next = "start";
147
+ stack.splice(0);
148
+ }
149
+ else {
150
+ this.next = "mlString";
151
+ }
152
+ return this.token;
153
+ },
154
+ next: "start"
155
+ }, {
156
+ defaultToken: "string"
157
+ }],
158
+ "rubyline": [{
159
+ token: "keyword.operator.ruby.embedded.slim",
160
+ regex: "(==|=)(<>|><|<'|'<|<|>)?|-"
161
+ }, {
162
+ token: "list.ruby.operators.slim",
163
+ regex: "(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b"
164
+ }, {
165
+ token: "string",
166
+ regex: "['](.)*?[']"
167
+ }, {
168
+ token: "string",
169
+ regex: "[\"](.)*?[\"]"
170
+ }],
171
+ "misc": [{
172
+ token: 'class.variable.slim',
173
+ regex: '\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b'
174
+ }, {
175
+ token: "list.meta.slim",
176
+ regex: "(\\b)(true|false|nil)(\\b)"
177
+ }, {
178
+ token: 'keyword.operator.equals.slim',
179
+ regex: '='
180
+ }, {
181
+ token: "string",
182
+ regex: "['](.)*?[']"
183
+ }, {
184
+ token: "string",
185
+ regex: "[\"](.)*?[\"]"
186
+ }]
187
+ };
188
+ this.normalizeRules();
189
+ };
190
+ oop.inherits(SlimHighlightRules, TextHighlightRules);
191
+ exports.SlimHighlightRules = SlimHighlightRules;
192
+
193
+ });
194
+
195
+ ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
196
+ var oop = require("../lib/oop");
197
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
198
+ var JsDocCommentHighlightRules = function () {
199
+ this.$rules = {
200
+ "start": [
201
+ {
202
+ token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
203
+ regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
204
+ push: [
205
+ {
206
+ token: "lparen.doc",
207
+ regex: "{",
208
+ push: [
209
+ {
210
+ include: "doc-syntax"
211
+ }, {
212
+ token: "rparen.doc",
213
+ regex: "}|(?=$)",
214
+ next: "pop"
215
+ }
216
+ ]
217
+ }, {
218
+ token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
219
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
220
+ next: "pop"
221
+ }, {
222
+ token: "rparen.doc",
223
+ regex: "}|(?=$)",
224
+ next: "pop"
225
+ }, {
226
+ include: "doc-syntax"
227
+ }, {
228
+ defaultToken: "text.doc"
229
+ }
230
+ ]
231
+ }, {
232
+ token: ["comment.doc.tag", "text.doc", "lparen.doc"],
233
+ regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
234
+ + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
235
+ push: [
236
+ {
237
+ token: "lparen.doc",
238
+ regex: "{",
239
+ push: [
240
+ {
241
+ include: "doc-syntax"
242
+ }, {
243
+ token: "rparen.doc",
244
+ regex: "}|(?=$)",
245
+ next: "pop"
246
+ }
247
+ ]
248
+ }, {
249
+ token: "rparen.doc",
250
+ regex: "}|(?=$)",
251
+ next: "pop"
252
+ }, {
253
+ include: "doc-syntax"
254
+ }, {
255
+ defaultToken: "text.doc"
256
+ }
257
+ ]
258
+ }, {
259
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
260
+ regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
261
+ + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
262
+ + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
263
+ + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
264
+ }, {
265
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
266
+ regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
267
+ }, {
268
+ token: "comment.doc.tag",
269
+ regex: "@access\\s+(?:private|public|protected)"
270
+ }, {
271
+ token: "comment.doc.tag",
272
+ regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
273
+ }, {
274
+ token: "comment.doc.tag",
275
+ regex: "@\\w+(?=\\s|$)"
276
+ },
277
+ JsDocCommentHighlightRules.getTagRule(),
278
+ {
279
+ defaultToken: "comment.doc.body",
280
+ caseInsensitive: true
281
+ }
282
+ ],
283
+ "doc-syntax": [{
284
+ token: "operator.doc",
285
+ regex: /[|:]/
286
+ }, {
287
+ token: "paren.doc",
288
+ regex: /[\[\]]/
289
+ }]
290
+ };
291
+ this.normalizeRules();
292
+ };
293
+ oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
294
+ JsDocCommentHighlightRules.getTagRule = function (start) {
295
+ return {
296
+ token: "comment.doc.tag.storage.type",
297
+ regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
298
+ };
299
+ };
300
+ JsDocCommentHighlightRules.getStartRule = function (start) {
301
+ return {
302
+ token: "comment.doc", // doc comment
303
+ regex: /\/\*\*(?!\/)/,
304
+ next: start
305
+ };
306
+ };
307
+ JsDocCommentHighlightRules.getEndRule = function (start) {
308
+ return {
309
+ token: "comment.doc", // closing comment
310
+ regex: "\\*\\/",
311
+ next: start
312
+ };
313
+ };
314
+ exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
315
+
316
+ });
317
+
318
+ ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
319
+ var oop = require("../lib/oop");
320
+ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
321
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
322
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
323
+ var JavaScriptHighlightRules = function (options) {
324
+ var keywords = {
325
+ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
326
+ "Namespace|QName|XML|XMLList|" + // E4X
327
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
328
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
329
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
330
+ "SyntaxError|TypeError|URIError|" +
331
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
332
+ "isNaN|parseFloat|parseInt|" +
333
+ "JSON|Math|" + // Other
334
+ "this|arguments|prototype|window|document", // Pseudo
335
+ "keyword": "const|yield|import|get|set|async|await|" +
336
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
337
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
338
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
339
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
340
+ "storage.type": "const|let|var|function",
341
+ "constant.language": "null|Infinity|NaN|undefined",
342
+ "support.function": "alert",
343
+ "constant.language.boolean": "true|false"
344
+ };
345
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
346
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
347
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
348
+ "u[0-9a-fA-F]{4}|" + // unicode
349
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
350
+ "[0-2][0-7]{0,2}|" + // oct
351
+ "3[0-7][0-7]?|" + // oct
352
+ "[4-7][0-7]?|" + //oct
353
+ ".)";
354
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
355
+ var functionCallStartRule = {
356
+ token: ["identifier", "text", "paren.lparen"],
357
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
358
+ };
359
+ this.$rules = {
360
+ "no_regex": [
361
+ DocCommentHighlightRules.getStartRule("doc-start"),
362
+ comments("no_regex"),
363
+ functionCallStartRule,
364
+ {
365
+ token: "string",
366
+ regex: "'(?=.)",
367
+ next: "qstring"
368
+ }, {
369
+ token: "string",
370
+ regex: '"(?=.)',
371
+ next: "qqstring"
372
+ }, {
373
+ include: "numeric_constants"
374
+ }, {
375
+ token: [
376
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
377
+ "text", "storage.type", "text", "paren.lparen"
378
+ ],
379
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
380
+ next: "function_arguments"
381
+ }, {
382
+ token: [
383
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
384
+ ],
385
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
386
+ next: "function_arguments"
387
+ }, {
388
+ token: [
389
+ "entity.name.function", "text", "punctuation.operator",
390
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
391
+ ],
392
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
393
+ next: "function_arguments"
394
+ }, {
395
+ token: [
396
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
397
+ ],
398
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
399
+ next: "function_arguments"
400
+ }, {
401
+ token: "keyword",
402
+ regex: "from(?=\\s*('|\"))"
403
+ }, {
404
+ token: "keyword",
405
+ regex: "(?:" + kwBeforeRe + ")\\b",
406
+ next: "start"
407
+ }, {
408
+ token: "support.constant",
409
+ regex: /that\b/
410
+ }, {
411
+ token: ["storage.type", "punctuation.operator", "support.function.firebug"],
412
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
413
+ }, {
414
+ token: keywordMapper,
415
+ regex: identifierRe
416
+ }, {
417
+ token: "punctuation.operator",
418
+ regex: /[.](?![.])/,
419
+ next: "property"
420
+ }, {
421
+ token: "storage.type",
422
+ regex: /=>/,
423
+ next: "start"
424
+ }, {
425
+ token: "keyword.operator",
426
+ regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
427
+ next: "start"
428
+ }, {
429
+ token: "punctuation.operator",
430
+ regex: /[?:,;.]/,
431
+ next: "start"
432
+ }, {
433
+ token: "paren.lparen",
434
+ regex: /[\[({]/,
435
+ next: "start"
436
+ }, {
437
+ token: "paren.rparen",
438
+ regex: /[\])}]/
439
+ }, {
440
+ token: "comment",
441
+ regex: /^#!.*$/
442
+ }
443
+ ],
444
+ property: [{
445
+ token: "text",
446
+ regex: "\\s+"
447
+ }, {
448
+ token: "keyword.operator",
449
+ regex: /=/
450
+ }, {
451
+ token: [
452
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
453
+ ],
454
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
455
+ next: "function_arguments"
456
+ }, {
457
+ token: [
458
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
459
+ ],
460
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
461
+ next: "function_arguments"
462
+ }, {
463
+ token: "punctuation.operator",
464
+ regex: /[.](?![.])/
465
+ }, {
466
+ token: "support.function",
467
+ regex: "prototype"
468
+ }, {
469
+ token: "support.function",
470
+ regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
471
+ }, {
472
+ token: "support.function.dom",
473
+ 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(?=\()/
474
+ }, {
475
+ token: "support.constant",
476
+ 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/
477
+ }, {
478
+ token: "identifier",
479
+ regex: identifierRe
480
+ }, {
481
+ regex: "",
482
+ token: "empty",
483
+ next: "no_regex"
484
+ }
485
+ ],
486
+ "start": [
487
+ DocCommentHighlightRules.getStartRule("doc-start"),
488
+ comments("start"),
489
+ {
490
+ token: "string.regexp",
491
+ regex: "\\/",
492
+ next: "regex"
493
+ }, {
494
+ token: "text",
495
+ regex: "\\s+|^$",
496
+ next: "start"
497
+ }, {
498
+ token: "empty",
499
+ regex: "",
500
+ next: "no_regex"
501
+ }
502
+ ],
503
+ "regex": [
504
+ {
505
+ token: "regexp.keyword.operator",
506
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
507
+ }, {
508
+ token: "string.regexp",
509
+ regex: "/[sxngimy]*",
510
+ next: "no_regex"
511
+ }, {
512
+ token: "invalid",
513
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
514
+ }, {
515
+ token: "constant.language.escape",
516
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
517
+ }, {
518
+ token: "constant.language.delimiter",
519
+ regex: /\|/
520
+ }, {
521
+ token: "constant.language.escape",
522
+ regex: /\[\^?/,
523
+ next: "regex_character_class"
524
+ }, {
525
+ token: "empty",
526
+ regex: "$",
527
+ next: "no_regex"
528
+ }, {
529
+ defaultToken: "string.regexp"
530
+ }
531
+ ],
532
+ "regex_character_class": [
533
+ {
534
+ token: "regexp.charclass.keyword.operator",
535
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
536
+ }, {
537
+ token: "constant.language.escape",
538
+ regex: "]",
539
+ next: "regex"
540
+ }, {
541
+ token: "constant.language.escape",
542
+ regex: "-"
543
+ }, {
544
+ token: "empty",
545
+ regex: "$",
546
+ next: "no_regex"
547
+ }, {
548
+ defaultToken: "string.regexp.charachterclass"
549
+ }
550
+ ],
551
+ "default_parameter": [
552
+ {
553
+ token: "string",
554
+ regex: "'(?=.)",
555
+ push: [
556
+ {
557
+ token: "string",
558
+ regex: "'|$",
559
+ next: "pop"
560
+ }, {
561
+ include: "qstring"
562
+ }
563
+ ]
564
+ }, {
565
+ token: "string",
566
+ regex: '"(?=.)',
567
+ push: [
568
+ {
569
+ token: "string",
570
+ regex: '"|$',
571
+ next: "pop"
572
+ }, {
573
+ include: "qqstring"
574
+ }
575
+ ]
576
+ }, {
577
+ token: "constant.language",
578
+ regex: "null|Infinity|NaN|undefined"
579
+ }, {
580
+ include: "numeric_constants"
581
+ }, {
582
+ token: "punctuation.operator",
583
+ regex: ",",
584
+ next: "function_arguments"
585
+ }, {
586
+ token: "text",
587
+ regex: "\\s+"
588
+ }, {
589
+ token: "punctuation.operator",
590
+ regex: "$"
591
+ }, {
592
+ token: "empty",
593
+ regex: "",
594
+ next: "no_regex"
595
+ }
596
+ ],
597
+ "function_arguments": [
598
+ comments("function_arguments"),
599
+ {
600
+ token: "variable.parameter",
601
+ regex: identifierRe
602
+ }, {
603
+ token: "punctuation.operator",
604
+ regex: ","
605
+ }, {
606
+ token: "text",
607
+ regex: "\\s+"
608
+ }, {
609
+ token: "punctuation.operator",
610
+ regex: "$"
611
+ }, {
612
+ token: "empty",
613
+ regex: "",
614
+ next: "no_regex"
615
+ }
616
+ ],
617
+ "qqstring": [
618
+ {
619
+ token: "constant.language.escape",
620
+ regex: escapedRe
621
+ }, {
622
+ token: "string",
623
+ regex: "\\\\$",
624
+ consumeLineEnd: true
625
+ }, {
626
+ token: "string",
627
+ regex: '"|$',
628
+ next: "no_regex"
629
+ }, {
630
+ defaultToken: "string"
631
+ }
632
+ ],
633
+ "qstring": [
634
+ {
635
+ token: "constant.language.escape",
636
+ regex: escapedRe
637
+ }, {
638
+ token: "string",
639
+ regex: "\\\\$",
640
+ consumeLineEnd: true
641
+ }, {
642
+ token: "string",
643
+ regex: "'|$",
644
+ next: "no_regex"
645
+ }, {
646
+ defaultToken: "string"
647
+ }
648
+ ],
649
+ "numeric_constants": [
650
+ {
651
+ token: "constant.numeric", // hexadecimal, octal and binary
652
+ regex: /0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/
653
+ }, {
654
+ token: "constant.numeric", // decimal integers and floats
655
+ regex: /(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/
656
+ },
657
+ ]
658
+ };
659
+ if (!options || !options.noES6) {
660
+ this.$rules.no_regex.unshift({
661
+ regex: "[{}]", onMatch: function (val, state, stack) {
662
+ this.next = val == "{" ? this.nextState : "";
663
+ if (val == "{" && stack.length) {
664
+ stack.unshift("start", state);
665
+ }
666
+ else if (val == "}" && stack.length) {
667
+ stack.shift();
668
+ this.next = stack.shift();
669
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
670
+ return "paren.quasi.end";
671
+ }
672
+ return val == "{" ? "paren.lparen" : "paren.rparen";
673
+ },
674
+ nextState: "start"
675
+ }, {
676
+ token: "string.quasi.start",
677
+ regex: /`/,
678
+ push: [{
679
+ token: "constant.language.escape",
680
+ regex: escapedRe
681
+ }, {
682
+ token: "paren.quasi.start",
683
+ regex: /\${/,
684
+ push: "start"
685
+ }, {
686
+ token: "string.quasi.end",
687
+ regex: /`/,
688
+ next: "pop"
689
+ }, {
690
+ defaultToken: "string.quasi"
691
+ }]
692
+ }, {
693
+ token: ["variable.parameter", "text"],
694
+ regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
695
+ }, {
696
+ token: "paren.lparen",
697
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
698
+ next: "function_arguments"
699
+ }, {
700
+ token: "variable.language",
701
+ regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
702
+ });
703
+ this.$rules["function_arguments"].unshift({
704
+ token: "keyword.operator",
705
+ regex: "=",
706
+ next: "default_parameter"
707
+ }, {
708
+ token: "keyword.operator",
709
+ regex: "\\.{3}"
710
+ });
711
+ this.$rules["property"].unshift({
712
+ token: "support.function",
713
+ regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
714
+ + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
715
+ }, {
716
+ token: "constant.language",
717
+ regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
718
+ });
719
+ if (!options || options.jsx != false)
720
+ JSX.call(this);
721
+ }
722
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
723
+ this.normalizeRules();
724
+ };
725
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
726
+ function JSX() {
727
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
728
+ var jsxTag = {
729
+ onMatch: function (val, state, stack) {
730
+ var offset = val.charAt(1) == "/" ? 2 : 1;
731
+ if (offset == 1) {
732
+ if (state != this.nextState)
733
+ stack.unshift(this.next, this.nextState, 0);
734
+ else
735
+ stack.unshift(this.next);
736
+ stack[2]++;
737
+ }
738
+ else if (offset == 2) {
739
+ if (state == this.nextState) {
740
+ stack[1]--;
741
+ if (!stack[1] || stack[1] < 0) {
742
+ stack.shift();
743
+ stack.shift();
744
+ }
745
+ }
746
+ }
747
+ return [{
748
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
749
+ value: val.slice(0, offset)
750
+ }, {
751
+ type: "meta.tag.tag-name.xml",
752
+ value: val.substr(offset)
753
+ }];
754
+ },
755
+ regex: "</?(?:" + tagRegex + "|(?=>))",
756
+ next: "jsxAttributes",
757
+ nextState: "jsx"
758
+ };
759
+ this.$rules.start.unshift(jsxTag);
760
+ var jsxJsRule = {
761
+ regex: "{",
762
+ token: "paren.quasi.start",
763
+ push: "start"
764
+ };
765
+ this.$rules.jsx = [
766
+ jsxJsRule,
767
+ jsxTag,
768
+ { include: "reference" }, { defaultToken: "string.xml" }
769
+ ];
770
+ this.$rules.jsxAttributes = [{
771
+ token: "meta.tag.punctuation.tag-close.xml",
772
+ regex: "/?>",
773
+ onMatch: function (value, currentState, stack) {
774
+ if (currentState == stack[0])
775
+ stack.shift();
776
+ if (value.length == 2) {
777
+ if (stack[0] == this.nextState)
778
+ stack[1]--;
779
+ if (!stack[1] || stack[1] < 0) {
780
+ stack.splice(0, 2);
781
+ }
782
+ }
783
+ this.next = stack[0] || "start";
784
+ return [{ type: this.token, value: value }];
785
+ },
786
+ nextState: "jsx"
787
+ },
788
+ jsxJsRule,
789
+ comments("jsxAttributes"),
790
+ {
791
+ token: "entity.other.attribute-name.xml",
792
+ regex: tagRegex
793
+ }, {
794
+ token: "keyword.operator.attribute-equals.xml",
795
+ regex: "="
796
+ }, {
797
+ token: "text.tag-whitespace.xml",
798
+ regex: "\\s+"
799
+ }, {
800
+ token: "string.attribute-value.xml",
801
+ regex: "'",
802
+ stateName: "jsx_attr_q",
803
+ push: [
804
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
805
+ { include: "reference" },
806
+ { defaultToken: "string.attribute-value.xml" }
807
+ ]
808
+ }, {
809
+ token: "string.attribute-value.xml",
810
+ regex: '"',
811
+ stateName: "jsx_attr_qq",
812
+ push: [
813
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
814
+ { include: "reference" },
815
+ { defaultToken: "string.attribute-value.xml" }
816
+ ]
817
+ },
818
+ jsxTag
819
+ ];
820
+ this.$rules.reference = [{
821
+ token: "constant.language.escape.reference.xml",
822
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
823
+ }];
824
+ }
825
+ function comments(next) {
826
+ return [
827
+ {
828
+ token: "comment", // multi line comment
829
+ regex: /\/\*/,
830
+ next: [
831
+ DocCommentHighlightRules.getTagRule(),
832
+ { token: "comment", regex: "\\*\\/", next: next || "pop" },
833
+ { defaultToken: "comment", caseInsensitive: true }
834
+ ]
835
+ }, {
836
+ token: "comment",
837
+ regex: "\\/\\/",
838
+ next: [
839
+ DocCommentHighlightRules.getTagRule(),
840
+ { token: "comment", regex: "$|^", next: next || "pop" },
841
+ { defaultToken: "comment", caseInsensitive: true }
842
+ ]
843
+ }
844
+ ];
845
+ }
846
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
847
+
848
+ });
849
+
850
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
851
+ var Range = require("../range").Range;
852
+ var MatchingBraceOutdent = function () { };
853
+ (function () {
854
+ this.checkOutdent = function (line, input) {
855
+ if (!/^\s+$/.test(line))
856
+ return false;
857
+ return /^\s*\}/.test(input);
858
+ };
859
+ this.autoOutdent = function (doc, row) {
860
+ var line = doc.getLine(row);
861
+ var match = line.match(/^(\s*\})/);
862
+ if (!match)
863
+ return 0;
864
+ var column = match[1].length;
865
+ var openBracePos = doc.findMatchingBracket({ row: row, column: column });
866
+ if (!openBracePos || openBracePos.row == row)
867
+ return 0;
868
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
869
+ doc.replace(new Range(row, 0, row, column - 1), indent);
870
+ };
871
+ this.$getIndent = function (line) {
872
+ return line.match(/^\s*/)[0];
873
+ };
874
+ }).call(MatchingBraceOutdent.prototype);
875
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
876
+
877
+ });
878
+
879
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
880
+ var oop = require("../../lib/oop");
881
+ var Behaviour = require("../behaviour").Behaviour;
882
+ var TokenIterator = require("../../token_iterator").TokenIterator;
883
+ function is(token, type) {
884
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
885
+ }
886
+ var XmlBehaviour = function () {
887
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
888
+ if (text == '"' || text == "'") {
889
+ var quote = text;
890
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
891
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
892
+ return {
893
+ text: quote + selected + quote,
894
+ selection: false
895
+ };
896
+ }
897
+ var cursor = editor.getCursorPosition();
898
+ var line = session.doc.getLine(cursor.row);
899
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
900
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
901
+ var token = iterator.getCurrentToken();
902
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
903
+ return {
904
+ text: "",
905
+ selection: [1, 1]
906
+ };
907
+ }
908
+ if (!token)
909
+ token = iterator.stepBackward();
910
+ if (!token)
911
+ return;
912
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
913
+ token = iterator.stepBackward();
914
+ }
915
+ var rightSpace = !rightChar || rightChar.match(/\s/);
916
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
917
+ return {
918
+ text: quote + quote,
919
+ selection: [1, 1]
920
+ };
921
+ }
922
+ }
923
+ });
924
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
925
+ var selected = session.doc.getTextRange(range);
926
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
927
+ var line = session.doc.getLine(range.start.row);
928
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
929
+ if (rightChar == selected) {
930
+ range.end.column++;
931
+ return range;
932
+ }
933
+ }
934
+ });
935
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
936
+ if (text == '>') {
937
+ var position = editor.getSelectionRange().start;
938
+ var iterator = new TokenIterator(session, position.row, position.column);
939
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
940
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
941
+ return;
942
+ if (is(token, "reference.attribute-value"))
943
+ return;
944
+ if (is(token, "attribute-value")) {
945
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
946
+ if (position.column < tokenEndColumn)
947
+ return;
948
+ if (position.column == tokenEndColumn) {
949
+ var nextToken = iterator.stepForward();
950
+ if (nextToken && is(nextToken, "attribute-value"))
951
+ return;
952
+ iterator.stepBackward();
953
+ }
954
+ }
955
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
956
+ return;
957
+ while (!is(token, "tag-name")) {
958
+ token = iterator.stepBackward();
959
+ if (token.value == "<") {
960
+ token = iterator.stepForward();
961
+ break;
962
+ }
963
+ }
964
+ var tokenRow = iterator.getCurrentTokenRow();
965
+ var tokenColumn = iterator.getCurrentTokenColumn();
966
+ if (is(iterator.stepBackward(), "end-tag-open"))
967
+ return;
968
+ var element = token.value;
969
+ if (tokenRow == position.row)
970
+ element = element.substring(0, position.column - tokenColumn);
971
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
972
+ return;
973
+ return {
974
+ text: ">" + "</" + element + ">",
975
+ selection: [1, 1]
976
+ };
977
+ }
978
+ });
979
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
980
+ if (text == "\n") {
981
+ var cursor = editor.getCursorPosition();
982
+ var line = session.getLine(cursor.row);
983
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
984
+ var token = iterator.getCurrentToken();
985
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
986
+ if (token.value == "/>")
987
+ return;
988
+ while (token && token.type.indexOf("tag-name") === -1) {
989
+ token = iterator.stepBackward();
990
+ }
991
+ if (!token) {
992
+ return;
993
+ }
994
+ var tag = token.value;
995
+ var row = iterator.getCurrentTokenRow();
996
+ token = iterator.stepBackward();
997
+ if (!token || token.type.indexOf("end-tag") !== -1) {
998
+ return;
999
+ }
1000
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
1001
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1002
+ var line = session.getLine(row);
1003
+ var nextIndent = this.$getIndent(line);
1004
+ var indent = nextIndent + session.getTabString();
1005
+ if (nextToken && nextToken.value === "</") {
1006
+ return {
1007
+ text: "\n" + indent + "\n" + nextIndent,
1008
+ selection: [1, indent.length, 1, indent.length]
1009
+ };
1010
+ }
1011
+ else {
1012
+ return {
1013
+ text: "\n" + indent
1014
+ };
1015
+ }
1016
+ }
1017
+ }
1018
+ }
1019
+ });
1020
+ };
1021
+ oop.inherits(XmlBehaviour, Behaviour);
1022
+ exports.XmlBehaviour = XmlBehaviour;
1023
+
1024
+ });
1025
+
1026
+ ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
1027
+ var oop = require("../../lib/oop");
1028
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1029
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
1030
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1031
+ var JavaScriptBehaviour = function () {
1032
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
1033
+ this.addBehaviours(xmlBehaviours);
1034
+ this.inherit(CstyleBehaviour);
1035
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
1036
+ if (text == '>') {
1037
+ var position = editor.getSelectionRange().start;
1038
+ var iterator = new TokenIterator(session, position.row, position.column);
1039
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1040
+ if (!token)
1041
+ return;
1042
+ if (token.value == '<') {
1043
+ return {
1044
+ text: "></>",
1045
+ selection: [1, 1]
1046
+ };
1047
+ }
1048
+ }
1049
+ });
1050
+ };
1051
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
1052
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
1053
+
1054
+ });
1055
+
1056
+ ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1057
+ var oop = require("../../lib/oop");
1058
+ var Range = require("../../range").Range;
1059
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1060
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1061
+ BaseFoldMode.call(this);
1062
+ this.voidElements = voidElements || {};
1063
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1064
+ if (optionalEndTags)
1065
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1066
+ };
1067
+ oop.inherits(FoldMode, BaseFoldMode);
1068
+ var Tag = function () {
1069
+ this.tagName = "";
1070
+ this.closing = false;
1071
+ this.selfClosing = false;
1072
+ this.start = { row: 0, column: 0 };
1073
+ this.end = { row: 0, column: 0 };
1074
+ };
1075
+ function is(token, type) {
1076
+ return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
1077
+ }
1078
+ (function () {
1079
+ this.getFoldWidget = function (session, foldStyle, row) {
1080
+ var tag = this._getFirstTagInLine(session, row);
1081
+ if (!tag)
1082
+ return this.getCommentFoldWidget(session, row);
1083
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1084
+ return foldStyle === "markbeginend" ? "end" : "";
1085
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1086
+ return "";
1087
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1088
+ return "";
1089
+ return "start";
1090
+ };
1091
+ this.getCommentFoldWidget = function (session, row) {
1092
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1093
+ return "start";
1094
+ return "";
1095
+ };
1096
+ this._getFirstTagInLine = function (session, row) {
1097
+ var tokens = session.getTokens(row);
1098
+ var tag = new Tag();
1099
+ for (var i = 0; i < tokens.length; i++) {
1100
+ var token = tokens[i];
1101
+ if (is(token, "tag-open")) {
1102
+ tag.end.column = tag.start.column + token.value.length;
1103
+ tag.closing = is(token, "end-tag-open");
1104
+ token = tokens[++i];
1105
+ if (!token)
1106
+ return null;
1107
+ tag.tagName = token.value;
1108
+ if (token.value === "") { //skip empty tag name token for fragment
1109
+ token = tokens[++i];
1110
+ if (!token)
1111
+ return null;
1112
+ tag.tagName = token.value;
1113
+ }
1114
+ tag.end.column += token.value.length;
1115
+ for (i++; i < tokens.length; i++) {
1116
+ token = tokens[i];
1117
+ tag.end.column += token.value.length;
1118
+ if (is(token, "tag-close")) {
1119
+ tag.selfClosing = token.value == '/>';
1120
+ break;
1121
+ }
1122
+ }
1123
+ return tag;
1124
+ }
1125
+ else if (is(token, "tag-close")) {
1126
+ tag.selfClosing = token.value == '/>';
1127
+ return tag;
1128
+ }
1129
+ tag.start.column += token.value.length;
1130
+ }
1131
+ return null;
1132
+ };
1133
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1134
+ var tokens = session.getTokens(row);
1135
+ var column = 0;
1136
+ for (var i = 0; i < tokens.length; i++) {
1137
+ var token = tokens[i];
1138
+ column += token.value.length;
1139
+ if (column < startColumn - 1)
1140
+ continue;
1141
+ if (is(token, "end-tag-open")) {
1142
+ token = tokens[i + 1];
1143
+ if (is(token, "tag-name") && token.value === "") {
1144
+ token = tokens[i + 2];
1145
+ }
1146
+ if (token && token.value == tagName)
1147
+ return true;
1148
+ }
1149
+ }
1150
+ return false;
1151
+ };
1152
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1153
+ var firstTag = this._getFirstTagInLine(session, row);
1154
+ if (!firstTag) {
1155
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
1156
+ }
1157
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1158
+ if (tags) {
1159
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1160
+ }
1161
+ };
1162
+ }).call(FoldMode.prototype);
1163
+
1164
+ });
1165
+
1166
+ ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1167
+ var oop = require("../../lib/oop");
1168
+ var Range = require("../../range").Range;
1169
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1170
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1171
+ if (commentRegex) {
1172
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1173
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1174
+ }
1175
+ };
1176
+ oop.inherits(FoldMode, BaseFoldMode);
1177
+ (function () {
1178
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1179
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1180
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
1181
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1182
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1183
+ this._getFoldWidgetBase = this.getFoldWidget;
1184
+ this.getFoldWidget = function (session, foldStyle, row) {
1185
+ var line = session.getLine(row);
1186
+ if (this.singleLineBlockCommentRe.test(line)) {
1187
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1188
+ return "";
1189
+ }
1190
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
1191
+ if (!fw && this.startRegionRe.test(line))
1192
+ return "start"; // lineCommentRegionStart
1193
+ return fw;
1194
+ };
1195
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1196
+ var line = session.getLine(row);
1197
+ if (this.startRegionRe.test(line))
1198
+ return this.getCommentRegionBlock(session, line, row);
1199
+ var match = line.match(this.foldingStartMarker);
1200
+ if (match) {
1201
+ var i = match.index;
1202
+ if (match[1])
1203
+ return this.openingBracketBlock(session, match[1], row, i);
1204
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1205
+ if (range && !range.isMultiLine()) {
1206
+ if (forceMultiline) {
1207
+ range = this.getSectionRange(session, row);
1208
+ }
1209
+ else if (foldStyle != "all")
1210
+ range = null;
1211
+ }
1212
+ return range;
1213
+ }
1214
+ if (foldStyle === "markbegin")
1215
+ return;
1216
+ var match = line.match(this.foldingStopMarker);
1217
+ if (match) {
1218
+ var i = match.index + match[0].length;
1219
+ if (match[1])
1220
+ return this.closingBracketBlock(session, match[1], row, i);
1221
+ return session.getCommentFoldRange(row, i, -1);
1222
+ }
1223
+ };
1224
+ this.getSectionRange = function (session, row) {
1225
+ var line = session.getLine(row);
1226
+ var startIndent = line.search(/\S/);
1227
+ var startRow = row;
1228
+ var startColumn = line.length;
1229
+ row = row + 1;
1230
+ var endRow = row;
1231
+ var maxRow = session.getLength();
1232
+ while (++row < maxRow) {
1233
+ line = session.getLine(row);
1234
+ var indent = line.search(/\S/);
1235
+ if (indent === -1)
1236
+ continue;
1237
+ if (startIndent > indent)
1238
+ break;
1239
+ var subRange = this.getFoldWidgetRange(session, "all", row);
1240
+ if (subRange) {
1241
+ if (subRange.start.row <= startRow) {
1242
+ break;
1243
+ }
1244
+ else if (subRange.isMultiLine()) {
1245
+ row = subRange.end.row;
1246
+ }
1247
+ else if (startIndent == indent) {
1248
+ break;
1249
+ }
1250
+ }
1251
+ endRow = row;
1252
+ }
1253
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1254
+ };
1255
+ this.getCommentRegionBlock = function (session, line, row) {
1256
+ var startColumn = line.search(/\s*$/);
1257
+ var maxRow = session.getLength();
1258
+ var startRow = row;
1259
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1260
+ var depth = 1;
1261
+ while (++row < maxRow) {
1262
+ line = session.getLine(row);
1263
+ var m = re.exec(line);
1264
+ if (!m)
1265
+ continue;
1266
+ if (m[1])
1267
+ depth--;
1268
+ else
1269
+ depth++;
1270
+ if (!depth)
1271
+ break;
1272
+ }
1273
+ var endRow = row;
1274
+ if (endRow > startRow) {
1275
+ return new Range(startRow, startColumn, endRow, line.length);
1276
+ }
1277
+ };
1278
+ }).call(FoldMode.prototype);
1279
+
1280
+ });
1281
+
1282
+ ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1283
+ var oop = require("../../lib/oop");
1284
+ var XmlFoldMode = require("./xml").FoldMode;
1285
+ var CFoldMode = require("./cstyle").FoldMode;
1286
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1287
+ if (commentRegex) {
1288
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1289
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1290
+ }
1291
+ this.xmlFoldMode = new XmlFoldMode();
1292
+ };
1293
+ oop.inherits(FoldMode, CFoldMode);
1294
+ (function () {
1295
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
1296
+ this.getFoldWidgetBase = this.getFoldWidget;
1297
+ this.getFoldWidget = function (session, foldStyle, row) {
1298
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
1299
+ if (!fw) {
1300
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
1301
+ }
1302
+ return fw;
1303
+ };
1304
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1305
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
1306
+ if (range)
1307
+ return range;
1308
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
1309
+ };
1310
+ }).call(FoldMode.prototype);
1311
+
1312
+ });
1313
+
1314
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
1315
+ var oop = require("../lib/oop");
1316
+ var TextMode = require("./text").Mode;
1317
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1318
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1319
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1320
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
1321
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
1322
+ var Mode = function () {
1323
+ this.HighlightRules = JavaScriptHighlightRules;
1324
+ this.$outdent = new MatchingBraceOutdent();
1325
+ this.$behaviour = new JavaScriptBehaviour();
1326
+ this.foldingRules = new JavaScriptFoldMode();
1327
+ };
1328
+ oop.inherits(Mode, TextMode);
1329
+ (function () {
1330
+ this.lineCommentStart = "//";
1331
+ this.blockComment = { start: "/*", end: "*/" };
1332
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
1333
+ this.$pairQuotesAfter = {
1334
+ "`": /\w/
1335
+ };
1336
+ this.getNextLineIndent = function (state, line, tab) {
1337
+ var indent = this.$getIndent(line);
1338
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1339
+ var tokens = tokenizedLine.tokens;
1340
+ var endState = tokenizedLine.state;
1341
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1342
+ return indent;
1343
+ }
1344
+ if (state == "start" || state == "no_regex") {
1345
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1346
+ if (match) {
1347
+ indent += tab;
1348
+ }
1349
+ }
1350
+ else if (state == "doc-start") {
1351
+ if (endState == "start" || endState == "no_regex") {
1352
+ return "";
1353
+ }
1354
+ }
1355
+ return indent;
1356
+ };
1357
+ this.checkOutdent = function (state, line, input) {
1358
+ return this.$outdent.checkOutdent(line, input);
1359
+ };
1360
+ this.autoOutdent = function (state, doc, row) {
1361
+ this.$outdent.autoOutdent(doc, row);
1362
+ };
1363
+ this.createWorker = function (session) {
1364
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1365
+ worker.attachToDocument(session.getDocument());
1366
+ worker.on("annotate", function (results) {
1367
+ session.setAnnotations(results.data);
1368
+ });
1369
+ worker.on("terminate", function () {
1370
+ session.clearAnnotations();
1371
+ });
1372
+ return worker;
1373
+ };
1374
+ this.$id = "ace/mode/javascript";
1375
+ this.snippetFileId = "ace/snippets/javascript";
1376
+ }).call(Mode.prototype);
1377
+ exports.Mode = Mode;
1378
+
1379
+ });
1380
+
1381
+ ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
1382
+ var oop = require("../lib/oop");
1383
+ var lang = require("../lib/lang");
1384
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1385
+ 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";
1386
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
1387
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
1388
+ 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";
1389
+ 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";
1390
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
1391
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
1392
+ 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";
1393
+ var CssHighlightRules = function () {
1394
+ var keywordMapper = this.createKeywordMapper({
1395
+ "support.function": supportFunction,
1396
+ "support.constant": supportConstant,
1397
+ "support.type": supportType,
1398
+ "support.constant.color": supportConstantColor,
1399
+ "support.constant.fonts": supportConstantFonts
1400
+ }, "text", true);
1401
+ this.$rules = {
1402
+ "start": [{
1403
+ include: ["strings", "url", "comments"]
1404
+ }, {
1405
+ token: "paren.lparen",
1406
+ regex: "\\{",
1407
+ next: "ruleset"
1408
+ }, {
1409
+ token: "paren.rparen",
1410
+ regex: "\\}"
1411
+ }, {
1412
+ token: "string",
1413
+ regex: "@(?!viewport)",
1414
+ next: "media"
1415
+ }, {
1416
+ token: "keyword",
1417
+ regex: "#[a-z0-9-_]+"
1418
+ }, {
1419
+ token: "keyword",
1420
+ regex: "%"
1421
+ }, {
1422
+ token: "variable",
1423
+ regex: "\\.[a-z0-9-_]+"
1424
+ }, {
1425
+ token: "string",
1426
+ regex: ":[a-z0-9-_]+"
1427
+ }, {
1428
+ token: "constant.numeric",
1429
+ regex: numRe
1430
+ }, {
1431
+ token: "constant",
1432
+ regex: "[a-z0-9-_]+"
1433
+ }, {
1434
+ caseInsensitive: true
1435
+ }],
1436
+ "media": [{
1437
+ include: ["strings", "url", "comments"]
1438
+ }, {
1439
+ token: "paren.lparen",
1440
+ regex: "\\{",
1441
+ next: "start"
1442
+ }, {
1443
+ token: "paren.rparen",
1444
+ regex: "\\}",
1445
+ next: "start"
1446
+ }, {
1447
+ token: "string",
1448
+ regex: ";",
1449
+ next: "start"
1450
+ }, {
1451
+ token: "keyword",
1452
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
1453
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
1454
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
1455
+ }],
1456
+ "comments": [{
1457
+ token: "comment", // multi line comment
1458
+ regex: "\\/\\*",
1459
+ push: [{
1460
+ token: "comment",
1461
+ regex: "\\*\\/",
1462
+ next: "pop"
1463
+ }, {
1464
+ defaultToken: "comment"
1465
+ }]
1466
+ }],
1467
+ "ruleset": [{
1468
+ regex: "-(webkit|ms|moz|o)-",
1469
+ token: "text"
1470
+ }, {
1471
+ token: "punctuation.operator",
1472
+ regex: "[:;]"
1473
+ }, {
1474
+ token: "paren.rparen",
1475
+ regex: "\\}",
1476
+ next: "start"
1477
+ }, {
1478
+ include: ["strings", "url", "comments"]
1479
+ }, {
1480
+ token: ["constant.numeric", "keyword"],
1481
+ 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|%)"
1482
+ }, {
1483
+ token: "constant.numeric",
1484
+ regex: numRe
1485
+ }, {
1486
+ token: "constant.numeric", // hex6 color
1487
+ regex: "#[a-f0-9]{6}"
1488
+ }, {
1489
+ token: "constant.numeric", // hex3 color
1490
+ regex: "#[a-f0-9]{3}"
1491
+ }, {
1492
+ token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
1493
+ regex: pseudoElements
1494
+ }, {
1495
+ token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
1496
+ regex: pseudoClasses
1497
+ }, {
1498
+ include: "url"
1499
+ }, {
1500
+ token: keywordMapper,
1501
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1502
+ }, {
1503
+ token: "paren.lparen",
1504
+ regex: "\\{"
1505
+ }, {
1506
+ caseInsensitive: true
1507
+ }],
1508
+ url: [{
1509
+ token: "support.function",
1510
+ regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
1511
+ push: [{
1512
+ token: "support.function",
1513
+ regex: "\\)",
1514
+ next: "pop"
1515
+ }, {
1516
+ defaultToken: "string"
1517
+ }]
1518
+ }],
1519
+ strings: [{
1520
+ token: "string.start",
1521
+ regex: "'",
1522
+ push: [{
1523
+ token: "string.end",
1524
+ regex: "'|$",
1525
+ next: "pop"
1526
+ }, {
1527
+ include: "escapes"
1528
+ }, {
1529
+ token: "constant.language.escape",
1530
+ regex: /\\$/,
1531
+ consumeLineEnd: true
1532
+ }, {
1533
+ defaultToken: "string"
1534
+ }]
1535
+ }, {
1536
+ token: "string.start",
1537
+ regex: '"',
1538
+ push: [{
1539
+ token: "string.end",
1540
+ regex: '"|$',
1541
+ next: "pop"
1542
+ }, {
1543
+ include: "escapes"
1544
+ }, {
1545
+ token: "constant.language.escape",
1546
+ regex: /\\$/,
1547
+ consumeLineEnd: true
1548
+ }, {
1549
+ defaultToken: "string"
1550
+ }]
1551
+ }],
1552
+ escapes: [{
1553
+ token: "constant.language.escape",
1554
+ regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
1555
+ }]
1556
+ };
1557
+ this.normalizeRules();
1558
+ };
1559
+ oop.inherits(CssHighlightRules, TextHighlightRules);
1560
+ exports.CssHighlightRules = CssHighlightRules;
1561
+
1562
+ });
1563
+
1564
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
1565
+ var oop = require("../lib/oop");
1566
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1567
+ var XmlHighlightRules = function (normalize) {
1568
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
1569
+ this.$rules = {
1570
+ start: [
1571
+ { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
1572
+ {
1573
+ token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
1574
+ regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
1575
+ },
1576
+ { token: "comment.start.xml", regex: "<\\!--", next: "comment" },
1577
+ {
1578
+ token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
1579
+ regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
1580
+ },
1581
+ { include: "tag" },
1582
+ { token: "text.end-tag-open.xml", regex: "</" },
1583
+ { token: "text.tag-open.xml", regex: "<" },
1584
+ { include: "reference" },
1585
+ { defaultToken: "text.xml" }
1586
+ ],
1587
+ processing_instruction: [{
1588
+ token: "entity.other.attribute-name.decl-attribute-name.xml",
1589
+ regex: tagRegex
1590
+ }, {
1591
+ token: "keyword.operator.decl-attribute-equals.xml",
1592
+ regex: "="
1593
+ }, {
1594
+ include: "whitespace"
1595
+ }, {
1596
+ include: "string"
1597
+ }, {
1598
+ token: "punctuation.xml-decl.xml",
1599
+ regex: "\\?>",
1600
+ next: "start"
1601
+ }],
1602
+ doctype: [
1603
+ { include: "whitespace" },
1604
+ { include: "string" },
1605
+ { token: "xml-pe.doctype.xml", regex: ">", next: "start" },
1606
+ { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
1607
+ { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
1608
+ ],
1609
+ int_subset: [{
1610
+ token: "text.xml",
1611
+ regex: "\\s+"
1612
+ }, {
1613
+ token: "punctuation.int-subset.xml",
1614
+ regex: "]",
1615
+ next: "pop"
1616
+ }, {
1617
+ token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
1618
+ regex: "(<\\!)(" + tagRegex + ")",
1619
+ push: [{
1620
+ token: "text",
1621
+ regex: "\\s+"
1622
+ },
1623
+ {
1624
+ token: "punctuation.markup-decl.xml",
1625
+ regex: ">",
1626
+ next: "pop"
1627
+ },
1628
+ { include: "string" }]
1629
+ }],
1630
+ cdata: [
1631
+ { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
1632
+ { token: "text.xml", regex: "\\s+" },
1633
+ { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
1634
+ ],
1635
+ comment: [
1636
+ { token: "comment.end.xml", regex: "-->", next: "start" },
1637
+ { defaultToken: "comment.xml" }
1638
+ ],
1639
+ reference: [{
1640
+ token: "constant.language.escape.reference.xml",
1641
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1642
+ }],
1643
+ attr_reference: [{
1644
+ token: "constant.language.escape.reference.attribute-value.xml",
1645
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1646
+ }],
1647
+ tag: [{
1648
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
1649
+ regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
1650
+ next: [
1651
+ { include: "attributes" },
1652
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1653
+ ]
1654
+ }],
1655
+ tag_whitespace: [
1656
+ { token: "text.tag-whitespace.xml", regex: "\\s+" }
1657
+ ],
1658
+ whitespace: [
1659
+ { token: "text.whitespace.xml", regex: "\\s+" }
1660
+ ],
1661
+ string: [{
1662
+ token: "string.xml",
1663
+ regex: "'",
1664
+ push: [
1665
+ { token: "string.xml", regex: "'", next: "pop" },
1666
+ { defaultToken: "string.xml" }
1667
+ ]
1668
+ }, {
1669
+ token: "string.xml",
1670
+ regex: '"',
1671
+ push: [
1672
+ { token: "string.xml", regex: '"', next: "pop" },
1673
+ { defaultToken: "string.xml" }
1674
+ ]
1675
+ }],
1676
+ attributes: [{
1677
+ token: "entity.other.attribute-name.xml",
1678
+ regex: tagRegex
1679
+ }, {
1680
+ token: "keyword.operator.attribute-equals.xml",
1681
+ regex: "="
1682
+ }, {
1683
+ include: "tag_whitespace"
1684
+ }, {
1685
+ include: "attribute_value"
1686
+ }],
1687
+ attribute_value: [{
1688
+ token: "string.attribute-value.xml",
1689
+ regex: "'",
1690
+ push: [
1691
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
1692
+ { include: "attr_reference" },
1693
+ { defaultToken: "string.attribute-value.xml" }
1694
+ ]
1695
+ }, {
1696
+ token: "string.attribute-value.xml",
1697
+ regex: '"',
1698
+ push: [
1699
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
1700
+ { include: "attr_reference" },
1701
+ { defaultToken: "string.attribute-value.xml" }
1702
+ ]
1703
+ }]
1704
+ };
1705
+ if (this.constructor === XmlHighlightRules)
1706
+ this.normalizeRules();
1707
+ };
1708
+ (function () {
1709
+ this.embedTagRules = function (HighlightRules, prefix, tag) {
1710
+ this.$rules.tag.unshift({
1711
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1712
+ regex: "(<)(" + tag + "(?=\\s|>|$))",
1713
+ next: [
1714
+ { include: "attributes" },
1715
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
1716
+ ]
1717
+ });
1718
+ this.$rules[tag + "-end"] = [
1719
+ { include: "attributes" },
1720
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
1721
+ onMatch: function (value, currentState, stack) {
1722
+ stack.splice(0);
1723
+ return this.token;
1724
+ } }
1725
+ ];
1726
+ this.embedRules(HighlightRules, prefix, [{
1727
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1728
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
1729
+ next: tag + "-end"
1730
+ }, {
1731
+ token: "string.cdata.xml",
1732
+ regex: "<\\!\\[CDATA\\["
1733
+ }, {
1734
+ token: "string.cdata.xml",
1735
+ regex: "\\]\\]>"
1736
+ }]);
1737
+ };
1738
+ }).call(TextHighlightRules.prototype);
1739
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
1740
+ exports.XmlHighlightRules = XmlHighlightRules;
1741
+
1742
+ });
1743
+
1744
+ ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
1745
+ var oop = require("../lib/oop");
1746
+ var lang = require("../lib/lang");
1747
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1748
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1749
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1750
+ var tagMap = lang.createMap({
1751
+ a: 'anchor',
1752
+ button: 'form',
1753
+ form: 'form',
1754
+ img: 'image',
1755
+ input: 'form',
1756
+ label: 'form',
1757
+ option: 'form',
1758
+ script: 'script',
1759
+ select: 'form',
1760
+ textarea: 'form',
1761
+ style: 'style',
1762
+ table: 'table',
1763
+ tbody: 'table',
1764
+ td: 'table',
1765
+ tfoot: 'table',
1766
+ th: 'table',
1767
+ tr: 'table'
1768
+ });
1769
+ var HtmlHighlightRules = function () {
1770
+ XmlHighlightRules.call(this);
1771
+ this.addRules({
1772
+ attributes: [{
1773
+ include: "tag_whitespace"
1774
+ }, {
1775
+ token: "entity.other.attribute-name.xml",
1776
+ regex: "[-_a-zA-Z0-9:.]+"
1777
+ }, {
1778
+ token: "keyword.operator.attribute-equals.xml",
1779
+ regex: "=",
1780
+ push: [{
1781
+ include: "tag_whitespace"
1782
+ }, {
1783
+ token: "string.unquoted.attribute-value.html",
1784
+ regex: "[^<>='\"`\\s]+",
1785
+ next: "pop"
1786
+ }, {
1787
+ token: "empty",
1788
+ regex: "",
1789
+ next: "pop"
1790
+ }]
1791
+ }, {
1792
+ include: "attribute_value"
1793
+ }],
1794
+ tag: [{
1795
+ token: function (start, tag) {
1796
+ var group = tagMap[tag];
1797
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1798
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1799
+ },
1800
+ regex: "(</?)([-_a-zA-Z0-9:.]+)",
1801
+ next: "tag_stuff"
1802
+ }],
1803
+ tag_stuff: [
1804
+ { include: "attributes" },
1805
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1806
+ ]
1807
+ });
1808
+ this.embedTagRules(CssHighlightRules, "css-", "style");
1809
+ this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script");
1810
+ if (this.constructor === HtmlHighlightRules)
1811
+ this.normalizeRules();
1812
+ };
1813
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1814
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1815
+
1816
+ });
1817
+
1818
+ ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict";
1819
+ var modes = require("../config").$modes;
1820
+ var oop = require("../lib/oop");
1821
+ var lang = require("../lib/lang");
1822
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1823
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
1824
+ var escaped = function (ch) {
1825
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
1826
+ };
1827
+ var MarkdownHighlightRules = function () {
1828
+ HtmlHighlightRules.call(this);
1829
+ var codeBlockStartRule = {
1830
+ token: "support.function",
1831
+ regex: /^\s*(```+[^`]*|~~~+[^~]*)$/,
1832
+ onMatch: function (value, state, stack, line) {
1833
+ var m = value.match(/^(\s*)([`~]+)(.*)/);
1834
+ var language = /[\w-]+|$/.exec(m[3])[0];
1835
+ if (!modes[language])
1836
+ language = "";
1837
+ stack.unshift("githubblock", [], [m[1], m[2], language], state);
1838
+ return this.token;
1839
+ },
1840
+ next: "githubblock"
1841
+ };
1842
+ var codeBlockRules = [{
1843
+ token: "support.function",
1844
+ regex: ".*",
1845
+ onMatch: function (value, state, stack, line) {
1846
+ var embedState = stack[1];
1847
+ var indent = stack[2][0];
1848
+ var endMarker = stack[2][1];
1849
+ var language = stack[2][2];
1850
+ var m = /^(\s*)(`+|~+)\s*$/.exec(value);
1851
+ if (m && m[1].length < indent.length + 3
1852
+ && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) {
1853
+ stack.splice(0, 3);
1854
+ this.next = stack.shift();
1855
+ return this.token;
1856
+ }
1857
+ this.next = "";
1858
+ if (language && modes[language]) {
1859
+ var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0));
1860
+ stack[1] = data.state;
1861
+ return data.tokens;
1862
+ }
1863
+ return this.token;
1864
+ }
1865
+ }];
1866
+ this.$rules["start"].unshift({
1867
+ token: "empty_line",
1868
+ regex: '^$',
1869
+ next: "allowBlock"
1870
+ }, {
1871
+ token: "markup.heading.1",
1872
+ regex: "^=+(?=\\s*$)"
1873
+ }, {
1874
+ token: "markup.heading.2",
1875
+ regex: "^\\-+(?=\\s*$)"
1876
+ }, {
1877
+ token: function (value) {
1878
+ return "markup.heading." + value.length;
1879
+ },
1880
+ regex: /^#{1,6}(?=\s|$)/,
1881
+ next: "header"
1882
+ }, codeBlockStartRule, {
1883
+ token: "string.blockquote",
1884
+ regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
1885
+ next: "blockquote"
1886
+ }, {
1887
+ token: "constant",
1888
+ regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",
1889
+ next: "allowBlock"
1890
+ }, {
1891
+ token: "markup.list",
1892
+ regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
1893
+ next: "listblock-start"
1894
+ }, {
1895
+ include: "basic"
1896
+ });
1897
+ this.addRules({
1898
+ "basic": [{
1899
+ token: "constant.language.escape",
1900
+ regex: /\\[\\`*_{}\[\]()#+\-.!]/
1901
+ }, {
1902
+ token: "support.function",
1903
+ regex: "(`+)(.*?[^`])(\\1)"
1904
+ }, {
1905
+ token: ["text", "constant", "text", "url", "string", "text"],
1906
+ regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
1907
+ }, {
1908
+ token: ["text", "string", "text", "constant", "text"],
1909
+ regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])"
1910
+ }, {
1911
+ token: ["text", "string", "text", "markup.underline", "string", "text"],
1912
+ regex: "(\\!?\\[)(" + // [
1913
+ escaped("]") + // link text or alt text
1914
+ ")(\\]\\()" + // ](
1915
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image
1916
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
1917
+ "(\\))" // )
1918
+ }, {
1919
+ token: "string.strong",
1920
+ regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
1921
+ }, {
1922
+ token: "string.emphasis",
1923
+ regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
1924
+ }, {
1925
+ token: ["text", "url", "text"],
1926
+ regex: "(<)(" +
1927
+ "(?:https?|ftp|dict):[^'\">\\s]+" +
1928
+ "|" +
1929
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" +
1930
+ ")(>)"
1931
+ }],
1932
+ "allowBlock": [
1933
+ { token: "support.function", regex: "^ {4}.+", next: "allowBlock" },
1934
+ { token: "empty_line", regex: '^$', next: "allowBlock" },
1935
+ { token: "empty", regex: "", next: "start" }
1936
+ ],
1937
+ "header": [{
1938
+ regex: "$",
1939
+ next: "start"
1940
+ }, {
1941
+ include: "basic"
1942
+ }, {
1943
+ defaultToken: "heading"
1944
+ }],
1945
+ "listblock-start": [{
1946
+ token: "support.variable",
1947
+ regex: /(?:\[[ x]\])?/,
1948
+ next: "listblock"
1949
+ }],
1950
+ "listblock": [{
1951
+ token: "empty_line",
1952
+ regex: "^$",
1953
+ next: "start"
1954
+ }, {
1955
+ token: "markup.list",
1956
+ regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
1957
+ next: "listblock-start"
1958
+ }, {
1959
+ include: "basic", noEscape: true
1960
+ },
1961
+ codeBlockStartRule,
1962
+ {
1963
+ defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly
1964
+ }],
1965
+ "blockquote": [{
1966
+ token: "empty_line",
1967
+ regex: "^\\s*$",
1968
+ next: "start"
1969
+ }, {
1970
+ token: "string.blockquote",
1971
+ regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
1972
+ next: "blockquote"
1973
+ }, {
1974
+ include: "basic", noEscape: true
1975
+ }, {
1976
+ defaultToken: "string.blockquote"
1977
+ }],
1978
+ "githubblock": codeBlockRules
1979
+ });
1980
+ this.normalizeRules();
1981
+ };
1982
+ oop.inherits(MarkdownHighlightRules, TextHighlightRules);
1983
+ exports.MarkdownHighlightRules = MarkdownHighlightRules;
1984
+
1985
+ });
1986
+
1987
+ ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict";
1988
+ var oop = require("../../lib/oop");
1989
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1990
+ var Range = require("../../range").Range;
1991
+ var FoldMode = exports.FoldMode = function () { };
1992
+ oop.inherits(FoldMode, BaseFoldMode);
1993
+ (function () {
1994
+ this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/;
1995
+ this.getFoldWidget = function (session, foldStyle, row) {
1996
+ var line = session.getLine(row);
1997
+ if (!this.foldingStartMarker.test(line))
1998
+ return "";
1999
+ if (line[0] == "`") {
2000
+ if (session.bgTokenizer.getState(row) == "start")
2001
+ return "end";
2002
+ return "start";
2003
+ }
2004
+ return "start";
2005
+ };
2006
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
2007
+ var line = session.getLine(row);
2008
+ var startColumn = line.length;
2009
+ var maxRow = session.getLength();
2010
+ var startRow = row;
2011
+ var endRow = row;
2012
+ if (!line.match(this.foldingStartMarker))
2013
+ return;
2014
+ if (line[0] == "`") {
2015
+ if (session.bgTokenizer.getState(row) !== "start") {
2016
+ while (++row < maxRow) {
2017
+ line = session.getLine(row);
2018
+ if (line[0] == "`" & line.substring(0, 3) == "```")
2019
+ break;
2020
+ }
2021
+ return new Range(startRow, startColumn, row, 0);
2022
+ }
2023
+ else {
2024
+ while (row-- > 0) {
2025
+ line = session.getLine(row);
2026
+ if (line[0] == "`" & line.substring(0, 3) == "```")
2027
+ break;
2028
+ }
2029
+ return new Range(row, line.length, startRow, 0);
2030
+ }
2031
+ }
2032
+ var token;
2033
+ function isHeading(row) {
2034
+ token = session.getTokens(row)[0];
2035
+ return token && token.type.lastIndexOf(heading, 0) === 0;
2036
+ }
2037
+ var heading = "markup.heading";
2038
+ function getLevel() {
2039
+ var ch = token.value[0];
2040
+ if (ch == "=")
2041
+ return 6;
2042
+ if (ch == "-")
2043
+ return 5;
2044
+ return 7 - token.value.search(/[^#]|$/);
2045
+ }
2046
+ if (isHeading(row)) {
2047
+ var startHeadingLevel = getLevel();
2048
+ while (++row < maxRow) {
2049
+ if (!isHeading(row))
2050
+ continue;
2051
+ var level = getLevel();
2052
+ if (level >= startHeadingLevel)
2053
+ break;
2054
+ }
2055
+ endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2);
2056
+ if (endRow > startRow) {
2057
+ while (endRow > startRow && /^\s*$/.test(session.getLine(endRow)))
2058
+ endRow--;
2059
+ }
2060
+ if (endRow > startRow) {
2061
+ var endColumn = session.getLine(endRow).length;
2062
+ return new Range(startRow, startColumn, endRow, endColumn);
2063
+ }
2064
+ }
2065
+ };
2066
+ }).call(FoldMode.prototype);
2067
+
2068
+ });
2069
+
2070
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
2071
+ var propertyMap = {
2072
+ "background": { "#$0": 1 },
2073
+ "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
2074
+ "background-image": { "url('/$0')": 1 },
2075
+ "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
2076
+ "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
2077
+ "background-attachment": { "scroll": 1, "fixed": 1 },
2078
+ "background-size": { "cover": 1, "contain": 1 },
2079
+ "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
2080
+ "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
2081
+ "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
2082
+ "border-color": { "#$0": 1 },
2083
+ "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
2084
+ "border-collapse": { "collapse": 1, "separate": 1 },
2085
+ "bottom": { "px": 1, "em": 1, "%": 1 },
2086
+ "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
2087
+ "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
2088
+ "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 },
2089
+ "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
2090
+ "empty-cells": { "show": 1, "hide": 1 },
2091
+ "float": { "left": 1, "right": 1, "none": 1 },
2092
+ "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 },
2093
+ "font-size": { "px": 1, "em": 1, "%": 1 },
2094
+ "font-weight": { "bold": 1, "normal": 1 },
2095
+ "font-style": { "italic": 1, "normal": 1 },
2096
+ "font-variant": { "normal": 1, "small-caps": 1 },
2097
+ "height": { "px": 1, "em": 1, "%": 1 },
2098
+ "left": { "px": 1, "em": 1, "%": 1 },
2099
+ "letter-spacing": { "normal": 1 },
2100
+ "line-height": { "normal": 1 },
2101
+ "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 },
2102
+ "margin": { "px": 1, "em": 1, "%": 1 },
2103
+ "margin-right": { "px": 1, "em": 1, "%": 1 },
2104
+ "margin-left": { "px": 1, "em": 1, "%": 1 },
2105
+ "margin-top": { "px": 1, "em": 1, "%": 1 },
2106
+ "margin-bottom": { "px": 1, "em": 1, "%": 1 },
2107
+ "max-height": { "px": 1, "em": 1, "%": 1 },
2108
+ "max-width": { "px": 1, "em": 1, "%": 1 },
2109
+ "min-height": { "px": 1, "em": 1, "%": 1 },
2110
+ "min-width": { "px": 1, "em": 1, "%": 1 },
2111
+ "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
2112
+ "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
2113
+ "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
2114
+ "padding": { "px": 1, "em": 1, "%": 1 },
2115
+ "padding-top": { "px": 1, "em": 1, "%": 1 },
2116
+ "padding-right": { "px": 1, "em": 1, "%": 1 },
2117
+ "padding-bottom": { "px": 1, "em": 1, "%": 1 },
2118
+ "padding-left": { "px": 1, "em": 1, "%": 1 },
2119
+ "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
2120
+ "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
2121
+ "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
2122
+ "right": { "px": 1, "em": 1, "%": 1 },
2123
+ "table-layout": { "fixed": 1, "auto": 1 },
2124
+ "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
2125
+ "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
2126
+ "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
2127
+ "top": { "px": 1, "em": 1, "%": 1 },
2128
+ "vertical-align": { "top": 1, "bottom": 1 },
2129
+ "visibility": { "hidden": 1, "visible": 1 },
2130
+ "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
2131
+ "width": { "px": 1, "em": 1, "%": 1 },
2132
+ "word-spacing": { "normal": 1 },
2133
+ "filter": { "alpha(opacity=$0100)": 1 },
2134
+ "text-shadow": { "$02px 2px 2px #777": 1 },
2135
+ "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
2136
+ "-moz-border-radius": 1,
2137
+ "-moz-border-radius-topright": 1,
2138
+ "-moz-border-radius-bottomright": 1,
2139
+ "-moz-border-radius-topleft": 1,
2140
+ "-moz-border-radius-bottomleft": 1,
2141
+ "-webkit-border-radius": 1,
2142
+ "-webkit-border-top-right-radius": 1,
2143
+ "-webkit-border-top-left-radius": 1,
2144
+ "-webkit-border-bottom-right-radius": 1,
2145
+ "-webkit-border-bottom-left-radius": 1,
2146
+ "-moz-box-shadow": 1,
2147
+ "-webkit-box-shadow": 1,
2148
+ "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
2149
+ "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
2150
+ "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
2151
+ };
2152
+ var CssCompletions = function () {
2153
+ };
2154
+ (function () {
2155
+ this.completionsDefined = false;
2156
+ this.defineCompletions = function () {
2157
+ if (document) {
2158
+ var style = document.createElement('c').style;
2159
+ for (var i in style) {
2160
+ if (typeof style[i] !== 'string')
2161
+ continue;
2162
+ var name = i.replace(/[A-Z]/g, function (x) {
2163
+ return '-' + x.toLowerCase();
2164
+ });
2165
+ if (!propertyMap.hasOwnProperty(name))
2166
+ propertyMap[name] = 1;
2167
+ }
2168
+ }
2169
+ this.completionsDefined = true;
2170
+ };
2171
+ this.getCompletions = function (state, session, pos, prefix) {
2172
+ if (!this.completionsDefined) {
2173
+ this.defineCompletions();
2174
+ }
2175
+ if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
2176
+ var line = session.getLine(pos.row).substr(0, pos.column);
2177
+ var inParens = /\([^)]*$/.test(line);
2178
+ if (inParens) {
2179
+ line = line.substr(line.lastIndexOf('(') + 1);
2180
+ }
2181
+ if (/:[^;]+$/.test(line)) {
2182
+ /([\w\-]+):[^:]*$/.test(line);
2183
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
2184
+ }
2185
+ else {
2186
+ return this.getPropertyCompletions(state, session, pos, prefix, inParens);
2187
+ }
2188
+ }
2189
+ return [];
2190
+ };
2191
+ this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
2192
+ skipSemicolon = skipSemicolon || false;
2193
+ var properties = Object.keys(propertyMap);
2194
+ return properties.map(function (property) {
2195
+ return {
2196
+ caption: property,
2197
+ snippet: property + ': $0' + (skipSemicolon ? '' : ';'),
2198
+ meta: "property",
2199
+ score: 1000000
2200
+ };
2201
+ });
2202
+ };
2203
+ this.getPropertyValueCompletions = function (state, session, pos, prefix) {
2204
+ var line = session.getLine(pos.row).substr(0, pos.column);
2205
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
2206
+ if (!property)
2207
+ return [];
2208
+ var values = [];
2209
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
2210
+ values = Object.keys(propertyMap[property]);
2211
+ }
2212
+ return values.map(function (value) {
2213
+ return {
2214
+ caption: value,
2215
+ snippet: value,
2216
+ meta: "property value",
2217
+ score: 1000000
2218
+ };
2219
+ });
2220
+ };
2221
+ }).call(CssCompletions.prototype);
2222
+ exports.CssCompletions = CssCompletions;
2223
+
2224
+ });
2225
+
2226
+ ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict";
2227
+ var oop = require("../../lib/oop");
2228
+ var Behaviour = require("../behaviour").Behaviour;
2229
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
2230
+ var TokenIterator = require("../../token_iterator").TokenIterator;
2231
+ var CssBehaviour = function () {
2232
+ this.inherit(CstyleBehaviour);
2233
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
2234
+ if (text === ':' && editor.selection.isEmpty()) {
2235
+ var cursor = editor.getCursorPosition();
2236
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
2237
+ var token = iterator.getCurrentToken();
2238
+ if (token && token.value.match(/\s+/)) {
2239
+ token = iterator.stepBackward();
2240
+ }
2241
+ if (token && token.type === 'support.type') {
2242
+ var line = session.doc.getLine(cursor.row);
2243
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
2244
+ if (rightChar === ':') {
2245
+ return {
2246
+ text: '',
2247
+ selection: [1, 1]
2248
+ };
2249
+ }
2250
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
2251
+ return {
2252
+ text: ':;',
2253
+ selection: [1, 1]
2254
+ };
2255
+ }
2256
+ }
2257
+ }
2258
+ });
2259
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
2260
+ var selected = session.doc.getTextRange(range);
2261
+ if (!range.isMultiLine() && selected === ':') {
2262
+ var cursor = editor.getCursorPosition();
2263
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
2264
+ var token = iterator.getCurrentToken();
2265
+ if (token && token.value.match(/\s+/)) {
2266
+ token = iterator.stepBackward();
2267
+ }
2268
+ if (token && token.type === 'support.type') {
2269
+ var line = session.doc.getLine(range.start.row);
2270
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
2271
+ if (rightChar === ';') {
2272
+ range.end.column++;
2273
+ return range;
2274
+ }
2275
+ }
2276
+ }
2277
+ });
2278
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
2279
+ if (text === ';' && editor.selection.isEmpty()) {
2280
+ var cursor = editor.getCursorPosition();
2281
+ var line = session.doc.getLine(cursor.row);
2282
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
2283
+ if (rightChar === ';') {
2284
+ return {
2285
+ text: '',
2286
+ selection: [1, 1]
2287
+ };
2288
+ }
2289
+ }
2290
+ });
2291
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
2292
+ if (text === '!' && editor.selection.isEmpty()) {
2293
+ var cursor = editor.getCursorPosition();
2294
+ var line = session.doc.getLine(cursor.row);
2295
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
2296
+ return {
2297
+ text: '!important',
2298
+ selection: [10, 10]
2299
+ };
2300
+ }
2301
+ }
2302
+ });
2303
+ };
2304
+ oop.inherits(CssBehaviour, CstyleBehaviour);
2305
+ exports.CssBehaviour = CssBehaviour;
2306
+
2307
+ });
2308
+
2309
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2310
+ var oop = require("../lib/oop");
2311
+ var TextMode = require("./text").Mode;
2312
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
2313
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
2314
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2315
+ var CssCompletions = require("./css_completions").CssCompletions;
2316
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
2317
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
2318
+ var Mode = function () {
2319
+ this.HighlightRules = CssHighlightRules;
2320
+ this.$outdent = new MatchingBraceOutdent();
2321
+ this.$behaviour = new CssBehaviour();
2322
+ this.$completer = new CssCompletions();
2323
+ this.foldingRules = new CStyleFoldMode();
2324
+ };
2325
+ oop.inherits(Mode, TextMode);
2326
+ (function () {
2327
+ this.foldingRules = "cStyle";
2328
+ this.blockComment = { start: "/*", end: "*/" };
2329
+ this.getNextLineIndent = function (state, line, tab) {
2330
+ var indent = this.$getIndent(line);
2331
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
2332
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
2333
+ return indent;
2334
+ }
2335
+ var match = line.match(/^.*\{\s*$/);
2336
+ if (match) {
2337
+ indent += tab;
2338
+ }
2339
+ return indent;
2340
+ };
2341
+ this.checkOutdent = function (state, line, input) {
2342
+ return this.$outdent.checkOutdent(line, input);
2343
+ };
2344
+ this.autoOutdent = function (state, doc, row) {
2345
+ this.$outdent.autoOutdent(doc, row);
2346
+ };
2347
+ this.getCompletions = function (state, session, pos, prefix) {
2348
+ return this.$completer.getCompletions(state, session, pos, prefix);
2349
+ };
2350
+ this.createWorker = function (session) {
2351
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
2352
+ worker.attachToDocument(session.getDocument());
2353
+ worker.on("annotate", function (e) {
2354
+ session.setAnnotations(e.data);
2355
+ });
2356
+ worker.on("terminate", function () {
2357
+ session.clearAnnotations();
2358
+ });
2359
+ return worker;
2360
+ };
2361
+ this.$id = "ace/mode/css";
2362
+ this.snippetFileId = "ace/snippets/css";
2363
+ }).call(Mode.prototype);
2364
+ exports.Mode = Mode;
2365
+
2366
+ });
2367
+
2368
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
2369
+ var oop = require("../../lib/oop");
2370
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2371
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
2372
+ this.defaultMode = defaultMode;
2373
+ this.subModes = subModes;
2374
+ };
2375
+ oop.inherits(FoldMode, BaseFoldMode);
2376
+ (function () {
2377
+ this.$getMode = function (state) {
2378
+ if (typeof state != "string")
2379
+ state = state[0];
2380
+ for (var key in this.subModes) {
2381
+ if (state.indexOf(key) === 0)
2382
+ return this.subModes[key];
2383
+ }
2384
+ return null;
2385
+ };
2386
+ this.$tryMode = function (state, session, foldStyle, row) {
2387
+ var mode = this.$getMode(state);
2388
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
2389
+ };
2390
+ this.getFoldWidget = function (session, foldStyle, row) {
2391
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
2392
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
2393
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
2394
+ };
2395
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
2396
+ var mode = this.$getMode(session.getState(row - 1));
2397
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
2398
+ mode = this.$getMode(session.getState(row));
2399
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
2400
+ mode = this.defaultMode;
2401
+ return mode.getFoldWidgetRange(session, foldStyle, row);
2402
+ };
2403
+ }).call(FoldMode.prototype);
2404
+
2405
+ });
2406
+
2407
+ ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2408
+ var oop = require("../../lib/oop");
2409
+ var MixedFoldMode = require("./mixed").FoldMode;
2410
+ var XmlFoldMode = require("./xml").FoldMode;
2411
+ var CStyleFoldMode = require("./cstyle").FoldMode;
2412
+ var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
2413
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2414
+ "js-": new CStyleFoldMode(),
2415
+ "css-": new CStyleFoldMode()
2416
+ });
2417
+ };
2418
+ oop.inherits(FoldMode, MixedFoldMode);
2419
+
2420
+ });
2421
+
2422
+ ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict";
2423
+ var TokenIterator = require("../token_iterator").TokenIterator;
2424
+ var commonAttributes = [
2425
+ "accesskey",
2426
+ "class",
2427
+ "contenteditable",
2428
+ "contextmenu",
2429
+ "dir",
2430
+ "draggable",
2431
+ "dropzone",
2432
+ "hidden",
2433
+ "id",
2434
+ "inert",
2435
+ "itemid",
2436
+ "itemprop",
2437
+ "itemref",
2438
+ "itemscope",
2439
+ "itemtype",
2440
+ "lang",
2441
+ "spellcheck",
2442
+ "style",
2443
+ "tabindex",
2444
+ "title",
2445
+ "translate"
2446
+ ];
2447
+ var eventAttributes = [
2448
+ "onabort",
2449
+ "onblur",
2450
+ "oncancel",
2451
+ "oncanplay",
2452
+ "oncanplaythrough",
2453
+ "onchange",
2454
+ "onclick",
2455
+ "onclose",
2456
+ "oncontextmenu",
2457
+ "oncuechange",
2458
+ "ondblclick",
2459
+ "ondrag",
2460
+ "ondragend",
2461
+ "ondragenter",
2462
+ "ondragleave",
2463
+ "ondragover",
2464
+ "ondragstart",
2465
+ "ondrop",
2466
+ "ondurationchange",
2467
+ "onemptied",
2468
+ "onended",
2469
+ "onerror",
2470
+ "onfocus",
2471
+ "oninput",
2472
+ "oninvalid",
2473
+ "onkeydown",
2474
+ "onkeypress",
2475
+ "onkeyup",
2476
+ "onload",
2477
+ "onloadeddata",
2478
+ "onloadedmetadata",
2479
+ "onloadstart",
2480
+ "onmousedown",
2481
+ "onmousemove",
2482
+ "onmouseout",
2483
+ "onmouseover",
2484
+ "onmouseup",
2485
+ "onmousewheel",
2486
+ "onpause",
2487
+ "onplay",
2488
+ "onplaying",
2489
+ "onprogress",
2490
+ "onratechange",
2491
+ "onreset",
2492
+ "onscroll",
2493
+ "onseeked",
2494
+ "onseeking",
2495
+ "onselect",
2496
+ "onshow",
2497
+ "onstalled",
2498
+ "onsubmit",
2499
+ "onsuspend",
2500
+ "ontimeupdate",
2501
+ "onvolumechange",
2502
+ "onwaiting"
2503
+ ];
2504
+ var globalAttributes = commonAttributes.concat(eventAttributes);
2505
+ var attributeMap = {
2506
+ "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 },
2507
+ "abbr": {},
2508
+ "address": {},
2509
+ "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 },
2510
+ "article": { "pubdate": 1 },
2511
+ "aside": {},
2512
+ "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
2513
+ "b": {},
2514
+ "base": { "href": 1, "target": 1 },
2515
+ "bdi": {},
2516
+ "bdo": {},
2517
+ "blockquote": { "cite": 1 },
2518
+ "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 },
2519
+ "br": {},
2520
+ "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 } },
2521
+ "canvas": { "width": 1, "height": 1 },
2522
+ "caption": {},
2523
+ "cite": {},
2524
+ "code": {},
2525
+ "col": { "span": 1 },
2526
+ "colgroup": { "span": 1 },
2527
+ "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 },
2528
+ "data": {},
2529
+ "datalist": {},
2530
+ "dd": {},
2531
+ "del": { "cite": 1, "datetime": 1 },
2532
+ "details": { "open": 1 },
2533
+ "dfn": {},
2534
+ "dialog": { "open": 1 },
2535
+ "div": {},
2536
+ "dl": {},
2537
+ "dt": {},
2538
+ "em": {},
2539
+ "embed": { "src": 1, "height": 1, "width": 1, "type": 1 },
2540
+ "fieldset": { "disabled": 1, "form": 1, "name": 1 },
2541
+ "figcaption": {},
2542
+ "figure": {},
2543
+ "footer": {},
2544
+ "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 } },
2545
+ "h1": {},
2546
+ "h2": {},
2547
+ "h3": {},
2548
+ "h4": {},
2549
+ "h5": {},
2550
+ "h6": {},
2551
+ "head": {},
2552
+ "header": {},
2553
+ "hr": {},
2554
+ "html": { "manifest": 1 },
2555
+ "i": {},
2556
+ "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 } },
2557
+ "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 },
2558
+ "input": {
2559
+ "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 },
2560
+ "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
2561
+ },
2562
+ "ins": { "cite": 1, "datetime": 1 },
2563
+ "kbd": {},
2564
+ "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 },
2565
+ "label": { "form": 1, "for": 1 },
2566
+ "legend": {},
2567
+ "li": { "value": 1 },
2568
+ "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 },
2569
+ "main": {},
2570
+ "map": { "name": 1 },
2571
+ "mark": {},
2572
+ "math": {},
2573
+ "menu": { "type": 1, "label": 1 },
2574
+ "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 },
2575
+ "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 },
2576
+ "nav": {},
2577
+ "noscript": { "href": 1 },
2578
+ "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 },
2579
+ "ol": { "start": 1, "reversed": 1 },
2580
+ "optgroup": { "disabled": 1, "label": 1 },
2581
+ "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 },
2582
+ "output": { "for": 1, "form": 1, "name": 1 },
2583
+ "p": {},
2584
+ "param": { "name": 1, "value": 1 },
2585
+ "pre": {},
2586
+ "progress": { "value": 1, "max": 1 },
2587
+ "q": { "cite": 1 },
2588
+ "rp": {},
2589
+ "rt": {},
2590
+ "ruby": {},
2591
+ "s": {},
2592
+ "samp": {},
2593
+ "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 },
2594
+ "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } },
2595
+ "small": {},
2596
+ "source": { "src": 1, "type": 1, "media": 1 },
2597
+ "span": {},
2598
+ "strong": {},
2599
+ "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 },
2600
+ "sub": {},
2601
+ "sup": {},
2602
+ "svg": {},
2603
+ "table": { "summary": 1 },
2604
+ "tbody": {},
2605
+ "td": { "headers": 1, "rowspan": 1, "colspan": 1 },
2606
+ "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 } },
2607
+ "tfoot": {},
2608
+ "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 },
2609
+ "thead": {},
2610
+ "time": { "datetime": 1 },
2611
+ "title": {},
2612
+ "tr": {},
2613
+ "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 },
2614
+ "section": {},
2615
+ "summary": {},
2616
+ "u": {},
2617
+ "ul": {},
2618
+ "var": {},
2619
+ "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 } },
2620
+ "wbr": {}
2621
+ };
2622
+ var elements = Object.keys(attributeMap);
2623
+ function is(token, type) {
2624
+ return token.type.lastIndexOf(type + ".xml") > -1;
2625
+ }
2626
+ function findTagName(session, pos) {
2627
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2628
+ var token = iterator.getCurrentToken();
2629
+ while (token && !is(token, "tag-name")) {
2630
+ token = iterator.stepBackward();
2631
+ }
2632
+ if (token)
2633
+ return token.value;
2634
+ }
2635
+ function findAttributeName(session, pos) {
2636
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2637
+ var token = iterator.getCurrentToken();
2638
+ while (token && !is(token, "attribute-name")) {
2639
+ token = iterator.stepBackward();
2640
+ }
2641
+ if (token)
2642
+ return token.value;
2643
+ }
2644
+ var HtmlCompletions = function () {
2645
+ };
2646
+ (function () {
2647
+ this.getCompletions = function (state, session, pos, prefix) {
2648
+ var token = session.getTokenAt(pos.row, pos.column);
2649
+ if (!token)
2650
+ return [];
2651
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2652
+ return this.getTagCompletions(state, session, pos, prefix);
2653
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2654
+ return this.getAttributeCompletions(state, session, pos, prefix);
2655
+ if (is(token, "attribute-value"))
2656
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
2657
+ var line = session.getLine(pos.row).substr(0, pos.column);
2658
+ if (/&[a-z]*$/i.test(line))
2659
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
2660
+ return [];
2661
+ };
2662
+ this.getTagCompletions = function (state, session, pos, prefix) {
2663
+ return elements.map(function (element) {
2664
+ return {
2665
+ value: element,
2666
+ meta: "tag",
2667
+ score: 1000000
2668
+ };
2669
+ });
2670
+ };
2671
+ this.getAttributeCompletions = function (state, session, pos, prefix) {
2672
+ var tagName = findTagName(session, pos);
2673
+ if (!tagName)
2674
+ return [];
2675
+ var attributes = globalAttributes;
2676
+ if (tagName in attributeMap) {
2677
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2678
+ }
2679
+ return attributes.map(function (attribute) {
2680
+ return {
2681
+ caption: attribute,
2682
+ snippet: attribute + '="$0"',
2683
+ meta: "attribute",
2684
+ score: 1000000
2685
+ };
2686
+ });
2687
+ };
2688
+ this.getAttributeValueCompletions = function (state, session, pos, prefix) {
2689
+ var tagName = findTagName(session, pos);
2690
+ var attributeName = findAttributeName(session, pos);
2691
+ if (!tagName)
2692
+ return [];
2693
+ var values = [];
2694
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2695
+ values = Object.keys(attributeMap[tagName][attributeName]);
2696
+ }
2697
+ return values.map(function (value) {
2698
+ return {
2699
+ caption: value,
2700
+ snippet: value,
2701
+ meta: "attribute value",
2702
+ score: 1000000
2703
+ };
2704
+ });
2705
+ };
2706
+ this.getHTMLEntityCompletions = function (state, session, pos, prefix) {
2707
+ 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;'];
2708
+ return values.map(function (value) {
2709
+ return {
2710
+ caption: value,
2711
+ snippet: value,
2712
+ meta: "html entity",
2713
+ score: 1000000
2714
+ };
2715
+ });
2716
+ };
2717
+ }).call(HtmlCompletions.prototype);
2718
+ exports.HtmlCompletions = HtmlCompletions;
2719
+
2720
+ });
2721
+
2722
+ ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict";
2723
+ var oop = require("../lib/oop");
2724
+ var lang = require("../lib/lang");
2725
+ var TextMode = require("./text").Mode;
2726
+ var JavaScriptMode = require("./javascript").Mode;
2727
+ var CssMode = require("./css").Mode;
2728
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2729
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2730
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2731
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2732
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2733
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2734
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2735
+ var Mode = function (options) {
2736
+ this.fragmentContext = options && options.fragmentContext;
2737
+ this.HighlightRules = HtmlHighlightRules;
2738
+ this.$behaviour = new XmlBehaviour();
2739
+ this.$completer = new HtmlCompletions();
2740
+ this.createModeDelegates({
2741
+ "js-": JavaScriptMode,
2742
+ "css-": CssMode
2743
+ });
2744
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2745
+ };
2746
+ oop.inherits(Mode, TextMode);
2747
+ (function () {
2748
+ this.blockComment = { start: "<!--", end: "-->" };
2749
+ this.voidElements = lang.arrayToMap(voidElements);
2750
+ this.getNextLineIndent = function (state, line, tab) {
2751
+ return this.$getIndent(line);
2752
+ };
2753
+ this.checkOutdent = function (state, line, input) {
2754
+ return false;
2755
+ };
2756
+ this.getCompletions = function (state, session, pos, prefix) {
2757
+ return this.$completer.getCompletions(state, session, pos, prefix);
2758
+ };
2759
+ this.createWorker = function (session) {
2760
+ if (this.constructor != Mode)
2761
+ return;
2762
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2763
+ worker.attachToDocument(session.getDocument());
2764
+ if (this.fragmentContext)
2765
+ worker.call("setOptions", [{ context: this.fragmentContext }]);
2766
+ worker.on("error", function (e) {
2767
+ session.setAnnotations(e.data);
2768
+ });
2769
+ worker.on("terminate", function () {
2770
+ session.clearAnnotations();
2771
+ });
2772
+ return worker;
2773
+ };
2774
+ this.$id = "ace/mode/html";
2775
+ this.snippetFileId = "ace/snippets/html";
2776
+ }).call(Mode.prototype);
2777
+ exports.Mode = Mode;
2778
+
2779
+ });
2780
+
2781
+ ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2782
+ var oop = require("../lib/oop");
2783
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2784
+ var reservedKeywords = exports.reservedKeywords = ('!|{|}|case|do|done|elif|else|' +
2785
+ 'esac|fi|for|if|in|then|until|while|' +
2786
+ '&|;|export|local|read|typeset|unset|' +
2787
+ 'elif|select|set|function|declare|readonly');
2788
+ var languageConstructs = exports.languageConstructs = ('[|]|alias|bg|bind|break|builtin|' +
2789
+ 'cd|command|compgen|complete|continue|' +
2790
+ 'dirs|disown|echo|enable|eval|exec|' +
2791
+ 'exit|fc|fg|getopts|hash|help|history|' +
2792
+ 'jobs|kill|let|logout|popd|printf|pushd|' +
2793
+ 'pwd|return|set|shift|shopt|source|' +
2794
+ 'suspend|test|times|trap|type|ulimit|' +
2795
+ 'umask|unalias|wait');
2796
+ var ShHighlightRules = function () {
2797
+ var keywordMapper = this.createKeywordMapper({
2798
+ "keyword": reservedKeywords,
2799
+ "support.function.builtin": languageConstructs,
2800
+ "invalid.deprecated": "debugger"
2801
+ }, "identifier");
2802
+ var integer = "(?:(?:[1-9]\\d*)|(?:0))";
2803
+ var fraction = "(?:\\.\\d+)";
2804
+ var intPart = "(?:\\d+)";
2805
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
2806
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
2807
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
2808
+ var fileDescriptor = "(?:&" + intPart + ")";
2809
+ var variableName = "[a-zA-Z_][a-zA-Z0-9_]*";
2810
+ var variable = "(?:" + variableName + "(?==))";
2811
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
2812
+ var func = "(?:" + variableName + "\\s*\\(\\))";
2813
+ this.$rules = {
2814
+ "start": [{
2815
+ token: "constant",
2816
+ regex: /\\./
2817
+ }, {
2818
+ token: ["text", "comment"],
2819
+ regex: /(^|\s)(#.*)$/
2820
+ }, {
2821
+ token: "string.start",
2822
+ regex: '"',
2823
+ push: [{
2824
+ token: "constant.language.escape",
2825
+ regex: /\\(?:[$`"\\]|$)/
2826
+ }, {
2827
+ include: "variables"
2828
+ }, {
2829
+ token: "keyword.operator",
2830
+ regex: /`/ // TODO highlight `
2831
+ }, {
2832
+ token: "string.end",
2833
+ regex: '"',
2834
+ next: "pop"
2835
+ }, {
2836
+ defaultToken: "string"
2837
+ }]
2838
+ }, {
2839
+ token: "string",
2840
+ regex: "\\$'",
2841
+ push: [{
2842
+ token: "constant.language.escape",
2843
+ regex: /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
2844
+ }, {
2845
+ token: "string",
2846
+ regex: "'",
2847
+ next: "pop"
2848
+ }, {
2849
+ defaultToken: "string"
2850
+ }]
2851
+ }, {
2852
+ regex: "<<<",
2853
+ token: "keyword.operator"
2854
+ }, {
2855
+ stateName: "heredoc",
2856
+ regex: "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
2857
+ onMatch: function (value, currentState, stack) {
2858
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
2859
+ var tokens = value.split(this.splitRegex);
2860
+ stack.push(next, tokens[4]);
2861
+ return [
2862
+ { type: "constant", value: tokens[1] },
2863
+ { type: "text", value: tokens[2] },
2864
+ { type: "string", value: tokens[3] },
2865
+ { type: "support.class", value: tokens[4] },
2866
+ { type: "string", value: tokens[5] }
2867
+ ];
2868
+ },
2869
+ rules: {
2870
+ heredoc: [{
2871
+ onMatch: function (value, currentState, stack) {
2872
+ if (value === stack[1]) {
2873
+ stack.shift();
2874
+ stack.shift();
2875
+ this.next = stack[0] || "start";
2876
+ return "support.class";
2877
+ }
2878
+ this.next = "";
2879
+ return "string";
2880
+ },
2881
+ regex: ".*$",
2882
+ next: "start"
2883
+ }],
2884
+ indentedHeredoc: [{
2885
+ token: "string",
2886
+ regex: "^\t+"
2887
+ }, {
2888
+ onMatch: function (value, currentState, stack) {
2889
+ if (value === stack[1]) {
2890
+ stack.shift();
2891
+ stack.shift();
2892
+ this.next = stack[0] || "start";
2893
+ return "support.class";
2894
+ }
2895
+ this.next = "";
2896
+ return "string";
2897
+ },
2898
+ regex: ".*$",
2899
+ next: "start"
2900
+ }]
2901
+ }
2902
+ }, {
2903
+ regex: "$",
2904
+ token: "empty",
2905
+ next: function (currentState, stack) {
2906
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
2907
+ return stack[0];
2908
+ return currentState;
2909
+ }
2910
+ }, {
2911
+ token: ["keyword", "text", "text", "text", "variable"],
2912
+ regex: /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/
2913
+ }, {
2914
+ token: "variable.language",
2915
+ regex: builtinVariable
2916
+ }, {
2917
+ token: "variable",
2918
+ regex: variable
2919
+ }, {
2920
+ include: "variables"
2921
+ }, {
2922
+ token: "support.function",
2923
+ regex: func
2924
+ }, {
2925
+ token: "support.function",
2926
+ regex: fileDescriptor
2927
+ }, {
2928
+ token: "string", // ' string
2929
+ start: "'", end: "'"
2930
+ }, {
2931
+ token: "constant.numeric", // float
2932
+ regex: floatNumber
2933
+ }, {
2934
+ token: "constant.numeric", // integer
2935
+ regex: integer + "\\b"
2936
+ }, {
2937
+ token: keywordMapper,
2938
+ regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b"
2939
+ }, {
2940
+ token: "keyword.operator",
2941
+ regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"
2942
+ }, {
2943
+ token: "punctuation.operator",
2944
+ regex: ";"
2945
+ }, {
2946
+ token: "paren.lparen",
2947
+ regex: "[\\[\\(\\{]"
2948
+ }, {
2949
+ token: "paren.rparen",
2950
+ regex: "[\\]]"
2951
+ }, {
2952
+ token: "paren.rparen",
2953
+ regex: "[\\)\\}]",
2954
+ next: "pop"
2955
+ }],
2956
+ variables: [{
2957
+ token: "variable",
2958
+ regex: /(\$)(\w+)/
2959
+ }, {
2960
+ token: ["variable", "paren.lparen"],
2961
+ regex: /(\$)(\()/,
2962
+ push: "start"
2963
+ }, {
2964
+ token: ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"],
2965
+ regex: /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,
2966
+ push: "start"
2967
+ }, {
2968
+ token: "variable",
2969
+ regex: /\$[*@#?\-$!0_]/
2970
+ }, {
2971
+ token: ["variable", "paren.lparen"],
2972
+ regex: /(\$)(\{)/,
2973
+ push: "start"
2974
+ }]
2975
+ };
2976
+ this.normalizeRules();
2977
+ };
2978
+ oop.inherits(ShHighlightRules, TextHighlightRules);
2979
+ exports.ShHighlightRules = ShHighlightRules;
2980
+
2981
+ });
2982
+
2983
+ ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2984
+ var oop = require("../lib/oop");
2985
+ var TextMode = require("./text").Mode;
2986
+ var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
2987
+ var Range = require("../range").Range;
2988
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
2989
+ var Mode = function () {
2990
+ this.HighlightRules = ShHighlightRules;
2991
+ this.foldingRules = new CStyleFoldMode();
2992
+ this.$behaviour = this.$defaultBehaviour;
2993
+ };
2994
+ oop.inherits(Mode, TextMode);
2995
+ (function () {
2996
+ this.lineCommentStart = "#";
2997
+ this.getNextLineIndent = function (state, line, tab) {
2998
+ var indent = this.$getIndent(line);
2999
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
3000
+ var tokens = tokenizedLine.tokens;
3001
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
3002
+ return indent;
3003
+ }
3004
+ if (state == "start") {
3005
+ var match = line.match(/^.*[\{\(\[:]\s*$/);
3006
+ if (match) {
3007
+ indent += tab;
3008
+ }
3009
+ }
3010
+ return indent;
3011
+ };
3012
+ var outdents = {
3013
+ "pass": 1,
3014
+ "return": 1,
3015
+ "raise": 1,
3016
+ "break": 1,
3017
+ "continue": 1
3018
+ };
3019
+ this.checkOutdent = function (state, line, input) {
3020
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
3021
+ return false;
3022
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
3023
+ if (!tokens)
3024
+ return false;
3025
+ do {
3026
+ var last = tokens.pop();
3027
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
3028
+ if (!last)
3029
+ return false;
3030
+ return (last.type == "keyword" && outdents[last.value]);
3031
+ };
3032
+ this.autoOutdent = function (state, doc, row) {
3033
+ row += 1;
3034
+ var indent = this.$getIndent(doc.getLine(row));
3035
+ var tab = doc.getTabString();
3036
+ if (indent.slice(-tab.length) == tab)
3037
+ doc.remove(new Range(row, indent.length - tab.length, row, indent.length));
3038
+ };
3039
+ this.$id = "ace/mode/sh";
3040
+ this.snippetFileId = "ace/snippets/sh";
3041
+ }).call(Mode.prototype);
3042
+ exports.Mode = Mode;
3043
+
3044
+ });
3045
+
3046
+ ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict";
3047
+ var oop = require("../lib/oop");
3048
+ var lang = require("../lib/lang");
3049
+ var TextMode = require("./text").Mode;
3050
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
3051
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
3052
+ var XmlFoldMode = require("./folding/xml").FoldMode;
3053
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
3054
+ var Mode = function () {
3055
+ this.HighlightRules = XmlHighlightRules;
3056
+ this.$behaviour = new XmlBehaviour();
3057
+ this.foldingRules = new XmlFoldMode();
3058
+ };
3059
+ oop.inherits(Mode, TextMode);
3060
+ (function () {
3061
+ this.voidElements = lang.arrayToMap([]);
3062
+ this.blockComment = { start: "<!--", end: "-->" };
3063
+ this.createWorker = function (session) {
3064
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
3065
+ worker.attachToDocument(session.getDocument());
3066
+ worker.on("error", function (e) {
3067
+ session.setAnnotations(e.data);
3068
+ });
3069
+ worker.on("terminate", function () {
3070
+ session.clearAnnotations();
3071
+ });
3072
+ return worker;
3073
+ };
3074
+ this.$id = "ace/mode/xml";
3075
+ }).call(Mode.prototype);
3076
+ exports.Mode = Mode;
3077
+
3078
+ });
3079
+
3080
+ ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"], function(require, exports, module){"use strict";
3081
+ var oop = require("../lib/oop");
3082
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
3083
+ var TextMode = require("./text").Mode;
3084
+ var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
3085
+ var MarkdownFoldMode = require("./folding/markdown").FoldMode;
3086
+ var Mode = function () {
3087
+ this.HighlightRules = MarkdownHighlightRules;
3088
+ this.createModeDelegates({
3089
+ javascript: require("./javascript").Mode,
3090
+ html: require("./html").Mode,
3091
+ bash: require("./sh").Mode,
3092
+ sh: require("./sh").Mode,
3093
+ xml: require("./xml").Mode,
3094
+ css: require("./css").Mode
3095
+ });
3096
+ this.foldingRules = new MarkdownFoldMode();
3097
+ this.$behaviour = new CstyleBehaviour({ braces: true });
3098
+ };
3099
+ oop.inherits(Mode, TextMode);
3100
+ (function () {
3101
+ this.type = "text";
3102
+ this.blockComment = { start: "<!--", end: "-->" };
3103
+ this.$quotes = { '"': '"', "`": "`" };
3104
+ this.getNextLineIndent = function (state, line, tab) {
3105
+ if (state == "listblock") {
3106
+ var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
3107
+ if (!match)
3108
+ return "";
3109
+ var marker = match[2];
3110
+ if (!marker)
3111
+ marker = parseInt(match[3], 10) + 1 + ".";
3112
+ return match[1] + marker + match[4];
3113
+ }
3114
+ else {
3115
+ return this.$getIndent(line);
3116
+ }
3117
+ };
3118
+ this.$id = "ace/mode/markdown";
3119
+ this.snippetFileId = "ace/snippets/markdown";
3120
+ }).call(Mode.prototype);
3121
+ exports.Mode = Mode;
3122
+
3123
+ });
3124
+
3125
+ ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
3126
+ var oop = require("../lib/oop");
3127
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3128
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
3129
+ function CoffeeHighlightRules() {
3130
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
3131
+ var keywords = ("this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
3132
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
3133
+ "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
3134
+ "or|on|unless|until|and|yes|yield|export|import|default");
3135
+ var langConstant = ("true|false|null|undefined|NaN|Infinity");
3136
+ var illegal = ("case|const|function|var|void|with|enum|implements|" +
3137
+ "interface|let|package|private|protected|public|static");
3138
+ var supportClass = ("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
3139
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
3140
+ "SyntaxError|TypeError|URIError|" +
3141
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
3142
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray");
3143
+ var supportFunction = ("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
3144
+ "encodeURIComponent|decodeURI|decodeURIComponent|String|");
3145
+ var variableLanguage = ("window|arguments|prototype|document");
3146
+ var keywordMapper = this.createKeywordMapper({
3147
+ "keyword": keywords,
3148
+ "constant.language": langConstant,
3149
+ "invalid.illegal": illegal,
3150
+ "language.support.class": supportClass,
3151
+ "language.support.function": supportFunction,
3152
+ "variable.language": variableLanguage
3153
+ }, "identifier");
3154
+ var functionRule = {
3155
+ token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
3156
+ regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source
3157
+ };
3158
+ var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
3159
+ this.$rules = {
3160
+ start: [
3161
+ {
3162
+ token: "constant.numeric",
3163
+ regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
3164
+ }, {
3165
+ stateName: "qdoc",
3166
+ token: "string", regex: "'''", next: [
3167
+ { token: "string", regex: "'''", next: "start" },
3168
+ { token: "constant.language.escape", regex: stringEscape },
3169
+ { defaultToken: "string" }
3170
+ ]
3171
+ }, {
3172
+ stateName: "qqdoc",
3173
+ token: "string",
3174
+ regex: '"""',
3175
+ next: [
3176
+ { token: "string", regex: '"""', next: "start" },
3177
+ { token: "paren.string", regex: '#{', push: "start" },
3178
+ { token: "constant.language.escape", regex: stringEscape },
3179
+ { defaultToken: "string" }
3180
+ ]
3181
+ }, {
3182
+ stateName: "qstring",
3183
+ token: "string", regex: "'", next: [
3184
+ { token: "string", regex: "'", next: "start" },
3185
+ { token: "constant.language.escape", regex: stringEscape },
3186
+ { defaultToken: "string" }
3187
+ ]
3188
+ }, {
3189
+ stateName: "qqstring",
3190
+ token: "string.start", regex: '"', next: [
3191
+ { token: "string.end", regex: '"', next: "start" },
3192
+ { token: "paren.string", regex: '#{', push: "start" },
3193
+ { token: "constant.language.escape", regex: stringEscape },
3194
+ { defaultToken: "string" }
3195
+ ]
3196
+ }, {
3197
+ stateName: "js",
3198
+ token: "string", regex: "`", next: [
3199
+ { token: "string", regex: "`", next: "start" },
3200
+ { token: "constant.language.escape", regex: stringEscape },
3201
+ { defaultToken: "string" }
3202
+ ]
3203
+ }, {
3204
+ regex: "[{}]", onMatch: function (val, state, stack) {
3205
+ this.next = "";
3206
+ if (val == "{" && stack.length) {
3207
+ stack.unshift("start", state);
3208
+ return "paren";
3209
+ }
3210
+ if (val == "}" && stack.length) {
3211
+ stack.shift();
3212
+ this.next = stack.shift() || "";
3213
+ if (this.next.indexOf("string") != -1)
3214
+ return "paren.string";
3215
+ }
3216
+ return "paren";
3217
+ }
3218
+ }, {
3219
+ token: "string.regex",
3220
+ regex: "///",
3221
+ next: "heregex"
3222
+ }, {
3223
+ token: "string.regex",
3224
+ regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
3225
+ }, {
3226
+ token: "comment",
3227
+ regex: "###(?!#)",
3228
+ next: "comment"
3229
+ }, {
3230
+ token: "comment",
3231
+ regex: "#.*"
3232
+ }, {
3233
+ token: ["punctuation.operator", "text", "identifier"],
3234
+ regex: "(\\.)(\\s*)(" + illegal + ")"
3235
+ }, {
3236
+ token: "punctuation.operator",
3237
+ regex: "\\.{1,3}"
3238
+ }, {
3239
+ token: ["keyword", "text", "language.support.class",
3240
+ "text", "keyword", "text", "language.support.class"],
3241
+ regex: "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?"
3242
+ }, {
3243
+ token: ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token),
3244
+ regex: "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex
3245
+ },
3246
+ functionRule,
3247
+ {
3248
+ token: "variable",
3249
+ regex: "@(?:" + identifier + ")?"
3250
+ }, {
3251
+ token: keywordMapper,
3252
+ regex: identifier
3253
+ }, {
3254
+ token: "punctuation.operator",
3255
+ regex: "\\,|\\."
3256
+ }, {
3257
+ token: "storage.type",
3258
+ regex: "[\\-=]>"
3259
+ }, {
3260
+ token: "keyword.operator",
3261
+ regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
3262
+ }, {
3263
+ token: "paren.lparen",
3264
+ regex: "[({[]"
3265
+ }, {
3266
+ token: "paren.rparen",
3267
+ regex: "[\\]})]"
3268
+ }, {
3269
+ token: "text",
3270
+ regex: "\\s+"
3271
+ }
3272
+ ],
3273
+ heregex: [{
3274
+ token: "string.regex",
3275
+ regex: '.*?///[imgy]{0,4}',
3276
+ next: "start"
3277
+ }, {
3278
+ token: "comment.regex",
3279
+ regex: "\\s+(?:#.*)?"
3280
+ }, {
3281
+ token: "string.regex",
3282
+ regex: "\\S+"
3283
+ }],
3284
+ comment: [{
3285
+ token: "comment",
3286
+ regex: '###',
3287
+ next: "start"
3288
+ }, {
3289
+ defaultToken: "comment"
3290
+ }]
3291
+ };
3292
+ this.normalizeRules();
3293
+ }
3294
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
3295
+
3296
+ });
3297
+
3298
+ ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict";
3299
+ var oop = require("../../lib/oop");
3300
+ var BaseFoldMode = require("./fold_mode").FoldMode;
3301
+ var Range = require("../../range").Range;
3302
+ var FoldMode = exports.FoldMode = function () { };
3303
+ oop.inherits(FoldMode, BaseFoldMode);
3304
+ (function () {
3305
+ this.commentBlock = function (session, row) {
3306
+ var re = /\S/;
3307
+ var line = session.getLine(row);
3308
+ var startLevel = line.search(re);
3309
+ if (startLevel == -1 || line[startLevel] != "#")
3310
+ return;
3311
+ var startColumn = line.length;
3312
+ var maxRow = session.getLength();
3313
+ var startRow = row;
3314
+ var endRow = row;
3315
+ while (++row < maxRow) {
3316
+ line = session.getLine(row);
3317
+ var level = line.search(re);
3318
+ if (level == -1)
3319
+ continue;
3320
+ if (line[level] != "#")
3321
+ break;
3322
+ endRow = row;
3323
+ }
3324
+ if (endRow > startRow) {
3325
+ var endColumn = session.getLine(endRow).length;
3326
+ return new Range(startRow, startColumn, endRow, endColumn);
3327
+ }
3328
+ };
3329
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
3330
+ var range = this.indentationBlock(session, row);
3331
+ if (range)
3332
+ return range;
3333
+ range = this.commentBlock(session, row);
3334
+ if (range)
3335
+ return range;
3336
+ };
3337
+ this.getFoldWidget = function (session, foldStyle, row) {
3338
+ var line = session.getLine(row);
3339
+ var indent = line.search(/\S/);
3340
+ var next = session.getLine(row + 1);
3341
+ var prev = session.getLine(row - 1);
3342
+ var prevIndent = prev.search(/\S/);
3343
+ var nextIndent = next.search(/\S/);
3344
+ if (indent == -1) {
3345
+ session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : "";
3346
+ return "";
3347
+ }
3348
+ if (prevIndent == -1) {
3349
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
3350
+ session.foldWidgets[row - 1] = "";
3351
+ session.foldWidgets[row + 1] = "";
3352
+ return "start";
3353
+ }
3354
+ }
3355
+ else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
3356
+ if (session.getLine(row - 2).search(/\S/) == -1) {
3357
+ session.foldWidgets[row - 1] = "start";
3358
+ session.foldWidgets[row + 1] = "";
3359
+ return "";
3360
+ }
3361
+ }
3362
+ if (prevIndent != -1 && prevIndent < indent)
3363
+ session.foldWidgets[row - 1] = "start";
3364
+ else
3365
+ session.foldWidgets[row - 1] = "";
3366
+ if (indent < nextIndent)
3367
+ return "start";
3368
+ else
3369
+ return "";
3370
+ };
3371
+ }).call(FoldMode.prototype);
3372
+
3373
+ });
3374
+
3375
+ ace.define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module){"use strict";
3376
+ var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
3377
+ var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
3378
+ var FoldMode = require("./folding/coffee").FoldMode;
3379
+ var Range = require("../range").Range;
3380
+ var TextMode = require("./text").Mode;
3381
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
3382
+ var oop = require("../lib/oop");
3383
+ function Mode() {
3384
+ this.HighlightRules = Rules;
3385
+ this.$outdent = new Outdent();
3386
+ this.foldingRules = new FoldMode();
3387
+ }
3388
+ oop.inherits(Mode, TextMode);
3389
+ (function () {
3390
+ var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;
3391
+ this.lineCommentStart = "#";
3392
+ this.blockComment = { start: "###", end: "###" };
3393
+ this.getNextLineIndent = function (state, line, tab) {
3394
+ var indent = this.$getIndent(line);
3395
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
3396
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
3397
+ state === 'start' && indenter.test(line))
3398
+ indent += tab;
3399
+ return indent;
3400
+ };
3401
+ this.checkOutdent = function (state, line, input) {
3402
+ return this.$outdent.checkOutdent(line, input);
3403
+ };
3404
+ this.autoOutdent = function (state, doc, row) {
3405
+ this.$outdent.autoOutdent(doc, row);
3406
+ };
3407
+ this.createWorker = function (session) {
3408
+ var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
3409
+ worker.attachToDocument(session.getDocument());
3410
+ worker.on("annotate", function (e) {
3411
+ session.setAnnotations(e.data);
3412
+ });
3413
+ worker.on("terminate", function () {
3414
+ session.clearAnnotations();
3415
+ });
3416
+ return worker;
3417
+ };
3418
+ this.$id = "ace/mode/coffee";
3419
+ this.snippetFileId = "ace/snippets/coffee";
3420
+ }).call(Mode.prototype);
3421
+ exports.Mode = Mode;
3422
+
3423
+ });
3424
+
3425
+ ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict";
3426
+ var oop = require("../lib/oop");
3427
+ var lang = require("../lib/lang");
3428
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3429
+ var CssHighlightRules = require("./css_highlight_rules");
3430
+ var ScssHighlightRules = function () {
3431
+ var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|"));
3432
+ var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
3433
+ "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
3434
+ "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
3435
+ "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
3436
+ "scale_color|transparentize|type_of|unit|unitless|unquote").split("|"));
3437
+ var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|"));
3438
+ var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|"));
3439
+ var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|"));
3440
+ var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
3441
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
3442
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
3443
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
3444
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
3445
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
3446
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
3447
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
3448
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|"));
3449
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
3450
+ this.$rules = {
3451
+ "start": [
3452
+ {
3453
+ token: "comment",
3454
+ regex: "\\/\\/.*$"
3455
+ },
3456
+ {
3457
+ token: "comment", // multi line comment
3458
+ regex: "\\/\\*",
3459
+ next: "comment"
3460
+ }, {
3461
+ token: "string", // single line
3462
+ regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
3463
+ }, {
3464
+ token: "string", // multi line string start
3465
+ regex: '["].*\\\\$',
3466
+ next: "qqstring"
3467
+ }, {
3468
+ token: "string", // single line
3469
+ regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
3470
+ }, {
3471
+ token: "string", // multi line string start
3472
+ regex: "['].*\\\\$",
3473
+ next: "qstring"
3474
+ }, {
3475
+ token: "constant.numeric",
3476
+ 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|%)"
3477
+ }, {
3478
+ token: "constant.numeric", // hex6 color
3479
+ regex: "#[a-f0-9]{6}"
3480
+ }, {
3481
+ token: "constant.numeric", // hex3 color
3482
+ regex: "#[a-f0-9]{3}"
3483
+ }, {
3484
+ token: "constant.numeric",
3485
+ regex: numRe
3486
+ }, {
3487
+ token: ["support.function", "string", "support.function"],
3488
+ regex: "(url\\()(.*)(\\))"
3489
+ }, {
3490
+ token: function (value) {
3491
+ if (properties.hasOwnProperty(value.toLowerCase()))
3492
+ return "support.type";
3493
+ if (keywords.hasOwnProperty(value))
3494
+ return "keyword";
3495
+ else if (constants.hasOwnProperty(value))
3496
+ return "constant.language";
3497
+ else if (functions.hasOwnProperty(value))
3498
+ return "support.function";
3499
+ else if (colors.hasOwnProperty(value.toLowerCase()))
3500
+ return "support.constant.color";
3501
+ else if (tags.hasOwnProperty(value.toLowerCase()))
3502
+ return "variable.language";
3503
+ else
3504
+ return "text";
3505
+ },
3506
+ regex: "\\-?[@a-z_][@a-z0-9_\\-]*"
3507
+ }, {
3508
+ token: "variable",
3509
+ regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b"
3510
+ }, {
3511
+ token: "variable.language",
3512
+ regex: "#[a-z0-9-_]+"
3513
+ }, {
3514
+ token: "variable.language",
3515
+ regex: "\\.[a-z0-9-_]+"
3516
+ }, {
3517
+ token: "variable.language",
3518
+ regex: ":[a-z0-9-_]+"
3519
+ }, {
3520
+ token: "constant",
3521
+ regex: "[a-z0-9-_]+"
3522
+ }, {
3523
+ token: "keyword.operator",
3524
+ regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
3525
+ }, {
3526
+ token: "paren.lparen",
3527
+ regex: "[[({]"
3528
+ }, {
3529
+ token: "paren.rparen",
3530
+ regex: "[\\])}]"
3531
+ }, {
3532
+ token: "text",
3533
+ regex: "\\s+"
3534
+ }, {
3535
+ caseInsensitive: true
3536
+ }
3537
+ ],
3538
+ "comment": [
3539
+ {
3540
+ token: "comment", // closing comment
3541
+ regex: "\\*\\/",
3542
+ next: "start"
3543
+ }, {
3544
+ defaultToken: "comment"
3545
+ }
3546
+ ],
3547
+ "qqstring": [
3548
+ {
3549
+ token: "string",
3550
+ regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
3551
+ next: "start"
3552
+ }, {
3553
+ token: "string",
3554
+ regex: '.+'
3555
+ }
3556
+ ],
3557
+ "qstring": [
3558
+ {
3559
+ token: "string",
3560
+ regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
3561
+ next: "start"
3562
+ }, {
3563
+ token: "string",
3564
+ regex: '.+'
3565
+ }
3566
+ ]
3567
+ };
3568
+ };
3569
+ oop.inherits(ScssHighlightRules, TextHighlightRules);
3570
+ exports.ScssHighlightRules = ScssHighlightRules;
3571
+
3572
+ });
3573
+
3574
+ ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"], function(require, exports, module){"use strict";
3575
+ var oop = require("../lib/oop");
3576
+ var TextMode = require("./text").Mode;
3577
+ var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
3578
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
3579
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
3580
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
3581
+ var CssCompletions = require("./css_completions").CssCompletions;
3582
+ var Mode = function () {
3583
+ this.HighlightRules = ScssHighlightRules;
3584
+ this.$outdent = new MatchingBraceOutdent();
3585
+ this.$behaviour = new CssBehaviour();
3586
+ this.$completer = new CssCompletions();
3587
+ this.foldingRules = new CStyleFoldMode();
3588
+ };
3589
+ oop.inherits(Mode, TextMode);
3590
+ (function () {
3591
+ this.lineCommentStart = "//";
3592
+ this.blockComment = { start: "/*", end: "*/" };
3593
+ this.getNextLineIndent = function (state, line, tab) {
3594
+ var indent = this.$getIndent(line);
3595
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
3596
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
3597
+ return indent;
3598
+ }
3599
+ var match = line.match(/^.*\{\s*$/);
3600
+ if (match) {
3601
+ indent += tab;
3602
+ }
3603
+ return indent;
3604
+ };
3605
+ this.checkOutdent = function (state, line, input) {
3606
+ return this.$outdent.checkOutdent(line, input);
3607
+ };
3608
+ this.autoOutdent = function (state, doc, row) {
3609
+ this.$outdent.autoOutdent(doc, row);
3610
+ };
3611
+ this.getCompletions = function (state, session, pos, prefix) {
3612
+ return this.$completer.getCompletions(state, session, pos, prefix);
3613
+ };
3614
+ this.$id = "ace/mode/scss";
3615
+ }).call(Mode.prototype);
3616
+ exports.Mode = Mode;
3617
+
3618
+ });
3619
+
3620
+ ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module){"use strict";
3621
+ var oop = require("../lib/oop");
3622
+ var lang = require("../lib/lang");
3623
+ var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
3624
+ var SassHighlightRules = function () {
3625
+ ScssHighlightRules.call(this);
3626
+ var start = this.$rules.start;
3627
+ if (start[1].token == "comment") {
3628
+ start.splice(1, 1, {
3629
+ onMatch: function (value, currentState, stack) {
3630
+ stack.unshift(this.next, -1, value.length - 2, currentState);
3631
+ return "comment";
3632
+ },
3633
+ regex: /^\s*\/\*/,
3634
+ next: "comment"
3635
+ }, {
3636
+ token: "error.invalid",
3637
+ regex: "/\\*|[{;}]"
3638
+ }, {
3639
+ token: "support.type",
3640
+ regex: /^\s*:[\w\-]+\s/
3641
+ });
3642
+ this.$rules.comment = [
3643
+ { regex: /^\s*/, onMatch: function (value, currentState, stack) {
3644
+ if (stack[1] === -1)
3645
+ stack[1] = Math.max(stack[2], value.length - 1);
3646
+ if (value.length <= stack[1]) { stack.shift();
3647
+ stack.shift();
3648
+ stack.shift();
3649
+ this.next = stack.shift();
3650
+ return "text";
3651
+ }
3652
+ else {
3653
+ this.next = "";
3654
+ return "comment";
3655
+ }
3656
+ }, next: "start" },
3657
+ { defaultToken: "comment" }
3658
+ ];
3659
+ }
3660
+ };
3661
+ oop.inherits(SassHighlightRules, ScssHighlightRules);
3662
+ exports.SassHighlightRules = SassHighlightRules;
3663
+
3664
+ });
3665
+
3666
+ ace.define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict";
3667
+ var oop = require("../lib/oop");
3668
+ var TextMode = require("./text").Mode;
3669
+ var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
3670
+ var FoldMode = require("./folding/coffee").FoldMode;
3671
+ var Mode = function () {
3672
+ this.HighlightRules = SassHighlightRules;
3673
+ this.foldingRules = new FoldMode();
3674
+ this.$behaviour = this.$defaultBehaviour;
3675
+ };
3676
+ oop.inherits(Mode, TextMode);
3677
+ (function () {
3678
+ this.lineCommentStart = "//";
3679
+ this.$id = "ace/mode/sass";
3680
+ }).call(Mode.prototype);
3681
+ exports.Mode = Mode;
3682
+
3683
+ });
3684
+
3685
+ ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict";
3686
+ var oop = require("../lib/oop");
3687
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3688
+ var CssHighlightRules = require('./css_highlight_rules');
3689
+ var LessHighlightRules = function () {
3690
+ var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" +
3691
+ "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" +
3692
+ "or|and|when|not";
3693
+ var keywords = keywordList.split('|');
3694
+ var properties = CssHighlightRules.supportType.split('|');
3695
+ var keywordMapper = this.createKeywordMapper({
3696
+ "support.constant": CssHighlightRules.supportConstant,
3697
+ "keyword": keywordList,
3698
+ "support.constant.color": CssHighlightRules.supportConstantColor,
3699
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
3700
+ }, "identifier", true);
3701
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
3702
+ this.$rules = {
3703
+ "start": [
3704
+ {
3705
+ token: "comment",
3706
+ regex: "\\/\\/.*$"
3707
+ },
3708
+ {
3709
+ token: "comment", // multi line comment
3710
+ regex: "\\/\\*",
3711
+ next: "comment"
3712
+ }, {
3713
+ token: "string", // single line
3714
+ regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
3715
+ }, {
3716
+ token: "string", // single line
3717
+ regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
3718
+ }, {
3719
+ token: ["constant.numeric", "keyword"],
3720
+ regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
3721
+ }, {
3722
+ token: "constant.numeric", // hex6 color
3723
+ regex: "#[a-f0-9]{6}"
3724
+ }, {
3725
+ token: "constant.numeric", // hex3 color
3726
+ regex: "#[a-f0-9]{3}"
3727
+ }, {
3728
+ token: "constant.numeric",
3729
+ regex: numRe
3730
+ }, {
3731
+ token: ["support.function", "paren.lparen", "string", "paren.rparen"],
3732
+ regex: "(url)(\\()(.*)(\\))"
3733
+ }, {
3734
+ token: ["support.function", "paren.lparen"],
3735
+ regex: "(:extend|[a-z0-9_\\-]+)(\\()"
3736
+ }, {
3737
+ token: function (value) {
3738
+ if (keywords.indexOf(value.toLowerCase()) > -1)
3739
+ return "keyword";
3740
+ else
3741
+ return "variable";
3742
+ },
3743
+ regex: "[@\\$][a-z0-9_\\-@\\$]*\\b"
3744
+ }, {
3745
+ token: "variable",
3746
+ regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"
3747
+ }, {
3748
+ token: function (first, second) {
3749
+ if (properties.indexOf(first.toLowerCase()) > -1) {
3750
+ return ["support.type.property", "text"];
3751
+ }
3752
+ else {
3753
+ return ["support.type.unknownProperty", "text"];
3754
+ }
3755
+ },
3756
+ regex: "([a-z0-9-_]+)(\\s*:)"
3757
+ }, {
3758
+ token: "keyword",
3759
+ regex: "&" // special case - always treat as keyword
3760
+ }, {
3761
+ token: keywordMapper,
3762
+ regex: "\\-?[@a-z_][@a-z0-9_\\-]*"
3763
+ }, {
3764
+ token: "variable.language",
3765
+ regex: "#[a-z0-9-_]+"
3766
+ }, {
3767
+ token: "variable.language",
3768
+ regex: "\\.[a-z0-9-_]+"
3769
+ }, {
3770
+ token: "variable.language",
3771
+ regex: ":[a-z_][a-z0-9-_]*"
3772
+ }, {
3773
+ token: "constant",
3774
+ regex: "[a-z0-9-_]+"
3775
+ }, {
3776
+ token: "keyword.operator",
3777
+ regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*"
3778
+ }, {
3779
+ token: "paren.lparen",
3780
+ regex: "[[({]"
3781
+ }, {
3782
+ token: "paren.rparen",
3783
+ regex: "[\\])}]"
3784
+ }, {
3785
+ token: "text",
3786
+ regex: "\\s+"
3787
+ }, {
3788
+ caseInsensitive: true
3789
+ }
3790
+ ],
3791
+ "comment": [
3792
+ {
3793
+ token: "comment", // closing comment
3794
+ regex: "\\*\\/",
3795
+ next: "start"
3796
+ }, {
3797
+ defaultToken: "comment"
3798
+ }
3799
+ ]
3800
+ };
3801
+ this.normalizeRules();
3802
+ };
3803
+ oop.inherits(LessHighlightRules, TextHighlightRules);
3804
+ exports.LessHighlightRules = LessHighlightRules;
3805
+
3806
+ });
3807
+
3808
+ ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
3809
+ var oop = require("../lib/oop");
3810
+ var TextMode = require("./text").Mode;
3811
+ var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
3812
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
3813
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
3814
+ var CssCompletions = require("./css_completions").CssCompletions;
3815
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
3816
+ var Mode = function () {
3817
+ this.HighlightRules = LessHighlightRules;
3818
+ this.$outdent = new MatchingBraceOutdent();
3819
+ this.$behaviour = new CssBehaviour();
3820
+ this.$completer = new CssCompletions();
3821
+ this.foldingRules = new CStyleFoldMode();
3822
+ };
3823
+ oop.inherits(Mode, TextMode);
3824
+ (function () {
3825
+ this.lineCommentStart = "//";
3826
+ this.blockComment = { start: "/*", end: "*/" };
3827
+ this.getNextLineIndent = function (state, line, tab) {
3828
+ var indent = this.$getIndent(line);
3829
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
3830
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
3831
+ return indent;
3832
+ }
3833
+ var match = line.match(/^.*\{\s*$/);
3834
+ if (match) {
3835
+ indent += tab;
3836
+ }
3837
+ return indent;
3838
+ };
3839
+ this.checkOutdent = function (state, line, input) {
3840
+ return this.$outdent.checkOutdent(line, input);
3841
+ };
3842
+ this.autoOutdent = function (state, doc, row) {
3843
+ this.$outdent.autoOutdent(doc, row);
3844
+ };
3845
+ this.getCompletions = function (state, session, pos, prefix) {
3846
+ return this.$completer.getCompletions("ruleset", session, pos, prefix);
3847
+ };
3848
+ this.$id = "ace/mode/less";
3849
+ }).call(Mode.prototype);
3850
+ exports.Mode = Mode;
3851
+
3852
+ });
3853
+
3854
+ ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
3855
+ var oop = require("../lib/oop");
3856
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3857
+ var constantOtherSymbol = exports.constantOtherSymbol = {
3858
+ token: "constant.other.symbol.ruby", // symbol
3859
+ regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
3860
+ };
3861
+ exports.qString = {
3862
+ token: "string", // single line
3863
+ regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
3864
+ };
3865
+ exports.qqString = {
3866
+ token: "string", // single line
3867
+ regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
3868
+ };
3869
+ exports.tString = {
3870
+ token: "string", // backtick string
3871
+ regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
3872
+ };
3873
+ var constantNumericHex = exports.constantNumericHex = {
3874
+ token: "constant.numeric", // hex
3875
+ regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
3876
+ };
3877
+ var constantNumericBinary = exports.constantNumericBinary = {
3878
+ token: "constant.numeric",
3879
+ regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/
3880
+ };
3881
+ var constantNumericDecimal = exports.constantNumericDecimal = {
3882
+ token: "constant.numeric",
3883
+ regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/
3884
+ };
3885
+ var constantNumericOctal = exports.constantNumericOctal = {
3886
+ token: "constant.numeric",
3887
+ regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/
3888
+ };
3889
+ var constantNumericRational = exports.constantNumericRational = {
3890
+ token: "constant.numeric", //rational + complex
3891
+ regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/
3892
+ };
3893
+ var constantNumericComplex = exports.constantNumericComplex = {
3894
+ token: "constant.numeric", //simple complex numbers
3895
+ regex: /\b([\d]i)\b/
3896
+ };
3897
+ var constantNumericFloat = exports.constantNumericFloat = {
3898
+ token: "constant.numeric", // float + complex
3899
+ regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"
3900
+ };
3901
+ var instanceVariable = exports.instanceVariable = {
3902
+ token: "variable.instance", // instance variable
3903
+ regex: "@{1,2}[a-zA-Z_\\d]+"
3904
+ };
3905
+ var RubyHighlightRules = function () {
3906
+ var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
3907
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
3908
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
3909
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
3910
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
3911
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
3912
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
3913
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
3914
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
3915
+ "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
3916
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
3917
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
3918
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
3919
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
3920
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
3921
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
3922
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
3923
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
3924
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
3925
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
3926
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
3927
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
3928
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
3929
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
3930
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
3931
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
3932
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
3933
+ "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
3934
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
3935
+ "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" +
3936
+ "private_class_method|remove_method|undef_method");
3937
+ var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
3938
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
3939
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend");
3940
+ var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
3941
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION");
3942
+ var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" +
3943
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self");
3944
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
3945
+ "keyword": keywords,
3946
+ "constant.language": buildinConstants,
3947
+ "variable.language": builtinVariables,
3948
+ "support.function": builtinFunctions,
3949
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
3950
+ }, "identifier");
3951
+ var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})";
3952
+ var closeParen = {
3953
+ "(": ")",
3954
+ "[": "]",
3955
+ "{": "}",
3956
+ "<": ">",
3957
+ "^": "^",
3958
+ "|": "|",
3959
+ "%": "%"
3960
+ };
3961
+ this.$rules = {
3962
+ "start": [
3963
+ {
3964
+ token: "comment",
3965
+ regex: "#.*$"
3966
+ }, {
3967
+ token: "comment.multiline", // multi line comment
3968
+ regex: "^=begin(?=$|\\s.*$)",
3969
+ next: "comment"
3970
+ }, {
3971
+ token: "string.regexp",
3972
+ regex: /[/](?=.*\/)/,
3973
+ next: "regex"
3974
+ },
3975
+ [{
3976
+ token: ["constant.other.symbol.ruby", "string.start"],
3977
+ regex: /(:)?(")/,
3978
+ push: [{
3979
+ token: "constant.language.escape",
3980
+ regex: escapedChars
3981
+ }, {
3982
+ token: "paren.start",
3983
+ regex: /#{/,
3984
+ push: "start"
3985
+ }, {
3986
+ token: "string.end",
3987
+ regex: /"/,
3988
+ next: "pop"
3989
+ }, {
3990
+ defaultToken: "string"
3991
+ }]
3992
+ }, {
3993
+ token: "string.start",
3994
+ regex: /`/,
3995
+ push: [{
3996
+ token: "constant.language.escape",
3997
+ regex: escapedChars
3998
+ }, {
3999
+ token: "paren.start",
4000
+ regex: /#{/,
4001
+ push: "start"
4002
+ }, {
4003
+ token: "string.end",
4004
+ regex: /`/,
4005
+ next: "pop"
4006
+ }, {
4007
+ defaultToken: "string"
4008
+ }]
4009
+ }, {
4010
+ token: ["constant.other.symbol.ruby", "string.start"],
4011
+ regex: /(:)?(')/,
4012
+ push: [{
4013
+ token: "constant.language.escape",
4014
+ regex: /\\['\\]/
4015
+ }, {
4016
+ token: "string.end",
4017
+ regex: /'/,
4018
+ next: "pop"
4019
+ }, {
4020
+ defaultToken: "string"
4021
+ }]
4022
+ }, {
4023
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
4024
+ regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) {
4025
+ if (stack.length)
4026
+ stack = [];
4027
+ var paren = val[val.length - 1];
4028
+ stack.unshift(paren, state);
4029
+ this.next = "qStateWithoutInterpolation";
4030
+ return this.token;
4031
+ }
4032
+ }, {
4033
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
4034
+ regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) {
4035
+ if (stack.length)
4036
+ stack = [];
4037
+ var paren = val[val.length - 1];
4038
+ stack.unshift(paren, state);
4039
+ this.next = "qStateWithInterpolation";
4040
+ return this.token;
4041
+ }
4042
+ }, {
4043
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
4044
+ regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) {
4045
+ if (stack.length)
4046
+ stack = [];
4047
+ var paren = val[val.length - 1];
4048
+ stack.unshift(paren, state);
4049
+ this.next = "sStateWithoutInterpolation";
4050
+ return this.token;
4051
+ }
4052
+ }, {
4053
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
4054
+ regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) {
4055
+ if (stack.length)
4056
+ stack = [];
4057
+ var paren = val[val.length - 1];
4058
+ stack.unshift(paren, state);
4059
+ this.next = "sStateWithInterpolation";
4060
+ return this.token;
4061
+ }
4062
+ }, {
4063
+ token: "string.regexp",
4064
+ regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) {
4065
+ if (stack.length)
4066
+ stack = [];
4067
+ var paren = val[val.length - 1];
4068
+ stack.unshift(paren, state);
4069
+ this.next = "rState";
4070
+ return this.token;
4071
+ }
4072
+ }],
4073
+ {
4074
+ token: "punctuation", // namespaces aren't symbols
4075
+ regex: "::"
4076
+ },
4077
+ instanceVariable,
4078
+ {
4079
+ token: "variable.global", // global variable
4080
+ regex: "[$][a-zA-Z_\\d]+"
4081
+ }, {
4082
+ token: "support.class", // class name
4083
+ regex: "[A-Z][a-zA-Z_\\d]*"
4084
+ }, {
4085
+ token: ["punctuation.operator", "support.function"],
4086
+ regex: /(\.)([a-zA-Z_\d]+)(?=\()/
4087
+ }, {
4088
+ token: ["punctuation.operator", "identifier"],
4089
+ regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/
4090
+ }, {
4091
+ token: "string.character",
4092
+ regex: "\\B\\?(?:" + escapedChars + "|\\S)"
4093
+ }, {
4094
+ token: "punctuation.operator",
4095
+ regex: /\?(?=.+:)/
4096
+ },
4097
+ constantNumericRational,
4098
+ constantNumericComplex,
4099
+ constantOtherSymbol,
4100
+ constantNumericHex,
4101
+ constantNumericFloat,
4102
+ constantNumericBinary,
4103
+ constantNumericDecimal,
4104
+ constantNumericOctal,
4105
+ {
4106
+ token: "constant.language.boolean",
4107
+ regex: "(?:true|false)\\b"
4108
+ }, {
4109
+ token: keywordMapper,
4110
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
4111
+ }, {
4112
+ token: "punctuation.separator.key-value",
4113
+ regex: "=>"
4114
+ }, {
4115
+ stateName: "heredoc",
4116
+ onMatch: function (value, currentState, stack) {
4117
+ var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc";
4118
+ var tokens = value.split(this.splitRegex);
4119
+ stack.push(next, tokens[3]);
4120
+ return [
4121
+ { type: "constant", value: tokens[1] },
4122
+ { type: "string", value: tokens[2] },
4123
+ { type: "support.class", value: tokens[3] },
4124
+ { type: "string", value: tokens[4] }
4125
+ ];
4126
+ },
4127
+ regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",
4128
+ rules: {
4129
+ heredoc: [{
4130
+ onMatch: function (value, currentState, stack) {
4131
+ if (value === stack[1]) {
4132
+ stack.shift();
4133
+ stack.shift();
4134
+ this.next = stack[0] || "start";
4135
+ return "support.class";
4136
+ }
4137
+ this.next = "";
4138
+ return "string";
4139
+ },
4140
+ regex: ".*$",
4141
+ next: "start"
4142
+ }],
4143
+ indentedHeredoc: [{
4144
+ token: "string",
4145
+ regex: "^ +"
4146
+ }, {
4147
+ onMatch: function (value, currentState, stack) {
4148
+ if (value === stack[1]) {
4149
+ stack.shift();
4150
+ stack.shift();
4151
+ this.next = stack[0] || "start";
4152
+ return "support.class";
4153
+ }
4154
+ this.next = "";
4155
+ return "string";
4156
+ },
4157
+ regex: ".*$",
4158
+ next: "start"
4159
+ }]
4160
+ }
4161
+ }, {
4162
+ regex: "$",
4163
+ token: "empty",
4164
+ next: function (currentState, stack) {
4165
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
4166
+ return stack[0];
4167
+ return currentState;
4168
+ }
4169
+ }, {
4170
+ token: "keyword.operator",
4171
+ regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"
4172
+ }, {
4173
+ token: "paren.lparen",
4174
+ regex: "[[({]"
4175
+ }, {
4176
+ token: "paren.rparen",
4177
+ regex: "[\\])}]",
4178
+ onMatch: function (value, currentState, stack) {
4179
+ this.next = '';
4180
+ if (value == "}" && stack.length > 1 && stack[1] != "start") {
4181
+ stack.shift();
4182
+ this.next = stack.shift();
4183
+ }
4184
+ return this.token;
4185
+ }
4186
+ }, {
4187
+ token: "text",
4188
+ regex: "\\s+"
4189
+ }, {
4190
+ token: "punctuation.operator",
4191
+ regex: /[?:,;.]/
4192
+ }
4193
+ ],
4194
+ "comment": [
4195
+ {
4196
+ token: "comment.multiline", // closing comment
4197
+ regex: "^=end(?=$|\\s.*$)",
4198
+ next: "start"
4199
+ }, {
4200
+ token: "comment", // comment spanning whole line
4201
+ regex: ".+"
4202
+ }
4203
+ ],
4204
+ "qStateWithInterpolation": [{
4205
+ token: "string.start", // excluded nested |^% due to difficulty in realization
4206
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4207
+ if (stack.length && val === stack[0]) {
4208
+ stack.unshift(val, state);
4209
+ return this.token;
4210
+ }
4211
+ return "string";
4212
+ }
4213
+ }, {
4214
+ token: "constant.language.escape",
4215
+ regex: escapedChars
4216
+ }, {
4217
+ token: "constant.language.escape",
4218
+ regex: /\\./
4219
+ }, {
4220
+ token: "paren.start",
4221
+ regex: /#{/,
4222
+ push: "start"
4223
+ }, {
4224
+ token: "string.end",
4225
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
4226
+ if (stack.length && val === closeParen[stack[0]]) {
4227
+ stack.shift();
4228
+ this.next = stack.shift();
4229
+ return this.token;
4230
+ }
4231
+ this.next = '';
4232
+ return "string";
4233
+ }
4234
+ }, {
4235
+ defaultToken: "string"
4236
+ }],
4237
+ "qStateWithoutInterpolation": [{
4238
+ token: "string.start", // excluded nested |^% due to difficulty in realization
4239
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4240
+ if (stack.length && val === stack[0]) {
4241
+ stack.unshift(val, state);
4242
+ return this.token;
4243
+ }
4244
+ return "string";
4245
+ }
4246
+ }, {
4247
+ token: "constant.language.escape",
4248
+ regex: /\\['\\]/
4249
+ }, {
4250
+ token: "constant.language.escape",
4251
+ regex: /\\./
4252
+ }, {
4253
+ token: "string.end",
4254
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
4255
+ if (stack.length && val === closeParen[stack[0]]) {
4256
+ stack.shift();
4257
+ this.next = stack.shift();
4258
+ return this.token;
4259
+ }
4260
+ this.next = '';
4261
+ return "string";
4262
+ }
4263
+ }, {
4264
+ defaultToken: "string"
4265
+ }],
4266
+ "sStateWithoutInterpolation": [{
4267
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
4268
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4269
+ if (stack.length && val === stack[0]) {
4270
+ stack.unshift(val, state);
4271
+ return this.token;
4272
+ }
4273
+ return "constant.other.symbol.ruby";
4274
+ }
4275
+ }, {
4276
+ token: "constant.other.symbol.ruby",
4277
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
4278
+ if (stack.length && val === closeParen[stack[0]]) {
4279
+ stack.shift();
4280
+ this.next = stack.shift();
4281
+ return this.token;
4282
+ }
4283
+ this.next = '';
4284
+ return "constant.other.symbol.ruby";
4285
+ }
4286
+ }, {
4287
+ defaultToken: "constant.other.symbol.ruby"
4288
+ }],
4289
+ "sStateWithInterpolation": [{
4290
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
4291
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4292
+ if (stack.length && val === stack[0]) {
4293
+ stack.unshift(val, state);
4294
+ return this.token;
4295
+ }
4296
+ return "constant.other.symbol.ruby";
4297
+ }
4298
+ }, {
4299
+ token: "constant.language.escape",
4300
+ regex: escapedChars
4301
+ }, {
4302
+ token: "constant.language.escape",
4303
+ regex: /\\./
4304
+ }, {
4305
+ token: "paren.start",
4306
+ regex: /#{/,
4307
+ push: "start"
4308
+ }, {
4309
+ token: "constant.other.symbol.ruby",
4310
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
4311
+ if (stack.length && val === closeParen[stack[0]]) {
4312
+ stack.shift();
4313
+ this.next = stack.shift();
4314
+ return this.token;
4315
+ }
4316
+ this.next = '';
4317
+ return "constant.other.symbol.ruby";
4318
+ }
4319
+ }, {
4320
+ defaultToken: "constant.other.symbol.ruby"
4321
+ }],
4322
+ "rState": [{
4323
+ token: "string.regexp", // excluded nested |^% due to difficulty in realization
4324
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4325
+ if (stack.length && val === stack[0]) {
4326
+ stack.unshift(val, state);
4327
+ return this.token;
4328
+ }
4329
+ return "constant.language.escape";
4330
+ }
4331
+ }, {
4332
+ token: "paren.start",
4333
+ regex: /#{/,
4334
+ push: "start"
4335
+ }, {
4336
+ token: "string.regexp",
4337
+ regex: /\//
4338
+ }, {
4339
+ token: "string.regexp",
4340
+ regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) {
4341
+ if (stack.length && val[0] === closeParen[stack[0]]) {
4342
+ stack.shift();
4343
+ this.next = stack.shift();
4344
+ return this.token;
4345
+ }
4346
+ this.next = '';
4347
+ return "constant.language.escape";
4348
+ }
4349
+ },
4350
+ { include: "regex" },
4351
+ {
4352
+ defaultToken: "string.regexp"
4353
+ }],
4354
+ "regex": [
4355
+ {
4356
+ token: "regexp.keyword",
4357
+ regex: /\\[wWdDhHsS]/
4358
+ }, {
4359
+ token: "constant.language.escape",
4360
+ regex: /\\[AGbBzZ]/
4361
+ }, {
4362
+ token: "constant.language.escape",
4363
+ regex: /\\g<[a-zA-Z0-9]*>/
4364
+ }, {
4365
+ token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"],
4366
+ regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/
4367
+ }, {
4368
+ token: ["constant.language.escape", "invalid", "constant.language.escape"],
4369
+ regex: /(\\p{\^?)([^/]*)(})/
4370
+ }, {
4371
+ token: "regexp.keyword.operator",
4372
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
4373
+ }, {
4374
+ token: "string.regexp",
4375
+ regex: /[/][imxouesn]*/,
4376
+ next: "start"
4377
+ }, {
4378
+ token: "invalid",
4379
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
4380
+ }, {
4381
+ token: "constant.language.escape",
4382
+ regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
4383
+ }, {
4384
+ token: "constant.language.delimiter",
4385
+ regex: /\|/
4386
+ }, {
4387
+ token: "regexp.keyword",
4388
+ regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/
4389
+ }, {
4390
+ token: "constant.language.escape",
4391
+ regex: /\[\^?/,
4392
+ push: "regex_character_class"
4393
+ }, {
4394
+ defaultToken: "string.regexp"
4395
+ }
4396
+ ],
4397
+ "regex_character_class": [
4398
+ {
4399
+ token: "regexp.keyword",
4400
+ regex: /\\[wWdDhHsS]/
4401
+ }, {
4402
+ token: "regexp.charclass.keyword.operator",
4403
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
4404
+ }, {
4405
+ token: "constant.language.escape",
4406
+ regex: /&?&?\[\^?/,
4407
+ push: "regex_character_class"
4408
+ }, {
4409
+ token: "constant.language.escape",
4410
+ regex: "]",
4411
+ next: "pop"
4412
+ }, {
4413
+ token: "constant.language.escape",
4414
+ regex: "-"
4415
+ }, {
4416
+ defaultToken: "string.regexp.characterclass"
4417
+ }
4418
+ ]
4419
+ };
4420
+ this.normalizeRules();
4421
+ };
4422
+ oop.inherits(RubyHighlightRules, TextHighlightRules);
4423
+ exports.RubyHighlightRules = RubyHighlightRules;
4424
+
4425
+ });
4426
+
4427
+ ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict";
4428
+ var oop = require("../../lib/oop");
4429
+ var BaseFoldMode = require("./fold_mode").FoldMode;
4430
+ var Range = require("../../range").Range;
4431
+ var TokenIterator = require("../../token_iterator").TokenIterator;
4432
+ var FoldMode = exports.FoldMode = function () {
4433
+ };
4434
+ oop.inherits(FoldMode, BaseFoldMode);
4435
+ (function () {
4436
+ this.indentKeywords = {
4437
+ "class": 1,
4438
+ "def": 1,
4439
+ "module": 1,
4440
+ "do": 1,
4441
+ "unless": 1,
4442
+ "if": 1,
4443
+ "while": 1,
4444
+ "for": 1,
4445
+ "until": 1,
4446
+ "begin": 1,
4447
+ "else": 0,
4448
+ "elsif": 0,
4449
+ "rescue": 0,
4450
+ "ensure": 0,
4451
+ "when": 0,
4452
+ "end": -1,
4453
+ "case": 1,
4454
+ "=begin": 1,
4455
+ "=end": -1
4456
+ };
4457
+ this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/;
4458
+ this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/;
4459
+ this.getFoldWidget = function (session, foldStyle, row) {
4460
+ var line = session.getLine(row);
4461
+ var isStart = this.foldingStartMarker.test(line);
4462
+ var isEnd = this.foldingStopMarker.test(line);
4463
+ if (isStart && !isEnd) {
4464
+ var match = line.match(this.foldingStartMarker);
4465
+ if (match[1]) {
4466
+ if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") {
4467
+ if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) {
4468
+ return;
4469
+ }
4470
+ if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) {
4471
+ return;
4472
+ }
4473
+ }
4474
+ if (match[1] == "when") {
4475
+ if (/\sthen\s/.test(line) === true) {
4476
+ return;
4477
+ }
4478
+ }
4479
+ if (session.getTokenAt(row, match.index + 2).type === "keyword")
4480
+ return "start";
4481
+ }
4482
+ else if (match[3]) {
4483
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
4484
+ return "start";
4485
+ }
4486
+ else {
4487
+ return "start";
4488
+ }
4489
+ }
4490
+ if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
4491
+ return "";
4492
+ var match = line.match(this.foldingStopMarker);
4493
+ if (match[3] === "end") {
4494
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
4495
+ return "end";
4496
+ }
4497
+ else if (match[1]) {
4498
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
4499
+ return "end";
4500
+ }
4501
+ else
4502
+ return "end";
4503
+ };
4504
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
4505
+ var line = session.doc.getLine(row);
4506
+ var match = this.foldingStartMarker.exec(line);
4507
+ if (match) {
4508
+ if (match[1] || match[3])
4509
+ return this.rubyBlock(session, row, match.index + 2);
4510
+ return this.openingBracketBlock(session, "{", row, match.index);
4511
+ }
4512
+ var match = this.foldingStopMarker.exec(line);
4513
+ if (match) {
4514
+ if (match[3] === "end") {
4515
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
4516
+ return this.rubyBlock(session, row, match.index + 1);
4517
+ }
4518
+ if (match[1] === "=end") {
4519
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
4520
+ return this.rubyBlock(session, row, match.index + 1);
4521
+ }
4522
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
4523
+ }
4524
+ };
4525
+ this.rubyBlock = function (session, row, column, tokenRange) {
4526
+ var stream = new TokenIterator(session, row, column);
4527
+ var token = stream.getCurrentToken();
4528
+ if (!token || (token.type != "keyword" && token.type != "comment.multiline"))
4529
+ return;
4530
+ var val = token.value;
4531
+ var line = session.getLine(row);
4532
+ switch (token.value) {
4533
+ case "if":
4534
+ case "unless":
4535
+ case "while":
4536
+ case "until":
4537
+ var checkToken = new RegExp("^\\s*" + token.value);
4538
+ if (!checkToken.test(line)) {
4539
+ return;
4540
+ }
4541
+ var dir = this.indentKeywords[val];
4542
+ break;
4543
+ case "when":
4544
+ if (/\sthen\s/.test(line)) {
4545
+ return;
4546
+ }
4547
+ case "elsif":
4548
+ case "rescue":
4549
+ case "ensure":
4550
+ var dir = 1;
4551
+ break;
4552
+ case "else":
4553
+ var checkToken = new RegExp("^\\s*" + token.value + "\\s*$");
4554
+ if (!checkToken.test(line)) {
4555
+ return;
4556
+ }
4557
+ var dir = 1;
4558
+ break;
4559
+ default:
4560
+ var dir = this.indentKeywords[val];
4561
+ break;
4562
+ }
4563
+ var stack = [val];
4564
+ if (!dir)
4565
+ return;
4566
+ var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length;
4567
+ var startRow = row;
4568
+ var ranges = [];
4569
+ ranges.push(stream.getCurrentTokenRange());
4570
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
4571
+ if (token.type == "comment.multiline") {
4572
+ while (token = stream.step()) {
4573
+ if (token.type !== "comment.multiline")
4574
+ continue;
4575
+ if (dir == 1) {
4576
+ startColumn = 6;
4577
+ if (token.value == "=end") {
4578
+ break;
4579
+ }
4580
+ }
4581
+ else {
4582
+ if (token.value == "=begin") {
4583
+ break;
4584
+ }
4585
+ }
4586
+ }
4587
+ }
4588
+ else {
4589
+ while (token = stream.step()) {
4590
+ var ignore = false;
4591
+ if (token.type !== "keyword")
4592
+ continue;
4593
+ var level = dir * this.indentKeywords[token.value];
4594
+ line = session.getLine(stream.getCurrentTokenRow());
4595
+ switch (token.value) {
4596
+ case "do":
4597
+ for (var i = stream.$tokenIndex - 1; i >= 0; i--) {
4598
+ var prevToken = stream.$rowTokens[i];
4599
+ if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) {
4600
+ level = 0;
4601
+ break;
4602
+ }
4603
+ }
4604
+ break;
4605
+ case "else":
4606
+ var checkToken = new RegExp("^\\s*" + token.value + "\\s*$");
4607
+ if (!checkToken.test(line) || val == "case") {
4608
+ level = 0;
4609
+ ignore = true;
4610
+ }
4611
+ break;
4612
+ case "if":
4613
+ case "unless":
4614
+ case "while":
4615
+ case "until":
4616
+ var checkToken = new RegExp("^\\s*" + token.value);
4617
+ if (!checkToken.test(line)) {
4618
+ level = 0;
4619
+ ignore = true;
4620
+ }
4621
+ break;
4622
+ case "when":
4623
+ if (/\sthen\s/.test(line) || val == "case") {
4624
+ level = 0;
4625
+ ignore = true;
4626
+ }
4627
+ break;
4628
+ }
4629
+ if (level > 0) {
4630
+ stack.unshift(token.value);
4631
+ }
4632
+ else if (level <= 0 && ignore === false) {
4633
+ stack.shift();
4634
+ if (!stack.length) {
4635
+ if ((val == "while" || val == "until" || val == "for") && token.value != "do") {
4636
+ break;
4637
+ }
4638
+ if (token.value == "do" && dir == -1 && level != 0)
4639
+ break;
4640
+ if (token.value != "do")
4641
+ break;
4642
+ }
4643
+ if (level === 0) {
4644
+ stack.unshift(token.value);
4645
+ }
4646
+ }
4647
+ }
4648
+ }
4649
+ if (!token)
4650
+ return null;
4651
+ if (tokenRange) {
4652
+ ranges.push(stream.getCurrentTokenRange());
4653
+ return ranges;
4654
+ }
4655
+ var row = stream.getCurrentTokenRow();
4656
+ if (dir === -1) {
4657
+ if (token.type === "comment.multiline") {
4658
+ var endColumn = 6;
4659
+ }
4660
+ else {
4661
+ var endColumn = session.getLine(row).length;
4662
+ }
4663
+ return new Range(row, endColumn, startRow - 1, startColumn);
4664
+ }
4665
+ else
4666
+ return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length);
4667
+ };
4668
+ }).call(FoldMode.prototype);
4669
+
4670
+ });
4671
+
4672
+ ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"], function(require, exports, module){"use strict";
4673
+ var oop = require("../lib/oop");
4674
+ var TextMode = require("./text").Mode;
4675
+ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
4676
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
4677
+ var Range = require("../range").Range;
4678
+ var FoldMode = require("./folding/ruby").FoldMode;
4679
+ var Mode = function () {
4680
+ this.HighlightRules = RubyHighlightRules;
4681
+ this.$outdent = new MatchingBraceOutdent();
4682
+ this.$behaviour = this.$defaultBehaviour;
4683
+ this.foldingRules = new FoldMode();
4684
+ this.indentKeywords = this.foldingRules.indentKeywords;
4685
+ };
4686
+ oop.inherits(Mode, TextMode);
4687
+ (function () {
4688
+ this.lineCommentStart = "#";
4689
+ this.getNextLineIndent = function (state, line, tab) {
4690
+ var indent = this.$getIndent(line);
4691
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
4692
+ var tokens = tokenizedLine.tokens;
4693
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
4694
+ return indent;
4695
+ }
4696
+ if (state == "start") {
4697
+ var match = line.match(/^.*[\{\(\[]\s*$/);
4698
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
4699
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
4700
+ var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);
4701
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
4702
+ indent += tab;
4703
+ }
4704
+ }
4705
+ return indent;
4706
+ };
4707
+ this.checkOutdent = function (state, line, input) {
4708
+ return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
4709
+ };
4710
+ this.autoOutdent = function (state, session, row) {
4711
+ var line = session.getLine(row);
4712
+ if (/}/.test(line))
4713
+ return this.$outdent.autoOutdent(session, row);
4714
+ var indent = this.$getIndent(line);
4715
+ var prevLine = session.getLine(row - 1);
4716
+ var prevIndent = this.$getIndent(prevLine);
4717
+ var tab = session.getTabString();
4718
+ if (prevIndent.length <= indent.length) {
4719
+ if (indent.slice(-tab.length) == tab)
4720
+ session.remove(new Range(row, indent.length - tab.length, row, indent.length));
4721
+ }
4722
+ };
4723
+ this.getMatching = function (session, row, column) {
4724
+ if (row == undefined) {
4725
+ var pos = session.selection.lead;
4726
+ column = pos.column;
4727
+ row = pos.row;
4728
+ }
4729
+ var startToken = session.getTokenAt(row, column);
4730
+ if (startToken && startToken.value in this.indentKeywords)
4731
+ return this.foldingRules.rubyBlock(session, row, column, true);
4732
+ };
4733
+ this.$id = "ace/mode/ruby";
4734
+ this.snippetFileId = "ace/snippets/ruby";
4735
+ }).call(Mode.prototype);
4736
+ exports.Mode = Mode;
4737
+
4738
+ });
4739
+
4740
+ ace.define("ace/mode/slim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/slim_highlight_rules","ace/mode/javascript","ace/mode/markdown","ace/mode/coffee","ace/mode/scss","ace/mode/sass","ace/mode/less","ace/mode/ruby","ace/mode/css"], function(require, exports, module){"use strict";
4741
+ var oop = require("../lib/oop");
4742
+ var TextMode = require("./text").Mode;
4743
+ var SlimHighlightRules = require("./slim_highlight_rules").SlimHighlightRules;
4744
+ var Mode = function () {
4745
+ TextMode.call(this);
4746
+ this.HighlightRules = SlimHighlightRules;
4747
+ this.createModeDelegates({
4748
+ javascript: require("./javascript").Mode,
4749
+ markdown: require("./markdown").Mode,
4750
+ coffee: require("./coffee").Mode,
4751
+ scss: require("./scss").Mode,
4752
+ sass: require("./sass").Mode,
4753
+ less: require("./less").Mode,
4754
+ ruby: require("./ruby").Mode,
4755
+ css: require("./css").Mode
4756
+ });
4757
+ };
4758
+ oop.inherits(Mode, TextMode);
4759
+ (function () {
4760
+ this.$id = "ace/mode/slim";
4761
+ }).call(Mode.prototype);
4762
+ exports.Mode = Mode;
4763
+
4764
+ }); (function() {
4765
+ ace.require(["ace/mode/slim"], function(m) {
4766
+ if (typeof module == "object" && typeof exports == "object" && module) {
4767
+ module.exports = m;
4768
+ }
4769
+ });
4770
+ })();
4771
+