ace-rails-ap 4.3 → 4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/ace-rails-ap.gemspec +0 -2
  4. data/lib/ace/rails/version.rb +1 -1
  5. data/vendor/assets/javascripts/ace/ace.js +659 -1137
  6. data/vendor/assets/javascripts/ace/ext-beautify.js +5 -2
  7. data/vendor/assets/javascripts/ace/ext-code_lens.js +238 -0
  8. data/vendor/assets/javascripts/ace/ext-emmet.js +36 -28
  9. data/vendor/assets/javascripts/ace/ext-language_tools.js +63 -48
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +12 -6
  11. data/vendor/assets/javascripts/ace/ext-options.js +46 -19
  12. data/vendor/assets/javascripts/ace/ext-prompt.js +57 -38
  13. data/vendor/assets/javascripts/ace/ext-settings_menu.js +46 -19
  14. data/vendor/assets/javascripts/ace/ext-spellcheck.js +0 -1
  15. data/vendor/assets/javascripts/ace/ext-themelist.js +2 -1
  16. data/vendor/assets/javascripts/ace/keybinding-emacs.js +21 -22
  17. data/vendor/assets/javascripts/ace/keybinding-sublime.js +2 -5
  18. data/vendor/assets/javascripts/ace/keybinding-vim.js +45 -9
  19. data/vendor/assets/javascripts/ace/keybinding-vscode.js +262 -0
  20. data/vendor/assets/javascripts/ace/mode-abc.js +3 -0
  21. data/vendor/assets/javascripts/ace/mode-actionscript.js +1 -0
  22. data/vendor/assets/javascripts/ace/mode-alda.js +311 -0
  23. data/vendor/assets/javascripts/ace/mode-asl.js +17 -16
  24. data/vendor/assets/javascripts/ace/mode-c_cpp.js +1 -0
  25. data/vendor/assets/javascripts/ace/mode-clojure.js +1 -0
  26. data/vendor/assets/javascripts/ace/mode-coffee.js +1 -0
  27. data/vendor/assets/javascripts/ace/mode-coldfusion.js +3 -0
  28. data/vendor/assets/javascripts/ace/mode-csound_document.js +40 -5
  29. data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +37 -5
  30. data/vendor/assets/javascripts/ace/mode-csound_score.js +1 -0
  31. data/vendor/assets/javascripts/ace/mode-css.js +1 -0
  32. data/vendor/assets/javascripts/ace/mode-curly.js +3 -0
  33. data/vendor/assets/javascripts/ace/mode-d.js +1 -1
  34. data/vendor/assets/javascripts/ace/mode-dart.js +2 -0
  35. data/vendor/assets/javascripts/ace/mode-diff.js +1 -0
  36. data/vendor/assets/javascripts/ace/mode-django.js +4 -0
  37. data/vendor/assets/javascripts/ace/mode-dockerfile.js +1 -0
  38. data/vendor/assets/javascripts/ace/mode-drools.js +1 -0
  39. data/vendor/assets/javascripts/ace/mode-edifact.js +1 -0
  40. data/vendor/assets/javascripts/ace/mode-ejs.js +673 -165
  41. data/vendor/assets/javascripts/ace/mode-erlang.js +1 -0
  42. data/vendor/assets/javascripts/ace/mode-fsl.js +1 -0
  43. data/vendor/assets/javascripts/ace/mode-glsl.js +1 -0
  44. data/vendor/assets/javascripts/ace/mode-gobstones.js +2 -0
  45. data/vendor/assets/javascripts/ace/mode-graphqlschema.js +1 -0
  46. data/vendor/assets/javascripts/ace/mode-groovy.js +1 -0
  47. data/vendor/assets/javascripts/ace/mode-haml.js +419 -104
  48. data/vendor/assets/javascripts/ace/mode-handlebars.js +3 -0
  49. data/vendor/assets/javascripts/ace/mode-haskell.js +1 -0
  50. data/vendor/assets/javascripts/ace/mode-html.js +3 -0
  51. data/vendor/assets/javascripts/ace/mode-html_elixir.js +3 -0
  52. data/vendor/assets/javascripts/ace/mode-html_ruby.js +673 -165
  53. data/vendor/assets/javascripts/ace/mode-io.js +1 -0
  54. data/vendor/assets/javascripts/ace/mode-java.js +2 -0
  55. data/vendor/assets/javascripts/ace/mode-javascript.js +1 -0
  56. data/vendor/assets/javascripts/ace/mode-json.js +3 -0
  57. data/vendor/assets/javascripts/ace/mode-json5.js +360 -0
  58. data/vendor/assets/javascripts/ace/mode-jsoniq.js +1 -0
  59. data/vendor/assets/javascripts/ace/mode-jsp.js +1 -0
  60. data/vendor/assets/javascripts/ace/mode-kotlin.js +2 -0
  61. data/vendor/assets/javascripts/ace/mode-liquid.js +4 -0
  62. data/vendor/assets/javascripts/ace/mode-lsl.js +1 -0
  63. data/vendor/assets/javascripts/ace/mode-lua.js +1 -0
  64. data/vendor/assets/javascripts/ace/mode-luapage.js +4 -0
  65. data/vendor/assets/javascripts/ace/mode-makefile.js +1 -0
  66. data/vendor/assets/javascripts/ace/mode-markdown.js +5 -0
  67. data/vendor/assets/javascripts/ace/mode-maze.js +1 -0
  68. data/vendor/assets/javascripts/ace/mode-mediawiki.js +592 -0
  69. data/vendor/assets/javascripts/ace/mode-nix.js +1 -0
  70. data/vendor/assets/javascripts/ace/mode-nsis.js +1 -1
  71. data/vendor/assets/javascripts/ace/mode-nunjucks.js +2698 -0
  72. data/vendor/assets/javascripts/ace/mode-perl.js +1 -0
  73. data/vendor/assets/javascripts/ace/mode-pgsql.js +2 -2
  74. data/vendor/assets/javascripts/ace/mode-php.js +4 -0
  75. data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +4 -0
  76. data/vendor/assets/javascripts/ace/mode-prisma.js +489 -0
  77. data/vendor/assets/javascripts/ace/mode-protobuf.js +1 -0
  78. data/vendor/assets/javascripts/ace/mode-puppet.js +5 -6
  79. data/vendor/assets/javascripts/ace/mode-python.js +3 -2
  80. data/vendor/assets/javascripts/ace/mode-qml.js +381 -0
  81. data/vendor/assets/javascripts/ace/mode-r.js +1 -0
  82. data/vendor/assets/javascripts/ace/mode-razor.js +4 -0
  83. data/vendor/assets/javascripts/ace/mode-rhtml.js +3 -0
  84. data/vendor/assets/javascripts/ace/mode-rst.js +1 -0
  85. data/vendor/assets/javascripts/ace/mode-ruby.js +670 -165
  86. data/vendor/assets/javascripts/ace/mode-rust.js +1 -1
  87. data/vendor/assets/javascripts/ace/mode-scala.js +1 -0
  88. data/vendor/assets/javascripts/ace/mode-sh.js +1 -0
  89. data/vendor/assets/javascripts/ace/mode-sjs.js +1 -0
  90. data/vendor/assets/javascripts/ace/mode-slim.js +708 -110
  91. data/vendor/assets/javascripts/ace/mode-smarty.js +3 -0
  92. data/vendor/assets/javascripts/ace/mode-snippets.js +1 -0
  93. data/vendor/assets/javascripts/ace/mode-soy_template.js +3 -0
  94. data/vendor/assets/javascripts/ace/mode-sql.js +1 -0
  95. data/vendor/assets/javascripts/ace/mode-sqlserver.js +2 -1
  96. data/vendor/assets/javascripts/ace/mode-svg.js +1 -0
  97. data/vendor/assets/javascripts/ace/mode-swift.js +6 -0
  98. data/vendor/assets/javascripts/ace/mode-tcl.js +1 -0
  99. data/vendor/assets/javascripts/ace/mode-terraform.js +10 -7
  100. data/vendor/assets/javascripts/ace/mode-tex.js +1 -0
  101. data/vendor/assets/javascripts/ace/mode-textile.js +1 -0
  102. data/vendor/assets/javascripts/ace/mode-tsx.js +1 -0
  103. data/vendor/assets/javascripts/ace/mode-twig.js +3 -0
  104. data/vendor/assets/javascripts/ace/mode-typescript.js +1 -0
  105. data/vendor/assets/javascripts/ace/mode-vala.js +1 -0
  106. data/vendor/assets/javascripts/ace/mode-vbscript.js +444 -15
  107. data/vendor/assets/javascripts/ace/mode-velocity.js +4 -0
  108. data/vendor/assets/javascripts/ace/mode-vhdl.js +5 -6
  109. data/vendor/assets/javascripts/ace/mode-visualforce.js +3 -0
  110. data/vendor/assets/javascripts/ace/mode-wollok.js +2 -0
  111. data/vendor/assets/javascripts/ace/mode-xquery.js +1 -0
  112. data/vendor/assets/javascripts/ace/snippets/abap.js +1 -6
  113. data/vendor/assets/javascripts/ace/snippets/ada.js +1 -6
  114. data/vendor/assets/javascripts/ace/snippets/alda.js +9 -0
  115. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +1 -6
  116. data/vendor/assets/javascripts/ace/snippets/apex.js +1 -6
  117. data/vendor/assets/javascripts/ace/snippets/applescript.js +1 -6
  118. data/vendor/assets/javascripts/ace/snippets/aql.js +1 -6
  119. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +1 -6
  120. data/vendor/assets/javascripts/ace/snippets/asl.js +1 -5
  121. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +1 -6
  122. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +1 -6
  123. data/vendor/assets/javascripts/ace/snippets/batchfile.js +1 -6
  124. data/vendor/assets/javascripts/ace/snippets/c9search.js +1 -6
  125. data/vendor/assets/javascripts/ace/snippets/cirru.js +1 -6
  126. data/vendor/assets/javascripts/ace/snippets/cobol.js +1 -6
  127. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +1 -6
  128. data/vendor/assets/javascripts/ace/snippets/crystal.js +1 -6
  129. data/vendor/assets/javascripts/ace/snippets/csharp.js +1 -6
  130. data/vendor/assets/javascripts/ace/snippets/csound_score.js +1 -6
  131. data/vendor/assets/javascripts/ace/snippets/csp.js +1 -6
  132. data/vendor/assets/javascripts/ace/snippets/curly.js +1 -6
  133. data/vendor/assets/javascripts/ace/snippets/d.js +1 -6
  134. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +1 -6
  135. data/vendor/assets/javascripts/ace/snippets/dot.js +1 -6
  136. data/vendor/assets/javascripts/ace/snippets/eiffel.js +1 -6
  137. data/vendor/assets/javascripts/ace/snippets/ejs.js +1 -6
  138. data/vendor/assets/javascripts/ace/snippets/elixir.js +1 -6
  139. data/vendor/assets/javascripts/ace/snippets/elm.js +1 -6
  140. data/vendor/assets/javascripts/ace/snippets/forth.js +1 -6
  141. data/vendor/assets/javascripts/ace/snippets/fortran.js +1 -6
  142. data/vendor/assets/javascripts/ace/snippets/fsharp.js +1 -6
  143. data/vendor/assets/javascripts/ace/snippets/ftl.js +1 -6
  144. data/vendor/assets/javascripts/ace/snippets/gcode.js +1 -6
  145. data/vendor/assets/javascripts/ace/snippets/gherkin.js +1 -6
  146. data/vendor/assets/javascripts/ace/snippets/gitignore.js +1 -6
  147. data/vendor/assets/javascripts/ace/snippets/glsl.js +1 -6
  148. data/vendor/assets/javascripts/ace/snippets/golang.js +1 -6
  149. data/vendor/assets/javascripts/ace/snippets/groovy.js +1 -6
  150. data/vendor/assets/javascripts/ace/snippets/handlebars.js +1 -6
  151. data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +1 -6
  152. data/vendor/assets/javascripts/ace/snippets/haxe.js +1 -6
  153. data/vendor/assets/javascripts/ace/snippets/hjson.js +1 -6
  154. data/vendor/assets/javascripts/ace/snippets/html_elixir.js +1 -6
  155. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +1 -6
  156. data/vendor/assets/javascripts/ace/snippets/ini.js +1 -6
  157. data/vendor/assets/javascripts/ace/snippets/jack.js +1 -6
  158. data/vendor/assets/javascripts/ace/snippets/jade.js +1 -6
  159. data/vendor/assets/javascripts/ace/snippets/json.js +1 -6
  160. data/vendor/assets/javascripts/ace/snippets/json5.js +9 -0
  161. data/vendor/assets/javascripts/ace/snippets/jssm.js +1 -6
  162. data/vendor/assets/javascripts/ace/snippets/jsx.js +1 -6
  163. data/vendor/assets/javascripts/ace/snippets/julia.js +1 -6
  164. data/vendor/assets/javascripts/ace/snippets/kotlin.js +1 -6
  165. data/vendor/assets/javascripts/ace/snippets/latex.js +1 -6
  166. data/vendor/assets/javascripts/ace/snippets/less.js +1 -6
  167. data/vendor/assets/javascripts/ace/snippets/lisp.js +1 -6
  168. data/vendor/assets/javascripts/ace/snippets/livescript.js +1 -6
  169. data/vendor/assets/javascripts/ace/snippets/logiql.js +1 -6
  170. data/vendor/assets/javascripts/ace/snippets/logtalk.js +1 -6
  171. data/vendor/assets/javascripts/ace/snippets/luapage.js +1 -6
  172. data/vendor/assets/javascripts/ace/snippets/lucene.js +1 -6
  173. data/vendor/assets/javascripts/ace/snippets/mask.js +1 -6
  174. data/vendor/assets/javascripts/ace/snippets/matlab.js +1 -6
  175. data/vendor/assets/javascripts/ace/snippets/mediawiki.js +9 -0
  176. data/vendor/assets/javascripts/ace/snippets/mel.js +1 -6
  177. data/vendor/assets/javascripts/ace/snippets/mixal.js +1 -6
  178. data/vendor/assets/javascripts/ace/snippets/mushcode.js +1 -6
  179. data/vendor/assets/javascripts/ace/snippets/mysql.js +1 -6
  180. data/vendor/assets/javascripts/ace/snippets/nginx.js +1 -6
  181. data/vendor/assets/javascripts/ace/snippets/nim.js +1 -6
  182. data/vendor/assets/javascripts/ace/snippets/nix.js +1 -6
  183. data/vendor/assets/javascripts/ace/snippets/nsis.js +1 -6
  184. data/vendor/assets/javascripts/ace/snippets/nunjucks.js +9 -0
  185. data/vendor/assets/javascripts/ace/snippets/objectivec.js +1 -6
  186. data/vendor/assets/javascripts/ace/snippets/ocaml.js +1 -6
  187. data/vendor/assets/javascripts/ace/snippets/pascal.js +1 -6
  188. data/vendor/assets/javascripts/ace/snippets/perl6.js +1 -6
  189. data/vendor/assets/javascripts/ace/snippets/pgsql.js +1 -6
  190. data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +1 -6
  191. data/vendor/assets/javascripts/ace/snippets/pig.js +1 -6
  192. data/vendor/assets/javascripts/ace/snippets/plain_text.js +1 -6
  193. data/vendor/assets/javascripts/ace/snippets/powershell.js +1 -6
  194. data/vendor/assets/javascripts/ace/snippets/praat.js +1 -6
  195. data/vendor/assets/javascripts/ace/snippets/prisma.js +9 -0
  196. data/vendor/assets/javascripts/ace/snippets/prolog.js +1 -6
  197. data/vendor/assets/javascripts/ace/snippets/properties.js +1 -6
  198. data/vendor/assets/javascripts/ace/snippets/protobuf.js +1 -6
  199. data/vendor/assets/javascripts/ace/snippets/puppet.js +1 -6
  200. data/vendor/assets/javascripts/ace/snippets/qml.js +9 -0
  201. data/vendor/assets/javascripts/ace/snippets/rdoc.js +1 -6
  202. data/vendor/assets/javascripts/ace/snippets/red.js +1 -6
  203. data/vendor/assets/javascripts/ace/snippets/redshift.js +1 -6
  204. data/vendor/assets/javascripts/ace/snippets/rhtml.js +1 -6
  205. data/vendor/assets/javascripts/ace/snippets/rust.js +1 -6
  206. data/vendor/assets/javascripts/ace/snippets/sass.js +1 -6
  207. data/vendor/assets/javascripts/ace/snippets/scad.js +1 -6
  208. data/vendor/assets/javascripts/ace/snippets/scala.js +1 -6
  209. data/vendor/assets/javascripts/ace/snippets/scheme.js +1 -6
  210. data/vendor/assets/javascripts/ace/snippets/scss.js +1 -6
  211. data/vendor/assets/javascripts/ace/snippets/sjs.js +1 -6
  212. data/vendor/assets/javascripts/ace/snippets/slim.js +1 -6
  213. data/vendor/assets/javascripts/ace/snippets/smarty.js +1 -6
  214. data/vendor/assets/javascripts/ace/snippets/soy_template.js +1 -6
  215. data/vendor/assets/javascripts/ace/snippets/space.js +1 -6
  216. data/vendor/assets/javascripts/ace/snippets/sparql.js +1 -6
  217. data/vendor/assets/javascripts/ace/snippets/stylus.js +1 -6
  218. data/vendor/assets/javascripts/ace/snippets/svg.js +1 -6
  219. data/vendor/assets/javascripts/ace/snippets/swift.js +1 -6
  220. data/vendor/assets/javascripts/ace/snippets/terraform.js +1 -6
  221. data/vendor/assets/javascripts/ace/snippets/text.js +1 -6
  222. data/vendor/assets/javascripts/ace/snippets/toml.js +1 -6
  223. data/vendor/assets/javascripts/ace/snippets/tsx.js +1 -6
  224. data/vendor/assets/javascripts/ace/snippets/turtle.js +1 -6
  225. data/vendor/assets/javascripts/ace/snippets/twig.js +1 -6
  226. data/vendor/assets/javascripts/ace/snippets/typescript.js +1 -6
  227. data/vendor/assets/javascripts/ace/snippets/vbscript.js +1 -6
  228. data/vendor/assets/javascripts/ace/snippets/verilog.js +1 -6
  229. data/vendor/assets/javascripts/ace/snippets/vhdl.js +1 -6
  230. data/vendor/assets/javascripts/ace/snippets/visualforce.js +1 -6
  231. data/vendor/assets/javascripts/ace/snippets/xml.js +1 -6
  232. data/vendor/assets/javascripts/ace/snippets/yaml.js +1 -6
  233. data/vendor/assets/javascripts/ace/snippets/zeek.js +1 -6
  234. data/vendor/assets/javascripts/ace/theme-ambiance.js +3 -2
  235. data/vendor/assets/javascripts/ace/theme-chaos.js +1 -1
  236. data/vendor/assets/javascripts/ace/theme-nord_dark.js +102 -0
  237. data/vendor/assets/javascripts/ace/worker-base.js +1421 -0
  238. data/vendor/assets/javascripts/ace/worker-coffee.js +17 -703
  239. data/vendor/assets/javascripts/ace/worker-css.js +17 -703
  240. data/vendor/assets/javascripts/ace/worker-html.js +17 -703
  241. data/vendor/assets/javascripts/ace/worker-javascript.js +7833 -5352
  242. data/vendor/assets/javascripts/ace/worker-json.js +17 -703
  243. data/vendor/assets/javascripts/ace/worker-lua.js +17 -703
  244. data/vendor/assets/javascripts/ace/worker-php.js +857 -1475
  245. data/vendor/assets/javascripts/ace/worker-xml.js +26 -707
  246. data/vendor/assets/javascripts/ace/worker-xquery.js +17 -703
  247. metadata +18 -4
  248. data/vendor/assets/javascripts/ace/mode-bro.js +0 -334
  249. data/vendor/assets/javascripts/ace/snippets/bro.js +0 -14
@@ -1,10 +1,5 @@
1
- define("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "sjs";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/sjs"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/slim",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "slim";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/slim"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "smarty";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/smarty"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "soy_template";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/soy_template"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/space",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "space";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/space"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/sparql",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/sparql"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "stylus";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/stylus"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/svg",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "svg";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/svg"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/swift",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "swift";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/swift"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/terraform",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "terraform";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/terraform"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/text",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "text";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/text"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/toml",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "toml";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/toml"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/tsx",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "tsx";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/tsx"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/turtle",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/turtle"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/twig",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "twig";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/twig"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "typescript";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/typescript"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "vbscript";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/vbscript"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "verilog";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/verilog"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "vhdl";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/vhdl"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/visualforce",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "visualforce";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/visualforce"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/xml",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "xml";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/xml"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "yaml";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/yaml"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -1,10 +1,5 @@
1
- define("ace/snippets/zeek",["require","exports","module"], function(require, exports, module) {
2
- "use strict";
3
1
 
4
- exports.snippetText =undefined;
5
- exports.scope = "";
6
-
7
- }); (function() {
2
+ ; (function() {
8
3
  window.require(["ace/snippets/zeek"], function(m) {
9
4
  if (typeof module == "object" && typeof exports == "object" && module) {
10
5
  module.exports = m;
@@ -25,7 +25,7 @@ color: #777;\
25
25
  .ace-ambiance .ace_fold-widget.ace_start,\
26
26
  .ace-ambiance .ace_fold-widget.ace_end,\
27
27
  .ace-ambiance .ace_fold-widget.ace_closed{\
28
- background: none;\
28
+ background: none !important;\
29
29
  border: none;\
30
30
  box-shadow: none;\
31
31
  }\
@@ -169,7 +169,8 @@ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICA
169
169
  }\
170
170
  .ace-ambiance .ace_indent-guide {\
171
171
  background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\
172
- }";
172
+ }\
173
+ ";
173
174
 
174
175
  var dom = require("../lib/dom");
175
176
  dom.importCssString(exports.cssText, exports.cssClass);
@@ -121,7 +121,7 @@ color: #777;\
121
121
  .ace-chaos .ace_fold-widget.ace_start,\
122
122
  .ace-chaos .ace_fold-widget.ace_end,\
123
123
  .ace-chaos .ace_fold-widget.ace_closed{\
124
- background: none;\
124
+ background: none !important;\
125
125
  border: none;\
126
126
  box-shadow: none;\
127
127
  }\
@@ -0,0 +1,102 @@
1
+ define("ace/theme/nord_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
2
+
3
+ exports.isDark = true;
4
+ exports.cssClass = "ace-nord-dark";
5
+ exports.cssText = ".ace-nord-dark .ace_gutter {\
6
+ color: #616e88;\
7
+ }\
8
+ .ace-nord-dark .ace_print-margin {\
9
+ width: 1px;\
10
+ background: #4c566a;\
11
+ }\
12
+ .ace-nord-dark {\
13
+ background-color: #2e3440;\
14
+ color: #d8dee9;\
15
+ }\
16
+ .ace-nord-dark .ace_entity.ace_other.ace_attribute-name,\
17
+ .ace-nord-dark .ace_storage {\
18
+ color: #d8dee9;\
19
+ }\
20
+ .ace-nord-dark .ace_cursor {\
21
+ color: #d8dee9;\
22
+ },\
23
+ .ace-nord-dark .ace_string.ace_regexp {\
24
+ color: #bf616a;\
25
+ }\
26
+ .ace-nord-dark .ace_marker-layer .ace_active-line {\
27
+ background: #434c5ecc;\
28
+ }\
29
+ .ace-nord-dark .ace_marker-layer .ace_selection {\
30
+ background: #434c5ecc;\
31
+ }\
32
+ .ace-nord-dark.ace_multiselect .ace_selection.ace_start {\
33
+ box-shadow: 0 0 3px 0px #2e3440;\
34
+ }\
35
+ .ace-nord-dark .ace_marker-layer .ace_step {\
36
+ background: #ebcb8b;\
37
+ }\
38
+ .ace-nord-dark .ace_marker-layer .ace_bracket {\
39
+ margin: -1px 0 0 -1px;\
40
+ border: 1px solid #88c0d066;\
41
+ }\
42
+ .ace-nord-dark .ace_gutter-active-line {\
43
+ background-color: #434c5ecc;\
44
+ }\
45
+ .ace-nord-dark .ace_marker-layer .ace_selected-word {\
46
+ border: 1px solid #88c0d066;\
47
+ }\
48
+ .ace-nord-dark .ace_invisible {\
49
+ color: #4c566a;\
50
+ }\
51
+ .ace-nord-dark .ace_keyword,\
52
+ .ace-nord-dark .ace_meta,\
53
+ .ace-nord-dark .ace_support.ace_class,\
54
+ .ace-nord-dark .ace_support.ace_type {\
55
+ color: #81a1c1;\
56
+ }\
57
+ .ace-nord-dark .ace_constant.ace_character,\
58
+ .ace-nord-dark .ace_constant.ace_other {\
59
+ color: #d8dee9;\
60
+ }\
61
+ .ace-nord-dark .ace_constant.ace_language {\
62
+ color: #5e81ac;\
63
+ }\
64
+ .ace-nord-dark .ace_constant.ace_escape {\
65
+ color: #ebcB8b;\
66
+ }\
67
+ .ace-nord-dark .ace_constant.ace_numeric {\
68
+ color: #b48ead;\
69
+ }\
70
+ .ace-nord-dark .ace_fold {\
71
+ background-color: #4c566a;\
72
+ border-color: #d8dee9;\
73
+ }\
74
+ .ace-nord-dark .ace_entity.ace_name.ace_function,\
75
+ .ace-nord-dark .ace_entity.ace_name.ace_tag,\
76
+ .ace-nord-dark .ace_support.ace_function,\
77
+ .ace-nord-dark .ace_variable,\
78
+ .ace-nord-dark .ace_variable.ace_language {\
79
+ color: #8fbcbb;\
80
+ }\
81
+ .ace-nord-dark .ace_string {\
82
+ color: #a3be8c;\
83
+ }\
84
+ .ace-nord-dark .ace_comment {\
85
+ color: #616e88;\
86
+ }\
87
+ .ace-nord-dark .ace_indent-guide {\
88
+ box-shadow: inset -1px 0 0 0 #434c5eb3;\
89
+ }\
90
+ ";
91
+ exports.$selectionColorConflict = true;
92
+
93
+ var dom = require("../lib/dom");
94
+ dom.importCssString(exports.cssText, exports.cssClass);
95
+ }); (function() {
96
+ window.require(["ace/theme/nord_dark"], function(m) {
97
+ if (typeof module == "object" && typeof exports == "object" && module) {
98
+ module.exports = m;
99
+ }
100
+ });
101
+ })();
102
+
@@ -0,0 +1,1421 @@
1
+ "no use strict";
2
+ !(function(window) {
3
+ if (typeof window.window != "undefined" && window.document)
4
+ return;
5
+ if (window.require && window.define)
6
+ return;
7
+
8
+ if (!window.console) {
9
+ window.console = function() {
10
+ var msgs = Array.prototype.slice.call(arguments, 0);
11
+ postMessage({type: "log", data: msgs});
12
+ };
13
+ window.console.error =
14
+ window.console.warn =
15
+ window.console.log =
16
+ window.console.trace = window.console;
17
+ }
18
+ window.window = window;
19
+ window.ace = window;
20
+
21
+ window.onerror = function(message, file, line, col, err) {
22
+ postMessage({type: "error", data: {
23
+ message: message,
24
+ data: err.data,
25
+ file: file,
26
+ line: line,
27
+ col: col,
28
+ stack: err.stack
29
+ }});
30
+ };
31
+
32
+ window.normalizeModule = function(parentId, moduleName) {
33
+ // normalize plugin requires
34
+ if (moduleName.indexOf("!") !== -1) {
35
+ var chunks = moduleName.split("!");
36
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
37
+ }
38
+ // normalize relative requires
39
+ if (moduleName.charAt(0) == ".") {
40
+ var base = parentId.split("/").slice(0, -1).join("/");
41
+ moduleName = (base ? base + "/" : "") + moduleName;
42
+
43
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
44
+ var previous = moduleName;
45
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
46
+ }
47
+ }
48
+
49
+ return moduleName;
50
+ };
51
+
52
+ window.require = function require(parentId, id) {
53
+ if (!id) {
54
+ id = parentId;
55
+ parentId = null;
56
+ }
57
+ if (!id.charAt)
58
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
59
+
60
+ id = window.normalizeModule(parentId, id);
61
+
62
+ var module = window.require.modules[id];
63
+ if (module) {
64
+ if (!module.initialized) {
65
+ module.initialized = true;
66
+ module.exports = module.factory().exports;
67
+ }
68
+ return module.exports;
69
+ }
70
+
71
+ if (!window.require.tlns)
72
+ return console.log("unable to load " + id);
73
+
74
+ var path = resolveModuleId(id, window.require.tlns);
75
+ if (path.slice(-3) != ".js") path += ".js";
76
+
77
+ window.require.id = id;
78
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
79
+ importScripts(path);
80
+ return window.require(parentId, id);
81
+ };
82
+ function resolveModuleId(id, paths) {
83
+ var testPath = id, tail = "";
84
+ while (testPath) {
85
+ var alias = paths[testPath];
86
+ if (typeof alias == "string") {
87
+ return alias + tail;
88
+ } else if (alias) {
89
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
90
+ } else if (alias === false) {
91
+ return "";
92
+ }
93
+ var i = testPath.lastIndexOf("/");
94
+ if (i === -1) break;
95
+ tail = testPath.substr(i) + tail;
96
+ testPath = testPath.slice(0, i);
97
+ }
98
+ return id;
99
+ }
100
+ window.require.modules = {};
101
+ window.require.tlns = {};
102
+
103
+ window.define = function(id, deps, factory) {
104
+ if (arguments.length == 2) {
105
+ factory = deps;
106
+ if (typeof id != "string") {
107
+ deps = id;
108
+ id = window.require.id;
109
+ }
110
+ } else if (arguments.length == 1) {
111
+ factory = id;
112
+ deps = [];
113
+ id = window.require.id;
114
+ }
115
+
116
+ if (typeof factory != "function") {
117
+ window.require.modules[id] = {
118
+ exports: factory,
119
+ initialized: true
120
+ };
121
+ return;
122
+ }
123
+
124
+ if (!deps.length)
125
+ // If there is no dependencies, we inject "require", "exports" and
126
+ // "module" as dependencies, to provide CommonJS compatibility.
127
+ deps = ["require", "exports", "module"];
128
+
129
+ var req = function(childId) {
130
+ return window.require(id, childId);
131
+ };
132
+
133
+ window.require.modules[id] = {
134
+ exports: {},
135
+ factory: function() {
136
+ var module = this;
137
+ var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) {
138
+ switch (dep) {
139
+ // Because "require", "exports" and "module" aren't actual
140
+ // dependencies, we must handle them seperately.
141
+ case "require": return req;
142
+ case "exports": return module.exports;
143
+ case "module": return module;
144
+ // But for all other dependencies, we can just go ahead and
145
+ // require them.
146
+ default: return req(dep);
147
+ }
148
+ }));
149
+ if (returnExports)
150
+ module.exports = returnExports;
151
+ return module;
152
+ }
153
+ };
154
+ };
155
+ window.define.amd = {};
156
+ require.tlns = {};
157
+ window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
158
+ for (var i in topLevelNamespaces)
159
+ require.tlns[i] = topLevelNamespaces[i];
160
+ };
161
+
162
+ window.initSender = function initSender() {
163
+
164
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
165
+ var oop = window.require("ace/lib/oop");
166
+
167
+ var Sender = function() {};
168
+
169
+ (function() {
170
+
171
+ oop.implement(this, EventEmitter);
172
+
173
+ this.callback = function(data, callbackId) {
174
+ postMessage({
175
+ type: "call",
176
+ id: callbackId,
177
+ data: data
178
+ });
179
+ };
180
+
181
+ this.emit = function(name, data) {
182
+ postMessage({
183
+ type: "event",
184
+ name: name,
185
+ data: data
186
+ });
187
+ };
188
+
189
+ }).call(Sender.prototype);
190
+
191
+ return new Sender();
192
+ };
193
+
194
+ var main = window.main = null;
195
+ var sender = window.sender = null;
196
+
197
+ window.onmessage = function(e) {
198
+ var msg = e.data;
199
+ if (msg.event && sender) {
200
+ sender._signal(msg.event, msg.data);
201
+ }
202
+ else if (msg.command) {
203
+ if (main[msg.command])
204
+ main[msg.command].apply(main, msg.args);
205
+ else if (window[msg.command])
206
+ window[msg.command].apply(window, msg.args);
207
+ else
208
+ throw new Error("Unknown command:" + msg.command);
209
+ }
210
+ else if (msg.init) {
211
+ window.initBaseUrls(msg.tlns);
212
+ sender = window.sender = window.initSender();
213
+ var clazz = require(msg.module)[msg.classname];
214
+ main = window.main = new clazz(sender);
215
+ }
216
+ };
217
+ })(this);
218
+
219
+ define("ace/range",[], function(require, exports, module) {
220
+ "use strict";
221
+ var comparePoints = function(p1, p2) {
222
+ return p1.row - p2.row || p1.column - p2.column;
223
+ };
224
+ var Range = function(startRow, startColumn, endRow, endColumn) {
225
+ this.start = {
226
+ row: startRow,
227
+ column: startColumn
228
+ };
229
+
230
+ this.end = {
231
+ row: endRow,
232
+ column: endColumn
233
+ };
234
+ };
235
+
236
+ (function() {
237
+ this.isEqual = function(range) {
238
+ return this.start.row === range.start.row &&
239
+ this.end.row === range.end.row &&
240
+ this.start.column === range.start.column &&
241
+ this.end.column === range.end.column;
242
+ };
243
+ this.toString = function() {
244
+ return ("Range: [" + this.start.row + "/" + this.start.column +
245
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
246
+ };
247
+
248
+ this.contains = function(row, column) {
249
+ return this.compare(row, column) == 0;
250
+ };
251
+ this.compareRange = function(range) {
252
+ var cmp,
253
+ end = range.end,
254
+ start = range.start;
255
+
256
+ cmp = this.compare(end.row, end.column);
257
+ if (cmp == 1) {
258
+ cmp = this.compare(start.row, start.column);
259
+ if (cmp == 1) {
260
+ return 2;
261
+ } else if (cmp == 0) {
262
+ return 1;
263
+ } else {
264
+ return 0;
265
+ }
266
+ } else if (cmp == -1) {
267
+ return -2;
268
+ } else {
269
+ cmp = this.compare(start.row, start.column);
270
+ if (cmp == -1) {
271
+ return -1;
272
+ } else if (cmp == 1) {
273
+ return 42;
274
+ } else {
275
+ return 0;
276
+ }
277
+ }
278
+ };
279
+ this.comparePoint = function(p) {
280
+ return this.compare(p.row, p.column);
281
+ };
282
+ this.containsRange = function(range) {
283
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
284
+ };
285
+ this.intersects = function(range) {
286
+ var cmp = this.compareRange(range);
287
+ return (cmp == -1 || cmp == 0 || cmp == 1);
288
+ };
289
+ this.isEnd = function(row, column) {
290
+ return this.end.row == row && this.end.column == column;
291
+ };
292
+ this.isStart = function(row, column) {
293
+ return this.start.row == row && this.start.column == column;
294
+ };
295
+ this.setStart = function(row, column) {
296
+ if (typeof row == "object") {
297
+ this.start.column = row.column;
298
+ this.start.row = row.row;
299
+ } else {
300
+ this.start.row = row;
301
+ this.start.column = column;
302
+ }
303
+ };
304
+ this.setEnd = function(row, column) {
305
+ if (typeof row == "object") {
306
+ this.end.column = row.column;
307
+ this.end.row = row.row;
308
+ } else {
309
+ this.end.row = row;
310
+ this.end.column = column;
311
+ }
312
+ };
313
+ this.inside = function(row, column) {
314
+ if (this.compare(row, column) == 0) {
315
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
316
+ return false;
317
+ } else {
318
+ return true;
319
+ }
320
+ }
321
+ return false;
322
+ };
323
+ this.insideStart = function(row, column) {
324
+ if (this.compare(row, column) == 0) {
325
+ if (this.isEnd(row, column)) {
326
+ return false;
327
+ } else {
328
+ return true;
329
+ }
330
+ }
331
+ return false;
332
+ };
333
+ this.insideEnd = function(row, column) {
334
+ if (this.compare(row, column) == 0) {
335
+ if (this.isStart(row, column)) {
336
+ return false;
337
+ } else {
338
+ return true;
339
+ }
340
+ }
341
+ return false;
342
+ };
343
+ this.compare = function(row, column) {
344
+ if (!this.isMultiLine()) {
345
+ if (row === this.start.row) {
346
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
347
+ }
348
+ }
349
+
350
+ if (row < this.start.row)
351
+ return -1;
352
+
353
+ if (row > this.end.row)
354
+ return 1;
355
+
356
+ if (this.start.row === row)
357
+ return column >= this.start.column ? 0 : -1;
358
+
359
+ if (this.end.row === row)
360
+ return column <= this.end.column ? 0 : 1;
361
+
362
+ return 0;
363
+ };
364
+ this.compareStart = function(row, column) {
365
+ if (this.start.row == row && this.start.column == column) {
366
+ return -1;
367
+ } else {
368
+ return this.compare(row, column);
369
+ }
370
+ };
371
+ this.compareEnd = function(row, column) {
372
+ if (this.end.row == row && this.end.column == column) {
373
+ return 1;
374
+ } else {
375
+ return this.compare(row, column);
376
+ }
377
+ };
378
+ this.compareInside = function(row, column) {
379
+ if (this.end.row == row && this.end.column == column) {
380
+ return 1;
381
+ } else if (this.start.row == row && this.start.column == column) {
382
+ return -1;
383
+ } else {
384
+ return this.compare(row, column);
385
+ }
386
+ };
387
+ this.clipRows = function(firstRow, lastRow) {
388
+ if (this.end.row > lastRow)
389
+ var end = {row: lastRow + 1, column: 0};
390
+ else if (this.end.row < firstRow)
391
+ var end = {row: firstRow, column: 0};
392
+
393
+ if (this.start.row > lastRow)
394
+ var start = {row: lastRow + 1, column: 0};
395
+ else if (this.start.row < firstRow)
396
+ var start = {row: firstRow, column: 0};
397
+
398
+ return Range.fromPoints(start || this.start, end || this.end);
399
+ };
400
+ this.extend = function(row, column) {
401
+ var cmp = this.compare(row, column);
402
+
403
+ if (cmp == 0)
404
+ return this;
405
+ else if (cmp == -1)
406
+ var start = {row: row, column: column};
407
+ else
408
+ var end = {row: row, column: column};
409
+
410
+ return Range.fromPoints(start || this.start, end || this.end);
411
+ };
412
+
413
+ this.isEmpty = function() {
414
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
415
+ };
416
+ this.isMultiLine = function() {
417
+ return (this.start.row !== this.end.row);
418
+ };
419
+ this.clone = function() {
420
+ return Range.fromPoints(this.start, this.end);
421
+ };
422
+ this.collapseRows = function() {
423
+ if (this.end.column == 0)
424
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
425
+ else
426
+ return new Range(this.start.row, 0, this.end.row, 0);
427
+ };
428
+ this.toScreenRange = function(session) {
429
+ var screenPosStart = session.documentToScreenPosition(this.start);
430
+ var screenPosEnd = session.documentToScreenPosition(this.end);
431
+
432
+ return new Range(
433
+ screenPosStart.row, screenPosStart.column,
434
+ screenPosEnd.row, screenPosEnd.column
435
+ );
436
+ };
437
+ this.moveBy = function(row, column) {
438
+ this.start.row += row;
439
+ this.start.column += column;
440
+ this.end.row += row;
441
+ this.end.column += column;
442
+ };
443
+
444
+ }).call(Range.prototype);
445
+ Range.fromPoints = function(start, end) {
446
+ return new Range(start.row, start.column, end.row, end.column);
447
+ };
448
+ Range.comparePoints = comparePoints;
449
+
450
+ Range.comparePoints = function(p1, p2) {
451
+ return p1.row - p2.row || p1.column - p2.column;
452
+ };
453
+
454
+
455
+ exports.Range = Range;
456
+ });
457
+
458
+ define("ace/lib/oop",[], function(require, exports, module) {
459
+ "use strict";
460
+
461
+ exports.inherits = function(ctor, superCtor) {
462
+ ctor.super_ = superCtor;
463
+ ctor.prototype = Object.create(superCtor.prototype, {
464
+ constructor: {
465
+ value: ctor,
466
+ enumerable: false,
467
+ writable: true,
468
+ configurable: true
469
+ }
470
+ });
471
+ };
472
+
473
+ exports.mixin = function(obj, mixin) {
474
+ for (var key in mixin) {
475
+ obj[key] = mixin[key];
476
+ }
477
+ return obj;
478
+ };
479
+
480
+ exports.implement = function(proto, mixin) {
481
+ exports.mixin(proto, mixin);
482
+ };
483
+
484
+ });
485
+
486
+ define("ace/apply_delta",[], function(require, exports, module) {
487
+ "use strict";
488
+
489
+ function throwDeltaError(delta, errorText){
490
+ console.log("Invalid Delta:", delta);
491
+ throw "Invalid Delta: " + errorText;
492
+ }
493
+
494
+ function positionInDocument(docLines, position) {
495
+ return position.row >= 0 && position.row < docLines.length &&
496
+ position.column >= 0 && position.column <= docLines[position.row].length;
497
+ }
498
+
499
+ function validateDelta(docLines, delta) {
500
+ if (delta.action != "insert" && delta.action != "remove")
501
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
502
+ if (!(delta.lines instanceof Array))
503
+ throwDeltaError(delta, "delta.lines must be an Array");
504
+ if (!delta.start || !delta.end)
505
+ throwDeltaError(delta, "delta.start/end must be an present");
506
+ var start = delta.start;
507
+ if (!positionInDocument(docLines, delta.start))
508
+ throwDeltaError(delta, "delta.start must be contained in document");
509
+ var end = delta.end;
510
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
511
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
512
+ var numRangeRows = end.row - start.row;
513
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
514
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
515
+ throwDeltaError(delta, "delta.range must match delta lines");
516
+ }
517
+
518
+ exports.applyDelta = function(docLines, delta, doNotValidate) {
519
+
520
+ var row = delta.start.row;
521
+ var startColumn = delta.start.column;
522
+ var line = docLines[row] || "";
523
+ switch (delta.action) {
524
+ case "insert":
525
+ var lines = delta.lines;
526
+ if (lines.length === 1) {
527
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
528
+ } else {
529
+ var args = [row, 1].concat(delta.lines);
530
+ docLines.splice.apply(docLines, args);
531
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
532
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
533
+ }
534
+ break;
535
+ case "remove":
536
+ var endColumn = delta.end.column;
537
+ var endRow = delta.end.row;
538
+ if (row === endRow) {
539
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
540
+ } else {
541
+ docLines.splice(
542
+ row, endRow - row + 1,
543
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
544
+ );
545
+ }
546
+ break;
547
+ }
548
+ };
549
+ });
550
+
551
+ define("ace/lib/event_emitter",[], function(require, exports, module) {
552
+ "use strict";
553
+
554
+ var EventEmitter = {};
555
+ var stopPropagation = function() { this.propagationStopped = true; };
556
+ var preventDefault = function() { this.defaultPrevented = true; };
557
+
558
+ EventEmitter._emit =
559
+ EventEmitter._dispatchEvent = function(eventName, e) {
560
+ this._eventRegistry || (this._eventRegistry = {});
561
+ this._defaultHandlers || (this._defaultHandlers = {});
562
+
563
+ var listeners = this._eventRegistry[eventName] || [];
564
+ var defaultHandler = this._defaultHandlers[eventName];
565
+ if (!listeners.length && !defaultHandler)
566
+ return;
567
+
568
+ if (typeof e != "object" || !e)
569
+ e = {};
570
+
571
+ if (!e.type)
572
+ e.type = eventName;
573
+ if (!e.stopPropagation)
574
+ e.stopPropagation = stopPropagation;
575
+ if (!e.preventDefault)
576
+ e.preventDefault = preventDefault;
577
+
578
+ listeners = listeners.slice();
579
+ for (var i=0; i<listeners.length; i++) {
580
+ listeners[i](e, this);
581
+ if (e.propagationStopped)
582
+ break;
583
+ }
584
+
585
+ if (defaultHandler && !e.defaultPrevented)
586
+ return defaultHandler(e, this);
587
+ };
588
+
589
+
590
+ EventEmitter._signal = function(eventName, e) {
591
+ var listeners = (this._eventRegistry || {})[eventName];
592
+ if (!listeners)
593
+ return;
594
+ listeners = listeners.slice();
595
+ for (var i=0; i<listeners.length; i++)
596
+ listeners[i](e, this);
597
+ };
598
+
599
+ EventEmitter.once = function(eventName, callback) {
600
+ var _self = this;
601
+ this.on(eventName, function newCallback() {
602
+ _self.off(eventName, newCallback);
603
+ callback.apply(null, arguments);
604
+ });
605
+ if (!callback) {
606
+ return new Promise(function(resolve) {
607
+ callback = resolve;
608
+ });
609
+ }
610
+ };
611
+
612
+
613
+ EventEmitter.setDefaultHandler = function(eventName, callback) {
614
+ var handlers = this._defaultHandlers;
615
+ if (!handlers)
616
+ handlers = this._defaultHandlers = {_disabled_: {}};
617
+
618
+ if (handlers[eventName]) {
619
+ var old = handlers[eventName];
620
+ var disabled = handlers._disabled_[eventName];
621
+ if (!disabled)
622
+ handlers._disabled_[eventName] = disabled = [];
623
+ disabled.push(old);
624
+ var i = disabled.indexOf(callback);
625
+ if (i != -1)
626
+ disabled.splice(i, 1);
627
+ }
628
+ handlers[eventName] = callback;
629
+ };
630
+ EventEmitter.removeDefaultHandler = function(eventName, callback) {
631
+ var handlers = this._defaultHandlers;
632
+ if (!handlers)
633
+ return;
634
+ var disabled = handlers._disabled_[eventName];
635
+
636
+ if (handlers[eventName] == callback) {
637
+ if (disabled)
638
+ this.setDefaultHandler(eventName, disabled.pop());
639
+ } else if (disabled) {
640
+ var i = disabled.indexOf(callback);
641
+ if (i != -1)
642
+ disabled.splice(i, 1);
643
+ }
644
+ };
645
+
646
+ EventEmitter.on =
647
+ EventEmitter.addEventListener = function(eventName, callback, capturing) {
648
+ this._eventRegistry = this._eventRegistry || {};
649
+
650
+ var listeners = this._eventRegistry[eventName];
651
+ if (!listeners)
652
+ listeners = this._eventRegistry[eventName] = [];
653
+
654
+ if (listeners.indexOf(callback) == -1)
655
+ listeners[capturing ? "unshift" : "push"](callback);
656
+ return callback;
657
+ };
658
+
659
+ EventEmitter.off =
660
+ EventEmitter.removeListener =
661
+ EventEmitter.removeEventListener = function(eventName, callback) {
662
+ this._eventRegistry = this._eventRegistry || {};
663
+
664
+ var listeners = this._eventRegistry[eventName];
665
+ if (!listeners)
666
+ return;
667
+
668
+ var index = listeners.indexOf(callback);
669
+ if (index !== -1)
670
+ listeners.splice(index, 1);
671
+ };
672
+
673
+ EventEmitter.removeAllListeners = function(eventName) {
674
+ if (!eventName) this._eventRegistry = this._defaultHandlers = undefined;
675
+ if (this._eventRegistry) this._eventRegistry[eventName] = undefined;
676
+ if (this._defaultHandlers) this._defaultHandlers[eventName] = undefined;
677
+ };
678
+
679
+ exports.EventEmitter = EventEmitter;
680
+
681
+ });
682
+
683
+ define("ace/anchor",[], function(require, exports, module) {
684
+ "use strict";
685
+
686
+ var oop = require("./lib/oop");
687
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
688
+
689
+ var Anchor = exports.Anchor = function(doc, row, column) {
690
+ this.$onChange = this.onChange.bind(this);
691
+ this.attach(doc);
692
+
693
+ if (typeof column == "undefined")
694
+ this.setPosition(row.row, row.column);
695
+ else
696
+ this.setPosition(row, column);
697
+ };
698
+
699
+ (function() {
700
+
701
+ oop.implement(this, EventEmitter);
702
+ this.getPosition = function() {
703
+ return this.$clipPositionToDocument(this.row, this.column);
704
+ };
705
+ this.getDocument = function() {
706
+ return this.document;
707
+ };
708
+ this.$insertRight = false;
709
+ this.onChange = function(delta) {
710
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
711
+ return;
712
+
713
+ if (delta.start.row > this.row)
714
+ return;
715
+
716
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
717
+ this.setPosition(point.row, point.column, true);
718
+ };
719
+
720
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
721
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
722
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
723
+ }
724
+
725
+ function $getTransformedPoint(delta, point, moveIfEqual) {
726
+ var deltaIsInsert = delta.action == "insert";
727
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
728
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
729
+ var deltaStart = delta.start;
730
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
731
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
732
+ return {
733
+ row: point.row,
734
+ column: point.column
735
+ };
736
+ }
737
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
738
+ return {
739
+ row: point.row + deltaRowShift,
740
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
741
+ };
742
+ }
743
+
744
+ return {
745
+ row: deltaStart.row,
746
+ column: deltaStart.column
747
+ };
748
+ }
749
+ this.setPosition = function(row, column, noClip) {
750
+ var pos;
751
+ if (noClip) {
752
+ pos = {
753
+ row: row,
754
+ column: column
755
+ };
756
+ } else {
757
+ pos = this.$clipPositionToDocument(row, column);
758
+ }
759
+
760
+ if (this.row == pos.row && this.column == pos.column)
761
+ return;
762
+
763
+ var old = {
764
+ row: this.row,
765
+ column: this.column
766
+ };
767
+
768
+ this.row = pos.row;
769
+ this.column = pos.column;
770
+ this._signal("change", {
771
+ old: old,
772
+ value: pos
773
+ });
774
+ };
775
+ this.detach = function() {
776
+ this.document.off("change", this.$onChange);
777
+ };
778
+ this.attach = function(doc) {
779
+ this.document = doc || this.document;
780
+ this.document.on("change", this.$onChange);
781
+ };
782
+ this.$clipPositionToDocument = function(row, column) {
783
+ var pos = {};
784
+
785
+ if (row >= this.document.getLength()) {
786
+ pos.row = Math.max(0, this.document.getLength() - 1);
787
+ pos.column = this.document.getLine(pos.row).length;
788
+ }
789
+ else if (row < 0) {
790
+ pos.row = 0;
791
+ pos.column = 0;
792
+ }
793
+ else {
794
+ pos.row = row;
795
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
796
+ }
797
+
798
+ if (column < 0)
799
+ pos.column = 0;
800
+
801
+ return pos;
802
+ };
803
+
804
+ }).call(Anchor.prototype);
805
+
806
+ });
807
+
808
+ define("ace/document",[], function(require, exports, module) {
809
+ "use strict";
810
+
811
+ var oop = require("./lib/oop");
812
+ var applyDelta = require("./apply_delta").applyDelta;
813
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
814
+ var Range = require("./range").Range;
815
+ var Anchor = require("./anchor").Anchor;
816
+
817
+ var Document = function(textOrLines) {
818
+ this.$lines = [""];
819
+ if (textOrLines.length === 0) {
820
+ this.$lines = [""];
821
+ } else if (Array.isArray(textOrLines)) {
822
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
823
+ } else {
824
+ this.insert({row: 0, column:0}, textOrLines);
825
+ }
826
+ };
827
+
828
+ (function() {
829
+
830
+ oop.implement(this, EventEmitter);
831
+ this.setValue = function(text) {
832
+ var len = this.getLength() - 1;
833
+ this.remove(new Range(0, 0, len, this.getLine(len).length));
834
+ this.insert({row: 0, column: 0}, text);
835
+ };
836
+ this.getValue = function() {
837
+ return this.getAllLines().join(this.getNewLineCharacter());
838
+ };
839
+ this.createAnchor = function(row, column) {
840
+ return new Anchor(this, row, column);
841
+ };
842
+ if ("aaa".split(/a/).length === 0) {
843
+ this.$split = function(text) {
844
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
845
+ };
846
+ } else {
847
+ this.$split = function(text) {
848
+ return text.split(/\r\n|\r|\n/);
849
+ };
850
+ }
851
+
852
+
853
+ this.$detectNewLine = function(text) {
854
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
855
+ this.$autoNewLine = match ? match[1] : "\n";
856
+ this._signal("changeNewLineMode");
857
+ };
858
+ this.getNewLineCharacter = function() {
859
+ switch (this.$newLineMode) {
860
+ case "windows":
861
+ return "\r\n";
862
+ case "unix":
863
+ return "\n";
864
+ default:
865
+ return this.$autoNewLine || "\n";
866
+ }
867
+ };
868
+
869
+ this.$autoNewLine = "";
870
+ this.$newLineMode = "auto";
871
+ this.setNewLineMode = function(newLineMode) {
872
+ if (this.$newLineMode === newLineMode)
873
+ return;
874
+
875
+ this.$newLineMode = newLineMode;
876
+ this._signal("changeNewLineMode");
877
+ };
878
+ this.getNewLineMode = function() {
879
+ return this.$newLineMode;
880
+ };
881
+ this.isNewLine = function(text) {
882
+ return (text == "\r\n" || text == "\r" || text == "\n");
883
+ };
884
+ this.getLine = function(row) {
885
+ return this.$lines[row] || "";
886
+ };
887
+ this.getLines = function(firstRow, lastRow) {
888
+ return this.$lines.slice(firstRow, lastRow + 1);
889
+ };
890
+ this.getAllLines = function() {
891
+ return this.getLines(0, this.getLength());
892
+ };
893
+ this.getLength = function() {
894
+ return this.$lines.length;
895
+ };
896
+ this.getTextRange = function(range) {
897
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
898
+ };
899
+ this.getLinesForRange = function(range) {
900
+ var lines;
901
+ if (range.start.row === range.end.row) {
902
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
903
+ } else {
904
+ lines = this.getLines(range.start.row, range.end.row);
905
+ lines[0] = (lines[0] || "").substring(range.start.column);
906
+ var l = lines.length - 1;
907
+ if (range.end.row - range.start.row == l)
908
+ lines[l] = lines[l].substring(0, range.end.column);
909
+ }
910
+ return lines;
911
+ };
912
+ this.insertLines = function(row, lines) {
913
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
914
+ return this.insertFullLines(row, lines);
915
+ };
916
+ this.removeLines = function(firstRow, lastRow) {
917
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
918
+ return this.removeFullLines(firstRow, lastRow);
919
+ };
920
+ this.insertNewLine = function(position) {
921
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
922
+ return this.insertMergedLines(position, ["", ""]);
923
+ };
924
+ this.insert = function(position, text) {
925
+ if (this.getLength() <= 1)
926
+ this.$detectNewLine(text);
927
+
928
+ return this.insertMergedLines(position, this.$split(text));
929
+ };
930
+ this.insertInLine = function(position, text) {
931
+ var start = this.clippedPos(position.row, position.column);
932
+ var end = this.pos(position.row, position.column + text.length);
933
+
934
+ this.applyDelta({
935
+ start: start,
936
+ end: end,
937
+ action: "insert",
938
+ lines: [text]
939
+ }, true);
940
+
941
+ return this.clonePos(end);
942
+ };
943
+
944
+ this.clippedPos = function(row, column) {
945
+ var length = this.getLength();
946
+ if (row === undefined) {
947
+ row = length;
948
+ } else if (row < 0) {
949
+ row = 0;
950
+ } else if (row >= length) {
951
+ row = length - 1;
952
+ column = undefined;
953
+ }
954
+ var line = this.getLine(row);
955
+ if (column == undefined)
956
+ column = line.length;
957
+ column = Math.min(Math.max(column, 0), line.length);
958
+ return {row: row, column: column};
959
+ };
960
+
961
+ this.clonePos = function(pos) {
962
+ return {row: pos.row, column: pos.column};
963
+ };
964
+
965
+ this.pos = function(row, column) {
966
+ return {row: row, column: column};
967
+ };
968
+
969
+ this.$clipPosition = function(position) {
970
+ var length = this.getLength();
971
+ if (position.row >= length) {
972
+ position.row = Math.max(0, length - 1);
973
+ position.column = this.getLine(length - 1).length;
974
+ } else {
975
+ position.row = Math.max(0, position.row);
976
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
977
+ }
978
+ return position;
979
+ };
980
+ this.insertFullLines = function(row, lines) {
981
+ row = Math.min(Math.max(row, 0), this.getLength());
982
+ var column = 0;
983
+ if (row < this.getLength()) {
984
+ lines = lines.concat([""]);
985
+ column = 0;
986
+ } else {
987
+ lines = [""].concat(lines);
988
+ row--;
989
+ column = this.$lines[row].length;
990
+ }
991
+ this.insertMergedLines({row: row, column: column}, lines);
992
+ };
993
+ this.insertMergedLines = function(position, lines) {
994
+ var start = this.clippedPos(position.row, position.column);
995
+ var end = {
996
+ row: start.row + lines.length - 1,
997
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
998
+ };
999
+
1000
+ this.applyDelta({
1001
+ start: start,
1002
+ end: end,
1003
+ action: "insert",
1004
+ lines: lines
1005
+ });
1006
+
1007
+ return this.clonePos(end);
1008
+ };
1009
+ this.remove = function(range) {
1010
+ var start = this.clippedPos(range.start.row, range.start.column);
1011
+ var end = this.clippedPos(range.end.row, range.end.column);
1012
+ this.applyDelta({
1013
+ start: start,
1014
+ end: end,
1015
+ action: "remove",
1016
+ lines: this.getLinesForRange({start: start, end: end})
1017
+ });
1018
+ return this.clonePos(start);
1019
+ };
1020
+ this.removeInLine = function(row, startColumn, endColumn) {
1021
+ var start = this.clippedPos(row, startColumn);
1022
+ var end = this.clippedPos(row, endColumn);
1023
+
1024
+ this.applyDelta({
1025
+ start: start,
1026
+ end: end,
1027
+ action: "remove",
1028
+ lines: this.getLinesForRange({start: start, end: end})
1029
+ }, true);
1030
+
1031
+ return this.clonePos(start);
1032
+ };
1033
+ this.removeFullLines = function(firstRow, lastRow) {
1034
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
1035
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
1036
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
1037
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
1038
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
1039
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
1040
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
1041
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
1042
+ var range = new Range(startRow, startCol, endRow, endCol);
1043
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
1044
+
1045
+ this.applyDelta({
1046
+ start: range.start,
1047
+ end: range.end,
1048
+ action: "remove",
1049
+ lines: this.getLinesForRange(range)
1050
+ });
1051
+ return deletedLines;
1052
+ };
1053
+ this.removeNewLine = function(row) {
1054
+ if (row < this.getLength() - 1 && row >= 0) {
1055
+ this.applyDelta({
1056
+ start: this.pos(row, this.getLine(row).length),
1057
+ end: this.pos(row + 1, 0),
1058
+ action: "remove",
1059
+ lines: ["", ""]
1060
+ });
1061
+ }
1062
+ };
1063
+ this.replace = function(range, text) {
1064
+ if (!(range instanceof Range))
1065
+ range = Range.fromPoints(range.start, range.end);
1066
+ if (text.length === 0 && range.isEmpty())
1067
+ return range.start;
1068
+ if (text == this.getTextRange(range))
1069
+ return range.end;
1070
+
1071
+ this.remove(range);
1072
+ var end;
1073
+ if (text) {
1074
+ end = this.insert(range.start, text);
1075
+ }
1076
+ else {
1077
+ end = range.start;
1078
+ }
1079
+
1080
+ return end;
1081
+ };
1082
+ this.applyDeltas = function(deltas) {
1083
+ for (var i=0; i<deltas.length; i++) {
1084
+ this.applyDelta(deltas[i]);
1085
+ }
1086
+ };
1087
+ this.revertDeltas = function(deltas) {
1088
+ for (var i=deltas.length-1; i>=0; i--) {
1089
+ this.revertDelta(deltas[i]);
1090
+ }
1091
+ };
1092
+ this.applyDelta = function(delta, doNotValidate) {
1093
+ var isInsert = delta.action == "insert";
1094
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
1095
+ : !Range.comparePoints(delta.start, delta.end)) {
1096
+ return;
1097
+ }
1098
+
1099
+ if (isInsert && delta.lines.length > 20000) {
1100
+ this.$splitAndapplyLargeDelta(delta, 20000);
1101
+ }
1102
+ else {
1103
+ applyDelta(this.$lines, delta, doNotValidate);
1104
+ this._signal("change", delta);
1105
+ }
1106
+ };
1107
+
1108
+ this.$safeApplyDelta = function(delta) {
1109
+ var docLength = this.$lines.length;
1110
+ if (
1111
+ delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
1112
+ || delta.action == "insert" && delta.start.row <= docLength
1113
+ ) {
1114
+ this.applyDelta(delta);
1115
+ }
1116
+ };
1117
+
1118
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
1119
+ var lines = delta.lines;
1120
+ var l = lines.length - MAX + 1;
1121
+ var row = delta.start.row;
1122
+ var column = delta.start.column;
1123
+ for (var from = 0, to = 0; from < l; from = to) {
1124
+ to += MAX - 1;
1125
+ var chunk = lines.slice(from, to);
1126
+ chunk.push("");
1127
+ this.applyDelta({
1128
+ start: this.pos(row + from, column),
1129
+ end: this.pos(row + to, column = 0),
1130
+ action: delta.action,
1131
+ lines: chunk
1132
+ }, true);
1133
+ }
1134
+ delta.lines = lines.slice(from);
1135
+ delta.start.row = row + from;
1136
+ delta.start.column = column;
1137
+ this.applyDelta(delta, true);
1138
+ };
1139
+ this.revertDelta = function(delta) {
1140
+ this.$safeApplyDelta({
1141
+ start: this.clonePos(delta.start),
1142
+ end: this.clonePos(delta.end),
1143
+ action: (delta.action == "insert" ? "remove" : "insert"),
1144
+ lines: delta.lines.slice()
1145
+ });
1146
+ };
1147
+ this.indexToPosition = function(index, startRow) {
1148
+ var lines = this.$lines || this.getAllLines();
1149
+ var newlineLength = this.getNewLineCharacter().length;
1150
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
1151
+ index -= lines[i].length + newlineLength;
1152
+ if (index < 0)
1153
+ return {row: i, column: index + lines[i].length + newlineLength};
1154
+ }
1155
+ return {row: l-1, column: index + lines[l-1].length + newlineLength};
1156
+ };
1157
+ this.positionToIndex = function(pos, startRow) {
1158
+ var lines = this.$lines || this.getAllLines();
1159
+ var newlineLength = this.getNewLineCharacter().length;
1160
+ var index = 0;
1161
+ var row = Math.min(pos.row, lines.length);
1162
+ for (var i = startRow || 0; i < row; ++i)
1163
+ index += lines[i].length + newlineLength;
1164
+
1165
+ return index + pos.column;
1166
+ };
1167
+
1168
+ }).call(Document.prototype);
1169
+
1170
+ exports.Document = Document;
1171
+ });
1172
+
1173
+ define("ace/lib/lang",[], function(require, exports, module) {
1174
+ "use strict";
1175
+
1176
+ exports.last = function(a) {
1177
+ return a[a.length - 1];
1178
+ };
1179
+
1180
+ exports.stringReverse = function(string) {
1181
+ return string.split("").reverse().join("");
1182
+ };
1183
+
1184
+ exports.stringRepeat = function (string, count) {
1185
+ var result = '';
1186
+ while (count > 0) {
1187
+ if (count & 1)
1188
+ result += string;
1189
+
1190
+ if (count >>= 1)
1191
+ string += string;
1192
+ }
1193
+ return result;
1194
+ };
1195
+
1196
+ var trimBeginRegexp = /^\s\s*/;
1197
+ var trimEndRegexp = /\s\s*$/;
1198
+
1199
+ exports.stringTrimLeft = function (string) {
1200
+ return string.replace(trimBeginRegexp, '');
1201
+ };
1202
+
1203
+ exports.stringTrimRight = function (string) {
1204
+ return string.replace(trimEndRegexp, '');
1205
+ };
1206
+
1207
+ exports.copyObject = function(obj) {
1208
+ var copy = {};
1209
+ for (var key in obj) {
1210
+ copy[key] = obj[key];
1211
+ }
1212
+ return copy;
1213
+ };
1214
+
1215
+ exports.copyArray = function(array){
1216
+ var copy = [];
1217
+ for (var i=0, l=array.length; i<l; i++) {
1218
+ if (array[i] && typeof array[i] == "object")
1219
+ copy[i] = this.copyObject(array[i]);
1220
+ else
1221
+ copy[i] = array[i];
1222
+ }
1223
+ return copy;
1224
+ };
1225
+
1226
+ exports.deepCopy = function deepCopy(obj) {
1227
+ if (typeof obj !== "object" || !obj)
1228
+ return obj;
1229
+ var copy;
1230
+ if (Array.isArray(obj)) {
1231
+ copy = [];
1232
+ for (var key = 0; key < obj.length; key++) {
1233
+ copy[key] = deepCopy(obj[key]);
1234
+ }
1235
+ return copy;
1236
+ }
1237
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
1238
+ return obj;
1239
+
1240
+ copy = {};
1241
+ for (var key in obj)
1242
+ copy[key] = deepCopy(obj[key]);
1243
+ return copy;
1244
+ };
1245
+
1246
+ exports.arrayToMap = function(arr) {
1247
+ var map = {};
1248
+ for (var i=0; i<arr.length; i++) {
1249
+ map[arr[i]] = 1;
1250
+ }
1251
+ return map;
1252
+
1253
+ };
1254
+
1255
+ exports.createMap = function(props) {
1256
+ var map = Object.create(null);
1257
+ for (var i in props) {
1258
+ map[i] = props[i];
1259
+ }
1260
+ return map;
1261
+ };
1262
+ exports.arrayRemove = function(array, value) {
1263
+ for (var i = 0; i <= array.length; i++) {
1264
+ if (value === array[i]) {
1265
+ array.splice(i, 1);
1266
+ }
1267
+ }
1268
+ };
1269
+
1270
+ exports.escapeRegExp = function(str) {
1271
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
1272
+ };
1273
+
1274
+ exports.escapeHTML = function(str) {
1275
+ return ("" + str).replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
1276
+ };
1277
+
1278
+ exports.getMatchOffsets = function(string, regExp) {
1279
+ var matches = [];
1280
+
1281
+ string.replace(regExp, function(str) {
1282
+ matches.push({
1283
+ offset: arguments[arguments.length-2],
1284
+ length: str.length
1285
+ });
1286
+ });
1287
+
1288
+ return matches;
1289
+ };
1290
+ exports.deferredCall = function(fcn) {
1291
+ var timer = null;
1292
+ var callback = function() {
1293
+ timer = null;
1294
+ fcn();
1295
+ };
1296
+
1297
+ var deferred = function(timeout) {
1298
+ deferred.cancel();
1299
+ timer = setTimeout(callback, timeout || 0);
1300
+ return deferred;
1301
+ };
1302
+
1303
+ deferred.schedule = deferred;
1304
+
1305
+ deferred.call = function() {
1306
+ this.cancel();
1307
+ fcn();
1308
+ return deferred;
1309
+ };
1310
+
1311
+ deferred.cancel = function() {
1312
+ clearTimeout(timer);
1313
+ timer = null;
1314
+ return deferred;
1315
+ };
1316
+
1317
+ deferred.isPending = function() {
1318
+ return timer;
1319
+ };
1320
+
1321
+ return deferred;
1322
+ };
1323
+
1324
+
1325
+ exports.delayedCall = function(fcn, defaultTimeout) {
1326
+ var timer = null;
1327
+ var callback = function() {
1328
+ timer = null;
1329
+ fcn();
1330
+ };
1331
+
1332
+ var _self = function(timeout) {
1333
+ if (timer == null)
1334
+ timer = setTimeout(callback, timeout || defaultTimeout);
1335
+ };
1336
+
1337
+ _self.delay = function(timeout) {
1338
+ timer && clearTimeout(timer);
1339
+ timer = setTimeout(callback, timeout || defaultTimeout);
1340
+ };
1341
+ _self.schedule = _self;
1342
+
1343
+ _self.call = function() {
1344
+ this.cancel();
1345
+ fcn();
1346
+ };
1347
+
1348
+ _self.cancel = function() {
1349
+ timer && clearTimeout(timer);
1350
+ timer = null;
1351
+ };
1352
+
1353
+ _self.isPending = function() {
1354
+ return timer;
1355
+ };
1356
+
1357
+ return _self;
1358
+ };
1359
+ });
1360
+
1361
+ define("ace/worker/mirror",[], function(require, exports, module) {
1362
+ "use strict";
1363
+
1364
+ var Range = require("../range").Range;
1365
+ var Document = require("../document").Document;
1366
+ var lang = require("../lib/lang");
1367
+
1368
+ var Mirror = exports.Mirror = function(sender) {
1369
+ this.sender = sender;
1370
+ var doc = this.doc = new Document("");
1371
+
1372
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
1373
+
1374
+ var _self = this;
1375
+ sender.on("change", function(e) {
1376
+ var data = e.data;
1377
+ if (data[0].start) {
1378
+ doc.applyDeltas(data);
1379
+ } else {
1380
+ for (var i = 0; i < data.length; i += 2) {
1381
+ if (Array.isArray(data[i+1])) {
1382
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
1383
+ } else {
1384
+ var d = {action: "remove", start: data[i], end: data[i+1]};
1385
+ }
1386
+ doc.applyDelta(d, true);
1387
+ }
1388
+ }
1389
+ if (_self.$timeout)
1390
+ return deferredUpdate.schedule(_self.$timeout);
1391
+ _self.onUpdate();
1392
+ });
1393
+ };
1394
+
1395
+ (function() {
1396
+
1397
+ this.$timeout = 500;
1398
+
1399
+ this.setTimeout = function(timeout) {
1400
+ this.$timeout = timeout;
1401
+ };
1402
+
1403
+ this.setValue = function(value) {
1404
+ this.doc.setValue(value);
1405
+ this.deferredUpdate.schedule(this.$timeout);
1406
+ };
1407
+
1408
+ this.getValue = function(callbackId) {
1409
+ this.sender.callback(this.doc.getValue(), callbackId);
1410
+ };
1411
+
1412
+ this.onUpdate = function() {
1413
+ };
1414
+
1415
+ this.isPending = function() {
1416
+ return this.deferredUpdate.isPending();
1417
+ };
1418
+
1419
+ }).call(Mirror.prototype);
1420
+
1421
+ });