gollum 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gollum might be problematic. Click here for more details.

Files changed (454) hide show
  1. data/README.md +44 -7
  2. data/Rakefile +1 -1
  3. data/bin/gollum +20 -1
  4. data/gollum.gemspec +400 -5
  5. data/lib/gollum.rb +2 -1
  6. data/lib/gollum/blob_entry.rb +13 -1
  7. data/lib/gollum/committer.rb +10 -1
  8. data/lib/gollum/file.rb +15 -2
  9. data/lib/gollum/file_view.rb +145 -0
  10. data/lib/gollum/frontend/app.rb +217 -69
  11. data/lib/gollum/frontend/helpers.rb +21 -0
  12. data/lib/gollum/frontend/public/gollum/css/_styles.css +121 -0
  13. data/lib/gollum/frontend/public/gollum/css/editor.css +17 -8
  14. data/lib/gollum/frontend/public/gollum/css/gollum.css +440 -402
  15. data/lib/gollum/frontend/public/gollum/css/template.css +540 -289
  16. data/lib/gollum/frontend/public/gollum/images/dirty-shade.png +0 -0
  17. data/lib/gollum/frontend/public/gollum/images/fileview/document.png +0 -0
  18. data/lib/gollum/frontend/public/gollum/images/fileview/folder-horizontal.png +0 -0
  19. data/lib/gollum/frontend/public/gollum/images/fileview/toggle-small-expand.png +0 -0
  20. data/lib/gollum/frontend/public/gollum/images/fileview/toggle-small.png +0 -0
  21. data/lib/gollum/frontend/public/gollum/images/para.png +0 -0
  22. data/lib/gollum/frontend/public/gollum/images/pin-16.png +0 -0
  23. data/lib/gollum/frontend/public/gollum/images/pin-20.png +0 -0
  24. data/lib/gollum/frontend/public/gollum/images/pin-24.png +0 -0
  25. data/lib/gollum/frontend/public/gollum/images/pin-32.png +0 -0
  26. data/lib/gollum/frontend/public/gollum/javascript/editor/gollum.editor.js +31 -7
  27. data/lib/gollum/frontend/public/gollum/javascript/editor/langs/asciidoc.js +2 -1
  28. data/lib/gollum/frontend/public/gollum/javascript/editor/langs/creole.js +2 -1
  29. data/lib/gollum/frontend/public/gollum/javascript/editor/langs/markdown.js +18 -6
  30. data/lib/gollum/frontend/public/gollum/javascript/editor/langs/org.js +2 -1
  31. data/lib/gollum/frontend/public/gollum/javascript/editor/langs/pod.js +2 -1
  32. data/lib/gollum/frontend/public/gollum/javascript/editor/langs/textile.js +2 -1
  33. data/lib/gollum/frontend/public/gollum/javascript/gollum.dialog.js +3 -0
  34. data/lib/gollum/frontend/public/gollum/javascript/gollum.js +78 -16
  35. data/lib/gollum/frontend/public/gollum/javascript/jquery-1.7.2.min.js +4 -0
  36. data/lib/gollum/frontend/public/gollum/javascript/mousetrap.min.js +8 -0
  37. data/lib/gollum/frontend/public/gollum/livepreview/css/custom.css +107 -0
  38. data/lib/gollum/frontend/public/gollum/livepreview/images/cancel_24.png +0 -0
  39. data/lib/gollum/frontend/public/gollum/livepreview/images/lr_24.png +0 -0
  40. data/lib/gollum/frontend/public/gollum/livepreview/images/save_24.png +0 -0
  41. data/lib/gollum/frontend/public/gollum/livepreview/images/savecomment_24.png +0 -0
  42. data/lib/gollum/frontend/public/gollum/livepreview/index.html +46 -0
  43. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ace.js +103 -0
  44. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor.js +254 -0
  45. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +184 -0
  46. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +261 -0
  47. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +92 -0
  48. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +121 -0
  49. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +193 -0
  50. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +460 -0
  51. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +101 -0
  52. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config.js +124 -0
  53. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/css/codefolding-fold-button-states.png +0 -0
  54. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +327 -0
  55. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/css/expand-marker.png +0 -0
  56. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document.js +617 -0
  57. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document_test.js +314 -0
  58. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +2419 -0
  59. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +252 -0
  60. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +116 -0
  61. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +276 -0
  62. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +759 -0
  63. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +981 -0
  64. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor.js +2163 -0
  65. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_change_document_test.js +195 -0
  66. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +231 -0
  67. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_navigation_test.js +171 -0
  68. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +562 -0
  69. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static.css +22 -0
  70. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +98 -0
  71. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +81 -0
  72. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +536 -0
  73. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +367 -0
  74. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +170 -0
  75. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +143 -0
  76. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +257 -0
  77. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +315 -0
  78. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +122 -0
  79. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +556 -0
  80. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/aliases.js +101 -0
  81. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +611 -0
  82. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +193 -0
  83. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +134 -0
  84. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/registers.js +49 -0
  85. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +202 -0
  86. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +187 -0
  87. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +214 -0
  88. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +595 -0
  89. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +106 -0
  90. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/browser_focus.js +105 -0
  91. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +292 -0
  92. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +1059 -0
  93. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +317 -0
  94. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +121 -0
  95. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter_test.js +72 -0
  96. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/fixoldbrowsers.js +19 -0
  97. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +129 -0
  98. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +164 -0
  99. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +62 -0
  100. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +61 -0
  101. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/regexp.js +113 -0
  102. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +105 -0
  103. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour.js +98 -0
  104. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +225 -0
  105. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +98 -0
  106. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +113 -0
  107. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +68 -0
  108. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +74 -0
  109. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +66 -0
  110. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +132 -0
  111. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +180 -0
  112. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +121 -0
  113. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +235 -0
  114. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +121 -0
  115. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +63 -0
  116. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +100 -0
  117. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +739 -0
  118. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +2756 -0
  119. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +603 -0
  120. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +68 -0
  121. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +342 -0
  122. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +154 -0
  123. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +227 -0
  124. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +72 -0
  125. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +92 -0
  126. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +71 -0
  127. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +135 -0
  128. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +74 -0
  129. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/csharp.js +58 -0
  130. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +104 -0
  131. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +110 -0
  132. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +9014 -0
  133. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +242 -0
  134. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules_test.js +99 -0
  135. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +85 -0
  136. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +66 -0
  137. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker_test.js +75 -0
  138. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +58 -0
  139. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +108 -0
  140. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +93 -0
  141. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +83 -0
  142. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee.js +127 -0
  143. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee_test.js +108 -0
  144. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +95 -0
  145. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +92 -0
  146. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/diff.js +76 -0
  147. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +115 -0
  148. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +86 -0
  149. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +169 -0
  150. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +88 -0
  151. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic.js +65 -0
  152. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic_test.js +105 -0
  153. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +262 -0
  154. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml_test.js +117 -0
  155. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +81 -0
  156. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +129 -0
  157. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/groovy.js +24 -0
  158. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +183 -0
  159. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +58 -0
  160. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +104 -0
  161. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +83 -0
  162. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +159 -0
  163. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +93 -0
  164. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +74 -0
  165. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/java.js +25 -0
  166. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +144 -0
  167. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +164 -0
  168. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +471 -0
  169. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +225 -0
  170. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +165 -0
  171. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +88 -0
  172. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +99 -0
  173. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +100 -0
  174. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json/json_parse.js +346 -0
  175. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +111 -0
  176. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +103 -0
  177. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +108 -0
  178. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsx.js +53 -0
  179. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsx_highlight_rules.js +122 -0
  180. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +57 -0
  181. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +38 -0
  182. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +87 -0
  183. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +279 -0
  184. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +116 -0
  185. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +220 -0
  186. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules_test.js +91 -0
  187. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +87 -0
  188. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +436 -0
  189. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/luapage.js +22 -0
  190. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/luapage_highlight_rules.js +42 -0
  191. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +81 -0
  192. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +195 -0
  193. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +81 -0
  194. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_parens_outdent.js +81 -0
  195. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +103 -0
  196. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +355 -0
  197. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +117 -0
  198. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +168 -0
  199. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +78 -0
  200. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +583 -0
  201. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +119 -0
  202. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +1165 -0
  203. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/powershell.js +58 -0
  204. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +138 -0
  205. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +147 -0
  206. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +182 -0
  207. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_test.js +86 -0
  208. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +116 -0
  209. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +194 -0
  210. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +116 -0
  211. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +132 -0
  212. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +168 -0
  213. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scala.js +25 -0
  214. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +179 -0
  215. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +86 -0
  216. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +304 -0
  217. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +144 -0
  218. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +145 -0
  219. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +70 -0
  220. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +89 -0
  221. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +78 -0
  222. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +71 -0
  223. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +159 -0
  224. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +109 -0
  225. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +71 -0
  226. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +73 -0
  227. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile_highlight_rules.js +100 -0
  228. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +65 -0
  229. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +109 -0
  230. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +103 -0
  231. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +82 -0
  232. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +120 -0
  233. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +202 -0
  234. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Position.js +59 -0
  235. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Readme.md +6 -0
  236. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/StringLexer.js +1686 -0
  237. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XMLLexer.js +2993 -0
  238. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTLexer.js +69 -0
  239. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTParser.js +63 -0
  240. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryLexer.js +10363 -0
  241. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +42525 -0
  242. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQuerySemanticHighlighter.js +165 -0
  243. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/antlr3-all.js +6177 -0
  244. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery.js +55 -0
  245. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +158 -0
  246. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +86 -0
  247. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +64 -0
  248. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +116 -0
  249. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/model/editor.js +70 -0
  250. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +73 -0
  251. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +354 -0
  252. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +105 -0
  253. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +71 -0
  254. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +140 -0
  255. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +158 -0
  256. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +163 -0
  257. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +762 -0
  258. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +171 -0
  259. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/definitions.js +696 -0
  260. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/lexer.js +598 -0
  261. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/options.js +61 -0
  262. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/parser.js +2072 -0
  263. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +278 -0
  264. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +164 -0
  265. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range.js +581 -0
  266. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list.js +230 -0
  267. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +170 -0
  268. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_test.js +198 -0
  269. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +93 -0
  270. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +58 -0
  271. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +142 -0
  272. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search.js +398 -0
  273. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +87 -0
  274. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_test.js +451 -0
  275. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection.js +886 -0
  276. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +472 -0
  277. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/split.js +411 -0
  278. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all.js +42 -0
  279. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +136 -0
  280. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/assertions.js +63 -0
  281. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/assert.js +313 -0
  282. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/async.js +529 -0
  283. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/index.js +13 -0
  284. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/test.js +195 -0
  285. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/utils.js +65 -0
  286. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/benchmark.js +85 -0
  287. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/mockdom.js +10 -0
  288. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +204 -0
  289. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/tests.html +46 -0
  290. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +159 -0
  291. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.js +46 -0
  292. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +118 -0
  293. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +46 -0
  294. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +119 -0
  295. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +46 -0
  296. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +145 -0
  297. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +46 -0
  298. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +151 -0
  299. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.js +46 -0
  300. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +149 -0
  301. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +46 -0
  302. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +182 -0
  303. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.js +45 -0
  304. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +102 -0
  305. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.js +48 -0
  306. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +133 -0
  307. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.js +46 -0
  308. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +137 -0
  309. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +46 -0
  310. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +140 -0
  311. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +46 -0
  312. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +140 -0
  313. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +46 -0
  314. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +146 -0
  315. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +46 -0
  316. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +148 -0
  317. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +46 -0
  318. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +145 -0
  319. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +46 -0
  320. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +150 -0
  321. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +46 -0
  322. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +131 -0
  323. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +46 -0
  324. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +130 -0
  325. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +46 -0
  326. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +165 -0
  327. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.js +47 -0
  328. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +164 -0
  329. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +46 -0
  330. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +164 -0
  331. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +46 -0
  332. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +164 -0
  333. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +46 -0
  334. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +164 -0
  335. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +46 -0
  336. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +160 -0
  337. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +46 -0
  338. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +162 -0
  339. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +46 -0
  340. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +141 -0
  341. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +46 -0
  342. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +162 -0
  343. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator_test.js +219 -0
  344. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +195 -0
  345. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +142 -0
  346. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/unicode.js +107 -0
  347. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +1402 -0
  348. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer_test.js +93 -0
  349. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jshint.js +4469 -0
  350. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jslint.js +6396 -0
  351. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/mirror.js +43 -0
  352. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +138 -0
  353. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +176 -0
  354. data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker_sourcemint.js +73 -0
  355. data/lib/gollum/frontend/public/gollum/livepreview/js/jquery.ba-throttle-debounce.min.js +2 -0
  356. data/lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js +456 -0
  357. data/lib/gollum/frontend/public/gollum/livepreview/js/md_sundown.js +22 -0
  358. data/lib/gollum/frontend/public/gollum/livepreview/js/requirejs.min.js +35 -0
  359. data/lib/gollum/frontend/public/gollum/livepreview/js/sundown.js +1 -0
  360. data/lib/gollum/frontend/public/gollum/livepreview/licenses/ace/LICENSE.txt +476 -0
  361. data/lib/gollum/frontend/public/gollum/livepreview/licenses/bootstraponline_gollum/LICENSE.txt +9 -0
  362. data/lib/gollum/frontend/public/gollum/livepreview/licenses/debounce/LICENSE-MIT.txt +22 -0
  363. data/lib/gollum/frontend/public/gollum/livepreview/licenses/gollum/LICENSE.txt +21 -0
  364. data/lib/gollum/frontend/public/gollum/livepreview/licenses/jquery/MIT-LICENSE.txt +20 -0
  365. data/lib/gollum/frontend/public/gollum/livepreview/licenses/licenses.txt +59 -0
  366. data/lib/gollum/frontend/public/gollum/livepreview/licenses/notepages/LICENSE.txt +19 -0
  367. data/lib/gollum/frontend/public/gollum/livepreview/licenses/requirejs/LICENSE.txt +58 -0
  368. data/lib/gollum/frontend/public/gollum/livepreview/licenses/retina_display_icon_set/by_sa_3.0_unported_legalcode.txt +359 -0
  369. data/lib/gollum/frontend/public/gollum/livepreview/licenses/sizzle/LICENSE.txt +148 -0
  370. data/lib/gollum/frontend/public/gollum/livepreview/licenses/sundown/sundown.txt +4 -0
  371. data/lib/gollum/frontend/public/gollum/livepreview/readme.md +44 -0
  372. data/lib/gollum/frontend/templates/compare.mustache +9 -9
  373. data/lib/gollum/frontend/templates/create.mustache +4 -1
  374. data/lib/gollum/frontend/templates/edit.mustache +6 -3
  375. data/lib/gollum/frontend/templates/editor.mustache +30 -14
  376. data/lib/gollum/frontend/templates/file_view.mustache +32 -0
  377. data/lib/gollum/frontend/templates/history.mustache +8 -8
  378. data/lib/gollum/frontend/templates/layout.mustache +21 -14
  379. data/lib/gollum/frontend/templates/page.mustache +37 -14
  380. data/lib/gollum/frontend/templates/pages.mustache +14 -10
  381. data/lib/gollum/frontend/templates/search.mustache +2 -2
  382. data/lib/gollum/frontend/templates/searchbar.mustache +1 -1
  383. data/lib/gollum/frontend/uri_encode_component.rb +172 -0
  384. data/lib/gollum/frontend/views/compare.rb +2 -4
  385. data/lib/gollum/frontend/views/create.rb +5 -0
  386. data/lib/gollum/frontend/views/edit.rb +12 -0
  387. data/lib/gollum/frontend/views/file_view.rb +19 -0
  388. data/lib/gollum/frontend/views/has_page.rb +15 -0
  389. data/lib/gollum/frontend/views/history.rb +8 -4
  390. data/lib/gollum/frontend/views/layout.rb +9 -1
  391. data/lib/gollum/frontend/views/page.rb +37 -10
  392. data/lib/gollum/frontend/views/pages.rb +48 -0
  393. data/lib/gollum/git_access.rb +2 -2
  394. data/lib/gollum/markup.rb +115 -19
  395. data/lib/gollum/page.rb +79 -9
  396. data/lib/gollum/tex.rb +319 -42
  397. data/lib/gollum/wiki.rb +92 -12
  398. data/licenses/css_tree_menu_thecssninja/license.txt +50 -0
  399. data/licenses/licenses.txt +23 -0
  400. data/licenses/unity_asset_pool/COPYRIGHT +286 -0
  401. data/test/examples/lotr.git/config +1 -1
  402. data/test/examples/lotr.git/logs/HEAD +4 -0
  403. data/test/examples/lotr.git/logs/refs/heads/master +4 -0
  404. data/test/examples/lotr.git/objects/0d/c9016ca928c78d5421a99a53b379b53929221e +0 -0
  405. data/test/examples/lotr.git/objects/1c/79ddc69707f7b164bc2ea58beb5d8965ff6bd0 +0 -0
  406. data/test/examples/lotr.git/objects/27/680b0fce1abfbc528e7aa53d92645852d52eb6 +0 -0
  407. data/test/examples/lotr.git/objects/45/3b250f979c7bd6dfb62640c944c982ae6721ee +0 -0
  408. data/test/examples/lotr.git/objects/45/f319ee12f2b551b901b22e72602963c366fff1 +0 -0
  409. data/test/examples/lotr.git/objects/46/a697caf435815bb07bbce947fc2d58be15f087 +0 -0
  410. data/test/examples/lotr.git/objects/4c/45c2b4e297a726c3d3f66886f35373e48fe1c5 +2 -0
  411. data/test/examples/lotr.git/objects/4e/023f460ce466e154ca09d8774c79ad5a53fc15 +0 -0
  412. data/test/examples/lotr.git/objects/62/9aa678272b017a4d136d35e77ac94d80b08dc2 +1 -0
  413. data/test/examples/lotr.git/objects/6e/48abfc56565574859e081ee58eae655d48cf71 +0 -0
  414. data/test/examples/lotr.git/objects/7b/60c5a20a501a70f2317fa0ef763e1e2ce22d6b +0 -0
  415. data/test/examples/lotr.git/objects/7d/981cd984ad589e3cf00d8122170c6f7d685979 +0 -0
  416. data/test/examples/lotr.git/objects/94/9a9cc3119b9c98817f375e976d2bb5e2a42809 +0 -0
  417. data/test/examples/lotr.git/objects/9b/e95b960ac388d4e7db55f610f828e9c31344e6 +0 -0
  418. data/test/examples/lotr.git/objects/b0/de6e794dfdc7ef3400e894225bfe23308aae5c +0 -0
  419. data/test/examples/lotr.git/objects/b1/6b3d9fad9d78e5a669e7f33d94c96da374eccd +0 -0
  420. data/test/examples/lotr.git/objects/c9/6a7645db5d4c76389e77cd103ef3ed77d81e4c +0 -0
  421. data/test/examples/lotr.git/objects/ca/7355dc497e9729fbaf0c0e3f424b86afef5614 +0 -0
  422. data/test/examples/lotr.git/objects/cf/ea406f5f77afc7fb673a43e97721234385b1bd +2 -0
  423. data/test/examples/lotr.git/objects/d5/29304506d37f544675244c335d85cab5d29966 +0 -0
  424. data/test/examples/lotr.git/objects/fb/c5dd7d807707b4a0a97c1182fecfef1eced5df +1 -0
  425. data/test/examples/lotr.git/objects/fc/3eee516ff72dc9099ba00d4611eb02e5c9e634 +0 -0
  426. data/test/examples/lotr.git/objects/ff/6f7de62644369380ba73b4e4297c1a2d6f0b66 +0 -0
  427. data/test/examples/lotr.git/refs/heads/master +1 -1
  428. data/test/examples/revert.git/COMMIT_EDITMSG +1 -1
  429. data/test/examples/revert.git/index +0 -0
  430. data/test/examples/revert.git/logs/HEAD +1 -0
  431. data/test/examples/revert.git/logs/refs/heads/master +1 -0
  432. data/test/examples/revert.git/objects/10/2685c42018f802557f05db171f44443e8dacab +0 -0
  433. data/test/examples/revert.git/objects/8e/83f898e5e16ae400db59dda1017acad540f3aa +0 -0
  434. data/test/examples/revert.git/objects/ed/6c9f63b98acf73c25b5ffbb38da557d3682023 +3 -0
  435. data/test/examples/revert.git/refs/heads/master +1 -1
  436. data/test/file_view/1_file.txt +3 -0
  437. data/test/file_view/1_file_1_folder.txt +8 -0
  438. data/test/file_view/1_folder.txt +8 -0
  439. data/test/file_view/2_files_2_folders.txt +12 -0
  440. data/test/file_view/2_files_2_folders_1_root.txt +13 -0
  441. data/test/file_view/nested_folders.txt +28 -0
  442. data/test/test_app.rb +162 -12
  443. data/test/test_app_helpers.rb +13 -0
  444. data/test/test_committer.rb +1 -1
  445. data/test/test_file_view.rb +102 -0
  446. data/test/test_git_access.rb +3 -2
  447. data/test/test_markup.rb +45 -12
  448. data/test/test_page.rb +65 -1
  449. data/test/test_page_revert.rb +14 -2
  450. data/test/test_pages_view.rb +37 -0
  451. data/test/test_unicode.rb +110 -0
  452. data/test/test_wiki.rb +51 -4
  453. metadata +658 -239
  454. data/lib/gollum/frontend/public/gollum/javascript/jquery.js +0 -7179
@@ -0,0 +1,195 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3
+ *
4
+ * The contents of this file are subject to the Mozilla Public License Version
5
+ * 1.1 (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ * http://www.mozilla.org/MPL/
8
+ *
9
+ * Software distributed under the License is distributed on an "AS IS" basis,
10
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
+ * for the specific language governing rights and limitations under the
12
+ * License.
13
+ *
14
+ * The Original Code is Ajax.org Code Editor (ACE).
15
+ *
16
+ * The Initial Developer of the Original Code is
17
+ * Ajax.org B.V.
18
+ * Portions created by the Initial Developer are Copyright (C) 2010
19
+ * the Initial Developer. All Rights Reserved.
20
+ *
21
+ * Contributor(s):
22
+ * Fabian Jakobs <fabian AT ajax DOT org>
23
+ *
24
+ * Alternatively, the contents of this file may be used under the terms of
25
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
26
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
+ * in which case the provisions of the GPL or the LGPL are applicable instead
28
+ * of those above. If you wish to allow use of your version of this file only
29
+ * under the terms of either the GPL or the LGPL, and not to allow others to
30
+ * use your version of this file under the terms of the MPL, indicate your
31
+ * decision by deleting the provisions above and replace them with the notice
32
+ * and other provisions required by the GPL or the LGPL. If you do not delete
33
+ * the provisions above, a recipient may use your version of this file under
34
+ * the terms of any one of the MPL, the GPL or the LGPL.
35
+ *
36
+ * ***** END LICENSE BLOCK ***** */
37
+
38
+ define(function(require, exports, module) {
39
+ "use strict";
40
+
41
+ /**
42
+ * class Tokenizer
43
+ *
44
+ * This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see [the wiki on extending highlighters](https://github.com/ajaxorg/ace/wiki/Creating-or-Extending-an-Edit-Mode#wiki-extendingTheHighlighter).
45
+ *
46
+ **/
47
+
48
+ /**
49
+ * new Tokenizer(rules, flag)
50
+ * - rules (Object): The highlighting rules
51
+ * - flag (String): Any additional regular expression flags to pass (like "i" for case insensitive)
52
+ *
53
+ * Constructs a new tokenizer based on the given rules and flags.
54
+ *
55
+ **/
56
+ var Tokenizer = function(rules, flag) {
57
+ flag = flag ? "g" + flag : "g";
58
+ this.rules = rules;
59
+
60
+ this.regExps = {};
61
+ this.matchMappings = {};
62
+ for ( var key in this.rules) {
63
+ var rule = this.rules[key];
64
+ var state = rule;
65
+ var ruleRegExps = [];
66
+ var matchTotal = 0;
67
+ var mapping = this.matchMappings[key] = {};
68
+
69
+ for ( var i = 0; i < state.length; i++) {
70
+
71
+ if (state[i].regex instanceof RegExp)
72
+ state[i].regex = state[i].regex.toString().slice(1, -1);
73
+
74
+ // Count number of matching groups. 2 extra groups from the full match
75
+ // And the catch-all on the end (used to force a match);
76
+ var matchcount = new RegExp("(?:(" + state[i].regex + ")|(.))").exec("a").length - 2;
77
+
78
+ // Replace any backreferences and offset appropriately.
79
+ var adjustedregex = state[i].regex.replace(/\\([0-9]+)/g, function (match, digit) {
80
+ return "\\" + (parseInt(digit, 10) + matchTotal + 1);
81
+ });
82
+
83
+ if (matchcount > 1 && state[i].token.length !== matchcount-1)
84
+ throw new Error("Matching groups and length of the token array don't match in rule #" + i + " of state " + key);
85
+
86
+ mapping[matchTotal] = {
87
+ rule: i,
88
+ len: matchcount
89
+ };
90
+ matchTotal += matchcount;
91
+
92
+ ruleRegExps.push(adjustedregex);
93
+ }
94
+
95
+ this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", flag);
96
+ }
97
+ };
98
+
99
+ (function() {
100
+
101
+ /**
102
+ * Tokenizer.getLineTokens() -> Object
103
+ *
104
+ * Returns an object containing two properties: `tokens`, which contains all the tokens; and `state`, the current state.
105
+ **/
106
+ this.getLineTokens = function(line, startState) {
107
+ var currentState = startState || "start";
108
+ var state = this.rules[currentState];
109
+ var mapping = this.matchMappings[currentState];
110
+ var re = this.regExps[currentState];
111
+ re.lastIndex = 0;
112
+
113
+ var match, tokens = [];
114
+
115
+ var lastIndex = 0;
116
+
117
+ var token = {
118
+ type: null,
119
+ value: ""
120
+ };
121
+
122
+ while (match = re.exec(line)) {
123
+ var type = "text";
124
+ var rule = null;
125
+ var value = [match[0]];
126
+
127
+ for (var i = 0; i < match.length-2; i++) {
128
+ if (match[i + 1] === undefined)
129
+ continue;
130
+
131
+ rule = state[mapping[i].rule];
132
+
133
+ if (mapping[i].len > 1)
134
+ value = match.slice(i+2, i+1+mapping[i].len);
135
+
136
+ // compute token type
137
+ if (typeof rule.token == "function")
138
+ type = rule.token.apply(this, value);
139
+ else
140
+ type = rule.token;
141
+
142
+ if (rule.next) {
143
+ currentState = rule.next;
144
+ state = this.rules[currentState];
145
+ mapping = this.matchMappings[currentState];
146
+ lastIndex = re.lastIndex;
147
+
148
+ re = this.regExps[currentState];
149
+ re.lastIndex = lastIndex;
150
+ }
151
+ break;
152
+ }
153
+
154
+ if (value[0]) {
155
+ if (typeof type == "string") {
156
+ value = [value.join("")];
157
+ type = [type];
158
+ }
159
+ for (var i = 0; i < value.length; i++) {
160
+ if (!value[i])
161
+ continue;
162
+
163
+ if ((!rule || rule.merge || type[i] === "text") && token.type === type[i]) {
164
+ token.value += value[i];
165
+ } else {
166
+ if (token.type)
167
+ tokens.push(token);
168
+
169
+ token = {
170
+ type: type[i],
171
+ value: value[i]
172
+ };
173
+ }
174
+ }
175
+ }
176
+
177
+ if (lastIndex == line.length)
178
+ break;
179
+
180
+ lastIndex = re.lastIndex;
181
+ }
182
+
183
+ if (token.type)
184
+ tokens.push(token);
185
+
186
+ return {
187
+ tokens : tokens,
188
+ state : currentState
189
+ };
190
+ };
191
+
192
+ }).call(Tokenizer.prototype);
193
+
194
+ exports.Tokenizer = Tokenizer;
195
+ });
@@ -0,0 +1,142 @@
1
+ /* vim:ts=4:sts=4:sw=4:
2
+ * ***** BEGIN LICENSE BLOCK *****
3
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
+ *
5
+ * The contents of this file are subject to the Mozilla Public License Version
6
+ * 1.1 (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ * http://www.mozilla.org/MPL/
9
+ *
10
+ * Software distributed under the License is distributed on an "AS IS" basis,
11
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
+ * for the specific language governing rights and limitations under the
13
+ * License.
14
+ *
15
+ * The Original Code is Ajax.org Code Editor (ACE).
16
+ *
17
+ * The Initial Developer of the Original Code is
18
+ * Ajax.org B.V.
19
+ * Portions created by the Initial Developer are Copyright (C) 2010
20
+ * the Initial Developer. All Rights Reserved.
21
+ *
22
+ * Contributor(s):
23
+ * Fabian Jakobs <fabian AT ajax DOT org>
24
+ * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
25
+ *
26
+ * Alternatively, the contents of this file may be used under the terms of
27
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
28
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29
+ * in which case the provisions of the GPL or the LGPL are applicable instead
30
+ * of those above. If you wish to allow use of your version of this file only
31
+ * under the terms of either the GPL or the LGPL, and not to allow others to
32
+ * use your version of this file under the terms of the MPL, indicate your
33
+ * decision by deleting the provisions above and replace them with the notice
34
+ * and other provisions required by the GPL or the LGPL. If you do not delete
35
+ * the provisions above, a recipient may use your version of this file under
36
+ * the terms of any one of the MPL, the GPL or the LGPL.
37
+ *
38
+ * ***** END LICENSE BLOCK ***** */
39
+
40
+ define(function(require, exports, module) {
41
+ "use strict";
42
+
43
+ /**
44
+ * class UndoManager
45
+ *
46
+ * This object maintains the undo stack for an [[EditSession `EditSession`]].
47
+ *
48
+ **/
49
+
50
+ /**
51
+ * new UndoManager()
52
+ *
53
+ * Resets the current undo state and creates a new `UndoManager`.
54
+ **/
55
+ var UndoManager = function() {
56
+ this.reset();
57
+ };
58
+
59
+ (function() {
60
+
61
+ /**
62
+ * UndoManager.execute(options) -> Void
63
+ * - options (Object): Contains additional properties
64
+ *
65
+ * Provides a means for implementing your own undo manager. `options` has one property, `args`, an [[Array `Array`]], with two elements:
66
+ * * `args[0]` is an array of deltas
67
+ * * `args[1]` is the document to associate with
68
+ *
69
+ **/
70
+ this.execute = function(options) {
71
+ var deltas = options.args[0];
72
+ this.$doc = options.args[1];
73
+ this.$undoStack.push(deltas);
74
+ this.$redoStack = [];
75
+ };
76
+
77
+ /**
78
+ * UndoManager.undo(dontSelect) -> Range
79
+ * - dontSelect (Boolean): {:dontSelect}
80
+ *
81
+ * [Perform an undo operation on the document, reverting the last change. Returns the range of the undo.]{: #UndoManager.undo}
82
+ **/
83
+ this.undo = function(dontSelect) {
84
+ var deltas = this.$undoStack.pop();
85
+ var undoSelectionRange = null;
86
+ if (deltas) {
87
+ undoSelectionRange =
88
+ this.$doc.undoChanges(deltas, dontSelect);
89
+ this.$redoStack.push(deltas);
90
+ }
91
+ return undoSelectionRange;
92
+ };
93
+
94
+ /**
95
+ * UndoManager.redo(dontSelect) -> Void
96
+ * - dontSelect (Boolean): {:dontSelect}
97
+ *
98
+ * [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}
99
+ **/
100
+ this.redo = function(dontSelect) {
101
+ var deltas = this.$redoStack.pop();
102
+ var redoSelectionRange = null;
103
+ if (deltas) {
104
+ redoSelectionRange =
105
+ this.$doc.redoChanges(deltas, dontSelect);
106
+ this.$undoStack.push(deltas);
107
+ }
108
+ return redoSelectionRange;
109
+ };
110
+
111
+ /**
112
+ * UndoManager.reset() -> Void
113
+ *
114
+ * Destroys the stack of undo and redo redo operations.
115
+ **/
116
+ this.reset = function() {
117
+ this.$undoStack = [];
118
+ this.$redoStack = [];
119
+ };
120
+
121
+ /**
122
+ * UndoManager.hasUndo() -> Boolean
123
+ *
124
+ * Returns `true` if there are undo operations left to perform.
125
+ **/
126
+ this.hasUndo = function() {
127
+ return this.$undoStack.length > 0;
128
+ };
129
+
130
+ /**
131
+ * UndoManager.hasRedo() -> Boolean
132
+ *
133
+ * Returns `true` if there are redo operations left to perform.
134
+ **/
135
+ this.hasRedo = function() {
136
+ return this.$redoStack.length > 0;
137
+ };
138
+
139
+ }).call(UndoManager.prototype);
140
+
141
+ exports.UndoManager = UndoManager;
142
+ });
@@ -0,0 +1,107 @@
1
+ define(function(require, exports, module) {
2
+ "use strict";
3
+
4
+ /*
5
+ XRegExp Unicode plugin pack: Categories 1.0
6
+ (c) 2010 Steven Levithan
7
+ MIT License
8
+ <http://xregexp.com>
9
+ Uses the Unicode 5.2 character database
10
+
11
+ This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties):
12
+
13
+ L - Letter (the top-level Letter category is included in the Unicode plugin base script)
14
+ Ll - Lowercase letter
15
+ Lu - Uppercase letter
16
+ Lt - Titlecase letter
17
+ Lm - Modifier letter
18
+ Lo - Letter without case
19
+ M - Mark
20
+ Mn - Non-spacing mark
21
+ Mc - Spacing combining mark
22
+ Me - Enclosing mark
23
+ N - Number
24
+ Nd - Decimal digit
25
+ Nl - Letter number
26
+ No - Other number
27
+ P - Punctuation
28
+ Pd - Dash punctuation
29
+ Ps - Open punctuation
30
+ Pe - Close punctuation
31
+ Pi - Initial punctuation
32
+ Pf - Final punctuation
33
+ Pc - Connector punctuation
34
+ Po - Other punctuation
35
+ S - Symbol
36
+ Sm - Math symbol
37
+ Sc - Currency symbol
38
+ Sk - Modifier symbol
39
+ So - Other symbol
40
+ Z - Separator
41
+ Zs - Space separator
42
+ Zl - Line separator
43
+ Zp - Paragraph separator
44
+ C - Other
45
+ Cc - Control
46
+ Cf - Format
47
+ Co - Private use
48
+ Cs - Surrogate
49
+ Cn - Unassigned
50
+
51
+ Example usage:
52
+
53
+ \p{N}
54
+ \p{Cn}
55
+ */
56
+
57
+
58
+ // will be populated by addUnicodePackage
59
+ exports.packages = {};
60
+
61
+ addUnicodePackage({
62
+ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
63
+ Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
64
+ Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
65
+ Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
66
+ Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",
67
+ Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
68
+ M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
69
+ Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
70
+ Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
71
+ Me: "0488048906DE20DD-20E020E2-20E4A670-A672",
72
+ N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
73
+ Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
74
+ Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
75
+ No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
76
+ P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
77
+ Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",
78
+ Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
79
+ Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
80
+ Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
81
+ Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
82
+ Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
83
+ Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
84
+ S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
85
+ Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
86
+ Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
87
+ Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
88
+ So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
89
+ Z: "002000A01680180E2000-200A20282029202F205F3000",
90
+ Zs: "002000A01680180E2000-200A202F205F3000",
91
+ Zl: "2028",
92
+ Zp: "2029",
93
+ C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
94
+ Cc: "0000-001F007F-009F",
95
+ Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
96
+ Co: "E000-F8FF",
97
+ Cs: "D800-DFFF",
98
+ Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
99
+ });
100
+
101
+ function addUnicodePackage (pack) {
102
+ var codePoint = /\w{4}/g;
103
+ for (var name in pack)
104
+ exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
105
+ };
106
+
107
+ });
@@ -0,0 +1,1402 @@
1
+ /* vim:ts=4:sts=4:sw=4:
2
+ * ***** BEGIN LICENSE BLOCK *****
3
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
+ *
5
+ * The contents of this file are subject to the Mozilla Public License Version
6
+ * 1.1 (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ * http://www.mozilla.org/MPL/
9
+ *
10
+ * Software distributed under the License is distributed on an "AS IS" basis,
11
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
+ * for the specific language governing rights and limitations under the
13
+ * License.
14
+ *
15
+ * The Original Code is Ajax.org Code Editor (ACE).
16
+ *
17
+ * The Initial Developer of the Original Code is
18
+ * Ajax.org B.V.
19
+ * Portions created by the Initial Developer are Copyright (C) 2010
20
+ * the Initial Developer. All Rights Reserved.
21
+ *
22
+ * Contributor(s):
23
+ * Fabian Jakobs <fabian@ajax.org>
24
+ * Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
25
+ * Julian Viereck <julian.viereck@gmail.com>
26
+ *
27
+ * Alternatively, the contents of this file may be used under the terms of
28
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
29
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30
+ * in which case the provisions of the GPL or the LGPL are applicable instead
31
+ * of those above. If you wish to allow use of your version of this file only
32
+ * under the terms of either the GPL or the LGPL, and not to allow others to
33
+ * use your version of this file under the terms of the MPL, indicate your
34
+ * decision by deleting the provisions above and replace them with the notice
35
+ * and other provisions required by the GPL or the LGPL. If you do not delete
36
+ * the provisions above, a recipient may use your version of this file under
37
+ * the terms of any one of the MPL, the GPL or the LGPL.
38
+ *
39
+ * ***** END LICENSE BLOCK ***** */
40
+
41
+ define(function(require, exports, module) {
42
+ "use strict";
43
+
44
+ var oop = require("./lib/oop");
45
+ var dom = require("./lib/dom");
46
+ var event = require("./lib/event");
47
+ var useragent = require("./lib/useragent");
48
+ var config = require("./config");
49
+ var net = require("./lib/net");
50
+ var GutterLayer = require("./layer/gutter").Gutter;
51
+ var MarkerLayer = require("./layer/marker").Marker;
52
+ var TextLayer = require("./layer/text").Text;
53
+ var CursorLayer = require("./layer/cursor").Cursor;
54
+ var ScrollBar = require("./scrollbar").ScrollBar;
55
+ var RenderLoop = require("./renderloop").RenderLoop;
56
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
57
+ var editorCss = require("ace/requirejs/text!./css/editor.css");
58
+
59
+ dom.importCssString(editorCss, "ace_editor");
60
+
61
+ /**
62
+ * class VirtualRenderer
63
+ *
64
+ * The class that is responsible for drawing everything you see on the screen!
65
+ *
66
+ **/
67
+
68
+ /**
69
+ * new VirtualRenderer(container, theme)
70
+ * - container (DOMElement): The root element of the editor
71
+ * - theme (String): The starting theme
72
+ *
73
+ * Constructs a new `VirtualRenderer` within the `container` specified, applying the given `theme`.
74
+ *
75
+ **/
76
+
77
+ var VirtualRenderer = function(container, theme) {
78
+ var _self = this;
79
+
80
+ this.container = container;
81
+
82
+ // TODO: this breaks rendering in Cloud9 with multiple ace instances
83
+ // // Imports CSS once per DOM document ('ace_editor' serves as an identifier).
84
+ // dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
85
+
86
+ // in IE <= 9 the native cursor always shines through
87
+ this.$keepTextAreaAtCursor = !useragent.isIE;
88
+
89
+ dom.addCssClass(container, "ace_editor");
90
+
91
+ this.setTheme(theme);
92
+
93
+ this.$gutter = dom.createElement("div");
94
+ this.$gutter.className = "ace_gutter";
95
+ this.container.appendChild(this.$gutter);
96
+
97
+ this.scroller = dom.createElement("div");
98
+ this.scroller.className = "ace_scroller";
99
+ this.container.appendChild(this.scroller);
100
+
101
+ this.content = dom.createElement("div");
102
+ this.content.className = "ace_content";
103
+ this.scroller.appendChild(this.content);
104
+
105
+ this.$gutterLayer = new GutterLayer(this.$gutter);
106
+ this.$gutterLayer.on("changeGutterWidth", this.onResize.bind(this, true));
107
+ this.setFadeFoldWidgets(true);
108
+
109
+ this.$markerBack = new MarkerLayer(this.content);
110
+
111
+ var textLayer = this.$textLayer = new TextLayer(this.content);
112
+ this.canvas = textLayer.element;
113
+
114
+ this.$markerFront = new MarkerLayer(this.content);
115
+
116
+ this.characterWidth = textLayer.getCharacterWidth();
117
+ this.lineHeight = textLayer.getLineHeight();
118
+
119
+ this.$cursorLayer = new CursorLayer(this.content);
120
+ this.$cursorPadding = 8;
121
+
122
+ // Indicates whether the horizontal scrollbar is visible
123
+ this.$horizScroll = false;
124
+ this.$horizScrollAlwaysVisible = false;
125
+
126
+ this.$animatedScroll = false;
127
+
128
+ this.scrollBar = new ScrollBar(container);
129
+ this.scrollBar.addEventListener("scroll", function(e) {
130
+ if (!_self.$inScrollAnimation)
131
+ _self.session.setScrollTop(e.data);
132
+ });
133
+
134
+ this.scrollTop = 0;
135
+ this.scrollLeft = 0;
136
+
137
+ event.addListener(this.scroller, "scroll", function() {
138
+ var scrollLeft = _self.scroller.scrollLeft;
139
+ _self.scrollLeft = scrollLeft;
140
+ _self.session.setScrollLeft(scrollLeft);
141
+ });
142
+
143
+ this.cursorPos = {
144
+ row : 0,
145
+ column : 0
146
+ };
147
+
148
+ this.$textLayer.addEventListener("changeCharacterSize", function() {
149
+ _self.characterWidth = textLayer.getCharacterWidth();
150
+ _self.lineHeight = textLayer.getLineHeight();
151
+ _self.$updatePrintMargin();
152
+ _self.onResize(true);
153
+
154
+ _self.$loop.schedule(_self.CHANGE_FULL);
155
+ });
156
+
157
+ this.$size = {
158
+ width: 0,
159
+ height: 0,
160
+ scrollerHeight: 0,
161
+ scrollerWidth: 0
162
+ };
163
+
164
+ this.layerConfig = {
165
+ width : 1,
166
+ padding : 0,
167
+ firstRow : 0,
168
+ firstRowScreen: 0,
169
+ lastRow : 0,
170
+ lineHeight : 1,
171
+ characterWidth : 1,
172
+ minHeight : 1,
173
+ maxHeight : 1,
174
+ offset : 0,
175
+ height : 1
176
+ };
177
+
178
+ this.$loop = new RenderLoop(
179
+ this.$renderChanges.bind(this),
180
+ this.container.ownerDocument.defaultView
181
+ );
182
+ this.$loop.schedule(this.CHANGE_FULL);
183
+
184
+ this.setPadding(4);
185
+ this.$updatePrintMargin();
186
+ };
187
+
188
+ (function() {
189
+ this.showGutter = true;
190
+
191
+ this.CHANGE_CURSOR = 1;
192
+ this.CHANGE_MARKER = 2;
193
+ this.CHANGE_GUTTER = 4;
194
+ this.CHANGE_SCROLL = 8;
195
+ this.CHANGE_LINES = 16;
196
+ this.CHANGE_TEXT = 32;
197
+ this.CHANGE_SIZE = 64;
198
+ this.CHANGE_MARKER_BACK = 128;
199
+ this.CHANGE_MARKER_FRONT = 256;
200
+ this.CHANGE_FULL = 512;
201
+ this.CHANGE_H_SCROLL = 1024;
202
+
203
+ oop.implement(this, EventEmitter);
204
+
205
+ /**
206
+ * VirtualRenderer.setSession(session) -> Void
207
+ *
208
+ * Associates an [[EditSession `EditSession`]].
209
+ **/
210
+ this.setSession = function(session) {
211
+ this.session = session;
212
+
213
+ this.scroller.className = "ace_scroller";
214
+
215
+ this.$cursorLayer.setSession(session);
216
+ this.$markerBack.setSession(session);
217
+ this.$markerFront.setSession(session);
218
+ this.$gutterLayer.setSession(session);
219
+ this.$textLayer.setSession(session);
220
+ this.$loop.schedule(this.CHANGE_FULL);
221
+
222
+ };
223
+
224
+ /**
225
+ * VirtualRenderer.updateLines(firstRow, lastRow) -> Void
226
+ * - firstRow (Number): The first row to update
227
+ * - lastRow (Number): The last row to update
228
+ *
229
+ * Triggers a partial update of the text, from the range given by the two parameters.
230
+ **/
231
+ this.updateLines = function(firstRow, lastRow) {
232
+ if (lastRow === undefined)
233
+ lastRow = Infinity;
234
+
235
+ if (!this.$changedLines) {
236
+ this.$changedLines = {
237
+ firstRow: firstRow,
238
+ lastRow: lastRow
239
+ };
240
+ }
241
+ else {
242
+ if (this.$changedLines.firstRow > firstRow)
243
+ this.$changedLines.firstRow = firstRow;
244
+
245
+ if (this.$changedLines.lastRow < lastRow)
246
+ this.$changedLines.lastRow = lastRow;
247
+ }
248
+
249
+ this.$loop.schedule(this.CHANGE_LINES);
250
+ };
251
+
252
+ /**
253
+ * VirtualRenderer.updateText() -> Void
254
+ *
255
+ * Triggers a full update of the text, for all the rows.
256
+ **/
257
+ this.updateText = function() {
258
+ this.$loop.schedule(this.CHANGE_TEXT);
259
+ };
260
+
261
+ /**
262
+ * VirtualRenderer.updateFull() -> Void
263
+ *
264
+ * Triggers a full update of all the layers, for all the rows.
265
+ **/
266
+ this.updateFull = function(force) {
267
+ if (force){
268
+ this.$renderChanges(this.CHANGE_FULL, true);
269
+ }
270
+ else {
271
+ this.$loop.schedule(this.CHANGE_FULL);
272
+ }
273
+ };
274
+
275
+ /**
276
+ * VirtualRenderer.updateFontSize() -> Void
277
+ *
278
+ * Updates the font size.
279
+ **/
280
+ this.updateFontSize = function() {
281
+ this.$textLayer.checkForSizeChanges();
282
+ };
283
+
284
+ /**
285
+ * VirtualRenderer.onResize(force) -> Void
286
+ * - force (Boolean): If `true`, recomputes the size, even if the height and width haven't changed
287
+ *
288
+ * [Triggers a resize of the editor.]{: #VirtualRenderer.onResize}
289
+ **/
290
+ this.onResize = function(force, gutterWidth, width, height) {
291
+ var changes = this.CHANGE_SIZE;
292
+ var size = this.$size;
293
+
294
+ if (this.resizing > 2)
295
+ return;
296
+ else if (this.resizing > 1)
297
+ this.resizing++;
298
+ else
299
+ this.resizing = force ? 1 : 0;
300
+
301
+ if (!height)
302
+ height = dom.getInnerHeight(this.container);
303
+ if (force || size.height != height) {
304
+ size.height = height;
305
+
306
+ this.scroller.style.height = height + "px";
307
+ size.scrollerHeight = this.scroller.clientHeight;
308
+ this.scrollBar.setHeight(size.scrollerHeight);
309
+
310
+ if (this.session) {
311
+ this.session.setScrollTop(this.getScrollTop());
312
+ changes = changes | this.CHANGE_FULL;
313
+ }
314
+ }
315
+
316
+ if (!width)
317
+ width = dom.getInnerWidth(this.container);
318
+ if (force || this.resizing > 1 || size.width != width) {
319
+ size.width = width;
320
+
321
+ var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
322
+ this.scroller.style.left = gutterWidth + "px";
323
+ size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBar.getWidth());
324
+ this.scroller.style.right = this.scrollBar.getWidth() + "px";
325
+
326
+ if (this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
327
+ changes = changes | this.CHANGE_FULL;
328
+ }
329
+
330
+ if (force)
331
+ this.$renderChanges(changes, true);
332
+ else
333
+ this.$loop.schedule(changes);
334
+
335
+ if (force)
336
+ delete this.resizing;
337
+ };
338
+
339
+ /**
340
+ * VirtualRenderer.adjustWrapLimit() -> Void
341
+ *
342
+ * Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
343
+ **/
344
+ this.adjustWrapLimit = function() {
345
+ var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
346
+ var limit = Math.floor(availableWidth / this.characterWidth);
347
+ return this.session.adjustWrapLimit(limit);
348
+ };
349
+
350
+ /**
351
+ * VirtualRenderer.setAnimatedScroll(shouldAnimate) -> Void
352
+ * - shouldAnimate (Boolean): Set to `true` to show animated scrolls
353
+ *
354
+ * Identifies whether you want to have an animated scroll or not.
355
+ *
356
+ **/
357
+ this.setAnimatedScroll = function(shouldAnimate){
358
+ this.$animatedScroll = shouldAnimate;
359
+ };
360
+
361
+ /**
362
+ * VirtualRenderer.getAnimatedScroll() -> Boolean
363
+ *
364
+ * Returns whether an animated scroll happens or not.
365
+ **/
366
+ this.getAnimatedScroll = function() {
367
+ return this.$animatedScroll;
368
+ };
369
+
370
+ /**
371
+ * VirtualRenderer.setShowInvisibles(showInvisibles) -> Void
372
+ * - showInvisibles (Boolean): Set to `true` to show invisibles
373
+ *
374
+ * Identifies whether you want to show invisible characters or not.
375
+ *
376
+ **/
377
+ this.setShowInvisibles = function(showInvisibles) {
378
+ if (this.$textLayer.setShowInvisibles(showInvisibles))
379
+ this.$loop.schedule(this.CHANGE_TEXT);
380
+ };
381
+
382
+ /**
383
+ * VirtualRenderer.getShowInvisibles() -> Boolean
384
+ *
385
+ * Returns whether invisible characters are being shown or not.
386
+ **/
387
+ this.getShowInvisibles = function() {
388
+ return this.$textLayer.showInvisibles;
389
+ };
390
+
391
+ this.$showPrintMargin = true;
392
+
393
+ /**
394
+ * VirtualRenderer.setShowPrintMargin(showPrintMargin)
395
+ * - showPrintMargin (Boolean): Set to `true` to show the print margin
396
+ *
397
+ * Identifies whether you want to show the print margin or not.
398
+ *
399
+ **/
400
+ this.setShowPrintMargin = function(showPrintMargin) {
401
+ this.$showPrintMargin = showPrintMargin;
402
+ this.$updatePrintMargin();
403
+ };
404
+
405
+ /**
406
+ * VirtualRenderer.getShowPrintMargin() -> Boolean
407
+ *
408
+ * Returns whetherthe print margin is being shown or not.
409
+ **/
410
+ this.getShowPrintMargin = function() {
411
+ return this.$showPrintMargin;
412
+ };
413
+
414
+ this.$printMarginColumn = 80;
415
+
416
+ /**
417
+ * VirtualRenderer.setPrintMarginColumn(showPrintMargin)
418
+ * - showPrintMargin (Boolean): Set to `true` to show the print margin column
419
+ *
420
+ * Identifies whether you want to show the print margin column or not.
421
+ *
422
+ **/
423
+ this.setPrintMarginColumn = function(showPrintMargin) {
424
+ this.$printMarginColumn = showPrintMargin;
425
+ this.$updatePrintMargin();
426
+ };
427
+
428
+ /**
429
+ * VirtualRenderer.getPrintMarginColumn() -> Boolean
430
+ *
431
+ * Returns whether the print margin column is being shown or not.
432
+ **/
433
+ this.getPrintMarginColumn = function() {
434
+ return this.$printMarginColumn;
435
+ };
436
+
437
+ /**
438
+ * VirtualRenderer.getShowGutter() -> Boolean
439
+ *
440
+ * Returns `true` if the gutter is being shown.
441
+ **/
442
+ this.getShowGutter = function(){
443
+ return this.showGutter;
444
+ };
445
+
446
+ /**
447
+ * VirtualRenderer.setShowGutter(show) -> Void
448
+ * - show (Boolean): Set to `true` to show the gutter
449
+ *
450
+ * Identifies whether you want to show the gutter or not.
451
+ **/
452
+ this.setShowGutter = function(show){
453
+ if(this.showGutter === show)
454
+ return;
455
+ this.$gutter.style.display = show ? "block" : "none";
456
+ this.showGutter = show;
457
+ this.onResize(true);
458
+ };
459
+
460
+ this.getFadeFoldWidgets = function(){
461
+ return dom.hasCssClass(this.$gutter, "ace_fade-fold-widgets");
462
+ };
463
+
464
+ this.setFadeFoldWidgets = function(show) {
465
+ if (show)
466
+ dom.addCssClass(this.$gutter, "ace_fade-fold-widgets");
467
+ else
468
+ dom.removeCssClass(this.$gutter, "ace_fade-fold-widgets");
469
+ };
470
+
471
+ this.$highlightGutterLine = true;
472
+ this.setHighlightGutterLine = function(shouldHighlight) {
473
+ if (this.$highlightGutterLine == shouldHighlight)
474
+ return;
475
+ this.$highlightGutterLine = shouldHighlight;
476
+
477
+ this.$loop.schedule(this.CHANGE_GUTTER);
478
+ };
479
+
480
+ this.getHighlightGutterLine = function() {
481
+ return this.$highlightGutterLine;
482
+ };
483
+
484
+ this.$updateGutterLineHighlight = function(gutterReady) {
485
+ var i = this.session.selection.lead.row;
486
+ if (i == this.$gutterLineHighlight)
487
+ return;
488
+
489
+ if (!gutterReady) {
490
+ var lineEl, ch = this.$gutterLayer.element.children;
491
+ var index = this.$gutterLineHighlight - this.layerConfig.firstRow;
492
+ if (index >= 0 && (lineEl = ch[index]))
493
+ dom.removeCssClass(lineEl, "ace_gutter_active_line");
494
+
495
+ index = i - this.layerConfig.firstRow;
496
+ if (index >= 0 && (lineEl = ch[index]))
497
+ dom.addCssClass(lineEl, "ace_gutter_active_line");
498
+ }
499
+
500
+ this.$gutterLayer.removeGutterDecoration(this.$gutterLineHighlight, "ace_gutter_active_line");
501
+ this.$gutterLayer.addGutterDecoration(i, "ace_gutter_active_line");
502
+ this.$gutterLineHighlight = i;
503
+ };
504
+
505
+ this.$updatePrintMargin = function() {
506
+ var containerEl;
507
+
508
+ if (!this.$showPrintMargin && !this.$printMarginEl)
509
+ return;
510
+
511
+ if (!this.$printMarginEl) {
512
+ containerEl = dom.createElement("div");
513
+ containerEl.className = "ace_print_margin_layer";
514
+ this.$printMarginEl = dom.createElement("div");
515
+ this.$printMarginEl.className = "ace_print_margin";
516
+ containerEl.appendChild(this.$printMarginEl);
517
+ this.content.insertBefore(containerEl, this.$textLayer.element);
518
+ }
519
+
520
+ var style = this.$printMarginEl.style;
521
+ style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
522
+ style.visibility = this.$showPrintMargin ? "visible" : "hidden";
523
+ };
524
+
525
+ /**
526
+ * VirtualRenderer.getContainerElement() -> DOMElement
527
+ *
528
+ * Returns the root element containing this renderer.
529
+ **/
530
+ this.getContainerElement = function() {
531
+ return this.container;
532
+ };
533
+
534
+ /**
535
+ * VirtualRenderer.getMouseEventTarget() -> DOMElement
536
+ *
537
+ * Returns the element that the mouse events are attached to
538
+ **/
539
+ this.getMouseEventTarget = function() {
540
+ return this.content;
541
+ };
542
+
543
+ /**
544
+ * VirtualRenderer.getTextAreaContainer() -> DOMElement
545
+ *
546
+ * Returns the element to which the hidden text area is added.
547
+ **/
548
+ this.getTextAreaContainer = function() {
549
+ return this.container;
550
+ };
551
+
552
+ // move text input over the cursor
553
+ // this is required for iOS and IME
554
+ this.$moveTextAreaToCursor = function() {
555
+ if (!this.$keepTextAreaAtCursor)
556
+ return;
557
+
558
+ var posTop = this.$cursorLayer.$pixelPos.top;
559
+ var posLeft = this.$cursorLayer.$pixelPos.left;
560
+ posTop -= this.layerConfig.offset;
561
+
562
+ if (posTop < 0 || posTop > this.layerConfig.height - this.lineHeight)
563
+ return;
564
+
565
+ var w = this.characterWidth;
566
+ if (this.$composition)
567
+ w += this.textarea.scrollWidth;
568
+ posLeft -= this.scrollLeft;
569
+ if (posLeft > this.$size.scrollerWidth - w)
570
+ posLeft = this.$size.scrollerWidth - w;
571
+
572
+ if (this.showGutter)
573
+ posLeft += this.$gutterLayer.gutterWidth;
574
+
575
+ this.textarea.style.height = this.lineHeight + "px";
576
+ this.textarea.style.width = w + "px";
577
+ this.textarea.style.left = posLeft + "px";
578
+ this.textarea.style.top = posTop - 1 + "px";
579
+ };
580
+
581
+ /**
582
+ * VirtualRenderer.getFirstVisibleRow() -> Number
583
+ *
584
+ * [Returns the index of the first visible row.]{: #VirtualRenderer.getFirstVisibleRow}
585
+ **/
586
+ this.getFirstVisibleRow = function() {
587
+ return this.layerConfig.firstRow;
588
+ };
589
+
590
+ /**
591
+ * VirtualRenderer.getFirstFullyVisibleRow() -> Number
592
+ *
593
+ * Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
594
+ **/
595
+ this.getFirstFullyVisibleRow = function() {
596
+ return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
597
+ };
598
+
599
+ /**
600
+ * VirtualRenderer.getLastFullyVisibleRow() -> Number
601
+ *
602
+ * Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
603
+ **/
604
+ this.getLastFullyVisibleRow = function() {
605
+ var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
606
+ return this.layerConfig.firstRow - 1 + flint;
607
+ };
608
+
609
+ /**
610
+ * VirtualRenderer.getLastVisibleRow() -> Number
611
+ *
612
+ * [Returns the index of the last visible row.]{: #VirtualRenderer.getLastVisibleRow}
613
+ **/
614
+ this.getLastVisibleRow = function() {
615
+ return this.layerConfig.lastRow;
616
+ };
617
+
618
+ this.$padding = null;
619
+
620
+ /**
621
+ * VirtualRenderer.setPadding(padding) -> Void
622
+ * - padding (Number): A new padding value (in pixels)
623
+ *
624
+ * Sets the padding for all the layers.
625
+ *
626
+ **/
627
+ this.setPadding = function(padding) {
628
+ this.$padding = padding;
629
+ this.$textLayer.setPadding(padding);
630
+ this.$cursorLayer.setPadding(padding);
631
+ this.$markerFront.setPadding(padding);
632
+ this.$markerBack.setPadding(padding);
633
+ this.$loop.schedule(this.CHANGE_FULL);
634
+ this.$updatePrintMargin();
635
+ };
636
+
637
+ /**
638
+ * VirtualRenderer.getHScrollBarAlwaysVisible() -> Boolean
639
+ *
640
+ * Returns whether the horizontal scrollbar is set to be always visible.
641
+ **/
642
+ this.getHScrollBarAlwaysVisible = function() {
643
+ return this.$horizScrollAlwaysVisible;
644
+ };
645
+
646
+ /**
647
+ * VirtualRenderer.setHScrollBarAlwaysVisible(alwaysVisible) -> Void
648
+ * - alwaysVisible (Boolean): Set to `true` to make the horizontal scroll bar visible
649
+ *
650
+ * Identifies whether you want to show the horizontal scrollbar or not.
651
+ **/
652
+ this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
653
+ if (this.$horizScrollAlwaysVisible != alwaysVisible) {
654
+ this.$horizScrollAlwaysVisible = alwaysVisible;
655
+ if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
656
+ this.$loop.schedule(this.CHANGE_SCROLL);
657
+ }
658
+ };
659
+
660
+ this.$updateScrollBar = function() {
661
+ this.scrollBar.setInnerHeight(this.layerConfig.maxHeight);
662
+ this.scrollBar.setScrollTop(this.scrollTop);
663
+ };
664
+
665
+ this.$renderChanges = function(changes, force) {
666
+ if (!force && (!changes || !this.session || !this.container.offsetWidth))
667
+ return;
668
+
669
+ // text, scrolling and resize changes can cause the view port size to change
670
+ if (changes & this.CHANGE_FULL ||
671
+ changes & this.CHANGE_SIZE ||
672
+ changes & this.CHANGE_TEXT ||
673
+ changes & this.CHANGE_LINES ||
674
+ changes & this.CHANGE_SCROLL
675
+ )
676
+ this.$computeLayerConfig();
677
+
678
+ // horizontal scrolling
679
+ if (changes & this.CHANGE_H_SCROLL) {
680
+ this.scroller.scrollLeft = this.scrollLeft;
681
+
682
+ // read the value after writing it since the value might get clipped
683
+ var scrollLeft = this.scroller.scrollLeft;
684
+ this.scrollLeft = scrollLeft;
685
+ this.session.setScrollLeft(scrollLeft);
686
+
687
+ this.scroller.className = this.scrollLeft == 0 ? "ace_scroller" : "ace_scroller horscroll";
688
+ }
689
+
690
+ // full
691
+ if (changes & this.CHANGE_FULL) {
692
+ this.$textLayer.checkForSizeChanges();
693
+ // update scrollbar first to not lose scroll position when gutter calls resize
694
+ this.$updateScrollBar();
695
+ this.$textLayer.update(this.layerConfig);
696
+ if (this.showGutter) {
697
+ if (this.$highlightGutterLine)
698
+ this.$updateGutterLineHighlight(true);
699
+ this.$gutterLayer.update(this.layerConfig);
700
+ }
701
+ this.$markerBack.update(this.layerConfig);
702
+ this.$markerFront.update(this.layerConfig);
703
+ this.$cursorLayer.update(this.layerConfig);
704
+ this.$moveTextAreaToCursor();
705
+ return;
706
+ }
707
+
708
+ // scrolling
709
+ if (changes & this.CHANGE_SCROLL) {
710
+ this.$updateScrollBar();
711
+ if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
712
+ this.$textLayer.update(this.layerConfig);
713
+ else
714
+ this.$textLayer.scrollLines(this.layerConfig);
715
+
716
+ if (this.showGutter) {
717
+ if (this.$highlightGutterLine)
718
+ this.$updateGutterLineHighlight(true);
719
+ this.$gutterLayer.update(this.layerConfig);
720
+ }
721
+ this.$markerBack.update(this.layerConfig);
722
+ this.$markerFront.update(this.layerConfig);
723
+ this.$cursorLayer.update(this.layerConfig);
724
+ this.$moveTextAreaToCursor();
725
+ return;
726
+ }
727
+
728
+ if (changes & this.CHANGE_TEXT) {
729
+ this.$textLayer.update(this.layerConfig);
730
+ if (this.showGutter)
731
+ this.$gutterLayer.update(this.layerConfig);
732
+ }
733
+ else if (changes & this.CHANGE_LINES) {
734
+ if (this.$updateLines()) {
735
+ this.$updateScrollBar();
736
+ if (this.showGutter)
737
+ this.$gutterLayer.update(this.layerConfig);
738
+ }
739
+ } else if (changes & this.CHANGE_GUTTER) {
740
+ if (this.showGutter)
741
+ this.$gutterLayer.update(this.layerConfig);
742
+ }
743
+
744
+ if (changes & this.CHANGE_CURSOR) {
745
+ this.$cursorLayer.update(this.layerConfig);
746
+ this.$moveTextAreaToCursor();
747
+ this.$highlightGutterLine && this.$updateGutterLineHighlight(false);
748
+ }
749
+
750
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
751
+ this.$markerFront.update(this.layerConfig);
752
+ }
753
+
754
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
755
+ this.$markerBack.update(this.layerConfig);
756
+ }
757
+
758
+ if (changes & this.CHANGE_SIZE)
759
+ this.$updateScrollBar();
760
+ };
761
+
762
+ this.$computeLayerConfig = function() {
763
+ var session = this.session;
764
+
765
+ var offset = this.scrollTop % this.lineHeight;
766
+ var minHeight = this.$size.scrollerHeight + this.lineHeight;
767
+
768
+ var longestLine = this.$getLongestLine();
769
+
770
+ var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
771
+ var horizScrollChanged = this.$horizScroll !== horizScroll;
772
+ this.$horizScroll = horizScroll;
773
+ if (horizScrollChanged) {
774
+ this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
775
+ // when we hide scrollbar scroll event isn't emited
776
+ // leaving session with wrong scrollLeft value
777
+ if (!horizScroll)
778
+ this.session.setScrollLeft(0);
779
+ }
780
+ var maxHeight = this.session.getScreenLength() * this.lineHeight;
781
+ this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
782
+
783
+ var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
784
+ var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
785
+ var lastRow = firstRow + lineCount;
786
+
787
+ // Map lines on the screen to lines in the document.
788
+ var firstRowScreen, firstRowHeight;
789
+ var lineHeight = { lineHeight: this.lineHeight };
790
+ firstRow = session.screenToDocumentRow(firstRow, 0);
791
+
792
+ // Check if firstRow is inside of a foldLine. If true, then use the first
793
+ // row of the foldLine.
794
+ var foldLine = session.getFoldLine(firstRow);
795
+ if (foldLine) {
796
+ firstRow = foldLine.start.row;
797
+ }
798
+
799
+ firstRowScreen = session.documentToScreenRow(firstRow, 0);
800
+ firstRowHeight = session.getRowHeight(lineHeight, firstRow);
801
+
802
+ lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
803
+ minHeight = this.$size.scrollerHeight + session.getRowHeight(lineHeight, lastRow)+
804
+ firstRowHeight;
805
+
806
+ offset = this.scrollTop - firstRowScreen * this.lineHeight;
807
+
808
+ this.layerConfig = {
809
+ width : longestLine,
810
+ padding : this.$padding,
811
+ firstRow : firstRow,
812
+ firstRowScreen: firstRowScreen,
813
+ lastRow : lastRow,
814
+ lineHeight : this.lineHeight,
815
+ characterWidth : this.characterWidth,
816
+ minHeight : minHeight,
817
+ maxHeight : maxHeight,
818
+ offset : offset,
819
+ height : this.$size.scrollerHeight
820
+ };
821
+
822
+ // For debugging.
823
+ // console.log(JSON.stringify(this.layerConfig));
824
+
825
+ this.$gutterLayer.element.style.marginTop = (-offset) + "px";
826
+ this.content.style.marginTop = (-offset) + "px";
827
+ this.content.style.width = longestLine + 2 * this.$padding + "px";
828
+ this.content.style.height = minHeight + "px";
829
+
830
+ // Horizontal scrollbar visibility may have changed, which changes
831
+ // the client height of the scroller
832
+ if (horizScrollChanged)
833
+ this.onResize(true);
834
+ };
835
+
836
+ this.$updateLines = function() {
837
+ var firstRow = this.$changedLines.firstRow;
838
+ var lastRow = this.$changedLines.lastRow;
839
+ this.$changedLines = null;
840
+
841
+ var layerConfig = this.layerConfig;
842
+
843
+ if (firstRow > layerConfig.lastRow + 1) { return; }
844
+ if (lastRow < layerConfig.firstRow) { return; }
845
+
846
+ // if the last row is unknown -> redraw everything
847
+ if (lastRow === Infinity) {
848
+ if (this.showGutter)
849
+ this.$gutterLayer.update(layerConfig);
850
+ this.$textLayer.update(layerConfig);
851
+ return;
852
+ }
853
+
854
+ // else update only the changed rows
855
+ this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
856
+ return true;
857
+ };
858
+
859
+ this.$getLongestLine = function() {
860
+ var charCount = this.session.getScreenWidth();
861
+ if (this.$textLayer.showInvisibles)
862
+ charCount += 1;
863
+
864
+ return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
865
+ };
866
+
867
+ /**
868
+ * VirtualRenderer.updateFrontMarkers() -> Void
869
+ *
870
+ * Schedules an update to all the front markers in the document.
871
+ **/
872
+ this.updateFrontMarkers = function() {
873
+ this.$markerFront.setMarkers(this.session.getMarkers(true));
874
+ this.$loop.schedule(this.CHANGE_MARKER_FRONT);
875
+ };
876
+
877
+ /**
878
+ * VirtualRenderer.updateBackMarkers() -> Void
879
+ *
880
+ * Schedules an update to all the back markers in the document.
881
+ **/
882
+ this.updateBackMarkers = function() {
883
+ this.$markerBack.setMarkers(this.session.getMarkers());
884
+ this.$loop.schedule(this.CHANGE_MARKER_BACK);
885
+ };
886
+
887
+ /**
888
+ * VirtualRenderer.addGutterDecoration(row, className) -> Void
889
+ * - row (Number): The row number
890
+ * - className (String): The class to add
891
+ *
892
+ * Adds `className` to the `row`, to be used for CSS stylings and whatnot.
893
+ **/
894
+ this.addGutterDecoration = function(row, className){
895
+ this.$gutterLayer.addGutterDecoration(row, className);
896
+ this.$loop.schedule(this.CHANGE_GUTTER);
897
+ };
898
+
899
+ /**
900
+ * VirtualRenderer.removeGutterDecoration(row, className)-> Void
901
+ * - row (Number): The row number
902
+ * - className (String): The class to add
903
+ *
904
+ * Removes `className` from the `row`.
905
+ **/
906
+ this.removeGutterDecoration = function(row, className){
907
+ this.$gutterLayer.removeGutterDecoration(row, className);
908
+ this.$loop.schedule(this.CHANGE_GUTTER);
909
+ };
910
+
911
+ /**
912
+ * VirtualRenderer.updateBreakpoints() -> Void
913
+ *
914
+ * Redraw breakpoints.
915
+ **/
916
+ this.updateBreakpoints = function(rows) {
917
+ this.$loop.schedule(this.CHANGE_GUTTER);
918
+ };
919
+
920
+ /**
921
+ * VirtualRenderer.setAnnotations(annotations) -> Void
922
+ * - annotations (Array): An array containing annotations
923
+ *
924
+ * Sets annotations for the gutter.
925
+ **/
926
+ this.setAnnotations = function(annotations) {
927
+ this.$gutterLayer.setAnnotations(annotations);
928
+ this.$loop.schedule(this.CHANGE_GUTTER);
929
+ };
930
+
931
+ /**
932
+ * VirtualRenderer.updateCursor() -> Void
933
+ *
934
+ * Updates the cursor icon.
935
+ **/
936
+ this.updateCursor = function() {
937
+ this.$loop.schedule(this.CHANGE_CURSOR);
938
+ };
939
+
940
+ /**
941
+ * VirtualRenderer.hideCursor() -> Void
942
+ *
943
+ * Hides the cursor icon.
944
+ **/
945
+ this.hideCursor = function() {
946
+ this.$cursorLayer.hideCursor();
947
+ };
948
+
949
+ /**
950
+ * VirtualRenderer.showCursor() -> Void
951
+ *
952
+ * Shows the cursor icon.
953
+ **/
954
+ this.showCursor = function() {
955
+ this.$cursorLayer.showCursor();
956
+ };
957
+
958
+ this.scrollSelectionIntoView = function(anchor, lead, offset) {
959
+ // first scroll anchor into view then scroll lead into view
960
+ this.scrollCursorIntoView(anchor, offset);
961
+ this.scrollCursorIntoView(lead, offset);
962
+ };
963
+
964
+ /**
965
+ * VirtualRenderer.scrollCursorIntoView(cursor, offset) -> Void
966
+ *
967
+ * Scrolls the cursor into the first visibile area of the editor
968
+ **/
969
+ this.scrollCursorIntoView = function(cursor, offset) {
970
+ // the editor is not visible
971
+ if (this.$size.scrollerHeight === 0)
972
+ return;
973
+
974
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
975
+
976
+ var left = pos.left;
977
+ var top = pos.top;
978
+
979
+ if (this.scrollTop > top) {
980
+ if (offset)
981
+ top -= offset * this.$size.scrollerHeight;
982
+ this.session.setScrollTop(top);
983
+ } else if (this.scrollTop + this.$size.scrollerHeight < top + this.lineHeight) {
984
+ if (offset)
985
+ top += offset * this.$size.scrollerHeight;
986
+ this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
987
+ }
988
+
989
+ var scrollLeft = this.scrollLeft;
990
+
991
+ if (scrollLeft > left) {
992
+ if (left < this.$padding + 2 * this.layerConfig.characterWidth)
993
+ left = 0;
994
+ this.session.setScrollLeft(left);
995
+ } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
996
+ this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
997
+ }
998
+ };
999
+
1000
+ /** related to: EditSession.getScrollTop
1001
+ * VirtualRenderer.getScrollTop() -> Number
1002
+ *
1003
+ * {:EditSession.getScrollTop}
1004
+ **/
1005
+ this.getScrollTop = function() {
1006
+ return this.session.getScrollTop();
1007
+ };
1008
+
1009
+ /** related to: EditSession.getScrollLeft
1010
+ * VirtualRenderer.getScrollLeft() -> Number
1011
+ *
1012
+ * {:EditSession.getScrollLeft}
1013
+ **/
1014
+ this.getScrollLeft = function() {
1015
+ return this.session.getScrollLeft();
1016
+ };
1017
+
1018
+ /**
1019
+ * VirtualRenderer.getScrollTopRow() -> Number
1020
+ *
1021
+ * Returns the first visible row, regardless of whether it's fully visible or not.
1022
+ **/
1023
+ this.getScrollTopRow = function() {
1024
+ return this.scrollTop / this.lineHeight;
1025
+ };
1026
+
1027
+ /**
1028
+ * VirtualRenderer.getScrollBottomRow() -> Number
1029
+ *
1030
+ * Returns the last visible row, regardless of whether it's fully visible or not.
1031
+ **/
1032
+ this.getScrollBottomRow = function() {
1033
+ return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
1034
+ };
1035
+
1036
+ /** related to: EditSession.setScrollTop
1037
+ * VirtualRenderer.scrollToRow(row) -> Void
1038
+ * - row (Number): A row id
1039
+ *
1040
+ * Gracefully scrolls the top of the editor to the row indicated.
1041
+ **/
1042
+ this.scrollToRow = function(row) {
1043
+ this.session.setScrollTop(row * this.lineHeight);
1044
+ };
1045
+
1046
+ this.alignCursor = function(cursor, alignment) {
1047
+ if (typeof cursor == "number")
1048
+ cursor = {row: cursor, column: 0};
1049
+
1050
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
1051
+ var offset = pos.top - this.$size.scrollerHeight * (alignment || 0);
1052
+
1053
+ this.session.setScrollTop(offset);
1054
+ };
1055
+
1056
+ this.STEPS = 8;
1057
+ this.$calcSteps = function(fromValue, toValue){
1058
+ var i = 0;
1059
+ var l = this.STEPS;
1060
+ var steps = [];
1061
+
1062
+ var func = function(t, x_min, dx) {
1063
+ return dx * (Math.pow(t - 1, 3) + 1) + x_min;
1064
+ };
1065
+
1066
+ for (i = 0; i < l; ++i)
1067
+ steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));
1068
+
1069
+ return steps;
1070
+ };
1071
+
1072
+ /**
1073
+ * VirtualRenderer.scrollToLine(line, center, animate, callback) -> Void
1074
+ * - line (Number): A line number
1075
+ * - center (Boolean): If `true`, centers the editor the to indicated line
1076
+ * - animate (Boolean): If `true` animates scrolling
1077
+ * - callback (Function): Function to be called after the animation has finished
1078
+ *
1079
+ * Gracefully scrolls the editor to the row indicated.
1080
+ **/
1081
+ this.scrollToLine = function(line, center, animate, callback) {
1082
+ var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
1083
+ var offset = pos.top;
1084
+ if (center)
1085
+ offset -= this.$size.scrollerHeight / 2;
1086
+
1087
+ var initialScroll = this.scrollTop;
1088
+ this.session.setScrollTop(offset);
1089
+ if (animate !== false)
1090
+ this.animateScrolling(initialScroll, callback);
1091
+ };
1092
+
1093
+ this.animateScrolling = function(fromValue, callback) {
1094
+ var toValue = this.scrollTop;
1095
+ if (this.$animatedScroll && Math.abs(fromValue - toValue) < 100000) {
1096
+ var _self = this;
1097
+ var steps = _self.$calcSteps(fromValue, toValue);
1098
+ this.$inScrollAnimation = true;
1099
+
1100
+ clearInterval(this.$timer);
1101
+
1102
+ _self.session.setScrollTop(steps.shift());
1103
+ this.$timer = setInterval(function() {
1104
+ if (steps.length) {
1105
+ _self.session.setScrollTop(steps.shift());
1106
+ // trick session to think it's already scrolled to not loose toValue
1107
+ _self.session.$scrollTop = toValue;
1108
+ } else if (toValue != null) {
1109
+ _self.session.$scrollTop = -1;
1110
+ _self.session.setScrollTop(toValue);
1111
+ toValue = null;
1112
+ } else {
1113
+ // do this on separate step to not get spurious scroll event from scrollbar
1114
+ _self.$timer = clearInterval(_self.$timer);
1115
+ _self.$inScrollAnimation = false;
1116
+ callback && callback();
1117
+ }
1118
+ }, 10);
1119
+ }
1120
+ };
1121
+
1122
+ /**
1123
+ * VirtualRenderer.scrollToY(scrollTop) -> Number
1124
+ * - scrollTop (Number): The position to scroll to
1125
+ *
1126
+ * Scrolls the editor to the y pixel indicated.
1127
+ *
1128
+ **/
1129
+ this.scrollToY = function(scrollTop) {
1130
+ // after calling scrollBar.setScrollTop
1131
+ // scrollbar sends us event with same scrollTop. ignore it
1132
+ if (this.scrollTop !== scrollTop) {
1133
+ this.$loop.schedule(this.CHANGE_SCROLL);
1134
+ this.scrollTop = scrollTop;
1135
+ }
1136
+ };
1137
+
1138
+ /**
1139
+ * VirtualRenderer.scrollToX(scrollLeft) -> Number
1140
+ * - scrollLeft (Number): The position to scroll to
1141
+ *
1142
+ * Scrolls the editor to the x pixel indicated.
1143
+ *
1144
+ **/
1145
+ this.scrollToX = function(scrollLeft) {
1146
+ if (scrollLeft < 0)
1147
+ scrollLeft = 0;
1148
+
1149
+ if (this.scrollLeft !== scrollLeft)
1150
+ this.scrollLeft = scrollLeft;
1151
+ this.$loop.schedule(this.CHANGE_H_SCROLL);
1152
+ };
1153
+
1154
+ /**
1155
+ * VirtualRenderer.scrollBy(deltaX, deltaY) -> Void
1156
+ * - deltaX (Number): The x value to scroll by
1157
+ * - deltaY (Number): The y value to scroll by
1158
+ *
1159
+ * Scrolls the editor across both x- and y-axes.
1160
+ **/
1161
+ this.scrollBy = function(deltaX, deltaY) {
1162
+ deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
1163
+ deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
1164
+ };
1165
+
1166
+ /**
1167
+ * VirtualRenderer.isScrollableBy(deltaX, deltaY) -> Boolean
1168
+ * - deltaX (Number): The x value to scroll by
1169
+ * - deltaY (Number): The y value to scroll by
1170
+ *
1171
+ * Returns `true` if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
1172
+ **/
1173
+ this.isScrollableBy = function(deltaX, deltaY) {
1174
+ if (deltaY < 0 && this.session.getScrollTop() > 0)
1175
+ return true;
1176
+ if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight < this.layerConfig.maxHeight)
1177
+ return true;
1178
+ // todo: handle horizontal scrolling
1179
+ };
1180
+
1181
+ this.pixelToScreenCoordinates = function(x, y) {
1182
+ var canvasPos = this.scroller.getBoundingClientRect();
1183
+
1184
+ var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth;
1185
+ var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);
1186
+ var col = Math.round(offset);
1187
+
1188
+ return {row: row, column: col, side: offset - col > 0 ? 1 : -1};
1189
+ };
1190
+
1191
+ this.screenToTextCoordinates = function(x, y) {
1192
+ var canvasPos = this.scroller.getBoundingClientRect();
1193
+
1194
+ var col = Math.round(
1195
+ (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
1196
+ );
1197
+ var row = Math.floor(
1198
+ (y + this.scrollTop - canvasPos.top) / this.lineHeight
1199
+ );
1200
+
1201
+ return this.session.screenToDocumentPosition(row, Math.max(col, 0));
1202
+ };
1203
+
1204
+ /**
1205
+ * VirtualRenderer.textToScreenCoordinates(row, column) -> Object
1206
+ * - row (Number): The document row position
1207
+ * - column (Number): The document column position
1208
+ *
1209
+ * Returns an object containing the `pageX` and `pageY` coordinates of the document position.
1210
+ *
1211
+ *
1212
+ **/
1213
+ this.textToScreenCoordinates = function(row, column) {
1214
+ var canvasPos = this.scroller.getBoundingClientRect();
1215
+ var pos = this.session.documentToScreenPosition(row, column);
1216
+
1217
+ var x = this.$padding + Math.round(pos.column * this.characterWidth);
1218
+ var y = pos.row * this.lineHeight;
1219
+
1220
+ return {
1221
+ pageX: canvasPos.left + x - this.scrollLeft,
1222
+ pageY: canvasPos.top + y - this.scrollTop
1223
+ };
1224
+ };
1225
+
1226
+ /**
1227
+ * VirtualRenderer.visualizeFocus() -> Void
1228
+ *
1229
+ * Focuses the current container.
1230
+ **/
1231
+ this.visualizeFocus = function() {
1232
+ dom.addCssClass(this.container, "ace_focus");
1233
+ };
1234
+
1235
+ /**
1236
+ * VirtualRenderer.visualizeBlur() -> Void
1237
+ *
1238
+ * Blurs the current container.
1239
+ **/
1240
+ this.visualizeBlur = function() {
1241
+ dom.removeCssClass(this.container, "ace_focus");
1242
+ };
1243
+
1244
+ /** internal, hide
1245
+ * VirtualRenderer.showComposition(position) -> Void
1246
+ * - position (Number):
1247
+ *
1248
+ **/
1249
+ this.showComposition = function(position) {
1250
+ if (!this.$composition)
1251
+ this.$composition = {
1252
+ keepTextAreaAtCursor: this.$keepTextAreaAtCursor,
1253
+ cssText: this.textarea.style.cssText
1254
+ };
1255
+
1256
+ this.$keepTextAreaAtCursor = true;
1257
+ dom.addCssClass(this.textarea, "ace_composition");
1258
+ this.textarea.style.cssText = "";
1259
+ this.$moveTextAreaToCursor();
1260
+ };
1261
+
1262
+ /**
1263
+ * VirtualRenderer.setCompositionText(text) -> Void
1264
+ * - text (String): A string of text to use
1265
+ *
1266
+ * Sets the inner text of the current composition to `text`.
1267
+ **/
1268
+ this.setCompositionText = function(text) {
1269
+ this.$moveTextAreaToCursor();
1270
+ };
1271
+
1272
+ /**
1273
+ * VirtualRenderer.hideComposition() -> Void
1274
+ *
1275
+ * Hides the current composition.
1276
+ **/
1277
+ this.hideComposition = function() {
1278
+ if (!this.$composition)
1279
+ return;
1280
+
1281
+ dom.removeCssClass(this.textarea, "ace_composition");
1282
+ this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;
1283
+ this.textarea.style.cssText = this.$composition.cssText;
1284
+ this.$composition = null;
1285
+ };
1286
+
1287
+ this._loadTheme = function(name, callback) {
1288
+ if (!config.get("packaged"))
1289
+ return callback();
1290
+
1291
+ var base = name.split("/").pop();
1292
+ var filename = config.get("themePath") + "/theme-" + base + config.get("suffix");
1293
+ net.loadScript(filename, callback);
1294
+ };
1295
+
1296
+ /**
1297
+ * VirtualRenderer.setTheme(theme) -> Void
1298
+ * - theme (String): The path to a theme
1299
+ *
1300
+ * [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
1301
+ **/
1302
+ this.setTheme = function(theme) {
1303
+ var _self = this;
1304
+
1305
+ this.$themeValue = theme;
1306
+ if (!theme || typeof theme == "string") {
1307
+ var moduleName = theme || "ace/theme/textmate";
1308
+
1309
+ var module;
1310
+ try {
1311
+ module = require(moduleName);
1312
+ } catch (e) {};
1313
+ if (module)
1314
+ return afterLoad(module);
1315
+
1316
+ _self._loadTheme(moduleName, function() {
1317
+ require([moduleName], function(module) {
1318
+ if (_self.$themeValue !== theme)
1319
+ return;
1320
+
1321
+ afterLoad(module);
1322
+ });
1323
+ });
1324
+ } else {
1325
+ afterLoad(theme);
1326
+ }
1327
+
1328
+ function afterLoad(theme) {
1329
+ dom.importCssString(
1330
+ theme.cssText,
1331
+ theme.cssClass,
1332
+ _self.container.ownerDocument
1333
+ );
1334
+
1335
+ if (_self.$theme)
1336
+ dom.removeCssClass(_self.container, _self.$theme);
1337
+
1338
+ _self.$theme = theme ? theme.cssClass : null;
1339
+
1340
+ if (_self.$theme)
1341
+ dom.addCssClass(_self.container, _self.$theme);
1342
+
1343
+ if (theme && theme.isDark)
1344
+ dom.addCssClass(_self.container, "ace_dark");
1345
+ else
1346
+ dom.removeCssClass(_self.container, "ace_dark");
1347
+
1348
+ // force re-measure of the gutter width
1349
+ if (_self.$size) {
1350
+ _self.$size.width = 0;
1351
+ _self.onResize();
1352
+ }
1353
+ }
1354
+ };
1355
+
1356
+ /**
1357
+ * VirtualRenderer.getTheme() -> String
1358
+ *
1359
+ * [Returns the path of the current theme.]{: #VirtualRenderer.getTheme}
1360
+ **/
1361
+ this.getTheme = function() {
1362
+ return this.$themeValue;
1363
+ };
1364
+
1365
+ // Methods allows to add / remove CSS classnames to the editor element.
1366
+ // This feature can be used by plug-ins to provide a visual indication of
1367
+ // a certain mode that editor is in.
1368
+
1369
+ /**
1370
+ * VirtualRenderer.setStyle(style) -> Void
1371
+ * - style (String): A class name
1372
+ *
1373
+ * [Adds a new class, `style`, to the editor.]{: #VirtualRenderer.setStyle}
1374
+ **/
1375
+ this.setStyle = function setStyle(style) {
1376
+ dom.addCssClass(this.container, style);
1377
+ };
1378
+
1379
+ /**
1380
+ * VirtualRenderer.unsetStyle(style) -> Void
1381
+ * - style (String): A class name
1382
+ *
1383
+ * [Removes the class `style` from the editor.]{: #VirtualRenderer.unsetStyle}
1384
+ **/
1385
+ this.unsetStyle = function unsetStyle(style) {
1386
+ dom.removeCssClass(this.container, style);
1387
+ };
1388
+
1389
+ /**
1390
+ * VirtualRenderer.destroy()
1391
+ *
1392
+ * Destroys the text and cursor layers for this renderer.
1393
+ **/
1394
+ this.destroy = function() {
1395
+ this.$textLayer.destroy();
1396
+ this.$cursorLayer.destroy();
1397
+ };
1398
+
1399
+ }).call(VirtualRenderer.prototype);
1400
+
1401
+ exports.VirtualRenderer = VirtualRenderer;
1402
+ });